diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000000..aed79af02ec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,30 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: type-bug, workflow-pending-triage, workflow-needs-replication +assignees: '' + +--- + +## Bug Report +### Expected behavior +When I do X, I expect Y to happen. + +### Actual behavior +When I do X, Z happens. + +### Steps to reproduce the behavior +1) +2) +3) +etc, etc + +### Information (if a specific version is affected): +PHP Version: + +EDD Version (or branch): + +WordPress Version: + +Any other relevant information: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000000..17ad8bd9131 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,13 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: type-request, workflow-pending-triage +assignees: 'cklosowski' + +--- + +## Enhancement Request +### Explain your enhancement (please be detailed) + +### Justification or use case diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 00000000000..f0d28957ba1 --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,33 @@ +# Instructions (START): +The purpose of this template is to standardize GitHub issues for bug reports and enhancement requests. Please follow the instructions below. +1. Determine whether your new issue is a "Bug Report" or "Enhancement Request." +2. Based on your issue type, delete the unneeded template section below. For example, if you are submitting a bug report, find the entire "Enhancement Request" section of the template and delete it. +3. Delete this entire block of instructions, from START to END, and fill out the sections to describe your reason for opening an issue. +# Instructions (END): + +## Bug Report +### Expected behavior +When I do X, I expect Y to happen. + +### Actual behavior +When I do X, Z happens. + +### Steps to reproduce the behavior +1) +2) +3) +etc, etc + +### Information (if a specific version is affected): +PHP Version: + +EDD Version (or branch): + +WordPress Version: + +Any other relevant information: + +## Enhancement Request +### Explain your enhancement (please be detailed) + +### Justification or use case diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000..311303791e9 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,8 @@ +Fixes # + +Proposed Changes: +1. +2. +3. + +_Please do not submit PRs with minified CSS or JS files. This is managed at the time of release by the Core Team_ diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 96c27495ebb..00000000000 --- a/.gitignore +++ /dev/null @@ -1,167 +0,0 @@ -################# -## Eclipse -################# - -*.pydevproject -.project -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.classpath -.settings/ -.loadpath - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# CDT-specific -.cproject - -# PDT-specific -.buildpath - - -################# -## Visual Studio -################# - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.sln.docstates - -# Build results -[Dd]ebug/ -[Rr]elease/ -*_i.c -*_p.c -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.vspscc -.builds -*.dotCover - -## TODO: If you have NuGet Package Restore enabled, uncomment this -#packages/ - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf - -# Visual Studio profiler -*.psess -*.vsp - -# ReSharper is a .NET coding add-in -_ReSharper* - -# Installshield output folder -[Ee]xpress - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish - -# Others -[Bb]in -[Oo]bj -sql -TestResults -*.Cache -ClientBin -stylecop.* -~$* -*.dbmdl -Generated_Code #added for RIA/Silverlight projects - -# Backup & report files from converting an old project file to a newer -# Visual Studio version. Backup files are not needed, because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML - - - -############ -## Windows -############ - -# Windows image file caches -Thumbs.db - -# Folder config file -Desktop.ini - - -############# -## Python -############# - -*.py[co] - -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs -.installed.cfg - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox - -#Translations -*.mo - -#Mr Developer -.mr.developer.cfg - -# Mac crap -.DS_Store - -# Sublime -*.sublime-project -*.sublime-workspace \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 00000000000..83880470e6c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,85 @@ +## Contribute To Easy Digital Downloads + +Community made patches, localisations, bug reports and contributions are always welcome and are crucial to ensure Easy Digital Downloads remains the #1 eCommerce platform for digital goods on WordPress. + +When contributing please ensure you follow the guidelines below so that we can keep on top of things. + +__Please Note:__ GitHub is for bug reports and contributions only - if you have a support question or a request for a customization don't post here, go to our [Support page](https://easydigitaldownloads.com/support/) instead. + +## Getting Started + +* __Do not report potential security vulnerabilities here. Email them privately to our security team at [security@easydigitaldownloads.com](mailto:security@easydigitaldownloads.com)__ +* Before submitting a ticket, please be sure to replicate the behavior with no other plugins active and on a base theme like Twenty Seventeen. +* Submit a ticket for your issue, assuming one does not already exist. + * Raise it on our [Issue Tracker](https://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues) + * Clearly describe the issue including steps to reproduce the bug. + * Make sure you fill in the earliest version that you know has the issue as well as the version of WordPress you're using. + +## Making Changes + +* Fork the repository on GitHub +* Make the changes to your forked repository + * Ensure you stick to the [WordPress Coding Standards](https://codex.wordpress.org/WordPress_Coding_Standards) +* When committing, reference your issue (if present) and include a note about the fix +* If possible, and if applicable, please also add/update unit tests for your changes +* Push the changes to your fork and submit a pull request to the 'master' branch of the EDD repository + +## Code Documentation + +* We ensure that every EDD function is documented well and follows the standards set by phpDoc +* An example function can be found [here](https://gist.github.com/sunnyratilal/5308969) +* Please make sure that every function is documented so that when we update our API Documentation things don't go awry! + * If you're adding/editing a function in a class, make sure to add `@access {private|public|protected}` +* Finally, please use tabs and not spaces. The tab indent size should be 4 for all EDD code. + +At this point you're waiting on us to merge your pull request. We'll review all pull requests, and make suggestions and changes if necessary. + +## Developer Certificate of Origin +By contributing to Easy Digital Downloads, you agree to the Developer Certificate of Origin. + +In its simplest form, the DCO states that you have permission to supply the code submitted to Easy Digital Downloads. Here is the DCO in detail: +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +1 Letterman Drive +Suite D4700 +San Francisco, CA, 94129 + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +# Additional Resources +* [EDD Developer's API](https://easydigitaldownloads.com/docs/developers-intro-to-easy-digital-downloads/) +* [General GitHub Documentation](https://help.github.com/) +* [GitHub Pull Request documentation](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) +* [PHPUnit Tests Guide](https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html) diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000000..208f3b8b5ea --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,215 @@ +module.exports = function ( grunt ) { + // Load multiple grunt tasks using globbing patterns + require( 'load-grunt-tasks' )( grunt ); + + // Project configuration. + grunt.initConfig( { + + pkg: grunt.file.readJSON( 'package.json' ), + + checktextdomain: { + options: { + text_domain: 'easy-digital-downloads', + correct_domain: true, + keywords: [ + '__:1,2d', + '_e:1,2d', + '_x:1,2c,3d', + 'esc_html__:1,2d', + 'esc_html_e:1,2d', + 'esc_html_x:1,2c,3d', + 'esc_attr__:1,2d', + 'esc_attr_e:1,2d', + 'esc_attr_x:1,2c,3d', + '_ex:1,2c,3d', + '_n:1,2,3,4d', + '_nx:1,2,4c,5d', + '_n_noop:1,2,3d', + '_nx_noop:1,2,3c,4d', + ' __ngettext:1,2,3d', + '__ngettext_noop:1,2,3d', + '_c:1,2d', + '_nc:1,2,4c,5d', + ], + }, + files: { + src: [ + '**/*.php', // Include all files + '!node_modules/**', // Exclude node_modules/ + '!build/**', // Exclude build/ + '!vendor/**', // Exclude vendor/ + '!tests/**', // Exclude tests/ + '!includes/blocks/node_modules/**', // Exclude includes/blocks/node_modules/ + '!includes/libraries/**', // Exclude includes/libraries/ + ], + expand: true, + }, + }, + + // Clean up build directory + clean: { + main: [ 'build/**' ], + repo: [ 'build/<%= pkg.name %>-public/**' ], + }, + + // Copy the plugin into the build directory + copy: { + pro: { + src: [ + 'assets/**', + '!assets/lite/**', + 'i18n/**', + 'includes/**', + '!includes/blocks/node_modules/**', + '!includes/blocks/composer.json', + '!includes/blocks/package.json', + '!includes/blocks/package-lock.json', + 'languages/**', + 'libraries/**', + 'templates/**', + 'src/**', + '!src/Lite/**', + '*.php', + '*.txt', + '!vendor/**', + 'vendor/autoload.php', + 'vendor/composer/**', + 'vendor/symfony/deprecation-contracts/**', + 'vendor/symfony/polyfill-php80/**', + 'vendor/symfony/polyfill-mbstring/**', + ], + dest: 'build/<%= pkg.name %>-pro/', + }, + lite: { + src: [ + 'assets/**', + '!assets/pro/**', + 'i18n/**', + 'includes/**', + '!includes/blocks/pro/**', + '!includes/blocks/assets/pro/**', + '!includes/blocks/build/pro/**', + '!includes/blocks/node_modules/**', + '!includes/blocks/src/pro/**', + '!includes/blocks/composer.json', + '!includes/blocks/package.json', + '!includes/blocks/package-lock.json', + 'languages/**', + 'libraries/**', + 'templates/**', + 'src/**', + '*.php', + '*.txt', + '!src/Pro/**', + '!vendor/**', + 'vendor/autoload.php', + 'vendor/composer/**', + 'vendor/symfony/deprecation-contracts/**', + 'vendor/symfony/polyfill-php80/**', + 'vendor/symfony/polyfill-mbstring/**', + ], + dest: 'build/<%= pkg.name %>/', + }, + repo: { + src: [ + '**', + 'assets/**', + '!assets/pro/**', + '!build/**', + 'i18n/**', + 'includes/**', + '!includes/blocks/pro/**', + '!includes/blocks/assets/pro/**', + '!includes/blocks/build/pro/**', + '!includes/blocks/node_modules/**', + '!includes/blocks/src/pro/**', + 'languages/**', + 'libraries/**', + '!node_modules/**', + 'templates/**', + 'src/**', + '!src/Pro/**', + '!vendor/**', + 'vendor/autoload.php', + 'vendor/composer/**', + 'vendor/symfony/deprecation-contracts/**', + 'vendor/symfony/polyfill-php80/**', + 'vendor/symfony/polyfill-mbstring/**', + ], + dest: 'build/<%= pkg.name %>-public/', + } + }, + + // Compress build directory into .zip and -.zip + compress: { + pro: { + options: { + mode: 'zip', + archive: './build/<%= pkg.name %>-pro-<%= pkg.version %>.zip', + }, + expand: true, + cwd: 'build/<%= pkg.name %>-pro/', + src: [ '**/*' ], + dest: '<%= pkg.name %>-pro/', + }, + lite: { + options: { + mode: 'zip', + archive: './build/<%= pkg.name %>-<%= pkg.version %>.zip', + }, + expand: true, + cwd: 'build/<%= pkg.name %>/', + src: [ '**/*' ], + dest: '<%= pkg.name %>/', + }, + }, + + replace: { + pro: { + options: { + patterns: [ + { + match: /Plugin Name: Easy Digital Downloads \(Pro\)/g, + replacement: 'Plugin Name: Easy Digital Downloads', + expression: true, + } + ] + }, + files: [ + { + expand: true, + flatten: true, + src: [ 'build/easy-digital-downloads/easy-digital-downloads.php' ], + dest: 'build/easy-digital-downloads' + } + ] + }, + repo: { + options: { + patterns: [ + { + match: /Plugin Name: Easy Digital Downloads \(Pro\)/g, + replacement: 'Plugin Name: Easy Digital Downloads', + expression: true, + } + ] + }, + files: [ + { + expand: true, + flatten: true, + src: [ 'build/easy-digital-downloads-public/easy-digital-downloads.php' ], + dest: 'build/easy-digital-downloads-public' + } + ] + } + } + } ); + + // Build task(s). + grunt.registerTask( 'prep', [ 'clean', 'force:checktextdomain' ] ); + grunt.registerTask( 'build', [ 'clean', 'pro', 'lite' ] ); + grunt.registerTask( 'pro', [ 'copy:pro', 'compress:pro' ] ); + grunt.registerTask( 'lite', [ 'copy:lite', 'replace:pro' ] ); + grunt.registerTask( 'repo', [ 'clean:repo', 'copy:repo', 'replace:repo' ] ); +}; diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 00000000000..b4c4aae8e1c --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,13 @@ +Getting help with Easy Digital Downloads, EDD themes and EDD addons +======================== + +We look forward to helping resolve any issues or relaying any feedback or ideas you have about Easy Digital Downloads. To report an issue, receive support, give us feedback, or send us an idea please open a support ticket. + +Support Ticket +------ + +We recommend all users with support questions email us via the support form found at [easydigitaldownloads.com/support/](https://easydigitaldownloads.com/support/). GitHub is used for core development only, and is not the place to seek help or report non-developer issues for Easy Digital Downloads, or EDD addons or themes. + +Before opening a support ticket, please also review our [documentation](https://easydigitaldownloads.com/docs) for assistance with common issues and FAQs. + +If reporting a bug, please be as descriptive as possible and include links to screenshots or screenshares that demonstrate the issue. diff --git a/apigen.neon b/apigen.neon new file mode 100644 index 00000000000..aa731881132 --- /dev/null +++ b/apigen.neon @@ -0,0 +1,4 @@ +source: + - ./ + +destination: codex diff --git a/assets/banner-772x250.png b/assets/banner-772x250.png deleted file mode 100755 index d42741fd210..00000000000 Binary files a/assets/banner-772x250.png and /dev/null differ diff --git a/assets/css/admin/chosen/_base.scss b/assets/css/admin/chosen/_base.scss new file mode 100644 index 00000000000..62cd73bff62 --- /dev/null +++ b/assets/css/admin/chosen/_base.scss @@ -0,0 +1,50 @@ +.chosen-container { + font-size: 14px; + + .chosen-drop { + position: absolute; + top: 100%; + z-index: 1010; + width: 100%; + border-radius: 0 0 4px 4px; + border-width: 0 1px 0 1px; + border-color: transparent; + background: $white; + outline: 2px solid transparent; + } + + .spinner { + margin: 0; + position: absolute; + top: 4px; + right: 30px; + } +} + +.chosen-container-multi .search-field, +.chosen-container-single .chosen-single, +.chosen-container-active.chosen-with-drop .chosen-single { + background: $white url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 5px top 55%; + background-size: 16px 16px; + border: 1px solid $wp-input-border; + box-shadow: 0 0 0 transparent; + color: $wp-input-text; +} + +.chosen-container-multi .chosen-choices, +.chosen-container-single .chosen-single { + border-radius: 4px; + border-color: $wp-input-border; +} + +.chosen-container-multi.chosen-with-drop .chosen-choices, +.chosen-container-active.chosen-with-drop .chosen-single { + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); +} + +.chosen-container-single.chosen-container-active.chosen-with-drop.chosen-dropup .chosen-single, +.chosen-container-multi.chosen-container-active.chosen-dropup .chosen-choices { + border-radius: 0 0 4px 4px; + border-width: 0 1px 0 1px; + z-index: 1011; +} diff --git a/assets/css/admin/chosen/_colors.scss b/assets/css/admin/chosen/_colors.scss new file mode 100644 index 00000000000..efe11f31333 --- /dev/null +++ b/assets/css/admin/chosen/_colors.scss @@ -0,0 +1,24 @@ + +/* WordPress Color Schemes */ + +:root { + @include edd-admin-colors(); +} + +.chosen-container.chosen-container-active .chosen-single, +.chosen-container.chosen-container-active .chosen-choices, +.chosen-with-drop.chosen-dropup .chosen-drop { + border-color: var(--wp-admin-theme-color); + box-shadow: 0 0 0 1px var(--wp-admin-theme-color); +} + +.chosen-with-drop.chosen-dropup .chosen-single, +.chosen-container-active.chosen-dropup .chosen-choices, +.chosen-container .chosen-drop { + border-color: var(--wp-admin-theme-color); + box-shadow: 0 1px 0 1px var(--wp-admin-theme-color); +} + +.chosen-container .chosen-results li.highlighted { + background-color: var(--wp-admin-theme-color); +} diff --git a/assets/css/admin/chosen/_edd.scss b/assets/css/admin/chosen/_edd.scss new file mode 100644 index 00000000000..16c112d3c72 --- /dev/null +++ b/assets/css/admin/chosen/_edd.scss @@ -0,0 +1,20 @@ +.edd-select-chosen { + width: 100%; + max-width: 300px; +} + +.edd-select-chosen.edd-customer-select { + width: 100% !important; +} + +.edd-select-chosen.edd-time { + width: 55px; + max-width: 55px; +} + +@media screen and (max-width: $break-medium) { + .edd-select-chosen.edd-time { + width: 70px; + max-width: 70px; + } +} diff --git a/assets/css/admin/chosen/_multi.scss b/assets/css/admin/chosen/_multi.scss new file mode 100644 index 00000000000..f0cf3eda8c0 --- /dev/null +++ b/assets/css/admin/chosen/_multi.scss @@ -0,0 +1,61 @@ +.chosen-container-multi { + .search-field { + border: none; + } + + &.chosen-with-drop .chosen-choices { + border-bottom-color: transparent; + } + + .chosen-choices li.search-field { + min-width: 100px !important; + width: 100%; + } + + .chosen-choices li.search-field input[type=text] { + color: $wp-input-text; + font-family: unset; + height: unset; + margin: 0; + padding: 3px 24px 3px 10px; + width: 100% !important; + } + + .chosen-choices li.search-choice { + margin: 3px 5px 3px 0; + padding: 5px 22px 5px 5px; + border: 1px solid $wp-input-border; + max-width: 100%; + border-radius: 4px; + background: #f4f4f4; + box-shadow: none; + color: $wp-input-text; + cursor: default; + } + + .chosen-choices li.search-choice .search-choice-close { + position: absolute; + top: 4px; + right: 3px; + display: block; + width: 15px; + height: 15px; + } + + .chosen-choices li.search-choice .search-choice-close:before { + height: 15px; + width: 15px; + position: absolute; + top: 0; + right: 0; + color: $wp-input-text; + font-family: 'dashicons'; + content: '\f158'; + font-size: 15px; + line-height: 1; + } + + .chosen-choices li.search-choice .search-choice-close:hover:before { + color: $wp-text; + } +} diff --git a/assets/css/admin/chosen/_results.scss b/assets/css/admin/chosen/_results.scss new file mode 100644 index 00000000000..bc0fa829eff --- /dev/null +++ b/assets/css/admin/chosen/_results.scss @@ -0,0 +1,16 @@ + +.chosen-container .chosen-results { + color: $wp-text; + position: relative; + overflow-x: hidden; + overflow-y: auto; + margin: 0 4px 4px 0; + padding: 0 0 0 4px; + max-height: 240px; +} + +.chosen-container .chosen-results li.highlighted { + background-image: none; + border-radius: 4px; + color: $white; +} diff --git a/assets/css/admin/chosen/_single.scss b/assets/css/admin/chosen/_single.scss new file mode 100644 index 00000000000..d3cba7e73d0 --- /dev/null +++ b/assets/css/admin/chosen/_single.scss @@ -0,0 +1,54 @@ +.chosen-container-single .chosen-single div b { + background-image: none; +} + +.chosen-container-single .chosen-search:after { + display: block; + position: absolute; + right: 6px; + top: 50%; + font-family: dashicons; + font-size: 17px; + content: '\f179'; + transform: translateY(-50%); +} + +.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single { + border-radius: 4px 4px 0 0; +} + +.chosen-container-single .chosen-single div { + width: 26px; +} + +.chosen-container-single .chosen-default { + color: $wp-input-text; +} + +.chosen-container-active .chosen-single { + border-color: transparent; + outline: 2px solid transparent; +} + +.chosen-container-single .chosen-search input[type=text] { + margin: 1px 0; + padding: 4px 20px 4px 5px; + width: 100% !important; + height: auto; + outline: 0; + border: 1px solid $wp-input-border; + border-radius: 4px; + line-height: normal; + box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 ); +} +.chosen-container-single .chosen-single, +.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single { + min-height: 30px; + + @media screen and (max-width: $break-medium) { + font-size: 16px; + line-height: 1.625; + min-height: 40px; + padding: 5px 8px; + } +} diff --git a/assets/css/admin/chosen/style.scss b/assets/css/admin/chosen/style.scss new file mode 100644 index 00000000000..e35dbe54877 --- /dev/null +++ b/assets/css/admin/chosen/style.scss @@ -0,0 +1,17 @@ +/* Chosen styles +-------------------------------------------------------------- */ + +@import "~@wordpress/base-styles/colors"; +@import "~@wordpress/base-styles/variables"; +@import "~@wordpress/base-styles/mixins"; +@import "~@wordpress/base-styles/breakpoints"; +@import "~@wordpress/base-styles/animations"; +@import "../../variables/colors"; +@import "../../variables/mixins"; + +@import 'base'; +@import 'single'; +@import 'multi'; +@import 'results'; +@import 'colors'; +@import 'edd'; diff --git a/assets/css/admin/dashboard/_widget.scss b/assets/css/admin/dashboard/_widget.scss new file mode 100644 index 00000000000..eac4d7836c8 --- /dev/null +++ b/assets/css/admin/dashboard/_widget.scss @@ -0,0 +1,110 @@ +.edd_dashboard_widget { + display: grid; + grid-template-columns: repeat(2, minmax(150px, 1fr)); + grid-gap: 1em; + + > div:not(.table_left):not(.table_right) { + grid-column: span 2; + } + + table thead td { + border-bottom: 1px solid $wp-border; + color: #777; + } + + .inside { + font-size: 12px; + } + + td { + padding: 3px 0; + } + + .b, + .t { + line-height: 1.5; + vertical-align: middle; + } + + .b { + text-align: right; + } + + .t { + font-size: 12px; + padding-right: 12px; + color: #777; + width: 100%; + } + + .label_heading { + border-top: 1px solid $wp-border; + color: #8f8f8f; + font-size: 12px; + font-weight: normal; + display: block; + padding-top: 10px; + margin: 0 0 8px 12px; + } + + .edd_dashboard_widget_subheading { + border-top: 1px solid $wp-border; + color: #8f8f8f; + font-size: 14px; + padding-top: 10px; + margin: 1em 0 0 0; + } + + .edd_dashboard_widget_subheading+.table { + margin: 8px 0 0 0; + } + + .edd_price_label { + background: var(--wp-admin-theme-color); + border-radius: 3px; + color: white; + font-size: 10px; + padding: 2px 4px; + margin-right: 2px; + } + + table { + width: 100%; + margin-left: 0; + margin-bottom: 1em; + } +} + +td.edd_order_label { + width: 80%; +} + +td.edd_order_price { + text-align: right; +} + +@media handheld, +only screen and (max-width: 1000px) { + + .edd_dashboard_widget .edd-recent-email { + display: none; + } +} + +.edd-dashboard-notice { + grid-column: span 2; + padding: 1px; + text-align: center; + margin: 1em -1em -1em; + background-color: $wp-alternate; + border: 1px solid $wp-border; + + &--error { + background: $wp-red-50; + color: $white; + + a { + color: $white; + } + } +} diff --git a/assets/css/admin/dashboard/style.scss b/assets/css/admin/dashboard/style.scss new file mode 100644 index 00000000000..691d8726d51 --- /dev/null +++ b/assets/css/admin/dashboard/style.scss @@ -0,0 +1,5 @@ +@import "widget"; + +body.dashboard_page_edd-upgrades.js .postbox .hndle { + cursor: default; +} diff --git a/assets/css/admin/datepicker.scss b/assets/css/admin/datepicker.scss new file mode 100644 index 00000000000..c9fb7204709 --- /dev/null +++ b/assets/css/admin/datepicker.scss @@ -0,0 +1,349 @@ +/* Date Picker Default Styles */ +.edd-datepicker { + padding: 0; + margin: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + background-color: #fff; + border: 1px solid #dfdfdf; + border-top: none; + -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075); + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075); + min-width: 17em; + width: auto; + z-index: 1000 !important; +} + +.edd-datepicker * { + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.edd-datepicker table { + font-size: 13px; + margin: 0; + border: none; + border-collapse: collapse; +} + +.edd-datepicker .ui-widget-header, +.edd-datepicker .ui-datepicker-header { + background-image: none; + border: none; + color: #fff; + font-weight: normal; + padding: .2em 0; +} + +.edd-datepicker .ui-datepicker-header .ui-state-hover { + background: transparent; + border-color: transparent; + cursor: pointer; +} + +.edd-datepicker .ui-datepicker-title { + margin: 0; + padding: 10px 0; + color: #fff; + font-size: 14px; + line-height: 14px; + text-align: center; +} + +.edd-datepicker .ui-datepicker-prev, +.edd-datepicker .ui-datepicker-next { + position: relative; + top: 0; + height: 34px; + width: 34px; +} + +.edd-datepicker .ui-state-hover.ui-datepicker-prev, +.edd-datepicker .ui-state-hover.ui-datepicker-next { + border: none; +} + +.edd-datepicker .ui-datepicker-prev, +.edd-datepicker .ui-datepicker-prev-hover { + left: 0; +} + +.edd-datepicker .ui-datepicker-next, +.edd-datepicker .ui-datepicker-next-hover { + right: 0; +} + +.edd-datepicker .ui-datepicker-next span, +.edd-datepicker .ui-datepicker-prev span { + display: none; +} + +.edd-datepicker .ui-datepicker-prev { + float: left; +} + +.edd-datepicker .ui-datepicker-next { + float: right; +} + +.edd-datepicker .ui-datepicker-prev:before, +.edd-datepicker .ui-datepicker-next:before { + font: normal 20px/34px 'dashicons'; + padding-left: 7px; + color: #fff; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + width: 34px; + height: 34px; +} + +.edd-datepicker .ui-datepicker-prev:before { + content: '\f341'; +} + +.edd-datepicker .ui-datepicker-next:before { + content: '\f345'; +} + +.edd-datepicker .ui-datepicker-prev-hover:before, +.edd-datepicker .ui-datepicker-next-hover:before { + opacity: 0.7; +} + +.edd-datepicker select.ui-datepicker-month, +.edd-datepicker select.ui-datepicker-year { + width: 33%; +} + +.edd-datepicker thead { + color: #fff; + font-weight: 600; +} + +.edd-datepicker th { + padding: 10px; +} + +.edd-datepicker td { + padding: 0; + border: 1px solid #f4f4f4; +} + +.edd-datepicker td.ui-datepicker-other-month { + border: transparent; +} + +.edd-datepicker tr:first-of-type td { + border-top: 1px solid #f0f0f0; +} + +.edd-datepicker td.ui-datepicker-week-end { + background-color: #f4f4f4; + border: 1px solid #f0f0f0; +} + +.edd-datepicker td.ui-datepicker-today { + background-color: #f0f0c0; +} + +.edd-datepicker td.ui-datepicker-current-day { + background: #bbdd88; +} + +.edd-datepicker td .ui-state-default { + background: transparent; + border: none; + text-align: center; + text-decoration: none; + width: auto; + display: block; + padding: 5px 10px; + font-weight: normal; + color: #444; +} + +.edd-datepicker td.ui-state-disabled .ui-state-default { + opacity: 0.5; +} + +/* Default Color Scheme */ +.edd-datepicker .ui-widget-header, +.edd-datepicker .ui-datepicker-header { + background: #00a0d2; +} + +.edd-datepicker thead { + background: #32373c; +} + +.edd-datepicker td .ui-state-hover { + background: #0073aa; + color: #fff; +} + +/* WordPress Color Schemes */ + +/* Fresh */ +.admin-color-fresh .edd-datepicker .ui-widget-header, +.admin-color-fresh .edd-datepicker .ui-datepicker-header { + background: #00a0d2; +} + +.admin-color-fresh .edd-datepicker thead { + background: #32373c; +} + +.admin-color-fresh .edd-datepicker td .ui-state-hover { + background: #0073aa; + color: #fff; +} + +/* Blue */ +.admin-color-blue .edd-datepicker .ui-widget-header, +.admin-color-blue .edd-datepicker .ui-datepicker-header { + background: #52accc; +} + +.admin-color-blue .edd-datepicker thead { + background: #4796b3; +} + +.admin-color-blue .edd-datepicker td .ui-state-hover { + background: #096484; + color: #fff; +} + +/* Coffee */ +.admin-color-coffee .edd-datepicker .ui-widget-header, +.admin-color-coffee .edd-datepicker .ui-datepicker-header { + background: #59524c; +} + +.admin-color-coffee .edd-datepicker thead { + background: #46403c; +} + +.admin-color-coffee .edd-datepicker td .ui-state-hover { + background: #c7a589; + color: #fff; +} + +/* Ectoplasm */ +.admin-color-ectoplasm .edd-datepicker .ui-widget-header, +.admin-color-ectoplasm .edd-datepicker .ui-datepicker-header { + background: #523f6d; +} + +.admin-color-ectoplasm .edd-datepicker thead { + background: #413256; +} + +.admin-color-ectoplasm .edd-datepicker td .ui-state-hover { + background: #a3b745; + color: #fff; +} + +/* Midnight */ +.admin-color-midnight .edd-datepicker .ui-widget-header, +.admin-color-midnight .edd-datepicker .ui-datepicker-header { + background: #363b3f; +} + +.admin-color-midnight .edd-datepicker thead { + background: #26292c; +} + +.admin-color-midnight .edd-datepicker td .ui-state-hover { + background: #e14d43; + color: #fff; +} + +/* Ocean */ +.admin-color-ocean .edd-datepicker .ui-widget-header, +.admin-color-ocean .edd-datepicker .ui-datepicker-header { + background: #738e96; +} + +.admin-color-ocean .edd-datepicker thead { + background: #627c83; +} + +.admin-color-ocean .edd-datepicker td .ui-state-hover { + background: #9ebaa0; + color: #fff; +} + +/* Sunrise */ +.admin-color-sunrise .edd-datepicker .ui-widget-header, +.admin-color-sunrise .edd-datepicker .ui-datepicker-header, +.admin-color-sunrise .edd-datepicker .ui-datepicker-header .ui-state-hover { + background: #cf4944; +} + +.admin-color-sunrise .edd-datepicker th { + border-color: #be3631; + background: #be3631; +} + +.admin-color-sunrise .edd-datepicker td .ui-state-hover { + background: #dd823b; + color: #fff; +} + +/* Light */ +.admin-color-light .edd-datepicker .ui-widget-header, +.admin-color-light .edd-datepicker .ui-datepicker-header { + background: #e5e5e5; +} + +.admin-color-light .edd-datepicker thead { + background: #888; +} + +.admin-color-light .edd-datepicker .ui-datepicker-title, +.admin-color-light .edd-datepicker td .ui-state-default, +.admin-color-light .edd-datepicker .ui-datepicker-prev:before, +.admin-color-light .edd-datepicker .ui-datepicker-next:before { + color: #555; +} + +.admin-color-light .edd-datepicker td .ui-state-hover { + background: #e5e5e5; +} + +/* bbPress Color Schemes */ + +/* Evergreen */ +.admin-color-bbp-evergreen .edd-datepicker .ui-widget-header, +.admin-color-bbp-evergreen .edd-datepicker .ui-datepicker-header { + background: #56b274; +} + +.admin-color-bbp-evergreen .edd-datepicker thead { + background: #36533f; +} + +.admin-color-bbp-evergreen .edd-datepicker td .ui-state-hover { + background: #446950; + color: #fff; +} + +/* Mint */ +.admin-color-bbp-mint .edd-datepicker .ui-widget-header, +.admin-color-bbp-mint .edd-datepicker .ui-datepicker-header { + background: #4ca26a; +} + +.admin-color-bbp-mint .edd-datepicker thead { + background: #4f6d59; +} + +.admin-color-bbp-mint .edd-datepicker td .ui-state-hover { + background: #5fb37c; + color: #fff; +} diff --git a/assets/css/admin/discounts/_add-edit.scss b/assets/css/admin/discounts/_add-edit.scss new file mode 100644 index 00000000000..72a53eae368 --- /dev/null +++ b/assets/css/admin/discounts/_add-edit.scss @@ -0,0 +1,132 @@ + +#edd-products { + height: 100px; + min-width: 200px; +} + +#edd-add-discount input[type="text"], +#edd-edit-discount input[type="text"] { + width: 300px; +} + +#edd-add-discount .edd-discount-datetime input, +#edd-edit-discount .edd-discount-datetime input { + vertical-align: middle; +} + +#edd-add-discount input[type="text"].edd_datepicker, +#edd-edit-discount input[type="text"].edd_datepicker { + display: inline-block; + width: 183px; +} + +#edd-edit-discount textarea { + height: 100px; +} + +.edd-amount-type-wrapper { + position: relative; + display: flex; +} + +.edd-amount-type-wrapper select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + width: auto !important; +} + +.edd-amount-type-wrapper #edd-amount { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + margin-right: -2px; + padding: 0 8px; + width: unset; + max-width: 125px; +} + +.edd-amount-type-wrapper input:focus { + z-index: 2; +} + +.edd-code-wrapper { + display: flex; + align-items: stretch; + gap: 3px; +} + +.edd-popup-trigger { + display: flex !important; + align-items: center; + gap: 3px; + + @media screen and (max-width: 782px) { + margin-bottom: 0 !important; + } + + @media screen and (max-width: 480px) { + span:not(.dashicons) { + display: none; + } + } +} + +.edd-code-generator-popup { + @include edd-popup( $width: 250px, $transformX: 240px, $transformY: 15px, $pointer-size: 15px, $pointer-position: top ); + + @media screen and (max-width: 480px) { + transform: translateY(15px) translateX(105px); + + &:after { + left: 70%; + } + } + + .edd-form-group { + width: 100%; + margin-bottom: 10px; + padding-bottom: 10px; + box-sizing: border-box; + margin-top: 0; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid $wp-gray-5; + height: 40px; + + &:last-of-type { + border-bottom: 0; + } + + label { + padding: 5px 0; + width: 60px; + font-size: 12px; + margin-bottom: 0; + box-sizing: border-box; + + @media screen and (max-width: 782px) { + line-height: 28px; + } + } + + input:not([type="checkbox"]):not([type="radio"]) { + width: 120px !important; + min-height: 0; + height: 30px; + + &:not(:focus) { + border: 1px solid $wp-input-border-2; + } + } + } + + #edd-generate-code { + width: 100%; + + @media screen and (max-width: 782px) { + &:before { + margin-top: 8px; + } + } + } +} diff --git a/assets/css/admin/discounts/_list-table.scss b/assets/css/admin/discounts/_list-table.scss new file mode 100644 index 00000000000..b8af3faba87 --- /dev/null +++ b/assets/css/admin/discounts/_list-table.scss @@ -0,0 +1,9 @@ +.wp-list-table.discounts { + .column-amount { + width: 90px; + } + + th.column-use_count { + width: 150px; + } +} diff --git a/assets/css/admin/discounts/style.scss b/assets/css/admin/discounts/style.scss new file mode 100644 index 00000000000..54245f44010 --- /dev/null +++ b/assets/css/admin/discounts/style.scss @@ -0,0 +1,3 @@ +@import "../../variables/colors"; +@import "list-table"; +@import "add-edit"; diff --git a/assets/css/admin/downloads/_duplicate.scss b/assets/css/admin/downloads/_duplicate.scss new file mode 100644 index 00000000000..eb055bd6c7d --- /dev/null +++ b/assets/css/admin/downloads/_duplicate.scss @@ -0,0 +1,6 @@ +#edd-duplicate-action { + & ~ #publishing-action { + position: relative; + top: -10px; + } +} diff --git a/assets/css/admin/downloads/_prices.scss b/assets/css/admin/downloads/_prices.scss new file mode 100644 index 00000000000..36f7a090a16 --- /dev/null +++ b/assets/css/admin/downloads/_prices.scss @@ -0,0 +1,41 @@ + +.edd-custom-price-option { + &-sections-wrap { + display: none; + border-width: 0 1px 1px; + border-style: solid; + border-color: $wp-border; + box-sizing: border-box; + width: 100%; + } + + &-section { + display: block; + padding: 10px 8px; + border-bottom: 1px solid rgba( 222, 222, 222, 0.3 ); + + &-title { + display: block; + font-weight: 600; + padding: 0 0 10px; + } + + &-content { + display: flex; + gap: 12px; + margin-bottom: 6px; + } + + &:last-child { + border-bottom: none; + } + } +} + +.toggle-custom-price-option-section { + color: $wp-gray-40; + + &:hover { + color: $wp-text; + } +} diff --git a/assets/css/admin/downloads/_product-files.scss b/assets/css/admin/downloads/_product-files.scss new file mode 100644 index 00000000000..d68f251f46a --- /dev/null +++ b/assets/css/admin/downloads/_product-files.scss @@ -0,0 +1,31 @@ +#edd_product_files { + &.ajax--loading { + position: relative; + + &:before { + background: none; + display: block; + position: absolute; + top: 50%; + left: 50%; + z-index: 5; + @include edd-spinner( + 1.25em, + $wp-input-border, + $wp-alternate + ); + } + + &::after { + background-color: rgba( $white, .75 ); + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + content: ' '; + z-index: 1; + } + } +} diff --git a/assets/css/admin/downloads/_product_settings.scss b/assets/css/admin/downloads/_product_settings.scss new file mode 100644 index 00000000000..a9953abb5b3 --- /dev/null +++ b/assets/css/admin/downloads/_product_settings.scss @@ -0,0 +1,30 @@ +#edd_product_settings { + + .edd-product-options__title, + .inside strong { + border-top: 1px solid $wp-border; + border-bottom: 1px solid $wp-border; + background-color: $wp-alternate; + display: flex; + font-weight: 600; + margin: 0 -12px 16px; + padding: 8px 12px; + justify-content: space-between; + align-items: center; + } + + .edd-product-options-wrapper:first-of-type .edd-product-options__title, + .inside div:first-child strong { + margin-top: -8px; + } + + .edd-product-options__title .edd-help-tip, + .inside strong .edd-help-tip { + font-size: 20px; + } + + .label--block { + display: block; + margin: 0 0 4px; + } +} diff --git a/assets/css/admin/downloads/_repeatable_row.scss b/assets/css/admin/downloads/_repeatable_row.scss new file mode 100644 index 00000000000..2e4ae057f71 --- /dev/null +++ b/assets/css/admin/downloads/_repeatable_row.scss @@ -0,0 +1,188 @@ +.edd_repeatable_row.ui-sortable-placeholder { + line-height: 0; + padding: 0; + margin: 0; + box-sizing: border-box; + border: 1px dashed $wp-border; + visibility: visible !important; +} + +.edd-add-repeatable-row { + border-top: 1px solid $wp-border; + padding: 12px; + margin: 15px -12px -12px -12px; + display: flex; + justify-content: flex-end; + align-items: center; +} + +.edd_repeatable_row input[type="text"].large-text { + width: 100%; +} + +.edd_variable_prices_wrapper:not(:first-child), +.edd_repeatable_upload_wrapper:not(:first-child) { + margin-top: 12px; +} + +.edd_repeatable_row.ui-sortable-helper .edd-repeatable-row-actions .edd-remove-row { + display: none; +} + +.edd-repeatable-row-actions { + color: $wp-gray-40; + + a { + text-decoration: none; + width: auto; + cursor: pointer; + } +} + +.edd-repeatable-row-header, +.edd-bundle-products-header { + clear: both; + background: $wp-gray-0; + border: 1px solid $wp-border; + display: flex; + justify-content: space-between; +} + +.edd-repeatable-row-header { + cursor: move; +} + +.edd_repeatable_row:hover .edd-repeatable-row-header, +.edd_repeatable_row:hover .edd-repeatable-row-standard-fields { + border-color: $wp-border; +} + +.edd-repeatable-row-header:before, +.edd-repeatable-row-header:after, +.edd-bundled-product-row:before, +.edd-bundled-product-row:after { + content: ''; + display: table; +} + +.edd-repeatable-row-header:after, +.edd-bundled-product-row:after { + clear: both; +} + +.edd-repeatable-row-title, +.edd-bundle-products-header { + font-weight: 600; +} + +.edd-repeatable-row-title, +.edd-repeatable-row-actions, +.edd-bundle-products-header { + padding: 8px; + box-sizing: border-box; +} + +.edd-repeatable-row-actions { + flex-grow: 1; + text-align: right; +} + +.edd-repeatable-row-actions .edd-remove-row, +.edd-bundled-product-row .edd-remove-row { + width: auto; + cursor: pointer; +} + +.edd-repeatable-row-standard-fields, +.edd-bundled-product-row { + padding: 8px; + border-width: 0 1px 1px; + border-style: solid; + border-color: $wp-border; + display: flex; + justify-content: space-between; + align-items: center; + gap: 18px; +} + +/* @todo: remove these when .edd-form-row has been fully implemented */ +.edd-repeatable-row-standard-fields .edd-form-group, +.edd-bundled-product-row .edd-form-group { + margin-bottom: 0; + display: inline-flex; + flex-direction: column; + flex-grow: 1; + justify-content: space-between; +} + +.edd-repeatable-row-setting-label .edd-help-tip { + display: inline-block; + margin-left: 4px; +} + +.edd-bundled-product-item-reorder { + min-width: 30px; + + .edd-product-file-reorder { + font-size: 20px; + cursor: move; + color: $wp-gray-5; + font-family: "dashicons"; + content: "\f545"; + transition: .2s color; + + &:hover { + color: $wp-gray-20; + } + } +} + +.edd-bundled-product-actions { + align-self: center; +} + +#edd_products .edd-select, +.edd_repeatable_upload_wrapper .pricing select, +.edd_repeatable_product_wrapper .edd-select { + min-width: 100%; + max-width: 200px; +} + +.edd_repeatable_product_wrapper td { + overflow: visible; +} + +@media screen and (max-width: $break-mobile) { + + .edd-bundle-products-header, + .edd-repeatable-row-header, + .edd-repeatable-row-standard-fields, + .edd-bundled-product-row { + flex-wrap: wrap; + } + + .edd-repeatable-row-standard-fields .edd-form-group, + .edd-bundled-product-row .edd-form-group { + margin-left: 0 !important; + margin-bottom: 24px; + } +} + +/* still used by extensions - Software Licensing upgrade paths, Custom Prices */ +.edd_remove_repeatable { + border: none; + cursor: pointer; + display: inline-block; + padding: 0; + overflow: hidden; + margin: 8px 0 0 0; + text-indent: -9999px; + width: 10px; + height: 10px; +} + +.edd_remove_repeatable:active, +.edd_remove_repeatable:hover, +.edd_remove_repeatable:focus { + background-position: -10px 0 !important; +} diff --git a/assets/css/admin/downloads/_upload.scss b/assets/css/admin/downloads/_upload.scss new file mode 100644 index 00000000000..b5b01acde75 --- /dev/null +++ b/assets/css/admin/downloads/_upload.scss @@ -0,0 +1,27 @@ +.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container { + position: relative; + width: 100%; + + +span:first-child { + width: 100%; + } +} + +.edd_repeatable_upload_field { + padding-right: 32px; +} + +.edd_upload_file button { + background: $wp-gray-0; + border: none; + border-left: 1px solid $wp-border; + padding: 0 4px; + position: absolute; + height: calc(100% - 4px); + overflow: hidden; + top: 2px; + right: 2px; + display: inline-flex; + justify-content: center; + align-items: center; +} diff --git a/assets/css/admin/downloads/style.scss b/assets/css/admin/downloads/style.scss new file mode 100644 index 00000000000..9d744d79289 --- /dev/null +++ b/assets/css/admin/downloads/style.scss @@ -0,0 +1,7 @@ +@import "../variables/variables"; +@import "prices"; +@import "product_settings"; +@import "repeatable_row"; +@import "upload"; +@import "duplicate"; +@import "product-files"; diff --git a/assets/css/admin/email-tags.scss b/assets/css/admin/email-tags.scss new file mode 100644 index 00000000000..44314bb60bb --- /dev/null +++ b/assets/css/admin/email-tags.scss @@ -0,0 +1,63 @@ +/** + * EDD Admin CSS + * + * @package EDD + * @subpackage Admin Email Tags CSS + * @copyright Copyright (c) 2015, Pippin Williamson + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License + */ + +.edd-email-tags-filter { + margin: -15px -15px 15px; + padding: 15px; + border-bottom: 1px solid #ddd; + background: #f3f3f3; +} + +.edd-email-tags-filter-search { + padding: 10px; + width: 100%; + font-size: 20px; +} + +.edd-email-tags-list { + margin: 0; +} + +.edd-email-tags-list-item { + margin-bottom: 15px; +} + +.edd-email-tags-list-item::last-child { + margin-bottom: 0; +} + +.edd-email-tags-list-button { + cursor: pointer; + color: #666; + text-align: left; + padding: 0.8rem; + width: 100%; + background: none; + border: 1px solid #ddd; + border-radius: 3px; +} + +.edd-email-tags-list-button:hover { + background: #fafafa; +} + +.edd-email-tags-list-button strong { + color: #444; + font-size: 14px; + margin-bottom: 8px; +} + +.edd-email-tags-list-button code { + margin-left: 10px; +} + +.edd-email-tags-list-button span { + display: block; + margin-top: 10px; +} \ No newline at end of file diff --git a/assets/css/admin/emails/_editor.scss b/assets/css/admin/emails/_editor.scss new file mode 100644 index 00000000000..610549a7627 --- /dev/null +++ b/assets/css/admin/emails/_editor.scss @@ -0,0 +1,67 @@ +.edd-email-editor__description { + margin: 2em 0; +} + +.edd-editor__header--actions { + position: relative; + + .edd-email-status-badge { + position: absolute; + right: 0; + top: 53px; + margin-right: 20px; + border: 1px solid; + padding: 12px; + } + + #submit.edd-updating { + &:before { + background: none; + @include edd-spinner( + 12px, + $wp-alternate, + $wp-input-border + ); + } + } +} + +.edd-form__email { + background: $white; + border: 1px solid #e2e4e7; + padding: 2em; + max-width: $break-huge; + + @media screen and (min-width: $break-medium) { + $first-column-width: 200px; + .edd-form-group { + display: grid; + grid-template-columns: $first-column-width 1fr; + margin-bottom: 2em; + + > .description { + grid-column-start: 1; + grid-column-end: 3; + } + } + + .edd-form-group > .description, + .notice { + margin-left: $first-column-width; + } + } +} + +.edd-email-action-reset { + border-color: $edd-alert-red !important; + color: $edd-alert-red !important; + + &:hover { + border-color: $edd-alert-red-hover !important; + color: $edd-alert-red-hover !important; + } +} + +.edd-editor__actions--test + .notice { + margin-top: 2em; +} diff --git a/assets/css/admin/emails/_promo.scss b/assets/css/admin/emails/_promo.scss new file mode 100644 index 00000000000..0dace34ee1b --- /dev/null +++ b/assets/css/admin/emails/_promo.scss @@ -0,0 +1,76 @@ +.edd-emails__add-new__overlay { + position: absolute; + right: 0; + top: 40px; + background: white; + padding: 8px; + border: 1px solid $wp-border; + border-radius: 4px; + display: flex; + flex-direction: column; + gap: 2px; + z-index: 1; + align-items: stretch; + + button.button { + background: none !important; + border: none; + color: $wp-text !important; + text-align: left; + } +} + +#edd-admin-notice-emails { + max-width: 100%; + width: 800px; + text-align: left; + padding: 2em; + + h2 { + line-height: unset; + margin: 0; + } + + .edd-extension-manager__body { + grid-template-rows: unset; + margin-bottom: 1.5em; + } + + .edd-promo-notice__ajax & { + width: 400px; + + .edd-extension-manager__body { + grid-template-columns: 80px 1fr; + } + } + + .edd-extension-manager__card-group { + grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); + text-align: left; + margin: 0 auto 1em; + width: 100%; + + .edd-extension-manager__single-card { + margin: 0 auto 1em; + } + } + + .edd-promo-notice__overlay:not(.edd-promo-notice__ajax) & { + .edd-extension-manager__body { + grid-template-columns: 60px 1fr; + } + + .edd-extension-manager__icon { + width: 58px; + height: 58px; + + img { + width: 40px; + } + } + } + + .edd-plugin__recommended { + display: none; + } +} diff --git a/assets/css/admin/emails/_table.scss b/assets/css/admin/emails/_table.scss new file mode 100644 index 00000000000..daa5f90d1f4 --- /dev/null +++ b/assets/css/admin/emails/_table.scss @@ -0,0 +1,89 @@ + +#edd-emails__add { + display: flex; + align-items: center; + gap: 8px; + justify-content: space-between; +} + +.edd-list-table__item td { + padding: 10px; +} + +th.column-status { + text-align: right; + width: 80px; +} + +td.column-status { + min-height: 30px; + text-align: right; + width: 80px; + + & .edd-help-tip { + margin-top: 2px; + } + + @media screen and (max-width: $break-medium) { + text-align: left; + width: unset; + min-height: 40px; + } +} + +tr.no-items { + display: none; +} + +@media screen and (min-width: $break-wide) { + .column-primary { + width: 250px; + } + + .column-recipient, + .column-sender { + width: 125px; + } + + .column-context, + .column-date_modified { + width: 150px; + } +} + +table.email_templates { + margin-top: 1em; +} + +.tablenav { + &.top { + position: relative; + } + + .alignright.actions { + padding-right: 0; + } +} + +.edd-list-table__name { + display: flex; + align-items: center; + gap: 6px; +} + +.edd-emails__wpsmtp { + display: flex; + align-items: center; + gap: 4px; + justify-content: flex-end; + + & a { + text-decoration: none; + color: $wp-text; + } + + img { + width: 20px; + height: auto; + } +} diff --git a/assets/css/admin/emails/style.scss b/assets/css/admin/emails/style.scss new file mode 100644 index 00000000000..b37e2b0fa68 --- /dev/null +++ b/assets/css/admin/emails/style.scss @@ -0,0 +1,6 @@ +@import "../../variables/variables"; +@import "../../components/toggle-button"; +@import "../../components/editor-header.scss"; +@import "promo"; +@import "table"; +@import "editor"; diff --git a/assets/css/admin/extension-manager.scss b/assets/css/admin/extension-manager.scss new file mode 100644 index 00000000000..ad5ca8b75f3 --- /dev/null +++ b/assets/css/admin/extension-manager.scss @@ -0,0 +1,5 @@ +/* Extension Manager +------------------------------------------------------------- */ + +@import "../variables/variables"; +@import "extensions/style"; diff --git a/assets/css/admin/extensions/_bar.scss b/assets/css/admin/extensions/_bar.scss new file mode 100644 index 00000000000..76393337684 --- /dev/null +++ b/assets/css/admin/extensions/_bar.scss @@ -0,0 +1,27 @@ +.edd-extension-manager__bar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1em; + flex-wrap: wrap; + + &-heading { + display: flex; + align-items: center; + gap: 1em; + } + + input[type="search"] { + background-color: $white; + background-image: $icon-search; + background-size: 1em; + background-repeat: no-repeat; + background-position: 97% center; + + &:active, + &:focus, + &:hover { + background-image: none; + } + } +} diff --git a/assets/css/admin/extensions/_body.scss b/assets/css/admin/extensions/_body.scss new file mode 100644 index 00000000000..2f1e5f064e2 --- /dev/null +++ b/assets/css/admin/extensions/_body.scss @@ -0,0 +1,23 @@ +.edd-extension-manager__body { + display: grid; + gap: 1.5em; + grid-template-rows: auto 1fr; + flex-grow: 1; + + img { + max-width: 100%; + } + + .notice { + max-width: 320px; + } +} + +.edd-extension-manager__title { + line-height: 1.4; + margin: 0 1em 1em 0; + + a { + color: $wp-input-text; + } +} diff --git a/assets/css/admin/extensions/_buttons.scss b/assets/css/admin/extensions/_buttons.scss new file mode 100644 index 00000000000..7cb81eee6eb --- /dev/null +++ b/assets/css/admin/extensions/_buttons.scss @@ -0,0 +1,159 @@ +.button.edd-extension-manager__action-upgrade { + background-color: $wp-green-50; + color: $white; + + &:hover, + &:active { + background-color: darken($wp-green-50,10%); + color: $white; + } +} + +.edd-extension-manager__card--installer .button { + display: flex; + justify-content: center; + align-items: center; + gap: 5px; + margin: 0; + + &:before { + margin: 0; + } + + &.edd-button__install { + color: $wp-input-text; + border-color: $wp-input-border; + + &:before { + content: ' '; + display: block; + width: 1em; + height: 1em; + background-image: $icon-install; + background-size: 1em; + } + + &.edd-updating { + &:before { + background: none; + @include edd-spinner( + 12px, + $wp-alternate, + $wp-input-border + ); + } + } + } +} + +.edd-extension-manager__control { + .edd-button__toggle { + position: relative; + margin: 0; + padding: 0; + width: 36px; + height: 20px; + min-height: unset; + background-color: $wp-border; + transition: background 0.2s ease; + border-radius: 30px; + box-shadow: none; + border: none; + + &:after { + position: absolute; + content: ""; + height: 14px; + width: 14px; + left: 3px; + bottom: 3px; + background-color: $white; + transition: 0.1s transform ease; + border-radius: 50%; + + .edd-plugin__active & { + transform: translateX(16px); + } + } + + &:active, + &:focus { + outline: 0; + box-shadow: 0 0 0 1px $white, 0 0 0 3px $wp-input-border; + } + + &:hover { + background-color: $wp-input-border; + } + + &:disabled { + background-color: $wp-input-border !important; + + &:before { + position: absolute; + top: 3px; + @include edd-spinner( + 10px, + $wp-input-border, + $wp-alternate + ); + } + + &:after { + display: none; + } + } + + .edd-plugin__active & { + background-color: var(--wp-admin-theme-color); + + :active, + :focus { + box-shadow: 0 0 0 1px $white, 0 0 0 3px var(--wp-admin-theme-color); + } + } + } + + @media screen and (max-width: $break-medium) { + min-height: 40px; + } +} + +.edd-extension-manager__activate { + display: flex; + align-items: center; + gap: .5em; + min-height: 30px; + border: 1px solid $wp-border; + border-radius: 4px; + padding: 3px 10px; +} + +a.button.edd-extension-manager__button-settings { + display: none; + position: absolute; + top: 1em; + right: 1em; + background-image: $icon-settings; + background-size: 1.25em; + background-repeat: no-repeat; + background-position: center; + min-height: unset; + height: 1.5em; + width: 1.5em; + padding: 1em; + border: none; + background-color: $wp-alternate; + + &:hover, + &:active { + background-image: $icon-settings; + background-size: 1.25em; + background-repeat: no-repeat; + background-position: center; + } + + .edd-plugin__active & { + display: block; + } +} diff --git a/assets/css/admin/extensions/_card.scss b/assets/css/admin/extensions/_card.scss new file mode 100644 index 00000000000..b6c5f87faa0 --- /dev/null +++ b/assets/css/admin/extensions/_card.scss @@ -0,0 +1,16 @@ +.edd-extension-manager__card { + background-color: $white; + padding: 2em; + margin: 0; + display: flex; + flex-direction: column; + justify-content: space-between; + + &.edd-hidden { + display: none; + } + + .inside & { + padding: 0; + } +} diff --git a/assets/css/admin/extensions/_features.scss b/assets/css/admin/extensions/_features.scss new file mode 100644 index 00000000000..8cb2893c455 --- /dev/null +++ b/assets/css/admin/extensions/_features.scss @@ -0,0 +1,11 @@ +.edd-extension-manager__features { + ul { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + } + + .dashicons-yes { + color: #008a20; + margin-right: .25em; + } +} diff --git a/assets/css/admin/extensions/_group.scss b/assets/css/admin/extensions/_group.scss new file mode 100644 index 00000000000..894c87de298 --- /dev/null +++ b/assets/css/admin/extensions/_group.scss @@ -0,0 +1,26 @@ +.edd-extension-manager__wrap { + max-width: $break-huge; +} + +.edd-extension-manager__card-group { + transition: all .5s; + + @supports(grid-area: auto) { + display: grid; + grid-template-columns: auto; + gap: 1em; + margin-top: 40px; + + p + & { + margin-top: 24px; + } + } +} + +.edd-extension-manager__group { + display: grid; +} + +.edd-extension-manager__unlock { + margin-top: 4em; +} diff --git a/assets/css/admin/extensions/_images.scss b/assets/css/admin/extensions/_images.scss new file mode 100644 index 00000000000..a17ddf50046 --- /dev/null +++ b/assets/css/admin/extensions/_images.scss @@ -0,0 +1,22 @@ +.edd-extension-manager__icon { + background-color: $white; + border: 1px solid $gray-200; + border-radius: 4px; + width: 78px; + height: 78px; + + img { + border-radius: 12px; + display: block; + margin: 0; + padding: 9px; + width: 60px; + } +} + +.edd-extension-manager__image img { + display: block; + margin: 0 auto; + max-width: 500px; + width: 100%; +} diff --git a/assets/css/admin/extensions/_installer.scss b/assets/css/admin/extensions/_installer.scss new file mode 100644 index 00000000000..45b88cae813 --- /dev/null +++ b/assets/css/admin/extensions/_installer.scss @@ -0,0 +1,47 @@ +.edd-extension-manager__card--installer { + border: 1px solid $wp-gray-5; + border-radius: 3px; + padding: 0; + + > div { + padding: 2em; + + &:not(:last-child) { + border-bottom: 1px solid $gray-200; + } + } + + .notice { + margin: 0 -1em !important; + + &:not(:last-child) { + margin-bottom: 1em; + } + } + + .edd-extension-manager__body { + grid-template-columns: 80px 1fr; + grid-template-rows: unset; + position: relative; + + p:last-child { + margin-bottom: 0; + } + } + + .edd-extension-manager__actions { + background: $wp-alternate; + display: flex; + justify-content: space-between; + align-items: center; + padding: 1em 2em; + + > *:only-child { + margin-left: auto; + } + } + + .edd-extension-manager__status { + font-weight: 600; + } +} diff --git a/assets/css/admin/extensions/_key.scss b/assets/css/admin/extensions/_key.scss new file mode 100644 index 00000000000..5603b881dea --- /dev/null +++ b/assets/css/admin/extensions/_key.scss @@ -0,0 +1,10 @@ +.edd-extension-manager__key-notice { + background: white; + border: 1px solid $wp-red-50; + border-radius: 4px; + padding: 1em; + + p:first-child { + margin-top: 0; + } +} diff --git a/assets/css/admin/extensions/_overlay.scss b/assets/css/admin/extensions/_overlay.scss new file mode 100644 index 00000000000..2778137fb62 --- /dev/null +++ b/assets/css/admin/extensions/_overlay.scss @@ -0,0 +1,28 @@ +.edd-extension-manager__card--overlay { + text-align: left; + padding: 0; + + .edd-extension-manager__card { + padding: 0; + } + + .edd-extension-manager__title { + line-height: unset; + margin-bottom: .5em; + } + + .edd-extension-manager__actions { + background-color: $wp-alternate; + border-top: 1px solid $gray-200; + display: flex; + justify-content: flex-start; + align-items: center; + gap: .5em; + margin: 0 -2em -2em -2em; + padding: 16px 24px; + + .button { + margin: 0; + } + } +} diff --git a/assets/css/admin/extensions/_recommended.scss b/assets/css/admin/extensions/_recommended.scss new file mode 100644 index 00000000000..530f0322d1c --- /dev/null +++ b/assets/css/admin/extensions/_recommended.scss @@ -0,0 +1,21 @@ +.edd-extension-manager__card--installer { + &[data-filter*="recommended"] { + .edd-extension-manager__icon { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + } +} + +.edd-plugin__recommended { + font-size: 8px; + background: $wp-green-50; + color: $white; + margin-left: -1px; + margin-right: -1px; + padding: 6px 0; + border-radius: 0 0 4px 4px; + line-height: 1; + text-align: center; + width: 80px; +} diff --git a/assets/css/admin/extensions/_steps.scss b/assets/css/admin/extensions/_steps.scss new file mode 100644 index 00000000000..e0e89e6a67a --- /dev/null +++ b/assets/css/admin/extensions/_steps.scss @@ -0,0 +1,19 @@ +.edd-extension-manager__step { + grid-area: 1/-1; + margin: 0; + + &:not(:first-of-type) { + display: none; + } + + .button { + display: table; + margin: 0 auto; + text-align: center; + white-space: normal; + } +} + +td .edd-extension-manager__step .button { + display: inline-block; +} diff --git a/assets/css/admin/extensions/_variations.scss b/assets/css/admin/extensions/_variations.scss new file mode 100644 index 00000000000..671d59e3e26 --- /dev/null +++ b/assets/css/admin/extensions/_variations.scss @@ -0,0 +1,70 @@ +/* Extension Manager Style Variations +--------------------------------------- */ +.edd-settings-wrap.has-product-education { + & .edd-settings-content { + width: 100%; + max-width: 100%; + } +} + +.edd-extension-manager__card--horizontal { + margin: 24px 0; + max-width: 700px; +} + +.edd-extension-manager__card--detailed { + background-color: transparent; + max-width: 700px; +} + +.edd-extension-manager__card--detailed-2col { + background-color: transparent; + max-width: 900px; + margin: 0 auto; + + & h3 { + font-size: 1.5rem; + margin-bottom: 10px; + text-align: center; + } + + & .edd-extension-manager__body { + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: 1em; + } +} + +.edd-extension-manager__card--detailed .edd-extension-manager__title, +.edd-extension-manager__card--detailed-2col .edd-extension-manager__title { + border-bottom: 1px solid #ccc; + padding-bottom: 1em; +} + +@media screen and (min-width: $break-small) { + .edd-extension-manager__card-group { + grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); + } + + .edd-extension-manager__card--horizontal .edd-extension-manager__body { + grid-template-columns: minmax(0, 300px) 1fr; + grid-template-rows: 1fr auto; + grid-auto-flow: column; + } + + .edd-extension-manager__card--horizontal .edd-extension-manager__image { + grid-row: 1 / 4; + } + + .edd-extension-manager__features, + .edd-extension-manager__card--horizontal .edd-extension-manager__description { + align-self: center; + } +} + +@media screen and (min-width: 783px) { + .edd-extension-manager__card--detailed-2col .edd-extension-manager__body { + grid-template-columns: minmax(0, 375px) 1fr; + grid-auto-flow: column; + } +} diff --git a/assets/css/admin/extensions/style.scss b/assets/css/admin/extensions/style.scss new file mode 100644 index 00000000000..c9f5c1e3f91 --- /dev/null +++ b/assets/css/admin/extensions/style.scss @@ -0,0 +1,16 @@ +/* Extension Manager +------------------------------------------------------------- */ + +@import "bar"; +@import "body"; +@import "buttons"; +@import "card"; +@import "features"; +@import "group"; +@import "images"; +@import "installer"; +@import "overlay"; +@import "key"; +@import "steps"; +@import "variations"; +@import "recommended"; diff --git a/assets/css/admin/forms/_form-group.scss b/assets/css/admin/forms/_form-group.scss new file mode 100644 index 00000000000..7778b081a97 --- /dev/null +++ b/assets/css/admin/forms/_form-group.scss @@ -0,0 +1,120 @@ +/** + * Form Group + * + *
+ * + *
+ * + *
+ *

Help

+ *
+ * + * + *
+ * Label + * + *
+ * + * + *
+ * + *
+ * + * + *
+ *
+ * + */ +.edd-form-group { + margin-bottom: 16px; + + &:last-of-type { + margin-bottom: 0; + } +} + +.edd-form-group__label, +.edd-form-group>label { + display: block; + font-weight: 600; + margin-bottom: 8px; + padding: 0; +} + +.edd-form-group__control { + margin-bottom: 12px; + max-width: 100%; + + &.is-radio, + &.is-check { + margin-top: 4px; + } + + &:last-of-type { + margin-bottom: 0; + } + + &--is-inline { + display: inline-flex; + align-items: flex-end; + } +} + +.edd-form-group__input { + max-width: 100%; + + &[type="checkbox"], + &[type="radio"] { + margin-top: 0; + + +label { + display: unset; + } + } +} + +select.edd-form-group__input { + max-width: 100%; +} + +.edd-form-group__help { + color: $wp-gray-50; + font-size: 13px; + font-style: italic; + line-height: initial; + margin: 8px 0 0; +} + +.edd-range { + display: flex; + align-items: center; + gap: 15px; + + .edd-range__slider { + min-width: 90px; + height: 2px; + border-radius: 10px; + border: none; + background: #cccccc; + + .ui-slider-range { + background: var(--wp-admin-theme-color); + } + + .ui-slider-handle { + height: 15px; + width: 15px; + top: -6.5px; + border-radius: 100%; + background: var(--wp-admin-theme-color); + border: none; + cursor: pointer; + display: inline-block; + position: relative; + } + } + + .edd-range__input { + max-width: 60px; + } +} diff --git a/assets/css/admin/forms/_form-row.scss b/assets/css/admin/forms/_form-row.scss new file mode 100644 index 00000000000..30f106877b5 --- /dev/null +++ b/assets/css/admin/forms/_form-row.scss @@ -0,0 +1,20 @@ +.edd-form-row { + display: flex; + flex-wrap: wrap; + gap: 12px; + + &__column { + display: inline-flex; + flex-direction: column; + justify-content: flex-end; + + &.edd-form-group { + margin-bottom: 0; + } + } + + label, + label.edd-form-group__label { + margin-bottom: 8px; + } +} diff --git a/assets/css/admin/forms/style.scss b/assets/css/admin/forms/style.scss new file mode 100644 index 00000000000..ec17c7f79fc --- /dev/null +++ b/assets/css/admin/forms/style.scss @@ -0,0 +1,2 @@ +@import "form-group"; +@import "form-row"; diff --git a/assets/css/admin/gateways/stripe.scss b/assets/css/admin/gateways/stripe.scss new file mode 100644 index 00000000000..920b27dbaf3 --- /dev/null +++ b/assets/css/admin/gateways/stripe.scss @@ -0,0 +1,247 @@ +@import "~@wordpress/base-styles/colors"; +@import "~@wordpress/base-styles/colors.native"; + +@import "../../variables/colors"; +@import "../../variables/animations"; + +/** + * WordPress Core colors current as of 5.5.1. + */ +$wp-text: $gray-text-min; +$wp-border: #c3c4c7; + +$wp-input-text: #32373c; +$wp-input-border: #7e8993; + +$wp-alternate: #f9f9f9; +$wp-inactive: #999; + +$wp-red-50: #d63638; +$wp-green-30: #00ba37; +$wp-green-50: #008a20; + +$wp-gray-0: $gray-0; +$wp-gray-2: $gray-100; +$wp-gray-5: #dcdcde; +$wp-gray-10: #c3c4c7; +$wp-gray-20: $gray-20; +$wp-gray-40: $gray-40; +$wp-gray-50: $gray-50; + +$buddypress-colors: ( + 'evergreen': #36533f, + 'mint': #4f6d59, +); + +.edds-stripe-connect-acount-info { + & .display-name, .info { + display: block; + } + + & .display-name { + font-weight: 700; + } + + &.loading { + & span { + display: block; + } + + & .account-name, .info { + animation: skeleton-loading 1s linear infinite alternate; + width: 200px; + height: 14px; + margin: 0.25rem 0; + } + } +} + +#edds-stripe-disconnect-reconnect { + &.loading { + animation: skeleton-loading 1s linear infinite alternate; + width: 350px; + height: 1rem; + margin: 0.5rem 0; + } +} + +// Payment Gateways setting. +#edds-payment-gateways-stripe-unmet-requirements { + margin: -10px 0 0 -16px; + padding-top: 10px; + + input[type="checkbox"] { + margin: 0 6px 0 0; + } +} + +// Settings subtab. +.edds-requirements-not-met { + + th { + display: none; + } + + td { + padding: 0; + } +} + +/* + * Stripe Connect + */ +.edd-stripe-connect { + display: inline-block; + margin-bottom: 1px; + + background-image: -webkit-linear-gradient(#28A0E5, #015E94); + background-image: -moz-linear-gradient(#28A0E5, #015E94); + background-image: -ms-linear-gradient(#28A0E5, #015E94); + background-image: linear-gradient(#28A0E5, #015E94); + + -webkit-font-smoothing: antialiased; + border: 0; + padding: 1px; + height: 30px; + text-decoration: none; + + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + + -moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2); + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); + + cursor: pointer; + + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.edd-stripe-connect span { + display: block; + position: relative; + padding: 0 12px 0 44px; + height: 30px; + + background: #1275FF; + background-image: -webkit-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4); + background-image: -moz-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4); + background-image: -ms-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4); + background-image: linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4); + + font-size: 14px; + line-height: 30px; + color: white; + font-weight: bold; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.edd-stripe-connect span:before { + content: ''; + display: block; + position: absolute; + left: 11px; + top: 50%; + width: 23px; + height: 24px; + margin-top: -12px; + background-repeat: no-repeat; + background-size: 23px 24px; +} + +.edd-stripe-connect:active { + background: #005D93; +} + +.edd-stripe-connect:active span { + color: #EEE; + + background: #008CDD; + background-image: -webkit-linear-gradient(#008CDD, #008CDD 85%, #239ADF); + background-image: -moz-linear-gradient(#008CDD, #008CDD 85%, #239ADF); + background-image: -ms-linear-gradient(#008CDD, #008CDD 85%, #239ADF); + background-image: linear-gradient(#008CDD, #008CDD 85%, #239ADF); + + -moz-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); + -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1); +} + +.edd-stripe-connect:active span:before { + +} + +.edd-stripe-connect span:before, .edd-stripe-connect.blue span:before { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UKeQCLIETIFwr/r8L8M+yoHGX6aaxRodR8BPckSKPTRAfJrD8DQyABJ3IPuQJ/7FkKMAbKbF6s99mnuUUb3/7T/YeAy9BXOFaQxZTI7MprJlYrzZIzeCZnBAhKQB3SgBrSAHjAGFsAWOAFX4Al8QRAIA9EgHiwCXJAOsoEY5IPlYA0oAiVgC9gOqsFeUAcaQBM4BtrASXAOXARXwTVwE9wDQ2AUPAOT4DWYgSAID1EhGqQGaUMGkBlkC7Egd8gXCoEioXgoGUqDhJAUWg6tg0qgcqga2g81QN9DJ6Bz0GWoH7oDDUPj0O/QOxiBKTAd1oQNYSuYBXvBwXA0vBBOgxfDS+FCeDNcBdfCR+BW+Bx8Fb4JD8HP4CkEIGSEgeggFggLYSNhSAKSioiRlUgxUonUIk1IB9KNXEeGkAnkLQaHoWGYGAuMKyYAMx/DxSzGrMSUYqoxhzCtmC7MdcwwZhLzEUvFamDNsC7YQGwcNg2bjy3CVmLrsS3YC9ib2FHsaxwOx8AZ4ZxwAbh4XAZuGa4UtxvXjDuL68eN4KbweLwa3gzvhg/Dc/ASfBF+J/4I/gx+AD+Kf0MgE7QJtgQ/QgJBSFhLqCQcJpwmDBDGCDNEBaIB0YUYRuQRlxDLiHXEDmIfcZQ4Q1IkGZHcSNGkDNIaUhWpiXSBdJ/0kkwm65KdyRFkAXk1uYp8lHyJPEx+S1GimFLYlESKlLKZcpBylnKH8pJKpRpSPakJVAl1M7WBep76kPpGjiZnKRcox5NbJVcj1yo3IPdcnihvIO8lv0h+qXyl/HH5PvkJBaKCoQJbgaOwUqFG4YTCoMKUIk3RRjFMMVuxVPGw4mXFJ0p4JUMlXyWeUqHSAaXzSiM0hKZHY9O4tHW0OtoF2igdRzeiB9Iz6CX07+i99EllJWV75RjlAuUa5VPKQwyEYcgIZGQxyhjHGLcY71Q0VbxU+CqbVJpUBlSmVeeoeqryVYtVm1Vvqr5TY6r5qmWqbVVrU3ugjlE3VY9Qz1ffo35BfWIOfY7rHO6c4jnH5tzVgDVMNSI1lmkc0OjRmNLU0vTXFGnu1DyvOaHF0PLUytCq0DqtNa5N03bXFmhXaJ/RfspUZnoxs5hVzC7mpI6GToCOVGe/Tq/OjK6R7nzdtbrNug/0SHosvVS9Cr1OvUl9bf1Q/eX6jfp3DYgGLIN0gx0G3QbThkaGsYYbDNsMnxipGgUaLTVqNLpvTDX2MF5sXGt8wwRnwjLJNNltcs0UNnUwTTetMe0zg80czQRmu836zbHmzuZC81rzQQuKhZdFnkWjxbAlwzLEcq1lm+VzK32rBKutVt1WH60drLOs66zv2SjZBNmstemw+d3W1JZrW2N7w45q52e3yq7d7oW9mT3ffo/9bQeaQ6jDBodOhw+OTo5ixybHcSd9p2SnXU6DLDornFXKuuSMdfZ2XuV80vmti6OLxOWYy2+uFq6Zroddn8w1msufWzd3xE3XjeO2323Ineme7L7PfchDx4PjUevxyFPPk+dZ7znmZeKV4XXE67m3tbfYu8V7mu3CXsE+64P4+PsU+/T6KvnO9632fein65fm1+g36e/gv8z/bAA2IDhga8BgoGYgN7AhcDLIKWhFUFcwJTgquDr4UYhpiDikIxQODQrdFnp/nsE84by2MBAWGLYt7EG4Ufji8B8jcBHhETURjyNtIpdHdkfRopKiDke9jvaOLou+N994vnR+Z4x8TGJMQ8x0rE9seexQnFXcirir8erxgvj2BHxCTEJ9wtQC3wXbF4wmOiQWJd5aaLSwYOHlReqLshadSpJP4iQdT8YmxyYfTn7PCePUcqZSAlN2pUxy2dwd3Gc8T14Fb5zvxi/nj6W6pZanPklzS9uWNp7ukV6ZPiFgC6oFLzICMvZmTGeGZR7MnM2KzWrOJmQnZ58QKgkzhV05WjkFOf0iM1GRaGixy+LtiyfFweL6XCh3YW67hI7+TPVIjaXrpcN57nk1eW/yY/KPFygWCAt6lpgu2bRkbKnf0m+XYZZxl3Uu11m+ZvnwCq8V+1dCK1NWdq7SW1W4anS1/+pDa0hrMtf8tNZ6bfnaV+ti13UUahauLhxZ77++sUiuSFw0uMF1w96NmI2Cjb2b7Dbt3PSxmFd8pcS6pLLkfSm39Mo3Nt9UfTO7OXVzb5lj2Z4tuC3CLbe2emw9VK5YvrR8ZFvottYKZkVxxavtSdsvV9pX7t1B2iHdMVQVUtW+U3/nlp3vq9Orb9Z41zTv0ti1adf0bt7ugT2ee5r2au4t2ftun2Df7f3++1trDWsrD+AO5B14XBdT1/0t69uGevX6kvoPB4UHhw5FHupqcGpoOKxxuKwRbpQ2jh9JPHLtO5/v2pssmvY3M5pLjoKj0qNPv0/+/tax4GOdx1nHm34w+GFXC62luBVqXdI62ZbeNtQe395/IuhEZ4drR8uPlj8ePKlzsuaU8qmy06TThadnzyw9M3VWdHbiXNq5kc6kznvn487f6Iro6r0QfOHSRb+L57u9us9ccrt08rLL5RNXWFfarjpebe1x6Gn5yeGnll7H3tY+p772a87XOvrn9p8e8Bg4d93n+sUbgTeu3px3s//W/Fu3BxMHh27zbj+5k3Xnxd28uzP3Vt/H3i9+oPCg8qHGw9qfTX5uHnIcOjXsM9zzKOrRvRHuyLNfcn95P1r4mPq4ckx7rOGJ7ZOT437j154ueDr6TPRsZqLoV8Vfdz03fv7Db56/9UzGTY6+EL+Y/b30pdrLg6/sX3VOhU89fJ39ema6+I3am0NvWW+738W+G5vJf49/X/XB5EPHx+CP92ezZ2f/AAOY8/wRDtFgAAADQklEQVRIDbWVaUiUQRjHZ96dXY/d1fYQj1U03dJSw9YkFgy6DIkILRArQSSC7PjQjQQqVH7oQ0GHQUWgpQhKHzoNSqiUwpXcsrwIjzVtPVrzbPV9Z6bZhYV3N3WXYAeGmWeeZ37z8J95GEgpBf5oeXn1Es4fYAdzPDlM6je4RBYhR+LMU89UxiCBGiCgkUwsBYSA+SlPKLQBQAYEAZm+3j42K96z3NyOF7VOeMrp62opRcacjPW5+43rDTpNSKQ8QKZAEg7xmPCTs/O27uGJgXuNbW0pxyvLfTmAEBzthEsFZLxRvPdi5rpYo2cmUiQJDA4IVeo0obGdlvGfXUPj0Sym2zPuHxvzcWjDyVupJ/YYizKTGNjLw/HiduNTAqIRIUJ6Vpp+ky8bCSFgwQ2xgkGxFi1ioNWEBGuJB31gbLIv/2pd7SpFoGxtpCYkLSEq4ptlzIYFO7tc7w0TKkeEYg5ADnrWkkYhD8s26GPq3nW0WKxTptftPYBI4Mj3O2fHvKNZBMVSDmMwarXNjDkSF3d5kExZeiCr8M2VI+VFu9IvsPcYtzAvkfoEZkEEE45jMppq3ppbCNPFIY1nD1cpo07lbMmvOXeoDCF8BLKy9uUAAjDkBh+c6bz78mNtVVP7MwET7JBnqb4xXpdWVpC1OVzWn+ELHLCsneX/s7rkRWl1463cy1U3WroG21jhCGKJXPOtKQnpAuENvsAppgDB3TcDVIrpDHbK5Kd+y7W8iodNybHh22rOHyxUK+UaMYjZaoyp25rYL54TSihSKmwZ14v3lc3ZFxdbeywjn/tGJnkmzrydX1ApxOEACKymmXLYfXVpi1JMEOGxPi1ep18doY4r2J7uFumQQ9yGf01bMcZW8dpyc0oIjxxpuC5wuUDX+ovWrnYeg3aXvdLIqnmOvXPsfH6uA5YbTb1DX8ofvTLzTy6ZV4K6fAw+gXiATfdffmjeaUgc1UdpdWplsCooQBrEnqUw82dhdnjit/Vxc4f59tP3DRjzJvYteqrl4rmNlJIfrOwpgNklesDRNQBCHYtQAQqD2CgACNjHAJnG1EyfV/S67fZiJB5t2OGEe4n7L3fS4fpEv/2hUEATfoPbuam5v8N7nps70YTbAAAAAElFTkSuQmCC"); +} + +.edds-stripe-connect-acount-info span.edd-pro-upgrade a { + color: $edd-pro-upgrade; + font-weight: 600; + text-decoration: none; +} + +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), +only screen and (min--moz-device-pixel-ratio: 1.5), +only screen and (min-device-pixel-ratio: 1.5) { + .edd-stripe-connect span:before, .edd-stripe-connect.blue span:before { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UKeQCLIETIFwr/r8L8M+yoHGX6aaxRodR8BPckSKPTRAfJrD8DQyABJ3IPuQJ/7FkKMAbKbF6s99mnuUUb3/7T/YeAy9BXOFaQxZTI7MprJlYrzZIzeCZnBAhKQB3SgBrSAHjAGFsAWOAFX4Al8QRAIA9EgHiwCXJAOsoEY5IPlYA0oAiVgC9gOqsFeUAcaQBM4BtrASXAOXARXwTVwE9wDQ2AUPAOT4DWYgSAID1EhGqQGaUMGkBlkC7Egd8gXCoEioXgoGUqDhJAUWg6tg0qgcqga2g81QN9DJ6Bz0GWoH7oDDUPj0O/QOxiBKTAd1oQNYSuYBXvBwXA0vBBOgxfDS+FCeDNcBdfCR+BW+Bx8Fb4JD8HP4CkEIGSEgeggFggLYSNhSAKSioiRlUgxUonUIk1IB9KNXEeGkAnkLQaHoWGYGAuMKyYAMx/DxSzGrMSUYqoxhzCtmC7MdcwwZhLzEUvFamDNsC7YQGwcNg2bjy3CVmLrsS3YC9ib2FHsaxwOx8AZ4ZxwAbh4XAZuGa4UtxvXjDuL68eN4KbweLwa3gzvhg/Dc/ASfBF+J/4I/gx+AD+Kf0MgE7QJtgQ/QgJBSFhLqCQcJpwmDBDGCDNEBaIB0YUYRuQRlxDLiHXEDmIfcZQ4Q1IkGZHcSNGkDNIaUhWpiXSBdJ/0kkwm65KdyRFkAXk1uYp8lHyJPEx+S1GimFLYlESKlLKZcpBylnKH8pJKpRpSPakJVAl1M7WBep76kPpGjiZnKRcox5NbJVcj1yo3IPdcnihvIO8lv0h+qXyl/HH5PvkJBaKCoQJbgaOwUqFG4YTCoMKUIk3RRjFMMVuxVPGw4mXFJ0p4JUMlXyWeUqHSAaXzSiM0hKZHY9O4tHW0OtoF2igdRzeiB9Iz6CX07+i99EllJWV75RjlAuUa5VPKQwyEYcgIZGQxyhjHGLcY71Q0VbxU+CqbVJpUBlSmVeeoeqryVYtVm1Vvqr5TY6r5qmWqbVVrU3ugjlE3VY9Qz1ffo35BfWIOfY7rHO6c4jnH5tzVgDVMNSI1lmkc0OjRmNLU0vTXFGnu1DyvOaHF0PLUytCq0DqtNa5N03bXFmhXaJ/RfspUZnoxs5hVzC7mpI6GToCOVGe/Tq/OjK6R7nzdtbrNug/0SHosvVS9Cr1OvUl9bf1Q/eX6jfp3DYgGLIN0gx0G3QbThkaGsYYbDNsMnxipGgUaLTVqNLpvTDX2MF5sXGt8wwRnwjLJNNltcs0UNnUwTTetMe0zg80czQRmu836zbHmzuZC81rzQQuKhZdFnkWjxbAlwzLEcq1lm+VzK32rBKutVt1WH60drLOs66zv2SjZBNmstemw+d3W1JZrW2N7w45q52e3yq7d7oW9mT3ffo/9bQeaQ6jDBodOhw+OTo5ixybHcSd9p2SnXU6DLDornFXKuuSMdfZ2XuV80vmti6OLxOWYy2+uFq6Zroddn8w1msufWzd3xE3XjeO2323Ineme7L7PfchDx4PjUevxyFPPk+dZ7znmZeKV4XXE67m3tbfYu8V7mu3CXsE+64P4+PsU+/T6KvnO9632fein65fm1+g36e/gv8z/bAA2IDhga8BgoGYgN7AhcDLIKWhFUFcwJTgquDr4UYhpiDikIxQODQrdFnp/nsE84by2MBAWGLYt7EG4Ufji8B8jcBHhETURjyNtIpdHdkfRopKiDke9jvaOLou+N994vnR+Z4x8TGJMQ8x0rE9seexQnFXcirir8erxgvj2BHxCTEJ9wtQC3wXbF4wmOiQWJd5aaLSwYOHlReqLshadSpJP4iQdT8YmxyYfTn7PCePUcqZSAlN2pUxy2dwd3Gc8T14Fb5zvxi/nj6W6pZanPklzS9uWNp7ukV6ZPiFgC6oFLzICMvZmTGeGZR7MnM2KzWrOJmQnZ58QKgkzhV05WjkFOf0iM1GRaGixy+LtiyfFweL6XCh3YW67hI7+TPVIjaXrpcN57nk1eW/yY/KPFygWCAt6lpgu2bRkbKnf0m+XYZZxl3Uu11m+ZvnwCq8V+1dCK1NWdq7SW1W4anS1/+pDa0hrMtf8tNZ6bfnaV+ti13UUahauLhxZ77++sUiuSFw0uMF1w96NmI2Cjb2b7Dbt3PSxmFd8pcS6pLLkfSm39Mo3Nt9UfTO7OXVzb5lj2Z4tuC3CLbe2emw9VK5YvrR8ZFvottYKZkVxxavtSdsvV9pX7t1B2iHdMVQVUtW+U3/nlp3vq9Orb9Z41zTv0ti1adf0bt7ugT2ee5r2au4t2ftun2Df7f3++1trDWsrD+AO5B14XBdT1/0t69uGevX6kvoPB4UHhw5FHupqcGpoOKxxuKwRbpQ2jh9JPHLtO5/v2pssmvY3M5pLjoKj0qNPv0/+/tax4GOdx1nHm34w+GFXC62luBVqXdI62ZbeNtQe395/IuhEZ4drR8uPlj8ePKlzsuaU8qmy06TThadnzyw9M3VWdHbiXNq5kc6kznvn487f6Iro6r0QfOHSRb+L57u9us9ccrt08rLL5RNXWFfarjpebe1x6Gn5yeGnll7H3tY+p772a87XOvrn9p8e8Bg4d93n+sUbgTeu3px3s//W/Fu3BxMHh27zbj+5k3Xnxd28uzP3Vt/H3i9+oPCg8qHGw9qfTX5uHnIcOjXsM9zzKOrRvRHuyLNfcn95P1r4mPq4ckx7rOGJ7ZOT437j154ueDr6TPRsZqLoV8Vfdz03fv7Db56/9UzGTY6+EL+Y/b30pdrLg6/sX3VOhU89fJ39ema6+I3am0NvWW+738W+G5vJf49/X/XB5EPHx+CP92ezZ2f/AAOY8/wRDtFgAAAIbklEQVRoBdVZa5BURxU+fZ9z57mzs7PvF4i7srAQSCifMVDERC0jYlzUlJalKeGPlCnL/NEfywpWacoiVZRVJIYfGjGUu5bxj5qHFSAYyQOBEsJzYSHDvnd2dp535j66PX1vNgsULDPs1cr2Vs+9e7v79NfnnnP663MJYwwWYxEWI2iOedEClxabxgkBwjEvOuA9PQOOlSw64JMr4vK8GidYYMcOES4tVSEAAZ8FAUqon1GiAJEEEG0CjFB8cTaxZUMAo1gEqQA0UABprAjPbrUwXnkesgqKP8CBk5vDIenrE+BKmwI+MawA1MbCkdV10cBDflXuVmSxQRbFkCAQZ9U2ZTaONyxKcyXDHjMs83ImV3rz6njmDRPMUZB80zAJOuvvsflkXpTP7DrWyeXcYCqk75AEieawrEoty1vrvlcV0ja3VQdb1rVUQVd9EFqqNIj5ZfDJooPBsCnohq2ldDMynC42XZnW7z09lu25lMxDMl34y0gyvTsBwyewc84Z4MEPpWIzF/MBcLLtNzJISmxZU+PmWETbtqGzfvVja5uguyF02+kCIEJUk6Ex4oMV9XP9ZnQT/nZ24it7XrtoJ5LZ7SjAM+Bg2+0ckAOcbBkQIaZFVzY1bGurjezYfn87PNQZ5+13ZaQRXMzH26Lg8ymfUokQdAR59INOc53GQ6q/Jiiua6oJ7+h9uAPua47cHeLrwHEmQRmTGLHV6x4v+JYwWsOFCGRDn6RKem1rPPrkN9Y0uqAXLN4VwCgjYGEE8rBgMAjwKsF9S9WgLa9qjYcf+Po9jXdlGrfC5Wj8Vg0Lf+ZENAFmpGB9TWTLhmUxUD1UDg/gtudRnK+a4RtkgqQyO+RT5LVrmiLgJcN19gcGNojUWriS5yRQm7pcBTc/vyCKdW1RrWwzOTiYhGf+dRUmcgZosgDVfgWaMCS2V2tO+OzG0MiVjdUwiFiYm9a7O4kJAoZEooV9H4T0O0ofODkKr5+6+nY6V3heVZQpv6ZWaz55qSJJnXjtUBW5pT7k8xeK5u+B0PQdBVbQgTLq9HbQYthyNVSmTT6A/nB0aGpF0K99+trY1F7TNI9PZGXkKUVRtYjGZCIOV1dHR4Ynz8FSLV8BrjK6uiAlpLcmco1ipmgpAaU8rfesboCuumBg31uJbx6+qH0uX9D/em0i85xFhaslKZKA8/82RtYDhd/1MkCuBnjxrLgKB0EQSb5oWO+9O1bZrsy3+Kc3dcH+b99b07NuyXe6P9r8z/am+C9lkuqCjo4qGGkQES76qJcuz/2GOlUoFuVsQS+98frlaSeq8Gkqqctrg7Dz853wwrfugUfXtj3W3tJ8oCletRUEXy1SCSSYHhdu41gFqILcZCrzwkvnJmE0U3JtHefiL7eS2l7th11f7IQ9j65aVh+r+nlzbd2TELJrHPLmIXZX3wyBX8MTQMm8PJ0u9Pe9chGQYy9omvXouHu/thJqI+Ef1sZDm0AMBmfPiQsSPDuY2zhWwSH5ISU5Pjm98x9nRo7+7JVBB3wl5nJz35Vo/z/esBQUVf2+QlkD9Aw42/Ts3Au7ushdAhQ5UzJoOjE+OrV9/1tDR7cNnIax7N2bDX9nm1bUQXdz9Rp/MLwRoqAtDOzcaO7rvDrAWW8vhcatWVNjF6cmJre9embkz1947h3YfXgIUgVzblQldxgFH0ZOr/qULwM15k4Zlci4Vd9ZU5ltY71oObHBnBFQBidmUk8kEsOP7Hntwqsb974NfS8PAh7LKoo23Hw+2R4FQcSzKlDPgFOEyf8kx3HW94kQ7xJgRRdAJG7CyIWxgiXNUN0+k5nJLN83k3n8D8eHN3+1ux5+8uBHIKiWt1G1Rn3IJkiUCcQzU3G0h9qWHMeJdoSrwtr9dl6I6DNjFwRRyxiKnStSqkPJPsGSmZ+mp1P9z2dzOy3Klj31yMdmX9S8V75APEsomMZwT9fz9i6vkW9AvEgQyqrBQM2Dq9rrD0gCgXfHA0jpjIRm2Zcw+3CR2tZl27SnMZFSZ1lWcRwZITeDckresAEXaoKwwBh7/WQubgTOQj5BVjdv7KiBJz7bztMNcHIk03JiONNyfiK/ntv2VMHAMx6BjpoA/Gj9Emdjul7W7e6TeQNDK9WJLRm361P5c1drEmAaymaYoXpfjZoiOk7FHWuh5dxEHmzLHiXM9oyTz9FawRZw65f5yyzXBMpd0JGhFKB5nSwRMVvumDv2cxm4m1f5X4AuWhRePDUOtqEPQJVVGfWcBz1ahmPlTlxzqaJLquYZU1HTvjcTMD6dOULM0n+g5nKposHzdWbo7FgEkDBviWlYx++53XtQ33kvDU8dHAJm6L8usdwEZn09S3qiPed5lcCSLUpI0eEA8620zLbDl6bh8T+egkI+/7Rl6kegcTSPst1QUKaM+brhrjnF2yUQJNxnrGMnR7KbTw5nYFVjyAl98w2+VdvVlA67Dw3BgROjAKa+yyrpz0BKTbJnez1NT6AKrrnA1bEi1av2v3xaiL90dnxL2Kc0rsXc4WpcQEc8AEtiGrRiejmK6WWeMDIxtVwwKExijB5KFuBYIg1cy8dx0dTQ/yQVc78yBXMIqJ5i/VvvkqHdSjXuM/THKy7w2LQJ6fpJms38QiHGvlzBt+RwJv2JQ2elbjyRtjIi1AIRMAsKPuQduHVzr2YW+kIBE5BTwOzzxLKOiMX8QVuWh00IpqD+S0WHtLlzefpLBOZo/IYvEqQPnTX5dxmy4xookqaCjRuT4mMi8g3bxs2KCkj3GFj4+QSzA0RkeskU8iCJeUiBDv09Jt8OPEV6k7DlP3gxxh/dAPymPh/Kf5d897dIOd9P7H8oEd4G1JV8wPGbRadx52sgLmrRAZ99EZ5+LZgV+v+4Llrg/wX6HRCxgvzAAwAAAABJRU5ErkJggg=="); + } +} +/* End of Stripe Connect */ + +.edd-text-loading { + animation: skeleton-loading 1s infinite alternate; +} + +.edd-button__toggle { + position: relative; + margin: 0; + padding: 0; + width: 36px; + height: 20px; + min-height: unset; + transition: background 0.2s ease; + border-radius: 30px; + box-shadow: none; + border: none; + display: flex; + justify-content: center; + align-items: center; + background: $wp-gray-10; + margin-right: 12px; + + &--enabled { + background: var(--wp-admin-theme-color); + + &::after { + transform: translateX(16px); + } + } +} + +.edd-button__toggle:after { + position: absolute; + content: ""; + height: 14px; + width: 14px; + left: 3px; + bottom: 3px; + background-color: $white; + transition: 0.1s transform ease; + border-radius: 50%; + background: white; +} diff --git a/assets/css/admin/gateways/style.scss b/assets/css/admin/gateways/style.scss new file mode 100644 index 00000000000..364609bf984 --- /dev/null +++ b/assets/css/admin/gateways/style.scss @@ -0,0 +1,40 @@ +/* PayPal Connect +-------------------------------------------------------------- */ +#edd-paypal-commerce-connect-wrap.loading { + & ul.edd-paypal-account-status, ul.edd-paypal-webhook-events { + & li { + & span { + animation: skeleton-loading 1s infinite alternate; + width: 250px; + height: 18px; + display: inline-block; + } + } + } + + & .edd-paypal-connect-actions { + & span { + animation: skeleton-loading 1s infinite alternate; + width: 150px; + height: 32px; + display: inline-block; + } + } +} + +.edd-paypal-account-status ul { + margin-left: 25px; + list-style-type: none; +} +.edd-paypal-account-status > li { + margin-bottom: 1em; +} +.edd-paypal-account-status ul:not(.edd-paypal-webhook-events) li { + margin: .25em 0; +} +.edd-paypal-account-status .dashicons-yes { + color: #008a20; +} +.edd-paypal-account-status .dashicons-no { + color: #d63638; +} diff --git a/assets/css/admin/general/_admin.scss b/assets/css/admin/general/_admin.scss new file mode 100644 index 00000000000..c889ca16802 --- /dev/null +++ b/assets/css/admin/general/_admin.scss @@ -0,0 +1,62 @@ +body.edd-admin-page { + + @media (min-width: $break-medium) { + & #wpbody-content { + padding-bottom: 200px; + } + } + + & #wpfooter { + .edd-footer-promotion { + text-align: center; + font-weight: 400; + font-size: 13px; + line-height: 16px; + color: $wp-gray-40; + padding: 20px 0 30px 0; + margin-bottom: 20px; + margin-top: 20px; + + & p { + font-weight: 600; + } + + & .edd-footer-promotion-links, .edd-footer-promotion-social { + display: flex; + justify-content: center; + align-items: center; + } + + & .edd-footer-promotion-links { + margin: 9px 0 0; + + & span { + color: $wp-gray-10; + padding: 0 7px; + } + } + + & .edd-footer-promotion-social { + margin: 10px 0 0 0; + gap: 10px; + + & li { + margin-bottom: 0; + + & path { + fill: $edd-footer-social-link; + } + + &:hover path { + fill: $edd-footer-social-link-hover; + } + } + + & a { + display: block; + height: 16px; + } + } + } + } +} diff --git a/assets/css/admin/general/_dialog.scss b/assets/css/admin/general/_dialog.scss new file mode 100644 index 00000000000..755f725a9e3 --- /dev/null +++ b/assets/css/admin/general/_dialog.scss @@ -0,0 +1,4 @@ +// Styles for our use of jQuery.dialog +.edd-dialog { + display: none; +} diff --git a/assets/css/admin/general/_elements.scss b/assets/css/admin/general/_elements.scss new file mode 100644 index 00000000000..28f67f92392 --- /dev/null +++ b/assets/css/admin/general/_elements.scss @@ -0,0 +1,21 @@ +.edd-hidden { + display: none; +} + +.edd-clearfix:after { + content: ""; + display: table; + clear: both; +} + +.edd-fadein { + visibility: visible; + opacity: 1; + transition: opacity 1s linear; +} + +.edd-fadeout { + visibility: hidden; + opacity: 0; + transition: visibility 0s 1s, opacity 1s linear; +} diff --git a/assets/css/admin/general/_help-tip.scss b/assets/css/admin/general/_help-tip.scss new file mode 100644 index 00000000000..80674e80140 --- /dev/null +++ b/assets/css/admin/general/_help-tip.scss @@ -0,0 +1,65 @@ +.edd-help-tip { + cursor: help; + margin-top: -2px; + font-size: 24px; + color: $edd-tool-tip-icon-color; +} + +.edd-ui-tooltip { + position: absolute; + background: $white !important; + border-width: 0px; + border-radius: 12px !important; + box-shadow: $edd-tool-tip-shadow !important; + color: $edd-tooltip-text !important; + max-width: 300px !important; + padding: 16px !important; + text-rendering: optimizeLegibility; + text-shadow: none !important; + font-size: 13px !important; + z-index: 9999 !important; + + .title { + font-weight: bold; + } + + .timeline { + position: relative; + margin: 6px 0 0; + padding-left: 15px; + + li { + position: relative; + margin: 0 0 3px 0; + + &::before { + content: ''; + position: absolute; + width: 4px; + height: 4px; + left: -16px; + background: rgb(0 0 0 / 0%); + border: 2px solid $edd-tooltip-text; + top: 0; + bottom: 0; + margin: auto; + border-radius: 100%; + z-index: 1; + } + + &::after { + content: ''; + width: 2px; + height: calc(100% - 4px); + background: $edd-tooltip-text; + position: absolute; + left: -13px; + top: calc(50% + 3px); + } + + &:last-child::after { + display: none; + } + } + } +} diff --git a/assets/css/admin/general/_item-header.scss b/assets/css/admin/general/_item-header.scss new file mode 100644 index 00000000000..559a90c6d5f --- /dev/null +++ b/assets/css/admin/general/_item-header.scss @@ -0,0 +1,13 @@ +.edd-item-header-small { + padding-bottom: 20px; + border-bottom: 1px solid #e5e5e5; + display: flex; + justify-content: flex-start; + align-items: center; + gap: 6px; + + span { + font-weight: 600; + font-size: 15px; + } +} diff --git a/assets/css/admin/general/_progress-bar.scss b/assets/css/admin/general/_progress-bar.scss new file mode 100644 index 00000000000..a37d7c4d71b --- /dev/null +++ b/assets/css/admin/general/_progress-bar.scss @@ -0,0 +1,45 @@ +@import "../../variables/colors"; +.edd-progress-bar { + display: grid; + background: $wp-gray-5; + border-radius: 99999px; + padding: 2px; + box-shadow: inset 0 0 1px 1px $wp-input-border; + align-items: center; + + &.small { + height: 14px; + } + + &.medium { + height: 16px; + } + + &.large { + height: 20px; + padding: 4px; + } + + > .progress { + height: 100%; + border-top-right-radius: 99999px; + border-bottom-right-radius: 99999px; + border-top-left-radius: 99999px; + border-bottom-left-radius: 99999px; + background-color: rgba($wp-green-30, 0.3); + overflow: hidden; + min-width: 10%; + width: var(--progress-width, 0%); + grid-area: 1/-1; + } + + > .label { + color: $wp-input-text; + font-weight: 400; + font-size: .75rem; + text-shadow: 0px 0px 12px rgba(255,255,255,0.5); + grid-area: 1/-1; + text-align: center; + line-height: 1; + } +} diff --git a/assets/css/admin/general/_status-badge.scss b/assets/css/admin/general/_status-badge.scss new file mode 100644 index 00000000000..af36d45686c --- /dev/null +++ b/assets/css/admin/general/_status-badge.scss @@ -0,0 +1,53 @@ +@import "../../variables/colors"; +/** Status labels */ +.edd-status-badge, +.edd-admin-order-status-badge { + padding: 2px 7px; + border-radius: 4px; + background: #ececec; + display: inline-flex; + align-items: center; + gap: 2px; + + &__icon { + opacity: 0.8; + } + + &--red, + &--error, + &--failed, + &--failing, + &--expired, + &--rejected, + &--revoked { + color: #ac3d3d; + background: #ffd6d6; + } + + &--green, + &--success, + &--complete, + &--partially_refunded, + &--active, + &--completed, + &--edd_subscription, + &--approved { + color: #017d5c; + background: #e5f5f0; + } + + &--yellow, + &--warning, + &--pending { + color: $wp-yellow-50; + background: #f5f2e5; + } + + &--blue, + &--info, + &--processing, + &--trialling { + color: $blue-500; + background: #e5f1f5; + } +} diff --git a/assets/css/admin/general/_upgrade.scss b/assets/css/admin/general/_upgrade.scss new file mode 100644 index 00000000000..eba2bbe567c --- /dev/null +++ b/assets/css/admin/general/_upgrade.scss @@ -0,0 +1,13 @@ +.edd-pro-upgrade, +.edd-pro-upgrade:hover{ + color: $edd-pro-upgrade; + font-weight: 600; + text-decoration: none; +} + +.button.edd-pro-upgrade, +.button.edd-pro-upgrade:hover { + background-color: $edd-pro-upgrade; + color: $white; + border-color: $edd-pro-upgrade; +} diff --git a/assets/css/admin/general/style.scss b/assets/css/admin/general/style.scss new file mode 100644 index 00000000000..f23749dc714 --- /dev/null +++ b/assets/css/admin/general/style.scss @@ -0,0 +1,9 @@ +@import "admin"; +@import "../../components/admin-nav.scss"; +@import "dialog"; +@import "item-header"; +@import "status-badge"; +@import "upgrade"; +@import "progress-bar"; +@import "help-tip"; +@import "elements"; diff --git a/assets/css/admin/menu.scss b/assets/css/admin/menu.scss new file mode 100644 index 00000000000..305bd16839e --- /dev/null +++ b/assets/css/admin/menu.scss @@ -0,0 +1,109 @@ +/** + * EDD Admin Menu CSS + * + * @package EDD + * @subpackage Admin CSS + * @copyright Copyright (c) 2015, Pippin Williamson + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License +*/ + +@import "~@wordpress/base-styles/breakpoints"; +@import "../variables/colors"; + + +/* Main Menu +-------------------------------------------------------------- */ +#menu-posts-download .wp-submenu { + display: flex; + flex-wrap: wrap; + li { + width: 100%; + } +} + +@media screen and (max-width: $break-mobile) { + #menu-posts-download.wp-not-current-submenu .wp-submenu { + display: none; + } +} + +/* Submenu Styles +-------------------------------------------------------------- */ + +#menu-posts-download a[href^="edit.php?post_type=download"] { + &:hover, + &:focus { + box-shadow: inset 4px 0 0 0 currentColor; + transition: box-shadow .1s linear; + } +} + +#menu-posts-download li > a[href^="post-new.php?post_type=download"] { + display: none; +} + +/* Secondary Separators */ +#menu-posts-download li:not(:last-child) a[href^="post-new.php?post_type=download"]:after, +#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-discount"]:after, +#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-reports"]:after, +#menu-posts-download li:nth-last-child(2) a:after { + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + display: block; + float: left; + margin: 13px -15px 8px; + content: ''; + width: calc(100% + 26px); + + @media screen and (max-width: $break-medium) { + margin: 20px -20px 8px -20px; + width: calc(100% + 30px); + } +} + +#adminmenu #menu-posts-download { + /* WordPress 5.7 fix for left-shadow on hover */ + ul.wp-submenu-wrap li { + clear: both; + } + + a.wp-has-current-submenu:after { + display: none; + } +} + +/* Show Submenu Arrow */ +ul#adminmenu #menu-posts-download ul.wp-submenu li.current a:before { + right: 0; + border: solid 8px transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-right-color: $wp-gray-0; + margin-top: 2px; +} + +/* Onboarding Submenu Item */ +a.edd-onboarding__menu-item { + background: #dd823b !important; + color: $white !important; + font-weight: 600; + &:hover { + color: $black !important; + } +} + +a.edd-sidebar__upgrade-pro, +a.edd-sidebar__upgrade-pro:hover { + background-color: $edd-pro-upgrade !important; + color: $white !important; + font-weight: 600; +} + +.edd-admin-menu__new { + color: $warning; + vertical-align: super; + font-size: 9px; + margin-left: 3px; +} diff --git a/assets/css/admin/notifications/style.scss b/assets/css/admin/notifications/style.scss new file mode 100644 index 00000000000..247209d1c1d --- /dev/null +++ b/assets/css/admin/notifications/style.scss @@ -0,0 +1,125 @@ +@import '../../variables/variables'; + +/* Notifications +-------------------------------------------------------------- */ +.edd-overlay { + position: fixed; + z-index: 1052; + top: 0; + right: 0; + bottom: 0; + left: 160px; + background-color: #141b38; + opacity: .5; + transition: .5s; +} + +.edd-slide-in { + transform: translateX(100%) !important; + -webkit-transform: translateX(100%) !important; +} + +#edd-notifications-panel { + background-color: white; + height: 100%; + width: 100%; + max-width: 570px; + position: fixed; + z-index: 1053; + top: 0; + right: 0; + bottom: 0; + overflow-x: hidden; + transition: .5s; + + transform: translateX(0%); + -webkit-transform: translateX(0%); +} +body.admin-bar #edd-notifications-panel { + top: 32px; +} +@media screen and (max-width: 600px) { + body.admin-bar #edd-notifications-panel { + top: 46px; + } +} + +#edd-notifications-header { + display: flex; + align-items: center; + padding: 0 30px; + color: #fff; + background-color: #0c5d95; +} +#edd-notifications-header h3 { + color: #fff; + flex: 1; +} +#edd-notifications-header .edd-close { + background: none; + border: none; + color: #fff; + cursor: pointer; +} + +#edd-notifications-body { + padding: 30px; +} + +.edd-notification { + display: flex; + gap: 20px; + margin-bottom: 20px; +} +.edd-notification--icon { + color: #00aa63; +} +.edd-notification--icon.edd-notification--icon-info { + color: #005ae0; +} +.edd-notification--icon.edd-notification--icon-warning { + color: $warning; +} +.edd-notification--icon.edd-notification--icon-error { + color: #df2a4a; +} +.edd-notification--body { + flex: 1; +} +.edd-notification--header { + align-items: center; + display: flex; + justify-content: space-between; + gap: 5px; + margin-bottom: 7px; +} +.edd-notification--title { + color: #141b38; + flex: 1; + font-size: 16px; + font-weight: 600; + margin: 0; +} +.edd-notification--date { + color: #71747e; + font-size: 12px; +} +.edd-notification--actions { + flex-wrap: wrap; + display: flex; + align-items: center; + gap: 5px; + margin-top: 10px; +} +.edd-notification--dismiss { + background: none !important; + border: none !important; + box-shadow: none !important; + color: #71747e !important; + cursor: pointer; + padding: 0 10px; + text-decoration: underline; +} +.edd-notification--dismiss:hover { + text-decoration: none; +} diff --git a/assets/css/admin/onboarding/style.scss b/assets/css/admin/onboarding/style.scss new file mode 100644 index 00000000000..59d6a602877 --- /dev/null +++ b/assets/css/admin/onboarding/style.scss @@ -0,0 +1,869 @@ +@import "~@wordpress/base-styles/breakpoints"; +@import "~@wordpress/base-styles/colors"; +@import "~@wordpress/base-styles/variables"; +@import "~@wordpress/base-styles/mixins"; +@import "../../variables/colors"; +@import "../../variables/mixins"; + +:root { + @include edd-admin-colors(); +} + +.edd-onboarding { + margin-top: 80px; +} +.edd-onboarding__logo { + img { + display: block; + width: 300px; + margin: 0 auto 25px; + } +} +.edd-onboarding__wrapper { + max-width: 1000px; + margin: 0 auto; + position: relative; +} + +@media only screen and (max-width: $break-wide) { + .edd-onboarding__wrapper { + max-width: 850px; + } +} + +.edd-onboarding__loading { + z-index: 99; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding-left: 80px; + padding-top: 8px; + display: flex; + gap: 20px; + flex-wrap: wrap; + align-items: center; + justify-content: center; + text-align: center; + &:before { + position: absolute; + @include edd-spinner( + 35px, + $wp-input-border, + $wp-alternate + ); + } + .edd-onboarding__loading-status { + display: block; + text-align: center; + color: black; + flex-basis: 100%; + margin-top: 80px; + } +} + +@media only screen and (max-width: $break-small) { + .edd-onboarding__loading { + padding-left: 0; + } +} + +.edd-onboarding__loading-in-progress { + .edd-onboarding__single-step, .edd-onboarding__welcome-screen { + position: relative; + &:before { + content: ""; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(255, 255, 255, 0.85); + z-index: 95; + } + } +} + +/* EDD ONBOARDING - Steps style */ +.edd-onboarding__steps { + margin-top: 25px; + ul { + display: flex; + gap: 15px; + position: relative; + &:before { + position: absolute; + top: 16px; + left: 50%; + transform: translateX(-50%); + width: 80%; + height: 2px; + background: #dedfe0; + content: ""; + z-index: -1; + } + li { + flex: 1; + text-align: center; + a { + display: block; + padding: 5px 10px; + color: #8a8e92; + text-align: center; + font-size: 12px; + text-decoration: none; + span { + color: $white; + width: 25px; + height: 25px; + line-height: 25px; + font-size: 12px; + font-weight: 400; + border-radius: 50%; + background: #c2c4c6; + display: inline-block; + text-align: center; + margin-bottom: 10px; + position: relative; + box-shadow: none; + &:before { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: -8px; + width: 8px; + height: 10px; + background: #F0F0F1; + content: ""; + z-index: -1; + } + &:after { + position: absolute; + top: 50%; + transform: translateY(-50%); + left: -8px; + width: 8px; + height: 10px; + background: #F0F0F1; + content: ""; + z-index: -1; + } + } + } + &.active-step a { + color: var(--wp-admin-theme-color); + font-weight: 500; + small { + font-weight: 500; + color: var(--wp-admin-theme-color); + } + span { + background: var(--wp-admin-theme-color); + box-shadow: 0 0 4px 1px rgba(var(--wp-admin-theme-color), 0.3); + } + } + &.completed-step a { + span { + width: 25px; + height: 25px; + line-height: 25px; + font-size: 14px; + background: $wp-green-30; + box-shadow: none; + } + } + } + } +} + +.edd-onboarding__steps__name { + color: $wp-gray-50; + display: block; + font-size: 11px; +} + +@media only screen and (max-width: $break-small) { + .edd-onboarding__steps ul li a span, .edd-onboarding__steps ul li.completed-step a span { + width: 20px; + height: 20px; + line-height: 20px; + } + .edd-onboarding__steps__name { + font-size: 10px; + } +} + +.edd-onboarding__current-step { + position: relative; +} + +.edd-onboarding__single-step { + background: white; + border: 1px solid #dedfe0; + border-radius: 3px; + position: relative; +} + +.edd-onboarding__single-step-inner { + padding: 70px 140px 40px 140px; + &.equal { + padding: 70px 140px; + } +} + +@media only screen and (max-width: $break-large) { + .edd-onboarding__single-step-inner { + padding: 35px 70px 20px 70px; + &.equal { + padding: 35px 70px; + } + } +} + +@media only screen and (max-width: $break-small) { + .edd-onboarding__single-step-inner { + padding: 17px 35px 10px 35px; + &.equal { + padding: 17px 35px; + } + } +} + +.edd-onboarding__steps-indicator { + opacity: 0.6; + display: block; +} + +h1.edd-onboarding__single-step-title { + font-size: 24px; + color: #141b38; + font-weight: 600; +} +.edd-onboarding__single-step-subtitle { + font-size: 16px; + line-height: 22px; + color: #141b38; + font-weight: normal; + max-width: 90%; +} + +.edd-onboarding__welcome-screen { + width: 100%; + height: 100%; + background: white; + display: flex; + align-items: center; + h1 { + line-height: 2rem; + } +} + +.edd-onboarding__welcome-screen-inner { + padding: 100px 80px; + text-align: center; +} + +.edd-onboarding__testimonials-wrapper { + display: grid; + gap: 1em; +} + +.edd-onboarding__testimonial { + display: flex; + font-size: 1rem; + text-align: left; + justify-content: space-between; + gap: 2em; + align-items: center; + + &:not(:last-of-type) { + border-bottom: 1px solid #dedfe0; + padding-bottom: 2em; + } +} + +.edd-onboarding__testimonial-content { + flex-grow: 1; +} + +.edd-onboarding__testimonial-content > span.big { + font-weight: 600; + font-size: 15px; + font-style: italic; +} + +.edd-onboarding__testimonial-avatar { + width: 75px; + height: 75px; + border-radius: 50%; + display: block; +} + +.edd-onboarding__testimonial-info { + display: flex; + flex-direction: column; + gap: .25em; + + > .testimonial-name { + font-weight: 600; + } + + > .testimonial-company { + font-size: 10px; + font-style: italic; + } + + > .testimonial-stars > span { + color: #ffbb38; + font-size: 12px; + height: 12px; + width: 12px; + } +} + +.edd-onboarding__welcome-screen-get-started { + color: $white !important; + background: $wp-green-30 !important; + border-color: $wp-green-30 !important; + margin: 1em auto !important; + + &:hover { + color: $white !important; + background: $wp-green-50 !important; + } +} + +.edd-onboarding__plugins-list { + border-top: 1px solid rgba(#ededed, 0.5); + + .edd-onboarding__plugins-plugin { + padding: 28px 20px; + border-bottom: 1px solid rgba(#ededed, 0.5); + border-left: 1px solid rgba(#ededed, 0.5); + border-right: 1px solid rgba(#ededed, 0.5); + transition: all 0.25s ease-out; + + h3 { + margin-top: 0; + transition: all 0.25s ease-out; + } + + p { + margin-bottom: 0; + transition: all 0.25s ease-out; + } + + .edd-onboarding__plugins-control { + width: 100px; + display: flex; + justify-content: flex-end; + + .checkbox-control { + padding: 0; + margin: 0; + position: relative; + } + + .checkbox-control__indicator { + position: relative; + top: 0; + } + } + .edd-onboarding__plugins-external-link { + text-decoration: none; + } + .edd-onboarding__plugins-details label { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1em; + } + &.disabled { + background: rgba(#72b281, 0.04); + &:hover { + background: rgba(#72b281, 0.04); + } + } + &:hover { + background: rgba(var( --wp-admin-theme-color ), 0.02); + .edd-onboarding__plugins-details { + h3 { + color: var( --wp-admin-theme-color ); + } + p { + color: var( --wp-admin-theme-color ); + } + } + } + } +} +.edd-onboarding__single-step-footer { + border-top: 1px solid #ededed; + padding: 35px 50px 35px 50px; + display: flex; + justify-content: space-between; + align-items: center; + .edd-onboarding__button-back { + color: $wp-gray-40; + text-decoration: none; + transition: all 0.2s ease-in-out; + background: none; + border: none; + cursor: pointer; + &:hover { + color: var( --wp-admin-theme-color ); + } + } + .edd-onboarding__button-skip-step { + opacity: 0.6; + } +} + +@media only screen and (max-width: $break-small) { + .edd-onboarding__single-step-footer { + padding: 17px 25px; + flex-wrap: wrap; + gap: 5px; + } +} + +.edd-onboarding__close-and-exit { + text-align: center; + margin-top: 20px; + + button.button-link { + color: #8a8e92 !important; + text-decoration: none !important; + } +} + +/* EDD ONBOARDING - Form style */ + +@media only screen and (max-width: $break-medium) { + .edd-form-group__control { + display: flex; + align-items: center; + gap: 10px; + } +} + +.edd-onboarding input:not([type="checkbox"]):not([type="radio"]) { + border: 1px solid #dedfe0 !important; + border-radius: 2px !important; + padding: 2px 8px !important; + width: 100%; +} + +.edd-onboarding .quicktags-toolbar input.ed_button { + width: auto; +} + +.edd-onboarding .edd-check-wrapper { + display: flex; + align-items: center; +} + +.wp-core-ui .edd-onboarding select { + font-size: 14px; + line-height: 2; + border-color: #dedfe0; + box-shadow: none; + border-radius: 2px; + padding: 0 24px 0 8px; + min-height: 30px; + max-width: 25rem; + -webkit-appearance: none; + background-size: 16px 16px; + cursor: pointer; + vertical-align: middle; +} + +.edd-onboarding .form-table th { + vertical-align: middle; +} + +.edd-onboarding .form-table, +.edd-onboarding .form-table td, +.edd-onboarding .form-table td p { + color: #8a8e92; + font-size: 13px; + line-height: 18px; +} + +.edd-onboarding .form-table th, +.edd-onboarding .form-wrap label, +.edd-settings-form__email label { + color: #141b38; + font-weight: 400; + text-shadow: none; + vertical-align: baseline; +} + +.edd-onboarding td[colspan="2"] { + padding: 0; +} + +/* EDD ONBOARDING - Stripe section style */ + +.edd-onboarding__stripe-features-listing { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + list-style-type:none; + margin-left: 0; + padding-left: 0; + margin-top: 20px; + li { + list-style-type:none; + position: relative; + padding-left: 28px; + color: #3c434a; + font-size: 12px; + margin-bottom: 10px; + margin-right: 10px; + &:before { + position: absolute; + top: 0; + left: 0; + content: "✓"; + background: #e9e4fe; + color: #635BFF; + width: 20px; + height: 20px; + line-height: 20px; + text-align: center; + border-radius: 50%; + display: inline-block; + } + } +} +.edd-onboarding__stripe-content-holder { + max-width: 75%; + margin: 25px auto; + background: rgba(#f1eefa, 0.3); + padding: 50px 40px 50px 40px; + border-radius: 4px; + border: 1px solid rgba(#f1eefa, 0.5); + .edd-onboarding__stripe-content-logo { + text-align: center; + margin-bottom: 25px; + border-bottom: 1px solid #ededed; + padding-bottom: 25px; + img { + max-width: 180px; + } + span { + text-align: center; + font-size: 13px; + line-height: 20px; + display: block; + max-width: 300px; + margin: 0 auto; + } + } +} + +@media only screen and (max-width: $break-large) { + .edd-onboarding__stripe-content-holder { + padding:25px 20px 25px 20px; + max-width: 100%; + } +} + + +.edd-onboarding__button-stripe { + display: block; + text-align: center; + margin-top: 20px; +} + +#edds-stripe-disconnect-reconnect { + margin-top: 10px; +} + +.edd-onboarding__stripe-features-title { + display: block; + text-align: center; + font-size: 16px; + margin-bottom: 10px; + color: #625bff; + font-weight: 500; +} +.edd-onboarding__stripe-additional-text { + text-align: center; + font-size: 11px; + line-height: 14px; + display: block; + max-width: 400px; + margin: 30px auto 0 auto; + opacity: 0.6; +} + +/* EDD ONBOARDING - Checkboxes style */ +.checkbox-control { + position: relative; + padding-left: 30px; + margin-bottom: 15px; + cursor: pointer; + font-size: 18px; +} +.checkbox-control input { + position: absolute; + z-index: -1; + opacity: 0; +} +.checkbox-control__indicator { + position: absolute; + top: 2px; + left: 0; + height: 25px; + width: 25px; + background: #f0f0f1; + border-radius: 3px; +} +.checkbox-control:hover input ~ .checkbox-control__indicator, .checkbox-control input:focus ~ .checkbox-control__indicator { + background: #eaeaec; +} +.checkbox-control input:checked ~ .checkbox-control__indicator { + background: var( --wp-admin-theme-color ); +} +.checkbox-control:hover input:not([disabled]):checked ~ .checkbox-control__indicator, .checkbox-control input:checked:focus ~ .checkbox-control__indicator { + background: var( --wp-admin-theme-color ); +} +.checkbox-control input:disabled ~ .checkbox-control__indicator { + background: $wp-green-30; + pointer-events: none; +} +.checkbox-control__indicator:after { + content: ''; + position: absolute; + display: none; +} +.checkbox-control input:checked ~ .checkbox-control__indicator:after { + display: block; +} +.checkbox-control--checkbox .checkbox-control__indicator:after { + left: 9px; + top: 4px; + width: 5px; + height: 12px; + border: solid #fff; + border-width: 0 2.5px 2.5px 0; + transform: rotate(40deg); +} +.checkbox-control--checkbox input:disabled ~ .checkbox-control__indicator:after { + border-color: #fff; +} +/* Small checkbox style */ +.checkbox-control.small-checkbox { + padding-left: 24px; + margin-bottom: 10px; + font-size: 13px; +} +.small-checkbox .checkbox-control__indicator { + top: 0px; + left: 0; + height: 17px; + width: 17px; + background: #eaeaec; +} +.checkbox-control.small-checkbox:hover input ~ .checkbox-control__indicator, .checkbox-control.small-checkbox input:focus ~ .checkbox-control__indicator { + background: #dedfe0; +} +.checkbox-control.small-checkbox input:checked ~ .checkbox-control__indicator { + background: var( --wp-admin-theme-color ); +} +.checkbox-control.small-checkbox:hover input:not([disabled]):checked ~ .checkbox-control__indicator, .checkbox-control.small-checkbox input:checked:focus ~ .checkbox-control__indicator { + background: var( --wp-admin-theme-color ); +} +.checkbox-control.small-checkbox input:disabled ~ .checkbox-control__indicator { + background: #72b281; +} +.checkbox-control--checkbox.small-checkbox .checkbox-control__indicator:after { + left: 6px; + top: 2.5px; + width: 3px; + height: 8px; + border: solid #f6f7f7; + border-width: 0 2px 2px 0; + transform: rotate(40deg); +} + +/* EDD ONBOARDING - Sugestions section */ +.edd-onboarding__get-suggestions-section { + margin-top: 30px; + text-align: center; + padding: 50px 50px 40px 50px; + background: rgba(#0c5d95, 0.04); + border-radius: 2px; + border: 1px solid rgba(#0c5d95, 0.06); + h3 { + margin-top: 0; + line-height: 25px; + } + .edd-onboarding__get-suggestions-section_label { + display: block; + margin-bottom: 1em; + } + + .edd-toggle { + justify-content: center; + } +} + +.edd-onboarding__selected-plugins { + text-align: center; + margin-top: 25px; +} + +.edd-onboarding__install-success-wrapper { + z-index: 99; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding-left: 80px; + padding-top: 8px; + display: flex; + align-items: center; + justify-content: center; + font-size: 21px; + .edd-onboarding__install-success { + display: flex; + flex-wrap: wrap; + gap: 25px; + text-align: center; + span { + display: block; + flex-basis: 100%; + } + .emoji { + font-size: 65px; + } + } + + @media only screen and (max-width: $break-large) { + padding-left: 0; + } +} + +/* EDD ONBOARDING - Create product */ + +.edd-onboarding__product-pricing-row td, +.edd-onboarding__product-files-row td { + padding: 0px; +} + +.edd-onboarding__product-image-wrapper { + display: flex; + justify-content: space-between; + gap: 4px; +} + +.edd-onboarding__pricing-option-pill { + display: flex; + button { + display: inline-block; + flex: 1; + border: 1px solid #ccc; + padding: 10px 15px; + cursor: pointer; + &:hover:not(.active) { + background: #dbdcdd; + } + } + .left-option { + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; + } + .right-option { + border-left: none; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + } + .active { + background: var(--wp-admin-theme-color); + border-color: var(--wp-admin-theme-color); + border-right-color: #ccc; + color: white; + } +} + +.no-table-row-padding { + td { + padding: 0px; + } +} + +.edd-onboarding__product-variable-price { + display: none; +} + +.edd-onboarding__multi-option-toggle, .edd-onboarding__upload-files-toggle { + display: flex; + align-items: center; + span { + margin-left: 10px; + } +} + +.edd-onboarding__upload-files-toggle { + span { + color: #1d2327; + font-size: 1.3em; + font-weight: 600; + display: block; + margin-top: 1em; + margin-bottom: 1em; + } +} + + +.edd-onboarding__pricing-options-label { + display: block; + color: #141b38; + font-weight: 400; + text-shadow: none; + vertical-align: baseline; + font-size: 14px; + margin-top: 20px; + margin-bottom: 20px; +} + +.edd-add-repeatable-row { + border-top: none; + padding-top: 8px; + margin-bottom: 5px; +} + +.edd-onboarding__actions { + display: flex; + gap: 1em; + justify-content: center; + margin-top: 2em; + + button.edd-promo-notice-dismiss { + margin: 0; + } +} + +.edd-settings-form__email { + @media screen and (min-width: $break-medium) { + .edd-form-group:not(.edd-form-group__wide) { + display: table-row; + + label, + .edd-form-group__control { + display: table-cell; + } + + label { + text-align: left; + padding: 20px 10px 20px 0; + width: 200px; + line-height: 1.3; + } + } + } +} diff --git a/assets/css/admin/orders/_customer.scss b/assets/css/admin/orders/_customer.scss new file mode 100644 index 00000000000..a6ccc607b0d --- /dev/null +++ b/assets/css/admin/orders/_customer.scss @@ -0,0 +1,3 @@ +.edd-order-customer__actions { + margin-bottom: 2em; +} diff --git a/assets/css/admin/orders/_refunds-modal.scss b/assets/css/admin/orders/_refunds-modal.scss new file mode 100644 index 00000000000..ce345aec71d --- /dev/null +++ b/assets/css/admin/orders/_refunds-modal.scss @@ -0,0 +1,124 @@ + +$fixed-column-width: 80px; +#edd-submit-refund-status { + text-align: center; + font-size: 1.2em; + + .edd-submit-refund-message { + &:before{ + font-family: dashicons; + font-size: 1.5em; + vertical-align: middle; + color: #fff; + border-radius: 16px; + margin: 5px; + } + + &.success:before { + content: "\f147"; + background-color: $wp-green-50; + padding-right: 1px; + } + + &.fail { + display: block; + margin-bottom: 16px; + + &::before { + content: "\f335"; + background-color: $wp-red-50; + } + } + } +} + +.refund-items { + td, + th.check-column { + vertical-align: baseline; + } + + .column-amount, + .column-quantity, + .column-subtotal, + .column-tax, + .column-discount, + .column-total { + width: $fixed-column-width; + } + + .edd-form-group__control { + display: flex; + align-items: center; + + select, + input { + background-color: transparent; + border: 0; + border-bottom: 1px solid; + border-radius: 0; + box-shadow: none; + text-align: right; + width: 100%; + + &:disabled { + border-bottom: none; + } + + &:focus { + border-bottom: 1px solid var(--wp-admin-theme-color-darker-10); + box-shadow: 0 1px 0 var(--wp-admin-theme-color-darker-10); + } + } + + select[data-original="1"] { + background: transparent; + } + + select, + .is-before + span > input { + text-align: left; + } + } + + .edd-refund-submit-line-total { + background-color: $white !important; + + td { + text-align: right; + } + } + + .edd-refund-submit-line-total-amount { + display: inline-block; + margin-left: 20px; + text-align: left; + width: $fixed-column-width; + } + + #edd-refund-submit-subtotal td { + border-top: 2px solid $wp-border; + } + + @media screen and ( max-width: 782px ) { + td.column-total { + margin-bottom: 16px; + } + + .edd-refund-submit-line-total-amount { + padding-right: 16px; + width: unset; + } + } +} + +.edd-submit-refund-actions { + margin: 16px 0 0; +} + +.did-refund { + .refund-items, + .edd-submit-refund-actions { + display: none; + } +} diff --git a/assets/css/admin/orders/style.scss b/assets/css/admin/orders/style.scss new file mode 100644 index 00000000000..a0382897507 --- /dev/null +++ b/assets/css/admin/orders/style.scss @@ -0,0 +1,2 @@ +@import "customer"; +@import "refunds-modal"; diff --git a/assets/css/admin/pass-handler.scss b/assets/css/admin/pass-handler.scss new file mode 100644 index 00000000000..2e53ba77d16 --- /dev/null +++ b/assets/css/admin/pass-handler.scss @@ -0,0 +1,87 @@ +@import "../variables/variables"; + +.edd-pass-handler { + &__description { + display: grid; + gap: 1em; + margin-bottom: 1em; + } + + &__control { + display: flex; + gap: 4px; + flex-wrap: wrap; + + > input { + max-width: 250px !important; + } + + + .notice { + max-width: 400px; + margin-top: 1em; + } + + .button { + margin: 0; + } + } + + &__loading { + display: flex; + align-items: center; + gap: .5em; + + &:before { + background: none; + display: block; + @include edd-spinner( + 12px, + $wp-input-border, + $wp-alternate + ); + } + } + + &__verifying-wrap { + display: flex; + position: fixed; + left: 36px; + right: 0; + top: 0; + bottom: 0; + background: rgba(0,0,0,.5); + justify-content: center; + align-items: center; + z-index: 110; + + p { + background: $white; + border: 1px solid $wp-input-border; + border-radius: 4px; + padding: 2em; + } + + @media only screen and (min-width: $break-large) { + .wp-admin:not(.folded) & { + left: 160px; + } + } + + @media only screen and (max-width: $break-medium) { + left: 0; + } + } + + &__verifying ul#adminmenu #menu-posts-download ul.wp-submenu li.current a:before { + border-right-color: #787878; + } + + &__actions { + display: flex; + gap: 4px; + } + + &__heading { + width: 100%; + } +} diff --git a/assets/css/admin/pointers/style.scss b/assets/css/admin/pointers/style.scss new file mode 100644 index 00000000000..365576f6fe5 --- /dev/null +++ b/assets/css/admin/pointers/style.scss @@ -0,0 +1,35 @@ +@import "../../variables/variables"; + +$pointer-blue: #2271b1; + +.edd-pointer { + &.warning { + & h3 { + background: $alert-yellow; + border-color: $wp-yellow-50; + color: $gray-900; + + &:before { + color: $alert-yellow; + } + } + } + + &.edd-has-action p:last-of-type { + margin-bottom: 2em; + } + + .edd-pointer-action { + position: absolute; + left: 15px; + bottom: 15px; + background: $pointer-blue; + border-color: $pointer-blue; + + &:hover, + &:focus { + background: darken($pointer-blue, 10%); + border-color: darken($pointer-blue, 10%); + } + } +} diff --git a/assets/css/admin/promos/_about.scss b/assets/css/admin/promos/_about.scss new file mode 100644 index 00000000000..3ad95c1942f --- /dev/null +++ b/assets/css/admin/promos/_about.scss @@ -0,0 +1,487 @@ +body.edd-about { + & div.notice { + display: none; + } + + & #edd-admin-about *, & #edd-admin-about *::before, & #edd-admin-about *::after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + + & #edd-admin-about { + display: flex; + flex-direction: column; + + & .edd-admin-about-section { + box-shadow: 0 2px 5px $edd-very-light-gray; + margin: 0 20px 20px; + padding: 30px; + background: #ffffff; + border: 1px solid #dddddd; + line-height: 2; + display: flex; + flex-direction: row; + + & h2 { + font-size: 24px; + line-height: 32px; + color: $wp-gray-50; + margin: 0px; + } + + & h3 { + font-size: 16px; + line-height: 22px; + color: $wp-gray-40; + } + + & ul, p { + font-size: 14px; + } + + & p { + margin-bottom: 10px; + + &.bigger { + font-size: 18px; + } + + &.smaller { + font-size: 14px; + } + + &:last-child { + margin-bottom: 0; + } + } + + & hr { + margin: 30px 0; + } + + & figure { + margin: 0; + + & img.shadow { + width: 100%; + box-shadow: 0 2px 5px $edd-very-light-gray; + } + + & figcaption { + font-size: 14px; + color: #888888; + margin-top: 5px; + text-align: center; + line-height: initial; + } + } + + & .edd-admin-columns { + display: flex; + } + + & .column { + display: flex; + flex-direction: column; + + &--20 { + width: 20%; + } + &--40 { + width: 40%; + } + &--50 { + width: 50%; + } + &--60 { + width: 60%; + } + &--80 { + width: 80%; + } + + &.align--middle { + align-items: center; + justify-content: center; + } + + &.m { + &-l { + &-15 { + margin-left: 15px; + } + } + &-r { + &-15 { + margin-right: 15px; + } + } + } + } + + & ul { + &.list-plain { + margin-top: 0; + margin-bottom: 0; + + & li { + margin-bottom: 0; + } + } + + &.list-features { + & li { + display: flex; + align-items: center; + justify-items: left; + gap: 8px; + } + } + } + + & .dashicons-star-filled { + color: gold; + } + + & .no-margin { + margin: 0 !important; + } + + & .no-padding { + padding: 0 !important; + } + + & .centered { + text-align: center !important; + } + } + + & .edd-admin-about-section-first-form { + display: flex; + + & .edd-admin-about-section-first-form-text { + flex: 1; + padding-right: 30px; + } + + & .edd-admin-about-section-first-form-video { + + & iframe { + border: 1px solid #dddddd; + } + } + } + + & .edd-admin-about-section-hero { + display: flex; + flex-direction: column; + padding: 0; + + & .edd-admin-about-section-hero-main, & .edd-admin-about-section-hero-extra { + + & div.notice { + display: none; + } + + padding: 30px; + + & h3.call-to-action { + margin-bottom: -10px; + } + + } + + & .edd-admin-about-section-hero-main { + background-color: #fafafa; + border-bottom: 1px solid #dddddd; + + &.no-border { + border-bottom: 0; + } + + & p { + color: #666; + } + } + } + + & .edd-admin-about-section-squashed { + margin-bottom: 0; + + &:not(:last-of-type) { + border-bottom: 0; + } + } + + & .edd-admin-about-section-post { + flex-direction: row; + gap: 50px; + + & h2 { + margin-bottom: -10px; + } + + & h3 { + margin-bottom: 15px; + } + + & p { + &:last-of-type { + margin-bottom: 30px; + } + } + + & img { + max-width: 250px; + } + + & .column--20 { + width: 250px; + } + + & .column--80{ + width: calc(100% - 270px); + } + + & .button-secondary { + transition: all 0.1s ease-in-out; + &:hover, &:focus { + background-color: #2271B1; + color: $white; + } + } + } + + & #edd-admin-addons { + padding: 0 30px; + & .addons-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: space-between; + + & .addon-container { + display: flex; + padding: 10px; + flex: 1 0 33.3333%; + max-width: 33.3333%; + + & .addon-item { + display: flex; + flex-direction: column; + border: 1px solid #dddddd; + box-shadow: 0 2px 5px $edd-very-light-gray; + + & .details { + padding: 20px; + display: flex; + flex-direction: row; + background-color: #ffffff; + flex-grow: 1; + + & .leftcol { + & img { + max-width: 100px; + padding: 10px; + box-shadow: 0 2px 3px $edd-very-light-gray; + } + } + + & .rightcol { + flex-direction: column; + justify-content: left; + flex-grow: 4; + padding-left: 20px; + & h5 { + font-size: 14px; + margin-bottom: 10px; + margin-top: 0px; + } + } + } + + & .actions { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 8px 12px; + + &.has-response { + justify-content: center; + flex-grow: 10; + } + + & .status { + & span.status-label { + font-weight: 600; + &.active { + color: $wp-green-50; + } + + &.inactive { + color: $wp-red-50; + } + + &.not-installed { + color: $wp-gray-50; + } + } + } + + & .action-button { + & .button.disabled, & .button.loading { + cursor: default; + } + } + } + } + } + } + } + + @media (max-width: $break-huge) { + & #edd-admin-addons { + & .addons-container { + & .addon-container { + display: flex; + padding: 10px; + flex: 1 0 50%; + max-width: 50%; + } + } + } + } + + @media (max-width: $break-wide) { + & .welcome-message { + flex-direction: column-reverse; + + &.column--20, .column--40, .column--50, .column--60, .column--80 { + width: 100%; + + &.m-l-15 { + margin-left: 0px; + } + + &.m-r-15 { + margin-right: 0px; + } + } + } + } + + @media (max-width: $break-large) { + & .edd-admin-about-section { + flex-direction: column; + gap: 20px; + + &.welcome-message { + flex-flow: column-reverse; + } + + & .edd-admin-columns { + flex-direction: column; + } + + &.column--20, .column--40, .column--50, .column--60, .column--80 { + display: flex; + width: 100%; + + &.m-l-15 { + margin-left: 0px; + } + + &.m-r-15 { + margin-right: 0px; + } + } + } + + & .edd-admin-about-section-first-form { + display: block !important; + + & .edd-admin-about-section-first-form-text { + flex: none; + } + + & .edd-admin-about-section-first-form-video { + padding-top: 20px; + } + } + + & .edd-admin-about-section-hero { + & .edd-admin-about-section-hero-extra { + & .edd-admin-column-50 { + float: none; + width: 100%; + } + } + } + + & .edd-admin-about-section-post { + flex-direction: column; + + & .column--20, .column--80 { + display: flex; + width: 100%; + + & img { + width: auto; + max-width: 100%; + } + + &.image { + margin: 0 auto; + align-content: center; + justify-content: center; + } + + &.content { + flex-direction: column; + justify-items: left; + } + + & .edd-admin-about-section-post-link { + font-size: 1.25rem; + display: flex; + justify-items: space-around; + justify-content: center; + + & .dashicons { + display: none; + } + } + } + } + + & #edd-admin-addons { + & .addons-container { + display: flex; + flex-direction: column; + + & .addon-container { + padding: 10px; + flex: 1 0 100%; + max-width: 100%; + + & .addon-item { + & .details { + flex-direction: row; + + & .rightcol { + padding-left: 20px; + + & .addon-name { + text-align: left; + } + } + } + } + } + } + } + } + } +} diff --git a/assets/css/admin/promos/_flyout.scss b/assets/css/admin/promos/_flyout.scss new file mode 100644 index 00000000000..ef80e259ee4 --- /dev/null +++ b/assets/css/admin/promos/_flyout.scss @@ -0,0 +1,229 @@ +#edd-flyout { + position: fixed; + z-index: 99999; + transition: all 0.2s ease-in-out; + right: 40px; + bottom: 40px; + opacity: 1; + display: flex; + flex-direction: column; + align-items: flex-end; + + @media (max-width: $break-large) { + display: none; + } + + & .edd-flyout-label { + transform: translateY(-50%); + -moz-transform: translateY(-50%); + -webkit-transform: translateY(-50%); + color: $white; + background-color: $gray-700; + font-size: 12px; + white-space: nowrap; + padding: 5px 10px; + transition: all 0.2s ease-out; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + margin-top: 20px; + opacity: 0; + transform: scale(0); + } + + & #edd-flyout-button { + border: none; + padding: 0px; + background: none; + display: flex; + flex-direction: row; + gap: 10px; + align-items: center; + + & img { + width: 54px; + height: 54px; + display: block; + border-radius: 50%; + border: 3px solid $edd-notice-blue; + overflow: hidden; + transition: all 0.2s ease-in-out; + background: $white; + } + + &:hover img { + cursor: pointer; + box-shadow: 0 3px 12px 1px $medium-gray-placeholder; + } + + & .edd-flyout-label { + opacity: 0; + transform: translateY(-50%) scale(0); + } + + &:hover .edd-flyout-label { + opacity: 1; + transform: translateY(-50%) scale(1); + } + + &.has-alert:after { + transform: scale(1); + opacity: 1; + font-family: "dashicons"; + content: "\f534"; + color: $edd-alert-red; + font-size: 16px; + height: 16px; + width: 16px; + text-decoration: none; + border-radius: 999999px; + line-height: 16px; + transition: all 0.2s ease-in-out; + background-color: $white; + position: absolute; + right: 3px; + bottom: 46px; + } + } + + & #edd-flyout-items { + display: flex; + flex-direction: column-reverse; + gap: 10px; + margin-right: 12px; + margin-bottom: 12px; + height: 0px; + + & .edd-flyout-item { + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: center; + gap: 25px; + visibility: collapse; + + & a { + text-decoration: none; + color: $white; + } + + & .edd-flyout-label, .edd-flyout-icon { + transition: all 0.2s ease-in-out; + transform: scale(0); + opacity: 0; + } + + & .edd-flyout-label { + margin-top: 0px; + + & a { + display: inline-block; + line-height: initial; + height: auto !important; + } + } + + & .edd-flyout-icon { + display: flex; + justify-content: space-around; + width: 40px; + height: 40px; + border-radius: 50%; + box-shadow: 0 3px 12px 1px $medium-gray-placeholder; + background: $edd-notice-blue 0 0 no-repeat padding-box; + + &.red { + background: $edd-alert-red 0 0 no-repeat padding-box; + } + + &.green { + background: $edd-notice-green 0 0 no-repeat padding-box; + } + + & span.dashicons:before { + color: $white; + font-size: 20px; + line-height: 40px; + vertical-align: middle; + } + } + + &:hover { + cursor: pointer; + + & .edd-flyout-icon, .edd-flyout-label { + box-shadow: 0 3px 12px 1px $medium-gray-placeholder; + } + + & .edd-flyout-icon { + background: $edd-blue-gray 0 0 no-repeat padding-box; + + &.red { + background: $edd-alert-red-hover 0 0 no-repeat padding-box; + } + + &.green { + background: $edd-notice-green-hover 0 0 no-repeat padding-box; + } + } + + & .edd-flyout-label { + background-color: $gray-800; + } + } + } + } + + &.opened { + + & #edd-flyout-items { + height: auto; + + & .edd-flyout-item { + visibility: visible; + + &.edd-flyout-item { + $elements: 4; + @for $i from 0 to $elements { + &:nth-of-type( #{ $i + 1 } ) { + & .edd-flyout-icon { + transition: transform 0.2s #{ $i * 24 }ms, background-color 0.2s; + } + + & .edd-flyout-label { + transition: transform 0.2s #{ ( $i + 1 ) * 24}ms, background-color 0.2s; + } + } + } + } + + & .edd-flyout-label, .edd-flyout-icon { + opacity: 1; + transform: scale(1); + } + } + } + + + & #edd-flyout-button { + & img { + box-shadow: 0 3px 12px 1px $medium-gray-placeholder; + + } + + & .edd-flyout-label { + opacity: 0; + } + + &.has-alert:after { + opacity: 0; + transition: scale(0); + } + } + } + + &.out { + opacity: 0; + visibility: hidden; + } +} diff --git a/assets/css/admin/promos/_overlay.scss b/assets/css/admin/promos/_overlay.scss new file mode 100644 index 00000000000..dc3babeb57c --- /dev/null +++ b/assets/css/admin/promos/_overlay.scss @@ -0,0 +1,89 @@ +/* Overlay Notice +-------------------------------------------------- */ + +.edd-promo-notice__overlay { + display: none; + position: fixed; + background: rgba($gray-100,.75); + top: 0; + right: 0; + bottom: 0; + left: 160px; + z-index: 110; + justify-content: center; + align-items: center; + + .folded & { + left: 36px; + } + + @media screen and (max-width: $break-medium) { + left: 0; + } +} + +.edd-admin-notice-overlay { + display: none; + background-color: $white; + padding: 2.5em; + text-align: center; + max-width: 650px; + position: relative; + flex-direction: column; + + .edd-promo-notice__overlay & { + display: flex; + } + + h2 { + line-height: 1.6em; + margin: 0 auto; + max-width: 540px; + } + + .edd-promo-notice__features { + text-align: left; + display: grid; + grid-template-columns: repeat( 3, auto ); + margin: 2em auto; + gap: 0 1.5em; + + li { + display: flex; + gap: .5em; + align-items: center; + } + + @media screen and (max-width: $break-small) { + grid-template-columns: unset; + } + } + + .button { + padding: 4px 36px; + margin: 0 auto .5em; + max-width: 360px; + } + + &__link { + color: $gray-100; + } + + .edd-promo-notice-dismiss.button-link { + position: absolute; + color: $wp-text; + text-decoration: none; + font-size: 2em; + top: 0; + right: .5em; + + &:active, + &:hover { + color: $gray-100; + } + } + + @media screen and (max-width: $break-medium) { + margin: 1em; + } +} diff --git a/assets/css/admin/promos/_popup.scss b/assets/css/admin/promos/_popup.scss new file mode 100644 index 00000000000..ee62ef6a4e7 --- /dev/null +++ b/assets/css/admin/promos/_popup.scss @@ -0,0 +1,52 @@ +.edd-promo-notice__popup { + display: flex; + justify-content: center; + justify-items: center; + flex-direction: column; + margin: 2em auto; + gap: 0 1.5em; + + & h2 { + line-height: 1.6em; + margin: 0 auto; + max-width: 540px; + font-size: 1.25em; + } + + & .content { + display: inherit; + flex-direction: inherit; + justify-items: center; + text-align: center; + + .edd-promo-notice__features { + text-align: left; + display: grid; + grid-template-columns: repeat( 3, auto ); + margin: 2em auto; + gap: 0 1.5em; + flex-direction: row; + + li { + display: flex; + gap: .5em; + align-items: center; + min-width: 50%; + } + + @media screen and (max-width: $break-small) { + grid-template-columns: unset; + } + } + + & .button-primary { + padding: 4px 36px; + margin: .5em auto .5em; + max-width: 360px; + } + + &__link { + color: $gray-100; + } + } +} diff --git a/assets/css/admin/promos/style.scss b/assets/css/admin/promos/style.scss new file mode 100644 index 00000000000..74a48fdc189 --- /dev/null +++ b/assets/css/admin/promos/style.scss @@ -0,0 +1,102 @@ +@import '../../variables/variables'; +@import 'about'; +@import 'flyout'; + +.edd-admin-notice-top-of-page { + font-size: 15px; + line-height: 1.4; + color: #fff; + margin-left: -20px; + padding: 12px 32px 12px 20px; + background: #2d6ca2; + + &.edd-pro-inactive { + background: $wp-red-50; + } + + @media screen and ( min-width: 783px ) { + padding: 10px 46px 10px 22px; + } + + @media screen and ( min-width: 961px ) { + text-align: center; + } + + a { + color: #fff; + + &:hover { + text-decoration: none; + } + } + + .button-link { + position: absolute; + top: 48px; + right: -1px; + font-size: 20px; + color: #fff; + font-weight: bold; + text-decoration: none; + margin-left: 5px; + padding: 6px 10px; + + &:hover, &:active, &:focus { + color: #fff; + text-decoration: none; + } + + @media screen and ( min-width: 601px ) { + top: 1px; + } + + @media screen and ( min-width: 783px ) { + right: 9px; + } + } +} + +/* Five Star Review Request +------------------------------------------------------------- */ +#edd-admin-notice-five-star-review { + display: grid !important; +} + +#edd_dashboard_sales .edd-promo-notice { + border-bottom: 1px solid #c3c4c7; +} + +.edd-review-actions { + display: flex; + gap: 6px; + margin: 0 0 16px 0; +} + +.edd-promo-notice .edd-peeking { + align-self: flex-end; + justify-self: flex-end; + margin-right: 16px; + margin-bottom: -1px; +} + +@media screen and (max-width: $break-medium) { + #edd-admin-notice-five-star-review.notice .edd-peeking { + margin-bottom: -6px; + } +} + +@media screen and (min-width: $break-mobile) { + .edd-promo-notice.notice-info .edd-peeking { + justify-self: flex-start; + margin-right: 0; + margin-left: 250px; + } +} + +.edd-review-step, +.edd-promo-notice .edd-peeking { + grid-area: 1/-1; +} + +@import "overlay"; +@import "popup"; diff --git a/assets/css/admin/reports/_filter.scss b/assets/css/admin/reports/_filter.scss new file mode 100644 index 00000000000..f0f4b378a90 --- /dev/null +++ b/assets/css/admin/reports/_filter.scss @@ -0,0 +1,346 @@ + +#edd-filters { + padding: 10px; + margin: 0; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + gap: 8px; + + .filter-items { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 6px; + float: none; + flex-grow: 1; + + .graph-option-section { + display: flex; + align-items: center; + } + + .edd-date-range-picker[data-range='other'] { + .edd-graphs-date-options { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + + .edd-date-range-dates, .edd-date-range-relative-dates { + display: none; + } + } + + .edd-date-range-options { + display: inline-block; + margin: 10px 0; + } + + .edd-graphs-date-options { + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + } + + .edd-date-range-dates { + display: flex; + align-items: center; + border: 1px solid #8c8f94; + border-left: none; + color: #2c3338; + padding: 4px 10px; + margin-left: -5px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + cursor: pointer; + gap: 4px; + &.hidden { + display: none; + } + } + + .edd-date-range-selected-date { + display: inline-block; + } + + .edd-date-range-relative-dates { + display: flex; + align-items: center; + margin-left: 10px; + &.hidden { + display: none; + } + } + + .edd-date-range-selected-relative-date { + position: relative; + display: flex; + align-items: center; + border: 1px solid #8c8f94; + padding: 4px 2px 4px 6px; + color: #2c3338; + margin-left: 10px; + margin-right: 10px; + border-radius: 4px; + cursor: pointer; + .arrow-down { + width: 16px; + height: auto; + margin-left: 6px; + margin-top: 2px; + vertical-align: middle; + } + &.opened { + .edd-date-range-relative-dropdown { + display: block; + } + } + } + + .edd-date-range-relative-dropdown { + position: absolute; + z-index: 99; + width: 420px; + left: 50%; + top: 100%; + margin-top: 10px; + transform: translateX( -50% ); + background-color: #fff; + border: 1px solid #8c8f94; + border-radius: 4px; + box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.25); + display: none; + &:after { + height: 10px; + width: 10px; + position: absolute; + content: ''; + background: white; + border: 1px solid #8c8f94; + border-top-width: 0px; + border-left-width: 0px; + transform: rotate(-135deg); + top: -6px; + left: calc(50% - 4px); + } + + .spinner { + display: none; + } + &.loading { + padding: 10px; + text-align: center; + .spinner { + display: inline-block; + visibility: visible; + margin: 0; + float: unset; + } + } + &.loading *:not(.spinner) { + display: none; + } + + ul li { + display: flex; + align-items: center; + padding: 2px 10px; + opacity: 0.85; + gap: 20px; + &:hover, &.active { + cursor: pointer; + color: var( --wp-admin-theme-color ); + opacity: 1; + } + .date-range-name { + width: 110px; + } + } + } + + @media screen and ( max-width: 950px ) { + .graph-option-section { + margin-top: 8px; + width: 100%; + } + + .edd-date-range-picker { + flex-wrap: wrap; + } + + .edd-graphs-date-options { + width: 100%; + max-width: 100%; + min-height: 40px; + font-size: 14px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + + .edd-date-range-dates { + width: 100%; + margin-top: 10px; + border: 1px solid #8c8f94; + margin-left: unset; + border-radius: 4px; + font-size: 14px; + padding: 8px 6px 8px 8px; + } + + .edd-date-range-relative-dates { + width: 100%; + flex-wrap: wrap; + margin-left: 0px; + margin-top: 6px; + } + + .edd-date-range-selected-relative-date { + width: 100%; + margin-top: 8px; + margin-left: 0px; + margin-right: 0; + font-size: 14px; + padding: 8px 6px 8px 8px; + flex-wrap: wrap; + .arrow-down { + margin-left: auto; + } + } + .edd-date-range-relative-dropdown { + position: relative; + width: 100%; + left: 0; + top: 0; + transform: unset; + box-shadow: unset; + border: unset; + margin: 0; + + &:after { + display: none; + } + + ul { + margin-bottom: 0; + li { + padding-left: 0; + padding-right: 0; + justify-content: space-between; + flex-wrap: wrap; + gap: unset; + .date-range-name, .date-range-dates { + width: 100%; + } + } + } + + } + } + + } + + > p { + color: $gray-700; + } + + input[type="text"].edd_datepicker, + input[type="number"] { + max-width: 105px; + } + + + input[type="number"], + .button-secondary { + margin-bottom: 0; + } + + .search-form { + margin: 0; + } + + @media screen and ( max-width: 480px ) { + span { + margin: 2px 0; + } + } +} + +#edd-advanced-filters { + position: relative; + + .inside { + z-index: 99; + position: absolute; + top: 29px; + right: 0; + border: 1px solid $gray-200; + padding: 0; + background: $white; + box-shadow: 0 3px 5px rgba(0,0,0,0.2); + min-width: 285px; + opacity: 0; + visibility: hidden; + } + + fieldset { + display: block; + padding: 10px 15px 15px; + margin: 10px 0; + + &:not(:last-of-type) { + border-bottom: 1px solid $gray-200; + } + + &:last-of-type { + padding-bottom: 5px; + } + + &.edd-add-on-filters { + label, + span, + p, + div { + display: block; + margin-bottom: 2px; + } + } + } + + div.edd-select-chosen:not(:last-child) { + margin-bottom: 10px; + } + + &.open { + .edd-advanced-filters-button { + background: $gray-200; + border-color: $gray-600; + box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); + -webkit-transform: translateY(1px); + transform: translateY(1px); + } + + .inside { + visibility: visible; + opacity: 1; + -webkit-transition: opacity 0.2s ease-in; + -moz-transition: opacity 0.2s ease-in; + -o-transition: opacity 0.2s ease-in; + transition: opacity 0.2s ease-in; + } + } +} + +.download_page_edd-reports { + #edd-filters { + margin-bottom: -1px; + box-shadow: none; + + @media screen and ( max-width: 782px ) { + gap: 0; + } + } +} + +.edd-old-log-filters { + margin-top: -30px; + margin-left: 2px; +} diff --git a/assets/css/admin/reports/_layout.scss b/assets/css/admin/reports/_layout.scss new file mode 100644 index 00000000000..8e11e778391 --- /dev/null +++ b/assets/css/admin/reports/_layout.scss @@ -0,0 +1,43 @@ +@media screen and (min-width: $break-small) { + #edd-reports-charts-wrap { + display: grid; + grid-template-columns: repeat(2, minmax(200px, 50%)); + grid-gap: 2em; + } + + .edd-reports-chart { + margin-bottom: 0; + } + + .edd-reports-chart-line, + .edd-reports-chart-bar { + grid-column: 1 / span 2; + } +} + +.edd-canvas__container { + margin: auto; + position: relative; + max-width: 100%; + max-height: 75vh; + + &.edd-canvas__type-line, + &.edd-canvas__type-bar { + @media screen and (min-width: $break-mobile) { + height: 450px; + } + + @media screen and (min-width: $break-medium) { + height: 500px; + } + + @media screen and (min-width: $break-xlarge) { + height: 700px; + } + } +} + +.chart-timezone { + font-size: .75rem; + color: $wp-gray-10; +} diff --git a/assets/css/admin/reports/_mobile-link.scss b/assets/css/admin/reports/_mobile-link.scss new file mode 100644 index 00000000000..6ee177f012b --- /dev/null +++ b/assets/css/admin/reports/_mobile-link.scss @@ -0,0 +1,27 @@ +.edd-mobile-link { + line-height: 32px; + + a { + text-decoration: none; + + &:before, + &:after { + display: inline-block; + -webkit-font-smoothing: antialiased; + font: normal 20px/30px "dashicons"; + vertical-align: top; + margin: 1px 0 0 0; + padding: 0; + } + + &:before { + content: "\f470"; + color: $gray-700; + margin-right: -3px; + } + + &:after { + content: "\f504"; + } + } +} diff --git a/assets/css/admin/reports/_tiles.scss b/assets/css/admin/reports/_tiles.scss new file mode 100644 index 00000000000..d13f679774a --- /dev/null +++ b/assets/css/admin/reports/_tiles.scss @@ -0,0 +1,145 @@ +#edd-reports-tiles-wrap #dashboard-widgets .sortable-placeholder { + padding: 0; + margin: 0 0 20px 0; + line-height: 0; + box-sizing: border-box; + height: 110px; +} + +#edd-reports-tiles-wrap #dashboard-widgets #primary-sortables { + margin-left: 0; +} + +#edd-reports-tiles-wrap #dashboard-widgets #tertiary-sortables { + margin-right: 0; +} + +#edd-reports-tiles-wrap { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); + grid-gap: 20px; +} + +.edd-reports-tile { + text-align: center; + padding: 20px 10px 35px 10px; + display: flex; + flex-direction: column; + justify-content: center; + border: 1px solid #e5e5e5; + background: #fafafa; + position: relative; + box-sizing: border-box; + gap: .5em; + >span:not(.tile-compare) { + width: 100%; + } +} + +.edd-reports-tile .tile-label { + text-align: center; + text-transform: uppercase; + font-size: 12px; + font-weight: normal; + color: $wp-gray-2; +} + +.edd-reports-tile .tile-value { + color: #333; + font-size: 2em; + line-height: 1; + transition: all .2s ease-in-out; + display: flex; + justify-content: center; + flex-direction: column; + gap: .25em; +} + +.edd-reports-tile:hover { + border: 1px solid #aaa; +} + +.edd-reports-tile:hover .tile-value:not(.tile-no-data) { + transform: scale(1.05); +} + +.edd-reports-tile .tile-amount { + color: rgb(39, 148, 218); +} + +.edd-reports-tile .tile-number { + color: rgb(153, 102, 255); +} + +.edd-reports-tile .tile-amount, +.edd-reports-tile .tile-number { + color: #fff; +} + +.edd-reports-tile .tile-value.tile-no-data { + color: #ddd; +} + +.edd-reports-tile .tile-value.tile-url { + font-size: 1.5em; +} + +.edd-reports-tile .tile-relative { + font-size: 12px; + font-weight: normal; + color: #888; +} + +.edd-reports-tile span.dashicons { + display: inline-block; + font-size: 30px; + line-height: 20px; + height: 20px; + width: 20px; + position: relative; + top: 4px; + left: -5px; + margin-left: -5px; + color: $wp-inactive; +} + +.edd-reports-tile .tile-relative { + span.dashicons { + top: -5px; + left: -3px; + margin-left: 0px; + } + + span.dashicons-arrow-down, + span.dashicons-arrow-up.reverse { + color: $wp-red-50; + } + + span.dashicons-arrow-up, + span.dashicons-arrow-down.reverse { + color: $wp-green-50; + } +} + +.edd-reports-tile .tile-compare { + position: absolute; + right: 0; + bottom: 0; + color: #aaa; + font-size: 11px; + line-height: 1em; + background-color: #fff; + border-left: 1px solid #e5e5e5; + border-top: 1px solid #e5e5e5; + border-bottom: 1px solid #fff; + border-right: 1px solid #fff; + border-top-left-radius: 8px; + padding: 4px 0 0 9px; + margin: 0 -1px -1px 0; +} + +.edd-reports-tile:hover .tile-compare { + border-left: 1px solid #bbb; + border-top: 1px solid #bbb; + color: #777; +} diff --git a/assets/css/admin/reports/_tooltip.scss b/assets/css/admin/reports/_tooltip.scss new file mode 100644 index 00000000000..71b1b49bfac --- /dev/null +++ b/assets/css/admin/reports/_tooltip.scss @@ -0,0 +1,19 @@ +.edd-chartjs-tooltip { + position: absolute; + background-color: #fff; + border-radius: 7px; + transition: all .1s ease; + pointer-events: none; + transform: translate(-50%, 0); + font-size: 12px; + box-shadow: 0 0 0 1px rgba(89, 94, 100, .1), 0 15px 35px 0 rgba(89, 94, 100, .1), 0 5px 15px 0 rgba(0, 0, 0, .12); + min-width: 120px; + opacity: 0; +} + +.edd-chartjs-tooltip-key { + display: inline-block; + width: 10px; + height: 10px; + margin-right: 5px; +} diff --git a/assets/css/admin/reports/style.scss b/assets/css/admin/reports/style.scss new file mode 100644 index 00000000000..0565059827c --- /dev/null +++ b/assets/css/admin/reports/style.scss @@ -0,0 +1,12 @@ +@import "~@wordpress/base-styles/colors"; +@import "~@wordpress/base-styles/variables"; +@import "~@wordpress/base-styles/mixins"; +@import "~@wordpress/base-styles/breakpoints"; +@import "~@wordpress/base-styles/animations"; +@import "../../variables/colors"; + +@import "filter"; +@import "layout"; +@import "mobile-link"; +@import "tiles"; +@import "tooltip"; diff --git a/assets/css/admin/settings/_licenses.scss b/assets/css/admin/settings/_licenses.scss new file mode 100644 index 00000000000..33824a9bac2 --- /dev/null +++ b/assets/css/admin/settings/_licenses.scss @@ -0,0 +1,167 @@ +.wrap-licenses { + + .edd-licenses__description { + margin: 2em 1em; + } + + .form-table, + thead, + tfoot, + tr, + th, + caption { + display: block; + + @media screen and (min-width: $break-small) { + display: unset; + } + } + + tbody { + display: grid; + gap: 1em; + } + + .form-table { + tr { + margin: 0; + background: $white; + border: 1px solid $wp-gray-5; + border-radius: 3px; + padding: 0; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: space-between; + + @media screen and (min-width: $break-small) { + display: grid; + grid-template-columns: 200px 1fr; + } + } + + th { + background: $wp-alternate; + margin-bottom: 2.5em; + padding: 1em; + border-bottom: 1px solid $wp-gray-5; + width: unset; + + @media screen and (min-width: $break-small) { + border-bottom: none; + margin-bottom: 0; + display: flex; + align-items: center; + } + } + + td { + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + gap: 2.5em; + flex-grow: 1; + + @media screen and (min-width: $break-small) { + flex-direction: row; + gap: unset; + } + + input.regular-text { + margin: 0; + width: 100%; + max-width: 250px; + } + + button { + margin: 0; + } + } + + .edd-license__control { + flex-grow: 1; + padding: 0 1em; + display: flex; + gap: 4px; + align-items: center; + justify-content: center; + + @media screen and (min-width: $break-small) { + justify-content: flex-end; + } + } + + .edd-licensing__actions { + display: flex; + gap: 4px; + } + } + + .edd-license-data[class*="edd-license-"] { + background: $wp-alternate; + padding: 1em; + border-top: 1px solid $wp-gray-5; + margin: 0; + width: 100%; + box-sizing: border-box; + display: flex; + align-items: flex-end; + + a { + color: #444; + + &:hover { + text-decoration: none; + } + } + + @media screen and (min-width: $break-small) { + border-top: none; + width: unset; + flex-basis: 100%; + align-items: center; + + &:not(:only-child) { + flex: 0 1 300px; + } + } + } + + .edd-license-data { + &.license-expires-soon-notice { + background-color: #00a0d2; + color: #fff; + border-color: #00a0d2; + } + + &.edd-license-expired { + background-color: #e24e4e; + color: #fff; + border-color: #e24e4e; + } + + &.edd-license-error, + &.edd-license-missing, + &.edd-license-invalid, + &.edd-license-site_inactive, + &.edd-license-item_name_mismatch { + background-color: #ffebcd; + border-color: #ffebcd; + } + + p { + font-size: 13px; + margin-top: 0; + } + + &.license-expires-soon-notice a, + &.edd-license-expired a { + color: $white; + + &:hover { + text-decoration: none; + } + } + } +} diff --git a/assets/css/admin/settings/_subnav.scss b/assets/css/admin/settings/_subnav.scss new file mode 100644 index 00000000000..88f5c15f184 --- /dev/null +++ b/assets/css/admin/settings/_subnav.scss @@ -0,0 +1,52 @@ +.edd-sub-nav { + margin: 0; + display: flex; + justify-content: flex-start; + gap: 4px; + flex-wrap: wrap; + + @media screen and (max-width: $break-medium) { + justify-content: center; + } + + &__wrapper { + margin: 16px 0; + } + + li { + border: 2px solid #f0f0f1; + border-radius: 4px; + margin: 0; + + a { + color: $wp-gray-50; + display: block; + padding: 6px 14px; + text-decoration: none; + white-space: nowrap; + + &:active, + &:focus { + box-shadow: none; + } + } + + &:hover, + &:active, + &:focus { + background-color: $white; + box-shadow: none; + outline: none; + border-color: $wp-gray-20; + } + + &.current { + background-color: #d7dade; + font-weight: 600; + } + } + + &__wrapper + .notice { + margin-left: 0; + } +} diff --git a/assets/css/admin/settings/style.scss b/assets/css/admin/settings/style.scss new file mode 100644 index 00000000000..28b0f414da0 --- /dev/null +++ b/assets/css/admin/settings/style.scss @@ -0,0 +1,63 @@ +@import "../../variables/variables"; +@import 'licenses'; +@import 'subnav'; + +.edd-settings-content { + max-width: $break-huge; + + h3 { + margin: 0; + } +} + +.edd-settings-colors, +.edd-settings-color { + display: flex; + flex-wrap: wrap; + gap: 1em; +} + +.edd-settings-color { + flex-direction: column; +} + +.edd-upload-button-wrapper { + width: 100%; + display: flex; + gap: 5px; +} + +.edd-upload-button-wrapper button.edd_settings_upload_button { + margin-bottom: 0; +} + +#edd-payment-gateways a.button.edd-settings__button-settings { + position: absolute; + right: 2em; + background-image: $icon-settings; + background-size: 1em; + background-repeat: no-repeat; + background-position: center; + min-height: unset; + height: 1.5em; + width: 1.5em; + border: none; + background-color: $wp-alternate; + + &:hover, + &:active { + background-image: $icon-settings; + background-size: 1em; + background-repeat: no-repeat; + background-position: center; + } + + .edd-plugin__active & { + display: block; + } +} + +.edd-settings__list--disc { + list-style: disc; + list-style-position: inside; +} diff --git a/assets/css/admin/style.scss b/assets/css/admin/style.scss new file mode 100644 index 00000000000..dbd8c301f8a --- /dev/null +++ b/assets/css/admin/style.scss @@ -0,0 +1,3029 @@ +/** + * EDD Admin CSS + * + * @package EDD + * @subpackage Admin CSS + * @copyright Copyright (c) 2015, Pippin Williamson + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License + */ + +@import "../variables/variables"; +@import "general/style"; +@import "downloads/style"; + +@import "discounts/style"; + +@import "forms/style"; + +@import "upgrades/v3"; + +@import "reports/style"; + +@import "orders/style"; + +@import "promos/style"; + +@import "gateways/style"; + +@import "settings/style"; + +@import "discounts/style"; + +@import "dashboard/style"; + +@import "../components/toggle-checkbox"; + +/** + * Notes: + * + * [1] Backwards compatibility for vertical tabs < 3.0 + */ + +.edd-wrap a, +.edd-notice .notice-dismiss { + text-decoration: none; +} + +/** + * Tag specificity should not be needed, but cannot + * safely be removed for fear of breaking even more things. + */ +.wp-core-ui .edd-delete, +a.edd-delete { + color: #a00; +} + +.wp-core-ui .edd-delete:hover, +a.edd-delete:hover { + color: #f00; +} + +/* General Settings Styles +-------------------------------------------------------------- */ +body.post-type-download #contextual-help-link-wrap, +body.post-type-download #screen-options-link-wrap { + top: 5px !important; +} + +body.post-type-download #screen-meta { + margin: 0px 0px -1px -20px; +} + +#edd-header { + border-top: 5px solid #0c5d95; + border-bottom: 1px solid #c3c4c7; + padding: 20px 0px; + margin-left: -20px; + background: #fff; +} + +#edd-header-wrapper { + display: flex; + justify-content: space-between; + padding: 0 20px; + align-items: center; +} + +#edd-header img { + display: block; + max-width: 300px; + margin: 0; +} + +.edd-header-page-title-wrap { + font-size: 1.75em; + margin-top: -5px; + margin-right: auto; + padding-left: 7px; +} + +.edd-header-separator { + margin-top: -2px; + opacity: 0.25; +} + +.edd-header-page-title { + font-weight: 400; + font-size: 1em; + line-height: 1.3em; + display: inline; +} + +.edd-header-page-title-wrap .button { + margin-left: 5px; +} + +.no-js #edd-header-actions { + display: none; +} + +#edd-header .edd-round { + position: relative; + background-color: #f3f4f5; + border-radius: 50%; + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + margin-left: 10px; + cursor: pointer; + transition: background-color .2s ease; + + &.edd-hidden { + display: none; + } +} + +button.edd-round { + border: none; +} + +#edd-header button.edd-round:hover { + background-color: #e5e5e5; +} + +button.edd-round:focus, +button.edd-round:active { + outline: 2px solid #0c5d95; +} + +#edd-header .edd-number { + position: absolute; + background-color: #df2a4a; + width: 16px; + height: 16px; + font-weight: 600; + font-size: 10px; + color: #fff; + top: -8px; + left: 50%; + transform: translateX(-50%); + margin: 0; + -webkit-animation: bounce 2s 5; + animation: bounce 2s 5; +} + +#edd-header .edd-number.edd-hidden { + display: none !important; +} + +#edd-header .edd-round svg { + width: 20px; + height: 20px; +} + +@media screen and (max-width: 840px) { + .edd-header-separator{ + display: none; + } + + #edd-header img { + display: none; + } +} + + +.edd_datepicker { + height: 29px; +} + +.edd-from-to-wrapper input { + width: 105px; + margin: 0; + position: relative; + z-index: 1; +} + +.edd-from-to-wrapper input[name*="start"], +.edd-from-to-wrapper input[name="filter_from"] { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.edd-from-to-wrapper input[name*="end"], +.edd-from-to-wrapper input[name="filter_to"] { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.edd-from-to-wrapper input:focus { + z-index: 2; + position: relative; +} + +.download_page_edd-settings .edd-check-wrapper { + clear: both; +} + +.download_page_edd-settings .form-table tr>th>strong, +.download_page_edd-settings .form-table tr>th>h3 { + font-size: 1.2em; + font-weight: 600; + margin: 0 auto; +} + +.edd-sortable-list { + margin: 0; + width: 300px; + position: relative; +} + +.edd-sortable-list li { + margin: 0; + padding: 0; + position: relative; + height: 28px; + cursor: move; + + &.edd-toggle { + padding: 4px 0; + } +} + +.edd-sortable-list li label * { + vertical-align: middle; +} + +.edd-sortable-list li label:after { + display: block; + width: 17px; + height: 17px; + position: absolute; + right: 6px; + top: 0px; + color: #aaa; + font-family: dashicons; + font-size: 17px; + content: '\f228'; + cursor: move; +} + +.form-table .edd-sortable-list li label { + display: block; + height: 28px; + padding: 0; + margin: 0; +} + +.edd-sortable-list .payment-icon { + width: 32px; + height: 24px; + position: relative; + margin-right: 5px; +} + +/* =Payment Icon Styling +-------------------------------------------------------------- */ + +.download_page_edd-settings .edd-settings-payment-icon-wrapper { + margin-top: 5px; +} + +.download_page_edd-settings .edd-settings-payment-icon-wrapper input { + margin-top: 1px; +} + +.download_page_edd-settings .form-table .edd-settings-payment-icon-wrapper input[type="checkbox"]+label { + margin: 0; + display: inline-block; +} + +.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-icon-image { + margin-right: 5px; + width: 32px; + display: inline-block; + vertical-align: middle; +} + +.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-option-name { + vertical-align: middle; +} + + +/* =Tax Settings Style +-------------------------------------------------------------- */ +.download_page_edd-settings .taxrates th, +.download_page_edd-settings .taxrates td { + padding: 8px 10px; +} + +.download_page_edd-settings .taxrates td { + line-height: 1.5em; + vertical-align: top; + margin: 0; +} + +.download_page_edd-settings .taxrates .regular-text { + width: 100%; +} + +/* Insert Download +-------------------------------------------------------------- */ + +#TB_window { + overflow: hidden; +} + +#TB_title { + padding: 5px; +} + +#TB_ajaxContent { + width: calc(100% - 30px) !important; + padding: 15px; + margin: 0; + height: calc(100% - 118px) !important; +} + +#TB_ajaxWindowTitle { + font-size: 18px; + font-weight: 600; + line-height: 30px; +} + +#TB_closeWindowButton { + right: 6px; + top: 6px; +} + +#choose-download-wrapper { + width: 100%; +} + +#choose-download-wrapper .wrap { + overflow-y: scroll; + margin: 0; + padding: 0; + height: calc(100% - 50px); +} + +#choose-download-wrapper .submit-wrapper { + position: absolute; + width: 100%; + bottom: 0; + padding: 0; + margin: 0 0 0 -15px; + text-align: right; +} + +#choose-download-wrapper .submit-wrapper div { + background-color: #fafafa; + padding: 15px; + border-top: 1px solid #ddd; +} + +/* Media Buttons Styles +-------------------------------------------------------------- */ + +.wp-media-buttons .button.edd-thickbox { + padding-left: 0; +} + +.wp-media-buttons .button.edd-email-tags-inserter .dashicons { + margin-top: -2px; +} + +/* Add/View Order Styles +-------------------------------------------------------------- */ + +/** Mimic WordPress 5.0 block-editor header region styles. */ +.download_page_edd-payment-history .edit-post-editor-regions__header { + flex-shrink: 0; + height: auto; + border-bottom: 1px solid #e2e4e7; + z-index: 30; + position: -webkit-sticky; + position: sticky; + top: 32px; + + /** EDD-specific */ + margin-left: -20px; +} + +@media screen and (max-width: 782px) { + + .download_page_edd-payment-history .edit-post-editor-regions__header { + position: initial; + top: 46px; + } +} + +.download_page_edd-payment-history .edit-post-header { + height: 56px; + padding: 4px 2px; + background: #fff; + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + + /** EDD-specific */ + max-width: 100%; + box-sizing: border-box; + padding-left: 20px; + padding-right: 20px; +} + +@media screen and (max-width: 782px) { + + .download_page_edd-payment-history .edit-post-header { + padding-left: 10px; + padding-right: 10px; + } +} + +@media (min-width: 280px) { + + .download_page_edd-payment-history .edit-post-header { + flex-wrap: nowrap; + } +} + +.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar { + order: 0; +} + +.download_page_edd-payment-history .edit-post-header .edit-post-header__settings { + order: 1; +} + +.download_page_edd-payment-history .edit-post-header #publishing-action, +.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar, +.download_page_edd-payment-history .edit-post-header .edit-post-header__settings { + display: flex; + align-items: center; +} + +.download_page_edd-payment-history .edit-post-header #publishing-action .spinner { + margin: 0 5px 0 0; +} + +.download_page_edd-payment-history .edit-post-header .button-primary { + margin: 2px; + height: 34px; + line-height: 32px; + font-size: 13px; +} + +#edd-order-items .hndle { + display: flex; + align-items: center; + justify-content: space-between; +} + +#edd-order-items .hndle .edd-toggle { + font-weight: normal; +} + +.edd-add-order-item td { + vertical-align: middle; +} + +.edd-add-order-item input { + width: 80%; +} + +.edd-add-order-item input[readonly] { + color: #555; + background: none; + border: 1px solid transparent; + box-shadow: none; +} + +.order-customer-info .customer-details-wrap { + margin: 15px 0; + align-items: center; +} + +.order-customer-info .customer-details-wrap .spinner { + margin: 0; +} + +.order-customer-info .customer-details { + display: flex; + flex-direction: column; +} + +.order-customer-info .customer-details .customer-since { + color: #666; + display: block; + margin: 4px 0 6px; +} + +.order-customer-info .customer-details>span { + margin-bottom: 5px; +} + +.edd-order-add-download-select .spinner { + display: none; +} + +/** Overview */ +table.edd-order-overview-summary { + border-width: 0; + table-layout: fixed; +} + +table.edd-order-overview-summary--refund { + border-width: 0; +} + +@media screen and (min-width: 782px) { + + .edd-order-overview .column-right { + text-align: right; + } +} + +.edd-ml-auto { + margin-left: auto !important; +} + +@media screen and (min-width: 782px) { + + .edd-ml-lg-auto { + margin-left: auto !important; + } +} + +.edd-ml-auto+.edd-ml-auto { + margin-left: 10px !important; +} + +/** Items */ +.edd-order-overview-summary__items-name { + align-self: flex-start; +} + +.edd-order-overview-summary__items> :nth-child(odd) { + background-color: #f9f9f9; +} + +@media screen and (min-width: 782px) { + + .edd-order-overview-summary__items tr:last-child th, + .edd-order-overview-summary__items tr:last-child td { + border-bottom: 1px solid #e5e5e5; + } +} + +@media screen and (max-width: 782px) { + + .edd-order-overview-summary .row-actions>*, + .edd-order-overview-summary__items-name .row-actions { + display: block !important; + } + + .edd-order-overview-summary .row-actions>*:not(:first-child):before { + display: none; + } +} + +.edd-order-overview-summary th:not(.column-primary) { + width: 100px; +} + +.edd-order-overview-summary .row-actions>*:not(:first-child):before { + color: #999; + content: " | "; +} + +.edd-order-overview-summary .row-actions .text { + color: #555; +} + +.edd-order-overview-summary .removable { + display: flex; + align-items: center; + position: relative; +} + +.edd-order-overview-summary .removable .delete { + display: inline-block; + margin-right: 10px; + margin-left: -8px; + padding: 10px; + border-right: 1px solid #e5e5e5; + color: #a00; +} + +.edd-order-overview-summary .removable .delete:hover { + color: #dc3232; +} + +/** Adjustments */ +.edd-order-overview-summary__adjustments .column-primary { + font-weight: 600; +} + +.edd-order-overview-summary__adjustments td small { + font-weight: normal; +} + +/** Totals */ +.edd-order-overview-summary__subtotal .column-primary, +.edd-order-overview-summary__tax tr:first-of-type .column-primary, +.edd-order-overview-summary__total .column-primary { + font-weight: 600; +} + +.edd-order-overview-summary__subtotal td, +.edd-order-overview-summary__adjustments td, +.edd-order-overview-summary__tax td, +.edd-order-overview-summary__total td { + vertical-align: middle; +} + +.edd-order-overview-summary__tax td small, +.edd-order-overview-summary__total td small { + font-weight: normal; +} + +.edd-order-overview-summary__total .total { + color: #017d5c; + display: inline-block; +} + +.edd-order-overview-summary__total .total.is-negative { + color: #a00; +} + +@media screen and (min-width: 783px) { + + .edd-order-overview-summary__adjustments .removable .delete { + margin-left: -50px; + } + + .edd-order-overview-summary__total .total { + font-size: 150%; + padding-top: 5px; + padding-bottom: 5px; + } +} + +.edd-order-overview-summary__total tr:last-child th, +.edd-order-overview-summary__total tr:last-child td:not(:first-of-type) { + border-top: 1px solid #e5e5e5; +} + +.edd-order-overview-summary__total .notice { + margin: -1px; +} + +.edd-order-overview-summary__total .notice p { + font-weight: normal; + margin: 0.5em 0; +} + +/** Refunds */ +.edd-order-overview-summary__refunds .column-primary { + font-weight: 600; +} + +.edd-order-overview-summary__refunds td small { + font-weight: normal; +} + +.edd-order-overview-summary__refunds tr:first-child td { + border-top: 1px solid #e5e5e5; +} + +/** Actions */ +#edd-order-overview-actions.inside { + border-top: 1px solid #ccd0d4; + margin-top: 0; + display: flex; + align-items: center; + flex-wrap: wrap; + justify-content: space-between; +} + +#edd-order-overview-actions.inside:empty { + padding: 0; + border-top: 0; +} + +#edd-order-overview-actions.inside>div { + display: flex; + align-items: center; +} + +#edd-order-overview-actions .edd-order-overview-actions__notice { + flex-basis: 100%; + margin-top: 15px; +} + +.edd-order-overview-actions .button { + width: 100%; + margin-bottom: 12px; +} + +.edd-order-overview-actions .button:last-of-type { + margin-bottom: 0; +} + +@media screen and (min-width: 782px) { + .edd-order-overview-actions .button { + width: auto; + margin-left: 12px; + margin-bottom: 0; + } + + .edd-order-overview-actions .button:first-of-type { + margin-left: auto; + } +} + +.edd-order-overview-actions__locked { + font-style: italic; + opacity: 0.80; +} + +@media screen and (max-width: 782px) { + + .edd-order-overview-actions__locked { + margin-bottom: 12px; + } +} + +.edd-order-overview-actions__refund .dashicons { + margin-right: 8px; +} + +/** Dialog */ +.edd-dialog .ui-button-icon-only { + font-size: 0; +} + +.download_page_edd-payment-history .ui-dialog, +.download_page_edd-payment-history .ui-dialog-content { + overflow: visible; +} + +.edd-order-overview-modal form>p { + margin-top: 0; +} + +.edd-order-overview-modal fieldset legend, +.edd-order-overview-modal form label { + display: block; + margin-bottom: 4px; +} + +.edd-order-overview-modal fieldset { + margin-bottom: calc(1em - 3px); +} + +.edd-order-overview-modal fieldset>p { + margin: 2px 0 3px; +} + +.edd-order-overview-modal form .submit { + margin: 0 -16px -16px; + padding: 16px; + background: #fcfcfc; + border-top: 1px solid #dfdfdf; + display: flex; + align-items: center; +} + +.edd-order-overview-modal form .submit .spinner { + margin: 0; +} + +.edd-order-overview-add-item [for="auto-calculate"] { + display: flex; + align-items: center; +} + +.edd-order-overview-add-item [for="auto-calculate"] input[type="checkbox"] { + margin-top: 0; +} + +.edd-order-overview-add-item [for="auto-calculate"] .label { + line-height: 1.15; + margin-left: 8px; +} + +.edd-order-overview-add-item [for="auto-calculate"] .label small { + margin-top: 4px; + display: block; + opacity: 0.75; +} + +.edd-order-overview-add-adjustment .notice, +.edd-order-overview-add-item .notice { + margin: 0 0 1rem; +} + +.edd-order-overview-add-adjustment #description, +.edd-order-overview-add-discount select { + width: 100%; +} + +.edd-order-overview-error { + font-style: italic; + color: #a00; + display: block; + margin: 4px 0; +} + +.edd-order-copy-download-link textarea { + width: 100%; +} + +.edd-order-resend-email-chooser legend { + font-weight: bold; + margin-bottom: 4px; +} + +.edd-order-resend-email-chooser p { + margin: 4px 0; +} + +/* Note Styles +-------------------------------------------------------------- */ + +.edd-notes .edd-note { + padding: 10px; + background-color: #ffffee; + border: 1px solid #cccc00; + width: 100%; + position: relative; + margin-bottom: 10px; + box-sizing: border-box; + overflow: hidden; +} + +.edd-notes .edd-note.deleting { + opacity: 0.5; +} + +.edd-notes .edd-note__header { + display: flex; + align-items: center; +} + +.edd-add-note .spinner { + float: none; + display: inline-block; + margin: 0; +} + +.edd-notes .edd-note time { + font-size: 11px; + color: #aaa; +} + +.edd-notes .edd-note .edd-note-author { + margin-right: 5px; +} + +.edd-notes .edd-note .edd-delete-note { + color: #a00; + font-weight: bold; + text-decoration: none; + margin-left: auto; +} + +.edd-notes .edd-note .edd-delete-note:hover { + color: #888; +} + +.edd-notes .edd-note p:last-child { + margin-bottom: 0; +} + +.edd-notes .edd-no-notes { + margin: 4px 0 10px 0; +} + +textarea[name="edd-note"] { + width: 100%; + min-height: 70px; + margin-top: 0; +} + +.edd-notes-wrapper { + width: 80%; +} + +.edd-note-pagination { + float: right; + margin: -35px 5px 15px 5px; +} + +.edd-note-pagination a, +.edd-note-pagination span.page-numbers { + padding: 5px 8px; + margin: 2px; + text-decoration: none; +} + +.edd-note-pagination a { + border: 1px solid #e5e5e5; + background: #fcfcfc; +} + +.edd-note-pagination a:last-child, +.edd-note-pagination span.page-numbers:last-child { + margin-right: 0; +} + +/* List Tables +-------------------------------------------------------------- */ +.post-type-download .tablenav.top .edd-select { + margin-right: 6px; +} + +.wp-list-table.customers .column-primary strong, +.wp-list-table.emails .column-primary strong, +.wp-list-table.addresses .column-primary strong, +.wp-list-table.discounts .column-primary strong, +.wp-list-table.orders .column-primary strong, +.wp-list-table.orderitems .column-primary strong, +.wp-list-table.orderadjustments .column-primary strong { + font-size: 14px; +} + +.wp-list-table.emails .column-customer .avatar, +.wp-list-table.customers .column-primary .avatar { + float: left; + margin-right: 10px; + margin-top: 1px; + border-radius: 5px; +} + +.wp-list-table.orders div.order-list-email { + font-size: .85em; + color: #888888; +} + +.wp-list-table.orders th.column-amount { + width: 100px; +} + + +/* Row Actions +-------------------------------------------------------------- */ + +.wp-list-table .row-actions span.activate a { + color: green; +} + +.wp-list-table .row-actions span.refund a { + color: #836fff; +} + +.wp-list-table .row-actions span.cancel a { + color: #cc8c00; +} + +.wp-list-table .row-actions span.cancel a:hover, +.wp-list-table .row-actions span.refund a:hover { + opacity: 0.8; +} + +.wp-list-table .type-download .row-actions { + color: #999; +} + +/* Nav Tab Styles +-------------------------------------------------------------- */ + +.no-js.edit-tags-php.post-type-download .wp-heading-inline { + position: absolute; + top: 0; +} + +.no-js.edit-tags-php.post-type-download .nav-tab-wrapper { + margin-top: 50px; +} + +.edit-tags-php.post-type-download .wrap .nav-tab-wrapper .page-title-action, +.download_page_edd-customers .wrap .nav-tab-wrapper .page-title-action, +.download_page_edd-discounts .wrap .nav-tab-wrapper .page-title-action, +.download_page_edd-payment-history .wrap .nav-tab-wrapper .page-title-action { + top: 3px; + margin-left: 10px; + line-height: 24px; +} +/* Payment History Styles +-------------------------------------------------------------- */ + +#edd-payments-filter ul.subsubsub { + margin-bottom: 8px; +} + +tr.status-refunded td { + background: #cecece; + border-top-color: #ccc; +} + +marquee { + padding: 0; + margin: 0; +} + +@media handheld, +only screen and (max-width: 640px) { + + .wp-list-table.downloads th { + width: auto !important; + } + +} + +#edd-download-link-textarea { + width: 100%; +} + +/* Metabox Styles +-------------------------------------------------------------- */ + +.edd_files_name_label { + width: 225px; + float: left; +} + +.edd_files_url_label { + width: 220px; + float: left; +} + +#postbox-container-1 .edd_files_name_label { + width: 80px; +} + +#postbox-container-1 .edd_files_url_label { + width: 80px; +} + +#edd_product_prices .inside, +#edd_product_files .inside { + margin-bottom: 0; +} +textarea#edd-payment-note { + width: 100%; + height: 4em; + margin: 0; +} + +#edd-order-items .row .edd-purchased-files-list-wrapper .download { + line-height: 1.4; +} + +#edd-order-items .edd-purchased-files-list-wrapper .edd-purchased-option { + color: #666; +} + +input[class*="edd-price-field"] { + max-width: 125px; +} + +[class*="item_"] [class*="edd-payment-details-download-"][type="number"].small-text, +#edd-order-download-quantity[type="number"].small-text, +#edd-order-download-tax[type="text"].small-text { + height: 25px; +} + +.item_price .edd-payment-details-download-quantity[type="number"].small-text, +#edd-order-download-quantity[type="number"].small-text { + width: 55px; +} + +.item_tax .edd-payment-details-download-item-tax[type="number"].small-text, +#edd-order-download-tax[type="text"].small-text { + width: 80%; + max-width: 125px; +} + +#edd_product_notes_field { + display: block; + margin: 12px 0 0; + height: 4em; + width: 100%; +} + +/* Payment Details +-------------------------------------------------------------- */ + +.edd-metabox-title-action { + margin: 0; + float: right; + padding: 4px 8px; + position: relative; + top: -1px; + text-decoration: none; + border: none; + border: 1px solid #ccc; + border-radius: 2px; + background: #f7f7f7; + text-shadow: none; + font-weight: 600; + font-size: 10px; + line-height: normal; + color: #0073aa; + cursor: pointer; + outline: 0; +} + +.edd-metabox-title-action:hover { + border-color: #008EC2; + background: #00a0d2; + color: #fff; +} + +.edd-edit-purchase-element .tablenav { + padding: 2px 10px 8px 10px; +} + +.edd-edit-purchase-element .edd-order-children-wrapper { + margin: 0 -1px; +} + +.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 table { + border-top: none; + border-bottom: none; +} + +.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 .tablenav { + display: none; +} + +.edd-edit-purchase-element[class*="columns-"] ul li { + padding-right: 1%; +} + +#edd-edit-order-form .columns-4 .column:nth-child(2n+1), +#edd-edit-order-form .columns-5 .column:nth-child(3n+1), +#edd-edit-order-form .column:nth-child(2n+1) { + margin-right: 0; +} + +#edd-edit-order-form input.large-text { + width: 90%; +} + +.edd-edit-purchase-element ul li.item_price { + width: 15%; +} + +.edd-edit-purchase-element ul li.item_price.item_quantity { + width: 25%; +} + +.edd-edit-purchase-element ul li.item_tax { + width: 15%; +} + +.edd-edit-purchase-element ul li.price { + width: 20%; +} + +.edd-admin-box-inside { + border-bottom: 1px solid #f1f1f1; + clear: both; + padding: 12px; + margin: 0; + word-wrap: break-word; +} + +.edd-admin-box-inside--row { + display: flex; + flex-wrap: wrap; + word-break: break-all; + justify-content: space-between; + align-items: center; +} + +.edd-admin-box-inside>p { + margin: 8px 3px; +} + +.edd-admin-box-inside .strong { + font-weight: 600; +} + +.edd-admin-box div:not(.edd-admin-box-inside--row) .label { + display: block; + margin-bottom: 4px; + margin-right: 0; +} + +.edd-admin-box .label--has-tip { + display: flex; + align-items: center; + + .edd-help-tip { + margin-top: 0; + font-size: 20px; + } +} + +.edd-admin-box div:not(.edd-admin-box-inside--row) .label--has-checkbox { + margin-bottom: 0; +} + +.edd-payment-fees .fee-label { + color: #666; + font-weight: normal; +} + +.edd-admin-box .right { + float: right; +} + +#edd-order-refunds-list { + padding-left: 25px; +} + +#poststuff .edd-order-data .inside { + margin: 0; + padding: 0; +} + +.edd-order-data .edd-select-chosen { + width: 130px !important; +} + +.edd-order-data input.edd_datepicker { + width: 180px; +} + +.edd-order-data input[type="number"].edd-payment-time-hour, +.edd-order-data input[type="number"].edd-payment-time-min { + width: 50px; +} + +.edd-order-data .edd-tax-rate { + color: #9c9c9c; + font-style: italic; + padding: 5px; +} + +#edd_general_logs p { + margin: 0; + padding: 0; +} + +.edd-admin-box-inside span.label { + margin-right: 10px; +} + +#edd-order-resend-receipt .inside { + margin-top: 11px; +} + +.edd-order-resend-receipt-header { + font-size: 14px; + line-height: 1.4; +} + +.edd-admin-box-inside:last-child { + border-bottom: 0; +} + +#edd-edit-order-form .data-payment-key { + word-break: break-all; +} + +.edd-order-update-box #major-publishing-actions .button-secondary { + margin-right: 10px; +} + +.edd-order-update-box .button-primary { + margin-right: 0; +} + +.edd-edit-purchase-element .edd-select-chosen { + width: 196px; +} + +.edd-edit-purchase-element ul { + clear: both; + display: block; +} + +#edd-customer-details .actions { + float: right; +} + +.order-data-address h3 { + margin: 0 0 10px 0; +} + +.order-data-address #edd-order-address-state-wrap, +.order-data-address #edd-order-address-country-wrap { + display: inline-block; + width: 50%; + max-width: 300px; +} + +.edd-order-data input.small-text { + margin: 0; +} + +.edd-order-data input.med-text { + margin: 0; + width: 100px; +} + +.edd-edit-purchase-element ul li { + display: block; + line-height: 1.4; + position: relative; + margin: 0; + vertical-align: middle; + font-size: 13px; +} + +.edd-edit-purchase-element .row { + padding: 12px; +} + +.edd-edit-purchase-element .row:not(:last-child) { + border-bottom: 1px solid #eee; +} + +.edd-edit-purchase-element .row:nth-child(odd):not(.header) { + background-color: #f9f9f9; +} + +.edd-edit-purchase-element .row.header { + padding: 6px 12px; + font-weight: 600; + vertical-align: top; +} + +.edd-edit-purchase-element ul { + margin: 0 0 15px; +} + +.edd-edit-purchase-element ul:last-of-type { + margin-bottom: 0; +} + +#edd-order-data .data span { + color: #666; + font-weight: 600; +} + +.edd-edit-purchase-element .inside { + padding: 12px; +} + +.edd-edit-purchase-element .edd-purchased-download-title { + font-size: 14px; + font-weight: 500; +} + +.edd-edit-purchase-element .edd-purchased-download-title .deleted { + color: #777; +} + +.edd-edit-purchase-element .edd-purchased-download-actions { + color: #777; + line-height: 1.4; +} + +.edd-edit-purchase-element .edd-purchased-download-actions .edd-purchased-download-actions-label { + font-weight: 500; +} + +.edd-edit-purchase-element .edd-purchased-download-actions a { + color: #777; + font-size: 12px; +} + +.edd-edit-purchase-element .edd-purchased-download-actions a:hover { + color: #444; +} + +.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download { + color: #a00; +} + +.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download:hover { + color: #f00; +} + +.edd-add-download-to-purchase, +.edd-add-adjustment-to-purchase { + padding: 15px; + border-top: 1px solid #e5e5e5; + background-color: #f5f5f5; +} + +.edd-add-download-to-purchase .chosen-container, +.edd-add-adjustment-to-purchase .chosen-container { + width: 90% !important; + max-width: 220px !important; +} + +.edd-add-download-to-purchase .spinner, +.edd-add-adjustment-to-purchase .spinner { + margin: 0; + float: none; +} + +.edd-add-download-to-purchase .edd-add-order-quantity { + width: 40px; + height: 29px; + vertical-align: middle; +} + +.edd-add-download-to-purchase .edd-add-order-item-button, +.edd-add-adjustment-to-purchase .edd-add-adjustment-button, +.edd-add-adjustment-to-purchase input[type="text"] { + height: 29px; +} + +@media screen and (max-width: 1284px) { + + .edd-edit-purchase-element .edd-purchased-download-title { + font-size: 16px; + } + + .edd-edit-purchase-element ul li.item_price { + width: 22%; + } + + .edd-edit-purchase-element ul li.item_price.item_quantity { + width: 35%; + } + + .edd-edit-purchase-element ul li.item_tax { + width: 25%; + } + + .edd-edit-purchase-element ul li.price { + width: 20%; + } + + .edd-edit-purchase-element .edd-purchased-download-actions { + padding-top: 10px; + } +} + +@media screen and (max-width: 1024px) { + + .edd-edit-purchase-element ul li.item_price.item_quantity { + width: 40%; + } + + .edd-edit-purchase-element ul li.price { + width: 24%; + } + + .edd-edit-purchase-element .edd-purchased-download-actions { + padding-top: 15px; + } + + .edd-edit-purchase-element .edd-purchased-download-actions, + .edd-edit-purchase-element .edd-purchased-download-actions a { + font-size: 14px; + } + +} + +@media screen and (max-width: 782px) { + + .edd-edit-purchase-element ul li.item_price, + .edd-edit-purchase-element ul li.item_price.item_quantity { + padding-bottom: 10px; + } + + .edd-edit-purchase-element ul li.item_price.item_quantity { + width: 35%; + } + + .edd-edit-purchase-element ul li.item_tax, + .edd-edit-purchase-element ul li.price { + width: 20%; + padding-bottom: 10px; + } + + .edd-price-currency, + .edd-payment-details-download-amount { + font-size: 16px; + } + + .order-data-column input[type="email"] { + padding: 6px 10px; + } + + .edd-refund-submit-line-total td:last-of-type { + flex: 0 0 120px; + } + + #edd-item-tables-wrapper .addresses tbody tr { + display: grid; + } + + #edd-item-tables-wrapper .addresses tbody td:not(.no-items) { + padding-left: 35%; + } +} + +@media screen and (max-width: 600px) { + + .edd-edit-purchase-element ul li.item_price, + .edd-edit-purchase-element ul li.item_price.item_quantity, + .edd-edit-purchase-element ul li.item_tax { + width: 100%; + padding-bottom: 20px; + } + + .edd-edit-purchase-element ul li.price, + .edd-edit-purchase-element .edd-add-download-to-purchase ul li.item_tax { + width: 100%; + padding-bottom: 0; + } + + .edd-edit-purchase-element .edd-add-download-to-purchase-actions { + padding-top: 15px; + } +} + +/** Stats */ +#edd_product_stats .label { + display: inline-block; +} + +#edd_product_stats .product-sales-stats:before, +#edd_product_stats .product-earnings-stats:before { + color: #82878c; + font: normal 20px/1 'dashicons'; + display: inline-block; + padding: 0 2px 0 0; + position: relative; + top: 0; + left: -1px; + speak: none; + text-decoration: none !important; + vertical-align: top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +#edd_product_stats .product-sales-stats:before { + content: '\f174'; +} + +#edd_product_stats .product-earnings-stats:before { + content: '\f239'; +} + +/* Reports Styles +-------------------------------------------------------------- */ + +/* Force a scrollbar when on the reports page (https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6718) */ +body.download_page_edd-reports { + overflow-y: scroll; +} + +.edd-chip { + font-size: 10px; + font-weight: bold; + text-transform: uppercase; + line-height: 1; + padding: 3px; + border-radius: 3px; + color: #fff; + background-color: #444; +} + +/* Keeping this rule for Software Licensing Reports */ +.edd-reports-wrapper .postbox h2, +.edd-reports-wrapper .postbox h3 { + font-size: 1.3em +} + +#edd-dashboard-widgets-wrap .metabox-holder { + padding-top: 0; +} + +.edd-reports-wrapper .postbox .edd-select { + max-width: 200px; + vertical-align: baseline; + margin-right: 4px; + margin-bottom: 16px; +} + +.download_page_edd-reports #edd-item-wrapper { + margin: 0; +} + +#edd-dashboard-widgets-wrap .postbox h2, +#edd-dashboard-widgets-wrap .postbox h3 { + cursor: default; +} + +.edd-date-range-options .edd_datepicker { + width: 105px; +} + +.edd-report-wrap { + clear: both; +} + +.edd-report-wrap h3 { + clear: both; + margin: 0 0 20px; +} + +.edd-reports-chart, +.edd-reports-table { + margin-bottom: 20px; +} + +.edd-admin--has-grid { + display: grid; + display: -ms-grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + grid-gap: 20px; +} + +.edd-admin--has-grid .postbox { + margin-bottom: 0; +} + +.edd-admin--has-grid .edd-from-to-wrapper { + display: flex; + margin-bottom: 16px; + width: 100%; +} + +.edd-admin--has-grid .edd-from-to-wrapper input { + width: 100%; +} + +.edd-admin--has-grid .edd-from-to-wrapper span { + flex-grow: 1; +} + +.edd-admin--has-grid form { + display: flex; + flex-direction: column; + flex-wrap: wrap; + position: relative; +} + +fieldset.edd-to-and-from-container { + display: flex; + gap: 8px; + + select { + flex: 0 0 calc(50% - 6px); + } +} + +span.edd-to-and-from--separator { + line-height: normal; + align-self: center; + margin-bottom: 16px; +} + +.edd-admin--has-grid .postbox .edd-select { + max-width: 100%; + margin-right: 0; +} + +.edd-admin--has-grid .button.updating-message:before, +.edd-admin--has-grid .button.updated-message:before { + vertical-align: text-bottom; + margin: 0 5px 0 0; +} + +.edd-import-export-form .edd-progress { + background: #ddd; + border-radius: 15px; + height: 15px; + flex-basis: 100%; +} + +.edd-import-export-form .edd-progress div { + background: #ccc; + border-radius: 15px; + height: 100%; + width: 0; +} + +.edd-import-export-form .notice-wrap { + background-color: #f4f4f4; + border-style: solid; + border-width: 1px 0; + border-color: #eae9e9; + padding: 12px; + overflow: auto; + margin: 20px -12px -23px; + position: relative; + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; +} + +.notice-wrap div.notice { + margin: 0; +} + +h3 + .notice-wrap .notice { + margin-bottom: 1em; +} + +.admin-color-fresh .edd-import-export-form .edd-progress div { + background: #0073aa; +} + +.admin-color-light .edd-import-export-form .edd-progress div { + background: #888; +} + +.admin-color-blue .edd-import-export-form .edd-progress div { + background: #096484; +} + +.admin-color-coffee .edd-import-export-form .edd-progress div { + background: #c7a589; +} + +.admin-color-ectoplasm .edd-import-export-form .edd-progress div { + background: #a3b745; +} + +.admin-color-midnight .edd-import-export-form .edd-progress div { + background: #e14d43; +} + +.admin-color-sunrise .edd-import-export-form .edd-progress div { + background: #dd823b; +} + +.graph-option-section { + float: left; +} + +.edd-report-filters-title span { + display: block; + padding: 20px; +} + +#edd-graphs-filter form { + padding: 20px; +} + +#edd-graphs-filter label { + vertical-align: inherit; +} + +#edd-graphs-filter .graph-option-section { + display: inline-block; + line-height: 2em; + margin: 0 5px 0 0; + padding: 0; +} + +.download_page_edd-reports .section-content #post-body-content { + float: none; +} + +.download_page_edd-reports .section-content select[name="range"] { + display: none; +} + +.edd-mix-totals { + background-color: #fff; + border: 1px solid #e5e5e5; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); + padding: 10px; +} + +.edd-mix-chart { + display: inline-block; + width: 49%; + vertical-align: top; +} + +.edd-graph-notes { + color: #9c9c9c; +} + +.edd-graph-notes span { + display: block; +} + +.edd-pie-graph .legend { + display: none; +} + +.edd-pie-legend { + overflow: auto; + margin-top: 10px; +} + +.edd-legend-item-wrapper { + color: #333; + display: inline-block; + font-size: 8pt; + padding: 2px 5px 0px 5px; + width: 48%; + height: 20px; +} + +.edd-legend-color { + border: 1px solid #cfcfcf; + display: inline-block; + margin-right: 5px; + width: 20px; + height: 15px; +} + +.edd-pie-legend-item { + display: inline-block; + vertical-align: top; + width: 80%; +} + +#edd-reports-tiles-wrap .metabox-holder { + padding: 0; +} + +#edd-reports-tiles-wrap #dashboard-widgets { + overflow: auto; +} + +#edd-reports-tiles-wrap #dashboard-widgets .postbox-container { + width: 33.3%; +} + +/** Hide legacy report empty navigations */ +.download_page_edd-reports .section-content .tablenav.top { + display: none; +} + +#edd_tax_rates { + margin: 1em 0 0; +} + +[id*="edd-recapture-"].button { + font-size: 16px; + height: auto; + padding: 8px 14px; + margin: 6px 0 0; +} + +[id*="edd-recapture-"].button .dashicons { + line-height: 29px; + margin-right: 8px; +} + +[id*="edd-recapture-"].button .edd-loading, +[id*="edd-recapture-"].button .edd-loading:after { + border-radius: 50%; + display: inline-block; + width: 14px; + height: 14px; +} + +[id*="edd-recapture-"].button .edd-loading { + position: relative; + top: 3px; + margin-left: 4px; + box-shadow: 0 0 2px rgba(0, 0, 0, .2); +} + +[id*="edd-recapture-"].button .edd-loading { + -webkit-animation: edd-spinning 1.1s infinite linear; + animation: edd-spinning 1.1s infinite linear; + border-top: 2px solid rgba(255, 255, 255, 0.5); + border-right: 2px solid rgba(255, 255, 255, 0.5); + border-bottom: 2px solid rgba(255, 255, 255, 0.5); + border-left: 2px solid #fff; + font-size: 14px; + filter: alpha(opacity=0); + -ms-transform: translateZ(0); + transform: translateZ(0); +} + +#edd-recapture-disconnect.button .edd-loading.dark { + border-top-color: rgba(0, 0, 0, 0.2); + border-right-color: rgba(0, 0, 0, 0.2); + border-bottom-color: rgba(0, 0, 0, 0.2); + border-left-color: #666; + box-shadow: none; +} + +.recapture-notice { + position: relative; +} + +@-webkit-keyframes edd-spinning { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes edd-spinning { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +/* Upgrades page styles +-------------------------------------------------------------- */ + +/* Settings page styles +-------------------------------------------------------------- */ + +#edd-send-test-summary-save-changes-notice .notice p { + font-size: 13px; +} + +#edd-send-test-summary-save-changes-notice, #edd-send-test-summary-notice { + display: flex; + margin-top: 5px; +} + +/* Global Graph Styles +-------------------------------------------------------------- */ + +.edd-graph .y1Axis { + color: rgb(237, 194, 64) !important; +} + +.edd-graph .y2Axis { + color: rgb(175, 216, 248) !important; +} + +/* API Table Styles +-------------------------------------------------------------- */ + +.wp-list-table.apikeys input.code { + width: 100%; + font-size: 10px; + cursor: text; + background: #fff; + border: 1px solid #ddd; + box-shadow: none; + color: #555; +} + +/* List Table Styles +-------------------------------------------------------------- */ + +.download_page_edd-tools .tablenav .actions { + overflow: visible; +} + +.edd_user_search_wrap { + position: relative; + overflow: visible; +} + +.edd_user_search_wrap .spinner { + position: absolute; + margin: 0; + padding: 0; + right: 4px; + top: -2px; +} + +.edd_user_search_wrap.loading .spinner { + visibility: visible; +} + +.edd_user_search_results { + position: absolute; + left: 0; + top: 20px; +} + +.edd_user_search_results a.edd-ajax-user-cancel { + position: absolute; + right: 6px; + top: 2px; +} + +.edd_user_search_results ul { + background: #fafafa; + border: 1px solid #dfdfdf; + overflow-y: scroll; + padding: 0; + margin: 0; + height: 150px; + width: 185px; + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1); +} + +.edd_user_search_results li { + margin: 0; +} + +.edd_user_search_results li a { + display: block; + text-decoration: none; + padding: 6px 10px; +} + +.edd_user_search_results li a:hover { + background: #f5f5f5; +} + +.edd_user_search_results li.no-users { + text-align: center; + vertical-align: middle; + display: block; + line-height: 150px; + color: #bbb; + text-transform: uppercase; + font-size: 11px; +} + +@media screen and (max-width: 1100px) { + + .edd-mix-chart { + display: block; + width: 100%; + } +} + +@media screen and (max-width: 782px) { + + .license-lifetime-notice, + .license-expiration-date-notice, + .license-null { + padding-left: 0; + } +} + +@media screen and (max-width: 600px) { + #edd-edit-order-form input.large-text { + width: 100%; + } +} + +/* Customer Styles +-------------------------------------------------------------- */ + +#edd-item-wrapper { + background: #fff; + border: 1px solid $wp-border; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); + position: relative; + margin-top: 15px; + display: flex; +} + +#edd-item-wrapper.full-width { + max-width: 100%; +} + +#edd-item-wrapper:after { + content: ""; + display: block; + clear: both; + visibility: hidden; + font-size: 0; + height: 0; +} + +.edd-sections-wrap { + clear: both; + width: 100%; +} + +.edd-sections-wrap .section-wrap { + background-color: #fff; + display: inline-block; + z-index: 2; +} + +.js .edd-sections-wrap .edd-vertical-sections:not(.meta-box) .section-wrap>div { + min-height: 500px; + height: 100%; +} + +.edd-sections-wrap .section-wrap .customer-section:not(:last-child) { + border-bottom: 1px solid #eee; +} + +.edd-sections-wrap .section-wrap .customer-section table { + margin-bottom: 20px; +} + +.edd-sections-wrap .section-wrap { + border-left: 1px solid #e5e5e5; +} + +.edd-sections-wrap .section-wrap .section-content { + >* { + padding: 20px; + } + + h2 { + margin: 0; + padding-bottom: 0; + } +} + +.edd-sections-wrap .section-wrap .avatar-wrap { + float: left; + padding-right: 10px; + text-align: center; +} + +.edd-sections-wrap .section-wrap img.avatar { + border-radius: 5px; +} + +.edd-sections-wrap .section-wrap .customer-id { + position: absolute; + right: 0; + top: 0; + padding: 10px; + background-color: #fafafa; + border: 1px solid #eee; + border-bottom-left-radius: 20%; + border-top: none; + border-right: none; + font-family: monospace; + font-size: 18px; + font-weight: 600; +} + +.edd-item-info.customer-info input[type="text"], +.edd-item-info.customer-info input[type="password"], +.edd-item-info.customer-info select { + width: 200px; + height: auto; + box-shadow: none; + transition: none; + border: 1px solid #ddd; + margin: -5px 0 4px -2px; + font-size: 13px; + padding: 2px 4px; +} + +.edd-sections-wrap .section-wrap .customer-main-wrapper { + float: left; +} + +.edd-sections-wrap .section-wrap .customer-main-wrapper input[name="customerinfo[name]"] { + font-size: 24px; +} + +.edd-sections-wrap .section-wrap .customer-address-wrapper { + float: right; + margin-top: -3px; + margin-right: 50px; + width: 202px; +} + +.edd-sections-wrap .section-wrap .info-wrapper { + min-height: 125px; + overflow: visible; +} + +.edd-sections-wrap .section-wrap .customer-address span[data-key="address"], +.edd-sections-wrap .section-wrap .customer-address span[data-key="address2"], +.edd-sections-wrap .section-wrap .customer-address span[data-key="country"] { + display: block; +} + +.edd-sections-wrap .section-wrap a.delete { + color: #ff0000; + margin-right: 5px; + text-decoration: none; +} + +.customer-info { + min-height: 185px; +} + +.customer-info .customer-name { + font-size: 24px; + font-weight: 600; +} + +.customer-info .customer-name.editable { + margin-bottom: 6px; +} + +.customer-edit-link a { + font-weight: normal; + text-decoration: none; +} + +.disconnect-user a { + color: #aaa; + font-size: 20px; +} + +#customer-edit-actions { + padding: 3px; + line-height: 28px; + text-align: center; +} + +#customer-edit-actions .button-secondary { + margin-right: 5px; +} + +#customer-edit-actions .cancel { + padding: 5px; +} + +.edd-sections-wrap .section-wrap .row-title { + width: 30%; +} + +.edd-sections-wrap .section-wrap .editable { + display: block; + padding: 3px; +} + +.edd-sections-wrap .section-wrap div.edit-item { + margin-left: -4px; + margin-top: -20px; +} + +.edd-sections-wrap .section-wrap .customer-address.edit-item { + margin-top: 3px; +} + +.edd-sections-wrap .section-wrap span.edit-item { + display: none; +} + +.edd-sections-wrap .section-wrap .edit-item input { + font-size: 13px; +} + +.edd-sections-wrap .section-wrap .customer-name.edit-item input { + margin-top: -5px; +} + +.edd-sections-wrap .section-wrap .edd_user_search_results { + left: -2px; + top: 18px; +} + +.edd-sections-wrap .section-wrap .edd_user_search_results ul { + width: 198px; +} + +#edd-item-stats-wrapper { + margin: 0 auto; + text-align: center; +} + +#edd-item-stats-wrapper ul { + display: flex; + margin: 0; +} + +#edd-item-stats-wrapper li { + font-size: 14px; + margin-bottom: 0; + width: 50%; +} + +#edd-item-stats-wrapper a { + text-decoration: none; +} + +#edd-item-stats-wrapper .dashicons { + color: #888; + margin-top: -2px; +} + +#edd-item-tables-wrapper table { + width: 100%; +} + +#edd-item-tables-wrapper .no-items { + text-align: left; +} + +#edd-item-tables-wrapper .emails .add-customer-email-row { + background-color: #f4f4f4; + border-top: 1px solid #e5e5e5; +} + +#edd-item-tables-wrapper .add-customer-email-wrapper { + display: flex; + flex-wrap: wrap; + align-items: center; + margin: 12px 0; +} + +#edd-item-tables-wrapper .edd-form-group { + margin-bottom: 0; +} + +#edd-item-tables-wrapper .edd-make-email-primary { + flex-grow: 1; + margin-left: 12px; +} + +#edd-item-tables-wrapper .emails .spinner { + float: none; + margin: 0 10px; + align-self: center; +} + +#edd-item-tables-wrapper .notice-error { + background-color: #fff5f5; +} + +#edd-item-notes-wrapper { + min-height: 50px; +} + +.customer-note-input { + margin-bottom: 5px; + width: 100%; +} + +.customer-note-wrapper { + border-bottom: 1px solid #f9f9f9; + min-height: 38px; + padding: 7px 0 7px 7px; +} + +.customer-note-wrapper span { + display: block; +} + +.note-content-wrap { + padding-top: 7px; +} + +.edd-sections-wrap .section-wrap .notice-container { + padding-left: 20px; + padding-right: 20px; + margin-left: -20px; + margin-right: -20px; +} + +@media screen and (max-width: 810px) and (min-width: 656px) { + .customer-info .customer-name { + font-size: 16px; + } + + .edd-sections-wrap .section-wrap .widefat td, + .widefat th { + max-width: 100% !important; + display: table-cell; + } +} + +@media screen and (max-width: 781px) { + + #edd-item-tab-wrapper, + /** [1] */ + .edd-sections-wrap .section-wrap { + margin: 0; + width: 100%; + } + + #edd-item-tab-wrapper-list .dashicons { + /** [1] */ + font-size: 18px; + } + + .edd-item-has-tabs .edd-sections-wrap .section-wrap { + border-top: 1px solid #e5e5e5; + border-left: 0; + margin-top: -1px; + } +} + +@media screen and (max-width: 656px) { + .edd-item-info.customer-info { + position: relative; + } + + .edd-sections-wrap .section-wrap .customer-address-wrapper { + float: none; + position: absolute; + top: 84px; + left: 165px; + max-width: 200px; + } + + .edd-sections-wrap .section-wrap .customer-main-wrapper { + float: none; + position: absolute; + left: 165px; + } + + .customer-info .customer-name { + font-size: 16px; + } + + .edd-sections-wrap .section-wrap #edd-item-stats-wrapper { + padding-left: 0; + padding-right: 0; + } + + .edd-sections-wrap .section-wrap .customer-section { + margin-bottom: 0; + } + + .edd-sections-wrap .section-wrap .widefat td.no-items, + .edd-sections-wrap .section-wrap .widefat td.column-primary, + .edd-sections-wrap .section-wrap .widefat th.column-primary { + width: 100px !important; + display: table-cell; + overflow: hidden; + text-align: left; + } + + .edd-sections-wrap .section-wrap .customer-id { + display: none; + } + + #edd-item-tables-wrapper .emails td.column-primary { + padding-right: 10px; + width: 100% !important; + } + + #edd-item-tables-wrapper .edd-form-group { + margin: 0 0 16px 0; + } +} + +@media screen and (max-width: 480px) { + #edd-item-tab-wrapper-list li { + width: 50%; + } + + #edd-item-tab-wrapper-list li:nth-child(3n+3) { + border-width: 0 1px 1px 0; + } + + #edd-item-tab-wrapper-list li:nth-child(even) { + border-width: 0 0 1px 0; + } + + .download_page_edd-reports .button { + text-align: center; + } + + #edd-payment-date-filters span { + display: block; + } + + #edd-payment-date-filters span>input { + float: right; + } + + #edd-add-discount select[multiple] option, + #edd-edit-discount select[multiple] option { + height: 20px; + } + + .download_page_edd-tools .inside input[type="text"], + .download_page_edd-tools .inside select, + .download_page_edd-tools .inside input[type="submit"], + .download_page_edd-settings .inside input[type="button"], + .download_page_edd-reports .inside input[type="text"], + .download_page_edd-reports .inside select, + .download_page_edd-reports .inside input[type="submit"], + .download_page_edd-reports .inside .button { + width: 100%; + } + + #edd-add-discount select[multiple], + #edd-edit-discount select[multiple], + .download_page_edd-tools select[multiple] { + height: 200px !important; + } + + .download_page_edd-settings input[type="checkbox"] { + margin: 2px 0; + } + + .post-type-download input[type="checkbox"] { + margin-left: 2px; + } + +} + +/* System Info page styles +-------------------------------------------------------------- */ + +.inside .edd-tools-textarea { + background: #32373c; + color: rgba(240, 245, 250, 0.7); + font-size: 12px; + font-family: Menlo, Monaco, monospace; + display: block; + overflow: auto; + white-space: pre; + width: 100%; + height: 450px; + padding: 10px; + outline: none; +} + +#system-info-textarea::selection { + background: #555; + color: #fff; +} + +#edd-system-info .edd-inline-button { + margin-left: 5px; +} + +/* Tools Styles +-------------------------------------------------------------- */ + +.recount-stats-controls form { + display: inline; +} + +.edd-recount-stats-descriptions span { + display: none; + line-height: 24px; +} + +#edd-debug-log .edd-inline-button { + margin-left: 5px; +} + +/* Tools Styles +-------------------------------------------------------------- */ + +.edd-vertical-sections { + overflow: visible; + display: block; + display: flex; +} + +#edd-item-tab-wrapper, +/** [1] */ +.edd-vertical-sections .section-nav { + position: relative; + width: 20%; + line-height: 1em; + margin: 0 -1px 0 0; + padding: 0; + background-color: #f5f5f5; + border-right: 1px solid #e5e5e5; + box-sizing: border-box; + max-width: 200px; +} + +#edd-item-tab-wrapper-list { + /** [1] */ + margin: 0; +} + +#edd-item-tab-wrapper li, +/** [1] */ +.edd-vertical-sections .section-nav li { + display: block; + position: relative; + margin: 0; + padding: 0; + background-color: #fcfcfc; +} + +.edd-vertical-sections .section-title:last-of-type { + margin-bottom: 24px; +} + +#edd-item-tab-wrapper li a, +/** [1] */ +#edd-item-tab-wrapper li>.edd-item-tab-label-wrap, +/** [1] */ +.edd-vertical-sections .section-nav li a { + display: flex; + margin: 0; + padding: 9px; + text-decoration: none; + border-bottom: 1px solid #e5e5e5; + box-shadow: none; + position: relative; + align-items: center; +} + +#edd-item-tab-wrapper li a:focus, +#edd-item-tab-wrapper li a:hover, +.edd-vertical-sections .section-nav li a:hover, +.edd-vertical-sections .section-nav li a:focus { + box-shadow: inset 5px 0; + outline: 0; + transition: all .25s; +} + +.edd-vertical-sections .section-nav .section-title--is-active a:after { + content: ''; + width: 1px; + height: 100%; + background: #fff; + position: absolute; + right: 0; + top: 0; + bottom: 0; + z-index: 3; +} + +#edd-item-tab-wrapper li>.edd-item-tab-label-wrap { + /** [1] */ + background-color: #fff; +} + +.edd-vertical-sections .section-nav li a>.dashicons, +.edd-vertical-sections .section-nav li a>span { + display: inline-block; +} + +.edd-vertical-sections .section-nav li a>span { + max-width: 76%; +} + +.edd-vertical-sections .section-nav li a .dashicons { + line-height: 20px; + margin-right: 3px; + color: #888; +} + +.edd-vertical-sections .section-nav .section-title--is-active a { + font-weight: bold; + color: #555; + background-color: #fff; + border-right: none; + margin-right: -1px; +} + +.edd-vertical-sections.use-js .section-content, +.no-js .edd-vertical-sections.use-js .section-nav, +.no-js .edd-vertical-sections.use-js.edd-item-header-small { + display: none; +} + +.no-js .edd-vertical-sections.use-js .section-content { + display: block; +} + +/* Fresh */ +.admin-color-fresh .edd-vertical-sections .section-nav li a:hover, +.admin-color-fresh .edd-vertical-sections .section-nav li a:focus, +.admin-color-fresh .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #0073aa; +} + +/* Blue */ +.admin-color-blue .edd-vertical-sections .section-nav li a:hover, +.admin-color-blue .edd-vertical-sections .section-nav li a:focus, +.admin-color-blue .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #096484; +} + +/* Coffee */ +.admin-color-coffee .edd-vertical-sections .section-nav li a:hover, +.admin-color-coffee .edd-vertical-sections .section-nav li a:focus, +.admin-color-coffee .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #c7a589; +} + +/* Ectoplasm */ +.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:hover, +.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:focus, +.admin-color-ectoplasm .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #a3b745; +} + +/* Midnight */ +.admin-color-midnight .edd-vertical-sections .section-nav li a:hover, +.admin-color-midnight .edd-vertical-sections .section-nav li a:focus, +.admin-color-midnight .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #e14d43; +} + +/* Ocean */ +.admin-color-ocean .edd-vertical-sections .section-nav li a:hover, +.admin-color-ocean .edd-vertical-sections .section-nav li a:focus, +.admin-color-ocean .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #627c83; +} + +/* Sunrise */ +.admin-color-sunrise .edd-vertical-sections .section-nav li a:hover, +.admin-color-sunrise .edd-vertical-sections .section-nav li a:focus, +.admin-color-sunrise .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #be3631; +} + +/* Light */ +.admin-color-light .edd-vertical-sections .section-nav li a:hover, +.admin-color-light .edd-vertical-sections .section-nav li a:focus, +.admin-color-light .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #888; +} + +/* bbPress Color Schemes */ + +/* Evergreen */ +.admin-color-evergreen .edd-vertical-sections .section-nav li a:hover, +.admin-color-evergreen .edd-vertical-sections .section-nav li a:focus, +.admin-color-evergreen .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #36533f; +} + +/* Mint */ +.admin-color-mint .edd-vertical-sections .section-nav li a:hover, +.admin-color-mint .edd-vertical-sections .section-nav li a:focus, +.admin-color-mint .edd-vertical-sections .section-nav .section-title--is-active a { + box-shadow: inset 5px 0 #4f6d59; +} + +.edd-vertical-sections .section-nav .section-title--is-active .dashicons { + color: #555; +} + +@media only screen and (max-width: 782px) { + + #edd-item-tab-wrapper, + /** [1] */ + .edd-vertical-sections .section-nav { + width: 48px; + } + + .edd-vertical-sections .section-nav li a { + justify-content: center; + } + + .edd-vertical-sections .section-nav li a .dashicons { + width: 24px; + height: 24px; + font-size: 24px; + line-height: 24px; + margin: 0; + } + + .section-nav li .dashicons::before { + width: 24px; + height: 24px; + } + + #edd-item-tab-wrapper .edd-item-tab-label, + /** [1] */ + .section-nav li .label { + overflow: hidden; + position: absolute; + top: -1000em; + left: -1000em; + width: 1px; + height: 1px; + } +} + +/* Content wrapper */ + +#edd-item-card-wrapper, +/** [1] */ +.edd-vertical-sections .section-wrap { + width: 80%; +} + +#edd-item-card-wrapper .item-section { + /** [1] */ + background: #fff; + overflow: hidden; + box-sizing: border-box; +} + +*:not(#edd-item-tab-wrapper)+#edd-item-card-wrapper .item-section { + /** [1] */ + margin: 25px 0; + padding: 20px; + border: 1px solid #e5e5e5; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); +} + +#edd-item-tab-wrapper+#edd-item-card-wrapper { + /** [1] */ + padding: 20px; + border-left: 1px solid #e5e5e5; + box-sizing: border-box; +} + +@media only screen and (min-width: 1200px) { + + #edd-item-card-wrapper, + /** [1] */ + #edd-graphs-filter, + .edd-vertical-sections:not(.meta-box) .section-wrap { + width: calc(100% - 200px); + } +} + +@media only screen and (max-width: 782px) { + + #edd-item-card-wrapper, + /** [1] */ + #edd-graphs-filter, + .edd-vertical-sections .section-wrap { + width: calc(100% - 48px); + } +} + +#edd-debug-log .edd-inline-button { + margin-left: 5px; +} + +/* Promotional element styles +-------------------------------------------------------------- */ + +/* Settings sidebar */ +.edd-settings-sidebar { + padding-top: 27px; +} + +.edd-settings-sidebar-content { + background-color: #fff; + text-align: center; + border: 1px solid #ddd; + box-sizing: border-box; + max-width: 300px; +} + +.edd-settings-sidebar-content p { + font-size: 14px; + line-height: 1.5; + margin-top: 0; +} + +/* Settings sidebar header section */ +.edd-sidebar-header-section { + background-color: #35495c; + line-height: 1; + padding: 26px 20px 24px; + border-bottom: 3px dashed #fafafa; +} + +/* Settings sidebar description section */ +.edd-sidebar-description-section { + background-color: #fafafa; + padding: 16px 20px; + border-bottom: 1px solid #ddd; +} + +.edd-sidebar-description-section .edd-sidebar-description { + margin: 0; +} + +/* Settings sidebar coupon section */ +.edd-sidebar-coupon-section { + font-size: 14px; + padding: 16px 20px; +} + +.edd-sidebar-coupon-section label { + display: block; + line-height: 1.4; + margin-bottom: 6px; +} + +.edd-sidebar-coupon-section label strong { + color: #253b51; + font-weight: 700; +} + +.edd-sidebar-coupon-section input { + background: #f4f7fa; + font-size: 22px; + font-weight: 600; + text-align: center; + padding: 10px; + border: 2px dashed #2794da; + border-radius: 4px; + margin-bottom: 16px; + box-shadow: none; + width: 100%; +} + +.edd-sidebar-coupon-section input:focus { + border: 2px dashed #2794da; + box-shadow: none; +} + +.edd-settings-sidebar-content .edd-coupon-note { + color: #6c7883; + font-size: 13px; + font-style: italic; + margin: 0; +} + +.edd-settings-sidebar-content .edd-coupon-note a { + color: #253b51; +} + +.edd-settings-sidebar-content .edd-coupon-note a:hover { + text-decoration: none; +} + +/* Settings sidebar footer section */ +.edd-sidebar-footer-section { + background-color: #fafafa; + padding: 16px 20px; + border-top: 1px solid #ddd; +} + +.edd-sidebar-footer-section .edd-cta-button { + display: block; + background-color: #2794da; + color: #fff; + text-decoration: none; + font-size: 20px; + font-weight: 700; + text-transform: uppercase; + padding: 17px 10px; + border: none; + border-radius: 4px; + width: 100%; + box-sizing: border-box; + box-shadow: none; + transition: background-color .2s; +} + +.edd-sidebar-footer-section .edd-cta-button:hover { + background-color: #2386c5; +} + +/* Settings sidebar responsive behavior */ +@media all and (min-width: 1080px) { + + .edd-has-sidebar .edd-settings-content { + float: left; + width: 67%; + } + + .edd-has-sidebar .edd-settings-sidebar { + float: right; + width: 31%; + } +} + +@media all and (min-width: 1240px) { + + .edd-has-sidebar .edd-settings-content { + width: 74%; + } + + .edd-has-sidebar .edd-settings-sidebar { + width: 23%; + } +} + +/* Settings - Move sidebar below content only on Taxes tab */ +.taxes-tab .edd-has-sidebar .edd-settings-content, +.taxes-tab .edd-has-sidebar .edd-settings-sidebar { + float: none; + width: 100%; +} + +/* Extensions (add-ons) page promotional element */ +.bfcm-promo-img-container { + background-color: #35495c; + width: 100%; + height: 160px; +} + +.bfcm-code { + color: #2794da; + font-weight: 700; +} + +.sale-ends { + position: absolute; + bottom: 9px; + right: 14px; + display: inline-block; + color: #6c7883; + font-size: 12px; + text-align: right; + font-style: italic; + width: 150px; +} diff --git a/assets/css/admin/tax-rates/_add.scss b/assets/css/admin/tax-rates/_add.scss new file mode 100644 index 00000000000..c3d334c2a97 --- /dev/null +++ b/assets/css/admin/tax-rates/_add.scss @@ -0,0 +1,34 @@ + +.edd-tax-rate-table-add { + th select, + th input[type="text"], + th input[type="number"] { + width: 100%; + margin: 0; + padding: 4px; + } + + #tax_rate_region_global { + margin-right: 4px; + margin-bottom: 8px; + } + + + @media screen and (max-width: $break-medium) { + display: block; + + th { + display: block; + } + + .screen-reader-text { + display: block; + width: unset; + clip: unset; + height: unset; + clip-path: unset; + margin: 0 0 12px; + position: relative; + } + } +} diff --git a/assets/css/admin/tax-rates/_base.scss b/assets/css/admin/tax-rates/_base.scss new file mode 100644 index 00000000000..1f8ff17bb20 --- /dev/null +++ b/assets/css/admin/tax-rates/_base.scss @@ -0,0 +1,110 @@ + +#edd-admin-tax-rates { + margin: 1em 0 0; + + table { + border-collapse: collapse; + } + + .tablenav.top { + display: flex; + justify-content: space-between; + } + + .edd-admin-tax-rates__tablenav--left { + display: inline-flex; + } + + th:not(.check-column) { + padding: 15px 10px; + width: unset; + } + + .chosen-container { + width: 100% !important; + } + + tbody tr:not(:last-of-type) { + border-bottom: 1px solid $gray-200; + } + + tfoot.add-new th { + font-weight: normal; + padding: 12px 8px 10px 8px; + } + + /** + * [1] Due to the inability to reset the child views the "empty" view + * can only be appended to the parent. This means duplicates may be added. + * + * This can be removed once changes are immediately reflected with Backbone.sync() + */ + .edd-tax-rate-row--is-empty + .edd-tax-rate-row--is-empty, /* [1] */ + .edd-tax-rate-row--inactive { + display: none; + } + + .has-inactive .edd-tax-rate-row--inactive { + display: table-row; + } + + .edd-tax-rate-row--is-empty td { + background-color: $wp-alternate; + } + + .edd-tax-rate-row--inactive td { + color: $wp-inactive; + background-color: $wp-alternate; + } + + .edd-tax-rate-table-add { + background-color: $wp-alternate; + } + + @media screen and (max-width: 782px) { + thead th:not(.edd-tax-rates-table-rate), + tfoot:not(.add-new) th:not(.edd-tax-rates-table-rate) { + display: none; + } + + thead tr, + tfoot:not(.add-new) tr, + .edd-tax-rate-row { + display: grid; + grid-template-columns: 2.5em 1fr; + grid-template-rows: 1fr; + grid-gap: 0 16px; + } + + th.edd-tax-rates-table-rate { + padding-left: 12px; + } + + .edd-tax-rates-table-checkbox { + grid-row: 1 / 5; + } + + tbody td { + padding-left: 35% !important; + } + + td:before { + content: attr(data-colname); + display: block; + width: 32%; + position: absolute; + } + + .tablenav.top { + flex-wrap: wrap; + } + + .edd-admin-tax-rates__tablenav--left { + margin-bottom: 16px; + } + + .edd-admin-tax-rates__tablenav--left select { + margin-right: 6px; + } + } +} diff --git a/assets/css/admin/tax-rates/style.scss b/assets/css/admin/tax-rates/style.scss new file mode 100644 index 00000000000..d0191f97ec0 --- /dev/null +++ b/assets/css/admin/tax-rates/style.scss @@ -0,0 +1,9 @@ +@import "~@wordpress/base-styles/colors"; +@import "~@wordpress/base-styles/variables"; +@import "~@wordpress/base-styles/mixins"; +@import "~@wordpress/base-styles/breakpoints"; +@import "~@wordpress/base-styles/animations"; +@import "../../variables/colors"; + +@import "base"; +@import "add"; diff --git a/assets/css/admin/upgrades/_v3.scss b/assets/css/admin/upgrades/_v3.scss new file mode 100644 index 00000000000..93538691ea2 --- /dev/null +++ b/assets/css/admin/upgrades/_v3.scss @@ -0,0 +1,22 @@ +#edd-migration-progress { + .dashicons-minus { + color: $gray-600; + } + .dashicons-yes { + color: green; + } + .dashicons-update:before { + animation: rotation 2s infinite linear; + display: block; + } +} + +#edd-v3-migration-remove-legacy-data-submit-wrap { + display: flex; + align-items: center; + gap: 6px; + + .button { + margin: 0; + } +} diff --git a/assets/css/chosen-rtl.min.css b/assets/css/chosen-rtl.min.css new file mode 100644 index 00000000000..506a4636f61 --- /dev/null +++ b/assets/css/chosen-rtl.min.css @@ -0,0 +1,11 @@ +/*! +Chosen, a Select Box Enhancer for jQuery and Prototype +by Patrick Filler for Harvest, http://getharvest.com + +Version 1.8.5 +Full source at https://github.com/harvesthq/chosen +Copyright (c) 2011-2018 Harvest http://getharvest.com + +MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md +This file is generated by `grunt build`, do not edit it by hand. +*/.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);display:none}.chosen-container.chosen-with-drop .chosen-drop{display:block}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-left:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-right:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 8px 0 0;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-single input[type=text]{cursor:pointer;opacity:0;position:absolute;width:0}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-left:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-left:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;left:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;left:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 5px 4px 20px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 0 -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;opacity:0;pointer-events:none}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 0 4px 4px;padding:0 4px 0 0;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-right:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:right;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 5px 3px 20px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;left:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-left:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}} \ No newline at end of file diff --git a/assets/css/chosen.min.css b/assets/css/chosen.min.css new file mode 100644 index 00000000000..fb044bf2d7f --- /dev/null +++ b/assets/css/chosen.min.css @@ -0,0 +1,8 @@ +/*! +Chosen, a Select Box Enhancer for jQuery and Prototype +Version 2.1.0 +Full source at https://github.com/jjj/chosen +Copyright (c) 2011-2020 JJJ +MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md +This file is generated by `grunt build`, do not edit it by hand. +*/.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1011;width:100%;border:1px solid #aaa;border-top:0;border-radius:0 0 4px 4px;background:#fff;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%);margin-top:-1px;background-clip:padding-box}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;-webkit-clip-path:none;clip-path:none}.chosen-container.chosen-dropup .chosen-choices,.chosen-container.chosen-dropup .chosen-single{z-index:1010}.chosen-container.chosen-dropup .chosen-drop{top:auto;bottom:100%;border:solid #aaa;border-width:1px 1px 0 1px;border-radius:4px 4px 0 0}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container .search-choice-close{position:absolute;right:3px;top:0;bottom:0;margin:auto;border:none;cursor:pointer;display:block;width:15px;height:15px;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 0 top 50%;background-size:15px 15px}.chosen-container .search-choice-close:active,.chosen-container .search-choice-close:hover{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 0 top 50%;background-size:15px 15px}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:2.5px 0 2.5px 7px;border:1px solid #aaa;border-radius:4px;background-color:#fff;background-clip:padding-box;color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span,.chosen-container-single .chosen-single-with-deselect.chosen-default span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:42px}.chosen-container-single .chosen-single .search-choice-close{right:26px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 5px top 52%;background-size:15px 15px}.chosen-container-single .chosen-search{position:relative;z-index:1011;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:0;padding:5px 20px 5px 5px;width:100%;height:auto;outline:0;border:1px solid #ccc;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 5px top 50%;background-size:15px 15px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:4px}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container-single.chosen-container-single-nosearch.chosen-dropup .chosen-results{padding-top:4px}.chosen-container-single.chosen-container-single-nosearch.chosen-dropup .chosen-single{z-index:1010}.chosen-container-single .chosen-drop .result-selected{background-color:#eee}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none;border-radius:4px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 3px;width:100%;height:auto;border-radius:4px;border:1px solid #aaa;background-color:#fff;cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:0 3px;padding:6.5px 0;outline:0;border:none;background:0 0;-webkit-box-shadow:none;box-shadow:none;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:4px 20px 4px 5px;border:1px solid #aaa;border-radius:3px;max-width:100%;background-color:#eee;color:#333;line-height:12px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{font-size:95%;word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-multi.chosen-dropup .chosen-results{padding-top:4px}.chosen-container-multi.chosen-dropup .chosen-single{z-index:1010}.chosen-container-active .chosen-single{outline:#00f}.chosen-container-active.chosen-with-drop .chosen-choices,.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0}.chosen-container-active.chosen-with-drop .chosen-single div b{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 5px top 52%;background-size:15px 15px}.chosen-container-active.chosen-with-drop.chosen-dropup .chosen-choices,.chosen-container-active.chosen-with-drop.chosen-dropup .chosen-single{border-radius:0 0 4px 4px}.chosen-container-active .chosen-choices{border:1px solid #5897fb}.chosen-disabled{opacity:.5;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{padding:2px 7px 2px 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:42px}.chosen-rtl .chosen-single div{right:auto;left:0}.chosen-rtl .chosen-single .search-choice-close{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 0 3px 5px;padding:3px 5px 3px 20px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:3px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl .chosen-search input[type=text]{padding:5px 5px 5px 20px;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat left 5px top 55%;background-size:15px 15px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat left 5px top 52%;background-size:15px 15px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat left 5px top 52%;background-size:15px 15px} \ No newline at end of file diff --git a/assets/css/components/admin-nav.scss b/assets/css/components/admin-nav.scss new file mode 100644 index 00000000000..dfa6a80c960 --- /dev/null +++ b/assets/css/components/admin-nav.scss @@ -0,0 +1,73 @@ +.edd-nav { + &__wrapper { + background-color: $white; + box-shadow: inset 0 -3px $edd-very-light-gray; + display: flex; + justify-content: space-between; + align-items: center; + margin: 0 0 10px -20px; + padding: 0 20px; + position: sticky; + top: 32px; + z-index: 30; + + @media screen and (max-width: $break-medium) { + top: auto; + position: relative; + justify-content: center; + flex-wrap: wrap; + + .subtitle { + padding: 18px 12px; + } + } + } + + &__tabs { + display: flex; + flex-direction: row; + justify-content: left; + flex-wrap: wrap; + margin: 0; + gap: 8px; + + @media screen and (max-width: $break-medium) { + justify-content: center; + } + + li { + display: flex; + align-items: flex-end; + margin: 0; + + &:hover, + &:focus { + box-shadow: inset 0 -3px $wp-gray-20; + } + + &.active { + color: $edd-notice-blue; + box-shadow: inset 0 -3px $edd-notice-blue; + } + } + + a.tab { + border-bottom: none; + box-shadow: none; + outline: none; + display: block; + text-decoration: none; + color: $wp-gray-50; + padding: 18px 20px; + font-weight: 600; + font-size: 16px; + text-align: center; + white-space: nowrap; + } + } +} + +.edd-admin-page #wpbody-content > .notice:not(.inline) { + display: none; + margin-left: 0; +} diff --git a/assets/css/components/editor-header.scss b/assets/css/components/editor-header.scss new file mode 100644 index 00000000000..80f5ec08d47 --- /dev/null +++ b/assets/css/components/editor-header.scss @@ -0,0 +1,61 @@ +.edd-editor__header { + height: auto; + border-bottom: 1px solid #e2e4e7; + z-index: 30; + position: sticky; + top: 32px; + margin-left: -20px; + background: $white; + + @media screen and (max-width: $break-medium) { + top: 0; + } + + p.submit { + margin: 0; + padding: 0; + } +} + +.edd-editor__header--actions { + padding: 4px 20px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.edd-editor__title, +.edd-editor__actions { + display: flex; + gap: .5em; + align-items: center; +} + +.edd-editor__actions--test { + display: flex; + gap: .5em; + + @media screen and (max-width: $break-medium) { + .edd-editor__header & { + display: none; + } + } +} + +.edd-editor__status { + display: flex; + gap: .5em; + padding-right: .5em; + + .edd-help-tip { + display: block; + cursor: unset; + margin: 0; + } +} + +@media screen and (max-width: $break-medium) { + .button.edd-back { + display: none !important; + } +} diff --git a/assets/css/components/toggle-button.scss b/assets/css/components/toggle-button.scss new file mode 100644 index 00000000000..bfd7005c740 --- /dev/null +++ b/assets/css/components/toggle-button.scss @@ -0,0 +1,70 @@ +button.edd-button__toggle { + position: relative; + margin: 0; + padding: 0; + width: 36px; + height: 20px; + min-height: unset; + background-color: $wp-border; + transition: background 0.2s ease; + border-radius: 30px; + box-shadow: none; + border: none; + + &:after { + position: absolute; + content: ""; + height: 14px; + width: 14px; + left: 3px; + bottom: 3px; + background-color: $white; + transition: 0.1s transform ease; + border-radius: 50%; + } + + &.edd-button-toggle--active:after { + transform: translateX(16px); + } + + &:active, + &:focus { + outline: 0; + box-shadow: 0 0 0 1px $white, 0 0 0 3px $wp-input-border; + } + + &:hover { + background-color: $wp-input-border; + } + + &:disabled { + opacity: .5; + } + + &.edd-updating { + background-color: $wp-input-border !important; // remove important when enabling buttons + + &:before { + position: absolute; + top: 3px; + @include edd-spinner( + 10px, + $wp-input-border, + $wp-alternate + ); + } + + &:after { + display: none; + } + } + + &.edd-button-toggle--active { + background-color: var(--wp-admin-theme-color) !important; // remove important when enabling buttons + + :active, + :focus { + box-shadow: 0 0 0 1px $white, 0 0 0 3px var(--wp-admin-theme-color); + } + } +} diff --git a/assets/css/components/toggle-checkbox.scss b/assets/css/components/toggle-checkbox.scss new file mode 100644 index 00000000000..7f1d2ec4b6a --- /dev/null +++ b/assets/css/components/toggle-checkbox.scss @@ -0,0 +1,80 @@ +.edd-toggle { + position: relative; + display: flex; + gap: 5px; + overflow: visible; + align-items: center; + + input[type="checkbox"] { + position: relative; + margin: 0; + padding: 0; + width: 42px; + min-width: 42px; + height: 24px; + background-color: #ccc; + transition: background 0.2s ease; + border-radius: 34px; + box-shadow: none; + border: none; + } + + .label { + white-space: nowrap; + } + + input[type="checkbox"]:before { + position: absolute; + content: ""; + height: 18px; + width: 18px; + left: 3px; + bottom: 3px; + background-color: white; + transition: 0.1s transform ease; + border-radius: 50%; + } + + @media only screen and (max-width: $break-medium) { + input[type="checkbox"]:checked:before { + margin: -.1875rem 0 0 -.25rem; + } + } + + input[type="checkbox"]:checked { + background-color: #007cba; + background-color: var( --wp-admin-theme-color ); + } + + input[type="checkbox"]:active, + input[type="checkbox"]:focus { + outline: 0; + box-shadow: 0 0 0 1px #fff, 0 0 0 3px #7e8993; + } + + input[type="checkbox"]:checked:active, + input[type="checkbox"]:checked:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px #007cba; + box-shadow: 0 0 0 1px #fff, 0 0 0 3px var( --wp-admin-theme-color ); + } + + input[type="checkbox"]:checked:before { + transform: translateX(22px); + } + + input[type="checkbox"]:disabled { + opacity: 0.5; + } + + &.inverse { + & input[type="checkbox"] { + background-color: #007cba; + background-color: var( --wp-admin-theme-color ); + transform: scaleX(-1); + + &:checked { + background-color: #ccc; + } + } + } +} diff --git a/assets/css/edd-admin-chosen-rtl.min.css b/assets/css/edd-admin-chosen-rtl.min.css new file mode 100644 index 00000000000..891e0303790 --- /dev/null +++ b/assets/css/edd-admin-chosen-rtl.min.css @@ -0,0 +1 @@ +.chosen-container{font-size:14px}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border-radius:0 0 4px 4px;border-width:0 1px;border-color:transparent;background:#fff;outline:2px solid transparent}.chosen-container .spinner{margin:0;position:absolute;top:4px;left:30px}.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-multi .search-field,.chosen-container-single .chosen-single{background:#fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat left 5px top 55%;background-size:16px 16px;border:1px solid #7e8993;box-shadow:0 0 0 transparent;color:#32373c}.chosen-container-multi .chosen-choices,.chosen-container-single .chosen-single{border-radius:4px;border-color:#7e8993}.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-multi.chosen-with-drop .chosen-choices{box-shadow:0 1px 1px rgba(0,0,0,.04)}.chosen-container-multi.chosen-container-active.chosen-dropup .chosen-choices,.chosen-container-single.chosen-container-active.chosen-with-drop.chosen-dropup .chosen-single{border-radius:0 0 4px 4px;border-width:0 1px;z-index:1011}.chosen-container-single .chosen-single div b{background-image:none}.chosen-container-single .chosen-search:after{display:block;position:absolute;left:6px;top:50%;font-family:dashicons;font-size:17px;content:"";transform:translateY(-50%)}.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single{border-radius:4px 4px 0 0}.chosen-container-single .chosen-single div{width:26px}.chosen-container-single .chosen-default{color:#32373c}.chosen-container-active .chosen-single{border-color:transparent;outline:2px solid transparent}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 5px 4px 20px;width:100%!important;height:auto;outline:0;border:1px solid #7e8993;border-radius:4px;line-height:normal;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-single .chosen-single{min-height:30px}@media screen and (max-width:782px){.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-single .chosen-single{font-size:16px;line-height:1.625;min-height:40px;padding:5px 8px}}.chosen-container-multi .search-field{border:none}.chosen-container-multi.chosen-with-drop .chosen-choices{border-bottom-color:transparent}.chosen-container-multi .chosen-choices li.search-field{min-width:100px!important;width:100%}.chosen-container-multi .chosen-choices li.search-field input[type=text]{color:#32373c;font-family:unset;height:unset;margin:0;padding:3px 10px 3px 24px;width:100%!important}.chosen-container-multi .chosen-choices li.search-choice{margin:3px 0 3px 5px;padding:5px 5px 5px 22px;border:1px solid #7e8993;max-width:100%;border-radius:4px;background:#f4f4f4;box-shadow:none;color:#32373c;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;left:3px;display:block;width:15px;height:15px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{height:15px;width:15px;position:absolute;top:0;left:0;color:#32373c;font-family:dashicons;content:"";font-size:15px;line-height:1}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover:before{color:#537994}.chosen-container .chosen-results{color:#537994;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 0 4px 4px;padding:0 4px 0 0;max-height:240px}.chosen-container .chosen-results li.highlighted{background-image:none;border-radius:4px;color:#fff}:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}:root body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}:root body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}:root body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}:root body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}:root body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}:root body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}:root body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}:root body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}:root body.admin-color-evergreen{--wp-admin-theme-color:#36533f;--wp-admin-theme-color-darker-10:#2c4433;--wp-admin-theme-color-darker-20:#223428}:root body.admin-color-mint{--wp-admin-theme-color:#4f6d59;--wp-admin-theme-color-darker-10:#445e4d;--wp-admin-theme-color-darker-20:#3a4f41}.chosen-container.chosen-container-active .chosen-choices,.chosen-container.chosen-container-active .chosen-single,.chosen-with-drop.chosen-dropup .chosen-drop{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.chosen-container-active.chosen-dropup .chosen-choices,.chosen-container .chosen-drop,.chosen-with-drop.chosen-dropup .chosen-single{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 1px 0 1px #007cba;box-shadow:0 1px 0 1px var(--wp-admin-theme-color)}.chosen-container .chosen-results li.highlighted{background-color:#007cba;background-color:var(--wp-admin-theme-color)}.edd-select-chosen{width:100%;max-width:300px}.edd-select-chosen.edd-customer-select{width:100%!important}.edd-select-chosen.edd-time{width:55px;max-width:55px}@media screen and (max-width:782px){.edd-select-chosen.edd-time{width:70px;max-width:70px}} \ No newline at end of file diff --git a/assets/css/edd-admin-chosen.min.css b/assets/css/edd-admin-chosen.min.css new file mode 100644 index 00000000000..421f51492e6 --- /dev/null +++ b/assets/css/edd-admin-chosen.min.css @@ -0,0 +1 @@ +.chosen-container{font-size:14px}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border-radius:0 0 4px 4px;border-width:0 1px;border-color:transparent;background:#fff;outline:2px solid transparent}.chosen-container .spinner{margin:0;position:absolute;top:4px;right:30px}.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-multi .search-field,.chosen-container-single .chosen-single{background:#fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 5px top 55%;background-size:16px 16px;border:1px solid #7e8993;box-shadow:0 0 0 transparent;color:#32373c}.chosen-container-multi .chosen-choices,.chosen-container-single .chosen-single{border-radius:4px;border-color:#7e8993}.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-multi.chosen-with-drop .chosen-choices{box-shadow:0 1px 1px rgba(0,0,0,.04)}.chosen-container-multi.chosen-container-active.chosen-dropup .chosen-choices,.chosen-container-single.chosen-container-active.chosen-with-drop.chosen-dropup .chosen-single{border-radius:0 0 4px 4px;border-width:0 1px;z-index:1011}.chosen-container-single .chosen-single div b{background-image:none}.chosen-container-single .chosen-search:after{display:block;position:absolute;right:6px;top:50%;font-family:dashicons;font-size:17px;content:"";transform:translateY(-50%)}.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single{border-radius:4px 4px 0 0}.chosen-container-single .chosen-single div{width:26px}.chosen-container-single .chosen-default{color:#32373c}.chosen-container-active .chosen-single{border-color:transparent;outline:2px solid transparent}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%!important;height:auto;outline:0;border:1px solid #7e8993;border-radius:4px;line-height:normal;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-single .chosen-single{min-height:30px}@media screen and (max-width:782px){.chosen-container-single.chosen-container-active.chosen-with-drop .chosen-single,.chosen-container-single .chosen-single{font-size:16px;line-height:1.625;min-height:40px;padding:5px 8px}}.chosen-container-multi .search-field{border:none}.chosen-container-multi.chosen-with-drop .chosen-choices{border-bottom-color:transparent}.chosen-container-multi .chosen-choices li.search-field{min-width:100px!important;width:100%}.chosen-container-multi .chosen-choices li.search-field input[type=text]{color:#32373c;font-family:unset;height:unset;margin:0;padding:3px 24px 3px 10px;width:100%!important}.chosen-container-multi .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:5px 22px 5px 5px;border:1px solid #7e8993;max-width:100%;border-radius:4px;background:#f4f4f4;box-shadow:none;color:#32373c;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:15px;height:15px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{height:15px;width:15px;position:absolute;top:0;right:0;color:#32373c;font-family:dashicons;content:"";font-size:15px;line-height:1}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover:before{color:#537994}.chosen-container .chosen-results{color:#537994;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px}.chosen-container .chosen-results li.highlighted{background-image:none;border-radius:4px;color:#fff}:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}:root body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}:root body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}:root body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}:root body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}:root body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}:root body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}:root body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}:root body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}:root body.admin-color-evergreen{--wp-admin-theme-color:#36533f;--wp-admin-theme-color-darker-10:#2c4433;--wp-admin-theme-color-darker-20:#223428}:root body.admin-color-mint{--wp-admin-theme-color:#4f6d59;--wp-admin-theme-color-darker-10:#445e4d;--wp-admin-theme-color-darker-20:#3a4f41}.chosen-container.chosen-container-active .chosen-choices,.chosen-container.chosen-container-active .chosen-single,.chosen-with-drop.chosen-dropup .chosen-drop{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.chosen-container-active.chosen-dropup .chosen-choices,.chosen-container .chosen-drop,.chosen-with-drop.chosen-dropup .chosen-single{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 1px 0 1px #007cba;box-shadow:0 1px 0 1px var(--wp-admin-theme-color)}.chosen-container .chosen-results li.highlighted{background-color:#007cba;background-color:var(--wp-admin-theme-color)}.edd-select-chosen{width:100%;max-width:300px}.edd-select-chosen.edd-customer-select{width:100%!important}.edd-select-chosen.edd-time{width:55px;max-width:55px}@media screen and (max-width:782px){.edd-select-chosen.edd-time{width:70px;max-width:70px}} \ No newline at end of file diff --git a/assets/css/edd-admin-datepicker-rtl.min.css b/assets/css/edd-admin-datepicker-rtl.min.css new file mode 100644 index 00000000000..7151c1aa42b --- /dev/null +++ b/assets/css/edd-admin-datepicker-rtl.min.css @@ -0,0 +1 @@ +.edd-datepicker{padding:0;margin:0;border-radius:0;background-color:#fff;border:1px solid #dfdfdf;border-top:none;box-shadow:0 3px 6px rgba(0,0,0,.075);min-width:17em;width:auto;z-index:1000!important}.edd-datepicker *{padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;border-radius:0}.edd-datepicker table{font-size:13px;margin:0;border:none;border-collapse:collapse}.edd-datepicker .ui-datepicker-header,.edd-datepicker .ui-widget-header{background-image:none;border:none;color:#fff;font-weight:400;padding:.2em 0}.edd-datepicker .ui-datepicker-header .ui-state-hover{background:transparent;border-color:transparent;cursor:pointer}.edd-datepicker .ui-datepicker-title{margin:0;padding:10px 0;color:#fff;font-size:14px;line-height:14px;text-align:center}.edd-datepicker .ui-datepicker-next,.edd-datepicker .ui-datepicker-prev{position:relative;top:0;height:34px;width:34px}.edd-datepicker .ui-state-hover.ui-datepicker-next,.edd-datepicker .ui-state-hover.ui-datepicker-prev{border:none}.edd-datepicker .ui-datepicker-prev,.edd-datepicker .ui-datepicker-prev-hover{right:0}.edd-datepicker .ui-datepicker-next,.edd-datepicker .ui-datepicker-next-hover{left:0}.edd-datepicker .ui-datepicker-next span,.edd-datepicker .ui-datepicker-prev span{display:none}.edd-datepicker .ui-datepicker-prev{float:right}.edd-datepicker .ui-datepicker-next{float:left}.edd-datepicker .ui-datepicker-next:before,.edd-datepicker .ui-datepicker-prev:before{font:normal 20px/34px dashicons;padding-right:7px;color:#fff;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px}.edd-datepicker .ui-datepicker-prev:before{content:""}.edd-datepicker .ui-datepicker-next:before{content:""}.edd-datepicker .ui-datepicker-next-hover:before,.edd-datepicker .ui-datepicker-prev-hover:before{opacity:.7}.edd-datepicker select.ui-datepicker-month,.edd-datepicker select.ui-datepicker-year{width:33%}.edd-datepicker thead{color:#fff;font-weight:600}.edd-datepicker th{padding:10px}.edd-datepicker td{padding:0;border:1px solid #f4f4f4}.edd-datepicker td.ui-datepicker-other-month{border:transparent}.edd-datepicker tr:first-of-type td{border-top:1px solid #f0f0f0}.edd-datepicker td.ui-datepicker-week-end{background-color:#f4f4f4;border:1px solid #f0f0f0}.edd-datepicker td.ui-datepicker-today{background-color:#f0f0c0}.edd-datepicker td.ui-datepicker-current-day{background:#bd8}.edd-datepicker td .ui-state-default{background:transparent;border:none;text-align:center;text-decoration:none;width:auto;display:block;padding:5px 10px;font-weight:400;color:#444}.edd-datepicker td.ui-state-disabled .ui-state-default{opacity:.5}.edd-datepicker .ui-datepicker-header,.edd-datepicker .ui-widget-header{background:#00a0d2}.edd-datepicker thead{background:#32373c}.edd-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-fresh .edd-datepicker .ui-datepicker-header,.admin-color-fresh .edd-datepicker .ui-widget-header{background:#00a0d2}.admin-color-fresh .edd-datepicker thead{background:#32373c}.admin-color-fresh .edd-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-blue .edd-datepicker .ui-datepicker-header,.admin-color-blue .edd-datepicker .ui-widget-header{background:#52accc}.admin-color-blue .edd-datepicker thead{background:#4796b3}.admin-color-blue .edd-datepicker td .ui-state-hover{background:#096484;color:#fff}.admin-color-coffee .edd-datepicker .ui-datepicker-header,.admin-color-coffee .edd-datepicker .ui-widget-header{background:#59524c}.admin-color-coffee .edd-datepicker thead{background:#46403c}.admin-color-coffee .edd-datepicker td .ui-state-hover{background:#c7a589;color:#fff}.admin-color-ectoplasm .edd-datepicker .ui-datepicker-header,.admin-color-ectoplasm .edd-datepicker .ui-widget-header{background:#523f6d}.admin-color-ectoplasm .edd-datepicker thead{background:#413256}.admin-color-ectoplasm .edd-datepicker td .ui-state-hover{background:#a3b745;color:#fff}.admin-color-midnight .edd-datepicker .ui-datepicker-header,.admin-color-midnight .edd-datepicker .ui-widget-header{background:#363b3f}.admin-color-midnight .edd-datepicker thead{background:#26292c}.admin-color-midnight .edd-datepicker td .ui-state-hover{background:#e14d43;color:#fff}.admin-color-ocean .edd-datepicker .ui-datepicker-header,.admin-color-ocean .edd-datepicker .ui-widget-header{background:#738e96}.admin-color-ocean .edd-datepicker thead{background:#627c83}.admin-color-ocean .edd-datepicker td .ui-state-hover{background:#9ebaa0;color:#fff}.admin-color-sunrise .edd-datepicker .ui-datepicker-header,.admin-color-sunrise .edd-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .edd-datepicker .ui-widget-header{background:#cf4944}.admin-color-sunrise .edd-datepicker th{border-color:#be3631;background:#be3631}.admin-color-sunrise .edd-datepicker td .ui-state-hover{background:#dd823b;color:#fff}.admin-color-light .edd-datepicker .ui-datepicker-header,.admin-color-light .edd-datepicker .ui-widget-header{background:#e5e5e5}.admin-color-light .edd-datepicker thead{background:#888}.admin-color-light .edd-datepicker .ui-datepicker-next:before,.admin-color-light .edd-datepicker .ui-datepicker-prev:before,.admin-color-light .edd-datepicker .ui-datepicker-title,.admin-color-light .edd-datepicker td .ui-state-default{color:#555}.admin-color-light .edd-datepicker td .ui-state-hover{background:#e5e5e5}.admin-color-bbp-evergreen .edd-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .edd-datepicker .ui-widget-header{background:#56b274}.admin-color-bbp-evergreen .edd-datepicker thead{background:#36533f}.admin-color-bbp-evergreen .edd-datepicker td .ui-state-hover{background:#446950;color:#fff}.admin-color-bbp-mint .edd-datepicker .ui-datepicker-header,.admin-color-bbp-mint .edd-datepicker .ui-widget-header{background:#4ca26a}.admin-color-bbp-mint .edd-datepicker thead{background:#4f6d59}.admin-color-bbp-mint .edd-datepicker td .ui-state-hover{background:#5fb37c;color:#fff} \ No newline at end of file diff --git a/assets/css/edd-admin-datepicker.min.css b/assets/css/edd-admin-datepicker.min.css new file mode 100644 index 00000000000..0b357d49975 --- /dev/null +++ b/assets/css/edd-admin-datepicker.min.css @@ -0,0 +1 @@ +.edd-datepicker{padding:0;margin:0;border-radius:0;background-color:#fff;border:1px solid #dfdfdf;border-top:none;box-shadow:0 3px 6px rgba(0,0,0,.075);min-width:17em;width:auto;z-index:1000!important}.edd-datepicker *{padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;border-radius:0}.edd-datepicker table{font-size:13px;margin:0;border:none;border-collapse:collapse}.edd-datepicker .ui-datepicker-header,.edd-datepicker .ui-widget-header{background-image:none;border:none;color:#fff;font-weight:400;padding:.2em 0}.edd-datepicker .ui-datepicker-header .ui-state-hover{background:transparent;border-color:transparent;cursor:pointer}.edd-datepicker .ui-datepicker-title{margin:0;padding:10px 0;color:#fff;font-size:14px;line-height:14px;text-align:center}.edd-datepicker .ui-datepicker-next,.edd-datepicker .ui-datepicker-prev{position:relative;top:0;height:34px;width:34px}.edd-datepicker .ui-state-hover.ui-datepicker-next,.edd-datepicker .ui-state-hover.ui-datepicker-prev{border:none}.edd-datepicker .ui-datepicker-prev,.edd-datepicker .ui-datepicker-prev-hover{left:0}.edd-datepicker .ui-datepicker-next,.edd-datepicker .ui-datepicker-next-hover{right:0}.edd-datepicker .ui-datepicker-next span,.edd-datepicker .ui-datepicker-prev span{display:none}.edd-datepicker .ui-datepicker-prev{float:left}.edd-datepicker .ui-datepicker-next{float:right}.edd-datepicker .ui-datepicker-next:before,.edd-datepicker .ui-datepicker-prev:before{font:normal 20px/34px dashicons;padding-left:7px;color:#fff;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px}.edd-datepicker .ui-datepicker-prev:before{content:""}.edd-datepicker .ui-datepicker-next:before{content:""}.edd-datepicker .ui-datepicker-next-hover:before,.edd-datepicker .ui-datepicker-prev-hover:before{opacity:.7}.edd-datepicker select.ui-datepicker-month,.edd-datepicker select.ui-datepicker-year{width:33%}.edd-datepicker thead{color:#fff;font-weight:600}.edd-datepicker th{padding:10px}.edd-datepicker td{padding:0;border:1px solid #f4f4f4}.edd-datepicker td.ui-datepicker-other-month{border:transparent}.edd-datepicker tr:first-of-type td{border-top:1px solid #f0f0f0}.edd-datepicker td.ui-datepicker-week-end{background-color:#f4f4f4;border:1px solid #f0f0f0}.edd-datepicker td.ui-datepicker-today{background-color:#f0f0c0}.edd-datepicker td.ui-datepicker-current-day{background:#bd8}.edd-datepicker td .ui-state-default{background:transparent;border:none;text-align:center;text-decoration:none;width:auto;display:block;padding:5px 10px;font-weight:400;color:#444}.edd-datepicker td.ui-state-disabled .ui-state-default{opacity:.5}.edd-datepicker .ui-datepicker-header,.edd-datepicker .ui-widget-header{background:#00a0d2}.edd-datepicker thead{background:#32373c}.edd-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-fresh .edd-datepicker .ui-datepicker-header,.admin-color-fresh .edd-datepicker .ui-widget-header{background:#00a0d2}.admin-color-fresh .edd-datepicker thead{background:#32373c}.admin-color-fresh .edd-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-blue .edd-datepicker .ui-datepicker-header,.admin-color-blue .edd-datepicker .ui-widget-header{background:#52accc}.admin-color-blue .edd-datepicker thead{background:#4796b3}.admin-color-blue .edd-datepicker td .ui-state-hover{background:#096484;color:#fff}.admin-color-coffee .edd-datepicker .ui-datepicker-header,.admin-color-coffee .edd-datepicker .ui-widget-header{background:#59524c}.admin-color-coffee .edd-datepicker thead{background:#46403c}.admin-color-coffee .edd-datepicker td .ui-state-hover{background:#c7a589;color:#fff}.admin-color-ectoplasm .edd-datepicker .ui-datepicker-header,.admin-color-ectoplasm .edd-datepicker .ui-widget-header{background:#523f6d}.admin-color-ectoplasm .edd-datepicker thead{background:#413256}.admin-color-ectoplasm .edd-datepicker td .ui-state-hover{background:#a3b745;color:#fff}.admin-color-midnight .edd-datepicker .ui-datepicker-header,.admin-color-midnight .edd-datepicker .ui-widget-header{background:#363b3f}.admin-color-midnight .edd-datepicker thead{background:#26292c}.admin-color-midnight .edd-datepicker td .ui-state-hover{background:#e14d43;color:#fff}.admin-color-ocean .edd-datepicker .ui-datepicker-header,.admin-color-ocean .edd-datepicker .ui-widget-header{background:#738e96}.admin-color-ocean .edd-datepicker thead{background:#627c83}.admin-color-ocean .edd-datepicker td .ui-state-hover{background:#9ebaa0;color:#fff}.admin-color-sunrise .edd-datepicker .ui-datepicker-header,.admin-color-sunrise .edd-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .edd-datepicker .ui-widget-header{background:#cf4944}.admin-color-sunrise .edd-datepicker th{border-color:#be3631;background:#be3631}.admin-color-sunrise .edd-datepicker td .ui-state-hover{background:#dd823b;color:#fff}.admin-color-light .edd-datepicker .ui-datepicker-header,.admin-color-light .edd-datepicker .ui-widget-header{background:#e5e5e5}.admin-color-light .edd-datepicker thead{background:#888}.admin-color-light .edd-datepicker .ui-datepicker-next:before,.admin-color-light .edd-datepicker .ui-datepicker-prev:before,.admin-color-light .edd-datepicker .ui-datepicker-title,.admin-color-light .edd-datepicker td .ui-state-default{color:#555}.admin-color-light .edd-datepicker td .ui-state-hover{background:#e5e5e5}.admin-color-bbp-evergreen .edd-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .edd-datepicker .ui-widget-header{background:#56b274}.admin-color-bbp-evergreen .edd-datepicker thead{background:#36533f}.admin-color-bbp-evergreen .edd-datepicker td .ui-state-hover{background:#446950;color:#fff}.admin-color-bbp-mint .edd-datepicker .ui-datepicker-header,.admin-color-bbp-mint .edd-datepicker .ui-widget-header{background:#4ca26a}.admin-color-bbp-mint .edd-datepicker thead{background:#4f6d59}.admin-color-bbp-mint .edd-datepicker td .ui-state-hover{background:#5fb37c;color:#fff} \ No newline at end of file diff --git a/assets/css/edd-admin-email-tags-rtl.min.css b/assets/css/edd-admin-email-tags-rtl.min.css new file mode 100644 index 00000000000..30fcdedc6cb --- /dev/null +++ b/assets/css/edd-admin-email-tags-rtl.min.css @@ -0,0 +1 @@ +.edd-email-tags-filter{margin:-15px -15px 15px;padding:15px;border-bottom:1px solid #ddd;background:#f3f3f3}.edd-email-tags-filter-search{padding:10px;width:100%;font-size:20px}.edd-email-tags-list{margin:0}.edd-email-tags-list-item{margin-bottom:15px}.edd-email-tags-list-item::last-child{margin-bottom:0}.edd-email-tags-list-button{cursor:pointer;color:#666;text-align:right;padding:.8rem;width:100%;background:none;border:1px solid #ddd;border-radius:3px}.edd-email-tags-list-button:hover{background:#fafafa}.edd-email-tags-list-button strong{color:#444;font-size:14px;margin-bottom:8px}.edd-email-tags-list-button code{margin-right:10px}.edd-email-tags-list-button span{display:block;margin-top:10px} \ No newline at end of file diff --git a/assets/css/edd-admin-email-tags.min.css b/assets/css/edd-admin-email-tags.min.css new file mode 100644 index 00000000000..018479f4a76 --- /dev/null +++ b/assets/css/edd-admin-email-tags.min.css @@ -0,0 +1 @@ +.edd-email-tags-filter{margin:-15px -15px 15px;padding:15px;border-bottom:1px solid #ddd;background:#f3f3f3}.edd-email-tags-filter-search{padding:10px;width:100%;font-size:20px}.edd-email-tags-list{margin:0}.edd-email-tags-list-item{margin-bottom:15px}.edd-email-tags-list-item::last-child{margin-bottom:0}.edd-email-tags-list-button{cursor:pointer;color:#666;text-align:left;padding:.8rem;width:100%;background:none;border:1px solid #ddd;border-radius:3px}.edd-email-tags-list-button:hover{background:#fafafa}.edd-email-tags-list-button strong{color:#444;font-size:14px;margin-bottom:8px}.edd-email-tags-list-button code{margin-left:10px}.edd-email-tags-list-button span{display:block;margin-top:10px} \ No newline at end of file diff --git a/assets/css/edd-admin-emails-rtl.min.css b/assets/css/edd-admin-emails-rtl.min.css new file mode 100644 index 00000000000..7cdf52491c1 --- /dev/null +++ b/assets/css/edd-admin-emails-rtl.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}button.edd-button__toggle{position:relative;margin:0;padding:0;width:36px;height:20px;min-height:unset;background-color:#c3c4c7;transition:background .2s ease;border-radius:30px;box-shadow:none;border:none}button.edd-button__toggle:after{position:absolute;content:"";height:14px;width:14px;right:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%}button.edd-button__toggle.edd-button-toggle--active:after{transform:translateX(-16px)}button.edd-button__toggle:active,button.edd-button__toggle:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px #7e8993}button.edd-button__toggle:hover{background-color:#7e8993}button.edd-button__toggle:disabled{opacity:.5}button.edd-button__toggle.edd-updating{background-color:#7e8993!important}button.edd-button__toggle.edd-updating:before{position:absolute;top:3px;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:10px;height:10px;transform:translate3d(50%,-50%,0);will-change:transform}button.edd-button__toggle.edd-updating:after{display:none}button.edd-button__toggle.edd-button-toggle--active{background-color:var(--wp-admin-theme-color)!important}button.edd-button__toggle.edd-button-toggle--active :active,button.edd-button__toggle.edd-button-toggle--active :focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.edd-editor__header{height:auto;border-bottom:1px solid #e2e4e7;z-index:30;position:sticky;top:32px;margin-right:-20px;background:#fff}@media screen and (max-width:782px){.edd-editor__header{top:0}}.edd-editor__header p.submit{margin:0;padding:0}.edd-editor__header--actions{padding:4px 20px;display:flex;justify-content:space-between;align-items:center}.edd-editor__actions,.edd-editor__title{display:flex;gap:.5em;align-items:center}.edd-editor__actions--test{display:flex;gap:.5em}@media screen and (max-width:782px){.edd-editor__header .edd-editor__actions--test{display:none}}.edd-editor__status{display:flex;gap:.5em;padding-left:.5em}.edd-editor__status .edd-help-tip{display:block;cursor:unset;margin:0}@media screen and (max-width:782px){.button.edd-back{display:none!important}}.edd-emails__add-new__overlay{position:absolute;left:0;top:40px;background:#fff;padding:8px;border:1px solid #c3c4c7;border-radius:4px;display:flex;flex-direction:column;gap:2px;z-index:1;align-items:stretch}.edd-emails__add-new__overlay button.button{background:none!important;border:none;color:#537994!important;text-align:right}#edd-admin-notice-emails{max-width:100%;width:800px;text-align:right;padding:2em}#edd-admin-notice-emails h2{line-height:unset;margin:0}#edd-admin-notice-emails .edd-extension-manager__body{-ms-grid-rows:unset;grid-template-rows:unset;margin-bottom:1.5em}.edd-promo-notice__ajax #edd-admin-notice-emails{width:400px}.edd-promo-notice__ajax #edd-admin-notice-emails .edd-extension-manager__body{-ms-grid-columns:80px 1fr;grid-template-columns:80px 1fr}#edd-admin-notice-emails .edd-extension-manager__card-group{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));text-align:right;margin:0 auto 1em;width:100%}#edd-admin-notice-emails .edd-extension-manager__card-group .edd-extension-manager__single-card{margin:0 auto 1em}.edd-promo-notice__overlay:not(.edd-promo-notice__ajax) #edd-admin-notice-emails .edd-extension-manager__body{-ms-grid-columns:60px 1fr;grid-template-columns:60px 1fr}.edd-promo-notice__overlay:not(.edd-promo-notice__ajax) #edd-admin-notice-emails .edd-extension-manager__icon{width:58px;height:58px}.edd-promo-notice__overlay:not(.edd-promo-notice__ajax) #edd-admin-notice-emails .edd-extension-manager__icon img{width:40px}#edd-admin-notice-emails .edd-plugin__recommended{display:none}#edd-emails__add{display:flex;align-items:center;gap:8px;justify-content:space-between}.edd-list-table__item td{padding:10px}td.column-status,th.column-status{text-align:left;width:80px}td.column-status{min-height:30px}td.column-status .edd-help-tip{margin-top:2px}@media screen and (max-width:782px){td.column-status{text-align:right;width:unset;min-height:40px}}tr.no-items{display:none}@media screen and (min-width:1280px){.column-primary{width:250px}.column-recipient,.column-sender{width:125px}.column-context,.column-date_modified{width:150px}}table.email_templates{margin-top:1em}.tablenav.top{position:relative}.tablenav .alignright.actions{padding-left:0}.edd-list-table__name{display:flex;align-items:center;gap:6px}.edd-emails__wpsmtp{display:flex;align-items:center;gap:4px;justify-content:flex-end}.edd-emails__wpsmtp a{text-decoration:none;color:#537994}.edd-emails__wpsmtp img{width:20px;height:auto}.edd-email-editor__description{margin:2em 0}.edd-editor__header--actions{position:relative}.edd-editor__header--actions .edd-email-status-badge{position:absolute;left:0;top:53px;margin-left:20px;border:1px solid;padding:12px}.edd-editor__header--actions #submit.edd-updating:before{background:none;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #f9f9f9;border-bottom-color:#7e8993;border-radius:100%;content:"";width:12px;height:12px;transform:translate3d(50%,-50%,0);will-change:transform}.edd-form__email{background:#fff;border:1px solid #e2e4e7;padding:2em;max-width:1440px}@media screen and (min-width:782px){.edd-form__email .edd-form-group{display:-ms-grid;display:grid;-ms-grid-columns:200px 1fr;grid-template-columns:200px 1fr;margin-bottom:2em}.edd-form__email .edd-form-group>.description{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3}.edd-form__email .edd-form-group>.description,.edd-form__email .notice{margin-right:200px}}.edd-email-action-reset{border-color:#d63638!important;color:#d63638!important}.edd-email-action-reset:hover{border-color:#b60012!important;color:#b60012!important}.edd-editor__actions--test+.notice{margin-top:2em} \ No newline at end of file diff --git a/assets/css/edd-admin-emails.min.css b/assets/css/edd-admin-emails.min.css new file mode 100644 index 00000000000..943c3bccfea --- /dev/null +++ b/assets/css/edd-admin-emails.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}button.edd-button__toggle{position:relative;margin:0;padding:0;width:36px;height:20px;min-height:unset;background-color:#c3c4c7;transition:background .2s ease;border-radius:30px;box-shadow:none;border:none}button.edd-button__toggle:after{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%}button.edd-button__toggle.edd-button-toggle--active:after{transform:translateX(16px)}button.edd-button__toggle:active,button.edd-button__toggle:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px #7e8993}button.edd-button__toggle:hover{background-color:#7e8993}button.edd-button__toggle:disabled{opacity:.5}button.edd-button__toggle.edd-updating{background-color:#7e8993!important}button.edd-button__toggle.edd-updating:before{position:absolute;top:3px;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:10px;height:10px;transform:translate3d(-50%,-50%,0);will-change:transform}button.edd-button__toggle.edd-updating:after{display:none}button.edd-button__toggle.edd-button-toggle--active{background-color:var(--wp-admin-theme-color)!important}button.edd-button__toggle.edd-button-toggle--active :active,button.edd-button__toggle.edd-button-toggle--active :focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.edd-editor__header{height:auto;border-bottom:1px solid #e2e4e7;z-index:30;position:sticky;top:32px;margin-left:-20px;background:#fff}@media screen and (max-width:782px){.edd-editor__header{top:0}}.edd-editor__header p.submit{margin:0;padding:0}.edd-editor__header--actions{padding:4px 20px;display:flex;justify-content:space-between;align-items:center}.edd-editor__actions,.edd-editor__title{display:flex;gap:.5em;align-items:center}.edd-editor__actions--test{display:flex;gap:.5em}@media screen and (max-width:782px){.edd-editor__header .edd-editor__actions--test{display:none}}.edd-editor__status{display:flex;gap:.5em;padding-right:.5em}.edd-editor__status .edd-help-tip{display:block;cursor:unset;margin:0}@media screen and (max-width:782px){.button.edd-back{display:none!important}}.edd-emails__add-new__overlay{position:absolute;right:0;top:40px;background:#fff;padding:8px;border:1px solid #c3c4c7;border-radius:4px;display:flex;flex-direction:column;gap:2px;z-index:1;align-items:stretch}.edd-emails__add-new__overlay button.button{background:none!important;border:none;color:#537994!important;text-align:left}#edd-admin-notice-emails{max-width:100%;width:800px;text-align:left;padding:2em}#edd-admin-notice-emails h2{line-height:unset;margin:0}#edd-admin-notice-emails .edd-extension-manager__body{-ms-grid-rows:unset;grid-template-rows:unset;margin-bottom:1.5em}.edd-promo-notice__ajax #edd-admin-notice-emails{width:400px}.edd-promo-notice__ajax #edd-admin-notice-emails .edd-extension-manager__body{-ms-grid-columns:80px 1fr;grid-template-columns:80px 1fr}#edd-admin-notice-emails .edd-extension-manager__card-group{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));text-align:left;margin:0 auto 1em;width:100%}#edd-admin-notice-emails .edd-extension-manager__card-group .edd-extension-manager__single-card{margin:0 auto 1em}.edd-promo-notice__overlay:not(.edd-promo-notice__ajax) #edd-admin-notice-emails .edd-extension-manager__body{-ms-grid-columns:60px 1fr;grid-template-columns:60px 1fr}.edd-promo-notice__overlay:not(.edd-promo-notice__ajax) #edd-admin-notice-emails .edd-extension-manager__icon{width:58px;height:58px}.edd-promo-notice__overlay:not(.edd-promo-notice__ajax) #edd-admin-notice-emails .edd-extension-manager__icon img{width:40px}#edd-admin-notice-emails .edd-plugin__recommended{display:none}#edd-emails__add{display:flex;align-items:center;gap:8px;justify-content:space-between}.edd-list-table__item td{padding:10px}td.column-status,th.column-status{text-align:right;width:80px}td.column-status{min-height:30px}td.column-status .edd-help-tip{margin-top:2px}@media screen and (max-width:782px){td.column-status{text-align:left;width:unset;min-height:40px}}tr.no-items{display:none}@media screen and (min-width:1280px){.column-primary{width:250px}.column-recipient,.column-sender{width:125px}.column-context,.column-date_modified{width:150px}}table.email_templates{margin-top:1em}.tablenav.top{position:relative}.tablenav .alignright.actions{padding-right:0}.edd-list-table__name{display:flex;align-items:center;gap:6px}.edd-emails__wpsmtp{display:flex;align-items:center;gap:4px;justify-content:flex-end}.edd-emails__wpsmtp a{text-decoration:none;color:#537994}.edd-emails__wpsmtp img{width:20px;height:auto}.edd-email-editor__description{margin:2em 0}.edd-editor__header--actions{position:relative}.edd-editor__header--actions .edd-email-status-badge{position:absolute;right:0;top:53px;margin-right:20px;border:1px solid;padding:12px}.edd-editor__header--actions #submit.edd-updating:before{background:none;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #f9f9f9;border-bottom-color:#7e8993;border-radius:100%;content:"";width:12px;height:12px;transform:translate3d(-50%,-50%,0);will-change:transform}.edd-form__email{background:#fff;border:1px solid #e2e4e7;padding:2em;max-width:1440px}@media screen and (min-width:782px){.edd-form__email .edd-form-group{display:-ms-grid;display:grid;-ms-grid-columns:200px 1fr;grid-template-columns:200px 1fr;margin-bottom:2em}.edd-form__email .edd-form-group>.description{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3}.edd-form__email .edd-form-group>.description,.edd-form__email .notice{margin-left:200px}}.edd-email-action-reset{border-color:#d63638!important;color:#d63638!important}.edd-email-action-reset:hover{border-color:#b60012!important;color:#b60012!important}.edd-editor__actions--test+.notice{margin-top:2em} \ No newline at end of file diff --git a/assets/css/edd-admin-extension-manager-rtl.min.css b/assets/css/edd-admin-extension-manager-rtl.min.css new file mode 100644 index 00000000000..1513d246d51 --- /dev/null +++ b/assets/css/edd-admin-extension-manager-rtl.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-extension-manager__bar{justify-content:space-between;flex-wrap:wrap}.edd-extension-manager__bar,.edd-extension-manager__bar-heading{display:flex;align-items:center;gap:1em}.edd-extension-manager__bar input[type=search]{background-color:#fff;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMjEgMjFsLTUuMTk3LTUuMTk3bTAgMEE3LjUgNy41IDAgMTA1LjE5NiA1LjE5NmE3LjUgNy41IDAgMDAxMC42MDcgMTAuNjA3eiIvPjwvc3ZnPg==);background-size:1em;background-repeat:no-repeat;background-position:3%}.edd-extension-manager__bar input[type=search]:active,.edd-extension-manager__bar input[type=search]:focus,.edd-extension-manager__bar input[type=search]:hover{background-image:none}.edd-extension-manager__body{display:-ms-grid;display:grid;gap:1.5em;-ms-grid-rows:auto 1fr;grid-template-rows:auto 1fr;flex-grow:1}.edd-extension-manager__body img{max-width:100%}.edd-extension-manager__body .notice{max-width:320px}.edd-extension-manager__title{line-height:1.4;margin:0 0 1em 1em}.edd-extension-manager__title a{color:#32373c}.button.edd-extension-manager__action-upgrade{background-color:#008a20;color:#fff}.button.edd-extension-manager__action-upgrade:active,.button.edd-extension-manager__action-upgrade:hover{background-color:#005714;color:#fff}.edd-extension-manager__card--installer .button{display:flex;justify-content:center;align-items:center;gap:5px;margin:0}.edd-extension-manager__card--installer .button:before{margin:0}.edd-extension-manager__card--installer .button.edd-button__install{color:#32373c;border-color:#7e8993}.edd-extension-manager__card--installer .button.edd-button__install:before{content:" ";display:block;width:1em;height:1em;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05LjExMiAxdjUuMDc2aDEuODUydi43NEw4IDkuNzgyIDUuMDM2IDYuODE3di0uNzQxaDEuODUzVjFoMi4yMjN6bS01LjkyOCA5LjE1MnYxLjg1Mmg5LjYzM3YtMS44NTJoMi45NjR2NC44MTZILjIxOXYtNC44MTdoMi45NjV6IiBmaWxsPSIjOTk5Ii8+PC9zdmc+);background-size:1em}.edd-extension-manager__card--installer .button.edd-button__install.edd-updating:before{background:none;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #f9f9f9;border-bottom-color:#7e8993;border-radius:100%;content:"";width:12px;height:12px;transform:translate3d(50%,-50%,0);will-change:transform}.edd-extension-manager__control .edd-button__toggle{position:relative;margin:0;padding:0;width:36px;height:20px;min-height:unset;background-color:#c3c4c7;transition:background .2s ease;border-radius:30px;box-shadow:none;border:none}.edd-extension-manager__control .edd-button__toggle:after{position:absolute;content:"";height:14px;width:14px;right:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%}.edd-plugin__active .edd-extension-manager__control .edd-button__toggle:after{transform:translateX(-16px)}.edd-extension-manager__control .edd-button__toggle:active,.edd-extension-manager__control .edd-button__toggle:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px #7e8993}.edd-extension-manager__control .edd-button__toggle:hover{background-color:#7e8993}.edd-extension-manager__control .edd-button__toggle:disabled{background-color:#7e8993!important}.edd-extension-manager__control .edd-button__toggle:disabled:before{position:absolute;top:3px;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:10px;height:10px;transform:translate3d(50%,-50%,0);will-change:transform}.edd-extension-manager__control .edd-button__toggle:disabled:after{display:none}.edd-plugin__active .edd-extension-manager__control .edd-button__toggle{background-color:var(--wp-admin-theme-color)}.edd-plugin__active .edd-extension-manager__control .edd-button__toggle :active,.edd-plugin__active .edd-extension-manager__control .edd-button__toggle :focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}@media screen and (max-width:782px){.edd-extension-manager__control{min-height:40px}}.edd-extension-manager__activate{display:flex;align-items:center;gap:.5em;min-height:30px;border:1px solid #c3c4c7;border-radius:4px;padding:3px 10px}a.button.edd-extension-manager__button-settings{display:none;position:absolute;top:1em;left:1em;min-height:unset;height:1.5em;width:1.5em;padding:1em;border:none;background-color:#f9f9f9}a.button.edd-extension-manager__button-settings,a.button.edd-extension-manager__button-settings:active,a.button.edd-extension-manager__button-settings:hover{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS4yOSA2LjI5M2wtMS41MTUuODc1YTUuODczIDUuODczIDAgMDEwIDEuNjY0bDEuNTE1Ljg3NS0yLjE2NiAzLjc1My0xLjUxNi0uODc1YTUuODI3IDUuODI3IDAgMDEtMS40NDEuODMzdjEuNzQ5SDUuODM0di0xLjc1YTUuODI1IDUuODI1IDAgMDEtMS40NDEtLjgzMmwtMS41MTYuODc1TC43MSA5LjcwN2wxLjUxNi0uODc1YTUuODc4IDUuODc4IDAgMDEwLTEuNjY0TC43MSA2LjI5MyAyLjg3NyAyLjU0bDEuNTE2Ljg3NmE1LjgyNyA1LjgyNyAwIDAxMS40NC0uODMzVi44MzNoNC4zMzR2MS43NWE1LjgzIDUuODMgMCAwMTEuNDQuODMzbDEuNTE3LS44NzYgMi4xNjYgMy43NTN6TTggMTAuMzMzYTIuMzMzIDIuMzMzIDAgMTAwLTQuNjY2IDIuMzMzIDIuMzMzIDAgMDAwIDQuNjY2eiIgZmlsbD0iIzZCNzI4MCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUuMjkgNi4yOTNsLTEuNTE1Ljg3NWE1Ljg3MyA1Ljg3MyAwIDAxMCAxLjY2NGwxLjUxNS44NzUtMi4xNjYgMy43NTMtMS41MTYtLjg3NWE1LjgyNyA1LjgyNyAwIDAxLTEuNDQxLjgzM3YxLjc0OUg1LjgzNHYtMS43NWE1LjgyNSA1LjgyNSAwIDAxLTEuNDQxLS44MzJsLTEuNTE2Ljg3NUwuNzEgOS43MDdsMS41MTYtLjg3NWE1Ljg3OCA1Ljg3OCAwIDAxMC0xLjY2NEwuNzEgNi4yOTMgMi44NzcgMi41NGwxLjUxNi44NzZhNS44MjcgNS44MjcgMCAwMTEuNDQtLjgzM1YuODMzaDQuMzM0djEuNzVhNS44MyA1LjgzIDAgMDExLjQ0LjgzM2wxLjUxNy0uODc2IDIuMTY2IDMuNzUzek04IDEwLjMzM2EyLjMzMyAyLjMzMyAwIDEwMC00LjY2NiAyLjMzMyAyLjMzMyAwIDAwMCA0LjY2NnoiIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iLjUiLz48L3N2Zz4=);background-size:1.25em;background-repeat:no-repeat;background-position:50%}.edd-plugin__active a.button.edd-extension-manager__button-settings{display:block}.edd-extension-manager__card{background-color:#fff;padding:2em;margin:0;display:flex;flex-direction:column;justify-content:space-between}.edd-extension-manager__card.edd-hidden{display:none}.inside .edd-extension-manager__card{padding:0}.edd-extension-manager__features ul{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.edd-extension-manager__features .dashicons-yes{color:#008a20;margin-left:.25em}.edd-extension-manager__wrap{max-width:1440px}.edd-extension-manager__card-group{transition:all .5s}@supports(grid-area:auto){.edd-extension-manager__card-group{display:grid;grid-template-columns:auto;gap:1em;margin-top:40px}p+.edd-extension-manager__card-group{margin-top:24px}}.edd-extension-manager__group{display:-ms-grid;display:grid}.edd-extension-manager__unlock{margin-top:4em}.edd-extension-manager__icon{background-color:#fff;border:1px solid #e0e0e0;border-radius:4px;width:78px;height:78px}.edd-extension-manager__icon img{border-radius:12px;display:block;margin:0;padding:9px;width:60px}.edd-extension-manager__image img{display:block;margin:0 auto;max-width:500px;width:100%}.edd-extension-manager__card--installer{border:1px solid #dcdcde;border-radius:3px;padding:0}.edd-extension-manager__card--installer>div{padding:2em}.edd-extension-manager__card--installer>div:not(:last-child){border-bottom:1px solid #e0e0e0}.edd-extension-manager__card--installer .notice{margin:0 -1em!important}.edd-extension-manager__card--installer .notice:not(:last-child){margin-bottom:1em}.edd-extension-manager__card--installer .edd-extension-manager__body{-ms-grid-columns:80px 1fr;grid-template-columns:80px 1fr;-ms-grid-rows:unset;grid-template-rows:unset;position:relative}.edd-extension-manager__card--installer .edd-extension-manager__body p:last-child{margin-bottom:0}.edd-extension-manager__card--installer .edd-extension-manager__actions{background:#f9f9f9;display:flex;justify-content:space-between;align-items:center;padding:1em 2em}.edd-extension-manager__card--installer .edd-extension-manager__actions>:only-child{margin-right:auto}.edd-extension-manager__card--installer .edd-extension-manager__status{font-weight:600}.edd-extension-manager__card--overlay{text-align:right;padding:0}.edd-extension-manager__card--overlay .edd-extension-manager__card{padding:0}.edd-extension-manager__card--overlay .edd-extension-manager__title{line-height:unset;margin-bottom:.5em}.edd-extension-manager__card--overlay .edd-extension-manager__actions{background-color:#f9f9f9;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-start;align-items:center;gap:.5em;margin:0 -2em -2em;padding:16px 24px}.edd-extension-manager__card--overlay .edd-extension-manager__actions .button{margin:0}.edd-extension-manager__key-notice{background:#fff;border:1px solid #d63638;border-radius:4px;padding:1em}.edd-extension-manager__key-notice p:first-child{margin-top:0}.edd-extension-manager__step{-ms-grid-row:1;grid-area:1/-1;margin:0}.edd-extension-manager__step:not(:first-of-type){display:none}.edd-extension-manager__step .button{display:table;margin:0 auto;text-align:center;white-space:normal}td .edd-extension-manager__step .button{display:inline-block}.edd-settings-wrap.has-product-education .edd-settings-content{width:100%;max-width:100%}.edd-extension-manager__card--horizontal{margin:24px 0;max-width:700px}.edd-extension-manager__card--detailed{background-color:transparent;max-width:700px}.edd-extension-manager__card--detailed-2col{background-color:transparent;max-width:900px;margin:0 auto}.edd-extension-manager__card--detailed-2col h3{font-size:1.5rem;margin-bottom:10px;text-align:center}.edd-extension-manager__card--detailed-2col .edd-extension-manager__body{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;grid-gap:1em}.edd-extension-manager__card--detailed-2col .edd-extension-manager__title,.edd-extension-manager__card--detailed .edd-extension-manager__title{border-bottom:1px solid #ccc;padding-bottom:1em}@media screen and (min-width:600px){.edd-extension-manager__card-group{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}.edd-extension-manager__card--horizontal .edd-extension-manager__body{-ms-grid-columns:minmax(0,300px) 1fr;grid-template-columns:minmax(0,300px) 1fr;-ms-grid-rows:1fr auto;grid-template-rows:1fr auto;grid-auto-flow:column}.edd-extension-manager__card--horizontal .edd-extension-manager__image{-ms-grid-row:1;-ms-grid-row-span:3;grid-row:1/4}.edd-extension-manager__card--horizontal .edd-extension-manager__description,.edd-extension-manager__features{-ms-grid-row-align:center;align-self:center}}@media screen and (min-width:783px){.edd-extension-manager__card--detailed-2col .edd-extension-manager__body{-ms-grid-columns:minmax(0,375px) 1fr;grid-template-columns:minmax(0,375px) 1fr;grid-auto-flow:column}}.edd-extension-manager__card--installer[data-filter*=recommended] .edd-extension-manager__icon{border-bottom-right-radius:0;border-bottom-left-radius:0}.edd-plugin__recommended{font-size:8px;background:#008a20;color:#fff;margin-right:-1px;margin-left:-1px;padding:6px 0;border-radius:0 0 4px 4px;line-height:1;text-align:center;width:80px} \ No newline at end of file diff --git a/assets/css/edd-admin-extension-manager.min.css b/assets/css/edd-admin-extension-manager.min.css new file mode 100644 index 00000000000..77bd011b146 --- /dev/null +++ b/assets/css/edd-admin-extension-manager.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-extension-manager__bar{justify-content:space-between;flex-wrap:wrap}.edd-extension-manager__bar,.edd-extension-manager__bar-heading{display:flex;align-items:center;gap:1em}.edd-extension-manager__bar input[type=search]{background-color:#fff;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMjEgMjFsLTUuMTk3LTUuMTk3bTAgMEE3LjUgNy41IDAgMTA1LjE5NiA1LjE5NmE3LjUgNy41IDAgMDAxMC42MDcgMTAuNjA3eiIvPjwvc3ZnPg==);background-size:1em;background-repeat:no-repeat;background-position:97%}.edd-extension-manager__bar input[type=search]:active,.edd-extension-manager__bar input[type=search]:focus,.edd-extension-manager__bar input[type=search]:hover{background-image:none}.edd-extension-manager__body{display:-ms-grid;display:grid;gap:1.5em;-ms-grid-rows:auto 1fr;grid-template-rows:auto 1fr;flex-grow:1}.edd-extension-manager__body img{max-width:100%}.edd-extension-manager__body .notice{max-width:320px}.edd-extension-manager__title{line-height:1.4;margin:0 1em 1em 0}.edd-extension-manager__title a{color:#32373c}.button.edd-extension-manager__action-upgrade{background-color:#008a20;color:#fff}.button.edd-extension-manager__action-upgrade:active,.button.edd-extension-manager__action-upgrade:hover{background-color:#005714;color:#fff}.edd-extension-manager__card--installer .button{display:flex;justify-content:center;align-items:center;gap:5px;margin:0}.edd-extension-manager__card--installer .button:before{margin:0}.edd-extension-manager__card--installer .button.edd-button__install{color:#32373c;border-color:#7e8993}.edd-extension-manager__card--installer .button.edd-button__install:before{content:" ";display:block;width:1em;height:1em;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05LjExMiAxdjUuMDc2aDEuODUydi43NEw4IDkuNzgyIDUuMDM2IDYuODE3di0uNzQxaDEuODUzVjFoMi4yMjN6bS01LjkyOCA5LjE1MnYxLjg1Mmg5LjYzM3YtMS44NTJoMi45NjR2NC44MTZILjIxOXYtNC44MTdoMi45NjV6IiBmaWxsPSIjOTk5Ii8+PC9zdmc+);background-size:1em}.edd-extension-manager__card--installer .button.edd-button__install.edd-updating:before{background:none;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #f9f9f9;border-bottom-color:#7e8993;border-radius:100%;content:"";width:12px;height:12px;transform:translate3d(-50%,-50%,0);will-change:transform}.edd-extension-manager__control .edd-button__toggle{position:relative;margin:0;padding:0;width:36px;height:20px;min-height:unset;background-color:#c3c4c7;transition:background .2s ease;border-radius:30px;box-shadow:none;border:none}.edd-extension-manager__control .edd-button__toggle:after{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%}.edd-plugin__active .edd-extension-manager__control .edd-button__toggle:after{transform:translateX(16px)}.edd-extension-manager__control .edd-button__toggle:active,.edd-extension-manager__control .edd-button__toggle:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px #7e8993}.edd-extension-manager__control .edd-button__toggle:hover{background-color:#7e8993}.edd-extension-manager__control .edd-button__toggle:disabled{background-color:#7e8993!important}.edd-extension-manager__control .edd-button__toggle:disabled:before{position:absolute;top:3px;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:10px;height:10px;transform:translate3d(-50%,-50%,0);will-change:transform}.edd-extension-manager__control .edd-button__toggle:disabled:after{display:none}.edd-plugin__active .edd-extension-manager__control .edd-button__toggle{background-color:var(--wp-admin-theme-color)}.edd-plugin__active .edd-extension-manager__control .edd-button__toggle :active,.edd-plugin__active .edd-extension-manager__control .edd-button__toggle :focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}@media screen and (max-width:782px){.edd-extension-manager__control{min-height:40px}}.edd-extension-manager__activate{display:flex;align-items:center;gap:.5em;min-height:30px;border:1px solid #c3c4c7;border-radius:4px;padding:3px 10px}a.button.edd-extension-manager__button-settings{display:none;position:absolute;top:1em;right:1em;min-height:unset;height:1.5em;width:1.5em;padding:1em;border:none;background-color:#f9f9f9}a.button.edd-extension-manager__button-settings,a.button.edd-extension-manager__button-settings:active,a.button.edd-extension-manager__button-settings:hover{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS4yOSA2LjI5M2wtMS41MTUuODc1YTUuODczIDUuODczIDAgMDEwIDEuNjY0bDEuNTE1Ljg3NS0yLjE2NiAzLjc1My0xLjUxNi0uODc1YTUuODI3IDUuODI3IDAgMDEtMS40NDEuODMzdjEuNzQ5SDUuODM0di0xLjc1YTUuODI1IDUuODI1IDAgMDEtMS40NDEtLjgzMmwtMS41MTYuODc1TC43MSA5LjcwN2wxLjUxNi0uODc1YTUuODc4IDUuODc4IDAgMDEwLTEuNjY0TC43MSA2LjI5MyAyLjg3NyAyLjU0bDEuNTE2Ljg3NmE1LjgyNyA1LjgyNyAwIDAxMS40NC0uODMzVi44MzNoNC4zMzR2MS43NWE1LjgzIDUuODMgMCAwMTEuNDQuODMzbDEuNTE3LS44NzYgMi4xNjYgMy43NTN6TTggMTAuMzMzYTIuMzMzIDIuMzMzIDAgMTAwLTQuNjY2IDIuMzMzIDIuMzMzIDAgMDAwIDQuNjY2eiIgZmlsbD0iIzZCNzI4MCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUuMjkgNi4yOTNsLTEuNTE1Ljg3NWE1Ljg3MyA1Ljg3MyAwIDAxMCAxLjY2NGwxLjUxNS44NzUtMi4xNjYgMy43NTMtMS41MTYtLjg3NWE1LjgyNyA1LjgyNyAwIDAxLTEuNDQxLjgzM3YxLjc0OUg1LjgzNHYtMS43NWE1LjgyNSA1LjgyNSAwIDAxLTEuNDQxLS44MzJsLTEuNTE2Ljg3NUwuNzEgOS43MDdsMS41MTYtLjg3NWE1Ljg3OCA1Ljg3OCAwIDAxMC0xLjY2NEwuNzEgNi4yOTMgMi44NzcgMi41NGwxLjUxNi44NzZhNS44MjcgNS44MjcgMCAwMTEuNDQtLjgzM1YuODMzaDQuMzM0djEuNzVhNS44MyA1LjgzIDAgMDExLjQ0LjgzM2wxLjUxNy0uODc2IDIuMTY2IDMuNzUzek04IDEwLjMzM2EyLjMzMyAyLjMzMyAwIDEwMC00LjY2NiAyLjMzMyAyLjMzMyAwIDAwMCA0LjY2NnoiIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iLjUiLz48L3N2Zz4=);background-size:1.25em;background-repeat:no-repeat;background-position:50%}.edd-plugin__active a.button.edd-extension-manager__button-settings{display:block}.edd-extension-manager__card{background-color:#fff;padding:2em;margin:0;display:flex;flex-direction:column;justify-content:space-between}.edd-extension-manager__card.edd-hidden{display:none}.inside .edd-extension-manager__card{padding:0}.edd-extension-manager__features ul{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.edd-extension-manager__features .dashicons-yes{color:#008a20;margin-right:.25em}.edd-extension-manager__wrap{max-width:1440px}.edd-extension-manager__card-group{transition:all .5s}@supports(grid-area:auto){.edd-extension-manager__card-group{display:grid;grid-template-columns:auto;gap:1em;margin-top:40px}p+.edd-extension-manager__card-group{margin-top:24px}}.edd-extension-manager__group{display:-ms-grid;display:grid}.edd-extension-manager__unlock{margin-top:4em}.edd-extension-manager__icon{background-color:#fff;border:1px solid #e0e0e0;border-radius:4px;width:78px;height:78px}.edd-extension-manager__icon img{border-radius:12px;display:block;margin:0;padding:9px;width:60px}.edd-extension-manager__image img{display:block;margin:0 auto;max-width:500px;width:100%}.edd-extension-manager__card--installer{border:1px solid #dcdcde;border-radius:3px;padding:0}.edd-extension-manager__card--installer>div{padding:2em}.edd-extension-manager__card--installer>div:not(:last-child){border-bottom:1px solid #e0e0e0}.edd-extension-manager__card--installer .notice{margin:0 -1em!important}.edd-extension-manager__card--installer .notice:not(:last-child){margin-bottom:1em}.edd-extension-manager__card--installer .edd-extension-manager__body{-ms-grid-columns:80px 1fr;grid-template-columns:80px 1fr;-ms-grid-rows:unset;grid-template-rows:unset;position:relative}.edd-extension-manager__card--installer .edd-extension-manager__body p:last-child{margin-bottom:0}.edd-extension-manager__card--installer .edd-extension-manager__actions{background:#f9f9f9;display:flex;justify-content:space-between;align-items:center;padding:1em 2em}.edd-extension-manager__card--installer .edd-extension-manager__actions>:only-child{margin-left:auto}.edd-extension-manager__card--installer .edd-extension-manager__status{font-weight:600}.edd-extension-manager__card--overlay{text-align:left;padding:0}.edd-extension-manager__card--overlay .edd-extension-manager__card{padding:0}.edd-extension-manager__card--overlay .edd-extension-manager__title{line-height:unset;margin-bottom:.5em}.edd-extension-manager__card--overlay .edd-extension-manager__actions{background-color:#f9f9f9;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-start;align-items:center;gap:.5em;margin:0 -2em -2em;padding:16px 24px}.edd-extension-manager__card--overlay .edd-extension-manager__actions .button{margin:0}.edd-extension-manager__key-notice{background:#fff;border:1px solid #d63638;border-radius:4px;padding:1em}.edd-extension-manager__key-notice p:first-child{margin-top:0}.edd-extension-manager__step{-ms-grid-row:1;grid-area:1/-1;margin:0}.edd-extension-manager__step:not(:first-of-type){display:none}.edd-extension-manager__step .button{display:table;margin:0 auto;text-align:center;white-space:normal}td .edd-extension-manager__step .button{display:inline-block}.edd-settings-wrap.has-product-education .edd-settings-content{width:100%;max-width:100%}.edd-extension-manager__card--horizontal{margin:24px 0;max-width:700px}.edd-extension-manager__card--detailed{background-color:transparent;max-width:700px}.edd-extension-manager__card--detailed-2col{background-color:transparent;max-width:900px;margin:0 auto}.edd-extension-manager__card--detailed-2col h3{font-size:1.5rem;margin-bottom:10px;text-align:center}.edd-extension-manager__card--detailed-2col .edd-extension-manager__body{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;grid-gap:1em}.edd-extension-manager__card--detailed-2col .edd-extension-manager__title,.edd-extension-manager__card--detailed .edd-extension-manager__title{border-bottom:1px solid #ccc;padding-bottom:1em}@media screen and (min-width:600px){.edd-extension-manager__card-group{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}.edd-extension-manager__card--horizontal .edd-extension-manager__body{-ms-grid-columns:minmax(0,300px) 1fr;grid-template-columns:minmax(0,300px) 1fr;-ms-grid-rows:1fr auto;grid-template-rows:1fr auto;grid-auto-flow:column}.edd-extension-manager__card--horizontal .edd-extension-manager__image{-ms-grid-row:1;-ms-grid-row-span:3;grid-row:1/4}.edd-extension-manager__card--horizontal .edd-extension-manager__description,.edd-extension-manager__features{-ms-grid-row-align:center;align-self:center}}@media screen and (min-width:783px){.edd-extension-manager__card--detailed-2col .edd-extension-manager__body{-ms-grid-columns:minmax(0,375px) 1fr;grid-template-columns:minmax(0,375px) 1fr;grid-auto-flow:column}}.edd-extension-manager__card--installer[data-filter*=recommended] .edd-extension-manager__icon{border-bottom-left-radius:0;border-bottom-right-radius:0}.edd-plugin__recommended{font-size:8px;background:#008a20;color:#fff;margin-left:-1px;margin-right:-1px;padding:6px 0;border-radius:0 0 4px 4px;line-height:1;text-align:center;width:80px} \ No newline at end of file diff --git a/assets/css/edd-admin-menu-rtl.min.css b/assets/css/edd-admin-menu-rtl.min.css new file mode 100644 index 00000000000..b2b49e0cac6 --- /dev/null +++ b/assets/css/edd-admin-menu-rtl.min.css @@ -0,0 +1 @@ +#menu-posts-download .wp-submenu{display:flex;flex-wrap:wrap}#menu-posts-download .wp-submenu li{width:100%}@media screen and (max-width:480px){#menu-posts-download.wp-not-current-submenu .wp-submenu{display:none}}#menu-posts-download a[href^="edit.php?post_type=download"]:focus,#menu-posts-download a[href^="edit.php?post_type=download"]:hover{box-shadow:inset -4px 0 0 0 currentColor;transition:box-shadow .1s linear}#menu-posts-download li>a[href^="post-new.php?post_type=download"]{display:none}#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-discount"]:after,#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-reports"]:after,#menu-posts-download li:not(:last-child) a[href^="post-new.php?post_type=download"]:after,#menu-posts-download li:nth-last-child(2) a:after{border-bottom:1px solid hsla(0,0%,100%,.2);display:block;float:right;margin:13px -15px 8px;content:"";width:calc(100% + 26px)}@media screen and (max-width:782px){#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-discount"]:after,#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-reports"]:after,#menu-posts-download li:not(:last-child) a[href^="post-new.php?post_type=download"]:after,#menu-posts-download li:nth-last-child(2) a:after{margin:20px -20px 8px;width:calc(100% + 30px)}}#adminmenu #menu-posts-download ul.wp-submenu-wrap li{clear:both}#adminmenu #menu-posts-download a.wp-has-current-submenu:after{display:none}ul#adminmenu #menu-posts-download ul.wp-submenu li.current a:before{left:0;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:8px solid transparent;border-left-color:#f6f7f7;margin-top:2px}a.edd-onboarding__menu-item{background:#dd823b!important;color:#fff!important;font-weight:600}a.edd-onboarding__menu-item:hover{color:#000!important}a.edd-sidebar__upgrade-pro,a.edd-sidebar__upgrade-pro:hover{background-color:#1da867!important;color:#fff!important;font-weight:600}.edd-admin-menu__new{color:#f18200;vertical-align:super;font-size:9px;margin-right:3px} \ No newline at end of file diff --git a/assets/css/edd-admin-menu.min.css b/assets/css/edd-admin-menu.min.css new file mode 100644 index 00000000000..0444a32526b --- /dev/null +++ b/assets/css/edd-admin-menu.min.css @@ -0,0 +1 @@ +#menu-posts-download .wp-submenu{display:flex;flex-wrap:wrap}#menu-posts-download .wp-submenu li{width:100%}@media screen and (max-width:480px){#menu-posts-download.wp-not-current-submenu .wp-submenu{display:none}}#menu-posts-download a[href^="edit.php?post_type=download"]:focus,#menu-posts-download a[href^="edit.php?post_type=download"]:hover{box-shadow:inset 4px 0 0 0 currentColor;transition:box-shadow .1s linear}#menu-posts-download li>a[href^="post-new.php?post_type=download"]{display:none}#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-discount"]:after,#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-reports"]:after,#menu-posts-download li:not(:last-child) a[href^="post-new.php?post_type=download"]:after,#menu-posts-download li:nth-last-child(2) a:after{border-bottom:1px solid hsla(0,0%,100%,.2);display:block;float:left;margin:13px -15px 8px;content:"";width:calc(100% + 26px)}@media screen and (max-width:782px){#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-discount"]:after,#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-reports"]:after,#menu-posts-download li:not(:last-child) a[href^="post-new.php?post_type=download"]:after,#menu-posts-download li:nth-last-child(2) a:after{margin:20px -20px 8px;width:calc(100% + 30px)}}#adminmenu #menu-posts-download ul.wp-submenu-wrap li{clear:both}#adminmenu #menu-posts-download a.wp-has-current-submenu:after{display:none}ul#adminmenu #menu-posts-download ul.wp-submenu li.current a:before{right:0;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:8px solid transparent;border-right-color:#f6f7f7;margin-top:2px}a.edd-onboarding__menu-item{background:#dd823b!important;color:#fff!important;font-weight:600}a.edd-onboarding__menu-item:hover{color:#000!important}a.edd-sidebar__upgrade-pro,a.edd-sidebar__upgrade-pro:hover{background-color:#1da867!important;color:#fff!important;font-weight:600}.edd-admin-menu__new{color:#f18200;vertical-align:super;font-size:9px;margin-left:3px} \ No newline at end of file diff --git a/assets/css/edd-admin-notifications-rtl.min.css b/assets/css/edd-admin-notifications-rtl.min.css new file mode 100644 index 00000000000..ed16c4df6fc --- /dev/null +++ b/assets/css/edd-admin-notifications-rtl.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-overlay{position:fixed;z-index:1052;top:0;left:0;bottom:0;right:160px;background-color:#141b38;opacity:.5;transition:.5s}.edd-slide-in{transform:translateX(-100%)!important;-webkit-transform:translateX(-100%)!important}#edd-notifications-panel{background-color:#fff;height:100%;width:100%;max-width:570px;position:fixed;z-index:1053;top:0;left:0;bottom:0;overflow-x:hidden;transition:.5s;transform:translateX(0);-webkit-transform:translateX(0)}body.admin-bar #edd-notifications-panel{top:32px}@media screen and (max-width:600px){body.admin-bar #edd-notifications-panel{top:46px}}#edd-notifications-header{display:flex;align-items:center;padding:0 30px;color:#fff;background-color:#0c5d95}#edd-notifications-header h3{color:#fff;flex:1}#edd-notifications-header .edd-close{background:none;border:none;color:#fff;cursor:pointer}#edd-notifications-body{padding:30px}.edd-notification{display:flex;gap:20px;margin-bottom:20px}.edd-notification--icon{color:#00aa63}.edd-notification--icon.edd-notification--icon-info{color:#005ae0}.edd-notification--icon.edd-notification--icon-warning{color:#f18200}.edd-notification--icon.edd-notification--icon-error{color:#df2a4a}.edd-notification--body{flex:1}.edd-notification--header{align-items:center;display:flex;justify-content:space-between;gap:5px;margin-bottom:7px}.edd-notification--title{color:#141b38;flex:1;font-size:16px;font-weight:600;margin:0}.edd-notification--date{color:#71747e;font-size:12px}.edd-notification--actions{flex-wrap:wrap;display:flex;align-items:center;gap:5px;margin-top:10px}.edd-notification--dismiss{background:none!important;border:none!important;box-shadow:none!important;color:#71747e!important;cursor:pointer;padding:0 10px;text-decoration:underline}.edd-notification--dismiss:hover{text-decoration:none} \ No newline at end of file diff --git a/assets/css/edd-admin-notifications.min.css b/assets/css/edd-admin-notifications.min.css new file mode 100644 index 00000000000..8206388f382 --- /dev/null +++ b/assets/css/edd-admin-notifications.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-overlay{position:fixed;z-index:1052;top:0;right:0;bottom:0;left:160px;background-color:#141b38;opacity:.5;transition:.5s}.edd-slide-in{transform:translateX(100%)!important;-webkit-transform:translateX(100%)!important}#edd-notifications-panel{background-color:#fff;height:100%;width:100%;max-width:570px;position:fixed;z-index:1053;top:0;right:0;bottom:0;overflow-x:hidden;transition:.5s;transform:translateX(0);-webkit-transform:translateX(0)}body.admin-bar #edd-notifications-panel{top:32px}@media screen and (max-width:600px){body.admin-bar #edd-notifications-panel{top:46px}}#edd-notifications-header{display:flex;align-items:center;padding:0 30px;color:#fff;background-color:#0c5d95}#edd-notifications-header h3{color:#fff;flex:1}#edd-notifications-header .edd-close{background:none;border:none;color:#fff;cursor:pointer}#edd-notifications-body{padding:30px}.edd-notification{display:flex;gap:20px;margin-bottom:20px}.edd-notification--icon{color:#00aa63}.edd-notification--icon.edd-notification--icon-info{color:#005ae0}.edd-notification--icon.edd-notification--icon-warning{color:#f18200}.edd-notification--icon.edd-notification--icon-error{color:#df2a4a}.edd-notification--body{flex:1}.edd-notification--header{align-items:center;display:flex;justify-content:space-between;gap:5px;margin-bottom:7px}.edd-notification--title{color:#141b38;flex:1;font-size:16px;font-weight:600;margin:0}.edd-notification--date{color:#71747e;font-size:12px}.edd-notification--actions{flex-wrap:wrap;display:flex;align-items:center;gap:5px;margin-top:10px}.edd-notification--dismiss{background:none!important;border:none!important;box-shadow:none!important;color:#71747e!important;cursor:pointer;padding:0 10px;text-decoration:underline}.edd-notification--dismiss:hover{text-decoration:none} \ No newline at end of file diff --git a/assets/css/edd-admin-onboarding-rtl.min.css b/assets/css/edd-admin-onboarding-rtl.min.css new file mode 100644 index 00000000000..34f11f2a3c1 --- /dev/null +++ b/assets/css/edd-admin-onboarding-rtl.min.css @@ -0,0 +1 @@ +:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}:root body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}:root body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}:root body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}:root body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}:root body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}:root body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}:root body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}:root body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}:root body.admin-color-evergreen{--wp-admin-theme-color:#36533f;--wp-admin-theme-color-darker-10:#2c4433;--wp-admin-theme-color-darker-20:#223428}:root body.admin-color-mint{--wp-admin-theme-color:#4f6d59;--wp-admin-theme-color-darker-10:#445e4d;--wp-admin-theme-color-darker-20:#3a4f41}.edd-onboarding{margin-top:80px}.edd-onboarding__logo img{display:block;width:300px;margin:0 auto 25px}.edd-onboarding__wrapper{max-width:1000px;margin:0 auto;position:relative}@media only screen and (max-width:1280px){.edd-onboarding__wrapper{max-width:850px}}.edd-onboarding__loading{z-index:99;position:fixed;right:0;top:0;width:100%;height:100%;padding-right:80px;padding-top:8px;display:flex;gap:20px;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center}.edd-onboarding__loading:before{position:absolute;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:35px;height:35px;transform:translate3d(50%,-50%,0);will-change:transform}.edd-onboarding__loading .edd-onboarding__loading-status{display:block;text-align:center;color:#000;flex-basis:100%;margin-top:80px}@media only screen and (max-width:600px){.edd-onboarding__loading{padding-right:0}}.edd-onboarding__loading-in-progress .edd-onboarding__single-step,.edd-onboarding__loading-in-progress .edd-onboarding__welcome-screen{position:relative}.edd-onboarding__loading-in-progress .edd-onboarding__single-step:before,.edd-onboarding__loading-in-progress .edd-onboarding__welcome-screen:before{content:"";position:absolute;right:0;top:0;width:100%;height:100%;background:hsla(0,0%,100%,.85);z-index:95}.edd-onboarding__steps{margin-top:25px}.edd-onboarding__steps ul{display:flex;gap:15px;position:relative}.edd-onboarding__steps ul:before{position:absolute;top:16px;right:50%;transform:translateX(50%);width:80%;height:2px;background:#dedfe0;content:"";z-index:-1}.edd-onboarding__steps ul li{flex:1;text-align:center}.edd-onboarding__steps ul li a{display:block;padding:5px 10px;color:#8a8e92;text-align:center;font-size:12px;text-decoration:none}.edd-onboarding__steps ul li a span{color:#fff;width:25px;height:25px;line-height:25px;font-size:12px;font-weight:400;border-radius:50%;background:#c2c4c6;display:inline-block;text-align:center;margin-bottom:10px;position:relative;box-shadow:none}.edd-onboarding__steps ul li a span:before{left:-8px}.edd-onboarding__steps ul li a span:after,.edd-onboarding__steps ul li a span:before{position:absolute;top:50%;transform:translateY(-50%);width:8px;height:10px;background:#f0f0f1;content:"";z-index:-1}.edd-onboarding__steps ul li a span:after{right:-8px}.edd-onboarding__steps ul li.active-step a,.edd-onboarding__steps ul li.active-step a small{color:#007cba;color:var(--wp-admin-theme-color);font-weight:500}.edd-onboarding__steps ul li.active-step a span{background:#007cba;background:var(--wp-admin-theme-color);box-shadow:0 0 4px 1px rgba(#007cba,.3);box-shadow:0 0 4px 1px rgba(var(--wp-admin-theme-color),.3)}.edd-onboarding__steps ul li.completed-step a span{width:25px;height:25px;line-height:25px;font-size:14px;background:#00ba37;box-shadow:none}.edd-onboarding__steps__name{color:#646970;display:block;font-size:11px}@media only screen and (max-width:600px){.edd-onboarding__steps ul li.completed-step a span,.edd-onboarding__steps ul li a span{width:20px;height:20px;line-height:20px}.edd-onboarding__steps__name{font-size:10px}}.edd-onboarding__current-step{position:relative}.edd-onboarding__single-step{background:#fff;border:1px solid #dedfe0;border-radius:3px;position:relative}.edd-onboarding__single-step-inner{padding:70px 140px 40px}.edd-onboarding__single-step-inner.equal{padding:70px 140px}@media only screen and (max-width:960px){.edd-onboarding__single-step-inner{padding:35px 70px 20px}.edd-onboarding__single-step-inner.equal{padding:35px 70px}}@media only screen and (max-width:600px){.edd-onboarding__single-step-inner{padding:17px 35px 10px}.edd-onboarding__single-step-inner.equal{padding:17px 35px}}.edd-onboarding__steps-indicator{opacity:.6;display:block}h1.edd-onboarding__single-step-title{font-size:24px;color:#141b38;font-weight:600}.edd-onboarding__single-step-subtitle{font-size:16px;line-height:22px;color:#141b38;font-weight:400;max-width:90%}.edd-onboarding__welcome-screen{width:100%;height:100%;background:#fff;display:flex;align-items:center}.edd-onboarding__welcome-screen h1{line-height:2rem}.edd-onboarding__welcome-screen-inner{padding:100px 80px;text-align:center}.edd-onboarding__testimonials-wrapper{display:-ms-grid;display:grid;gap:1em}.edd-onboarding__testimonial{display:flex;font-size:1rem;text-align:right;justify-content:space-between;gap:2em;align-items:center}.edd-onboarding__testimonial:not(:last-of-type){border-bottom:1px solid #dedfe0;padding-bottom:2em}.edd-onboarding__testimonial-content{flex-grow:1}.edd-onboarding__testimonial-content>span.big{font-weight:600;font-size:15px;font-style:italic}.edd-onboarding__testimonial-avatar{width:75px;height:75px;border-radius:50%;display:block}.edd-onboarding__testimonial-info{display:flex;flex-direction:column;gap:.25em}.edd-onboarding__testimonial-info>.testimonial-name{font-weight:600}.edd-onboarding__testimonial-info>.testimonial-company{font-size:10px;font-style:italic}.edd-onboarding__testimonial-info>.testimonial-stars>span{color:#ffbb38;font-size:12px;height:12px;width:12px}.edd-onboarding__welcome-screen-get-started{color:#fff!important;background:#00ba37!important;border-color:#00ba37!important;margin:1em auto!important}.edd-onboarding__welcome-screen-get-started:hover{color:#fff!important;background:#008a20!important}.edd-onboarding__plugins-list{border-top:1px solid hsla(0,0%,92.9%,.5)}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin{padding:28px 20px;border-bottom:1px solid hsla(0,0%,92.9%,.5);border-right:1px solid hsla(0,0%,92.9%,.5);border-left:1px solid hsla(0,0%,92.9%,.5);transition:all .25s ease-out}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin h3{margin-top:0;transition:all .25s ease-out}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin p{margin-bottom:0;transition:all .25s ease-out}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-control{width:100px;display:flex;justify-content:flex-end}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-control .checkbox-control{padding:0;margin:0;position:relative}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-control .checkbox-control__indicator{position:relative;top:0}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-external-link{text-decoration:none}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-details label{display:flex;align-items:center;justify-content:space-between;gap:1em}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin.disabled,.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin.disabled:hover{background:rgba(114,178,129,.04)}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin:hover{background:rgba(#007cba,.02);background:rgba(var(--wp-admin-theme-color),.02)}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin:hover .edd-onboarding__plugins-details h3,.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin:hover .edd-onboarding__plugins-details p{color:#007cba;color:var(--wp-admin-theme-color)}.edd-onboarding__single-step-footer{border-top:1px solid #ededed;padding:35px 50px;display:flex;justify-content:space-between;align-items:center}.edd-onboarding__single-step-footer .edd-onboarding__button-back{color:#787c82;text-decoration:none;transition:all .2s ease-in-out;background:none;border:none;cursor:pointer}.edd-onboarding__single-step-footer .edd-onboarding__button-back:hover{color:#007cba;color:var(--wp-admin-theme-color)}.edd-onboarding__single-step-footer .edd-onboarding__button-skip-step{opacity:.6}@media only screen and (max-width:600px){.edd-onboarding__single-step-footer{padding:17px 25px;flex-wrap:wrap;gap:5px}}.edd-onboarding__close-and-exit{text-align:center;margin-top:20px}.edd-onboarding__close-and-exit button.button-link{color:#8a8e92!important;text-decoration:none!important}@media only screen and (max-width:782px){.edd-form-group__control{display:flex;align-items:center;gap:10px}}.edd-onboarding input:not([type=checkbox]):not([type=radio]){border:1px solid #dedfe0!important;border-radius:2px!important;padding:2px 8px!important;width:100%}.edd-onboarding .quicktags-toolbar input.ed_button{width:auto}.edd-onboarding .edd-check-wrapper{display:flex;align-items:center}.wp-core-ui .edd-onboarding select{font-size:14px;line-height:2;border-color:#dedfe0;box-shadow:none;border-radius:2px;padding:0 8px 0 24px;min-height:30px;max-width:25rem;-webkit-appearance:none;background-size:16px 16px;cursor:pointer;vertical-align:middle}.edd-onboarding .form-table th{vertical-align:middle}.edd-onboarding .form-table,.edd-onboarding .form-table td,.edd-onboarding .form-table td p{color:#8a8e92;font-size:13px;line-height:18px}.edd-onboarding .form-table th,.edd-onboarding .form-wrap label,.edd-settings-form__email label{color:#141b38;font-weight:400;text-shadow:none;vertical-align:baseline}.edd-onboarding td[colspan="2"]{padding:0}.edd-onboarding__stripe-features-listing{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));list-style-type:none;margin-right:0;padding-right:0;margin-top:20px}.edd-onboarding__stripe-features-listing li{list-style-type:none;position:relative;padding-right:28px;color:#3c434a;font-size:12px;margin-bottom:10px;margin-left:10px}.edd-onboarding__stripe-features-listing li:before{position:absolute;top:0;right:0;content:"✓";background:#e9e4fe;color:#635bff;width:20px;height:20px;line-height:20px;text-align:center;border-radius:50%;display:inline-block}.edd-onboarding__stripe-content-holder{max-width:75%;margin:25px auto;background:rgba(241,238,250,.3);padding:50px 40px;border-radius:4px;border:1px solid rgba(241,238,250,.5)}.edd-onboarding__stripe-content-holder .edd-onboarding__stripe-content-logo{text-align:center;margin-bottom:25px;border-bottom:1px solid #ededed;padding-bottom:25px}.edd-onboarding__stripe-content-holder .edd-onboarding__stripe-content-logo img{max-width:180px}.edd-onboarding__stripe-content-holder .edd-onboarding__stripe-content-logo span{text-align:center;font-size:13px;line-height:20px;display:block;max-width:300px;margin:0 auto}@media only screen and (max-width:960px){.edd-onboarding__stripe-content-holder{padding:25px 20px;max-width:100%}}.edd-onboarding__button-stripe{display:block;text-align:center;margin-top:20px}#edds-stripe-disconnect-reconnect{margin-top:10px}.edd-onboarding__stripe-features-title{display:block;text-align:center;font-size:16px;margin-bottom:10px;color:#625bff;font-weight:500}.edd-onboarding__stripe-additional-text{text-align:center;font-size:11px;line-height:14px;display:block;max-width:400px;margin:30px auto 0;opacity:.6}.checkbox-control{position:relative;padding-right:30px;margin-bottom:15px;cursor:pointer;font-size:18px}.checkbox-control input{position:absolute;z-index:-1;opacity:0}.checkbox-control__indicator{position:absolute;top:2px;right:0;height:25px;width:25px;background:#f0f0f1;border-radius:3px}.checkbox-control:hover input~.checkbox-control__indicator,.checkbox-control input:focus~.checkbox-control__indicator{background:#eaeaec}.checkbox-control:hover input:not([disabled]):checked~.checkbox-control__indicator,.checkbox-control input:checked:focus~.checkbox-control__indicator,.checkbox-control input:checked~.checkbox-control__indicator{background:#007cba;background:var(--wp-admin-theme-color)}.checkbox-control input:disabled~.checkbox-control__indicator{background:#00ba37;pointer-events:none}.checkbox-control__indicator:after{content:"";position:absolute;display:none}.checkbox-control input:checked~.checkbox-control__indicator:after{display:block}.checkbox-control--checkbox .checkbox-control__indicator:after{right:9px;top:4px;width:5px;height:12px;border:solid #fff;border-width:0 0 2.5px 2.5px;transform:rotate(-40deg)}.checkbox-control--checkbox input:disabled~.checkbox-control__indicator:after{border-color:#fff}.checkbox-control.small-checkbox{padding-right:24px;margin-bottom:10px;font-size:13px}.small-checkbox .checkbox-control__indicator{top:0;right:0;height:17px;width:17px;background:#eaeaec}.checkbox-control.small-checkbox:hover input~.checkbox-control__indicator,.checkbox-control.small-checkbox input:focus~.checkbox-control__indicator{background:#dedfe0}.checkbox-control.small-checkbox:hover input:not([disabled]):checked~.checkbox-control__indicator,.checkbox-control.small-checkbox input:checked:focus~.checkbox-control__indicator,.checkbox-control.small-checkbox input:checked~.checkbox-control__indicator{background:#007cba;background:var(--wp-admin-theme-color)}.checkbox-control.small-checkbox input:disabled~.checkbox-control__indicator{background:#72b281}.checkbox-control--checkbox.small-checkbox .checkbox-control__indicator:after{right:6px;top:2.5px;width:3px;height:8px;border:solid #f6f7f7;border-width:0 0 2px 2px;transform:rotate(-40deg)}.edd-onboarding__get-suggestions-section{margin-top:30px;text-align:center;padding:50px 50px 40px;background:rgba(12,93,149,.04);border-radius:2px;border:1px solid rgba(12,93,149,.06)}.edd-onboarding__get-suggestions-section h3{margin-top:0;line-height:25px}.edd-onboarding__get-suggestions-section .edd-onboarding__get-suggestions-section_label{display:block;margin-bottom:1em}.edd-onboarding__get-suggestions-section .edd-toggle{justify-content:center}.edd-onboarding__selected-plugins{text-align:center;margin-top:25px}.edd-onboarding__install-success-wrapper{z-index:99;position:fixed;right:0;top:0;width:100%;height:100%;padding-right:80px;padding-top:8px;display:flex;align-items:center;justify-content:center;font-size:21px}.edd-onboarding__install-success-wrapper .edd-onboarding__install-success{display:flex;flex-wrap:wrap;gap:25px;text-align:center}.edd-onboarding__install-success-wrapper .edd-onboarding__install-success span{display:block;flex-basis:100%}.edd-onboarding__install-success-wrapper .edd-onboarding__install-success .emoji{font-size:65px}@media only screen and (max-width:960px){.edd-onboarding__install-success-wrapper{padding-right:0}}.edd-onboarding__product-files-row td,.edd-onboarding__product-pricing-row td{padding:0}.edd-onboarding__product-image-wrapper{display:flex;justify-content:space-between;gap:4px}.edd-onboarding__pricing-option-pill{display:flex}.edd-onboarding__pricing-option-pill button{display:inline-block;flex:1;border:1px solid #ccc;padding:10px 15px;cursor:pointer}.edd-onboarding__pricing-option-pill button:hover:not(.active){background:#dbdcdd}.edd-onboarding__pricing-option-pill .left-option{border-top-right-radius:2px;border-bottom-right-radius:2px}.edd-onboarding__pricing-option-pill .right-option{border-right:none;border-top-left-radius:2px;border-bottom-left-radius:2px}.edd-onboarding__pricing-option-pill .active{background:#007cba;background:var(--wp-admin-theme-color);border-color:#007cba;border-color:var(--wp-admin-theme-color);border-left-color:#ccc;color:#fff}.no-table-row-padding td{padding:0}.edd-onboarding__product-variable-price{display:none}.edd-onboarding__multi-option-toggle,.edd-onboarding__upload-files-toggle{display:flex;align-items:center}.edd-onboarding__multi-option-toggle span,.edd-onboarding__upload-files-toggle span{margin-right:10px}.edd-onboarding__upload-files-toggle span{color:#1d2327;font-size:1.3em;font-weight:600;display:block;margin-top:1em;margin-bottom:1em}.edd-onboarding__pricing-options-label{display:block;color:#141b38;font-weight:400;text-shadow:none;vertical-align:baseline;font-size:14px;margin-top:20px;margin-bottom:20px}.edd-add-repeatable-row{border-top:none;padding-top:8px;margin-bottom:5px}.edd-onboarding__actions{display:flex;gap:1em;justify-content:center;margin-top:2em}.edd-onboarding__actions button.edd-promo-notice-dismiss{margin:0}@media screen and (min-width:782px){.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide){display:table-row}.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide) .edd-form-group__control,.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide) label{display:table-cell}.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide) label{text-align:right;padding:20px 0 20px 10px;width:200px;line-height:1.3}} \ No newline at end of file diff --git a/assets/css/edd-admin-onboarding.min.css b/assets/css/edd-admin-onboarding.min.css new file mode 100644 index 00000000000..b30635b96b8 --- /dev/null +++ b/assets/css/edd-admin-onboarding.min.css @@ -0,0 +1 @@ +:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}:root body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}:root body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}:root body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}:root body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}:root body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}:root body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}:root body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}:root body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}:root body.admin-color-evergreen{--wp-admin-theme-color:#36533f;--wp-admin-theme-color-darker-10:#2c4433;--wp-admin-theme-color-darker-20:#223428}:root body.admin-color-mint{--wp-admin-theme-color:#4f6d59;--wp-admin-theme-color-darker-10:#445e4d;--wp-admin-theme-color-darker-20:#3a4f41}.edd-onboarding{margin-top:80px}.edd-onboarding__logo img{display:block;width:300px;margin:0 auto 25px}.edd-onboarding__wrapper{max-width:1000px;margin:0 auto;position:relative}@media only screen and (max-width:1280px){.edd-onboarding__wrapper{max-width:850px}}.edd-onboarding__loading{z-index:99;position:fixed;left:0;top:0;width:100%;height:100%;padding-left:80px;padding-top:8px;display:flex;gap:20px;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center}.edd-onboarding__loading:before{position:absolute;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:35px;height:35px;transform:translate3d(-50%,-50%,0);will-change:transform}.edd-onboarding__loading .edd-onboarding__loading-status{display:block;text-align:center;color:#000;flex-basis:100%;margin-top:80px}@media only screen and (max-width:600px){.edd-onboarding__loading{padding-left:0}}.edd-onboarding__loading-in-progress .edd-onboarding__single-step,.edd-onboarding__loading-in-progress .edd-onboarding__welcome-screen{position:relative}.edd-onboarding__loading-in-progress .edd-onboarding__single-step:before,.edd-onboarding__loading-in-progress .edd-onboarding__welcome-screen:before{content:"";position:absolute;left:0;top:0;width:100%;height:100%;background:hsla(0,0%,100%,.85);z-index:95}.edd-onboarding__steps{margin-top:25px}.edd-onboarding__steps ul{display:flex;gap:15px;position:relative}.edd-onboarding__steps ul:before{position:absolute;top:16px;left:50%;transform:translateX(-50%);width:80%;height:2px;background:#dedfe0;content:"";z-index:-1}.edd-onboarding__steps ul li{flex:1;text-align:center}.edd-onboarding__steps ul li a{display:block;padding:5px 10px;color:#8a8e92;text-align:center;font-size:12px;text-decoration:none}.edd-onboarding__steps ul li a span{color:#fff;width:25px;height:25px;line-height:25px;font-size:12px;font-weight:400;border-radius:50%;background:#c2c4c6;display:inline-block;text-align:center;margin-bottom:10px;position:relative;box-shadow:none}.edd-onboarding__steps ul li a span:before{right:-8px}.edd-onboarding__steps ul li a span:after,.edd-onboarding__steps ul li a span:before{position:absolute;top:50%;transform:translateY(-50%);width:8px;height:10px;background:#f0f0f1;content:"";z-index:-1}.edd-onboarding__steps ul li a span:after{left:-8px}.edd-onboarding__steps ul li.active-step a,.edd-onboarding__steps ul li.active-step a small{color:#007cba;color:var(--wp-admin-theme-color);font-weight:500}.edd-onboarding__steps ul li.active-step a span{background:#007cba;background:var(--wp-admin-theme-color);box-shadow:0 0 4px 1px rgba(#007cba,.3);box-shadow:0 0 4px 1px rgba(var(--wp-admin-theme-color),.3)}.edd-onboarding__steps ul li.completed-step a span{width:25px;height:25px;line-height:25px;font-size:14px;background:#00ba37;box-shadow:none}.edd-onboarding__steps__name{color:#646970;display:block;font-size:11px}@media only screen and (max-width:600px){.edd-onboarding__steps ul li.completed-step a span,.edd-onboarding__steps ul li a span{width:20px;height:20px;line-height:20px}.edd-onboarding__steps__name{font-size:10px}}.edd-onboarding__current-step{position:relative}.edd-onboarding__single-step{background:#fff;border:1px solid #dedfe0;border-radius:3px;position:relative}.edd-onboarding__single-step-inner{padding:70px 140px 40px}.edd-onboarding__single-step-inner.equal{padding:70px 140px}@media only screen and (max-width:960px){.edd-onboarding__single-step-inner{padding:35px 70px 20px}.edd-onboarding__single-step-inner.equal{padding:35px 70px}}@media only screen and (max-width:600px){.edd-onboarding__single-step-inner{padding:17px 35px 10px}.edd-onboarding__single-step-inner.equal{padding:17px 35px}}.edd-onboarding__steps-indicator{opacity:.6;display:block}h1.edd-onboarding__single-step-title{font-size:24px;color:#141b38;font-weight:600}.edd-onboarding__single-step-subtitle{font-size:16px;line-height:22px;color:#141b38;font-weight:400;max-width:90%}.edd-onboarding__welcome-screen{width:100%;height:100%;background:#fff;display:flex;align-items:center}.edd-onboarding__welcome-screen h1{line-height:2rem}.edd-onboarding__welcome-screen-inner{padding:100px 80px;text-align:center}.edd-onboarding__testimonials-wrapper{display:-ms-grid;display:grid;gap:1em}.edd-onboarding__testimonial{display:flex;font-size:1rem;text-align:left;justify-content:space-between;gap:2em;align-items:center}.edd-onboarding__testimonial:not(:last-of-type){border-bottom:1px solid #dedfe0;padding-bottom:2em}.edd-onboarding__testimonial-content{flex-grow:1}.edd-onboarding__testimonial-content>span.big{font-weight:600;font-size:15px;font-style:italic}.edd-onboarding__testimonial-avatar{width:75px;height:75px;border-radius:50%;display:block}.edd-onboarding__testimonial-info{display:flex;flex-direction:column;gap:.25em}.edd-onboarding__testimonial-info>.testimonial-name{font-weight:600}.edd-onboarding__testimonial-info>.testimonial-company{font-size:10px;font-style:italic}.edd-onboarding__testimonial-info>.testimonial-stars>span{color:#ffbb38;font-size:12px;height:12px;width:12px}.edd-onboarding__welcome-screen-get-started{color:#fff!important;background:#00ba37!important;border-color:#00ba37!important;margin:1em auto!important}.edd-onboarding__welcome-screen-get-started:hover{color:#fff!important;background:#008a20!important}.edd-onboarding__plugins-list{border-top:1px solid hsla(0,0%,92.9%,.5)}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin{padding:28px 20px;border-bottom:1px solid hsla(0,0%,92.9%,.5);border-left:1px solid hsla(0,0%,92.9%,.5);border-right:1px solid hsla(0,0%,92.9%,.5);transition:all .25s ease-out}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin h3{margin-top:0;transition:all .25s ease-out}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin p{margin-bottom:0;transition:all .25s ease-out}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-control{width:100px;display:flex;justify-content:flex-end}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-control .checkbox-control{padding:0;margin:0;position:relative}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-control .checkbox-control__indicator{position:relative;top:0}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-external-link{text-decoration:none}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin .edd-onboarding__plugins-details label{display:flex;align-items:center;justify-content:space-between;gap:1em}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin.disabled,.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin.disabled:hover{background:rgba(114,178,129,.04)}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin:hover{background:rgba(#007cba,.02);background:rgba(var(--wp-admin-theme-color),.02)}.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin:hover .edd-onboarding__plugins-details h3,.edd-onboarding__plugins-list .edd-onboarding__plugins-plugin:hover .edd-onboarding__plugins-details p{color:#007cba;color:var(--wp-admin-theme-color)}.edd-onboarding__single-step-footer{border-top:1px solid #ededed;padding:35px 50px;display:flex;justify-content:space-between;align-items:center}.edd-onboarding__single-step-footer .edd-onboarding__button-back{color:#787c82;text-decoration:none;transition:all .2s ease-in-out;background:none;border:none;cursor:pointer}.edd-onboarding__single-step-footer .edd-onboarding__button-back:hover{color:#007cba;color:var(--wp-admin-theme-color)}.edd-onboarding__single-step-footer .edd-onboarding__button-skip-step{opacity:.6}@media only screen and (max-width:600px){.edd-onboarding__single-step-footer{padding:17px 25px;flex-wrap:wrap;gap:5px}}.edd-onboarding__close-and-exit{text-align:center;margin-top:20px}.edd-onboarding__close-and-exit button.button-link{color:#8a8e92!important;text-decoration:none!important}@media only screen and (max-width:782px){.edd-form-group__control{display:flex;align-items:center;gap:10px}}.edd-onboarding input:not([type=checkbox]):not([type=radio]){border:1px solid #dedfe0!important;border-radius:2px!important;padding:2px 8px!important;width:100%}.edd-onboarding .quicktags-toolbar input.ed_button{width:auto}.edd-onboarding .edd-check-wrapper{display:flex;align-items:center}.wp-core-ui .edd-onboarding select{font-size:14px;line-height:2;border-color:#dedfe0;box-shadow:none;border-radius:2px;padding:0 24px 0 8px;min-height:30px;max-width:25rem;-webkit-appearance:none;background-size:16px 16px;cursor:pointer;vertical-align:middle}.edd-onboarding .form-table th{vertical-align:middle}.edd-onboarding .form-table,.edd-onboarding .form-table td,.edd-onboarding .form-table td p{color:#8a8e92;font-size:13px;line-height:18px}.edd-onboarding .form-table th,.edd-onboarding .form-wrap label,.edd-settings-form__email label{color:#141b38;font-weight:400;text-shadow:none;vertical-align:baseline}.edd-onboarding td[colspan="2"]{padding:0}.edd-onboarding__stripe-features-listing{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));list-style-type:none;margin-left:0;padding-left:0;margin-top:20px}.edd-onboarding__stripe-features-listing li{list-style-type:none;position:relative;padding-left:28px;color:#3c434a;font-size:12px;margin-bottom:10px;margin-right:10px}.edd-onboarding__stripe-features-listing li:before{position:absolute;top:0;left:0;content:"✓";background:#e9e4fe;color:#635bff;width:20px;height:20px;line-height:20px;text-align:center;border-radius:50%;display:inline-block}.edd-onboarding__stripe-content-holder{max-width:75%;margin:25px auto;background:rgba(241,238,250,.3);padding:50px 40px;border-radius:4px;border:1px solid rgba(241,238,250,.5)}.edd-onboarding__stripe-content-holder .edd-onboarding__stripe-content-logo{text-align:center;margin-bottom:25px;border-bottom:1px solid #ededed;padding-bottom:25px}.edd-onboarding__stripe-content-holder .edd-onboarding__stripe-content-logo img{max-width:180px}.edd-onboarding__stripe-content-holder .edd-onboarding__stripe-content-logo span{text-align:center;font-size:13px;line-height:20px;display:block;max-width:300px;margin:0 auto}@media only screen and (max-width:960px){.edd-onboarding__stripe-content-holder{padding:25px 20px;max-width:100%}}.edd-onboarding__button-stripe{display:block;text-align:center;margin-top:20px}#edds-stripe-disconnect-reconnect{margin-top:10px}.edd-onboarding__stripe-features-title{display:block;text-align:center;font-size:16px;margin-bottom:10px;color:#625bff;font-weight:500}.edd-onboarding__stripe-additional-text{text-align:center;font-size:11px;line-height:14px;display:block;max-width:400px;margin:30px auto 0;opacity:.6}.checkbox-control{position:relative;padding-left:30px;margin-bottom:15px;cursor:pointer;font-size:18px}.checkbox-control input{position:absolute;z-index:-1;opacity:0}.checkbox-control__indicator{position:absolute;top:2px;left:0;height:25px;width:25px;background:#f0f0f1;border-radius:3px}.checkbox-control:hover input~.checkbox-control__indicator,.checkbox-control input:focus~.checkbox-control__indicator{background:#eaeaec}.checkbox-control:hover input:not([disabled]):checked~.checkbox-control__indicator,.checkbox-control input:checked:focus~.checkbox-control__indicator,.checkbox-control input:checked~.checkbox-control__indicator{background:#007cba;background:var(--wp-admin-theme-color)}.checkbox-control input:disabled~.checkbox-control__indicator{background:#00ba37;pointer-events:none}.checkbox-control__indicator:after{content:"";position:absolute;display:none}.checkbox-control input:checked~.checkbox-control__indicator:after{display:block}.checkbox-control--checkbox .checkbox-control__indicator:after{left:9px;top:4px;width:5px;height:12px;border:solid #fff;border-width:0 2.5px 2.5px 0;transform:rotate(40deg)}.checkbox-control--checkbox input:disabled~.checkbox-control__indicator:after{border-color:#fff}.checkbox-control.small-checkbox{padding-left:24px;margin-bottom:10px;font-size:13px}.small-checkbox .checkbox-control__indicator{top:0;left:0;height:17px;width:17px;background:#eaeaec}.checkbox-control.small-checkbox:hover input~.checkbox-control__indicator,.checkbox-control.small-checkbox input:focus~.checkbox-control__indicator{background:#dedfe0}.checkbox-control.small-checkbox:hover input:not([disabled]):checked~.checkbox-control__indicator,.checkbox-control.small-checkbox input:checked:focus~.checkbox-control__indicator,.checkbox-control.small-checkbox input:checked~.checkbox-control__indicator{background:#007cba;background:var(--wp-admin-theme-color)}.checkbox-control.small-checkbox input:disabled~.checkbox-control__indicator{background:#72b281}.checkbox-control--checkbox.small-checkbox .checkbox-control__indicator:after{left:6px;top:2.5px;width:3px;height:8px;border:solid #f6f7f7;border-width:0 2px 2px 0;transform:rotate(40deg)}.edd-onboarding__get-suggestions-section{margin-top:30px;text-align:center;padding:50px 50px 40px;background:rgba(12,93,149,.04);border-radius:2px;border:1px solid rgba(12,93,149,.06)}.edd-onboarding__get-suggestions-section h3{margin-top:0;line-height:25px}.edd-onboarding__get-suggestions-section .edd-onboarding__get-suggestions-section_label{display:block;margin-bottom:1em}.edd-onboarding__get-suggestions-section .edd-toggle{justify-content:center}.edd-onboarding__selected-plugins{text-align:center;margin-top:25px}.edd-onboarding__install-success-wrapper{z-index:99;position:fixed;left:0;top:0;width:100%;height:100%;padding-left:80px;padding-top:8px;display:flex;align-items:center;justify-content:center;font-size:21px}.edd-onboarding__install-success-wrapper .edd-onboarding__install-success{display:flex;flex-wrap:wrap;gap:25px;text-align:center}.edd-onboarding__install-success-wrapper .edd-onboarding__install-success span{display:block;flex-basis:100%}.edd-onboarding__install-success-wrapper .edd-onboarding__install-success .emoji{font-size:65px}@media only screen and (max-width:960px){.edd-onboarding__install-success-wrapper{padding-left:0}}.edd-onboarding__product-files-row td,.edd-onboarding__product-pricing-row td{padding:0}.edd-onboarding__product-image-wrapper{display:flex;justify-content:space-between;gap:4px}.edd-onboarding__pricing-option-pill{display:flex}.edd-onboarding__pricing-option-pill button{display:inline-block;flex:1;border:1px solid #ccc;padding:10px 15px;cursor:pointer}.edd-onboarding__pricing-option-pill button:hover:not(.active){background:#dbdcdd}.edd-onboarding__pricing-option-pill .left-option{border-top-left-radius:2px;border-bottom-left-radius:2px}.edd-onboarding__pricing-option-pill .right-option{border-left:none;border-top-right-radius:2px;border-bottom-right-radius:2px}.edd-onboarding__pricing-option-pill .active{background:#007cba;background:var(--wp-admin-theme-color);border-color:#007cba;border-color:var(--wp-admin-theme-color);border-right-color:#ccc;color:#fff}.no-table-row-padding td{padding:0}.edd-onboarding__product-variable-price{display:none}.edd-onboarding__multi-option-toggle,.edd-onboarding__upload-files-toggle{display:flex;align-items:center}.edd-onboarding__multi-option-toggle span,.edd-onboarding__upload-files-toggle span{margin-left:10px}.edd-onboarding__upload-files-toggle span{color:#1d2327;font-size:1.3em;font-weight:600;display:block;margin-top:1em;margin-bottom:1em}.edd-onboarding__pricing-options-label{display:block;color:#141b38;font-weight:400;text-shadow:none;vertical-align:baseline;font-size:14px;margin-top:20px;margin-bottom:20px}.edd-add-repeatable-row{border-top:none;padding-top:8px;margin-bottom:5px}.edd-onboarding__actions{display:flex;gap:1em;justify-content:center;margin-top:2em}.edd-onboarding__actions button.edd-promo-notice-dismiss{margin:0}@media screen and (min-width:782px){.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide){display:table-row}.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide) .edd-form-group__control,.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide) label{display:table-cell}.edd-settings-form__email .edd-form-group:not(.edd-form-group__wide) label{text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3}} \ No newline at end of file diff --git a/assets/css/edd-admin-pass-handler-rtl.min.css b/assets/css/edd-admin-pass-handler-rtl.min.css new file mode 100644 index 00000000000..4e09346269b --- /dev/null +++ b/assets/css/edd-admin-pass-handler-rtl.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-pass-handler__description{display:-ms-grid;display:grid;gap:1em;margin-bottom:1em}.edd-pass-handler__control{display:flex;gap:4px;flex-wrap:wrap}.edd-pass-handler__control>input{max-width:250px!important}.edd-pass-handler__control+.notice{max-width:400px;margin-top:1em}.edd-pass-handler__control .button{margin:0}.edd-pass-handler__loading{display:flex;align-items:center;gap:.5em}.edd-pass-handler__loading:before{background:none;display:block;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:12px;height:12px;transform:translate3d(50%,-50%,0);will-change:transform}.edd-pass-handler__verifying-wrap{display:flex;position:fixed;right:36px;left:0;top:0;bottom:0;background:rgba(0,0,0,.5);justify-content:center;align-items:center;z-index:110}.edd-pass-handler__verifying-wrap p{background:#fff;border:1px solid #7e8993;border-radius:4px;padding:2em}@media only screen and (min-width:960px){.wp-admin:not(.folded) .edd-pass-handler__verifying-wrap{right:160px}}@media only screen and (max-width:782px){.edd-pass-handler__verifying-wrap{right:0}}.edd-pass-handler__verifying ul#adminmenu #menu-posts-download ul.wp-submenu li.current a:before{border-left-color:#787878}.edd-pass-handler__actions{display:flex;gap:4px}.edd-pass-handler__heading{width:100%} \ No newline at end of file diff --git a/assets/css/edd-admin-pass-handler.min.css b/assets/css/edd-admin-pass-handler.min.css new file mode 100644 index 00000000000..f2bead26200 --- /dev/null +++ b/assets/css/edd-admin-pass-handler.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-pass-handler__description{display:-ms-grid;display:grid;gap:1em;margin-bottom:1em}.edd-pass-handler__control{display:flex;gap:4px;flex-wrap:wrap}.edd-pass-handler__control>input{max-width:250px!important}.edd-pass-handler__control+.notice{max-width:400px;margin-top:1em}.edd-pass-handler__control .button{margin:0}.edd-pass-handler__loading{display:flex;align-items:center;gap:.5em}.edd-pass-handler__loading:before{background:none;display:block;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:12px;height:12px;transform:translate3d(-50%,-50%,0);will-change:transform}.edd-pass-handler__verifying-wrap{display:flex;position:fixed;left:36px;right:0;top:0;bottom:0;background:rgba(0,0,0,.5);justify-content:center;align-items:center;z-index:110}.edd-pass-handler__verifying-wrap p{background:#fff;border:1px solid #7e8993;border-radius:4px;padding:2em}@media only screen and (min-width:960px){.wp-admin:not(.folded) .edd-pass-handler__verifying-wrap{left:160px}}@media only screen and (max-width:782px){.edd-pass-handler__verifying-wrap{left:0}}.edd-pass-handler__verifying ul#adminmenu #menu-posts-download ul.wp-submenu li.current a:before{border-right-color:#787878}.edd-pass-handler__actions{display:flex;gap:4px}.edd-pass-handler__heading{width:100%} \ No newline at end of file diff --git a/assets/css/edd-admin-pointers-rtl.min.css b/assets/css/edd-admin-pointers-rtl.min.css new file mode 100644 index 00000000000..93b49b5332a --- /dev/null +++ b/assets/css/edd-admin-pointers-rtl.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-pointer.warning h3{background:#f0b849;border-color:#996800;color:#1a1a1a}.edd-pointer.warning h3:before{color:#f0b849}.edd-pointer.edd-has-action p:last-of-type{margin-bottom:2em}.edd-pointer .edd-pointer-action{position:absolute;right:15px;bottom:15px;background:#2271b1;border-color:#2271b1}.edd-pointer .edd-pointer-action:focus,.edd-pointer .edd-pointer-action:hover{background:#1a5686;border-color:#1a5686} \ No newline at end of file diff --git a/assets/css/edd-admin-pointers.min.css b/assets/css/edd-admin-pointers.min.css new file mode 100644 index 00000000000..d81bf3dc2f1 --- /dev/null +++ b/assets/css/edd-admin-pointers.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edd-pointer.warning h3{background:#f0b849;border-color:#996800;color:#1a1a1a}.edd-pointer.warning h3:before{color:#f0b849}.edd-pointer.edd-has-action p:last-of-type{margin-bottom:2em}.edd-pointer .edd-pointer-action{position:absolute;left:15px;bottom:15px;background:#2271b1;border-color:#2271b1}.edd-pointer .edd-pointer-action:focus,.edd-pointer .edd-pointer-action:hover{background:#1a5686;border-color:#1a5686} \ No newline at end of file diff --git a/assets/css/edd-admin-rtl.min.css b/assets/css/edd-admin-rtl.min.css new file mode 100644 index 00000000000..0bb845a84b6 --- /dev/null +++ b/assets/css/edd-admin-rtl.min.css @@ -0,0 +1 @@ +@media(min-width:782px){body.edd-admin-page #wpbody-content{padding-bottom:200px}}body.edd-admin-page #wpfooter .edd-footer-promotion{text-align:center;font-weight:400;font-size:13px;line-height:16px;color:#787c82;padding:20px 0 30px;margin-bottom:20px;margin-top:20px}body.edd-admin-page #wpfooter .edd-footer-promotion p{font-weight:600}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-links,body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social{display:flex;justify-content:center;align-items:center}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-links{margin:9px 0 0}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-links span{color:#c3c4c7;padding:0 7px}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social{margin:10px 0 0;gap:10px}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social li{margin-bottom:0}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social li path{fill:#a7aaad}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social li:hover path{fill:#50575e}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social a{display:block;height:16px}.edd-nav__wrapper{background-color:#fff;box-shadow:inset 0 -3px #e8e8e8;display:flex;justify-content:space-between;align-items:center;margin:0 -20px 10px 0;padding:0 20px;position:sticky;top:32px;z-index:30}@media screen and (max-width:782px){.edd-nav__wrapper{top:auto;position:relative;justify-content:center;flex-wrap:wrap}.edd-nav__wrapper .subtitle{padding:18px 12px}}.edd-nav__tabs{display:flex;flex-direction:row;justify-content:left;flex-wrap:wrap;margin:0;gap:8px}@media screen and (max-width:782px){.edd-nav__tabs{justify-content:center}}.edd-nav__tabs li{display:flex;align-items:flex-end;margin:0}.edd-nav__tabs li:focus,.edd-nav__tabs li:hover{box-shadow:inset 0 -3px #a7aaad}.edd-nav__tabs li.active{color:#0c5d95;box-shadow:inset 0 -3px #0c5d95}.edd-nav__tabs a.tab{border-bottom:none;box-shadow:none;outline:none;display:block;text-decoration:none;color:#646970;padding:18px 20px;font-weight:600;font-size:16px;text-align:center;white-space:nowrap}.edd-admin-page #wpbody-content>.notice:not(.inline){display:none;margin-right:0}.edd-dialog{display:none}.edd-item-header-small{padding-bottom:20px;border-bottom:1px solid #e5e5e5;display:flex;justify-content:flex-start;align-items:center;gap:6px}.edd-item-header-small span{font-weight:600;font-size:15px}.edd-admin-order-status-badge,.edd-status-badge{padding:2px 7px;border-radius:4px;background:#ececec;display:inline-flex;align-items:center;gap:2px}.edd-admin-order-status-badge__icon,.edd-status-badge__icon{opacity:.8}.edd-admin-order-status-badge--error,.edd-admin-order-status-badge--expired,.edd-admin-order-status-badge--failed,.edd-admin-order-status-badge--failing,.edd-admin-order-status-badge--red,.edd-admin-order-status-badge--rejected,.edd-admin-order-status-badge--revoked,.edd-status-badge--error,.edd-status-badge--expired,.edd-status-badge--failed,.edd-status-badge--failing,.edd-status-badge--red,.edd-status-badge--rejected,.edd-status-badge--revoked{color:#ac3d3d;background:#ffd6d6}.edd-admin-order-status-badge--active,.edd-admin-order-status-badge--approved,.edd-admin-order-status-badge--complete,.edd-admin-order-status-badge--completed,.edd-admin-order-status-badge--edd_subscription,.edd-admin-order-status-badge--green,.edd-admin-order-status-badge--partially_refunded,.edd-admin-order-status-badge--success,.edd-status-badge--active,.edd-status-badge--approved,.edd-status-badge--complete,.edd-status-badge--completed,.edd-status-badge--edd_subscription,.edd-status-badge--green,.edd-status-badge--partially_refunded,.edd-status-badge--success{color:#017d5c;background:#e5f5f0}.edd-admin-order-status-badge--pending,.edd-admin-order-status-badge--warning,.edd-admin-order-status-badge--yellow,.edd-status-badge--pending,.edd-status-badge--warning,.edd-status-badge--yellow{color:#996800;background:#f5f2e5}.edd-admin-order-status-badge--blue,.edd-admin-order-status-badge--info,.edd-admin-order-status-badge--processing,.edd-admin-order-status-badge--trialling,.edd-status-badge--blue,.edd-status-badge--info,.edd-status-badge--processing,.edd-status-badge--trialling{color:#016087;background:#e5f1f5}.edd-pro-upgrade,.edd-pro-upgrade:hover{color:#1da867;font-weight:600;text-decoration:none}.button.edd-pro-upgrade,.button.edd-pro-upgrade:hover{background-color:#1da867;color:#fff;border-color:#1da867}.edd-progress-bar{display:-ms-grid;display:grid;background:#dcdcde;border-radius:99999px;padding:2px;box-shadow:inset 0 0 1px 1px #7e8993;align-items:center}.edd-progress-bar.small{height:14px}.edd-progress-bar.medium{height:16px}.edd-progress-bar.large{height:20px;padding:4px}.edd-progress-bar>.progress{height:100%;border-top-left-radius:99999px;border-bottom-left-radius:99999px;border-top-right-radius:99999px;border-bottom-right-radius:99999px;background-color:rgba(0,186,55,.3);overflow:hidden;min-width:10%;width:0;width:var(--progress-width,0);-ms-grid-row:1;grid-area:1/-1}.edd-progress-bar>.label{color:#32373c;font-weight:400;font-size:.75rem;text-shadow:0 0 12px hsla(0,0%,100%,.5);-ms-grid-row:1;grid-area:1/-1;text-align:center;line-height:1}.edd-help-tip{cursor:help;margin-top:-2px;font-size:24px;color:#7e8993}.edd-ui-tooltip{position:absolute;background:#fff!important;border-width:0;border-radius:12px!important;box-shadow:0 8px 36px 0 rgba(29,36,40,.15)!important;color:#23282d!important;max-width:300px!important;padding:16px!important;text-rendering:optimizeLegibility;text-shadow:none!important;font-size:13px!important;z-index:9999!important}.edd-ui-tooltip .title{font-weight:700}.edd-ui-tooltip .timeline{position:relative;margin:6px 0 0;padding-right:15px}.edd-ui-tooltip .timeline li{position:relative;margin:0 0 3px}.edd-ui-tooltip .timeline li:before{content:"";position:absolute;width:4px;height:4px;right:-16px;background:transparent;border:2px solid #23282d;top:0;bottom:0;margin:auto;border-radius:100%;z-index:1}.edd-ui-tooltip .timeline li:after{content:"";width:2px;height:calc(100% - 4px);background:#23282d;position:absolute;right:-13px;top:calc(50% + 3px)}.edd-hidden,.edd-ui-tooltip .timeline li:last-child:after{display:none}.edd-clearfix:after{content:"";display:table;clear:both}.edd-fadein{visibility:visible;opacity:1;transition:opacity 1s linear}.edd-fadeout{visibility:hidden;opacity:0;transition:visibility 0s 1s,opacity 1s linear}.edd-custom-price-option-sections-wrap{display:none;border:1px solid #c3c4c7;border-top:0 solid #c3c4c7;box-sizing:border-box;width:100%}.edd-custom-price-option-section{display:block;padding:10px 8px;border-bottom:1px solid hsla(0,0%,87.1%,.3)}.edd-custom-price-option-section-title{display:block;font-weight:600;padding:0 0 10px}.edd-custom-price-option-section-content{display:flex;gap:12px;margin-bottom:6px}.edd-custom-price-option-section:last-child{border-bottom:none}.toggle-custom-price-option-section{color:#787c82}.toggle-custom-price-option-section:hover{color:#537994}#edd_product_settings .edd-product-options__title,#edd_product_settings .inside strong{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7;background-color:#f9f9f9;display:flex;font-weight:600;margin:0 -12px 16px;padding:8px 12px;justify-content:space-between;align-items:center}#edd_product_settings .edd-product-options-wrapper:first-of-type .edd-product-options__title,#edd_product_settings .inside div:first-child strong{margin-top:-8px}#edd_product_settings .edd-product-options__title .edd-help-tip,#edd_product_settings .inside strong .edd-help-tip{font-size:20px}#edd_product_settings .label--block{display:block;margin:0 0 4px}.edd_repeatable_row.ui-sortable-placeholder{line-height:0;padding:0;margin:0;box-sizing:border-box;border:1px dashed #c3c4c7;visibility:visible!important}.edd-add-repeatable-row{border-top:1px solid #c3c4c7;padding:12px;margin:15px -12px -12px;display:flex;justify-content:flex-end;align-items:center}.edd_repeatable_row input[type=text].large-text{width:100%}.edd_repeatable_upload_wrapper:not(:first-child),.edd_variable_prices_wrapper:not(:first-child){margin-top:12px}.edd_repeatable_row.ui-sortable-helper .edd-repeatable-row-actions .edd-remove-row{display:none}.edd-repeatable-row-actions{color:#787c82}.edd-repeatable-row-actions a{text-decoration:none;width:auto;cursor:pointer}.edd-bundle-products-header,.edd-repeatable-row-header{clear:both;background:#f6f7f7;border:1px solid #c3c4c7;display:flex;justify-content:space-between}.edd-repeatable-row-header{cursor:move}.edd_repeatable_row:hover .edd-repeatable-row-header,.edd_repeatable_row:hover .edd-repeatable-row-standard-fields{border-color:#c3c4c7}.edd-bundled-product-row:after,.edd-bundled-product-row:before,.edd-repeatable-row-header:after,.edd-repeatable-row-header:before{content:"";display:table}.edd-bundled-product-row:after,.edd-repeatable-row-header:after{clear:both}.edd-bundle-products-header,.edd-repeatable-row-title{font-weight:600}.edd-bundle-products-header,.edd-repeatable-row-actions,.edd-repeatable-row-title{padding:8px;box-sizing:border-box}.edd-repeatable-row-actions{flex-grow:1;text-align:left}.edd-bundled-product-row .edd-remove-row,.edd-repeatable-row-actions .edd-remove-row{width:auto;cursor:pointer}.edd-bundled-product-row,.edd-repeatable-row-standard-fields{padding:8px;border:1px solid #c3c4c7;border-top:0 solid #c3c4c7;display:flex;justify-content:space-between;align-items:center;gap:18px}.edd-bundled-product-row .edd-form-group,.edd-repeatable-row-standard-fields .edd-form-group{margin-bottom:0;display:inline-flex;flex-direction:column;flex-grow:1;justify-content:space-between}.edd-repeatable-row-setting-label .edd-help-tip{display:inline-block;margin-right:4px}.edd-bundled-product-item-reorder{min-width:30px}.edd-bundled-product-item-reorder .edd-product-file-reorder{font-size:20px;cursor:move;color:#dcdcde;font-family:dashicons;content:"";transition:color .2s}.edd-bundled-product-item-reorder .edd-product-file-reorder:hover{color:#a7aaad}.edd-bundled-product-actions{-ms-grid-row-align:center;align-self:center}#edd_products .edd-select,.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%;max-width:200px}.edd_repeatable_product_wrapper td{overflow:visible}@media screen and (max-width:480px){.edd-bundle-products-header,.edd-bundled-product-row,.edd-repeatable-row-header,.edd-repeatable-row-standard-fields{flex-wrap:wrap}.edd-bundled-product-row .edd-form-group,.edd-repeatable-row-standard-fields .edd-form-group{margin-right:0!important;margin-bottom:24px}}.edd_remove_repeatable{border:none;cursor:pointer;display:inline-block;padding:0;overflow:hidden;margin:8px 0 0;text-indent:-9999px;width:10px;height:10px}.edd_remove_repeatable:active,.edd_remove_repeatable:focus,.edd_remove_repeatable:hover{background-position:-10px 0!important}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container{position:relative;width:100%}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container+span:first-child{width:100%}.edd_repeatable_upload_field{padding-left:32px}.edd_upload_file button{background:#f6f7f7;border:none;border-right:1px solid #c3c4c7;padding:0 4px;position:absolute;height:calc(100% - 4px);overflow:hidden;top:2px;left:2px;display:inline-flex;justify-content:center;align-items:center}#edd-duplicate-action~#publishing-action{position:relative;top:-10px}#edd_product_files.ajax--loading{position:relative}#edd_product_files.ajax--loading:before{background:none;display:block;position:absolute;top:50%;right:50%;z-index:5;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:1.25em;height:1.25em;transform:translate3d(50%,-50%,0);will-change:transform}#edd_product_files.ajax--loading:after{background-color:hsla(0,0%,100%,.75);display:block;position:absolute;top:0;right:0;width:100%;height:100%;content:" ";z-index:1}.edd-form-group{margin-bottom:16px}.edd-form-group:last-of-type{margin-bottom:0}.edd-form-group>label,.edd-form-group__label{display:block;font-weight:600;margin-bottom:8px;padding:0}.edd-form-group__control{margin-bottom:12px;max-width:100%}.edd-form-group__control.is-check,.edd-form-group__control.is-radio{margin-top:4px}.edd-form-group__control:last-of-type{margin-bottom:0}.edd-form-group__control--is-inline{display:inline-flex;align-items:flex-end}.edd-form-group__input{max-width:100%}.edd-form-group__input[type=checkbox],.edd-form-group__input[type=radio]{margin-top:0}.edd-form-group__input[type=checkbox]+label,.edd-form-group__input[type=radio]+label{display:unset}select.edd-form-group__input{max-width:100%}.edd-form-group__help{color:#646970;font-size:13px;font-style:italic;line-height:normal;margin:8px 0 0}.edd-range{display:flex;align-items:center;gap:15px}.edd-range .edd-range__slider{min-width:90px;height:2px;border-radius:10px;border:none;background:#ccc}.edd-range .edd-range__slider .ui-slider-range{background:var(--wp-admin-theme-color)}.edd-range .edd-range__slider .ui-slider-handle{height:15px;width:15px;top:-6.5px;border-radius:100%;background:var(--wp-admin-theme-color);border:none;cursor:pointer;display:inline-block;position:relative}.edd-range .edd-range__input{max-width:60px}.edd-form-row{display:flex;flex-wrap:wrap;gap:12px}.edd-form-row__column{display:inline-flex;flex-direction:column;justify-content:flex-end}.edd-form-row__column.edd-form-group{margin-bottom:0}.edd-form-row label,.edd-form-row label.edd-form-group__label{margin-bottom:8px}#edd-migration-progress .dashicons-minus{color:#949494}#edd-migration-progress .dashicons-yes{color:green}#edd-migration-progress .dashicons-update:before{animation:rotation 2s linear infinite;display:block}#edd-v3-migration-remove-legacy-data-submit-wrap{display:flex;align-items:center;gap:6px}#edd-v3-migration-remove-legacy-data-submit-wrap .button{margin:0}#edd-filters{padding:10px;margin:0;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}#edd-filters .filter-items{flex-wrap:wrap;gap:6px;float:none;flex-grow:1}#edd-filters .filter-items,#edd-filters .filter-items .graph-option-section{display:flex;align-items:center}#edd-filters .filter-items .edd-date-range-picker[data-range=other] .edd-graphs-date-options{border-top-left-radius:4px;border-bottom-left-radius:4px}#edd-filters .filter-items .edd-date-range-picker[data-range=other] .edd-date-range-dates,#edd-filters .filter-items .edd-date-range-picker[data-range=other] .edd-date-range-relative-dates{display:none}#edd-filters .filter-items .edd-date-range-options{display:inline-block;margin:10px 0}#edd-filters .filter-items .edd-graphs-date-options{border-top-left-radius:0;border-bottom-left-radius:0}#edd-filters .filter-items .edd-date-range-dates{display:flex;align-items:center;border:1px solid #8c8f94;border-right:none;color:#2c3338;padding:4px 10px;margin-right:-5px;border-top-left-radius:4px;border-bottom-left-radius:4px;cursor:pointer;gap:4px}#edd-filters .filter-items .edd-date-range-dates.hidden{display:none}#edd-filters .filter-items .edd-date-range-selected-date{display:inline-block}#edd-filters .filter-items .edd-date-range-relative-dates{display:flex;align-items:center;margin-right:10px}#edd-filters .filter-items .edd-date-range-relative-dates.hidden{display:none}#edd-filters .filter-items .edd-date-range-selected-relative-date{position:relative;display:flex;align-items:center;border:1px solid #8c8f94;padding:4px 6px 4px 2px;color:#2c3338;margin-right:10px;margin-left:10px;border-radius:4px;cursor:pointer}#edd-filters .filter-items .edd-date-range-selected-relative-date .arrow-down{width:16px;height:auto;margin-right:6px;margin-top:2px;vertical-align:middle}#edd-filters .filter-items .edd-date-range-selected-relative-date.opened .edd-date-range-relative-dropdown{display:block}#edd-filters .filter-items .edd-date-range-relative-dropdown{position:absolute;z-index:99;width:420px;right:50%;top:100%;margin-top:10px;transform:translateX(50%);background-color:#fff;border:1px solid #8c8f94;border-radius:4px;box-shadow:0 2px 5px 0 rgba(0,0,0,.25);display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown:after{height:10px;width:10px;position:absolute;content:"";background:#fff;border-color:#8c8f94;border-style:solid;border-width:0 0 1px 1px;transform:rotate(135deg);top:-6px;right:calc(50% - 4px)}#edd-filters .filter-items .edd-date-range-relative-dropdown .spinner{display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown.loading{padding:10px;text-align:center}#edd-filters .filter-items .edd-date-range-relative-dropdown.loading .spinner{display:inline-block;visibility:visible;margin:0;float:unset}#edd-filters .filter-items .edd-date-range-relative-dropdown.loading :not(.spinner){display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li{display:flex;align-items:center;padding:2px 10px;opacity:.85;gap:20px}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li.active,#edd-filters .filter-items .edd-date-range-relative-dropdown ul li:hover{cursor:pointer;color:var(--wp-admin-theme-color);opacity:1}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li .date-range-name{width:110px}@media screen and (max-width:950px){#edd-filters .filter-items .graph-option-section{margin-top:8px;width:100%}#edd-filters .filter-items .edd-date-range-picker{flex-wrap:wrap}#edd-filters .filter-items .edd-graphs-date-options{width:100%;max-width:100%;min-height:40px;font-size:14px;border-top-left-radius:4px;border-bottom-left-radius:4px}#edd-filters .filter-items .edd-date-range-dates{width:100%;margin-top:10px;border:1px solid #8c8f94;margin-right:unset;border-radius:4px;font-size:14px;padding:8px 8px 8px 6px}#edd-filters .filter-items .edd-date-range-relative-dates{width:100%;flex-wrap:wrap;margin-right:0;margin-top:6px}#edd-filters .filter-items .edd-date-range-selected-relative-date{width:100%;margin-top:8px;margin-right:0;margin-left:0;font-size:14px;padding:8px 8px 8px 6px;flex-wrap:wrap}#edd-filters .filter-items .edd-date-range-selected-relative-date .arrow-down{margin-right:auto}#edd-filters .filter-items .edd-date-range-relative-dropdown{position:relative;width:100%;right:0;top:0;transform:unset;box-shadow:unset;border:unset;margin:0}#edd-filters .filter-items .edd-date-range-relative-dropdown:after{display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown ul{margin-bottom:0}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li{padding-right:0;padding-left:0;justify-content:space-between;flex-wrap:wrap;gap:unset}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li .date-range-dates,#edd-filters .filter-items .edd-date-range-relative-dropdown ul li .date-range-name{width:100%}}#edd-filters>p{color:#757575}#edd-filters input[type=number],#edd-filters input[type=text].edd_datepicker{max-width:105px}#edd-filters .button-secondary,#edd-filters input[type=number]{margin-bottom:0}#edd-filters .search-form{margin:0}@media screen and (max-width:480px){#edd-filters span{margin:2px 0}}#edd-advanced-filters{position:relative}#edd-advanced-filters .inside{z-index:99;position:absolute;top:29px;left:0;border:1px solid #e0e0e0;padding:0;background:#fff;box-shadow:0 3px 5px rgba(0,0,0,.2);min-width:285px;opacity:0;visibility:hidden}#edd-advanced-filters fieldset{display:block;padding:10px 15px 15px;margin:10px 0}#edd-advanced-filters fieldset:not(:last-of-type){border-bottom:1px solid #e0e0e0}#edd-advanced-filters fieldset:last-of-type{padding-bottom:5px}#edd-advanced-filters fieldset.edd-add-on-filters div,#edd-advanced-filters fieldset.edd-add-on-filters label,#edd-advanced-filters fieldset.edd-add-on-filters p,#edd-advanced-filters fieldset.edd-add-on-filters span{display:block;margin-bottom:2px}#edd-advanced-filters div.edd-select-chosen:not(:last-child){margin-bottom:10px}#edd-advanced-filters.open .edd-advanced-filters-button{background:#e0e0e0;border-color:#949494;box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);transform:translateY(1px)}#edd-advanced-filters.open .inside{visibility:visible;opacity:1;transition:opacity .2s ease-in}.download_page_edd-reports #edd-filters{margin-bottom:-1px;box-shadow:none}@media screen and (max-width:782px){.download_page_edd-reports #edd-filters{gap:0}}.edd-old-log-filters{margin-top:-30px;margin-right:2px}@media screen and (min-width:600px){#edd-reports-charts-wrap{display:-ms-grid;display:grid;-ms-grid-columns:(minmax(200px,50%))[2];grid-template-columns:repeat(2,minmax(200px,50%));grid-gap:2em}.edd-reports-chart{margin-bottom:0}.edd-reports-chart-bar,.edd-reports-chart-line{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/span 2}}.edd-canvas__container{margin:auto;position:relative;max-width:100%;max-height:75vh}@media screen and (min-width:480px){.edd-canvas__container.edd-canvas__type-bar,.edd-canvas__container.edd-canvas__type-line{height:450px}}@media screen and (min-width:782px){.edd-canvas__container.edd-canvas__type-bar,.edd-canvas__container.edd-canvas__type-line{height:500px}}@media screen and (min-width:1080px){.edd-canvas__container.edd-canvas__type-bar,.edd-canvas__container.edd-canvas__type-line{height:700px}}.chart-timezone{font-size:.75rem;color:#c3c4c7}.edd-mobile-link{line-height:32px}.edd-mobile-link a{text-decoration:none}.edd-mobile-link a:after,.edd-mobile-link a:before{display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/30px dashicons;vertical-align:top;margin:1px 0 0;padding:0}.edd-mobile-link a:before{content:"";color:#757575;margin-left:-3px}.edd-mobile-link a:after{content:""}#edd-reports-tiles-wrap #dashboard-widgets .sortable-placeholder{padding:0;margin:0 0 20px;line-height:0;box-sizing:border-box;height:110px}#edd-reports-tiles-wrap #dashboard-widgets #primary-sortables{margin-right:0}#edd-reports-tiles-wrap #dashboard-widgets #tertiary-sortables{margin-left:0}#edd-reports-tiles-wrap{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));grid-gap:20px}.edd-reports-tile{text-align:center;padding:20px 10px 35px;display:flex;flex-direction:column;justify-content:center;border:1px solid #e5e5e5;background:#fafafa;position:relative;box-sizing:border-box;gap:.5em}.edd-reports-tile>span:not(.tile-compare){width:100%}.edd-reports-tile .tile-label{text-align:center;text-transform:uppercase;font-size:12px;font-weight:400;color:#101517}.edd-reports-tile .tile-value{color:#333;font-size:2em;line-height:1;transition:all .2s ease-in-out;display:flex;justify-content:center;flex-direction:column;gap:.25em}.edd-reports-tile:hover{border:1px solid #aaa}.edd-reports-tile:hover .tile-value:not(.tile-no-data){transform:scale(1.05)}.edd-reports-tile .tile-amount{color:#2794da}.edd-reports-tile .tile-number{color:#96f}.edd-reports-tile .tile-amount,.edd-reports-tile .tile-number{color:#fff}.edd-reports-tile .tile-value.tile-no-data{color:#ddd}.edd-reports-tile .tile-value.tile-url{font-size:1.5em}.edd-reports-tile .tile-relative{font-size:12px;font-weight:400;color:#888}.edd-reports-tile span.dashicons{display:inline-block;font-size:30px;line-height:20px;height:20px;width:20px;position:relative;top:4px;right:-5px;margin-right:-5px;color:#999}.edd-reports-tile .tile-relative span.dashicons{top:-5px;right:-3px;margin-right:0}.edd-reports-tile .tile-relative span.dashicons-arrow-down,.edd-reports-tile .tile-relative span.dashicons-arrow-up.reverse{color:#d63638}.edd-reports-tile .tile-relative span.dashicons-arrow-down.reverse,.edd-reports-tile .tile-relative span.dashicons-arrow-up{color:#008a20}.edd-reports-tile .tile-compare{position:absolute;left:0;bottom:0;color:#aaa;font-size:11px;line-height:1em;background-color:#fff;border-color:#e5e5e5 #e5e5e5 #fff #fff;border-style:solid;border-width:1px;border-top-right-radius:8px;padding:4px 9px 0 0;margin:0 0 -1px -1px}.edd-reports-tile:hover .tile-compare{border-right:1px solid #bbb;border-top:1px solid #bbb;color:#777}.edd-chartjs-tooltip{position:absolute;background-color:#fff;border-radius:7px;transition:all .1s ease;pointer-events:none;transform:translate(50%);font-size:12px;box-shadow:0 0 0 1px rgba(89,94,100,.1),0 15px 35px 0 rgba(89,94,100,.1),0 5px 15px 0 rgba(0,0,0,.12);min-width:120px;opacity:0}.edd-chartjs-tooltip-key{display:inline-block;width:10px;height:10px;margin-left:5px}.edd-order-customer__actions{margin-bottom:2em}#edd-submit-refund-status{text-align:center;font-size:1.2em}#edd-submit-refund-status .edd-submit-refund-message:before{font-family:dashicons;font-size:1.5em;vertical-align:middle;color:#fff;border-radius:16px;margin:5px}#edd-submit-refund-status .edd-submit-refund-message.success:before{content:"";background-color:#008a20;padding-left:1px}#edd-submit-refund-status .edd-submit-refund-message.fail{display:block;margin-bottom:16px}#edd-submit-refund-status .edd-submit-refund-message.fail:before{content:"";background-color:#d63638}.refund-items td,.refund-items th.check-column{vertical-align:baseline}.refund-items .column-amount,.refund-items .column-discount,.refund-items .column-quantity,.refund-items .column-subtotal,.refund-items .column-tax,.refund-items .column-total{width:80px}.refund-items .edd-form-group__control{display:flex;align-items:center}.refund-items .edd-form-group__control input,.refund-items .edd-form-group__control select{background-color:transparent;border:0;border-bottom:1px solid;border-radius:0;box-shadow:none;text-align:left;width:100%}.refund-items .edd-form-group__control input:disabled,.refund-items .edd-form-group__control select:disabled{border-bottom:none}.refund-items .edd-form-group__control input:focus,.refund-items .edd-form-group__control select:focus{border-bottom:1px solid var(--wp-admin-theme-color-darker-10);box-shadow:0 1px 0 var(--wp-admin-theme-color-darker-10)}.refund-items .edd-form-group__control select[data-original="1"]{background:transparent}.refund-items .edd-form-group__control .is-before+span>input,.refund-items .edd-form-group__control select{text-align:right}.refund-items .edd-refund-submit-line-total{background-color:#fff!important}.refund-items .edd-refund-submit-line-total td{text-align:left}.refund-items .edd-refund-submit-line-total-amount{display:inline-block;margin-right:20px;text-align:right;width:80px}.refund-items #edd-refund-submit-subtotal td{border-top:2px solid #c3c4c7}@media screen and (max-width:782px){.refund-items td.column-total{margin-bottom:16px}.refund-items .edd-refund-submit-line-total-amount{padding-left:16px;width:unset}}.edd-submit-refund-actions{margin:16px 0 0}.did-refund .edd-submit-refund-actions,.did-refund .refund-items,body.edd-about div.notice{display:none}body.edd-about #edd-admin-about *,body.edd-about #edd-admin-about :after,body.edd-about #edd-admin-about :before{box-sizing:border-box}body.edd-about #edd-admin-about{display:flex;flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section{box-shadow:0 2px 5px #e8e8e8;margin:0 20px 20px;padding:30px;background:#fff;border:1px solid #ddd;line-height:2;display:flex;flex-direction:row}body.edd-about #edd-admin-about .edd-admin-about-section h2{font-size:24px;line-height:32px;color:#646970;margin:0}body.edd-about #edd-admin-about .edd-admin-about-section h3{font-size:16px;line-height:22px;color:#787c82}body.edd-about #edd-admin-about .edd-admin-about-section p,body.edd-about #edd-admin-about .edd-admin-about-section ul{font-size:14px}body.edd-about #edd-admin-about .edd-admin-about-section p{margin-bottom:10px}body.edd-about #edd-admin-about .edd-admin-about-section p.bigger{font-size:18px}body.edd-about #edd-admin-about .edd-admin-about-section p.smaller{font-size:14px}body.edd-about #edd-admin-about .edd-admin-about-section p:last-child{margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section hr{margin:30px 0}body.edd-about #edd-admin-about .edd-admin-about-section figure{margin:0}body.edd-about #edd-admin-about .edd-admin-about-section figure img.shadow{width:100%;box-shadow:0 2px 5px #e8e8e8}body.edd-about #edd-admin-about .edd-admin-about-section figure figcaption{font-size:14px;color:#888;margin-top:5px;text-align:center;line-height:normal}body.edd-about #edd-admin-about .edd-admin-about-section .edd-admin-columns{display:flex}body.edd-about #edd-admin-about .edd-admin-about-section .column{display:flex;flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section .column--20{width:20%}body.edd-about #edd-admin-about .edd-admin-about-section .column--40{width:40%}body.edd-about #edd-admin-about .edd-admin-about-section .column--50{width:50%}body.edd-about #edd-admin-about .edd-admin-about-section .column--60{width:60%}body.edd-about #edd-admin-about .edd-admin-about-section .column--80{width:80%}body.edd-about #edd-admin-about .edd-admin-about-section .column.align--middle{align-items:center;justify-content:center}body.edd-about #edd-admin-about .edd-admin-about-section .column.m-l-15{margin-right:15px}body.edd-about #edd-admin-about .edd-admin-about-section .column.m-r-15{margin-left:15px}body.edd-about #edd-admin-about .edd-admin-about-section ul.list-plain{margin-top:0;margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section ul.list-plain li{margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section ul.list-features li{display:flex;align-items:center;justify-items:left;gap:8px}body.edd-about #edd-admin-about .edd-admin-about-section .dashicons-star-filled{color:gold}body.edd-about #edd-admin-about .edd-admin-about-section .no-margin{margin:0!important}body.edd-about #edd-admin-about .edd-admin-about-section .no-padding{padding:0!important}body.edd-about #edd-admin-about .edd-admin-about-section .centered{text-align:center!important}body.edd-about #edd-admin-about .edd-admin-about-section-first-form{display:flex}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-text{flex:1;padding-left:30px}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-video iframe{border:1px solid #ddd}body.edd-about #edd-admin-about .edd-admin-about-section-hero{display:flex;flex-direction:column;padding:0}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra,body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main{padding:30px}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra div.notice,body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main div.notice{display:none}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra h3.call-to-action,body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main h3.call-to-action{margin-bottom:-10px}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main{background-color:#fafafa;border-bottom:1px solid #ddd}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main.no-border{border-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main p{color:#666}body.edd-about #edd-admin-about .edd-admin-about-section-squashed{margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section-squashed:not(:last-of-type){border-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section-post{flex-direction:row;gap:50px}body.edd-about #edd-admin-about .edd-admin-about-section-post h2{margin-bottom:-10px}body.edd-about #edd-admin-about .edd-admin-about-section-post h3{margin-bottom:15px}body.edd-about #edd-admin-about .edd-admin-about-section-post p:last-of-type{margin-bottom:30px}body.edd-about #edd-admin-about .edd-admin-about-section-post img{max-width:250px}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20{width:250px}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80{width:calc(100% - 270px)}body.edd-about #edd-admin-about .edd-admin-about-section-post .button-secondary{transition:all .1s ease-in-out}body.edd-about #edd-admin-about .edd-admin-about-section-post .button-secondary:focus,body.edd-about #edd-admin-about .edd-admin-about-section-post .button-secondary:hover{background-color:#2271b1;color:#fff}body.edd-about #edd-admin-about #edd-admin-addons{padding:0 30px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container{display:flex;flex-direction:row;flex-wrap:wrap;align-items:space-between}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container{display:flex;padding:10px;flex:1 0 33.3333%;max-width:33.3333%}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item{display:flex;flex-direction:column;border:1px solid #ddd;box-shadow:0 2px 5px #e8e8e8}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details{padding:20px;display:flex;flex-direction:row;background-color:#fff;flex-grow:1}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .leftcol img{max-width:100px;padding:10px;box-shadow:0 2px 3px #e8e8e8}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol{flex-direction:column;justify-content:left;flex-grow:4;padding-right:20px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol h5{font-size:14px;margin-bottom:10px;margin-top:0}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 12px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions.has-response{justify-content:center;flex-grow:10}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label{font-weight:600}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label.active{color:#008a20}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label.inactive{color:#d63638}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label.not-installed{color:#646970}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .action-button .button.disabled,body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .action-button .button.loading{cursor:default}@media(max-width:1440px){body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container{display:flex;padding:10px;flex:1 0 50%;max-width:50%}}@media(max-width:1280px){body.edd-about #edd-admin-about .welcome-message{flex-direction:column-reverse}body.edd-about #edd-admin-about .welcome-message.column--20,body.edd-about #edd-admin-about .welcome-message .column--40,body.edd-about #edd-admin-about .welcome-message .column--50,body.edd-about #edd-admin-about .welcome-message .column--60,body.edd-about #edd-admin-about .welcome-message .column--80{width:100%}body.edd-about #edd-admin-about .welcome-message.column--20.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--40.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--50.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--60.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--80.m-l-15{margin-right:0}body.edd-about #edd-admin-about .welcome-message.column--20.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--40.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--50.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--60.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--80.m-r-15{margin-left:0}}@media(max-width:960px){body.edd-about #edd-admin-about .edd-admin-about-section{flex-direction:column;gap:20px}body.edd-about #edd-admin-about .edd-admin-about-section.welcome-message{flex-flow:column-reverse}body.edd-about #edd-admin-about .edd-admin-about-section .edd-admin-columns{flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section.column--20,body.edd-about #edd-admin-about .edd-admin-about-section .column--40,body.edd-about #edd-admin-about .edd-admin-about-section .column--50,body.edd-about #edd-admin-about .edd-admin-about-section .column--60,body.edd-about #edd-admin-about .edd-admin-about-section .column--80{display:flex;width:100%}body.edd-about #edd-admin-about .edd-admin-about-section.column--20.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--40.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--50.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--60.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--80.m-l-15{margin-right:0}body.edd-about #edd-admin-about .edd-admin-about-section.column--20.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--40.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--50.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--60.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--80.m-r-15{margin-left:0}body.edd-about #edd-admin-about .edd-admin-about-section-first-form{display:block!important}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-text{flex:none}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-video{padding-top:20px}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra .edd-admin-column-50{float:none;width:100%}body.edd-about #edd-admin-about .edd-admin-about-section-post{flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80{display:flex;width:100%}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20 img,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80 img{width:auto;max-width:100%}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20.image,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80.image{margin:0 auto;align-content:center;justify-content:center}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20.content,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80.content{flex-direction:column;justify-items:left}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20 .edd-admin-about-section-post-link,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80 .edd-admin-about-section-post-link{font-size:1.25rem;display:flex;justify-items:space-around;justify-content:center}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20 .edd-admin-about-section-post-link .dashicons,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80 .edd-admin-about-section-post-link .dashicons{display:none}body.edd-about #edd-admin-about #edd-admin-addons .addons-container{display:flex;flex-direction:column}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container{padding:10px;flex:1 0 100%;max-width:100%}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details{flex-direction:row}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol{padding-right:20px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol .addon-name{text-align:right}}#edd-flyout{position:fixed;z-index:99999;transition:all .2s ease-in-out;left:40px;bottom:40px;opacity:1;display:flex;flex-direction:column;align-items:flex-end}@media(max-width:960px){#edd-flyout{display:none}}#edd-flyout .edd-flyout-label{transform:translateY(-50%);-moz-transform:translateY(-50%);-webkit-transform:translateY(-50%);color:#fff;background-color:#757575;font-size:12px;white-space:nowrap;padding:5px 10px;transition:all .2s ease-out;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:20px;opacity:0;transform:scale(0)}#edd-flyout #edd-flyout-button{border:none;padding:0;background:none;display:flex;flex-direction:row;gap:10px;align-items:center}#edd-flyout #edd-flyout-button img{width:54px;height:54px;display:block;border-radius:50%;border:3px solid #0c5d95;overflow:hidden;transition:all .2s ease-in-out;background:#fff}#edd-flyout #edd-flyout-button:hover img{cursor:pointer;box-shadow:0 3px 12px 1px rgba(30,30,30,.55)}#edd-flyout #edd-flyout-button .edd-flyout-label{opacity:0;transform:translateY(-50%) scale(0)}#edd-flyout #edd-flyout-button:hover .edd-flyout-label{opacity:1;transform:translateY(-50%) scale(1)}#edd-flyout #edd-flyout-button.has-alert:after{transform:scale(1);opacity:1;font-family:dashicons;content:"";color:#d63638;font-size:16px;height:16px;width:16px;text-decoration:none;border-radius:999999px;line-height:16px;transition:all .2s ease-in-out;background-color:#fff;position:absolute;left:3px;bottom:46px}#edd-flyout #edd-flyout-items{display:flex;flex-direction:column-reverse;gap:10px;margin-left:12px;margin-bottom:12px;height:0}#edd-flyout #edd-flyout-items .edd-flyout-item{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:25px;visibility:collapse}#edd-flyout #edd-flyout-items .edd-flyout-item a{text-decoration:none;color:#fff}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon,#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-label{transition:all .2s ease-in-out;transform:scale(0);opacity:0}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-label{margin-top:0}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-label a{display:inline-block;line-height:normal;height:auto!important}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon{display:flex;justify-content:space-around;width:40px;height:40px;border-radius:50%;box-shadow:0 3px 12px 1px rgba(30,30,30,.55);background:#0c5d95 100% 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon.red{background:#d63638 100% 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon.green{background:#1da867 100% 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon span.dashicons:before{color:#fff;font-size:20px;line-height:40px;vertical-align:middle}#edd-flyout #edd-flyout-items .edd-flyout-item:hover{cursor:pointer}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon,#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-label{box-shadow:0 3px 12px 1px rgba(30,30,30,.55)}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon{background:#35495c 100% 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon.red{background:#b60012 100% 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon.green{background:#199155 100% 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-label{background-color:#494949}#edd-flyout.opened #edd-flyout-items{height:auto}#edd-flyout.opened #edd-flyout-items .edd-flyout-item{visibility:visible}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:first-of-type .edd-flyout-icon{transition:transform .2s 0ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:first-of-type .edd-flyout-label,#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(2) .edd-flyout-icon{transition:transform .2s 24ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(2) .edd-flyout-label,#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(3) .edd-flyout-icon{transition:transform .2s 48ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(3) .edd-flyout-label,#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(4) .edd-flyout-icon{transition:transform .2s 72ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(4) .edd-flyout-label{transition:transform .2s 96ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item .edd-flyout-icon,#edd-flyout.opened #edd-flyout-items .edd-flyout-item .edd-flyout-label{opacity:1;transform:scale(1)}#edd-flyout.opened #edd-flyout-button img{box-shadow:0 3px 12px 1px rgba(30,30,30,.55)}#edd-flyout.opened #edd-flyout-button .edd-flyout-label{opacity:0}#edd-flyout.opened #edd-flyout-button.has-alert:after{opacity:0;transition:scale(0)}#edd-flyout.out{opacity:0;visibility:hidden}.edd-admin-notice-top-of-page{font-size:15px;line-height:1.4;color:#fff;margin-right:-20px;padding:12px 20px 12px 32px;background:#2d6ca2}.edd-admin-notice-top-of-page.edd-pro-inactive{background:#d63638}@media screen and (min-width:783px){.edd-admin-notice-top-of-page{padding:10px 22px 10px 46px}}@media screen and (min-width:961px){.edd-admin-notice-top-of-page{text-align:center}}.edd-admin-notice-top-of-page a{color:#fff}.edd-admin-notice-top-of-page a:hover{text-decoration:none}.edd-admin-notice-top-of-page .button-link{position:absolute;top:48px;left:-1px;font-size:20px;color:#fff;font-weight:700;text-decoration:none;margin-right:5px;padding:6px 10px}.edd-admin-notice-top-of-page .button-link:active,.edd-admin-notice-top-of-page .button-link:focus,.edd-admin-notice-top-of-page .button-link:hover{color:#fff;text-decoration:none}@media screen and (min-width:601px){.edd-admin-notice-top-of-page .button-link{top:1px}}@media screen and (min-width:783px){.edd-admin-notice-top-of-page .button-link{left:9px}}#edd-admin-notice-five-star-review{display:-ms-grid!important;display:grid!important}#edd_dashboard_sales .edd-promo-notice{border-bottom:1px solid #c3c4c7}.edd-review-actions{display:flex;gap:6px;margin:0 0 16px}.edd-promo-notice .edd-peeking{align-self:flex-end;justify-self:flex-end;margin-left:16px;margin-bottom:-1px}@media screen and (max-width:782px){#edd-admin-notice-five-star-review.notice .edd-peeking{margin-bottom:-6px}}@media screen and (min-width:480px){.edd-promo-notice.notice-info .edd-peeking{justify-self:flex-start;margin-left:0;margin-right:250px}}.edd-promo-notice .edd-peeking,.edd-review-step{-ms-grid-row:1;grid-area:1/-1}.edd-promo-notice__overlay{display:none;position:fixed;background:rgba(16,21,23,.75);top:0;left:0;bottom:0;right:160px;z-index:110;justify-content:center;align-items:center}.folded .edd-promo-notice__overlay{right:36px}@media screen and (max-width:782px){.edd-promo-notice__overlay{right:0}}.edd-admin-notice-overlay{display:none;background-color:#fff;padding:2.5em;text-align:center;max-width:650px;position:relative;flex-direction:column}.edd-promo-notice__overlay .edd-admin-notice-overlay{display:flex}.edd-admin-notice-overlay h2{line-height:1.6em;margin:0 auto;max-width:540px}.edd-admin-notice-overlay .edd-promo-notice__features{text-align:right;display:-ms-grid;display:grid;-ms-grid-columns:(auto)[3];grid-template-columns:repeat(3,auto);margin:2em auto;gap:0 1.5em}.edd-admin-notice-overlay .edd-promo-notice__features li{display:flex;gap:.5em;align-items:center}@media screen and (max-width:600px){.edd-admin-notice-overlay .edd-promo-notice__features{-ms-grid-columns:unset;grid-template-columns:unset}}.edd-admin-notice-overlay .button{padding:4px 36px;margin:0 auto .5em;max-width:360px}.edd-admin-notice-overlay__link{color:#101517}.edd-admin-notice-overlay .edd-promo-notice-dismiss.button-link{position:absolute;color:#537994;text-decoration:none;font-size:2em;top:0;left:.5em}.edd-admin-notice-overlay .edd-promo-notice-dismiss.button-link:active,.edd-admin-notice-overlay .edd-promo-notice-dismiss.button-link:hover{color:#101517}@media screen and (max-width:782px){.edd-admin-notice-overlay{margin:1em}}.edd-promo-notice__popup{display:flex;justify-content:center;justify-items:center;flex-direction:column;margin:2em auto;gap:0 1.5em}.edd-promo-notice__popup h2{line-height:1.6em;margin:0 auto;max-width:540px;font-size:1.25em}.edd-promo-notice__popup .content{display:inherit;flex-direction:inherit;justify-items:center;text-align:center}.edd-promo-notice__popup .content .edd-promo-notice__features{text-align:right;display:-ms-grid;display:grid;-ms-grid-columns:(auto)[3];grid-template-columns:repeat(3,auto);margin:2em auto;gap:0 1.5em;flex-direction:row}.edd-promo-notice__popup .content .edd-promo-notice__features li{display:flex;gap:.5em;align-items:center;min-width:50%}@media screen and (max-width:600px){.edd-promo-notice__popup .content .edd-promo-notice__features{-ms-grid-columns:unset;grid-template-columns:unset}}.edd-promo-notice__popup .content .button-primary{padding:4px 36px;margin:.5em auto;max-width:360px}.edd-promo-notice__popup .content__link{color:#101517}#edd-paypal-commerce-connect-wrap.loading ul.edd-paypal-account-status li span,#edd-paypal-commerce-connect-wrap.loading ul.edd-paypal-webhook-events li span{animation:skeleton-loading 1s infinite alternate;width:250px;height:18px;display:inline-block}#edd-paypal-commerce-connect-wrap.loading .edd-paypal-connect-actions span{animation:skeleton-loading 1s infinite alternate;width:150px;height:32px;display:inline-block}.edd-paypal-account-status ul{margin-right:25px;list-style-type:none}.edd-paypal-account-status>li{margin-bottom:1em}.edd-paypal-account-status ul:not(.edd-paypal-webhook-events) li{margin:.25em 0}.edd-paypal-account-status .dashicons-yes{color:#008a20}.edd-paypal-account-status .dashicons-no{color:#d63638}@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.wrap-licenses .edd-licenses__description{margin:2em 1em}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}@media screen and (min-width:600px){.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:unset}}.wrap-licenses tbody{display:-ms-grid;display:grid;gap:1em}.wrap-licenses .form-table tr{margin:0;background:#fff;border:1px solid #dcdcde;border-radius:3px;padding:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between}@media screen and (min-width:600px){.wrap-licenses .form-table tr{display:-ms-grid;display:grid;-ms-grid-columns:200px 1fr;grid-template-columns:200px 1fr}}.wrap-licenses .form-table th{background:#f9f9f9;margin-bottom:2.5em;padding:1em;border-bottom:1px solid #dcdcde;width:unset}@media screen and (min-width:600px){.wrap-licenses .form-table th{border-bottom:none;margin-bottom:0;display:flex;align-items:center}}.wrap-licenses .form-table td{margin:0;padding:0;display:flex;flex-direction:column;gap:2.5em;flex-grow:1}@media screen and (min-width:600px){.wrap-licenses .form-table td{flex-direction:row;gap:unset}}.wrap-licenses .form-table td input.regular-text{margin:0;width:100%;max-width:250px}.wrap-licenses .form-table td button{margin:0}.wrap-licenses .form-table .edd-license__control{flex-grow:1;padding:0 1em;display:flex;gap:4px;align-items:center;justify-content:center}@media screen and (min-width:600px){.wrap-licenses .form-table .edd-license__control{justify-content:flex-end}}.wrap-licenses .form-table .edd-licensing__actions{display:flex;gap:4px}.wrap-licenses .edd-license-data[class*=edd-license-]{background:#f9f9f9;padding:1em;border-top:1px solid #dcdcde;margin:0;width:100%;box-sizing:border-box;display:flex;align-items:flex-end}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}@media screen and (min-width:600px){.wrap-licenses .edd-license-data[class*=edd-license-]{border-top:none;width:unset;flex-basis:100%;align-items:center}.wrap-licenses .edd-license-data[class*=edd-license-]:not(:only-child){flex:0 1 300px}}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses .edd-license-data.edd-license-expired a,.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover,.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.edd-sub-nav{margin:0;display:flex;justify-content:flex-start;gap:4px;flex-wrap:wrap}@media screen and (max-width:782px){.edd-sub-nav{justify-content:center}}.edd-sub-nav__wrapper{margin:16px 0}.edd-sub-nav li{border:2px solid #f0f0f1;border-radius:4px;margin:0}.edd-sub-nav li a{color:#646970;display:block;padding:6px 14px;text-decoration:none;white-space:nowrap}.edd-sub-nav li a:active,.edd-sub-nav li a:focus{box-shadow:none}.edd-sub-nav li:active,.edd-sub-nav li:focus,.edd-sub-nav li:hover{background-color:#fff;box-shadow:none;outline:none;border-color:#a7aaad}.edd-sub-nav li.current{background-color:#d7dade;font-weight:600}.edd-sub-nav__wrapper+.notice{margin-right:0}.edd-settings-content{max-width:1440px}.edd-settings-content h3{margin:0}.edd-settings-color,.edd-settings-colors{display:flex;flex-wrap:wrap;gap:1em}.edd-settings-color{flex-direction:column}.edd-upload-button-wrapper{width:100%;display:flex;gap:5px}.edd-upload-button-wrapper button.edd_settings_upload_button{margin-bottom:0}#edd-payment-gateways a.button.edd-settings__button-settings{position:absolute;left:2em;min-height:unset;height:1.5em;width:1.5em;border:none;background-color:#f9f9f9}#edd-payment-gateways a.button.edd-settings__button-settings,#edd-payment-gateways a.button.edd-settings__button-settings:active,#edd-payment-gateways a.button.edd-settings__button-settings:hover{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS4yOSA2LjI5M2wtMS41MTUuODc1YTUuODczIDUuODczIDAgMDEwIDEuNjY0bDEuNTE1Ljg3NS0yLjE2NiAzLjc1My0xLjUxNi0uODc1YTUuODI3IDUuODI3IDAgMDEtMS40NDEuODMzdjEuNzQ5SDUuODM0di0xLjc1YTUuODI1IDUuODI1IDAgMDEtMS40NDEtLjgzMmwtMS41MTYuODc1TC43MSA5LjcwN2wxLjUxNi0uODc1YTUuODc4IDUuODc4IDAgMDEwLTEuNjY0TC43MSA2LjI5MyAyLjg3NyAyLjU0bDEuNTE2Ljg3NmE1LjgyNyA1LjgyNyAwIDAxMS40NC0uODMzVi44MzNoNC4zMzR2MS43NWE1LjgzIDUuODMgMCAwMTEuNDQuODMzbDEuNTE3LS44NzYgMi4xNjYgMy43NTN6TTggMTAuMzMzYTIuMzMzIDIuMzMzIDAgMTAwLTQuNjY2IDIuMzMzIDIuMzMzIDAgMDAwIDQuNjY2eiIgZmlsbD0iIzZCNzI4MCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUuMjkgNi4yOTNsLTEuNTE1Ljg3NWE1Ljg3MyA1Ljg3MyAwIDAxMCAxLjY2NGwxLjUxNS44NzUtMi4xNjYgMy43NTMtMS41MTYtLjg3NWE1LjgyNyA1LjgyNyAwIDAxLTEuNDQxLjgzM3YxLjc0OUg1LjgzNHYtMS43NWE1LjgyNSA1LjgyNSAwIDAxLTEuNDQxLS44MzJsLTEuNTE2Ljg3NUwuNzEgOS43MDdsMS41MTYtLjg3NWE1Ljg3OCA1Ljg3OCAwIDAxMC0xLjY2NEwuNzEgNi4yOTMgMi44NzcgMi41NGwxLjUxNi44NzZhNS44MjcgNS44MjcgMCAwMTEuNDQtLjgzM1YuODMzaDQuMzM0djEuNzVhNS44MyA1LjgzIDAgMDExLjQ0LjgzM2wxLjUxNy0uODc2IDIuMTY2IDMuNzUzek04IDEwLjMzM2EyLjMzMyAyLjMzMyAwIDEwMC00LjY2NiAyLjMzMyAyLjMzMyAwIDAwMCA0LjY2NnoiIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iLjUiLz48L3N2Zz4=);background-size:1em;background-repeat:no-repeat;background-position:50%}.edd-plugin__active #edd-payment-gateways a.button.edd-settings__button-settings{display:block}.edd-settings__list--disc{list-style:disc;list-style-position:inside}.wp-list-table.discounts .column-amount{width:90px}.wp-list-table.discounts th.column-use_count{width:150px}#edd-products{height:100px;min-width:200px}#edd-add-discount input[type=text],#edd-edit-discount input[type=text]{width:300px}#edd-add-discount .edd-discount-datetime input,#edd-edit-discount .edd-discount-datetime input{vertical-align:middle}#edd-add-discount input[type=text].edd_datepicker,#edd-edit-discount input[type=text].edd_datepicker{display:inline-block;width:183px}#edd-edit-discount textarea{height:100px}.edd-amount-type-wrapper{position:relative;display:flex}.edd-amount-type-wrapper select{border-top-right-radius:0;border-bottom-right-radius:0;width:auto!important}.edd-amount-type-wrapper #edd-amount{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-2px;padding:0 8px;width:unset;max-width:125px}.edd-amount-type-wrapper input:focus{z-index:2}.edd-code-wrapper{display:flex;align-items:stretch;gap:3px}.edd-popup-trigger{display:flex!important;align-items:center;gap:3px}@media screen and (max-width:782px){.edd-popup-trigger{margin-bottom:0!important}}@media screen and (max-width:480px){.edd-popup-trigger span:not(.dashicons){display:none}}.edd-code-generator-popup{position:absolute;z-index:99;width:250px;height:auto;margin:auto;padding:10px;transform:translate(-240px,15px);background-color:#fff;border:1px solid #8c8f94;border-radius:4px;box-shadow:0 -2px 5px 0 rgba(0,0,0,.25);box-sizing:border-box;display:none}.edd-code-generator-popup:after{content:"";width:15px;height:15px;background:#fff;position:absolute;margin:auto;transform:rotate(-45deg);z-index:-1;right:0;left:0;top:-8.5px;border-color:#8c8f94;border-style:solid;border-width:1px 1px 0 0}@media screen and (max-width:480px){.edd-code-generator-popup{transform:translateY(15px) translateX(-105px)}.edd-code-generator-popup:after{right:70%}}.edd-code-generator-popup .edd-form-group{width:100%;margin-bottom:10px;padding-bottom:10px;box-sizing:border-box;margin-top:0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dcdcde;height:40px}.edd-code-generator-popup .edd-form-group:last-of-type{border-bottom:0}.edd-code-generator-popup .edd-form-group label{padding:5px 0;width:60px;font-size:12px;margin-bottom:0;box-sizing:border-box}@media screen and (max-width:782px){.edd-code-generator-popup .edd-form-group label{line-height:28px}}.edd-code-generator-popup .edd-form-group input:not([type=checkbox]):not([type=radio]){width:120px!important;min-height:0;height:30px}.edd-code-generator-popup .edd-form-group input:not([type=checkbox]):not([type=radio]):not(:focus){border:1px solid #8c8f94}.edd-code-generator-popup #edd-generate-code{width:100%}@media screen and (max-width:782px){.edd-code-generator-popup #edd-generate-code:before{margin-top:8px}}.edd_dashboard_widget{display:-ms-grid;display:grid;-ms-grid-columns:(minmax(150px,1fr))[2];grid-template-columns:repeat(2,minmax(150px,1fr));grid-gap:1em}.edd_dashboard_widget>div:not(.table_left):not(.table_right){-ms-grid-column-span:2;grid-column:span 2}.edd_dashboard_widget table thead td{border-bottom:1px solid #c3c4c7;color:#777}.edd_dashboard_widget .inside{font-size:12px}.edd_dashboard_widget td{padding:3px 0}.edd_dashboard_widget .b,.edd_dashboard_widget .t{line-height:1.5;vertical-align:middle}.edd_dashboard_widget .b{text-align:left}.edd_dashboard_widget .t{font-size:12px;padding-left:12px;color:#777;width:100%}.edd_dashboard_widget .label_heading{border-top:1px solid #c3c4c7;color:#8f8f8f;font-size:12px;font-weight:400;display:block;padding-top:10px;margin:0 12px 8px 0}.edd_dashboard_widget .edd_dashboard_widget_subheading{border-top:1px solid #c3c4c7;color:#8f8f8f;font-size:14px;padding-top:10px;margin:1em 0 0}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0}.edd_dashboard_widget .edd_price_label{background:var(--wp-admin-theme-color);border-radius:3px;color:#fff;font-size:10px;padding:2px 4px;margin-left:2px}.edd_dashboard_widget table{width:100%;margin-right:0;margin-bottom:1em}td.edd_order_label{width:80%}td.edd_order_price{text-align:left}@media handheld,only screen and (max-width:1000px){.edd_dashboard_widget .edd-recent-email{display:none}}.edd-dashboard-notice{-ms-grid-column-span:2;grid-column:span 2;padding:1px;text-align:center;margin:1em -1em -1em;background-color:#f9f9f9;border:1px solid #c3c4c7}.edd-dashboard-notice--error{background:#d63638;color:#fff}.edd-dashboard-notice--error a{color:#fff}body.dashboard_page_edd-upgrades.js .postbox .hndle{cursor:default}.edd-toggle{position:relative;display:flex;gap:5px;overflow:visible;align-items:center}.edd-toggle input[type=checkbox]{position:relative;margin:0;padding:0;width:42px;min-width:42px;height:24px;background-color:#ccc;transition:background .2s ease;border-radius:34px;box-shadow:none;border:none}.edd-toggle .label{white-space:nowrap}.edd-toggle input[type=checkbox]:before{position:absolute;content:"";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%}@media only screen and (max-width:782px){.edd-toggle input[type=checkbox]:checked:before{margin:-.1875rem -.25rem 0 0}}.edd-toggle input[type=checkbox]:checked{background-color:#007cba;background-color:var(--wp-admin-theme-color)}.edd-toggle input[type=checkbox]:active,.edd-toggle input[type=checkbox]:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px #7e8993}.edd-toggle input[type=checkbox]:checked:active,.edd-toggle input[type=checkbox]:checked:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #007cba;box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.edd-toggle input[type=checkbox]:checked:before{transform:translateX(-22px)}.edd-toggle input[type=checkbox]:disabled{opacity:.5}.edd-toggle.inverse input[type=checkbox]{background-color:#007cba;background-color:var(--wp-admin-theme-color);transform:scaleX(-1)}.edd-toggle.inverse input[type=checkbox]:checked{background-color:#ccc}.edd-notice .notice-dismiss,.edd-wrap a{text-decoration:none}.wp-core-ui .edd-delete,a.edd-delete{color:#a00}.wp-core-ui .edd-delete:hover,a.edd-delete:hover{color:red}body.post-type-download #contextual-help-link-wrap,body.post-type-download #screen-options-link-wrap{top:5px!important}body.post-type-download #screen-meta{margin:0 -20px -1px 0}#edd-header{border-top:5px solid #0c5d95;border-bottom:1px solid #c3c4c7;padding:20px 0;margin-right:-20px;background:#fff}#edd-header-wrapper{display:flex;justify-content:space-between;padding:0 20px;align-items:center}#edd-header img{display:block;max-width:300px;margin:0}.edd-header-page-title-wrap{font-size:1.75em;margin-top:-5px;margin-left:auto;padding-right:7px}.edd-header-separator{margin-top:-2px;opacity:.25}.edd-header-page-title{font-weight:400;font-size:1em;line-height:1.3em;display:inline}.edd-header-page-title-wrap .button{margin-right:5px}.no-js #edd-header-actions{display:none}#edd-header .edd-round{position:relative;background-color:#f3f4f5;border-radius:50%;width:40px;height:40px;display:flex;align-items:center;justify-content:center;margin-right:10px;cursor:pointer;transition:background-color .2s ease}#edd-header .edd-round.edd-hidden{display:none}button.edd-round{border:none}#edd-header button.edd-round:hover{background-color:#e5e5e5}button.edd-round:active,button.edd-round:focus{outline:2px solid #0c5d95}#edd-header .edd-number{position:absolute;background-color:#df2a4a;width:16px;height:16px;font-weight:600;font-size:10px;color:#fff;top:-8px;right:50%;transform:translateX(50%);margin:0;animation:bounce 2s 5}#edd-header .edd-number.edd-hidden{display:none!important}#edd-header .edd-round svg{width:20px;height:20px}@media screen and (max-width:840px){#edd-header img,.edd-header-separator{display:none}}.edd_datepicker{height:29px}.edd-from-to-wrapper input{width:105px;margin:0;position:relative;z-index:1}.edd-from-to-wrapper input[name*=start],.edd-from-to-wrapper input[name=filter_from]{border-top-left-radius:0;border-bottom-left-radius:0}.edd-from-to-wrapper input[name*=end],.edd-from-to-wrapper input[name=filter_to]{margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}.edd-from-to-wrapper input:focus{z-index:2;position:relative}.download_page_edd-settings .edd-check-wrapper{clear:both}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.edd-sortable-list{margin:0;width:300px;position:relative}.edd-sortable-list li{margin:0;padding:0;position:relative;height:28px;cursor:move}.edd-sortable-list li.edd-toggle{padding:4px 0}.edd-sortable-list li label *{vertical-align:middle}.edd-sortable-list li label:after{display:block;width:17px;height:17px;position:absolute;left:6px;top:0;color:#aaa;font-family:dashicons;font-size:17px;content:"";cursor:move}.form-table .edd-sortable-list li label{display:block;height:28px;padding:0;margin:0}.edd-sortable-list .payment-icon{width:32px;height:24px;position:relative;margin-left:5px}.download_page_edd-settings .edd-settings-payment-icon-wrapper{margin-top:5px}.download_page_edd-settings .edd-settings-payment-icon-wrapper input{margin-top:1px}.download_page_edd-settings .form-table .edd-settings-payment-icon-wrapper input[type=checkbox]+label{margin:0;display:inline-block}.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-icon-image{margin-left:5px;width:32px;display:inline-block;vertical-align:middle}.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-option-name{vertical-align:middle}.download_page_edd-settings .taxrates td,.download_page_edd-settings .taxrates th{padding:8px 10px}.download_page_edd-settings .taxrates td{line-height:1.5em;vertical-align:top;margin:0}.download_page_edd-settings .taxrates .regular-text{width:100%}#TB_window{overflow:hidden}#TB_title{padding:5px}#TB_ajaxContent{width:calc(100% - 30px)!important;padding:15px;margin:0;height:calc(100% - 118px)!important}#TB_ajaxWindowTitle{font-size:18px;font-weight:600;line-height:30px}#TB_closeWindowButton{left:6px;top:6px}#choose-download-wrapper{width:100%}#choose-download-wrapper .wrap{overflow-y:scroll;margin:0;padding:0;height:calc(100% - 50px)}#choose-download-wrapper .submit-wrapper{position:absolute;width:100%;bottom:0;padding:0;margin:0 -15px 0 0;text-align:left}#choose-download-wrapper .submit-wrapper div{background-color:#fafafa;padding:15px;border-top:1px solid #ddd}.wp-media-buttons .button.edd-thickbox{padding-right:0}.wp-media-buttons .button.edd-email-tags-inserter .dashicons{margin-top:-2px}.download_page_edd-payment-history .edit-post-editor-regions__header{flex-shrink:0;height:auto;border-bottom:1px solid #e2e4e7;z-index:30;position:sticky;top:32px;margin-right:-20px}@media screen and (max-width:782px){.download_page_edd-payment-history .edit-post-editor-regions__header{position:static;top:46px}}.download_page_edd-payment-history .edit-post-header{height:56px;background:#fff;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:100%;box-sizing:border-box;padding:4px 20px}@media screen and (max-width:782px){.download_page_edd-payment-history .edit-post-header{padding-right:10px;padding-left:10px}}@media(min-width:280px){.download_page_edd-payment-history .edit-post-header{flex-wrap:nowrap}}.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar{order:0}.download_page_edd-payment-history .edit-post-header .edit-post-header__settings{order:1}.download_page_edd-payment-history .edit-post-header #publishing-action,.download_page_edd-payment-history .edit-post-header .edit-post-header__settings,.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar{display:flex;align-items:center}.download_page_edd-payment-history .edit-post-header #publishing-action .spinner{margin:0 0 0 5px}.download_page_edd-payment-history .edit-post-header .button-primary{margin:2px;height:34px;line-height:32px;font-size:13px}#edd-order-items .hndle{display:flex;align-items:center;justify-content:space-between}#edd-order-items .hndle .edd-toggle{font-weight:400}.edd-add-order-item td{vertical-align:middle}.edd-add-order-item input{width:80%}.edd-add-order-item input[readonly]{color:#555;background:none;border:1px solid transparent;box-shadow:none}.order-customer-info .customer-details-wrap{margin:15px 0;align-items:center}.order-customer-info .customer-details-wrap .spinner{margin:0}.order-customer-info .customer-details{display:flex;flex-direction:column}.order-customer-info .customer-details .customer-since{color:#666;display:block;margin:4px 0 6px}.order-customer-info .customer-details>span{margin-bottom:5px}.edd-order-add-download-select .spinner{display:none}table.edd-order-overview-summary{border-width:0;table-layout:fixed}table.edd-order-overview-summary--refund{border-width:0}@media screen and (min-width:782px){.edd-order-overview .column-right{text-align:left}}.edd-ml-auto{margin-right:auto!important}@media screen and (min-width:782px){.edd-ml-lg-auto{margin-right:auto!important}}.edd-ml-auto+.edd-ml-auto{margin-right:10px!important}.edd-order-overview-summary__items-name{align-self:flex-start}.edd-order-overview-summary__items>:nth-child(odd){background-color:#f9f9f9}@media screen and (min-width:782px){.edd-order-overview-summary__items tr:last-child td,.edd-order-overview-summary__items tr:last-child th{border-bottom:1px solid #e5e5e5}}@media screen and (max-width:782px){.edd-order-overview-summary .row-actions>*,.edd-order-overview-summary__items-name .row-actions{display:block!important}.edd-order-overview-summary .row-actions>:not(:first-child):before{display:none}}.edd-order-overview-summary th:not(.column-primary){width:100px}.edd-order-overview-summary .row-actions>:not(:first-child):before{color:#999;content:" | "}.edd-order-overview-summary .row-actions .text{color:#555}.edd-order-overview-summary .removable{display:flex;align-items:center;position:relative}.edd-order-overview-summary .removable .delete{display:inline-block;margin-left:10px;margin-right:-8px;padding:10px;border-left:1px solid #e5e5e5;color:#a00}.edd-order-overview-summary .removable .delete:hover{color:#dc3232}.edd-order-overview-summary__adjustments .column-primary{font-weight:600}.edd-order-overview-summary__adjustments td small{font-weight:400}.edd-order-overview-summary__subtotal .column-primary,.edd-order-overview-summary__tax tr:first-of-type .column-primary,.edd-order-overview-summary__total .column-primary{font-weight:600}.edd-order-overview-summary__adjustments td,.edd-order-overview-summary__subtotal td,.edd-order-overview-summary__tax td,.edd-order-overview-summary__total td{vertical-align:middle}.edd-order-overview-summary__tax td small,.edd-order-overview-summary__total td small{font-weight:400}.edd-order-overview-summary__total .total{color:#017d5c;display:inline-block}.edd-order-overview-summary__total .total.is-negative{color:#a00}@media screen and (min-width:783px){.edd-order-overview-summary__adjustments .removable .delete{margin-right:-50px}.edd-order-overview-summary__total .total{font-size:150%;padding-top:5px;padding-bottom:5px}}.edd-order-overview-summary__total tr:last-child td:not(:first-of-type),.edd-order-overview-summary__total tr:last-child th{border-top:1px solid #e5e5e5}.edd-order-overview-summary__total .notice{margin:-1px}.edd-order-overview-summary__total .notice p{font-weight:400;margin:.5em 0}.edd-order-overview-summary__refunds .column-primary{font-weight:600}.edd-order-overview-summary__refunds td small{font-weight:400}.edd-order-overview-summary__refunds tr:first-child td{border-top:1px solid #e5e5e5}#edd-order-overview-actions.inside{border-top:1px solid #ccd0d4;margin-top:0;display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}#edd-order-overview-actions.inside:empty{padding:0;border-top:0}#edd-order-overview-actions.inside>div{display:flex;align-items:center}#edd-order-overview-actions .edd-order-overview-actions__notice{flex-basis:100%;margin-top:15px}.edd-order-overview-actions .button{width:100%;margin-bottom:12px}.edd-order-overview-actions .button:last-of-type{margin-bottom:0}@media screen and (min-width:782px){.edd-order-overview-actions .button{width:auto;margin-right:12px;margin-bottom:0}.edd-order-overview-actions .button:first-of-type{margin-right:auto}}.edd-order-overview-actions__locked{font-style:italic;opacity:.8}@media screen and (max-width:782px){.edd-order-overview-actions__locked{margin-bottom:12px}}.edd-order-overview-actions__refund .dashicons{margin-left:8px}.edd-dialog .ui-button-icon-only{font-size:0}.download_page_edd-payment-history .ui-dialog,.download_page_edd-payment-history .ui-dialog-content{overflow:visible}.edd-order-overview-modal form>p{margin-top:0}.edd-order-overview-modal fieldset legend,.edd-order-overview-modal form label{display:block;margin-bottom:4px}.edd-order-overview-modal fieldset{margin-bottom:calc(1em - 3px)}.edd-order-overview-modal fieldset>p{margin:2px 0 3px}.edd-order-overview-modal form .submit{margin:0 -16px -16px;padding:16px;background:#fcfcfc;border-top:1px solid #dfdfdf;display:flex;align-items:center}.edd-order-overview-modal form .submit .spinner{margin:0}.edd-order-overview-add-item [for=auto-calculate]{display:flex;align-items:center}.edd-order-overview-add-item [for=auto-calculate] input[type=checkbox]{margin-top:0}.edd-order-overview-add-item [for=auto-calculate] .label{line-height:1.15;margin-right:8px}.edd-order-overview-add-item [for=auto-calculate] .label small{margin-top:4px;display:block;opacity:.75}.edd-order-overview-add-adjustment .notice,.edd-order-overview-add-item .notice{margin:0 0 1rem}.edd-order-overview-add-adjustment #description,.edd-order-overview-add-discount select{width:100%}.edd-order-overview-error{font-style:italic;color:#a00;display:block;margin:4px 0}.edd-order-copy-download-link textarea{width:100%}.edd-order-resend-email-chooser legend{font-weight:700;margin-bottom:4px}.edd-order-resend-email-chooser p{margin:4px 0}.edd-notes .edd-note{padding:10px;background-color:#ffe;border:1px solid #cc0;width:100%;position:relative;margin-bottom:10px;box-sizing:border-box;overflow:hidden}.edd-notes .edd-note.deleting{opacity:.5}.edd-notes .edd-note__header{display:flex;align-items:center}.edd-add-note .spinner{float:none;display:inline-block;margin:0}.edd-notes .edd-note time{font-size:11px;color:#aaa}.edd-notes .edd-note .edd-note-author{margin-left:5px}.edd-notes .edd-note .edd-delete-note{color:#a00;font-weight:700;text-decoration:none;margin-right:auto}.edd-notes .edd-note .edd-delete-note:hover{color:#888}.edd-notes .edd-note p:last-child{margin-bottom:0}.edd-notes .edd-no-notes{margin:4px 0 10px}textarea[name=edd-note]{width:100%;min-height:70px;margin-top:0}.edd-notes-wrapper{width:80%}.edd-note-pagination{float:left;margin:-35px 5px 15px}.edd-note-pagination a,.edd-note-pagination span.page-numbers{padding:5px 8px;margin:2px;text-decoration:none}.edd-note-pagination a{border:1px solid #e5e5e5;background:#fcfcfc}.edd-note-pagination a:last-child,.edd-note-pagination span.page-numbers:last-child{margin-left:0}.post-type-download .tablenav.top .edd-select{margin-left:6px}.wp-list-table.addresses .column-primary strong,.wp-list-table.customers .column-primary strong,.wp-list-table.discounts .column-primary strong,.wp-list-table.emails .column-primary strong,.wp-list-table.orderadjustments .column-primary strong,.wp-list-table.orderitems .column-primary strong,.wp-list-table.orders .column-primary strong{font-size:14px}.wp-list-table.customers .column-primary .avatar,.wp-list-table.emails .column-customer .avatar{float:right;margin-left:10px;margin-top:1px;border-radius:5px}.wp-list-table.orders div.order-list-email{font-size:.85em;color:#888}.wp-list-table.orders th.column-amount{width:100px}.wp-list-table .row-actions span.activate a{color:green}.wp-list-table .row-actions span.refund a{color:#836fff}.wp-list-table .row-actions span.cancel a{color:#cc8c00}.wp-list-table .row-actions span.cancel a:hover,.wp-list-table .row-actions span.refund a:hover{opacity:.8}.wp-list-table .type-download .row-actions{color:#999}.no-js.edit-tags-php.post-type-download .wp-heading-inline{position:absolute;top:0}.no-js.edit-tags-php.post-type-download .nav-tab-wrapper{margin-top:50px}.download_page_edd-customers .wrap .nav-tab-wrapper .page-title-action,.download_page_edd-discounts .wrap .nav-tab-wrapper .page-title-action,.download_page_edd-payment-history .wrap .nav-tab-wrapper .page-title-action,.edit-tags-php.post-type-download .wrap .nav-tab-wrapper .page-title-action{top:3px;margin-right:10px;line-height:24px}#edd-payments-filter ul.subsubsub{margin-bottom:8px}tr.status-refunded td{background:#cecece;border-top-color:#ccc}marquee{padding:0;margin:0}@media handheld,only screen and (max-width:640px){.wp-list-table.downloads th{width:auto!important}}#edd-download-link-textarea{width:100%}.edd_files_name_label{width:225px;float:right}.edd_files_url_label{width:220px;float:right}#postbox-container-1 .edd_files_name_label,#postbox-container-1 .edd_files_url_label{width:80px}#edd_product_files .inside,#edd_product_prices .inside{margin-bottom:0}textarea#edd-payment-note{width:100%;height:4em;margin:0}#edd-order-items .row .edd-purchased-files-list-wrapper .download{line-height:1.4}#edd-order-items .edd-purchased-files-list-wrapper .edd-purchased-option{color:#666}input[class*=edd-price-field]{max-width:125px}#edd-order-download-quantity[type=number].small-text,#edd-order-download-tax[type=text].small-text,[class*=item_] [class*=edd-payment-details-download-][type=number].small-text{height:25px}#edd-order-download-quantity[type=number].small-text,.item_price .edd-payment-details-download-quantity[type=number].small-text{width:55px}#edd-order-download-tax[type=text].small-text,.item_tax .edd-payment-details-download-item-tax[type=number].small-text{width:80%;max-width:125px}#edd_product_notes_field{display:block;margin:12px 0 0;height:4em;width:100%}.edd-metabox-title-action{margin:0;float:left;padding:4px 8px;position:relative;top:-1px;text-decoration:none;border:1px solid #ccc;border-radius:2px;background:#f7f7f7;text-shadow:none;font-weight:600;font-size:10px;line-height:normal;color:#0073aa;cursor:pointer;outline:0}.edd-metabox-title-action:hover{border-color:#008ec2;background:#00a0d2;color:#fff}.edd-edit-purchase-element .tablenav{padding:2px 10px 8px}.edd-edit-purchase-element .edd-order-children-wrapper{margin:0 -1px}.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 table{border-top:none;border-bottom:none}.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 .tablenav{display:none}.edd-edit-purchase-element[class*=columns-] ul li{padding-left:1%}#edd-edit-order-form .column:nth-child(odd),#edd-edit-order-form .columns-4 .column:nth-child(odd),#edd-edit-order-form .columns-5 .column:nth-child(3n+1){margin-left:0}#edd-edit-order-form input.large-text{width:90%}.edd-edit-purchase-element ul li.item_price{width:15%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:25%}.edd-edit-purchase-element ul li.item_tax{width:15%}.edd-edit-purchase-element ul li.price{width:20%}.edd-admin-box-inside{border-bottom:1px solid #f1f1f1;clear:both;padding:12px;margin:0;word-wrap:break-word}.edd-admin-box-inside--row{display:flex;flex-wrap:wrap;word-break:break-all;justify-content:space-between;align-items:center}.edd-admin-box-inside>p{margin:8px 3px}.edd-admin-box-inside .strong{font-weight:600}.edd-admin-box div:not(.edd-admin-box-inside--row) .label{display:block;margin-bottom:4px;margin-left:0}.edd-admin-box .label--has-tip{display:flex;align-items:center}.edd-admin-box .label--has-tip .edd-help-tip{margin-top:0;font-size:20px}.edd-admin-box div:not(.edd-admin-box-inside--row) .label--has-checkbox{margin-bottom:0}.edd-payment-fees .fee-label{color:#666;font-weight:400}.edd-admin-box .right{float:left}#edd-order-refunds-list{padding-right:25px}#poststuff .edd-order-data .inside{margin:0;padding:0}.edd-order-data .edd-select-chosen{width:130px!important}.edd-order-data input.edd_datepicker{width:180px}.edd-order-data input[type=number].edd-payment-time-hour,.edd-order-data input[type=number].edd-payment-time-min{width:50px}.edd-order-data .edd-tax-rate{color:#9c9c9c;font-style:italic;padding:5px}#edd_general_logs p{margin:0;padding:0}.edd-admin-box-inside span.label{margin-left:10px}#edd-order-resend-receipt .inside{margin-top:11px}.edd-order-resend-receipt-header{font-size:14px;line-height:1.4}.edd-admin-box-inside:last-child{border-bottom:0}#edd-edit-order-form .data-payment-key{word-break:break-all}.edd-order-update-box #major-publishing-actions .button-secondary{margin-left:10px}.edd-order-update-box .button-primary{margin-left:0}.edd-edit-purchase-element .edd-select-chosen{width:196px}.edd-edit-purchase-element ul{clear:both;display:block}#edd-customer-details .actions{float:left}.order-data-address h3{margin:0 0 10px}.order-data-address #edd-order-address-country-wrap,.order-data-address #edd-order-address-state-wrap{display:inline-block;width:50%;max-width:300px}.edd-order-data input.small-text{margin:0}.edd-order-data input.med-text{margin:0;width:100px}.edd-edit-purchase-element ul li{display:block;line-height:1.4;position:relative;margin:0;vertical-align:middle;font-size:13px}.edd-edit-purchase-element .row{padding:12px}.edd-edit-purchase-element .row:not(:last-child){border-bottom:1px solid #eee}.edd-edit-purchase-element .row:nth-child(odd):not(.header){background-color:#f9f9f9}.edd-edit-purchase-element .row.header{padding:6px 12px;font-weight:600;vertical-align:top}.edd-edit-purchase-element ul{margin:0 0 15px}.edd-edit-purchase-element ul:last-of-type{margin-bottom:0}#edd-order-data .data span{color:#666;font-weight:600}.edd-edit-purchase-element .inside{padding:12px}.edd-edit-purchase-element .edd-purchased-download-title{font-size:14px;font-weight:500}.edd-edit-purchase-element .edd-purchased-download-title .deleted{color:#777}.edd-edit-purchase-element .edd-purchased-download-actions{color:#777;line-height:1.4}.edd-edit-purchase-element .edd-purchased-download-actions .edd-purchased-download-actions-label{font-weight:500}.edd-edit-purchase-element .edd-purchased-download-actions a{color:#777;font-size:12px}.edd-edit-purchase-element .edd-purchased-download-actions a:hover{color:#444}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download{color:#a00}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download:hover{color:red}.edd-add-adjustment-to-purchase,.edd-add-download-to-purchase{padding:15px;border-top:1px solid #e5e5e5;background-color:#f5f5f5}.edd-add-adjustment-to-purchase .chosen-container,.edd-add-download-to-purchase .chosen-container{width:90%!important;max-width:220px!important}.edd-add-adjustment-to-purchase .spinner,.edd-add-download-to-purchase .spinner{margin:0;float:none}.edd-add-download-to-purchase .edd-add-order-quantity{width:40px;height:29px;vertical-align:middle}.edd-add-adjustment-to-purchase .edd-add-adjustment-button,.edd-add-adjustment-to-purchase input[type=text],.edd-add-download-to-purchase .edd-add-order-item-button{height:29px}@media screen and (max-width:1284px){.edd-edit-purchase-element .edd-purchased-download-title{font-size:16px}.edd-edit-purchase-element ul li.item_price{width:22%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax{width:25%}.edd-edit-purchase-element ul li.price{width:20%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:10px}}@media screen and (max-width:1024px){.edd-edit-purchase-element ul li.item_price.item_quantity{width:40%}.edd-edit-purchase-element ul li.price{width:24%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:15px}.edd-edit-purchase-element .edd-purchased-download-actions,.edd-edit-purchase-element .edd-purchased-download-actions a{font-size:14px}}@media screen and (max-width:782px){.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity{padding-bottom:10px}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax,.edd-edit-purchase-element ul li.price{width:20%;padding-bottom:10px}.edd-payment-details-download-amount,.edd-price-currency{font-size:16px}.order-data-column input[type=email]{padding:6px 10px}.edd-refund-submit-line-total td:last-of-type{flex:0 0 120px}#edd-item-tables-wrapper .addresses tbody tr{display:-ms-grid;display:grid}#edd-item-tables-wrapper .addresses tbody td:not(.no-items){padding-right:35%}}@media screen and (max-width:600px){.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity,.edd-edit-purchase-element ul li.item_tax{width:100%;padding-bottom:20px}.edd-edit-purchase-element .edd-add-download-to-purchase ul li.item_tax,.edd-edit-purchase-element ul li.price{width:100%;padding-bottom:0}.edd-edit-purchase-element .edd-add-download-to-purchase-actions{padding-top:15px}}#edd_product_stats .label{display:inline-block}#edd_product_stats .product-earnings-stats:before,#edd_product_stats .product-sales-stats:before{color:#82878c;font:normal 20px/1 dashicons;display:inline-block;padding:0 0 0 2px;position:relative;top:0;right:-1px;speak:none;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#edd_product_stats .product-sales-stats:before{content:""}#edd_product_stats .product-earnings-stats:before{content:""}body.download_page_edd-reports{overflow-y:scroll}.edd-chip{font-size:10px;font-weight:700;text-transform:uppercase;line-height:1;padding:3px;border-radius:3px;color:#fff;background-color:#444}.edd-reports-wrapper .postbox h2,.edd-reports-wrapper .postbox h3{font-size:1.3em}#edd-dashboard-widgets-wrap .metabox-holder{padding-top:0}.edd-reports-wrapper .postbox .edd-select{max-width:200px;vertical-align:baseline;margin-left:4px;margin-bottom:16px}.download_page_edd-reports #edd-item-wrapper{margin:0}#edd-dashboard-widgets-wrap .postbox h2,#edd-dashboard-widgets-wrap .postbox h3{cursor:default}.edd-date-range-options .edd_datepicker{width:105px}.edd-report-wrap{clear:both}.edd-report-wrap h3{clear:both;margin:0 0 20px}.edd-reports-chart,.edd-reports-table{margin-bottom:20px}.edd-admin--has-grid{display:grid;display:-ms-grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));grid-gap:20px}.edd-admin--has-grid .postbox{margin-bottom:0}.edd-admin--has-grid .edd-from-to-wrapper{display:flex;margin-bottom:16px;width:100%}.edd-admin--has-grid .edd-from-to-wrapper input{width:100%}.edd-admin--has-grid .edd-from-to-wrapper span{flex-grow:1}.edd-admin--has-grid form{display:flex;flex-direction:column;flex-wrap:wrap;position:relative}fieldset.edd-to-and-from-container{display:flex;gap:8px}fieldset.edd-to-and-from-container select{flex:0 0 calc(50% - 6px)}span.edd-to-and-from--separator{line-height:normal;-ms-grid-row-align:center;align-self:center;margin-bottom:16px}.edd-admin--has-grid .postbox .edd-select{max-width:100%;margin-left:0}.edd-admin--has-grid .button.updated-message:before,.edd-admin--has-grid .button.updating-message:before{vertical-align:text-bottom;margin:0 0 0 5px}.edd-import-export-form .edd-progress{background:#ddd;border-radius:15px;height:15px;flex-basis:100%}.edd-import-export-form .edd-progress div{background:#ccc;border-radius:15px;height:100%;width:0}.edd-import-export-form .notice-wrap{background-color:#f4f4f4;border-color:#eae9e9;border-style:solid;border-width:1px 0;padding:12px;overflow:auto;margin:20px -12px -23px;position:relative;width:100%;display:flex;justify-content:space-between;align-items:center}.notice-wrap div.notice{margin:0}h3+.notice-wrap .notice{margin-bottom:1em}.admin-color-fresh .edd-import-export-form .edd-progress div{background:#0073aa}.admin-color-light .edd-import-export-form .edd-progress div{background:#888}.admin-color-blue .edd-import-export-form .edd-progress div{background:#096484}.admin-color-coffee .edd-import-export-form .edd-progress div{background:#c7a589}.admin-color-ectoplasm .edd-import-export-form .edd-progress div{background:#a3b745}.admin-color-midnight .edd-import-export-form .edd-progress div{background:#e14d43}.admin-color-sunrise .edd-import-export-form .edd-progress div{background:#dd823b}.graph-option-section{float:right}.edd-report-filters-title span{display:block;padding:20px}#edd-graphs-filter form{padding:20px}#edd-graphs-filter label{vertical-align:inherit}#edd-graphs-filter .graph-option-section{display:inline-block;line-height:2em;margin:0 0 0 5px;padding:0}.download_page_edd-reports .section-content #post-body-content{float:none}.download_page_edd-reports .section-content select[name=range]{display:none}.edd-mix-totals{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.edd-mix-chart{display:inline-block;width:49%;vertical-align:top}.edd-graph-notes{color:#9c9c9c}.edd-graph-notes span{display:block}.edd-pie-graph .legend{display:none}.edd-pie-legend{overflow:auto;margin-top:10px}.edd-legend-item-wrapper{color:#333;display:inline-block;font-size:8pt;padding:2px 5px 0;width:48%;height:20px}.edd-legend-color{border:1px solid #cfcfcf;display:inline-block;margin-left:5px;width:20px;height:15px}.edd-pie-legend-item{display:inline-block;vertical-align:top;width:80%}#edd-reports-tiles-wrap .metabox-holder{padding:0}#edd-reports-tiles-wrap #dashboard-widgets{overflow:auto}#edd-reports-tiles-wrap #dashboard-widgets .postbox-container{width:33.3%}.download_page_edd-reports .section-content .tablenav.top{display:none}#edd_tax_rates{margin:1em 0 0}[id*=edd-recapture-].button{font-size:16px;height:auto;padding:8px 14px;margin:6px 0 0}[id*=edd-recapture-].button .dashicons{line-height:29px;margin-left:8px}[id*=edd-recapture-].button .edd-loading,[id*=edd-recapture-].button .edd-loading:after{border-radius:50%;display:inline-block;width:14px;height:14px}[id*=edd-recapture-].button .edd-loading{position:relative;top:3px;margin-right:4px;box-shadow:0 0 2px rgba(0,0,0,.2);animation:edd-spinning 1.1s linear infinite;border:2px solid hsla(0,0%,100%,.5);border-right-color:#fff;font-size:14px;filter:alpha(opacity=0);transform:translateZ(0)}#edd-recapture-disconnect.button .edd-loading.dark{border-color:rgba(0,0,0,.2) #666 rgba(0,0,0,.2) rgba(0,0,0,.2);box-shadow:none}.recapture-notice{position:relative}@keyframes edd-spinning{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}#edd-send-test-summary-save-changes-notice .notice p{font-size:13px}#edd-send-test-summary-notice,#edd-send-test-summary-save-changes-notice{display:flex;margin-top:5px}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.wp-list-table.apikeys input.code{width:100%;font-size:10px;cursor:text;background:#fff;border:1px solid #ddd;box-shadow:none;color:#555}.download_page_edd-tools .tablenav .actions{overflow:visible}.edd_user_search_wrap{position:relative;overflow:visible}.edd_user_search_wrap .spinner{position:absolute;margin:0;padding:0;left:4px;top:-2px}.edd_user_search_wrap.loading .spinner{visibility:visible}.edd_user_search_results{position:absolute;right:0;top:20px}.edd_user_search_results a.edd-ajax-user-cancel{position:absolute;left:6px;top:2px}.edd_user_search_results ul{background:#fafafa;border:1px solid #dfdfdf;overflow-y:scroll;padding:0;margin:0;height:150px;width:185px;box-shadow:0 3px 5px rgba(0,0,0,.1)}.edd_user_search_results li{margin:0}.edd_user_search_results li a{display:block;text-decoration:none;padding:6px 10px}.edd_user_search_results li a:hover{background:#f5f5f5}.edd_user_search_results li.no-users{text-align:center;vertical-align:middle;display:block;line-height:150px;color:#bbb;text-transform:uppercase;font-size:11px}@media screen and (max-width:1100px){.edd-mix-chart{display:block;width:100%}}@media screen and (max-width:782px){.license-expiration-date-notice,.license-lifetime-notice,.license-null{padding-right:0}}@media screen and (max-width:600px){#edd-edit-order-form input.large-text{width:100%}}#edd-item-wrapper{background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);position:relative;margin-top:15px;display:flex}#edd-item-wrapper.full-width{max-width:100%}#edd-item-wrapper:after{content:"";display:block;clear:both;visibility:hidden;font-size:0;height:0}.edd-sections-wrap{clear:both;width:100%}.edd-sections-wrap .section-wrap{background-color:#fff;display:inline-block;z-index:2}.js .edd-sections-wrap .edd-vertical-sections:not(.meta-box) .section-wrap>div{min-height:500px;height:100%}.edd-sections-wrap .section-wrap .customer-section:not(:last-child){border-bottom:1px solid #eee}.edd-sections-wrap .section-wrap .customer-section table{margin-bottom:20px}.edd-sections-wrap .section-wrap{border-right:1px solid #e5e5e5}.edd-sections-wrap .section-wrap .section-content>*{padding:20px}.edd-sections-wrap .section-wrap .section-content h2{margin:0;padding-bottom:0}.edd-sections-wrap .section-wrap .avatar-wrap{float:right;padding-left:10px;text-align:center}.edd-sections-wrap .section-wrap img.avatar{border-radius:5px}.edd-sections-wrap .section-wrap .customer-id{position:absolute;left:0;top:0;padding:10px;background-color:#fafafa;border-bottom-right-radius:20%;border:1px solid #eee;border-top:none;border-left:none;font-family:monospace;font-size:18px;font-weight:600}.edd-item-info.customer-info input[type=password],.edd-item-info.customer-info input[type=text],.edd-item-info.customer-info select{width:200px;height:auto;box-shadow:none;transition:none;border:1px solid #ddd;margin:-5px -2px 4px 0;font-size:13px;padding:2px 4px}.edd-sections-wrap .section-wrap .customer-main-wrapper{float:right}.edd-sections-wrap .section-wrap .customer-main-wrapper input[name="customerinfo[name]"]{font-size:24px}.edd-sections-wrap .section-wrap .customer-address-wrapper{float:left;margin-top:-3px;margin-left:50px;width:202px}.edd-sections-wrap .section-wrap .info-wrapper{min-height:125px;overflow:visible}.edd-sections-wrap .section-wrap .customer-address span[data-key=address2],.edd-sections-wrap .section-wrap .customer-address span[data-key=address],.edd-sections-wrap .section-wrap .customer-address span[data-key=country]{display:block}.edd-sections-wrap .section-wrap a.delete{color:red;margin-left:5px;text-decoration:none}.customer-info{min-height:185px}.customer-info .customer-name{font-size:24px;font-weight:600}.customer-info .customer-name.editable{margin-bottom:6px}.customer-edit-link a{font-weight:400;text-decoration:none}.disconnect-user a{color:#aaa;font-size:20px}#customer-edit-actions{padding:3px;line-height:28px;text-align:center}#customer-edit-actions .button-secondary{margin-left:5px}#customer-edit-actions .cancel{padding:5px}.edd-sections-wrap .section-wrap .row-title{width:30%}.edd-sections-wrap .section-wrap .editable{display:block;padding:3px}.edd-sections-wrap .section-wrap div.edit-item{margin-right:-4px;margin-top:-20px}.edd-sections-wrap .section-wrap .customer-address.edit-item{margin-top:3px}.edd-sections-wrap .section-wrap span.edit-item{display:none}.edd-sections-wrap .section-wrap .edit-item input{font-size:13px}.edd-sections-wrap .section-wrap .customer-name.edit-item input{margin-top:-5px}.edd-sections-wrap .section-wrap .edd_user_search_results{right:-2px;top:18px}.edd-sections-wrap .section-wrap .edd_user_search_results ul{width:198px}#edd-item-stats-wrapper{margin:0 auto;text-align:center}#edd-item-stats-wrapper ul{display:flex;margin:0}#edd-item-stats-wrapper li{font-size:14px;margin-bottom:0;width:50%}#edd-item-stats-wrapper a{text-decoration:none}#edd-item-stats-wrapper .dashicons{color:#888;margin-top:-2px}#edd-item-tables-wrapper table{width:100%}#edd-item-tables-wrapper .no-items{text-align:right}#edd-item-tables-wrapper .emails .add-customer-email-row{background-color:#f4f4f4;border-top:1px solid #e5e5e5}#edd-item-tables-wrapper .add-customer-email-wrapper{display:flex;flex-wrap:wrap;align-items:center;margin:12px 0}#edd-item-tables-wrapper .edd-form-group{margin-bottom:0}#edd-item-tables-wrapper .edd-make-email-primary{flex-grow:1;margin-right:12px}#edd-item-tables-wrapper .emails .spinner{float:none;margin:0 10px;-ms-grid-row-align:center;align-self:center}#edd-item-tables-wrapper .notice-error{background-color:#fff5f5}#edd-item-notes-wrapper{min-height:50px}.customer-note-input{margin-bottom:5px;width:100%}.customer-note-wrapper{border-bottom:1px solid #f9f9f9;min-height:38px;padding:7px 7px 7px 0}.customer-note-wrapper span{display:block}.note-content-wrap{padding-top:7px}.edd-sections-wrap .section-wrap .notice-container{padding-right:20px;padding-left:20px;margin-right:-20px;margin-left:-20px}@media screen and (max-width:810px)and (min-width:656px){.customer-info .customer-name{font-size:16px}.edd-sections-wrap .section-wrap .widefat td,.widefat th{max-width:100%!important;display:table-cell}}@media screen and (max-width:781px){#edd-item-tab-wrapper,.edd-sections-wrap .section-wrap{margin:0;width:100%}#edd-item-tab-wrapper-list .dashicons{font-size:18px}.edd-item-has-tabs .edd-sections-wrap .section-wrap{border-top:1px solid #e5e5e5;border-right:0;margin-top:-1px}}@media screen and (max-width:656px){.edd-item-info.customer-info{position:relative}.edd-sections-wrap .section-wrap .customer-address-wrapper{float:none;position:absolute;top:84px;right:165px;max-width:200px}.edd-sections-wrap .section-wrap .customer-main-wrapper{float:none;position:absolute;right:165px}.customer-info .customer-name{font-size:16px}.edd-sections-wrap .section-wrap #edd-item-stats-wrapper{padding-right:0;padding-left:0}.edd-sections-wrap .section-wrap .customer-section{margin-bottom:0}.edd-sections-wrap .section-wrap .widefat td.column-primary,.edd-sections-wrap .section-wrap .widefat td.no-items,.edd-sections-wrap .section-wrap .widefat th.column-primary{width:100px!important;display:table-cell;overflow:hidden;text-align:right}.edd-sections-wrap .section-wrap .customer-id{display:none}#edd-item-tables-wrapper .emails td.column-primary{padding-left:10px;width:100%!important}#edd-item-tables-wrapper .edd-form-group{margin:0 0 16px}}@media screen and (max-width:480px){#edd-item-tab-wrapper-list li{width:50%}#edd-item-tab-wrapper-list li:nth-child(3n+3){border-width:0 0 1px 1px}#edd-item-tab-wrapper-list li:nth-child(2n){border-width:0 0 1px}.download_page_edd-reports .button{text-align:center}#edd-payment-date-filters span{display:block}#edd-payment-date-filters span>input{float:left}#edd-add-discount select[multiple] option,#edd-edit-discount select[multiple] option{height:20px}.download_page_edd-reports .inside .button,.download_page_edd-reports .inside input[type=submit],.download_page_edd-reports .inside input[type=text],.download_page_edd-reports .inside select,.download_page_edd-settings .inside input[type=button],.download_page_edd-tools .inside input[type=submit],.download_page_edd-tools .inside input[type=text],.download_page_edd-tools .inside select{width:100%}#edd-add-discount select[multiple],#edd-edit-discount select[multiple],.download_page_edd-tools select[multiple]{height:200px!important}.download_page_edd-settings input[type=checkbox]{margin:2px 0}.post-type-download input[type=checkbox]{margin-right:2px}}.inside .edd-tools-textarea{background:#32373c;color:rgba(240,245,250,.7);font-size:12px;font-family:Menlo,Monaco,monospace;display:block;overflow:auto;white-space:pre;width:100%;height:450px;padding:10px;outline:none}#system-info-textarea::selection{background:#555;color:#fff}#edd-system-info .edd-inline-button{margin-right:5px}.recount-stats-controls form{display:inline}.edd-recount-stats-descriptions span{display:none;line-height:24px}.edd-vertical-sections{overflow:visible;display:block;display:flex}#edd-item-tab-wrapper,.edd-vertical-sections .section-nav{position:relative;width:20%;line-height:1em;margin:0 0 0 -1px;padding:0;background-color:#f5f5f5;border-left:1px solid #e5e5e5;box-sizing:border-box;max-width:200px}#edd-item-tab-wrapper-list{margin:0}#edd-item-tab-wrapper li,.edd-vertical-sections .section-nav li{display:block;position:relative;margin:0;padding:0;background-color:#fcfcfc}.edd-vertical-sections .section-title:last-of-type{margin-bottom:24px}#edd-item-tab-wrapper li>.edd-item-tab-label-wrap,#edd-item-tab-wrapper li a,.edd-vertical-sections .section-nav li a{display:flex;margin:0;padding:9px;text-decoration:none;border-bottom:1px solid #e5e5e5;box-shadow:none;position:relative;align-items:center}#edd-item-tab-wrapper li a:focus,#edd-item-tab-wrapper li a:hover,.edd-vertical-sections .section-nav li a:focus,.edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0;outline:0;transition:all .25s}.edd-vertical-sections .section-nav .section-title--is-active a:after{content:"";width:1px;height:100%;background:#fff;position:absolute;left:0;top:0;bottom:0;z-index:3}#edd-item-tab-wrapper li>.edd-item-tab-label-wrap{background-color:#fff}.edd-vertical-sections .section-nav li a>.dashicons,.edd-vertical-sections .section-nav li a>span{display:inline-block}.edd-vertical-sections .section-nav li a>span{max-width:76%}.edd-vertical-sections .section-nav li a .dashicons{line-height:20px;margin-left:3px;color:#888}.edd-vertical-sections .section-nav .section-title--is-active a{font-weight:700;color:#555;background-color:#fff;border-left:none;margin-left:-1px}.edd-vertical-sections.use-js .section-content,.no-js .edd-vertical-sections.use-js.edd-item-header-small,.no-js .edd-vertical-sections.use-js .section-nav{display:none}.no-js .edd-vertical-sections.use-js .section-content{display:block}.admin-color-fresh .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-fresh .edd-vertical-sections .section-nav li a:focus,.admin-color-fresh .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #0073aa}.admin-color-blue .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-blue .edd-vertical-sections .section-nav li a:focus,.admin-color-blue .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #096484}.admin-color-coffee .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-coffee .edd-vertical-sections .section-nav li a:focus,.admin-color-coffee .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #c7a589}.admin-color-ectoplasm .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:focus,.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #a3b745}.admin-color-midnight .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-midnight .edd-vertical-sections .section-nav li a:focus,.admin-color-midnight .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #e14d43}.admin-color-ocean .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-ocean .edd-vertical-sections .section-nav li a:focus,.admin-color-ocean .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #627c83}.admin-color-sunrise .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-sunrise .edd-vertical-sections .section-nav li a:focus,.admin-color-sunrise .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #be3631}.admin-color-light .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-light .edd-vertical-sections .section-nav li a:focus,.admin-color-light .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #888}.admin-color-evergreen .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-evergreen .edd-vertical-sections .section-nav li a:focus,.admin-color-evergreen .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #36533f}.admin-color-mint .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-mint .edd-vertical-sections .section-nav li a:focus,.admin-color-mint .edd-vertical-sections .section-nav li a:hover{box-shadow:inset -5px 0 #4f6d59}.edd-vertical-sections .section-nav .section-title--is-active .dashicons{color:#555}@media only screen and (max-width:782px){#edd-item-tab-wrapper,.edd-vertical-sections .section-nav{width:48px}.edd-vertical-sections .section-nav li a{justify-content:center}.edd-vertical-sections .section-nav li a .dashicons{width:24px;height:24px;font-size:24px;line-height:24px;margin:0}.section-nav li .dashicons:before{width:24px;height:24px}#edd-item-tab-wrapper .edd-item-tab-label,.section-nav li .label{overflow:hidden;position:absolute;top:-1000em;right:-1000em;width:1px;height:1px}}#edd-item-card-wrapper,.edd-vertical-sections .section-wrap{width:80%}#edd-item-card-wrapper .item-section{background:#fff;overflow:hidden;box-sizing:border-box}:not(#edd-item-tab-wrapper)+#edd-item-card-wrapper .item-section{margin:25px 0;padding:20px;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}#edd-item-tab-wrapper+#edd-item-card-wrapper{padding:20px;border-right:1px solid #e5e5e5;box-sizing:border-box}@media only screen and (min-width:1200px){#edd-graphs-filter,#edd-item-card-wrapper,.edd-vertical-sections:not(.meta-box) .section-wrap{width:calc(100% - 200px)}}@media only screen and (max-width:782px){#edd-graphs-filter,#edd-item-card-wrapper,.edd-vertical-sections .section-wrap{width:calc(100% - 48px)}}#edd-debug-log .edd-inline-button{margin-right:5px}.edd-settings-sidebar{padding-top:27px}.edd-settings-sidebar-content{background-color:#fff;text-align:center;border:1px solid #ddd;box-sizing:border-box;max-width:300px}.edd-settings-sidebar-content p{font-size:14px;line-height:1.5;margin-top:0}.edd-sidebar-header-section{background-color:#35495c;line-height:1;padding:26px 20px 24px;border-bottom:3px dashed #fafafa}.edd-sidebar-description-section{background-color:#fafafa;padding:16px 20px;border-bottom:1px solid #ddd}.edd-sidebar-description-section .edd-sidebar-description{margin:0}.edd-sidebar-coupon-section{font-size:14px;padding:16px 20px}.edd-sidebar-coupon-section label{display:block;line-height:1.4;margin-bottom:6px}.edd-sidebar-coupon-section label strong{color:#253b51;font-weight:700}.edd-sidebar-coupon-section input{background:#f4f7fa;font-size:22px;font-weight:600;text-align:center;padding:10px;border:2px dashed #2794da;border-radius:4px;margin-bottom:16px;box-shadow:none;width:100%}.edd-sidebar-coupon-section input:focus{border:2px dashed #2794da;box-shadow:none}.edd-settings-sidebar-content .edd-coupon-note{color:#6c7883;font-size:13px;font-style:italic;margin:0}.edd-settings-sidebar-content .edd-coupon-note a{color:#253b51}.edd-settings-sidebar-content .edd-coupon-note a:hover{text-decoration:none}.edd-sidebar-footer-section{background-color:#fafafa;padding:16px 20px;border-top:1px solid #ddd}.edd-sidebar-footer-section .edd-cta-button{display:block;background-color:#2794da;color:#fff;text-decoration:none;font-size:20px;font-weight:700;text-transform:uppercase;padding:17px 10px;border:none;border-radius:4px;width:100%;box-sizing:border-box;box-shadow:none;transition:background-color .2s}.edd-sidebar-footer-section .edd-cta-button:hover{background-color:#2386c5}@media (min-width:1080px){.edd-has-sidebar .edd-settings-content{float:right;width:67%}.edd-has-sidebar .edd-settings-sidebar{float:left;width:31%}}@media (min-width:1240px){.edd-has-sidebar .edd-settings-content{width:74%}.edd-has-sidebar .edd-settings-sidebar{width:23%}}.taxes-tab .edd-has-sidebar .edd-settings-content,.taxes-tab .edd-has-sidebar .edd-settings-sidebar{float:none;width:100%}.bfcm-promo-img-container{background-color:#35495c;width:100%;height:160px}.bfcm-code{color:#2794da;font-weight:700}.sale-ends{position:absolute;bottom:9px;left:14px;display:inline-block;color:#6c7883;font-size:12px;text-align:left;font-style:italic;width:150px} \ No newline at end of file diff --git a/assets/css/edd-admin-tax-rates-rtl.min.css b/assets/css/edd-admin-tax-rates-rtl.min.css new file mode 100644 index 00000000000..8dd181054b2 --- /dev/null +++ b/assets/css/edd-admin-tax-rates-rtl.min.css @@ -0,0 +1 @@ +#edd-admin-tax-rates{margin:1em 0 0}#edd-admin-tax-rates table{border-collapse:collapse}#edd-admin-tax-rates .tablenav.top{display:flex;justify-content:space-between}#edd-admin-tax-rates .edd-admin-tax-rates__tablenav--left{display:inline-flex}#edd-admin-tax-rates th:not(.check-column){padding:15px 10px;width:unset}#edd-admin-tax-rates .chosen-container{width:100%!important}#edd-admin-tax-rates tbody tr:not(:last-of-type){border-bottom:1px solid #e0e0e0}#edd-admin-tax-rates tfoot.add-new th{font-weight:400;padding:12px 8px 10px}#edd-admin-tax-rates .edd-tax-rate-row--inactive,#edd-admin-tax-rates .edd-tax-rate-row--is-empty+.edd-tax-rate-row--is-empty{display:none}#edd-admin-tax-rates .has-inactive .edd-tax-rate-row--inactive{display:table-row}#edd-admin-tax-rates .edd-tax-rate-row--is-empty td{background-color:#f9f9f9}#edd-admin-tax-rates .edd-tax-rate-row--inactive td{color:#999;background-color:#f9f9f9}#edd-admin-tax-rates .edd-tax-rate-table-add{background-color:#f9f9f9}@media screen and (max-width:782px){#edd-admin-tax-rates tfoot:not(.add-new) th:not(.edd-tax-rates-table-rate),#edd-admin-tax-rates thead th:not(.edd-tax-rates-table-rate){display:none}#edd-admin-tax-rates .edd-tax-rate-row,#edd-admin-tax-rates tfoot:not(.add-new) tr,#edd-admin-tax-rates thead tr{display:-ms-grid;display:grid;-ms-grid-columns:2.5em 1fr;grid-template-columns:2.5em 1fr;-ms-grid-rows:1fr;grid-template-rows:1fr;grid-gap:0 16px}#edd-admin-tax-rates th.edd-tax-rates-table-rate{padding-right:12px}#edd-admin-tax-rates .edd-tax-rates-table-checkbox{-ms-grid-row:1;-ms-grid-row-span:4;grid-row:1/5}#edd-admin-tax-rates tbody td{padding-right:35%!important}#edd-admin-tax-rates td:before{content:attr(data-colname);display:block;width:32%;position:absolute}#edd-admin-tax-rates .tablenav.top{flex-wrap:wrap}#edd-admin-tax-rates .edd-admin-tax-rates__tablenav--left{margin-bottom:16px}#edd-admin-tax-rates .edd-admin-tax-rates__tablenav--left select{margin-left:6px}}.edd-tax-rate-table-add th input[type=number],.edd-tax-rate-table-add th input[type=text],.edd-tax-rate-table-add th select{width:100%;margin:0;padding:4px}.edd-tax-rate-table-add #tax_rate_region_global{margin-left:4px;margin-bottom:8px}@media screen and (max-width:782px){.edd-tax-rate-table-add,.edd-tax-rate-table-add th{display:block}.edd-tax-rate-table-add .screen-reader-text{display:block;width:unset;clip:unset;height:unset;-webkit-clip-path:unset;clip-path:unset;margin:0 0 12px;position:relative}} \ No newline at end of file diff --git a/assets/css/edd-admin-tax-rates.min.css b/assets/css/edd-admin-tax-rates.min.css new file mode 100644 index 00000000000..fc6d469720a --- /dev/null +++ b/assets/css/edd-admin-tax-rates.min.css @@ -0,0 +1 @@ +#edd-admin-tax-rates{margin:1em 0 0}#edd-admin-tax-rates table{border-collapse:collapse}#edd-admin-tax-rates .tablenav.top{display:flex;justify-content:space-between}#edd-admin-tax-rates .edd-admin-tax-rates__tablenav--left{display:inline-flex}#edd-admin-tax-rates th:not(.check-column){padding:15px 10px;width:unset}#edd-admin-tax-rates .chosen-container{width:100%!important}#edd-admin-tax-rates tbody tr:not(:last-of-type){border-bottom:1px solid #e0e0e0}#edd-admin-tax-rates tfoot.add-new th{font-weight:400;padding:12px 8px 10px}#edd-admin-tax-rates .edd-tax-rate-row--inactive,#edd-admin-tax-rates .edd-tax-rate-row--is-empty+.edd-tax-rate-row--is-empty{display:none}#edd-admin-tax-rates .has-inactive .edd-tax-rate-row--inactive{display:table-row}#edd-admin-tax-rates .edd-tax-rate-row--is-empty td{background-color:#f9f9f9}#edd-admin-tax-rates .edd-tax-rate-row--inactive td{color:#999;background-color:#f9f9f9}#edd-admin-tax-rates .edd-tax-rate-table-add{background-color:#f9f9f9}@media screen and (max-width:782px){#edd-admin-tax-rates tfoot:not(.add-new) th:not(.edd-tax-rates-table-rate),#edd-admin-tax-rates thead th:not(.edd-tax-rates-table-rate){display:none}#edd-admin-tax-rates .edd-tax-rate-row,#edd-admin-tax-rates tfoot:not(.add-new) tr,#edd-admin-tax-rates thead tr{display:-ms-grid;display:grid;-ms-grid-columns:2.5em 1fr;grid-template-columns:2.5em 1fr;-ms-grid-rows:1fr;grid-template-rows:1fr;grid-gap:0 16px}#edd-admin-tax-rates th.edd-tax-rates-table-rate{padding-left:12px}#edd-admin-tax-rates .edd-tax-rates-table-checkbox{-ms-grid-row:1;-ms-grid-row-span:4;grid-row:1/5}#edd-admin-tax-rates tbody td{padding-left:35%!important}#edd-admin-tax-rates td:before{content:attr(data-colname);display:block;width:32%;position:absolute}#edd-admin-tax-rates .tablenav.top{flex-wrap:wrap}#edd-admin-tax-rates .edd-admin-tax-rates__tablenav--left{margin-bottom:16px}#edd-admin-tax-rates .edd-admin-tax-rates__tablenav--left select{margin-right:6px}}.edd-tax-rate-table-add th input[type=number],.edd-tax-rate-table-add th input[type=text],.edd-tax-rate-table-add th select{width:100%;margin:0;padding:4px}.edd-tax-rate-table-add #tax_rate_region_global{margin-right:4px;margin-bottom:8px}@media screen and (max-width:782px){.edd-tax-rate-table-add,.edd-tax-rate-table-add th{display:block}.edd-tax-rate-table-add .screen-reader-text{display:block;width:unset;clip:unset;height:unset;-webkit-clip-path:unset;clip-path:unset;margin:0 0 12px;position:relative}} \ No newline at end of file diff --git a/assets/css/edd-admin.min.css b/assets/css/edd-admin.min.css new file mode 100644 index 00000000000..fb5020f5c6b --- /dev/null +++ b/assets/css/edd-admin.min.css @@ -0,0 +1 @@ +@media(min-width:782px){body.edd-admin-page #wpbody-content{padding-bottom:200px}}body.edd-admin-page #wpfooter .edd-footer-promotion{text-align:center;font-weight:400;font-size:13px;line-height:16px;color:#787c82;padding:20px 0 30px;margin-bottom:20px;margin-top:20px}body.edd-admin-page #wpfooter .edd-footer-promotion p{font-weight:600}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-links,body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social{display:flex;justify-content:center;align-items:center}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-links{margin:9px 0 0}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-links span{color:#c3c4c7;padding:0 7px}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social{margin:10px 0 0;gap:10px}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social li{margin-bottom:0}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social li path{fill:#a7aaad}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social li:hover path{fill:#50575e}body.edd-admin-page #wpfooter .edd-footer-promotion .edd-footer-promotion-social a{display:block;height:16px}.edd-nav__wrapper{background-color:#fff;box-shadow:inset 0 -3px #e8e8e8;display:flex;justify-content:space-between;align-items:center;margin:0 0 10px -20px;padding:0 20px;position:sticky;top:32px;z-index:30}@media screen and (max-width:782px){.edd-nav__wrapper{top:auto;position:relative;justify-content:center;flex-wrap:wrap}.edd-nav__wrapper .subtitle{padding:18px 12px}}.edd-nav__tabs{display:flex;flex-direction:row;justify-content:left;flex-wrap:wrap;margin:0;gap:8px}@media screen and (max-width:782px){.edd-nav__tabs{justify-content:center}}.edd-nav__tabs li{display:flex;align-items:flex-end;margin:0}.edd-nav__tabs li:focus,.edd-nav__tabs li:hover{box-shadow:inset 0 -3px #a7aaad}.edd-nav__tabs li.active{color:#0c5d95;box-shadow:inset 0 -3px #0c5d95}.edd-nav__tabs a.tab{border-bottom:none;box-shadow:none;outline:none;display:block;text-decoration:none;color:#646970;padding:18px 20px;font-weight:600;font-size:16px;text-align:center;white-space:nowrap}.edd-admin-page #wpbody-content>.notice:not(.inline){display:none;margin-left:0}.edd-dialog{display:none}.edd-item-header-small{padding-bottom:20px;border-bottom:1px solid #e5e5e5;display:flex;justify-content:flex-start;align-items:center;gap:6px}.edd-item-header-small span{font-weight:600;font-size:15px}.edd-admin-order-status-badge,.edd-status-badge{padding:2px 7px;border-radius:4px;background:#ececec;display:inline-flex;align-items:center;gap:2px}.edd-admin-order-status-badge__icon,.edd-status-badge__icon{opacity:.8}.edd-admin-order-status-badge--error,.edd-admin-order-status-badge--expired,.edd-admin-order-status-badge--failed,.edd-admin-order-status-badge--failing,.edd-admin-order-status-badge--red,.edd-admin-order-status-badge--rejected,.edd-admin-order-status-badge--revoked,.edd-status-badge--error,.edd-status-badge--expired,.edd-status-badge--failed,.edd-status-badge--failing,.edd-status-badge--red,.edd-status-badge--rejected,.edd-status-badge--revoked{color:#ac3d3d;background:#ffd6d6}.edd-admin-order-status-badge--active,.edd-admin-order-status-badge--approved,.edd-admin-order-status-badge--complete,.edd-admin-order-status-badge--completed,.edd-admin-order-status-badge--edd_subscription,.edd-admin-order-status-badge--green,.edd-admin-order-status-badge--partially_refunded,.edd-admin-order-status-badge--success,.edd-status-badge--active,.edd-status-badge--approved,.edd-status-badge--complete,.edd-status-badge--completed,.edd-status-badge--edd_subscription,.edd-status-badge--green,.edd-status-badge--partially_refunded,.edd-status-badge--success{color:#017d5c;background:#e5f5f0}.edd-admin-order-status-badge--pending,.edd-admin-order-status-badge--warning,.edd-admin-order-status-badge--yellow,.edd-status-badge--pending,.edd-status-badge--warning,.edd-status-badge--yellow{color:#996800;background:#f5f2e5}.edd-admin-order-status-badge--blue,.edd-admin-order-status-badge--info,.edd-admin-order-status-badge--processing,.edd-admin-order-status-badge--trialling,.edd-status-badge--blue,.edd-status-badge--info,.edd-status-badge--processing,.edd-status-badge--trialling{color:#016087;background:#e5f1f5}.edd-pro-upgrade,.edd-pro-upgrade:hover{color:#1da867;font-weight:600;text-decoration:none}.button.edd-pro-upgrade,.button.edd-pro-upgrade:hover{background-color:#1da867;color:#fff;border-color:#1da867}.edd-progress-bar{display:-ms-grid;display:grid;background:#dcdcde;border-radius:99999px;padding:2px;box-shadow:inset 0 0 1px 1px #7e8993;align-items:center}.edd-progress-bar.small{height:14px}.edd-progress-bar.medium{height:16px}.edd-progress-bar.large{height:20px;padding:4px}.edd-progress-bar>.progress{height:100%;border-top-right-radius:99999px;border-bottom-right-radius:99999px;border-top-left-radius:99999px;border-bottom-left-radius:99999px;background-color:rgba(0,186,55,.3);overflow:hidden;min-width:10%;width:0;width:var(--progress-width,0);-ms-grid-row:1;grid-area:1/-1}.edd-progress-bar>.label{color:#32373c;font-weight:400;font-size:.75rem;text-shadow:0 0 12px hsla(0,0%,100%,.5);-ms-grid-row:1;grid-area:1/-1;text-align:center;line-height:1}.edd-help-tip{cursor:help;margin-top:-2px;font-size:24px;color:#7e8993}.edd-ui-tooltip{position:absolute;background:#fff!important;border-width:0;border-radius:12px!important;box-shadow:0 8px 36px 0 rgba(29,36,40,.15)!important;color:#23282d!important;max-width:300px!important;padding:16px!important;text-rendering:optimizeLegibility;text-shadow:none!important;font-size:13px!important;z-index:9999!important}.edd-ui-tooltip .title{font-weight:700}.edd-ui-tooltip .timeline{position:relative;margin:6px 0 0;padding-left:15px}.edd-ui-tooltip .timeline li{position:relative;margin:0 0 3px}.edd-ui-tooltip .timeline li:before{content:"";position:absolute;width:4px;height:4px;left:-16px;background:transparent;border:2px solid #23282d;top:0;bottom:0;margin:auto;border-radius:100%;z-index:1}.edd-ui-tooltip .timeline li:after{content:"";width:2px;height:calc(100% - 4px);background:#23282d;position:absolute;left:-13px;top:calc(50% + 3px)}.edd-hidden,.edd-ui-tooltip .timeline li:last-child:after{display:none}.edd-clearfix:after{content:"";display:table;clear:both}.edd-fadein{visibility:visible;opacity:1;transition:opacity 1s linear}.edd-fadeout{visibility:hidden;opacity:0;transition:visibility 0s 1s,opacity 1s linear}.edd-custom-price-option-sections-wrap{display:none;border:1px solid #c3c4c7;border-top:0 solid #c3c4c7;box-sizing:border-box;width:100%}.edd-custom-price-option-section{display:block;padding:10px 8px;border-bottom:1px solid hsla(0,0%,87.1%,.3)}.edd-custom-price-option-section-title{display:block;font-weight:600;padding:0 0 10px}.edd-custom-price-option-section-content{display:flex;gap:12px;margin-bottom:6px}.edd-custom-price-option-section:last-child{border-bottom:none}.toggle-custom-price-option-section{color:#787c82}.toggle-custom-price-option-section:hover{color:#537994}#edd_product_settings .edd-product-options__title,#edd_product_settings .inside strong{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7;background-color:#f9f9f9;display:flex;font-weight:600;margin:0 -12px 16px;padding:8px 12px;justify-content:space-between;align-items:center}#edd_product_settings .edd-product-options-wrapper:first-of-type .edd-product-options__title,#edd_product_settings .inside div:first-child strong{margin-top:-8px}#edd_product_settings .edd-product-options__title .edd-help-tip,#edd_product_settings .inside strong .edd-help-tip{font-size:20px}#edd_product_settings .label--block{display:block;margin:0 0 4px}.edd_repeatable_row.ui-sortable-placeholder{line-height:0;padding:0;margin:0;box-sizing:border-box;border:1px dashed #c3c4c7;visibility:visible!important}.edd-add-repeatable-row{border-top:1px solid #c3c4c7;padding:12px;margin:15px -12px -12px;display:flex;justify-content:flex-end;align-items:center}.edd_repeatable_row input[type=text].large-text{width:100%}.edd_repeatable_upload_wrapper:not(:first-child),.edd_variable_prices_wrapper:not(:first-child){margin-top:12px}.edd_repeatable_row.ui-sortable-helper .edd-repeatable-row-actions .edd-remove-row{display:none}.edd-repeatable-row-actions{color:#787c82}.edd-repeatable-row-actions a{text-decoration:none;width:auto;cursor:pointer}.edd-bundle-products-header,.edd-repeatable-row-header{clear:both;background:#f6f7f7;border:1px solid #c3c4c7;display:flex;justify-content:space-between}.edd-repeatable-row-header{cursor:move}.edd_repeatable_row:hover .edd-repeatable-row-header,.edd_repeatable_row:hover .edd-repeatable-row-standard-fields{border-color:#c3c4c7}.edd-bundled-product-row:after,.edd-bundled-product-row:before,.edd-repeatable-row-header:after,.edd-repeatable-row-header:before{content:"";display:table}.edd-bundled-product-row:after,.edd-repeatable-row-header:after{clear:both}.edd-bundle-products-header,.edd-repeatable-row-title{font-weight:600}.edd-bundle-products-header,.edd-repeatable-row-actions,.edd-repeatable-row-title{padding:8px;box-sizing:border-box}.edd-repeatable-row-actions{flex-grow:1;text-align:right}.edd-bundled-product-row .edd-remove-row,.edd-repeatable-row-actions .edd-remove-row{width:auto;cursor:pointer}.edd-bundled-product-row,.edd-repeatable-row-standard-fields{padding:8px;border:1px solid #c3c4c7;border-top:0 solid #c3c4c7;display:flex;justify-content:space-between;align-items:center;gap:18px}.edd-bundled-product-row .edd-form-group,.edd-repeatable-row-standard-fields .edd-form-group{margin-bottom:0;display:inline-flex;flex-direction:column;flex-grow:1;justify-content:space-between}.edd-repeatable-row-setting-label .edd-help-tip{display:inline-block;margin-left:4px}.edd-bundled-product-item-reorder{min-width:30px}.edd-bundled-product-item-reorder .edd-product-file-reorder{font-size:20px;cursor:move;color:#dcdcde;font-family:dashicons;content:"";transition:color .2s}.edd-bundled-product-item-reorder .edd-product-file-reorder:hover{color:#a7aaad}.edd-bundled-product-actions{-ms-grid-row-align:center;align-self:center}#edd_products .edd-select,.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%;max-width:200px}.edd_repeatable_product_wrapper td{overflow:visible}@media screen and (max-width:480px){.edd-bundle-products-header,.edd-bundled-product-row,.edd-repeatable-row-header,.edd-repeatable-row-standard-fields{flex-wrap:wrap}.edd-bundled-product-row .edd-form-group,.edd-repeatable-row-standard-fields .edd-form-group{margin-left:0!important;margin-bottom:24px}}.edd_remove_repeatable{border:none;cursor:pointer;display:inline-block;padding:0;overflow:hidden;margin:8px 0 0;text-indent:-9999px;width:10px;height:10px}.edd_remove_repeatable:active,.edd_remove_repeatable:focus,.edd_remove_repeatable:hover{background-position:-10px 0!important}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container{position:relative;width:100%}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container+span:first-child{width:100%}.edd_repeatable_upload_field{padding-right:32px}.edd_upload_file button{background:#f6f7f7;border:none;border-left:1px solid #c3c4c7;padding:0 4px;position:absolute;height:calc(100% - 4px);overflow:hidden;top:2px;right:2px;display:inline-flex;justify-content:center;align-items:center}#edd-duplicate-action~#publishing-action{position:relative;top:-10px}#edd_product_files.ajax--loading{position:relative}#edd_product_files.ajax--loading:before{background:none;display:block;position:absolute;top:50%;left:50%;z-index:5;animation:edd-spinning 1.5s linear infinite;animation-play-state:inherit;border:2px solid #7e8993;border-bottom-color:#f9f9f9;border-radius:100%;content:"";width:1.25em;height:1.25em;transform:translate3d(-50%,-50%,0);will-change:transform}#edd_product_files.ajax--loading:after{background-color:hsla(0,0%,100%,.75);display:block;position:absolute;top:0;left:0;width:100%;height:100%;content:" ";z-index:1}.edd-form-group{margin-bottom:16px}.edd-form-group:last-of-type{margin-bottom:0}.edd-form-group>label,.edd-form-group__label{display:block;font-weight:600;margin-bottom:8px;padding:0}.edd-form-group__control{margin-bottom:12px;max-width:100%}.edd-form-group__control.is-check,.edd-form-group__control.is-radio{margin-top:4px}.edd-form-group__control:last-of-type{margin-bottom:0}.edd-form-group__control--is-inline{display:inline-flex;align-items:flex-end}.edd-form-group__input{max-width:100%}.edd-form-group__input[type=checkbox],.edd-form-group__input[type=radio]{margin-top:0}.edd-form-group__input[type=checkbox]+label,.edd-form-group__input[type=radio]+label{display:unset}select.edd-form-group__input{max-width:100%}.edd-form-group__help{color:#646970;font-size:13px;font-style:italic;line-height:normal;margin:8px 0 0}.edd-range{display:flex;align-items:center;gap:15px}.edd-range .edd-range__slider{min-width:90px;height:2px;border-radius:10px;border:none;background:#ccc}.edd-range .edd-range__slider .ui-slider-range{background:var(--wp-admin-theme-color)}.edd-range .edd-range__slider .ui-slider-handle{height:15px;width:15px;top:-6.5px;border-radius:100%;background:var(--wp-admin-theme-color);border:none;cursor:pointer;display:inline-block;position:relative}.edd-range .edd-range__input{max-width:60px}.edd-form-row{display:flex;flex-wrap:wrap;gap:12px}.edd-form-row__column{display:inline-flex;flex-direction:column;justify-content:flex-end}.edd-form-row__column.edd-form-group{margin-bottom:0}.edd-form-row label,.edd-form-row label.edd-form-group__label{margin-bottom:8px}#edd-migration-progress .dashicons-minus{color:#949494}#edd-migration-progress .dashicons-yes{color:green}#edd-migration-progress .dashicons-update:before{animation:rotation 2s linear infinite;display:block}#edd-v3-migration-remove-legacy-data-submit-wrap{display:flex;align-items:center;gap:6px}#edd-v3-migration-remove-legacy-data-submit-wrap .button{margin:0}#edd-filters{padding:10px;margin:0;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}#edd-filters .filter-items{flex-wrap:wrap;gap:6px;float:none;flex-grow:1}#edd-filters .filter-items,#edd-filters .filter-items .graph-option-section{display:flex;align-items:center}#edd-filters .filter-items .edd-date-range-picker[data-range=other] .edd-graphs-date-options{border-top-right-radius:4px;border-bottom-right-radius:4px}#edd-filters .filter-items .edd-date-range-picker[data-range=other] .edd-date-range-dates,#edd-filters .filter-items .edd-date-range-picker[data-range=other] .edd-date-range-relative-dates{display:none}#edd-filters .filter-items .edd-date-range-options{display:inline-block;margin:10px 0}#edd-filters .filter-items .edd-graphs-date-options{border-top-right-radius:0;border-bottom-right-radius:0}#edd-filters .filter-items .edd-date-range-dates{display:flex;align-items:center;border:1px solid #8c8f94;border-left:none;color:#2c3338;padding:4px 10px;margin-left:-5px;border-top-right-radius:4px;border-bottom-right-radius:4px;cursor:pointer;gap:4px}#edd-filters .filter-items .edd-date-range-dates.hidden{display:none}#edd-filters .filter-items .edd-date-range-selected-date{display:inline-block}#edd-filters .filter-items .edd-date-range-relative-dates{display:flex;align-items:center;margin-left:10px}#edd-filters .filter-items .edd-date-range-relative-dates.hidden{display:none}#edd-filters .filter-items .edd-date-range-selected-relative-date{position:relative;display:flex;align-items:center;border:1px solid #8c8f94;padding:4px 2px 4px 6px;color:#2c3338;margin-left:10px;margin-right:10px;border-radius:4px;cursor:pointer}#edd-filters .filter-items .edd-date-range-selected-relative-date .arrow-down{width:16px;height:auto;margin-left:6px;margin-top:2px;vertical-align:middle}#edd-filters .filter-items .edd-date-range-selected-relative-date.opened .edd-date-range-relative-dropdown{display:block}#edd-filters .filter-items .edd-date-range-relative-dropdown{position:absolute;z-index:99;width:420px;left:50%;top:100%;margin-top:10px;transform:translateX(-50%);background-color:#fff;border:1px solid #8c8f94;border-radius:4px;box-shadow:0 2px 5px 0 rgba(0,0,0,.25);display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown:after{height:10px;width:10px;position:absolute;content:"";background:#fff;border-color:#8c8f94;border-style:solid;border-width:0 1px 1px 0;transform:rotate(-135deg);top:-6px;left:calc(50% - 4px)}#edd-filters .filter-items .edd-date-range-relative-dropdown .spinner{display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown.loading{padding:10px;text-align:center}#edd-filters .filter-items .edd-date-range-relative-dropdown.loading .spinner{display:inline-block;visibility:visible;margin:0;float:unset}#edd-filters .filter-items .edd-date-range-relative-dropdown.loading :not(.spinner){display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li{display:flex;align-items:center;padding:2px 10px;opacity:.85;gap:20px}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li.active,#edd-filters .filter-items .edd-date-range-relative-dropdown ul li:hover{cursor:pointer;color:var(--wp-admin-theme-color);opacity:1}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li .date-range-name{width:110px}@media screen and (max-width:950px){#edd-filters .filter-items .graph-option-section{margin-top:8px;width:100%}#edd-filters .filter-items .edd-date-range-picker{flex-wrap:wrap}#edd-filters .filter-items .edd-graphs-date-options{width:100%;max-width:100%;min-height:40px;font-size:14px;border-top-right-radius:4px;border-bottom-right-radius:4px}#edd-filters .filter-items .edd-date-range-dates{width:100%;margin-top:10px;border:1px solid #8c8f94;margin-left:unset;border-radius:4px;font-size:14px;padding:8px 6px 8px 8px}#edd-filters .filter-items .edd-date-range-relative-dates{width:100%;flex-wrap:wrap;margin-left:0;margin-top:6px}#edd-filters .filter-items .edd-date-range-selected-relative-date{width:100%;margin-top:8px;margin-left:0;margin-right:0;font-size:14px;padding:8px 6px 8px 8px;flex-wrap:wrap}#edd-filters .filter-items .edd-date-range-selected-relative-date .arrow-down{margin-left:auto}#edd-filters .filter-items .edd-date-range-relative-dropdown{position:relative;width:100%;left:0;top:0;transform:unset;box-shadow:unset;border:unset;margin:0}#edd-filters .filter-items .edd-date-range-relative-dropdown:after{display:none}#edd-filters .filter-items .edd-date-range-relative-dropdown ul{margin-bottom:0}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li{padding-left:0;padding-right:0;justify-content:space-between;flex-wrap:wrap;gap:unset}#edd-filters .filter-items .edd-date-range-relative-dropdown ul li .date-range-dates,#edd-filters .filter-items .edd-date-range-relative-dropdown ul li .date-range-name{width:100%}}#edd-filters>p{color:#757575}#edd-filters input[type=number],#edd-filters input[type=text].edd_datepicker{max-width:105px}#edd-filters .button-secondary,#edd-filters input[type=number]{margin-bottom:0}#edd-filters .search-form{margin:0}@media screen and (max-width:480px){#edd-filters span{margin:2px 0}}#edd-advanced-filters{position:relative}#edd-advanced-filters .inside{z-index:99;position:absolute;top:29px;right:0;border:1px solid #e0e0e0;padding:0;background:#fff;box-shadow:0 3px 5px rgba(0,0,0,.2);min-width:285px;opacity:0;visibility:hidden}#edd-advanced-filters fieldset{display:block;padding:10px 15px 15px;margin:10px 0}#edd-advanced-filters fieldset:not(:last-of-type){border-bottom:1px solid #e0e0e0}#edd-advanced-filters fieldset:last-of-type{padding-bottom:5px}#edd-advanced-filters fieldset.edd-add-on-filters div,#edd-advanced-filters fieldset.edd-add-on-filters label,#edd-advanced-filters fieldset.edd-add-on-filters p,#edd-advanced-filters fieldset.edd-add-on-filters span{display:block;margin-bottom:2px}#edd-advanced-filters div.edd-select-chosen:not(:last-child){margin-bottom:10px}#edd-advanced-filters.open .edd-advanced-filters-button{background:#e0e0e0;border-color:#949494;box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);transform:translateY(1px)}#edd-advanced-filters.open .inside{visibility:visible;opacity:1;transition:opacity .2s ease-in}.download_page_edd-reports #edd-filters{margin-bottom:-1px;box-shadow:none}@media screen and (max-width:782px){.download_page_edd-reports #edd-filters{gap:0}}.edd-old-log-filters{margin-top:-30px;margin-left:2px}@media screen and (min-width:600px){#edd-reports-charts-wrap{display:-ms-grid;display:grid;-ms-grid-columns:(minmax(200px,50%))[2];grid-template-columns:repeat(2,minmax(200px,50%));grid-gap:2em}.edd-reports-chart{margin-bottom:0}.edd-reports-chart-bar,.edd-reports-chart-line{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/span 2}}.edd-canvas__container{margin:auto;position:relative;max-width:100%;max-height:75vh}@media screen and (min-width:480px){.edd-canvas__container.edd-canvas__type-bar,.edd-canvas__container.edd-canvas__type-line{height:450px}}@media screen and (min-width:782px){.edd-canvas__container.edd-canvas__type-bar,.edd-canvas__container.edd-canvas__type-line{height:500px}}@media screen and (min-width:1080px){.edd-canvas__container.edd-canvas__type-bar,.edd-canvas__container.edd-canvas__type-line{height:700px}}.chart-timezone{font-size:.75rem;color:#c3c4c7}.edd-mobile-link{line-height:32px}.edd-mobile-link a{text-decoration:none}.edd-mobile-link a:after,.edd-mobile-link a:before{display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/30px dashicons;vertical-align:top;margin:1px 0 0;padding:0}.edd-mobile-link a:before{content:"";color:#757575;margin-right:-3px}.edd-mobile-link a:after{content:""}#edd-reports-tiles-wrap #dashboard-widgets .sortable-placeholder{padding:0;margin:0 0 20px;line-height:0;box-sizing:border-box;height:110px}#edd-reports-tiles-wrap #dashboard-widgets #primary-sortables{margin-left:0}#edd-reports-tiles-wrap #dashboard-widgets #tertiary-sortables{margin-right:0}#edd-reports-tiles-wrap{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));grid-gap:20px}.edd-reports-tile{text-align:center;padding:20px 10px 35px;display:flex;flex-direction:column;justify-content:center;border:1px solid #e5e5e5;background:#fafafa;position:relative;box-sizing:border-box;gap:.5em}.edd-reports-tile>span:not(.tile-compare){width:100%}.edd-reports-tile .tile-label{text-align:center;text-transform:uppercase;font-size:12px;font-weight:400;color:#101517}.edd-reports-tile .tile-value{color:#333;font-size:2em;line-height:1;transition:all .2s ease-in-out;display:flex;justify-content:center;flex-direction:column;gap:.25em}.edd-reports-tile:hover{border:1px solid #aaa}.edd-reports-tile:hover .tile-value:not(.tile-no-data){transform:scale(1.05)}.edd-reports-tile .tile-amount{color:#2794da}.edd-reports-tile .tile-number{color:#96f}.edd-reports-tile .tile-amount,.edd-reports-tile .tile-number{color:#fff}.edd-reports-tile .tile-value.tile-no-data{color:#ddd}.edd-reports-tile .tile-value.tile-url{font-size:1.5em}.edd-reports-tile .tile-relative{font-size:12px;font-weight:400;color:#888}.edd-reports-tile span.dashicons{display:inline-block;font-size:30px;line-height:20px;height:20px;width:20px;position:relative;top:4px;left:-5px;margin-left:-5px;color:#999}.edd-reports-tile .tile-relative span.dashicons{top:-5px;left:-3px;margin-left:0}.edd-reports-tile .tile-relative span.dashicons-arrow-down,.edd-reports-tile .tile-relative span.dashicons-arrow-up.reverse{color:#d63638}.edd-reports-tile .tile-relative span.dashicons-arrow-down.reverse,.edd-reports-tile .tile-relative span.dashicons-arrow-up{color:#008a20}.edd-reports-tile .tile-compare{position:absolute;right:0;bottom:0;color:#aaa;font-size:11px;line-height:1em;background-color:#fff;border-color:#e5e5e5 #fff #fff #e5e5e5;border-style:solid;border-width:1px;border-top-left-radius:8px;padding:4px 0 0 9px;margin:0 -1px -1px 0}.edd-reports-tile:hover .tile-compare{border-left:1px solid #bbb;border-top:1px solid #bbb;color:#777}.edd-chartjs-tooltip{position:absolute;background-color:#fff;border-radius:7px;transition:all .1s ease;pointer-events:none;transform:translate(-50%);font-size:12px;box-shadow:0 0 0 1px rgba(89,94,100,.1),0 15px 35px 0 rgba(89,94,100,.1),0 5px 15px 0 rgba(0,0,0,.12);min-width:120px;opacity:0}.edd-chartjs-tooltip-key{display:inline-block;width:10px;height:10px;margin-right:5px}.edd-order-customer__actions{margin-bottom:2em}#edd-submit-refund-status{text-align:center;font-size:1.2em}#edd-submit-refund-status .edd-submit-refund-message:before{font-family:dashicons;font-size:1.5em;vertical-align:middle;color:#fff;border-radius:16px;margin:5px}#edd-submit-refund-status .edd-submit-refund-message.success:before{content:"";background-color:#008a20;padding-right:1px}#edd-submit-refund-status .edd-submit-refund-message.fail{display:block;margin-bottom:16px}#edd-submit-refund-status .edd-submit-refund-message.fail:before{content:"";background-color:#d63638}.refund-items td,.refund-items th.check-column{vertical-align:baseline}.refund-items .column-amount,.refund-items .column-discount,.refund-items .column-quantity,.refund-items .column-subtotal,.refund-items .column-tax,.refund-items .column-total{width:80px}.refund-items .edd-form-group__control{display:flex;align-items:center}.refund-items .edd-form-group__control input,.refund-items .edd-form-group__control select{background-color:transparent;border:0;border-bottom:1px solid;border-radius:0;box-shadow:none;text-align:right;width:100%}.refund-items .edd-form-group__control input:disabled,.refund-items .edd-form-group__control select:disabled{border-bottom:none}.refund-items .edd-form-group__control input:focus,.refund-items .edd-form-group__control select:focus{border-bottom:1px solid var(--wp-admin-theme-color-darker-10);box-shadow:0 1px 0 var(--wp-admin-theme-color-darker-10)}.refund-items .edd-form-group__control select[data-original="1"]{background:transparent}.refund-items .edd-form-group__control .is-before+span>input,.refund-items .edd-form-group__control select{text-align:left}.refund-items .edd-refund-submit-line-total{background-color:#fff!important}.refund-items .edd-refund-submit-line-total td{text-align:right}.refund-items .edd-refund-submit-line-total-amount{display:inline-block;margin-left:20px;text-align:left;width:80px}.refund-items #edd-refund-submit-subtotal td{border-top:2px solid #c3c4c7}@media screen and (max-width:782px){.refund-items td.column-total{margin-bottom:16px}.refund-items .edd-refund-submit-line-total-amount{padding-right:16px;width:unset}}.edd-submit-refund-actions{margin:16px 0 0}.did-refund .edd-submit-refund-actions,.did-refund .refund-items,body.edd-about div.notice{display:none}body.edd-about #edd-admin-about *,body.edd-about #edd-admin-about :after,body.edd-about #edd-admin-about :before{box-sizing:border-box}body.edd-about #edd-admin-about{display:flex;flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section{box-shadow:0 2px 5px #e8e8e8;margin:0 20px 20px;padding:30px;background:#fff;border:1px solid #ddd;line-height:2;display:flex;flex-direction:row}body.edd-about #edd-admin-about .edd-admin-about-section h2{font-size:24px;line-height:32px;color:#646970;margin:0}body.edd-about #edd-admin-about .edd-admin-about-section h3{font-size:16px;line-height:22px;color:#787c82}body.edd-about #edd-admin-about .edd-admin-about-section p,body.edd-about #edd-admin-about .edd-admin-about-section ul{font-size:14px}body.edd-about #edd-admin-about .edd-admin-about-section p{margin-bottom:10px}body.edd-about #edd-admin-about .edd-admin-about-section p.bigger{font-size:18px}body.edd-about #edd-admin-about .edd-admin-about-section p.smaller{font-size:14px}body.edd-about #edd-admin-about .edd-admin-about-section p:last-child{margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section hr{margin:30px 0}body.edd-about #edd-admin-about .edd-admin-about-section figure{margin:0}body.edd-about #edd-admin-about .edd-admin-about-section figure img.shadow{width:100%;box-shadow:0 2px 5px #e8e8e8}body.edd-about #edd-admin-about .edd-admin-about-section figure figcaption{font-size:14px;color:#888;margin-top:5px;text-align:center;line-height:normal}body.edd-about #edd-admin-about .edd-admin-about-section .edd-admin-columns{display:flex}body.edd-about #edd-admin-about .edd-admin-about-section .column{display:flex;flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section .column--20{width:20%}body.edd-about #edd-admin-about .edd-admin-about-section .column--40{width:40%}body.edd-about #edd-admin-about .edd-admin-about-section .column--50{width:50%}body.edd-about #edd-admin-about .edd-admin-about-section .column--60{width:60%}body.edd-about #edd-admin-about .edd-admin-about-section .column--80{width:80%}body.edd-about #edd-admin-about .edd-admin-about-section .column.align--middle{align-items:center;justify-content:center}body.edd-about #edd-admin-about .edd-admin-about-section .column.m-l-15{margin-left:15px}body.edd-about #edd-admin-about .edd-admin-about-section .column.m-r-15{margin-right:15px}body.edd-about #edd-admin-about .edd-admin-about-section ul.list-plain{margin-top:0;margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section ul.list-plain li{margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section ul.list-features li{display:flex;align-items:center;justify-items:left;gap:8px}body.edd-about #edd-admin-about .edd-admin-about-section .dashicons-star-filled{color:gold}body.edd-about #edd-admin-about .edd-admin-about-section .no-margin{margin:0!important}body.edd-about #edd-admin-about .edd-admin-about-section .no-padding{padding:0!important}body.edd-about #edd-admin-about .edd-admin-about-section .centered{text-align:center!important}body.edd-about #edd-admin-about .edd-admin-about-section-first-form{display:flex}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-text{flex:1;padding-right:30px}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-video iframe{border:1px solid #ddd}body.edd-about #edd-admin-about .edd-admin-about-section-hero{display:flex;flex-direction:column;padding:0}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra,body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main{padding:30px}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra div.notice,body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main div.notice{display:none}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra h3.call-to-action,body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main h3.call-to-action{margin-bottom:-10px}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main{background-color:#fafafa;border-bottom:1px solid #ddd}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main.no-border{border-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-main p{color:#666}body.edd-about #edd-admin-about .edd-admin-about-section-squashed{margin-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section-squashed:not(:last-of-type){border-bottom:0}body.edd-about #edd-admin-about .edd-admin-about-section-post{flex-direction:row;gap:50px}body.edd-about #edd-admin-about .edd-admin-about-section-post h2{margin-bottom:-10px}body.edd-about #edd-admin-about .edd-admin-about-section-post h3{margin-bottom:15px}body.edd-about #edd-admin-about .edd-admin-about-section-post p:last-of-type{margin-bottom:30px}body.edd-about #edd-admin-about .edd-admin-about-section-post img{max-width:250px}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20{width:250px}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80{width:calc(100% - 270px)}body.edd-about #edd-admin-about .edd-admin-about-section-post .button-secondary{transition:all .1s ease-in-out}body.edd-about #edd-admin-about .edd-admin-about-section-post .button-secondary:focus,body.edd-about #edd-admin-about .edd-admin-about-section-post .button-secondary:hover{background-color:#2271b1;color:#fff}body.edd-about #edd-admin-about #edd-admin-addons{padding:0 30px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container{display:flex;flex-direction:row;flex-wrap:wrap;align-items:space-between}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container{display:flex;padding:10px;flex:1 0 33.3333%;max-width:33.3333%}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item{display:flex;flex-direction:column;border:1px solid #ddd;box-shadow:0 2px 5px #e8e8e8}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details{padding:20px;display:flex;flex-direction:row;background-color:#fff;flex-grow:1}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .leftcol img{max-width:100px;padding:10px;box-shadow:0 2px 3px #e8e8e8}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol{flex-direction:column;justify-content:left;flex-grow:4;padding-left:20px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol h5{font-size:14px;margin-bottom:10px;margin-top:0}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 12px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions.has-response{justify-content:center;flex-grow:10}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label{font-weight:600}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label.active{color:#008a20}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label.inactive{color:#d63638}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .status span.status-label.not-installed{color:#646970}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .action-button .button.disabled,body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .actions .action-button .button.loading{cursor:default}@media(max-width:1440px){body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container{display:flex;padding:10px;flex:1 0 50%;max-width:50%}}@media(max-width:1280px){body.edd-about #edd-admin-about .welcome-message{flex-direction:column-reverse}body.edd-about #edd-admin-about .welcome-message.column--20,body.edd-about #edd-admin-about .welcome-message .column--40,body.edd-about #edd-admin-about .welcome-message .column--50,body.edd-about #edd-admin-about .welcome-message .column--60,body.edd-about #edd-admin-about .welcome-message .column--80{width:100%}body.edd-about #edd-admin-about .welcome-message.column--20.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--40.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--50.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--60.m-l-15,body.edd-about #edd-admin-about .welcome-message .column--80.m-l-15{margin-left:0}body.edd-about #edd-admin-about .welcome-message.column--20.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--40.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--50.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--60.m-r-15,body.edd-about #edd-admin-about .welcome-message .column--80.m-r-15{margin-right:0}}@media(max-width:960px){body.edd-about #edd-admin-about .edd-admin-about-section{flex-direction:column;gap:20px}body.edd-about #edd-admin-about .edd-admin-about-section.welcome-message{flex-flow:column-reverse}body.edd-about #edd-admin-about .edd-admin-about-section .edd-admin-columns{flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section.column--20,body.edd-about #edd-admin-about .edd-admin-about-section .column--40,body.edd-about #edd-admin-about .edd-admin-about-section .column--50,body.edd-about #edd-admin-about .edd-admin-about-section .column--60,body.edd-about #edd-admin-about .edd-admin-about-section .column--80{display:flex;width:100%}body.edd-about #edd-admin-about .edd-admin-about-section.column--20.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--40.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--50.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--60.m-l-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--80.m-l-15{margin-left:0}body.edd-about #edd-admin-about .edd-admin-about-section.column--20.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--40.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--50.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--60.m-r-15,body.edd-about #edd-admin-about .edd-admin-about-section .column--80.m-r-15{margin-right:0}body.edd-about #edd-admin-about .edd-admin-about-section-first-form{display:block!important}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-text{flex:none}body.edd-about #edd-admin-about .edd-admin-about-section-first-form .edd-admin-about-section-first-form-video{padding-top:20px}body.edd-about #edd-admin-about .edd-admin-about-section-hero .edd-admin-about-section-hero-extra .edd-admin-column-50{float:none;width:100%}body.edd-about #edd-admin-about .edd-admin-about-section-post{flex-direction:column}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80{display:flex;width:100%}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20 img,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80 img{width:auto;max-width:100%}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20.image,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80.image{margin:0 auto;align-content:center;justify-content:center}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20.content,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80.content{flex-direction:column;justify-items:left}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20 .edd-admin-about-section-post-link,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80 .edd-admin-about-section-post-link{font-size:1.25rem;display:flex;justify-items:space-around;justify-content:center}body.edd-about #edd-admin-about .edd-admin-about-section-post .column--20 .edd-admin-about-section-post-link .dashicons,body.edd-about #edd-admin-about .edd-admin-about-section-post .column--80 .edd-admin-about-section-post-link .dashicons{display:none}body.edd-about #edd-admin-about #edd-admin-addons .addons-container{display:flex;flex-direction:column}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container{padding:10px;flex:1 0 100%;max-width:100%}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details{flex-direction:row}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol{padding-left:20px}body.edd-about #edd-admin-about #edd-admin-addons .addons-container .addon-container .addon-item .details .rightcol .addon-name{text-align:left}}#edd-flyout{position:fixed;z-index:99999;transition:all .2s ease-in-out;right:40px;bottom:40px;opacity:1;display:flex;flex-direction:column;align-items:flex-end}@media(max-width:960px){#edd-flyout{display:none}}#edd-flyout .edd-flyout-label{transform:translateY(-50%);-moz-transform:translateY(-50%);-webkit-transform:translateY(-50%);color:#fff;background-color:#757575;font-size:12px;white-space:nowrap;padding:5px 10px;transition:all .2s ease-out;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:20px;opacity:0;transform:scale(0)}#edd-flyout #edd-flyout-button{border:none;padding:0;background:none;display:flex;flex-direction:row;gap:10px;align-items:center}#edd-flyout #edd-flyout-button img{width:54px;height:54px;display:block;border-radius:50%;border:3px solid #0c5d95;overflow:hidden;transition:all .2s ease-in-out;background:#fff}#edd-flyout #edd-flyout-button:hover img{cursor:pointer;box-shadow:0 3px 12px 1px rgba(30,30,30,.55)}#edd-flyout #edd-flyout-button .edd-flyout-label{opacity:0;transform:translateY(-50%) scale(0)}#edd-flyout #edd-flyout-button:hover .edd-flyout-label{opacity:1;transform:translateY(-50%) scale(1)}#edd-flyout #edd-flyout-button.has-alert:after{transform:scale(1);opacity:1;font-family:dashicons;content:"";color:#d63638;font-size:16px;height:16px;width:16px;text-decoration:none;border-radius:999999px;line-height:16px;transition:all .2s ease-in-out;background-color:#fff;position:absolute;right:3px;bottom:46px}#edd-flyout #edd-flyout-items{display:flex;flex-direction:column-reverse;gap:10px;margin-right:12px;margin-bottom:12px;height:0}#edd-flyout #edd-flyout-items .edd-flyout-item{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:25px;visibility:collapse}#edd-flyout #edd-flyout-items .edd-flyout-item a{text-decoration:none;color:#fff}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon,#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-label{transition:all .2s ease-in-out;transform:scale(0);opacity:0}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-label{margin-top:0}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-label a{display:inline-block;line-height:normal;height:auto!important}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon{display:flex;justify-content:space-around;width:40px;height:40px;border-radius:50%;box-shadow:0 3px 12px 1px rgba(30,30,30,.55);background:#0c5d95 0 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon.red{background:#d63638 0 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon.green{background:#1da867 0 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item .edd-flyout-icon span.dashicons:before{color:#fff;font-size:20px;line-height:40px;vertical-align:middle}#edd-flyout #edd-flyout-items .edd-flyout-item:hover{cursor:pointer}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon,#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-label{box-shadow:0 3px 12px 1px rgba(30,30,30,.55)}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon{background:#35495c 0 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon.red{background:#b60012 0 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-icon.green{background:#199155 0 0 no-repeat padding-box}#edd-flyout #edd-flyout-items .edd-flyout-item:hover .edd-flyout-label{background-color:#494949}#edd-flyout.opened #edd-flyout-items{height:auto}#edd-flyout.opened #edd-flyout-items .edd-flyout-item{visibility:visible}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:first-of-type .edd-flyout-icon{transition:transform .2s 0ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:first-of-type .edd-flyout-label,#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(2) .edd-flyout-icon{transition:transform .2s 24ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(2) .edd-flyout-label,#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(3) .edd-flyout-icon{transition:transform .2s 48ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(3) .edd-flyout-label,#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(4) .edd-flyout-icon{transition:transform .2s 72ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item.edd-flyout-item:nth-of-type(4) .edd-flyout-label{transition:transform .2s 96ms,background-color .2s}#edd-flyout.opened #edd-flyout-items .edd-flyout-item .edd-flyout-icon,#edd-flyout.opened #edd-flyout-items .edd-flyout-item .edd-flyout-label{opacity:1;transform:scale(1)}#edd-flyout.opened #edd-flyout-button img{box-shadow:0 3px 12px 1px rgba(30,30,30,.55)}#edd-flyout.opened #edd-flyout-button .edd-flyout-label{opacity:0}#edd-flyout.opened #edd-flyout-button.has-alert:after{opacity:0;transition:scale(0)}#edd-flyout.out{opacity:0;visibility:hidden}.edd-admin-notice-top-of-page{font-size:15px;line-height:1.4;color:#fff;margin-left:-20px;padding:12px 32px 12px 20px;background:#2d6ca2}.edd-admin-notice-top-of-page.edd-pro-inactive{background:#d63638}@media screen and (min-width:783px){.edd-admin-notice-top-of-page{padding:10px 46px 10px 22px}}@media screen and (min-width:961px){.edd-admin-notice-top-of-page{text-align:center}}.edd-admin-notice-top-of-page a{color:#fff}.edd-admin-notice-top-of-page a:hover{text-decoration:none}.edd-admin-notice-top-of-page .button-link{position:absolute;top:48px;right:-1px;font-size:20px;color:#fff;font-weight:700;text-decoration:none;margin-left:5px;padding:6px 10px}.edd-admin-notice-top-of-page .button-link:active,.edd-admin-notice-top-of-page .button-link:focus,.edd-admin-notice-top-of-page .button-link:hover{color:#fff;text-decoration:none}@media screen and (min-width:601px){.edd-admin-notice-top-of-page .button-link{top:1px}}@media screen and (min-width:783px){.edd-admin-notice-top-of-page .button-link{right:9px}}#edd-admin-notice-five-star-review{display:-ms-grid!important;display:grid!important}#edd_dashboard_sales .edd-promo-notice{border-bottom:1px solid #c3c4c7}.edd-review-actions{display:flex;gap:6px;margin:0 0 16px}.edd-promo-notice .edd-peeking{align-self:flex-end;justify-self:flex-end;margin-right:16px;margin-bottom:-1px}@media screen and (max-width:782px){#edd-admin-notice-five-star-review.notice .edd-peeking{margin-bottom:-6px}}@media screen and (min-width:480px){.edd-promo-notice.notice-info .edd-peeking{justify-self:flex-start;margin-right:0;margin-left:250px}}.edd-promo-notice .edd-peeking,.edd-review-step{-ms-grid-row:1;grid-area:1/-1}.edd-promo-notice__overlay{display:none;position:fixed;background:rgba(16,21,23,.75);top:0;right:0;bottom:0;left:160px;z-index:110;justify-content:center;align-items:center}.folded .edd-promo-notice__overlay{left:36px}@media screen and (max-width:782px){.edd-promo-notice__overlay{left:0}}.edd-admin-notice-overlay{display:none;background-color:#fff;padding:2.5em;text-align:center;max-width:650px;position:relative;flex-direction:column}.edd-promo-notice__overlay .edd-admin-notice-overlay{display:flex}.edd-admin-notice-overlay h2{line-height:1.6em;margin:0 auto;max-width:540px}.edd-admin-notice-overlay .edd-promo-notice__features{text-align:left;display:-ms-grid;display:grid;-ms-grid-columns:(auto)[3];grid-template-columns:repeat(3,auto);margin:2em auto;gap:0 1.5em}.edd-admin-notice-overlay .edd-promo-notice__features li{display:flex;gap:.5em;align-items:center}@media screen and (max-width:600px){.edd-admin-notice-overlay .edd-promo-notice__features{-ms-grid-columns:unset;grid-template-columns:unset}}.edd-admin-notice-overlay .button{padding:4px 36px;margin:0 auto .5em;max-width:360px}.edd-admin-notice-overlay__link{color:#101517}.edd-admin-notice-overlay .edd-promo-notice-dismiss.button-link{position:absolute;color:#537994;text-decoration:none;font-size:2em;top:0;right:.5em}.edd-admin-notice-overlay .edd-promo-notice-dismiss.button-link:active,.edd-admin-notice-overlay .edd-promo-notice-dismiss.button-link:hover{color:#101517}@media screen and (max-width:782px){.edd-admin-notice-overlay{margin:1em}}.edd-promo-notice__popup{display:flex;justify-content:center;justify-items:center;flex-direction:column;margin:2em auto;gap:0 1.5em}.edd-promo-notice__popup h2{line-height:1.6em;margin:0 auto;max-width:540px;font-size:1.25em}.edd-promo-notice__popup .content{display:inherit;flex-direction:inherit;justify-items:center;text-align:center}.edd-promo-notice__popup .content .edd-promo-notice__features{text-align:left;display:-ms-grid;display:grid;-ms-grid-columns:(auto)[3];grid-template-columns:repeat(3,auto);margin:2em auto;gap:0 1.5em;flex-direction:row}.edd-promo-notice__popup .content .edd-promo-notice__features li{display:flex;gap:.5em;align-items:center;min-width:50%}@media screen and (max-width:600px){.edd-promo-notice__popup .content .edd-promo-notice__features{-ms-grid-columns:unset;grid-template-columns:unset}}.edd-promo-notice__popup .content .button-primary{padding:4px 36px;margin:.5em auto;max-width:360px}.edd-promo-notice__popup .content__link{color:#101517}#edd-paypal-commerce-connect-wrap.loading ul.edd-paypal-account-status li span,#edd-paypal-commerce-connect-wrap.loading ul.edd-paypal-webhook-events li span{animation:skeleton-loading 1s infinite alternate;width:250px;height:18px;display:inline-block}#edd-paypal-commerce-connect-wrap.loading .edd-paypal-connect-actions span{animation:skeleton-loading 1s infinite alternate;width:150px;height:32px;display:inline-block}.edd-paypal-account-status ul{margin-left:25px;list-style-type:none}.edd-paypal-account-status>li{margin-bottom:1em}.edd-paypal-account-status ul:not(.edd-paypal-webhook-events) li{margin:.25em 0}.edd-paypal-account-status .dashicons-yes{color:#008a20}.edd-paypal-account-status .dashicons-no{color:#d63638}@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.wrap-licenses .edd-licenses__description{margin:2em 1em}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}@media screen and (min-width:600px){.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:unset}}.wrap-licenses tbody{display:-ms-grid;display:grid;gap:1em}.wrap-licenses .form-table tr{margin:0;background:#fff;border:1px solid #dcdcde;border-radius:3px;padding:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between}@media screen and (min-width:600px){.wrap-licenses .form-table tr{display:-ms-grid;display:grid;-ms-grid-columns:200px 1fr;grid-template-columns:200px 1fr}}.wrap-licenses .form-table th{background:#f9f9f9;margin-bottom:2.5em;padding:1em;border-bottom:1px solid #dcdcde;width:unset}@media screen and (min-width:600px){.wrap-licenses .form-table th{border-bottom:none;margin-bottom:0;display:flex;align-items:center}}.wrap-licenses .form-table td{margin:0;padding:0;display:flex;flex-direction:column;gap:2.5em;flex-grow:1}@media screen and (min-width:600px){.wrap-licenses .form-table td{flex-direction:row;gap:unset}}.wrap-licenses .form-table td input.regular-text{margin:0;width:100%;max-width:250px}.wrap-licenses .form-table td button{margin:0}.wrap-licenses .form-table .edd-license__control{flex-grow:1;padding:0 1em;display:flex;gap:4px;align-items:center;justify-content:center}@media screen and (min-width:600px){.wrap-licenses .form-table .edd-license__control{justify-content:flex-end}}.wrap-licenses .form-table .edd-licensing__actions{display:flex;gap:4px}.wrap-licenses .edd-license-data[class*=edd-license-]{background:#f9f9f9;padding:1em;border-top:1px solid #dcdcde;margin:0;width:100%;box-sizing:border-box;display:flex;align-items:flex-end}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}@media screen and (min-width:600px){.wrap-licenses .edd-license-data[class*=edd-license-]{border-top:none;width:unset;flex-basis:100%;align-items:center}.wrap-licenses .edd-license-data[class*=edd-license-]:not(:only-child){flex:0 1 300px}}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses .edd-license-data.edd-license-expired a,.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover,.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.edd-sub-nav{margin:0;display:flex;justify-content:flex-start;gap:4px;flex-wrap:wrap}@media screen and (max-width:782px){.edd-sub-nav{justify-content:center}}.edd-sub-nav__wrapper{margin:16px 0}.edd-sub-nav li{border:2px solid #f0f0f1;border-radius:4px;margin:0}.edd-sub-nav li a{color:#646970;display:block;padding:6px 14px;text-decoration:none;white-space:nowrap}.edd-sub-nav li a:active,.edd-sub-nav li a:focus{box-shadow:none}.edd-sub-nav li:active,.edd-sub-nav li:focus,.edd-sub-nav li:hover{background-color:#fff;box-shadow:none;outline:none;border-color:#a7aaad}.edd-sub-nav li.current{background-color:#d7dade;font-weight:600}.edd-sub-nav__wrapper+.notice{margin-left:0}.edd-settings-content{max-width:1440px}.edd-settings-content h3{margin:0}.edd-settings-color,.edd-settings-colors{display:flex;flex-wrap:wrap;gap:1em}.edd-settings-color{flex-direction:column}.edd-upload-button-wrapper{width:100%;display:flex;gap:5px}.edd-upload-button-wrapper button.edd_settings_upload_button{margin-bottom:0}#edd-payment-gateways a.button.edd-settings__button-settings{position:absolute;right:2em;min-height:unset;height:1.5em;width:1.5em;border:none;background-color:#f9f9f9}#edd-payment-gateways a.button.edd-settings__button-settings,#edd-payment-gateways a.button.edd-settings__button-settings:active,#edd-payment-gateways a.button.edd-settings__button-settings:hover{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS4yOSA2LjI5M2wtMS41MTUuODc1YTUuODczIDUuODczIDAgMDEwIDEuNjY0bDEuNTE1Ljg3NS0yLjE2NiAzLjc1My0xLjUxNi0uODc1YTUuODI3IDUuODI3IDAgMDEtMS40NDEuODMzdjEuNzQ5SDUuODM0di0xLjc1YTUuODI1IDUuODI1IDAgMDEtMS40NDEtLjgzMmwtMS41MTYuODc1TC43MSA5LjcwN2wxLjUxNi0uODc1YTUuODc4IDUuODc4IDAgMDEwLTEuNjY0TC43MSA2LjI5MyAyLjg3NyAyLjU0bDEuNTE2Ljg3NmE1LjgyNyA1LjgyNyAwIDAxMS40NC0uODMzVi44MzNoNC4zMzR2MS43NWE1LjgzIDUuODMgMCAwMTEuNDQuODMzbDEuNTE3LS44NzYgMi4xNjYgMy43NTN6TTggMTAuMzMzYTIuMzMzIDIuMzMzIDAgMTAwLTQuNjY2IDIuMzMzIDIuMzMzIDAgMDAwIDQuNjY2eiIgZmlsbD0iIzZCNzI4MCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUuMjkgNi4yOTNsLTEuNTE1Ljg3NWE1Ljg3MyA1Ljg3MyAwIDAxMCAxLjY2NGwxLjUxNS44NzUtMi4xNjYgMy43NTMtMS41MTYtLjg3NWE1LjgyNyA1LjgyNyAwIDAxLTEuNDQxLjgzM3YxLjc0OUg1LjgzNHYtMS43NWE1LjgyNSA1LjgyNSAwIDAxLTEuNDQxLS44MzJsLTEuNTE2Ljg3NUwuNzEgOS43MDdsMS41MTYtLjg3NWE1Ljg3OCA1Ljg3OCAwIDAxMC0xLjY2NEwuNzEgNi4yOTMgMi44NzcgMi41NGwxLjUxNi44NzZhNS44MjcgNS44MjcgMCAwMTEuNDQtLjgzM1YuODMzaDQuMzM0djEuNzVhNS44MyA1LjgzIDAgMDExLjQ0LjgzM2wxLjUxNy0uODc2IDIuMTY2IDMuNzUzek04IDEwLjMzM2EyLjMzMyAyLjMzMyAwIDEwMC00LjY2NiAyLjMzMyAyLjMzMyAwIDAwMCA0LjY2NnoiIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iLjUiLz48L3N2Zz4=);background-size:1em;background-repeat:no-repeat;background-position:50%}.edd-plugin__active #edd-payment-gateways a.button.edd-settings__button-settings{display:block}.edd-settings__list--disc{list-style:disc;list-style-position:inside}.wp-list-table.discounts .column-amount{width:90px}.wp-list-table.discounts th.column-use_count{width:150px}#edd-products{height:100px;min-width:200px}#edd-add-discount input[type=text],#edd-edit-discount input[type=text]{width:300px}#edd-add-discount .edd-discount-datetime input,#edd-edit-discount .edd-discount-datetime input{vertical-align:middle}#edd-add-discount input[type=text].edd_datepicker,#edd-edit-discount input[type=text].edd_datepicker{display:inline-block;width:183px}#edd-edit-discount textarea{height:100px}.edd-amount-type-wrapper{position:relative;display:flex}.edd-amount-type-wrapper select{border-top-left-radius:0;border-bottom-left-radius:0;width:auto!important}.edd-amount-type-wrapper #edd-amount{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-2px;padding:0 8px;width:unset;max-width:125px}.edd-amount-type-wrapper input:focus{z-index:2}.edd-code-wrapper{display:flex;align-items:stretch;gap:3px}.edd-popup-trigger{display:flex!important;align-items:center;gap:3px}@media screen and (max-width:782px){.edd-popup-trigger{margin-bottom:0!important}}@media screen and (max-width:480px){.edd-popup-trigger span:not(.dashicons){display:none}}.edd-code-generator-popup{position:absolute;z-index:99;width:250px;height:auto;margin:auto;padding:10px;transform:translate(240px,15px);background-color:#fff;border:1px solid #8c8f94;border-radius:4px;box-shadow:0 -2px 5px 0 rgba(0,0,0,.25);box-sizing:border-box;display:none}.edd-code-generator-popup:after{content:"";width:15px;height:15px;background:#fff;position:absolute;margin:auto;transform:rotate(45deg);z-index:-1;left:0;right:0;top:-8.5px;border-color:#8c8f94;border-style:solid;border-width:1px 0 0 1px}@media screen and (max-width:480px){.edd-code-generator-popup{transform:translateY(15px) translateX(105px)}.edd-code-generator-popup:after{left:70%}}.edd-code-generator-popup .edd-form-group{width:100%;margin-bottom:10px;padding-bottom:10px;box-sizing:border-box;margin-top:0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dcdcde;height:40px}.edd-code-generator-popup .edd-form-group:last-of-type{border-bottom:0}.edd-code-generator-popup .edd-form-group label{padding:5px 0;width:60px;font-size:12px;margin-bottom:0;box-sizing:border-box}@media screen and (max-width:782px){.edd-code-generator-popup .edd-form-group label{line-height:28px}}.edd-code-generator-popup .edd-form-group input:not([type=checkbox]):not([type=radio]){width:120px!important;min-height:0;height:30px}.edd-code-generator-popup .edd-form-group input:not([type=checkbox]):not([type=radio]):not(:focus){border:1px solid #8c8f94}.edd-code-generator-popup #edd-generate-code{width:100%}@media screen and (max-width:782px){.edd-code-generator-popup #edd-generate-code:before{margin-top:8px}}.edd_dashboard_widget{display:-ms-grid;display:grid;-ms-grid-columns:(minmax(150px,1fr))[2];grid-template-columns:repeat(2,minmax(150px,1fr));grid-gap:1em}.edd_dashboard_widget>div:not(.table_left):not(.table_right){-ms-grid-column-span:2;grid-column:span 2}.edd_dashboard_widget table thead td{border-bottom:1px solid #c3c4c7;color:#777}.edd_dashboard_widget .inside{font-size:12px}.edd_dashboard_widget td{padding:3px 0}.edd_dashboard_widget .b,.edd_dashboard_widget .t{line-height:1.5;vertical-align:middle}.edd_dashboard_widget .b{text-align:right}.edd_dashboard_widget .t{font-size:12px;padding-right:12px;color:#777;width:100%}.edd_dashboard_widget .label_heading{border-top:1px solid #c3c4c7;color:#8f8f8f;font-size:12px;font-weight:400;display:block;padding-top:10px;margin:0 0 8px 12px}.edd_dashboard_widget .edd_dashboard_widget_subheading{border-top:1px solid #c3c4c7;color:#8f8f8f;font-size:14px;padding-top:10px;margin:1em 0 0}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0}.edd_dashboard_widget .edd_price_label{background:var(--wp-admin-theme-color);border-radius:3px;color:#fff;font-size:10px;padding:2px 4px;margin-right:2px}.edd_dashboard_widget table{width:100%;margin-left:0;margin-bottom:1em}td.edd_order_label{width:80%}td.edd_order_price{text-align:right}@media handheld,only screen and (max-width:1000px){.edd_dashboard_widget .edd-recent-email{display:none}}.edd-dashboard-notice{-ms-grid-column-span:2;grid-column:span 2;padding:1px;text-align:center;margin:1em -1em -1em;background-color:#f9f9f9;border:1px solid #c3c4c7}.edd-dashboard-notice--error{background:#d63638;color:#fff}.edd-dashboard-notice--error a{color:#fff}body.dashboard_page_edd-upgrades.js .postbox .hndle{cursor:default}.edd-toggle{position:relative;display:flex;gap:5px;overflow:visible;align-items:center}.edd-toggle input[type=checkbox]{position:relative;margin:0;padding:0;width:42px;min-width:42px;height:24px;background-color:#ccc;transition:background .2s ease;border-radius:34px;box-shadow:none;border:none}.edd-toggle .label{white-space:nowrap}.edd-toggle input[type=checkbox]:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%}@media only screen and (max-width:782px){.edd-toggle input[type=checkbox]:checked:before{margin:-.1875rem 0 0 -.25rem}}.edd-toggle input[type=checkbox]:checked{background-color:#007cba;background-color:var(--wp-admin-theme-color)}.edd-toggle input[type=checkbox]:active,.edd-toggle input[type=checkbox]:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px #7e8993}.edd-toggle input[type=checkbox]:checked:active,.edd-toggle input[type=checkbox]:checked:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #007cba;box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.edd-toggle input[type=checkbox]:checked:before{transform:translateX(22px)}.edd-toggle input[type=checkbox]:disabled{opacity:.5}.edd-toggle.inverse input[type=checkbox]{background-color:#007cba;background-color:var(--wp-admin-theme-color);transform:scaleX(-1)}.edd-toggle.inverse input[type=checkbox]:checked{background-color:#ccc}.edd-notice .notice-dismiss,.edd-wrap a{text-decoration:none}.wp-core-ui .edd-delete,a.edd-delete{color:#a00}.wp-core-ui .edd-delete:hover,a.edd-delete:hover{color:red}body.post-type-download #contextual-help-link-wrap,body.post-type-download #screen-options-link-wrap{top:5px!important}body.post-type-download #screen-meta{margin:0 0 -1px -20px}#edd-header{border-top:5px solid #0c5d95;border-bottom:1px solid #c3c4c7;padding:20px 0;margin-left:-20px;background:#fff}#edd-header-wrapper{display:flex;justify-content:space-between;padding:0 20px;align-items:center}#edd-header img{display:block;max-width:300px;margin:0}.edd-header-page-title-wrap{font-size:1.75em;margin-top:-5px;margin-right:auto;padding-left:7px}.edd-header-separator{margin-top:-2px;opacity:.25}.edd-header-page-title{font-weight:400;font-size:1em;line-height:1.3em;display:inline}.edd-header-page-title-wrap .button{margin-left:5px}.no-js #edd-header-actions{display:none}#edd-header .edd-round{position:relative;background-color:#f3f4f5;border-radius:50%;width:40px;height:40px;display:flex;align-items:center;justify-content:center;margin-left:10px;cursor:pointer;transition:background-color .2s ease}#edd-header .edd-round.edd-hidden{display:none}button.edd-round{border:none}#edd-header button.edd-round:hover{background-color:#e5e5e5}button.edd-round:active,button.edd-round:focus{outline:2px solid #0c5d95}#edd-header .edd-number{position:absolute;background-color:#df2a4a;width:16px;height:16px;font-weight:600;font-size:10px;color:#fff;top:-8px;left:50%;transform:translateX(-50%);margin:0;animation:bounce 2s 5}#edd-header .edd-number.edd-hidden{display:none!important}#edd-header .edd-round svg{width:20px;height:20px}@media screen and (max-width:840px){#edd-header img,.edd-header-separator{display:none}}.edd_datepicker{height:29px}.edd-from-to-wrapper input{width:105px;margin:0;position:relative;z-index:1}.edd-from-to-wrapper input[name*=start],.edd-from-to-wrapper input[name=filter_from]{border-top-right-radius:0;border-bottom-right-radius:0}.edd-from-to-wrapper input[name*=end],.edd-from-to-wrapper input[name=filter_to]{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.edd-from-to-wrapper input:focus{z-index:2;position:relative}.download_page_edd-settings .edd-check-wrapper{clear:both}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.edd-sortable-list{margin:0;width:300px;position:relative}.edd-sortable-list li{margin:0;padding:0;position:relative;height:28px;cursor:move}.edd-sortable-list li.edd-toggle{padding:4px 0}.edd-sortable-list li label *{vertical-align:middle}.edd-sortable-list li label:after{display:block;width:17px;height:17px;position:absolute;right:6px;top:0;color:#aaa;font-family:dashicons;font-size:17px;content:"";cursor:move}.form-table .edd-sortable-list li label{display:block;height:28px;padding:0;margin:0}.edd-sortable-list .payment-icon{width:32px;height:24px;position:relative;margin-right:5px}.download_page_edd-settings .edd-settings-payment-icon-wrapper{margin-top:5px}.download_page_edd-settings .edd-settings-payment-icon-wrapper input{margin-top:1px}.download_page_edd-settings .form-table .edd-settings-payment-icon-wrapper input[type=checkbox]+label{margin:0;display:inline-block}.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-icon-image{margin-right:5px;width:32px;display:inline-block;vertical-align:middle}.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-option-name{vertical-align:middle}.download_page_edd-settings .taxrates td,.download_page_edd-settings .taxrates th{padding:8px 10px}.download_page_edd-settings .taxrates td{line-height:1.5em;vertical-align:top;margin:0}.download_page_edd-settings .taxrates .regular-text{width:100%}#TB_window{overflow:hidden}#TB_title{padding:5px}#TB_ajaxContent{width:calc(100% - 30px)!important;padding:15px;margin:0;height:calc(100% - 118px)!important}#TB_ajaxWindowTitle{font-size:18px;font-weight:600;line-height:30px}#TB_closeWindowButton{right:6px;top:6px}#choose-download-wrapper{width:100%}#choose-download-wrapper .wrap{overflow-y:scroll;margin:0;padding:0;height:calc(100% - 50px)}#choose-download-wrapper .submit-wrapper{position:absolute;width:100%;bottom:0;padding:0;margin:0 0 0 -15px;text-align:right}#choose-download-wrapper .submit-wrapper div{background-color:#fafafa;padding:15px;border-top:1px solid #ddd}.wp-media-buttons .button.edd-thickbox{padding-left:0}.wp-media-buttons .button.edd-email-tags-inserter .dashicons{margin-top:-2px}.download_page_edd-payment-history .edit-post-editor-regions__header{flex-shrink:0;height:auto;border-bottom:1px solid #e2e4e7;z-index:30;position:sticky;top:32px;margin-left:-20px}@media screen and (max-width:782px){.download_page_edd-payment-history .edit-post-editor-regions__header{position:static;top:46px}}.download_page_edd-payment-history .edit-post-header{height:56px;background:#fff;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:100%;box-sizing:border-box;padding:4px 20px}@media screen and (max-width:782px){.download_page_edd-payment-history .edit-post-header{padding-left:10px;padding-right:10px}}@media(min-width:280px){.download_page_edd-payment-history .edit-post-header{flex-wrap:nowrap}}.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar{order:0}.download_page_edd-payment-history .edit-post-header .edit-post-header__settings{order:1}.download_page_edd-payment-history .edit-post-header #publishing-action,.download_page_edd-payment-history .edit-post-header .edit-post-header__settings,.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar{display:flex;align-items:center}.download_page_edd-payment-history .edit-post-header #publishing-action .spinner{margin:0 5px 0 0}.download_page_edd-payment-history .edit-post-header .button-primary{margin:2px;height:34px;line-height:32px;font-size:13px}#edd-order-items .hndle{display:flex;align-items:center;justify-content:space-between}#edd-order-items .hndle .edd-toggle{font-weight:400}.edd-add-order-item td{vertical-align:middle}.edd-add-order-item input{width:80%}.edd-add-order-item input[readonly]{color:#555;background:none;border:1px solid transparent;box-shadow:none}.order-customer-info .customer-details-wrap{margin:15px 0;align-items:center}.order-customer-info .customer-details-wrap .spinner{margin:0}.order-customer-info .customer-details{display:flex;flex-direction:column}.order-customer-info .customer-details .customer-since{color:#666;display:block;margin:4px 0 6px}.order-customer-info .customer-details>span{margin-bottom:5px}.edd-order-add-download-select .spinner{display:none}table.edd-order-overview-summary{border-width:0;table-layout:fixed}table.edd-order-overview-summary--refund{border-width:0}@media screen and (min-width:782px){.edd-order-overview .column-right{text-align:right}}.edd-ml-auto{margin-left:auto!important}@media screen and (min-width:782px){.edd-ml-lg-auto{margin-left:auto!important}}.edd-ml-auto+.edd-ml-auto{margin-left:10px!important}.edd-order-overview-summary__items-name{align-self:flex-start}.edd-order-overview-summary__items>:nth-child(odd){background-color:#f9f9f9}@media screen and (min-width:782px){.edd-order-overview-summary__items tr:last-child td,.edd-order-overview-summary__items tr:last-child th{border-bottom:1px solid #e5e5e5}}@media screen and (max-width:782px){.edd-order-overview-summary .row-actions>*,.edd-order-overview-summary__items-name .row-actions{display:block!important}.edd-order-overview-summary .row-actions>:not(:first-child):before{display:none}}.edd-order-overview-summary th:not(.column-primary){width:100px}.edd-order-overview-summary .row-actions>:not(:first-child):before{color:#999;content:" | "}.edd-order-overview-summary .row-actions .text{color:#555}.edd-order-overview-summary .removable{display:flex;align-items:center;position:relative}.edd-order-overview-summary .removable .delete{display:inline-block;margin-right:10px;margin-left:-8px;padding:10px;border-right:1px solid #e5e5e5;color:#a00}.edd-order-overview-summary .removable .delete:hover{color:#dc3232}.edd-order-overview-summary__adjustments .column-primary{font-weight:600}.edd-order-overview-summary__adjustments td small{font-weight:400}.edd-order-overview-summary__subtotal .column-primary,.edd-order-overview-summary__tax tr:first-of-type .column-primary,.edd-order-overview-summary__total .column-primary{font-weight:600}.edd-order-overview-summary__adjustments td,.edd-order-overview-summary__subtotal td,.edd-order-overview-summary__tax td,.edd-order-overview-summary__total td{vertical-align:middle}.edd-order-overview-summary__tax td small,.edd-order-overview-summary__total td small{font-weight:400}.edd-order-overview-summary__total .total{color:#017d5c;display:inline-block}.edd-order-overview-summary__total .total.is-negative{color:#a00}@media screen and (min-width:783px){.edd-order-overview-summary__adjustments .removable .delete{margin-left:-50px}.edd-order-overview-summary__total .total{font-size:150%;padding-top:5px;padding-bottom:5px}}.edd-order-overview-summary__total tr:last-child td:not(:first-of-type),.edd-order-overview-summary__total tr:last-child th{border-top:1px solid #e5e5e5}.edd-order-overview-summary__total .notice{margin:-1px}.edd-order-overview-summary__total .notice p{font-weight:400;margin:.5em 0}.edd-order-overview-summary__refunds .column-primary{font-weight:600}.edd-order-overview-summary__refunds td small{font-weight:400}.edd-order-overview-summary__refunds tr:first-child td{border-top:1px solid #e5e5e5}#edd-order-overview-actions.inside{border-top:1px solid #ccd0d4;margin-top:0;display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}#edd-order-overview-actions.inside:empty{padding:0;border-top:0}#edd-order-overview-actions.inside>div{display:flex;align-items:center}#edd-order-overview-actions .edd-order-overview-actions__notice{flex-basis:100%;margin-top:15px}.edd-order-overview-actions .button{width:100%;margin-bottom:12px}.edd-order-overview-actions .button:last-of-type{margin-bottom:0}@media screen and (min-width:782px){.edd-order-overview-actions .button{width:auto;margin-left:12px;margin-bottom:0}.edd-order-overview-actions .button:first-of-type{margin-left:auto}}.edd-order-overview-actions__locked{font-style:italic;opacity:.8}@media screen and (max-width:782px){.edd-order-overview-actions__locked{margin-bottom:12px}}.edd-order-overview-actions__refund .dashicons{margin-right:8px}.edd-dialog .ui-button-icon-only{font-size:0}.download_page_edd-payment-history .ui-dialog,.download_page_edd-payment-history .ui-dialog-content{overflow:visible}.edd-order-overview-modal form>p{margin-top:0}.edd-order-overview-modal fieldset legend,.edd-order-overview-modal form label{display:block;margin-bottom:4px}.edd-order-overview-modal fieldset{margin-bottom:calc(1em - 3px)}.edd-order-overview-modal fieldset>p{margin:2px 0 3px}.edd-order-overview-modal form .submit{margin:0 -16px -16px;padding:16px;background:#fcfcfc;border-top:1px solid #dfdfdf;display:flex;align-items:center}.edd-order-overview-modal form .submit .spinner{margin:0}.edd-order-overview-add-item [for=auto-calculate]{display:flex;align-items:center}.edd-order-overview-add-item [for=auto-calculate] input[type=checkbox]{margin-top:0}.edd-order-overview-add-item [for=auto-calculate] .label{line-height:1.15;margin-left:8px}.edd-order-overview-add-item [for=auto-calculate] .label small{margin-top:4px;display:block;opacity:.75}.edd-order-overview-add-adjustment .notice,.edd-order-overview-add-item .notice{margin:0 0 1rem}.edd-order-overview-add-adjustment #description,.edd-order-overview-add-discount select{width:100%}.edd-order-overview-error{font-style:italic;color:#a00;display:block;margin:4px 0}.edd-order-copy-download-link textarea{width:100%}.edd-order-resend-email-chooser legend{font-weight:700;margin-bottom:4px}.edd-order-resend-email-chooser p{margin:4px 0}.edd-notes .edd-note{padding:10px;background-color:#ffe;border:1px solid #cc0;width:100%;position:relative;margin-bottom:10px;box-sizing:border-box;overflow:hidden}.edd-notes .edd-note.deleting{opacity:.5}.edd-notes .edd-note__header{display:flex;align-items:center}.edd-add-note .spinner{float:none;display:inline-block;margin:0}.edd-notes .edd-note time{font-size:11px;color:#aaa}.edd-notes .edd-note .edd-note-author{margin-right:5px}.edd-notes .edd-note .edd-delete-note{color:#a00;font-weight:700;text-decoration:none;margin-left:auto}.edd-notes .edd-note .edd-delete-note:hover{color:#888}.edd-notes .edd-note p:last-child{margin-bottom:0}.edd-notes .edd-no-notes{margin:4px 0 10px}textarea[name=edd-note]{width:100%;min-height:70px;margin-top:0}.edd-notes-wrapper{width:80%}.edd-note-pagination{float:right;margin:-35px 5px 15px}.edd-note-pagination a,.edd-note-pagination span.page-numbers{padding:5px 8px;margin:2px;text-decoration:none}.edd-note-pagination a{border:1px solid #e5e5e5;background:#fcfcfc}.edd-note-pagination a:last-child,.edd-note-pagination span.page-numbers:last-child{margin-right:0}.post-type-download .tablenav.top .edd-select{margin-right:6px}.wp-list-table.addresses .column-primary strong,.wp-list-table.customers .column-primary strong,.wp-list-table.discounts .column-primary strong,.wp-list-table.emails .column-primary strong,.wp-list-table.orderadjustments .column-primary strong,.wp-list-table.orderitems .column-primary strong,.wp-list-table.orders .column-primary strong{font-size:14px}.wp-list-table.customers .column-primary .avatar,.wp-list-table.emails .column-customer .avatar{float:left;margin-right:10px;margin-top:1px;border-radius:5px}.wp-list-table.orders div.order-list-email{font-size:.85em;color:#888}.wp-list-table.orders th.column-amount{width:100px}.wp-list-table .row-actions span.activate a{color:green}.wp-list-table .row-actions span.refund a{color:#836fff}.wp-list-table .row-actions span.cancel a{color:#cc8c00}.wp-list-table .row-actions span.cancel a:hover,.wp-list-table .row-actions span.refund a:hover{opacity:.8}.wp-list-table .type-download .row-actions{color:#999}.no-js.edit-tags-php.post-type-download .wp-heading-inline{position:absolute;top:0}.no-js.edit-tags-php.post-type-download .nav-tab-wrapper{margin-top:50px}.download_page_edd-customers .wrap .nav-tab-wrapper .page-title-action,.download_page_edd-discounts .wrap .nav-tab-wrapper .page-title-action,.download_page_edd-payment-history .wrap .nav-tab-wrapper .page-title-action,.edit-tags-php.post-type-download .wrap .nav-tab-wrapper .page-title-action{top:3px;margin-left:10px;line-height:24px}#edd-payments-filter ul.subsubsub{margin-bottom:8px}tr.status-refunded td{background:#cecece;border-top-color:#ccc}marquee{padding:0;margin:0}@media handheld,only screen and (max-width:640px){.wp-list-table.downloads th{width:auto!important}}#edd-download-link-textarea{width:100%}.edd_files_name_label{width:225px;float:left}.edd_files_url_label{width:220px;float:left}#postbox-container-1 .edd_files_name_label,#postbox-container-1 .edd_files_url_label{width:80px}#edd_product_files .inside,#edd_product_prices .inside{margin-bottom:0}textarea#edd-payment-note{width:100%;height:4em;margin:0}#edd-order-items .row .edd-purchased-files-list-wrapper .download{line-height:1.4}#edd-order-items .edd-purchased-files-list-wrapper .edd-purchased-option{color:#666}input[class*=edd-price-field]{max-width:125px}#edd-order-download-quantity[type=number].small-text,#edd-order-download-tax[type=text].small-text,[class*=item_] [class*=edd-payment-details-download-][type=number].small-text{height:25px}#edd-order-download-quantity[type=number].small-text,.item_price .edd-payment-details-download-quantity[type=number].small-text{width:55px}#edd-order-download-tax[type=text].small-text,.item_tax .edd-payment-details-download-item-tax[type=number].small-text{width:80%;max-width:125px}#edd_product_notes_field{display:block;margin:12px 0 0;height:4em;width:100%}.edd-metabox-title-action{margin:0;float:right;padding:4px 8px;position:relative;top:-1px;text-decoration:none;border:1px solid #ccc;border-radius:2px;background:#f7f7f7;text-shadow:none;font-weight:600;font-size:10px;line-height:normal;color:#0073aa;cursor:pointer;outline:0}.edd-metabox-title-action:hover{border-color:#008ec2;background:#00a0d2;color:#fff}.edd-edit-purchase-element .tablenav{padding:2px 10px 8px}.edd-edit-purchase-element .edd-order-children-wrapper{margin:0 -1px}.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 table{border-top:none;border-bottom:none}.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 .tablenav{display:none}.edd-edit-purchase-element[class*=columns-] ul li{padding-right:1%}#edd-edit-order-form .column:nth-child(odd),#edd-edit-order-form .columns-4 .column:nth-child(odd),#edd-edit-order-form .columns-5 .column:nth-child(3n+1){margin-right:0}#edd-edit-order-form input.large-text{width:90%}.edd-edit-purchase-element ul li.item_price{width:15%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:25%}.edd-edit-purchase-element ul li.item_tax{width:15%}.edd-edit-purchase-element ul li.price{width:20%}.edd-admin-box-inside{border-bottom:1px solid #f1f1f1;clear:both;padding:12px;margin:0;word-wrap:break-word}.edd-admin-box-inside--row{display:flex;flex-wrap:wrap;word-break:break-all;justify-content:space-between;align-items:center}.edd-admin-box-inside>p{margin:8px 3px}.edd-admin-box-inside .strong{font-weight:600}.edd-admin-box div:not(.edd-admin-box-inside--row) .label{display:block;margin-bottom:4px;margin-right:0}.edd-admin-box .label--has-tip{display:flex;align-items:center}.edd-admin-box .label--has-tip .edd-help-tip{margin-top:0;font-size:20px}.edd-admin-box div:not(.edd-admin-box-inside--row) .label--has-checkbox{margin-bottom:0}.edd-payment-fees .fee-label{color:#666;font-weight:400}.edd-admin-box .right{float:right}#edd-order-refunds-list{padding-left:25px}#poststuff .edd-order-data .inside{margin:0;padding:0}.edd-order-data .edd-select-chosen{width:130px!important}.edd-order-data input.edd_datepicker{width:180px}.edd-order-data input[type=number].edd-payment-time-hour,.edd-order-data input[type=number].edd-payment-time-min{width:50px}.edd-order-data .edd-tax-rate{color:#9c9c9c;font-style:italic;padding:5px}#edd_general_logs p{margin:0;padding:0}.edd-admin-box-inside span.label{margin-right:10px}#edd-order-resend-receipt .inside{margin-top:11px}.edd-order-resend-receipt-header{font-size:14px;line-height:1.4}.edd-admin-box-inside:last-child{border-bottom:0}#edd-edit-order-form .data-payment-key{word-break:break-all}.edd-order-update-box #major-publishing-actions .button-secondary{margin-right:10px}.edd-order-update-box .button-primary{margin-right:0}.edd-edit-purchase-element .edd-select-chosen{width:196px}.edd-edit-purchase-element ul{clear:both;display:block}#edd-customer-details .actions{float:right}.order-data-address h3{margin:0 0 10px}.order-data-address #edd-order-address-country-wrap,.order-data-address #edd-order-address-state-wrap{display:inline-block;width:50%;max-width:300px}.edd-order-data input.small-text{margin:0}.edd-order-data input.med-text{margin:0;width:100px}.edd-edit-purchase-element ul li{display:block;line-height:1.4;position:relative;margin:0;vertical-align:middle;font-size:13px}.edd-edit-purchase-element .row{padding:12px}.edd-edit-purchase-element .row:not(:last-child){border-bottom:1px solid #eee}.edd-edit-purchase-element .row:nth-child(odd):not(.header){background-color:#f9f9f9}.edd-edit-purchase-element .row.header{padding:6px 12px;font-weight:600;vertical-align:top}.edd-edit-purchase-element ul{margin:0 0 15px}.edd-edit-purchase-element ul:last-of-type{margin-bottom:0}#edd-order-data .data span{color:#666;font-weight:600}.edd-edit-purchase-element .inside{padding:12px}.edd-edit-purchase-element .edd-purchased-download-title{font-size:14px;font-weight:500}.edd-edit-purchase-element .edd-purchased-download-title .deleted{color:#777}.edd-edit-purchase-element .edd-purchased-download-actions{color:#777;line-height:1.4}.edd-edit-purchase-element .edd-purchased-download-actions .edd-purchased-download-actions-label{font-weight:500}.edd-edit-purchase-element .edd-purchased-download-actions a{color:#777;font-size:12px}.edd-edit-purchase-element .edd-purchased-download-actions a:hover{color:#444}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download{color:#a00}.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download:hover{color:red}.edd-add-adjustment-to-purchase,.edd-add-download-to-purchase{padding:15px;border-top:1px solid #e5e5e5;background-color:#f5f5f5}.edd-add-adjustment-to-purchase .chosen-container,.edd-add-download-to-purchase .chosen-container{width:90%!important;max-width:220px!important}.edd-add-adjustment-to-purchase .spinner,.edd-add-download-to-purchase .spinner{margin:0;float:none}.edd-add-download-to-purchase .edd-add-order-quantity{width:40px;height:29px;vertical-align:middle}.edd-add-adjustment-to-purchase .edd-add-adjustment-button,.edd-add-adjustment-to-purchase input[type=text],.edd-add-download-to-purchase .edd-add-order-item-button{height:29px}@media screen and (max-width:1284px){.edd-edit-purchase-element .edd-purchased-download-title{font-size:16px}.edd-edit-purchase-element ul li.item_price{width:22%}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax{width:25%}.edd-edit-purchase-element ul li.price{width:20%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:10px}}@media screen and (max-width:1024px){.edd-edit-purchase-element ul li.item_price.item_quantity{width:40%}.edd-edit-purchase-element ul li.price{width:24%}.edd-edit-purchase-element .edd-purchased-download-actions{padding-top:15px}.edd-edit-purchase-element .edd-purchased-download-actions,.edd-edit-purchase-element .edd-purchased-download-actions a{font-size:14px}}@media screen and (max-width:782px){.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity{padding-bottom:10px}.edd-edit-purchase-element ul li.item_price.item_quantity{width:35%}.edd-edit-purchase-element ul li.item_tax,.edd-edit-purchase-element ul li.price{width:20%;padding-bottom:10px}.edd-payment-details-download-amount,.edd-price-currency{font-size:16px}.order-data-column input[type=email]{padding:6px 10px}.edd-refund-submit-line-total td:last-of-type{flex:0 0 120px}#edd-item-tables-wrapper .addresses tbody tr{display:-ms-grid;display:grid}#edd-item-tables-wrapper .addresses tbody td:not(.no-items){padding-left:35%}}@media screen and (max-width:600px){.edd-edit-purchase-element ul li.item_price,.edd-edit-purchase-element ul li.item_price.item_quantity,.edd-edit-purchase-element ul li.item_tax{width:100%;padding-bottom:20px}.edd-edit-purchase-element .edd-add-download-to-purchase ul li.item_tax,.edd-edit-purchase-element ul li.price{width:100%;padding-bottom:0}.edd-edit-purchase-element .edd-add-download-to-purchase-actions{padding-top:15px}}#edd_product_stats .label{display:inline-block}#edd_product_stats .product-earnings-stats:before,#edd_product_stats .product-sales-stats:before{color:#82878c;font:normal 20px/1 dashicons;display:inline-block;padding:0 2px 0 0;position:relative;top:0;left:-1px;speak:none;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#edd_product_stats .product-sales-stats:before{content:""}#edd_product_stats .product-earnings-stats:before{content:""}body.download_page_edd-reports{overflow-y:scroll}.edd-chip{font-size:10px;font-weight:700;text-transform:uppercase;line-height:1;padding:3px;border-radius:3px;color:#fff;background-color:#444}.edd-reports-wrapper .postbox h2,.edd-reports-wrapper .postbox h3{font-size:1.3em}#edd-dashboard-widgets-wrap .metabox-holder{padding-top:0}.edd-reports-wrapper .postbox .edd-select{max-width:200px;vertical-align:baseline;margin-right:4px;margin-bottom:16px}.download_page_edd-reports #edd-item-wrapper{margin:0}#edd-dashboard-widgets-wrap .postbox h2,#edd-dashboard-widgets-wrap .postbox h3{cursor:default}.edd-date-range-options .edd_datepicker{width:105px}.edd-report-wrap{clear:both}.edd-report-wrap h3{clear:both;margin:0 0 20px}.edd-reports-chart,.edd-reports-table{margin-bottom:20px}.edd-admin--has-grid{display:grid;display:-ms-grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));grid-gap:20px}.edd-admin--has-grid .postbox{margin-bottom:0}.edd-admin--has-grid .edd-from-to-wrapper{display:flex;margin-bottom:16px;width:100%}.edd-admin--has-grid .edd-from-to-wrapper input{width:100%}.edd-admin--has-grid .edd-from-to-wrapper span{flex-grow:1}.edd-admin--has-grid form{display:flex;flex-direction:column;flex-wrap:wrap;position:relative}fieldset.edd-to-and-from-container{display:flex;gap:8px}fieldset.edd-to-and-from-container select{flex:0 0 calc(50% - 6px)}span.edd-to-and-from--separator{line-height:normal;-ms-grid-row-align:center;align-self:center;margin-bottom:16px}.edd-admin--has-grid .postbox .edd-select{max-width:100%;margin-right:0}.edd-admin--has-grid .button.updated-message:before,.edd-admin--has-grid .button.updating-message:before{vertical-align:text-bottom;margin:0 5px 0 0}.edd-import-export-form .edd-progress{background:#ddd;border-radius:15px;height:15px;flex-basis:100%}.edd-import-export-form .edd-progress div{background:#ccc;border-radius:15px;height:100%;width:0}.edd-import-export-form .notice-wrap{background-color:#f4f4f4;border-color:#eae9e9;border-style:solid;border-width:1px 0;padding:12px;overflow:auto;margin:20px -12px -23px;position:relative;width:100%;display:flex;justify-content:space-between;align-items:center}.notice-wrap div.notice{margin:0}h3+.notice-wrap .notice{margin-bottom:1em}.admin-color-fresh .edd-import-export-form .edd-progress div{background:#0073aa}.admin-color-light .edd-import-export-form .edd-progress div{background:#888}.admin-color-blue .edd-import-export-form .edd-progress div{background:#096484}.admin-color-coffee .edd-import-export-form .edd-progress div{background:#c7a589}.admin-color-ectoplasm .edd-import-export-form .edd-progress div{background:#a3b745}.admin-color-midnight .edd-import-export-form .edd-progress div{background:#e14d43}.admin-color-sunrise .edd-import-export-form .edd-progress div{background:#dd823b}.graph-option-section{float:left}.edd-report-filters-title span{display:block;padding:20px}#edd-graphs-filter form{padding:20px}#edd-graphs-filter label{vertical-align:inherit}#edd-graphs-filter .graph-option-section{display:inline-block;line-height:2em;margin:0 5px 0 0;padding:0}.download_page_edd-reports .section-content #post-body-content{float:none}.download_page_edd-reports .section-content select[name=range]{display:none}.edd-mix-totals{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.edd-mix-chart{display:inline-block;width:49%;vertical-align:top}.edd-graph-notes{color:#9c9c9c}.edd-graph-notes span{display:block}.edd-pie-graph .legend{display:none}.edd-pie-legend{overflow:auto;margin-top:10px}.edd-legend-item-wrapper{color:#333;display:inline-block;font-size:8pt;padding:2px 5px 0;width:48%;height:20px}.edd-legend-color{border:1px solid #cfcfcf;display:inline-block;margin-right:5px;width:20px;height:15px}.edd-pie-legend-item{display:inline-block;vertical-align:top;width:80%}#edd-reports-tiles-wrap .metabox-holder{padding:0}#edd-reports-tiles-wrap #dashboard-widgets{overflow:auto}#edd-reports-tiles-wrap #dashboard-widgets .postbox-container{width:33.3%}.download_page_edd-reports .section-content .tablenav.top{display:none}#edd_tax_rates{margin:1em 0 0}[id*=edd-recapture-].button{font-size:16px;height:auto;padding:8px 14px;margin:6px 0 0}[id*=edd-recapture-].button .dashicons{line-height:29px;margin-right:8px}[id*=edd-recapture-].button .edd-loading,[id*=edd-recapture-].button .edd-loading:after{border-radius:50%;display:inline-block;width:14px;height:14px}[id*=edd-recapture-].button .edd-loading{position:relative;top:3px;margin-left:4px;box-shadow:0 0 2px rgba(0,0,0,.2);animation:edd-spinning 1.1s linear infinite;border:2px solid hsla(0,0%,100%,.5);border-left-color:#fff;font-size:14px;filter:alpha(opacity=0);transform:translateZ(0)}#edd-recapture-disconnect.button .edd-loading.dark{border-color:rgba(0,0,0,.2) rgba(0,0,0,.2) rgba(0,0,0,.2) #666;box-shadow:none}.recapture-notice{position:relative}@keyframes edd-spinning{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}#edd-send-test-summary-save-changes-notice .notice p{font-size:13px}#edd-send-test-summary-notice,#edd-send-test-summary-save-changes-notice{display:flex;margin-top:5px}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.wp-list-table.apikeys input.code{width:100%;font-size:10px;cursor:text;background:#fff;border:1px solid #ddd;box-shadow:none;color:#555}.download_page_edd-tools .tablenav .actions{overflow:visible}.edd_user_search_wrap{position:relative;overflow:visible}.edd_user_search_wrap .spinner{position:absolute;margin:0;padding:0;right:4px;top:-2px}.edd_user_search_wrap.loading .spinner{visibility:visible}.edd_user_search_results{position:absolute;left:0;top:20px}.edd_user_search_results a.edd-ajax-user-cancel{position:absolute;right:6px;top:2px}.edd_user_search_results ul{background:#fafafa;border:1px solid #dfdfdf;overflow-y:scroll;padding:0;margin:0;height:150px;width:185px;box-shadow:0 3px 5px rgba(0,0,0,.1)}.edd_user_search_results li{margin:0}.edd_user_search_results li a{display:block;text-decoration:none;padding:6px 10px}.edd_user_search_results li a:hover{background:#f5f5f5}.edd_user_search_results li.no-users{text-align:center;vertical-align:middle;display:block;line-height:150px;color:#bbb;text-transform:uppercase;font-size:11px}@media screen and (max-width:1100px){.edd-mix-chart{display:block;width:100%}}@media screen and (max-width:782px){.license-expiration-date-notice,.license-lifetime-notice,.license-null{padding-left:0}}@media screen and (max-width:600px){#edd-edit-order-form input.large-text{width:100%}}#edd-item-wrapper{background:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);position:relative;margin-top:15px;display:flex}#edd-item-wrapper.full-width{max-width:100%}#edd-item-wrapper:after{content:"";display:block;clear:both;visibility:hidden;font-size:0;height:0}.edd-sections-wrap{clear:both;width:100%}.edd-sections-wrap .section-wrap{background-color:#fff;display:inline-block;z-index:2}.js .edd-sections-wrap .edd-vertical-sections:not(.meta-box) .section-wrap>div{min-height:500px;height:100%}.edd-sections-wrap .section-wrap .customer-section:not(:last-child){border-bottom:1px solid #eee}.edd-sections-wrap .section-wrap .customer-section table{margin-bottom:20px}.edd-sections-wrap .section-wrap{border-left:1px solid #e5e5e5}.edd-sections-wrap .section-wrap .section-content>*{padding:20px}.edd-sections-wrap .section-wrap .section-content h2{margin:0;padding-bottom:0}.edd-sections-wrap .section-wrap .avatar-wrap{float:left;padding-right:10px;text-align:center}.edd-sections-wrap .section-wrap img.avatar{border-radius:5px}.edd-sections-wrap .section-wrap .customer-id{position:absolute;right:0;top:0;padding:10px;background-color:#fafafa;border-bottom-left-radius:20%;border:1px solid #eee;border-top:none;border-right:none;font-family:monospace;font-size:18px;font-weight:600}.edd-item-info.customer-info input[type=password],.edd-item-info.customer-info input[type=text],.edd-item-info.customer-info select{width:200px;height:auto;box-shadow:none;transition:none;border:1px solid #ddd;margin:-5px 0 4px -2px;font-size:13px;padding:2px 4px}.edd-sections-wrap .section-wrap .customer-main-wrapper{float:left}.edd-sections-wrap .section-wrap .customer-main-wrapper input[name="customerinfo[name]"]{font-size:24px}.edd-sections-wrap .section-wrap .customer-address-wrapper{float:right;margin-top:-3px;margin-right:50px;width:202px}.edd-sections-wrap .section-wrap .info-wrapper{min-height:125px;overflow:visible}.edd-sections-wrap .section-wrap .customer-address span[data-key=address2],.edd-sections-wrap .section-wrap .customer-address span[data-key=address],.edd-sections-wrap .section-wrap .customer-address span[data-key=country]{display:block}.edd-sections-wrap .section-wrap a.delete{color:red;margin-right:5px;text-decoration:none}.customer-info{min-height:185px}.customer-info .customer-name{font-size:24px;font-weight:600}.customer-info .customer-name.editable{margin-bottom:6px}.customer-edit-link a{font-weight:400;text-decoration:none}.disconnect-user a{color:#aaa;font-size:20px}#customer-edit-actions{padding:3px;line-height:28px;text-align:center}#customer-edit-actions .button-secondary{margin-right:5px}#customer-edit-actions .cancel{padding:5px}.edd-sections-wrap .section-wrap .row-title{width:30%}.edd-sections-wrap .section-wrap .editable{display:block;padding:3px}.edd-sections-wrap .section-wrap div.edit-item{margin-left:-4px;margin-top:-20px}.edd-sections-wrap .section-wrap .customer-address.edit-item{margin-top:3px}.edd-sections-wrap .section-wrap span.edit-item{display:none}.edd-sections-wrap .section-wrap .edit-item input{font-size:13px}.edd-sections-wrap .section-wrap .customer-name.edit-item input{margin-top:-5px}.edd-sections-wrap .section-wrap .edd_user_search_results{left:-2px;top:18px}.edd-sections-wrap .section-wrap .edd_user_search_results ul{width:198px}#edd-item-stats-wrapper{margin:0 auto;text-align:center}#edd-item-stats-wrapper ul{display:flex;margin:0}#edd-item-stats-wrapper li{font-size:14px;margin-bottom:0;width:50%}#edd-item-stats-wrapper a{text-decoration:none}#edd-item-stats-wrapper .dashicons{color:#888;margin-top:-2px}#edd-item-tables-wrapper table{width:100%}#edd-item-tables-wrapper .no-items{text-align:left}#edd-item-tables-wrapper .emails .add-customer-email-row{background-color:#f4f4f4;border-top:1px solid #e5e5e5}#edd-item-tables-wrapper .add-customer-email-wrapper{display:flex;flex-wrap:wrap;align-items:center;margin:12px 0}#edd-item-tables-wrapper .edd-form-group{margin-bottom:0}#edd-item-tables-wrapper .edd-make-email-primary{flex-grow:1;margin-left:12px}#edd-item-tables-wrapper .emails .spinner{float:none;margin:0 10px;-ms-grid-row-align:center;align-self:center}#edd-item-tables-wrapper .notice-error{background-color:#fff5f5}#edd-item-notes-wrapper{min-height:50px}.customer-note-input{margin-bottom:5px;width:100%}.customer-note-wrapper{border-bottom:1px solid #f9f9f9;min-height:38px;padding:7px 0 7px 7px}.customer-note-wrapper span{display:block}.note-content-wrap{padding-top:7px}.edd-sections-wrap .section-wrap .notice-container{padding-left:20px;padding-right:20px;margin-left:-20px;margin-right:-20px}@media screen and (max-width:810px)and (min-width:656px){.customer-info .customer-name{font-size:16px}.edd-sections-wrap .section-wrap .widefat td,.widefat th{max-width:100%!important;display:table-cell}}@media screen and (max-width:781px){#edd-item-tab-wrapper,.edd-sections-wrap .section-wrap{margin:0;width:100%}#edd-item-tab-wrapper-list .dashicons{font-size:18px}.edd-item-has-tabs .edd-sections-wrap .section-wrap{border-top:1px solid #e5e5e5;border-left:0;margin-top:-1px}}@media screen and (max-width:656px){.edd-item-info.customer-info{position:relative}.edd-sections-wrap .section-wrap .customer-address-wrapper{float:none;position:absolute;top:84px;left:165px;max-width:200px}.edd-sections-wrap .section-wrap .customer-main-wrapper{float:none;position:absolute;left:165px}.customer-info .customer-name{font-size:16px}.edd-sections-wrap .section-wrap #edd-item-stats-wrapper{padding-left:0;padding-right:0}.edd-sections-wrap .section-wrap .customer-section{margin-bottom:0}.edd-sections-wrap .section-wrap .widefat td.column-primary,.edd-sections-wrap .section-wrap .widefat td.no-items,.edd-sections-wrap .section-wrap .widefat th.column-primary{width:100px!important;display:table-cell;overflow:hidden;text-align:left}.edd-sections-wrap .section-wrap .customer-id{display:none}#edd-item-tables-wrapper .emails td.column-primary{padding-right:10px;width:100%!important}#edd-item-tables-wrapper .edd-form-group{margin:0 0 16px}}@media screen and (max-width:480px){#edd-item-tab-wrapper-list li{width:50%}#edd-item-tab-wrapper-list li:nth-child(3n+3){border-width:0 1px 1px 0}#edd-item-tab-wrapper-list li:nth-child(2n){border-width:0 0 1px}.download_page_edd-reports .button{text-align:center}#edd-payment-date-filters span{display:block}#edd-payment-date-filters span>input{float:right}#edd-add-discount select[multiple] option,#edd-edit-discount select[multiple] option{height:20px}.download_page_edd-reports .inside .button,.download_page_edd-reports .inside input[type=submit],.download_page_edd-reports .inside input[type=text],.download_page_edd-reports .inside select,.download_page_edd-settings .inside input[type=button],.download_page_edd-tools .inside input[type=submit],.download_page_edd-tools .inside input[type=text],.download_page_edd-tools .inside select{width:100%}#edd-add-discount select[multiple],#edd-edit-discount select[multiple],.download_page_edd-tools select[multiple]{height:200px!important}.download_page_edd-settings input[type=checkbox]{margin:2px 0}.post-type-download input[type=checkbox]{margin-left:2px}}.inside .edd-tools-textarea{background:#32373c;color:rgba(240,245,250,.7);font-size:12px;font-family:Menlo,Monaco,monospace;display:block;overflow:auto;white-space:pre;width:100%;height:450px;padding:10px;outline:none}#system-info-textarea::selection{background:#555;color:#fff}#edd-system-info .edd-inline-button{margin-left:5px}.recount-stats-controls form{display:inline}.edd-recount-stats-descriptions span{display:none;line-height:24px}.edd-vertical-sections{overflow:visible;display:block;display:flex}#edd-item-tab-wrapper,.edd-vertical-sections .section-nav{position:relative;width:20%;line-height:1em;margin:0 -1px 0 0;padding:0;background-color:#f5f5f5;border-right:1px solid #e5e5e5;box-sizing:border-box;max-width:200px}#edd-item-tab-wrapper-list{margin:0}#edd-item-tab-wrapper li,.edd-vertical-sections .section-nav li{display:block;position:relative;margin:0;padding:0;background-color:#fcfcfc}.edd-vertical-sections .section-title:last-of-type{margin-bottom:24px}#edd-item-tab-wrapper li>.edd-item-tab-label-wrap,#edd-item-tab-wrapper li a,.edd-vertical-sections .section-nav li a{display:flex;margin:0;padding:9px;text-decoration:none;border-bottom:1px solid #e5e5e5;box-shadow:none;position:relative;align-items:center}#edd-item-tab-wrapper li a:focus,#edd-item-tab-wrapper li a:hover,.edd-vertical-sections .section-nav li a:focus,.edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0;outline:0;transition:all .25s}.edd-vertical-sections .section-nav .section-title--is-active a:after{content:"";width:1px;height:100%;background:#fff;position:absolute;right:0;top:0;bottom:0;z-index:3}#edd-item-tab-wrapper li>.edd-item-tab-label-wrap{background-color:#fff}.edd-vertical-sections .section-nav li a>.dashicons,.edd-vertical-sections .section-nav li a>span{display:inline-block}.edd-vertical-sections .section-nav li a>span{max-width:76%}.edd-vertical-sections .section-nav li a .dashicons{line-height:20px;margin-right:3px;color:#888}.edd-vertical-sections .section-nav .section-title--is-active a{font-weight:700;color:#555;background-color:#fff;border-right:none;margin-right:-1px}.edd-vertical-sections.use-js .section-content,.no-js .edd-vertical-sections.use-js.edd-item-header-small,.no-js .edd-vertical-sections.use-js .section-nav{display:none}.no-js .edd-vertical-sections.use-js .section-content{display:block}.admin-color-fresh .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-fresh .edd-vertical-sections .section-nav li a:focus,.admin-color-fresh .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #0073aa}.admin-color-blue .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-blue .edd-vertical-sections .section-nav li a:focus,.admin-color-blue .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #096484}.admin-color-coffee .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-coffee .edd-vertical-sections .section-nav li a:focus,.admin-color-coffee .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #c7a589}.admin-color-ectoplasm .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:focus,.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #a3b745}.admin-color-midnight .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-midnight .edd-vertical-sections .section-nav li a:focus,.admin-color-midnight .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #e14d43}.admin-color-ocean .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-ocean .edd-vertical-sections .section-nav li a:focus,.admin-color-ocean .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #627c83}.admin-color-sunrise .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-sunrise .edd-vertical-sections .section-nav li a:focus,.admin-color-sunrise .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #be3631}.admin-color-light .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-light .edd-vertical-sections .section-nav li a:focus,.admin-color-light .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #888}.admin-color-evergreen .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-evergreen .edd-vertical-sections .section-nav li a:focus,.admin-color-evergreen .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #36533f}.admin-color-mint .edd-vertical-sections .section-nav .section-title--is-active a,.admin-color-mint .edd-vertical-sections .section-nav li a:focus,.admin-color-mint .edd-vertical-sections .section-nav li a:hover{box-shadow:inset 5px 0 #4f6d59}.edd-vertical-sections .section-nav .section-title--is-active .dashicons{color:#555}@media only screen and (max-width:782px){#edd-item-tab-wrapper,.edd-vertical-sections .section-nav{width:48px}.edd-vertical-sections .section-nav li a{justify-content:center}.edd-vertical-sections .section-nav li a .dashicons{width:24px;height:24px;font-size:24px;line-height:24px;margin:0}.section-nav li .dashicons:before{width:24px;height:24px}#edd-item-tab-wrapper .edd-item-tab-label,.section-nav li .label{overflow:hidden;position:absolute;top:-1000em;left:-1000em;width:1px;height:1px}}#edd-item-card-wrapper,.edd-vertical-sections .section-wrap{width:80%}#edd-item-card-wrapper .item-section{background:#fff;overflow:hidden;box-sizing:border-box}:not(#edd-item-tab-wrapper)+#edd-item-card-wrapper .item-section{margin:25px 0;padding:20px;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}#edd-item-tab-wrapper+#edd-item-card-wrapper{padding:20px;border-left:1px solid #e5e5e5;box-sizing:border-box}@media only screen and (min-width:1200px){#edd-graphs-filter,#edd-item-card-wrapper,.edd-vertical-sections:not(.meta-box) .section-wrap{width:calc(100% - 200px)}}@media only screen and (max-width:782px){#edd-graphs-filter,#edd-item-card-wrapper,.edd-vertical-sections .section-wrap{width:calc(100% - 48px)}}#edd-debug-log .edd-inline-button{margin-left:5px}.edd-settings-sidebar{padding-top:27px}.edd-settings-sidebar-content{background-color:#fff;text-align:center;border:1px solid #ddd;box-sizing:border-box;max-width:300px}.edd-settings-sidebar-content p{font-size:14px;line-height:1.5;margin-top:0}.edd-sidebar-header-section{background-color:#35495c;line-height:1;padding:26px 20px 24px;border-bottom:3px dashed #fafafa}.edd-sidebar-description-section{background-color:#fafafa;padding:16px 20px;border-bottom:1px solid #ddd}.edd-sidebar-description-section .edd-sidebar-description{margin:0}.edd-sidebar-coupon-section{font-size:14px;padding:16px 20px}.edd-sidebar-coupon-section label{display:block;line-height:1.4;margin-bottom:6px}.edd-sidebar-coupon-section label strong{color:#253b51;font-weight:700}.edd-sidebar-coupon-section input{background:#f4f7fa;font-size:22px;font-weight:600;text-align:center;padding:10px;border:2px dashed #2794da;border-radius:4px;margin-bottom:16px;box-shadow:none;width:100%}.edd-sidebar-coupon-section input:focus{border:2px dashed #2794da;box-shadow:none}.edd-settings-sidebar-content .edd-coupon-note{color:#6c7883;font-size:13px;font-style:italic;margin:0}.edd-settings-sidebar-content .edd-coupon-note a{color:#253b51}.edd-settings-sidebar-content .edd-coupon-note a:hover{text-decoration:none}.edd-sidebar-footer-section{background-color:#fafafa;padding:16px 20px;border-top:1px solid #ddd}.edd-sidebar-footer-section .edd-cta-button{display:block;background-color:#2794da;color:#fff;text-decoration:none;font-size:20px;font-weight:700;text-transform:uppercase;padding:17px 10px;border:none;border-radius:4px;width:100%;box-sizing:border-box;box-shadow:none;transition:background-color .2s}.edd-sidebar-footer-section .edd-cta-button:hover{background-color:#2386c5}@media (min-width:1080px){.edd-has-sidebar .edd-settings-content{float:left;width:67%}.edd-has-sidebar .edd-settings-sidebar{float:right;width:31%}}@media (min-width:1240px){.edd-has-sidebar .edd-settings-content{width:74%}.edd-has-sidebar .edd-settings-sidebar{width:23%}}.taxes-tab .edd-has-sidebar .edd-settings-content,.taxes-tab .edd-has-sidebar .edd-settings-sidebar{float:none;width:100%}.bfcm-promo-img-container{background-color:#35495c;width:100%;height:160px}.bfcm-code{color:#2794da;font-weight:700}.sale-ends{position:absolute;bottom:9px;right:14px;display:inline-block;color:#6c7883;font-size:12px;text-align:right;font-style:italic;width:150px} \ No newline at end of file diff --git a/assets/css/edd-admin.min.css.map b/assets/css/edd-admin.min.css.map new file mode 100644 index 00000000000..882848f0389 --- /dev/null +++ b/assets/css/edd-admin.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///style.scss"],"names":[],"mappings":"AAAA;;;;;;;EAOE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;;;EAKE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;EACE,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,qBAAqB;EACrB,sBAAsB;EACtB,WAAW,EAAE;;AAEf;EACE,cAAc;EACd,iBAAiB;EACjB,iDAAiD,EAAE;EACnD;IACE,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,iBAAiB,EAAE;EACrB;IACE,aAAa;IACb,SAAS;IACT,kBAAkB,EAAE;EACtB;IACE,mBAAmB,EAAE;;AAEzB;EACE,WAAW,EAAE;EACb;IACE,WAAW,EAAE;;AAEjB;EACE,oBAAoB;EACpB,qBAAqB,EAAE;;AAEzB;EACE,aAAa;EACb,eAAe;EACf,SAAS,EAAE;EACX;IACE,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB,EAAE;IAC3B;MACE,gBAAgB,EAAE;;AAExB;EACE,cAAc,EAAE;;AAElB;EACE,YAAY,EAAE;;AAEhB;EACE,sCAAsC;EACtC,cAAc,EAAE;;AAElB;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ,EAAE;EACV;IACE,SAAS,EAAE;;AAEf;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;;;EAKE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;EACE,aAAa;EACb,SAAS;EACT,aAAa;EACb,8BAA8B;EAC9B,eAAe;EACf,QAAQ,EAAE;EACV;IACE,aAAa;IACb,mBAAmB;IACnB,eAAe;IACf,QAAQ;IACR,WAAW;IACX,YAAY,EAAE;IACd;MACE,qBAAqB;MACrB,cAAc,EAAE;EACpB;IACE,cAAc,EAAE;EAClB;;IAEE,gBAAgB,EAAE;EACpB;;IAEE,gBAAgB,EAAE;EACpB;IACE,SAAS,EAAE;EACb;IACE;MACE,aAAa,EAAE,EAAE;;AAEvB;EACE,kBAAkB,EAAE;EACpB;IACE,WAAW;IACX,kBAAkB;IAClB,SAAS;IACT,QAAQ;IACR,yBAAyB;IACzB,UAAU;IACV,gBAAgB;IAChB,wCAAwC;IACxC,gBAAgB;IAChB,UAAU;IACV,kBAAkB,EAAE;EACtB;IACE,cAAc;IACd,uBAAuB;IACvB,cAAc,EAAE;IAChB;MACE,gCAAgC,EAAE;IACpC;MACE,mBAAmB,EAAE;IACvB;;;;MAIE,cAAc;MACd,kBAAkB,EAAE;EACxB;IACE,mBAAmB,EAAE;EACvB;IACE,mBAAmB;IACnB,qBAAqB;IACrB,mDAAmD;IAEnD,0BAA0B,EAAE;EAC9B;IACE,mBAAmB;IACnB,UAAU;IAIV,gCAAgC,EAAE;;AAEtC;EACE,mBAAmB;EACnB,gBAAgB,EAAE;EAClB;IACE;MACE,MAAM,EAAE,EAAE;;AAEhB;EACE,iBAAiB;EACjB,gBAAgB,EAAE;;AAEpB;EACE,iBAAiB,EAAE;EACnB;IACE,qBAAqB,EAAE;IACvB;MACE,qBAAqB;MACrB,mCAAmC;MACnC,kCAAkC;MAClC,mBAAmB;MACnB,iBAAiB;MACjB,UAAU,EAAE;IACd;MACE,gBAAgB;MAChB,cAAc;MACd,kBAAkB,EAAE;IACtB;MACE,gBAAgB,EAAE;;AAExB;EACE,kBAAkB;EAClB,gBAAgB,EAAE;EAClB;IACE,sBAAsB;IACtB,gBAAgB;IAChB,sBAAsB;IACtB,WAAW;IACX,mBAAmB;IACnB,WAAW,EAAE;EACf;IACE,gBAAgB;IAChB,yBAAyB;IACzB,kBAAkB,EAAE;EACtB;IACE,cAAc;IACd,mBAAmB,EAAE;IACrB;MACE,gBAAgB;MAChB,yBAAyB,EAAE;;AAEjC;;EAEE,wBAAwB,EAAE;;AAE5B;;;;;;EAME,WAAW,EAAE;;AAEf;EACE,aAAa;EACb,mBAAmB,EAAE;EACrB;IACE,6BAA6B;IAC7B,SAAS;IACT,wBAAwB;IACxB,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,WAAW,EAAE;IACb;MACE,mBAAmB,EAAE;IACvB;MACE,8DAA8D;MAC9D,yDAAyD,EAAE;EAC/D;IACE,gBAAgB,EAAE;;AAEtB;EACE,iCAAiC,EAAE;EACnC;IACE,iBAAiB,EAAE;;AAEvB;EACE,qBAAqB;EACrB,iBAAiB;EACjB,gBAAgB;EAChB,WAAW,EAAE;;AAEf;EACE,6BAA6B,EAAE;;AAEjC;EACE;IACE,mBAAmB,EAAE;EACvB;IACE,mBAAmB;IACnB,YAAY,EAAE,EAAE;;AAEpB;EACE,gBAAgB,EAAE;;AAEpB;;EAEE,aAAa,EAAE;;AAEjB;;;;EAIE;AACF;EACE,aAAa,EAAE;;AAEjB;EACE,WAAW;EACX,cAAc;EACd,WAAW,EAAE;;AAEf;;EAEE,qBAAqB,EAAE;;AAEzB;;;EAGE;AACF;;EAEE,WAAW,EAAE;;AAEf;;EAEE,WAAW,EAAE;;AAEf;gEACgE;AAChE;EACE,YAAY,EAAE;;AAEhB;EACE,YAAY;EACZ,SAAS;EACT,kBAAkB;EAClB,UAAU,EAAE;;AAEd;;EAEE,0BAA0B;EAC1B,6BAA6B,EAAE;;AAEjC;;EAEE,iBAAiB;EACjB,yBAAyB;EACzB,4BAA4B,EAAE;;AAEhC;EACE,UAAU;EACV,kBAAkB,EAAE;;AAEtB;EACE,oBAAoB;EACpB,WAAW;EACX,6BAA6B;EAC7B,yCAAyC,EAAE;;AAE7C;EACE,aAAa;EACb,cAAc,EAAE;;AAElB;EACE,6BAA6B;EAC7B,mBAAmB,EAAE;;AAEvB;EACE,4BAA4B,EAAE;;AAEhC,SAAS;AACT;EACE,4BAA4B,EAAE;;AAEhC,WAAW;AACX;EACE,4BAA4B,EAAE;;AAEhC,cAAc;AACd;EACE,4BAA4B,EAAE;;AAEhC,aAAa;AACb;EACE,4BAA4B,EAAE;;AAEhC,UAAU;AACV;EACE,4BAA4B,EAAE;;AAEhC,YAAY;AACZ;EACE,4BAA4B,EAAE;;AAEhC,UAAU;AACV;EACE,yBAAyB,EAAE;;AAE7B,0BAA0B;AAC1B,cAAc;AACd;EACE,4BAA4B,EAAE;;AAEhC,SAAS;AACT;EACE,4BAA4B,EAAE;;AAEhC;EACE,WAAW,EAAE;;AAEf;EACE,oBAAoB;EACpB,qBAAqB;EACrB,uBAAuB,EAAE;;AAE3B;;EAEE,gBAAgB;EAChB,gBAAgB;EAChB,cAAc,EAAE;;AAElB;EACE,SAAS;EACT,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,YAAY;EACZ,YAAY,EAAE;;AAEhB;EACE,sBAAsB,EAAE;;AAE1B;EACE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,UAAU;EACV,QAAQ;EACR,WAAW;EACX,sBAAsB;EACtB,eAAe;EACf,gBAAgB;EAChB,YAAY,EAAE;;AAEhB;EACE,cAAc;EACd,YAAY;EACZ,UAAU;EACV,SAAS,EAAE;;AAEb;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,iBAAiB,EAAE;;AAErB,aAAa;AACb;EACE,YAAY;EACZ,gBAAgB;EAChB,eAAe;EACf,WAAW,EAAE;;AAEf;EACE,kBAAkB;EAClB,2BAA2B;EAC3B,4BAA4B;EAC5B,6BAA6B;EAC7B,+DAA+D;EAC/D,yBAAyB;EACzB,2BAA2B;EAC3B,uBAAuB;EACvB,kCAAkC;EAClC,4BAA4B;EAC5B,wBAAwB,EAAE;;AAE5B;gEACgE;AAChE;EACE,eAAe,EAAE;;AAEnB;EACE,eAAe,EAAE;;AAEnB;EACE,SAAS;EACT,qBAAqB,EAAE;;AAEzB;EACE,iBAAiB;EACjB,WAAW;EACX,qBAAqB;EACrB,sBAAsB,EAAE;;AAE1B;EACE,sBAAsB,EAAE;;AAE1B;gEACgE;AAChE;;EAEE,iBAAiB,EAAE;;AAErB;EACE,kBAAkB;EAClB,mBAAmB;EACnB,SAAS,EAAE;;AAEb;EACE,WAAW,EAAE;;AAEf;gEACgE;AAChE;EACE,iBAAiB,EAAE;;AAErB;EACE,eAAe,EAAE;;AAEnB;EACE,WAAW;EACX,iBAAiB,EAAE;;AAErB;EACE,sBAAsB;EACtB,UAAU;EACV,WAAW,EAAE;;AAEf;EACE,gBAAgB;EAChB,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,+BAA+B;EAC/B,eAAe,EAAE;;AAEnB;EACE,sBAAsB;EACtB,UAAU;EACV,sBAAsB;EACtB,UAAU,EAAE;;AAEd;EACE,eAAe;EACf,eAAe,EAAE;;AAEnB;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU,EAAE;;AAEd;EACE,WAAW;EACX,WAAW,EAAE;;AAEf;EACE,aAAa,EAAE;;AAEjB;EACE,yBAAyB;EACzB,qBAAqB;EACrB,WAAW;EACX,wCAAwC,EAAE;;AAE5C;EACE,WAAW,EAAE;;AAEf,mDAAmD;AACnD;EACE,mBAAmB;EACnB,qCAAqC;EACrC,2BAA2B;EAC3B,WAAW;EACX,qBAAqB;EACrB,yFAAyF,EAAE;;AAE7F;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB,EAAE;;AAE1B;gEACgE;AAChE;EACE,gBAAgB,EAAE;;AAEpB;EACE,YAAY,EAAE;;AAEhB;EACE,mCAAmC;EACnC,aAAa;EACb,SAAS;EACT,qCAAqC,EAAE;;AAEzC;EACE,eAAe;EACf,gBAAgB;EAChB,iBAAiB,EAAE;;AAErB;EACE,UAAU;EACV,QAAQ,EAAE;;AAEZ;EACE,WAAW,EAAE;;AAEf;EACE,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,yBAAyB,EAAE;;AAE7B;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,UAAU;EACV,mBAAmB;EACnB,iBAAiB,EAAE;;AAErB;EACE,yBAAyB;EACzB,aAAa;EACb,0BAA0B,EAAE;;AAE9B;gEACgE;AAChE;EACE,eAAe,EAAE;;AAEnB;EACE,gBAAgB,EAAE;;AAEpB;gEACgE;AAChE,4DAA4D;AAC5D;EACE,cAAc;EACd,YAAY;EACZ,gCAAgC;EAChC,WAAW;EACX,wBAAwB;EACxB,gBAAgB;EAChB,SAAS;EACT,kBAAkB;EAClB,kBAAkB,EAAE;;AAEtB;EACE;IACE,iBAAiB;IACjB,SAAS,EAAE,EAAE;;AAEjB;EACE,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;EACb,eAAe;EACf,8BAA8B;EAC9B,mBAAmB;EACnB,kBAAkB;EAClB,eAAe;EACf,sBAAsB;EACtB,kBAAkB;EAClB,mBAAmB,EAAE;;AAEvB;EACE;IACE,kBAAkB;IAClB,mBAAmB,EAAE,EAAE;;AAE3B;EACE;IACE,iBAAiB,EAAE,EAAE;;AAEzB;EACE,QAAQ,EAAE;;AAEZ;EACE,QAAQ,EAAE;;AAEZ;;;EAGE,aAAa;EACb,mBAAmB,EAAE;;AAEvB;EACE,iBAAiB,EAAE;;AAErB;EACE,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,eAAe,EAAE;;AAEnB;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B,EAAE;;AAElC;EACE,mBAAmB,EAAE;;AAEvB;EACE,sBAAsB,EAAE;;AAE1B;EACE,UAAU,EAAE;;AAEd;EACE,WAAW;EACX,gBAAgB;EAChB,6BAA6B;EAC7B,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,mBAAmB,EAAE;;AAEvB;EACE,SAAS,EAAE;;AAEb;EACE,aAAa;EACb,sBAAsB,EAAE;;AAE1B;EACE,WAAW;EACX,cAAc;EACd,iBAAiB,EAAE;;AAErB;EACE,kBAAkB,EAAE;;AAEtB;EACE,aAAa,EAAE;;AAEjB,cAAc;AACd;EACE,eAAe;EACf,mBAAmB,EAAE;;AAEvB;EACE,eAAe,EAAE;;AAEnB;EACE;IACE,iBAAiB,EAAE,EAAE;;AAEzB;EACE,4BAA4B,EAAE;;AAEhC;EACE;IACE,4BAA4B,EAAE,EAAE;;AAEpC;EACE,4BAA4B,EAAE;;AAEhC,WAAW;AACX;EACE,sBAAsB,EAAE;;AAE1B;EACE,yBAAyB,EAAE;;AAE7B;EACE;;IAEE,gCAAgC,EAAE,EAAE;;AAExC;EACE;;IAEE,yBAAyB,EAAE;EAC7B;IACE,aAAa,EAAE,EAAE;;AAErB;EACE,YAAY,EAAE;;AAEhB;EACE,WAAW;EACX,cAAc,EAAE;;AAElB;EACE,WAAW,EAAE;;AAEf;EACE,aAAa;EACb,mBAAmB;EACnB,kBAAkB,EAAE;;AAEtB;EACE,qBAAqB;EACrB,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;EACb,+BAA+B;EAC/B,WAAW,EAAE;;AAEf;EACE,cAAc,EAAE;;AAElB,iBAAiB;AACjB;EACE,gBAAgB,EAAE;;AAEpB;EACE,mBAAmB,EAAE;;AAEvB,YAAY;AACZ;;;EAGE,gBAAgB,EAAE;;AAEpB;;;;EAIE,sBAAsB,EAAE;;AAE1B;;EAEE,mBAAmB,EAAE;;AAEvB;EACE,cAAc;EACd,qBAAqB,EAAE;;AAEzB;EACE,WAAW,EAAE;;AAEf;EACE;IACE,kBAAkB,EAAE;EACtB;IACE,eAAe;IACf,gBAAgB;IAChB,mBAAmB,EAAE,EAAE;;AAE3B;;EAEE,6BAA6B,EAAE;;AAEjC;EACE,YAAY,EAAE;;AAEhB;EACE,mBAAmB;EACnB,eAAe,EAAE;;AAEnB,aAAa;AACb;EACE,gBAAgB,EAAE;;AAEpB;EACE,mBAAmB,EAAE;;AAEvB;EACE,6BAA6B,EAAE;;AAEjC,aAAa;AACb;EACE,6BAA6B;EAC7B,aAAa;EACb,aAAa;EACb,mBAAmB;EACnB,eAAe;EACf,8BAA8B,EAAE;;AAElC;EACE,UAAU;EACV,aAAa,EAAE;;AAEjB;EACE,aAAa;EACb,mBAAmB,EAAE;;AAEvB;EACE,WAAW;EACX,mBAAmB,EAAE;;AAEvB;EACE,gBAAgB,EAAE;;AAEpB;EACE;IACE,WAAW;IACX,iBAAiB;IACjB,gBAAgB,EAAE;EACpB;IACE,iBAAiB,EAAE,EAAE;;AAEzB;EACE,kBAAkB;EAClB,aAAa,EAAE;;AAEjB;EACE;IACE,mBAAmB,EAAE,EAAE;;AAE3B;EACE,iBAAiB,EAAE;;AAErB,YAAY;AACZ;EACE,YAAY,EAAE;;AAEhB;;EAEE,iBAAiB,EAAE;;AAErB;EACE,aAAa,EAAE;;AAEjB;;EAEE,cAAc;EACd,kBAAkB,EAAE;;AAEtB;EACE,8BAA8B,EAAE;;AAElC;EACE,iBAAiB,EAAE;;AAErB;EACE,qBAAqB;EACrB,aAAa;EACb,mBAAmB;EACnB,6BAA6B;EAC7B,aAAa;EACb,mBAAmB,EAAE;;AAEvB;EACE,SAAS,EAAE;;AAEb;EACE,aAAa;EACb,mBAAmB,EAAE;;AAEvB;EACE,aAAa,EAAE;;AAEjB;EACE,iBAAiB;EACjB,gBAAgB,EAAE;;AAEpB;EACE,eAAe;EACf,cAAc;EACd,aAAa,EAAE;;AAEjB;;EAEE,gBAAgB,EAAE;;AAEpB;;EAEE,WAAW,EAAE;;AAEf;EACE,kBAAkB;EAClB,WAAW;EACX,cAAc;EACd,aAAa,EAAE;;AAEjB;EACE,WAAW,EAAE;;AAEf,aAAa;AACb;EACE,cAAc,EAAE;;AAElB,mBAAmB;AACnB;EACE,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,mBAAmB,EAAE;;AAEvB;EACE,aAAa;EACb,oBAAoB,EAAE;;AAExB;EACE,eAAe;EACf,WAAW;EACX,YAAY,EAAE;;AAEhB;EACE,cAAc;EACd,mBAAmB,EAAE;;AAEvB;EACE,cAAc;EACd,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,mBAAmB,EAAE;;AAEvB;EACE,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,mBAAmB,EAAE;;AAEvB;EACE,cAAc;EACd,mBAAmB,EAAE;;AAEvB;EACE,iBAAiB,EAAE;;AAErB;EACE,iBAAiB;EACjB,kBAAkB,EAAE;;AAEtB;EACE,aAAa,EAAE;;AAEjB;gEACgE;AAChE;EACE,aAAa;EACb,yBAAyB;EACzB,yBAAyB;EACzB,WAAW;EACX,kBAAkB;EAClB,mBAAmB;EACnB,sBAAsB;EACtB,gBAAgB,EAAE;;AAEpB;EACE,YAAY,EAAE;;AAEhB;EACE,aAAa;EACb,mBAAmB,EAAE;;AAEvB;EACE,WAAW;EACX,qBAAqB;EACrB,SAAS,EAAE;;AAEb;EACE,eAAe;EACf,WAAW,EAAE;;AAEf;EACE,iBAAiB,EAAE;;AAErB;EACE,WAAW;EACX,iBAAiB;EACjB,qBAAqB;EACrB,iBAAiB,EAAE;;AAErB;EACE,WAAW,EAAE;;AAEf;EACE,gBAAgB,EAAE;;AAEpB;EACE,oBAAoB,EAAE;;AAExB;EACE,WAAW;EACX,gBAAgB;EAChB,aAAa,EAAE;;AAEjB;EACE,UAAU,EAAE;;AAEd;EACE,YAAY;EACZ,0BAA0B,EAAE;;AAE9B;;EAEE,gBAAgB;EAChB,WAAW;EACX,qBAAqB,EAAE;;AAEzB;EACE,yBAAyB;EACzB,mBAAmB,EAAE;;AAEvB;;EAEE,eAAe,EAAE;;AAEnB;gEACgE;AAChE;EACE,aAAa;EACb,gBAAgB,EAAE;;AAEpB;;EAEE,YAAY,EAAE;;AAEhB;;EAEE,sBAAsB,EAAE;;AAE1B;;EAEE,qBAAqB;EACrB,YAAY,EAAE;;AAEhB;EACE,aAAa,EAAE;;AAEjB;EACE,kBAAkB;EAClB,aAAa,EAAE;;AAEjB;EACE,yBAAyB;EACzB,4BAA4B;EAC5B,sBAAsB,EAAE;;AAE1B;EACE,0BAA0B;EAC1B,6BAA6B;EAC7B,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,gBAAgB,EAAE;;AAEpB;EACE,UAAU,EAAE;;AAEd;gEACgE;AAChE;;;;;;;EAOE,eAAe,EAAE;;AAEnB;;EAEE,WAAW;EACX,kBAAkB;EAClB,eAAe;EACf,kBAAkB,EAAE;;AAEtB;gEACgE;AAChE;EACE,YAAY,EAAE;;AAEhB;EACE,cAAc,EAAE;;AAElB;EACE,cAAc,EAAE;;AAElB;;EAEE,YAAY,EAAE;;AAEhB;EACE,WAAW,EAAE;;AAEf;gEACgE;AAChE;EACE,yBAAyB,EAAE;;AAE7B;EACE,kBAAkB;EAClB,MAAM,EAAE;;AAEV;EACE,gBAAgB,EAAE;;AAEpB;;;;;EAKE,QAAQ;EACR,iBAAiB;EACjB,iBAAiB,EAAE;;AAErB;;EAEE,0BAA0B;EAC1B,6BAA6B;EAC7B,yBAAyB;EACzB,cAAc;EACd,gBAAgB;EAChB,kBAAkB;EAClB,iBAAiB,EAAE;;AAErB;;EAEE,gBAAgB,EAAE;;AAEpB;;EAEE,YAAY;EACZ,eAAe;EACf,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,eAAe,EAAE;;AAEnB;gEACgE;AAChE;EACE,kBAAkB,EAAE;;AAEtB;EACE,mBAAmB;EACnB,sBAAsB,EAAE;;AAE1B;EACE,UAAU;EACV,SAAS,EAAE;;AAEb;EACE;IACE,sBAAsB,EAAE,EAAE;;AAE9B;EACE,WAAW,EAAE;;AAEf;gEACgE;AAChE;EACE,YAAY;EACZ,WAAW,EAAE;;AAEf;EACE,YAAY;EACZ,WAAW,EAAE;;AAEf;EACE,WAAW,EAAE;;AAEf;EACE,WAAW,EAAE;;AAEf;;EAEE,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,UAAU;EACV,SAAS;EACT,sBAAsB;EACtB,uBAAuB;EACvB,8BAA8B,EAAE;;AAElC;EACE,0BAA0B;EAC1B,mBAAmB;EACnB,aAAa;EACb,8BAA8B;EAC9B,iBAAiB,EAAE;;AAErB;EACE,WAAW,EAAE;;AAEf;EACE,YAAY,EAAE;;AAEhB;EACE,gBAAgB,EAAE;;AAEpB;;EAEE,gBAAgB,EAAE;;AAEpB;EACE,aAAa,EAAE;;AAEjB;EACE,WAAW;EACX,eAAe,EAAE;;AAEnB;EACE,qBAAqB;EACrB,eAAe;EACf,iBAAiB;EACjB,WAAW;EACX,eAAe;EACf,sBAAsB,EAAE;;AAE1B;;EAEE,WAAW;EACX,mBAAmB;EACnB,yBAAyB,EAAE;;AAE7B;EACE,YAAY,EAAE;;AAEhB;;EAEE,kBAAkB,EAAE;;AAEtB;;;;EAIE,WAAW;EACX,cAAc,EAAE;;AAElB;;EAEE,WAAW,EAAE;;AAEf;EACE,WAAW;EACX,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,wBAAwB;EACxB,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,gBAAgB;EAChB,mBAAmB;EACnB,qBAAqB,EAAE;;AAEzB;EACE,WAAW,EAAE;;AAEf;;EAEE,YAAY;EACZ,sBAAsB,EAAE;;AAE1B;EACE,YAAY;EACZ,iBAAiB;EACjB,YAAY,EAAE;;AAEhB;;EAEE,eAAe;EACf,WAAW;EACX,eAAe,EAAE;;AAEnB;;EAEE,mBAAmB;EACnB,YAAY;EACZ,uBAAuB;EACvB,mBAAmB;EACnB,qBAAqB;EACrB,aAAa;EACb,8BAA8B;EAC9B,SAAS,EAAE;;AAEb,sEAAsE;AACtE;;EAEE,gBAAgB;EAChB,oBAAoB;EACpB,sBAAsB;EACtB,YAAY;EACZ,8BAA8B,EAAE;;AAElC;EACE,cAAc;EACd,kBAAkB,EAAE;;AAEtB;EACE,qBAAqB;EACrB,gBAAgB,EAAE;;AAEpB;EACE,gBAAgB;EAChB,YAAY,EAAE;;AAEhB;EACE,eAAe,EAAE;;AAEnB;EACE,eAAe;EACf,gBAAgB;EAChB,mBAAmB;EACnB,YAAY,EAAE;;AAEhB;EACE,iBAAiB;EACjB,0BAAkB;MAAlB,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,WAAW,EAAE;;AAEf;EACE,WAAW,EAAE;;AAEf;EACE,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB;EACnB,YAAY;EACZ,8BAA8B;EAC9B,cAAc;EACd,UAAU;EACV,kBAAkB;EAClB,wBAAwB;EACxB,WAAW;EACX,gBAAgB;EAChB,QAAQ;EACR,UAAU;EACV,oBAAoB;EACpB,uBAAuB;EACvB,mBAAmB,EAAE;;AAEvB;EACE,WAAW;EACX,WAAW;EACX,SAAS,EAAE;;AAEb;EACE,gBAAgB,EAAE;;AAEpB;EACE,WAAW,EAAE;;AAEf;EACE,gBAAgB,EAAE;;AAEpB;;;EAGE,YAAY,EAAE;;AAEhB;;EAEE,WAAW,EAAE;;AAEf;;EAEE,UAAU;EACV,gBAAgB,EAAE;;AAEpB;;EAEE,eAAe,EAAE;;AAEnB;EACE,cAAc;EACd,gBAAgB;EAChB,WAAW;EACX,WAAW,EAAE;;AAEf,+EAA+E;AAC/E;EACE,YAAY;EACZ,eAAe;EACf,qBAAqB;EACrB,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,oBAAoB;EACpB,WAAW;EACX,YAAY,EAAE;;AAEhB;;;EAGE,uCAAuC,EAAE;;AAE3C;gEACgE;AAChE;EACE,SAAS;EACT,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;EAClB,SAAS;EACT,qBAAqB;EACrB,YAAY;EACZ,sBAAsB;EACtB,kBAAkB;EAClB,mBAAmB;EACnB,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,UAAU,EAAE;;AAEd;EACE,qBAAqB;EACrB,mBAAmB;EACnB,WAAW,EAAE;;AAEf;EACE,0BAA0B,EAAE;;AAE9B;EACE,cAAc,EAAE;;AAElB;EACE,gBAAgB;EAChB,mBAAmB,EAAE;;AAEvB;EACE,aAAa,EAAE;;AAEjB;EACE,iBAAiB,EAAE;;AAErB;;;EAGE,eAAe,EAAE;;AAEnB;EACE,UAAU,EAAE;;AAEd;EACE,UAAU,EAAE;;AAEd;EACE,UAAU,EAAE;;AAEd;EACE,UAAU,EAAE;;AAEd;EACE,UAAU,EAAE;;AAEd;EACE,gCAAgC;EAChC,WAAW;EACX,aAAa;EACb,SAAS;EACT,qBAAqB,EAAE;;AAEzB;EACE,aAAa;EACb,eAAe;EACf,qBAAqB;EACrB,8BAA8B;EAC9B,mBAAmB,EAAE;;AAEvB;EACE,eAAe,EAAE;;AAEnB;EACE,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,kBAAkB;EAClB,eAAe,EAAE;;AAEnB;EACE,aAAa;EACb,mBAAmB,EAAE;;AAEvB;EACE,aAAa;EACb,eAAe,EAAE;;AAEnB;EACE,gBAAgB,EAAE;;AAEpB;EACE,WAAW;EACX,mBAAmB,EAAE;;AAEvB;EACE,YAAY,EAAE;;AAEhB;EACE,kBAAkB,EAAE;;AAEtB;EACE,SAAS;EACT,UAAU,EAAE;;AAEd;EACE,uBAAuB,EAAE;;AAE3B;EACE,YAAY,EAAE;;AAEhB;;EAEE,WAAW,EAAE;;AAEf;EACE,cAAc;EACd,kBAAkB;EAClB,YAAY,EAAE;;AAEhB;EACE,SAAS;EACT,UAAU,EAAE;;AAEd;EACE,kBAAkB,EAAE;;AAEtB;EACE,gBAAgB,EAAE;;AAEpB;EACE,gBAAgB,EAAE;;AAEpB;EACE,eAAe;EACf,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB,EAAE;;AAEvB;EACE,gBAAgB,EAAE;;AAEpB;EACE,qBAAqB,EAAE;;AAEzB;EACE,kBAAkB,EAAE;;AAEtB;EACE,eAAe,EAAE;;AAEnB;EACE,YAAY,EAAE;;AAEhB;EACE,WAAW;EACX,cAAc,EAAE;;AAElB;EACE,YAAY,EAAE;;AAEhB;EACE,kBAAkB,EAAE;;AAEtB;;EAEE,qBAAqB;EACrB,UAAU;EACV,gBAAgB,EAAE;;AAEpB;EACE,SAAS,EAAE;;AAEb;EACE,SAAS;EACT,YAAY,EAAE;;AAEhB;EACE,cAAc;EACd,gBAAgB;EAChB,kBAAkB;EAClB,SAAS;EACT,sBAAsB;EACtB,eAAe,EAAE;;AAEnB;EACE,aAAa,EAAE;;AAEjB;EACE,6BAA6B,EAAE;;AAEjC;EACE,yBAAyB,EAAE;;AAE7B;EACE,iBAAiB;EACjB,gBAAgB;EAChB,mBAAmB,EAAE;;AAEvB;EACE,gBAAgB,EAAE;;AAEpB;EACE,gBAAgB,EAAE;;AAEpB;EACE,WAAW;EACX,gBAAgB,EAAE;;AAEpB;EACE,aAAa,EAAE;;AAEjB;EACE,eAAe;EACf,gBAAgB,EAAE;;AAEpB;EACE,WAAW,EAAE;;AAEf;EACE,WAAW;EACX,gBAAgB,EAAE;;AAEpB;EACE,gBAAgB,EAAE;;AAEpB;EACE,WAAW;EACX,eAAe,EAAE;;AAEnB;EACE,WAAW,EAAE;;AAEf;EACE,WAAW,EAAE;;AAEf;EACE,WAAW,EAAE;;AAEf;;;EAGE,eAAe;EACf,gBAAgB,EAAE;;AAEpB;EACE,iBAAiB,EAAE;;AAErB;;EAEE,aAAa;EACb,6BAA6B;EAC7B,yBAAyB,EAAE;;AAE7B;;EAEE,qBAAqB;EACrB,2BAA2B,EAAE;;AAE/B;;EAEE,SAAS;EACT,WAAW,EAAE;;AAEf;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB,EAAE;;AAE1B;;;EAGE,YAAY,EAAE;;AAEhB;EACE;IACE,eAAe,EAAE;EACnB;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE;EACd;IACE,iBAAiB,EAAE,EAAE;;AAEzB;EACE;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE;EACd;IACE,iBAAiB,EAAE;EACrB;;IAEE,eAAe,EAAE,EAAE;;AAEvB;EACE;;IAEE,oBAAoB,EAAE;EACxB;IACE,UAAU,EAAE;EACd;;IAEE,UAAU;IACV,oBAAoB,EAAE;EACxB;;IAEE,eAAe,EAAE;EACnB;IACE,iBAAiB,EAAE;EACrB;IACE,eAAe,EAAE;EACnB;IACE,iBAAa;IAAb,aAAa,EAAE;EACjB;IACE,iBAAiB,EAAE,EAAE;;AAEzB;EACE;;;IAGE,WAAW;IACX,oBAAoB,EAAE;EACxB;;IAEE,WAAW;IACX,iBAAiB,EAAE;EACrB;IACE,iBAAiB,EAAE,EAAE;;AAEzB,WAAW;AACX;EACE,qBAAqB,EAAE;;AAEzB;;EAEE,cAAc;EACd,+BAA+B;EAC/B,qBAAqB;EACrB,kBAAkB;EAClB,kBAAkB;EAClB,MAAM;EACN,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;EACnB,mCAAmC;EACnC,kCAAkC,EAAE;;AAEtC;EACE,gBAAgB,EAAE;;AAEpB;EACE,gBAAgB,EAAE;;AAEpB;gEACgE;AAChE;EACE,eAAe,EAAE;;AAEnB;gEACgE;AAChE;EACE,gCAAgC;EAChC,WAAW,EAAE;;AAEf;EACE,WAAW;EACX,UAAU,EAAE;;AAEd;EACE,YAAY;EACZ,UAAU,EAAE;;AAEd;EACE,eAAe,EAAE;;AAEnB;EACE,cAAc,EAAE;;AAElB;;EAEE,gBAAgB;EAChB,sBAAsB,EAAE;;AAE1B;EACE,kBAAkB;EAClB,WAAW,EAAE;;AAEf;EACE,eAAe;EACf,mBAAmB;EACnB,WAAW;EACX,WAAW,EAAE;;AAEf;EACE,6BAA6B;EAC7B,cAAc;EACd,yCAAyC;EACzC,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,iBAAiB;EACjB,oBAAoB,EAAE;;AAExB;EACE,6BAA6B;EAC7B,cAAc;EACd,eAAe;EACf,iBAAiB;EACjB,iBAAiB,EAAE;;AAErB;EACE,iBAAiB,EAAE;;AAErB;EACE,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,iBAAiB,EAAE;;AAErB;EACE,WAAW;EACX,cAAc;EACd,kBAAkB,EAAE;;AAEtB;EACE,UAAU,EAAE;;AAEd;EACE,iBAAiB,EAAE;;AAErB;EACE;IACE,aAAa,EAAE,EAAE;;AAErB;gEACgE;AAChE,4HAA4H;AAC5H;EACE,kBAAkB,EAAE;;AAEtB;EACE,eAAe;EACf,iBAAiB;EACjB,yBAAyB;EACzB,cAAc;EACd,YAAY;EACZ,kBAAkB;EAClB,WAAW;EACX,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,kBAAkB;EAClB,SAAS;EACT,UAAU,EAAE;;AAEd,qDAAqD;AACrD;;EAEE,gBAAgB,EAAE;;AAEpB;EACE,cAAc,EAAE;;AAElB;EACE,gBAAgB;EAChB,wBAAwB;EACxB,iBAAiB;EACjB,mBAAmB,EAAE;;AAEvB;EACE,SAAS,EAAE;;AAEb;;EAEE,eAAe,EAAE;;AAEnB;EACE,YAAY,EAAE;;AAEhB;EACE,WAAW,EAAE;;AAEf;EACE,WAAW;EACX,gBAAgB,EAAE;;AAEpB;;EAEE,mBAAmB,EAAE;;AAEvB;EACE,aAAa;EACb,iBAAiB;EACjB,4DAA4D;EAC5D,cAAc,EAAE;;AAElB;EACE,gBAAgB,EAAE;;AAEpB;EACE,aAAa;EACb,mBAAmB;EACnB,WAAW,EAAE;;AAEf;EACE,WAAW,EAAE;;AAEf;EACE,YAAY,EAAE;;AAEhB;EACE,aAAa;EACb,sBAAsB;EACtB,eAAe;EACf,kBAAkB,EAAE;;AAEtB;EACE,aAAa;EACb,iBAAiB;EACjB,yBAA8B;EAA9B,8BAA8B;EAC9B,aAAa,EAAE;;AAEjB;EACE,mBAAmB;EACnB,0BAAkB;MAAlB,kBAAkB;EAClB,mBAAmB,EAAE;;AAEvB;EACE,eAAe;EACf,eAAe,EAAE;;AAEnB;;EAEE,2BAA2B;EAC3B,iBAAiB,EAAE;;AAErB;EACE,gBAAgB;EAChB,mBAAmB;EACnB,YAAY;EACZ,gBAAgB,EAAE;;AAEpB;EACE,gBAAgB;EAChB,mBAAmB;EACnB,YAAY;EACZ,QAAQ,EAAE;;AAEZ;EACE,yBAAyB;EACzB,mBAAmB;EACnB,mBAAmB;EACnB,qBAAqB;EACrB,aAAa;EACb,cAAc;EACd,wBAAwB;EACxB,kBAAkB;EAClB,WAAW;EACX,aAAa;EACb,8BAA8B;EAC9B,mBAAmB,EAAE;;AAEvB;EACE,SAAS,EAAE;;AAEb;EACE,mBAAmB,EAAE;;AAEvB;EACE,gBAAgB,EAAE;;AAEpB;EACE,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB,EAAE;;AAEvB;EACE,WAAW,EAAE;;AAEf;EACE,cAAc;EACd,aAAa,EAAE;;AAEjB;EACE,aAAa,EAAE;;AAEjB;EACE,uBAAuB,EAAE;;AAE3B;EACE,qBAAqB;EACrB,gBAAgB;EAChB,iBAAiB;EACjB,UAAU,EAAE;;AAEd;EACE,WAAW,EAAE;;AAEf;EACE,aAAa,EAAE;;AAEjB;EACE,sBAAsB;EACtB,yBAAyB;EACzB,yCAAyC;EACzC,aAAa,EAAE;;AAEjB;EACE,qBAAqB;EACrB,UAAU;EACV,mBAAmB,EAAE;;AAEvB;EACE,cAAc,EAAE;;AAElB;EACE,cAAc,EAAE;;AAElB;EACE,aAAa,EAAE;;AAEjB;EACE,cAAc;EACd,gBAAgB,EAAE;;AAEpB;EACE,WAAW;EACX,qBAAqB;EACrB,cAAc;EACd,wBAAwB;EACxB,UAAU;EACV,YAAY,EAAE;;AAEhB;EACE,yBAAyB;EACzB,qBAAqB;EACrB,iBAAiB;EACjB,WAAW;EACX,YAAY,EAAE;;AAEhB;EACE,qBAAqB;EACrB,mBAAmB;EACnB,UAAU,EAAE;;AAEd;EACE,UAAU,EAAE;;AAEd;EACE,cAAc,EAAE;;AAElB;EACE,YAAY,EAAE;;AAEhB,0CAA0C;AAC1C;EACE,aAAa,EAAE;;AAEjB;EACE,eAAe,EAAE;;AAEnB;;EAEE,eAAe;EACf,YAAY;EACZ,iBAAiB;EACjB,eAAe,EAAE;;AAEnB;;EAEE,iBAAiB;EACjB,iBAAiB,EAAE;;AAErB;;;;EAIE,kBAAkB;EAClB,qBAAqB;EACrB,WAAW;EACX,YAAY,EAAE;;AAEhB;;EAEE,kBAAkB;EAClB,QAAQ;EACR,gBAAgB;EAChB,sCAAsC,EAAE;;AAE1C;;EAGE,4CAA4C;EAC5C,8CAA8C;EAC9C,gDAAgD;EAChD,iDAAiD;EACjD,2BAA2B;EAC3B,eAAe;EACf,wBAAwB;EAExB,wBAAwB,EAAE;;AAE5B;;EAEE,oCAAoC;EACpC,sCAAsC;EACtC,uCAAuC;EACvC,uBAAuB;EACvB,gBAAgB,EAAE;;AAEpB;EACE,kBAAkB,EAAE;;AAUtB;EACE;IAEE,uBAAuB,EAAE;EAC3B;IAEE,yBAAyB,EAAE,EAAE;;AAEjC;EACE,UAAU;EACV,kBAAkB;EAClB,cAAc;EACd,sBAAsB;EACtB,aAAa,EAAE;;AAEjB;EACE,cAAc,EAAE;;AAElB;EACE,eAAe,EAAE;;AAEnB;EACE,iBAAiB;EACjB,aAAa;EACb,4DAA4D;EAC5D,cAAc,EAAE;;AAElB;EACE,kBAAkB;EAClB,kBAAkB;EAClB,aAAa;EACb,sBAAsB;EACtB,uBAAuB;EACvB,yBAAyB;EACzB,mBAAmB;EACnB,kBAAkB;EAClB,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,iBAAiB;EACjB,WAAW,EAAE;;AAEf;EACE,kBAAkB;EAClB,yBAAyB;EACzB,eAAe;EACf,mBAAmB;EACnB,WAAW;EACX,QAAQ;EACR,eAAe,EAAE;;AAEnB;EACE,QAAQ;EACR,WAAW;EACX,cAAc;EACd,cAAc;EACd,+BAA+B,EAAE;;AAEnC;EACE,sBAAsB,EAAE;;AAE1B;EACE,sBAAsB,EAAE;;AAE1B;EACE,cAAc,EAAE;;AAElB;EACE,cAAc,EAAE;;AAElB;;EAEE,WAAW,EAAE;;AAEf;EACE,WAAW,EAAE;;AAEf;EACE,gBAAgB,EAAE;;AAEpB;EACE,kBAAkB;EAClB,QAAQ;EACR,SAAS;EACT,WAAW;EACX,eAAe;EACf,gBAAgB;EAChB,sBAAsB;EACtB,8BAA8B;EAC9B,6BAA6B;EAC7B,6BAA6B;EAC7B,4BAA4B;EAC5B,2BAA2B;EAC3B,oBAAoB;EACpB,qBAAqB,EAAE;;AAEzB;EACE,2BAA2B;EAC3B,0BAA0B;EAC1B,WAAW,EAAE;;AAEf;EACE;IACE,iBAAiB;IACjB,aAAa;IACb,yCAAoD;IAApD,oDAAoD;IACpD,cAAc,EAAE;EAClB;IACE,gBAAgB,EAAE;EACpB;IACE,kBAAuB;IAAvB,uBAAuB;IAAvB,uBAAuB,EAAE,EAAE;;AAE/B;EACE,kBAAkB;EAClB,sBAAsB;EAGtB,kBAAkB;EAElB,wBAAwB;EACxB,oBAAoB;EAEpB,6BAA6B;EAC7B,eAAe;EACf,oHAAoH;EACpH,gBAAgB;EAChB,UAAU,EAAE;;AAEd;EACE,qBAAqB;EACrB,WAAW;EACX,YAAY;EACZ,iBAAiB,EAAE;;AAErB;gEACgE;AAChE;gEACgE;AAChE;;;;;;;;EAQE,cAAc,EAAE;;AAElB;EACE,WAAW;EACX,qBAAqB;EACrB,gBAAgB;EAChB,sBAAsB;EACtB,YAAY;EACZ,gBAAgB;EAChB,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,sBAAsB,EAAE;;AAE1B;EACE,mBAAmB;EACnB,aAAa;EACb,6BAA6B;EAC7B,wBAAwB;EACxB,WAAW,EAAE;;AAEf;EACE,UAAU,EAAE;;AAEd;EACE,eAAe;EACf,WAAW,EAAE;;AAEf;EACE,kBAAkB;EAClB,mBAAmB;EACnB,aAAa;EACb,0BAA0B;EAC1B,wBAAwB;EACxB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,sBAAsB,EAAE;;AAE1B;EACE,WAAW,EAAE;;AAEf;EACE,qBAAqB,EAAE;;AAEzB;EACE,yBAAyB;EACzB,WAAW;EACX,qBAAqB,EAAE;;AAEzB;EACE,yBAAyB;EACzB,WAAW;EACX,qBAAqB,EAAE;;AAEzB;;;;;EAKE,yBAAyB;EACzB,qBAAqB,EAAE;;AAEzB;EACE,eAAe;EACf,aAAa,EAAE;;AAEjB;;EAEE,WAAW,EAAE;;AAEf;;EAEE,qBAAqB,EAAE;;AAEzB;EACE,WAAW,EAAE;;AAEf;gEACgE;AAChE;EACE,yBAAyB,EAAE;;AAE7B;EACE,yBAAyB,EAAE;;AAE7B;gEACgE;AAChE;EACE,WAAW;EACX,eAAe;EACf,YAAY;EACZ,gBAAgB;EAChB,sBAAsB;EACtB,gBAAgB;EAChB,WAAW,EAAE;;AAEf;gEACgE;AAChE;EACE,kBAAkB;EAClB,qBAAqB;EACrB,iBAAiB,EAAE;;AAErB;EACE,qBAAqB;EACrB,sBAAsB;EACtB,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,sBAAsB;EAEtB,gCAAgC;EAChC,mBAAmB;EACnB,gBAAgB;EAChB,YAAY,EAAE;;AAEhB;EACE,qBAAqB;EACrB,sBAAsB;EACtB,mBAAmB,EAAE;;AAEvB;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,WAAW;EACX,SAAS;EACT,WAAW;EACX,uBAAuB;EAEvB,+BAA+B;EAC/B,kBAAkB,EAAE;;AAEtB;EACE,yBAAyB,EAAE;;AAE7B;;EAEE,UAAU;EACV,6CAA6C,EAAE;;AAEjD;;EAEE,6CAA6C,EAAE;;AAEjD;EAGE,2BAA2B,EAAE;;AAE/B;;EAEE,gBAAgB,EAAE;;AAEpB;gEACgE;AAChE;EACE,iBAAiB,EAAE;;AAErB;EACE,kBAAkB;EAClB,iBAAiB,EAAE;;AAErB;EACE,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,UAAU;EACV,SAAS,EAAE;;AAEb;EACE,mBAAmB,EAAE;;AAEvB;EACE,kBAAkB;EAClB,OAAO;EACP,SAAS,EAAE;;AAEb;EACE,kBAAkB;EAClB,UAAU;EACV,QAAQ,EAAE;;AAEZ;EACE,mBAAmB;EACnB,yBAAyB;EACzB,kBAAkB;EAClB,UAAU;EACV,SAAS;EACT,aAAa;EACb,YAAY;EACZ,wCAAwC,EAAE;;AAE5C;EACE,SAAS,EAAE;;AAEb;EACE,cAAc;EACd,qBAAqB;EACrB,iBAAiB,EAAE;;AAErB;EACE,mBAAmB,EAAE;;AAEvB;EACE,kBAAkB;EAClB,sBAAsB;EACtB,cAAc;EACd,kBAAkB;EAClB,WAAW;EACX,yBAAyB;EACzB,eAAe,EAAE;;AAEnB;EACE;IACE,cAAc;IACd,WAAW,EAAE;EACf;IACE,UAAU;IACV,eAAe;IACf,iBAAiB,EAAE,EAAE;;AAEzB;EACE;;;IAGE,eAAe,EAAE;EACnB;IACE,kBAAkB,EAAE,EAAE;;AAE1B;EACE;IACE,WAAW;IACX,iBAAiB,EAAE;EACrB;IACE,WAAW,EAAE,EAAE;;AAEnB;gEACgE;AAChE;EACE,gBAAgB;EAChB,yBAAyB;EAEzB,yCAAyC;EACzC,kBAAkB;EAClB,gBAAgB;EAChB,aAAa,EAAE;;AAEjB;EACE,eAAe,EAAE;;AAEnB;EACE,WAAW;EACX,cAAc;EACd,WAAW;EACX,kBAAkB;EAClB,YAAY;EACZ,SAAS,EAAE;;AAEb;EACE,WAAW;EACX,WAAW,EAAE;;AAEf;EACE,sBAAsB;EACtB,qBAAqB;EACrB,UAAU,EAAE;;AAEd;EACE,iBAAiB;EACjB,YAAY,EAAE;;AAEhB;EACE,6BAA6B,EAAE;;AAEjC;EACE,mBAAmB,EAAE;;AAEvB;EACE,8BAA8B,EAAE;;AAElC;EACE,aAAa,EAAE;;AAEjB;EACE,WAAW;EACX,mBAAmB;EACnB,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,yBAAyB;EACzB,sBAAsB;EACtB,8BAA8B;EAC9B,gBAAgB;EAChB,kBAAkB;EAClB,sBAAsB;EACtB,eAAe;EACf,gBAAgB,EAAE;;AAEpB;;;EAGE,YAAY;EACZ,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB;EACtB,uBAAuB;EACvB,eAAe;EACf,gBAAgB,EAAE;;AAEpB;EACE,WAAW,EAAE;;AAEf;EACE,eAAe,EAAE;;AAEnB;EACE,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;EAClB,YAAY,EAAE;;AAEhB;EACE,iBAAiB;EACjB,iBAAiB,EAAE;;AAErB;;;EAGE,cAAc,EAAE;;AAElB;EACE,cAAc;EACd,iBAAiB;EACjB,qBAAqB,EAAE;;AAEzB;EACE,iBAAiB,EAAE;;AAErB;EACE,eAAe;EACf,gBAAgB,EAAE;;AAEpB;EACE,kBAAkB,EAAE;;AAEtB;EACE,mBAAmB;EACnB,qBAAqB,EAAE;;AAEzB;EACE,WAAW;EACX,eAAe,EAAE;;AAEnB;EACE,YAAY;EACZ,iBAAiB;EACjB,kBAAkB,EAAE;;AAEtB;EACE,iBAAiB,EAAE;;AAErB;EACE,YAAY,EAAE;;AAEhB;EACE,UAAU,EAAE;;AAEd;EACE,cAAc;EACd,YAAY,EAAE;;AAEhB;EACE,iBAAiB;EACjB,iBAAiB,EAAE;;AAErB;EACE,eAAe,EAAE;;AAEnB;EACE,aAAa,EAAE;;AAEjB;EACE,eAAe,EAAE;;AAEnB;EACE,gBAAgB,EAAE;;AAEpB;EACE,UAAU;EACV,SAAS,EAAE;;AAEb;EACE,YAAY,EAAE;;AAEhB;EACE,cAAc;EACd,kBAAkB,EAAE;;AAEtB;EACE,aAAa;EACb,SAAS,EAAE;;AAEb;EACE,eAAe;EACf,gBAAgB;EAChB,UAAU,EAAE;;AAEd;EACE,qBAAqB,EAAE;;AAEzB;EACE,WAAW;EACX,gBAAgB,EAAE;;AAEpB;EACE,WAAW,EAAE;;AAEf;EACE,gBAAgB,EAAE;;AAEpB;EACE,yBAAyB;EACzB,6BAA6B,EAAE;;AAEjC;EACE,aAAa;EACb,eAAe;EACf,mBAAmB;EACnB,cAAc,EAAE;;AAElB;EACE,gBAAgB,EAAE;;AAEpB;EACE,YAAY;EACZ,iBAAiB,EAAE;;AAErB;EACE,WAAW;EACX,cAAc;EACd,0BAAkB;MAAlB,kBAAkB,EAAE;;AAEtB;EACE,yBAAyB,EAAE;;AAE7B;EACE,gBAAgB,EAAE;;AAEpB;EACE,YAAY;EACZ,oBAAoB;EACpB,gCAAgC,EAAE;;AAEpC;EACE,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;EACf,qBAAqB;EACrB,mBAAmB,EAAE;;AAEvB;;EAEE,sBAAsB,EAAE;;AAE1B;EACE,iBAAiB,EAAE;;AAErB;EACE,kBAAkB;EAClB,WAAW,EAAE;;AAEf;EACE,gCAAgC;EAChC,gBAAgB;EAChB,sBAAsB,EAAE;;AAE1B;EACE,cAAc,EAAE;;AAElB;EACE,gBAAgB,EAAE;;AAEpB;EACE,kBAAkB;EAClB,mBAAmB;EACnB,kBAAkB;EAClB,mBAAmB,EAAE;;AAEvB;EACE;IACE,eAAe,EAAE;EACnB;IACE,0BAA0B;IAC1B,mBAAmB,EAAE,EAAE;;AAE3B;EACE;;IAEE,SAAS;IACT,WAAW,EAAE;EACf;IACE,SAAS;IACT,eAAe,EAAE;EACnB;IACE,6BAA6B;IAC7B,cAAc;IACd,gBAAgB,EAAE,EAAE;;AAExB;EACE;IACE,kBAAkB,EAAE;EACtB;IACE,WAAW;IACX,kBAAkB;IAClB,SAAS;IACT,WAAW;IACX,gBAAgB,EAAE;EACpB;IACE,WAAW;IACX,kBAAkB;IAClB,WAAW,EAAE;EACf;IACE,eAAe,EAAE;EACnB;IACE,eAAe;IACf,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;;;IAGE,uBAAuB;IACvB,mBAAmB;IACnB,gBAAgB;IAChB,gBAAgB,EAAE;EACpB;IACE,aAAa,EAAE;EACjB;IACE,mBAAmB;IACnB,sBAAsB,EAAE;EAC1B;IACE,kBAAkB,EAAE,EAAE;;AAE1B;EACE;IACE,UAAU,EAAE;EACd;IACE,yBAAyB,EAAE;EAC7B;IACE,uBAAuB,EAAE;EAC3B;;IAEE,gBAAgB;IAChB,WAAW,EAAE;EACf;IACE,iBAAiB,EAAE;EACrB;;IAEE,eAAe,EAAE;EACnB;;IAEE,yBAAyB;IACzB,mBAAmB,EAAE;EACvB;IACE,UAAU,EAAE;EACd;IACE,kBAAkB,EAAE;EACtB;IACE,cAAc,EAAE;EAClB;IACE,YAAY,EAAE;EAChB;;IAEE,YAAY,EAAE;EAChB;;;;;;;;IAQE,WAAW,EAAE;EACf;;;IAGE,wBAAwB,EAAE;EAC5B;IACE,aAAa,EAAE;EACjB;IACE,gBAAgB,EAAE,EAAE;;AAExB;gEACgE;AAChE;EACE,mBAAmB;EACnB,+BAA+B;EAC/B,eAAe;EACf,qCAAqC;EACrC,cAAc;EACd,cAAc;EACd,gBAAgB;EAChB,WAAW;EACX,aAAa;EACb,aAAa;EACb,aAAa,EAAE;;AAEjB;EACE,gBAAgB;EAChB,WAAW,EAAE;;AAEf;EACE,gBAAgB,EAAE;;AAEpB;gEACgE;AAChE;EACE,eAAe,EAAE;;AAEnB;EACE,aAAa;EACb,iBAAiB,EAAE;;AAErB;EACE,gBAAgB,EAAE;;AAEpB;gEACgE;AAChE;EACE,iBAAiB;EACjB,cAAc;EACd,aAAa,EAAE;;AAEjB;;EAEE,kBAAkB;EAClB,UAAU;EACV,gBAAgB;EAChB,kBAAkB;EAClB,UAAU;EACV,yBAAyB;EACzB,+BAA+B;EAC/B,sBAAsB;EACtB,gBAAgB,EAAE;;AAEpB;EACE,SAAS;EACT,SAAS,EAAE;;AAEb;;EAEE,cAAc;EACd,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,yBAAyB,EAAE;;AAE7B;EACE,mBAAmB,EAAE;;AAEvB;;;EAGE,aAAa;EACb,SAAS;EACT,YAAY;EACZ,qBAAqB;EACrB,gCAAgC;EAChC,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB,EAAE;;AAEvB;;;;EAIE,uBAAuB;EACvB,UAAU;EACV,oBAAoB,EAAE;;AAExB;EACE,WAAW;EACX,UAAU;EACV,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;EAClB,QAAQ;EACR,MAAM;EACN,SAAS;EACT,UAAU,EAAE;;AAEd;EACE,SAAS;EACT,sBAAsB,EAAE;;AAE1B;;EAEE,qBAAqB,EAAE;;AAEzB;EACE,cAAc,EAAE;;AAElB;EACE,iBAAiB;EACjB,iBAAiB;EACjB,WAAW,EAAE;;AAEf;EACE,iBAAiB;EACjB,WAAW;EACX,sBAAsB;EACtB,kBAAkB;EAClB,kBAAkB,EAAE;;AAEtB;;;EAGE,aAAa,EAAE;;AAEjB;EACE,cAAc,EAAE;;AAElB,UAAU;AACV;;;EAGE,+BAA+B,EAAE;;AAEnC,SAAS;AACT;;;EAGE,+BAA+B,EAAE;;AAEnC,WAAW;AACX;;;EAGE,+BAA+B,EAAE;;AAEnC,cAAc;AACd;;;EAGE,+BAA+B,EAAE;;AAEnC,aAAa;AACb;;;EAGE,+BAA+B,EAAE;;AAEnC,UAAU;AACV;;;EAGE,+BAA+B,EAAE;;AAEnC,YAAY;AACZ;;;EAGE,+BAA+B,EAAE;;AAEnC,UAAU;AACV;;;EAGE,4BAA4B,EAAE;;AAEhC,0BAA0B;AAC1B,cAAc;AACd;;;EAGE,+BAA+B,EAAE;;AAEnC,SAAS;AACT;;;EAGE,+BAA+B,EAAE;;AAEnC;EACE,WAAW,EAAE;;AAEf;EACE;;IAEE,WAAW,EAAE;EACf;IACE,uBAAuB,EAAE;EAC3B;IACE,WAAW;IACX,YAAY;IACZ,eAAe;IACf,iBAAiB;IACjB,SAAS,EAAE;EACb;IACE,WAAW;IACX,YAAY,EAAE;EAChB;;IAEE,gBAAgB;IAChB,kBAAkB;IAClB,YAAY;IACZ,aAAa;IACb,UAAU;IACV,WAAW,EAAE,EAAE;;AAEnB,oBAAoB;AACpB;;EAEE,UAAU,EAAE;;AAEd;EACE,SAAS;EACT,gBAAgB;EAChB,gBAAgB;EAChB,sBAAsB,EAAE;;AAE1B;EACE,SAAS;EACT,cAAc;EACd,aAAa;EACb,yBAAyB;EACzB,yCAAyC,EAAE;;AAE7C;EACE,SAAS;EACT,aAAa;EACb,8BAA8B;EAC9B,sBAAsB,EAAE;;AAE1B;EACE;;;IAGE,0BAA0B,EAAE,EAAE;;AAElC;EACE;;;IAGE,yBAAyB,EAAE,EAAE;;AAEjC;EACE,gBAAgB,EAAE;;AAEpB;gEACgE;AAChE,qBAAqB;AACrB;EACE,iBAAiB,EAAE;;AAErB;EACE,sBAAsB;EACtB,kBAAkB;EAClB,sBAAsB;EACtB,sBAAsB;EACtB,gBAAgB,EAAE;;AAEpB;EACE,eAAe;EACf,gBAAgB;EAChB,aAAa,EAAE;;AAEjB,oCAAoC;AACpC;EACE,yBAAyB;EACzB,cAAc;EACd,uBAAuB;EACvB,iCAAiC,EAAE;;AAErC,yCAAyC;AACzC;EACE,yBAAyB;EACzB,kBAAkB;EAClB,6BAA6B,EAAE;;AAEjC;EACE,SAAS,EAAE;;AAEb,oCAAoC;AACpC;EACE,eAAe;EACf,kBAAkB,EAAE;;AAEtB;EACE,cAAc;EACd,gBAAgB;EAChB,kBAAkB,EAAE;;AAEtB;EACE,cAAc;EACd,gBAAgB,EAAE;;AAEpB;EACE,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,kBAAkB;EAClB,aAAa;EACb,0BAA0B;EAC1B,kBAAkB;EAClB,mBAAmB;EACnB,gBAAgB;EAChB,WAAW,EAAE;;AAEf;EACE,0BAA0B;EAC1B,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,SAAS,EAAE;;AAEb;EACE,cAAc,EAAE;;AAElB;EACE,qBAAqB,EAAE;;AAEzB,oCAAoC;AACpC;EACE,yBAAyB;EACzB,kBAAkB;EAClB,0BAA0B,EAAE;;AAE9B;EACE,cAAc;EACd,yBAAyB;EACzB,WAAW;EACX,qBAAqB;EACrB,eAAe;EACf,gBAAgB;EAChB,yBAAyB;EACzB,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,WAAW;EACX,sBAAsB;EACtB,gBAAgB;EAChB,gCAAgC,EAAE;;AAEpC;EACE,yBAAyB,EAAE;;AAE7B,yCAAyC;AACzC;EACE;IACE,WAAW;IACX,UAAU,EAAE;EACd;IACE,YAAY;IACZ,UAAU,EAAE,EAAE;;AAElB;EACE;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE,EAAE;;AAElB,4DAA4D;AAC5D;;EAEE,WAAW;EACX,WAAW,EAAE;;AAEf,kDAAkD;AAClD;EACE,yBAAyB;EACzB,WAAW;EACX,aAAa,EAAE;;AAEjB;EACE,cAAc;EACd,gBAAgB,EAAE;;AAEpB;EACE,kBAAkB;EAClB,WAAW;EACX,WAAW;EACX,qBAAqB;EACrB,cAAc;EACd,eAAe;EACf,iBAAiB;EACjB,kBAAkB;EAClB,YAAY,EAAE;;AAEhB;;+DAE+D;AAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BE;AACF;EACE,mBAAmB,EAAE;;AAEvB;EACE,gBAAgB,EAAE;;AAEpB;EACE,cAAc;EACd,kBAAkB;EAClB,UAAU,EAAE;;AAEd;EACE,kBAAkB,EAAE;;AAEtB;;EAEE,eAAe,EAAE;;AAEnB;EACE,gBAAgB,EAAE;;AAEpB;EACE,eAAe,EAAE;;AAEnB;;EAEE,aAAa,EAAE;;AAEjB;;EAEE,cAAc,EAAE;;AAElB;EACE,eAAe,EAAE;;AAEnB;EACE,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,oBAAoB;EACpB,eAAe,EAAE","file":"assets/css/edd-admin.min.css","sourcesContent":["/**\n * EDD Admin CSS\n *\n * @package EDD\n * @subpackage Admin CSS\n * @copyright Copyright (c) 2015, Pippin Williamson\n * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n/**\n * Colors\n */\n/**\n * Colors\n */\n/**\n * Fonts & basic variables.\n */\n/**\n * Grid System.\n * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/\n */\n/**\n * Dimensions.\n */\n/**\n * Shadows.\n */\n/**\n * Editor widths.\n */\n/**\n * Block UI.\n */\n/**\n * Border radii.\n */\n/**\n * Block paddings.\n */\n/**\n * Breakpoint mixins\n */\n/**\n * Long content fade mixin\n *\n * Creates a fading overlay to signify that the content is longer\n * than the space allows.\n */\n/**\n * Focus styles.\n */\n/**\n * Applies editor left position to the selector passed as argument\n */\n/**\n * Styles that are reused verbatim in a few places\n */\n/**\n * Allows users to opt-out of animations via OS-level preferences.\n */\n/**\n * Reset default styles for JavaScript UI based pages.\n * This is a WP-admin agnostic reset\n */\n/**\n * Reset the WP Admin page styles for Gutenberg-like pages.\n */\n/**\n * Breakpoints & Media Queries\n */\n/**\n * WordPress Core colors current as of 5.5.1.\n */\n.edd-custom-price-option-sections-wrap {\n display: none;\n border-width: 0 1px 1px;\n border-style: solid;\n border-color: #e5e5e5;\n box-sizing: border-box;\n width: 100%; }\n\n.edd-custom-price-option-section {\n display: block;\n padding: 10px 8px;\n border-bottom: 1px solid rgba(222, 222, 222, 0.3); }\n .edd-custom-price-option-section-title {\n display: block;\n font-size: 14px;\n font-weight: 600;\n padding: 0 0 10px; }\n .edd-custom-price-option-section-content {\n display: flex;\n gap: 12px;\n margin-bottom: 6px; }\n .edd-custom-price-option-section:last-child {\n border-bottom: none; }\n\n.toggle-custom-price-option-section {\n color: #777; }\n .toggle-custom-price-option-section:hover {\n color: #444; }\n\n.edd-form-group__control--is-inline {\n display: inline-flex;\n align-items: flex-end; }\n\n.edd-form-row {\n display: flex;\n flex-wrap: wrap;\n gap: 12px; }\n .edd-form-row__column {\n display: inline-flex;\n flex-direction: column;\n justify-content: flex-end; }\n .edd-form-row__column.edd-form-group {\n margin-bottom: 0; }\n\n#edd-migration-progress .dashicons-minus {\n color: #949494; }\n\n#edd-migration-progress .dashicons-yes {\n color: green; }\n\n#edd-migration-progress .dashicons-update:before {\n animation: rotation 2s infinite linear;\n display: block; }\n\n#edd-v3-migration-remove-legacy-data-submit-wrap {\n display: flex;\n align-items: center;\n gap: 6px; }\n #edd-v3-migration-remove-legacy-data-submit-wrap .button {\n margin: 0; }\n\n/**\n * Colors\n */\n/**\n * Colors\n */\n/**\n * Fonts & basic variables.\n */\n/**\n * Grid System.\n * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/\n */\n/**\n * Dimensions.\n */\n/**\n * Shadows.\n */\n/**\n * Editor widths.\n */\n/**\n * Block UI.\n */\n/**\n * Border radii.\n */\n/**\n * Block paddings.\n */\n/**\n * Breakpoint mixins\n */\n/**\n * Long content fade mixin\n *\n * Creates a fading overlay to signify that the content is longer\n * than the space allows.\n */\n/**\n * Focus styles.\n */\n/**\n * Applies editor left position to the selector passed as argument\n */\n/**\n * Styles that are reused verbatim in a few places\n */\n/**\n * Allows users to opt-out of animations via OS-level preferences.\n */\n/**\n * Reset default styles for JavaScript UI based pages.\n * This is a WP-admin agnostic reset\n */\n/**\n * Reset the WP Admin page styles for Gutenberg-like pages.\n */\n/**\n * Breakpoints & Media Queries\n */\n/**\n * WordPress Core colors current as of 5.5.1.\n */\n#edd-filters {\n padding: 10px;\n margin: 0;\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px; }\n #edd-filters .filter-items {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n float: none;\n flex-grow: 1; }\n #edd-filters .filter-items .edd-date-range-options {\n display: inline-block;\n margin: 10px 0; }\n #edd-filters > p {\n color: #757575; }\n #edd-filters input[type=\"text\"].edd_datepicker,\n #edd-filters input[type=\"number\"] {\n max-width: 105px; }\n #edd-filters input[type=\"number\"],\n #edd-filters .button-secondary {\n margin-bottom: 0; }\n #edd-filters .search-form {\n margin: 0; }\n @media screen and (max-width: 480px) {\n #edd-filters span {\n margin: 2px 0; } }\n\n#edd-advanced-filters {\n position: relative; }\n #edd-advanced-filters .inside {\n z-index: 99;\n position: absolute;\n top: 29px;\n right: 0;\n border: 1px solid #e0e0e0;\n padding: 0;\n background: #fff;\n box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);\n min-width: 285px;\n opacity: 0;\n visibility: hidden; }\n #edd-advanced-filters fieldset {\n display: block;\n padding: 10px 15px 15px;\n margin: 10px 0; }\n #edd-advanced-filters fieldset:not(:last-of-type) {\n border-bottom: 1px solid #e0e0e0; }\n #edd-advanced-filters fieldset:last-of-type {\n padding-bottom: 5px; }\n #edd-advanced-filters fieldset.edd-add-on-filters label,\n #edd-advanced-filters fieldset.edd-add-on-filters span,\n #edd-advanced-filters fieldset.edd-add-on-filters p,\n #edd-advanced-filters fieldset.edd-add-on-filters div {\n display: block;\n margin-bottom: 2px; }\n #edd-advanced-filters div.edd-select-chosen:not(:last-child) {\n margin-bottom: 10px; }\n #edd-advanced-filters.open .edd-advanced-filters-button {\n background: #e0e0e0;\n border-color: #949494;\n box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);\n -webkit-transform: translateY(1px);\n transform: translateY(1px); }\n #edd-advanced-filters.open .inside {\n visibility: visible;\n opacity: 1;\n -webkit-transition: opacity 0.2s ease-in;\n -moz-transition: opacity 0.2s ease-in;\n -o-transition: opacity 0.2s ease-in;\n transition: opacity 0.2s ease-in; }\n\n.download_page_edd-reports #edd-filters {\n margin-bottom: -1px;\n box-shadow: none; }\n @media screen and (max-width: 782px) {\n .download_page_edd-reports #edd-filters {\n gap: 0; } }\n\n.edd-old-log-filters {\n margin-top: -30px;\n margin-left: 2px; }\n\n.edd-mobile-link {\n line-height: 32px; }\n .edd-mobile-link a {\n text-decoration: none; }\n .edd-mobile-link a:before, .edd-mobile-link a:after {\n display: inline-block;\n -webkit-font-smoothing: antialiased;\n font: normal 20px/30px \"dashicons\";\n vertical-align: top;\n margin: 1px 0 0 0;\n padding: 0; }\n .edd-mobile-link a:before {\n content: \"\\f470\";\n color: #757575;\n margin-right: -3px; }\n .edd-mobile-link a:after {\n content: \"\\f504\"; }\n\n#edd-submit-refund-status {\n text-align: center;\n font-size: 1.2em; }\n #edd-submit-refund-status .edd-submit-refund-message:before {\n font-family: dashicons;\n font-size: 1.5em;\n vertical-align: middle;\n color: #fff;\n border-radius: 16px;\n margin: 5px; }\n #edd-submit-refund-status .edd-submit-refund-message.success:before {\n content: \"\\f147\";\n background-color: #008a20;\n padding-right: 1px; }\n #edd-submit-refund-status .edd-submit-refund-message.fail {\n display: block;\n margin-bottom: 16px; }\n #edd-submit-refund-status .edd-submit-refund-message.fail::before {\n content: \"\\f335\";\n background-color: #d63638; }\n\n.refunditems td,\n.refunditems th.check-column {\n vertical-align: baseline; }\n\n.refunditems .column-amount,\n.refunditems .column-quantity,\n.refunditems .column-subtotal,\n.refunditems .column-tax,\n.refunditems .column-discount,\n.refunditems .column-total {\n width: 80px; }\n\n.refunditems .edd-form-group__control {\n display: flex;\n align-items: center; }\n .refunditems .edd-form-group__control input {\n background-color: transparent;\n border: 0;\n border-bottom: 1px solid;\n border-radius: 0;\n box-shadow: none;\n text-align: right;\n width: 100%; }\n .refunditems .edd-form-group__control input:disabled {\n border-bottom: none; }\n .refunditems .edd-form-group__control input:focus {\n border-bottom: 1px solid var(--wp-admin-theme-color-darker-10);\n box-shadow: 0 1px 0 var(--wp-admin-theme-color-darker-10); }\n .refunditems .edd-form-group__control .is-before + span > input {\n text-align: left; }\n\n.refunditems .edd-refund-submit-line-total {\n background-color: #fff !important; }\n .refunditems .edd-refund-submit-line-total td {\n text-align: right; }\n\n.refunditems .edd-refund-submit-line-total-amount {\n display: inline-block;\n margin-left: 20px;\n text-align: left;\n width: 80px; }\n\n.refunditems #edd-refund-submit-subtotal td {\n border-top: 2px solid #c3c4c7; }\n\n@media screen and (max-width: 782px) {\n .refunditems td.column-total {\n margin-bottom: 16px; }\n .refunditems .edd-refund-submit-line-total-amount {\n padding-right: 16px;\n width: unset; } }\n\n.edd-submit-refund-actions {\n margin: 16px 0 0; }\n\n.did-refund .refunditems,\n.did-refund .edd-submit-refund-actions {\n display: none; }\n\n/**\n * Notes:\n *\n * [1] Backwards compatibility for vertical tabs < 3.0\n */\n.edd-hidden {\n display: none; }\n\n.edd-clearfix:after {\n content: \"\";\n display: table;\n clear: both; }\n\n.edd-wrap a,\n.edd-notice .notice-dismiss {\n text-decoration: none; }\n\n/**\n * Tag specificity should not be needed, but cannot\n * safely be removed for fear of breaking even more things.\n */\n.wp-core-ui .edd-delete,\na.edd-delete {\n color: #a00; }\n\n.wp-core-ui .edd-delete:hover,\na.edd-delete:hover {\n color: #f00; }\n\n/* General Settings Styles\n-------------------------------------------------------------- */\n.edd_datepicker {\n height: 29px; }\n\n.edd-from-to-wrapper input {\n width: 105px;\n margin: 0;\n position: relative;\n z-index: 1; }\n\n.edd-from-to-wrapper input[name*=\"start\"],\n.edd-from-to-wrapper input[name=\"filter_from\"] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n\n.edd-from-to-wrapper input[name*=\"end\"],\n.edd-from-to-wrapper input[name=\"filter_to\"] {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n\n.edd-from-to-wrapper input:focus {\n z-index: 2;\n position: relative; }\n\n.edd-settings-sub-nav {\n margin: 0 0px 10px 0;\n width: 100%;\n border-bottom: 1px solid #ccc;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); }\n\n.edd-settings-sub-nav a {\n padding: 13px;\n display: block; }\n\n.edd-settings-sub-nav a.current {\n border-bottom: 4px solid #000;\n padding-bottom: 9px; }\n\n.admin-color-fresh .edd-settings-sub-nav a.current {\n border-bottom-color: #00a0d2; }\n\n/* Blue */\n.admin-color-blue .edd-settings-sub-nav a.current {\n border-bottom-color: #096484; }\n\n/* Coffee */\n.admin-color-coffee .edd-settings-sub-nav a.current {\n border-bottom-color: #c7a589; }\n\n/* Ectoplasm */\n.admin-color-ectoplasm .edd-settings-sub-nav a.current {\n border-bottom-color: #a3b745; }\n\n/* Midnight */\n.admin-color-midnight .edd-settings-sub-nav a.current {\n border-bottom-color: #e14d43; }\n\n/* Ocean */\n.admin-color-ocean .edd-settings-sub-nav a.current {\n border-bottom-color: #627c83; }\n\n/* Sunrise */\n.admin-color-sunrise .edd-settings-sub-nav a.current {\n border-bottom-color: #be3631; }\n\n/* Light */\n.admin-color-light .edd-settings-sub-nav a.current {\n border-bottom-color: #888; }\n\n/* bbPress Color Schemes */\n/* Evergreen */\n.admin-color-evergreen .edd-settings-sub-nav a.current {\n border-bottom-color: #36533f; }\n\n/* Mint */\n.admin-color-mint .edd-settings-sub-nav a.current {\n border-bottom-color: #4f6d59; }\n\n.download_page_edd-settings .edd-check-wrapper {\n clear: both; }\n\n.download_page_edd-settings .edd-check-wrapper label {\n margin: -2px 0 3px 0;\n display: inline-block;\n vertical-align: initial; }\n\n.download_page_edd-settings .form-table tr > th > strong,\n.download_page_edd-settings .form-table tr > th > h3 {\n font-size: 1.2em;\n font-weight: 600;\n margin: 0 auto; }\n\n.edd-sortable-list {\n margin: 0;\n width: 300px;\n position: relative; }\n\n.edd-sortable-list li {\n margin: 0;\n padding: 0;\n position: relative;\n height: 28px;\n cursor: move; }\n\n.edd-sortable-list li label * {\n vertical-align: middle; }\n\n.edd-sortable-list li label:after {\n display: block;\n width: 17px;\n height: 17px;\n position: absolute;\n right: 6px;\n top: 0px;\n color: #aaa;\n font-family: dashicons;\n font-size: 17px;\n content: '\\f228';\n cursor: move; }\n\n.form-table .edd-sortable-list li label {\n display: block;\n height: 28px;\n padding: 0;\n margin: 0; }\n\n.edd-sortable-list .payment-icon {\n width: 32px;\n height: 24px;\n position: relative;\n top: -2px;\n margin-right: 5px; }\n\n/* Tooltips */\n.edd-help-tip {\n cursor: help;\n margin-top: -2px;\n font-size: 24px;\n color: grey; }\n\n.edd-ui-tooltip {\n position: absolute;\n background: #333 !important;\n border-width: 1px !important;\n border-radius: 3px !important;\n box-shadow: 1px 1px 2px 1px rgba(214, 214, 214, 0.5) !important;\n color: #dedede !important;\n max-width: 300px !important;\n padding: 7px !important;\n text-rendering: optimizeLegibility;\n text-shadow: none !important;\n z-index: 9999 !important; }\n\n/* =Payment Icon Styling\n-------------------------------------------------------------- */\n.download_page_edd-settings .edd-settings-payment-icon-wrapper {\n margin-top: 5px; }\n\n.download_page_edd-settings .edd-settings-payment-icon-wrapper input {\n margin-top: 1px; }\n\n.download_page_edd-settings .form-table .edd-settings-payment-icon-wrapper input[type=\"checkbox\"] + label {\n margin: 0;\n display: inline-block; }\n\n.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-icon-image {\n margin-right: 5px;\n width: 32px;\n display: inline-block;\n vertical-align: middle; }\n\n.download_page_edd-settings .edd-settings-payment-icon-wrapper .payment-option-name {\n vertical-align: middle; }\n\n/* =Tax Settings Style\n-------------------------------------------------------------- */\n.download_page_edd-settings .taxrates th,\n.download_page_edd-settings .taxrates td {\n padding: 8px 10px; }\n\n.download_page_edd-settings .taxrates td {\n line-height: 1.5em;\n vertical-align: top;\n margin: 0; }\n\n.download_page_edd-settings .taxrates .regular-text {\n width: 100%; }\n\n/* =Add Ons Styles\n-------------------------------------------------------------- */\n.edd-add-ons-footer {\n padding-top: 10px; }\n\n#edd-add-ons .subsubsub .dashicons {\n margin-top: 3px; }\n\n#edd-add-ons .edd-add-ons-container {\n clear: both;\n padding-top: 10px; }\n\n#edd-add-ons .search-box .button-secondary span {\n margin: 2px -5px 0 4px;\n padding: 0;\n color: #aaa; }\n\n#edd-add-ons .edd-extension {\n background: #fff;\n border: 1px solid #ccc;\n float: left;\n padding: 14px;\n position: relative;\n margin: 0 15px 16px 0;\n width: 320px;\n height: 315px;\n opacity: 0.9;\n transition: all .2s ease-in-out;\n cursor: default; }\n\n#edd-add-ons .edd-extension:hover {\n border: 1px solid #bbb;\n opacity: 1;\n transform: scale(1.05);\n z-index: 5; }\n\n#edd-add-ons .edd-extension h3 {\n font-size: 13px;\n margin: 0 0 8px; }\n\n#edd-add-ons .edd-extension .button-secondary {\n position: absolute;\n bottom: 14px;\n left: 14px; }\n\n#edd-add-ons .edd-browse-all {\n clear: both;\n width: 100%; }\n\n#edd-add-ons .edd-extension .third-party {\n display: none; }\n\n#edd-add-ons .edd-add-ons-container .edd-extension:first-child {\n background-color: #85c0e5;\n border-color: #62a9d7;\n color: #fff;\n box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); }\n\n#edd-add-ons .edd-add-ons-container .edd-extension:first-child h3 {\n color: #fff; }\n\n/* Mock blue \"Primary\" styling on Starter Package */\n#edd-add-ons .edd-add-ons-container .edd-extension:first-child .button-secondary {\n background: #0085ba;\n border-color: #0073aa #006799 #006799;\n box-shadow: 0 1px 0 #006799;\n color: #fff;\n text-decoration: none;\n text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799; }\n\n#edd-add-ons .edd-extension .wp-post-image {\n width: 100%;\n height: auto;\n vertical-align: bottom; }\n\n/* Insert Download\n-------------------------------------------------------------- */\n#TB_window {\n overflow: hidden; }\n\n#TB_title {\n padding: 5px; }\n\n#TB_ajaxContent {\n width: calc(100% - 30px) !important;\n padding: 15px;\n margin: 0;\n height: calc(100% - 118px) !important; }\n\n#TB_ajaxWindowTitle {\n font-size: 18px;\n font-weight: 600;\n line-height: 30px; }\n\n#TB_closeWindowButton {\n right: 6px;\n top: 6px; }\n\n#choose-download-wrapper {\n width: 100%; }\n\n#choose-download-wrapper .wrap {\n overflow-y: scroll;\n margin: 0;\n padding: 0;\n height: calc(100% - 50px); }\n\n#choose-download-wrapper .submit-wrapper {\n position: absolute;\n width: 100%;\n bottom: 0;\n padding: 0;\n margin: 0 0 0 -15px;\n text-align: right; }\n\n#choose-download-wrapper .submit-wrapper div {\n background-color: #fafafa;\n padding: 15px;\n border-top: 1px solid #ddd; }\n\n/* Media Buttons Styles\n-------------------------------------------------------------- */\n.wp-media-buttons .button.edd-thickbox {\n padding-left: 0; }\n\n.wp-media-buttons .button.edd-email-tags-inserter .dashicons {\n margin-top: -2px; }\n\n/* Add/View Order Styles\n-------------------------------------------------------------- */\n/** Mimic WordPress 5.0 block-editor header region styles. */\n.download_page_edd-payment-history .edit-post-editor-regions__header {\n flex-shrink: 0;\n height: auto;\n border-bottom: 1px solid #e2e4e7;\n z-index: 30;\n position: -webkit-sticky;\n position: sticky;\n top: 32px;\n /** EDD-specific */\n margin-left: -20px; }\n\n@media screen and (max-width: 782px) {\n .download_page_edd-payment-history .edit-post-editor-regions__header {\n position: initial;\n top: 46px; } }\n\n.download_page_edd-payment-history .edit-post-header {\n height: 56px;\n padding: 4px 2px;\n background: #fff;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: center;\n /** EDD-specific */\n max-width: 100%;\n box-sizing: border-box;\n padding-left: 20px;\n padding-right: 20px; }\n\n@media screen and (max-width: 782px) {\n .download_page_edd-payment-history .edit-post-header {\n padding-left: 10px;\n padding-right: 10px; } }\n\n@media (min-width: 280px) {\n .download_page_edd-payment-history .edit-post-header {\n flex-wrap: nowrap; } }\n\n.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar {\n order: 0; }\n\n.download_page_edd-payment-history .edit-post-header .edit-post-header__settings {\n order: 1; }\n\n.download_page_edd-payment-history .edit-post-header #publishing-action,\n.download_page_edd-payment-history .edit-post-header .edit-post-header__toolbar,\n.download_page_edd-payment-history .edit-post-header .edit-post-header__settings {\n display: flex;\n align-items: center; }\n\n.download_page_edd-payment-history .edit-post-header #publishing-action .spinner {\n margin: 0 5px 0 0; }\n\n.download_page_edd-payment-history .edit-post-header .button-primary {\n margin: 2px;\n height: 34px;\n line-height: 32px;\n font-size: 13px; }\n\n#edd-order-items .hndle {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n\n#edd-order-items .hndle .edd-toggle {\n font-weight: normal; }\n\n.edd-add-order-item td {\n vertical-align: middle; }\n\n.edd-add-order-item input {\n width: 80%; }\n\n.edd-add-order-item input[readonly] {\n color: #555;\n background: none;\n border: 1px solid transparent;\n box-shadow: none; }\n\n.order-customer-info .customer-details-wrap {\n margin: 15px 0;\n align-items: center; }\n\n.order-customer-info .customer-details-wrap .spinner {\n margin: 0; }\n\n.order-customer-info .customer-details {\n display: flex;\n flex-direction: column; }\n\n.order-customer-info .customer-details .customer-since {\n color: #666;\n display: block;\n margin: 4px 0 6px; }\n\n.order-customer-info .customer-details > span {\n margin-bottom: 5px; }\n\n.edd-order-add-download-select .spinner {\n display: none; }\n\n/** Overview */\ntable.edd-order-overview-summary {\n border-width: 0;\n table-layout: fixed; }\n\ntable.edd-order-overview-summary--refund {\n border-width: 0; }\n\n@media screen and (min-width: 782px) {\n .edd-order-overview .column-right {\n text-align: right; } }\n\n.edd-ml-auto {\n margin-left: auto !important; }\n\n@media screen and (min-width: 782px) {\n .edd-ml-lg-auto {\n margin-left: auto !important; } }\n\n.edd-ml-auto + .edd-ml-auto {\n margin-left: 10px !important; }\n\n/** Items */\n.edd-order-overview-summary__items-name {\n align-self: flex-start; }\n\n.edd-order-overview-summary__items > :nth-child(odd) {\n background-color: #f9f9f9; }\n\n@media screen and (min-width: 782px) {\n .edd-order-overview-summary__items tr:last-child th,\n .edd-order-overview-summary__items tr:last-child td {\n border-bottom: 1px solid #e5e5e5; } }\n\n@media screen and (max-width: 782px) {\n .edd-order-overview-summary .row-actions > *,\n .edd-order-overview-summary__items-name .row-actions {\n display: block !important; }\n .edd-order-overview-summary .row-actions > *:not(:first-child):before {\n display: none; } }\n\n.edd-order-overview-summary th:not(.column-primary) {\n width: 100px; }\n\n.edd-order-overview-summary .row-actions > *:not(:first-child):before {\n color: #999;\n content: \" | \"; }\n\n.edd-order-overview-summary .row-actions .text {\n color: #555; }\n\n.edd-order-overview-summary .removable {\n display: flex;\n align-items: center;\n position: relative; }\n\n.edd-order-overview-summary .removable .delete {\n display: inline-block;\n margin-right: 10px;\n margin-left: -8px;\n padding: 10px;\n border-right: 1px solid #e5e5e5;\n color: #a00; }\n\n.edd-order-overview-summary .removable .delete:hover {\n color: #dc3232; }\n\n/** Adjustments */\n.edd-order-overview-summary__adjustments .column-primary {\n font-weight: 600; }\n\n.edd-order-overview-summary__adjustments td small {\n font-weight: normal; }\n\n/** Totals */\n.edd-order-overview-summary__subtotal .column-primary,\n.edd-order-overview-summary__tax tr:first-of-type .column-primary,\n.edd-order-overview-summary__total .column-primary {\n font-weight: 600; }\n\n.edd-order-overview-summary__subtotal td,\n.edd-order-overview-summary__adjustments td,\n.edd-order-overview-summary__tax td,\n.edd-order-overview-summary__total td {\n vertical-align: middle; }\n\n.edd-order-overview-summary__tax td small,\n.edd-order-overview-summary__total td small {\n font-weight: normal; }\n\n.edd-order-overview-summary__total .total {\n color: #017d5c;\n display: inline-block; }\n\n.edd-order-overview-summary__total .total.is-negative {\n color: #a00; }\n\n@media screen and (min-width: 783px) {\n .edd-order-overview-summary__adjustments .removable .delete {\n margin-left: -50px; }\n .edd-order-overview-summary__total .total {\n font-size: 150%;\n padding-top: 5px;\n padding-bottom: 5px; } }\n\n.edd-order-overview-summary__total tr:last-child th,\n.edd-order-overview-summary__total tr:last-child td:not(:first-of-type) {\n border-top: 1px solid #e5e5e5; }\n\n.edd-order-overview-summary__total .notice {\n margin: -1px; }\n\n.edd-order-overview-summary__total .notice p {\n font-weight: normal;\n margin: 0.5em 0; }\n\n/** Refunds */\n.edd-order-overview-summary__refunds .column-primary {\n font-weight: 600; }\n\n.edd-order-overview-summary__refunds td small {\n font-weight: normal; }\n\n.edd-order-overview-summary__refunds tr:first-child td {\n border-top: 1px solid #e5e5e5; }\n\n/** Actions */\n#edd-order-overview-actions.inside {\n border-top: 1px solid #ccd0d4;\n margin-top: 0;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n justify-content: space-between; }\n\n#edd-order-overview-actions.inside:empty {\n padding: 0;\n border-top: 0; }\n\n#edd-order-overview-actions.inside > div {\n display: flex;\n align-items: center; }\n\n.edd-order-overview-actions .button {\n width: 100%;\n margin-bottom: 12px; }\n\n.edd-order-overview-actions .button:last-of-type {\n margin-bottom: 0; }\n\n@media screen and (min-width: 782px) {\n .edd-order-overview-actions .button {\n width: auto;\n margin-left: 12px;\n margin-bottom: 0; }\n .edd-order-overview-actions .button:first-of-type {\n margin-left: auto; } }\n\n.edd-order-overview-actions__locked {\n font-style: italic;\n opacity: 0.80; }\n\n@media screen and (max-width: 782px) {\n .edd-order-overview-actions__locked {\n margin-bottom: 12px; } }\n\n.edd-order-overview-actions__refund .dashicons {\n margin-right: 8px; }\n\n/** Dialog */\n.edd-dialog .ui-button-icon-only {\n font-size: 0; }\n\n.download_page_edd-payment-history .ui-dialog,\n.download_page_edd-payment-history .ui-dialog-content {\n overflow: visible; }\n\n.edd-order-overview-modal form > p {\n margin-top: 0; }\n\n.edd-order-overview-modal fieldset legend,\n.edd-order-overview-modal form label {\n display: block;\n margin-bottom: 4px; }\n\n.edd-order-overview-modal fieldset {\n margin-bottom: calc(1em - 3px); }\n\n.edd-order-overview-modal fieldset > p {\n margin: 2px 0 3px; }\n\n.edd-order-overview-modal form .submit {\n margin: 0 -16px -16px;\n padding: 16px;\n background: #fcfcfc;\n border-top: 1px solid #dfdfdf;\n display: flex;\n align-items: center; }\n\n.edd-order-overview-modal form .submit .spinner {\n margin: 0; }\n\n.edd-order-overview-add-item [for=\"auto-calculate\"] {\n display: flex;\n align-items: center; }\n\n.edd-order-overview-add-item [for=\"auto-calculate\"] input[type=\"checkbox\"] {\n margin-top: 0; }\n\n.edd-order-overview-add-item [for=\"auto-calculate\"] .label {\n line-height: 1.15;\n margin-left: 8px; }\n\n.edd-order-overview-add-item [for=\"auto-calculate\"] .label small {\n margin-top: 4px;\n display: block;\n opacity: 0.75; }\n\n.edd-order-overview-add-adjustment .notice,\n.edd-order-overview-add-item .notice {\n margin: 0 0 1rem; }\n\n.edd-order-overview-add-adjustment #description,\n.edd-order-overview-add-discount select {\n width: 100%; }\n\n.edd-order-overview-error {\n font-style: italic;\n color: #a00;\n display: block;\n margin: 4px 0; }\n\n.edd-order-copy-download-link textarea {\n width: 100%; }\n\n/** Columns */\n.wp-list-table.orders .column-number .row-title {\n display: block; }\n\n/** Status labels */\n.edd-admin-order-status-badge {\n padding: 2px 7px;\n border-radius: 4px;\n background: #ececec;\n display: inline-flex;\n align-items: center; }\n\n.edd-admin-order-status-badge__icon {\n opacity: 0.80;\n margin: 0 -2px 0 2px; }\n\n.edd-admin-order-status-badge--refunded .edd-admin-order-status-badge__icon {\n font-size: 16px;\n width: 16px;\n height: 16px; }\n\n.edd-admin-order-status-badge--failed {\n color: #ac3d3d;\n background: #ffd6d6; }\n\n.edd-admin-order-status-badge--failed .edd-admin-order-status-badge__icon {\n margin-left: 0;\n margin-top: -1px; }\n\n.edd-admin-order-status-badge--complete {\n color: #017d5c;\n background: #e5f5f0; }\n\n.edd-admin-order-status-badge--complete .edd-admin-order-status-badge__icon {\n margin-left: 0px; }\n\n.edd-admin-order-status-badge--pending {\n color: #7d6e01;\n background: #f5f2e5; }\n\n.edd-admin-order-status-badge--processing {\n color: #015a7d;\n background: #e5f1f5; }\n\n.wp-list-table.orderitems .refunded .edd-admin-order-status-badge {\n margin-left: 10px; }\n\n.edd-order-resend-email-chooser legend {\n font-weight: bold;\n margin-bottom: 4px; }\n\n.edd-order-resend-email-chooser p {\n margin: 4px 0; }\n\n/* Note Styles\n-------------------------------------------------------------- */\n.edd-notes .edd-note {\n padding: 10px;\n background-color: #ffffee;\n border: 1px solid #cccc00;\n width: 100%;\n position: relative;\n margin-bottom: 10px;\n box-sizing: border-box;\n overflow: hidden; }\n\n.edd-notes .edd-note.deleting {\n opacity: 0.5; }\n\n.edd-notes .edd-note__header {\n display: flex;\n align-items: center; }\n\n.edd-add-note .spinner {\n float: none;\n display: inline-block;\n margin: 0; }\n\n.edd-notes .edd-note time {\n font-size: 11px;\n color: #aaa; }\n\n.edd-notes .edd-note .edd-note-author {\n margin-right: 5px; }\n\n.edd-notes .edd-note .edd-delete-note {\n color: #a00;\n font-weight: bold;\n text-decoration: none;\n margin-left: auto; }\n\n.edd-notes .edd-note .edd-delete-note:hover {\n color: #888; }\n\n.edd-notes .edd-note p:last-child {\n margin-bottom: 0; }\n\n.edd-notes .edd-no-notes {\n margin: 4px 0 10px 0; }\n\ntextarea[name=\"edd-note\"] {\n width: 100%;\n min-height: 70px;\n margin-top: 0; }\n\n.edd-notes-wrapper {\n width: 80%; }\n\n.edd-note-pagination {\n float: right;\n margin: -35px 5px 15px 5px; }\n\n.edd-note-pagination a,\n.edd-note-pagination span.page-numbers {\n padding: 5px 8px;\n margin: 2px;\n text-decoration: none; }\n\n.edd-note-pagination a {\n border: 1px solid #e5e5e5;\n background: #fcfcfc; }\n\n.edd-note-pagination a:last-child,\n.edd-note-pagination span.page-numbers:last-child {\n margin-right: 0; }\n\n/* Discount Code Styles\n-------------------------------------------------------------- */\n#edd-products {\n height: 100px;\n min-width: 200px; }\n\n#edd-add-discount input[type=\"text\"],\n#edd-edit-discount input[type=\"text\"] {\n width: 300px; }\n\n#edd-add-discount .edd-discount-datetime input,\n#edd-edit-discount .edd-discount-datetime input {\n vertical-align: middle; }\n\n#edd-add-discount input[type=\"text\"].edd_datepicker,\n#edd-edit-discount input[type=\"text\"].edd_datepicker {\n display: inline-block;\n width: 183px; }\n\n#edd-edit-discount textarea {\n height: 100px; }\n\n.edd-amount-type-wrapper {\n position: relative;\n display: flex; }\n\n.edd-amount-type-wrapper select {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n width: auto !important; }\n\n.edd-amount-type-wrapper #edd-amount {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n margin-right: -2px;\n padding: 0 8px;\n width: unset;\n max-width: 125px; }\n\n.edd-amount-type-wrapper input:focus {\n z-index: 2; }\n\n/* List Tables\n-------------------------------------------------------------- */\n.wp-list-table.customers .column-primary strong,\n.wp-list-table.emails .column-primary strong,\n.wp-list-table.addresses .column-primary strong,\n.wp-list-table.discounts .column-primary strong,\n.wp-list-table.orders .column-primary strong,\n.wp-list-table.orderitems .column-primary strong,\n.wp-list-table.orderadjustments .column-primary strong {\n font-size: 14px; }\n\n.wp-list-table.emails .column-customer .avatar,\n.wp-list-table.customers .column-primary .avatar {\n float: left;\n margin-right: 10px;\n margin-top: 1px;\n border-radius: 5px; }\n\n/* Row Actions\n-------------------------------------------------------------- */\n.wp-list-table .row-actions span.activate a {\n color: green; }\n\n.wp-list-table .row-actions span.refund a {\n color: #836fff; }\n\n.wp-list-table .row-actions span.cancel a {\n color: #cc8c00; }\n\n.wp-list-table .row-actions span.cancel a:hover,\n.wp-list-table .row-actions span.refund a:hover {\n opacity: 0.8; }\n\n.wp-list-table .type-download .row-actions {\n color: #999; }\n\n/* Nav Tab Styles\n-------------------------------------------------------------- */\n#edd-add-ons {\n margin: 9px 20px -9px 2px; }\n\n.no-js.edit-tags-php.post-type-download .wp-heading-inline {\n position: absolute;\n top: 0; }\n\n.no-js.edit-tags-php.post-type-download .nav-tab-wrapper {\n margin-top: 50px; }\n\n.edit-tags-php.post-type-download .wrap .nav-tab-wrapper .page-title-action,\n.edit-php.post-type-download .wrap .nav-tab-wrapper .page-title-action,\n.download_page_edd-customers .wrap .nav-tab-wrapper .page-title-action,\n.download_page_edd-discounts .wrap .nav-tab-wrapper .page-title-action,\n.download_page_edd-payment-history .wrap .nav-tab-wrapper .page-title-action {\n top: 3px;\n margin-left: 10px;\n line-height: 24px; }\n\n#edd_product_settings .edd-product-options__title,\n#edd_product_settings .inside strong {\n border-top: 1px solid #eee;\n border-bottom: 1px solid #eee;\n background-color: #f9f9f9;\n display: block;\n font-weight: 600;\n margin: 12px -12px;\n padding: 8px 12px; }\n\n#edd_product_settings .edd-product-settings-wrapper:first-of-type .edd-product-options__title,\n#edd_product_settings .inside div:first-child strong {\n margin-top: -8px; }\n\n#edd_product_settings .edd-product-options__title .edd-help-tip,\n#edd_product_settings .inside strong .edd-help-tip {\n float: right;\n font-size: 20px;\n line-height: 1.3; }\n\n#edd_product_settings .label--block {\n display: block;\n margin: 0 0 4px; }\n\n/* Payment History Styles\n-------------------------------------------------------------- */\n#edd-payments-filter ul.subsubsub {\n margin-bottom: 8px; }\n\ntr.status-refunded td {\n background: #cecece;\n border-top-color: #ccc; }\n\nmarquee {\n padding: 0;\n margin: 0; }\n\n@media handheld, only screen and (max-width: 640px) {\n .wp-list-table.downloads th {\n width: auto !important; } }\n\n#edd-download-link-textarea {\n width: 100%; }\n\n/* Metabox Styles\n-------------------------------------------------------------- */\n.edd_files_name_label {\n width: 225px;\n float: left; }\n\n.edd_files_url_label {\n width: 220px;\n float: left; }\n\n#postbox-container-1 .edd_files_name_label {\n width: 80px; }\n\n#postbox-container-1 .edd_files_url_label {\n width: 80px; }\n\n#edd_product_prices .inside,\n#edd_product_files .inside {\n margin-bottom: 0; }\n\n.edd_repeatable_row.ui-sortable-placeholder {\n line-height: 0;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n border: 1px dashed #ddd;\n visibility: visible !important; }\n\n.edd-add-repeatable-row {\n border-top: 1px solid #ddd;\n background: #fafafa;\n padding: 12px;\n margin: 15px -12px -12px -12px;\n text-align: right; }\n\n.edd_repeatable_row input[type=\"text\"].large-text {\n width: 100%; }\n\n.edd_repeatable_row input[type=\"text\"] {\n height: 28px; }\n\n.edd-add-repeatable-row button {\n text-align: left; }\n\n.edd_variable_prices_wrapper:not(:first-child),\n.edd_repeatable_upload_wrapper:not(:first-child) {\n margin-top: 12px; }\n\n.edd_repeatable_row.ui-sortable-helper .edd-repeatable-row-actions .edd-remove-row {\n display: none; }\n\n.edd-repeatable-row-actions {\n color: #777;\n font-size: 12px; }\n\n.edd-repeatable-row-actions a {\n text-decoration: none;\n font-size: 11px;\n line-height: 11px;\n width: auto;\n cursor: pointer;\n vertical-align: middle; }\n\n.edd-repeatable-row-header,\n.edd-bundle-products-header {\n clear: both;\n background: #f1f1f1;\n border: 1px solid #e5e5e5; }\n\n.edd-repeatable-row-header {\n cursor: move; }\n\n.edd_repeatable_row:hover .edd-repeatable-row-header,\n.edd_repeatable_row:hover .edd-repeatable-row-standard-fields {\n border-color: #ccc; }\n\n.edd-repeatable-row-header:before,\n.edd-repeatable-row-header:after,\n.edd-bundled-product-row:before,\n.edd-bundled-product-row:after {\n content: '';\n display: table; }\n\n.edd-repeatable-row-header:after,\n.edd-bundled-product-row:after {\n clear: both; }\n\n.edd-repeatable-row-title {\n float: left;\n font-weight: 600; }\n\n.edd-bundled-product-item-reorder .edd-product-file-reorder {\n color: #e5e5e5;\n font-family: \"dashicons\";\n content: \"\\f545\";\n font-size: 18px;\n font-weight: 300;\n margin-left: 4px;\n vertical-align: top;\n transition: .2s color; }\n\n.edd-bundled-product-item-reorder .edd-product-file-reorder:hover {\n color: #bbb; }\n\n.edd-repeatable-row-title,\n.edd-repeatable-row-actions {\n padding: 8px;\n box-sizing: border-box; }\n\n.edd-repeatable-row-actions {\n float: right;\n text-align: right;\n padding: 8px; }\n\n.edd-repeatable-row-actions .edd-remove-row,\n.edd-bundled-product-row .edd-remove-row {\n font-size: 12px;\n width: auto;\n cursor: pointer; }\n\n.edd-repeatable-row-standard-fields,\n.edd-bundled-product-row {\n background: #f9f9f9;\n padding: 8px;\n border-width: 0 1px 1px;\n border-style: solid;\n border-color: #e5e5e5;\n display: flex;\n justify-content: space-between;\n gap: 18px; }\n\n/* @todo: remove these when .edd-form-row has been fully implemented */\n.edd-repeatable-row-standard-fields .edd-form-group,\n.edd-bundled-product-row .edd-form-group {\n margin-bottom: 0;\n display: inline-flex;\n flex-direction: column;\n flex-grow: 1;\n justify-content: space-between; }\n\n.edd-repeatable-row-setting-label {\n display: block;\n margin-bottom: 4px; }\n\n.edd-repeatable-row-setting-label .edd-help-tip {\n display: inline-block;\n margin-left: 4px; }\n\n.edd-bundle-products-header {\n font-weight: 600;\n padding: 8px; }\n\n.edd-bundled-product-row .edd-bundled-product-item-reorder {\n min-width: 30px; }\n\n.edd-bundled-product-row .edd-bundled-product-item-reorder .edd-product-file-reorder {\n font-size: 20px;\n font-weight: 300;\n padding: 16px 4px 0;\n cursor: move; }\n\n.edd-bundled-product-row .edd-bundled-product-actions {\n margin-left: 24px;\n align-self: center; }\n\n.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container {\n position: relative;\n width: 100%; }\n\n.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container + span:first-child {\n width: 100%; }\n\n.edd_repeatable_upload_field {\n padding-right: 32px; }\n\n.edd_upload_file button {\n background: #f9f9f9;\n border: none;\n border-left: 1px solid #e5e5e5;\n display: block;\n padding: 0;\n position: absolute;\n height: calc(100% - 4px);\n width: 26px;\n overflow: hidden;\n top: 2px;\n right: 2px;\n display: inline-flex;\n justify-content: center;\n align-items: center; }\n\ntextarea#edd-payment-note {\n width: 100%;\n height: 4em;\n margin: 0; }\n\n#edd-order-items .row .edd-purchased-files-list-wrapper .download {\n line-height: 1.4; }\n\n#edd-order-items .edd-purchased-files-list-wrapper .edd-purchased-option {\n color: #666; }\n\ninput[class*=\"edd-price-field\"] {\n max-width: 125px; }\n\n[class*=\"item_\"] [class*=\"edd-payment-details-download-\"][type=\"number\"].small-text,\n#edd-order-download-quantity[type=\"number\"].small-text,\n#edd-order-download-tax[type=\"text\"].small-text {\n height: 25px; }\n\n.item_price .edd-payment-details-download-quantity[type=\"number\"].small-text,\n#edd-order-download-quantity[type=\"number\"].small-text {\n width: 55px; }\n\n.item_tax .edd-payment-details-download-item-tax[type=\"number\"].small-text,\n#edd-order-download-tax[type=\"text\"].small-text {\n width: 80%;\n max-width: 125px; }\n\n.edd_repeatable_upload_wrapper .pricing select,\n.edd_repeatable_product_wrapper .edd-select {\n min-width: 100%; }\n\n#edd_product_notes_field {\n display: block;\n margin: 12px 0 0;\n height: 4em;\n width: 100%; }\n\n/* still used by extensions - Software Licensing upgrade paths, Custom Prices */\n.edd_remove_repeatable {\n border: none;\n cursor: pointer;\n display: inline-block;\n padding: 0;\n overflow: hidden;\n margin: 8px 0 0 0;\n text-indent: -9999px;\n width: 10px;\n height: 10px; }\n\n.edd_remove_repeatable:active,\n.edd_remove_repeatable:hover,\n.edd_remove_repeatable:focus {\n background-position: -10px 0 !important; }\n\n/* Payment Details\n-------------------------------------------------------------- */\n.edd-metabox-title-action {\n margin: 0;\n float: right;\n padding: 4px 8px;\n position: relative;\n top: -1px;\n text-decoration: none;\n border: none;\n border: 1px solid #ccc;\n border-radius: 2px;\n background: #f7f7f7;\n text-shadow: none;\n font-weight: 600;\n font-size: 10px;\n line-height: normal;\n color: #0073aa;\n cursor: pointer;\n outline: 0; }\n\n.edd-metabox-title-action:hover {\n border-color: #008EC2;\n background: #00a0d2;\n color: #fff; }\n\n.edd-edit-purchase-element .tablenav {\n padding: 2px 10px 8px 10px; }\n\n.edd-edit-purchase-element .edd-order-children-wrapper {\n margin: 0 -1px; }\n\n.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 table {\n border-top: none;\n border-bottom: none; }\n\n.edd-edit-purchase-element .edd-order-children-wrapper.child-count-0 .tablenav {\n display: none; }\n\n.edd-edit-purchase-element[class*=\"columns-\"] ul li {\n padding-right: 1%; }\n\n#edd-edit-order-form .columns-4 .column:nth-child(2n+1),\n#edd-edit-order-form .columns-5 .column:nth-child(3n+1),\n#edd-edit-order-form .column:nth-child(2n+1) {\n margin-right: 0; }\n\n#edd-edit-order-form input.large-text {\n width: 90%; }\n\n.edd-edit-purchase-element ul li.item_price {\n width: 15%; }\n\n.edd-edit-purchase-element ul li.item_price.item_quantity {\n width: 25%; }\n\n.edd-edit-purchase-element ul li.item_tax {\n width: 15%; }\n\n.edd-edit-purchase-element ul li.price {\n width: 20%; }\n\n.edd-admin-box-inside {\n border-bottom: 1px solid #f1f1f1;\n clear: both;\n padding: 12px;\n margin: 0;\n word-wrap: break-word; }\n\n.edd-admin-box-inside--row {\n display: flex;\n flex-wrap: wrap;\n word-break: break-all;\n justify-content: space-between;\n align-items: center; }\n\n.edd-admin-box-inside > p {\n margin: 8px 3px; }\n\n.edd-admin-box-inside .strong {\n font-weight: 600; }\n\n.edd-admin-box div:not(.edd-admin-box-inside--row) .label {\n display: block;\n margin-bottom: 4px;\n margin-right: 0; }\n\n.edd-admin-box .label--has-tip {\n display: flex;\n align-items: center; }\n\n.edd-admin-box .label--has-tip .edd-help-tip {\n margin-top: 0;\n font-size: 20px; }\n\n.edd-admin-box div:not(.edd-admin-box-inside--row) .label--has-checkbox {\n margin-bottom: 0; }\n\n.edd-payment-fees .fee-label {\n color: #666;\n font-weight: normal; }\n\n.edd-admin-box .right {\n float: right; }\n\n#edd-order-refunds-list {\n padding-left: 25px; }\n\n#poststuff .edd-order-data .inside {\n margin: 0;\n padding: 0; }\n\n.edd-order-data .edd-select-chosen {\n width: 130px !important; }\n\n.edd-order-data input.edd_datepicker {\n width: 180px; }\n\n.edd-order-data input[type=\"number\"].edd-payment-time-hour,\n.edd-order-data input[type=\"number\"].edd-payment-time-min {\n width: 50px; }\n\n.edd-order-data .edd-tax-rate {\n color: #9c9c9c;\n font-style: italic;\n padding: 5px; }\n\n#edd_general_logs p {\n margin: 0;\n padding: 0; }\n\n.edd-admin-box-inside span.label {\n margin-right: 10px; }\n\n#edd-order-resend-receipt .inside {\n margin-top: 11px; }\n\n#edd-order-resend-receipt .edd-order-resend-receipt-addresses {\n margin-top: 10px; }\n\n.edd-order-resend-receipt-header {\n font-size: 14px;\n line-height: 1.4; }\n\n.edd-order-resend-receipt-addresses label {\n display: block;\n line-height: 1.75em; }\n\n.edd-order-resend-receipt-addresses label:last-child {\n margin-bottom: 10px; }\n\n.edd-admin-box-inside:last-child {\n border-bottom: 0; }\n\n#edd-edit-order-form .data-payment-key {\n word-break: break-all; }\n\n.edd-order-update-box #major-publishing-actions .button-secondary {\n margin-right: 10px; }\n\n.edd-order-update-box .button-primary {\n margin-right: 0; }\n\n.edd-edit-purchase-element .edd-select-chosen {\n width: 196px; }\n\n.edd-edit-purchase-element ul {\n clear: both;\n display: block; }\n\n#edd-customer-details .actions {\n float: right; }\n\n.order-data-address h3 {\n margin: 0 0 10px 0; }\n\n.order-data-address #edd-order-address-state-wrap,\n.order-data-address #edd-order-address-country-wrap {\n display: inline-block;\n width: 50%;\n max-width: 300px; }\n\n.edd-order-data input.small-text {\n margin: 0; }\n\n.edd-order-data input.med-text {\n margin: 0;\n width: 100px; }\n\n.edd-edit-purchase-element ul li {\n display: block;\n line-height: 1.4;\n position: relative;\n margin: 0;\n vertical-align: middle;\n font-size: 13px; }\n\n.edd-edit-purchase-element .row {\n padding: 12px; }\n\n.edd-edit-purchase-element .row:not(:last-child) {\n border-bottom: 1px solid #eee; }\n\n.edd-edit-purchase-element .row:nth-child(odd):not(.header) {\n background-color: #f9f9f9; }\n\n.edd-edit-purchase-element .row.header {\n padding: 6px 12px;\n font-weight: 600;\n vertical-align: top; }\n\n.edd-edit-purchase-element ul {\n margin: 0 0 15px; }\n\n.edd-edit-purchase-element ul:last-of-type {\n margin-bottom: 0; }\n\n#edd-order-data .data span {\n color: #666;\n font-weight: 600; }\n\n.edd-edit-purchase-element .inside {\n padding: 12px; }\n\n.edd-edit-purchase-element .edd-purchased-download-title {\n font-size: 14px;\n font-weight: 500; }\n\n.edd-edit-purchase-element .edd-purchased-download-title .deleted {\n color: #777; }\n\n.edd-edit-purchase-element .edd-purchased-download-actions {\n color: #777;\n line-height: 1.4; }\n\n.edd-edit-purchase-element .edd-purchased-download-actions .edd-purchased-download-actions-label {\n font-weight: 500; }\n\n.edd-edit-purchase-element .edd-purchased-download-actions a {\n color: #777;\n font-size: 12px; }\n\n.edd-edit-purchase-element .edd-purchased-download-actions a:hover {\n color: #444; }\n\n.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download {\n color: #a00; }\n\n.edd-edit-purchase-element .edd-purchased-download-actions .edd-order-remove-download:hover {\n color: #f00; }\n\n.edd_repeatable_upload_wrapper .pricing select,\n.edd_repeatable_product_wrapper .edd-select,\n#edd_products .edd-select {\n min-width: 100%;\n max-width: 200px; }\n\n.edd_repeatable_product_wrapper td {\n overflow: visible; }\n\n.edd-add-download-to-purchase,\n.edd-add-adjustment-to-purchase {\n padding: 15px;\n border-top: 1px solid #e5e5e5;\n background-color: #f5f5f5; }\n\n.edd-add-download-to-purchase .chosen-container,\n.edd-add-adjustment-to-purchase .chosen-container {\n width: 90% !important;\n max-width: 220px !important; }\n\n.edd-add-download-to-purchase .spinner,\n.edd-add-adjustment-to-purchase .spinner {\n margin: 0;\n float: none; }\n\n.edd-add-download-to-purchase .edd-add-order-quantity {\n width: 40px;\n height: 29px;\n vertical-align: middle; }\n\n.edd-add-download-to-purchase .edd-add-order-item-button,\n.edd-add-adjustment-to-purchase .edd-add-adjustment-button,\n.edd-add-adjustment-to-purchase input[type=\"text\"] {\n height: 29px; }\n\n@media screen and (max-width: 1284px) {\n .edd-edit-purchase-element .edd-purchased-download-title {\n font-size: 16px; }\n .edd-edit-purchase-element ul li.item_price {\n width: 22%; }\n .edd-edit-purchase-element ul li.item_price.item_quantity {\n width: 35%; }\n .edd-edit-purchase-element ul li.item_tax {\n width: 25%; }\n .edd-edit-purchase-element ul li.price {\n width: 20%; }\n .edd-edit-purchase-element .edd-purchased-download-actions {\n padding-top: 10px; } }\n\n@media screen and (max-width: 1024px) {\n .edd-edit-purchase-element ul li.item_price.item_quantity {\n width: 40%; }\n .edd-edit-purchase-element ul li.price {\n width: 24%; }\n .edd-edit-purchase-element .edd-purchased-download-actions {\n padding-top: 15px; }\n .edd-edit-purchase-element .edd-purchased-download-actions,\n .edd-edit-purchase-element .edd-purchased-download-actions a {\n font-size: 14px; } }\n\n@media screen and (max-width: 782px) {\n .edd-edit-purchase-element ul li.item_price,\n .edd-edit-purchase-element ul li.item_price.item_quantity {\n padding-bottom: 10px; }\n .edd-edit-purchase-element ul li.item_price.item_quantity {\n width: 35%; }\n .edd-edit-purchase-element ul li.item_tax,\n .edd-edit-purchase-element ul li.price {\n width: 20%;\n padding-bottom: 10px; }\n .edd-price-currency,\n .edd-payment-details-download-amount {\n font-size: 16px; }\n .order-data-column input[type=\"email\"] {\n padding: 6px 10px; }\n .edd-refund-submit-line-total td:last-of-type {\n flex: 0 0 120px; }\n #edd-item-tables-wrapper .addresses tbody tr {\n display: grid; }\n #edd-item-tables-wrapper .addresses tbody td:not(.no-items) {\n padding-left: 35%; } }\n\n@media screen and (max-width: 600px) {\n .edd-edit-purchase-element ul li.item_price,\n .edd-edit-purchase-element ul li.item_price.item_quantity,\n .edd-edit-purchase-element ul li.item_tax {\n width: 100%;\n padding-bottom: 20px; }\n .edd-edit-purchase-element ul li.price,\n .edd-edit-purchase-element .edd-add-download-to-purchase ul li.item_tax {\n width: 100%;\n padding-bottom: 0; }\n .edd-edit-purchase-element .edd-add-download-to-purchase-actions {\n padding-top: 15px; } }\n\n/** Stats */\n#edd_product_stats .label {\n display: inline-block; }\n\n#edd_product_stats .product-sales-stats:before,\n#edd_product_stats .product-earnings-stats:before {\n color: #82878c;\n font: normal 20px/1 'dashicons';\n display: inline-block;\n padding: 0 2px 0 0;\n position: relative;\n top: 0;\n left: -1px;\n speak: none;\n text-decoration: none !important;\n vertical-align: top;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale; }\n\n#edd_product_stats .product-sales-stats:before {\n content: '\\f174'; }\n\n#edd_product_stats .product-earnings-stats:before {\n content: '\\f239'; }\n\n/* Dashboard Page Styles\n-------------------------------------------------------------- */\nbody.dashboard_page_edd-upgrades.js .postbox .hndle {\n cursor: default; }\n\n/* Dashboard Widget Styles\n-------------------------------------------------------------- */\n.edd_dashboard_widget table thead td {\n border-bottom: 1px solid #ececec;\n color: #777; }\n\n.edd_dashboard_widget .table_left {\n float: left;\n width: 45%; }\n\n.edd_dashboard_widget .table_right {\n float: right;\n width: 45%; }\n\n.edd_dashboard_widget .inside {\n font-size: 12px; }\n\n.edd_dashboard_widget td {\n padding: 3px 0; }\n\n.edd_dashboard_widget .b,\n.edd_dashboard_widget .t {\n line-height: 1.5;\n vertical-align: middle; }\n\n.edd_dashboard_widget .b {\n padding-right: 6px;\n width: auto; }\n\n.edd_dashboard_widget .t {\n font-size: 12px;\n padding-right: 12px;\n color: #777;\n width: 100%; }\n\n.edd_dashboard_widget .label_heading {\n border-top: 1px solid #ececec;\n color: #8f8f8f;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 12px;\n font-weight: normal;\n display: block;\n padding-top: 10px;\n margin: 0 0 8px 12px; }\n\n.edd_dashboard_widget .edd_dashboard_widget_subheading {\n border-top: 1px solid #ececec;\n color: #8f8f8f;\n font-size: 14px;\n padding-top: 10px;\n margin: 1em 0 0 0; }\n\n.edd_dashboard_widget .edd_dashboard_widget_subheading + .table {\n margin: 8px 0 0 0; }\n\n.edd_dashboard_widget .edd_price_label {\n background: #00769c;\n border-radius: 3px;\n color: white;\n font-size: 10px;\n padding: 2px 4px;\n margin-right: 2px; }\n\n.edd_dashboard_widget table {\n width: 100%;\n margin-left: 0;\n margin-bottom: 1em; }\n\ntd.edd_order_label {\n width: 80%; }\n\ntd.edd_order_price {\n text-align: right; }\n\n@media handheld, only screen and (max-width: 1000px) {\n .edd_dashboard_widget .edd-recent-email {\n display: none; } }\n\n/* Reports Styles\n-------------------------------------------------------------- */\n/* Force a scrollbar when on the reports page (https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6718) */\nbody.download_page_edd-reports {\n overflow-y: scroll; }\n\n.edd-chip {\n font-size: 10px;\n font-weight: bold;\n text-transform: uppercase;\n line-height: 1;\n padding: 3px;\n border-radius: 3px;\n color: #fff;\n background-color: #444; }\n\n.edd-vertical-sections .edd-legacy-label {\n display: inline-block;\n position: absolute;\n top: 11px;\n right: 6px; }\n\n/* Keeping this rule for Software Licensing Reports */\n.edd-reports-wrapper .postbox h2,\n.edd-reports-wrapper .postbox h3 {\n font-size: 1.3em; }\n\n#edd-dashboard-widgets-wrap .metabox-holder {\n padding-top: 0; }\n\n.edd-reports-wrapper .postbox .edd-select {\n max-width: 200px;\n vertical-align: baseline;\n margin-right: 4px;\n margin-bottom: 16px; }\n\n.download_page_edd-reports #edd-item-wrapper {\n margin: 0; }\n\n#edd-dashboard-widgets-wrap .postbox h2,\n#edd-dashboard-widgets-wrap .postbox h3 {\n cursor: default; }\n\n.edd-date-range-options .edd_datepicker {\n width: 105px; }\n\n.edd-report-wrap {\n clear: both; }\n\n.edd-report-wrap h3 {\n clear: both;\n margin: 0 0 20px; }\n\n.edd-reports-chart,\n.edd-reports-table {\n margin-bottom: 20px; }\n\n.edd-admin--has-grid {\n display: grid;\n display: -ms-grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n grid-gap: 20px; }\n\n.edd-admin--has-grid .postbox {\n margin-bottom: 0; }\n\n.edd-admin--has-grid .edd-from-to-wrapper {\n display: flex;\n margin-bottom: 16px;\n width: 100%; }\n\n.edd-admin--has-grid .edd-from-to-wrapper input {\n width: 100%; }\n\n.edd-admin--has-grid .edd-from-to-wrapper span {\n flex-grow: 1; }\n\n.edd-admin--has-grid form {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n position: relative; }\n\nfieldset.edd-to-and-from-container {\n display: grid;\n display: -ms-grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 8px; }\n\nspan.edd-to-and-from--separator {\n line-height: normal;\n align-self: center;\n margin-bottom: 16px; }\n\n.edd-admin--has-grid .postbox .edd-select {\n max-width: 100%;\n margin-right: 0; }\n\n.edd-admin--has-grid .button.updating-message:before,\n.edd-admin--has-grid .button.updated-message:before {\n vertical-align: text-bottom;\n margin: 0 5px 0 0; }\n\n.edd-import-export-form .edd-progress {\n background: #ddd;\n border-radius: 15px;\n height: 15px;\n flex-basis: 100%; }\n\n.edd-import-export-form .edd-progress div {\n background: #ccc;\n border-radius: 15px;\n height: 100%;\n width: 0; }\n\n.edd-import-export-form .notice-wrap {\n background-color: #f4f4f4;\n border-style: solid;\n border-width: 1px 0;\n border-color: #eae9e9;\n padding: 12px;\n overflow: auto;\n margin: 20px -12px -23px;\n position: relative;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center; }\n\n.notice-wrap div.notice {\n margin: 0; }\n\n.admin-color-fresh .edd-import-export-form .edd-progress div {\n background: #0073aa; }\n\n.admin-color-light .edd-import-export-form .edd-progress div {\n background: #888; }\n\n.admin-color-blue .edd-import-export-form .edd-progress div {\n background: #096484; }\n\n.admin-color-coffee .edd-import-export-form .edd-progress div {\n background: #c7a589; }\n\n.admin-color-ectoplasm .edd-import-export-form .edd-progress div {\n background: #a3b745; }\n\n.admin-color-midnight .edd-import-export-form .edd-progress div {\n background: #e14d43; }\n\n.admin-color-sunrise .edd-import-export-form .edd-progress div {\n background: #dd823b; }\n\n.graph-option-section {\n float: left; }\n\n.edd-report-filters-title span {\n display: block;\n padding: 20px; }\n\n#edd-graphs-filter form {\n padding: 20px; }\n\n#edd-graphs-filter label {\n vertical-align: inherit; }\n\n#edd-graphs-filter .graph-option-section {\n display: inline-block;\n line-height: 2em;\n margin: 0 5px 0 0;\n padding: 0; }\n\n.download_page_edd-reports .section-content #post-body-content {\n float: none; }\n\n.download_page_edd-reports .section-content select[name=\"range\"] {\n display: none; }\n\n.edd-mix-totals {\n background-color: #fff;\n border: 1px solid #e5e5e5;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);\n padding: 10px; }\n\n.edd-mix-chart {\n display: inline-block;\n width: 49%;\n vertical-align: top; }\n\n.edd-graph-notes {\n color: #9c9c9c; }\n\n.edd-graph-notes span {\n display: block; }\n\n.edd-pie-graph .legend {\n display: none; }\n\n.edd-pie-legend {\n overflow: auto;\n margin-top: 10px; }\n\n.edd-legend-item-wrapper {\n color: #333;\n display: inline-block;\n font-size: 8pt;\n padding: 2px 5px 0px 5px;\n width: 48%;\n height: 20px; }\n\n.edd-legend-color {\n border: 1px solid #cfcfcf;\n display: inline-block;\n margin-right: 5px;\n width: 20px;\n height: 15px; }\n\n.edd-pie-legend-item {\n display: inline-block;\n vertical-align: top;\n width: 80%; }\n\n#edd-reports-tiles-wrap .metabox-holder {\n padding: 0; }\n\n#edd-reports-tiles-wrap #dashboard-widgets {\n overflow: auto; }\n\n#edd-reports-tiles-wrap #dashboard-widgets .postbox-container {\n width: 33.3%; }\n\n/** Hide legacy report empty navigations */\n.download_page_edd-reports .section-content .tablenav.top {\n display: none; }\n\n#edd_tax_rates {\n margin: 1em 0 0; }\n\n[id*=\"edd-sendwp-\"].button,\n[id*=\"edd-jilt-\"].button {\n font-size: 16px;\n height: auto;\n padding: 8px 14px;\n margin: 6px 0 0; }\n\n[id*=\"edd-sendwp-\"].button .dashicons,\n[id*=\"edd-jilt-\"].button .dashicons {\n line-height: 29px;\n margin-right: 8px; }\n\n[id*=\"edd-sendwp-\"].button .edd-loading,\n[id*=\"edd-sendwp-\"].button .edd-loading:after,\n[id*=\"edd-jilt-\"].button .edd-loading,\n[id*=\"edd-jilt-\"].button .edd-loading:after {\n border-radius: 50%;\n display: inline-block;\n width: 14px;\n height: 14px; }\n\n[id*=\"edd-sendwp-\"].button .edd-loading,\n[id*=\"edd-jilt-\"].button .edd-loading {\n position: relative;\n top: 3px;\n margin-left: 4px;\n box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); }\n\n[id*=\"edd-sendwp-\"].button .edd-loading,\n[id*=\"edd-jilt-\"].button .edd-loading {\n -webkit-animation: edd-spinning 1.1s infinite linear;\n animation: edd-spinning 1.1s infinite linear;\n border-top: 2px solid rgba(255, 255, 255, 0.5);\n border-right: 2px solid rgba(255, 255, 255, 0.5);\n border-bottom: 2px solid rgba(255, 255, 255, 0.5);\n border-left: 2px solid #fff;\n font-size: 14px;\n filter: alpha(opacity=0);\n -ms-transform: translateZ(0);\n transform: translateZ(0); }\n\n#edd-sendwp-disconnect.button .edd-loading.dark,\n#edd-jilt-disconnect.button .edd-loading.dark {\n border-top-color: rgba(0, 0, 0, 0.2);\n border-right-color: rgba(0, 0, 0, 0.2);\n border-bottom-color: rgba(0, 0, 0, 0.2);\n border-left-color: #666;\n box-shadow: none; }\n\n.jilt-notice {\n position: relative; }\n\n@-webkit-keyframes edd-spinning {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes edd-spinning {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n#edd-reports-tiles-wrap #dashboard-widgets .sortable-placeholder {\n padding: 0;\n margin: 0 0 20px 0;\n line-height: 0;\n box-sizing: border-box;\n height: 110px; }\n\n#edd-reports-tiles-wrap #dashboard-widgets #primary-sortables {\n margin-left: 0; }\n\n#edd-reports-tiles-wrap #dashboard-widgets #tertiary-sortables {\n margin-right: 0; }\n\n#edd-reports-tiles-wrap {\n display: -ms-grid;\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n grid-gap: 20px; }\n\n.edd-reports-tile {\n text-align: center;\n padding: 30px 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n border: 1px solid #e5e5e5;\n background: #fafafa;\n position: relative;\n box-sizing: border-box; }\n\n.edd-reports-tile span.dashicons {\n display: inline-block;\n font-size: 30px;\n line-height: 20px;\n height: 20px;\n width: 20px;\n position: relative;\n top: 4px;\n left: -5px;\n margin-left: -5px;\n color: #999; }\n\n.edd-reports-tile .tile-label {\n text-align: center;\n text-transform: uppercase;\n font-size: 11px;\n font-weight: normal;\n color: #888;\n order: 2;\n margin-top: 3px; }\n\n.edd-reports-tile .tile-value {\n order: 1;\n color: #333;\n font-size: 2em;\n line-height: 1;\n transition: all .2s ease-in-out; }\n\n.edd-reports-tile:hover {\n border: 1px solid #aaa; }\n\n.edd-reports-tile:hover .tile-value:not(.tile-no-data) {\n transform: scale(1.05); }\n\n.edd-reports-tile .tile-amount {\n color: #2794da; }\n\n.edd-reports-tile .tile-number {\n color: #9966ff; }\n\n.edd-reports-tile .tile-amount,\n.edd-reports-tile .tile-number {\n color: #fff; }\n\n.edd-reports-tile .tile-value.tile-no-data {\n color: #ddd; }\n\n.edd-reports-tile .tile-value.tile-url {\n font-size: 1.5em; }\n\n.edd-reports-tile .tile-compare {\n position: absolute;\n right: 0;\n bottom: 0;\n color: #aaa;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n border-left: 1px solid #e5e5e5;\n border-top: 1px solid #e5e5e5;\n border-bottom: 1px solid #fff;\n border-right: 1px solid #fff;\n border-top-left-radius: 8px;\n padding: 4px 0 0 9px;\n margin: 0 -1px -1px 0; }\n\n.edd-reports-tile:hover .tile-compare {\n border-left: 1px solid #bbb;\n border-top: 1px solid #bbb;\n color: #777; }\n\n@media screen and (min-width: 600px) {\n #edd-reports-charts-wrap {\n display: -ms-grid;\n display: grid;\n grid-template-columns: repeat(2, minmax(200px, 50%));\n grid-gap: 20px; }\n .edd-reports-chart {\n margin-bottom: 0; }\n .edd-reports-chart-line {\n grid-column: 1 / span 2; } }\n\n#edd-chartjs-tooltip {\n position: absolute;\n background-color: #fff;\n -webkit-border-radius: 7px;\n -moz-border-radius: 7px;\n border-radius: 7px;\n -webkit-transition: all .1s ease;\n transition: all .1s ease;\n pointer-events: none;\n -webkit-transform: translate(-50%, 0);\n transform: translate(-50%, 0);\n font-size: 12px;\n box-shadow: 0 0 0 1px rgba(89, 94, 100, 0.1), 0 15px 35px 0 rgba(89, 94, 100, 0.1), 0 5px 15px 0 rgba(0, 0, 0, 0.12);\n min-width: 120px;\n opacity: 0; }\n\n.edd-chartjs-tooltip-key {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin-right: 5px; }\n\n/* Upgrades page styles\n-------------------------------------------------------------- */\n/* Settings page styles\n-------------------------------------------------------------- */\n.wrap-licenses .form-table,\n.wrap-licenses thead,\n.wrap-licenses tbody,\n.wrap-licenses tfoot,\n.wrap-licenses tr,\n.wrap-licenses td,\n.wrap-licenses th,\n.wrap-licenses caption {\n display: block; }\n\n.wrap-licenses .form-table tr {\n float: left;\n margin: 0 15px 15px 0;\n background: #fff;\n border: 1px solid #ccc;\n width: 30.5%;\n max-width: 350px;\n padding: 14px;\n min-height: 220px;\n position: relative;\n box-sizing: border-box; }\n\n.wrap-licenses .form-table th {\n background: #f9f9f9;\n padding: 14px;\n border-bottom: 1px solid #ccc;\n margin: -14px -14px 20px;\n width: 100%; }\n\n.wrap-licenses .form-table td {\n padding: 0; }\n\n.wrap-licenses td input.regular-text {\n margin: 0 0 8px;\n width: 100%; }\n\n.wrap-licenses .edd-license-data[class*=\"edd-license-\"] {\n position: absolute;\n background: #fafafa;\n padding: 14px;\n border-top: 1px solid #eee;\n margin: 20px -14px -14px;\n min-height: 67px;\n width: 100%;\n bottom: 14px;\n box-sizing: border-box; }\n\n.wrap-licenses .edd-license-data[class*=\"edd-license-\"] a {\n color: #444; }\n\n.wrap-licenses .edd-license-data[class*=\"edd-license-\"] a:hover {\n text-decoration: none; }\n\n.wrap-licenses .edd-license-data.license-expires-soon-notice {\n background-color: #00a0d2;\n color: #fff;\n border-color: #00a0d2; }\n\n.wrap-licenses .edd-license-data.edd-license-expired {\n background-color: #e24e4e;\n color: #fff;\n border-color: #e24e4e; }\n\n.wrap-licenses .edd-license-data.edd-license-error,\n.wrap-licenses .edd-license-data.edd-license-missing,\n.wrap-licenses .edd-license-data.edd-license-invalid,\n.wrap-licenses .edd-license-data.edd-license-site_inactive,\n.wrap-licenses .edd-license-data.edd-license-item_name_mismatch {\n background-color: #ffebcd;\n border-color: #ffebcd; }\n\n.wrap-licenses .edd-license-data p {\n font-size: 13px;\n margin-top: 0; }\n\n.wrap-licenses .edd-license-data.license-expires-soon-notice a,\n.wrap-licenses .edd-license-data.edd-license-expired a {\n color: #fff; }\n\n.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover,\n.wrap-licenses .edd-license-data.edd-license-expired a:hover {\n text-decoration: none; }\n\n.wrap-licenses p.submit {\n clear: both; }\n\n/* Global Graph Styles\n-------------------------------------------------------------- */\n.edd-graph .y1Axis {\n color: #edc240 !important; }\n\n.edd-graph .y2Axis {\n color: #afd8f8 !important; }\n\n/* API Table Styles\n-------------------------------------------------------------- */\n.wp-list-table.apikeys input.code {\n width: 100%;\n font-size: 10px;\n cursor: text;\n background: #fff;\n border: 1px solid #ddd;\n box-shadow: none;\n color: #555; }\n\n/* Toggle Styles\n-------------------------------------------------------------- */\n.edd-toggle {\n position: relative;\n display: inline-block;\n overflow: visible; }\n\n.edd-toggle input[type=\"checkbox\"] {\n display: inline-block;\n vertical-align: middle;\n position: relative;\n margin: 0;\n padding: 0;\n width: 42px;\n height: 24px;\n background-color: #ccc;\n -webkit-transition: background 0.2s ease;\n transition: background 0.2s ease;\n border-radius: 34px;\n box-shadow: none;\n border: none; }\n\n.edd-toggle .label {\n display: inline-block;\n vertical-align: middle;\n white-space: nowrap; }\n\n.edd-toggle input[type=\"checkbox\"]:before {\n position: absolute;\n content: \"\";\n height: 18px;\n width: 18px;\n left: 3px;\n bottom: 3px;\n background-color: white;\n -webkit-transition: 0.1s transform ease;\n transition: 0.1s transform ease;\n border-radius: 50%; }\n\n.edd-toggle input[type=\"checkbox\"]:checked {\n background-color: #007cba; }\n\n.edd-toggle input[type=\"checkbox\"]:active,\n.edd-toggle input[type=\"checkbox\"]:focus {\n outline: 0;\n box-shadow: 0 0 0 1px #fff, 0 0 0 3px #7e8993; }\n\n.edd-toggle input[type=\"checkbox\"]:checked:active,\n.edd-toggle input[type=\"checkbox\"]:checked:focus {\n box-shadow: 0 0 0 1px #fff, 0 0 0 3px #007cba; }\n\n.edd-toggle input[type=\"checkbox\"]:checked:before {\n -webkit-transform: translateX(22px);\n -ms-transform: translateX(22px);\n transform: translateX(22px); }\n\n.edd-toggle input + .label,\n.edd-toggle .label + input {\n margin-left: 5px; }\n\n/* List Table Styles\n-------------------------------------------------------------- */\n.download_page_edd-tools .tablenav .actions {\n overflow: visible; }\n\n.edd_user_search_wrap {\n position: relative;\n overflow: visible; }\n\n.edd_user_search_wrap .spinner {\n position: absolute;\n margin: 0;\n padding: 0;\n right: 4px;\n top: -2px; }\n\n.edd_user_search_wrap.loading .spinner {\n visibility: visible; }\n\n.edd_user_search_results {\n position: absolute;\n left: 0;\n top: 20px; }\n\n.edd_user_search_results a.edd-ajax-user-cancel {\n position: absolute;\n right: 6px;\n top: 2px; }\n\n.edd_user_search_results ul {\n background: #fafafa;\n border: 1px solid #dfdfdf;\n overflow-y: scroll;\n padding: 0;\n margin: 0;\n height: 150px;\n width: 185px;\n box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1); }\n\n.edd_user_search_results li {\n margin: 0; }\n\n.edd_user_search_results li a {\n display: block;\n text-decoration: none;\n padding: 6px 10px; }\n\n.edd_user_search_results li a:hover {\n background: #f5f5f5; }\n\n.edd_user_search_results li.no-users {\n text-align: center;\n vertical-align: middle;\n display: block;\n line-height: 150px;\n color: #bbb;\n text-transform: uppercase;\n font-size: 11px; }\n\n@media screen and (max-width: 1100px) {\n .edd-mix-chart {\n display: block;\n width: 100%; }\n .wrap-licenses .form-table tr {\n width: 46%;\n max-width: none;\n min-height: 230px; } }\n\n@media screen and (max-width: 782px) {\n .license-lifetime-notice,\n .license-expiration-date-notice,\n .license-null {\n padding-left: 0; }\n [class^=\"license-\"] input[type=\"text\"] {\n margin-bottom: 3px; } }\n\n@media screen and (max-width: 600px) {\n .wrap-licenses .form-table tr {\n width: 100%;\n min-height: 230px; }\n #edd-edit-order-form input.large-text {\n width: 100%; } }\n\n/* Customer Styles\n-------------------------------------------------------------- */\n#edd-item-wrapper {\n background: #fff;\n border: 1px solid #c3c4c7;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);\n position: relative;\n margin-top: 15px;\n display: flex; }\n\n#edd-item-wrapper.full-width {\n max-width: 100%; }\n\n#edd-item-wrapper:after {\n content: \"\";\n display: block;\n clear: both;\n visibility: hidden;\n font-size: 0;\n height: 0; }\n\n.edd-sections-wrap {\n clear: both;\n width: 100%; }\n\n.edd-sections-wrap .section-wrap {\n background-color: #fff;\n display: inline-block;\n z-index: 2; }\n\n.js .edd-sections-wrap .edd-vertical-sections:not(.meta-box) .section-wrap > div {\n min-height: 500px;\n height: 100%; }\n\n.edd-sections-wrap .section-wrap .customer-section:not(:last-child) {\n border-bottom: 1px solid #eee; }\n\n.edd-sections-wrap .section-wrap .customer-section table {\n margin-bottom: 20px; }\n\n.edd-sections-wrap .section-wrap {\n border-left: 1px solid #e5e5e5; }\n\n.edd-sections-wrap .section-wrap .section-content > * {\n padding: 20px; }\n\n.edd-sections-wrap .section-wrap .avatar-wrap {\n float: left;\n padding-right: 10px;\n text-align: center; }\n\n.edd-sections-wrap .section-wrap img.avatar {\n border-radius: 5px; }\n\n.edd-sections-wrap .section-wrap .customer-id {\n position: absolute;\n right: 0;\n top: 0;\n padding: 10px;\n background-color: #fafafa;\n border: 1px solid #eee;\n border-bottom-left-radius: 20%;\n border-top: none;\n border-right: none;\n font-family: monospace;\n font-size: 18px;\n font-weight: 600; }\n\n.edd-item-info.customer-info input[type=\"text\"],\n.edd-item-info.customer-info input[type=\"password\"],\n.edd-item-info.customer-info select {\n width: 200px;\n height: auto;\n box-shadow: none;\n transition: none;\n border: 1px solid #ddd;\n margin: -5px 0 4px -2px;\n font-size: 13px;\n padding: 2px 4px; }\n\n.edd-sections-wrap .section-wrap .customer-main-wrapper {\n float: left; }\n\n.edd-sections-wrap .section-wrap .customer-main-wrapper input[name=\"customerinfo[name]\"] {\n font-size: 24px; }\n\n.edd-sections-wrap .section-wrap .customer-address-wrapper {\n float: right;\n margin-top: -3px;\n margin-right: 50px;\n width: 202px; }\n\n.edd-sections-wrap .section-wrap .info-wrapper {\n min-height: 125px;\n overflow: visible; }\n\n.edd-sections-wrap .section-wrap .customer-address span[data-key=\"address\"],\n.edd-sections-wrap .section-wrap .customer-address span[data-key=\"address2\"],\n.edd-sections-wrap .section-wrap .customer-address span[data-key=\"country\"] {\n display: block; }\n\n.edd-sections-wrap .section-wrap a.delete {\n color: #ff0000;\n margin-right: 5px;\n text-decoration: none; }\n\n.customer-info {\n min-height: 185px; }\n\n.customer-info .customer-name {\n font-size: 24px;\n font-weight: 600; }\n\n.customer-info .customer-name.editable {\n margin-bottom: 6px; }\n\n.customer-edit-link a {\n font-weight: normal;\n text-decoration: none; }\n\n.disconnect-user a {\n color: #aaa;\n font-size: 20px; }\n\n#customer-edit-actions {\n padding: 3px;\n line-height: 28px;\n text-align: center; }\n\n#customer-edit-actions .button-secondary {\n margin-right: 5px; }\n\n#customer-edit-actions .cancel {\n padding: 5px; }\n\n.edd-sections-wrap .section-wrap .row-title {\n width: 30%; }\n\n.edd-sections-wrap .section-wrap .editable {\n display: block;\n padding: 3px; }\n\n.edd-sections-wrap .section-wrap div.edit-item {\n margin-left: -4px;\n margin-top: -20px; }\n\n.edd-sections-wrap .section-wrap .customer-address.edit-item {\n margin-top: 3px; }\n\n.edd-sections-wrap .section-wrap span.edit-item {\n display: none; }\n\n.edd-sections-wrap .section-wrap .edit-item input {\n font-size: 13px; }\n\n.edd-sections-wrap .section-wrap .customer-name.edit-item input {\n margin-top: -5px; }\n\n.edd-sections-wrap .section-wrap .edd_user_search_results {\n left: -2px;\n top: 18px; }\n\n.edd-sections-wrap .section-wrap .edd_user_search_results ul {\n width: 198px; }\n\n#edd-item-stats-wrapper {\n margin: 0 auto;\n text-align: center; }\n\n#edd-item-stats-wrapper ul {\n display: flex;\n margin: 0; }\n\n#edd-item-stats-wrapper li {\n font-size: 14px;\n margin-bottom: 0;\n width: 50%; }\n\n#edd-item-stats-wrapper a {\n text-decoration: none; }\n\n#edd-item-stats-wrapper .dashicons {\n color: #888;\n margin-top: -2px; }\n\n#edd-item-tables-wrapper table {\n width: 100%; }\n\n#edd-item-tables-wrapper .no-items {\n text-align: left; }\n\n#edd-item-tables-wrapper .emails .add-customer-email-row {\n background-color: #f4f4f4;\n border-top: 1px solid #e5e5e5; }\n\n#edd-item-tables-wrapper .add-customer-email-wrapper {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 12px 0; }\n\n#edd-item-tables-wrapper .edd-form-group {\n margin-bottom: 0; }\n\n#edd-item-tables-wrapper .edd-make-email-primary {\n flex-grow: 1;\n margin-left: 12px; }\n\n#edd-item-tables-wrapper .emails .spinner {\n float: none;\n margin: 0 10px;\n align-self: center; }\n\n#edd-item-tables-wrapper .notice-error {\n background-color: #fff5f5; }\n\n#edd-item-notes-wrapper {\n min-height: 50px; }\n\n.edd-item-header-small {\n height: 30px;\n padding-bottom: 20px;\n border-bottom: 1px solid #e5e5e5; }\n\n.edd-item-header-small span {\n font-weight: 600;\n line-height: 15px;\n font-size: 15px;\n display: inline-block;\n margin-bottom: 10px; }\n\n.edd-item-header-small span,\n.edd-item-header-small img {\n vertical-align: middle; }\n\n.edd-item-header-small img.avatar {\n margin-right: 5px; }\n\n.customer-note-input {\n margin-bottom: 5px;\n width: 100%; }\n\n.customer-note-wrapper {\n border-bottom: 1px solid #f9f9f9;\n min-height: 38px;\n padding: 7px 0 7px 7px; }\n\n.customer-note-wrapper span {\n display: block; }\n\n.note-content-wrap {\n padding-top: 7px; }\n\n.edd-sections-wrap .section-wrap .notice-container {\n padding-left: 20px;\n padding-right: 20px;\n margin-left: -20px;\n margin-right: -20px; }\n\n@media screen and (max-width: 810px) and (min-width: 656px) {\n .customer-info .customer-name {\n font-size: 16px; }\n .edd-sections-wrap .section-wrap .widefat td, .widefat th {\n max-width: 100% !important;\n display: table-cell; } }\n\n@media screen and (max-width: 781px) {\n #edd-item-tab-wrapper,\n .edd-sections-wrap .section-wrap {\n margin: 0;\n width: 100%; }\n #edd-item-tab-wrapper-list .dashicons {\n /** [1] */\n font-size: 18px; }\n .edd-item-has-tabs .edd-sections-wrap .section-wrap {\n border-top: 1px solid #e5e5e5;\n border-left: 0;\n margin-top: -1px; } }\n\n@media screen and (max-width: 656px) {\n .edd-item-info.customer-info {\n position: relative; }\n .edd-sections-wrap .section-wrap .customer-address-wrapper {\n float: none;\n position: absolute;\n top: 84px;\n left: 165px;\n max-width: 200px; }\n .edd-sections-wrap .section-wrap .customer-main-wrapper {\n float: none;\n position: absolute;\n left: 165px; }\n .customer-info .customer-name {\n font-size: 16px; }\n .edd-sections-wrap .section-wrap #edd-item-stats-wrapper {\n padding-left: 0;\n padding-right: 0; }\n .edd-sections-wrap .section-wrap .customer-section {\n margin-bottom: 0; }\n .edd-sections-wrap .section-wrap .widefat td.no-items,\n .edd-sections-wrap .section-wrap .widefat td.column-primary,\n .edd-sections-wrap .section-wrap .widefat th.column-primary {\n width: 100px !important;\n display: table-cell;\n overflow: hidden;\n text-align: left; }\n .edd-sections-wrap .section-wrap .customer-id {\n display: none; }\n #edd-item-tables-wrapper .emails td.column-primary {\n padding-right: 10px;\n width: 100% !important; }\n #edd-item-tables-wrapper .edd-form-group {\n margin: 0 0 16px 0; } }\n\n@media screen and (max-width: 480px) {\n #edd-item-tab-wrapper-list li {\n width: 50%; }\n #edd-item-tab-wrapper-list li:nth-child(3n+3) {\n border-width: 0 1px 1px 0; }\n #edd-item-tab-wrapper-list li:nth-child(even) {\n border-width: 0 0 1px 0; }\n .edd-repeatable-row-title,\n .edd-repeatable-row-actions {\n text-align: left;\n width: 100%; }\n .edd-repeatable-row-title {\n padding-bottom: 0; }\n .edd-repeatable-row-standard-fields,\n .edd-bundled-product-row {\n flex-wrap: wrap; }\n .edd-repeatable-row-standard-fields .edd-form-group,\n .edd-bundled-product-row .edd-form-group {\n margin-left: 0 !important;\n margin-bottom: 24px; }\n .edd-bundled-product-row .edd-bundled-product-item-reorder .edd-product-file-reorder {\n padding: 0; }\n .download_page_edd-reports .button {\n text-align: center; }\n #edd-payment-date-filters span {\n display: block; }\n #edd-payment-date-filters span > input {\n float: right; }\n #edd-add-discount select[multiple] option,\n #edd-edit-discount select[multiple] option {\n height: 20px; }\n .download_page_edd-tools .inside input[type=\"text\"],\n .download_page_edd-tools .inside select,\n .download_page_edd-tools .inside input[type=\"submit\"],\n .download_page_edd-settings .inside input[type=\"button\"],\n .download_page_edd-reports .inside input[type=\"text\"],\n .download_page_edd-reports .inside select,\n .download_page_edd-reports .inside input[type=\"submit\"],\n .download_page_edd-reports .inside .button {\n width: 100%; }\n #edd-add-discount select[multiple],\n #edd-edit-discount select[multiple],\n .download_page_edd-tools select[multiple] {\n height: 200px !important; }\n .download_page_edd-settings input[type=\"checkbox\"] {\n margin: 2px 0; }\n .post-type-download input[type=\"checkbox\"] {\n margin-left: 2px; } }\n\n/* System Info page styles\n-------------------------------------------------------------- */\n.inside .edd-tools-textarea {\n background: #32373c;\n color: rgba(240, 245, 250, 0.7);\n font-size: 12px;\n font-family: Menlo, Monaco, monospace;\n display: block;\n overflow: auto;\n white-space: pre;\n width: 100%;\n height: 450px;\n padding: 10px;\n outline: none; }\n\n#system-info-textarea::selection {\n background: #555;\n color: #fff; }\n\n#edd-system-info .edd-inline-button {\n margin-left: 5px; }\n\n/* Tools Styles\n-------------------------------------------------------------- */\n.recount-stats-controls form {\n display: inline; }\n\n.edd-recount-stats-descriptions span {\n display: none;\n line-height: 24px; }\n\n#edd-debug-log .edd-inline-button {\n margin-left: 5px; }\n\n/* Tools Styles\n-------------------------------------------------------------- */\n.edd-vertical-sections {\n overflow: visible;\n display: block;\n display: flex; }\n\n#edd-item-tab-wrapper,\n.edd-vertical-sections .section-nav {\n position: relative;\n width: 20%;\n line-height: 1em;\n margin: 0 -1px 0 0;\n padding: 0;\n background-color: #f5f5f5;\n border-right: 1px solid #e5e5e5;\n box-sizing: border-box;\n max-width: 200px; }\n\n#edd-item-tab-wrapper-list {\n /** [1] */\n margin: 0; }\n\n#edd-item-tab-wrapper li,\n.edd-vertical-sections .section-nav li {\n display: block;\n position: relative;\n margin: 0;\n padding: 0;\n background-color: #fcfcfc; }\n\n.edd-vertical-sections .section-title:last-of-type {\n margin-bottom: 24px; }\n\n#edd-item-tab-wrapper li a,\n#edd-item-tab-wrapper li > .edd-item-tab-label-wrap,\n.edd-vertical-sections .section-nav li a {\n display: flex;\n margin: 0;\n padding: 9px;\n text-decoration: none;\n border-bottom: 1px solid #e5e5e5;\n box-shadow: none;\n position: relative;\n align-items: center; }\n\n#edd-item-tab-wrapper li a:focus,\n#edd-item-tab-wrapper li a:hover,\n.edd-vertical-sections .section-nav li a:hover,\n.edd-vertical-sections .section-nav li a:focus {\n box-shadow: inset 5px 0;\n outline: 0;\n transition: all .25s; }\n\n.edd-vertical-sections .section-nav .section-title--is-active a:after {\n content: '';\n width: 1px;\n height: 100%;\n background: #fff;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 3; }\n\n#edd-item-tab-wrapper li > .edd-item-tab-label-wrap {\n /** [1] */\n background-color: #fff; }\n\n.edd-vertical-sections .section-nav li a > .dashicons,\n.edd-vertical-sections .section-nav li a > span {\n display: inline-block; }\n\n.edd-vertical-sections .section-nav li a > span {\n max-width: 76%; }\n\n.edd-vertical-sections .section-nav li a .dashicons {\n line-height: 20px;\n margin-right: 3px;\n color: #888; }\n\n.edd-vertical-sections .section-nav .section-title--is-active a {\n font-weight: bold;\n color: #555;\n background-color: #fff;\n border-right: none;\n margin-right: -1px; }\n\n.edd-vertical-sections.use-js .section-content,\n.no-js .edd-vertical-sections.use-js .section-nav,\n.no-js .edd-vertical-sections.use-js.edd-item-header-small {\n display: none; }\n\n.no-js .edd-vertical-sections.use-js .section-content {\n display: block; }\n\n/* Fresh */\n.admin-color-fresh .edd-vertical-sections .section-nav li a:hover,\n.admin-color-fresh .edd-vertical-sections .section-nav li a:focus,\n.admin-color-fresh .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #0073aa; }\n\n/* Blue */\n.admin-color-blue .edd-vertical-sections .section-nav li a:hover,\n.admin-color-blue .edd-vertical-sections .section-nav li a:focus,\n.admin-color-blue .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #096484; }\n\n/* Coffee */\n.admin-color-coffee .edd-vertical-sections .section-nav li a:hover,\n.admin-color-coffee .edd-vertical-sections .section-nav li a:focus,\n.admin-color-coffee .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #c7a589; }\n\n/* Ectoplasm */\n.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:hover,\n.admin-color-ectoplasm .edd-vertical-sections .section-nav li a:focus,\n.admin-color-ectoplasm .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #a3b745; }\n\n/* Midnight */\n.admin-color-midnight .edd-vertical-sections .section-nav li a:hover,\n.admin-color-midnight .edd-vertical-sections .section-nav li a:focus,\n.admin-color-midnight .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #e14d43; }\n\n/* Ocean */\n.admin-color-ocean .edd-vertical-sections .section-nav li a:hover,\n.admin-color-ocean .edd-vertical-sections .section-nav li a:focus,\n.admin-color-ocean .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #627c83; }\n\n/* Sunrise */\n.admin-color-sunrise .edd-vertical-sections .section-nav li a:hover,\n.admin-color-sunrise .edd-vertical-sections .section-nav li a:focus,\n.admin-color-sunrise .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #be3631; }\n\n/* Light */\n.admin-color-light .edd-vertical-sections .section-nav li a:hover,\n.admin-color-light .edd-vertical-sections .section-nav li a:focus,\n.admin-color-light .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #888; }\n\n/* bbPress Color Schemes */\n/* Evergreen */\n.admin-color-evergreen .edd-vertical-sections .section-nav li a:hover,\n.admin-color-evergreen .edd-vertical-sections .section-nav li a:focus,\n.admin-color-evergreen .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #36533f; }\n\n/* Mint */\n.admin-color-mint .edd-vertical-sections .section-nav li a:hover,\n.admin-color-mint .edd-vertical-sections .section-nav li a:focus,\n.admin-color-mint .edd-vertical-sections .section-nav .section-title--is-active a {\n box-shadow: inset 5px 0 #4f6d59; }\n\n.edd-vertical-sections .section-nav .section-title--is-active .dashicons {\n color: #555; }\n\n@media only screen and (max-width: 782px) {\n #edd-item-tab-wrapper,\n .edd-vertical-sections .section-nav {\n width: 48px; }\n .edd-vertical-sections .section-nav li a {\n justify-content: center; }\n .edd-vertical-sections .section-nav li a .dashicons {\n width: 24px;\n height: 24px;\n font-size: 24px;\n line-height: 24px;\n margin: 0; }\n .section-nav li .dashicons::before {\n width: 24px;\n height: 24px; }\n #edd-item-tab-wrapper .edd-item-tab-label,\n .section-nav li .label {\n overflow: hidden;\n position: absolute;\n top: -1000em;\n left: -1000em;\n width: 1px;\n height: 1px; } }\n\n/* Content wrapper */\n#edd-item-card-wrapper,\n.edd-vertical-sections .section-wrap {\n width: 80%; }\n\n#edd-item-card-wrapper .item-section {\n /** [1] */\n background: #fff;\n overflow: hidden;\n box-sizing: border-box; }\n\n*:not(#edd-item-tab-wrapper) + #edd-item-card-wrapper .item-section {\n /** [1] */\n margin: 25px 0;\n padding: 20px;\n border: 1px solid #e5e5e5;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); }\n\n#edd-item-tab-wrapper + #edd-item-card-wrapper {\n /** [1] */\n padding: 20px;\n border-left: 1px solid #e5e5e5;\n box-sizing: border-box; }\n\n@media only screen and (min-width: 1200px) {\n #edd-item-card-wrapper,\n #edd-graphs-filter,\n .edd-vertical-sections:not(.meta-box) .section-wrap {\n width: calc( 100% - 200px); } }\n\n@media only screen and (max-width: 782px) {\n #edd-item-card-wrapper,\n #edd-graphs-filter,\n .edd-vertical-sections .section-wrap {\n width: calc( 100% - 48px); } }\n\n#edd-debug-log .edd-inline-button {\n margin-left: 5px; }\n\n/* Promotional element styles\n-------------------------------------------------------------- */\n/* Settings sidebar */\n.edd-settings-sidebar {\n padding-top: 27px; }\n\n.edd-settings-sidebar-content {\n background-color: #fff;\n text-align: center;\n border: 1px solid #ddd;\n box-sizing: border-box;\n max-width: 300px; }\n\n.edd-settings-sidebar-content p {\n font-size: 14px;\n line-height: 1.5;\n margin-top: 0; }\n\n/* Settings sidebar header section */\n.edd-sidebar-header-section {\n background-color: #35495c;\n line-height: 1;\n padding: 26px 20px 24px;\n border-bottom: 3px dashed #fafafa; }\n\n/* Settings sidebar description section */\n.edd-sidebar-description-section {\n background-color: #fafafa;\n padding: 16px 20px;\n border-bottom: 1px solid #ddd; }\n\n.edd-sidebar-description-section .edd-sidebar-description {\n margin: 0; }\n\n/* Settings sidebar coupon section */\n.edd-sidebar-coupon-section {\n font-size: 14px;\n padding: 16px 20px; }\n\n.edd-sidebar-coupon-section label {\n display: block;\n line-height: 1.4;\n margin-bottom: 6px; }\n\n.edd-sidebar-coupon-section label strong {\n color: #253b51;\n font-weight: 700; }\n\n.edd-sidebar-coupon-section input {\n background: #f4f7fa;\n font-size: 22px;\n font-weight: 600;\n text-align: center;\n padding: 10px;\n border: 2px dashed #2794da;\n border-radius: 4px;\n margin-bottom: 16px;\n box-shadow: none;\n width: 100%; }\n\n.edd-sidebar-coupon-section input:focus {\n border: 2px dashed #2794da;\n box-shadow: none; }\n\n.edd-settings-sidebar-content .edd-coupon-note {\n color: #6c7883;\n font-size: 13px;\n font-style: italic;\n margin: 0; }\n\n.edd-settings-sidebar-content .edd-coupon-note a {\n color: #253b51; }\n\n.edd-settings-sidebar-content .edd-coupon-note a:hover {\n text-decoration: none; }\n\n/* Settings sidebar footer section */\n.edd-sidebar-footer-section {\n background-color: #fafafa;\n padding: 16px 20px;\n border-top: 1px solid #ddd; }\n\n.edd-sidebar-footer-section .edd-cta-button {\n display: block;\n background-color: #2794da;\n color: #fff;\n text-decoration: none;\n font-size: 20px;\n font-weight: 700;\n text-transform: uppercase;\n padding: 17px 10px;\n border: none;\n border-radius: 4px;\n width: 100%;\n box-sizing: border-box;\n box-shadow: none;\n transition: background-color .2s; }\n\n.edd-sidebar-footer-section .edd-cta-button:hover {\n background-color: #2386c5; }\n\n/* Settings sidebar responsive behavior */\n@media all and (min-width: 1080px) {\n .edd-has-sidebar .edd-settings-content {\n float: left;\n width: 67%; }\n .edd-has-sidebar .edd-settings-sidebar {\n float: right;\n width: 31%; } }\n\n@media all and (min-width: 1240px) {\n .edd-has-sidebar .edd-settings-content {\n width: 74%; }\n .edd-has-sidebar .edd-settings-sidebar {\n width: 23%; } }\n\n/* Settings - Move sidebar below content only on Taxes tab */\n.taxes-tab .edd-has-sidebar .edd-settings-content,\n.taxes-tab .edd-has-sidebar .edd-settings-sidebar {\n float: none;\n width: 100%; }\n\n/* Extensions (add-ons) page promotional element */\n.bfcm-promo-img-container {\n background-color: #35495c;\n width: 100%;\n height: 160px; }\n\n.bfcm-code {\n color: #2794da;\n font-weight: 700; }\n\n.sale-ends {\n position: absolute;\n bottom: 9px;\n right: 14px;\n display: inline-block;\n color: #6c7883;\n font-size: 12px;\n text-align: right;\n font-style: italic;\n width: 150px; }\n\n/**\n * Forms\n * ---------------------------------------------------------- */\n/**\n * Form Group\n *\n *
\n * \n *
\n * \t\n *
\n *

Help

\n *
\n *\n *\n *
\n * Label\n *\n *
\n * \t\n * \t\n *
\n *\n *
\n * \t\n * \t\n *
\n *
\n *\n */\n.edd-form-group {\n margin-bottom: 16px; }\n\n.edd-form-group:last-of-type {\n margin-bottom: 0; }\n\n.edd-form-group__label {\n display: block;\n margin-bottom: 8px;\n padding: 0; }\n\n.edd-form-group__control {\n margin-bottom: 8px; }\n\n.edd-form-group__control.is-radio,\n.edd-form-group__control.is-check {\n margin-top: 4px; }\n\n.edd-form-group__control:last-of-type {\n margin-bottom: 0; }\n\n.edd-form-group__input {\n max-width: 100%; }\n\n.edd-form-group__input[type=\"checkbox\"],\n.edd-form-group__input[type=\"radio\"] {\n margin-top: 0; }\n\n.edd-form-group__input[type=\"checkbox\"] + label,\n.edd-form-group__input[type=\"radio\"] + label {\n display: unset; }\n\nselect.edd-form-group__input {\n max-width: 100%; }\n\n.edd-form-group__help {\n color: #666;\n font-size: 13px;\n font-style: italic;\n line-height: initial;\n margin: 8px 0 0; }\n"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/css/edd-rtl.min.css b/assets/css/edd-rtl.min.css new file mode 100644 index 00000000000..7258245e365 --- /dev/null +++ b/assets/css/edd-rtl.min.css @@ -0,0 +1 @@ +.edd-icon{display:inline-block;fill:currentColor;position:relative;vertical-align:middle}.edd-icon-spin{display:inline-block;animation:edd-icon-spin 2s linear infinite}@keyframes edd-icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(-359deg)}}.edd_clearfix:after{display:block;visibility:hidden;float:none;clear:both;text-indent:-9999px;content:"."}#edd_checkout_cart{text-align:right;width:100%;border:none;margin:0 0 21px;table-layout:auto}#edd_checkout_cart td,#edd_checkout_cart th{text-align:right;border:1px solid #eee;color:#666;padding:.5em 1.387em}#edd_checkout_cart .edd_cart_header_row th{background:#fafafa;padding:1.387em}#edd_checkout_cart .edd_cart_discount_row th,#edd_checkout_cart .edd_cart_tax_row th{background:none}#edd_checkout_cart th{font-weight:700}#edd_checkout_cart td{line-height:25px;vertical-align:middle;background:#fff}#edd_checkout_cart td.edd_cart_actions,#edd_checkout_cart td:last-child,#edd_checkout_cart th.edd_cart_actions,#edd_checkout_cart th.edd_cart_total,#edd_checkout_cart th:last-child{text-align:left}#edd_checkout_cart td img{float:right;margin:0 0 0 8px;background:none;padding:0;border:none}#edd_checkout_cart input.edd-item-quantity{width:3em;padding:2px}#edd_checkout_cart .edd_discount{display:inline-block;margin-right:5px}.edd_discount_remove{display:inline-block;width:14px;height:14px;background:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%221.5%22%20stroke%3D%22currentColor%22%3E%0A%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M9.75%209.75l4.5%204.5m0-4.5l-4.5%204.5M21%2012a9%209%200%2011-18%200%209%209%200%200118%200z%22%20%2F%3E%0A%3C%2Fsvg%3E%0A) 100% 0 no-repeat;position:relative;opacity:.6}.edd_discount_remove:hover{opacity:1}#edd_checkout_cart br{display:none}#edd_checkout_cart a.edd-cart-saving-button{font-weight:400;text-decoration:none}#edd_checkout_form_wrap legend{display:block;font-size:120%;line-height:1;font-weight:700;width:100%;margin:0 0 1rem;padding:0;white-space:nowrap}#edd_checkout_form_wrap label{font-weight:700;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}#edd_checkout_form_wrap span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}#edd_checkout_form_wrap input.edd-input,#edd_checkout_form_wrap textarea.edd-input{display:inline-block;width:70%}#edd_checkout_form_wrap select.edd-select{display:block;width:60%}#edd_checkout_form_wrap select.edd-select.edd-select-small{display:inline;width:auto}#edd_checkout_form_wrap input.edd-input.error,#edd_checkout_form_wrap textarea.edd-input.error{border-color:#c4554e}#edd_checkout_form_wrap>p{margin:0 0 21px}#edd_checkout_form_wrap span.edd-required-indicator{color:#b94a48;display:inline}#edd_checkout_form_wrap input[type=email],#edd_checkout_form_wrap input[type=password],#edd_checkout_form_wrap input[type=tel],#edd_checkout_form_wrap input[type=text],#edd_checkout_form_wrap textarea{padding:4px 6px}#edd_checkout_form_wrap input[type=radio]{border:none;margin-left:5px}#edd_checkout_form_wrap input[type=checkbox]{display:inline-block;margin:0 0 0 5px}#edd_checkout_form_wrap input[type=checkbox]+label,#edd_checkout_form_wrap input[type=checkbox]+label:after{display:inline}#edd_checkout_form_wrap .edd-payment-icons{display:flex;margin:0 0 8px}#edd_checkout_form_wrap .edd-payment-icons img.payment-icon{max-height:32px}#edd_checkout_form_wrap .edd-payment-icons .payment-icon{margin:0 0 0 10px}#edd_checkout_form_wrap #edd-payment-mode-wrap label{display:inline-block;margin:0 0 0 20px}#edd_checkout_form_wrap #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:700;display:inline-block;position:relative;margin-bottom:5px}#edd_checkout_form_wrap fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}#edd_checkout_form_wrap #edd_discount_code,#edd_checkout_form_wrap #edd_purchase_submit,#edd_checkout_form_wrap #edd_register_account_fields{padding:0;border:none}#edd_checkout_form_wrap fieldset fieldset{margin:0;border:none;padding:0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount,#edd_checkout_form_wrap .edd-cart-adjustment{background:#fafafa;color:#666;padding:.5em 1.387em}#edd_checkout_form_wrap #edd-discount-code-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount{border:1px solid #eee}#edd_checkout_form_wrap .edd-cart-adjustment{padding:1.387em}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-input,#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{display:inline-block}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}#edd_checkout_form_wrap #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap{margin:-1.387em -1.387em 21px;border-right:none;border-left:none;border-top:none}#edd_checkout_form_wrap #edd_payment_mode_select,#edd_checkout_form_wrap fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}#edd_checkout_form_wrap fieldset#edd_register_account_fields legend{padding-top:11px}#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_login_password,#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_register_password{margin:0}#edd_checkout_form_wrap fieldset#edd_cc_fields legend{border:none;padding:0}#edd_checkout_form_wrap fieldset p:last-child{margin-bottom:0}#edd_checkout_form_wrap fieldset#edd_cc_fields #edd-card-number-wrap{margin-top:5px}#edd_checkout_form_wrap #edd_purchase_final_total{margin:21px 0}#edd_checkout_form_wrap #edd_purchase_final_total p{margin:0}#edd_secure_site_wrapper{padding:4px 0 4px 4px;font-weight:700}#edd_secure_site_wrapper span{vertical-align:middle}#edd_checkout_form_wrap input.edd-input.card-number.valid{background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%221.5%22%20stroke%3D%22green%22%3E%0A%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M4.5%2012.75l6%206%209-13.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A);background-repeat:no-repeat;background-position:2% 50%}#edd_checkout_form_wrap span.exp-divider{display:inline}#edd_checkout_form_wrap span.card-type{position:absolute;top:0;left:0}#edd_checkout_form_wrap span.card-type.off{display:none}#edd_checkout_form_wrap .edd-cart-ajax{box-shadow:none}.edd-amazon-profile-wrapper{font-size:12px}.edd-amazon-profile-name{font-weight:600}.edd-amazon-logout{font-size:10px;line-height:12px}.edd-amazon-logout a{cursor:pointer}#edd-amazon-address-box,#edd-amazon-wallet-box{height:228px;width:350px}#edd-amazon-address-box{margin-bottom:15px}.edd_cart_tax .edd-loading-ajax.edd-loading{margin:0 auto 0 0;display:inline-block}@media only screen and (min-width:768px){#edd-amazon-address-box,#edd-amazon-wallet-box{width:100%;height:228px}}.edd_purchase_submit_wrapper{position:relative}.edd_purchase_submit_wrapper a.edd-add-to-cart{text-decoration:none;display:none;position:relative;overflow:hidden}.edd_purchase_submit_wrapper .edd-cart-ajax{display:none;position:relative;right:-35px}.edd-submit.button.edd-ajax-loading{padding-left:30px}.edd-add-to-cart .edd-add-to-cart-label{opacity:1;filter:alpha(opacity=100)}.edd-loading,.edd-loading:after{border-radius:50%;display:block;width:1.5em;height:1.5em}.edd-loading{animation:edd-spinning 1.1s linear infinite;border:.2em solid hsla(0,0%,100%,.2);border-right-color:#fff;font-size:.75em;position:absolute;right:calc(50% - .75em);top:calc(50% - .75em);opacity:0;filter:alpha(opacity=0);transform:translateZ(0)}.edd-discount-loader.edd-loading,.edd-loading-ajax.edd-loading,a.edd-add-to-cart.white .edd-loading{border-color:rgba(0,0,0,.2) #000 rgba(0,0,0,.2) rgba(0,0,0,.2)}.edd-loading-ajax.edd-loading{display:inline-block;position:relative;top:0;right:.25em;vertical-align:middle}#edd_checkout_form_wrap .edd-cart-adjustment .edd-apply-discount.edd-submit{display:inline-block}.edd-discount-loader.edd-loading{display:inline-block;position:relative;right:auto;vertical-align:middle;width:1.25em;height:1.25em}.edd-loading-ajax.edd-loading{opacity:1}@keyframes edd-spinning{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.edd-loading,a.edd-add-to-cart .edd-add-to-cart-label{transition:opacity .1s!important}.edd-add-to-cart[data-edd-loading] .edd-add-to-cart-label{opacity:0;filter:alpha(opacity=0)}.edd-add-to-cart[data-edd-loading] .edd-loading,.edd-discount-loader.edd-loading{opacity:1;filter:alpha(opacity=100)}.edd-cart-added-alert{color:#567622;display:block;position:absolute}.edd_form input.edd-input.required,.edd_form select.edd-select.required{color:#000}body.edd_receipt_page{background-color:#fff;color:#141412;margin:0;font-family:Helvetica,sans-serif;font-size:12px}body.edd_receipt_page:before{position:relative}body.edd_receipt_page #edd_receipt_wrapper{width:660px;margin:0 auto;padding:50px 0}body.edd_receipt_page table{display:table;width:100%;border-bottom:1px solid #ededed;border-collapse:collapse;border-spacing:0;font-size:14px;line-height:2;margin:0 0 20px}body.edd_receipt_page td,body.edd_receipt_page th{display:table-cell;text-align:right;border-top:1px solid #ededed;padding:6px 10px;font-weight:400}body.edd_receipt_page th{font-weight:700;text-transform:uppercase}body.edd_receipt_page h3{font-size:22px;margin:40px 0 5px;clear:both;display:block;font-weight:700}body.edd_receipt_page li{list-style:none}table#edd_purchase_receipt,table#edd_purchase_receipt_products{width:100%}table#edd_purchase_receipt_products td,table#edd_purchase_receipt_products th,table#edd_purchase_receipt td,table#edd_purchase_receipt th{text-align:right}table#edd_purchase_receipt .edd_receipt_payment_status.cancelled,table#edd_purchase_receipt .edd_receipt_payment_status.failed,table#edd_purchase_receipt .edd_receipt_payment_status.pending,table#edd_purchase_receipt .edd_receipt_payment_status.revoked{color:#f73f2e}table#edd_purchase_receipt_products li{list-style:none;margin:0 10px 8px 0}table#edd_purchase_receipt_products ul.edd_purchase_receipt_files,table#edd_purchase_receipt ul{margin:0;padding:0}table#edd_purchase_receipt li.edd_download_file{list-style:none;margin:0 0 8px}table#edd_purchase_receipt_products .edd_purchase_receipt_product_notes{font-style:italic}table#edd_purchase_receipt_products .edd_purchase_receipt_product_name{font-weight:700}table#edd_purchase_receipt_products .edd_bundled_product_name{font-style:italic;font-weight:700}#edd_user_history{text-align:right;width:100%;border-top:1px solid #f0f0f0;border-bottom:none}#edd_user_history td,#edd_user_history th{text-align:right;padding:3px 5px;border-bottom:1px solid #f0f0f0;border-top:none}#edd_user_history th{font-weight:700;background:#f5f5f5}#edd_user_history td{line-height:25px;vertical-align:middle}#edd_user_history .edd_purchase_status.cancelled,#edd_user_history .edd_purchase_status.failed,#edd_user_history .edd_purchase_status.pending,#edd_user_history .edd_purchase_status.revoked{color:#f73f2e}#edd_login_form legend,#edd_register_form legend{font-size:120%;margin-bottom:1em}#edd_login_form fieldset,#edd_register_form fieldset{border:none}#edd_login_form .edd-input,#edd_register_form .edd-input{box-sizing:border-box}#edd_login_form label,#edd_register_form label{cursor:pointer}#edd_profile_editor_form p{margin-bottom:8px}#edd_profile_editor_form label{display:inline-block}#edd_profile_editor_form .edd-profile-emails{list-style-type:none;display:inline-table;margin-right:0;margin-bottom:0}#edd_profile_editor_form .edd-profile-email{width:auto}#edd_profile_editor_form .edd-profile-email .actions{display:none}#edd_profile_editor_form .edd-profile-email:hover>span{display:inline-block}.edd_added_to_cart_alert{padding:5px;font-size:14px;border:1px solid #046a9e;background:#9ecce2;color:#333;margin:8px 0}.edd_added_to_cart_alert a.edd_alert_checkout_link{color:#000!important}input.edd_submit_plain{background:none!important;border:none!important;padding:0!important;display:inline;cursor:pointer}.single-download .edd_download_purchase_form{margin-bottom:1.387em}.edd_download_purchase_form .edd_download_quantity_wrapper{margin:0 0 .5em}.edd_download_purchase_form .edd_download_quantity_wrapper .edd-item-quantity{width:75px}.edd_download_purchase_form .edd_price_options{margin:0 0 15px}.edd_download_purchase_form .edd_price_options ul{margin:0;padding:0;list-style:none}.edd_download_purchase_form .edd_price_options li{display:block;padding:0;margin:0}.edd_download_purchase_form .edd_price_options span{display:inline;padding:0;margin:0}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper{padding-right:18px}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper *{font-size:80%}.edd_download_purchase_form .edd_price_options input.edd-item-quantity{display:inline;width:50px;max-width:90%}#edd-purchase-button,.edd-submit,[type=submit].edd-submit{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid #ccc;border-radius:4px;box-shadow:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.edd-submit.button:focus,[type=submit].edd-submit:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.edd-submit.button:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.edd-submit.plain{padding:0;border:none;border-radius:0}.edd-submit.button,.edd-submit.button.gray,.edd-submit.button:visited{color:#333;background:#f0f0f0;border-color:#ccc}.edd-submit.button.gray:active,.edd-submit.button.gray:focus,.edd-submit.button.gray:hover,.edd-submit.button:active,.edd-submit.button:focus,.edd-submit.button:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.gray:active{background-image:none}.edd-submit.button.white{color:#333;background:#fff;border-color:#ccc}.edd-submit.button.white:active,.edd-submit.button.white:focus,.edd-submit.button.white:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.white:active{background-image:none}.edd-submit.button.blue{color:#fff;background:#428bca;border-color:#357ebd}.edd-submit.button.blue.active,.edd-submit.button.blue:focus,.edd-submit.button.blue:hover{color:#fff;background:#3276b1;border-color:#285e8e}.edd-submit.button.blue.active{background-image:none}.edd-submit.button.red{color:#fff;background:#d9534f;border-color:#d43f3a}.edd-submit.button.red:active,.edd-submit.button.red:focus,.edd-submit.button.red:hover{color:#fff;background:#d2322d;border-color:#ac2925}.edd-submit.button.red:active{background-image:none}.edd-submit.button.green{color:#fff;background:#5cb85c;border-color:#4cae4c}.edd-submit.button.green:active,.edd-submit.button.green:focus,.edd-submit.button.green:hover{color:#fff;background:#47a447;border-color:#398439}.edd-submit.button.green:active{background-image:none}.edd-submit.button.yellow{color:#fff;background:#f0ad4e;border-color:#eea236}.edd-submit.button.yellow:active,.edd-submit.button.yellow:focus,.edd-submit.button.yellow:hover{color:#fff;background:#ed9c28;border-color:#d58512}.edd-submit.button.yellow:active{background-image:none}.edd-submit.button.orange{color:#fff;background:#ed9c28;border-color:#e3921e}.edd-submit.button.orange:active,.edd-submit.button.orange:focus,.edd-submit.button.orange:hover{color:#fff;background:#e59016;border-color:#d58512}.edd-submit.button.orange:active{background-image:none}.edd-submit.button.dark-gray{color:#fff;background:#363636;border-color:#222}.edd-submit.button.dark-gray:active,.edd-submit.button.dark-gray:focus,.edd-submit.button.dark-gray:hover{color:#fff;background:#333;border-color:#adadad}.edd-submit.button.dark-gray:active{background-image:none}.edd_downloads_list{display:-ms-grid;display:grid;grid-column-gap:20px;grid-row-gap:40px}.edd_downloads_list:after{content:"";display:table;clear:both}.edd_download{float:right}.edd_download_columns_1 .edd_download{width:100%}.edd_download_columns_2 .edd_download{width:50%}.edd_download_columns_0 .edd_download,.edd_download_columns_3 .edd_download{width:33%}.edd_download_columns_4 .edd_download{width:25%}.edd_download_columns_5 .edd_download{width:20%}.edd_download_columns_6 .edd_download{width:16.6%}.edd_download_inner{padding:0 8px 8px;margin:0 0 10px}.edd_download_columns_2 .edd_download:nth-child(odd),.edd_download_columns_3 .edd_download:nth-child(3n+1),.edd_download_columns_4 .edd_download:nth-child(4n+1),.edd_download_columns_5 .edd_download:nth-child(5n+1),.edd_download_columns_6 .edd_download:nth-child(6n+1){clear:right}.edd_download_image{max-width:100%}.edd_download .edd_price{margin-bottom:10px}@media(min-width:768px){.edd_downloads_list:not(.edd_download_columns_1){-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.edd_downloads_list.edd_download_columns_2{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.edd_downloads_list.edd_download_columns_3{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.edd_downloads_list.edd_download_columns_4{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.edd_downloads_list.edd_download_columns_5{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.edd_downloads_list.edd_download_columns_6{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}}@supports(display:grid){.edd_downloads_list .edd_download{width:auto}.edd_download_inner{padding:0;margin:0}}.edd-hide-on-empty.cart-empty{display:none}.edd-cart-ajax{margin:0 4px 0 8px;position:relative;top:2px;background:none;border:none;padding:0}.edd-cart-number-of-items{font-style:italic;color:grey}.edd-cart-meta.edd_subtotal{font-weight:700;font-style:italic}.edd-cart-meta.edd_cart_tax{font-size:1em;font-style:italic}.edd-cart-meta.edd_cart_tax:before{font-style:normal}.edd-cart-meta.edd_total{font-weight:700}.edd-cart-meta{padding:2px 5px}.edd-cart-meta.edd_subtotal,.edd-cart-meta.edd_total{background-color:#f9f9f9}.edd_errors:not(.edd-alert){border-radius:2px;border:1px solid #e6db55;margin:0 0 21px;background:#ffffe0;color:#333}.edd_error{padding:10px}p.edd_error{margin:0!important}.edd_success:not(.edd-alert){border-radius:2px;border:1px solid #b3ce89;margin:20px 0;background:#d5eab3;color:#567622;padding:6px 8px;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.7)}.edd-alert{border-radius:2px;margin-bottom:20px;padding:10px;border:1px solid transparent;vertical-align:middle}.edd-alert p{padding:0}.edd-alert p:not(:last-child){margin-bottom:5px}.edd-alert p:last-child{margin-bottom:0}.edd-alert-error{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.edd-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.edd-alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.edd-alert-warn{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc} \ No newline at end of file diff --git a/assets/css/edd.min.css b/assets/css/edd.min.css new file mode 100644 index 00000000000..ff76c815250 --- /dev/null +++ b/assets/css/edd.min.css @@ -0,0 +1 @@ +.edd-icon{display:inline-block;fill:currentColor;position:relative;vertical-align:middle}.edd-icon-spin{display:inline-block;animation:edd-icon-spin 2s linear infinite}@keyframes edd-icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.edd_clearfix:after{display:block;visibility:hidden;float:none;clear:both;text-indent:-9999px;content:"."}#edd_checkout_cart{text-align:left;width:100%;border:none;margin:0 0 21px;table-layout:auto}#edd_checkout_cart td,#edd_checkout_cart th{text-align:left;border:1px solid #eee;color:#666;padding:.5em 1.387em}#edd_checkout_cart .edd_cart_header_row th{background:#fafafa;padding:1.387em}#edd_checkout_cart .edd_cart_discount_row th,#edd_checkout_cart .edd_cart_tax_row th{background:none}#edd_checkout_cart th{font-weight:700}#edd_checkout_cart td{line-height:25px;vertical-align:middle;background:#fff}#edd_checkout_cart td.edd_cart_actions,#edd_checkout_cart td:last-child,#edd_checkout_cart th.edd_cart_actions,#edd_checkout_cart th.edd_cart_total,#edd_checkout_cart th:last-child{text-align:right}#edd_checkout_cart td img{float:left;margin:0 8px 0 0;background:none;padding:0;border:none}#edd_checkout_cart input.edd-item-quantity{width:3em;padding:2px}#edd_checkout_cart .edd_discount{display:inline-block;margin-left:5px}.edd_discount_remove{display:inline-block;width:14px;height:14px;background:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%221.5%22%20stroke%3D%22currentColor%22%3E%0A%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M9.75%209.75l4.5%204.5m0-4.5l-4.5%204.5M21%2012a9%209%200%2011-18%200%209%209%200%200118%200z%22%20%2F%3E%0A%3C%2Fsvg%3E%0A) 0 0 no-repeat;position:relative;opacity:.6}.edd_discount_remove:hover{opacity:1}#edd_checkout_cart br{display:none}#edd_checkout_cart a.edd-cart-saving-button{font-weight:400;text-decoration:none}#edd_checkout_form_wrap legend{display:block;font-size:120%;line-height:1;font-weight:700;width:100%;margin:0 0 1rem;padding:0;white-space:nowrap}#edd_checkout_form_wrap label{font-weight:700;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}#edd_checkout_form_wrap span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}#edd_checkout_form_wrap input.edd-input,#edd_checkout_form_wrap textarea.edd-input{display:inline-block;width:70%}#edd_checkout_form_wrap select.edd-select{display:block;width:60%}#edd_checkout_form_wrap select.edd-select.edd-select-small{display:inline;width:auto}#edd_checkout_form_wrap input.edd-input.error,#edd_checkout_form_wrap textarea.edd-input.error{border-color:#c4554e}#edd_checkout_form_wrap>p{margin:0 0 21px}#edd_checkout_form_wrap span.edd-required-indicator{color:#b94a48;display:inline}#edd_checkout_form_wrap input[type=email],#edd_checkout_form_wrap input[type=password],#edd_checkout_form_wrap input[type=tel],#edd_checkout_form_wrap input[type=text],#edd_checkout_form_wrap textarea{padding:4px 6px}#edd_checkout_form_wrap input[type=radio]{border:none;margin-right:5px}#edd_checkout_form_wrap input[type=checkbox]{display:inline-block;margin:0 5px 0 0}#edd_checkout_form_wrap input[type=checkbox]+label,#edd_checkout_form_wrap input[type=checkbox]+label:after{display:inline}#edd_checkout_form_wrap .edd-payment-icons{display:flex;margin:0 0 8px}#edd_checkout_form_wrap .edd-payment-icons img.payment-icon{max-height:32px}#edd_checkout_form_wrap .edd-payment-icons .payment-icon{margin:0 10px 0 0}#edd_checkout_form_wrap #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}#edd_checkout_form_wrap #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:700;display:inline-block;position:relative;margin-bottom:5px}#edd_checkout_form_wrap fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}#edd_checkout_form_wrap #edd_discount_code,#edd_checkout_form_wrap #edd_purchase_submit,#edd_checkout_form_wrap #edd_register_account_fields{padding:0;border:none}#edd_checkout_form_wrap fieldset fieldset{margin:0;border:none;padding:0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount,#edd_checkout_form_wrap .edd-cart-adjustment{background:#fafafa;color:#666;padding:.5em 1.387em}#edd_checkout_form_wrap #edd-discount-code-wrap,#edd_checkout_form_wrap #edd_final_total_wrap,#edd_checkout_form_wrap #edd_show_discount{border:1px solid #eee}#edd_checkout_form_wrap .edd-cart-adjustment{padding:1.387em}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-input,#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{display:inline-block}#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}#edd_checkout_form_wrap #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}#edd_checkout_form_wrap #edd-login-account-wrap,#edd_checkout_form_wrap #edd-new-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}#edd_checkout_form_wrap #edd_payment_mode_select,#edd_checkout_form_wrap fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}#edd_checkout_form_wrap fieldset#edd_register_account_fields legend{padding-top:11px}#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_login_password,#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_register_password{margin:0}#edd_checkout_form_wrap fieldset#edd_cc_fields legend{border:none;padding:0}#edd_checkout_form_wrap fieldset p:last-child{margin-bottom:0}#edd_checkout_form_wrap fieldset#edd_cc_fields #edd-card-number-wrap{margin-top:5px}#edd_checkout_form_wrap #edd_purchase_final_total{margin:21px 0}#edd_checkout_form_wrap #edd_purchase_final_total p{margin:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:700}#edd_secure_site_wrapper span{vertical-align:middle}#edd_checkout_form_wrap input.edd-input.card-number.valid{background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%221.5%22%20stroke%3D%22green%22%3E%0A%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M4.5%2012.75l6%206%209-13.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A);background-repeat:no-repeat;background-position:98% 50%}#edd_checkout_form_wrap span.exp-divider{display:inline}#edd_checkout_form_wrap span.card-type{position:absolute;top:0;right:0}#edd_checkout_form_wrap span.card-type.off{display:none}#edd_checkout_form_wrap .edd-cart-ajax{box-shadow:none}.edd-amazon-profile-wrapper{font-size:12px}.edd-amazon-profile-name{font-weight:600}.edd-amazon-logout{font-size:10px;line-height:12px}.edd-amazon-logout a{cursor:pointer}#edd-amazon-address-box,#edd-amazon-wallet-box{height:228px;width:350px}#edd-amazon-address-box{margin-bottom:15px}.edd_cart_tax .edd-loading-ajax.edd-loading{margin:0 0 0 auto;display:inline-block}@media only screen and (min-width:768px){#edd-amazon-address-box,#edd-amazon-wallet-box{width:100%;height:228px}}.edd_purchase_submit_wrapper{position:relative}.edd_purchase_submit_wrapper a.edd-add-to-cart{text-decoration:none;display:none;position:relative;overflow:hidden}.edd_purchase_submit_wrapper .edd-cart-ajax{display:none;position:relative;left:-35px}.edd-submit.button.edd-ajax-loading{padding-right:30px}.edd-add-to-cart .edd-add-to-cart-label{opacity:1;filter:alpha(opacity=100)}.edd-loading,.edd-loading:after{border-radius:50%;display:block;width:1.5em;height:1.5em}.edd-loading{animation:edd-spinning 1.1s linear infinite;border:.2em solid hsla(0,0%,100%,.2);border-left-color:#fff;font-size:.75em;position:absolute;left:calc(50% - .75em);top:calc(50% - .75em);opacity:0;filter:alpha(opacity=0);transform:translateZ(0)}.edd-discount-loader.edd-loading,.edd-loading-ajax.edd-loading,a.edd-add-to-cart.white .edd-loading{border-color:rgba(0,0,0,.2) rgba(0,0,0,.2) rgba(0,0,0,.2) #000}.edd-loading-ajax.edd-loading{display:inline-block;position:relative;top:0;left:.25em;vertical-align:middle}#edd_checkout_form_wrap .edd-cart-adjustment .edd-apply-discount.edd-submit{display:inline-block}.edd-discount-loader.edd-loading{display:inline-block;position:relative;left:auto;vertical-align:middle;width:1.25em;height:1.25em}.edd-loading-ajax.edd-loading{opacity:1}@keyframes edd-spinning{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.edd-loading,a.edd-add-to-cart .edd-add-to-cart-label{transition:opacity .1s!important}.edd-add-to-cart[data-edd-loading] .edd-add-to-cart-label{opacity:0;filter:alpha(opacity=0)}.edd-add-to-cart[data-edd-loading] .edd-loading,.edd-discount-loader.edd-loading{opacity:1;filter:alpha(opacity=100)}.edd-cart-added-alert{color:#567622;display:block;position:absolute}.edd_form input.edd-input.required,.edd_form select.edd-select.required{color:#000}body.edd_receipt_page{background-color:#fff;color:#141412;margin:0;font-family:Helvetica,sans-serif;font-size:12px}body.edd_receipt_page:before{position:relative}body.edd_receipt_page #edd_receipt_wrapper{width:660px;margin:0 auto;padding:50px 0}body.edd_receipt_page table{display:table;width:100%;border-bottom:1px solid #ededed;border-collapse:collapse;border-spacing:0;font-size:14px;line-height:2;margin:0 0 20px}body.edd_receipt_page td,body.edd_receipt_page th{display:table-cell;text-align:left;border-top:1px solid #ededed;padding:6px 10px;font-weight:400}body.edd_receipt_page th{font-weight:700;text-transform:uppercase}body.edd_receipt_page h3{font-size:22px;margin:40px 0 5px;clear:both;display:block;font-weight:700}body.edd_receipt_page li{list-style:none}table#edd_purchase_receipt,table#edd_purchase_receipt_products{width:100%}table#edd_purchase_receipt_products td,table#edd_purchase_receipt_products th,table#edd_purchase_receipt td,table#edd_purchase_receipt th{text-align:left}table#edd_purchase_receipt .edd_receipt_payment_status.cancelled,table#edd_purchase_receipt .edd_receipt_payment_status.failed,table#edd_purchase_receipt .edd_receipt_payment_status.pending,table#edd_purchase_receipt .edd_receipt_payment_status.revoked{color:#f73f2e}table#edd_purchase_receipt_products li{list-style:none;margin:0 0 8px 10px}table#edd_purchase_receipt_products ul.edd_purchase_receipt_files,table#edd_purchase_receipt ul{margin:0;padding:0}table#edd_purchase_receipt li.edd_download_file{list-style:none;margin:0 0 8px}table#edd_purchase_receipt_products .edd_purchase_receipt_product_notes{font-style:italic}table#edd_purchase_receipt_products .edd_purchase_receipt_product_name{font-weight:700}table#edd_purchase_receipt_products .edd_bundled_product_name{font-style:italic;font-weight:700}#edd_user_history{text-align:left;width:100%;border-top:1px solid #f0f0f0;border-bottom:none}#edd_user_history td,#edd_user_history th{text-align:left;padding:3px 5px;border-bottom:1px solid #f0f0f0;border-top:none}#edd_user_history th{font-weight:700;background:#f5f5f5}#edd_user_history td{line-height:25px;vertical-align:middle}#edd_user_history .edd_purchase_status.cancelled,#edd_user_history .edd_purchase_status.failed,#edd_user_history .edd_purchase_status.pending,#edd_user_history .edd_purchase_status.revoked{color:#f73f2e}#edd_login_form legend,#edd_register_form legend{font-size:120%;margin-bottom:1em}#edd_login_form fieldset,#edd_register_form fieldset{border:none}#edd_login_form .edd-input,#edd_register_form .edd-input{box-sizing:border-box}#edd_login_form label,#edd_register_form label{cursor:pointer}#edd_profile_editor_form p{margin-bottom:8px}#edd_profile_editor_form label{display:inline-block}#edd_profile_editor_form .edd-profile-emails{list-style-type:none;display:inline-table;margin-left:0;margin-bottom:0}#edd_profile_editor_form .edd-profile-email{width:auto}#edd_profile_editor_form .edd-profile-email .actions{display:none}#edd_profile_editor_form .edd-profile-email:hover>span{display:inline-block}.edd_added_to_cart_alert{padding:5px;font-size:14px;border:1px solid #046a9e;background:#9ecce2;color:#333;margin:8px 0}.edd_added_to_cart_alert a.edd_alert_checkout_link{color:#000!important}input.edd_submit_plain{background:none!important;border:none!important;padding:0!important;display:inline;cursor:pointer}.single-download .edd_download_purchase_form{margin-bottom:1.387em}.edd_download_purchase_form .edd_download_quantity_wrapper{margin:0 0 .5em}.edd_download_purchase_form .edd_download_quantity_wrapper .edd-item-quantity{width:75px}.edd_download_purchase_form .edd_price_options{margin:0 0 15px}.edd_download_purchase_form .edd_price_options ul{margin:0;padding:0;list-style:none}.edd_download_purchase_form .edd_price_options li{display:block;padding:0;margin:0}.edd_download_purchase_form .edd_price_options span{display:inline;padding:0;margin:0}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper{padding-left:18px}.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper *{font-size:80%}.edd_download_purchase_form .edd_price_options input.edd-item-quantity{display:inline;width:50px;max-width:90%}#edd-purchase-button,.edd-submit,[type=submit].edd-submit{display:inline-block;padding:6px 12px;margin:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid #ccc;border-radius:4px;box-shadow:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.edd-submit.button:focus,[type=submit].edd-submit:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.edd-submit.button:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.edd-submit.plain{padding:0;border:none;border-radius:0}.edd-submit.button,.edd-submit.button.gray,.edd-submit.button:visited{color:#333;background:#f0f0f0;border-color:#ccc}.edd-submit.button.gray:active,.edd-submit.button.gray:focus,.edd-submit.button.gray:hover,.edd-submit.button:active,.edd-submit.button:focus,.edd-submit.button:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.gray:active{background-image:none}.edd-submit.button.white{color:#333;background:#fff;border-color:#ccc}.edd-submit.button.white:active,.edd-submit.button.white:focus,.edd-submit.button.white:hover{color:#333;background:#ebebeb;border-color:#adadad}.edd-submit.button.white:active{background-image:none}.edd-submit.button.blue{color:#fff;background:#428bca;border-color:#357ebd}.edd-submit.button.blue.active,.edd-submit.button.blue:focus,.edd-submit.button.blue:hover{color:#fff;background:#3276b1;border-color:#285e8e}.edd-submit.button.blue.active{background-image:none}.edd-submit.button.red{color:#fff;background:#d9534f;border-color:#d43f3a}.edd-submit.button.red:active,.edd-submit.button.red:focus,.edd-submit.button.red:hover{color:#fff;background:#d2322d;border-color:#ac2925}.edd-submit.button.red:active{background-image:none}.edd-submit.button.green{color:#fff;background:#5cb85c;border-color:#4cae4c}.edd-submit.button.green:active,.edd-submit.button.green:focus,.edd-submit.button.green:hover{color:#fff;background:#47a447;border-color:#398439}.edd-submit.button.green:active{background-image:none}.edd-submit.button.yellow{color:#fff;background:#f0ad4e;border-color:#eea236}.edd-submit.button.yellow:active,.edd-submit.button.yellow:focus,.edd-submit.button.yellow:hover{color:#fff;background:#ed9c28;border-color:#d58512}.edd-submit.button.yellow:active{background-image:none}.edd-submit.button.orange{color:#fff;background:#ed9c28;border-color:#e3921e}.edd-submit.button.orange:active,.edd-submit.button.orange:focus,.edd-submit.button.orange:hover{color:#fff;background:#e59016;border-color:#d58512}.edd-submit.button.orange:active{background-image:none}.edd-submit.button.dark-gray{color:#fff;background:#363636;border-color:#222}.edd-submit.button.dark-gray:active,.edd-submit.button.dark-gray:focus,.edd-submit.button.dark-gray:hover{color:#fff;background:#333;border-color:#adadad}.edd-submit.button.dark-gray:active{background-image:none}.edd_downloads_list{display:-ms-grid;display:grid;grid-column-gap:20px;grid-row-gap:40px}.edd_downloads_list:after{content:"";display:table;clear:both}.edd_download{float:left}.edd_download_columns_1 .edd_download{width:100%}.edd_download_columns_2 .edd_download{width:50%}.edd_download_columns_0 .edd_download,.edd_download_columns_3 .edd_download{width:33%}.edd_download_columns_4 .edd_download{width:25%}.edd_download_columns_5 .edd_download{width:20%}.edd_download_columns_6 .edd_download{width:16.6%}.edd_download_inner{padding:0 8px 8px;margin:0 0 10px}.edd_download_columns_2 .edd_download:nth-child(odd),.edd_download_columns_3 .edd_download:nth-child(3n+1),.edd_download_columns_4 .edd_download:nth-child(4n+1),.edd_download_columns_5 .edd_download:nth-child(5n+1),.edd_download_columns_6 .edd_download:nth-child(6n+1){clear:left}.edd_download_image{max-width:100%}.edd_download .edd_price{margin-bottom:10px}@media(min-width:768px){.edd_downloads_list:not(.edd_download_columns_1){-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.edd_downloads_list.edd_download_columns_2{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.edd_downloads_list.edd_download_columns_3{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.edd_downloads_list.edd_download_columns_4{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.edd_downloads_list.edd_download_columns_5{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.edd_downloads_list.edd_download_columns_6{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}}@supports(display:grid){.edd_downloads_list .edd_download{width:auto}.edd_download_inner{padding:0;margin:0}}.edd-hide-on-empty.cart-empty{display:none}.edd-cart-ajax{margin:0 8px 0 4px;position:relative;top:2px;background:none;border:none;padding:0}.edd-cart-number-of-items{font-style:italic;color:grey}.edd-cart-meta.edd_subtotal{font-weight:700;font-style:italic}.edd-cart-meta.edd_cart_tax{font-size:1em;font-style:italic}.edd-cart-meta.edd_cart_tax:before{font-style:normal}.edd-cart-meta.edd_total{font-weight:700}.edd-cart-meta{padding:2px 5px}.edd-cart-meta.edd_subtotal,.edd-cart-meta.edd_total{background-color:#f9f9f9}.edd_errors:not(.edd-alert){border-radius:2px;border:1px solid #e6db55;margin:0 0 21px;background:#ffffe0;color:#333}.edd_error{padding:10px}p.edd_error{margin:0!important}.edd_success:not(.edd-alert){border-radius:2px;border:1px solid #b3ce89;margin:20px 0;background:#d5eab3;color:#567622;padding:6px 8px;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.7)}.edd-alert{border-radius:2px;margin-bottom:20px;padding:10px;border:1px solid transparent;vertical-align:middle}.edd-alert p{padding:0}.edd-alert p:not(:last-child){margin-bottom:5px}.edd-alert p:last-child{margin-bottom:0}.edd-alert-error{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.edd-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.edd-alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.edd-alert-warn{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc} \ No newline at end of file diff --git a/assets/css/frontend/stripe/card-elements.scss b/assets/css/frontend/stripe/card-elements.scss new file mode 100644 index 00000000000..6617ae3922b --- /dev/null +++ b/assets/css/frontend/stripe/card-elements.scss @@ -0,0 +1,396 @@ +/** + * Internal dependencices + */ + @import './frontend/shared.scss'; + @import './frontend/modal.scss'; + @import './frontend/payment-request-button.scss'; + + #edd_checkout_form_wrap .edd-card-selector-radio label { + display: inline; + vertical-align: middle; + font-weight: normal; + line-height: 24px; + font-size: 100%; + margin: 0px; + } + + .edd-card-selector-radio .edd-stripe-card-radio-item { + width: 100%; + font-size: 15px; + padding: 8px 12px; + border: 1px solid transparent; + + label { + line-height: 1; + margin: 0; + display: flex; + align-items: center; + + .add-new-card, + .card-label { + margin-left: 8px; + } + } + } + + .edd-card-selector-radio .edd-stripe-card-radio-item.selected { + border: 1px solid #f0f0f0; + background-color: #fcfcfc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + + .edd-card-selector-radio div.card-label { + width: 65%; + display: inline-block; + } + + .edd-card-selector-radio span.card-is-default { + font-style: italic; + } + + .edd-card-selector-radio span.card-expired { + color: #ff3333; + } + + .edd-stripe-card-selector + .edd-stripe-new-card { + margin-top: 20px; + } + + #edd-stripe-manage-cards .edd-stripe-add-new-card { + margin: 20px 0 10px; + } + + #edd-stripe-manage-cards div.edd-stripe-card-item { + list-style: none; + width: 100%; + display: inline-grid; + border: 1px solid #f0f0f0; + padding: 5px 10px; + min-height: 100px; + margin-bottom: 10px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + margin-left: 0px; + } + + .edd-stripe-card-item > span { + display: block; + } + + .edd-stripe-card-item .card-meta > span { + color: #999; + display: block; + } + + .edd-stripe-card-item .card-actions a { + text-decoration: none; + } + + .edd-stripe-card-item .card-actions a.delete { + color: #ff3333; + } + + .card-actions .edd-loading-ajax { + display: inline-block; + margin-right: 4px; + } + + .edd-stripe-card-item .card-update-form { + display: none; + } + + .edd-stripe-card-item .card-update-form label { + font-weight: bold; + } + + .edd-stripe-card-item .card-update-form input { + margin-bottom: 3px; + } + + .edd-stripe-card-item .card-update-form select { + background: #fff; + border: 1px solid #e4e4e4; + height: 40px; + margin-right: 3px; + } + + .edd-stripe-card-item .card-update-form select:first-of-type { + margin-right: 3px; + } + + .edd-stripe-card-item .card-address-fields input, + .edd-stripe-card-item .card-address-fields select { + width: 49%; + display: inline-block; + } + + /* Checkout Fields */ + .edd-stripe-add-new-card label { + font-weight: bold; + display: block; + position: relative; + line-height: 100%; + font-size: 95%; + margin: 0 0 5px; + } + .edd-stripe-add-new-card label:after { + display: block; + visibility: hidden; + float: none; + clear: both; + height: 0; + text-indent: -9999px; + content: "."; + } + .edd-stripe-add-new-card span.edd-description { + color: #666; + font-size: 80%; + display: block; + margin: 0 0 5px; + } + .edd-stripe-add-new-card input.edd-input, + .edd-stripe-add-new-card textarea.edd-input { + display: inline-block; + width: 70%; + } + .edd-stripe-add-new-card select.edd-select { + display: block; + width: 60%; + } + .edd-stripe-add-new-card select.edd-select.edd-select-small { + display: inline; + width: auto; + } + .edd-stripe-add-new-card input.edd-input.error, + .edd-stripe-add-new-card textarea.edd-input.error { + border-color: #c4554e; + } + .edd-stripe-add-new-card > p { + margin: 0 0 21px; + } + .edd-stripe-add-new-card span.edd-required-indicator { + color: #b94a48; + display: inline; + } + .edd-stripe-add-new-card textarea, + .edd-stripe-add-new-card input[type="text"], + .edd-stripe-add-new-card input[type="email"], + .edd-stripe-add-new-card input[type="password"], + .edd-stripe-add-new-card input[type="tel"] { + padding: 4px 6px; + } + .edd-stripe-add-new-card input[type="radio"] { + border: none; + margin-right: 5px; + } + .edd-stripe-add-new-card input[type="checkbox"] { + display: inline-block; + margin: 0 5px 0 0; + } + .edd-stripe-add-new-card input[type="checkbox"] + label, + .edd-stripe-add-new-card input[type="checkbox"] + label:after { + display: inline; + } + .edd-stripe-add-new-card .edd-payment-icons { + height: 32px; + display: block; + margin: 0 0 8px; + } + .edd-stripe-add-new-card .edd-payment-icons img.payment-icon { + max-height: 32px; + width: auto; + margin: 0 3px 0 0; + float: left; + background: none; + padding: 0; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .edd-stripe-add-new-card #edd-payment-mode-wrap label { + display: inline-block; + margin: 0 20px 0 0; + } + .edd-stripe-add-new-card #edd-payment-mode-wrap .edd-payment-mode-label { + font-weight: bold; + display: inline-block; + position: relative; + margin-bottom: 5px; + } + .edd-stripe-add-new-card fieldset { + border: 1px solid #eee; + padding: 1.387em; + margin: 0 0 21px; + } + .edd-stripe-add-new-card #edd_purchase_submit, + .edd-stripe-add-new-card #edd_discount_code, + .edd-stripe-add-new-card #edd_register_account_fields { + padding: 0; + border: none; + } + .edd-stripe-add-new-card fieldset fieldset { + margin: 0; + border: none; + padding: 0; + } + .edd-stripe-add-new-card #edd-login-account-wrap, + .edd-stripe-add-new-card #edd-new-account-wrap, + .edd-stripe-add-new-card #edd_show_discount, + .edd-stripe-add-new-card .edd-cart-adjustment, + .edd-stripe-add-new-card #edd_final_total_wrap { + background: #fafafa; + color: #666; + padding: 0.5em 1.387em; + } + .edd-stripe-add-new-card #edd-discount-code-wrap, + .edd-stripe-add-new-card #edd_final_total_wrap, + .edd-stripe-add-new-card #edd_show_discount { + border: 1px solid #eee; + } + .edd-stripe-add-new-card .edd-cart-adjustment { + padding: 1.387em; + } + .edd-stripe-add-new-card .edd-cart-adjustment input.edd-input, + .edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit { + display: inline-block; + } + .edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit { + padding: 3px 12px; + margin-bottom: 2px; + } + .edd-stripe-add-new-card #edd-discount-error-wrap { + width: 100%; + display: inline-block; + margin: 1em 0 0; + } + .edd-stripe-add-new-card #edd-new-account-wrap, + .edd-stripe-add-new-card #edd-login-account-wrap { + margin: -1.387em -1.387em 21px; + border-left: none; + border-right: none; + border-top: none; + } + .edd-stripe-add-new-card #edd_payment_mode_select { + margin-bottom: 21px; + } + .edd-stripe-add-new-card fieldset#edd_register_fields #edd_checkout_user_info { + margin-bottom: 21px; + } + .edd-stripe-add-new-card fieldset#edd_register_account_fields legend { + padding-top: 11px; + } + .edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_register_password, + .edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_login_password { + margin: 0; + } + .edd-stripe-add-new-card fieldset#edd_cc_fields { + border: 1px solid #f0f0f0; + background: #f9f9f9; + position: relative; + } + .edd-stripe-add-new-card fieldset#edd_cc_fields legend { + border: none; + padding: 0; + } + .edd-stripe-add-new-card fieldset p:last-child { + margin-bottom: 0; + } + #edd_secure_site_wrapper { + padding: 4px 4px 4px 0; + font-weight: bold; + } + .edd-stripe-add-new-card span.exp-divider { + display: inline; + } + + /** + * Stripe Elements - Card + */ + .edd-stripe-card-element.StripeElement, + .edd-stripe-card-exp-element.StripeElement, + .edd-stripe-card-cvc-element.StripeElement { + box-sizing: border-box; + padding: 10px 12px; + border: 1px solid #ccc; + background-color: white; + } + + .edd-stripe-card-element.StripeElement--invalid { + border-color: #c4554e !important; + } + + #edd-card-wrap { + position: relative; + } + + #edd-card-details-wrap { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + } + + #edd-card-details-wrap p:empty { + width: 100%; + } + + #edd-card-exp-wrap, + #edd-card-cvv-wrap { + width: 48%; + } + + #edd-stripe-card-element-wrapper { + position: relative; + } + + #edd_checkout_form_wrap .edd-stripe-new-card span.card-type { + background-size: 32px 24px !important; + width: 32px; + height: 24px; + top: 50%; + transform: translate3d(0, -50%, 0); + right: 10px; + } + + /** + * "Buy Now" modal. + */ + .edds-buy-now-modal { + width: 500px; + + .edds-modal__close { + padding: 0.5rem; + } + + #edd_checkout_form_wrap { + + input.edd-input, + textarea.edd-input { + width: 100%; + } + + #edd_purchase_submit { + margin-top: 1.5rem; + margin-bottom: 0; + } + } + + .edds-field-spacer-shim { + margin-bottom: 1rem; + } + + .edd-alert-error { + margin: 20px 0; + } + + #edd-stripe-card-errors:not(:empty) { + margin-bottom: 20px; + + .edd-alert-error { + margin: 0; + } + } + } \ No newline at end of file diff --git a/assets/css/frontend/stripe/frontend/modal.scss b/assets/css/frontend/stripe/frontend/modal.scss new file mode 100644 index 00000000000..05c5a7bff15 --- /dev/null +++ b/assets/css/frontend/stripe/frontend/modal.scss @@ -0,0 +1,143 @@ +:root { + --edds-modal-grid-unit: 1rem; + --edds-modal-overlay: rgba(0, 0, 0, 0.60); +} + +.edds-modal__overlay { + z-index: 9999; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: var(--edds-modal-overlay); + display: flex; + justify-content: center; + align-items: center; +} + +.edds-modal__container { + background-color: #fff; + min-width: 350px; + max-width: 90vw; + max-height: 90vh; + box-sizing: border-box; + overflow-y: auto; +} + +.admin-bar .edds-modal__container { + margin-top: 32px; +} + +.edds-modal__header { + padding: calc(var(--edds-modal-grid-unit) * 1.5); + display: flex; + justify-content: space-between; + align-items: center; + position: sticky; + top: 0; + z-index: 2; + background: #fff; + border-bottom: 1px solid #eee; +} + +.edds-modal__title { + text-align: left; + font-size: 150%; + margin: 0; +} + +.edds-modal__close { + line-height: 1; + padding: 1rem; + + &:before { + content: "\2715"; + } +} + +.edds-modal__content { + margin: calc(var(--edds-modal-grid-unit) * 1.5); +} + +/** + * Animations + */ +@keyframes eddsSlideIn { + from { + transform: translateY(15%); + } + to { + transform: translateY(0); + } +} + +@keyframes eddsSlideOut { + from { + transform: translateY(0); + } + to { + transform: translateY(15%); + } +} + +.edds-modal.has-slide { + display: none; +} + +.edds-modal.has-slide.is-open { + display: block; +} + +.edds-modal.has-slide[aria-hidden="false"] .edds-modal__container { + animation: eddsSlideIn 0.3s cubic-bezier(0.0, 0.0, 0.2, 1); +} + +.edds-modal.has-slide[aria-hidden="true"] .edds-modal__container { + animation: eddsSlideOut 0.3s cubic-bezier(0.0, 0.0, 0.2, 1); +} + +.edds-modal.has-slide .edds-modal__container, +.edds-modal.has-slide .edds-modal__overlay { + will-change: transform; +} + + /** + * "Buy Now" modal. + */ + .edds-buy-now-modal { + width: 500px; + + .edds-modal__close { + padding: 0.5rem; + } + + #edd_checkout_form_wrap { + + input.edd-input, + textarea.edd-input { + width: 100%; + } + + #edd_purchase_submit { + margin-top: 1.5rem; + margin-bottom: 0; + } + } + + .edds-field-spacer-shim { + margin-bottom: 1rem; + } + + .edd-alert-error { + margin: 20px 0; + } + + #edd-stripe-card-errors:not(:empty) { + margin-bottom: 20px; + + .edd-alert-error { + margin: 0; + } + } +} \ No newline at end of file diff --git a/assets/css/frontend/stripe/frontend/payment-request-button.scss b/assets/css/frontend/stripe/frontend/payment-request-button.scss new file mode 100644 index 00000000000..e4198ee0f8c --- /dev/null +++ b/assets/css/frontend/stripe/frontend/payment-request-button.scss @@ -0,0 +1,83 @@ +.edds-prb { + margin: 15px 0; + display: none; + + &__or { + font-size: 90%; + text-align: center; + margin: 15px 0; + overflow: hidden; + + &::before, + &::after { + background-color: rgba(0, 0, 0, .10); + content: ""; + display: inline-block; + height: 1px; + position: relative; + vertical-align: middle; + width: 50%; + } + + &::before { + right: 0.5em; + margin-left: -50%; + } + + &::after { + left: 0.5em; + margin-right: -50%; + } + } +} + +@mixin loadingState { + + &.loading { + position: relative; + + &::after { + content: ""; + position: absolute; + left: 0; + width: 100%; + height: 100%; + top: 0; + z-index: 100; + } + + > * { + opacity: 0.65; + } + } +} + +/** + * Purchase link loading state. + * + * Disables interaction while redirecting. + */ +.edd_download_purchase_form { + + @include loadingState; +} + +/** + * Checkout + */ +#edd_checkout_form_wrap { + + @include loadingState; + + &:not(.edd-prb--is-active) #edd-payment-mode-wrap #edd-gateway-option-stripe-prb { + display: none !important; + } + + .edds-prb { + margin-bottom: 0; + } + + .edds-prb__or { + display: none; + } +} diff --git a/assets/css/frontend/stripe/frontend/shared.scss b/assets/css/frontend/stripe/frontend/shared.scss new file mode 100644 index 00000000000..e9bc5ef2441 --- /dev/null +++ b/assets/css/frontend/stripe/frontend/shared.scss @@ -0,0 +1,3 @@ +#edd-stripe-card-errors:not(:empty) { + margin: 20px 0 0; +} \ No newline at end of file diff --git a/assets/css/frontend/stripe/payment-elements.scss b/assets/css/frontend/stripe/payment-elements.scss new file mode 100644 index 00000000000..f7faadb31f6 --- /dev/null +++ b/assets/css/frontend/stripe/payment-elements.scss @@ -0,0 +1,29 @@ +/** + * Internal dependencices + */ + @import './frontend/shared.scss'; + @import './frontend/modal.scss'; + +#edd_purchase_submit { + + & #edd-purchase-button { + &[data-edd-button-state="disabled"] + { + opacity: 0.5; + cursor: not-allowed; + } + + &[data-edd-button-state="updating"], + [data-edd-button-state="processing"] { + opacity: 0.5; + cursor: wait; + } + } +} + +#card_name, +.card-name { + padding: 8px !important; + width: 100% !important; + box-sizing: border-box; +} \ No newline at end of file diff --git a/assets/css/frontend/style.scss b/assets/css/frontend/style.scss new file mode 100644 index 00000000000..61b1e7b59d6 --- /dev/null +++ b/assets/css/frontend/style.scss @@ -0,0 +1,1060 @@ +/** + * Easy Digital Downloads Styles + * + * @package EDD + * @subpackage CSS + * @copyright Copyright (c) 2015, Pippin Williamson + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License +*/ +@charset "UTF-8"; + +/* Base styles for SVG icons. */ + +.edd-icon { + display: inline-block; + fill: currentColor; + position: relative; /* Align more nicely with capital letters */ + vertical-align: middle; +} + +.edd-icon-spin { + display: inline-block; + animation: edd-icon-spin 2s infinite linear; +} + +@keyframes edd-icon-spin { + 0% { + transform: rotate(0deg) + } + 100% { + transform: rotate(359deg) + } +} + + +/* =Checkout Form +-------------------------------------------------------------- */ +.edd_clearfix:after { + display: block; + visibility: hidden; + float: none; + clear: both; + text-indent: -9999px; + content: "."; +} + +/* Cart Contents */ +#edd_checkout_cart { + text-align: left; + width: 100%; + border: none; + margin: 0 0 21px; + table-layout: auto; +} +#edd_checkout_cart th, +#edd_checkout_cart td { + text-align: left; + border: 1px solid #eee; + color: #666; + padding: 0.5em 1.387em; +} +#edd_checkout_cart .edd_cart_header_row th { + background: #fafafa; + padding: 1.387em; +} +#edd_checkout_cart .edd_cart_tax_row th, +#edd_checkout_cart .edd_cart_discount_row th { + background: none; +} +#edd_checkout_cart th { + font-weight: bold; +} +#edd_checkout_cart td { + line-height: 25px; + vertical-align: middle; + background: #fff; +} +#edd_checkout_cart th.edd_cart_actions, +#edd_checkout_cart td.edd_cart_actions, +#edd_checkout_cart th:last-child, +#edd_checkout_cart td:last-child, +#edd_checkout_cart th.edd_cart_total { + text-align: right; +} +#edd_checkout_cart td img { + float: left; + margin: 0 8px 0 0; + background: none; + padding: 0; + border: none; +} +#edd_checkout_cart input.edd-item-quantity { + width: 3em; + padding: 2px; +} +#edd_checkout_cart .edd_discount { + display: inline-block; + margin-left: 5px; +} +.edd_discount_remove { + display: inline-block; + width: 14px; + height: 14px; + background: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%221.5%22%20stroke%3D%22currentColor%22%3E%0A%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M9.75%209.75l4.5%204.5m0-4.5l-4.5%204.5M21%2012a9%209%200%2011-18%200%209%209%200%200118%200z%22%20%2F%3E%0A%3C%2Fsvg%3E%0A) 0 0 no-repeat; + position: relative; + opacity: .6; + + &:hover { + opacity: 1; + } +} + +#edd_checkout_cart br { + display: none; +} +#edd_checkout_cart a.edd-cart-saving-button { + font-weight: normal; + text-decoration: none; +} + +/* Checkout Fields */ +#edd_checkout_form_wrap legend { + display: block; + font-size: 120%; + line-height: 1; + font-weight: bold; + width: 100%; + margin: 0 0 1rem; + padding: 0; + white-space: nowrap; +} + +#edd_checkout_form_wrap label { + font-weight: bold; + display: block; + position: relative; + line-height: 100%; + font-size: 95%; + margin: 0 0 5px; +} +#edd_checkout_form_wrap span.edd-description { + color: #666; + font-size: 80%; + display: block; + margin: 0 0 5px; +} +#edd_checkout_form_wrap input.edd-input, +#edd_checkout_form_wrap textarea.edd-input { + display: inline-block; + width: 70%; +} +#edd_checkout_form_wrap select.edd-select { + display: block; + width: 60%; +} +#edd_checkout_form_wrap select.edd-select.edd-select-small { + display: inline; + width: auto; +} +#edd_checkout_form_wrap input.edd-input.error, +#edd_checkout_form_wrap textarea.edd-input.error { + border-color: #c4554e; +} +#edd_checkout_form_wrap > p { + margin: 0 0 21px; +} +#edd_checkout_form_wrap span.edd-required-indicator { + color: #b94a48; + display: inline; +} +#edd_checkout_form_wrap textarea, +#edd_checkout_form_wrap input[type="text"], +#edd_checkout_form_wrap input[type="email"], +#edd_checkout_form_wrap input[type="password"], +#edd_checkout_form_wrap input[type="tel"] { + padding: 4px 6px; +} +#edd_checkout_form_wrap input[type="radio"] { + border: none; + margin-right: 5px; +} +#edd_checkout_form_wrap input[type="checkbox"] { + display: inline-block; + margin: 0 5px 0 0; +} +#edd_checkout_form_wrap input[type="checkbox"] + label, +#edd_checkout_form_wrap input[type="checkbox"] + label:after { + display: inline; +} +#edd_checkout_form_wrap .edd-payment-icons { + display: -ms-flexbox; + display: flex; + margin: 0 0 8px; +} +#edd_checkout_form_wrap .edd-payment-icons img.payment-icon { + max-height: 32px; +} +#edd_checkout_form_wrap .edd-payment-icons .payment-icon { + margin: 0 10px 0 0; +} +#edd_checkout_form_wrap #edd-payment-mode-wrap label { + display: inline-block; + margin: 0 20px 0 0; +} +#edd_checkout_form_wrap #edd-payment-mode-wrap .edd-payment-mode-label { + font-weight: bold; + display: inline-block; + position: relative; + margin-bottom: 5px; +} +#edd_checkout_form_wrap fieldset { + border: 1px solid #eee; + padding: 1.387em; + margin: 0 0 21px; +} +#edd_checkout_form_wrap #edd_purchase_submit, +#edd_checkout_form_wrap #edd_discount_code, +#edd_checkout_form_wrap #edd_register_account_fields { + padding: 0; + border: none; +} +#edd_checkout_form_wrap fieldset fieldset { + margin: 0; + border: none; + padding: 0; +} +#edd_checkout_form_wrap #edd-login-account-wrap, +#edd_checkout_form_wrap #edd-new-account-wrap, +#edd_checkout_form_wrap #edd_show_discount, +#edd_checkout_form_wrap .edd-cart-adjustment, +#edd_checkout_form_wrap #edd_final_total_wrap { + background: #fafafa; + color: #666; + padding: 0.5em 1.387em; +} +#edd_checkout_form_wrap #edd-discount-code-wrap, +#edd_checkout_form_wrap #edd_final_total_wrap, +#edd_checkout_form_wrap #edd_show_discount { + border: 1px solid #eee; +} +#edd_checkout_form_wrap .edd-cart-adjustment { + padding: 1.387em; +} +#edd_checkout_form_wrap .edd-cart-adjustment input.edd-input, +#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit { + display: inline-block; +} +#edd_checkout_form_wrap .edd-cart-adjustment input.edd-submit { + padding: 3px 12px; + margin-bottom: 2px; +} +#edd_checkout_form_wrap #edd-discount-error-wrap { + width: 100%; + display: inline-block; + margin: 1em 0 0; +} +#edd_checkout_form_wrap #edd-new-account-wrap, +#edd_checkout_form_wrap #edd-login-account-wrap { + margin: -1.387em -1.387em 21px; + border-left: none; + border-right: none; + border-top: none; +} +#edd_checkout_form_wrap #edd_payment_mode_select { + margin-bottom: 21px; +} +#edd_checkout_form_wrap fieldset#edd_register_fields #edd_checkout_user_info { + margin-bottom: 21px; +} +#edd_checkout_form_wrap fieldset#edd_register_account_fields legend { + padding-top: 11px; +} +#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_register_password, +#edd_checkout_form_wrap fieldset#edd_register_account_fields p.edd_login_password { + margin: 0; +} +#edd_checkout_form_wrap fieldset#edd_cc_fields legend { + border: none; + padding: 0; +} +#edd_checkout_form_wrap fieldset p:last-child { + margin-bottom: 0; +} +#edd_checkout_form_wrap fieldset#edd_cc_fields #edd-card-number-wrap { + margin-top: 5px; +} +#edd_checkout_form_wrap #edd_purchase_final_total { + margin: 21px 0; +} +#edd_checkout_form_wrap #edd_purchase_final_total p { + margin: 0; +} +#edd_secure_site_wrapper { + padding: 4px 4px 4px 0; + font-weight: bold; +} +#edd_secure_site_wrapper span { + vertical-align: middle; +} +#edd_checkout_form_wrap input.edd-input.card-number.valid { + background-image: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%221.5%22%20stroke%3D%22green%22%3E%0A%20%20%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M4.5%2012.75l6%206%209-13.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A); + background-repeat: no-repeat; + background-position: 98% 50%; +} +#edd_checkout_form_wrap span.exp-divider { + display: inline; +} +#edd_checkout_form_wrap span.card-type { + position: absolute; + top: 0; + right: 0; +} +#edd_checkout_form_wrap span.card-type.off { + display: none; +} +#edd_checkout_form_wrap .edd-cart-ajax { + box-shadow: none; +} +.edd-amazon-profile-wrapper { + font-size: 12px; +} +.edd-amazon-profile-name { + font-weight: 600; +} +.edd-amazon-logout { + font-size: 10px; + line-height: 12px; +} +.edd-amazon-logout a { + cursor: pointer; +} +#edd-amazon-wallet-box, +#edd-amazon-address-box { + height: 228px; + width: 350px; +} +#edd-amazon-address-box { + margin-bottom: 15px; +} + +/* Left align the loading on taxes */ +.edd_cart_tax .edd-loading-ajax.edd-loading { + margin: 0px 0px 0px auto; + display: inline-block; +} + +/* Desktop and tablet */ +@media only screen and (min-width: 768px) { + #edd-amazon-address-box, + #edd-amazon-wallet-box { + width: 100%; + height: 228px; + } +} + +/* =Ajax Add To Cart Button +-------------------------------------------------------------- */ +.edd_purchase_submit_wrapper { + position: relative; +} +.edd_purchase_submit_wrapper a.edd-add-to-cart { + text-decoration: none; + display: none; + position: relative; + overflow: hidden; +} +.edd_purchase_submit_wrapper .edd-cart-ajax { + display: none; + position: relative; + left: -35px; +} +.edd-submit.button.edd-ajax-loading { + padding-right: 30px; +} +.edd-add-to-cart .edd-add-to-cart-label { + opacity: 1; + filter: alpha(opacity=100); +} +.edd-loading, +.edd-loading:after { + border-radius: 50%; + display: block; + width: 1.5em; + height: 1.5em; +} +.edd-loading { + animation: edd-spinning 1.1s infinite linear; + border-top: 0.2em solid rgba(255, 255, 255, 0.2); + border-right: 0.2em solid rgba(255, 255, 255, 0.2); + border-bottom: 0.2em solid rgba(255, 255, 255, 0.2); + border-left: 0.2em solid #fff; + font-size: 0.75em; + position: absolute; + left: calc(50% - 0.75em); + top: calc(50% - 0.75em); + opacity: 0; + filter: alpha(opacity=0); + transform: translateZ(0); +} +a.edd-add-to-cart.white .edd-loading, +.edd-discount-loader.edd-loading, +.edd-loading-ajax.edd-loading { + border-top-color: rgba(0, 0, 0, 0.2); + border-right-color: rgba(0, 0, 0, 0.2); + border-bottom-color: rgba(0, 0, 0, 0.2); + border-left-color: #000; +} +.edd-loading-ajax.edd-loading { + display: inline-block; + position: relative; + top: 0; + left: 0.25em; + vertical-align: middle; +} + +#edd_checkout_form_wrap .edd-cart-adjustment .edd-apply-discount.edd-submit { + display: inline-block; +} +.edd-discount-loader.edd-loading { + display: inline-block; + position: relative; + left: auto; + vertical-align: middle; + width: 1.25em; + height: 1.25em; +} + +.edd-loading-ajax.edd-loading { + opacity: 1; +} + +@keyframes edd-spinning { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +a.edd-add-to-cart .edd-add-to-cart-label, +.edd-loading { + transition: .1s opacity !important; +} +.edd-add-to-cart[data-edd-loading] .edd-add-to-cart-label { + opacity: 0; + filter: alpha(opacity=0); +} +.edd-add-to-cart[data-edd-loading] .edd-loading, +.edd-discount-loader.edd-loading { + opacity: 1; + filter: alpha(opacity=100); +} +.edd-cart-added-alert { + color: #567622; + display: block; + position: absolute; +} + + +/* =Theme Specific styling +-------------------------------------------------------------- */ + +/* Twenty Twelve */ +.edd_form input.edd-input.required, +.edd_form select.edd-select.required { + color: #000; +} + + +/* =Receipt Page +-------------------------------------------------------------- */ +body.edd_receipt_page { + background-color: #fff; + color: #141412; + margin: 0; + font-family: Helvetica, sans-serif; + font-size: 12px; +} +body.edd_receipt_page:before { + position: relative; +} +body.edd_receipt_page #edd_receipt_wrapper { + width: 660px; + margin: 0 auto; + padding: 50px 0; +} +body.edd_receipt_page table { + display: table; + width: 100%; + border-bottom: 1px solid #ededed; + border-collapse: collapse; + border-spacing: 0; + font-size: 14px; + line-height: 2; + margin: 0 0 20px; +} +body.edd_receipt_page td, +body.edd_receipt_page th { + display: table-cell; + text-align: left; + border-top: 1px solid #ededed; + padding: 6px 10px; + font-weight: normal; +} +body.edd_receipt_page th { + font-weight: bold; + text-transform: uppercase; +} +body.edd_receipt_page h3 { + font-size: 22px; + margin: 40px 0 5px; + clear: both; + display: block; + font-weight: bold; +} +body.edd_receipt_page li { + list-style: none; +} + + +/* =Purchase Summary Tables +-------------------------------------------------------------- */ +table#edd_purchase_receipt_products, +table#edd_purchase_receipt { + width: 100%; +} +table#edd_purchase_receipt_products td, +table#edd_purchase_receipt_products th, +table#edd_purchase_receipt td, +table#edd_purchase_receipt th { + text-align: left; +} +table#edd_purchase_receipt .edd_receipt_payment_status.pending, +table#edd_purchase_receipt .edd_receipt_payment_status.cancelled, +table#edd_purchase_receipt .edd_receipt_payment_status.revoked, +table#edd_purchase_receipt .edd_receipt_payment_status.failed { + color: #f73f2e; +} +table#edd_purchase_receipt_products li { + list-style: none; + margin: 0 0 8px 10px; +} +table#edd_purchase_receipt ul, +table#edd_purchase_receipt_products ul.edd_purchase_receipt_files { + margin: 0; + padding: 0; +} +table#edd_purchase_receipt li.edd_download_file { + list-style: none; + margin: 0 0 8px 0; +} +table#edd_purchase_receipt_products .edd_purchase_receipt_product_notes { + font-style: italic; +} +table#edd_purchase_receipt_products .edd_purchase_receipt_product_name { + font-weight: bold; +} +table#edd_purchase_receipt_products .edd_bundled_product_name { + font-style: italic; + font-weight: bold; +} + + +/* =Purchase History +-------------------------------------------------------------- */ +#edd_user_history { + text-align: left; + width: 100%; + border-top: 1px solid #f0f0f0; + border-bottom: none; +} +#edd_user_history th, +#edd_user_history td { + text-align: left; + padding: 3px 5px; + border-bottom: 1px solid #f0f0f0; + border-top: none; +} +#edd_user_history th { + font-weight: bold; + background: #f5f5f5; +} +#edd_user_history td { + line-height: 25px; + vertical-align: middle; +} +#edd_user_history .edd_purchase_status.revoked, +#edd_user_history .edd_purchase_status.failed, +#edd_user_history .edd_purchase_status.cancelled, +#edd_user_history .edd_purchase_status.pending { + color: #f73f2e; +} + + +/* =Registration / login Form +-------------------------------------------------------------- */ +#edd_register_form legend, +#edd_login_form legend { + font-size: 120%; + margin-bottom: 1em; +} + +#edd_register_form fieldset, +#edd_login_form fieldset { + border: none; +} + +#edd_register_form .edd-input, +#edd_login_form .edd-input { + box-sizing: border-box; +} + +#edd_register_form label, +#edd_login_form label { + cursor: pointer; +} + +/* =Profile Form +-------------------------------------------------------------- */ +#edd_profile_editor_form p { + margin-bottom: 8px; +} +#edd_profile_editor_form label { + display: inline-block; +} +#edd_profile_editor_form .edd-profile-emails { + list-style-type: none; + display: inline-table; + margin-left: 0; + margin-bottom: 0; +} +#edd_profile_editor_form .edd-profile-email { + width: auto; +} +#edd_profile_editor_form .edd-profile-email .actions { + display: none; +} +#edd_profile_editor_form .edd-profile-email:hover > span { + display: inline-block; +} + + + +/* =Alerts +-------------------------------------------------------------- */ +.edd_added_to_cart_alert { + padding: 5px; + font-size: 14px; + border: 1px solid #046a9e; + background: #9ecce2; + color: #333; + margin: 8px 0; +} +.edd_added_to_cart_alert a.edd_alert_checkout_link { + color: #000 !important; +} + + +/* =Purchase buttons +-------------------------------------------------------------- */ +input.edd_submit_plain { + background: none !important; + border: none !important; + padding: 0 !important; + display: inline; + cursor: pointer; +} +.single-download .edd_download_purchase_form { + margin-bottom: 1.387em; +} +.edd_download_purchase_form .edd_download_quantity_wrapper { + margin: 0 0 0.5em; +} +.edd_download_purchase_form .edd_download_quantity_wrapper .edd-item-quantity { + width: 75px; +} +.edd_download_purchase_form .edd_price_options { + margin: 0 0 15px; +} +.edd_download_purchase_form .edd_price_options ul { + margin: 0; + padding: 0; + list-style: none; +} +.edd_download_purchase_form .edd_price_options li { + display: block; + padding: 0; + margin: 0; +} +.edd_download_purchase_form .edd_price_options span { + display: inline; + padding: 0; + margin: 0; +} +.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper { + padding-left: 18px +} +.edd_download_purchase_form .edd_price_options .edd_download_quantity_wrapper * { + font-size: 80% +} +.edd_download_purchase_form .edd_price_options input.edd-item-quantity { + display: inline; + width: 50px; + max-width: 90%; +} +.edd-submit, +#edd-purchase-button, +[type="submit"].edd-submit { + display: inline-block; + padding: 6px 12px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.428571429; + text-align: center; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + border: 1px solid #cccccc; + border-radius: 4px; + box-shadow: none; + user-select: none; +} +.edd-submit.button:focus, +[type="submit"].edd-submit:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.edd-submit.button:active { + background-image: none; + outline: 0; + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} +.edd-submit.plain { + padding: 0; + border: none; + border-radius: 0; +} + +/** Gray (Default) */ +.edd-submit.button, +.edd-submit.button, +.edd-submit.button:visited, +.edd-submit.button, +.edd-submit.button.gray { + color: #333333; + background: #f0f0f0; + border-color: #cccccc; +} +.edd-submit.button:hover, +.edd-submit.button:focus, +.edd-submit.button:active, +.edd-submit.button.gray:hover, +.edd-submit.button.gray:focus, +.edd-submit.button.gray:active { + color: #333333; + background: #ebebeb; + border-color: #adadad; +} +.edd-submit.button.gray:active { + background-image: none; +} + +/** White */ +.edd-submit.button.white { + color: #333333; + background: #ffffff; + border-color: #cccccc; +} +.edd-submit.button.white:hover, +.edd-submit.button.white:focus, +.edd-submit.button.white:active { + color: #333333; + background: #ebebeb; + border-color: #adadad; +} +.edd-submit.button.white:active { + background-image: none; +} + +/** Blue */ +.edd-submit.button.blue { + color: #ffffff; + background: #428bca; + border-color: #357ebd; +} +.edd-submit.button.blue:hover, +.edd-submit.button.blue:focus, +.edd-submit.button.blue.active { + color: #ffffff; + background: #3276b1; + border-color: #285e8e; +} +.edd-submit.button.blue.active { + background-image: none; +} + +/** Red */ +.edd-submit.button.red { + color: #ffffff; + background: #d9534f; + border-color: #d43f3a; +} +.edd-submit.button.red:hover, +.edd-submit.button.red:focus, +.edd-submit.button.red:active { + color: #ffffff; + background: #d2322d; + border-color: #ac2925; +} +.edd-submit.button.red:active { + background-image: none; +} + +/** Green */ +.edd-submit.button.green { + color: #ffffff; + background: #5cb85c; + border-color: #4cae4c; +} +.edd-submit.button.green:hover, +.edd-submit.button.green:focus, +.edd-submit.button.green:active { + color: #ffffff; + background: #47a447; + border-color: #398439; +} +.edd-submit.button.green:active { + background-image: none; +} + +/** Yellow */ +.edd-submit.button.yellow { + color: #ffffff; + background: #f0ad4e; + border-color: #eea236; +} +.edd-submit.button.yellow:hover, +.edd-submit.button.yellow:focus, +.edd-submit.button.yellow:active { + color: #ffffff; + background: #ed9c28; + border-color: #d58512; +} +.edd-submit.button.yellow:active { + background-image: none; +} + +/** Orange */ +.edd-submit.button.orange { + color: #ffffff; + background: #ed9c28; + border-color: #e3921e; +} +.edd-submit.button.orange:hover, +.edd-submit.button.orange:focus, +.edd-submit.button.orange:active { + color: #ffffff; + background: #e59016; + border-color: #d58512; +} +.edd-submit.button.orange:active { + background-image: none; +} + +/** Dark Gray */ +.edd-submit.button.dark-gray { + color: #fff; + background: #363636; + border-color: #222; +} +.edd-submit.button.dark-gray:hover, +.edd-submit.button.dark-gray:focus, +.edd-submit.button.dark-gray:active { + color: #fff; + background: #333; + border-color: #adadad; +} +.edd-submit.button.dark-gray:active { + background-image: none; +} + + +/* =Downloads Shortcode +-------------------------------------------------------------- */ +.edd_downloads_list { + display: grid; + grid-column-gap: 20px; + grid-row-gap: 40px; +} +.edd_downloads_list:after { + content: ""; + display: table; + clear: both; +} +.edd_download { + float: left; +} +.edd_download_columns_1 .edd_download { width: 100%; } +.edd_download_columns_2 .edd_download { width: 50%; } +.edd_download_columns_0 .edd_download, +.edd_download_columns_3 .edd_download { width: 33%; } +.edd_download_columns_4 .edd_download { width: 25%; } +.edd_download_columns_5 .edd_download { width: 20%; } +.edd_download_columns_6 .edd_download { width: 16.6%; } +.edd_download_inner { + padding: 0 8px 8px; + margin: 0 0 10px; +} +.edd_download_columns_2 .edd_download:nth-child(2n+1), +.edd_download_columns_3 .edd_download:nth-child(3n+1), +.edd_download_columns_4 .edd_download:nth-child(4n+1), +.edd_download_columns_5 .edd_download:nth-child(5n+1), +.edd_download_columns_6 .edd_download:nth-child(6n+1) { + clear: left; +} +.edd_download_image { + max-width: 100%; +} +.edd_download .edd_price { + margin-bottom: 10px; +} +@media (min-width: 768px) { + .edd_downloads_list:not(.edd_download_columns_1) { + grid-template-columns: repeat(2, 1fr); + } +} +@media (min-width: 1200px) { + .edd_downloads_list.edd_download_columns_2 { grid-template-columns: repeat(2, 1fr); } + .edd_downloads_list.edd_download_columns_3 { grid-template-columns: repeat(3, 1fr); } + .edd_downloads_list.edd_download_columns_4 { grid-template-columns: repeat(4, 1fr); } + .edd_downloads_list.edd_download_columns_5 { grid-template-columns: repeat(5, 1fr); } + .edd_downloads_list.edd_download_columns_6 { grid-template-columns: repeat(6, 1fr); } +} +@supports (display: grid) { + .edd_downloads_list .edd_download { + width: auto; + } + .edd_download_inner { + padding: 0; + margin: 0; + } +} + +/* =Misc styles +-------------------------------------------------------------- */ +.edd-hide-on-empty.cart-empty { + display: none; +} +.edd-cart-ajax { + margin: 0 8px 0 4px; + position: relative; + top: 2px; + background: none; + border: none; + padding: 0; +} +.edd-cart-number-of-items { + font-style: italic; + color: grey; +} +.edd-cart-meta.edd_subtotal { + font-weight: bold; + font-style: italic; +} +.edd-cart-meta.edd_cart_tax { + font-size: 1em; + font-style: italic; +} + +/** Since this is a LI, make sure to not italicize any list item images */ +.edd-cart-meta.edd_cart_tax::before { + font-style: normal; +} + +.edd-cart-meta.edd_total { + font-weight: bold; +} +.edd-cart-meta { + padding: 2px 5px; +} +.edd-cart-meta.edd_subtotal, +.edd-cart-meta.edd_total { + background-color: #f9f9f9; +} + + +/** Old Error Styles */ +/* =Error styles +-------------------------------------------------------------- */ +.edd_errors:not(.edd-alert) { + border-radius: 2px; + border: 1px solid #E6DB55; + margin: 0 0 21px; + background: #FFFFE0; + color: #333; +} +.edd_error { + padding: 10px; +} +p.edd_error { + margin: 0 !important; +} + + +/* =Success Message styles +-------------------------------------------------------------- */ +.edd_success:not(.edd-alert) { + border-radius: 2px; + border: 1px solid #b3ce89; + margin: 20px 0; + background: #d5eab3; + color: #567622; + padding: 6px 8px; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); +} + +/** End old Error */ + +/** Usage Is as Follows */ +/*
This is your error message
*/ +/* Replace edd-error with the class of your choice */ + +/* Alert Styles */ +.edd-alert { + border-radius: 2px; + margin-bottom: 20px; + padding: 10px; + border: 1px solid transparent; + vertical-align: middle; +} +.edd-alert p { + padding: 0; +} +.edd-alert p:not(:last-child) { + margin-bottom: 5px; +} +.edd-alert p:last-child { + margin-bottom: 0; +} +.edd-alert-error { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.edd-alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color:#3c763d; +} +.edd-alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.edd-alert-warn { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} diff --git a/assets/css/jquery-ui-fresh-rtl.min.css b/assets/css/jquery-ui-fresh-rtl.min.css new file mode 100644 index 00000000000..87836669ad3 --- /dev/null +++ b/assets/css/jquery-ui-fresh-rtl.min.css @@ -0,0 +1 @@ +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}/*\*/* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}/**/.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;right:0;width:100%;height:100%}.ui-widget{font-family:sans-serif;font-size:12px}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:sans-serif;font-size:1em}.ui-widget-content{border:1px solid #dfdfdf;background:#fff;color:#333}.ui-widget-header{border:1px solid #dfdfdf;color:#333;font-weight:bold;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,right top,right bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #dfdfdf;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,right top,right bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec);font-weight:normal;color:#333}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#333;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background-color:#ececec;background-image:-ms-linear-gradient(top,#ececec,#f9f9f9);background-image:-moz-linear-gradient(top,#ececec,#f9f9f9);background-image:-o-linear-gradient(top,#ececec,#f9f9f9);background-image:-webkit-gradient(linear,right top,right bottom,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#ececec,#f9f9f9);background-image:linear-gradient(top,#ececec,#f9f9f9);font-weight:normal;color:#000}.ui-state-hover a,.ui-state-hover a:hover{color:#000;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #dfdfdf;background:#fff;font-weight:normal;color:#333}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#333;text-decoration:none}.ui-widget :active{outline:0}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #e6db55;background:#ffffe0;color:#333}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#333}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #c00;background:#ffebe8;color:#c00}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#c00}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#c00}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-content .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-header .ui-icon{background-image:url(../images/ui-icons_999999_256x240.png)}.ui-state-default .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-active .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(../images/ui-icons_21759b_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(../images/ui-icons_cc0000_256x240.png)}.ui-icon-carat-1-n{background-position:100% 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:100% -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:100% -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:100% -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:100% -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:100% -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:100% -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:100% -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:100% -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:100% -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-off{background-position:-96px -144px}.ui-icon-radio-on{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:100% -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:100% -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:100% -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:100% -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:100% -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.ui-widget-overlay{background:#000;opacity:.6;filter:Alpha(Opacity=60)}.ui-widget-shadow{box-shadow:0 0 16px rgba(0,0,0,0.3)}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;right:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;right:0}.ui-resizable-e{cursor:e-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-se{cursor:sw-resize;width:12px;height:12px;left:1px;bottom:1px}.ui-resizable-sw{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-nw{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-resizable-ne{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .7em .5em .5em}.ui-accordion-icons .ui-accordion-header a{padding-right:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;right:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:right}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:right;clear:right;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-left:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icons .ui-button-text{padding-right:2.1em;padding-left:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{right:50%;margin-right:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{right:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{left:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{left:.5em}.ui-buttonset{margin-left:7px}.ui-buttonset .ui-button{margin-right:0;margin-left:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{position:fixed;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:right;margin:.1em 0 .1em 16px}.ui-dialog .ui-dialog-titlebar-close{position:absolute;left:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:100%;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:right;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em .4em .5em 1em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:left}.ui-dialog .ui-dialog-buttonpane button{margin:.5em 0 .5em .4em;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;left:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:right}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:100% 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-right:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{right:0}.ui-slider-horizontal .ui-slider-range-max{left:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{right:-.3em;margin-right:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{right:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:right;position:relative;top:1px;margin:0 0 1px .2em;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:right;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:100%}.ui-tabs .ui-tabs-hide{display:none!important}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{right:2px}.ui-datepicker .ui-datepicker-next{left:2px}.ui-datepicker .ui-datepicker-prev-hover{right:1px}.ui-datepicker .ui-datepicker-next-hover{left:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;right:50%;margin-right:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:left;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-right:0;border-left:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:left;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:right}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:right}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:ltr}.ui-datepicker-rtl .ui-datepicker-prev{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-next{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker-rtl .ui-datepicker-group{float:left}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;border-right-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;border-right-width:1px}.ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;right:-4px;width:200px;height:200px}.ui-progressbar{height:2em;text-align:right}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-widget-header{background-color:#83b4d8;background-image:linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-o-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-moz-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-webkit-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-ms-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%)} diff --git a/assets/css/jquery-ui-fresh.min.css b/assets/css/jquery-ui-fresh.min.css new file mode 100644 index 00000000000..632e100373e --- /dev/null +++ b/assets/css/jquery-ui-fresh.min.css @@ -0,0 +1 @@ +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}/*\*/* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}/**/.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-widget{font-family:sans-serif;font-size:12px}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:sans-serif;font-size:1em}.ui-widget-content{border:1px solid #dfdfdf;background:#fff;color:#333}.ui-widget-header{border:1px solid #dfdfdf;color:#333;font-weight:bold;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #dfdfdf;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec);font-weight:normal;color:#333}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#333;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background-color:#ececec;background-image:-ms-linear-gradient(top,#ececec,#f9f9f9);background-image:-moz-linear-gradient(top,#ececec,#f9f9f9);background-image:-o-linear-gradient(top,#ececec,#f9f9f9);background-image:-webkit-gradient(linear,left top,left bottom,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#ececec,#f9f9f9);background-image:linear-gradient(top,#ececec,#f9f9f9);font-weight:normal;color:#000}.ui-state-hover a,.ui-state-hover a:hover{color:#000;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #dfdfdf;background:#fff;font-weight:normal;color:#333}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#333;text-decoration:none}.ui-widget :active{outline:0}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #e6db55;background:#ffffe0;color:#333}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#333}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #c00;background:#ffebe8;color:#c00}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#c00}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#c00}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-content .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-header .ui-icon{background-image:url(../images/ui-icons_999999_256x240.png)}.ui-state-default .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-active .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(../images/ui-icons_21759b_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(../images/ui-icons_cc0000_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-off{background-position:-96px -144px}.ui-icon-radio-on{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.ui-widget-overlay{background:#000;opacity:.6;filter:Alpha(Opacity=60)}.ui-widget-shadow{box-shadow:0 0 16px rgba(0,0,0,0.3)}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}.ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{position:fixed;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tabs .ui-tabs-hide{display:none!important}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-progressbar{height:2em;text-align:left}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-widget-header{background-color:#83b4d8;background-image:linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-o-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-moz-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-webkit-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-ms-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%)} \ No newline at end of file diff --git a/assets/css/stripe-admin-rtl.min.css b/assets/css/stripe-admin-rtl.min.css new file mode 100644 index 00000000000..997b1177eed --- /dev/null +++ b/assets/css/stripe-admin-rtl.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edds-stripe-connect-acount-info .display-name,.edds-stripe-connect-acount-info .info{display:block}.edds-stripe-connect-acount-info .display-name{font-weight:700}.edds-stripe-connect-acount-info.loading span{display:block}.edds-stripe-connect-acount-info.loading .account-name,.edds-stripe-connect-acount-info.loading .info{animation:skeleton-loading 1s linear infinite alternate;width:200px;height:14px;margin:.25rem 0}#edds-stripe-disconnect-reconnect.loading{animation:skeleton-loading 1s linear infinite alternate;width:350px;height:1rem;margin:.5rem 0}#edds-payment-gateways-stripe-unmet-requirements{margin:-10px -16px 0 0;padding-top:10px}#edds-payment-gateways-stripe-unmet-requirements input[type=checkbox]{margin:0 0 0 6px}.edds-requirements-not-met th{display:none}.edds-requirements-not-met td{padding:0}.edd-stripe-connect{display:inline-block;margin-bottom:1px;background-image:linear-gradient(#28a0e5,#015e94);-webkit-font-smoothing:antialiased;border:0;padding:1px;height:30px;text-decoration:none;border-radius:4px;box-shadow:0 1px 0 rgba(0,0,0,.2);cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.edd-stripe-connect span{display:block;position:relative;padding:0 44px 0 12px;height:30px;background:#1275ff;background-image:linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);font-size:14px;line-height:30px;color:#fff;font-weight:700;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;text-shadow:0 -1px 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.25);border-radius:3px}.edd-stripe-connect span:before{content:"";display:block;position:absolute;right:11px;top:50%;width:23px;height:24px;margin-top:-12px;background-repeat:no-repeat;background-size:23px 24px}.edd-stripe-connect:active{background:#005d93}.edd-stripe-connect:active span{color:#eee;background:#008cdd;background-image:linear-gradient(#008cdd,#008cdd 85%,#239adf);box-shadow:inset 0 1px 0 rgba(0,0,0,.1)}.edd-stripe-connect.blue span:before,.edd-stripe-connect span:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UKeQCLIETIFwr/r8L8M+yoHGX6aaxRodR8BPckSKPTRAfJrD8DQyABJ3IPuQJ/7FkKMAbKbF6s99mnuUUb3/7T/YeAy9BXOFaQxZTI7MprJlYrzZIzeCZnBAhKQB3SgBrSAHjAGFsAWOAFX4Al8QRAIA9EgHiwCXJAOsoEY5IPlYA0oAiVgC9gOqsFeUAcaQBM4BtrASXAOXARXwTVwE9wDQ2AUPAOT4DWYgSAID1EhGqQGaUMGkBlkC7Egd8gXCoEioXgoGUqDhJAUWg6tg0qgcqga2g81QN9DJ6Bz0GWoH7oDDUPj0O/QOxiBKTAd1oQNYSuYBXvBwXA0vBBOgxfDS+FCeDNcBdfCR+BW+Bx8Fb4JD8HP4CkEIGSEgeggFggLYSNhSAKSioiRlUgxUonUIk1IB9KNXEeGkAnkLQaHoWGYGAuMKyYAMx/DxSzGrMSUYqoxhzCtmC7MdcwwZhLzEUvFamDNsC7YQGwcNg2bjy3CVmLrsS3YC9ib2FHsaxwOx8AZ4ZxwAbh4XAZuGa4UtxvXjDuL68eN4KbweLwa3gzvhg/Dc/ASfBF+J/4I/gx+AD+Kf0MgE7QJtgQ/QgJBSFhLqCQcJpwmDBDGCDNEBaIB0YUYRuQRlxDLiHXEDmIfcZQ4Q1IkGZHcSNGkDNIaUhWpiXSBdJ/0kkwm65KdyRFkAXk1uYp8lHyJPEx+S1GimFLYlESKlLKZcpBylnKH8pJKpRpSPakJVAl1M7WBep76kPpGjiZnKRcox5NbJVcj1yo3IPdcnihvIO8lv0h+qXyl/HH5PvkJBaKCoQJbgaOwUqFG4YTCoMKUIk3RRjFMMVuxVPGw4mXFJ0p4JUMlXyWeUqHSAaXzSiM0hKZHY9O4tHW0OtoF2igdRzeiB9Iz6CX07+i99EllJWV75RjlAuUa5VPKQwyEYcgIZGQxyhjHGLcY71Q0VbxU+CqbVJpUBlSmVeeoeqryVYtVm1Vvqr5TY6r5qmWqbVVrU3ugjlE3VY9Qz1ffo35BfWIOfY7rHO6c4jnH5tzVgDVMNSI1lmkc0OjRmNLU0vTXFGnu1DyvOaHF0PLUytCq0DqtNa5N03bXFmhXaJ/RfspUZnoxs5hVzC7mpI6GToCOVGe/Tq/OjK6R7nzdtbrNug/0SHosvVS9Cr1OvUl9bf1Q/eX6jfp3DYgGLIN0gx0G3QbThkaGsYYbDNsMnxipGgUaLTVqNLpvTDX2MF5sXGt8wwRnwjLJNNltcs0UNnUwTTetMe0zg80czQRmu836zbHmzuZC81rzQQuKhZdFnkWjxbAlwzLEcq1lm+VzK32rBKutVt1WH60drLOs66zv2SjZBNmstemw+d3W1JZrW2N7w45q52e3yq7d7oW9mT3ffo/9bQeaQ6jDBodOhw+OTo5ixybHcSd9p2SnXU6DLDornFXKuuSMdfZ2XuV80vmti6OLxOWYy2+uFq6Zroddn8w1msufWzd3xE3XjeO2323Ineme7L7PfchDx4PjUevxyFPPk+dZ7znmZeKV4XXE67m3tbfYu8V7mu3CXsE+64P4+PsU+/T6KvnO9632fein65fm1+g36e/gv8z/bAA2IDhga8BgoGYgN7AhcDLIKWhFUFcwJTgquDr4UYhpiDikIxQODQrdFnp/nsE84by2MBAWGLYt7EG4Ufji8B8jcBHhETURjyNtIpdHdkfRopKiDke9jvaOLou+N994vnR+Z4x8TGJMQ8x0rE9seexQnFXcirir8erxgvj2BHxCTEJ9wtQC3wXbF4wmOiQWJd5aaLSwYOHlReqLshadSpJP4iQdT8YmxyYfTn7PCePUcqZSAlN2pUxy2dwd3Gc8T14Fb5zvxi/nj6W6pZanPklzS9uWNp7ukV6ZPiFgC6oFLzICMvZmTGeGZR7MnM2KzWrOJmQnZ58QKgkzhV05WjkFOf0iM1GRaGixy+LtiyfFweL6XCh3YW67hI7+TPVIjaXrpcN57nk1eW/yY/KPFygWCAt6lpgu2bRkbKnf0m+XYZZxl3Uu11m+ZvnwCq8V+1dCK1NWdq7SW1W4anS1/+pDa0hrMtf8tNZ6bfnaV+ti13UUahauLhxZ77++sUiuSFw0uMF1w96NmI2Cjb2b7Dbt3PSxmFd8pcS6pLLkfSm39Mo3Nt9UfTO7OXVzb5lj2Z4tuC3CLbe2emw9VK5YvrR8ZFvottYKZkVxxavtSdsvV9pX7t1B2iHdMVQVUtW+U3/nlp3vq9Orb9Z41zTv0ti1adf0bt7ugT2ee5r2au4t2ftun2Df7f3++1trDWsrD+AO5B14XBdT1/0t69uGevX6kvoPB4UHhw5FHupqcGpoOKxxuKwRbpQ2jh9JPHLtO5/v2pssmvY3M5pLjoKj0qNPv0/+/tax4GOdx1nHm34w+GFXC62luBVqXdI62ZbeNtQe395/IuhEZ4drR8uPlj8ePKlzsuaU8qmy06TThadnzyw9M3VWdHbiXNq5kc6kznvn487f6Iro6r0QfOHSRb+L57u9us9ccrt08rLL5RNXWFfarjpebe1x6Gn5yeGnll7H3tY+p772a87XOvrn9p8e8Bg4d93n+sUbgTeu3px3s//W/Fu3BxMHh27zbj+5k3Xnxd28uzP3Vt/H3i9+oPCg8qHGw9qfTX5uHnIcOjXsM9zzKOrRvRHuyLNfcn95P1r4mPq4ckx7rOGJ7ZOT437j154ueDr6TPRsZqLoV8Vfdz03fv7Db56/9UzGTY6+EL+Y/b30pdrLg6/sX3VOhU89fJ39ema6+I3am0NvWW+738W+G5vJf49/X/XB5EPHx+CP92ezZ2f/AAOY8/wRDtFgAAADQklEQVRIDbWVaUiUQRjHZ96dXY/d1fYQj1U03dJSw9YkFgy6DIkILRArQSSC7PjQjQQqVH7oQ0GHQUWgpQhKHzoNSqiUwpXcsrwIjzVtPVrzbPV9Z6bZhYV3N3WXYAeGmWeeZ37z8J95GEgpBf5oeXn1Es4fYAdzPDlM6je4RBYhR+LMU89UxiCBGiCgkUwsBYSA+SlPKLQBQAYEAZm+3j42K96z3NyOF7VOeMrp62opRcacjPW5+43rDTpNSKQ8QKZAEg7xmPCTs/O27uGJgXuNbW0pxyvLfTmAEBzthEsFZLxRvPdi5rpYo2cmUiQJDA4IVeo0obGdlvGfXUPj0Sym2zPuHxvzcWjDyVupJ/YYizKTGNjLw/HiduNTAqIRIUJ6Vpp+ky8bCSFgwQ2xgkGxFi1ioNWEBGuJB31gbLIv/2pd7SpFoGxtpCYkLSEq4ptlzIYFO7tc7w0TKkeEYg5ADnrWkkYhD8s26GPq3nW0WKxTptftPYBI4Mj3O2fHvKNZBMVSDmMwarXNjDkSF3d5kExZeiCr8M2VI+VFu9IvsPcYtzAvkfoEZkEEE45jMppq3ppbCNPFIY1nD1cpo07lbMmvOXeoDCF8BLKy9uUAAjDkBh+c6bz78mNtVVP7MwET7JBnqb4xXpdWVpC1OVzWn+ELHLCsneX/s7rkRWl1463cy1U3WroG21jhCGKJXPOtKQnpAuENvsAppgDB3TcDVIrpDHbK5Kd+y7W8iodNybHh22rOHyxUK+UaMYjZaoyp25rYL54TSihSKmwZ14v3lc3ZFxdbeywjn/tGJnkmzrydX1ApxOEACKymmXLYfXVpi1JMEOGxPi1ep18doY4r2J7uFumQQ9yGf01bMcZW8dpyc0oIjxxpuC5wuUDX+ovWrnYeg3aXvdLIqnmOvXPsfH6uA5YbTb1DX8ofvTLzTy6ZV4K6fAw+gXiATfdffmjeaUgc1UdpdWplsCooQBrEnqUw82dhdnjit/Vxc4f59tP3DRjzJvYteqrl4rmNlJIfrOwpgNklesDRNQBCHYtQAQqD2CgACNjHAJnG1EyfV/S67fZiJB5t2OGEe4n7L3fS4fpEv/2hUEATfoPbuam5v8N7nps70YTbAAAAAElFTkSuQmCC")}.edds-stripe-connect-acount-info span.edd-pro-upgrade a{color:#1da867;font-weight:600;text-decoration:none}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.edd-stripe-connect.blue span:before,.edd-stripe-connect span:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UKeQCLIETIFwr/r8L8M+yoHGX6aaxRodR8BPckSKPTRAfJrD8DQyABJ3IPuQJ/7FkKMAbKbF6s99mnuUUb3/7T/YeAy9BXOFaQxZTI7MprJlYrzZIzeCZnBAhKQB3SgBrSAHjAGFsAWOAFX4Al8QRAIA9EgHiwCXJAOsoEY5IPlYA0oAiVgC9gOqsFeUAcaQBM4BtrASXAOXARXwTVwE9wDQ2AUPAOT4DWYgSAID1EhGqQGaUMGkBlkC7Egd8gXCoEioXgoGUqDhJAUWg6tg0qgcqga2g81QN9DJ6Bz0GWoH7oDDUPj0O/QOxiBKTAd1oQNYSuYBXvBwXA0vBBOgxfDS+FCeDNcBdfCR+BW+Bx8Fb4JD8HP4CkEIGSEgeggFggLYSNhSAKSioiRlUgxUonUIk1IB9KNXEeGkAnkLQaHoWGYGAuMKyYAMx/DxSzGrMSUYqoxhzCtmC7MdcwwZhLzEUvFamDNsC7YQGwcNg2bjy3CVmLrsS3YC9ib2FHsaxwOx8AZ4ZxwAbh4XAZuGa4UtxvXjDuL68eN4KbweLwa3gzvhg/Dc/ASfBF+J/4I/gx+AD+Kf0MgE7QJtgQ/QgJBSFhLqCQcJpwmDBDGCDNEBaIB0YUYRuQRlxDLiHXEDmIfcZQ4Q1IkGZHcSNGkDNIaUhWpiXSBdJ/0kkwm65KdyRFkAXk1uYp8lHyJPEx+S1GimFLYlESKlLKZcpBylnKH8pJKpRpSPakJVAl1M7WBep76kPpGjiZnKRcox5NbJVcj1yo3IPdcnihvIO8lv0h+qXyl/HH5PvkJBaKCoQJbgaOwUqFG4YTCoMKUIk3RRjFMMVuxVPGw4mXFJ0p4JUMlXyWeUqHSAaXzSiM0hKZHY9O4tHW0OtoF2igdRzeiB9Iz6CX07+i99EllJWV75RjlAuUa5VPKQwyEYcgIZGQxyhjHGLcY71Q0VbxU+CqbVJpUBlSmVeeoeqryVYtVm1Vvqr5TY6r5qmWqbVVrU3ugjlE3VY9Qz1ffo35BfWIOfY7rHO6c4jnH5tzVgDVMNSI1lmkc0OjRmNLU0vTXFGnu1DyvOaHF0PLUytCq0DqtNa5N03bXFmhXaJ/RfspUZnoxs5hVzC7mpI6GToCOVGe/Tq/OjK6R7nzdtbrNug/0SHosvVS9Cr1OvUl9bf1Q/eX6jfp3DYgGLIN0gx0G3QbThkaGsYYbDNsMnxipGgUaLTVqNLpvTDX2MF5sXGt8wwRnwjLJNNltcs0UNnUwTTetMe0zg80czQRmu836zbHmzuZC81rzQQuKhZdFnkWjxbAlwzLEcq1lm+VzK32rBKutVt1WH60drLOs66zv2SjZBNmstemw+d3W1JZrW2N7w45q52e3yq7d7oW9mT3ffo/9bQeaQ6jDBodOhw+OTo5ixybHcSd9p2SnXU6DLDornFXKuuSMdfZ2XuV80vmti6OLxOWYy2+uFq6Zroddn8w1msufWzd3xE3XjeO2323Ineme7L7PfchDx4PjUevxyFPPk+dZ7znmZeKV4XXE67m3tbfYu8V7mu3CXsE+64P4+PsU+/T6KvnO9632fein65fm1+g36e/gv8z/bAA2IDhga8BgoGYgN7AhcDLIKWhFUFcwJTgquDr4UYhpiDikIxQODQrdFnp/nsE84by2MBAWGLYt7EG4Ufji8B8jcBHhETURjyNtIpdHdkfRopKiDke9jvaOLou+N994vnR+Z4x8TGJMQ8x0rE9seexQnFXcirir8erxgvj2BHxCTEJ9wtQC3wXbF4wmOiQWJd5aaLSwYOHlReqLshadSpJP4iQdT8YmxyYfTn7PCePUcqZSAlN2pUxy2dwd3Gc8T14Fb5zvxi/nj6W6pZanPklzS9uWNp7ukV6ZPiFgC6oFLzICMvZmTGeGZR7MnM2KzWrOJmQnZ58QKgkzhV05WjkFOf0iM1GRaGixy+LtiyfFweL6XCh3YW67hI7+TPVIjaXrpcN57nk1eW/yY/KPFygWCAt6lpgu2bRkbKnf0m+XYZZxl3Uu11m+ZvnwCq8V+1dCK1NWdq7SW1W4anS1/+pDa0hrMtf8tNZ6bfnaV+ti13UUahauLhxZ77++sUiuSFw0uMF1w96NmI2Cjb2b7Dbt3PSxmFd8pcS6pLLkfSm39Mo3Nt9UfTO7OXVzb5lj2Z4tuC3CLbe2emw9VK5YvrR8ZFvottYKZkVxxavtSdsvV9pX7t1B2iHdMVQVUtW+U3/nlp3vq9Orb9Z41zTv0ti1adf0bt7ugT2ee5r2au4t2ftun2Df7f3++1trDWsrD+AO5B14XBdT1/0t69uGevX6kvoPB4UHhw5FHupqcGpoOKxxuKwRbpQ2jh9JPHLtO5/v2pssmvY3M5pLjoKj0qNPv0/+/tax4GOdx1nHm34w+GFXC62luBVqXdI62ZbeNtQe395/IuhEZ4drR8uPlj8ePKlzsuaU8qmy06TThadnzyw9M3VWdHbiXNq5kc6kznvn487f6Iro6r0QfOHSRb+L57u9us9ccrt08rLL5RNXWFfarjpebe1x6Gn5yeGnll7H3tY+p772a87XOvrn9p8e8Bg4d93n+sUbgTeu3px3s//W/Fu3BxMHh27zbj+5k3Xnxd28uzP3Vt/H3i9+oPCg8qHGw9qfTX5uHnIcOjXsM9zzKOrRvRHuyLNfcn95P1r4mPq4ckx7rOGJ7ZOT437j154ueDr6TPRsZqLoV8Vfdz03fv7Db56/9UzGTY6+EL+Y/b30pdrLg6/sX3VOhU89fJ39ema6+I3am0NvWW+738W+G5vJf49/X/XB5EPHx+CP92ezZ2f/AAOY8/wRDtFgAAAIbklEQVRoBdVZa5BURxU+fZ9z57mzs7PvF4i7srAQSCifMVDERC0jYlzUlJalKeGPlCnL/NEfywpWacoiVZRVJIYfGjGUu5bxj5qHFSAYyQOBEsJzYSHDvnd2dp535j66PX1vNgsULDPs1cr2Vs+9e7v79NfnnnP663MJYwwWYxEWI2iOedEClxabxgkBwjEvOuA9PQOOlSw64JMr4vK8GidYYMcOES4tVSEAAZ8FAUqon1GiAJEEEG0CjFB8cTaxZUMAo1gEqQA0UABprAjPbrUwXnkesgqKP8CBk5vDIenrE+BKmwI+MawA1MbCkdV10cBDflXuVmSxQRbFkCAQZ9U2ZTaONyxKcyXDHjMs83ImV3rz6njmDRPMUZB80zAJOuvvsflkXpTP7DrWyeXcYCqk75AEieawrEoty1vrvlcV0ja3VQdb1rVUQVd9EFqqNIj5ZfDJooPBsCnohq2ldDMynC42XZnW7z09lu25lMxDMl34y0gyvTsBwyewc84Z4MEPpWIzF/MBcLLtNzJISmxZU+PmWETbtqGzfvVja5uguyF02+kCIEJUk6Ex4oMV9XP9ZnQT/nZ24it7XrtoJ5LZ7SjAM+Bg2+0ckAOcbBkQIaZFVzY1bGurjezYfn87PNQZ5+13ZaQRXMzH26Lg8ymfUokQdAR59INOc53GQ6q/Jiiua6oJ7+h9uAPua47cHeLrwHEmQRmTGLHV6x4v+JYwWsOFCGRDn6RKem1rPPrkN9Y0uqAXLN4VwCgjYGEE8rBgMAjwKsF9S9WgLa9qjYcf+Po9jXdlGrfC5Wj8Vg0Lf+ZENAFmpGB9TWTLhmUxUD1UDg/gtudRnK+a4RtkgqQyO+RT5LVrmiLgJcN19gcGNojUWriS5yRQm7pcBTc/vyCKdW1RrWwzOTiYhGf+dRUmcgZosgDVfgWaMCS2V2tO+OzG0MiVjdUwiFiYm9a7O4kJAoZEooV9H4T0O0ofODkKr5+6+nY6V3heVZQpv6ZWaz55qSJJnXjtUBW5pT7k8xeK5u+B0PQdBVbQgTLq9HbQYthyNVSmTT6A/nB0aGpF0K99+trY1F7TNI9PZGXkKUVRtYjGZCIOV1dHR4Ynz8FSLV8BrjK6uiAlpLcmco1ipmgpAaU8rfesboCuumBg31uJbx6+qH0uX9D/em0i85xFhaslKZKA8/82RtYDhd/1MkCuBnjxrLgKB0EQSb5oWO+9O1bZrsy3+Kc3dcH+b99b07NuyXe6P9r8z/am+C9lkuqCjo4qGGkQES76qJcuz/2GOlUoFuVsQS+98frlaSeq8Gkqqctrg7Dz853wwrfugUfXtj3W3tJ8oCletRUEXy1SCSSYHhdu41gFqILcZCrzwkvnJmE0U3JtHefiL7eS2l7th11f7IQ9j65aVh+r+nlzbd2TELJrHPLmIXZX3wyBX8MTQMm8PJ0u9Pe9chGQYy9omvXouHu/thJqI+Ef1sZDm0AMBmfPiQsSPDuY2zhWwSH5ISU5Pjm98x9nRo7+7JVBB3wl5nJz35Vo/z/esBQUVf2+QlkD9Aw42/Ts3Au7ushdAhQ5UzJoOjE+OrV9/1tDR7cNnIax7N2bDX9nm1bUQXdz9Rp/MLwRoqAtDOzcaO7rvDrAWW8vhcatWVNjF6cmJre9embkz1947h3YfXgIUgVzblQldxgFH0ZOr/qULwM15k4Zlci4Vd9ZU5ltY71oObHBnBFQBidmUk8kEsOP7Hntwqsb974NfS8PAh7LKoo23Hw+2R4FQcSzKlDPgFOEyf8kx3HW94kQ7xJgRRdAJG7CyIWxgiXNUN0+k5nJLN83k3n8D8eHN3+1ux5+8uBHIKiWt1G1Rn3IJkiUCcQzU3G0h9qWHMeJdoSrwtr9dl6I6DNjFwRRyxiKnStSqkPJPsGSmZ+mp1P9z2dzOy3Klj31yMdmX9S8V75APEsomMZwT9fz9i6vkW9AvEgQyqrBQM2Dq9rrD0gCgXfHA0jpjIRm2Zcw+3CR2tZl27SnMZFSZ1lWcRwZITeDckresAEXaoKwwBh7/WQubgTOQj5BVjdv7KiBJz7bztMNcHIk03JiONNyfiK/ntv2VMHAMx6BjpoA/Gj9Emdjul7W7e6TeQNDK9WJLRm361P5c1drEmAaymaYoXpfjZoiOk7FHWuh5dxEHmzLHiXM9oyTz9FawRZw65f5yyzXBMpd0JGhFKB5nSwRMVvumDv2cxm4m1f5X4AuWhRePDUOtqEPQJVVGfWcBz1ahmPlTlxzqaJLquYZU1HTvjcTMD6dOULM0n+g5nKposHzdWbo7FgEkDBviWlYx++53XtQ33kvDU8dHAJm6L8usdwEZn09S3qiPed5lcCSLUpI0eEA8620zLbDl6bh8T+egkI+/7Rl6kegcTSPst1QUKaM+brhrjnF2yUQJNxnrGMnR7KbTw5nYFVjyAl98w2+VdvVlA67Dw3BgROjAKa+yyrpz0BKTbJnez1NT6AKrrnA1bEi1av2v3xaiL90dnxL2Kc0rsXc4WpcQEc8AEtiGrRiejmK6WWeMDIxtVwwKExijB5KFuBYIg1cy8dx0dTQ/yQVc78yBXMIqJ5i/VvvkqHdSjXuM/THKy7w2LQJ6fpJms38QiHGvlzBt+RwJv2JQ2elbjyRtjIi1AIRMAsKPuQduHVzr2YW+kIBE5BTwOzzxLKOiMX8QVuWh00IpqD+S0WHtLlzefpLBOZo/IYvEqQPnTX5dxmy4xookqaCjRuT4mMi8g3bxs2KCkj3GFj4+QSzA0RkeskU8iCJeUiBDv09Jt8OPEV6k7DlP3gxxh/dAPymPh/Kf5d897dIOd9P7H8oEd4G1JV8wPGbRadx52sgLmrRAZ99EZ5+LZgV+v+4Llrg/wX6HRCxgvzAAwAAAABJRU5ErkJggg==")}}.edd-text-loading{animation:skeleton-loading 1s infinite alternate}.edd-button__toggle{position:relative;padding:0;width:36px;height:20px;min-height:unset;transition:background .2s ease;border-radius:30px;box-shadow:none;border:none;display:flex;justify-content:center;align-items:center;background:#c3c4c7;margin:0 0 0 12px}.edd-button__toggle--enabled{background:var(--wp-admin-theme-color)}.edd-button__toggle--enabled:after{transform:translateX(-16px)}.edd-button__toggle:after{position:absolute;content:"";height:14px;width:14px;right:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%;background:#fff} \ No newline at end of file diff --git a/assets/css/stripe-admin.min.css b/assets/css/stripe-admin.min.css new file mode 100644 index 00000000000..281e5bbe4a2 --- /dev/null +++ b/assets/css/stripe-admin.min.css @@ -0,0 +1 @@ +@keyframes skeleton-loading{0%{background-color:#d1d9e0}to{background-color:#e0e6eb}}.edds-stripe-connect-acount-info .display-name,.edds-stripe-connect-acount-info .info{display:block}.edds-stripe-connect-acount-info .display-name{font-weight:700}.edds-stripe-connect-acount-info.loading span{display:block}.edds-stripe-connect-acount-info.loading .account-name,.edds-stripe-connect-acount-info.loading .info{animation:skeleton-loading 1s linear infinite alternate;width:200px;height:14px;margin:.25rem 0}#edds-stripe-disconnect-reconnect.loading{animation:skeleton-loading 1s linear infinite alternate;width:350px;height:1rem;margin:.5rem 0}#edds-payment-gateways-stripe-unmet-requirements{margin:-10px 0 0 -16px;padding-top:10px}#edds-payment-gateways-stripe-unmet-requirements input[type=checkbox]{margin:0 6px 0 0}.edds-requirements-not-met th{display:none}.edds-requirements-not-met td{padding:0}.edd-stripe-connect{display:inline-block;margin-bottom:1px;background-image:linear-gradient(#28a0e5,#015e94);-webkit-font-smoothing:antialiased;border:0;padding:1px;height:30px;text-decoration:none;border-radius:4px;box-shadow:0 1px 0 rgba(0,0,0,.2);cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.edd-stripe-connect span{display:block;position:relative;padding:0 12px 0 44px;height:30px;background:#1275ff;background-image:linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);font-size:14px;line-height:30px;color:#fff;font-weight:700;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;text-shadow:0 -1px 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.25);border-radius:3px}.edd-stripe-connect span:before{content:"";display:block;position:absolute;left:11px;top:50%;width:23px;height:24px;margin-top:-12px;background-repeat:no-repeat;background-size:23px 24px}.edd-stripe-connect:active{background:#005d93}.edd-stripe-connect:active span{color:#eee;background:#008cdd;background-image:linear-gradient(#008cdd,#008cdd 85%,#239adf);box-shadow:inset 0 1px 0 rgba(0,0,0,.1)}.edd-stripe-connect.blue span:before,.edd-stripe-connect span:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UKeQCLIETIFwr/r8L8M+yoHGX6aaxRodR8BPckSKPTRAfJrD8DQyABJ3IPuQJ/7FkKMAbKbF6s99mnuUUb3/7T/YeAy9BXOFaQxZTI7MprJlYrzZIzeCZnBAhKQB3SgBrSAHjAGFsAWOAFX4Al8QRAIA9EgHiwCXJAOsoEY5IPlYA0oAiVgC9gOqsFeUAcaQBM4BtrASXAOXARXwTVwE9wDQ2AUPAOT4DWYgSAID1EhGqQGaUMGkBlkC7Egd8gXCoEioXgoGUqDhJAUWg6tg0qgcqga2g81QN9DJ6Bz0GWoH7oDDUPj0O/QOxiBKTAd1oQNYSuYBXvBwXA0vBBOgxfDS+FCeDNcBdfCR+BW+Bx8Fb4JD8HP4CkEIGSEgeggFggLYSNhSAKSioiRlUgxUonUIk1IB9KNXEeGkAnkLQaHoWGYGAuMKyYAMx/DxSzGrMSUYqoxhzCtmC7MdcwwZhLzEUvFamDNsC7YQGwcNg2bjy3CVmLrsS3YC9ib2FHsaxwOx8AZ4ZxwAbh4XAZuGa4UtxvXjDuL68eN4KbweLwa3gzvhg/Dc/ASfBF+J/4I/gx+AD+Kf0MgE7QJtgQ/QgJBSFhLqCQcJpwmDBDGCDNEBaIB0YUYRuQRlxDLiHXEDmIfcZQ4Q1IkGZHcSNGkDNIaUhWpiXSBdJ/0kkwm65KdyRFkAXk1uYp8lHyJPEx+S1GimFLYlESKlLKZcpBylnKH8pJKpRpSPakJVAl1M7WBep76kPpGjiZnKRcox5NbJVcj1yo3IPdcnihvIO8lv0h+qXyl/HH5PvkJBaKCoQJbgaOwUqFG4YTCoMKUIk3RRjFMMVuxVPGw4mXFJ0p4JUMlXyWeUqHSAaXzSiM0hKZHY9O4tHW0OtoF2igdRzeiB9Iz6CX07+i99EllJWV75RjlAuUa5VPKQwyEYcgIZGQxyhjHGLcY71Q0VbxU+CqbVJpUBlSmVeeoeqryVYtVm1Vvqr5TY6r5qmWqbVVrU3ugjlE3VY9Qz1ffo35BfWIOfY7rHO6c4jnH5tzVgDVMNSI1lmkc0OjRmNLU0vTXFGnu1DyvOaHF0PLUytCq0DqtNa5N03bXFmhXaJ/RfspUZnoxs5hVzC7mpI6GToCOVGe/Tq/OjK6R7nzdtbrNug/0SHosvVS9Cr1OvUl9bf1Q/eX6jfp3DYgGLIN0gx0G3QbThkaGsYYbDNsMnxipGgUaLTVqNLpvTDX2MF5sXGt8wwRnwjLJNNltcs0UNnUwTTetMe0zg80czQRmu836zbHmzuZC81rzQQuKhZdFnkWjxbAlwzLEcq1lm+VzK32rBKutVt1WH60drLOs66zv2SjZBNmstemw+d3W1JZrW2N7w45q52e3yq7d7oW9mT3ffo/9bQeaQ6jDBodOhw+OTo5ixybHcSd9p2SnXU6DLDornFXKuuSMdfZ2XuV80vmti6OLxOWYy2+uFq6Zroddn8w1msufWzd3xE3XjeO2323Ineme7L7PfchDx4PjUevxyFPPk+dZ7znmZeKV4XXE67m3tbfYu8V7mu3CXsE+64P4+PsU+/T6KvnO9632fein65fm1+g36e/gv8z/bAA2IDhga8BgoGYgN7AhcDLIKWhFUFcwJTgquDr4UYhpiDikIxQODQrdFnp/nsE84by2MBAWGLYt7EG4Ufji8B8jcBHhETURjyNtIpdHdkfRopKiDke9jvaOLou+N994vnR+Z4x8TGJMQ8x0rE9seexQnFXcirir8erxgvj2BHxCTEJ9wtQC3wXbF4wmOiQWJd5aaLSwYOHlReqLshadSpJP4iQdT8YmxyYfTn7PCePUcqZSAlN2pUxy2dwd3Gc8T14Fb5zvxi/nj6W6pZanPklzS9uWNp7ukV6ZPiFgC6oFLzICMvZmTGeGZR7MnM2KzWrOJmQnZ58QKgkzhV05WjkFOf0iM1GRaGixy+LtiyfFweL6XCh3YW67hI7+TPVIjaXrpcN57nk1eW/yY/KPFygWCAt6lpgu2bRkbKnf0m+XYZZxl3Uu11m+ZvnwCq8V+1dCK1NWdq7SW1W4anS1/+pDa0hrMtf8tNZ6bfnaV+ti13UUahauLhxZ77++sUiuSFw0uMF1w96NmI2Cjb2b7Dbt3PSxmFd8pcS6pLLkfSm39Mo3Nt9UfTO7OXVzb5lj2Z4tuC3CLbe2emw9VK5YvrR8ZFvottYKZkVxxavtSdsvV9pX7t1B2iHdMVQVUtW+U3/nlp3vq9Orb9Z41zTv0ti1adf0bt7ugT2ee5r2au4t2ftun2Df7f3++1trDWsrD+AO5B14XBdT1/0t69uGevX6kvoPB4UHhw5FHupqcGpoOKxxuKwRbpQ2jh9JPHLtO5/v2pssmvY3M5pLjoKj0qNPv0/+/tax4GOdx1nHm34w+GFXC62luBVqXdI62ZbeNtQe395/IuhEZ4drR8uPlj8ePKlzsuaU8qmy06TThadnzyw9M3VWdHbiXNq5kc6kznvn487f6Iro6r0QfOHSRb+L57u9us9ccrt08rLL5RNXWFfarjpebe1x6Gn5yeGnll7H3tY+p772a87XOvrn9p8e8Bg4d93n+sUbgTeu3px3s//W/Fu3BxMHh27zbj+5k3Xnxd28uzP3Vt/H3i9+oPCg8qHGw9qfTX5uHnIcOjXsM9zzKOrRvRHuyLNfcn95P1r4mPq4ckx7rOGJ7ZOT437j154ueDr6TPRsZqLoV8Vfdz03fv7Db56/9UzGTY6+EL+Y/b30pdrLg6/sX3VOhU89fJ39ema6+I3am0NvWW+738W+G5vJf49/X/XB5EPHx+CP92ezZ2f/AAOY8/wRDtFgAAADQklEQVRIDbWVaUiUQRjHZ96dXY/d1fYQj1U03dJSw9YkFgy6DIkILRArQSSC7PjQjQQqVH7oQ0GHQUWgpQhKHzoNSqiUwpXcsrwIjzVtPVrzbPV9Z6bZhYV3N3WXYAeGmWeeZ37z8J95GEgpBf5oeXn1Es4fYAdzPDlM6je4RBYhR+LMU89UxiCBGiCgkUwsBYSA+SlPKLQBQAYEAZm+3j42K96z3NyOF7VOeMrp62opRcacjPW5+43rDTpNSKQ8QKZAEg7xmPCTs/O27uGJgXuNbW0pxyvLfTmAEBzthEsFZLxRvPdi5rpYo2cmUiQJDA4IVeo0obGdlvGfXUPj0Sym2zPuHxvzcWjDyVupJ/YYizKTGNjLw/HiduNTAqIRIUJ6Vpp+ky8bCSFgwQ2xgkGxFi1ioNWEBGuJB31gbLIv/2pd7SpFoGxtpCYkLSEq4ptlzIYFO7tc7w0TKkeEYg5ADnrWkkYhD8s26GPq3nW0WKxTptftPYBI4Mj3O2fHvKNZBMVSDmMwarXNjDkSF3d5kExZeiCr8M2VI+VFu9IvsPcYtzAvkfoEZkEEE45jMppq3ppbCNPFIY1nD1cpo07lbMmvOXeoDCF8BLKy9uUAAjDkBh+c6bz78mNtVVP7MwET7JBnqb4xXpdWVpC1OVzWn+ELHLCsneX/s7rkRWl1463cy1U3WroG21jhCGKJXPOtKQnpAuENvsAppgDB3TcDVIrpDHbK5Kd+y7W8iodNybHh22rOHyxUK+UaMYjZaoyp25rYL54TSihSKmwZ14v3lc3ZFxdbeywjn/tGJnkmzrydX1ApxOEACKymmXLYfXVpi1JMEOGxPi1ep18doY4r2J7uFumQQ9yGf01bMcZW8dpyc0oIjxxpuC5wuUDX+ovWrnYeg3aXvdLIqnmOvXPsfH6uA5YbTb1DX8ofvTLzTy6ZV4K6fAw+gXiATfdffmjeaUgc1UdpdWplsCooQBrEnqUw82dhdnjit/Vxc4f59tP3DRjzJvYteqrl4rmNlJIfrOwpgNklesDRNQBCHYtQAQqD2CgACNjHAJnG1EyfV/S67fZiJB5t2OGEe4n7L3fS4fpEv/2hUEATfoPbuam5v8N7nps70YTbAAAAAElFTkSuQmCC")}.edds-stripe-connect-acount-info span.edd-pro-upgrade a{color:#1da867;font-weight:600;text-decoration:none}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.edd-stripe-connect.blue span:before,.edd-stripe-connect span:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UKeQCLIETIFwr/r8L8M+yoHGX6aaxRodR8BPckSKPTRAfJrD8DQyABJ3IPuQJ/7FkKMAbKbF6s99mnuUUb3/7T/YeAy9BXOFaQxZTI7MprJlYrzZIzeCZnBAhKQB3SgBrSAHjAGFsAWOAFX4Al8QRAIA9EgHiwCXJAOsoEY5IPlYA0oAiVgC9gOqsFeUAcaQBM4BtrASXAOXARXwTVwE9wDQ2AUPAOT4DWYgSAID1EhGqQGaUMGkBlkC7Egd8gXCoEioXgoGUqDhJAUWg6tg0qgcqga2g81QN9DJ6Bz0GWoH7oDDUPj0O/QOxiBKTAd1oQNYSuYBXvBwXA0vBBOgxfDS+FCeDNcBdfCR+BW+Bx8Fb4JD8HP4CkEIGSEgeggFggLYSNhSAKSioiRlUgxUonUIk1IB9KNXEeGkAnkLQaHoWGYGAuMKyYAMx/DxSzGrMSUYqoxhzCtmC7MdcwwZhLzEUvFamDNsC7YQGwcNg2bjy3CVmLrsS3YC9ib2FHsaxwOx8AZ4ZxwAbh4XAZuGa4UtxvXjDuL68eN4KbweLwa3gzvhg/Dc/ASfBF+J/4I/gx+AD+Kf0MgE7QJtgQ/QgJBSFhLqCQcJpwmDBDGCDNEBaIB0YUYRuQRlxDLiHXEDmIfcZQ4Q1IkGZHcSNGkDNIaUhWpiXSBdJ/0kkwm65KdyRFkAXk1uYp8lHyJPEx+S1GimFLYlESKlLKZcpBylnKH8pJKpRpSPakJVAl1M7WBep76kPpGjiZnKRcox5NbJVcj1yo3IPdcnihvIO8lv0h+qXyl/HH5PvkJBaKCoQJbgaOwUqFG4YTCoMKUIk3RRjFMMVuxVPGw4mXFJ0p4JUMlXyWeUqHSAaXzSiM0hKZHY9O4tHW0OtoF2igdRzeiB9Iz6CX07+i99EllJWV75RjlAuUa5VPKQwyEYcgIZGQxyhjHGLcY71Q0VbxU+CqbVJpUBlSmVeeoeqryVYtVm1Vvqr5TY6r5qmWqbVVrU3ugjlE3VY9Qz1ffo35BfWIOfY7rHO6c4jnH5tzVgDVMNSI1lmkc0OjRmNLU0vTXFGnu1DyvOaHF0PLUytCq0DqtNa5N03bXFmhXaJ/RfspUZnoxs5hVzC7mpI6GToCOVGe/Tq/OjK6R7nzdtbrNug/0SHosvVS9Cr1OvUl9bf1Q/eX6jfp3DYgGLIN0gx0G3QbThkaGsYYbDNsMnxipGgUaLTVqNLpvTDX2MF5sXGt8wwRnwjLJNNltcs0UNnUwTTetMe0zg80czQRmu836zbHmzuZC81rzQQuKhZdFnkWjxbAlwzLEcq1lm+VzK32rBKutVt1WH60drLOs66zv2SjZBNmstemw+d3W1JZrW2N7w45q52e3yq7d7oW9mT3ffo/9bQeaQ6jDBodOhw+OTo5ixybHcSd9p2SnXU6DLDornFXKuuSMdfZ2XuV80vmti6OLxOWYy2+uFq6Zroddn8w1msufWzd3xE3XjeO2323Ineme7L7PfchDx4PjUevxyFPPk+dZ7znmZeKV4XXE67m3tbfYu8V7mu3CXsE+64P4+PsU+/T6KvnO9632fein65fm1+g36e/gv8z/bAA2IDhga8BgoGYgN7AhcDLIKWhFUFcwJTgquDr4UYhpiDikIxQODQrdFnp/nsE84by2MBAWGLYt7EG4Ufji8B8jcBHhETURjyNtIpdHdkfRopKiDke9jvaOLou+N994vnR+Z4x8TGJMQ8x0rE9seexQnFXcirir8erxgvj2BHxCTEJ9wtQC3wXbF4wmOiQWJd5aaLSwYOHlReqLshadSpJP4iQdT8YmxyYfTn7PCePUcqZSAlN2pUxy2dwd3Gc8T14Fb5zvxi/nj6W6pZanPklzS9uWNp7ukV6ZPiFgC6oFLzICMvZmTGeGZR7MnM2KzWrOJmQnZ58QKgkzhV05WjkFOf0iM1GRaGixy+LtiyfFweL6XCh3YW67hI7+TPVIjaXrpcN57nk1eW/yY/KPFygWCAt6lpgu2bRkbKnf0m+XYZZxl3Uu11m+ZvnwCq8V+1dCK1NWdq7SW1W4anS1/+pDa0hrMtf8tNZ6bfnaV+ti13UUahauLhxZ77++sUiuSFw0uMF1w96NmI2Cjb2b7Dbt3PSxmFd8pcS6pLLkfSm39Mo3Nt9UfTO7OXVzb5lj2Z4tuC3CLbe2emw9VK5YvrR8ZFvottYKZkVxxavtSdsvV9pX7t1B2iHdMVQVUtW+U3/nlp3vq9Orb9Z41zTv0ti1adf0bt7ugT2ee5r2au4t2ftun2Df7f3++1trDWsrD+AO5B14XBdT1/0t69uGevX6kvoPB4UHhw5FHupqcGpoOKxxuKwRbpQ2jh9JPHLtO5/v2pssmvY3M5pLjoKj0qNPv0/+/tax4GOdx1nHm34w+GFXC62luBVqXdI62ZbeNtQe395/IuhEZ4drR8uPlj8ePKlzsuaU8qmy06TThadnzyw9M3VWdHbiXNq5kc6kznvn487f6Iro6r0QfOHSRb+L57u9us9ccrt08rLL5RNXWFfarjpebe1x6Gn5yeGnll7H3tY+p772a87XOvrn9p8e8Bg4d93n+sUbgTeu3px3s//W/Fu3BxMHh27zbj+5k3Xnxd28uzP3Vt/H3i9+oPCg8qHGw9qfTX5uHnIcOjXsM9zzKOrRvRHuyLNfcn95P1r4mPq4ckx7rOGJ7ZOT437j154ueDr6TPRsZqLoV8Vfdz03fv7Db56/9UzGTY6+EL+Y/b30pdrLg6/sX3VOhU89fJ39ema6+I3am0NvWW+738W+G5vJf49/X/XB5EPHx+CP92ezZ2f/AAOY8/wRDtFgAAAIbklEQVRoBdVZa5BURxU+fZ9z57mzs7PvF4i7srAQSCifMVDERC0jYlzUlJalKeGPlCnL/NEfywpWacoiVZRVJIYfGjGUu5bxj5qHFSAYyQOBEsJzYSHDvnd2dp535j66PX1vNgsULDPs1cr2Vs+9e7v79NfnnnP663MJYwwWYxEWI2iOedEClxabxgkBwjEvOuA9PQOOlSw64JMr4vK8GidYYMcOES4tVSEAAZ8FAUqon1GiAJEEEG0CjFB8cTaxZUMAo1gEqQA0UABprAjPbrUwXnkesgqKP8CBk5vDIenrE+BKmwI+MawA1MbCkdV10cBDflXuVmSxQRbFkCAQZ9U2ZTaONyxKcyXDHjMs83ImV3rz6njmDRPMUZB80zAJOuvvsflkXpTP7DrWyeXcYCqk75AEieawrEoty1vrvlcV0ja3VQdb1rVUQVd9EFqqNIj5ZfDJooPBsCnohq2ldDMynC42XZnW7z09lu25lMxDMl34y0gyvTsBwyewc84Z4MEPpWIzF/MBcLLtNzJISmxZU+PmWETbtqGzfvVja5uguyF02+kCIEJUk6Ex4oMV9XP9ZnQT/nZ24it7XrtoJ5LZ7SjAM+Bg2+0ckAOcbBkQIaZFVzY1bGurjezYfn87PNQZ5+13ZaQRXMzH26Lg8ymfUokQdAR59INOc53GQ6q/Jiiua6oJ7+h9uAPua47cHeLrwHEmQRmTGLHV6x4v+JYwWsOFCGRDn6RKem1rPPrkN9Y0uqAXLN4VwCgjYGEE8rBgMAjwKsF9S9WgLa9qjYcf+Po9jXdlGrfC5Wj8Vg0Lf+ZENAFmpGB9TWTLhmUxUD1UDg/gtudRnK+a4RtkgqQyO+RT5LVrmiLgJcN19gcGNojUWriS5yRQm7pcBTc/vyCKdW1RrWwzOTiYhGf+dRUmcgZosgDVfgWaMCS2V2tO+OzG0MiVjdUwiFiYm9a7O4kJAoZEooV9H4T0O0ofODkKr5+6+nY6V3heVZQpv6ZWaz55qSJJnXjtUBW5pT7k8xeK5u+B0PQdBVbQgTLq9HbQYthyNVSmTT6A/nB0aGpF0K99+trY1F7TNI9PZGXkKUVRtYjGZCIOV1dHR4Ynz8FSLV8BrjK6uiAlpLcmco1ipmgpAaU8rfesboCuumBg31uJbx6+qH0uX9D/em0i85xFhaslKZKA8/82RtYDhd/1MkCuBnjxrLgKB0EQSb5oWO+9O1bZrsy3+Kc3dcH+b99b07NuyXe6P9r8z/am+C9lkuqCjo4qGGkQES76qJcuz/2GOlUoFuVsQS+98frlaSeq8Gkqqctrg7Dz853wwrfugUfXtj3W3tJ8oCletRUEXy1SCSSYHhdu41gFqILcZCrzwkvnJmE0U3JtHefiL7eS2l7th11f7IQ9j65aVh+r+nlzbd2TELJrHPLmIXZX3wyBX8MTQMm8PJ0u9Pe9chGQYy9omvXouHu/thJqI+Ef1sZDm0AMBmfPiQsSPDuY2zhWwSH5ISU5Pjm98x9nRo7+7JVBB3wl5nJz35Vo/z/esBQUVf2+QlkD9Aw42/Ts3Au7ushdAhQ5UzJoOjE+OrV9/1tDR7cNnIax7N2bDX9nm1bUQXdz9Rp/MLwRoqAtDOzcaO7rvDrAWW8vhcatWVNjF6cmJre9embkz1947h3YfXgIUgVzblQldxgFH0ZOr/qULwM15k4Zlci4Vd9ZU5ltY71oObHBnBFQBidmUk8kEsOP7Hntwqsb974NfS8PAh7LKoo23Hw+2R4FQcSzKlDPgFOEyf8kx3HW94kQ7xJgRRdAJG7CyIWxgiXNUN0+k5nJLN83k3n8D8eHN3+1ux5+8uBHIKiWt1G1Rn3IJkiUCcQzU3G0h9qWHMeJdoSrwtr9dl6I6DNjFwRRyxiKnStSqkPJPsGSmZ+mp1P9z2dzOy3Klj31yMdmX9S8V75APEsomMZwT9fz9i6vkW9AvEgQyqrBQM2Dq9rrD0gCgXfHA0jpjIRm2Zcw+3CR2tZl27SnMZFSZ1lWcRwZITeDckresAEXaoKwwBh7/WQubgTOQj5BVjdv7KiBJz7bztMNcHIk03JiONNyfiK/ntv2VMHAMx6BjpoA/Gj9Emdjul7W7e6TeQNDK9WJLRm361P5c1drEmAaymaYoXpfjZoiOk7FHWuh5dxEHmzLHiXM9oyTz9FawRZw65f5yyzXBMpd0JGhFKB5nSwRMVvumDv2cxm4m1f5X4AuWhRePDUOtqEPQJVVGfWcBz1ahmPlTlxzqaJLquYZU1HTvjcTMD6dOULM0n+g5nKposHzdWbo7FgEkDBviWlYx++53XtQ33kvDU8dHAJm6L8usdwEZn09S3qiPed5lcCSLUpI0eEA8620zLbDl6bh8T+egkI+/7Rl6kegcTSPst1QUKaM+brhrjnF2yUQJNxnrGMnR7KbTw5nYFVjyAl98w2+VdvVlA67Dw3BgROjAKa+yyrpz0BKTbJnez1NT6AKrrnA1bEi1av2v3xaiL90dnxL2Kc0rsXc4WpcQEc8AEtiGrRiejmK6WWeMDIxtVwwKExijB5KFuBYIg1cy8dx0dTQ/yQVc78yBXMIqJ5i/VvvkqHdSjXuM/THKy7w2LQJ6fpJms38QiHGvlzBt+RwJv2JQ2elbjyRtjIi1AIRMAsKPuQduHVzr2YW+kIBE5BTwOzzxLKOiMX8QVuWh00IpqD+S0WHtLlzefpLBOZo/IYvEqQPnTX5dxmy4xookqaCjRuT4mMi8g3bxs2KCkj3GFj4+QSzA0RkeskU8iCJeUiBDv09Jt8OPEV6k7DlP3gxxh/dAPymPh/Kf5d897dIOd9P7H8oEd4G1JV8wPGbRadx52sgLmrRAZ99EZ5+LZgV+v+4Llrg/wX6HRCxgvzAAwAAAABJRU5ErkJggg==")}}.edd-text-loading{animation:skeleton-loading 1s infinite alternate}.edd-button__toggle{position:relative;padding:0;width:36px;height:20px;min-height:unset;transition:background .2s ease;border-radius:30px;box-shadow:none;border:none;display:flex;justify-content:center;align-items:center;background:#c3c4c7;margin:0 12px 0 0}.edd-button__toggle--enabled{background:var(--wp-admin-theme-color)}.edd-button__toggle--enabled:after{transform:translateX(16px)}.edd-button__toggle:after{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#fff;transition:transform .1s ease;border-radius:50%;background:#fff} \ No newline at end of file diff --git a/assets/css/stripe-cardelements-rtl.min.css b/assets/css/stripe-cardelements-rtl.min.css new file mode 100644 index 00000000000..6979ea0eab5 --- /dev/null +++ b/assets/css/stripe-cardelements-rtl.min.css @@ -0,0 +1 @@ +#edd-stripe-card-errors:not(:empty){margin:20px 0 0}:root{--edds-modal-grid-unit:1rem;--edds-modal-overlay:rgba(0,0,0,0.6)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.6);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:1.5rem;padding:calc(var(--edds-modal-grid-unit)*1.5);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:right;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:"✕"}.edds-modal__content{margin:1.5rem;margin:calc(var(--edds-modal-grid-unit)*1.5)}@keyframes eddsSlideIn{0%{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideOut{0%{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{animation:eddsSlideIn .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{animation:eddsSlideOut .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-prb{margin:15px 0;display:none}.edds-prb__or{font-size:90%;text-align:center;margin:15px 0;overflow:hidden}.edds-prb__or:after,.edds-prb__or:before{background-color:rgba(0,0,0,.1);content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.edds-prb__or:before{left:.5em;margin-right:-50%}.edds-prb__or:after{right:.5em;margin-left:-50%}.edd_download_purchase_form.loading{position:relative}.edd_download_purchase_form.loading:after{content:"";position:absolute;right:0;width:100%;height:100%;top:0;z-index:100}.edd_download_purchase_form.loading>*{opacity:.65}#edd_checkout_form_wrap.loading{position:relative}#edd_checkout_form_wrap.loading:after{content:"";position:absolute;right:0;width:100%;height:100%;top:0;z-index:100}#edd_checkout_form_wrap.loading>*{opacity:.65}#edd_checkout_form_wrap:not(.edd-prb--is-active) #edd-payment-mode-wrap #edd-gateway-option-stripe-prb{display:none!important}#edd_checkout_form_wrap .edds-prb{margin-bottom:0}#edd_checkout_form_wrap .edds-prb__or{display:none}#edd_checkout_form_wrap .edd-card-selector-radio label{display:inline;vertical-align:middle;font-weight:400;line-height:24px;font-size:100%;margin:0}.edd-card-selector-radio .edd-stripe-card-radio-item{width:100%;font-size:15px;padding:8px 12px;border:1px solid transparent}.edd-card-selector-radio .edd-stripe-card-radio-item label{line-height:1;margin:0;display:flex;align-items:center}.edd-card-selector-radio .edd-stripe-card-radio-item label .add-new-card,.edd-card-selector-radio .edd-stripe-card-radio-item label .card-label{margin-right:8px}.edd-card-selector-radio .edd-stripe-card-radio-item.selected{border:1px solid #f0f0f0;background-color:#fcfcfc;border-radius:3px}.edd-card-selector-radio div.card-label{width:65%;display:inline-block}.edd-card-selector-radio span.card-is-default{font-style:italic}.edd-card-selector-radio span.card-expired{color:#f33}.edd-stripe-card-selector+.edd-stripe-new-card{margin-top:20px}#edd-stripe-manage-cards .edd-stripe-add-new-card{margin:20px 0 10px}#edd-stripe-manage-cards div.edd-stripe-card-item{list-style:none;width:100%;display:-ms-inline-grid;display:inline-grid;border:1px solid #f0f0f0;padding:5px 10px;min-height:100px;margin-bottom:10px;border-radius:3px;margin-right:0}.edd-stripe-card-item>span{display:block}.edd-stripe-card-item .card-meta>span{color:#999;display:block}.edd-stripe-card-item .card-actions a{text-decoration:none}.edd-stripe-card-item .card-actions a.delete{color:#f33}.card-actions .edd-loading-ajax{display:inline-block;margin-left:4px}.edd-stripe-card-item .card-update-form{display:none}.edd-stripe-card-item .card-update-form label{font-weight:700}.edd-stripe-card-item .card-update-form input{margin-bottom:3px}.edd-stripe-card-item .card-update-form select{background:#fff;border:1px solid #e4e4e4;height:40px;margin-left:3px}.edd-stripe-card-item .card-update-form select:first-of-type{margin-left:3px}.edd-stripe-card-item .card-address-fields input,.edd-stripe-card-item .card-address-fields select{width:49%;display:inline-block}.edd-stripe-add-new-card label{font-weight:700;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}.edd-stripe-add-new-card label:after{display:block;visibility:hidden;float:none;clear:both;height:0;text-indent:-9999px;content:"."}.edd-stripe-add-new-card span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}.edd-stripe-add-new-card input.edd-input,.edd-stripe-add-new-card textarea.edd-input{display:inline-block;width:70%}.edd-stripe-add-new-card select.edd-select{display:block;width:60%}.edd-stripe-add-new-card select.edd-select.edd-select-small{display:inline;width:auto}.edd-stripe-add-new-card input.edd-input.error,.edd-stripe-add-new-card textarea.edd-input.error{border-color:#c4554e}.edd-stripe-add-new-card>p{margin:0 0 21px}.edd-stripe-add-new-card span.edd-required-indicator{color:#b94a48;display:inline}.edd-stripe-add-new-card input[type=email],.edd-stripe-add-new-card input[type=password],.edd-stripe-add-new-card input[type=tel],.edd-stripe-add-new-card input[type=text],.edd-stripe-add-new-card textarea{padding:4px 6px}.edd-stripe-add-new-card input[type=radio]{border:none;margin-left:5px}.edd-stripe-add-new-card input[type=checkbox]{display:inline-block;margin:0 0 0 5px}.edd-stripe-add-new-card input[type=checkbox]+label,.edd-stripe-add-new-card input[type=checkbox]+label:after{display:inline}.edd-stripe-add-new-card .edd-payment-icons{height:32px;display:block;margin:0 0 8px}.edd-stripe-add-new-card .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 0 0 3px;float:right;background:none;padding:0;border:none;box-shadow:none}.edd-stripe-add-new-card #edd-payment-mode-wrap label{display:inline-block;margin:0 0 0 20px}.edd-stripe-add-new-card #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:700;display:inline-block;position:relative;margin-bottom:5px}.edd-stripe-add-new-card fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}.edd-stripe-add-new-card #edd_discount_code,.edd-stripe-add-new-card #edd_purchase_submit,.edd-stripe-add-new-card #edd_register_account_fields{padding:0;border:none}.edd-stripe-add-new-card fieldset fieldset{margin:0;border:none;padding:0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount,.edd-stripe-add-new-card .edd-cart-adjustment{background:#fafafa;color:#666;padding:.5em 1.387em}.edd-stripe-add-new-card #edd-discount-code-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount{border:1px solid #eee}.edd-stripe-add-new-card .edd-cart-adjustment{padding:1.387em}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-input,.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{display:inline-block}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}.edd-stripe-add-new-card #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap{margin:-1.387em -1.387em 21px;border-right:none;border-left:none;border-top:none}.edd-stripe-add-new-card #edd_payment_mode_select,.edd-stripe-add-new-card fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_account_fields legend{padding-top:11px}.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_login_password,.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_register_password{margin:0}.edd-stripe-add-new-card fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}.edd-stripe-add-new-card fieldset#edd_cc_fields legend{border:none;padding:0}.edd-stripe-add-new-card fieldset p:last-child{margin-bottom:0}#edd_secure_site_wrapper{padding:4px 0 4px 4px;font-weight:700}.edd-stripe-add-new-card span.exp-divider{display:inline}.edd-stripe-card-cvc-element.StripeElement,.edd-stripe-card-element.StripeElement,.edd-stripe-card-exp-element.StripeElement{box-sizing:border-box;padding:10px 12px;border:1px solid #ccc;background-color:#fff}.edd-stripe-card-element.StripeElement--invalid{border-color:#c4554e!important}#edd-card-wrap{position:relative}#edd-card-details-wrap{display:flex;justify-content:space-between;flex-wrap:wrap}#edd-card-details-wrap p:empty{width:100%}#edd-card-cvv-wrap,#edd-card-exp-wrap{width:48%}#edd-stripe-card-element-wrapper{position:relative}#edd_checkout_form_wrap .edd-stripe-new-card span.card-type{background-size:32px 24px!important;width:32px;height:24px;top:50%;transform:translate3d(0,-50%,0);left:10px}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0} \ No newline at end of file diff --git a/assets/css/stripe-cardelements.min.css b/assets/css/stripe-cardelements.min.css new file mode 100644 index 00000000000..cfb6a37170f --- /dev/null +++ b/assets/css/stripe-cardelements.min.css @@ -0,0 +1 @@ +#edd-stripe-card-errors:not(:empty){margin:20px 0 0}:root{--edds-modal-grid-unit:1rem;--edds-modal-overlay:rgba(0,0,0,0.6)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:1.5rem;padding:calc(var(--edds-modal-grid-unit)*1.5);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:left;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:"✕"}.edds-modal__content{margin:1.5rem;margin:calc(var(--edds-modal-grid-unit)*1.5)}@keyframes eddsSlideIn{0%{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideOut{0%{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{animation:eddsSlideIn .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{animation:eddsSlideOut .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-prb{margin:15px 0;display:none}.edds-prb__or{font-size:90%;text-align:center;margin:15px 0;overflow:hidden}.edds-prb__or:after,.edds-prb__or:before{background-color:rgba(0,0,0,.1);content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.edds-prb__or:before{right:.5em;margin-left:-50%}.edds-prb__or:after{left:.5em;margin-right:-50%}.edd_download_purchase_form.loading{position:relative}.edd_download_purchase_form.loading:after{content:"";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}.edd_download_purchase_form.loading>*{opacity:.65}#edd_checkout_form_wrap.loading{position:relative}#edd_checkout_form_wrap.loading:after{content:"";position:absolute;left:0;width:100%;height:100%;top:0;z-index:100}#edd_checkout_form_wrap.loading>*{opacity:.65}#edd_checkout_form_wrap:not(.edd-prb--is-active) #edd-payment-mode-wrap #edd-gateway-option-stripe-prb{display:none!important}#edd_checkout_form_wrap .edds-prb{margin-bottom:0}#edd_checkout_form_wrap .edds-prb__or{display:none}#edd_checkout_form_wrap .edd-card-selector-radio label{display:inline;vertical-align:middle;font-weight:400;line-height:24px;font-size:100%;margin:0}.edd-card-selector-radio .edd-stripe-card-radio-item{width:100%;font-size:15px;padding:8px 12px;border:1px solid transparent}.edd-card-selector-radio .edd-stripe-card-radio-item label{line-height:1;margin:0;display:flex;align-items:center}.edd-card-selector-radio .edd-stripe-card-radio-item label .add-new-card,.edd-card-selector-radio .edd-stripe-card-radio-item label .card-label{margin-left:8px}.edd-card-selector-radio .edd-stripe-card-radio-item.selected{border:1px solid #f0f0f0;background-color:#fcfcfc;border-radius:3px}.edd-card-selector-radio div.card-label{width:65%;display:inline-block}.edd-card-selector-radio span.card-is-default{font-style:italic}.edd-card-selector-radio span.card-expired{color:#f33}.edd-stripe-card-selector+.edd-stripe-new-card{margin-top:20px}#edd-stripe-manage-cards .edd-stripe-add-new-card{margin:20px 0 10px}#edd-stripe-manage-cards div.edd-stripe-card-item{list-style:none;width:100%;display:-ms-inline-grid;display:inline-grid;border:1px solid #f0f0f0;padding:5px 10px;min-height:100px;margin-bottom:10px;border-radius:3px;margin-left:0}.edd-stripe-card-item>span{display:block}.edd-stripe-card-item .card-meta>span{color:#999;display:block}.edd-stripe-card-item .card-actions a{text-decoration:none}.edd-stripe-card-item .card-actions a.delete{color:#f33}.card-actions .edd-loading-ajax{display:inline-block;margin-right:4px}.edd-stripe-card-item .card-update-form{display:none}.edd-stripe-card-item .card-update-form label{font-weight:700}.edd-stripe-card-item .card-update-form input{margin-bottom:3px}.edd-stripe-card-item .card-update-form select{background:#fff;border:1px solid #e4e4e4;height:40px;margin-right:3px}.edd-stripe-card-item .card-update-form select:first-of-type{margin-right:3px}.edd-stripe-card-item .card-address-fields input,.edd-stripe-card-item .card-address-fields select{width:49%;display:inline-block}.edd-stripe-add-new-card label{font-weight:700;display:block;position:relative;line-height:100%;font-size:95%;margin:0 0 5px}.edd-stripe-add-new-card label:after{display:block;visibility:hidden;float:none;clear:both;height:0;text-indent:-9999px;content:"."}.edd-stripe-add-new-card span.edd-description{color:#666;font-size:80%;display:block;margin:0 0 5px}.edd-stripe-add-new-card input.edd-input,.edd-stripe-add-new-card textarea.edd-input{display:inline-block;width:70%}.edd-stripe-add-new-card select.edd-select{display:block;width:60%}.edd-stripe-add-new-card select.edd-select.edd-select-small{display:inline;width:auto}.edd-stripe-add-new-card input.edd-input.error,.edd-stripe-add-new-card textarea.edd-input.error{border-color:#c4554e}.edd-stripe-add-new-card>p{margin:0 0 21px}.edd-stripe-add-new-card span.edd-required-indicator{color:#b94a48;display:inline}.edd-stripe-add-new-card input[type=email],.edd-stripe-add-new-card input[type=password],.edd-stripe-add-new-card input[type=tel],.edd-stripe-add-new-card input[type=text],.edd-stripe-add-new-card textarea{padding:4px 6px}.edd-stripe-add-new-card input[type=radio]{border:none;margin-right:5px}.edd-stripe-add-new-card input[type=checkbox]{display:inline-block;margin:0 5px 0 0}.edd-stripe-add-new-card input[type=checkbox]+label,.edd-stripe-add-new-card input[type=checkbox]+label:after{display:inline}.edd-stripe-add-new-card .edd-payment-icons{height:32px;display:block;margin:0 0 8px}.edd-stripe-add-new-card .edd-payment-icons img.payment-icon{max-height:32px;width:auto;margin:0 3px 0 0;float:left;background:none;padding:0;border:none;box-shadow:none}.edd-stripe-add-new-card #edd-payment-mode-wrap label{display:inline-block;margin:0 20px 0 0}.edd-stripe-add-new-card #edd-payment-mode-wrap .edd-payment-mode-label{font-weight:700;display:inline-block;position:relative;margin-bottom:5px}.edd-stripe-add-new-card fieldset{border:1px solid #eee;padding:1.387em;margin:0 0 21px}.edd-stripe-add-new-card #edd_discount_code,.edd-stripe-add-new-card #edd_purchase_submit,.edd-stripe-add-new-card #edd_register_account_fields{padding:0;border:none}.edd-stripe-add-new-card fieldset fieldset{margin:0;border:none;padding:0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount,.edd-stripe-add-new-card .edd-cart-adjustment{background:#fafafa;color:#666;padding:.5em 1.387em}.edd-stripe-add-new-card #edd-discount-code-wrap,.edd-stripe-add-new-card #edd_final_total_wrap,.edd-stripe-add-new-card #edd_show_discount{border:1px solid #eee}.edd-stripe-add-new-card .edd-cart-adjustment{padding:1.387em}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-input,.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{display:inline-block}.edd-stripe-add-new-card .edd-cart-adjustment input.edd-submit{padding:3px 12px;margin-bottom:2px}.edd-stripe-add-new-card #edd-discount-error-wrap{width:100%;display:inline-block;margin:1em 0 0}.edd-stripe-add-new-card #edd-login-account-wrap,.edd-stripe-add-new-card #edd-new-account-wrap{margin:-1.387em -1.387em 21px;border-left:none;border-right:none;border-top:none}.edd-stripe-add-new-card #edd_payment_mode_select,.edd-stripe-add-new-card fieldset#edd_register_fields #edd_checkout_user_info{margin-bottom:21px}.edd-stripe-add-new-card fieldset#edd_register_account_fields legend{padding-top:11px}.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_login_password,.edd-stripe-add-new-card fieldset#edd_register_account_fields p.edd_register_password{margin:0}.edd-stripe-add-new-card fieldset#edd_cc_fields{border:1px solid #f0f0f0;background:#f9f9f9;position:relative}.edd-stripe-add-new-card fieldset#edd_cc_fields legend{border:none;padding:0}.edd-stripe-add-new-card fieldset p:last-child{margin-bottom:0}#edd_secure_site_wrapper{padding:4px 4px 4px 0;font-weight:700}.edd-stripe-add-new-card span.exp-divider{display:inline}.edd-stripe-card-cvc-element.StripeElement,.edd-stripe-card-element.StripeElement,.edd-stripe-card-exp-element.StripeElement{box-sizing:border-box;padding:10px 12px;border:1px solid #ccc;background-color:#fff}.edd-stripe-card-element.StripeElement--invalid{border-color:#c4554e!important}#edd-card-wrap{position:relative}#edd-card-details-wrap{display:flex;justify-content:space-between;flex-wrap:wrap}#edd-card-details-wrap p:empty{width:100%}#edd-card-cvv-wrap,#edd-card-exp-wrap{width:48%}#edd-stripe-card-element-wrapper{position:relative}#edd_checkout_form_wrap .edd-stripe-new-card span.card-type{background-size:32px 24px!important;width:32px;height:24px;top:50%;transform:translate3d(0,-50%,0);right:10px}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0} \ No newline at end of file diff --git a/assets/css/stripe-paymentelements-rtl.min.css b/assets/css/stripe-paymentelements-rtl.min.css new file mode 100644 index 00000000000..e6e315ae44f --- /dev/null +++ b/assets/css/stripe-paymentelements-rtl.min.css @@ -0,0 +1 @@ +#edd-stripe-card-errors:not(:empty){margin:20px 0 0}:root{--edds-modal-grid-unit:1rem;--edds-modal-overlay:rgba(0,0,0,0.6)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.6);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:1.5rem;padding:calc(var(--edds-modal-grid-unit)*1.5);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:right;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:"✕"}.edds-modal__content{margin:1.5rem;margin:calc(var(--edds-modal-grid-unit)*1.5)}@keyframes eddsSlideIn{0%{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideOut{0%{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{animation:eddsSlideIn .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{animation:eddsSlideOut .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0}#edd_purchase_submit #edd-purchase-button[data-edd-button-state=disabled]{opacity:.5;cursor:not-allowed}#edd_purchase_submit #edd-purchase-button [data-edd-button-state=processing],#edd_purchase_submit #edd-purchase-button[data-edd-button-state=updating]{opacity:.5;cursor:wait}#card_name,.card-name{padding:8px!important;width:100%!important;box-sizing:border-box} \ No newline at end of file diff --git a/assets/css/stripe-paymentelements.min.css b/assets/css/stripe-paymentelements.min.css new file mode 100644 index 00000000000..dcd91e16d5b --- /dev/null +++ b/assets/css/stripe-paymentelements.min.css @@ -0,0 +1 @@ +#edd-stripe-card-errors:not(:empty){margin:20px 0 0}:root{--edds-modal-grid-unit:1rem;--edds-modal-overlay:rgba(0,0,0,0.6)}.edds-modal__overlay{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);background:var(--edds-modal-overlay);display:flex;justify-content:center;align-items:center}.edds-modal__container{background-color:#fff;min-width:350px;max-width:90vw;max-height:90vh;box-sizing:border-box;overflow-y:auto}.admin-bar .edds-modal__container{margin-top:32px}.edds-modal__header{padding:1.5rem;padding:calc(var(--edds-modal-grid-unit)*1.5);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #eee}.edds-modal__title{text-align:left;font-size:150%;margin:0}.edds-modal__close{line-height:1;padding:1rem}.edds-modal__close:before{content:"✕"}.edds-modal__content{margin:1.5rem;margin:calc(var(--edds-modal-grid-unit)*1.5)}@keyframes eddsSlideIn{0%{transform:translateY(15%)}to{transform:translateY(0)}}@keyframes eddsSlideOut{0%{transform:translateY(0)}to{transform:translateY(15%)}}.edds-modal.has-slide{display:none}.edds-modal.has-slide.is-open{display:block}.edds-modal.has-slide[aria-hidden=false] .edds-modal__container{animation:eddsSlideIn .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide[aria-hidden=true] .edds-modal__container{animation:eddsSlideOut .3s cubic-bezier(0,0,.2,1)}.edds-modal.has-slide .edds-modal__container,.edds-modal.has-slide .edds-modal__overlay{will-change:transform}.edds-buy-now-modal{width:500px}.edds-buy-now-modal .edds-modal__close{padding:.5rem}.edds-buy-now-modal #edd_checkout_form_wrap input.edd-input,.edds-buy-now-modal #edd_checkout_form_wrap textarea.edd-input{width:100%}.edds-buy-now-modal #edd_checkout_form_wrap #edd_purchase_submit{margin-top:1.5rem;margin-bottom:0}.edds-buy-now-modal .edds-field-spacer-shim{margin-bottom:1rem}.edds-buy-now-modal .edd-alert-error{margin:20px 0}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty){margin-bottom:20px}.edds-buy-now-modal #edd-stripe-card-errors:not(:empty) .edd-alert-error{margin:0}#edd_purchase_submit #edd-purchase-button[data-edd-button-state=disabled]{opacity:.5;cursor:not-allowed}#edd_purchase_submit #edd-purchase-button [data-edd-button-state=processing],#edd_purchase_submit #edd-purchase-button[data-edd-button-state=updating]{opacity:.5;cursor:wait}#card_name,.card-name{padding:8px!important;width:100%!important;box-sizing:border-box} \ No newline at end of file diff --git a/assets/css/variables/_animations.scss b/assets/css/variables/_animations.scss new file mode 100644 index 00000000000..34de63b1bf9 --- /dev/null +++ b/assets/css/variables/_animations.scss @@ -0,0 +1,8 @@ +@keyframes skeleton-loading { + 0% { + background-color: hsl(210, 20%, 85%); + } + 100% { + background-color: hsl(210, 20%, 90%); + } +} diff --git a/assets/css/variables/_colors.scss b/assets/css/variables/_colors.scss new file mode 100644 index 00000000000..be82aebad42 --- /dev/null +++ b/assets/css/variables/_colors.scss @@ -0,0 +1,97 @@ +@import "~@wordpress/base-styles/colors"; +@import "~@wordpress/base-styles/colors.native"; +/** + * WordPress Core colors current as of 5.5.1. + */ +$wp-text: $gray-text-min; +$wp-border: #c3c4c7; + +$wp-input-text: #32373c; +$wp-input-border: #7e8993; +$wp-input-border-2: #8c8f94; + +$wp-alternate: #f9f9f9; +$wp-inactive: #999; + +$wp-red-50: #d63638; +$wp-green-30: #00ba37; +$wp-green-50: #008a20; +$wp-yellow-50: #996800; +$warning: #f18200; + +$wp-gray-0: $gray-0; +$wp-gray-2: $gray-100; +$wp-gray-5: #dcdcde; +$wp-gray-10: #c3c4c7; +$wp-gray-20: $gray-20; +$wp-gray-40: $gray-40; +$wp-gray-50: $gray-50; + +$buddypress-colors: ( + 'evergreen': #36533f, + 'mint': #4f6d59, +); + +/** + * EDD Brand Colors + */ +$edd-blue-gray: #35495c; // Found on our brand assets page. +$edd-light-blue: #2794da; // Found on our brand assets page. +$edd-light-gray: #f4f7fa; // Found on our brand assets page. + +/** + * EDD Admin Colors + */ + +/** + * Used in: + * Admin bar thin line. + * Persistent dismissables. + * Flyout item backgrounds. + */ +$edd-notice-blue: #0c5d95; +$edd-notice-blue-hover: $edd-blue-gray; + +/** + * Used in: + * Persistent dismissables - Alerts + * Flyout item backgrounds - Activate License key + * Flyout bubble - Alert Icon. + */ +$edd-alert-red: #d63638; // The red used in our notice bars and the flyout items. +$edd-alert-red-hover: #b60012; // The hover color for the alert red. + +/** + * Used in: + * Flyout item backgrounds - Upgrade to Pro/Get a License + * Upgrade to Pro links + */ +$edd-notice-green: #1da867; +$edd-notice-green-hover: #199155; + +$edd-very-light-gray: #E8E8E8; // A light gray used for box shadows in some section content that overlays the WP core background. + +/** + * Used In: + * Social Links in our footer. + */ +$edd-footer-social-link: #A7AAAD; +$edd-footer-social-link-hover: #50575e; + +/** + * Supplemental colors that WP Core Is Missing: + */ +$gray-800: #494949; + +/** + * Upgrade to Pro Colors + */ +$edd-pro-upgrade: #1da867; + +/** + * EDD Tooltips + */ +$edd-tool-tip-icon-color: rgba(126, 137, 147, 1); +$edd-tooltip-background: $white; +$edd-tooltip-text: #23282D; +$edd-tool-tip-shadow: 0px 8px 36px 0px rgba(29, 36, 40, 0.15); diff --git a/assets/css/variables/_icons.scss b/assets/css/variables/_icons.scss new file mode 100644 index 00000000000..6bf609004f2 --- /dev/null +++ b/assets/css/variables/_icons.scss @@ -0,0 +1,5 @@ + +$icon-search: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMjEgMjFsLTUuMTk3LTUuMTk3bTAgMEE3LjUgNy41IDAgMTA1LjE5NiA1LjE5NmE3LjUgNy41IDAgMDAxMC42MDcgMTAuNjA3eiIgLz4KPC9zdmc+Cg==); +$icon-close: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNNiAxOEwxOCA2TTYgNmwxMiAxMiIgLz4KPC9zdmc+Cg==); +$icon-install: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkuMTExNTggMVY2LjA3NTkxSDEwLjk2NDFWNi44MTY5Mkw4LjAwMDA3IDkuNzgwOTVMNS4wMzYwNCA2LjgxNjkyVjYuMDc1OTFINi44ODg1NlYxSDkuMTExNThaTTMuMTgzNTIgMTAuMTUxNVYxMi4wMDRIMTIuODE2NlYxMC4xNTE1SDE1Ljc4MDdWMTMuNDg2VjE0Ljk2OEgxNC4yOTg2SDEuNzAxNUgwLjIxOTQ4MlYxMy40ODZWMTAuMTUxNUgzLjE4MzUyWiIgZmlsbD0iIzk5OSIvPgo8L3N2Zz4K); +$icon-settings: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS4yOTAyIDYuMjkzMjJMMTMuNzc0NyA3LjE2ODJDMTMuODEzNiA3LjQ0MDE0IDEzLjgzMzYgNy43MTc5NCAxMy44MzM2IDguMDAwMTRDMTMuODMzNiA4LjI4MjQgMTMuODEzNiA4LjU2MDIgMTMuNzc0NyA4LjgzMjE0TDE1LjI5MDIgOS43MDcxNEwxMy4xMjM1IDEzLjQ1OTlMMTEuNjA3NiAxMi41ODQ3QzExLjE3MzIgMTIuOTI2OSAxMC42ODg4IDEzLjIwODkgMTAuMTY3IDEzLjQxNzdWMTUuMTY2OEg1LjgzMzY1VjEzLjQxNzdDNS4zMTE4IDEzLjIwODkgNC44MjczOCAxMi45MjY5IDQuMzkzMDIgMTIuNTg0N0wyLjg3NzEyIDEzLjQ1OTlMMC43MTA0NTYgOS43MDcxNEwyLjIyNTkzIDguODMyMTRDMi4xODcwNiA4LjU2MDIgMi4xNjY5OCA4LjI4MjQgMi4xNjY5OCA4LjAwMDE0QzIuMTY2OTggNy43MTc5NCAyLjE4NzA2IDcuNDQwMTQgMi4yMjU5MiA3LjE2ODJMMC43MTA0NDkgNi4yOTMyMkwyLjg3NzEyIDIuNTQwNDRMNC4zOTMwMiAzLjQxNTY1QzQuODI3MzggMy4wNzM0NCA1LjMxMTc5IDIuNzkxNDkgNS44MzM2NSAyLjU4MjYxVjAuODMzNDk2SDEwLjE2N1YyLjU4MjYxQzEwLjY4ODggMi43OTE0OSAxMS4xNzMyIDMuMDczNDQgMTEuNjA3NiAzLjQxNTY1TDEzLjEyMzUgMi41NDA0NEwxNS4yOTAyIDYuMjkzMjJaTTguMDAwMTYgMTAuMzMzM0M5LjI4ODgzIDEwLjMzMzMgMTAuMzMzNSA5LjI4ODY3IDEwLjMzMzUgOEMxMC4zMzM1IDYuNzExMzQgOS4yODg4MyA1LjY2NjY3IDguMDAwMTYgNS42NjY2N0M2LjcxMTUgNS42NjY2NyA1LjY2NjgzIDYuNzExMzQgNS42NjY4MyA4QzUuNjY2ODMgOS4yODg2NyA2LjcxMTUgMTAuMzMzMyA4LjAwMDE2IDEwLjMzMzNaIiBmaWxsPSIjNkI3MjgwIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUuMjkwMiA2LjI5MzIyTDEzLjc3NDcgNy4xNjgyQzEzLjgxMzYgNy40NDAxNCAxMy44MzM2IDcuNzE3OTQgMTMuODMzNiA4LjAwMDE0QzEzLjgzMzYgOC4yODI0IDEzLjgxMzYgOC41NjAyIDEzLjc3NDcgOC44MzIxNEwxNS4yOTAyIDkuNzA3MTRMMTMuMTIzNSAxMy40NTk5TDExLjYwNzYgMTIuNTg0N0MxMS4xNzMyIDEyLjkyNjkgMTAuNjg4OCAxMy4yMDg5IDEwLjE2NyAxMy40MTc3VjE1LjE2NjhINS44MzM2NVYxMy40MTc3QzUuMzExOCAxMy4yMDg5IDQuODI3MzggMTIuOTI2OSA0LjM5MzAyIDEyLjU4NDdMMi44NzcxMiAxMy40NTk5TDAuNzEwNDU2IDkuNzA3MTRMMi4yMjU5MyA4LjgzMjE0QzIuMTg3MDYgOC41NjAyIDIuMTY2OTggOC4yODI0IDIuMTY2OTggOC4wMDAxNEMyLjE2Njk4IDcuNzE3OTQgMi4xODcwNiA3LjQ0MDE0IDIuMjI1OTIgNy4xNjgyTDAuNzEwNDQ5IDYuMjkzMjJMMi44NzcxMiAyLjU0MDQ0TDQuMzkzMDIgMy40MTU2NUM0LjgyNzM4IDMuMDczNDQgNS4zMTE3OSAyLjc5MTQ5IDUuODMzNjUgMi41ODI2MVYwLjgzMzQ5NkgxMC4xNjdWMi41ODI2MUMxMC42ODg4IDIuNzkxNDkgMTEuMTczMiAzLjA3MzQ0IDExLjYwNzYgMy40MTU2NUwxMy4xMjM1IDIuNTQwNDRMMTUuMjkwMiA2LjI5MzIyWk04LjAwMDE2IDEwLjMzMzNDOS4yODg4MyAxMC4zMzMzIDEwLjMzMzUgOS4yODg2NyAxMC4zMzM1IDhDMTAuMzMzNSA2LjcxMTM0IDkuMjg4ODMgNS42NjY2NyA4LjAwMDE2IDUuNjY2NjdDNi43MTE1IDUuNjY2NjcgNS42NjY4MyA2LjcxMTM0IDUuNjY2ODMgOEM1LjY2NjgzIDkuMjg4NjcgNi43MTE1IDEwLjMzMzMgOC4wMDAxNiAxMC4zMzMzWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+Cjwvc3ZnPgo=); diff --git a/assets/css/variables/_mixins.scss b/assets/css/variables/_mixins.scss new file mode 100644 index 00000000000..07f65121504 --- /dev/null +++ b/assets/css/variables/_mixins.scss @@ -0,0 +1,80 @@ +@mixin edd-admin-colors() { + @include admin-scheme(#007cba); + @include wordpress-admin-schemes(); + + @each $slug, $color in $buddypress-colors { + body.admin-color-#{$slug} { + @include admin-scheme($color); + } + } +} + +@mixin edd-spinner( $size: 1em, $border-background: $white, $border-color: $black, $border-width: 2px ) { + animation: 1.5s linear infinite edd-spinning; + animation-play-state: inherit; + border: $border-width solid $border-background; + border-bottom-color: $border-color; + border-radius: 100%; + content: ""; + width: $size; + height: $size; + transform: translate3d(-50%, -50%, 0); + will-change: transform; +} + + +@mixin edd-popup( $width: 300px, $height: auto, $transformY: 0, $transformX: 0, $pointer-size: 10px, $pointer-position: bottom ) { + + $box-shadow-y: if( $pointer-position == bottom, 2px, -2px ); + + position: absolute; + z-index: 99; + width: $width; + height: $height; + margin: auto; + padding: 10px; + transform: translate( $transformX, $transformY ); + background-color: #fff; + border: 1px solid $wp-input-border-2; + border-radius: 4px; + box-shadow: 0 $box-shadow-y 5px 0 rgba(0,0,0,.25); + box-sizing: border-box; + display: none; + + &::after { + content: ""; + width: $pointer-size; + height: $pointer-size; + background: #fff; + position: absolute; + margin: auto; + transform: rotate(45deg); + z-index: -1; + border-style: solid; + border-color: #8c8f94; + + $pointer-offset: calc( -1 * ( ( $pointer-size / 2 ) + 1px ) ); + + @if $pointer-position == bottom { + left: 0; + right: 0; + bottom: $pointer-offset; + border-width: 0 1px 1px 0; + } @else if $pointer-position == top { + left: 0; + right: 0; + top: $pointer-offset; + border-width: 1px 0 0 1px; + } @else if $pointer-position == right { + top: 0; + bottom: 0; + right: $pointer-offset; + border-width: 1px 1px 0 0; + } @else if $pointer-position == left { + top: 0; + bottom: 0; + left: $pointer-offset; + border-width: 0 0 1px 1px; + } + } +} diff --git a/assets/css/variables/_variables.scss b/assets/css/variables/_variables.scss new file mode 100644 index 00000000000..363d8d7f527 --- /dev/null +++ b/assets/css/variables/_variables.scss @@ -0,0 +1,10 @@ +@import "~@wordpress/base-styles/colors"; +@import "~@wordpress/base-styles/variables"; +@import "~@wordpress/base-styles/mixins"; +@import "~@wordpress/base-styles/breakpoints"; +@import "~@wordpress/base-styles/animations"; + +@import "colors"; +@import "icons"; +@import "mixins"; +@import "animations"; diff --git a/assets/css/vendor/chosen-rtl.min.css b/assets/css/vendor/chosen-rtl.min.css new file mode 100755 index 00000000000..506a4636f61 --- /dev/null +++ b/assets/css/vendor/chosen-rtl.min.css @@ -0,0 +1,11 @@ +/*! +Chosen, a Select Box Enhancer for jQuery and Prototype +by Patrick Filler for Harvest, http://getharvest.com + +Version 1.8.5 +Full source at https://github.com/harvesthq/chosen +Copyright (c) 2011-2018 Harvest http://getharvest.com + +MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md +This file is generated by `grunt build`, do not edit it by hand. +*/.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);display:none}.chosen-container.chosen-with-drop .chosen-drop{display:block}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-left:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-right:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 8px 0 0;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-single input[type=text]{cursor:pointer;opacity:0;position:absolute;width:0}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-left:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-left:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;left:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;left:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 5px 4px 20px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 0 -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;opacity:0;pointer-events:none}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 0 4px 4px;padding:0 4px 0 0;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-right:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:right;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 5px 3px 20px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;left:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-left:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-gradient(linear,right top,right bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}} \ No newline at end of file diff --git a/assets/css/vendor/chosen.min.css b/assets/css/vendor/chosen.min.css new file mode 100755 index 00000000000..fb044bf2d7f --- /dev/null +++ b/assets/css/vendor/chosen.min.css @@ -0,0 +1,8 @@ +/*! +Chosen, a Select Box Enhancer for jQuery and Prototype +Version 2.1.0 +Full source at https://github.com/jjj/chosen +Copyright (c) 2011-2020 JJJ +MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md +This file is generated by `grunt build`, do not edit it by hand. +*/.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1011;width:100%;border:1px solid #aaa;border-top:0;border-radius:0 0 4px 4px;background:#fff;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%);margin-top:-1px;background-clip:padding-box}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;-webkit-clip-path:none;clip-path:none}.chosen-container.chosen-dropup .chosen-choices,.chosen-container.chosen-dropup .chosen-single{z-index:1010}.chosen-container.chosen-dropup .chosen-drop{top:auto;bottom:100%;border:solid #aaa;border-width:1px 1px 0 1px;border-radius:4px 4px 0 0}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container .search-choice-close{position:absolute;right:3px;top:0;bottom:0;margin:auto;border:none;cursor:pointer;display:block;width:15px;height:15px;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 0 top 50%;background-size:15px 15px}.chosen-container .search-choice-close:active,.chosen-container .search-choice-close:hover{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 0 top 50%;background-size:15px 15px}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:2.5px 0 2.5px 7px;border:1px solid #aaa;border-radius:4px;background-color:#fff;background-clip:padding-box;color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span,.chosen-container-single .chosen-single-with-deselect.chosen-default span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:42px}.chosen-container-single .chosen-single .search-choice-close{right:26px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 5px top 52%;background-size:15px 15px}.chosen-container-single .chosen-search{position:relative;z-index:1011;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:0;padding:5px 20px 5px 5px;width:100%;height:auto;outline:0;border:1px solid #ccc;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 5px top 50%;background-size:15px 15px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:4px}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container-single.chosen-container-single-nosearch.chosen-dropup .chosen-results{padding-top:4px}.chosen-container-single.chosen-container-single-nosearch.chosen-dropup .chosen-single{z-index:1010}.chosen-container-single .chosen-drop .result-selected{background-color:#eee}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none;border-radius:4px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 3px;width:100%;height:auto;border-radius:4px;border:1px solid #aaa;background-color:#fff;cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:0 3px;padding:6.5px 0;outline:0;border:none;background:0 0;-webkit-box-shadow:none;box-shadow:none;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:4px 20px 4px 5px;border:1px solid #aaa;border-radius:3px;max-width:100%;background-color:#eee;color:#333;line-height:12px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{font-size:95%;word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-multi.chosen-dropup .chosen-results{padding-top:4px}.chosen-container-multi.chosen-dropup .chosen-single{z-index:1010}.chosen-container-active .chosen-single{outline:#00f}.chosen-container-active.chosen-with-drop .chosen-choices,.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0}.chosen-container-active.chosen-with-drop .chosen-single div b{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat right 5px top 52%;background-size:15px 15px}.chosen-container-active.chosen-with-drop.chosen-dropup .chosen-choices,.chosen-container-active.chosen-with-drop.chosen-dropup .chosen-single{border-radius:0 0 4px 4px}.chosen-container-active .chosen-choices{border:1px solid #5897fb}.chosen-disabled{opacity:.5;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{padding:2px 7px 2px 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:42px}.chosen-rtl .chosen-single div{right:auto;left:0}.chosen-rtl .chosen-single .search-choice-close{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 0 3px 5px;padding:3px 5px 3px 20px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:3px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl .chosen-search input[type=text]{padding:5px 5px 5px 20px;background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat left 5px top 55%;background-size:15px 15px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat left 5px top 52%;background-size:15px 15px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background:url('data:image/svg+xml;charset=US-ASCII,') no-repeat left 5px top 52%;background-size:15px 15px} \ No newline at end of file diff --git a/assets/css/vendor/jquery-ui-fresh-rtl.min.css b/assets/css/vendor/jquery-ui-fresh-rtl.min.css new file mode 100644 index 00000000000..87836669ad3 --- /dev/null +++ b/assets/css/vendor/jquery-ui-fresh-rtl.min.css @@ -0,0 +1 @@ +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}/*\*/* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}/**/.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;right:0;width:100%;height:100%}.ui-widget{font-family:sans-serif;font-size:12px}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:sans-serif;font-size:1em}.ui-widget-content{border:1px solid #dfdfdf;background:#fff;color:#333}.ui-widget-header{border:1px solid #dfdfdf;color:#333;font-weight:bold;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,right top,right bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #dfdfdf;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,right top,right bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec);font-weight:normal;color:#333}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#333;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background-color:#ececec;background-image:-ms-linear-gradient(top,#ececec,#f9f9f9);background-image:-moz-linear-gradient(top,#ececec,#f9f9f9);background-image:-o-linear-gradient(top,#ececec,#f9f9f9);background-image:-webkit-gradient(linear,right top,right bottom,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#ececec,#f9f9f9);background-image:linear-gradient(top,#ececec,#f9f9f9);font-weight:normal;color:#000}.ui-state-hover a,.ui-state-hover a:hover{color:#000;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #dfdfdf;background:#fff;font-weight:normal;color:#333}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#333;text-decoration:none}.ui-widget :active{outline:0}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #e6db55;background:#ffffe0;color:#333}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#333}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #c00;background:#ffebe8;color:#c00}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#c00}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#c00}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-content .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-header .ui-icon{background-image:url(../images/ui-icons_999999_256x240.png)}.ui-state-default .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-active .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(../images/ui-icons_21759b_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(../images/ui-icons_cc0000_256x240.png)}.ui-icon-carat-1-n{background-position:100% 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:100% -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:100% -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:100% -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:100% -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:100% -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:100% -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:100% -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:100% -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:100% -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-off{background-position:-96px -144px}.ui-icon-radio-on{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:100% -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:100% -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:100% -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:100% -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:100% -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.ui-widget-overlay{background:#000;opacity:.6;filter:Alpha(Opacity=60)}.ui-widget-shadow{box-shadow:0 0 16px rgba(0,0,0,0.3)}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;right:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;right:0}.ui-resizable-e{cursor:e-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-se{cursor:sw-resize;width:12px;height:12px;left:1px;bottom:1px}.ui-resizable-sw{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-nw{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-resizable-ne{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .7em .5em .5em}.ui-accordion-icons .ui-accordion-header a{padding-right:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;right:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:right}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:right;clear:right;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-left:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icons .ui-button-text{padding-right:2.1em;padding-left:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{right:50%;margin-right:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{right:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{left:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{left:.5em}.ui-buttonset{margin-left:7px}.ui-buttonset .ui-button{margin-right:0;margin-left:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{position:fixed;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:right;margin:.1em 0 .1em 16px}.ui-dialog .ui-dialog-titlebar-close{position:absolute;left:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:100%;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:right;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em .4em .5em 1em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:left}.ui-dialog .ui-dialog-buttonpane button{margin:.5em 0 .5em .4em;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;left:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:right}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:100% 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-right:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{right:0}.ui-slider-horizontal .ui-slider-range-max{left:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{right:-.3em;margin-right:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{right:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:right;position:relative;top:1px;margin:0 0 1px .2em;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:right;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:100%}.ui-tabs .ui-tabs-hide{display:none!important}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{right:2px}.ui-datepicker .ui-datepicker-next{left:2px}.ui-datepicker .ui-datepicker-prev-hover{right:1px}.ui-datepicker .ui-datepicker-next-hover{left:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;right:50%;margin-right:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:left;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-right:0;border-left:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:left;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:right}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:right}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:ltr}.ui-datepicker-rtl .ui-datepicker-prev{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-next{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker-rtl .ui-datepicker-group{float:left}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;border-right-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;border-right-width:1px}.ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;right:-4px;width:200px;height:200px}.ui-progressbar{height:2em;text-align:right}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-widget-header{background-color:#83b4d8;background-image:linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-o-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-moz-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-webkit-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-ms-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%)} diff --git a/assets/css/vendor/jquery-ui-fresh.min.css b/assets/css/vendor/jquery-ui-fresh.min.css new file mode 100755 index 00000000000..632e100373e --- /dev/null +++ b/assets/css/vendor/jquery-ui-fresh.min.css @@ -0,0 +1 @@ +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}/*\*/* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}/**/.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-widget{font-family:sans-serif;font-size:12px}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:sans-serif;font-size:1em}.ui-widget-content{border:1px solid #dfdfdf;background:#fff;color:#333}.ui-widget-header{border:1px solid #dfdfdf;color:#333;font-weight:bold;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #dfdfdf;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec);font-weight:normal;color:#333}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#333;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background-color:#ececec;background-image:-ms-linear-gradient(top,#ececec,#f9f9f9);background-image:-moz-linear-gradient(top,#ececec,#f9f9f9);background-image:-o-linear-gradient(top,#ececec,#f9f9f9);background-image:-webkit-gradient(linear,left top,left bottom,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#ececec,#f9f9f9);background-image:linear-gradient(top,#ececec,#f9f9f9);font-weight:normal;color:#000}.ui-state-hover a,.ui-state-hover a:hover{color:#000;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #dfdfdf;background:#fff;font-weight:normal;color:#333}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#333;text-decoration:none}.ui-widget :active{outline:0}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #e6db55;background:#ffffe0;color:#333}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#333}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #c00;background:#ffebe8;color:#c00}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#c00}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#c00}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-content .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-header .ui-icon{background-image:url(../images/ui-icons_999999_256x240.png)}.ui-state-default .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-active .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(../images/ui-icons_21759b_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(../images/ui-icons_cc0000_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-off{background-position:-96px -144px}.ui-icon-radio-on{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.ui-widget-overlay{background:#000;opacity:.6;filter:Alpha(Opacity=60)}.ui-widget-shadow{box-shadow:0 0 16px rgba(0,0,0,0.3)}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}.ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{position:fixed;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tabs .ui-tabs-hide{display:none!important}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-progressbar{height:2em;text-align:left}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-widget-header{background-color:#83b4d8;background-image:linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-o-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-moz-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-webkit-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-ms-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%)} \ No newline at end of file diff --git a/assets/images/admin-flyout-menu/edd-active.svg b/assets/images/admin-flyout-menu/edd-active.svg new file mode 100644 index 00000000000..c7d08f5c21c --- /dev/null +++ b/assets/images/admin-flyout-menu/edd-active.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/admin-flyout-menu/edd-default.svg b/assets/images/admin-flyout-menu/edd-default.svg new file mode 100644 index 00000000000..988c3424b55 --- /dev/null +++ b/assets/images/admin-flyout-menu/edd-default.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/edd-cpt-2x.png b/assets/images/edd-cpt-2x.png new file mode 100644 index 00000000000..89e8f5b0e0b Binary files /dev/null and b/assets/images/edd-cpt-2x.png differ diff --git a/assets/images/edd-cpt.png b/assets/images/edd-cpt.png new file mode 100644 index 00000000000..a59acb5c195 Binary files /dev/null and b/assets/images/edd-cpt.png differ diff --git a/assets/images/edd-cross-hair.png b/assets/images/edd-cross-hair.png new file mode 100755 index 00000000000..7cb88bb96a4 Binary files /dev/null and b/assets/images/edd-cross-hair.png differ diff --git a/assets/images/edd-icon-2x.png b/assets/images/edd-icon-2x.png new file mode 100644 index 00000000000..32572a702f7 Binary files /dev/null and b/assets/images/edd-icon-2x.png differ diff --git a/assets/images/edd-icon.png b/assets/images/edd-icon.png new file mode 100644 index 00000000000..be8b1e47bc4 Binary files /dev/null and b/assets/images/edd-icon.png differ diff --git a/assets/images/edd-logo-pdf.png b/assets/images/edd-logo-pdf.png new file mode 100644 index 00000000000..deb1c625496 Binary files /dev/null and b/assets/images/edd-logo-pdf.png differ diff --git a/assets/images/edd-logo-white-2x.png b/assets/images/edd-logo-white-2x.png new file mode 100644 index 00000000000..c6f0029d22b Binary files /dev/null and b/assets/images/edd-logo-white-2x.png differ diff --git a/assets/images/edd-logo.png b/assets/images/edd-logo.png new file mode 100644 index 00000000000..de288d045e6 Binary files /dev/null and b/assets/images/edd-logo.png differ diff --git a/assets/images/edd-logo.svg b/assets/images/edd-logo.svg new file mode 100644 index 00000000000..5b295c42929 --- /dev/null +++ b/assets/images/edd-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/edd-media.png b/assets/images/edd-media.png new file mode 100755 index 00000000000..34cbac61479 Binary files /dev/null and b/assets/images/edd-media.png differ diff --git a/assets/images/edd-peeking.png b/assets/images/edd-peeking.png new file mode 100644 index 00000000000..f6f6be09731 Binary files /dev/null and b/assets/images/edd-peeking.png differ diff --git a/assets/images/icons/edd-blue-checkmark.svg b/assets/images/icons/edd-blue-checkmark.svg new file mode 100644 index 00000000000..44ac69eebc6 --- /dev/null +++ b/assets/images/icons/edd-blue-checkmark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/icons/icon-arrow-down.png b/assets/images/icons/icon-arrow-down.png new file mode 100644 index 00000000000..2ef013c4ea3 Binary files /dev/null and b/assets/images/icons/icon-arrow-down.png differ diff --git a/assets/images/icons/icon-arrow-up.png b/assets/images/icons/icon-arrow-up.png new file mode 100644 index 00000000000..ac1f534c04e Binary files /dev/null and b/assets/images/icons/icon-arrow-up.png differ diff --git a/assets/images/icons/icon-automate.svg b/assets/images/icons/icon-automate.svg new file mode 100644 index 00000000000..74faa4376da --- /dev/null +++ b/assets/images/icons/icon-automate.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/assets/images/icons/icon-average.png b/assets/images/icons/icon-average.png new file mode 100644 index 00000000000..082f7a68a37 Binary files /dev/null and b/assets/images/icons/icon-average.png differ diff --git a/assets/images/icons/icon-bundle.svg b/assets/images/icons/icon-bundle.svg new file mode 100644 index 00000000000..bc9612df653 --- /dev/null +++ b/assets/images/icons/icon-bundle.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/icons/icon-chevron-down.svg b/assets/images/icons/icon-chevron-down.svg new file mode 100644 index 00000000000..ba51258c758 --- /dev/null +++ b/assets/images/icons/icon-chevron-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/icons/icon-edd-heart.svg b/assets/images/icons/icon-edd-heart.svg new file mode 100644 index 00000000000..6ac1679d213 --- /dev/null +++ b/assets/images/icons/icon-edd-heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/icons/icon-email-marketing.svg b/assets/images/icons/icon-email-marketing.svg new file mode 100644 index 00000000000..9d36f6a3610 --- /dev/null +++ b/assets/images/icons/icon-email-marketing.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/icons/icon-gateways.svg b/assets/images/icons/icon-gateways.svg new file mode 100644 index 00000000000..092aae04213 --- /dev/null +++ b/assets/images/icons/icon-gateways.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/icons/icon-gross.png b/assets/images/icons/icon-gross.png new file mode 100644 index 00000000000..0de9bee8940 Binary files /dev/null and b/assets/images/icons/icon-gross.png differ diff --git a/assets/images/icons/icon-install.svg b/assets/images/icons/icon-install.svg new file mode 100644 index 00000000000..da0cdc5ae7b --- /dev/null +++ b/assets/images/icons/icon-install.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/icons/icon-lead-magnets.svg b/assets/images/icons/icon-lead-magnets.svg new file mode 100644 index 00000000000..2a853d19784 --- /dev/null +++ b/assets/images/icons/icon-lead-magnets.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/images/icons/icon-megaphone.png b/assets/images/icons/icon-megaphone.png new file mode 100644 index 00000000000..152004e5111 Binary files /dev/null and b/assets/images/icons/icon-megaphone.png differ diff --git a/assets/images/icons/icon-net.png b/assets/images/icons/icon-net.png new file mode 100644 index 00000000000..f8bd82c7f80 Binary files /dev/null and b/assets/images/icons/icon-net.png differ diff --git a/assets/images/icons/icon-new-customers.png b/assets/images/icons/icon-new-customers.png new file mode 100644 index 00000000000..d4ec5e56f76 Binary files /dev/null and b/assets/images/icons/icon-new-customers.png differ diff --git a/assets/images/icons/icon-settings.svg b/assets/images/icons/icon-settings.svg new file mode 100644 index 00000000000..3ffd68b14b5 --- /dev/null +++ b/assets/images/icons/icon-settings.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/icons/icon-smiley.svg b/assets/images/icons/icon-smiley.svg new file mode 100644 index 00000000000..5d4495a2ea6 --- /dev/null +++ b/assets/images/icons/icon-smiley.svg @@ -0,0 +1 @@ + diff --git a/assets/images/icons/icon-subscriptions.svg b/assets/images/icons/icon-subscriptions.svg new file mode 100644 index 00000000000..0716178e104 --- /dev/null +++ b/assets/images/icons/icon-subscriptions.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/icons/icon-top-products.png b/assets/images/icons/icon-top-products.png new file mode 100644 index 00000000000..422c6337ba1 Binary files /dev/null and b/assets/images/icons/icon-top-products.png differ diff --git a/assets/images/icons/iphone.png b/assets/images/icons/iphone.png new file mode 100644 index 00000000000..265b7880bfd Binary files /dev/null and b/assets/images/icons/iphone.png differ diff --git a/assets/images/loading.gif b/assets/images/loading.gif new file mode 100755 index 00000000000..5e21ec18676 Binary files /dev/null and b/assets/images/loading.gif differ diff --git a/assets/images/logo-edd-dark.svg b/assets/images/logo-edd-dark.svg new file mode 100644 index 00000000000..6d831e773f3 --- /dev/null +++ b/assets/images/logo-edd-dark.svg @@ -0,0 +1,216 @@ + + + + diff --git a/assets/images/media-button.png b/assets/images/media-button.png new file mode 100755 index 00000000000..55ff62655d7 Binary files /dev/null and b/assets/images/media-button.png differ diff --git a/assets/images/onboarding/bob.jpg b/assets/images/onboarding/bob.jpg new file mode 100644 index 00000000000..db9c41d301f Binary files /dev/null and b/assets/images/onboarding/bob.jpg differ diff --git a/assets/images/onboarding/joe.jpg b/assets/images/onboarding/joe.jpg new file mode 100644 index 00000000000..1193ae6bcb4 Binary files /dev/null and b/assets/images/onboarding/joe.jpg differ diff --git a/assets/images/onboarding/nicolas.jpg b/assets/images/onboarding/nicolas.jpg new file mode 100644 index 00000000000..c81f3c71138 Binary files /dev/null and b/assets/images/onboarding/nicolas.jpg differ diff --git a/assets/images/onboarding/stripe-logo.svg b/assets/images/onboarding/stripe-logo.svg new file mode 100644 index 00000000000..37b894f9e83 --- /dev/null +++ b/assets/images/onboarding/stripe-logo.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + diff --git a/assets/images/promo/about/configuring-caching.svg b/assets/images/promo/about/configuring-caching.svg new file mode 100644 index 00000000000..7e16111b3c6 --- /dev/null +++ b/assets/images/promo/about/configuring-caching.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/promo/about/getting-started-welcome.svg b/assets/images/promo/about/getting-started-welcome.svg new file mode 100644 index 00000000000..0f5c260c7a4 --- /dev/null +++ b/assets/images/promo/about/getting-started-welcome.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/promo/about/how-to-install-activate.svg b/assets/images/promo/about/how-to-install-activate.svg new file mode 100644 index 00000000000..ac8b9194656 --- /dev/null +++ b/assets/images/promo/about/how-to-install-activate.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/promo/about/introduction-to-edd.svg b/assets/images/promo/about/introduction-to-edd.svg new file mode 100644 index 00000000000..b188fc588c3 --- /dev/null +++ b/assets/images/promo/about/introduction-to-edd.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/promo/about/using-edd-blocks.svg b/assets/images/promo/about/using-edd-blocks.svg new file mode 100644 index 00000000000..47d84eb7113 --- /dev/null +++ b/assets/images/promo/about/using-edd-blocks.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/promo/am-team.jpg b/assets/images/promo/am-team.jpg new file mode 100644 index 00000000000..39bf5b60891 Binary files /dev/null and b/assets/images/promo/am-team.jpg differ diff --git a/assets/images/promo/bfcm-header.svg b/assets/images/promo/bfcm-header.svg new file mode 100644 index 00000000000..c25fb608a27 --- /dev/null +++ b/assets/images/promo/bfcm-header.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/promo/brands/plugin-affwp.png b/assets/images/promo/brands/plugin-affwp.png new file mode 100644 index 00000000000..cda0cc14bac Binary files /dev/null and b/assets/images/promo/brands/plugin-affwp.png differ diff --git a/assets/images/promo/brands/plugin-aioseo.png b/assets/images/promo/brands/plugin-aioseo.png new file mode 100644 index 00000000000..3636ad5709b Binary files /dev/null and b/assets/images/promo/brands/plugin-aioseo.png differ diff --git a/assets/images/promo/brands/plugin-charitable.png b/assets/images/promo/brands/plugin-charitable.png new file mode 100644 index 00000000000..ec16b9e3f2d Binary files /dev/null and b/assets/images/promo/brands/plugin-charitable.png differ diff --git a/assets/images/promo/brands/plugin-duplicator.png b/assets/images/promo/brands/plugin-duplicator.png new file mode 100644 index 00000000000..e405e571b1e Binary files /dev/null and b/assets/images/promo/brands/plugin-duplicator.png differ diff --git a/assets/images/promo/brands/plugin-edd.png b/assets/images/promo/brands/plugin-edd.png new file mode 100644 index 00000000000..69d4c267b75 Binary files /dev/null and b/assets/images/promo/brands/plugin-edd.png differ diff --git a/assets/images/promo/brands/plugin-mi.png b/assets/images/promo/brands/plugin-mi.png new file mode 100644 index 00000000000..b9e4beddbd9 Binary files /dev/null and b/assets/images/promo/brands/plugin-mi.png differ diff --git a/assets/images/promo/brands/plugin-om.png b/assets/images/promo/brands/plugin-om.png new file mode 100644 index 00000000000..4c1232e03be Binary files /dev/null and b/assets/images/promo/brands/plugin-om.png differ diff --git a/assets/images/promo/brands/plugin-pushengage.png b/assets/images/promo/brands/plugin-pushengage.png new file mode 100644 index 00000000000..4a92d9de04d Binary files /dev/null and b/assets/images/promo/brands/plugin-pushengage.png differ diff --git a/assets/images/promo/brands/plugin-rp.png b/assets/images/promo/brands/plugin-rp.png new file mode 100644 index 00000000000..2c85a21328e Binary files /dev/null and b/assets/images/promo/brands/plugin-rp.png differ diff --git a/assets/images/promo/brands/plugin-sb-fb.png b/assets/images/promo/brands/plugin-sb-fb.png new file mode 100644 index 00000000000..5f60be127c2 Binary files /dev/null and b/assets/images/promo/brands/plugin-sb-fb.png differ diff --git a/assets/images/promo/brands/plugin-sb-instagram.png b/assets/images/promo/brands/plugin-sb-instagram.png new file mode 100644 index 00000000000..2940cf59b68 Binary files /dev/null and b/assets/images/promo/brands/plugin-sb-instagram.png differ diff --git a/assets/images/promo/brands/plugin-sb-twitter.png b/assets/images/promo/brands/plugin-sb-twitter.png new file mode 100644 index 00000000000..a05b020eefb Binary files /dev/null and b/assets/images/promo/brands/plugin-sb-twitter.png differ diff --git a/assets/images/promo/brands/plugin-sb-youtube.png b/assets/images/promo/brands/plugin-sb-youtube.png new file mode 100644 index 00000000000..e9e36616c18 Binary files /dev/null and b/assets/images/promo/brands/plugin-sb-youtube.png differ diff --git a/assets/images/promo/brands/plugin-searchwp.png b/assets/images/promo/brands/plugin-searchwp.png new file mode 100644 index 00000000000..e0faa75de8d Binary files /dev/null and b/assets/images/promo/brands/plugin-searchwp.png differ diff --git a/assets/images/promo/brands/plugin-seedprod.png b/assets/images/promo/brands/plugin-seedprod.png new file mode 100644 index 00000000000..b6d7f30e54c Binary files /dev/null and b/assets/images/promo/brands/plugin-seedprod.png differ diff --git a/assets/images/promo/brands/plugin-smtp.png b/assets/images/promo/brands/plugin-smtp.png new file mode 100644 index 00000000000..adcccd2210a Binary files /dev/null and b/assets/images/promo/brands/plugin-smtp.png differ diff --git a/assets/images/promo/brands/plugin-sugarcalendar.png b/assets/images/promo/brands/plugin-sugarcalendar.png new file mode 100644 index 00000000000..b5b426e22cb Binary files /dev/null and b/assets/images/promo/brands/plugin-sugarcalendar.png differ diff --git a/assets/images/promo/brands/plugin-trustpulse.png b/assets/images/promo/brands/plugin-trustpulse.png new file mode 100644 index 00000000000..d91063e5184 Binary files /dev/null and b/assets/images/promo/brands/plugin-trustpulse.png differ diff --git a/assets/images/promo/brands/plugin-wp-simple-pay.png b/assets/images/promo/brands/plugin-wp-simple-pay.png new file mode 100644 index 00000000000..9d14d6a3410 Binary files /dev/null and b/assets/images/promo/brands/plugin-wp-simple-pay.png differ diff --git a/assets/images/promo/brands/plugin-wpcode.png b/assets/images/promo/brands/plugin-wpcode.png new file mode 100644 index 00000000000..92eac13b243 Binary files /dev/null and b/assets/images/promo/brands/plugin-wpcode.png differ diff --git a/assets/images/promo/brands/plugin-wpf.png b/assets/images/promo/brands/plugin-wpf.png new file mode 100644 index 00000000000..901e3f7762e Binary files /dev/null and b/assets/images/promo/brands/plugin-wpf.png differ diff --git a/assets/images/promo/edd-25-percent-off.png b/assets/images/promo/edd-25-percent-off.png new file mode 100644 index 00000000000..6e131c81fa6 Binary files /dev/null and b/assets/images/promo/edd-25-percent-off.png differ diff --git a/assets/images/promo/icon-full.svg b/assets/images/promo/icon-full.svg new file mode 100644 index 00000000000..0865544d23a --- /dev/null +++ b/assets/images/promo/icon-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/promo/icon-none.svg b/assets/images/promo/icon-none.svg new file mode 100644 index 00000000000..9617560b0e9 --- /dev/null +++ b/assets/images/promo/icon-none.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/promo/icon-partial.svg b/assets/images/promo/icon-partial.svg new file mode 100644 index 00000000000..38881639a17 --- /dev/null +++ b/assets/images/promo/icon-partial.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/screenshots/17checkout.png b/assets/images/screenshots/17checkout.png new file mode 100644 index 00000000000..69edd6bed07 Binary files /dev/null and b/assets/images/screenshots/17checkout.png differ diff --git a/assets/images/screenshots/17direct.png b/assets/images/screenshots/17direct.png new file mode 100644 index 00000000000..e7fdfe76c7b Binary files /dev/null and b/assets/images/screenshots/17direct.png differ diff --git a/assets/images/screenshots/17quantities.png b/assets/images/screenshots/17quantities.png new file mode 100644 index 00000000000..2ffdca52509 Binary files /dev/null and b/assets/images/screenshots/17quantities.png differ diff --git a/assets/images/screenshots/18-button-colors.png b/assets/images/screenshots/18-button-colors.png new file mode 100644 index 00000000000..7626a8ce6bf Binary files /dev/null and b/assets/images/screenshots/18-button-colors.png differ diff --git a/assets/images/screenshots/18cart-saving.png b/assets/images/screenshots/18cart-saving.png new file mode 100644 index 00000000000..762820ef2d9 Binary files /dev/null and b/assets/images/screenshots/18cart-saving.png differ diff --git a/assets/images/screenshots/20-discount.png b/assets/images/screenshots/20-discount.png new file mode 100644 index 00000000000..04e49cedcf1 Binary files /dev/null and b/assets/images/screenshots/20-discount.png differ diff --git a/assets/images/screenshots/20-register-login.png b/assets/images/screenshots/20-register-login.png new file mode 100644 index 00000000000..0aa9f408ae6 Binary files /dev/null and b/assets/images/screenshots/20-register-login.png differ diff --git a/assets/images/screenshots/20-sequential.png b/assets/images/screenshots/20-sequential.png new file mode 100644 index 00000000000..5541c71de2b Binary files /dev/null and b/assets/images/screenshots/20-sequential.png differ diff --git a/assets/images/screenshots/20-unlimited-downloads.png b/assets/images/screenshots/20-unlimited-downloads.png new file mode 100644 index 00000000000..798d707a5ab Binary files /dev/null and b/assets/images/screenshots/20-unlimited-downloads.png differ diff --git a/assets/images/screenshots/22-logs.png b/assets/images/screenshots/22-logs.png new file mode 100644 index 00000000000..00171254bad Binary files /dev/null and b/assets/images/screenshots/22-logs.png differ diff --git a/assets/images/screenshots/22-purchased-downloads.png b/assets/images/screenshots/22-purchased-downloads.png new file mode 100644 index 00000000000..13c3c7e2c0a Binary files /dev/null and b/assets/images/screenshots/22-purchased-downloads.png differ diff --git a/assets/images/screenshots/22-purchased-downloads2.png b/assets/images/screenshots/22-purchased-downloads2.png new file mode 100644 index 00000000000..e2d5f02366a Binary files /dev/null and b/assets/images/screenshots/22-purchased-downloads2.png differ diff --git a/assets/images/screenshots/22-quantity.png b/assets/images/screenshots/22-quantity.png new file mode 100644 index 00000000000..cf9d6a2fb4f Binary files /dev/null and b/assets/images/screenshots/22-quantity.png differ diff --git a/assets/images/screenshots/24-category-earnings.png b/assets/images/screenshots/24-category-earnings.png new file mode 100644 index 00000000000..7690501ffbe Binary files /dev/null and b/assets/images/screenshots/24-category-earnings.png differ diff --git a/assets/images/screenshots/24-checkout.png b/assets/images/screenshots/24-checkout.png new file mode 100644 index 00000000000..1d24e226c45 Binary files /dev/null and b/assets/images/screenshots/24-checkout.png differ diff --git a/assets/images/screenshots/24-export.png b/assets/images/screenshots/24-export.png new file mode 100644 index 00000000000..44639130fa8 Binary files /dev/null and b/assets/images/screenshots/24-export.png differ diff --git a/assets/images/screenshots/26-customer.png b/assets/images/screenshots/26-customer.png new file mode 100644 index 00000000000..821e83b6eb6 Binary files /dev/null and b/assets/images/screenshots/26-customer.png differ diff --git a/assets/images/screenshots/26-import.png b/assets/images/screenshots/26-import.png new file mode 100644 index 00000000000..007bcae6092 Binary files /dev/null and b/assets/images/screenshots/26-import.png differ diff --git a/assets/images/screenshots/26-refund.png b/assets/images/screenshots/26-refund.png new file mode 100644 index 00000000000..6a838dda58f Binary files /dev/null and b/assets/images/screenshots/26-refund.png differ diff --git a/assets/images/screenshots/bundles.png b/assets/images/screenshots/bundles.png new file mode 100644 index 00000000000..61e0f1339db Binary files /dev/null and b/assets/images/screenshots/bundles.png differ diff --git a/assets/images/screenshots/customer-ui.png b/assets/images/screenshots/customer-ui.png new file mode 100644 index 00000000000..b3b0c99f859 Binary files /dev/null and b/assets/images/screenshots/customer-ui.png differ diff --git a/assets/images/screenshots/edit-download.png b/assets/images/screenshots/edit-download.png new file mode 100644 index 00000000000..df8aba4db76 Binary files /dev/null and b/assets/images/screenshots/edit-download.png differ diff --git a/assets/images/screenshots/email-template-21.png b/assets/images/screenshots/email-template-21.png new file mode 100644 index 00000000000..f3d548dbfe6 Binary files /dev/null and b/assets/images/screenshots/email-template-21.png differ diff --git a/assets/images/screenshots/grid.png b/assets/images/screenshots/grid.png new file mode 100644 index 00000000000..f9440bc03fe Binary files /dev/null and b/assets/images/screenshots/grid.png differ diff --git a/assets/images/screenshots/order-details.png b/assets/images/screenshots/order-details.png new file mode 100644 index 00000000000..89719c23219 Binary files /dev/null and b/assets/images/screenshots/order-details.png differ diff --git a/assets/images/screenshots/product-earnings.png b/assets/images/screenshots/product-earnings.png new file mode 100644 index 00000000000..ed22aac3194 Binary files /dev/null and b/assets/images/screenshots/product-earnings.png differ diff --git a/assets/images/screenshots/product-tax.png b/assets/images/screenshots/product-tax.png new file mode 100644 index 00000000000..46fc7f4d73c Binary files /dev/null and b/assets/images/screenshots/product-tax.png differ diff --git a/assets/images/screenshots/purchase-link.png b/assets/images/screenshots/purchase-link.png new file mode 100644 index 00000000000..30e1bbf32d5 Binary files /dev/null and b/assets/images/screenshots/purchase-link.png differ diff --git a/assets/images/screenshots/tax-rates.png b/assets/images/screenshots/tax-rates.png new file mode 100644 index 00000000000..5761d30f4b0 Binary files /dev/null and b/assets/images/screenshots/tax-rates.png differ diff --git a/assets/images/ui-icons_21759b_256x240.png b/assets/images/ui-icons_21759b_256x240.png new file mode 100644 index 00000000000..83bb123e006 Binary files /dev/null and b/assets/images/ui-icons_21759b_256x240.png differ diff --git a/assets/images/ui-icons_333333_256x240.png b/assets/images/ui-icons_333333_256x240.png new file mode 100755 index 00000000000..f4bf52bb950 Binary files /dev/null and b/assets/images/ui-icons_333333_256x240.png differ diff --git a/assets/images/ui-icons_999999_256x240.png b/assets/images/ui-icons_999999_256x240.png new file mode 100644 index 00000000000..14b5901b381 Binary files /dev/null and b/assets/images/ui-icons_999999_256x240.png differ diff --git a/assets/images/ui-icons_cc0000_256x240.png b/assets/images/ui-icons_cc0000_256x240.png new file mode 100755 index 00000000000..1b51f76d087 Binary files /dev/null and b/assets/images/ui-icons_cc0000_256x240.png differ diff --git a/assets/images/xit.gif b/assets/images/xit.gif new file mode 100755 index 00000000000..b11c5d43e9b Binary files /dev/null and b/assets/images/xit.gif differ diff --git a/assets/js/admin/components/advanced-filters/index.js b/assets/js/admin/components/advanced-filters/index.js new file mode 100644 index 00000000000..8d5eef6283c --- /dev/null +++ b/assets/js/admin/components/advanced-filters/index.js @@ -0,0 +1,52 @@ +/* global jQuery */ + +jQuery( document ).ready( function( $ ) { + + // when the 'More' button is clicked. + $( '.edd-advanced-filters-button' ).on( 'click', function( e ) { + e.preventDefault(); + + edd_toggle_advanced_order_filters(); + } ); + + // If a click event is triggered. + $( document ).on( 'click', function( e ) { + edd_maybe_toggle_advanced_order_filters( e.target ); + }); + + // If the Escape key is pressed. + $( document ).on( 'keydown', function( event ) { + const key = event.key; + if ( key === "Escape" ) { + edd_maybe_toggle_advanced_order_filters(); + } + }); +} ); + +/** + * Given a target, determine if we should toggle the advanced orders filter overlay. + * + * Determines if the target is the advanced order filters wrappr or an element within it, + * or in the event of a keypress (target = false), toggles the 'open' class. + * + * @param {event|boolean} target The target requested the possible toggle. + * @returns void + */ +function edd_maybe_toggle_advanced_order_filters( target = false) { + var advancedFiltersWrapper = $( '#edd-advanced-filters' ); + + if ( ! advancedFiltersWrapper.hasClass( 'open' ) ) { + return false; + } + + if ( false === target || ( ! advancedFiltersWrapper.is( target ) && ! advancedFiltersWrapper.has( target ).length ) ) { + edd_toggle_advanced_order_filters(); + } +} + +/** + * Toggles the 'open' class on the advanced order filters overlay. + */ +function edd_toggle_advanced_order_filters() { + $( '#edd-advanced-filters' ).toggleClass( 'open' ); +} diff --git a/assets/js/admin/components/chosen/index.js b/assets/js/admin/components/chosen/index.js new file mode 100644 index 00000000000..47162afbffc --- /dev/null +++ b/assets/js/admin/components/chosen/index.js @@ -0,0 +1,150 @@ +/* global _ */ + +/** + * Internal dependencies. + */ +import { getChosenVars } from 'utils/chosen.js'; + +jQuery( document ).ready( function( $ ) { + + // Globally apply to elements on the page. + $( '.edd-select-chosen' ).each( function() { + const el = $( this ); + el.chosen( getChosenVars( el ) ); + } ); + + $( '.edd-select-chosen .chosen-search input' ).each( function() { + // Bail if placeholder already set + if ( $( this ).attr( 'placeholder' ) ) { + return; + } + + const selectElem = $( this ).parent().parent().parent().prev( 'select.edd-select-chosen' ), + placeholder = selectElem.data( 'search-placeholder' ); + + if ( placeholder ) { + $( this ).attr( 'placeholder', placeholder ); + } + } ); + + // Add placeholders for Chosen input fields + $( '.chosen-choices' ).on( 'click', function() { + let placeholder = $( this ).parent().prev().data( 'search-placeholder' ); + if ( typeof placeholder === 'undefined' ) { + placeholder = edd_vars.type_to_search; + } + $( this ).children( 'li' ).children( 'input' ).attr( 'placeholder', placeholder ); + } ); + + // This fixes the Chosen box being 0px wide when the thickbox is opened + $( '#post' ).on( 'click', '.edd-thickbox', function() { + $( '.edd-select-chosen', '#choose-download' ).css( 'width', '100%' ); + } ); + + // Variables for setting up the typing timer + // Time in ms, Slow - 521ms, Moderate - 342ms, Fast - 300ms + let userInteractionInterval = 342, + typingTimerElements = '.edd-select-chosen .chosen-search input, .edd-select-chosen .search-field input', + typingTimer; + + // Replace options with search results + $( document.body ).on( 'keyup', typingTimerElements, _.debounce( function( e ) { + let element = $( this ), + val = element.val(), + container = element.closest( '.edd-select-chosen' ), + + select = container.prev(), + select_type = select.data( 'search-type' ), + no_bundles = container.hasClass( 'no-bundles' ), + variations = container.hasClass( 'variations' ), + variations_only = container.hasClass( 'variations-only' ), + current_id = container.hasClass( 'exclude-current' ) ? edd_vars.post_id : 0, + lastKey = e.which, + search_type = 'edd_download_search', + exclusions = select.data( 'excluded-products' ); + + // String replace the chosen container IDs + container.attr( 'id' ).replace( '_chosen', '' ); + + // Detect if we have a defined search type, otherwise default to downloads + if ( typeof select_type !== 'undefined' ) { + // Don't trigger AJAX if this select has all options loaded + if ( 'no_ajax' === select_type ) { + return; + } + + search_type = 'edd_' + select_type + '_search'; + } else { + return; + } + + // Don't fire if short or is a modifier key (shift, ctrl, apple command key, or arrow keys) + if ( + ( val.length <= 3 && 'edd_download_search' === search_type ) || + ( + lastKey === 16 || + lastKey === 13 || + lastKey === 91 || + lastKey === 17 || + lastKey === 37 || + lastKey === 38 || + lastKey === 39 || + lastKey === 40 + ) + ) { + container.children( '.spinner' ).remove(); + return; + } + + // Maybe append a spinner + if ( ! container.children( '.spinner' ).length ) { + container.append( '' ); + } + + $.ajax( { + type: 'GET', + dataType: 'json', + url: ajaxurl, + data: { + s: val, + action: search_type, + no_bundles: no_bundles, + variations: variations, + variations_only: variations_only, + current_id: current_id, + exclusions: exclusions, + }, + + beforeSend: function() { + select.closest( 'ul.chosen-results' ).empty(); + }, + + success: function( data ) { + // Remove all options but those that are selected + $( 'option:not(:selected)', select ).remove(); + + // Add any option that doesn't already exist + $.each( data, function( key, item ) { + if ( ! $( 'option[value="' + item.id + '"]', select ).length ) { + select.append( '' ); + } + } ); + + // Get the text immediately before triggering an update. + // Any sooner will cause the text to jump around. + const val = element.val(); + + // Update the options + select.trigger( 'chosen:updated' ); + + element.val( val ); + }, + } ).fail( function( response ) { + if ( window.console && window.console.log ) { + console.log( response ); + } + } ).done( function( response ) { + container.children( '.spinner' ).remove(); + } ); + }, userInteractionInterval ) ); +} ); diff --git a/assets/js/admin/components/date-picker/index.js b/assets/js/admin/components/date-picker/index.js new file mode 100644 index 00000000000..840cb5f756f --- /dev/null +++ b/assets/js/admin/components/date-picker/index.js @@ -0,0 +1,26 @@ +/** + * Date picker + * + * This juggles a few CSS classes to avoid styling collisions with other + * third-party plugins. + */ +jQuery( document ).ready( function( $ ) { + const edd_datepicker = $( 'input.edd_datepicker' ); + + if ( edd_datepicker.length > 0 ) { + edd_datepicker + + // Disable autocomplete to avoid it covering the calendar + .attr( 'autocomplete', 'off' ) + + // Invoke the datepickers + .datepicker( { + dateFormat: edd_vars.date_picker_format, + beforeShow: function() { + $( '#ui-datepicker-div' ) + .removeClass( 'ui-datepicker' ) + .addClass( 'edd-datepicker' ); + }, + } ); + } +} ); diff --git a/assets/js/admin/components/dialog/index.js b/assets/js/admin/components/dialog/index.js new file mode 100644 index 00000000000..cd77c05b489 --- /dev/null +++ b/assets/js/admin/components/dialog/index.js @@ -0,0 +1,12 @@ +jQuery( document ).ready( function ( $ ) { + /** + * If any jQueryUI Dialog instances exist with edd-dialog, + * instantiate them. Each instance will add their own buttons and handlers later. + */ + $('.edd-dialog').dialog({ + autoOpen: false, + modal: true, + draggable: false, + closeOnEscape: true, + }); +} ); diff --git a/assets/js/admin/components/location/index.js b/assets/js/admin/components/location/index.js new file mode 100644 index 00000000000..e9e6f8bd109 --- /dev/null +++ b/assets/js/admin/components/location/index.js @@ -0,0 +1,60 @@ +import { getChosenVars } from 'utils/chosen.js'; + +jQuery( document ).ready( function ( $ ) { + $( '.edd_countries_filter' ).on( 'change', function () { + const select = $( this ), + state_field = $( '.edd_regions_filter' ), + data = { + action: 'edd_get_shop_states', + country: select.val(), + nonce: select.data( 'nonce' ), + field_name: state_field.attr( 'name' ), + field_id: state_field.attr( 'id' ), + field_classes: 'edd_regions_filter', + }; + + $.post( ajaxurl, data, function ( response ) { + + // hot fix for settings page + if ( $( 'body' ).hasClass( 'download_page_edd-settings' ) ) { + // only on these 2 scenarios we have to setup the field + if ( ( 'nostates' === response && state_field.is( 'select' ) ) || ( 'nostates' !== response && state_field.is( 'input' ) ) ) { + let attributes = {}; + $.each( + state_field.get(0)?.attributes || [], + ( i, attr ) => { + if ( ! [ 'style', 'type'].includes( attr.name ) ) { + attributes[ attr.name ] = attr.value; + } + } + ) + + const parent = state_field.parent(); + let newStateField = ''; + + if ( state_field.is( 'select' ) ) { + state_field.chosen( 'destroy' ); + newStateField = $( '' ).attr( { ...attributes, ...{ type: 'text', placeholder: edd_vars.enter_region } } ); + } else { + newStateField = $( response ).attr( { ...attributes, ...{ 'data-placeholder': edd_vars.select_region } } ).addClass( 'edd-select-chosen' ); + } + + state_field.remove(); + parent.prepend( newStateField ); + $( 'select.edd_regions_filter' ).chosen( { ...getChosenVars( newStateField ) } ); + return; + } + } + + $( 'select.edd_regions_filter' ).find( 'option:gt(0)' ).remove(); + + if ( 'nostates' !== response ) { + $( response ).find( 'option:gt(0)' ).appendTo( 'select.edd_regions_filter' ); + } + + $( 'select.edd_regions_filter' ).trigger( 'chosen:updated' ); + } ); + + return false; + } ); +} ); diff --git a/assets/js/admin/components/navigation/index.js b/assets/js/admin/components/navigation/index.js new file mode 100644 index 00000000000..ddcce3370d5 --- /dev/null +++ b/assets/js/admin/components/navigation/index.js @@ -0,0 +1,36 @@ +const adminPage = document.querySelector( '.edd-admin-page' ); +let navWrapper = document.querySelector( '.edd-nav__wrapper' ); + +if ( adminPage ) { + + if ( navWrapper ) { + // Move the subtitle inside the navWrapper. + const subtitle = document.querySelector( '.subtitle:not(.edd-search-query)' ); + if ( subtitle ) { + navWrapper.appendChild( subtitle ); + } + } + + // Move the notices after the navWrapper. + const adminNotices = document.querySelectorAll( '.notice:not(.inline)' ); + if ( adminNotices ) { + setTimeout( () => { + if ( navWrapper ) { + const subNav = document.querySelector( '.edd-sub-nav__wrapper' ); + if ( subNav ) { + navWrapper = subNav; + } + const navWrapperParent = navWrapper.parentNode; + adminNotices.forEach( notice => { + navWrapperParent.insertBefore( notice, navWrapper.nextSibling ); + } ); + } + adminNotices.forEach( notice => { + // If the notice doesn't have the 'hidden' class, display it. + if ( ! notice.classList.contains( 'hidden' ) ) { + notice.style.display = 'block'; + } + } ); + }, 1000 ); + } +} diff --git a/assets/js/admin/components/promos/index.js b/assets/js/admin/components/promos/index.js new file mode 100644 index 00000000000..c94e7ab927b --- /dev/null +++ b/assets/js/admin/components/promos/index.js @@ -0,0 +1,110 @@ +/* global ajaxurl */ + +jQuery( document ).ready( function( $ ) { + + /** + * Show overlay notices on a delay. + */ + const overlayNotice = $( '.edd-admin-notice-overlay' ); + let overlayNoticeWrapper = $(); // empty jQuery object, so chaining still works + + if ( overlayNotice ) { + overlayNotice.wrap( '
' ); + overlayNoticeWrapper = overlayNotice.parent(); + + $( document ).on( 'click', '.edd-promo-notice__trigger', function () { + if ( $( this ).hasClass( 'edd-promo-notice__trigger--ajax' ) ) { + $.ajax( { + type: 'GET', + url: ajaxurl, + data: { + action: 'edd_get_promo_notice', + notice_id: $( this ).data( 'id' ), + product_id: $( this ).data( 'product' ), + value: $( this ).data( 'value' ), + }, + success: function ( response ) { + if ( response.data ) { + overlayNotice.html( response.data ); + // add a class to the overlay notice + overlayNoticeWrapper.addClass( 'edd-promo-notice__ajax' ); + } + triggerNoticeEnter( overlayNoticeWrapper ); + } + } ); + } else { + triggerNoticeEnter( overlayNoticeWrapper ); + } + } ); + } + + /** + * Dismiss notices + */ + $( '.edd-promo-notice' ).each( function() { + const notice = $( this ); + + notice.on( 'click', '.edd-promo-notice-dismiss', function( e ) { + // Only prevent default behavior for buttons, not links. + if ( ! $( this ).attr( 'href' ) ) { + e.preventDefault(); + } + + $.ajax( { + type: 'POST', + data: { + action: 'edd_dismiss_promo_notice', + notice_id: notice.data( 'id' ), + nonce: notice.data( 'nonce' ), + lifespan: notice.data( 'lifespan' ) + }, + url: ajaxurl, + success: function( response ) { + triggerNoticeDismiss( overlayNoticeWrapper.length ? overlayNoticeWrapper : notice ); + } + } ); + } ); + + $( document ).on( 'keydown', function ( event ) { + if ( !overlayNoticeWrapper.length ) { + return; + } + if ( 27 === event.keyCode ) { + triggerNoticeDismiss( overlayNoticeWrapper ); + } + } ); + } ); + + /** + * Show notice and trigger event + * + * @param {jQuery} el The notice element to show + */ + function triggerNoticeEnter( el ) { + // trigger native custom event as jQuery and Vanilla JS both can listen to it. + document.dispatchEvent( new CustomEvent( 'edd_promo_notice_enter', { detail: { notice: el } } ) ); + + el.css( 'display', 'flex' ).hide().fadeIn(); + } + + /** + * Dismiss notice and trigger event + * + * @param {jQuery} el The notice element to dismiss + */ + function triggerNoticeDismiss( el ) { + if ( ! el.is( ':visible' ) ) { + return; + } + + if ( el.is( overlayNoticeWrapper ) ) { + el.fadeOut(); + $( '.edd-extension-manager__key-notice' ).hide(); + } else { + el.slideUp(); + } + + // trigger native custom event as jQuery and Vanilla JS both can listen to it. + document.dispatchEvent( new CustomEvent( 'edd_promo_notice_dismiss', { detail: { notice: el } } ) ); + } +} ); diff --git a/assets/js/admin/components/range-slider/index.js b/assets/js/admin/components/range-slider/index.js new file mode 100644 index 00000000000..d51ec18cdb2 --- /dev/null +++ b/assets/js/admin/components/range-slider/index.js @@ -0,0 +1,36 @@ +/** + * Range Slider Init + * + * @param {string} selector + */ +export const edd_init_range_slider = function( selector ) { + + const min = selector.data( 'min' ) || 0; + const max = selector.data( 'max' ) || 100; + const value = selector.data( 'value' ) || 0; + + const updateSliderInputValue = ( e, ui ) => { + selector.siblings( '.edd-range__input' ).val( ui.value ); + }; + + selector.slider({ + min, + max, + value, + range: 'min', + animate: true, + slide: updateSliderInputValue, + change: updateSliderInputValue, + create: () => { + selector.siblings( '.edd-range__input' ).on( 'input change', function() { + selector.slider( 'value', $( this ).val() ); + }); + } + }); +}; + +jQuery( document ).ready( function( $ ) { + $( '.edd-range__slider' ).each( function() { + edd_init_range_slider( $( this ) ); + }); +} ); diff --git a/assets/js/admin/components/sortable-list/index.js b/assets/js/admin/components/sortable-list/index.js new file mode 100644 index 00000000000..4b12665b823 --- /dev/null +++ b/assets/js/admin/components/sortable-list/index.js @@ -0,0 +1,34 @@ +/** + * Sortables + * + * This makes certain settings sortable, and attempts to stash the results + * in the nearest .edd-order input value. + */ +jQuery( document ).ready( function( $ ) { + const edd_sortables = $( 'ul.edd-sortable-list' ); + + if ( edd_sortables.length > 0 ) { + edd_sortables.sortable( { + axis: 'y', + items: 'li', + cursor: 'move', + tolerance: 'pointer', + containment: 'parent', + distance: 2, + opacity: 0.7, + scroll: true, + + /** + * When sorting stops, assign the value to the previous input. + * This input should be a hidden text field + */ + stop: function() { + const keys = $.map( $( this ).children( 'li' ), function( el ) { + return $( el ).data( 'key' ); + } ); + + $( this ).prev( 'input.edd-order' ).val( keys ); + }, + } ); + } +} ); diff --git a/assets/js/admin/components/taxonomies/index.js b/assets/js/admin/components/taxonomies/index.js new file mode 100644 index 00000000000..bde84f5879b --- /dev/null +++ b/assets/js/admin/components/taxonomies/index.js @@ -0,0 +1,7 @@ +/* global jQuery */ + +jQuery( document ).ready( function ( $ ) { + if ( $( 'body' ).hasClass( 'taxonomy-download_category' ) || $( 'body' ).hasClass( 'taxonomy-download_tag' ) ) { + $( '.nav-tab-wrapper, .nav-tab-wrapper + br' ).detach().insertAfter( '.wp-header-end' ); + } +} ); diff --git a/assets/js/admin/components/tooltips/index.js b/assets/js/admin/components/tooltips/index.js new file mode 100644 index 00000000000..6242e319b2c --- /dev/null +++ b/assets/js/admin/components/tooltips/index.js @@ -0,0 +1,28 @@ +/** + * Attach tooltips + * + * @param {string} selector + */ +export const edd_attach_tooltips = function( selector ) { + selector.tooltip( { + content: function() { + return $( this ).prop( 'title' ); + }, + tooltipClass: 'edd-ui-tooltip', + position: { + my: 'bottom', + at: 'top-10', + collision: 'flipfit', + }, + hide: { + duration: 200, + }, + show: { + duration: 200, + }, + } ); +}; + +jQuery( document ).ready( function( $ ) { + edd_attach_tooltips( $( '.edd-help-tip' ) ); +} ); diff --git a/assets/js/admin/components/user-search/index.js b/assets/js/admin/components/user-search/index.js new file mode 100644 index 00000000000..3ef1fd80f2f --- /dev/null +++ b/assets/js/admin/components/user-search/index.js @@ -0,0 +1,69 @@ +jQuery( function ( $ ) { + // AJAX user search + $( '.edd-ajax-user-search' ) + + // Search + .on( 'keyup focus', function () { + let user_search = $( this ).val(), + exclude = ''; + + if ( $( this ).data( 'exclude' ) ) { + exclude = $( this ).data( 'exclude' ); + } + + $( '.edd_user_search_wrap' ).addClass( 'loading' ); + + const data = { + action: 'edd_search_users', + user_name: user_search, + exclude: exclude, + }; + + $.ajax( { + type: 'POST', + data: data, + dataType: 'json', + url: ajaxurl, + + success: function( search_response ) { + $( '.edd_user_search_wrap' ).removeClass( 'loading' ); + $( '.edd_user_search_results' ).removeClass( 'hidden' ); + $( '.edd_user_search_results span' ).html( '' ); + if ( search_response.results ) { + $( search_response.results ).appendTo( '.edd_user_search_results span' ); + } + }, + } ); + } ) + + // Hide + .on( 'blur', function () { + if ( edd_user_search_mouse_down ) { + edd_user_search_mouse_down = false; + } else { + $( this ).removeClass( 'loading' ); + $( '.edd_user_search_results' ).addClass( 'hidden' ); + } + } ); + + $( document.body ).on( 'click.eddSelectUser', '.edd_user_search_results span a', function( e ) { + e.preventDefault(); + const login = $( this ).data( 'login' ); + $( '.edd-ajax-user-search' ).val( login ); + $( '.edd_user_search_results' ).addClass( 'hidden' ); + $( '.edd_user_search_results span' ).html( '' ); + } ); + + $( document.body ).on( 'click.eddCancelUserSearch', '.edd_user_search_results a.edd-ajax-user-cancel', function( e ) { + e.preventDefault(); + $( '.edd-ajax-user-search' ).val( '' ); + $( '.edd_user_search_results' ).addClass( 'hidden' ); + $( '.edd_user_search_results span' ).html( '' ); + } ); + + // Cancel user-search.blur when picking a user + var edd_user_search_mouse_down = false; + $( '.edd_user_search_results' ).on( 'mousedown', function () { + edd_user_search_mouse_down = true; + } ); +} ); diff --git a/assets/js/admin/components/vertical-sections/index.js b/assets/js/admin/components/vertical-sections/index.js new file mode 100644 index 00000000000..9d4d5f5cc86 --- /dev/null +++ b/assets/js/admin/components/vertical-sections/index.js @@ -0,0 +1,61 @@ +jQuery( document ).ready( function( $ ) { + + const sectionSelector = '.edd-vertical-sections.use-js'; + // If the current screen doesn't have JS sections, return. + if ( 0 === $( sectionSelector ).length ) { + return; + } + + // Hides the section content. + $( `${ sectionSelector } .section-content` ).hide(); + + const hash = window.location.hash; + if ( hash && hash.includes( 'edd_' ) ) { + // Show the section content related to the URL. + $( sectionSelector ).find( hash ).show(); + + // Set the aria-selected for section titles to be false + $( `${ sectionSelector } .section-title` ).attr( 'aria-selected', 'false' ).removeClass( 'section-title--is-active' ); + + // Set aria-selected true on the related link. + $( sectionSelector ).find( '.section-title a[href="' + hash + '"]' ).parents( '.section-title' ).attr( 'aria-selected', 'true' ).addClass( 'section-title--is-active' ); + + } else { + // Shows the first section's content. + $( `${ sectionSelector } .section-content:first-child` ).show(); + + // Makes the 'aria-selected' attribute true for the first section nav item. + $( `${ sectionSelector } .section-nav li:first-child` ).attr( 'aria-selected', 'true' ).addClass( 'section-title--is-active' ); + } + + // When a section nav item is clicked. + $( `${ sectionSelector } .section-nav li a` ).on( 'click', + function( j ) { + // Prevent the default browser action when a link is clicked. + j.preventDefault(); + + // Get the `href` attribute of the item. + const them = $( this ), + href = them.attr( 'href' ), + rents = them.parents( '.edd-vertical-sections' ); + + // Hide all section content. + rents.find( '.section-content' ).hide(); + + // Find the section content that matches the section nav item and show it. + rents.find( href ).show(); + + // Set the `aria-selected` attribute to false for all section nav items. + rents.find( '.section-title' ).attr( 'aria-selected', 'false' ).removeClass( 'section-title--is-active' ); + + // Set the `aria-selected` attribute to true for this section nav item. + them.parent().attr( 'aria-selected', 'true' ).addClass( 'section-title--is-active' ); + + // Maybe re-Chosen + rents.find( 'div.chosen-container' ).css( 'width', '100%' ); + + // Add the current "link" to the page URL + window.history.pushState( 'object or string', '', href ); + } + ); // click() +} ); diff --git a/assets/js/admin/customers/index.js b/assets/js/admin/customers/index.js new file mode 100644 index 00000000000..9c9e990090b --- /dev/null +++ b/assets/js/admin/customers/index.js @@ -0,0 +1,139 @@ +/** + * Customer management screen JS + */ +var EDD_Customer = { + + vars: { + customer_card_wrap_editable: $( '#edit-customer-info .editable' ), + customer_card_wrap_edit_item: $( '#edit-customer-info .edit-item' ), + user_id: $( 'input[name="customerinfo[user_id]"]' ), + }, + init: function() { + this.edit_customer(); + this.add_email(); + this.user_search(); + this.remove_user(); + this.cancel_edit(); + this.change_country(); + this.delete_checked(); + }, + edit_customer: function() { + $( document.body ).on( 'click', '#edit-customer', function( e ) { + e.preventDefault(); + + EDD_Customer.vars.customer_card_wrap_editable.hide(); + EDD_Customer.vars.customer_card_wrap_edit_item.show().css( 'display', 'block' ); + } ); + }, + add_email: function() { + $( document.body ).on( 'click', '#add-customer-email', function( e ) { + e.preventDefault(); + const button = $( this ), + wrapper = button.parents( '.customer-section' ), + notice = wrapper.find( '.notice-wrap' ), + customer_id = wrapper.find( 'input[name="customer-id"]' ).val(), + email = wrapper.find( 'input[name="additional-email"]' ).val(), + primary = wrapper.find( 'input[name="make-additional-primary"]' ).is( ':checked' ), + nonce = wrapper.find( 'input[name="add_email_nonce"]' ).val(), + postData = { + edd_action: 'customer-add-email', + customer_id: customer_id, + email: email, + primary: primary, + _wpnonce: nonce, + }; + + notice.empty(); + button.attr( 'disabled', true ).addClass( 'updating-message' ); + + $.post( ajaxurl, postData, function( response ) { + setTimeout( function() { + if ( true === response.success ) { + window.location.href = response.redirect; + } else { + button.attr( 'disabled', false ).removeClass( 'updating-message' ); + notice.append( '

' + response.message + '

' ); + } + }, 342 ); + }, 'json' ); + } ); + }, + user_search: function() { + // Upon selecting a user from the dropdown, we need to update the User ID + $( document.body ).on( 'click.eddSelectUser', '.edd_user_search_results a', function( e ) { + e.preventDefault(); + const user_id = $( this ).data( 'userid' ); + EDD_Customer.vars.user_id.val( user_id ); + } ); + }, + remove_user: function() { + $( document.body ).on( 'click', '#disconnect-customer', function( e ) { + e.preventDefault(); + + if ( confirm( edd_vars.disconnect_customer ) ) { + const customer_id = $( 'input[name="customerinfo[id]"]' ).val(), + postData = { + edd_action: 'disconnect-userid', + customer_id: customer_id, + _wpnonce: $( '#edit-customer-info #_wpnonce' ).val(), + }; + + $.post( ajaxurl, postData, function( response ) { + // Weird + window.location.href = window.location.href; + }, 'json' ); + } + } ); + }, + cancel_edit: function() { + $( document.body ).on( 'click', '#edd-edit-customer-cancel', function( e ) { + e.preventDefault(); + EDD_Customer.vars.customer_card_wrap_edit_item.hide(); + EDD_Customer.vars.customer_card_wrap_editable.show(); + + $( '.edd_user_search_results' ).html( '' ); + } ); + }, + change_country: function() { + $( 'select[name="customerinfo[country]"]' ).on( 'change', function () { + const select = $( this ), + state_input = $( ':input[name="customerinfo[region]"]' ), + data = { + action: 'edd_get_shop_states', + country: select.val(), + nonce: select.data( 'nonce' ), + field_name: 'customerinfo[region]', + }; + + $.post( ajaxurl, data, function( response ) { + console.log( response ); + if ( 'nostates' === response ) { + state_input.replaceWith( '' ); + } else { + state_input.replaceWith( response ); + } + } ); + + return false; + } ); + }, + delete_checked: function() { + $( '#edd-customer-delete-confirm' ).on( 'change', function () { + const records_input = $( '#edd-customer-delete-records' ); + const submit_button = $( '#edd-delete-customer' ); + + if ( $( this ).prop( 'checked' ) ) { + records_input.attr( 'disabled', false ); + submit_button.attr( 'disabled', false ); + } else { + records_input.attr( 'disabled', true ); + records_input.prop( 'checked', false ); + submit_button.attr( 'disabled', true ); + } + } ); + }, +}; + +jQuery( document ).ready( function( $ ) { + EDD_Customer.init(); +} ); diff --git a/assets/js/admin/dashboard/index.js b/assets/js/admin/dashboard/index.js new file mode 100644 index 00000000000..55ab3c25394 --- /dev/null +++ b/assets/js/admin/dashboard/index.js @@ -0,0 +1,14 @@ +jQuery( document ).ready( function( $ ) { + if ( $( '#edd_dashboard_sales' ).length ) { + $.ajax( { + type: 'GET', + data: { + action: 'edd_load_dashboard_widget', + }, + url: ajaxurl, + success: function( response ) { + $( '#edd_dashboard_sales .edd-loading' ).html( response ); + }, + } ); + } +} ); diff --git a/assets/js/admin/discounts/generator.js b/assets/js/admin/discounts/generator.js new file mode 100644 index 00000000000..b5c72049160 --- /dev/null +++ b/assets/js/admin/discounts/generator.js @@ -0,0 +1,138 @@ +jQuery( ( $ ) => { + + let successTimeout; + + /** + * When an .edd-toggle is changed in #edd-generator-characters wrapper, if there is only + * one checked, make it readonly. + */ + $( '#edd-generator-characters .edd-toggle' ).on( 'change', function() { + const checked = $( '#edd-generator-characters .edd-toggle input:checked' ), + allInputs = $( '#edd-generator-characters .edd-toggle input' ); + + if ( 1 === checked.length ) { + checked.each( function() { + $( this ).attr( 'readonly', true ); + $( this ).attr( 'disabled', true ); + } ); + } else { + allInputs.each( function() { + $( this ).attr( 'readonly', false ); + $( this ).attr( 'disabled', false ); + } ); + } + } ); + + // When 'Generate' button is clicked, generate a new discount code. + $( '#edd-generate-code' ).on( 'click', function() { + + const hasLetters = $( '#generator-letters' ).is( ':checked' ); + const hasNumbers = $( '#generator-numbers' ).is( ':checked' ); + + if ( ! hasLetters && ! hasNumbers ) { + showPopupError( edd_vars.no_letters_or_numbers ); + return; + } + + if ( successTimeout ) { + clearTimeout( successTimeout ); + $( this ).removeClass( 'updated-message' ); + } + + hidePopupError(); + + $( this ).prop( 'disabled', true ).addClass( 'updating-message' ); + + $.ajax({ + url: ajaxurl, + method: 'POST', + data: { + action: 'edd_admin_generate_discount_code', + 'edd-discount-nonce': $( '[name="edd-discount-nonce"]' ).val(), + prefix: $( '#generator-prefix' ).val(), + limit: $( '#generator-length' ).val(), + letters: hasLetters, + numbers: hasNumbers, + }, + success: ( response ) => { + if ( response.success ) { + $( '#edd-code' ).val( response.data.code ); + $( this ).addClass( 'updated-message' ); + + successTimeout = setTimeout( () => { + $( this ).removeClass( 'updated-message' ); + }, 1000); + } else { + showPopupError( response.data.message ); + } + }, + error: ( error ) => { + showPopupError( error.responseJSON ?? error.responseText ); + }, + complete: () => { + $( this ).prop( 'disabled', false ).removeClass( 'updating-message' ); + } + }); + }); + + $( '.edd-popup-trigger.disabled' ).on( 'mouseover', function() { + $( this ).parent().next( '.edd-code-generator-popup' ).show(); + } ); + + /** + * This prevents hovering over a child element from triggering the mouseout, and hiding the popup prematurely. + */ + $( '.edd-popup-trigger.disabled' ).on( 'mouseout', function() { + return; + } ); + + $( document ) + .on( 'focus', ':input', function() { + if ( isPopupBoundary( $( this ) ) ) { + return; + } + hidePopup( $( '.edd-code-generator-popup' ) ); + }) + .on( 'click touchstart', function(e) { + const target = $( e.target ).closest( '.edd-popup-trigger' ).length ? $( '.edd-popup-trigger' ) : $( e.target ) ; + + if ( target.is( '.edd-popup-trigger' ) ) { + target.parent().next( '.edd-code-generator-popup' ).toggle(); + return; + } + + if ( ! isPopupBoundary( target ) ) { + hidePopup( $( '.edd-code-generator-popup' ) ); + } + }) + .keyup( function( e ) { + if ( e.keyCode === 27 ) { + hidePopup( $( '.edd-code-generator-popup' ) ); + } + }); +}); + +const hidePopup = () => { + const popup = $( '.edd-code-generator-popup' ); + + popup.hide(); + hidePopupError( popup ); +}; + +const isPopupBoundary = ( target ) => { + return !! target.closest( '.edd-code-generator-popup' ).length; +}; + +const showPopupError = ( message ) => { + const errorElement = $( '
' ).addClass( 'notice notice-error' ).append( $( '

' ).text( message ) ); + errorElement.insertBefore( '#edd-generate-code' ); +} + +const hidePopupError = ( popupElement = false ) => { + if ( ! popupElement ) { + popupElement = $( '.edd-code-generator-popup:not(.hidden)' ); + } + + popupElement.find('.notice').remove(); + popupElement.css( 'margin-top', 0 ); +}; diff --git a/assets/js/admin/discounts/index.js b/assets/js/admin/discounts/index.js new file mode 100644 index 00000000000..8f3233363ad --- /dev/null +++ b/assets/js/admin/discounts/index.js @@ -0,0 +1,27 @@ +/** + * Internal dependencies. + */ +import { jQueryReady } from 'utils/jquery.js'; +import './generator'; + +/** + * DOM ready. + */ +jQueryReady( () => { + const products = $( '#edd_products' ); + const categories = $( '#edd_categories' ); + if ( !products && !categories ) { + return; + } + + /** + * Show/hide conditions based on input value. + */ + products.on( 'change', function () { + $( '#edd-discount-product-conditions' ).toggle( !!products.val().length ); + } ); + + categories.on( 'change', function () { + $( '#edd-discount-category-conditions' ).toggle( !!categories.val().length ); + } ); +} ); diff --git a/assets/js/admin/downloads/bulk-edit.js b/assets/js/admin/downloads/bulk-edit.js new file mode 100644 index 00000000000..a106136236d --- /dev/null +++ b/assets/js/admin/downloads/bulk-edit.js @@ -0,0 +1,18 @@ +jQuery( document ).ready( function( $ ) { + $( 'body' ).on( 'click', '#the-list .editinline', function() { + let post_id = $( this ).closest( 'tr' ).attr( 'id' ); + + post_id = post_id.replace( 'post-', '' ); + + const $edd_inline_data = $( '#post-' + post_id ); + + const regprice = $edd_inline_data.find( '.column-price .downloadprice-' + post_id ).val(); + + // If variable priced product disable editing, otherwise allow price changes + if ( regprice !== $( '#post-' + post_id + '.column-price .downloadprice-' + post_id ).val() ) { + $( '.regprice', '#edd-download-data' ).val( regprice ).attr( 'disabled', false ); + } else { + $( '.regprice', '#edd-download-data' ).val( edd_vars.quick_edit_warning ).attr( 'disabled', 'disabled' ); + } + } ); +} ); diff --git a/assets/js/admin/downloads/editor.js b/assets/js/admin/downloads/editor.js new file mode 100644 index 00000000000..0a061d6008e --- /dev/null +++ b/assets/js/admin/downloads/editor.js @@ -0,0 +1,42 @@ +/** + * Prevents Downloads post type protected meta from being saved. + * + * @url https://github.com/awesomemotive/easy-digital-downloads-pro/issues/725 + * @since 3.2.3 + */ +const preventDownloadsProtectedMetaSave = () => { + + // Add a middleware to WP API Fetch. So it will handle before any api request. + wp.apiFetch.use( + ( options, next ) => { + + // retrieve post type config to get api base. + const downloadConfig = wp.data.select( 'core' ).getEntityConfig( 'postType', 'download' ); + // current request path. + const path = options?.path; + + // if current request path and download api base path is same process the request and remove protected meta. + if ( downloadConfig && path && path.indexOf( downloadConfig.baseURL ) === 0 ) { + + const metas = options?.data?.meta || {}; + + if ( Object.keys( metas ).length ) { + const newMetas = {}; + for ( const [ key, value ] of Object.entries( metas ) ) { + // remove any meta which starts with _edd. + if ( key.indexOf( '_edd' ) !== 0 ) { + newMetas[ key ] = value; + } + } + options.data.meta = newMetas; + } + } + + const result = next( options ); + return result; + } + ) + +} + +wp.domReady( preventDownloadsProtectedMetaSave ); diff --git a/assets/js/admin/downloads/index.js b/assets/js/admin/downloads/index.js new file mode 100644 index 00000000000..998684f2157 --- /dev/null +++ b/assets/js/admin/downloads/index.js @@ -0,0 +1,444 @@ +/** + * Internal dependencies. + */ +import { getChosenVars } from 'utils/chosen.js'; +import { edd_attach_tooltips } from 'admin/components/tooltips'; +import './bulk-edit.js'; + +/** + * Download Configuration Metabox + */ +var EDD_Download_Configuration = { + init: function() { + this.add(); + this.move(); + this.remove(); + this.type(); + this.prices(); + this.files(); + this.updatePrices(); + this.showAdvanced(); + }, + clone_repeatable: function( row ) { + // Retrieve the highest current key + let key = 1; + let highest = 1; + row.parent().find( '.edd_repeatable_row' ).each( function() { + const current = $( this ).data( 'key' ); + if ( parseInt( current ) > highest ) { + highest = current; + } + } ); + key = highest += 1; + + const clone = row.clone(); + + clone.removeClass( 'edd_add_blank' ); + + clone.attr( 'data-key', key ); + clone.find( 'input, select, textarea' ).val( '' ).each( function() { + let elem = $( this ), + name = elem.attr( 'name' ), + id = elem.attr( 'id' ); + + if ( name ) { + name = name.replace( /\[(\d+)\]/, '[' + parseInt( key ) + ']' ); + elem.attr( 'name', name ); + } + + elem.attr( 'data-key', key ); + + if ( typeof id !== 'undefined' ) { + id = id.replace( /(\d+)/, parseInt( key ) ); + elem.attr( 'id', id ); + } + } ); + + /** manually update any select box values */ + clone.find( 'select' ).each( function() { + $( this ).val( row.find( 'select[name="' + $( this ).attr( 'name' ) + '"]' ).val() ); + } ); + + /** manually uncheck any checkboxes */ + clone.find( 'input[type="checkbox"]' ).each( function() { + // Make sure checkboxes are unchecked when cloned + const checked = $( this ).is( ':checked' ); + if ( checked ) { + $( this ).prop( 'checked', false ); + } + + // reset the value attribute to 1 in order to properly save the new checked state + $( this ).val( 1 ); + } ); + + clone.find( 'span.edd_price_id' ).each( function() { + $( this ).text( parseInt( key ) ); + } ); + + clone.find( 'input.edd_repeatable_index' ).each( function() { + $( this ).val( parseInt( $( this ).data( 'key' ) ) ); + } ); + + clone.find( 'span.edd_file_id' ).each( function() { + $( this ).text( parseInt( key ) ); + } ); + + clone.find( '.edd_repeatable_default_input' ).each( function() { + $( this ).val( parseInt( key ) ).removeAttr( 'checked' ); + } ); + + clone.find( '.edd_repeatable_condition_field' ).each( function() { + $( this ).find( 'option:eq(0)' ).prop( 'selected', 'selected' ); + } ); + + clone.find( 'label' ).each( function () { + var labelFor = $( this ).attr( 'for' ); + if ( labelFor ) { + $( this ).attr( 'for', labelFor.replace( /(\d+)/, parseInt( key ) ) ); + } + } ); + + // Remove Chosen elements + clone.find( '.search-choice' ).remove(); + clone.find( '.chosen-container' ).remove(); + edd_attach_tooltips( clone.find( '.edd-help-tip' ) ); + + return clone; + }, + + add: function() { + $( document.body ).on( 'click', '.edd_add_repeatable', function( e ) { + e.preventDefault(); + + const button = $( this ), + row = button.closest( '.edd_repeatable_table' ).find( '.edd_repeatable_row' ).last(), + clone = EDD_Download_Configuration.clone_repeatable( row ); + + clone.insertAfter( row ).find( 'input, textarea, select' ).filter( ':visible' ).eq( 0 ).focus(); + + // Setup chosen fields again if they exist + EDD_Download_Configuration.initChosen( clone ); + } ); + }, + + move: function() { + $( '.edd_repeatable_table .edd-repeatables-wrap' ).sortable( { + axis: 'y', + handle: '.edd-draghandle-anchor', + items: '.edd_repeatable_row', + cursor: 'move', + tolerance: 'pointer', + containment: 'parent', + distance: 2, + opacity: 0.7, + scroll: true, + + update: function() { + let count = 0; + $( this ).find( '.edd_repeatable_row' ).each( function() { + $( this ).find( 'input.edd_repeatable_index' ).each( function() { + $( this ).val( count ); + } ); + count++; + } ); + }, + start: function( e, ui ) { + ui.placeholder.height( ui.item.height() - 2 ); + }, + } ); + }, + + remove: function() { + $( document.body ).on( 'click', '.edd-remove-row, .edd_remove_repeatable', function( e ) { + e.preventDefault(); + + let row = $( this ).parents( '.edd_repeatable_row' ), + count = row.parent().find( '.edd_repeatable_row' ).length, + type = $( this ).data( 'type' ), + repeatable = 'div.edd_repeatable_' + type + 's', + focusElement, + focusable, + firstFocusable; + + // Set focus on next element if removing the first row. Otherwise set focus on previous element. + if ( $( this ).is( '.ui-sortable .edd_repeatable_row:first-child .edd-remove-row, .ui-sortable .edd_repeatable_row:first-child .edd_remove_repeatable' ) ) { + focusElement = row.next( '.edd_repeatable_row' ); + } else { + focusElement = row.prev( '.edd_repeatable_row' ); + } + + focusable = focusElement.find( 'select, input, textarea, button' ).filter( ':visible' ); + firstFocusable = focusable.eq( 0 ); + + if ( type === 'price' ) { + const price_row_id = row.data( 'key' ); + /** remove from price condition */ + $( '.edd_repeatable_condition_field option[value="' + price_row_id + '"]' ).remove(); + } + + if ( count > 1 ) { + $( 'input, select', row ).val( '' ); + row.fadeOut( 'fast' ).remove(); + firstFocusable.focus(); + } else { + switch ( type ) { + case 'price' : + alert( edd_vars.one_price_min ); + break; + case 'file' : + $( 'input, select', row ).val( '' ); + break; + default: + alert( edd_vars.one_field_min ); + break; + } + } + + /* re-index after deleting */ + $( repeatable ).each( function( rowIndex ) { + $( this ).find( 'input, select' ).each( function() { + let name = $( this ).attr( 'name' ); + name = name.replace( /\[(\d+)\]/, '[' + rowIndex + ']' ); + $( this ).attr( 'name', name ).attr( 'id', name ); + } ); + } ); + } ); + }, + + type: function() { + const product_files = $( '#edd_product_files' ); + setTimeout( function () { + if ( !edd_vars.download_has_files && 'service' === $( '#_edd_product_type' ).val() ) { + product_files.hide(); + } + }, 100 ); + $( document.body ).on( 'change', '#_edd_product_type', function( e ) { + const product_type = $( this ).val(), + edd_download_limit_wrap = $( '#edd_download_limit_wrap' ); + + product_files.addClass( 'ajax--loading' ); + let data = { + action: 'edd_swap_download_type', + product_type: product_type, + post_id: edd_vars.post_id, + } + $.post( ajaxurl, data, function ( response ) { + if ( response.success ) { + product_files.find( '.inside' ).empty().append( response.data.html ); + EDD_Download_Configuration.initChosen( product_files ); + } + product_files.removeClass( 'ajax--loading' ); + } ); + + if ( 'bundle' === product_type ) { + product_files.show(); + edd_download_limit_wrap.hide(); + } else if ( 'service' === $( this ).val() ) { + const has_files = product_files.find( '.edd_upload_field' ).toArray().some( el => !!el.value ); + if ( !has_files ) { + // Hide the product files after a brief timeout to override All Access. + setTimeout( function () { + product_files.hide(); + }, 100 ); + edd_download_limit_wrap.hide(); + } else { + product_files.show(); + edd_download_limit_wrap.show(); + } + } else { + product_files.show(); + edd_download_limit_wrap.show(); + } + } ); + }, + + prices: function() { + $( document.body ).on( 'change', '#edd_variable_pricing', function( e ) { + const checked = $( this ).is( ':checked' ), + single = $( '#edd_regular_price_field' ), + variable = $( '#edd_variable_price_fields, .edd_repeatable_table .pricing' ), + bundleRow = $( '.edd-bundled-product-row, .edd-repeatable-row-standard-fields' ); + + if ( checked ) { + single.hide(); + variable.show(); + bundleRow.addClass( 'has-variable-pricing' ); + } else { + single.show(); + variable.hide(); + bundleRow.removeClass( 'has-variable-pricing' ); + } + } ); + }, + + files: function() { + var file_frame; + window.formfield = ''; + + $( document.body ).on( 'click', '.edd_upload_file_button', function( e ) { + e.preventDefault(); + + const button = $( this ); + + window.formfield = button.closest( '.edd_repeatable_upload_wrapper' ); + + // If the media frame already exists, reopen it. + if ( file_frame ) { + file_frame.open(); + return; + } + + // Create the media frame. + file_frame = wp.media.frames.file_frame = wp.media( { + title: button.data( 'uploader-title' ), + frame: 'post', + state: 'insert', + button: { text: button.data( 'uploader-button-text' ) }, + multiple: $( this ).data( 'multiple' ) === '0' ? false : true, // Set to true to allow multiple files to be selected + } ); + + file_frame.on( 'menu:render:default', function( view ) { + // Store our views in an object. + const views = {}; + + // Unset default menu items + view.unset( 'library-separator' ); + view.unset( 'gallery' ); + view.unset( 'featured-image' ); + view.unset( 'embed' ); + view.unset( 'playlist' ); + view.unset( 'video-playlist' ); + + // Initialize the views in our view object. + view.set( views ); + } ); + + // When an image is selected, run a callback. + file_frame.on( 'insert', function() { + const selection = file_frame.state().get( 'selection' ); + selection.each( function( attachment, index ) { + attachment = attachment.toJSON(); + + let selectedSize = 'image' === attachment.type ? $( '.attachment-display-settings .size option:selected' ).val() : false, + selectedURL = attachment.url, + selectedName = attachment.title.length > 0 ? attachment.title : attachment.filename; + + if ( selectedSize && typeof attachment.sizes[ selectedSize ] !== 'undefined' ) { + selectedURL = attachment.sizes[ selectedSize ].url; + } + + if ( 'image' === attachment.type ) { + if ( selectedSize && typeof attachment.sizes[ selectedSize ] !== 'undefined' ) { + selectedName = selectedName + '-' + attachment.sizes[ selectedSize ].width + 'x' + attachment.sizes[ selectedSize ].height; + } else { + selectedName = selectedName + '-' + attachment.width + 'x' + attachment.height; + } + } + + if ( 0 === index ) { + // place first attachment in field + window.formfield.find( '.edd_repeatable_attachment_id_field' ).val( attachment.id ); + window.formfield.find( '.edd_repeatable_thumbnail_size_field' ).val( selectedSize ); + window.formfield.find( '.edd_repeatable_upload_field' ).val( selectedURL ); + window.formfield.find( '.edd_repeatable_name_field' ).val( selectedName ); + } else { + // Create a new row for all additional attachments + const row = window.formfield, + clone = EDD_Download_Configuration.clone_repeatable( row ); + + clone.find( '.edd_repeatable_attachment_id_field' ).val( attachment.id ); + clone.find( '.edd_repeatable_thumbnail_size_field' ).val( selectedSize ); + clone.find( '.edd_repeatable_upload_field' ).val( selectedURL ); + clone.find( '.edd_repeatable_name_field' ).val( selectedName ); + clone.insertAfter( row ); + } + } ); + } ); + + // Finally, open the modal + file_frame.open(); + } ); + + // @todo Break this out and remove jQuery. + $( '.edd_repeatable_upload_field' ) + .on( 'focus', function() { + const input = $( this ); + + input.data( 'originalFile', input.val() ); + } ) + .on( 'change', function() { + const input = $( this ); + const originalFile = input.data( 'originalFile' ); + + if ( originalFile !== input.val() ) { + input + .closest( '.edd-repeatable-row-standard-fields' ) + .find( '.edd_repeatable_attachment_id_field' ) + .val( 0 ); + } + } ); + + var file_frame; + window.formfield = ''; + }, + + updatePrices: function() { + $( '#edd_price_fields' ).on( 'keyup', '.edd_variable_prices_name', function() { + const key = $( this ).parents( '.edd_repeatable_row' ).data( 'key' ), + name = $( this ).val(), + field_option = $( '.edd_repeatable_condition_field option[value=' + key + ']' ); + + if ( field_option.length > 0 ) { + field_option.text( name ); + } else { + $( '.edd_repeatable_condition_field' ).append( + $( '' ) + .attr( 'value', key ) + .text( name ) + ); + } + } ); + }, + + showAdvanced: function() { + // Toggle display of entire custom settings section for a price option + $( document.body ).on( 'click', '.toggle-custom-price-option-section', function( e ) { + e.preventDefault(); + + const toggle = $( this ), + show = toggle.html() === edd_vars.show_advanced_settings ? + true : + false; + + if ( show ) { + toggle.html( edd_vars.hide_advanced_settings ); + } else { + toggle.html( edd_vars.show_advanced_settings ); + } + + const header = toggle.parents( '.edd-repeatable-row-header' ); + header.siblings( '.edd-custom-price-option-sections-wrap' ).slideToggle(); + + let first_input; + if ( show ) { + first_input = $( ':input:not(input[type=button],input[type=submit],button):visible:first', header.siblings( '.edd-custom-price-option-sections-wrap' ) ); + } else { + first_input = $( ':input:not(input[type=button],input[type=submit],button):visible:first', header.siblings( '.edd-repeatable-row-standard-fields' ) ); + } + first_input.focus(); + } ); + }, + + initChosen: function ( element ) { + element.find( '.edd-select-chosen' ).each( function () { + const el = $( this ); + el.chosen( getChosenVars( el ) ); + } ); + element.find( '.edd-select-chosen' ).css( 'width', '100%' ); + element.find( '.edd-select-chosen .chosen-search input' ).attr( 'placeholder', edd_vars.search_placeholder ); + } +}; + +jQuery( document ).ready( function( $ ) { + EDD_Download_Configuration.init(); +} ); diff --git a/assets/js/admin/emails/editor/index.js b/assets/js/admin/emails/editor/index.js new file mode 100644 index 00000000000..481172017a1 --- /dev/null +++ b/assets/js/admin/emails/editor/index.js @@ -0,0 +1,4 @@ +import './recipient.js'; +import './reset.js'; +import './submit.js'; +import './listener.js'; diff --git a/assets/js/admin/emails/editor/listener.js b/assets/js/admin/emails/editor/listener.js new file mode 100644 index 00000000000..f7e3cff4ce9 --- /dev/null +++ b/assets/js/admin/emails/editor/listener.js @@ -0,0 +1,15 @@ +// Listen for any changes to the email editor and set a flag to warn the user if they try to leave the page without saving. +document.addEventListener( 'DOMContentLoaded', function () { + var inputs = document.querySelectorAll( 'input, textarea' ); + for ( var i = 0; i < inputs.length; i++ ) { + inputs[ i ].addEventListener( 'change', function () { + window.onbeforeunload = function () { + return true; + }; + } ); + } + // Remove the warning if the user saves the email. + document.getElementById( 'submit' ).addEventListener( 'click', function () { + window.onbeforeunload = null; + } ); +} ); diff --git a/assets/js/admin/emails/editor/recipient.js b/assets/js/admin/emails/editor/recipient.js new file mode 100644 index 00000000000..a397eb9dd2e --- /dev/null +++ b/assets/js/admin/emails/editor/recipient.js @@ -0,0 +1,21 @@ +; ( function ( document, $ ) { + 'use strict'; + + const recipient = $( '.edd-email__recipient' ); + if ( recipient.length ) { + const custom = $( '.edd-email__recipient--custom' ), + admin = $( '.edd-email__recipient--admin' ); + recipient.on( 'change', function ( e ) { + if ( 'default' === e.target.value ) { + custom.hide(); + admin.show(); + } else if ( 'custom' === e.target.value ) { + custom.show(); + admin.hide(); + } else { + custom.hide(); + admin.hide(); + } + } ); + } +} )( document, jQuery ); diff --git a/assets/js/admin/emails/editor/reset.js b/assets/js/admin/emails/editor/reset.js new file mode 100644 index 00000000000..c2d93fc2811 --- /dev/null +++ b/assets/js/admin/emails/editor/reset.js @@ -0,0 +1,49 @@ +const reset = document.getElementById( 'edd-email-reset' ); +if ( reset ) { + reset.addEventListener( 'click', e => { + e.preventDefault(); + + // disable the button and add updating-message class + reset.classList.remove( 'button-primary' ); + reset.classList.add( 'updating-message' ); + reset.disabled = true; + + // do an ajax call to reset the email settings + const data = { + action: 'edd_reset_email', + nonce: EDDAdminEmails.nonce, + email_id: reset.dataset.email + }; + fetch( EDDAdminEmails.ajaxurl, { + method: 'POST', + credentials: 'same-origin', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + body: new URLSearchParams( data ) + } ) + .then( response => response.json() ) + .then( response => { + if ( response.success ) { + const editor = tinymce.get( 'edd-email-content' ), + textArea = document.getElementById( 'edd-email-content' ); + if ( editor ) { + editor.setContent( response.data.content ); + } + textArea.value = response.data.content; + document.querySelector( '.edd-promo-notice-dismiss' ).click(); + reset.classList.remove( 'updating-message' ); + reset.classList.add( 'button-primary', 'updated-message' ); + } + } ) + .catch( error => { + console.error( error ); + } ); + } ); + + // Wait for the promo notice to be dismissed to re-enable the button. + document.addEventListener( 'edd_promo_notice_dismiss', e => { + reset.classList.remove( 'updated-message' ); + reset.disabled = false; + } ); +} diff --git a/assets/js/admin/emails/editor/submit.js b/assets/js/admin/emails/editor/submit.js new file mode 100644 index 00000000000..629ebfe00cb --- /dev/null +++ b/assets/js/admin/emails/editor/submit.js @@ -0,0 +1,17 @@ +document.querySelectorAll( '.edd-email-status-badge' ).forEach( function ( el ) { + setTimeout( function () { + if ( ! el.classList.contains( 'edd-hidden' ) ) { + el.classList.add( 'edd-fadeout' ); + } + }, 5000 ); +} ); + +document.getElementById( 'submit' ).addEventListener( 'click', function ( event ) { + document.querySelectorAll( '.edd-email-status-badge' ).forEach( function ( el ) { + if ( !el.classList.contains( 'edd-hidden' ) ) { + el.remove(); + } else { + el.classList.remove( 'edd-hidden' ); + } + } ); +} ); diff --git a/assets/js/admin/emails/list-table/index.js b/assets/js/admin/emails/list-table/index.js new file mode 100644 index 00000000000..a38e135abaf --- /dev/null +++ b/assets/js/admin/emails/list-table/index.js @@ -0,0 +1,3 @@ +import './list-table'; +import './new-email'; +import './status'; diff --git a/assets/js/admin/emails/list-table/list-table.js b/assets/js/admin/emails/list-table/list-table.js new file mode 100644 index 00000000000..fadbb3f7749 --- /dev/null +++ b/assets/js/admin/emails/list-table/list-table.js @@ -0,0 +1,121 @@ +/** + * Email filtering. + */ +const statusFilter = document.getElementById( 'edd-email-status-filter' ); +const recipientFilter = document.getElementById( 'edd-email-recipient-filter' ); +const senderFilter = document.getElementById( 'edd-email-sender-filter' ); +const contextFilter = document.getElementById( 'edd-email-context-filter' ); +const clearFilters = document.getElementById( 'edd-email-clear-filters' ); +const noItemsFound = document.getElementById( 'no-items' ); + +if ( statusFilter ) { + statusFilter.addEventListener( 'change', updateEmailFilters ); +} +if ( recipientFilter ) { + recipientFilter.addEventListener( 'change', updateEmailFilters ); +} +if ( senderFilter ) { + senderFilter.addEventListener( 'change', updateEmailFilters ); +} +if ( contextFilter ) { + contextFilter.addEventListener( 'change', updateEmailFilters ); +} + +/** + * Updates the table to only show emails that match the filters. + * + * @since 2.7 + * + * @param e + */ +function updateEmailFilters ( e ) { + const tableRows = document.querySelectorAll( 'table.email_templates tbody tr:not(#no-items)' ); + + if ( !tableRows || !( statusFilter || recipientFilter || senderFilter ) ) { + return; + } + + const chosenStatus = statusFilter ? statusFilter.value : '', + chosenRecipient = recipientFilter ? recipientFilter.value : '', + chosenSender = senderFilter ? senderFilter.value : '', + chosenContext = contextFilter ? contextFilter.value : ''; + + clearFilters.style.display = 'none'; + if ( chosenStatus || chosenRecipient || chosenSender || chosenContext ) { + clearFilters.style.display = 'inline-block'; + } + + tableRows.forEach( tableRow => { + // Always show the row by default, because it's easier to start that way. + tableRow.style = ''; + tableRow.classList.remove( 'edd-hidden', 'alternate' ); + + if ( chosenStatus && chosenStatus !== tableRow.getAttribute( 'data-status' ) ) { + hideRow( tableRow ); + } + + if ( chosenRecipient && chosenRecipient !== tableRow.getAttribute( 'data-recipient' ) ) { + hideRow( tableRow ); + } + + if ( chosenSender && chosenSender !== tableRow.getAttribute( 'data-sender' ) ) { + hideRow( tableRow ); + } + + if ( chosenContext && chosenContext !== tableRow.getAttribute( 'data-context' ) ) { + hideRow( tableRow ); + } + } ); + + // If there are no rows with data-type="item" visible, then toggle the "no items found" message. + let visibleRows = document.querySelectorAll( '[data-type="item"]:not(.edd-hidden)' ); + updateRowClass( visibleRows ); + if ( visibleRows.length === 0 ) { + noItemsFound.style = 'table-row'; + } else { + noItemsFound.style.display = 'none'; + } +} + +/** + * Hides a table row and any associated extra content row. + * + * @param {HTMLElement} tableRow - The table row element to hide. + */ +function hideRow( tableRow ) { + tableRow.style.display = 'none'; + tableRow.classList.add( 'edd-hidden' ); +} + +/** + * Updates the row class of elements. + * + * @param {Array} elements - The elements to update the row class for. + */ +function updateRowClass( elements ) { + elements.forEach( ( element, index ) => { + if ( index % 2 === 0 ) { + element.classList.add( 'alternate' ); + } + } ); +} + +if ( clearFilters ) { + clearFilters.addEventListener( 'click', e => { + e.preventDefault(); + if ( statusFilter ) { + statusFilter.value = ''; + } + if ( recipientFilter ) { + recipientFilter.value = ''; + } + if ( senderFilter ) { + senderFilter.value = ''; + } + + if ( contextFilter ) { + contextFilter.value = ''; + } + updateEmailFilters(); + } ); +} diff --git a/assets/js/admin/emails/list-table/new-email.js b/assets/js/admin/emails/list-table/new-email.js new file mode 100644 index 00000000000..b711052dec6 --- /dev/null +++ b/assets/js/admin/emails/list-table/new-email.js @@ -0,0 +1,43 @@ +const newEmail = document.getElementById( 'edd-emails__add' ); +const overlay = document.querySelector( '.edd-emails__add-new__overlay' ); +if ( newEmail ) { + newEmail.addEventListener( 'click', e => { + e.preventDefault(); + + // if the overlay has a display:none, remove the style + if ( overlay.style.display === 'none' ) { + overlay.removeAttribute( 'style' ); + } else { + overlay.style.display = 'none'; + } + } ); + + document.addEventListener( 'click', e => { + if ( newEmail === e.target || overlay.style.display === 'none' ) { + return; + } + if ( overlay.style.display !== 'none' ) { + setTimeout( function () { + if ( !e.target.closest( '.edd-emails__add-new' ) && !e.target.closest( '.edd-emails__add-new__overlay' ) ) { + overlay.style.display = 'none'; + } + }, 100 ); + } + } ); +} + +const addNewEmail = document.querySelectorAll( 'button.edd-emails__add-new' ); +if ( addNewEmail ) { + addNewEmail.forEach( addNewEmail => { + addNewEmail.addEventListener( 'click', e => { + e.preventDefault(); + if ( !addNewEmail.classList.contains( 'edd-promo-notice__trigger' ) ) { + window.location.href = EDDAdminEmails.link + '&email=' + addNewEmail.getAttribute( 'data-value' ); + } else { + setTimeout( function () { + overlay.style.display = 'none'; + }, 5000 ); + } + } ); + } ); +} diff --git a/assets/js/admin/emails/list-table/status.js b/assets/js/admin/emails/list-table/status.js new file mode 100644 index 00000000000..467a26b9f24 --- /dev/null +++ b/assets/js/admin/emails/list-table/status.js @@ -0,0 +1,61 @@ +/* global EDDAdminEmails */ + +; ( function ( document, $ ) { + 'use strict'; + + $( '.edd-email-manager__action' ).on( 'click', function ( e ) { + e.preventDefault(); + + const $btn = $( this ), + action = $btn.attr( 'data-action' ); + + let removeClass = '', + addClass = '', + replaceAction = '', + replaceStatus = ''; + + if ( $btn.attr( 'disabled' ) ) { + return; + } + + switch ( action ) { + case 'enable': + addClass = 'edd-button-toggle--active'; + replaceAction = 'disable'; + replaceStatus = 'inactive'; + break; + + case 'disable': + removeClass = 'edd-button-toggle--active'; + replaceAction = 'enable'; + replaceStatus = 'active'; + break; + + default: + return; + } + + $btn.attr( 'disabled', true ).addClass( 'edd-updating' ); + + const data = { + action: 'edd_update_email_status', + nonce: EDDAdminEmails.nonce, + email_id: $btn.attr( 'data-id' ), + status: $btn.attr( 'data-status' ), + button: action, + }; + + $.post( EDDAdminEmails.ajaxurl, data ) + .done( function ( res ) { + if ( EDDAdminEmails.debug ) { + console.log( res ); + } + $btn.attr( 'disabled', false ).removeClass( 'edd-updating' ); + if ( res.success ) { + $btn.removeClass( removeClass ).addClass( addClass ); + $btn.attr( 'data-action', replaceAction ); + $btn.attr( 'data-status', replaceStatus ); + } + } ); + } ); +} )( document, jQuery ); diff --git a/assets/js/admin/flyout/index.js b/assets/js/admin/flyout/index.js new file mode 100644 index 00000000000..cf35cf2431a --- /dev/null +++ b/assets/js/admin/flyout/index.js @@ -0,0 +1,98 @@ +// Flyout Menu. +import {domReady} from 'utils/dom'; + +var EDD_Flyout = { + flyoutMenu: null, + wpfooter: null, + overlap: null, + init: function() { + // Flyout Menu Elements. + this.flyoutMenu = document.getElementById('edd-flyout'); + + if (!this.flyoutMenu) { + return; + } + + var head = document.getElementById('edd-flyout-button'), + edd = head.querySelector('img'), + items = document.getElementById('edd-flyout-items'), + menu = { + state: 'inactive', + srcInactive: edd.getAttribute('src'), + srcActive: edd.dataset.active, + }; + + // Click on the menu head icon. + head.addEventListener('click', (e) => { + e.preventDefault(); + + if (menu.state === 'active') { + this.flyoutMenu.classList.remove('opened'); + edd.setAttribute('src', menu.srcInactive); + menu.state = 'inactive'; + items.classList.remove('active'); + } else { + this.flyoutMenu.classList.add('opened'); + edd.setAttribute('src', menu.srcActive); + menu.state = 'active'; + items.classList.add('active'); + } + }); + + // Page elements and other values. + this.wpfooter = document.getElementById('wpfooter'); + + if (!this.wpfooter) { + return; + } + + // If we run into pages that need to have this disabled, we can add them here. + //this.overlap = document.querySelectorAll('#target-selector'); + this.overlap = {}; + + // Hide menu if scrolled down to the bottom of the page. + window.addEventListener('resize', this.handleScroll.bind(this)); + + window.addEventListener('scroll', () => this.debounce(this.handleScroll.bind(this), 50)); + + window.addEventListener('load', this.handleScroll.bind(this)); + + document.addEventListener( 'edd_promo_notice_enter', () => this.flyoutMenu.classList.add('out') ); + document.addEventListener( 'edd_promo_notice_dismiss', () => setTimeout( this.flyoutMenu.classList.remove('out'), 500 ) ); + }, + handleScroll: function() { + if ( this.overlap.length < 1 ) { + return; + } + + var wpfooterTop = this.wpfooter.offsetTop, + wpfooterBottom = wpfooterTop + this.wpfooter.offsetHeight, + overlapBottom = this.overlap.length > 0 ? this.overlap[0].offsetTop + this.overlap[0].offsetHeight + 85 : 0, + viewTop = window.scrollY, + viewBottom = viewTop + window.innerHeight; + + if (wpfooterBottom <= viewBottom && wpfooterTop >= viewTop && overlapBottom > viewBottom) { + this.flyoutMenu.classList.add('out'); + } else { + this.flyoutMenu.classList.remove('out'); + } + }, + debounce: function(func, wait, immediate) { + var timeout; + return function () { + var context = this, + args = arguments; + var later = function () { + timeout = null; + if (!immediate) func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + } + } +} +domReady(function() { + EDD_Flyout.init(); +}) diff --git a/assets/js/admin/index.js b/assets/js/admin/index.js new file mode 100755 index 00000000000..4ec92c0b23d --- /dev/null +++ b/assets/js/admin/index.js @@ -0,0 +1,18 @@ +/** + * Internal dependencies. + */ +import './components/date-picker'; +import './components/dialog'; +import './components/chosen'; +import './components/tooltips'; +import './components/vertical-sections'; +import './components/sortable-list'; +import './components/user-search'; +import './components/advanced-filters'; +import './components/taxonomies'; +import './components/location'; +import './components/promos'; +import './components/range-slider'; +import './components/navigation'; +// Note: This is not common across all admin pages and at some point this code will be moved to a new file that only loads on the orders table page. +import './orders/list-table'; diff --git a/assets/js/admin/notes/index.js b/assets/js/admin/notes/index.js new file mode 100644 index 00000000000..7594c9474ab --- /dev/null +++ b/assets/js/admin/notes/index.js @@ -0,0 +1,134 @@ +/** + * Notes + */ +const EDD_Notes = { + init: function() { + this.enter_key(); + this.add_note(); + this.remove_note(); + }, + + enter_key: function() { + $( document.body ).on( 'keydown', '#edd-note', function( e ) { + if ( e.keyCode === 13 && ( e.metaKey || e.ctrlKey ) ) { + e.preventDefault(); + $( '#edd-add-note' ).click(); + } + } ); + }, + + /** + * Ajax handler for adding new notes + * + * @since 3.0 + */ + add_note: function() { + $( '#edd-add-note' ).on( 'click', function( e ) { + e.preventDefault(); + + const edd_button = $( this ), + edd_note = $( '#edd-note' ), + edd_notes = $( '.edd-notes' ), + edd_no_notes = $( '.edd-no-notes' ), + edd_spinner = $( '.edd-add-note .spinner' ), + edd_note_nonce = $( '#edd_note_nonce' ); + + const postData = { + action: 'edd_add_note', + nonce: edd_note_nonce.val(), + object_id: edd_button.data( 'object-id' ), + object_type: edd_button.data( 'object-type' ), + note: edd_note.val(), + }; + + if ( postData.note ) { + edd_button.prop( 'disabled', true ); + edd_spinner.css( 'visibility', 'visible' ); + + $.ajax( { + type: 'POST', + data: postData, + url: ajaxurl, + success: function( response ) { + let res = wpAjax.parseAjaxResponse( response ); + res = res.responses[ 0 ]; + + edd_notes.append( res.data ); + edd_no_notes.hide(); + edd_button.prop( 'disabled', false ); + edd_spinner.css( 'visibility', 'hidden' ); + edd_note.val( '' ); + }, + } ).fail( function( data ) { + if ( window.console && window.console.log ) { + console.log( data ); + } + edd_button.prop( 'disabled', false ); + edd_spinner.css( 'visibility', 'hidden' ); + } ); + } else { + const border_color = edd_note.css( 'border-color' ); + + edd_note.css( 'border-color', 'red' ); + + setTimeout( function() { + edd_note.css( 'border-color', border_color ); + }, userInteractionInterval ); + } + } ); + }, + + /** + * Ajax handler for deleting existing notes + * + * @since 3.0 + */ + remove_note: function() { + $( document.body ).on( 'click', '.edd-delete-note', function( e ) { + e.preventDefault(); + + const edd_link = $( this ), + edd_notes = $( '.edd-note' ), + edd_note = edd_link.parents( '.edd-note' ), + edd_no_notes = $( '.edd-no-notes' ), + edd_note_nonce = $( '#edd_note_nonce' ); + + if ( confirm( edd_vars.delete_note ) ) { + const postData = { + action: 'edd_delete_note', + nonce: edd_note_nonce.val(), + note_id: edd_link.data( 'note-id' ), + }; + + edd_note.addClass( 'deleting' ); + + $.ajax( { + type: 'POST', + data: postData, + url: ajaxurl, + success: function( response ) { + if ( '1' === response ) { + edd_note.remove(); + } + + if ( edd_notes.length === 1 ) { + edd_no_notes.show(); + } + + return false; + }, + } ).fail( function( data ) { + if ( window.console && window.console.log ) { + console.log( data ); + } + edd_note.removeClass( 'deleting' ); + } ); + return true; + } + } ); + }, +}; + +jQuery( document ).ready( function( $ ) { + EDD_Notes.init(); +} ); diff --git a/assets/js/admin/notices/index.js b/assets/js/admin/notices/index.js new file mode 100644 index 00000000000..807e7aefb20 --- /dev/null +++ b/assets/js/admin/notices/index.js @@ -0,0 +1,28 @@ +/** + * Deletes the debug log file and disables logging. + */ +; ( function ( document, $ ) { + 'use strict'; + + $( '#edd-disable-debug-log' ).on( 'click', function ( e ) { + e.preventDefault(); + $( this ).attr( 'disabled', true ); + var notice = $( '#edd-debug-log-notice' ); + $.ajax( { + type: "GET", + data: { + action: 'edd_disable_debugging', + nonce: $( '#edd_debug_log_delete' ).val(), + }, + url: ajaxurl, + success: function ( response ) { + notice.empty().append( response.data ); + setTimeout( function () { + notice.slideUp(); + }, 3000 ); + } + } ).fail( function ( response ) { + notice.empty().append( response.responseJSON.data ); + } ); + } ); +} )( document, jQuery ); diff --git a/assets/js/admin/notifications/index.js b/assets/js/admin/notifications/index.js new file mode 100644 index 00000000000..88c44f0e962 --- /dev/null +++ b/assets/js/admin/notifications/index.js @@ -0,0 +1,125 @@ +/* global edd_vars */ + +document.addEventListener( 'alpine:init', () => { + Alpine.store( 'eddNotifications', { + isPanelOpen: false, + notificationsLoaded: false, + numberActiveNotifications: 0, + activeNotifications: [], + inactiveNotifications: [], + + init: function() { + const eddNotifications = this; + + /* + * The bubble starts out hidden until AlpineJS is initialized. Once it is, we remove + * the hidden class. This prevents a flash of the bubble's visibility in the event that there + * are no notifications. + */ + const notificationCountBubble = document.querySelector( '#edd-notification-button .edd-number' ); + if ( notificationCountBubble ) { + notificationCountBubble.classList.remove( 'edd-hidden' ); + } + + document.addEventListener( 'keydown', function( e ) { + if ( e.key === 'Escape' ) { + eddNotifications.closePanel(); + } + } ); + + const params = new URLSearchParams( window.location.search ); + + const triggerNotifications = params.has( 'notifications' ); + if ( triggerNotifications && 'true' === params.get( 'notifications' ) ) { + eddNotifications.openPanel(); + } + }, + + openPanel: function() { + const panelHeader = document.getElementById( 'edd-notifications-header' ); + + if ( this.notificationsLoaded ) { + this.isPanelOpen = true; + if ( panelHeader ) { + setTimeout( function() { + panelHeader.focus(); + } ); + } + + return; + } + + this.isPanelOpen = true; + + this.apiRequest( '/notifications', 'GET' ) + .then( data => { + this.activeNotifications = data.active; + this.inactiveNotifications = data.dismissed; + this.notificationsLoaded = true; + + if ( panelHeader ) { + panelHeader.focus(); + } + } ) + .catch( error => { + console.log( 'Notification error', error ); + } ); + }, + + closePanel: function() { + if ( ! this.isPanelOpen ) { + return; + } + + this.isPanelOpen = false; + + const notificationButton = document.getElementById( 'edd-notification-button' ); + if ( notificationButton ) { + notificationButton.focus(); + } + }, + + apiRequest: function( endpoint, method ) { + return fetch( edd_vars.restBase + endpoint, { + method: method, + credentials: 'same-origin', + headers: { + 'Content-Type': 'application/json', + 'X-WP-Nonce': edd_vars.restNonce + } + } ).then( response => { + if ( ! response.ok ) { + return Promise.reject( response ); + } + + /* + * Returning response.text() instead of response.json() because dismissing + * a notification doesn't return a JSON response, so response.json() will break. + */ + return response.text(); + //return response.json(); + } ).then( data => { + return data ? JSON.parse( data ) : null; + } ); + } , + + dismiss: function( event, index ) { + if ( 'undefined' === typeof this.activeNotifications[ index ] ) { + return; + } + + event.target.disabled = true; + + const notification = this.activeNotifications[ index ]; + + this.apiRequest( '/notifications/' + notification.id, 'DELETE' ) + .then( response => { + this.activeNotifications.splice( index, 1 ); + this.numberActiveNotifications = this.activeNotifications.length; + } ) + .catch( error => { + console.log( 'Dismiss error', error ); + } ); + } + } ); +} ); diff --git a/assets/js/admin/onboarding/index.js b/assets/js/admin/onboarding/index.js new file mode 100644 index 00000000000..ff54bd32e61 --- /dev/null +++ b/assets/js/admin/onboarding/index.js @@ -0,0 +1,770 @@ +/** + * Onboarding Wizard. + */ + +/** + * Internal dependencies + */ +import { edd_attach_tooltips as setup_tooltips } from 'admin/components/tooltips'; + +var EDD_Onboarding = { + + vars: { + nonce: '', + }, + + /** + * Run when page is loaded + * to initialize logic. + * + * @since 3.1 + * + */ + init: function() { + EDD_Onboarding.vars.nonce = $( '#_wpnonce' ).val(); + + this.init_step_buttons(); + this.init_upload_buttons(); + this.start_onboarding(); + + // Run current step logic. + let current_step = EDD_Onboarding.get_step_class( $( '.edd-onboarding_current-step' ).val() ); + if ( current_step ) { + EDD_Onboarding[ current_step ].init(); + } + }, + + /** + * Toggle the loading overlay. + * + * @since 3.1 + * + * @param {bool} state True to show the loader, false to hide it. + */ + loading_state: function( state ) { + $( '.edd-onboarding__loading-status' ).empty(); + $( '.edd-onboarding__loading' ).toggle( state ); + $( '.edd-onboarding' ).toggleClass( 'edd-onboarding__loading-in-progress', state ); + }, + + /** + * Attach listeners to the control buttons. + * + * @since 3.1 + * + */ + init_step_buttons: function() { + // Go back button. + $( document.body ).on( 'click', '.edd-onboarding__button-back', function( e ) { + e.preventDefault(); + EDD_Onboarding.load_step( $( '.edd-onboarding_current-previous-step' ).val() ); + } ); + + // Skip step button. + $( document.body ).on( 'click', '.edd-onboarding__button-skip-step', function( e ) { + e.preventDefault(); + EDD_Onboarding.next_step( true ); + } ); + + // Save button. + $( document.body ).on( 'click', '.edd-onboarding__button-save-step', function( e ) { + e.preventDefault(); + let step_class = EDD_Onboarding.get_step_class( $( '.edd-onboarding_current-step' ).val() ); + if ( step_class ) { + EDD_Onboarding[ step_class ].save().then( function() { + EDD_Onboarding.next_step(); + } ); + } + } ); + + // Close and exit. + $( document.body ).on( 'click', '.edd-onboarding__dismiss', function ( e ) { + EDD_Onboarding.onboarding_skipped( true, e.target ); + } ); + }, + + /** + * Upload image buttons. + * + * @since 3.1 + * + */ + init_upload_buttons: function() { + let file_frame; + window.form_upload_field = false; + $( document.body ).on( 'click', '.edd_settings_upload_button', function( e ) { + e.preventDefault(); + + const button = $( this ); + + window.form_upload_field = $( button.data('input') ); + + // If the media frame already exists, reopen it. + if ( file_frame ) { + //file_frame.uploader.uploader.param( 'post_id', set_to_post_id ); + file_frame.open(); + return; + } + + // Create the media frame. + file_frame = wp.media.frames.file_frame = wp.media( { + title: button.data( 'uploader_title' ), + library: { type: 'image' }, + button: { text: button.data( 'uploader_button_text' ) }, + multiple: false, + } ); + + file_frame.on( 'menu:render:default', function( view ) { + // Store our views in an object. + const views = {}; + + // Unset default menu items + view.unset( 'library-separator' ); + view.unset( 'gallery' ); + view.unset( 'featured-image' ); + view.unset( 'embed' ); + view.unset( 'playlist' ); + view.unset( 'video-playlist' ); + + // Initialize the views in our view object. + view.set( views ); + } ); + + // When an image is selected, run a callback. + file_frame.on( 'select', function() { + const selection = file_frame.state().get( 'selection' ); + selection.each( function( attachment, index ) { + attachment = attachment.toJSON(); + window.form_upload_field.val( attachment.url ); + // Check if we have a field for attachment ID connected to this upload button. + if ( window.form_upload_field.data( 'attachment-id-field' ) ) { + $( window.form_upload_field.data( 'attachment-id-field' ) ).val( attachment.id ); + } + } ); + } ); + + // Finally, open the modal + file_frame.open(); + } ); + }, + + /** + * Attach listeners for when + * user starts its onboarding process. + * + * @since 3.1 + * + */ + start_onboarding: function() { + $( document.body ).on( 'click', '.edd-onboarding__welcome-screen-get-started', function( e ) { + e.preventDefault(); + EDD_Onboarding.loading_state( true ); + + var postData = { + action: 'edd_onboarding_started', + page: 'edd-onboarding-wizard', + _wpnonce: EDD_Onboarding.vars.nonce, + }; + $.post( + ajaxurl, + postData, + function() { + $( '.edd-onboarding__welcome-screen' ).hide(); + $( '.edd-onboarding__steps, .edd-onboarding__after-welcome-screen, .edd-onboarding__close-and-exit' ).show(); + EDD_Onboarding.loading_state( false ); + } + ); + + } ); + }, + + /** + * Mark the Onboarding process + * as completed and redirect user. + * + * @since 3.1 + * + */ + onboarding_completed: function( redirect ) { + EDD_Onboarding.loading_state( true ); + + var postData = { + action: 'edd_onboarding_completed', + page: 'edd-onboarding-wizard', + _wpnonce: EDD_Onboarding.vars.nonce, + }; + return $.post( + ajaxurl, + postData, + function() { + if ( redirect ) { + window.location = $( '#edd-onboarding__exit' ).val(); + } + } + ); + }, + + + /** + * Mark the Onboarding process + * as skipped and redirect user. + * + * @since 3.1 + * + */ + onboarding_skipped: function ( redirect, target ) { + if ( !target.classList.contains( 'edd-promo-notice-dismiss' ) ) { + EDD_Onboarding.loading_state( true ); + } + + var postData = { + action: 'edd_onboarding_skipped', + page: 'edd-onboarding-wizard', + _wpnonce: EDD_Onboarding.vars.nonce, + }; + return $.post( + ajaxurl, + postData, + function() { + if ( redirect ) { + window.location = $( '#edd-onboarding__exit' ).val(); + } + } + ); + }, + + + /** + * Fetch the HTML for a specific + * requested step and load it onto screen. + * + * @since 3.1 + * + * @param {string} step_name Step name. + */ + load_step: function( step_name ) { + EDD_Onboarding.loading_state( true ); + + $.ajax( { + type: 'GET', + dataType: 'html', + url: ajaxurl, + data: { + action: 'edd_onboarding_load_step', + page: 'edd-onboarding-wizard', + current_step: step_name, + _wpnonce: EDD_Onboarding.vars.nonce, + }, + success: function( data ) { + // Replace step screen. + $( '.edd-onboarding__current-step' ).html( data ); + + // Run step specific logic. + let step_class = EDD_Onboarding.get_step_class( step_name ); + if ( step_class ) { + EDD_Onboarding[ step_class ].init(); + } + + // Scroll step into view. + setTimeout( function() { + $('html, body').animate( { scrollTop: $( '.edd-onboarding__wrapper' ).offset().top - 45 }, 800 ); + }, 150 ); + + // Change GET parameter to the current step. + let query_params = new URLSearchParams( window.location.search ); + query_params.set( 'current_step', step_name ); + history.replaceState( null, null, '?' + query_params.toString() ); + + // Load tooltips. + setup_tooltips( $( '.edd-help-tip' ) ); + + // Reload email tags. + document.dispatchEvent( new Event( 'DOMContentLoaded' ) ); + + }, + } ).fail( function( response ) { + if ( window.console && window.console.log ) { + console.log( response ); + } + } ).done( function( response ) { + EDD_Onboarding.loading_state( false ); + } ); + }, + + /** + * Load next step in the sequence. + * + * @since 3.1 + * + */ + next_step: function( skipped = false ) { + let next_step = $( '.edd-onboarding_current-next-step' ).val(); + if ( '' === next_step ) { + if ( skipped ) { + EDD_Onboarding.onboarding_completed( true ); + } else { + return false; + } + } + + EDD_Onboarding.load_step( next_step ); + }, + + /** + * Transform step name to pascal case and return + * transformed string name. False if class object does not exist. + * + * @since 3.1 + * + * @param {string} step_name Step name. + */ + get_step_class: function( step_name ) { + let step_class = 'EDD_Onboarding_' + step_name.split( '_' ).map(element => { + return element.charAt( 0 ).toUpperCase() + element.slice( 1 ).toLowerCase(); + } ).join( '_' ); + + if ( typeof EDD_Onboarding[ step_class ] == 'undefined' ) { + return false; + } + + return step_class; + }, + + /** + * Specific steps logic. + */ + + EDD_Onboarding_Business_Info: { + /** + * Initialize step specific logic. + * + * @since 3.1 + * + */ + init: function() {}, + + /** + * Save settings fields. + * + * @since 3.1 + * + */ + save: function() { + return $.ajax( { + type: 'POST', + url: $('.edd-settings-form').attr("action"), + data: $('.edd-settings-form').serialize(), + beforeSend: function() { + EDD_Onboarding.loading_state( true ); + }, + success: function( data ) { + }, + } ).fail( function( response ) { + if ( window.console && window.console.log ) { + console.log( response ); + } + } ); + } + }, + + EDD_Onboarding_Payment_Methods: { + /** + * Initialize step specific logic. + * + * @since 3.1 + * + */ + init: function() { + // If Stripe connectioon exsists, fetch the current account details. + let stripe_connect_account = $( '#edds-stripe-connect-account' ); + let stripe_connect_actions = $( '#edds-stripe-disconnect-reconnect' ) + if ( stripe_connect_account ) { + $.ajax( { + type: 'POST', + url: ajaxurl, + data: { + action: 'edds_stripe_connect_account_info', + accountId: stripe_connect_account.data( 'account-id' ), + nonce: stripe_connect_account.data( 'nonce' ), + onboardingWizard: true, + }, + success: function( response ) { + stripe_connect_account.removeClass( 'loading' ) + stripe_connect_actions.removeClass( 'loading' ); + + // Account is sucessfully connected. + if ( response.success ) { + stripe_connect_account.html( response.data.message ); + stripe_connect_account.addClass( `notice-${ response.data.status }` ); + + + if ( response.data.actions ) { + stripe_connect_actions.html( response.data.actions ); + } + } else { + stripe_connect_account.html( response.data.message ); + stripe_connect_account.addClass( 'notice-error' ); + } + }, + } ).fail( function( response ) { + + } ); + } + }, + /** + * There is nothing to save in this step. + * + * @since 3.1 + * + */ + save: function() { + return Promise.resolve(); + }, + }, + + EDD_Onboarding_Configure_Emails: { + + vars: { + wp_editor: false, + }, + + /** + * Initialize step specific logic. + * + * @since 3.1 + * + */ + init: function() { + // If WP Editor is already initialized, we have to destroy it first. + if ( EDD_Onboarding.EDD_Onboarding_Configure_Emails.vars.wp_editor ) { + wp.editor.remove( 'edd_settings_purchase_receipt' ) + } + + wp.editor.initialize( + 'edd_settings_purchase_receipt', + { + tinymce: { + wpautop: true, + plugins : 'charmap colorpicker compat3x directionality fullscreen hr image lists media paste tabfocus textcolor wordpress wpautoresize wpdialogs wpeditimage wpemoji wpgallery wplink wptextpattern wpview', + toolbar1: 'bold italic underline strikethrough | bullist numlist | blockquote hr wp_more | alignleft aligncenter alignright | link unlink | fullscreen | wp_adv', + toolbar2: 'formatselect alignjustify forecolor | pastetext removeformat charmap | outdent indent | undo redo | wp_help' + }, + quicktags: true, + mediaButtons: true, + } + ); + + // Append "Insert marker" button. + $( '#edd-onboarding__insert-marker-button a' ).clone().appendTo( '.wp-media-buttons' ); + + EDD_Onboarding.EDD_Onboarding_Configure_Emails.vars.wp_editor = true; + }, + + /** + * Save settings fields. + * + * @since 3.1 + * + */ + save: function() { + let editor_id = 'edd_settings_purchase_receipt'; + let purchase_receipt_content = $( '#' + editor_id ).val(); + + if( tinymce.get( editor_id ) ) { + purchase_receipt_content = wp.editor.getContent(editor_id); + } + + let data = { + action: 'edd_onboarding_save_email', + content: purchase_receipt_content, + email_logo: $( '#email_logo' ).val(), + from_name: $( '#from_name' ).val(), + from_email: $( '#from_email' ).val(), + nonce: EDD_Onboarding.vars.nonce, + }; + + return $.ajax( { + type: 'POST', + url: ajaxurl, + data: data, + beforeSend: function() { + EDD_Onboarding.loading_state( true ); + }, + success: function( data ) { + }, + } ).fail( function( response ) { + if ( window.console && window.console.log ) { + console.log( response ); + } + } ); + } + }, + + EDD_Onboarding_Tools: { + /** + * Initialize step specific logic. + * + * @since 3.1 + * + */ + init: function() { + this.get_selected_plugins(); + $( document.body ).on( 'change', '.edd-onboarding__plugin-install', function() { + EDD_Onboarding.EDD_Onboarding_Tools.get_selected_plugins(); + } ); + }, + + /** + * Check which plugins are selected and + * update the UI accordingly. + * + * @since 3.1 + * + */ + get_selected_plugins: function() { + let selected_plugins = []; + + $( '.edd-onboarding__selected-plugins' ).show(); + $( '.edd-onboarding__plugin-install:checked:not(:disabled)' ).each( function() { + if ( $( this ).data( 'plugin-name' ) && $( this ).data( 'action' ).length > 0 ) { + selected_plugins.push( $( this ).data( 'plugin-name' ) ); + } + }); + + $( '.edd-onboarding__selected-plugins-text' ).html( selected_plugins.join( ', ' ) ); + + if ( selected_plugins.length === 0 ) { + $( '.edd-onboarding__selected-plugins' ).hide(); + } + }, + + /** + * Handle saving of user telemetry settings and + * installation/activation of selected plugins. + * If there is an error it will show a specific error page. + * + * @since 3.1 + * + */ + save: async function() { + EDD_Onboarding.loading_state( true ) + + // Save user telemetry details. + await $.post( + ajaxurl, + { + action: 'edd_onboarding_telemetry_settings', + page: 'edd-onboarding-wizard', + telemetry_toggle: $( '#edd-onboarding__telemery-toggle' ).is( ':checked' ), + auto_register: $( '#auto-register' ).is( ':checked' ), + _wpnonce: EDD_Onboarding.vars.nonce, + }, + function() { + } + ); + + // Get selected plugins. + let selected_plugins = []; + let installation_errors = []; + $( '.edd-onboarding__plugin-install:checked:not(:disabled)' ).each( function() { + if ( $( this ).data( 'plugin-name' ) && $( this ).data( 'action' ).length > 0 ) { + selected_plugins.push({ + plugin_name: $(this).data( 'plugin-name' ), + plugin_file: $(this).data( 'plugin-file' ), + plugin_url: $(this).val(), + action: $(this).data( 'action' ), + }); + } + } ); + + // Install and activate selected plugins. + for ( let plugin in selected_plugins ) { + await new Promise((resolve, reject) => { + let action = selected_plugins[ plugin ].action; + let plugin_key = ''; + let ajax_action = ''; + let loader_text = ''; + + switch ( action ) { + case 'activate': + ajax_action = 'edd_activate_extension'; + loader_text = EDDExtensionManager.activating; + plugin_key = selected_plugins[ plugin ].plugin_file; + break; + + case 'install': + ajax_action = 'edd_install_extension'; + loader_text = EDDExtensionManager.installing; + plugin_key = selected_plugins[ plugin ].plugin_url; + break; + } + + // Update loading text. + $( '.edd-onboarding__loading-status' ).html( loader_text + ' ' + selected_plugins[plugin].plugin_name + '...' ); + + let data = { + action: ajax_action, + nonce: EDDExtensionManager.extension_manager_nonce, + plugin: plugin_key, + type: 'plugin', + }; + + $.post( ajaxurl, data ) + .done( function ( res ) { + if ( ! res.success ) { + installation_errors.push( selected_plugins[plugin].plugin_name ); + } + // Activation can happen very fast, so we want a fake delay for the UI. + setTimeout( function() { + resolve(); + }, 1500 ); + } ); + }) + } + + // All of the plugins were installed and activated. + if ( installation_errors.length === 0 ) { + if ( selected_plugins.length === 0 ) { + return Promise.resolve(); + } + + // Show success screen. + return new Promise( (resolve, reject) => { + EDD_Onboarding.loading_state( false ); + $( '.edd-onboarding' ).toggleClass( 'edd-onboarding__loading-in-progress', true ); + $( '.edd-onboarding__install-success-wrapper' ).show(); + setTimeout(() => { + $( '.edd-onboarding__install-success-wrapper' ).hide(); + $( '.edd-onboarding' ).toggleClass( 'edd-onboarding__loading-in-progress', false ); + resolve(); + }, 3200); + }); + } + + // There were some errors while installing/activating. + $( '.edd-onboarding__failed-plugins-text' ).html( installation_errors.join( ', ' ) ); + $( '.edd-onboarding__steps-indicator, .edd-onboarding__single-step-title, .edd-onboarding__single-step-subtitle, .edd-onboarding__single-step-footer, .edd-onboarding__install-plugins' ).slideUp(); + $( '.edd-onboarding__install-failed' ).slideDown(); + EDD_Onboarding.loading_state( false ) + + return Promise.reject(); + } + }, + + EDD_Onboarding_Products: { + /** + * Initialize step specific logic. + * + * @since 3.1 + * + */ + init: function() { + EDD_Onboarding.EDD_Onboarding_Products.init_variable_pricing_toggle(); + EDD_Onboarding.EDD_Onboarding_Products.init_files_toggle(); + $( '#edd_download_files' ).show(); + }, + + /** + * Toggle between single price + * and variable price options. + * + * @since 3.1 + * + */ + init_variable_pricing_toggle: function() { + $( document.body ).on( 'click', '.edd-onboarding__pricing-option-pill button', function( e ) { + e.preventDefault(); + let is_variable_pricing = $( this ).data( 'variable-pricing' ); + + // Toggle checkbox. + $( '#edd_variable_pricing' ).prop( 'checked', is_variable_pricing ); + $( '#edd_variable_pricing' ).trigger( 'change' ); + } ); + + + $( document.body ).on( 'change', '#edd_variable_pricing', function( e ) { + e.preventDefault(); + let is_variable_pricing = this.checked; + + // Active pill state. + $( '.edd-onboarding__pricing-option-pill .active' ).removeClass( 'active' ); + $( '.edd-onboarding__pricing-option-pill button[data-variable-pricing="' + is_variable_pricing + '"]' ).addClass( 'active' ); + + $( '.edd-onboarding__product-single-price' ).show(); + $( '.edd-onboarding__product-variable-price' ).hide(); + + // Toggle views. + if ( is_variable_pricing ) { + $( '.edd-onboarding__product-variable-price' ).show(); + $( '.edd-onboarding__product-single-price' ).hide(); + } + + $( '.edd-onboarding__product-files-wrapper' ).show(); + } ); + }, + + /** + * Toggle file uploading. + * + * @since 3.1 + * + */ + init_files_toggle: function() { + $( document.body ).on( 'change', '#_edd_upload_files', function( e ) { + e.preventDefault(); + $( '.edd-onboarding__product-files-row' ).toggle( this.checked ); + } ); + }, + + /** + * Save product details and upon + * success redirect to the created product. + * + * @since 3.1 + * + */ + save: function() { + let form = $('.edd-onboarding__create-product-form'); + if ( ! form[0].reportValidity() ) { + return Promise.reject(); + } + + let form_details = Object.fromEntries( new FormData( form[0] ) ); + + return $.ajax( { + type: 'POST', + url: ajaxurl, + data: { + action: 'edd_onboarding_create_product', + page: 'edd-onboarding-wizard', + _wpnonce: EDD_Onboarding.vars.nonce, + ...form_details + }, + beforeSend: function() { + EDD_Onboarding.loading_state( true ); + }, + success: function( data ) { + if ( data.success ) { + + $( '.edd-onboarding__edit-my-product' ).attr( 'href', decodeURI( data.redirect_url.replace(/&/g, "&") ) ); + $( '.edd-onboarding__single-step-inner' ).addClass( 'equal' ); + $( '.edd-onboarding__create-product-form, .edd-onboarding__single-step-title, .edd-onboarding__single-step-subtitle, .edd-onboarding__single-step-footer, .edd-onboarding__close-and-exit' ).hide(); + $( '.edd-onboarding__product-created' ).show(); + + EDD_Onboarding.onboarding_completed( false ); + } + + EDD_Onboarding.loading_state( false ); + }, + } ).fail( function( response ) { + if ( window.console && window.console.log ) { + console.log( response ); + } + } ); + } + } +}; + +jQuery( document ).ready( function( $ ) { + EDD_Onboarding.init(); +} ); diff --git a/assets/js/admin/orders/index.js b/assets/js/admin/orders/index.js new file mode 100644 index 00000000000..de6bf2e0040 --- /dev/null +++ b/assets/js/admin/orders/index.js @@ -0,0 +1,130 @@ +/** + * Internal dependencies + */ +import OrderOverview from './order-overview'; +import './order-details'; +import { jQueryReady } from 'utils/jquery.js'; + +jQueryReady( () => { + // Order Overview. + if ( window.eddAdminOrderOverview ) { + OrderOverview.render(); + + /** + * Add validation to Add/Edit Order form. + * + * @since 3.0 + */ + ( () => { + const overview = OrderOverview.options.state; + const orderItems = overview.get( 'items' ); + + const noItemErrorEl = document.getElementById( 'edd-add-order-no-items-error' ); + const noCustomerErrorEl = document.getElementById( 'edd-add-order-customer-error' ); + + const assignCustomerEl = document.getElementById( 'customer_id' ); + const newCustomerEmailEl = document.getElementById( 'edd_new_customer_email' ); + + [ + 'edd-add-order-form', + 'edd-edit-order-form', + ].forEach( ( form ) => { + const formEl = document.getElementById( form ); + + if ( ! formEl ) { + return; + } + + formEl.addEventListener( 'submit', submitForm ); + } ); + + /** + * Submits an Order form. + * + * @since 3.0 + * + * @param {Object} event Submit event. + */ + function submitForm( event ) { + let hasError = false; + + // Ensure `OrderItem`s. + if ( noItemErrorEl ) { + if ( 0 === orderItems.length ) { + noItemErrorEl.style.display = 'block'; + hasError = true; + } else { + noItemErrorEl.style.display = 'none'; + } + } + + // Ensure Customer. + if ( noCustomerErrorEl ) { + if ( '0' === assignCustomerEl.value && '' === newCustomerEmailEl.value ) { + noCustomerErrorEl.style.display = 'block'; + hasError = true; + } else { + noCustomerErrorEl.style.display = 'none'; + } + + if ( true === hasError ) { + event.preventDefault(); + } + } + } + + /** + * Remove `OrderItem` notice when an `OrderItem` is added. + * + * @since 3.0 + */ + orderItems.on( 'add', function() { + noItemErrorEl.style.display = 'none'; + } ); + + /** + * Remove Customer notice when a Customer is changed. + * + * Uses a jQuery binding for Chosen support. + * + * @since 3.0 + * + * @param {Object} event Change event. + */ + $( assignCustomerEl ).on( 'change', ( event ) => { + const val = event.target.value; + + if ( '0' !== val ) { + noCustomerErrorEl.style.display = 'none'; + } + } ) + + if ( newCustomerEmailEl ) { + /** + * Remove Customer notice when a Customer is set. + * + * @since 3.0 + * + * @param {Object} event Input event. + */ + newCustomerEmailEl.addEventListener( 'input', ( event ) => { + const val = event.target.value; + + if ( '' !== val ) { + noCustomerErrorEl.style.display = 'none'; + } + } ); + } + } )(); + } + + // Move `.update-nag` items below the top header. + // `#update-nag` is legacy styling, which core still supports. + // + // `.notice` items are properly moved, but WordPress core + // does not move `.update-nag`. + if ( 0 !== $( '.edit-post-editor-regions__header' ).length ) { + $( 'div.update-nag, div#update-nag' ).insertAfter( $( '.edit-post-editor-regions__header' ) ); + } + +} ); diff --git a/assets/js/admin/orders/list-table.js b/assets/js/admin/orders/list-table.js new file mode 100644 index 00000000000..821862bdfa0 --- /dev/null +++ b/assets/js/admin/orders/list-table.js @@ -0,0 +1,73 @@ +/* global $, ajaxurl, edd_vars */ + +/** + * Internal dependencies + */ +import { jQueryReady } from 'utils/jquery.js'; + +jQueryReady( () => { + + // Deleting a single order. + $( '.download_page_edd-payment-history .row-actions .delete a' ).on( 'click', function(e) { + e.preventDefault(); + let targetUrl = $(this).attr('href'); + + $("#edd-single-delete-dialog").dialog({ + buttons : [ + { + text : edd_vars.cancel_dialog_text, + class : 'button-secondary', + click: function() { + $(this).dialog('close'); + }, + }, + { + text : edd_vars.confirm_dialog_text, + class : 'button-primary', + click : function() { + $(this).dialog('close'); + window.location.href = targetUrl; + }, + }, + ] + }); + + $('#edd-single-delete-dialog').dialog('open'); + }); + + + // Trashed Orders. + $( '.download_page_edd-payment-history' ).on( 'click', '#doaction', function ( e ) { + let action = $( '#bulk-action-selector-top' ).val(), + form = $(this).closest( 'form' ); + + if ( 'delete' !== action ) { + return; + } + + e.preventDefault(); + + $("#edd-bulk-delete-dialog").dialog({ + buttons : [ + { + text : edd_vars.cancel_dialog_text, + class : 'button-secondary', + click: function() { + $(this).dialog('close'); + }, + }, + { + text : edd_vars.confirm_dialog_text, + class : 'button-primary', + click : function() { + $(this).dialog('close'); + form.submit(); + }, + }, + ] + }); + + $('#edd-bulk-delete-dialog').dialog('open'); + }); + +} ); diff --git a/assets/js/admin/orders/order-details/address.js b/assets/js/admin/orders/order-details/address.js new file mode 100644 index 00000000000..e772eea0625 --- /dev/null +++ b/assets/js/admin/orders/order-details/address.js @@ -0,0 +1,256 @@ +/* global $, ajaxurl, _ */ + +/** + * Internal dependencies + */ +import OrderOverview from './../order-overview'; +import { getChosenVars } from 'utils/chosen.js'; +import { jQueryReady } from 'utils/jquery.js'; + +// Store customer search results to help prefill address data. +let CUSTOMER_SEARCH_RESULTS = { + addresses: { + '0': { + address: '', + address2: '', + city: '', + region: '', + postal_code: '', + country: '', + }, + }, +}; + +jQueryReady( () => { + + /** + * Adjusts Overview tax configuration when the Customer's address changes. + * + * @since 3.0 + */ + ( () => { + const { state: overviewState } = OrderOverview.options; + + // No tax, do nothing. + if ( false === overviewState.get( 'hasTax' ) ) { + return; + } + + // Editing, do nothing. + if ( false === overviewState.get( 'isAdding' ) ) { + return; + } + + const countryInput = document.getElementById( + 'edd_order_address_country' + ); + const regionInput = document.getElementById( + 'edd_order_address_region' + ); + + if ( ! ( countryInput && regionInput ) ) { + return; + } + + /** + * Retrieves a tax rate based on the currently selected Address. + * + * @since 3.0 + */ + function getTaxRate() { + const country = $( '#edd_order_address_country' ).val(); + const region = $( '#edd_order_address_region' ).val(); + + const nonce = document.getElementById( 'edd_get_tax_rate_nonce' ) + .value; + + wp.ajax.send( 'edd_get_tax_rate', { + data: { + nonce, + country, + region, + }, + /** + * Updates the Overview's tax configuration on successful retrieval. + * + * @since 3.0 + * + * @param {Object} response AJAX response. + */ + success( response ) { + let { tax_rate: rate } = response; + + // Make a percentage. + rate = rate * 100; + + overviewState.set( 'hasTax', { + ...overviewState.get( 'hasTax' ), + country, + region, + rate, + } ); + }, + /* + * Updates the Overview's tax configuration on failed retrieval. + * + * @since 3.0 + */ + error() { + overviewState.set( 'hasTax', 'none' ); + }, + } ); + } + + // Update rate on Address change. + // + // Wait for Region field to be replaced when Country changes. + // Wait for typing when Regino field changes. + // jQuery listeners for Chosen compatibility. + $( '#edd_order_address_country' ).on( 'change', _.debounce( getTaxRate, 250 ) ); + + $( '#edd-order-address' ).on( 'change', '#edd_order_address_region', getTaxRate ); + $( '#edd-order-address' ).on( 'keyup', '#edd_order_address_region', _.debounce( getTaxRate, 250 ) ); + } )(); + + $( '.edd-payment-change-customer-input' ).on( 'change', function() { + const $this = $( this ), + data = { + action: 'edd_customer_addresses', + customer_id: $this.val(), + nonce: $( '#edd_add_order_nonce' ).val(), + }; + + $.post( ajaxurl, data, function( response ) { + const { success, data } = response; + + if ( ! success ) { + $( '.customer-address-select-wrap' ).hide(); + + return; + } + + // Store response for later use. + CUSTOMER_SEARCH_RESULTS = { + ...CUSTOMER_SEARCH_RESULTS, + ...data, + addresses: { + ...CUSTOMER_SEARCH_RESULTS.addresses, + ...data.addresses, + }, + }; + + if ( data.html ) { + $( '.customer-address-select-wrap' ).show(); + $( '.customer-address-select-wrap .edd-form-group__control' ).html( data.html ); + } else { + $( '.customer-address-select-wrap' ).hide(); + } + }, 'json' ); + + return false; + } ); + + /** + * Retrieves a list of states based on a Country HTML ' ); + } else { + state_wrapper + .replaceWith( regions ); + + $( '#edd_order_address_region' ).chosen( getChosenVars( $( '#edd_order_address_region' ) ) ); + } + } + + /** + * Handles replacing a Region field when a Country field changes. + * + * @since 3.0 + */ + function updateRegionFieldOnChange() { + getStates( + $( this ), + 'edd_order_address[region]', + 'edd_order_address_region' + ) + .done( replaceRegionField ); + } + + $( document.body ).on( 'change', '.customer-address-select-wrap .add-order-customer-address-select', function() { + const $this = $( this ), + val = $this.val(), + address = CUSTOMER_SEARCH_RESULTS.addresses[ val ]; + + $( '#edd-add-order-form input[name="edd_order_address[address]"]' ).val( address.address ); + $( '#edd-add-order-form input[name="edd_order_address[address2]"]' ).val( address.address2 ); + $( '#edd-add-order-form input[name="edd_order_address[postal_code]"]' ).val( address.postal_code ); + $( '#edd-add-order-form input[name="edd_order_address[city]"]' ).val( address.city ); + $( '#edd-add-order-form input[name="edd_order_address[address_id]"]' ).val( val ); + + // Remove global `change` event handling to prevent loop. + $( '#edd_order_address_country' ).off( 'change', updateRegionFieldOnChange ); + + // Set Country. + $( '#edd_order_address_country' ) + .val( address.country ) + .trigger( 'change' ) + .trigger( 'chosen:updated' ); + + // Set Region. + getStates( + $( '#edd_order_address_country' ), + 'edd_order_address[region]', + 'edd_order_address_region' + ) + .done( replaceRegionField ) + .done( ( response ) => { + $( '#edd_order_address_region' ) + .val( address.region ) + .trigger( 'change' ) + .trigger( 'chosen:updated' ); + } ); + + // Add back global `change` event handling. + $( '#edd_order_address_country' ).on( 'change', updateRegionFieldOnChange ); + + return false; + } ); + + // Country change. + $( '#edd_order_address_country' ).on( 'change', updateRegionFieldOnChange ); + +} ); diff --git a/assets/js/admin/orders/order-details/customer.js b/assets/js/admin/orders/order-details/customer.js new file mode 100644 index 00000000000..b2e2a18f0c1 --- /dev/null +++ b/assets/js/admin/orders/order-details/customer.js @@ -0,0 +1,70 @@ +/* global $ */ + +/** + * Internal dependencies + */ +import { jQueryReady } from 'utils/jquery.js'; + +jQueryReady( () => { + + // Change Customer. + $( '.edd-payment-change-customer-input' ).on( 'change', function() { + const $this = $( this ), + data = { + action: 'edd_customer_details', + customer_id: $this.val(), + nonce: $( '#edd_customer_details_nonce' ).val(), + }; + + if ( '' === data.customer_id ) { + return; + } + + $( '.customer-details' ).css( 'display', 'none' ); + $( '#customer-avatar' ).html( '' ); + + $.post( ajaxurl, data, function( response ) { + const { success, data } = response; + + if ( success ) { + $( '.customer-details' ).css( 'display', 'flex' ); + $( '.customer-details-wrap' ).css( 'display', 'flex' ); + + $( '#customer-avatar' ).html( data.avatar ); + $( '.customer-name' ).html( data.name ); + $( '.customer-since span' ).html( data.date_created_i18n ); + $( '.customer-record a' ).prop( 'href', data._links.self ); + } else { + $( '.customer-details-wrap' ).css( 'display', 'none' ); + } + }, 'json' ); + } ); + + $( '.edd-payment-change-customer-input' ).trigger( 'change' ); + + // New Customer. + $( '.edd-order-customer__actions button' ).on( 'click', function( e ) { + e.preventDefault(); + + var new_customer = $( this ).hasClass( 'edd-payment-new-customer' ), + cancel = $( this ).hasClass( 'edd-payment-new-customer-cancel' ); + $( this ).addClass( 'active' ).siblings().removeClass( 'active' ); + + if ( new_customer ) { + $( '.order-customer-info' ).hide(); + $( '.new-customer' ).show(); + } else if ( cancel ) { + $( '.order-customer-info' ).show(); + $( '.new-customer' ).hide(); + } + + var new_customer = $( '#edd-new-customer' ); + + if ( $( '.new-customer' ).is( ':visible' ) ) { + new_customer.val( 1 ); + } else { + new_customer.val( 0 ); + } + } ); + +} ); diff --git a/assets/js/admin/orders/order-details/index.js b/assets/js/admin/orders/order-details/index.js new file mode 100644 index 00000000000..c429e037cf3 --- /dev/null +++ b/assets/js/admin/orders/order-details/index.js @@ -0,0 +1,3 @@ +import './address.js'; +import './customer.js'; +import './receipt.js'; diff --git a/assets/js/admin/orders/order-details/receipt.js b/assets/js/admin/orders/order-details/receipt.js new file mode 100644 index 00000000000..99e8f9e3517 --- /dev/null +++ b/assets/js/admin/orders/order-details/receipt.js @@ -0,0 +1,30 @@ +/* global $, ajaxurl */ + +/** + * Internal dependencies + */ +import { jQueryReady } from 'utils/jquery.js'; + +jQueryReady( () => { + + const sendEmailButton = $( '#edd-resend-receipt' ); + // If the button is disabled, do nothing. + if ( ! sendEmailButton.attr( 'href' ) ) { + return; + } + const emailSelectSelector = '.edd-order-resend-receipt-email'; + const url = new URLSearchParams( sendEmailButton.attr( 'href' ) ); + + $( document.body ).on( 'change', emailSelectSelector, function() { + url.set( 'email', $( this ).val() ); + sendEmailButton.attr( 'href', decodeURIComponent( url.toString() ) ); + } ); + + // trigger initial value to be set on change + $( emailSelectSelector ).trigger( 'change' ); + + // confirm before sending + sendEmailButton.on( 'click', function() { + return confirm( edd_vars.resend_receipt ); + }); +} ); diff --git a/assets/js/admin/orders/order-overview/_refund.js b/assets/js/admin/orders/order-overview/_refund.js new file mode 100644 index 00000000000..067eabb06ec --- /dev/null +++ b/assets/js/admin/orders/order-overview/_refund.js @@ -0,0 +1,279 @@ +import { NumberFormat } from '@easy-digital-downloads/currency'; + +const number = new NumberFormat(); + +/* global eddAdminOrderOverview */ + +// Loads the modal when the refund button is clicked. +$(document.body).on('click', '.edd-refund-order', function (e) { + e.preventDefault(); + var link = $(this), + postData = { + action : 'edd_generate_refund_form', + order_id: $('input[name="edd_payment_id"]').val(), + }; + + $.ajax({ + type : 'POST', + data : postData, + url : ajaxurl, + success: function success(data) { + let modal_content = ''; + if (data.success) { + modal_content = data.html; + } else { + modal_content = data.message; + } + + $('#edd-refund-order-dialog').dialog({ + position: { my: 'top center', at: 'center center-25%' }, + width : '75%', + modal : true, + resizable: false, + draggable: false, + classes: { + 'ui-dialog': 'edd-dialog', + }, + closeText: eddAdminOrderOverview.i18n.closeText, + open: function( event, ui ) { + $(this).html( modal_content ); + }, + close: function( event, ui ) { + $( this ).html( '' ); + if ( $( this ).hasClass( 'did-refund' ) ) { + location.reload(); + } + } + }); + return false; + } + }).fail(function (data) { + $('#edd-refund-order-dialog').dialog({ + position: { my: 'top center', at: 'center center-25%' }, + width : '75%', + modal : true, + resizable: false, + draggable: false + }).html(data.message); + return false; + }); +}); + +$( document.body ).on( 'click', '.ui-widget-overlay', function ( e ) { + $( '#edd-refund-order-dialog' ).dialog( 'close' ); +} ); + +/** + * Listen for the bulk actions checkbox, since WP doesn't trigger a change on sub-items. + */ +$( document.body ).on( 'change', '#edd-refund-order-dialog #cb-select-all-1', function () { + const itemCheckboxes = $( '.edd-order-item-refund-checkbox' ); + const isChecked = $( this ).prop( 'checked' ); + + itemCheckboxes.each( function() { + $( this ).prop( 'checked', isChecked ).trigger( 'change' ); + } ); +} ); + +/** + * Listen for individual checkbox changes. + * When it does, trigger a quantity change. + */ +$( document.body ).on( 'change', '.edd-order-item-refund-checkbox', function () { + const parent = $( this ).parent().parent(); + const quantityField = parent.find( '.edd-order-item-refund-quantity' ); + + if ( quantityField.length ) { + if ( $( this ).prop( 'checked' ) ) { + // Triggering a change on the quantity field handles enabling the inputs. + quantityField.trigger( 'change' ); + } else { + // Disable inputs and recalculate total. + parent.find( '.edd-order-item-refund-input' ).prop( 'disabled', true ); + recalculateRefundTotal(); + } + } +} ); + +/** + * Handles quantity changes, which includes items in the refund. + */ +$( document.body ).on( 'change', '#edd-refund-order-dialog .edd-order-item-refund-input', function () { + let parent = $( this ).closest( '.refunditem' ), + quantityField = parent.find( '.edd-order-item-refund-quantity' ), + quantity = parseInt( quantityField.val() ); + + if ( quantity > 0 ) { + parent.addClass( 'refunded' ); + } else { + parent.removeClass( 'refunded' ); + } + + // Only auto calculate subtotal / tax if we've adjusted the quantity. + if ( $( this ).hasClass( 'edd-order-item-refund-quantity' ) ) { + // Enable/disable amount fields. + parent.find( '.edd-order-item-refund-input:not(.edd-order-item-refund-quantity)' ).prop( 'disabled', quantity === 0 ); + if ( quantity > 0 ) { + quantityField.prop( 'disabled', false ); + } + + let subtotalField = parent.find( '.edd-order-item-refund-subtotal' ), + taxField = parent.find( '.edd-order-item-refund-tax' ), + originalSubtotal = number.unformat( subtotalField.data( 'original' ) ), + originalTax = taxField.length ? number.unformat( taxField.data( 'original' ) ) : 0.00, + originalQuantity = parseInt( quantityField.data( 'max' ) ), + calculatedSubtotal = ( originalSubtotal / originalQuantity ) * quantity, + calculatedTax = taxField.length ? ( originalTax / originalQuantity ) * quantity : 0.00; + + // Make sure totals don't go over maximums. + if ( calculatedSubtotal > parseFloat( subtotalField.data( 'max' ) ) ) { + calculatedSubtotal = subtotalField.data( 'max' ); + } + if ( taxField.length && calculatedTax > parseFloat( taxField.data( 'max' ) ) ) { + calculatedTax = taxField.data( 'max' ); + } + + // Guess the subtotal and tax for the selected quantity. + subtotalField.val( number.format( calculatedSubtotal ) ); + if ( taxField.length ) { + taxField.val( number.format( calculatedTax ) ); + } + } + + recalculateRefundTotal(); +} ); + +/** + * Calculates all the final refund values. + */ +function recalculateRefundTotal() { + let newSubtotal = 0, + newTax = 0, + newTotal = 0, + canRefund = false, + allInputBoxes = $( '#edd-refund-order-dialog .edd-order-item-refund-input' ), + allReadOnly = $( '#edd-refund-order-dialog .edd-order-item-refund-input.readonly' ); + + // Set a readonly while we recalculate, to avoid race conditions in the browser. + allInputBoxes.prop( 'readonly', true ); + + // Loop over all order items. + $( '#edd-refund-order-dialog .edd-order-item-refund-quantity' ).each( function() { + const thisItemQuantity = parseInt( $( this ).val() ); + + if ( ! thisItemQuantity ) { + return; + } + + const thisItemParent = $( this ).closest( '.refunditem' ); + const thisItemSelected = thisItemParent.find( '.edd-order-item-refund-checkbox' ).prop( 'checked' ); + + if ( ! thisItemSelected ) { + thisItemParent.removeClass( 'refunded' ); + return; + } + + // Values for this item. + let thisItemTax = 0.00; + + let thisItemSubtotal = number.unformat( thisItemParent.find( '.edd-order-item-refund-subtotal' ).val() ); + + if ( thisItemParent.find( '.edd-order-item-refund-tax' ).length ) { + thisItemTax = number.unformat( thisItemParent.find( '.edd-order-item-refund-tax' ).val() ); + } + + let thisItemTotal = thisItemSubtotal + thisItemTax; + + thisItemParent.find( '.column-total span' ).text( number.format( thisItemTotal ) ); + + // Negate amounts if working with credit. + if ( thisItemParent.data( 'credit' ) ) { + thisItemSubtotal = thisItemSubtotal * -1; + thisItemTax = thisItemTax * -1; + thisItemTotal = thisItemTotal * -1; + } + + // Only include order items in the subtotal. + if ( thisItemParent.data( 'orderItem' ) ) { + newSubtotal += thisItemSubtotal; + } + + newTax += thisItemTax; + newTotal += thisItemTotal; + } ); + + if ( parseFloat( newTotal ) > 0 ) { + canRefund = true; + } + + $( '#edd-refund-submit-subtotal-amount' ).text( number.format( newSubtotal ) ); + $( '#edd-refund-submit-tax-amount' ).text( number.format( newTax ) ); + $( '#edd-refund-submit-total-amount' ).text( number.format( newTotal ) ); + + $( '#edd-submit-refund-submit' ).attr( 'disabled', ! canRefund ); + + // Remove the readonly. + allInputBoxes.prop( 'readonly', false ); + allReadOnly.prop( 'readonly', true ); +} + +/** + * Process the refund form after the button is clicked. + */ +$(document.body).on( 'click', '#edd-submit-refund-submit', function(e) { + e.preventDefault(); + $('.edd-submit-refund-message').removeClass('success').removeClass('fail'); + $( this ).removeClass( 'button-primary' ).attr( 'disabled', true ).addClass( 'updating-message' ); + $('#edd-submit-refund-status').hide(); + + const refundForm = $( '#edd-submit-refund-form' ); + const refundData = refundForm.serialize(); + + var postData = { + action: 'edd_process_refund_form', + data: refundData, + order_id: $('input[name="edd_payment_id"]').val() + }; + + $.ajax({ + type : 'POST', + data : postData, + url : ajaxurl, + success: function success(response) { + const message_target = $('.edd-submit-refund-message'), + url_target = $('.edd-submit-refund-url'); + + if ( response.success ) { + message_target.text(response.data.message).addClass('success'); + url_target.attr( 'href', response.data.refund_url ).show(); + + $( '#edd-submit-refund-status' ).show(); + url_target.focus(); + $( '#edd-refund-order-dialog' ).addClass( 'did-refund' ); + } else { + message_target.html(response.data).addClass('fail'); + url_target.hide(); + + $('#edd-submit-refund-status').show(); + $( '#edd-submit-refund-submit' ).attr( 'disabled', false ).removeClass( 'updating-message' ).addClass( 'button-primary' ); + } + } + } ).fail( function ( data ) { + const message_target = $('.edd-submit-refund-message'), + url_target = $('.edd-submit-refund-url'), + json = data.responseJSON; + + + message_target.text( json.data ).addClass( 'fail' ); + url_target.hide(); + + $( '#edd-submit-refund-status' ).show(); + $( '#edd-submit-refund-submit' ).attr( 'disabled', false ).removeClass( 'updating-message' ).addClass( 'button-primary' ); + return false; + }); +}); + +// Initialize WP toggle behavior for the modal. +$( document.body ).on( 'click', '.refund-items .toggle-row', function () { + $( this ).closest( 'tr' ).toggleClass( 'is-expanded' ); +} ); diff --git a/assets/js/admin/orders/order-overview/collections/order-adjustments.js b/assets/js/admin/orders/order-overview/collections/order-adjustments.js new file mode 100644 index 00000000000..32b9543d4e7 --- /dev/null +++ b/assets/js/admin/orders/order-overview/collections/order-adjustments.js @@ -0,0 +1,101 @@ +/* global Backbone */ + +/** + * Internal dependencies + */ +import { OrderAdjustment } from './../models/order-adjustment.js'; +import { OrderAdjustmentDiscount } from './../models/order-adjustment-discount.js'; + +/** + * Collection of `OrderAdjustment`s. + * + * @since 3.0 + * + * @class Adjustments + * @augments Backbone.Collection + */ +export const OrderAdjustments = Backbone.Collection.extend( { + /** + * @since 3.0 + */ + comparator: 'type', + + /** + * Initializes the `OrderAdjustments` collection. + * + * @since 3.0 + * + * @constructs OrderAdjustments + * @augments Backbone.Collection + */ + initialize() { + this.getByType = this.getByType.bind( this ); + }, + + /** + * Determines which Model to use and instantiates it. + * + * @since 3.0 + * + * @param {Object} attributes Model attributes. + * @param {Object} options Model options. + */ + model( attributes, options ) { + let model; + + switch ( attributes.type ) { + case 'discount': + model = new OrderAdjustmentDiscount( attributes, options ); + break; + default: + model = new OrderAdjustment( attributes, options ); + } + + return model; + }, + + /** + * Defines the model's attribute that defines it's ID. + * + * Uses the `OrderAdjustment`'s Type ID. + * + * @since 3.0 + * + * @param {Object} attributes Model attributes. + * @return {number} + */ + modelId( attributes ) { + return `${ attributes.type }-${ attributes.typeId }-${ attributes.description }`; + }, + + /** + * Determines if `OrderAdjustments` contains a specific `OrderAdjustment`. + * + * @since 3.0 + * + * @param {OrderAdjustment} model Model to look for. + * @return {bool} True if the Collection contains the Model. + */ + has( model ) { + return ( + undefined !== + this.findWhere( { + typeId: model.get( 'typeId' ), + } ) + ); + }, + + /** + * Returns a list of `OrderAdjustment`s by type. + * + * @since 3.0 + * + * @param {string} type Type of adjustment to retrieve. `fee`, `credit`, or `discount`. + * @return {Array} List of type-specific adjustments. + */ + getByType( type ) { + return this.where( { + type, + } ); + }, +} ); diff --git a/assets/js/admin/orders/order-overview/collections/order-items.js b/assets/js/admin/orders/order-overview/collections/order-items.js new file mode 100644 index 00000000000..fa2ee824eac --- /dev/null +++ b/assets/js/admin/orders/order-overview/collections/order-items.js @@ -0,0 +1,137 @@ +/* global Backbone, $, _ */ + +/** + * External dependencies + */ +import uuid from 'uuid-random'; + +/** + * Internal dependencies + */ +import { OrderAdjustments } from './../collections/order-adjustments.js'; +import { OrderAdjustmentDiscount } from './../models/order-adjustment-discount.js'; +import { OrderItem } from './../models/order-item.js'; + +/** + * Collection of `OrderItem`s. + * + * @since 3.0 + * + * @class OrderItems + * @augments Backbone.Collection + */ +export const OrderItems = Backbone.Collection.extend( { + /** + * @since 3.0 + * + * @type {OrderItem} + */ + model: OrderItem, + + /** + * Ensures `OrderItems` has access to the current state through a similar + * interface as Views. BackBone.Collection does not automatically set + * passed options as a property. + * + * @since 3.0 + * + * @param {null|Array} models List of Models. + * @param {Object} options Collection options. + */ + preinitialize( models, options ) { + this.options = options; + }, + + /** + * Determines if `OrderItems` contains a specific `OrderItem`. + * + * Uses the `OrderItem`s Product ID and Price ID to create a unique + * value to check against. + * + * @since 3.0 + * + * @param {OrderItem} model Model to look for. + * @return {bool} True if the Collection contains the Model. + */ + has( model ) { + const duplicates = this.filter( ( item ) => { + const itemId = + item.get( 'productId' ) + '_' + item.get( 'priceId' ); + const modelId = + model.get( 'productId' ) + '_' + model.get( 'priceId' ); + + return itemId === modelId; + } ); + + return duplicates.length > 0; + }, + + /** + * Updates the amounts for all current `OrderItem`s. + * + * @since 3.0 + * + * @return {$.promise} A jQuery promise representing zero or more requests. + */ + updateAmounts() { + const { options } = this; + const { state } = options; + + const items = state.get( 'items' ); + const discounts = new Backbone.Collection( + state.get( 'adjustments' ).getByType( 'discount' ) + ); + + const args = { + country: state.getTaxCountry(), + region: state.getTaxRegion(), + products: items.map( ( item ) => ( { + id: item.get( 'productId' ), + quantity: item.get( 'quantity' ), + options: { + price_id: item.get( 'priceId' ), + } + } ) ), + discountIds: discounts.pluck( 'typeId' ), + }; + + // Keep track of all jQuery Promises. + const promises = []; + + // Find each `OrderItem`'s amounts. + items.models.forEach( ( item ) => { + const getItemAmounts = item.getAmounts( args ); + + getItemAmounts + // Update `OrderItem`-level Adjustments. + .done( ( { adjustments } ) => { + // Map returned Discounts to `OrderAdjustmentDiscount`. + const orderItemDiscounts = adjustments.map( ( adjustment ) => { + return new OrderAdjustmentDiscount( { + ...adjustment, + id: uuid(), + objectId: item.get( 'id' ), + } ); + } ); + + // Gather existing `fee` and `credit` `OrderItem`-level Adjustments. + const orderItemAdjustments = item.get( 'adjustments' ).filter( ( adjustment ) => { + return [ 'fee', 'credit' ].includes( adjustment.type ); + } ); + + // Reset `OrderAdjustments` collection with new data. + item.set( 'adjustments', new OrderAdjustments( [ + ...orderItemDiscounts, + ...orderItemAdjustments, + ] ) ); + } ) + // Update individual `OrderItem`s and `OrderAdjustment`s with new amounts. + .done( ( response ) => item.setAmounts( response ) ); + + // Track jQuery Promise. + promises.push( getItemAmounts ); + } ); + + return $.when.apply( $, promises ); + }, +} ); diff --git a/assets/js/admin/orders/order-overview/collections/order-refunds.js b/assets/js/admin/orders/order-overview/collections/order-refunds.js new file mode 100644 index 00000000000..b10a1bc5ddf --- /dev/null +++ b/assets/js/admin/orders/order-overview/collections/order-refunds.js @@ -0,0 +1,21 @@ +/* global Backbone */ + +/** + * Internal dependencies + */ +import { OrderRefund } from './../models/order-refund.js'; + +/** + * Collection of `OrderRefund`s. + * + * @since 3.0 + * + * @class OrderRefunds + * @augments Backbone.Collection + */ +export const OrderRefunds = Backbone.Collection.extend( { + /** + * @since 3.0 + */ + model: OrderRefund, +} ); diff --git a/assets/js/admin/orders/order-overview/index.js b/assets/js/admin/orders/order-overview/index.js new file mode 100644 index 00000000000..bbdd2766275 --- /dev/null +++ b/assets/js/admin/orders/order-overview/index.js @@ -0,0 +1,106 @@ +/** + * Internal dependencies + */ +import { Currency, NumberFormat } from '@easy-digital-downloads/currency'; +import { Overview } from './views/overview.js'; +import { OrderItems } from './collections/order-items.js'; +import { OrderItem } from './models/order-item.js'; +import { OrderAdjustments } from './collections/order-adjustments.js'; +import { OrderRefunds } from './collections/order-refunds.js'; +import { State } from './models/state.js'; + +// Temporarily include old Refund flow. +import './_refund.js'; + +let overview; + +( () => { + if ( ! window.eddAdminOrderOverview ) { + return; + } + + const { + isAdding, + isRefund, + hasTax, + hasQuantity, + hasDiscounts, + order, + items, + adjustments, + refunds, + } = window.eddAdminOrderOverview; + + const currencyFormatter = new Currency( { + currency: order.currency, + currencySymbol: order.currencySymbol, + } ); + + // Create and hydrate state. + const state = new State( { + isAdding: '1' === isAdding, + isRefund: '1' === isRefund, + hasTax: '0' === hasTax ? false : hasTax, + hasQuantity: '1' === hasQuantity, + hasDiscounts: '1' === hasDiscounts, + formatters: { + currency: currencyFormatter, + // Backbone doesn't merge nested defaults. + number: new NumberFormat(), + }, + order, + } ); + + // Create collections and add to state. + state.set( { + items: new OrderItems( null, { + state, + } ), + adjustments: new OrderAdjustments( null, { + state, + } ), + refunds: new OrderRefunds( null, { + state, + } ), + } ); + + // Create Overview. + overview = new Overview( { + state, + } ); + + // Hydrate collections. + + // Hydrate `OrderItem`s. + // + // Models are created manually before being added to the collection to + // ensure attributes maintain schema with deep model attributes. + items.forEach( ( item ) => { + const orderItemAdjustments = new OrderAdjustments( item.adjustments ); + const orderItem = new OrderItem( { + ...item, + adjustments: orderItemAdjustments, + state, + } ); + + state.get( 'items' ).add( orderItem ); + } ); + + // Hyrdate `Order`-level `Adjustments`. + adjustments.forEach( ( adjustment ) => { + state.get( 'adjustments' ).add( { + state, + ...adjustment, + } ) + } ); + + // Hydrate `OrderRefund`s. + refunds.forEach( ( refund ) => { + state.get( 'refunds' ).add( { + state, + ...refund, + } ); + } ); +} ) (); + +export default overview; diff --git a/assets/js/admin/orders/order-overview/models/order-adjustment-discount.js b/assets/js/admin/orders/order-overview/models/order-adjustment-discount.js new file mode 100644 index 00000000000..b709222440c --- /dev/null +++ b/assets/js/admin/orders/order-overview/models/order-adjustment-discount.js @@ -0,0 +1,76 @@ +/* global _ */ + +/** + * Internal dependencies + */ +import { OrderAdjustment } from './order-adjustment.js'; + +/** + * OrderAdjustmentDiscount + * + * @since 3.0 + * + * @class OrderAdjustmentDiscount + * @augments Backbone.Model + */ +export const OrderAdjustmentDiscount = OrderAdjustment.extend( { + /** + * @since 3.0 + * + * @typedef {Object} OrderAdjustmentDiscount + */ + defaults: { + ...OrderAdjustment.prototype.defaults, + type: 'discount', + }, + + /** + * @since 3.0 + */ + idAttribute: 'typeId', + + /** + * Returns the `OrderAdjustmentDiscount`'s amount based on the current values + * of all `OrderItems` discounts. + * + * @since 3.0 + * + * @return {number} `OrderAdjustmentDiscount` amount. + */ + getAmount() { + let amount = 0; + + const state = this.get( 'state' ); + + // Return stored amount if viewing an existing Order. + if ( false === state.get( 'isAdding' ) ) { + return OrderAdjustment.prototype.getAmount.apply( this, arguments ); + } + + const { models: items } = state.get( 'items' ); + const { number } = state.get( 'formatters' ); + + items.forEach( ( item ) => { + const discount = item.get( 'adjustments' ).findWhere( { + typeId: this.get( 'typeId' ), + } ); + + if ( undefined !== discount ) { + amount += number.unformat( + number.format( discount.get( 'subtotal' ) ) + ); + } + } ); + + return amount; + }, + + /** + * Returns the `OrderAdjustment` total. + * + * @since 3.0 + */ + getTotal() { + return this.getAmount(); + }, +} ); diff --git a/assets/js/admin/orders/order-overview/models/order-adjustment.js b/assets/js/admin/orders/order-overview/models/order-adjustment.js new file mode 100644 index 00000000000..c1876e5c895 --- /dev/null +++ b/assets/js/admin/orders/order-overview/models/order-adjustment.js @@ -0,0 +1,101 @@ +/* global Backbone */ + +/** + * OrderAdjustment + * + * @since 3.0 + * + * @class OrderAdjustment + * @augments Backbone.Model + */ +export const OrderAdjustment = Backbone.Model.extend( { + /** + * @since 3.0 + * + * @typedef {Object} OrderAdjustment + */ + defaults: { + id: 0, + objectId: 0, + objectType: '', + typeId: 0, + type: '', + description: '', + subtotal: 0, + tax: 0, + total: 0, + dateCreated: '', + dateModified: '', + uuid: '', + }, + + /** + * Returns the `OrderAdjustment` amount. + * + * Separate from subtotal or total calculation so `OrderAdjustmentDiscount` + * can be calculated independently. + * + * @see OrderAdjustmentDiscount.prototype.getAmount() + * + * @since 3.0 + */ + getAmount() { + return this.get( 'subtotal' ); + }, + + /** + * Retrieves the `OrderAdjustment` tax. + * + * @since 3.0.0 + * + * @return {number} Total amount. + */ + getTax() { + return this.get( 'tax' ); + }, + + /** + * Returns the `OrderAdjustment` total. + * + * @since 3.0 + */ + getTotal() { + // Fees always have tax added exclusively. + // @link https://github.com/easydigitaldownloads/easy-digital-downloads/issues/2445#issuecomment-53215087 + // @link https://github.com/easydigitaldownloads/easy-digital-downloads/blob/f97f4f6f5454921a2014dc1fa8f4caa5f550108c/includes/cart/class-edd-cart.php#L1306-L1311 + return this.get( 'subtotal' ) + this.get( 'tax' ); + }, + + /** + * Recalculates the tax amount based on the current tax rate. + * + * @since 3.0.0 + */ + updateTax() { + const state = this.get( 'state' ); + const hasTax = state.get( 'hasTax' ); + + if ( + 'none' === hasTax || + '' === hasTax.country || + '' === hasTax.rate + ) { + return; + } + + const { number } = state.get( 'formatters' ); + const taxRate = hasTax.rate / 100; + const adjustments = state.get( 'adjustments' ).getByType( 'fee' ); + + adjustments.forEach( ( adjustment ) => { + if ( false === adjustment.get( 'isTaxable' ) ) { + return; + } + + const taxableAmount = adjustment.getAmount(); + const taxAmount = number.unformat( taxableAmount * taxRate ); + + adjustment.set( 'tax', taxAmount ); + } ); + } +} ); diff --git a/assets/js/admin/orders/order-overview/models/order-item.js b/assets/js/admin/orders/order-overview/models/order-item.js new file mode 100644 index 00000000000..8b45c29d7e2 --- /dev/null +++ b/assets/js/admin/orders/order-overview/models/order-item.js @@ -0,0 +1,250 @@ +/* global Backbone, _, $ */ + +/** + * Internal dependencies + */ +import { OrderAdjustments } from './../collections/order-adjustments.js'; + +/** + * OrderItem + * + * @since 3.0 + * + * @class OrderItem + * @augments Backbone.Model + */ +export const OrderItem = Backbone.Model.extend( { + /** + * @since 3.0 + * + * @typedef {Object} OrderItem + */ + defaults: { + id: 0, + orderId: 0, + productId: 0, + productName: '', + priceId: null, + cartIndex: 0, + type: 'download', + status: '', + statusLabel: '', + quantity: 1, + amount: 0, + subtotal: 0, + discount: 0, + tax: 0, + total: 0, + dateCreated: '', + dateModified: '', + uuid: '', + + // Track manually set amounts. + amountManual: 0, + taxManual: 0, + subtotalManual: 0, + + // Track if the amounts have been adjusted manually on addition. + _isAdjustingManually: false, + + // Track `OrderItem`-level adjustments. + // + // The handling of Adjustments in the API is currently somewhat + // fragmented with certain extensions creating Adjustments at the + // `Order` level, some at a duplicate `OrderItem` level, and some both. + adjustments: new OrderAdjustments(), + }, + + /** + * Returns the `OrderItem` subtotal amount. + * + * @since 3.0.0 + * + * @param {bool} includeTax If taxes should be included when retrieving the subtotal. + * This is needed in some scenarios with inclusive taxes. + * @return {number} Subtotal amount. + */ + getSubtotal( includeTax = false ) { + const state = this.get( 'state' ); + const subtotal = this.get( 'subtotal' ); + + // Use stored value if the record has already been created. + if ( false === state.get( 'isAdding' ) ) { + return subtotal; + } + + // Calculate subtotal. + if ( true === state.hasInclusiveTax() && false === includeTax ) { + return subtotal - this.getTax(); + } + + return subtotal; + }, + + /** + * Returns the Discount amount. + * + * If an Order is being added the amount is calculated based + * on the total of `OrderItem`-level Adjustments that are + * currently applied. + * + * If an Order has already been added use the amount stored + * directly in the database. + * + * @since 3.0 + * + * @return {number} Discount amount. + */ + getDiscountAmount() { + let amount = 0; + + const discounts = this.get( 'adjustments' ).getByType( 'discount' ); + + if ( 0 === discounts.length ) { + return this.get( 'discount' ); + } + + discounts.forEach( ( discount ) => { + amount += +discount.get( 'subtotal' ); + } ); + + return amount; + }, + + /** + * Retrieves the rounded Tax for the order item. + * + * Rounded to match storefront checkout. + * + * @since 3.0.0 + * + * @return {number} Total amount. + */ + getTax() { + const state = this.get( 'state' ); + const tax = this.get( 'tax' ); + + // Use stored value if the record has already been created. + if ( false === state.get( 'isAdding' ) ) { + return tax; + } + + // Calculate tax. + const { number } = state.get( 'formatters' ); + + return number.unformat( number.format( tax ) ); + }, + + /** + * Retrieves the Total for the order item. + * + * @since 3.0.0 + * + * @return {number} Total amount. + */ + getTotal() { + const state = this.get( 'state' ); + + // Use stored value if the record has already been created. + if ( false === state.get( 'isAdding' ) ) { + return this.get( 'total' ); + } + + // Calculate total. + if ( true === state.hasInclusiveTax() ) { + return this.get( 'subtotal' ) - this.getDiscountAmount(); + } + + return ( this.get( 'subtotal' ) - this.getDiscountAmount() ) + this.getTax(); + }, + + /** + * Retrieves amounts for the `OrderItem` based on other `OrderItem`s and `OrderAdjustment`s. + * + * @since 3.0 + * + * @param {Object} args Arguments to pass as data in the XHR request. + * @param {string} args.country Country code to determine tax rate. + * @param {string} args.region Region to determine tax rate. + * @param {Array} args.products List of current products added to the order. + * @param {Array} args.discountIds List of `OrderAdjustmentDiscount`s to calculate amounts against. + * @return {$.promise} A jQuery promise that represents the request. + */ + getAmounts( { + country = '', + region = '', + products = [], + discountIds = [], + } ) { + const { + nonces: { edd_admin_order_get_item_amounts: nonce }, + } = window.eddAdminOrderOverview; + + const { productId, priceId, quantity, amount, tax, subtotal } = _.clone( + this.attributes + ); + + return wp.ajax.send( 'edd-admin-order-get-item-amounts', { + data: { + nonce, + productId, + priceId, + quantity, + amount, + tax, + subtotal, + country, + region, + products: _.uniq( [ + ...products, + { + id: productId, + quantity, + options: { + price_id: priceId, + }, + }, + ], function( { id, options: { price_id } } ) { + return `${ id }_${ price_id }` + } ), + discounts: _.uniq( discountIds ), + }, + } ); + }, + + /** + * Bulk sets amounts. + * + * Only adjusts the Discount amount if adjusting manually. + * + * @since 3.0 + * + * @param {Object} amounts Amounts to set. + * @param {number} amounts.amount `OrderItem` unit price. + * @param {number} amounts.discount `OrderItem` discount amount. + * @param {number} amounts.tax `OrderItem` tax amount. + * @param {number} amounts.subtotal `OrderItem` subtotal amount. + * @param {number} amounts.total `OrderItem` total amount. + */ + setAmounts( { + amount = 0, + discount = 0, + tax = 0, + subtotal = 0, + total = 0, + } ) { + if ( true === this.get( '_isAdjustingManually' ) ) { + this.set( { + discount, + } ); + } else { + this.set( { + amount, + discount, + tax, + subtotal, + total, + } ); + } + }, +} ); diff --git a/assets/js/admin/orders/order-overview/models/order-refund.js b/assets/js/admin/orders/order-overview/models/order-refund.js new file mode 100644 index 00000000000..99be2a92205 --- /dev/null +++ b/assets/js/admin/orders/order-overview/models/order-refund.js @@ -0,0 +1,24 @@ +/* global Backbone */ + +/** + * OrderRefund + * + * @since 3.0 + * + * @class OrderRefund + * @augments Backbone.Model + */ +export const OrderRefund = Backbone.Model.extend( { + /** + * @since 3.0 + * + * @typedef {Object} OrderAdjustment + */ + defaults: { + id: 0, + number: '', + total: 0, + dateCreated: '', + dateCreatedi18n: '', + }, +} ); diff --git a/assets/js/admin/orders/order-overview/models/state.js b/assets/js/admin/orders/order-overview/models/state.js new file mode 100644 index 00000000000..40f281b1a5f --- /dev/null +++ b/assets/js/admin/orders/order-overview/models/state.js @@ -0,0 +1,233 @@ +/* global Backbone, _ */ + +/** + * Internal dependencies + */ +import { Currency, NumberFormat } from '@easy-digital-downloads/currency'; + +/** + * State + * + * Leverages `Backbone.Model` and subsequently `Backbone.Events` + * to easily track changes to top level state changes. + * + * @since 3.0 + * + * @class State + * @augments Backbone.Model + */ +export const State = Backbone.Model.extend( + /** Lends State.prototype */ { + /** + * @since 3.0 + * + * @typedef {Object} State + */ + defaults: { + isAdding: false, + isFetching: false, + hasQuantity: false, + hasTax: false, + items: [], + adjustments: [], + refunds: [], + formatters: { + currency: new Currency(), + number: new NumberFormat(), + }, + }, + + /** + * Returns the current tax rate's country code. + * + * @since 3.0 + * + * @return {string} Tax rate country code. + */ + getTaxCountry() { + return false !== this.get( 'hasTax' ) + ? this.get( 'hasTax' ).country + : ''; + }, + + /** + * Returns the current tax rate's region. + * + * @since 3.0 + * + * @return {string} Tax rate region. + */ + getTaxRegion() { + return false !== this.get( 'hasTax' ) + ? this.get( 'hasTax' ).region + : ''; + }, + + /** + * Retrieves the Order subtotal. + * + * @since 3.0 + * + * @param {bool} includeTax If taxes should be included when retrieving the subtotal. + * This is needed in some scenarios with inclusive taxes. + * @return {number} Order subtotal. + */ + getSubtotal( includeTax = false ) { + // Use stored value if the record has already been created. + if ( false === this.get( 'isAdding' ) ) { + return this.get( 'order' ).subtotal; + } + + const { models: items } = this.get( 'items' ); + + return items.reduce( + ( amount, item ) => { + return amount += +item.getSubtotal( includeTax ); + }, + 0 + ); + }, + + /** + * Retrieves the Order discount. + * + * @since 3.0 + * + * @return {number} Order discount. + */ + getDiscount() { + // Use stored value if the record has already been created. + if ( false === this.get( 'isAdding' ) ) { + return this.get( 'order' ).discount; + } + + const adjustments = this.get( 'adjustments' ).getByType( 'discount' ); + + return adjustments.reduce( + ( amount, adjustment ) => { + return amount += +adjustment.getAmount(); + }, + 0 + ); + }, + + /** + * Retrieves the Order tax. + * + * @since 3.0 + * + * @return {number} Order tax. + */ + getTax() { + // Use stored value if the record has already been created. + if ( false === this.get( 'isAdding' ) ) { + return this.get( 'order' ).tax; + } + + const items = this.get( 'items' ).models; + const feesTax = this.getFeesTax(); + + return items.reduce( + ( amount, item ) => { + return amount += +item.getTax(); + }, + feesTax + ); + }, + + /** + * Retrieves the Order tax amount for fees. + * + * @since 3.0 + * + * @return {number} Order tax amount for fees. + */ + getFeesTax() { + // Use stored value if the record has already been created. + if ( false === this.get( 'isAdding' ) ) { + return this.get( 'order' ).tax; + } + + const adjustments = this.get( 'adjustments' ).getByType( 'fee' ); + + return adjustments.reduce( + ( amount, item ) => { + return amount += +item.getTax(); + }, + 0 + ); + }, + + /** + * Retrieves the Order total. + * + * @since 3.0 + * + * @return {number} Order total. + */ + getTotal() { + // Use stored value if the record has already been created. + if ( false === this.get( 'isAdding' ) ) { + return this.get( 'order' ).total; + } + + // Calculate all adjustments that affect the total. + const { models: adjustments } = this.get( 'adjustments' ); + const includeTaxInSubtotal = true; + + const adjustedSubtotal = adjustments.reduce( + ( amount, adjustment ) => { + if ( + [ 'discount', 'credit' ].includes( + adjustment.get( 'type' ) + ) + ) { + return amount -= +adjustment.getAmount(); + } else { + return amount += +adjustment.get( 'subtotal' ); + } + }, + this.getSubtotal( includeTaxInSubtotal ) + ); + + if ( true === this.hasInclusiveTax() ) { + // Fees always have tax added exclusively. + // @link https://github.com/easydigitaldownloads/easy-digital-downloads/issues/2445#issuecomment-53215087 + // @link https://github.com/easydigitaldownloads/easy-digital-downloads/blob/f97f4f6f5454921a2014dc1fa8f4caa5f550108c/includes/cart/class-edd-cart.php#L1306-L1311 + return adjustedSubtotal + this.getFeesTax(); + } + + return adjustedSubtotal + this.getTax(); + }, + + /** + * Determines if the state has a new, valid, tax rate. + * + * @since 3.0 + * + * @return {bool} True if the rate has changed. + */ + hasNewTaxRate() { + const hasTax = this.get( 'hasTax' ); + + if ( false === hasTax ) { + return false; + } + + const prevHasTax = this.previous( 'hasTax' ); + + return ! _.isEqual( hasTax, prevHasTax ); + }, + + /** + * Determines if the state has prices entered inclusive of tax. + * + * @since 3.0 + * + * @returns {bool} True if prices are entered inclusive of tax. + */ + hasInclusiveTax() { + return this.get( 'hasTax' ).inclusive; + } + } +); diff --git a/assets/js/admin/orders/order-overview/views/actions.js b/assets/js/admin/orders/order-overview/views/actions.js new file mode 100644 index 00000000000..9673c3a9912 --- /dev/null +++ b/assets/js/admin/orders/order-overview/views/actions.js @@ -0,0 +1,91 @@ +/** + * Internal dependencies + */ +import { edd_attach_tooltips as setupTooltips } from 'admin/components/tooltips'; +import { FormAddOrderItem } from './form-add-order-item.js'; +import { FormAddOrderDiscount } from './form-add-order-discount.js'; +import { FormAddOrderAdjustment } from './form-add-order-adjustment.js'; + +/** + * Actions + * + * @since 3.0 + * + * @class Actions + * @augments wp.Backbone.View + */ +export const Actions = wp.Backbone.View.extend( { + /** + * @since 3.0 + */ + el: '#edd-order-overview-actions', + + /** + * @since 3.0 + */ + template: wp.template( 'edd-admin-order-actions' ), + + /** + * @since 3.0 + */ + events: { + 'click #add-item': 'onAddOrderItem', + 'click #add-discount': 'onAddOrderDiscount', + 'click #add-adjustment': 'onAddOrderAdjustment', + }, + + /** + * Ensures tooltips can be used after render. + * + * @since 3.0 + * + * @return {Object} + */ + render() { + wp.Backbone.View.prototype.render.apply( this, arguments ); + + // Setup Tooltips after render. + setupTooltips( $( '.edd-help-tip' ) ); + + return this; + }, + + /** + * Renders the "Add Item" flow. + * + * @since 3.0 + * + * @param {Object} e Click event. + */ + onAddOrderItem( e ) { + e.preventDefault(); + + new FormAddOrderItem( this.options ).openDialog().render(); + }, + + /** + * Renders the "Add Discount" flow. + * + * @since 3.0 + * + * @param {Object} e Click event. + */ + onAddOrderDiscount( e ) { + e.preventDefault(); + + new FormAddOrderDiscount( this.options ).openDialog().render(); + }, + + /** + * Renders the "Add Adjustment" flow. + * + * @since 3.0 + * + * @param {Object} e Click event. + */ + onAddOrderAdjustment( e ) { + e.preventDefault(); + + new FormAddOrderAdjustment( this.options ).openDialog().render(); + }, +} ); diff --git a/assets/js/admin/orders/order-overview/views/base.js b/assets/js/admin/orders/order-overview/views/base.js new file mode 100644 index 00000000000..000bfb91d7b --- /dev/null +++ b/assets/js/admin/orders/order-overview/views/base.js @@ -0,0 +1,258 @@ +/* global _, $ */ + +/** + * WordPress dependencies + */ +import { focus } from '@wordpress/dom'; + +/** + * Internal dependencies + */ +import { getChosenVars } from 'utils/chosen.js'; + +// Set noconflict when using Lodash (@wordpress packages) and Underscores. +// @todo Find a better place to set this up. Webpack? +window.lodash = _.noConflict(); + +/** + * Base + * + * Supplies additional functionality and helpers beyond + * what is provided by `wp.Backbone.View`. + * + * - Maintains focus and caret positioning on rendering. + * - Extends events via `addEvents()`. + * + * @since 3.0 + * + * @class Base + * @augments wp.Backbone.View + */ +export const Base = wp.Backbone.View.extend( { + /** + * Defines base events to help maintain focus and caret position. + * + * @since 3.0 + */ + events: { + 'keydown input': 'handleTabBehavior', + 'keydown textarea': 'handleTabBehavior', + + 'focus input': 'onFocus', + 'focus textarea': 'onFocus', + 'focus select': 'onFocus', + + 'change input': 'onChange', + 'change textarea': 'onChange', + 'change select': 'onChange', + 'input input': 'onChange', + 'input textarea': 'onChange', + 'input select': 'onChange', + }, + + /** + * Sets up additional properties. + * + * @since 3.0 + */ + preinitialize() { + this.focusedEl = null; + this.focusedElCaretPos = 0; + + wp.Backbone.View.prototype.preinitialize.apply( this, arguments ); + }, + + /** + * Merges additional events with existing events. + * + * @since 3.0 + * + * @param {Object} events Hash of events to add. + */ + addEvents( events ) { + this.delegateEvents( { + ...this.events, + ...events, + } ); + }, + + /** + * Moves the focus when dealing with tabbing. + * + * @since 3.0 + * + * @param {Object} e Keydown event. + */ + handleTabBehavior( e ) { + const { keyCode, shiftKey, target } = e; + + // 9 = TAB + if ( 9 !== keyCode ) { + return; + } + + const tabbables = focus.tabbable.find( this.el ); + + if ( ! tabbables.length ) { + return; + } + + const firstTabbable = tabbables[ 0 ]; + const lastTabbable = tabbables[ tabbables.length - 1 ]; + let toFocus; + + if ( shiftKey && target === firstTabbable ) { + toFocus = lastTabbable; + } else if ( ! shiftKey && target === lastTabbable ) { + toFocus = firstTabbable; + } else if ( shiftKey ) { + toFocus = focus.tabbable.findPrevious( target ); + } else { + toFocus = focus.tabbable.findNext( target ); + } + + if ( 'undefined' !== typeof toFocus ) { + this.focusedEl = toFocus; + this.focusedElCaretPos = toFocus.value.length; + } else { + this.focusedEl = null; + this.focusedElCaretPos = 0; + } + }, + + /** + * Tracks the current element when focusing. + * + * @since 3.0 + * + * @param {Object} e Change event. + */ + onFocus( e ) { + this.focusedEl = e.target; + }, + + /** + * Tracks the current cursor position when editing. + * + * @since 3.0 + * + * @param {Object} e Change event. + */ + onChange( e ) { + const { target, keyCode } = e; + + // 9 = TAB + if ( undefined !== typeof keyCode && 9 === keyCode ) { + return; + } + + try { + if ( target.selectionStart ) { + this.focusedElCaretPos = target.selectionStart; + } + } catch ( error ) { + this.focusedElCaretPos = target.value.length; + } + }, + + /** + * Prepares data to be used in `render` method. + * + * @since 3.0 + * + * @see wp.Backbone.View + * @see https://github.com/WordPress/WordPress/blob/master/wp-includes/js/wp-backbone.js + * + * @return {Object} The data for this view. + */ + prepare() { + return this.model + ? { + ...this.model.toJSON(), + state: this.model.get( 'state' ).toJSON(), + } + : {}; + }, + + /** + * Adds additional handling after initial render. + * + * @since 3.0 + */ + render() { + wp.Backbone.View.prototype.render.apply( this, arguments ); + + this.initializeSelects(); + this.setFocus(); + + return this; + }, + + /** + * Reinitializes special ' ); + } else { + this.$el.html( this.states ); + this.$el.find( 'select' ).each( function() { + const el = $( this ); + el.chosen( getChosenVars( el ) ); + } ); + } + }, +} ); + +export default RegionField; diff --git a/assets/js/admin/settings/tax-rates/views/table-add.js b/assets/js/admin/settings/tax-rates/views/table-add.js new file mode 100644 index 00000000000..bf96ae18ee6 --- /dev/null +++ b/assets/js/admin/settings/tax-rates/views/table-add.js @@ -0,0 +1,240 @@ +/* global wp */ + +/** + * Internal dependencies. + */ +import TaxRate from './../models/tax-rate.js'; +import RegionField from './../views/region-field.js'; +import { getChosenVars } from 'utils/chosen.js'; + +/** + * Add a new rate "form". + */ +const TableAdd = wp.Backbone.View.extend( { + // Use + tagName: 'tfoot', + + // Set class. + className: 'add-new', + + // See https://codex.wordpress.org/Javascript_Reference/wp.template + template: wp.template( 'edd-admin-tax-rates-table-add' ), + + // Watch events. + events: { + 'click button': 'addTaxRate', + 'keypress': 'maybeAddTaxRate', + + 'change #tax_rate_country': 'setCountry', + + // Can be select or input. + 'keyup #tax_rate_region': 'setRegion', + 'change #tax_rate_region': 'setRegion', + + 'change input[type="checkbox"]': 'setGlobal', + + // Can be click increase or keyboard. + 'keyup #tax_rate_amount': 'setAmount', + 'change #tax_rate_amount': 'setAmount', + }, + + /** + * Set initial state and bind changes to model. + */ + initialize: function() { + this.model = new TaxRate( { + global: true, + unsaved: true, + } ); + + this.listenTo( this.model, 'change:country', this.updateRegion ); + this.listenTo( this.model, 'change:global', this.updateRegion ); + }, + + /** + * Render. Only overwritten so we can reinit chosen once cleared. + */ + render: function() { + wp.Backbone.View.prototype.render.apply( this, arguments ); + + this.$el.find( 'select' ).each( function() { + const el = $( this ); + el.chosen( getChosenVars( el ) ); + } ); + + return this; + }, + + /** + * Show a list of states or an input field. + */ + updateRegion: function() { + const self = this; + + const data = { + action: 'edd_get_shop_states', + country: this.model.get( 'country' ), + nonce: eddTaxRates.nonce, + field_name: 'tax_rate_region', + }; + + $.post( ajaxurl, data, function( response ) { + self.views.set( '#tax_rate_region_wrapper', new RegionField( { + states: response, + global: self.model.get( 'global' ), + } ) ); + } ); + }, + + /** + * Set a country value. + * + * @param {Object} event Event. + */ + setCountry: function( event ) { + let country = event.target.options[ event.target.selectedIndex ].value; + let regionGlobalCheckbox = document.getElementById( "tax_rate_region_global" ); + if ( 'all' === country ) { + country = '*'; + regionGlobalCheckbox.checked = true; + this.model.set( 'region', '' ); + this.model.set( 'global', true ); + regionGlobalCheckbox.readOnly = true; + regionGlobalCheckbox.disabled = true; + } else { + regionGlobalCheckbox.disabled = false; + regionGlobalCheckbox.readOnly = false; + } + + this.model.set( 'country', country ); + }, + + /** + * Set a region value. + * + * @param {Object} event Event. + */ + setRegion: function( event ) { + let value = false; + + if ( event.target.value ) { + value = event.target.value; + } else { + value = event.target.options[ event.target.selectedIndex ].value; + } + + this.model.set( 'region', value ); + }, + + /** + * Set a global scope. + * + * @param {Object} event Event. + */ + setGlobal: function( event ) { + let isChecked = event.target.checked; + this.model.set( 'global', isChecked ); + if ( true === isChecked ) { + this.model.set( 'region', '' ); + } + }, + + /** + * Set an amount value. + * + * @param {Object} event Event. + */ + setAmount: function( event ) { + this.model.set( 'amount', event.target.value ); + }, + + /** + * Monitors keyepress for "Enter" key. + * + * We cannot use the `submit` event because we cannot nest

+ * elements inside the settings API. + * + * @param {Object} event Keypress event. + */ + maybeAddTaxRate: function( event ) { + if ( 13 !== event.keyCode ) { + return; + } + + this.addTaxRate( event ); + }, + + /** + * Add a single rate when the "form" is submitted. + * + * @param {Object} event Event. + */ + addTaxRate: function( event ) { + event.preventDefault(); + + const { i18n } = eddTaxRates; + + if ( ! this.model.get( 'country' ) ) { + alert( i18n.emptyCountry ); + + return; + } + + let addingRegion = this.model.get( 'region' ); + let addingCountry = this.model.get( 'country' ); + let addingGlobal = '' === this.model.get( 'region' ); + + // For the purposes of this query, the * is really an empty query. + if ( '*' === addingCountry ) { + addingCountry = ''; + addingRegion = ''; + addingGlobal = false; + } + + const existingCountryWide = this.collection.where( { + region: addingRegion, + country: addingCountry, + global: addingGlobal, + status: 'active', + } ); + + if ( existingCountryWide.length > 0 ) { + const countryString = '' === addingCountry + ? '*' + : addingCountry; + + const regionString = '' === addingRegion + ? '' + : ': ' + addingRegion; + + const taxRateString = countryString + regionString; + + alert( i18n.duplicateRate.replace( '%s', `"${ taxRateString }"` ) ); + + return; + } + + if ( this.model.get( 'amount' ) < 0 ) { + alert( i18n.negativeTax ); + + return; + } + + if ( this.model.get( 'amount' ) == 0 ) { + confirm( i18n.emptyTax ); + } + + // Merge cid as ID to make this a unique model. + this.collection.add( _.extend( + this.model.attributes, + { + id: this.model.cid, + } + ) ); + + this.render(); + this.initialize(); + }, +} ); + +export default TableAdd; diff --git a/assets/js/admin/settings/tax-rates/views/table-meta.js b/assets/js/admin/settings/tax-rates/views/table-meta.js new file mode 100644 index 00000000000..9c0ae0544e6 --- /dev/null +++ b/assets/js/admin/settings/tax-rates/views/table-meta.js @@ -0,0 +1,33 @@ +/* global wp, _ */ + +/** + * Output a table header and footer. + */ +const TableMeta = wp.Backbone.View.extend( { + // See https://codex.wordpress.org/Javascript_Reference/wp.template + template: wp.template( 'edd-admin-tax-rates-table-meta' ), + + // Watch events. + events: { + 'change [type="checkbox"]': 'selectAll', + }, + + /** + * Select all items in the collection. + * + * @param {Object} event Event. + */ + selectAll: function( event ) { + const checked = event.target.checked; + + _.each( this.collection.models, ( model ) => { + // Check individual models. + model.set( 'selected', checked ); + + // Add to global selection. + this.collection.selected.push( model.cid ); + } ); + }, +} ); + +export default TableMeta; diff --git a/assets/js/admin/settings/tax-rates/views/table-row-empty.js b/assets/js/admin/settings/tax-rates/views/table-row-empty.js new file mode 100644 index 00000000000..2f313fd979c --- /dev/null +++ b/assets/js/admin/settings/tax-rates/views/table-row-empty.js @@ -0,0 +1,17 @@ +/* global wp */ + +/** + * Empty tax rates table. + */ +const TableRowEmpty = wp.Backbone.View.extend( { + // Insert as a + tagName: 'tr', + + // Set class. + className: 'edd-tax-rate-row edd-tax-rate-row--is-empty', + + // See https://codex.wordpress.org/Javascript_Reference/wp.template + template: wp.template( 'edd-admin-tax-rates-table-row-empty' ), +} ); + +export default TableRowEmpty; diff --git a/assets/js/admin/settings/tax-rates/views/table-row.js b/assets/js/admin/settings/tax-rates/views/table-row.js new file mode 100644 index 00000000000..cbfebcac207 --- /dev/null +++ b/assets/js/admin/settings/tax-rates/views/table-row.js @@ -0,0 +1,119 @@ +/* global wp, _ */ + +/** + * A row inside a table of rates. + */ +const TableRow = wp.Backbone.View.extend( { + // Insert as a + tagName: 'tr', + + // Set class. + className: function() { + return 'edd-tax-rate-row edd-tax-rate-row--' + this.model.get( 'status' ); + }, + + // See https://codex.wordpress.org/Javascript_Reference/wp.template + template: wp.template( 'edd-admin-tax-rates-table-row' ), + + // Watch events. + events: { + 'click .remove': 'removeRow', + 'click .activate': 'activateRow', + 'click .deactivate': 'deactivateRow', + 'change [type="checkbox"]': 'selectRow', + }, + + /** + * Bind model to view. + */ + initialize: function() { + this.listenTo( this.model, 'change', this.render ); + }, + + /** + * Render + */ + render: function() { + this.$el.html( this.template( { + ...this.model.toJSON(), + formattedAmount: this.model.formattedAmount(), + } ) ); + + // Ensure the wrapper class has the new name. + this.$el.attr( 'class', _.result( this, 'className' ) ); + }, + + /** + * Remove a rate (can only be done if it has not been saved to the database). + * + * Don't use this.model.destroy() to avoid sending a DELETE request. + * + * @param {Object} event Event. + */ + removeRow: function( event ) { + event.preventDefault(); + + this.collection.remove( this.model ); + }, + + /** + * Activate a rate. + * + * @param {Object} event Event. + */ + activateRow: function( event ) { + event.preventDefault(); + + const { i18n } = eddTaxRates; + const existingCountryWide = this.collection.where( { + region: this.model.get( 'region' ), + country: this.model.get( 'country' ), + global: '' === this.model.get( 'region' ), + status: 'active', + } ); + + if ( existingCountryWide.length > 0 ) { + const regionString = '' === this.model.get( 'region' ) + ? '' + : ': ' + this.model.get( 'region' ); + + const taxRateString = this.model.get( 'country' ) + regionString; + + alert( i18n.duplicateRate.replace( '%s', `"${ taxRateString }"` ) ); + + return; + } + + this.model.set( 'status', 'active' ); + }, + + /** + * Deactivate a rate. + * + * @param {Object} event Event. + */ + deactivateRow: function( event ) { + event.preventDefault(); + + this.model.set( 'status', 'inactive' ); + }, + + /** + * Select or deselect for bulk actions. + * + * @param {Object} event Event. + */ + selectRow: function( event ) { + const checked = event.target.checked; + + if ( ! checked ) { + this.collection.selected = _.reject( this.collection.selected, ( cid ) => { + return cid === this.model.cid; + } ); + } else { + this.collection.selected.push( this.model.cid ); + } + }, +} ); + +export default TableRow; diff --git a/assets/js/admin/settings/tax-rates/views/table-rows.js b/assets/js/admin/settings/tax-rates/views/table-rows.js new file mode 100644 index 00000000000..08c3bef383e --- /dev/null +++ b/assets/js/admin/settings/tax-rates/views/table-rows.js @@ -0,0 +1,65 @@ +/* global wp, _ */ + +/** + * Internal dependencies. + */ +import TableRowEmpty from './table-row-empty.js'; +import TableRow from './table-row.js'; + +/** + * A bunch of rows inside a table of rates. + */ +const TableRows = wp.Backbone.View.extend( { + // Insert as a + tagName: 'tbody', + + /** + * Bind events to collection. + */ + initialize: function() { + this.listenTo( this.collection, 'add', this.render ); + this.listenTo( this.collection, 'remove', this.render ); + this.listenTo( this.collection, 'filtered change', this.filtered ); + }, + + /** + * Render a collection of rows. + */ + render: function() { + // Clear to handle sorting. + this.views.remove(); + + // Show empty placeholder. + if ( 0 === this.collection.models.length ) { + return this.views.add( new TableRowEmpty() ); + } + + // Add items. + _.each( this.collection.models, ( rate ) => { + this.views.add( new TableRow( { + collection: this.collection, + model: rate, + } ) ); + } ); + }, + + /** + * Show an empty state if all items are deactivated. + */ + filtered: function() { + const disabledRates = this.collection.where( { + status: 'inactive', + } ); + + // Check if all rows are invisible, and show the "No Items" row if so + if ( disabledRates.length === this.collection.models.length && ! this.collection.showAll ) { + this.views.add( new TableRowEmpty() ); + + // Possibly re-render the view + } else { + this.render(); + } + }, +} ); + +export default TableRows; diff --git a/assets/js/admin/settings/tax-rates/views/table.js b/assets/js/admin/settings/tax-rates/views/table.js new file mode 100644 index 00000000000..f6f39871341 --- /dev/null +++ b/assets/js/admin/settings/tax-rates/views/table.js @@ -0,0 +1,50 @@ +/* global wp */ + +/** + * Internal dependencies. + */ +import TableMeta from './table-meta.js'; +import TableRows from './table-rows.js'; +import TableAdd from './table-add.js'; + +/** + * Manage the tax rate rows in a table. + */ +const Table = wp.Backbone.View.extend( { + // Render as a tag. + tagName: 'table', + + // Set class. + className: 'wp-list-table widefat fixed tax-rates', + + // Set ID. + id: 'edd_tax_rates', + + /** + * Output a table with a header, body, and footer. + */ + render: function() { + this.views.add( new TableMeta( { + tagName: 'thead', + collection: this.collection, + } ) ); + + this.views.add( new TableRows( { + collection: this.collection, + } ) ); + + this.views.add( new TableAdd( { + collection: this.collection, + } ) ); + + this.views.add( new TableMeta( { + tagName: 'tfoot', + collection: this.collection, + } ) ); + + // Trigger the `filtered` action to show/hide rows accordingly + this.collection.trigger( 'filtered' ); + }, +} ); + +export default Table; diff --git a/assets/js/admin/stripe/index.js b/assets/js/admin/stripe/index.js new file mode 100644 index 00000000000..e0780b00735 --- /dev/null +++ b/assets/js/admin/stripe/index.js @@ -0,0 +1,124 @@ +/* global $, edd_stripe_admin */ + +/** + * Internal dependencies. + */ +// import './../../../css/src/admin.scss'; +import './settings/index.js'; + +let testModeCheckbox; +let testModeToggleNotice; + +$( document ).ready( function() { + testModeCheckbox = document.getElementById( 'edd_settings[test_mode]' ); + if ( testModeCheckbox ) { + testModeToggleNotice = document.getElementById( 'edd_settings[stripe_connect_test_mode_toggle_notice]' ); + EDD_Stripe_Connect_Scripts.init(); + } + + // Toggle API keys. + $( '.edds-api-key-toggle button' ).on( 'click', function( event ) { + event.preventDefault(); + + $( '.edds-api-key-toggle, .edds-api-key-row' ) + .toggleClass( 'edd-hidden' ); + } ); + + const elementsModeToggle = $( '.stripe-elements-mode select' ); + if ( elementsModeToggle ) { + + // Listen to the elements mode toggle. + elementsModeToggle.on( 'change', function() { + $( '.card-elements-feature' ).toggleClass( 'edd-hidden' ); + $( '.payment-elements-feature' ).toggleClass( 'edd-hidden' ); + } ); + } + + /** + * Handle showing/hiding the Statement Descriptor Prefix field based on the toggle. + */ + const statementDescriptorSummaryToggle = document.getElementById( 'edd_settings[stripe_include_purchase_summary_in_statement_descriptor]' ); + if ( statementDescriptorSummaryToggle ) { + statementDescriptorSummaryToggle.addEventListener( 'change', function() { + $( '.statement-descriptor-prefix' ).toggleClass( 'edd-hidden' ); + } ); + } +} ); + +const EDD_Stripe_Connect_Scripts = { + + init() { + this.listeners(); + }, + + listeners() { + const self = this; + + testModeCheckbox.addEventListener( 'change', function() { + // Don't run these events if Stripe is not enabled. + if ( ! edd_stripe_admin.stripe_enabled ) { + return; + } + + if ( this.checked ) { + if ( 'false' === edd_stripe_admin.test_key_exists ) { + self.showNotice( testModeToggleNotice, 'warning' ); + self.addHiddenMarker(); + } else { + self.hideNotice( testModeToggleNotice ); + const hiddenMarker = document.getElementById( 'edd-test-mode-toggled' ); + if ( hiddenMarker ) { + hiddenMarker.parentNode.removeChild( hiddenMarker ); + } + } + } + + if ( ! this.checked ) { + if ( 'false' === edd_stripe_admin.live_key_exists ) { + self.showNotice( testModeToggleNotice, 'warning' ); + self.addHiddenMarker(); + } else { + self.hideNotice( testModeToggleNotice ); + const hiddenMarker = document.getElementById( 'edd-test-mode-toggled' ); + if ( hiddenMarker ) { + hiddenMarker.parentNode.removeChild( hiddenMarker ); + } + } + } + } ); + }, + + addHiddenMarker() { + const submit = document.getElementById( 'submit' ); + + if ( ! submit ) { + return; + } + + submit.parentNode.insertAdjacentHTML( 'beforeend', '' ); + }, + + showNotice( element = false, type = 'error' ) { + if ( ! element ) { + return; + } + + if ( typeof element !== 'object' ) { + return; + } + + element.className = 'notice inline notice-' + type; + }, + + hideNotice( element = false ) { + if ( ! element ) { + return; + } + + if ( typeof element !== 'object' ) { + return; + } + + element.className = 'edd-hidden'; + }, +}; diff --git a/assets/js/admin/stripe/notices.js b/assets/js/admin/stripe/notices.js new file mode 100644 index 00000000000..80653d4dab7 --- /dev/null +++ b/assets/js/admin/stripe/notices.js @@ -0,0 +1,36 @@ +/* global wp, jQuery */ + +/** + * Handle dismissing admin notices. + */ +jQuery( () => { + /** + * Loops through each admin notice on the page for processing. + * + * @param {HTMLElement} noticeEl Notice element. + */ + jQuery( '.edds-admin-notice' ).each( function() { + const notice = $( this ); + const id = notice.data( 'id' ); + const nonce = notice.data( 'nonce' ); + + /** + * Listens for a click event on the dismiss button, and dismisses the notice. + * + * @param {Event} e Click event. + * @return {jQuery.Deferred} Deferred object. + */ + notice.on( 'click', '.notice-dismiss', ( e ) => { + e.preventDefault(); + e.stopPropagation(); + + return wp.ajax.post( + 'edds_admin_notices_dismiss_ajax', + { + id, + nonce, + } + ); + } ); + } ); +} ); \ No newline at end of file diff --git a/assets/js/admin/stripe/settings/index.js b/assets/js/admin/stripe/settings/index.js new file mode 100644 index 00000000000..611ab4ab78e --- /dev/null +++ b/assets/js/admin/stripe/settings/index.js @@ -0,0 +1,5 @@ +/** + * Internal dependencies + */ +import './requirements.js'; +import './stripe-connect.js'; diff --git a/assets/js/admin/stripe/settings/requirements.js b/assets/js/admin/stripe/settings/requirements.js new file mode 100644 index 00000000000..dc8e3a52399 --- /dev/null +++ b/assets/js/admin/stripe/settings/requirements.js @@ -0,0 +1,40 @@ +/** + * Internal dependencies + */ +import { domReady } from 'utils'; + +/** + * Hides "Save Changes" button if showing the special settings placeholder. + */ +domReady( () => { + const containerEl = document.querySelector( '.edds-requirements-not-met' ); + + if ( ! containerEl ) { + return; + } + + // Hide "Save Changes" button. + document.querySelector( '.edd-settings-wrap .submit' ).style.display = 'none'; +} ); + +/** + * Moves "Payment Gateways" notice under Stripe. + * Disables/unchecks the checkbox. + */ +domReady( () => { + const noticeEl = document.getElementById( 'edds-payment-gateways-stripe-unmet-requirements' ); + + if ( ! noticeEl ) { + return; + } + + const stripeLabel = document.querySelector( 'label[for="edd_settings[gateways][stripe]"]' ); + stripeLabel.parentNode.insertBefore( noticeEl, stripeLabel.nextSibling ); + + const stripeCheck = document.getElementById( 'edd_settings[gateways][stripe]' ); + stripeCheck.disabled = true; + stripeCheck.checked = false; + + noticeEl.insertBefore( stripeCheck, noticeEl.querySelector( 'p' ) ); + noticeEl.insertBefore( stripeLabel, noticeEl.querySelector( 'p' ) ); +} ); diff --git a/assets/js/admin/stripe/settings/stripe-connect.js b/assets/js/admin/stripe/settings/stripe-connect.js new file mode 100644 index 00000000000..fda898a8e5b --- /dev/null +++ b/assets/js/admin/stripe/settings/stripe-connect.js @@ -0,0 +1,54 @@ +/** + * Internal dependencies + */ +import { domReady, apiRequest } from 'utils'; + +// Wait for DOM. +domReady( () => { + const containerEl = document.getElementById( 'edds-stripe-connect-account' ); + const actionsEl = document.getElementById( 'edds-stripe-disconnect-reconnect' ); + + + if ( ! containerEl ) { + return; + } + + /* + * Do not make a request, if we are inside Onboarding Wizard. + * Onboarding Wizard will make it's own call. + */ + if ( containerEl.hasAttribute('data-onboarding-wizard') ) { + return; + } + + return apiRequest( 'edds_stripe_connect_account_info', { + ...containerEl.dataset, + } ) + .done( ( response ) => { + containerEl.classList.remove( 'loading' ); + containerEl.innerHTML = response.message; + containerEl.classList.add( `notice-${ response.status }` ); + + actionsEl.classList.remove( 'loading' ); + if ( response.actions ) { + actionsEl.innerHTML = response.actions; + } + + const statement_descriptor_target = document.getElementById( 'edd_settings[stripe_statement_descriptor]' ), + statement_descriptor_prefix_target = document.getElementById( 'edd_settings[stripe_statement_descriptor_prefix]' ); + + statement_descriptor_target.classList.remove( 'edd-text-loading' ); + statement_descriptor_prefix_target.classList.remove( 'edd-text-loading' ); + if ( response.account ) { + const statement_descriptor = response.account.settings.payments.statement_descriptor || '', + statement_descriptor_prefix = response.account.settings.card_payments.statement_descriptor_prefix || ''; + + statement_descriptor_target.value = statement_descriptor || ''; + statement_descriptor_prefix_target.value = statement_descriptor_prefix || ''; + } + } ) + .fail( ( error ) => { + containerEl.innerHTML = error.message; + containerEl.classList.add( 'notice-error' ); + } ); +} ); diff --git a/assets/js/admin/tools/export/index.js b/assets/js/admin/tools/export/index.js new file mode 100644 index 00000000000..ee2e3bd8a02 --- /dev/null +++ b/assets/js/admin/tools/export/index.js @@ -0,0 +1,93 @@ +/** + * Export screen JS + */ +const EDD_Export = { + + init: function() { + this.submit(); + }, + + submit: function() { + const self = this; + + $( document.body ).on( 'submit', '.edd-export-form', function( e ) { + e.preventDefault(); + + const form = $( this ), + submitButton = form.find( 'button[type="submit"]' ).first(); + + if ( submitButton.hasClass( 'button-disabled' ) || submitButton.is( ':disabled' ) ) { + return; + } + + const data = form.serialize(); + + if ( submitButton.hasClass( 'button-primary' ) ) { + submitButton.removeClass( 'button-primary' ).addClass( 'button-secondary' ); + } + submitButton.attr( 'disabled', true ).addClass( 'updating-message' ); + form.find( '.notice-wrap' ).remove(); + form.append( '
' ); + + // start the process + self.process_step( 1, data, self ); + } ); + }, + + process_step: function( step, data, self ) { + $.ajax( { + type: 'POST', + url: ajaxurl, + data: { + form: data, + action: 'edd_do_ajax_export', + step: step, + }, + dataType: 'json', + success: function( response ) { + if ( 'done' === response.step || response.error || response.success ) { + // We need to get the actual in progress form, not all forms on the page + const export_form = $( '.edd-export-form' ).find( '.edd-progress' ).parent().parent(); + const notice_wrap = export_form.find( '.notice-wrap' ); + + export_form.find( 'button' ).removeClass( 'updating-message' ).addClass( 'updated-message' ); + setTimeout( function () { + export_form.find( 'button' ).attr( 'disabled', false ).removeClass( 'updated-message' ) + }, 3000 ); + export_form.find( 'button .spinner' ).hide().css( 'visibility', 'visible' ); + + if ( response.error ) { + const error_message = response.message; + notice_wrap.html( '

' + error_message + '

' ); + } else if ( response.success ) { + const success_message = response.message; + notice_wrap.html( '

' + success_message + '

' ); + if ( response.data ) { + $.each( response.data, function ( key, value ) { + $( '.edd_' + key ).html( value ); + } ); + } + } else { + notice_wrap.remove(); + window.location = response.url; + } + } else { + $( '.edd-progress div' ).animate( { + width: response.percentage + '%', + }, 50, function() { + // Animation complete. + } ); + self.process_step( parseInt( response.step ), data, self ); + } + }, + } ).fail( function( response ) { + if ( window.console && window.console.log ) { + console.log( response ); + } + } ); + }, +}; + +jQuery( document ).ready( function( $ ) { + EDD_Export.init(); +} ); diff --git a/assets/js/admin/tools/import/index.js b/assets/js/admin/tools/import/index.js new file mode 100644 index 00000000000..83a85145c60 --- /dev/null +++ b/assets/js/admin/tools/import/index.js @@ -0,0 +1,174 @@ +/** + * Import screen JS + */ +var EDD_Import = { + + init: function() { + this.submit(); + }, + + submit: function() { + const self = this; + + $( '.edd-import-form' ).ajaxForm( { + beforeSubmit: self.before_submit, + success: self.success, + complete: self.complete, + dataType: 'json', + error: self.error, + } ); + }, + + before_submit: function( arr, form, options ) { + form.find( '.notice-wrap' ).remove(); + form.append( '
' ); + + //check whether client browser fully supports all File API + if ( window.File && window.FileReader && window.FileList && window.Blob ) { + + // HTML5 File API is supported by browser + + } else { + const import_form = $( '.edd-import-form' ).find( '.edd-progress' ).parent().parent(); + const notice_wrap = import_form.find( '.notice-wrap' ); + + import_form.find( '.button:disabled' ).attr( 'disabled', false ); + + //Error for older unsupported browsers that doesn't support HTML5 File API + notice_wrap.html( '

' + edd_vars.unsupported_browser + '

' ); + return false; + } + }, + + success: function( responseText, statusText, xhr, form ) {}, + + complete: function( xhr ) { + const self = $( this ), + response = jQuery.parseJSON( xhr.responseText ); + + if ( response.success ) { + const form = $( '.edd-import-form .notice-wrap' ).parent(); + + form.find( '.edd-import-file-wrap,.notice-wrap' ).remove(); + form.find( '.edd-import-options' ).slideDown(); + + // Show column mapping + let select = form.find( 'select.edd-import-csv-column' ), + row = select.parents( 'tr' ).first(), + options = '', + columns = response.data.columns.sort( function( a, b ) { + if ( a < b ) { + return -1; + } + if ( a > b ) { + return 1; + } + return 0; + } ); + + $.each( columns, function( key, value ) { + options += ''; + } ); + + select.append( options ); + + select.on( 'change', function() { + const key = $( this ).val(); + + if ( ! key ) { + $( this ).parent().next().html( '' ); + } else if ( false !== response.data.first_row[ key ] ) { + $( this ).parent().next().html( response.data.first_row[ key ] ); + } else { + $( this ).parent().next().html( '' ); + } + } ); + + $.each( select, function() { + $( this ).val( $( this ).attr( 'data-field' ) ).change(); + } ); + + $( document.body ).on( 'click', '.edd-import-proceed', function( e ) { + e.preventDefault(); + + form.find( '.edd-import-proceed.button-primary' ).addClass( 'updating-message' ); + form.append( '
' ); + + response.data.mapping = form.serialize(); + + EDD_Import.process_step( 1, response.data, self ); + } ); + } else { + EDD_Import.error( xhr ); + } + }, + + error: function( xhr ) { + // Something went wrong. This will display error on form + + const response = jQuery.parseJSON( xhr.responseText ); + const import_form = $( '.edd-import-form' ).find( '.edd-progress' ).parent().parent(); + const notice_wrap = import_form.find( '.notice-wrap' ); + + import_form.find( '.button:disabled' ).attr( 'disabled', false ); + + if ( response.data.error ) { + notice_wrap.html( '

' + response.data.error + '

' ); + } else { + notice_wrap.remove(); + } + }, + + process_step: function( step, import_data, self ) { + $.ajax( { + type: 'POST', + url: ajaxurl, + data: { + form: import_data.form, + nonce: import_data.nonce, + class: import_data.class, + upload: import_data.upload, + mapping: import_data.mapping, + action: 'edd_do_ajax_import', + step: step, + }, + dataType: 'json', + success: function( response ) { + if ( 'done' === response.data.step || response.data.error ) { + // We need to get the actual in progress form, not all forms on the page + const import_form = $( '.edd-import-form' ).find( '.edd-progress' ).parent().parent(); + const notice_wrap = import_form.find( '.notice-wrap' ); + + import_form.find( '.button:disabled' ).attr( 'disabled', false ); + + if ( response.data.error ) { + notice_wrap.html( '

' + response.data.error + '

' ); + } else { + import_form.find( '.edd-import-options' ).hide(); + $( 'html, body' ).animate( { + scrollTop: import_form.parent().offset().top, + }, 500 ); + + notice_wrap.html( '

' + response.data.message + '

' ); + } + } else { + $( '.edd-progress div' ).animate( { + width: response.data.percentage + '%', + }, 50, function() { + // Animation complete. + } ); + + EDD_Import.process_step( parseInt( response.data.step ), import_data, self ); + } + }, + } ).fail( function( response ) { + if ( window.console && window.console.log ) { + console.log( response ); + } + } ); + }, +}; + +jQuery( document ).ready( function( $ ) { + EDD_Import.init(); +} ); diff --git a/assets/js/admin/tools/index.js b/assets/js/admin/tools/index.js new file mode 100644 index 00000000000..593ddc93fa7 --- /dev/null +++ b/assets/js/admin/tools/index.js @@ -0,0 +1,121 @@ +/** + * Tools screen JS + */ +const EDD_Tools = { + + init: function() { + this.revoke_api_key(); + this.regenerate_api_key(); + this.create_api_key(); + this.recount_stats(); + }, + + revoke_api_key: function() { + $( document.body ).on( 'click', '.edd-revoke-api-key', function( e ) { + return confirm( edd_vars.revoke_api_key ); + } ); + }, + regenerate_api_key: function() { + $( document.body ).on( 'click', '.edd-regenerate-api-key', function( e ) { + return confirm( edd_vars.regenerate_api_key ); + } ); + }, + create_api_key: function() { + $( document.body ).on( 'submit', '#api-key-generate-form', function( e ) { + const input = $( 'input[type="text"][name="user_id"]' ); + + input.css( 'border-color', '#ddd' ); + + const user_id = input.val(); + if ( user_id.length < 1 || user_id === 0 ) { + input.css( 'border-color', '#ff0000' ); + return false; + } + } ); + }, + recount_stats: function() { + $( document.body ).on( 'change', '#recount-stats-type', function() { + const export_form = $( '#edd-tools-recount-form' ), + selected_type = $( 'option:selected', this ).data( 'type' ), + submit_button = $( '#recount-stats-submit' ), + products = $( '#tools-product-dropdown' ); + + // Reset the form + export_form.find( '.notice-wrap' ).remove(); + submit_button.attr( 'disabled', false ).removeClass( 'updated-message' ); + products.hide(); + $( '.edd-recount-stats-descriptions span' ).hide(); + + if ( 'recount-download' === selected_type ) { + products.show(); + products.find( '.edd-select-chosen' ).css( 'width', 'auto' ); + } else if ( 'reset-stats' === selected_type ) { + export_form.append( '
' ); + const notice_wrap = export_form.find( '.notice-wrap' ); + notice_wrap.html( '

' ); + + $( '#recount-stats-submit' ).attr( 'disabled', true ); + } else { + products.hide(); + products.val( 0 ); + } + + $( '#' + selected_type ).show(); + } ); + + $( document.body ).on( 'change', '#confirm-reset', function() { + const checked = $( this ).is( ':checked' ); + if ( checked ) { + $( '#recount-stats-submit' ).attr( 'disabled', false ); + } else { + $( '#recount-stats-submit' ).attr( 'disabled', true ); + } + } ); + + $( '#edd-tools-recount-form' ).submit( function( e ) { + e.preventDefault(); + + const selection = $( '#recount-stats-type' ).val(), + export_form = $( this ), + selected_type = $( 'option:selected', this ).data( 'type' ); + + if ( 'reset-stats' === selected_type ) { + const is_confirmed = $( '#confirm-reset' ).is( ':checked' ); + if ( is_confirmed ) { + return true; + } + has_errors = true; + } + + export_form.find( '.notice-wrap' ).remove(); + export_form.append( '
' ); + + var notice_wrap = export_form.find( '.notice-wrap' ), + has_errors = false; + + if ( null === selection || 0 === selection ) { + // Needs to pick a method edd_vars.batch_export_no_class + notice_wrap.html( '

' + edd_vars.batch_export_no_class + '

' ); + has_errors = true; + } + + if ( 'recount-download' === selected_type ) { + const selected_download = $( 'select[name="download_id"]' ).val(); + if ( selected_download === 0 ) { + // Needs to pick download edd_vars.batch_export_no_reqs + notice_wrap.html( '

' + edd_vars.batch_export_no_reqs + '

' ); + has_errors = true; + } + } + + if ( has_errors ) { + export_form.find( 'button:disabled' ).attr( 'disabled', false ).removeClass( 'updated-message' ); + return false; + } + } ); + }, +}; + +jQuery( document ).ready( function( $ ) { + EDD_Tools.init(); +} ); diff --git a/assets/js/admin/upgrades/index.js b/assets/js/admin/upgrades/index.js new file mode 100644 index 00000000000..e4e3fbb150f --- /dev/null +++ b/assets/js/admin/upgrades/index.js @@ -0,0 +1 @@ +import './v3'; diff --git a/assets/js/admin/upgrades/v3/index.js b/assets/js/admin/upgrades/v3/index.js new file mode 100644 index 00000000000..7995028037a --- /dev/null +++ b/assets/js/admin/upgrades/v3/index.js @@ -0,0 +1,211 @@ +const EDD_v3_Upgrades = { + inProgress: false, + + init: function() { + // Listen for toggle on the checkbox. + $( '.edd-v3-migration-confirmation' ).on( 'change', function( e ) { + const wrapperForm = $( this ).closest( '.edd-v3-migration' ); + const formSubmit = wrapperForm.find( 'button' ); + + if ( e.target.checked ) { + formSubmit.removeClass( 'disabled' ).prop( 'disabled', false ); + } else { + formSubmit.addClass( 'disabled' ).prop( 'disabled', true ); + } + } ); + + $( '.edd-v3-migration' ).on( 'submit', function( e ) { + e.preventDefault(); + + if ( EDD_v3_Upgrades.inProgress ) { + return; + } + + EDD_v3_Upgrades.inProgress = true; + + const migrationForm = $( this ); + const upgradeKeyField = migrationForm.find( 'input[name="upgrade_key"]' ); + let upgradeKey = false; + + if ( upgradeKeyField.length && upgradeKeyField.val() ) { + upgradeKey = upgradeKeyField.val(); + } + + // Disable submit button. + migrationForm.find( 'button' ) + .removeClass( 'button-primary' ) + .addClass( 'button-secondary disabled updating-message' ) + .prop( 'disabled', true ); + + // Disable checkbox. + migrationForm.find( 'input' ).prop( 'disabled', true ); + + // If this is the main migration, reveal the steps & mark the first non-complete item as in progress. + if ( 'edd-v3-migration' === migrationForm.attr( 'id' ) ) { + $( '#edd-migration-progress' ).removeClass( 'edd-hidden' ); + const firstNonCompleteUpgrade = $( '#edd-migration-progress li:not(.edd-upgrade-complete)' ); + if ( firstNonCompleteUpgrade.length && ! upgradeKey ) { + upgradeKey = firstNonCompleteUpgrade.data( 'upgrade' ); + } + } + + EDD_v3_Upgrades.processStep( upgradeKey, 1, migrationForm.find( 'input[name="_wpnonce"]' ).val() ); + } ) + }, + + processStep: function( upgrade_key, step, nonce ) { + let data = { + action: 'edd_process_v3_upgrade', + _ajax_nonce: nonce, + upgrade_key: upgrade_key, + step: step + } + + EDD_v3_Upgrades.clearErrors(); + + if ( upgrade_key ) { + EDD_v3_Upgrades.markUpgradeInProgress( upgrade_key ); + } + + $.ajax( { + type: 'POST', + data: data, + url: ajaxurl, + success: function( response ) { + if ( ! response.success ) { + EDD_v3_Upgrades.showError( upgrade_key, response.data ); + return; + } + + if ( response.data.upgrade_completed ) { + EDD_v3_Upgrades.markUpgradeComplete( response.data.upgrade_processed ); + + // If we just completed legacy data removal then we're all done! + if ( 'v30_legacy_data_removed' === response.data.upgrade_processed ) { + EDD_v3_Upgrades.legacyDataRemovalComplete(); + + return; + } + } else if( response.data.percentage ) { + // Update percentage for the upgrade we just processed. + EDD_v3_Upgrades.updateUpgradePercentage( response.data.upgrade_processed, response.data.percentage ); + } + + if ( response.data.next_upgrade && 'v30_legacy_data_removed' === response.data.next_upgrade && 'v30_legacy_data_removed' !== response.data.upgrade_processed ) { + EDD_v3_Upgrades.inProgress = false; + + // Legacy data removal is next, which we do not start automatically. + EDD_v3_Upgrades.showLegacyDataRemoval(); + } else if ( response.data.next_upgrade ) { + // Start the next upgrade (or continuation of current) automatically. + EDD_v3_Upgrades.processStep( response.data.next_upgrade, response.data.next_step, response.data.nonce ); + } else { + EDD_v3_Upgrades.inProgress = false; + EDD_v3_Upgrades.stopAllSpinners(); + } + } + } ).fail( ( data ) => { + // @todo + } ) + }, + + clearErrors: function() { + $( '.edd-v3-migration-error' ).addClass( 'edd-hidden' ).html( '' ); + }, + + showError: function( upgradeKey, message ) { + let container = $( '#edd-v3-migration' ); + if ( 'v30_legacy_data_removed' === upgradeKey ) { + container = $( '#edd-v3-remove-legacy-data' ); + } + const errorWrapper = container.find( '.edd-v3-migration-error' ); + + errorWrapper.html( '

' + message + '

' ).removeClass( 'edd-hidden' ); + + // Stop processing and allow form resubmission. + EDD_v3_Upgrades.inProgress = false; + container.find( 'input' ).prop( 'disabled', false ); + container.find( 'button' ) + .prop( 'disabled', false ) + .addClass( 'button-primary' ) + .removeClass( 'button-secondary disabled updating-message' ); + }, + + markUpgradeInProgress: function( upgradeKey ) { + const upgradeRow = $( '#edd-v3-migration-' + upgradeKey ); + if ( ! upgradeRow.length ) { + return; + } + + const statusIcon = upgradeRow.find( '.dashicons' ); + if ( statusIcon.length ) { + statusIcon.removeClass( 'dashicons-minus' ).addClass( 'dashicons-update' ); + } + + upgradeRow.find( '.edd-migration-percentage' ).removeClass( 'edd-hidden' ); + }, + + updateUpgradePercentage: function( upgradeKey, newPercentage ) { + const upgradeRow = $( '#edd-v3-migration-' + upgradeKey ); + if ( ! upgradeRow.length ) { + return; + } + + upgradeRow.find( '.edd-migration-percentage-value' ).text( newPercentage ); + }, + + markUpgradeComplete: function( upgradeKey ) { + const upgradeRow = $( '#edd-v3-migration-' + upgradeKey ); + if ( ! upgradeRow.length ) { + return; + } + + upgradeRow.addClass( 'edd-upgrade-complete' ); + + const statusIcon = upgradeRow.find( '.dashicons' ); + if ( statusIcon.length ) { + statusIcon.removeClass( 'dashicons-minus dashicons-update' ).addClass( 'dashicons-yes' ); + } + + const statusLabel = upgradeRow.find( '.edd-migration-status .screen-reader-text' ); + if ( statusLabel.length ) { + statusLabel.text( edd_admin_upgrade_vars.migration_complete ); + } + + // Update percentage to 100%; + upgradeRow.find( '.edd-migration-percentage-value' ).text( 100 ); + }, + + showLegacyDataRemoval: function() { + // Un-spin the main submit button. + $( '#edd-v3-migration-button' ).removeClass( 'updating-message' ); + + // Show the "migration complete" message. + $( '#edd-v3-migration-complete' ).removeClass( 'edd-hidden' ); + + const dataRemovalWrapper = $( '#edd-v3-remove-legacy-data' ); + if ( ! dataRemovalWrapper.length ) { + return; + } + + dataRemovalWrapper.removeClass( 'edd-hidden' ); + }, + + legacyDataRemovalComplete: function() { + const wrapper = $( '#edd-v3-remove-legacy-data' ); + if ( ! wrapper.length ) { + return; + } + + wrapper.find( 'form' ).addClass( 'edd-hidden' ); + wrapper.find( '#edd-v3-legacy-data-removal-complete' ).removeClass( 'edd-hidden' ); + }, + + stopAllSpinners: function() { + + } +} + +jQuery( document ).ready( function( $ ) { + EDD_v3_Upgrades.init(); +} ); diff --git a/assets/js/alpine.min.js b/assets/js/alpine.min.js new file mode 100644 index 00000000000..03fb0b2a821 --- /dev/null +++ b/assets/js/alpine.min.js @@ -0,0 +1,5 @@ +(()=>{var Fe=!1,je=!1,J=[];function wt(e){Kr(e)}function Kr(e){J.includes(e)||J.push(e),zr()}function zr(){!je&&!Fe&&(Fe=!0,queueMicrotask(Vr))}function Vr(){Fe=!1,je=!0;for(let e=0;ee.effect(t,{scheduler:r=>{ze?wt(r):r()}}),Ke=e.raw}function Ve(e){C=e}function At(e){let t=()=>{};return[n=>{let i=C(n);e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),V(i))}},()=>{t()}]}var Ot=[],Tt=[],Rt=[];function Ct(e){Rt.push(e)}function Mt(e){Tt.push(e)}function Nt(e){Ot.push(e)}function kt(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Be(e,t){!e._x_attributeCleanups||Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&(n.forEach(i=>i()),delete e._x_attributeCleanups[r])})}var qe=new MutationObserver(He),Ue=!1;function We(){qe.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Ue=!0}function Hr(){Br(),qe.disconnect(),Ue=!1}var Z=[],Ge=!1;function Br(){Z=Z.concat(qe.takeRecords()),Z.length&&!Ge&&(Ge=!0,queueMicrotask(()=>{qr(),Ge=!1}))}function qr(){He(Z),Z.length=0}function m(e){if(!Ue)return e();Hr();let t=e();return We(),t}var Ye=!1,pe=[];function Dt(){Ye=!0}function Pt(){Ye=!1,He(pe),pe=[]}function He(e){if(Ye){pe=pe.concat(e);return}let t=[],r=[],n=new Map,i=new Map;for(let o=0;os.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&r.push(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,c=e[o].oldValue,l=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},u=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&c===null?l():s.hasAttribute(a)?(u(),l()):u()}i.forEach((o,s)=>{Be(s,o)}),n.forEach((o,s)=>{Ot.forEach(a=>a(s,o))});for(let o of t)r.includes(o)||Rt.forEach(s=>s(o));for(let o of r)t.includes(o)||Tt.forEach(s=>s(o));t=null,r=null,n=null,i=null}function B(e,t,r){return e._x_dataStack=[t,...Q(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function Je(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function Q(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?Q(e.host):e.parentNode?Q(e.parentNode):[]}function X(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(r=>Object.keys(r)))),has:(r,n)=>e.some(i=>i.hasOwnProperty(n)),get:(r,n)=>(e.find(i=>{if(i.hasOwnProperty(n)){let o=Object.getOwnPropertyDescriptor(i,n);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let s=o.get,a=o.set,c=o;s=s&&s.bind(t),a=a&&a.bind(t),s&&(s._x_alreadyBound=!0),a&&(a._x_alreadyBound=!0),Object.defineProperty(i,n,{...c,get:s,set:a})}return!0}return!1})||{})[n],set:(r,n,i)=>{let o=e.find(s=>s.hasOwnProperty(n));return o?o[n]=i:e[e.length-1][n]=i,!0}});return t}function It(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(n).forEach(([o,s])=>{let a=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,a,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,a)})};return r(e)}function me(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Ur(n,i),s=>Ze(n,i,s),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let c=n.initialize(o,s,a);return r.initialValue=c,i(o,s,a)}}else r.initialValue=n;return r}}function Ur(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function Ze(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Ze(e[t[0]],t.slice(1),r)}}var Lt={};function x(e,t){Lt[e]=t}function ee(e,t){return Object.entries(Lt).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){return n(t,{Alpine:S,interceptor:me})},enumerable:!1})}),e}function b(e,t,r={}){let n;return h(e,t)(i=>n=i,r),n}function h(...e){return $t(...e)}var $t=Qe;function Ft(e){$t=e}function Qe(e,t){let r={};ee(r,e);let n=[r,...Q(e)];if(typeof t=="function")return Wr(n,t);let i=Gr(n,t);return Yr.bind(null,e,t,i)}function Wr(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(X([n,...e]),i);he(r,o)}}var Xe={};function Jr(e){if(Xe[e])return Xe[e];let t=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)/.test(e)?`(() => { ${e} })()`:e,n=new t(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`);return Xe[e]=n,n}function Gr(e,t){let r=Jr(t);return(n=()=>{},{scope:i={},params:o=[]}={})=>{r.result=void 0,r.finished=!1;let s=X([i,...e]),a=r(r,s);r.finished?he(n,r.result,s,o):a.then(c=>{he(n,c,s,o)})}}function he(e,t,r,n){if(typeof t=="function"){let i=t.apply(r,n);i instanceof Promise?i.then(o=>he(e,o,r,n)):e(i)}else e(t)}function Yr(e,t,r,...n){try{return r(...n)}catch(i){throw console.warn(`Alpine Expression Error: ${i.message} + +Expression: "${t}" + +`,e),i}}var et="x-";function A(e=""){return et+e}function jt(e){et=e}var Kt={};function p(e,t){Kt[e]=t}function te(e,t,r){let n={};return Array.from(t).map(zt((o,s)=>n[o]=s)).filter(Vt).map(Qr(n,r)).sort(Xr).map(o=>Zr(e,o))}function Bt(e){return Array.from(e).map(zt()).filter(t=>!Vt(t))}var tt=!1,re=new Map,Ht=Symbol();function qt(e){tt=!0;let t=Symbol();Ht=t,re.set(t,[]);let r=()=>{for(;re.get(t).length;)re.get(t).shift()();re.delete(t)},n=()=>{tt=!1,r()};e(r),n()}function Zr(e,t){let r=()=>{},n=Kt[t.type]||r,i=[],o=d=>i.push(d),[s,a]=At(e);i.push(a);let c={Alpine:S,effect:s,cleanup:o,evaluateLater:h.bind(h,e),evaluate:b.bind(b,e)},l=()=>i.forEach(d=>d());kt(e,t.original,l);let u=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,c),n=n.bind(n,e,t,c),tt?re.get(Ht).push(n):n())};return u.runCleanups=l,u}var ge=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),_e=e=>e;function zt(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Ut.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Ut=[];function H(e){Ut.push(e)}function Vt({name:e}){return Wt().test(e)}var Wt=()=>new RegExp(`^${et}([^:^.]+)\\b`);function Qr(e,t){return({name:r,value:n})=>{let i=r.match(Wt()),o=r.match(/:([a-zA-Z0-9\-:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(c=>c.replace(".","")),expression:n,original:a}}}var rt="DEFAULT",ye=["ignore","ref","data","bind","init","for","model","transition","show","if",rt,"element"];function Xr(e,t){let r=ye.indexOf(e.type)===-1?rt:e.type,n=ye.indexOf(t.type)===-1?rt:t.type;return ye.indexOf(r)-ye.indexOf(n)}function $(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var nt=[],it=!1;function q(e){nt.push(e),queueMicrotask(()=>{it||setTimeout(()=>{xe()})})}function xe(){for(it=!1;nt.length;)nt.shift()()}function Gt(){it=!0}function N(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>N(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)N(n,t,!1),n=n.nextElementSibling}function be(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Jt(){document.body||be("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` + notices ) ) { + $this->notices = array(); + } + + // Parse args. + $r = wp_parse_args( + $args, + array( + 'id' => '', + 'message' => '', + 'class' => false, + 'is_dismissible' => true, + ) + ); + + // Prevent a notice from being added more than once. + if ( ! empty( $r['id'] ) && array_key_exists( $r['id'], $this->notices ) ) { + return; + } + + $default_class = 'updated'; + + // One message as string. + if ( is_string( $r['message'] ) ) { + $message = '

' . $this->esc_notice( $r['message'] ) . '

'; + + } elseif ( is_array( $r['message'] ) ) { + $message = '

' . implode( '

', array_map( array( $this, 'esc_notice' ), $r['message'] ) ) . '

'; + + // Messages as objects. + } elseif ( is_wp_error( $r['message'] ) ) { + $default_class = 'is-error'; + $errors = $r['message']->get_error_messages(); + + switch ( count( $errors ) ) { + case 0: + return false; + + case 1: + $message = '

' . $this->esc_notice( $errors[0] ) . '

'; + break; + + default: + $escaped = array_map( array( $this, 'esc_notice' ), $errors ); + $message = '
    ' . "\n\t" . '
  • ' . implode( '
  • ' . "\n\t" . '
  • ', $escaped ) . '
  • ' . "\n" . '
'; + break; + } + + // Message is an unknown format, so bail. + } else { + return false; + } + + // CSS Classes. + $classes = array( $default_class ); + if ( ! empty( $r['class'] ) ) { + $classes = explode( ' ', $r['class'] ); + } + + // Add dismissible class. + if ( ! empty( $r['is_dismissible'] ) ) { + array_push( $classes, 'is-dismissible' ); + } + + // Assemble the message. + $message = '
' . $message . '
'; + $message = str_replace( "'", "\'", $message ); + + // Add notice to notices array. + $this->notices[ $r['id'] ] = $message; + } + + /** + * Add all admin area notices + * + * @since 3.0 + */ + public function add_notices() { + + // User can view shop reports. + if ( current_user_can( 'view_shop_reports' ) ) { + $this->add_reports_notices(); + } + + // User can manage the entire shop. + if ( current_user_can( 'manage_shop_settings' ) ) { + $this->add_data_notices(); + $this->add_settings_notices(); + $this->add_order_upgrade_notice(); + $this->add_stripe_notice(); + $this->add_paypal_sync_notice(); + } + + // Generic notices. + if ( ! empty( $_REQUEST['edd-message'] ) ) { + $this->add_user_action_notices( $_REQUEST['edd-message'] ); + } + + $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'edd-message' ), $_SERVER['REQUEST_URI'] ); + } + + /** + * Dismiss admin notices when dismiss links are clicked + * + * @since 2.3 + */ + public function dismiss_notices() { + + // Bail if no notices to dismiss. + if ( empty( $_GET['edd_notice'] ) || empty( $_GET['_wpnonce'] ) ) { + return; + } + + // Construct key we are dismissing. + $key = sanitize_key( $_GET['edd_notice'] ); + + // Bail if sanitized notice is empty. + if ( empty( $key ) ) { + return; + } + + // Bail if nonce does not verify. + if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'edd_notice_nonce' ) ) { + return; + } + + // Dismiss notice. + update_user_meta( get_current_user_id(), "_edd_{$key}_dismissed", 1 ); + edd_redirect( remove_query_arg( array( 'edd_action', 'edd_notice', '_wpnonce' ) ) ); + } + + /** + * Output all admin area notices + * + * @since 2.6.0 bbPress (r6771) + */ + public function display_notices() { + $screen = get_current_screen(); + if ( 'site-health' === $screen->id ) { + return; + } + + $this->show_debugging_notice(); + + // Bail if no notices. + if ( empty( $this->notices ) || ! is_array( $this->notices ) ) { + return; + } + + // Start an output buffer. + ob_start(); + + // Loop through notices, and add them to buffer. + foreach ( $this->notices as $notice ) { + echo $notice; + } + + // Output the current buffer. + $notices = ob_get_clean(); + + // Only echo if not empty. + if ( ! empty( $notices ) ) { + echo $notices; + } + } + + /** + * Remove unneeded admin notices from EDD admin screens. + * + * @since 3.1.1 + * @return void + */ + public function remove_notices() { + if ( ! edd_is_admin_page() ) { + return; + } + + global $wp_filter; + $all_hooks = $wp_filter['admin_notices']->callbacks; + + foreach ( $all_hooks as $priority => $priority_actions ) { + + $priority_functions = wp_list_pluck( $priority_actions, 'function' ); + + foreach ( $priority_functions as $key => $function ) { + if ( is_array( $function ) ) { + + if ( ! empty( $function[0] ) && is_object( $function[0] ) ) { + $class_name = strtolower( get_class( $function[0] ) ); + + if ( false === strpos( $class_name, 'edd' ) ) { + unset( $all_hooks[ $priority ][ $key ] ); + } + } + } elseif ( is_string( $function ) ) { + + $function = strtolower( $function ); + if ( false === strpos( $function, 'edd' ) ) { + + unset( $all_hooks[ $priority ][ $key ] ); + } + } + } + } + $wp_filter['admin_notices']->callbacks = $all_hooks; + } + + /** Private Methods *******************************************************/ + + /** + * Notices about missing pages + * + * @since 3.0 + * @deprecated 3.1.2 + */ + private function add_page_notices() { + + // Checkout page is missing. + $purchase_page = edd_get_option( 'purchase_page', '' ); + if ( empty( $purchase_page ) || ( 'trash' === get_post_status( $purchase_page ) ) ) { + $this->add_notice( + array( + 'id' => 'edd-no-purchase-page', + 'message' => sprintf( + /* translators: %s: URL to the settings page */ + __( 'No checkout page is configured. Set one in Settings.', 'easy-digital-downloads' ), + esc_url( + edd_get_admin_url( + array( + 'page' => 'edd-settings', + 'tab' => 'general', + 'section' => 'pages', + ) + ) + ) + ), + 'class' => 'error', + 'is_dismissible' => false, + ) + ); + } + } + + /** + * Notices about reports + * + * @since 3.0 + */ + private function add_reports_notices() { + } + + /** + * Notices for the entire shop + * + * @since 3.0 + * @deprecated 3.1.2 + */ + private function add_system_notices() { + + // Bail if not an EDD admin page. + if ( ! edd_is_admin_page() || edd_is_dev_environment() || edd_is_admin_page( 'index.php' ) ) { + return; + } + + // Bail if user cannot manage options. + if ( ! current_user_can( 'manage_shop_settings' ) ) { + return; + } + + // Bail if uploads directory is protected. + if ( edd_is_uploads_url_protected() ) { + return; + } + + // Get the upload directory. + $upload_directory = edd_get_upload_dir(); + + // Running NGINX. + $show_nginx_notice = apply_filters( 'edd_show_nginx_redirect_notice', true ); + if ( $show_nginx_notice && ! empty( $GLOBALS['is_nginx'] ) && ! get_user_meta( get_current_user_id(), '_edd_nginx_redirect_dismissed', true ) ) { + $dismiss_notice_url = wp_nonce_url( + add_query_arg( + array( + 'edd_action' => 'dismiss_notices', + 'edd_notice' => 'nginx_redirect', + ) + ), + 'edd_notice_nonce' + ); + + $this->add_notice( + array( + 'id' => 'edd-nginx', + 'class' => 'error', + 'is_dismissible' => false, + 'message' => array( + /* translators: %s: Uploads directory */ + sprintf( __( 'The files in %s are not currently protected.', 'easy-digital-downloads' ), '' . $upload_directory . '' ), + __( 'To protect them, you must add this NGINX redirect rule.', 'easy-digital-downloads' ), + sprintf( + wp_kses( + /* translators: %s: Dismiss notice URL */ + __( 'If you have already done this, or it does not apply to your site, you may permanently dismiss this notice.', 'easy-digital-downloads' ), + array( + 'a' => array( + 'href' => array(), + ), + ) + ), + $dismiss_notice_url + ), + ), + ), + ); + } + + // Running Apache. + if ( ! empty( $GLOBALS['is_apache'] ) && ! edd_htaccess_exists() && ! get_user_meta( get_current_user_id(), '_edd_htaccess_missing_dismissed', true ) ) { + $dismiss_notice_url = wp_nonce_url( + add_query_arg( + array( + 'edd_action' => 'dismiss_notices', + 'edd_notice' => 'htaccess_missing', + ) + ), + 'edd_notice_nonce' + ); + + $this->add_notice( + array( + 'id' => 'edd-apache', + 'class' => 'error', + 'is_dismissible' => false, + 'message' => array( + /* translators: %s: Uploads directory */ + sprintf( __( 'The .htaccess file is missing from: %s', 'easy-digital-downloads' ), '' . $upload_directory . '' ), + /* translators: %s: Uploads directory */ + sprintf( __( 'First, please re-save the Misc settings tab a few times. If this warning continues to appear, create a file called ".htaccess" in the %s directory, and copy the following into it:', 'easy-digital-downloads' ), '' . $upload_directory . '' ), + /* translators: %s: Notice Dismissal URL */ + sprintf( __( 'If you have already done this, or it does not apply to your site, you may permanently %s.', 'easy-digital-downloads' ), '' . __( 'dismiss this notice', 'easy-digital-downloads' ) . '' ), + '
' . edd_get_htaccess_rules() . '
', + ), + ) + ); + } + } + + /** + * Notices about data (migrations, etc...) + * + * @since 3.0 + */ + private function add_data_notices() { + + // Recount earnings. + if ( class_exists( 'EDD_Recount_Earnings' ) ) { + $this->add_notice( + array( + 'id' => 'edd-recount-earnings', + 'class' => 'error', + 'is_dismissible' => false, + 'message' => sprintf( + /* translators: 1: link to the recount tool, 2: link to the plugins screen. */ + __( 'Easy Digital Downloads 2.5 contains a built in recount tool. Please deactivate the Easy Digital Downloads - Recount Earnings plugin', 'easy-digital-downloads' ), + esc_url( + edd_get_admin_url( + array( + 'page' => 'edd-tools', + 'tab' => 'general', + ) + ) + ), + esc_url( admin_url( 'plugins.php' ) ) + ), + ) + ); + } + } + + /** + * Adds a notice about the deprecated Default Rate for Taxes. + * + * @since 3.0 + * @since 3.0.2 - We've found a way to add default tax rates. Leaving the method in case anyone (for some reason) is calling it. + */ + private function add_tax_rate_notice() { + + // Default tax rate not detected. + if ( false === edd_get_option( 'tax_rate' ) ) { + return; + } + + // On Rates page, settings notice is shown. + if ( ! empty( $_GET['page'] ) && 'edd-settings' === $_GET['page'] && ! empty( $_GET['section'] ) && 'rates' === $_GET['section'] ) { + return; + } + + // URL to fix this. + $url = edd_get_admin_url( + array( + 'page' => 'edd-settings', + 'tab' => 'taxes', + 'section' => 'rates', + ) + ); + + // Link. + $link = '' . __( 'Review Tax Rates', 'easy-digital-downloads' ) . ''; + + // Add the notice. + $this->add_notice( + array( + 'id' => 'edd-default-tax-rate', + 'class' => 'error', + 'message' => '' . __( 'A default tax rate was detected.', 'easy-digital-downloads' ) . '

' . __( 'This setting is no longer used in this version of Easy Digital Downloads. Please confirm your regional tax rates are properly configured and update tax settings to remove this notice.', 'easy-digital-downloads' ) . '

' . $link, + 'is_dismissible' => false, + ) + ); + } + + /** + * Notices about settings (updating, etc...) + * + * @since 3.0 + */ + private function add_settings_notices() { + + // Settings area. + $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_SPECIAL_CHARS ); + if ( ! in_array( $page, array( 'edd-settings', 'edd-emails' ), true ) ) { + return; + } + + // Settings updated. + if ( ! empty( $_GET['settings-updated'] ) ) { + $this->add_notice( + array( + 'id' => 'edd-notices', + 'message' => __( 'Settings updated.', 'easy-digital-downloads' ), + ) + ); + } + + if ( 'accounting' === filter_input( INPUT_GET, 'section', FILTER_SANITIZE_SPECIAL_CHARS ) ) { + if ( ! empty( edd_get_option( 'sequential_start_update_failed', false ) ) ) { + $order_number = new \EDD\Orders\Number(); + $this->add_notice( + array( + 'id' => 'edd-sequential-order-numbers-not-updated', + 'message' => sprintf( + /* translators: %s: Next order number */ + __( 'The sequential starting number could not be updated because it could conflict with existing orders. The next assigned order number is %s.', 'easy-digital-downloads' ), + '' . $order_number->format( (int) get_option( 'edd_next_order_number' ) ) . '' + ), + 'class' => 'error', + ) + ); + edd_delete_option( 'sequential_start_update_failed' ); + } + } + } + + /** + * Adds a notice if an order migration is running. + * This is only shown if the migration is running via UI by a different user or on another screen. + * + * @since 3.1.2 + * @return void + */ + private function add_order_upgrade_notice() { + if ( edd_has_upgrade_completed( 'migrate_orders' ) ) { + return; + } + if ( ! get_option( '_edd_v30_doing_order_migration', false ) ) { + return; + } + if ( get_option( 'edd_v30_cli_migration_running', false ) ) { + return; + } + $this->add_notice( + array( + 'id' => 'edd-v30-order-migration-running', + 'class' => 'updated', + 'message' => __( 'Easy Digital Downloads is migrating orders. Sales and earnings data for your store will be updated when all orders have been migrated.', 'easy-digital-downloads' ), + 'is_dismissible' => false, + ) + ); + } + + /** + * Adds a notice if the Stripe Pro gateway is outdated. + * This is due to a name change in the gateway. + * + * @since 3.2.1 + * @return void + */ + private function add_stripe_notice() { + if ( ! defined( 'EDD_STRIPE_VERSION' ) || ( defined( 'EDD_STRIPE_VERSION' ) && version_compare( EDD_STRIPE_VERSION, '2.8.4', '>=' ) ) ) { + return; + } + $this->add_notice( + array( + 'id' => 'edd-stripe-outdated', + 'class' => 'notice-warning', + 'message' => sprintf( + /* translators: 1: opening link tag, 2: opening link tag, 3: closing link tag. */ + __( 'You are running an outdated version of the Easy Digital Downloads — Stripe Pro Payment Gateway. You may need to log into %1$syour account%3$s to download the latest version and %2$smanually upgrade%3$s it.', 'easy-digital-downloads' ), + '', + '', + '' + ), + 'is_dismissible' => false, + ) + ); + } + + /** + * Adds a notice if PayPal webhooks need to synced. + * + * @since 3.2.1 + * @return void + */ + private function add_paypal_sync_notice() { + if ( ! get_option( 'edd_paypal_webhook_sync_failed' ) ) { + return; + } + $url = edd_get_admin_url( + array( + 'page' => 'edd-settings', + 'tab' => 'gateways', + 'section' => 'paypal_commerce', + ) + ); + + $this->add_notice( + array( + 'id' => 'edd-paypal-webhook-sync', + 'class' => 'updated', + 'message' => sprintf( + /* translators: 1: Opening anchor tag; %2$s: Closing anchor tag. */ + __( 'New webhooks have been registered for PayPal Commerce, but we were unable to update them automatically. Please %1$ssync your webhooks manually%2$s.', 'easy-digital-downloads' ), + '', + '' + ), + 'is_dismissible' => false, + ) + ); + } + + /** + * Notices about actions that the user has taken + * + * @since 3.0 + * + * @param string $notice The notice key. + */ + private function add_user_action_notices( $notice = '' ) { + + // Sanitize notice key. + $notice = sanitize_key( $notice ); + + // Bail if notice is empty. + if ( empty( $notice ) ) { + return; + } + + // Shop discounts errors. + if ( current_user_can( 'manage_shop_discounts' ) ) { + switch ( $notice ) { + case 'discount_added': + $this->add_notice( + array( + 'id' => 'edd-discount-added', + 'message' => __( 'Discount code added.', 'easy-digital-downloads' ), + ) + ); + break; + case 'discount_add_failed': + $this->add_notice( + array( + 'id' => 'edd-discount-add-fail', + 'message' => __( 'There was a problem adding that discount code, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_exists': + $this->add_notice( + array( + 'id' => 'edd-discount-exists', + 'message' => __( 'A discount with that code already exists, please use a different code.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_updated': + $this->add_notice( + array( + 'id' => 'edd-discount-updated', + 'message' => __( 'Discount code updated.', 'easy-digital-downloads' ), + ) + ); + break; + case 'discount_not_changed': + $this->add_notice( + array( + 'id' => 'edd-discount-not-changed', + 'message' => __( 'No changes were made to that discount code.', 'easy-digital-downloads' ), + ) + ); + break; + case 'discount_update_failed': + $this->add_notice( + array( + 'id' => 'edd-discount-updated-fail', + 'message' => __( 'There was a problem updating that discount code, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_validation_failed': + $this->add_notice( + array( + 'id' => 'edd-discount-validation-fail', + 'message' => __( 'The discount code could not be added because one or more of the required fields was empty, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_invalid_code': + $this->add_notice( + array( + 'id' => 'edd-discount-invalid-code', + 'message' => __( 'The discount code entered is invalid; only alphanumeric characters are allowed, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_invalid_amount': + $this->add_notice( + array( + 'id' => 'edd-discount-invalid-amount', + 'message' => __( 'The discount amount must be a valid percentage or numeric flat amount. Please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_deleted': + $this->add_notice( + array( + 'id' => 'edd-discount-deleted', + 'message' => __( 'Discount code deleted.', 'easy-digital-downloads' ), + ) + ); + break; + case 'discount_delete_failed': + $this->add_notice( + array( + 'id' => 'edd-discount-delete-fail', + 'message' => __( 'There was a problem deleting that discount code, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_activated': + $this->add_notice( + array( + 'id' => 'edd-discount-activated', + 'message' => __( 'Discount code activated.', 'easy-digital-downloads' ), + ) + ); + break; + case 'discount_activation_failed': + $this->add_notice( + array( + 'id' => 'edd-discount-activation-fail', + 'message' => __( 'There was a problem activating that discount code, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_deactivated': + $this->add_notice( + array( + 'id' => 'edd-discount-deactivated', + 'message' => __( 'Discount code deactivated.', 'easy-digital-downloads' ), + ) + ); + break; + case 'discount_deactivation_failed': + $this->add_notice( + array( + 'id' => 'edd-discount-deactivation-fail', + 'message' => __( 'There was a problem deactivating that discount code, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'discount_archived': + $this->add_notice( + array( + 'id' => 'edd-discount-archived', + 'message' => __( 'Discount code archived.', 'easy-digital-downloads' ), + ) + ); + break; + case 'discount_archived_failed': + $this->add_notice( + array( + 'id' => 'edd-discount-archived-fail', + 'message' => __( 'There was a problem archiving that discount code, please try again.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + } + } + + // Shop reports errors. + if ( current_user_can( 'view_shop_reports' ) ) { + switch ( $notice ) { + case 'refreshed-reports': + $this->add_notice( + array( + 'id' => 'edd-refreshed-reports', + 'message' => __( 'The reports have been refreshed.', 'easy-digital-downloads' ), + ) + ); + break; + } + } + + // Shop settings errors. + if ( current_user_can( 'manage_shop_settings' ) ) { + switch ( $notice ) { + case 'settings-imported': + $this->add_notice( + array( + 'id' => 'edd-settings-imported', + 'message' => __( 'The settings have been imported.', 'easy-digital-downloads' ), + ) + ); + break; + case 'api-key-generated': + $this->add_notice( + array( + 'id' => 'edd-api-key-generated', + 'message' => __( 'API keys successfully generated.', 'easy-digital-downloads' ), + ) + ); + break; + case 'api-key-exists': + $this->add_notice( + array( + 'id' => 'edd-api-key-exists', + 'message' => __( 'The specified user already has API keys.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'api-key-regenerated': + $this->add_notice( + array( + 'id' => 'edd-api-key-regenerated', + 'message' => __( 'API keys successfully regenerated.', 'easy-digital-downloads' ), + ) + ); + break; + case 'api-key-revoked': + $this->add_notice( + array( + 'id' => 'edd-api-key-revoked', + 'message' => __( 'API keys successfully revoked.', 'easy-digital-downloads' ), + ) + ); + break; + case 'test-summary-email-sent': + $this->add_notice( + array( + 'id' => 'edd-test-summary-email-sent', + 'message' => __( 'The test email summary was sent successfully.', 'easy-digital-downloads' ), + ) + ); + break; + + case 'missing-pass-key': + $this->add_notice( + array( + 'id' => 'edd-missing-pass-key', + 'message' => __( 'Your extensions could not be refreshed because you have not verified your license key.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + + case 'stripe_webhooks_created': + $this->add_notice( + array( + 'id' => 'edd-webhooks-created', + 'message' => __( 'Webhooks have been created for the Stripe gateway.', 'easy-digital-downloads' ), + ) + ); + break; + + case 'stripe_webhooks_error': + $this->add_notice( + array( + 'id' => 'edd-webhooks-error', + 'message' => __( 'There was an error creating webhooks for the Stripe gateway.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + } + } + + // Shop payments errors. + if ( current_user_can( 'edit_shop_payments' ) ) { + switch ( $notice ) { + case 'note-added': + $this->add_notice( + array( + 'id' => 'edd-note-added', + 'message' => __( 'The note has been added successfully.', 'easy-digital-downloads' ), + ) + ); + break; + case 'payment-updated': + $this->add_notice( + array( + 'id' => 'edd-payment-updated', + 'message' => __( 'The order has been updated successfully.', 'easy-digital-downloads' ), + ) + ); + break; + case 'order_added': + $this->add_notice( + array( + 'id' => 'edd-order-added', + 'message' => __( 'Order successfully created.', 'easy-digital-downloads' ), + ) + ); + break; + case 'order_trashed': + $this->add_notice( + array( + 'id' => 'edd-order-trashed', + 'message' => __( 'The order has been moved to the trash.', 'easy-digital-downloads' ), + ) + ); + break; + case 'order_restored': + $this->add_notice( + array( + 'id' => 'edd-order-restored', + 'message' => __( 'The order has been restored.', 'easy-digital-downloads' ), + ) + ); + break; + case 'payment_deleted': + $this->add_notice( + array( + 'id' => 'edd-payment-deleted', + 'message' => __( 'The order has been deleted.', 'easy-digital-downloads' ), + ) + ); + break; + case 'email_sent': + $this->add_notice( + array( + 'id' => 'edd-payment-sent', + 'message' => __( 'The purchase receipt has been resent.', 'easy-digital-downloads' ), + ) + ); + break; + case 'email_send_failed': + $this->add_notice( + array( + 'id' => 'edd-payment-not-sent', + 'message' => __( 'The purchase receipt could not be resent.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'email_possibly_not_sent': + $this->add_notice( + array( + 'id' => 'edd-order-receipt-maybe-not-sent', + 'message' => __( 'The purchase receipt may not have been sent.', 'easy-digital-downloads' ), + 'class' => 'notice-warning', + ) + ); + break; + case 'payment-note-deleted': + $this->add_notice( + array( + 'id' => 'edd-note-deleted', + 'message' => __( 'The order note has been deleted.', 'easy-digital-downloads' ), + ) + ); + break; + case 'order_recalculated': + $this->add_notice( + array( + 'id' => 'edd-order-recalculated', + 'message' => __( 'The order values have been recalculated.', 'easy-digital-downloads' ), + ) + ); + break; + case 'order_not_recalculated': + $this->add_notice( + array( + 'id' => 'edd-order-not-recalculated', + 'message' => __( 'The order values could not be recalculated.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + } + } + + // Customer Notices. + if ( current_user_can( 'edit_shop_payments' ) ) { + switch ( $notice ) { + case 'customer-deleted': + $this->add_notice( + array( + 'id' => 'edd-customer-deleted', + 'message' => __( 'Customer successfully deleted.', 'easy-digital-downloads' ), + ) + ); + break; + case 'user-verified': + $this->add_notice( + array( + 'id' => 'edd-user-verified', + 'message' => __( 'User successfully verified.', 'easy-digital-downloads' ), + ) + ); + break; + case 'email-added': + $this->add_notice( + array( + 'id' => 'edd-customer-email-added', + 'message' => __( 'Customer email added.', 'easy-digital-downloads' ), + ) + ); + break; + case 'email-removed': + $this->add_notice( + array( + 'id' => 'edd-customer-email-removed', + 'message' => __( 'Customer email deleted.', 'easy-digital-downloads' ), + ) + ); + break; + case 'email-remove-failed': + $this->add_notice( + array( + 'id' => 'edd-customer-email-remove-failed', + 'message' => __( 'Failed to delete customer email.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'primary-email-updated': + $this->add_notice( + array( + 'id' => 'eddedd-customer-primary-email-updated', + 'message' => __( 'Primary email updated for customer.', 'easy-digital-downloads' ), + ) + ); + break; + case 'primary-email-failed': + $this->add_notice( + array( + 'id' => 'edd-customer-primary-email-failed', + 'message' => __( 'Failed to set primary email.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + case 'address-removed': + $this->add_notice( + array( + 'id' => 'edd-customer-address-removed', + 'message' => __( 'Customer address deleted.', 'easy-digital-downloads' ), + ) + ); + break; + case 'address-remove-failed': + $this->add_notice( + array( + 'id' => 'edd-customer-address-remove-failed', + 'message' => __( 'Failed to delete customer address.', 'easy-digital-downloads' ), + 'class' => 'error', + ) + ); + break; + } + } + + if ( 'one-click-upgrade' === $notice && edd_is_pro() && current_user_can( 'install_plugins' ) && edd_is_admin_page( 'settings' ) ) { + $this->add_notice( + array( + 'id' => 'edd-upgraded', + 'message' => sprintf( + /* translators: 1: opening strong tag, do not translate, 2: closing strong tag, do not translate */ + __( 'Congratulations! You are now running %1$sEasy Digital Downloads (Pro)%2$s.', 'easy-digital-downloads' ), + '', + '' + ), + ) + ); + } + + if ( current_user_can( 'edit_users' ) && 'capabilities_reset' === $notice ) { + $this->add_notice( + array( + 'id' => 'edd-capabilities-reset', + 'message' => __( 'The user capabilities for Easy Digital Downloads have been reset.', 'easy-digital-downloads' ), + ) + ); + } + } + + /** + * Show a notice if debugging is enabled in the EDD settings. + * Does not show if only the `EDD_DEBUG_MODE` constant is defined. + * + * @since 2.11.5 + * @return void + */ + private function show_debugging_notice() { + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + return; + } + if ( ! current_user_can( 'manage_shop_settings' ) ) { + return; + } + if ( ! edd_get_option( 'debug_mode', false ) ) { + return; + } + + /** + * The notices JS needs to be output wherever the notice is displayed, not just EDD screens. + * If more notices add to the script then this enqueue will need to be moved. + * + * @since 3.0 + */ + wp_enqueue_script( 'edd-admin-notices', EDD_PLUGIN_URL . 'assets/js/edd-admin-notices.js', array( 'jquery' ), EDD_VERSION, true ); + $view_url = add_query_arg( + array( + 'post_type' => 'download', + 'page' => 'edd-tools', + 'tab' => 'debug_log', + ), + admin_url( 'edit.php' ) + ); + ?> +

+

+ +

+

+ + + +

+
+ clear_log_file(); + wp_send_json_success( wpautop( __( 'The debug log has been cleared and logging has been disabled.', 'easy-digital-downloads' ) ) ); + } + + /** + * Escape message string output + * + * @since 2.6.0 bbPress (r6775) + * + * @param string $message Message to escape. + * + * @return string + */ + private function esc_notice( $message = '' ) { + $tags = wp_kses_allowed_html( 'post' ); + $text = wp_kses( $message, $tags ); + + return $text; + } +} diff --git a/includes/admin/class-list-table.php b/includes/admin/class-list-table.php new file mode 100644 index 00000000000..f94e6f73dd7 --- /dev/null +++ b/includes/admin/class-list-table.php @@ -0,0 +1,249 @@ + 0 + ); + + /** + * Get a request var, or return the default if not set. + * + * @since 3.0 + * + * @param string $var + * @param mixed $default + * @return mixed Un-sanitized request var + */ + public function get_request_var( $var = '', $default = false ) { + return isset( $_REQUEST[ $var ] ) + ? $_REQUEST[ $var ] + : $default; + } + + /** + * Get a status request var, if set. + * + * @since 3.0 + * + * @param mixed $default + * @return string + */ + protected function get_status( $default = '' ) { + return sanitize_key( $this->get_request_var( 'status', $default ) ); + } + + /** + * Retrieve the current page number. + * + * @since 3.0 + * + * @return int Current page number. + */ + protected function get_paged() { + return absint( $this->get_request_var( 'paged', 1 ) ); + } + + /** + * Retrieve the current page number. + * + * @since 3.0 + * + * @return int Current page number. + */ + protected function get_search() { + return urldecode( trim( $this->get_request_var( 's', '' ) ) ); + } + + /** + * Retrieves the data to be populated into the list table. + * + * @since 3.0 + * + * @return array Array of list table data. + */ + abstract public function get_data(); + + /** + * Retrieve the view types + * + * @since 1.4 + * + * @return array $views All the views available + */ + public function get_views() { + + // Get the current status + $current = $this->get_status(); + + // Args to remove + $remove = array( 'edd-message', 'status', 'paged', '_wpnonce' ); + + // Base URL + $url = remove_query_arg( $remove, $this->get_base_url() ); + + // Is all selected? + $class = in_array( $current, array( '', 'all' ), true ) + ? ' class="current"' + : ''; + + // All + $count = ' (' . esc_attr( $this->counts['total'] ) . ')'; + $label = __( 'All', 'easy-digital-downloads' ) . $count; + $views = array( + 'all' => sprintf( '%s', esc_url( $url ), $class, $label ), + ); + + // Remove total from counts array + $counts = $this->counts; + unset( $counts['total'] ); + + // Loop through statuses. + if ( ! empty( $counts ) ) { + foreach ( $counts as $status => $count ) { + $count_url = add_query_arg( array( + 'status' => sanitize_key( $status ), + 'paged' => false, + ), $url ); + + $class = ( $current === $status ) + ? ' class="current"' + : ''; + + $count = ' (' . absint( $this->counts[ $status ] ) . ')'; + + $label = edd_get_status_label( $status ) . $count; + $views[ $status ] = sprintf( '%s', esc_url( $count_url ), $class, $label ); + } + } + + return $views; + } + + /** + * Parse pagination query arguments into keys & values that the Query class + * can understand and use to retrieve the correct results from the database. + * + * @since 3.0 + * + * @param array $args + * + * @return array + */ + public function parse_pagination_args( $args = array() ) { + + // Get pagination values + $order = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 'DESC'; // WPCS: CSRF ok. + $orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'id'; // WPCS: CSRF ok. + $paged = $this->get_paged(); + + // Only perform paged math if numeric and greater than 1 + if ( ! empty( $paged ) && is_numeric( $paged ) && ( $paged > 1 ) ) { + $offset = ceil( $this->per_page * ( $paged - 1 ) ); + + // Otherwise, default to the first page of results + } else { + $offset = 0; + } + + // Parse pagination args into passed args + $r = wp_parse_args( $args, array( + 'number' => $this->per_page, + 'offset' => $offset, + 'order' => $order, + 'orderby' => $orderby + ) ); + + // Return args + return array_filter( $r ); + } + + /** + * Show the search field. + * + * @since 3.0 + * + * @param string $text Label for the search box + * @param string $input_id ID of the search box + */ + public function search_box( $text, $input_id ) { + + // Bail if no customers and no search + if ( ! $this->get_search() && ! $this->has_items() ) { + return; + } + + $orderby = $this->get_request_var( 'orderby' ); + $order = $this->get_request_var( 'order' ); + $input_id = $input_id . '-search-input'; + $status = $this->get_status(); + + if ( ! empty( $orderby ) ) { + echo ''; + } + + if ( ! empty( $order ) ) { + echo ''; + } + + if ( ! empty( $status ) ) { + echo ''; + } + + ?> + + + + add_section( array( + 'id' => 'general', + 'label' => esc_html__( 'General', 'easy-digital-downloads' ), + 'callback' => array( $this, 'section_general' ) + ) ); + } elseif ( count( $sections ) ) { + foreach ( $sections as $section ) { + $this->add_section( $section ); + } + } + } + + /** + * Setup the sections for the current item + * + * @since 3.0 + * + * @param object $item + */ + public function set_item( $item = false ) { + $this->item = $item; + } + + /** + * Output the contents + * + * @since 3.0 + */ + public function display() { + $use_js = ! empty( $this->use_js ) + ? ' use-js' + : ''; + $role = $this->use_js ? 'tablist' : 'menu'; + + ob_start(); ?> + +
+
+
    + get_all_section_links(); ?> +
+ +
+ get_all_section_contents(); ?> +
+
+
+ nonce_field(); + + if ( ! empty( $this->item ) ) : ?> + + + + +
+ + sections[] = (object) wp_parse_args( $section, array( + 'id' => '', + 'label' => '', + 'icon' => 'admin-settings', + 'callback' => '' + ) ); + } + + /** + * Is a section the current section? + * + * @since 3.0 + * + * @param string $section_id + * + * @return bool + */ + private function is_current_section( $section_id = '' ) { + return ( $section_id === $this->current_section ); + } + + /** + * Output the nonce field for the meta box + * + * @since 3.0 + */ + protected function nonce_field() { + wp_nonce_field( + 'edd_' . $this->id . '_sections_nonce', + 'edd_' . $this->id . 'nonce_sections', + true + ); + } + + /** + * Get all section links + * + * @since 3.0 + * + * @return string + */ + protected function get_all_section_links() { + ob_start(); + + // Loop through sections. + foreach ( $this->sections as $section ) : + + // If were using JS, the URL is a hash, otherwise use query args. + $url = $this->use_js + ? '#' . esc_attr( $this->id . $section->id ) + : add_query_arg( 'view', sanitize_key( $section->id ), $this->base_url ); + + // Special selected section. + $selected = ! $this->use_js && $this->is_current_section( $section->id ) + ? 'aria-current="true"' + : ''; + + $class = $this->is_current_section( $section->id ) ? 'section-title section-title--is-active' : 'section-title'; + $aria_attributes = $this->use_js ? 'role="tab" aria-controls="' . esc_attr( $this->id . $section->id ) . '"' : 'role="menuitem"'; + ?> + +
  • > + + + + label; // Allow HTML. ?> + + +
  • + + use_js ) + ? wp_filter_object_list( $this->sections, array( 'id' => $this->current_section ) ) + : $this->sections; + + // Bail if no sections + if ( empty( $sections ) ) { + return; + } + + // Loop through sections + foreach ( $sections as $section ) : + + // Special selected section + $selected = ! $this->is_current_section( $section->id ) + ? 'style="display: none;"' + : ''; ?> + +
    >callback ) ) { + if ( is_callable( $section->callback ) ) { + call_user_func( $section->callback, $this->item ); + + } elseif ( is_array( $section->callback ) && is_callable( $section->callback[0] ) ) { + isset( $section->callback[1] ) + ? call_user_func_array( $section->callback[0], $section->callback[1] ) + : call_user_func_array( $section->callback[0], array() ); + + } else { + _e( 'Invalid section', 'easy-digital-downloads' ); + } + } else { + die; + do_action( 'edd_' . $section->id . 'section_contents', $this ); + } + + ?>
    + + + +
    + + + + + + + +
    + + + — +
    + + 'address', + 'plural' => 'addresses', + 'ajax' => false, + ) + ); + + $this->process_bulk_action(); + $this->get_counts(); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'address'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 3.0 + * + * @param array $item Contains all the data of the customers. + * @param string $column_name The name of the column. + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + switch ( $column_name ) { + + case 'type': + $value = edd_get_address_type_label( $item['type'] ); + if ( ! empty( $item['is_primary'] ) ) { + $value .= '  ' . esc_html__( 'Primary', 'easy-digital-downloads' ) . ''; + } + break; + + case 'date_created': + $value = ''; + break; + + default: + $value = ! empty( $item[ $column_name ] ) + ? esc_html( $item[ $column_name ] ) + : '—'; + break; + } + + // Filter & return. + return apply_filters( 'edd_customers_column_' . $column_name, $value, $item['id'] ); + } + + /** + * Return the contents of the "Name" column + * + * @since 3.0 + * + * @param array $item The current item. + * @return string + */ + public function column_address( $item ) { + $state = ''; + $extra = ''; + $status = $this->get_status(); + $address = ! empty( $item['address'] ) ? $item['address'] : '—'; + $address2 = ! empty( $item['address2'] ) ? $item['address2'] : ''; + $city = ! empty( $item['city'] ) ? $item['city'] : ''; + $code = ! empty( $item['postal_code'] ) ? $item['postal_code'] : ''; + + // Address2. + if ( ! empty( $address2 ) ) { + $extra .= '
    ' . $address2; + } + + // City & Zip. + if ( ! empty( $city ) || ! empty( $code ) ) { + $extra .= '
    ' . implode( ' ', array( $city, $code ) ); + } + + // Get the item status. + $item_status = ! empty( $item['status'] ) + ? $item['status'] + : 'verified'; + + // Get the customer ID. + $customer_id = ! empty( $item['customer_id'] ) + ? absint( $item['customer_id'] ) + : 0; + + // Link to customer. + $customer_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => absint( $customer_id ), + ) + ); + + // State. + if ( ( ! empty( $status ) && ( $status !== $item_status ) ) || ( 'active' !== $item_status ) ) { + switch ( $status ) { + case 'pending': + $value = __( 'Pending', 'easy-digital-downloads' ); + break; + case 'verified': + case '': + default: + $value = __( 'Active', 'easy-digital-downloads' ); + break; + } + + $state = ' — ' . $value; + } + + // Concatenate and return. + return '' . esc_html( $address ) . '' . esc_html( $state ) . '' . $extra . $this->row_actions( $this->get_row_actions( $item ) ); + } + + /** + * Gets the row actions for the customer address. + * + * @since 3.0 + * @param array $item The current item. + * @return array + */ + private function get_row_actions( $item ) { + // Link to customer. + $customer_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $item['customer_id'] ), + ) + ); + + // Actions. + $actions = array( + 'view' => '' . esc_html__( 'View', 'easy-digital-downloads' ) . '', + ); + + if ( empty( $item['is_primary'] ) ) { + $delete_url = wp_nonce_url( + edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $item['id'] ), + 'edd_action' => 'customer-remove-address', + ) + ), + 'edd-remove-customer-address' + ); + $actions['delete'] = '' . esc_html__( 'Delete', 'easy-digital-downloads' ) . ''; + } + + /** + * Filter the customer address row actions. + * + * @since 3.0 + * @param array $actions The array of row actions. + * @param array $item The specific item (customer address). + */ + return apply_filters( 'edd_customer_address_row_actions', $actions, $item ); + } + + /** + * Return the contents of the "Name" column + * + * @since 3.0 + * + * @param array $item The current item. + * @return string + */ + public function column_customer( $item ) { + + // Get the customer ID. + $customer_id = ! empty( $item['customer_id'] ) + ? absint( $item['customer_id'] ) + : 0; + + // Bail if no customer ID. + if ( empty( $customer_id ) ) { + return '—'; + } + + // Try to get the customer. + $customer = edd_get_customer( $customer_id ); + + // Bail if customer no longer exists. + if ( empty( $customer ) ) { + return '—'; + } + + // Link to customer. + $customer_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'page_type' => 'physical', + 's' => 'c:' . absint( $customer_id ), + ) + ); + + // Concatenate and return. + return '' . esc_html( $customer->name ) . ''; + } + + /** + * Render the checkbox column + * + * @access public + * @since 3.0 + * + * @param array $item Address object. + * + * @return string Displays a checkbox + */ + public function column_cb( $item ) { + $customer = edd_get_customer_by( 'id', $item['customer_id'] ); + $name = sprintf( + /* translators: customer address id */ + __( 'Address ID: %s', 'easy-digital-downloads' ), + $item['id'] + ); + if ( ! empty( $customer->name ) ) { + $name = $customer->name; + } + return sprintf( + '', + esc_attr( 'customer' ), + esc_attr( $item['id'] ), + /* translators: %s: the customer name */ + esc_html( sprintf( _x( 'Select %s', 'Noun: The customer name', 'easy-digital-downloads' ), $name ) ) + ); + } + + /** + * Retrieve the customer counts + * + * @access public + * @since 3.0 + * @return void + */ + public function get_counts() { + $this->counts = edd_get_customer_address_counts(); + } + + /** + * Retrieve the table columns + * + * @since 3.0 + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return apply_filters( + 'edd_report_customer_columns', + array( + 'cb' => '', + 'address' => __( 'Address', 'easy-digital-downloads' ), + 'region' => __( 'Region', 'easy-digital-downloads' ), + 'country' => __( 'Country', 'easy-digital-downloads' ), + 'customer' => __( 'Customer', 'easy-digital-downloads' ), + 'type' => __( 'Type', 'easy-digital-downloads' ), + 'date_created' => __( 'Date', 'easy-digital-downloads' ), + ) + ); + } + + /** + * Get the sortable columns + * + * @since 2.1 + * @return array Array of all the sortable columns + */ + public function get_sortable_columns() { + return array( + 'date_created' => array( 'date_created', true ), + 'address' => array( 'address', false ), + 'region' => array( 'region', true ), + 'country' => array( 'country', true ), + 'customer' => array( 'customer_id', false ), + 'type' => array( 'type', false ), + ); + } + + /** + * Retrieve the bulk actions + * + * @access public + * @since 3.0 + * @return array Array of the bulk actions + */ + public function get_bulk_actions() { + return array( + 'delete' => __( 'Delete', 'easy-digital-downloads' ), + ); + } + + /** + * Process the bulk actions + * + * @access public + * @since 3.0 + */ + public function process_bulk_action() { + if ( empty( $_REQUEST['_wpnonce'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-addresses' ) ) { + return; + } + + $ids = isset( $_GET['customer'] ) + ? $_GET['customer'] + : false; + + if ( ! is_array( $ids ) ) { + $ids = array( $ids ); + } + + foreach ( $ids as $id ) { + switch ( $this->current_action() ) { + case 'delete': + edd_delete_customer_address( $id ); + break; + } + } + } + + /** + * Get all of the items to display, given the current filters + * + * @since 3.0 + * + * @return array $data All the row data + */ + public function get_data() { + $data = array(); + $search = $this->get_search(); + $args = array( 'status' => $this->get_status() ); + + // Customer ID. + if ( strpos( $search, 'c:' ) !== false ) { + $args['customer_id'] = trim( str_replace( 'c:', '', $search ) ); + + // Country. + } elseif ( strpos( $search, 'country:' ) !== false ) { + $search = substr( $search, strlen( 'country:' ) ); + $args['search'] = $search; + $args['search_columns'] = array( 'country' ); + + // Zip. + } elseif ( strpos( $search, 'zip:' ) !== false ) { + $search = substr( $search, strlen( 'zip:' ) ); + $args['search'] = $search; + $args['search_columns'] = array( 'zip' ); + + // Region. + } elseif ( strpos( $search, 'region:' ) !== false ) { + $search = substr( $search, strlen( 'region:' ) ); + $args['search'] = $search; + $args['search_columns'] = array( 'region' ); + + // City. + } elseif ( strpos( $search, 'city:' ) !== false ) { + $search = substr( $search, strlen( 'city:' ) ); + $args['search'] = $search; + $args['search_columns'] = array( 'city' ); + + // Any... + } else { + $args['search'] = $search; + $args['search_columns'] = array( 'address', 'address2', 'city', 'region', 'country', 'postal_code' ); + } + + // Parse pagination. + $this->args = $this->parse_pagination_args( $args ); + + // Get the data. + $addresses = edd_get_customer_addresses( $this->args ); + + if ( ! empty( $addresses ) ) { + foreach ( $addresses as $address ) { + $data[] = array( + 'id' => $address->id, + 'customer_id' => $address->customer_id, + 'status' => $address->status, + 'type' => $address->type, + 'address' => $address->address, + 'address2' => $address->address2, + 'city' => $address->city, + 'region' => $address->region, + 'postal_code' => $address->postal_code, + 'country' => $address->country, + 'date_created' => $address->date_created, + 'date_modified' => $address->date_modified, + 'is_primary' => $address->is_primary, + ); + } + } + + return $data; + } + + /** + * Setup the final data for the table + * + * @since 3.0 + * @return void + */ + public function prepare_items() { + $this->_column_headers = array( + $this->get_columns(), + array(), + $this->get_sortable_columns(), + ); + + $this->items = $this->get_data(); + + $status = $this->get_status( 'total' ); + + // Setup pagination. + $this->set_pagination_args( + array( + 'total_pages' => ceil( $this->counts[ $status ] / $this->per_page ), + 'total_items' => $this->counts[ $status ], + 'per_page' => $this->per_page, + ) + ); + } + + /** + * Generate the table navigation above or below the table. + * We're overriding this to turn off the referer param in `wp_nonce_field()`. + * + * @param string $which If we're rendering the top or bottom nav. + * @since 3.1.0.4 + */ + protected function display_tablenav( $which ) { + if ( 'top' === $which ) { + wp_nonce_field( 'bulk-' . $this->_args['plural'], '_wpnonce', false ); + } + ?> +
    + + has_items() ) : ?> +
    + bulk_actions( $which ); ?> +
    + extra_tablenav( $which ); + $this->pagination( $which ); + ?> + +
    +
    + 'email', + 'plural' => 'emails', + 'ajax' => false, + ) + ); + + $this->process_bulk_action(); + $this->get_counts(); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'email'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 3.0 + * + * @param array $item Contains all the data of the customers. + * @param string $column_name The name of the column. + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + switch ( $column_name ) { + + case 'id': + $value = $item['id']; + break; + + case 'email': + $value = '' . esc_html( $item['email'] ) . ''; + break; + + case 'type': + $value = ( 'primary' === $item['type'] ) + ? esc_html__( 'Primary', 'easy-digital-downloads' ) + : esc_html__( 'Secondary', 'easy-digital-downloads' ); + break; + + case 'date_created': + $value = ''; + break; + + default: + $value = isset( $item[ $column_name ] ) + ? $item[ $column_name ] + : null; + break; + } + + // Filter & return. + return apply_filters( 'edd_customers_column_' . $column_name, $value, $item['id'] ); + } + + /** + * Return the contents of the "Name" column + * + * @since 3.0 + * + * @param array $item The current item. + * @return string + */ + public function column_email( $item ) { + $state = ''; + $status = $this->get_status(); + $email = ! empty( $item['email'] ) ? $item['email'] : '—'; + + // Get the item status. + $item_status = ! empty( $item['status'] ) + ? $item['status'] + : 'verified'; + + // Get the customer ID. + $customer_id = ! empty( $item['customer_id'] ) + ? absint( $item['customer_id'] ) + : 0; + + // Link to customer. + $customer_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => absint( $customer_id ), + ) + ); + + // State. + if ( ( ! empty( $status ) && ( $status !== $item_status ) ) || ( 'active' !== $item_status ) ) { + switch ( $status ) { + case 'pending': + $value = __( 'Pending', 'easy-digital-downloads' ); + break; + case 'verified': + case '': + default: + $value = __( 'Active', 'easy-digital-downloads' ); + break; + } + + $state = ' — ' . $value; + } + + // Concatenate and return. + return '' . esc_html( $email ) . '' . esc_html( $state ) . '' . $this->row_actions( $this->get_row_actions( $item ) ); + } + + /** + * Gets the row actions for the customer email address. + * + * @since 3.0 + * @param array $item The current item. + * @return array + */ + private function get_row_actions( $item ) { + // Link to customer. + $customer_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $item['customer_id'] ), + ) + ); + + // Actions. + $actions = array( + 'view' => '' . __( 'View', 'easy-digital-downloads' ) . '', + ); + + // Non-primary email actions. + if ( ! empty( $item['email'] ) && ( empty( $item['type'] ) || 'primary' !== $item['type'] ) ) { + $delete_url = wp_nonce_url( + edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $item['customer_id'] ), + 'email' => rawurlencode( $item['email'] ), + 'edd_action' => 'customer-remove-email', + ) + ), + 'edd-remove-customer-email' + ); + $actions['delete'] = '' . esc_html__( 'Delete', 'easy-digital-downloads' ) . ''; + } + + /** + * Filter the customer email address row actions. + * + * @since 3.0 + * @param array $actions The array of row actions. + * @param array $item The specific item (customer email address). + */ + return apply_filters( 'edd_customer_email_address_row_actions', $actions, $item ); + } + + /** + * Return the contents of the "Name" column + * + * @since 3.0 + * + * @param array $item The current item. + * @return string + */ + public function column_customer( $item ) { + + // Get the customer ID. + $customer_id = ! empty( $item['customer_id'] ) + ? absint( $item['customer_id'] ) + : 0; + + // Bail if no customer ID. + if ( empty( $customer_id ) ) { + return '—'; + } + + // Try to get the customer. + $customer = edd_get_customer( $customer_id ); + + // Bail if customer no longer exists. + if ( empty( $customer ) ) { + return '—'; + } + + // Link to customer. + $customer_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'page_type' => 'emails', + 's' => 'c:' . absint( $customer_id ), + ) + ); + + // Concatenate and return. + return '' . esc_html( $customer->name ) . ''; + } + + /** + * Render the checkbox column + * + * @access public + * @since 3.0 + * + * @param array $item The current item. + * + * @return string Displays a checkbox + */ + public function column_cb( $item ) { + $is_primary = ! empty( $item['type'] ) && 'primary' === $item['type']; + $primary_attributes = $is_primary ? ' disabled' : ''; + $title = $is_primary ? __( 'Primary email addresses cannot be deleted.', 'easy-digital-downloads' ) : ''; + + return sprintf( + '', + esc_attr( 'customer' ), + esc_attr( $item['id'] ), + /* translators: %s: the customer email address */ + esc_html( sprintf( _x( 'Select %s', 'Noun: The customer email address', 'easy-digital-downloads' ), $item['email'] ) ), + esc_attr( $title ), + $primary_attributes + ); + } + + /** + * Retrieve the customer counts + * + * @access public + * @since 3.0 + * @return void + */ + public function get_counts() { + $this->counts = edd_get_customer_email_address_counts(); + } + + /** + * Retrieve the table columns + * + * @since 3.0 + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return apply_filters( + 'edd_report_customer_columns', + array( + 'cb' => '', + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'customer' => __( 'Customer', 'easy-digital-downloads' ), + 'type' => __( 'Type', 'easy-digital-downloads' ), + 'date_created' => __( 'Date', 'easy-digital-downloads' ), + ) + ); + } + + /** + * Get the sortable columns + * + * @since 2.1 + * @return array Array of all the sortable columns + */ + public function get_sortable_columns() { + return array( + 'date_created' => array( 'date_created', true ), + 'email' => array( 'email', true ), + 'customer' => array( 'customer_id', false ), + 'type' => array( 'type', false ), + ); + } + + /** + * Retrieve the bulk actions + * + * @access public + * @since 3.0 + * @return array Array of the bulk actions + */ + public function get_bulk_actions() { + return array( + 'delete' => __( 'Delete', 'easy-digital-downloads' ), + ); + } + + /** + * Process the bulk actions + * + * @access public + * @since 3.0 + */ + public function process_bulk_action() { + if ( empty( $_REQUEST['_wpnonce'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-emails' ) ) { + return; + } + + $ids = isset( $_GET['customer'] ) + ? $_GET['customer'] + : false; + + if ( ! is_array( $ids ) ) { + $ids = array( $ids ); + } + + /* + * Only non-primary email addresses can be deleted, so we're building up a safelist using the provided + * IDs. Each ID will be matched against this prior to deletion. + */ + $non_primary_address_ids = edd_get_customer_email_addresses( + array( + 'id__in' => $ids, + 'type__not_in' => array( 'primary' ), + 'fields' => 'id', + ) + ); + + foreach ( $ids as $id ) { + switch ( $this->current_action() ) { + case 'delete': + if ( in_array( $id, $non_primary_address_ids, true ) ) { + edd_delete_customer_email_address( $id ); + } + break; + } + } + } + + /** + * Get all of the items to display, given the current filters + * + * @since 3.0 + * + * @return array $data All the row data + */ + public function get_data() { + $data = array(); + $search = $this->get_search(); + $args = array( 'status' => $this->get_status() ); + + // Account for search stripping the "+" from emails. + if ( strpos( $search, ' ' ) ) { + $original_query = $search; + $search = str_replace( ' ', '+', $search ); + if ( ! is_email( $search ) ) { + $search = $original_query; + } + } + + // Email. + if ( is_email( $search ) ) { + $args['email'] = $search; + + // Address ID. + } elseif ( is_numeric( $search ) ) { + $args['id'] = $search; + + // Customer ID. + } elseif ( strpos( $search, 'c:' ) !== false ) { + $args['customer_id'] = trim( str_replace( 'c:', '', $search ) ); + + // Any... + } else { + $args['search'] = $search; + $args['search_columns'] = array( 'email' ); + } + + // Parse pagination. + $this->args = $this->parse_pagination_args( $args ); + + // Get the data. + $emails = edd_get_customer_email_addresses( $this->args ); + + if ( ! empty( $emails ) ) { + foreach ( $emails as $customer ) { + $data[] = array( + 'id' => $customer->id, + 'email' => $customer->email, + 'customer_id' => $customer->customer_id, + 'status' => $customer->status, + 'type' => $customer->type, + 'date_created' => $customer->date_created, + ); + } + } + + return $data; + } + + /** + * Setup the final data for the table + * + * @since 3.0 + * @return void + */ + public function prepare_items() { + $this->_column_headers = array( + $this->get_columns(), + array(), + $this->get_sortable_columns(), + ); + + $this->items = $this->get_data(); + + $status = $this->get_status( 'total' ); + + // Setup pagination. + $this->set_pagination_args( + array( + 'total_pages' => ceil( $this->counts[ $status ] / $this->per_page ), + 'total_items' => $this->counts[ $status ], + 'per_page' => $this->per_page, + ) + ); + } + + /** + * Generate the table navigation above or below the table. + * We're overriding this to turn off the referer param in `wp_nonce_field()`. + * + * @param string $which Which table nav we're rendering, top or bottom. + * @since 3.1.0.4 + */ + protected function display_tablenav( $which ) { + if ( 'top' === $which ) { + wp_nonce_field( 'bulk-' . $this->_args['plural'], '_wpnonce', false ); + } + ?> +
    + + has_items() ) : ?> +
    + bulk_actions( $which ); ?> +
    + extra_tablenav( $which ); + $this->pagination( $which ); + ?> + +
    +
    + 'customer', + 'plural' => 'customers', + 'ajax' => false, + ) + ); + + $this->process_bulk_action(); + $this->get_counts(); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'name'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 1.5 + * + * @param array $item Contains all the data of the customers. + * @param string $column_name The name of the column. + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + + $timezone_abbreviation = edd_get_timezone_abbr(); + + switch ( $column_name ) { + + case 'id': + $value = esc_html( $item['id'] ); + break; + + case 'email': + $value = '' . esc_html( $item['email'] ) . ''; + break; + + case 'order_count': + $url = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'customer' => rawurlencode( $item['id'] ), + ) + ); + $value = '' . esc_html( number_format_i18n( $item['order_count'] ) ) . ''; + break; + + case 'spent': + $value = edd_currency_filter( edd_format_amount( $item[ $column_name ] ) ); + break; + + case 'date_created': + $value = ''; + break; + + default: + $value = isset( $item[ $column_name ] ) + ? esc_html( $item[ $column_name ] ) + : null; + break; + } + + // Filter & return. + return apply_filters( 'edd_customers_column_' . esc_attr( $column_name ), $value, $item['id'] ); + } + + /** + * Return the contents of the "Name" column + * + * @since 3.0 + * + * @param array $item The current item. + * @return string + */ + public function column_name( $item ) { + $state = ''; + $status = $this->get_status(); + $name = ! empty( $item['name'] ) ? $item['name'] : '—'; + + $item_status = ! empty( $item['status'] ) + ? $item['status'] + : 'active'; + + // State. + if ( ( ! empty( $status ) && ( $status !== $item_status ) ) || ( 'active' !== $item_status ) ) { + switch ( $item_status ) { + case 'pending': + $value = __( 'Pending', 'easy-digital-downloads' ); + break; + case 'disabled': + $value = __( 'Disabled', 'easy-digital-downloads' ); + break; + case 'inactive': + $value = __( 'Inactive', 'easy-digital-downloads' ); + break; + case 'active': + case '': + default: + $value = __( 'Active', 'easy-digital-downloads' ); + break; + } + + $state = ' — ' . $value; + } + + // Get the customer's avatar. + $avatar = get_avatar( $item['email'], 32 ); + + // View URL. + $view_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $item['id'] ), + ) + ); + + // Concatenate and return. + return $avatar . '' . esc_html( $name ) . '' . esc_html( $state ) . $this->row_actions( $this->get_row_actions( $item ) ); + } + + /** + * Gets the row actions for the customer. + * + * @since 3.0 + * @param array $item The current item. + * @return array + */ + private function get_row_actions( $item ) { + $view_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $item['id'] ), + ) + ); + $logs_url = edd_get_admin_url( + array( + 'page' => 'edd-tools', + 'tab' => 'logs', + 'customer' => urlencode( $item['id'] ), + ) + ); + $delete_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'delete', + 'id' => urlencode( $item['id'] ), + ) + ); + $actions = array( + 'view' => '' . __( 'Edit', 'easy-digital-downloads' ) . '', + 'logs' => '' . __( 'Logs', 'easy-digital-downloads' ) . '', + 'delete' => '' . __( 'Delete', 'easy-digital-downloads' ) . '', + ); + + /** + * Filter the customer row actions. + * + * @since 3.0 + * @param array $actions The array of row actions. + * @param array $item The specific item (customer). + */ + return apply_filters( 'edd_customer_row_actions', $actions, $item ); + } + + /** + * Render the checkbox column + * + * @since 3.0 + * + * @param array $item Customer data. + * + * @return string Displays a checkbox + */ + public function column_cb( $item ) { + $name = empty( $item['name'] ) ? $item['email'] : $item['name']; + + return sprintf( + '', + 'customer', + esc_attr( $item['id'] ), + /* translators: %s: the customer name or email address */ + esc_html( sprintf( _x( 'Select %s', 'Noun: The customer name or Email Address', 'easy-digital-downloads' ), $name ) ) + ); + } + + /** + * Retrieve the customer counts + * + * @since 3.0 + * @return void + */ + public function get_counts() { + $this->counts = edd_get_customer_counts(); + } + + /** + * Retrieve the table columns + * + * @since 1.5 + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return apply_filters( + 'edd_report_customer_columns', + array( + 'cb' => '', + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'order_count' => __( 'Orders', 'easy-digital-downloads' ), + 'spent' => __( 'Spent', 'easy-digital-downloads' ), + 'date_created' => __( 'Date', 'easy-digital-downloads' ), + ) + ); + } + + /** + * Get the sortable columns + * + * @since 2.1 + * @return array Array of all the sortable columns + */ + public function get_sortable_columns() { + return array( + 'date_created' => array( 'date_created', true ), + 'name' => array( 'name', true ), + 'email' => array( 'email', true ), + 'order_count' => array( 'purchase_count', false ), + 'spent' => array( 'purchase_value', false ), + ); + } + + /** + * Retrieve the bulk actions + * + * @since 3.0 + * @return array Array of the bulk actions + */ + public function get_bulk_actions() { + return array( + 'delete' => __( 'Delete', 'easy-digital-downloads' ), + ); + } + + /** + * Process the bulk actions + * + * @since 3.0 + */ + public function process_bulk_action() { + if ( empty( $_REQUEST['_wpnonce'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-customers' ) ) { + return; + } + + check_admin_referer( 'bulk-customers' ); + + $ids = isset( $_GET['customer'] ) + ? $_GET['customer'] + : false; + + if ( ! is_array( $ids ) ) { + $ids = array( $ids ); + } + + foreach ( $ids as $id ) { + switch ( $this->current_action() ) { + case 'delete': + edd_delete_customer( $id ); + break; + } + } + } + + /** + * Builds and retrieves all the reports data. + * + * @since 1.5 + * @deprecated 3.0 Use get_data() + * + * @return array All the data for customer reports. + */ + public function reports_data() { + _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Customer_Reports_Table::get_data()' ); + + return $this->get_data(); + } + + /** + * Retrieves all of the items to display, given the current filters. + * + * @since 3.0 + * + * @return array $data All the row data. + */ + public function get_data() { + $data = array(); + $search = $this->get_search(); + $args = array( 'status' => $this->get_status() ); + + // Account for search stripping the "+" from emails. + if ( strpos( $search, ' ' ) ) { + $original_query = $search; + $search = str_replace( ' ', '+', $search ); + if ( ! is_email( $search ) ) { + $search = $original_query; + } + } + + // Email search. + if ( is_email( $search ) ) { + $args['email'] = $search; + + // Customer ID. + } elseif ( is_numeric( $search ) ) { + $args['id'] = $search; + } elseif ( strpos( $search, 'c:' ) !== false ) { + $args['id'] = trim( str_replace( 'c:', '', $search ) ); + + // User ID. + } elseif ( strpos( $search, 'user:' ) !== false ) { + $args['user_id'] = trim( str_replace( 'u:', '', $search ) ); + } elseif ( strpos( $search, 'u:' ) !== false ) { + $args['user_id'] = trim( str_replace( 'u:', '', $search ) ); + + // Other... + } else { + $args['search'] = $search; + $args['search_columns'] = array( 'name', 'email' ); + } + + // Parse pagination. + $this->args = $this->parse_pagination_args( $args ); + + if ( is_email( $search ) ) { + $customer_emails = new EDD\Database\Queries\Customer_Email_Address(); + $customer_ids = $customer_emails->query( + array( + 'fields' => 'customer_id', + 'email' => $search, + ) + ); + + $customers = edd_get_customers( + array( + 'id__in' => $customer_ids, + ) + ); + } else { + $customers = edd_get_customers( $this->args ); + } + + // Get the data. + if ( ! empty( $customers ) ) { + foreach ( $customers as $customer ) { + $data[] = array( + 'id' => $customer->id, + 'user_id' => $customer->user_id, + 'name' => $customer->name, + 'email' => $customer->email, + 'order_count' => $customer->purchase_count, + 'spent' => $customer->purchase_value, + 'date_created' => $customer->date_created, + 'status' => $customer->status, + ); + } + } + + return $data; + } + + /** + * Setup the final data for the table + * + * @since 1.5 + * @return void + */ + public function prepare_items() { + $this->_column_headers = array( + $this->get_columns(), + array(), + $this->get_sortable_columns(), + ); + + $this->items = $this->get_data(); + + $status = $this->get_status( 'total' ); + + // Add condition to be sure we don't divide by zero. + // If $this->per_page is 0, then set total pages to 1. + $total_pages = $this->per_page ? ceil( (int) $this->counts[ $status ] / (int) $this->per_page ) : 1; + + // Setup pagination. + $this->set_pagination_args( + array( + 'total_pages' => $total_pages, + 'total_items' => $this->counts[ $status ], + 'per_page' => $this->per_page, + ) + ); + } + + /** + * Generate the table navigation above or below the table. + * We're overriding this to turn off the referer param in `wp_nonce_field()`. + * + * @param string $which Which part of the table nav we're rendering, top or bottom. + * @since 3.1.0.4 + */ + protected function display_tablenav( $which ) { + if ( 'top' === $which ) { + wp_nonce_field( 'bulk-' . $this->_args['plural'], '_wpnonce', false ); + } + ?> +
    + + has_items() ) : ?> +
    + bulk_actions( $which ); ?> +
    + extra_tablenav( $which ); + $this->pagination( $which ); + ?> + +
    +
    + '', + 'email' => '', + 'date_created' => '', + 'user_id' => 0 + ) ); + + if ( ! is_email( $customer_info['email'] ) ) { + edd_set_error( 'edd-invalid-email', __( 'Please enter a valid email address.', 'easy-digital-downloads' ) ); + } + + if ( (int) $customer_info['user_id'] !== (int) $customer->user_id ) { + + // Make sure we don't already have this user attached to a customer + if ( ! empty( $customer_info['user_id'] ) && false !== edd_get_customer_by( 'user_id', $customer_info['user_id'] ) ) { + /* translators: %d: user ID */ + edd_set_error( 'edd-invalid-customer-user_id', sprintf( __( 'The User ID %d is already associated with a different customer.', 'easy-digital-downloads' ), $customer_info['user_id'] ) ); + } + + // Make sure it's actually a user + $user = get_user_by( 'id', $customer_info['user_id'] ); + if ( ! empty( $customer_info['user_id'] ) && false === $user ) { + /* translators: %d: user ID */ + edd_set_error( 'edd-invalid-user_id', sprintf( __( 'The User ID %d does not exist. Please assign an existing user.', 'easy-digital-downloads' ), $customer_info['user_id'] ) ); + } + } + + // Record this for later + $previous_user_id = $customer->user_id; + + // Bail if errors exist. + if ( edd_get_errors() ) { + return false; + } + + $user_id = absint( $customer_info['user_id'] ); + + if ( empty( $user_id ) && ! empty( $customer_info['user_login'] ) ) { + + // See if they gave an email, otherwise we'll assume login + $user_by_field = is_email( $customer_info['user_login'] ) + ? 'email' + : 'login'; + + $user = get_user_by( $user_by_field, $customer_info['user_login'] ); + + if ( $user ) { + $user_id = $user->ID; + } else { + /* translators: %s: user login or email address */ + edd_set_error( 'edd-invalid-user-string', sprintf( __( 'Failed to attach user. The login or email address %s was not found.', 'easy-digital-downloads' ), $customer_info['user_login'] ) ); + } + } + + // Setup the customer address, if present. + $address = array(); + + $address['address'] = isset( $customer_info['address'] ) + ? $customer_info['address'] + : ''; + + $address['address2'] = isset( $customer_info['address2'] ) + ? $customer_info['address2'] + : ''; + + $address['city'] = isset( $customer_info['city'] ) + ? $customer_info['city'] + : ''; + + $address['country'] = isset( $customer_info['country'] ) + ? $customer_info['country'] + : ''; + + $address['postal_code'] = isset( $customer_info['postal_code'] ) + ? $customer_info['postal_code'] + : ''; + + $address['region'] = isset( $customer_info['region'] ) + ? $customer_info['region'] + : ''; + + // Sanitize the inputs + $customer_data = array(); + $customer_data['name'] = strip_tags( stripslashes( $customer_info['name'] ) ); + $customer_data['email'] = $customer_info['email']; + $customer_data['user_id'] = $user_id; + $customer_data['date_created'] = gmdate( 'Y-m-d H:i:s', strtotime( $customer_info['date_created'] ) ); + $customer_data['status'] = $customer_info['status']; + + $customer_data = apply_filters( 'edd_edit_customer_info', $customer_data, $customer_id ); + $address = apply_filters( 'edd_edit_customer_address', $address, $customer_id ); + + $customer_data = array_map( 'sanitize_text_field', $customer_data ); + $address = array_map( 'sanitize_text_field', $address ); + + do_action( 'edd_pre_edit_customer', $customer_id, $customer_data, $address ); + + $output = array(); + $previous_email = $customer->email; + + // Add new address before update to skip exists checks + if ( $previous_email !== $customer_data['email'] ) { + $customer->add_email( $customer_data['email'], true ); + } + + // Update customer + if ( $customer->update( $customer_data ) ) { + $current_address = $customer->get_address(); + $address['customer_id'] = $customer->id; + + if ( $current_address ) { + edd_update_customer_address( $current_address->id, $address ); + } else { + $address['is_primary'] = true; + edd_add_customer_address( $address ); + } + + $output['success'] = true; + $customer_data = array_merge( $customer_data, $address ); + $output['customer_info'] = $customer_data; + } else { + $output['success'] = false; + } + + do_action( 'edd_post_edit_customer', $customer_id, $customer_data ); + + if ( edd_doing_ajax() ) { + wp_send_json( $output ); + } + + return $output; +} +add_action( 'edd_edit-customer', 'edd_edit_customer', 10, 1 ); + +/** + * Add an email address to the customer from within the admin and log a customer note + * + * @since 2.6 + * @param array $args Array of arguments: nonce, customer id, and email address + * @return mixed Echos JSON if doing AJAX. Returns array of success (bool) and message (string) if not AJAX. + */ +function edd_add_customer_email( $args = array() ) { + + if ( ! is_admin() || ! current_user_can( edd_get_edit_customers_role() ) ) { + wp_die( __( 'You do not have permission to edit this customer.', 'easy-digital-downloads' ) ); + } + + $output = array(); + + if ( empty( $args ) || empty( $args['email'] ) || empty( $args['customer_id'] ) ) { + + $output['success'] = false; + + if ( empty( $args['email'] ) ) { + $output['message'] = __( 'Email address is missing.', 'easy-digital-downloads' ); + } else if ( empty( $args['customer_id'] ) ) { + $output['message'] = __( 'Customer ID is required.', 'easy-digital-downloads' ); + } else { + $output['message'] = __( 'An error has occured. Please try again.', 'easy-digital-downloads' ); + } + + } else if ( ! wp_verify_nonce( $args['_wpnonce'], 'edd-add-customer-email' ) ) { + $output = array( + 'success' => false, + 'message' => __( 'Nonce verification failed.', 'easy-digital-downloads' ), + ); + + } else if ( ! is_email( $args['email'] ) ) { + $output = array( + 'success' => false, + 'message' => __( 'Invalid email address.', 'easy-digital-downloads' ), + ); + + } else { + $email = sanitize_email( $args['email'] ); + $customer_id = (int) $args['customer_id']; + $primary = 'true' === $args['primary'] ? true : false; + $customer = new EDD_Customer( $customer_id ); + $customer_email_id = $customer->add_email( $email, $primary ); + + if ( false === $customer_email_id ) { + + if ( in_array( $email, $customer->emails, true ) ) { + $output = array( + 'success' => false, + 'message' => __( 'Email already associated with this customer.', 'easy-digital-downloads' ), + ); + + } else { + $output = array( + 'success' => false, + 'message' => __( 'Email address is already associated with another customer.', 'easy-digital-downloads' ), + ); + } + + } else { + $redirect = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => absint( $customer_id ), + 'edd-message' => 'email-added', + 'edd-email-id' => absint( $customer_email_id ), + ) + ); + $output = array( + 'success' => true, + 'message' => __( 'Email successfully added to customer.', 'easy-digital-downloads' ), + 'redirect' => $redirect . '#edd_general_emails', + ); + + $user = wp_get_current_user(); + $user_login = ! empty( $user->user_login ) ? $user->user_login : edd_get_bot_name(); + /* translators: 1: email address, 2: username */ + $customer_note = sprintf( __( 'Email address %1$s added by %2$s', 'easy-digital-downloads' ), $email, $user_login ); + $customer->add_note( $customer_note ); + + if ( $primary ) { + /* translators: 1: email address, 2: username */ + $customer_note = sprintf( __( 'Email address %1$s set as primary by %2$s', 'easy-digital-downloads' ), $email, $user_login ); + $customer->add_note( $customer_note ); + } + } + } + + if ( ! isset( $customer_id ) ) { + $customer_id = isset( $args['customer_id'] ) ? $args['customer_id'] : false; + } + + do_action( 'edd_post_add_customer_email', $customer_id, $args ); + + if ( edd_doing_ajax() ) { + wp_send_json( $output ); + } + + return $output; +} +add_action( 'edd_customer-add-email', 'edd_add_customer_email', 10, 1 ); + +/** + * Remove an email address to the customer from within the admin and log a customer note + * and redirect back to the customer interface for feedback + * + * @since 2.6 + * @return void + */ +function edd_remove_customer_email() { + if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) { + return false; + } + + if ( empty( $_GET['email'] ) || ! is_email( $_GET['email'] ) ) { + return false; + } + + if ( empty( $_GET['_wpnonce'] ) ) { + return false; + } + + $nonce = $_GET['_wpnonce']; + if ( ! wp_verify_nonce( $nonce, 'edd-remove-customer-email' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( ! current_user_can( edd_get_edit_customers_role() ) ) { + wp_die( __( 'You do not have permission to edit this customer.', 'easy-digital-downloads' ) ); + } + + $customer = new EDD_Customer( $_GET['id'] ); + if ( $customer->remove_email( $_GET['email'] ) ) { + $url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $customer->id ), + 'edd-message' => 'email-removed', + ) + ); + $user = wp_get_current_user(); + $user_login = ! empty( $user->user_login ) ? $user->user_login : edd_get_bot_name(); + /* translators: 1: email address, 2: username */ + $customer_note = sprintf( __( 'Email address %1$s removed by %2$s', 'easy-digital-downloads' ), sanitize_email( $_GET['email'] ), $user_login ); + $customer->add_note( $customer_note ); + + } else { + $url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $customer->id ), + 'edd-message' => 'email-remove-failed', + ) + ); + } + + edd_redirect( $url . '#edd_general_emails' ); +} +add_action( 'edd_customer-remove-email', 'edd_remove_customer_email', 10 ); + +/** + * Set an email address as the primary for a customer from within the admin and log a customer note + * and redirect back to the customer interface for feedback + * + * @since 2.6 + * @return void + */ +function edd_set_customer_primary_email() { + if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) { + return false; + } + + if ( empty( $_GET['email'] ) || ! is_email( $_GET['email'] ) ) { + return false; + } + + if ( empty( $_GET['_wpnonce'] ) ) { + return false; + } + + $nonce = $_GET['_wpnonce']; + if ( ! wp_verify_nonce( $nonce, 'edd-set-customer-primary-email' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( ! current_user_can( edd_get_edit_customers_role() ) ) { + wp_die( __( 'You do not have permission to edit this customer.', 'easy-digital-downloads' ) ); + } + + $customer = new EDD_Customer( $_GET['id'] ); + if ( $customer->set_primary_email( $_GET['email'] ) ) { + $url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $customer->id ), + 'edd-message' => 'primary-email-updated', + ) + ); + $user = wp_get_current_user(); + $user_login = ! empty( $user->user_login ) ? $user->user_login : edd_get_bot_name(); + /* translators: 1: email address, 2: username */ + $customer_note = sprintf( __( 'Email address %1$s set as primary by %2$s', 'easy-digital-downloads' ), sanitize_email( $_GET['email'] ), $user_login ); + $customer->add_note( $customer_note ); + + } else { + $url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $customer->id ), + 'edd-message' => 'primary-email-failed', + ) + ); + } + + edd_redirect( $url . '#edd_general_emails' ); +} +add_action( 'edd_customer-primary-email', 'edd_set_customer_primary_email', 10 ); + +/** + * Delete a customer + * + * @since 2.3 + * @param array $args The $_POST array being passed + * @return int Whether it was a successful deletion + */ +function edd_customer_delete( $args = array() ) { + + if ( ! is_admin() || ! current_user_can( edd_get_edit_customers_role() ) ) { + wp_die( __( 'You do not have permission to delete this customer.', 'easy-digital-downloads' ) ); + } + + if ( empty( $args ) ) { + return; + } + + $customer_id = (int)$args['customer_id']; + $confirm = ! empty( $args['edd-customer-delete-confirm'] ); + $remove_data = ! empty( $args['edd-customer-delete-records'] ); + $nonce = $args['_wpnonce']; + + if ( ! wp_verify_nonce( $nonce, 'delete-customer' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ) ); + } + + if ( ! $confirm ) { + edd_set_error( 'customer-delete-no-confirm', __( 'Please confirm you want to delete this customer', 'easy-digital-downloads' ) ); + } + + if ( edd_get_errors() ) { + edd_redirect( + edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => absint( $customer_id ), + ) + ) + ); + } + + $customer = new EDD_Customer( $customer_id ); + + do_action( 'edd_pre_delete_customer', $customer_id, $confirm, $remove_data ); + + $success = false; + + if ( $customer->id > 0 ) { + + $payments_array = explode( ',', $customer->payment_ids ); + $success = edd_destroy_customer( $customer->id ); + + if ( $success ) { + + if ( $remove_data ) { + + // Remove all payments, logs, etc + foreach ( $payments_array as $payment_id ) { + edd_destroy_order( $payment_id ); + } + + } else { + + // Just set the payments to customer_id of 0 + foreach ( $payments_array as $payment_id ) { + edd_update_payment_meta( $payment_id, '_edd_payment_customer_id', 0 ); + } + } + + $redirect = edd_get_admin_url( array( 'page' => 'edd-customers', 'edd-message' => 'customer-deleted' ) ); + + } else { + edd_set_error( 'edd-customer-delete-failed', __( 'Error deleting customer', 'easy-digital-downloads' ) ); + $redirect = edd_get_admin_url( array( 'page' => 'edd-customers', 'view' => 'delete', 'id' => absint( $customer_id ) ) ); + } + + } else { + edd_set_error( 'edd-customer-delete-invalid-id', __( 'Invalid Customer ID', 'easy-digital-downloads' ) ); + $redirect = edd_get_admin_url( array( 'page' => 'edd-customers' ) ); + } + + edd_redirect( $redirect ); +} +add_action( 'edd_delete-customer', 'edd_customer_delete', 10, 1 ); + +/** + * Disconnect a user ID from a customer + * + * @since 2.3 + * @param array $args Array of arguments + * @return bool If the disconnect was successful + */ +function edd_disconnect_customer_user_id( $args = array() ) { + if ( ! is_admin() || ! current_user_can( edd_get_edit_customers_role() ) ) { + wp_die( __( 'You do not have permission to edit this customer.', 'easy-digital-downloads' ) ); + } + + if ( empty( $args ) ) { + return; + } + + $customer_id = (int)$args['customer_id']; + $nonce = $args['_wpnonce']; + + if ( ! wp_verify_nonce( $nonce, 'edit-customer' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ) ); + } + + $customer = new EDD_Customer( $customer_id ); + if ( empty( $customer->id ) ) { + return false; + } + + do_action( 'edd_pre_customer_disconnect_user_id', $customer_id, $customer->user_id ); + + $customer_args = array( 'user_id' => 0 ); + + if ( $customer->update( $customer_args ) ) { + + $output['success'] = true; + + } else { + + $output['success'] = false; + edd_set_error( 'edd-disconnect-user-fail', __( 'Failed to disconnect user from customer', 'easy-digital-downloads' ) ); + } + + do_action( 'edd_post_customer_disconnect_user_id', $customer_id ); + + if ( edd_doing_ajax() ) { + wp_send_json( $output ); + } + + return $output; +} +add_action( 'edd_disconnect-userid', 'edd_disconnect_customer_user_id', 10, 1 ); + +/** + * Process manual verification of customer account by admin + * + * @since 2.4.8 + * @return void + */ +function edd_process_admin_user_verification() { + + if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) { + return false; + } + + if ( empty( $_GET['_wpnonce'] ) ) { + return false; + } + + $nonce = $_GET['_wpnonce']; + if ( ! wp_verify_nonce( $nonce, 'edd-verify-user' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( ! is_admin() || ! current_user_can( edd_get_edit_customers_role() ) ) { + wp_die( __( 'You do not have permission to edit this customer.', 'easy-digital-downloads' ) ); + } + + $customer = new EDD_Customer( $_GET['id'] ); + edd_set_user_to_verified( $customer->user_id ); + + $url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => absint( $customer->id ), + 'edd-message' => 'user-verified', + ) + ); + + edd_redirect( $url ); +} +add_action( 'edd_verify_user_admin', 'edd_process_admin_user_verification' ); + +/** + * Register the reset single customer stats batch processor + * @since 2.5 + */ +function edd_register_batch_single_customer_recount_tool() { + add_action( 'edd_batch_export_class_include', 'edd_include_single_customer_recount_tool_batch_processer', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_batch_single_customer_recount_tool', 10 ); + +/** + * Loads the tools batch processing class for recounting stats for a single customer + * + * @since 2.5 + * @param string $class The class being requested to run for the batch export + * @return void + */ +function edd_include_single_customer_recount_tool_batch_processer( $class ) { + if ( 'EDD_Tools_Recount_Single_Customer_Stats' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/tools/class-edd-tools-recount-single-customer-stats.php'; + } +} + +/** + * Removes a customer address + * + * @since 3.0 + * @return void + */ +function edd_remove_customer_address() { + if ( ! is_admin() || ! current_user_can( edd_get_edit_customers_role() ) ) { + wp_die( __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ) ); + } + + if ( empty( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) || empty( $_GET['_wpnonce'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'edd-remove-customer-address' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $address = edd_fetch_customer_address( absint( $_GET['id'] ) ); + $removed = $address instanceof EDD\Customers\Customer_Address ? edd_delete_customer_address( absint( $_GET['id'] ) ) : false; + + $url = edd_get_admin_url( array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $address->customer_id ), + 'edd-message' => 'address-removed' + ) ); + + if ( $removed ) { + $url = add_query_arg( 'edd-message', 'address-removed', $url ); + } else { + $url = add_query_arg( 'edd-message', 'address-remove-failed', $url ); + } + + edd_redirect( $url . '#edd_general_addresses' ); +} +add_action( 'edd_customer-remove-address', 'edd_remove_customer_address', 10 ); diff --git a/includes/admin/customers/customer-functions.php b/includes/admin/customers/customer-functions.php new file mode 100644 index 00000000000..883e13c86f2 --- /dev/null +++ b/includes/admin/customers/customer-functions.php @@ -0,0 +1,186 @@ + 'edd_customers_view', + 'emails' => 'edd_customers_emails_view', + 'addresses' => 'edd_customers_addresses_view', + 'delete' => 'edd_customers_delete_view', + 'notes' => 'edd_customer_notes_view', + 'tools' => 'edd_customer_tools_view', + ) ); +} +add_filter( 'edd_customer_views', 'edd_register_default_customer_views', 1, 1 ); + +/** + * Register a tab for the single customer view + * + * @since 2.3 + * @param array $tabs An array of existing tabs + * @return array The altered list of tabs + */ +function edd_register_default_customer_tabs( $tabs ) { + return array_merge( $tabs, array( + 'overview' => array( 'dashicon' => 'dashicons-admin-users', 'title' => _x( 'Profile', 'Customer Details tab title', 'easy-digital-downloads' ) ), + 'emails' => array( 'dashicon' => 'dashicons-email', 'title' => _x( 'Emails', 'Customer Emails tab title', 'easy-digital-downloads' ) ), + 'addresses' => array( 'dashicon' => 'dashicons-admin-home', 'title' => _x( 'Addresses', 'Customer Addresses tab title', 'easy-digital-downloads' ) ), + 'notes' => array( 'dashicon' => 'dashicons-admin-comments', 'title' => _x( 'Notes', 'Customer Notes tab title', 'easy-digital-downloads' ) ), + 'tools' => array( 'dashicon' => 'dashicons-admin-tools', 'title' => _x( 'Tools', 'Customer Tools tab title', 'easy-digital-downloads' ) ) + ) ); +} +add_filter( 'edd_customer_tabs', 'edd_register_default_customer_tabs', 1, 1 ); + +/** + * Register the Delete icon as late as possible so it's at the bottom + * + * @since 2.3.1 + * @param array $tabs An array of existing tabs + * @return array The altered list of tabs, with 'delete' at the bottom + */ +function edd_register_delete_customer_tab( $tabs ) { + + $tabs['delete'] = array( + 'dashicon' => 'dashicons-trash', + 'title' => _x( 'Delete', 'Delete Customer tab title', 'easy-digital-downloads' ) + ); + + return $tabs; +} +add_filter( 'edd_customer_tabs', 'edd_register_delete_customer_tab', PHP_INT_MAX, 1 ); + +/** + * Remove the admin bar edit profile link when the user is not verified + * + * @since 2.4.4 + * @return void + */ +function edd_maybe_remove_adminbar_profile_link() { + + if ( current_user_can( 'manage_shop_settings' ) ) { + return; + } + + if ( edd_user_pending_verification() ) { + global $wp_admin_bar; + $wp_admin_bar->remove_menu( 'edit-profile', 'user-actions' ); + } +} +add_action( 'wp_before_admin_bar_render', 'edd_maybe_remove_adminbar_profile_link' ); + +/** + * Remove the admin menus and disable profile access for non-verified users + * + * @since 2.4.4 + * @return void + */ +function edd_maybe_remove_menu_profile_links() { + + if ( edd_doing_ajax() ) { + return; + } + + if ( current_user_can( 'manage_shop_settings' ) ) { + return; + } + + if ( edd_user_pending_verification() ) { + + if ( defined( 'IS_PROFILE_PAGE' ) && true === IS_PROFILE_PAGE ) { + $url = esc_url( edd_get_user_verification_request_url() ); + /* translators: link to send an email */ + $message = sprintf( __( 'Your account is pending verification. Please click the link in your email to activate your account. No email? Click here to send a new activation code.', 'easy-digital-downloads' ), esc_url( $url ) ); + $title = __( 'Account Pending Verification', 'easy-digital-downloads' ); + $args = array( + 'response' => 403, + ); + wp_die( $message, $title, $args ); + } + + remove_menu_page( 'profile.php' ); + remove_submenu_page( 'users.php', 'profile.php' ); + } +} +add_action( 'admin_init', 'edd_maybe_remove_menu_profile_links' ); + +/** + * Add Customer column to Users list table. + * + * @since 3.0 + * + * @param array $columns Existing columns. + * + * @return array $columns Columns with `Customer` added. + */ +function edd_add_customer_column_to_users_table( $columns ) { + $columns['edd_customer'] = __( 'Customer', 'easy-digital-downloads' ); + return $columns; +} +add_filter( 'manage_users_columns', 'edd_add_customer_column_to_users_table' ); + +/** + * Display customer details on Users list table. + * + * @since 3.0 + * + * @param string $value Existing value of the custom column. + * @param string $column_name Column name. + * @param int $user_id User ID. + * + * @return string URL to Customer page, existing value otherwise. + */ +function edd_render_customer_column( $value, $column_name, $user_id ) { + if ( 'edd_customer' === $column_name ) { + $customer = new EDD_Customer( $user_id, true ); + + if ( $customer->id > 0 ) { + $name = '#' . $customer->id . ' '; + $name .= ! empty( $customer->name ) ? $customer->name : '' . __( 'Unnamed Customer', 'easy-digital-downloads' ) . ''; + $view_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => absint( $customer->id ), + ) + ); + + return '' . $name . ''; + } + } + + return $value; +} +add_action( 'manage_users_custom_column', 'edd_render_customer_column', 10, 3 ); + +/** + * Renders the customer details header (gravatar/name). + * + * @since 3.0 + * @param \EDD_Customer $customer + * @return void + */ +function edd_render_customer_details_header( \EDD_Customer $customer ) { + ?> +
    + email, 30 ); ?> name ); ?> +
    + $tab_name ) { + $tabs[ $tab_id ] = array( + 'name' => $tab_name, + 'url' => edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'page_type' => urlencode( $tab_id ), + ) + ), + ); + } + + $navigation = new EDD\Admin\Menu\SecondaryNavigation( + $tabs, + 'edd-customers', + array( + 'active_tab' => $active_tab, + 'show_search' => true, + ) + ); + $navigation->render(); +} + +/** + * Retrieve the customer pages. + * + * Used only by the primary tab navigation for customers. + * + * @since 3.0 + * + * @return array + */ +function edd_get_customer_pages() { + static $pages = null; + + // Filter. + if ( null === $pages ) { + $pages = (array) apply_filters( + 'edd_get_customer_pages', + array( + 'customers' => esc_html__( 'Customers', 'easy-digital-downloads' ), + 'emails' => esc_html__( 'Email Addresses', 'easy-digital-downloads' ), + 'physical' => esc_html__( 'Physical Addresses', 'easy-digital-downloads' ), + ) + ); + } + + // Return. + return $pages; +} + +/** + * Display customer sections + * + * Contains backwards compat code to shim tabs & views to EDD_Sections() + * + * @since 3.0 + * + * @param EDD_Customer $customer Customer object. + */ +function edd_customers_sections( $customer ) { + + // Instantiate the Sections class and sections array. + $sections = new EDD\Admin\Sections(); + $c_sections = array(); + + // Setup sections variables. + $sections->item = $customer; + $sections->use_js = true; + $sections->current_section = ! empty( $_GET['view'] ) + ? sanitize_key( $_GET['view'] ) + : 'overview'; + $sections->base_url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'id' => absint( $customer->id ), + ) + ); + + // Get all registered tabs & views. + $tabs = edd_customer_tabs(); + $views = edd_customer_views(); + + // Do not display the addresses tab if there are none. + if ( empty( $customer->get_addresses() ) ) { + unset( $tabs['addresses'] ); + } + + // Loop through tabs & setup sections. + if ( ! empty( $tabs ) ) { + foreach ( $tabs as $id => $tab ) { + + // Bail if no view. + if ( ! isset( $views[ $id ] ) ) { + continue; + } + + // Add to sections array. + $c_sections[] = array( + 'id' => $id, + 'label' => $tab['title'], + 'icon' => str_replace( 'dashicons-', '', $tab['dashicon'] ), + 'callback' => $views[ $id ], + ); + } + } + + // Set the customer sections. + $sections->set_sections( $c_sections ); + + // Display the sections. + $sections->display(); +} + +/** + * Customers Page + * + * Renders the customers page contents. + * + * @since 2.3 + * @return void + */ +function edd_customers_page() { + // Enqueue scripts. + wp_enqueue_script( 'edd-admin-customers' ); + wp_enqueue_script( 'edd-admin-notes' ); + + // Views. + $default_views = edd_customer_views(); + $requested_view = isset( $_GET['view'] ) + ? sanitize_key( $_GET['view'] ) + : 'customers'; + + // Tabs. + $active_tab = ! empty( $_GET['page_type'] ) + ? sanitize_key( $_GET['page_type'] ) + : 'customers'; + + if ( array_key_exists( $requested_view, $default_views ) && is_callable( $default_views[ $requested_view ] ) ) { + // Single customer view. + edd_render_customer_view( $requested_view, $default_views ); + + } else { + // List table view. + edd_customers_list( $active_tab ); + } +} + +/** + * Register the views for customer management + * + * @since 2.3 + * @return array Array of views and their callbacks + */ +function edd_customer_views() { + return apply_filters( 'edd_customer_views', array() ); +} + +/** + * Register the tabs for customer management + * + * @since 2.3 + * @return array Array of tabs for the customer + */ +function edd_customer_tabs() { + return apply_filters( 'edd_customer_tabs', array() ); +} + +/** + * List table of customers + * + * @since 2.3 + * @return void + */ +function edd_customers_list( $active_tab = 'customers' ) { + + // Get the possible pages. + $pages = edd_get_customer_pages(); + + // Reset page if not a registered page. + if ( ! in_array( $active_tab, array_keys( $pages ), true ) ) { + $active_tab = 'customers'; + } + + // Get the label/name from the active tab. + $name = $pages[ $active_tab ]; + + // Get the action url from the active tab. + $action_url = edd_get_admin_url( + array( + 'page_type' => sanitize_key( $active_tab ), + 'page' => 'edd-' . sanitize_key( $active_tab ), + ) + ); + + // Setup the list table class. + switch ( $active_tab ) { + case 'customers': + include_once __DIR__ . '/class-customer-table.php'; + $list_table_class = 'EDD_Customer_Reports_Table'; + break; + case 'emails': + include_once __DIR__ . '/class-customer-email-addresses-table.php'; + $list_table_class = 'EDD_Customer_Email_Addresses_Table'; + break; + case 'physical': + include_once __DIR__ . '/class-customer-addresses-table.php'; + $list_table_class = 'EDD_Customer_Addresses_Table'; + break; + } + + // Initialize the list table. + $customers_table = new $list_table_class(); + $customers_table->prepare_items(); + edd_customers_page_primary_nav( $active_tab ); + ?> + +
    +

    +
    + + + + + views(); + /* translators: the active screen, eg "Search Customers" or "Search Customer Email Addresses" */ + $customers_table->search_box( sprintf( _x( 'Search %s', 'Noun: Customers or Customer Email Addresses placeholder for a search box', 'easy-digital-downloads' ), $name ), 'edd-customers' ); + $customers_table->display(); + ?> + + + + + + + +
    + + id ) ) { + edd_set_error( 'edd-invalid_customer', __( 'Invalid Customer ID Provided.', 'easy-digital-downloads' ) ); + $render = false; + } + ?> + +
    +

    + + +

    + +
    + + + +
    + + + +
    + +
    + + + +
    + get_meta( 'agree_to_terms_time', false ); + $show_terms = edd_get_option( 'show_agree_to_terms' ); + $privacy_timestamps = $customer->get_meta( 'agree_to_privacy_time', false ); + $show_privacy = edd_get_option( 'show_agree_to_privacy_policy' ); + $last_payment_date = ''; + $agreement_date_format = 'H:i:s'; + + if ( ( empty( $agreement_timestamps ) && $show_terms ) || ( empty( $privacy_timestamps ) && $show_privacy ) ) { + $last_payment = edd_get_orders( + array( + 'customer_id' => $customer->id, + 'orderby' => 'date', + 'order' => 'DESC', + 'number' => 1, + ) + ); + if ( ! empty( $last_payment ) ) { + $last_payment = reset( $last_payment ); + $last_payment_date = strtotime( $last_payment->date_created ); + } + } + + if ( is_array( $agreement_timestamps ) ) { + $agreement_timestamp = array_pop( $agreement_timestamps ); + } + + if ( is_array( $privacy_timestamps ) ) { + $privacy_timestamp = array_pop( $privacy_timestamps ); + } + + $user_id = ( $customer->user_id > 0 ) + ? absint( $customer->user_id ) + : ''; + + $address_args = array( + 'address' => '', + 'address2' => '', + 'city' => '', + 'region' => '', + 'postal_code' => '', + 'country' => '', + ); + + $data_atts = array( + 'key' => 'user_login', + 'exclude' => $user_id, + ); + + $user_args = array( + 'name' => 'customerinfo[user_login]', + 'class' => 'edd-user-dropdown', + 'data' => $data_atts, + ); + + // Maybe get user data. + if ( ! empty( $user_id ) ) { + $userdata = get_userdata( $user_id ); + + if ( ! empty( $userdata->user_login ) ) { + $user_login = $userdata->user_login; + $user_args['value'] = $user_login; + } else { + $user_login = false; + } + } + + // Address. + $address = $customer->get_address(); + + if ( ! empty( $address ) ) { + $address = $address->to_array(); + $address = wp_parse_args( $address, $address_args ); + + } else { + $address = $address_args; + } + + do_action( 'edd_customer_card_top', $customer ); + + // Country. + $selected_country = $address['country']; + $countries = edd_get_country_list(); + + // State. + $selected_state = edd_get_shop_state(); + $states = edd_get_shop_states( $selected_country ); + $selected_state = isset( $address['region'] ) + ? $address['region'] + : $selected_state; + + // Orders and refunds. + $orders = edd_get_orders( + array( + 'customer_id' => $customer->id, + 'number' => 10, + 'type' => 'sale', + ) + ); + + $refunds = edd_get_orders( + array( + 'customer_id' => $customer->id, + 'number' => 10, + 'type' => 'refund', + ) + ); + + // Downloads. + $downloads = edd_get_users_purchased_products( $customer->email ); + ?> + +
    +
    + + + + +
    +
    + email, 150 ); ?>
    + + + + + + + + + + + +
    + +
    + #id ); ?> +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + name ); ?> + + + + + + + email ); ?> + + + + + + date_created ) ) + ); + ?> + + + + + + html->ajax_user_search( $user_args ); ?> + + + + + + + ' . esc_html( $user_id ) . '' ); + endif; + ?> + + + + + + + + + + + + 0 ) : ?> + + + + + + + +
    +
    +
    +
    +
    + + + +
    + +
    + + + +
    +

    +

    + $timestamp ) { + $agreement_timestamps[ $key ] = date_i18n( + get_option( 'date_format' ) . ' ' . $agreement_date_format, + $timestamp + ) . ' ' . edd_get_timezone_abbr(); + } + + $tooltip = new EDD\HTML\TimelineTooltip( + array( + 'title' => __( 'Previous Agreement Dates', 'easy-digital-downloads' ), + 'items' => $agreement_timestamps, + ) + ); + $tooltip->output(); + } + } elseif ( ! empty( $last_payment_date && $show_terms ) ) { + echo esc_html( + edd_date_i18n( + $last_payment_date, + get_option( 'date_format' ) . ' ' . $agreement_date_format + ) . ' ' . edd_get_timezone_abbr() + ); + + esc_html_e( ' — Agreed to Terms', 'easy-digital-downloads' ); + $tooltip = new EDD\HTML\Tooltip( + array( + 'title' => __( 'Estimated Terms Agreement Date', 'easy-digital-downloads' ), + 'content' => __( 'This customer made a purchase prior to agreement dates being logged, this is the date of their last purchase. If your site was displaying the agreement checkbox at that time, this is our best estimate as to when they last agreed to your terms.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + } else { + esc_html_e( 'No terms agreement found.', 'easy-digital-downloads' ); + } + ?> +

    + +

    + $timestamp ) { + $privacy_timestamps[ $key ] = date_i18n( + get_option( 'date_format' ) . ' ' . $agreement_date_format, + $timestamp + ) . ' ' . edd_get_timezone_abbr(); + } + + $tooltip = new EDD\HTML\TimelineTooltip( + array( + 'title' => __( 'Previous Agreement Dates', 'easy-digital-downloads' ), + 'items' => $privacy_timestamps, + ) + ); + $tooltip->output(); + } + } elseif ( ! empty( $last_payment_date ) && $show_privacy ) { + + echo esc_html( + edd_date_i18n( + $last_payment_date, + get_option( 'date_format' ) . ' ' . $agreement_date_format + ) . ' ' . edd_get_timezone_abbr() + ); + + esc_html_e( ' — Agreed to Privacy Policy', 'easy-digital-downloads' ); + $tooltip = new EDD\HTML\Tooltip( + array( + 'title' => __( 'Estimated Privacy Policy Date', 'easy-digital-downloads' ), + 'content' => __( 'This customer made a purchase prior to privacy policy dates being logged, this is the date of their last purchase. If your site was displaying the privacy policy checkbox at that time, this is our best estimate as to when they last agreed to your privacy policy.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + } else { + esc_html_e( 'No privacy policy agreement found.', 'easy-digital-downloads' ); + } + ?> +

    +
    + + + +
    + + + +

    + + + + + + + + + + + status ) { + $state = ' — ' . edd_get_payment_status_label( $order->status ); + } + + // View URL. + $view_url = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'view' => 'view-order-details', + 'id' => absint( $order->id ), + ) + ); + ?> + + + + + + + + + + + +
    get_number() ); ?>gateway ) ); ?>total ), $order->currency ); ?> + +
    + +

    + + + + + + + + + + + 'edd-payment-history', + 'view' => 'view-refund-details', + 'id' => absint( $refund->id ), + ) + ); + ?> + + + + + + + + + + + +
    order_number ); ?>gateway ) ); ?>total ), $refund->currency ); ?>
    + +

    + +

    + + + + + + + + + + + + + + + + + + + + + + + +
    post_title ); ?>
    + +
    + + + +
    + + + + $customer->id, + 'orderby' => 'type', // to put `primary` email first. + 'order' => 'ASC', + ) + ); + ?> +
    + +

    + __( 'This customer can use any of the emails listed here when making new purchases.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +

    + +
    + + + + + + + + + + $email ) : + ?> + + + + + + + + + + + + + + + + +
    + email ); ?> + + type ) : ?> + + +
    + 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $customer->id ), + ) + ); + $actions = array( + 'promote' => array( + 'url' => wp_nonce_url( + add_query_arg( + array( + 'email' => rawurlencode( $email->email ), + 'edd_action' => 'customer-primary-email', + ), + $base_url + ), + 'edd-set-customer-primary-email' + ), + 'label' => __( 'Make Primary', 'easy-digital-downloads' ), + ), + 'delete' => array( + 'url' => wp_nonce_url( + add_query_arg( + array( + 'email' => rawurlencode( $email->email ), + 'edd_action' => 'customer-remove-email', + ), + $base_url + ), + 'edd-remove-customer-email' + ), + 'label' => __( 'Delete', 'easy-digital-downloads' ), + ), + ); + $action_links = array(); + foreach ( $actions as $action => $args ) { + $action_links[] = sprintf( + '%s', + esc_attr( $action ), + esc_url( $args['url'] ), + esc_html( $args['label'] ) + ); + } + echo wp_kses( implode( ' | ', $action_links ), edd_get_allowed_tags() ); + ?> +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    +
    + get_addresses(); + // This has already been checked when setting the tabs. + if ( empty( $addresses ) ) { + return; + } + ?> +
    + +

    + +
    + + + + + + + + + + + + + + 'edd-customers', + 'view' => 'overview', + 'id' => urlencode( $address->id ), + 'edd_action' => 'customer-remove-address', + ) + ), + 'edd-remove-customer-address' + ); + ?> + + + + + + + + + + + + +
    + address ) + ? esc_html( $address->address ) + : '—'; + + echo ! empty( $address->address2 ) + ? esc_html( $address->address2 ) + : ''; + ?> + + city ) + ? esc_html( $address->city ) + : '—'; + ?> + + region ) + ? esc_html( edd_get_state_name( $address->country, $address->region ) ) + : '—'; + ?> + + postal_code ) + ? esc_html( $address->postal_code ) + : '—'; + ?> + + country ) + ? esc_html( edd_get_country_name( $address->country ) ) + : '—'; + ?> + + + is_primary ) ) : ?> + + +
    + +
    +
    +
    + get_notes( $per_page, $paged ); + $note_count = $customer->get_notes_count(); + $args = array( + 'total' => $note_count, + 'add_fragment' => '#edd_general_notes', + ); + ?> + +
    + +

    + + + +
    + + id, 'customer' ); ?> +
    + + +
    + + + +
    + +
    + + +

    + +
    + +

    + html->checkbox( array( 'name' => 'edd-customer-delete-confirm' ) ); ?> + +

    + +

    + html->checkbox( + array( + 'name' => 'edd-customer-delete-records', + 'options' => array( 'disabled' => true ), + ) + ); + ?> + +

    + + +
    + + + + + + + +
    +
    +
    + + + +
    + +

    + +
    +

    +

    +
    + + + + + + + +
    +
    +
    + + user_id ) ) { + return; + } + + $url = wp_nonce_url( + edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'edd_action' => 'verify_user_admin', + 'id' => absint( $customer->id ), + ) + ), + 'edd-verify-user' + ); + + echo '

    '; + esc_html_e( 'This customer\'s user account is pending verification.', 'easy-digital-downloads' ); + echo ' '; + echo '' . esc_html__( 'Verify account.', 'easy-digital-downloads' ) . ''; + echo "\n\n"; + + echo '

    '; +} +add_action( 'edd_customer_card_top', 'edd_verify_customer_notice', 10, 1 ); diff --git a/includes/admin/dashboard-widgets.php b/includes/admin/dashboard-widgets.php new file mode 100755 index 00000000000..b4472bee6ac --- /dev/null +++ b/includes/admin/dashboard-widgets.php @@ -0,0 +1,327 @@ +%1$s %2$s

    ', + esc_html__( 'Easy Digital Downloads is performing a database migration via WP-CLI.', 'easy-digital-downloads' ), + esc_html__( 'This summary will be available when that has completed.', 'easy-digital-downloads' ) + ); + return; + } + global $wpdb; + $orders = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'edd_payment' LIMIT 1" ); + if ( ! empty( $orders ) ) { + $url = add_query_arg( + array( + 'page' => 'edd-upgrades', + 'edd-upgrade' => 'v30_migration', + ), + admin_url( 'index.php' ) + ); + printf( + '

    %1$s %2$s%4$s

    ', + esc_html__( 'Easy Digital Downloads needs to upgrade the database.', 'easy-digital-downloads' ), + esc_html__( 'This summary will be available when that has completed.', 'easy-digital-downloads' ), + esc_url( $url ), + esc_html__( 'Begin the upgrade.', 'easy-digital-downloads' ) + ); + return; + } + } + wp_enqueue_script( 'edd-admin-dashboard' ); + + /** + * Action hook to add content to the dashboard widget. + * This content will not be replaced by the AJAX function: + * only the "edd-loading" content will. + * + * @since 2.11.4 + */ + do_action( 'edd_dashboard_sales_widget' ); + ?> +

    + $range, + 'output' => 'formatted', + 'revenue_type' => 'net', + ); + if ( 'total' === $range ) { + unset( $args['range'] ); + } + // Remove filters so that deprecation notices are not unnecessarily logged outside of reports. + remove_all_filters( 'edd_report_views' ); + $stats = new EDD\Stats( $args ); + $data[ $range ] = array( + 'earnings' => $stats->get_order_earnings(), + 'count' => $stats->get_order_count(), + ); + } + + return $data; +} + +/** + * Loads the dashboard sales widget via ajax + * + * @since 2.1 + * @return void + */ +function edd_load_dashboard_sales_widget( ) { + + if ( ! current_user_can( apply_filters( 'edd_dashboard_stats_cap', 'view_shop_reports' ) ) ) { + die(); + } + + $stats = new EDD_Payment_Stats(); + $data = edd_get_dashboard_sales_widget_data(); ?> +
    +
    + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + +
    + +
    + +
    +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + +
    + +
    +
    +
    + + 5, + 'status' => edd_get_net_order_statuses(), + 'type' => 'sale', + ) + ); + + if ( $orders ) { ?> + + + + 5, 'status' => 'complete' ) ) ); + } + ?> +
    + publish ) { + if ( 1 === $num_posts->publish ) { + $text = sprintf( + /* translators: %s: Download label singular */ + __( '1 %s', 'easy-digital-downloads' ), + edd_get_label_singular() + ); + } else { + $text = sprintf( + /* translators: 1: Number of downloads, 2: Download label plural */ + __( '%1$d %2$s', 'easy-digital-downloads' ), + number_format_i18n( $num_posts->publish ), + edd_get_label_plural() + ); + } + + if ( current_user_can( 'edit_products' ) ) { + $text = '' . $text . ''; + } else { + $text = '' . $text . ''; + } + + $items[] = $text; + } + + return $items; +} +add_filter( 'dashboard_glance_items', 'edd_dashboard_at_a_glance_widget', 1 ); diff --git a/includes/admin/discounts/add-discount.php b/includes/admin/discounts/add-discount.php index b6529de38e9..34d5884cbbb 100755 --- a/includes/admin/discounts/add-discount.php +++ b/includes/admin/discounts/add-discount.php @@ -1,98 +1,271 @@ -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    -

    - - - -

    -
    \ No newline at end of file +
    +

    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    +
    + + +
    + + +
    + +

    +
    + + + + + + + +

    +
    + + + + html->product_dropdown( + array( + 'name' => 'product_reqs[]', + 'id' => 'edd_products', + 'selected' => array(), + 'multiple' => true, + 'chosen' => true, + /* translators: %s: Downloads plural label */ + 'placeholder' => sprintf( esc_html_x( 'Select %s', 'Noun: The plural label for the download post type as a placeholder for a dropdown', 'easy-digital-downloads' ), esc_html( edd_get_label_plural() ) ), + 'variations' => true, + ) + ); // WPCS: XSS ok. + ?> + + +

    +
    + + + + html->product_dropdown( + array( + 'name' => 'excluded_products[]', + 'id' => 'excluded_products', + 'selected' => array(), + 'multiple' => true, + 'chosen' => true, + /* translators: %s: Downloads plural label */ + 'placeholder' => sprintf( esc_html_x( 'Select %s', 'Noun: The plural label for the download post type as a placeholder for a dropdown', 'easy-digital-downloads' ), esc_html( edd_get_label_plural() ) ), + ) + ); // WPCS: XSS ok. + ?> + +

    +
    + + + + + + + : + + + + + +

    +
    + + + + + + + : + + + + + +

    +
    + + + +

    +
    + + + +

    +
    + + + 'once_per_customer', + 'label' => __( 'Prevent customers from using this discount more than once.', 'easy-digital-downloads' ), + ) + ); + $toggle->output(); + ?> +
    + + + +

    + + + + + +

    +
    +
    diff --git a/includes/admin/discounts/class-discount-codes-table.php b/includes/admin/discounts/class-discount-codes-table.php new file mode 100755 index 00000000000..a045f4b9421 --- /dev/null +++ b/includes/admin/discounts/class-discount-codes-table.php @@ -0,0 +1,626 @@ + 'discount', + 'plural' => 'discounts', + 'ajax' => false, + ) + ); + + $this->process_bulk_action(); + $this->get_counts(); + } + + /** + * Get the base URL for the discount list table + * + * @since 3.0 + * + * @return string + */ + public function get_base_url() { + + // Remove some query arguments. + $base = remove_query_arg( edd_admin_removable_query_args(), edd_get_admin_base_url() ); + + // Add base query args. + return add_query_arg( + array( + 'page' => 'edd-discounts', + ), + $base + ); + } + + /** + * Retrieve the table columns + * + * @since 1.4 + * + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return apply_filters( + 'edd_discounts_table_columns', + array( + 'cb' => '', + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'status' => __( 'Status', 'easy-digital-downloads' ), + 'code' => __( 'Code', 'easy-digital-downloads' ), + 'amount' => __( 'Amount', 'easy-digital-downloads' ), + 'use_count' => __( 'Uses', 'easy-digital-downloads' ), + 'start_date' => __( 'Start Date', 'easy-digital-downloads' ), + 'end_date' => __( 'End Date', 'easy-digital-downloads' ), + ) + ); + } + + /** + * Retrieve the sortable columns + * + * @since 1.4 + * + * @return array Array of all the sortable columns + */ + public function get_sortable_columns() { + return apply_filters( + 'edd_discounts_table_sortable_columns', + array( + 'name' => array( 'name', false ), + 'code' => array( 'code', false ), + 'use_count' => array( 'use_count', false ), + 'start_date' => array( 'start_date', false ), + 'end_date' => array( 'end_date', false ), + 'status' => array( 'status', false ), + ) + ); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'name'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 1.4 + * + * @param EDD_Discount $discount Discount object. + * @param string $column_name The name of the column. + * + * @return string Column Name + */ + public function column_default( $discount, $column_name ) { + $value = property_exists( $discount, $column_name ) ? $discount->$column_name : ''; + + return apply_filters( 'edd_discounts_table_column', $value, $discount, $column_name ); + } + + /** + * This function renders the amount column. + * + * @since 3.0 + * + * @param EDD_Discount $discount Data for the discount code. + * @return string Formatted amount. + */ + public function column_amount( $discount ) { + return edd_format_discount_rate( $discount->type, $discount->amount ); + } + + /** + * This function renders the start column. + * + * @since 3.0 + * + * @param EDD_Discount $discount Discount object. + * @return string Start date + */ + public function column_start_date( $discount ) { + $start_date = $discount->start_date; + $timezone_abbreviation = edd_get_timezone_abbr(); + + if ( $start_date ) { + $display = edd_date_i18n( $start_date, 'M. d, Y' ) . '
    ' . edd_date_i18n( $start_date, 'H:i' ) . ' ' . $timezone_abbreviation; + } else { + $display = '—'; + } + + return $display; + } + + /** + * Render the Expiration column. + * + * @since 3.0 + * + * @param EDD_Discount $discount Discount object. + * @return string Expiration date. + */ + public function column_end_date( $discount ) { + $expiration = $discount->end_date; + $timezone_abbreviation = edd_get_timezone_abbr(); + + if ( $expiration ) { + $display = edd_date_i18n( $expiration, 'M. d, Y' ) . '
    ' . edd_date_i18n( $expiration, 'H:i' ) . ' ' . $timezone_abbreviation; + } else { + $display = '—'; + } + + return $display; + } + + /** + * Render the Name column. + * + * @since 1.4 + * + * @param EDD_Discount $discount Discount object. + * @return string Data shown in the Name column + */ + public function column_name( $discount ) { + $base = $this->get_base_url(); + $row_actions = array(); + $status = $this->get_status(); + + // Bail if current user cannot manage discounts. + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + return; + } + + // Edit. + $row_actions['edit'] = '' . __( 'Edit', 'easy-digital-downloads' ) . ''; + + // Active, so add "deactivate" action. + if ( 'active' === strtolower( $discount->status ) ) { + $row_actions['cancel'] = '' . __( 'Deactivate', 'easy-digital-downloads' ) . ''; + + // Inactive, so add "activate" action. + } elseif ( 'inactive' === strtolower( $discount->status ) ) { + $row_actions['activate'] = '' . __( 'Activate', 'easy-digital-downloads' ) . ''; + } + + // Archive. + if ( 'archived' !== strtolower( $discount->status ) ) { + $row_actions['archive'] = '' . __( 'Archive', 'easy-digital-downloads' ) . ''; + } + + // Delete. + if ( 0 === (int) $discount->use_count ) { + $row_actions['delete'] = '' . __( 'Delete', 'easy-digital-downloads' ) . ''; + } else { + $row_actions['orders'] = '' . __( 'View Orders', 'easy-digital-downloads' ) . ''; + } + + // Filter all discount row actions. + $row_actions = apply_filters( 'edd_discount_row_actions', $row_actions, $discount ); + + $discount_title = '' . stripslashes( $discount->name ) . ''; + + /** + * Filter to allow additional content to be appended to the discount title. + * + * @since 3.0 + * + * @param EDD_Discount $discount Discount object. + * @param string $base The base URL for the discount list table. + * @param string $status The queried discount status. + * @return string Additional data shown in the Name column + */ + $additional_content = apply_filters( 'edd_discount_row_after_title', '', $discount, $base, $status ); + + // Return discount title & row actions. + return $discount_title . $additional_content . $this->row_actions( $row_actions ); + } + + /** + * Render the checkbox column. + * + * @since 1.4 + * + * @param EDD_Discount $discount Discount object. + * @return string Checkbox HTML. + */ + public function column_cb( $discount ) { + return sprintf( + '', + 'discount', + absint( $discount->id ), + /* translators: %s: Discount code title (name) */ + esc_html( sprintf( _x( 'Select %s', 'Noun: The discount code title (name)', 'easy-digital-downloads' ), $discount->name ) ) + ); + } + + /** + * Return discount code wrapped in a `` tag. + * + * @since 3.0 + * + * @param EDD_Discount $discount Discount object. + * @return string Discount code HTML. + */ + public function column_code( $discount ) { + return '' . $discount->code . ''; + } + + /** + * Returns the discount status column. + * + * @since 3.2.0 + * + * @param EDD_Discount $discount Discount object. + * @return string Discount type HTML. + */ + public function column_status( $discount ) { + $icon = ''; + $status = $discount->status; + $label = edd_get_discount_status_label( $discount->id ); + switch ( $status ) { + case 'active': + $status = 'success'; + break; + case 'inactive': + break; + case 'expired': + $icon = 'backup'; + $status = 'warning'; + break; + } + + if ( ( ! $this->get_status() || 'active' === $this->get_status() ) && ! $discount->is_started( false ) ) { + $icon = 'clock'; + $status = 'info'; + $label = __( 'Scheduled', 'easy-digital-downloads' ); + } + + if ( $discount->is_maxed_out( false ) ) { + $icon = 'yes'; + $status = 'inactive'; + $label = __( '100% Claimed', 'easy-digital-downloads' ); + } + + $status_badge = new EDD\Utils\StatusBadge( + array( + 'status' => $status, + 'label' => $label, + 'icon' => $icon, + 'class' => "edd-admin-discount-status-badge--{$discount->status}", + ) + ); + + return $status_badge->get(); + } + + /** + * Returns the discount use count column. + * + * @since 3.2.0 + * + * @param EDD_Discount $discount Discount object. + * @return string Discount use count HTML. + */ + public function column_use_count( $discount ) { + $max_uses = $discount->max_uses > 0 ? $discount->max_uses : '∞'; + $uses = sprintf( '%d / %s', $discount->use_count, $max_uses ); + + if ( $discount->max_uses > 0 ) { + $progress_bar = new EDD\Utils\ProgressBar( + array( + 'size' => 'small', + 'current_count' => $discount->use_count, + 'total_count' => $discount->max_uses, + 'show_percentage' => true, + 'show_current' => true, + 'show_total' => true, + ) + ); + + return $progress_bar->get(); + } + + return $uses; + } + + /** + * Message to be displayed when there are no items. + * + * @since 1.7.2 + */ + public function no_items() { + esc_html_e( 'No discounts found.', 'easy-digital-downloads' ); + } + + /** + * Retrieve the bulk actions + * + * @since 1.4 + * @return array $actions Array of the bulk actions + */ + public function get_bulk_actions() { + $bulk_actions = array( + 'activate' => __( 'Activate', 'easy-digital-downloads' ), + 'deactivate' => __( 'Deactivate', 'easy-digital-downloads' ), + 'archive' => __( 'Archive', 'easy-digital-downloads' ), + 'delete' => __( 'Delete', 'easy-digital-downloads' ), + ); + + $status_actions = array( + 'active' => 'activate', + 'inactive' => 'deactivate', + 'archived' => 'archive', + ); + + $status = $this->get_status(); + if ( array_key_exists( $status, $status_actions ) ) { + unset( $bulk_actions[ $status_actions[ $status ] ] ); + } + + return $bulk_actions; + } + + /** + * Process bulk actions. + * + * @since 1.4 + */ + public function process_bulk_action() { + + // Bail if a nonce was not supplied. + if ( ! isset( $_REQUEST['_wpnonce'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-discounts' ) ) { + return; + } + + check_admin_referer( 'bulk-discounts' ); + + $ids = wp_parse_id_list( (array) $this->get_request_var( 'discount', false ) ); + + // Bail if no IDs. + if ( empty( $ids ) ) { + return; + } + + foreach ( $ids as $id ) { + switch ( $this->current_action() ) { + case 'delete': + edd_delete_discount( $id ); + break; + + case 'activate': + edd_update_discount_status( $id, 'active' ); + break; + + case 'archive': + edd_update_discount_status( $id, 'archived' ); + break; + + case 'deactivate': + edd_update_discount_status( $id, 'inactive' ); + break; + } + } + } + + /** + * Retrieve the discount code counts. + * + * @since 1.4 + */ + public function get_counts() { + $this->counts = edd_get_discount_counts(); + + // Ensure that 'Archived' is the last status in the status links. + if ( isset( $this->counts['archived'] ) ) { + $archived_counts = $this->counts['archived']; + unset( $this->counts['archived'] ); + $this->counts['archived'] = $archived_counts; + } + } + + /** + * Retrieves all the data for all the discount codes. + * + * @since 1.4 + * @deprecated 3.0 Use get_data() + * + * @return array Discount codes. + */ + public function discount_codes_data() { + _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Discount_Codes_Table::get_data()' ); + + return $this->get_data(); + } + + /** + * Retrieves all of the table data for the discount codes. + * + * @since 3.0 + * + * @return array Discount codes table data. + */ + public function get_data() { + + // Parse pagination. + $args = array( + 'search' => $this->get_search(), + ); + + // Searches shouldn't have a status check. + if ( empty( $args['search'] ) ) { + if ( empty( $this->get_status() ) ) { + $args['status__not_in'] = array( 'archived' ); + } else { + $args['status'] = $this->get_status(); + } + } + + $this->args = $this->parse_pagination_args( $args ); + + // Return data. + return edd_get_discounts( $this->args ); + } + + /** + * Setup the final data for the table + * + * @since 1.4 + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); + $sortable = $this->get_sortable_columns(); + + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + + $status = $this->get_status( 'total' ); + + // Setup pagination. + $this->set_pagination_args( + array( + 'total_pages' => ceil( $this->counts[ $status ] / $this->per_page ), + 'total_items' => $this->counts[ $status ], + 'per_page' => $this->per_page, + ) + ); + } + + /** + * Generate the table navigation above or below the table. + * We're overriding this to turn off the referer param in `wp_nonce_field()`. + * + * @param string $which Which side of the table we're rendering, top or bottom. + * @since 3.1.0.4 + */ + protected function display_tablenav( $which ) { + if ( 'top' === $which ) { + wp_nonce_field( 'bulk-' . $this->_args['plural'], '_wpnonce', false ); + } + ?> +
    + + has_items() ) : ?> +
    + bulk_actions( $which ); ?> +
    + extra_tablenav( $which ); + $this->pagination( $which ); + ?> + +
    +
    + isFree() ) { + $docs_url = edd_link_helper( + 'https://easydigitaldownloads.com/docs/', + array( + 'utm_medium' => 'discounts-contextual-help', + 'utm_content' => 'documentation', + ) + ); + + $upgrade_url = edd_link_helper( + 'https://easydigitaldownloads.com/lite-upgrade/', + array( + 'utm_medium' => 'discounts-contextual-help', + 'utm_content' => 'lite-upgrade', + ) + ); + $screen->set_help_sidebar( + '

    ' . __( 'For more information:', 'easy-digital-downloads' ) . '

    ' . + /* translators: %s: Documentation URL */ + '

    ' . sprintf( __( 'Visit the documentation on the Easy Digital Downloads website.', 'easy-digital-downloads' ), $docs_url ) . '

    ' . + '

    ' . sprintf( + /* translators: %s: Upgrade URL */ + __( 'Need more from your Easy Digital Downloads store? Upgrade Now!', 'easy-digital-downloads' ), + $upgrade_url + ) . '

    ' + ); + } + + $screen->add_help_tab( + array( + 'id' => 'edd-discount-general', + 'title' => __( 'General', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'Discount codes allow you to offer buyers special discounts by having them enter predefined codes during checkout.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Discount codes that are set to "inactive" cannot be redeemed.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Discount codes can be setup to only be used only one time by each customer. If a customer attempts to use a code a second time, they will be given an error.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Discount codes that have already been used cannot be deleted for data integrity and reporting purposes.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-discount-add', + 'title' => __( 'Adding Discounts', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'You can create any number of discount codes easily from this page.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Discount codes have several options:', 'easy-digital-downloads' ) . '

    ' . + '
      ' . + '
    • ' . __( 'Name - this is the name given to the discount. Used primarily for administrative purposes.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Code - this is the unique code that customers will enter during checkout to redeem the code.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Type - this is the type of discount this code awards.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Amount - this is the discount amount provided by this code. For percentage based discounts, enter a number such as 70 for 70%. Do not enter a percent sign.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Requirements - this allows you to select the product(s) that are required to be purchased in order for a discount to be applied.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Condition - this lets you set whether all selected products must be in the cart, or just a minimum of one.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Apply discount only to selected Downloads? - If this box is checked, only the prices of the required products will be discounted. If left unchecked, the discount will apply to all products in the cart.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Start Date - this is the date that this code becomes available. If a customer attempts to redeem the code prior to this date, they will be given an error. This is optional.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Expiration Date - this is the end date for the discount. After this date, the code will no longer be able to be used. This is optional.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Minimum Amount - this is the minimum purchase amount required to use this code. If a customer has less than this amount in their cart, they will be given an error. This is optional.', 'easy-digital-downloads' ) . '
    • ' . + '
    • ' . __( 'Max Uses - this is the maximum number of times this discount can be redeemed. Once this number is reached, no more customers will be allowed to use it.', 'easy-digital-downloads' ) . '
    • ' . + '
    ', + ) + ); + + do_action( 'edd_discounts_contextual_help', $screen ); +} +add_action( 'load-download_page_edd-discounts', 'edd_discounts_contextual_help' ); diff --git a/includes/admin/discounts/discount-actions.php b/includes/admin/discounts/discount-actions.php old mode 100644 new mode 100755 index 5421e212ae9..1fa380a4eb4 --- a/includes/admin/discounts/discount-actions.php +++ b/includes/admin/discounts/discount-actions.php @@ -2,114 +2,458 @@ /** * Discount Actions * - * @package Easy Digital Downloads - * @subpackage Discount Actions - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Admin/Discounts + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 1.0.8.1 -*/ - + */ +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /** - * Add Discount + * Sets up and stores a new discount code. * - * Setups and stores a new discount code. + * @since 1.0 + * @since 3.0 Added backwards compatibility for pre-3.0 discount data. Added discount start/end time. * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_add_discount( $data ) { - if (wp_verify_nonce( $data['edd-discount-nonce'], 'edd_discount_nonce' ) ) { - // setup the discount code details - $posted = array(); - foreach( $data as $key => $value ) { - if( $key != 'edd-discount-nonce' && $key != 'edd-action' ) - $posted[$key] = strip_tags(addslashes( $value ) ); + * @param array $data Discount code data. + */ +function edd_admin_add_discount( $data = array() ) { + + // Bail if no nonce or nonce fails. + if ( ! isset( $data['edd-discount-nonce'] ) || ! wp_verify_nonce( $data['edd-discount-nonce'], 'edd_discount_nonce' ) ) { + return; + } + + // Bail if current user cannot manage shop discounts. + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to create discount codes', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if discount does not exist. + if ( edd_get_discount_by( 'code', $data['code'] ) ) { + edd_redirect( add_query_arg( 'edd-message', 'discount_exists', $data['edd-redirect'] ) ); + } + + // Bail if missing important data. + if ( empty( $data['name'] ) || empty( $data['code'] ) || empty( $data['amount_type'] ) || ( empty( $data['amount'] ) && 0 !== absint( $data['amount'] ) ) ) { + edd_redirect( add_query_arg( 'edd-message', 'discount_validation_failed' ) ); + } + + // Verify only accepted characters. + $sanitized = preg_replace( '/[^a-zA-Z0-9-_]+/', '', $data['code'] ); + if ( strtoupper( $data['code'] ) !== strtoupper( $sanitized ) ) { + edd_redirect( add_query_arg( 'edd-message', 'discount_invalid_code' ) ); + } + + $sanitized_amount = (float) edd_sanitize_amount( $data['amount'] ); + if ( empty( $data['amount'] ) || 0.00 === $sanitized_amount ) { + edd_redirect( add_query_arg( 'edd-message', 'discount_invalid_amount' ) ); + } + + // Setup default discount values. + $to_add = array(); + $to_add['status'] = 'active'; + $current_timestamp = current_time( 'timestamp' ); + + $data = array_filter( $data ); + + foreach ( $data as $column => $value ) { + switch ( $column ) { + + // We skip these here as they are handled below. + case 'start_date': + case 'start': + case 'end_date': + case 'expiration': + case 'edd-action': + case 'edd-discount-nonce': + case 'edd-redirect': + break; + + case 'product_reqs': + case 'categories': + $to_add[ $column ] = $value; + break; + + case 'amount': + $to_add['amount'] = edd_sanitize_amount( $value ); + break; + + default: + $to_add[ $column ] = is_array( $value ) + ? array_map( 'sanitize_text_field', $value ) + : sanitize_text_field( $value ); + break; } - // set the discount code's default status to active - $posted['status'] = 'active'; - $save = edd_store_discount( $posted ); } -} -add_action( 'edd_add_discount', 'edd_add_discount' ); + // Start date. + if ( ! empty( $data['start_date'] ) ) { + $start_date = sanitize_text_field( $data['start_date'] ); + $start_date_hour = isset( $data['start_date_hour'] ) && (int) $data['start_date_hour'] >= 0 && (int) $data['start_date_hour'] <= 23 + ? intval( $data['start_date_hour'] ) + : '00'; + $start_date_minute = isset( $data['start_date_minute'] ) && (int) $data['start_date_minute'] >= 0 && (int) $data['start_date_minute'] <= 59 + ? intval( $data['start_date_minute'] ) + : '00'; + + $start_date_string = EDD()->utils->get_date_string( + $start_date, + $start_date_hour, + $start_date_minute + ); + // The start date is entered in the user's WP timezone. We need to convert it to UTC prior to saving now. + $to_add['start_date'] = edd_get_utc_date_string( $start_date_string ); + } + + // End date. + if ( ! empty( $data['end_date'] ) ) { + $end_date = sanitize_text_field( $data['end_date'] ); + $end_date_hour = isset( $data['end_date_hour'] ) && (int) $data['end_date_hour'] >= 0 && (int) $data['end_date_hour'] <= 23 + ? intval( $data['end_date_hour'] ) + : '23'; + $end_date_minute = isset( $data['end_date_minute'] ) && (int) $data['end_date_minute'] >= 0 && (int) $data['end_date_minute'] <= 59 + ? intval( $data['end_date_minute'] ) + : '59'; + + $end_date_string = EDD()->utils->get_date_string( + $end_date, + $end_date_hour, + $end_date_minute + ); + // The end date is entered in the user's WP timezone. We need to convert it to UTC prior to saving now. + $to_add['end_date'] = edd_get_utc_date_string( $end_date_string ); + } + + // Meta values. + $to_add['product_reqs'] = isset( $data['product_reqs'] ) ? preg_filter( '/\d|\d_\d/', '$0', (array) $data['product_reqs'] ) : ''; // only accepts patterns like 123 or 123_4 + $to_add['excluded_products'] = isset( $data['excluded_products'] ) ? wp_parse_id_list( $data['excluded_products'] ) : ''; + $to_add['categories'] = isset( $data['categories'] ) ? wp_parse_id_list( $data['categories'] ) : array(); + $to_add['term_condition'] = isset( $data['term_condition'] ) ? $data['term_condition'] : ''; + + $to_add = array_filter( $to_add ); + + // Strip out data that should not be sent to the query methods. + $to_strip = array( + 'discount-id', + 'start_date_minute', + 'start_date_hour', + 'end_date_minute', + 'end_date_hour', + ); + + // Loop through fields to update, and unset known bad keys. + foreach ( $to_add as $key => $value ) { + if ( in_array( $key, $to_strip, true ) ) { + unset( $to_add[ $key ] ); + } + } + + // Attempt to add. + $created = edd_add_discount( $to_add ); + $arg = ! empty( $created ) + ? 'discount_added' + : 'discount_add_failed'; + + // Redirect. + edd_redirect( add_query_arg( 'edd-message', sanitize_key( $arg ), $data['edd-redirect'] ) ); +} +add_action( 'edd_add_discount', 'edd_admin_add_discount' ); /** - * Edit Discount - * - * Saves an edited discount. + * Saves an edited discount * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_edit_discount( $data ) { - if( isset( $data['edd-discount-nonce'] ) && wp_verify_nonce( $data['edd-discount-nonce'], 'edd_discount_nonce' ) ) { - // setup the discount code details - $discount = array(); - foreach( $data as $key => $value ) { - if( $key != 'edd-discount-nonce' && $key != 'edd-action' && $key != 'discount-id' && $key != 'edd-redirect' ) - $discount[$key] = strip_tags( addslashes( $value ) ); + * @since 3.0 + * @param array $data Discount code data + * @return void + */ +function edd_admin_edit_discount( $data = array() ) { + + // Bail if no nonce or nonce fails + if ( ! isset( $data['edd-discount-nonce'] ) || ! wp_verify_nonce( $data['edd-discount-nonce'], 'edd_discount_nonce' ) ) { + return; + } + + // Bail if current user cannot manage shop discounts + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to edit discount codes', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if discount does not exist + if ( empty( $data['discount-id'] ) ) { + wp_die( __( 'No discount ID supplied', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Setup default discount values + $discount_id = absint( $data['discount-id'] ); + $discount = edd_get_discount( $discount_id ); + + // Bail if no discount + if ( empty( $discount ) || ( $discount->id <= 0 ) ) { + wp_die( __( 'Invalid discount', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $sanitized_amount = (float) edd_sanitize_amount( $data['amount'] ); + if ( empty( $data['amount'] ) || 0.00 === $sanitized_amount ) { + edd_redirect( add_query_arg( 'edd-message', 'discount_invalid_amount' ) ); + } + + // Prepare update + $to_update = array(); + $current_time = current_time( 'timestamp' ); + + $data = array_filter( $data ); + + foreach ( $data as $column => $value ) { + switch ( $column ) { + // We skip these here as they are handled below. + case 'start_date': + case 'start': + case 'end_date': + case 'expiration': + case 'edd-redirect': + case 'edd-action': + case 'edd-discount-nonce': + case '_wp_http_referer': + break; + + case 'discount-id': + $to_update['id'] = $value; + break; + + case 'amount': + $to_update['amount'] = edd_sanitize_amount( $value ); + break; + + default: + $to_update[ $column ] = is_array( $value ) + ? array_map( 'sanitize_text_field', $value ) + : sanitize_text_field( $value ); + break; } - $old_discount = edd_get_discount_by_code( $data['code'] ); - $discount['uses'] = $old_discount['uses']; - if( edd_store_discount( $discount, $data['discount-id'] ) ) { - wp_redirect( add_query_arg( 'edd-message', 'discount_updated', $data['edd-redirect'] ) ); exit; - } else { - wp_redirect( add_query_arg( 'edd-message', 'discount_update_failed', $data['edd-redirect'] ) ); exit; + } + + // Start date. + if ( ! empty( $data['start_date'] ) ) { + $start_date = sanitize_text_field( $data['start_date'] ); + $start_date_hour = isset( $data['start_date_hour'] ) && (int) $data['start_date_hour'] >= 0 && (int) $data['start_date_hour'] <= 23 + ? intval( $data['start_date_hour'] ) + : '00'; + $start_date_minute = isset( $data['start_date_minute'] ) && (int) $data['start_date_minute'] >= 0 && (int) $data['start_date_minute'] <= 59 + ? intval( $data['start_date_minute'] ) + : '00'; + + $start_date_string = EDD()->utils->get_date_string( + $start_date, + $start_date_hour, + $start_date_minute + ); + + // The start date is entered in the user's WP timezone. We need to convert it to UTC prior to saving now. + $to_update['start_date'] = edd_get_utc_date_string( $start_date_string ); + } else { + $to_update['start_date'] = null; + } + + // End date. + if ( ! empty( $data['end_date'] ) ) { + $end_date = sanitize_text_field( $data['end_date'] ); + $end_date_hour = isset( $data['end_date_hour'] ) && (int) $data['end_date_hour'] >= 0 && (int) $data['end_date_hour'] <= 23 + ? intval( $data['end_date_hour'] ) + : '23'; + $end_date_minute = isset( $data['end_date_minute'] ) && (int) $data['end_date_minute'] >= 0 && (int) $data['end_date_minute'] <= 59 + ? intval( $data['end_date_minute'] ) + : '59'; + + $end_date_string = EDD()->utils->get_date_string( + $end_date, + $end_date_hour, + $end_date_minute + ); + + // The end date is entered in the user's WP timezone. We need to convert it to UTC prior to saving now. + $to_update['end_date'] = edd_get_utc_date_string( $end_date_string ); + } else { + $to_update['end_date'] = null; + } + + // Known & accepted core discount meta. + $to_update['product_reqs'] = isset( $data['product_reqs'] ) ? preg_filter( '/\d|\d_\d/', '$0', (array) $data['product_reqs'] ) : ''; // only accepts patterns like 123 or 123_4 + $to_update['excluded_products'] = isset( $data['excluded_products'] ) ? wp_parse_id_list( $data['excluded_products'] ) : ''; + $to_update['categories'] = ! empty( $data['categories'] ) ? wp_parse_id_list( $data['categories'] ) : array(); + $to_update['term_condition'] = isset( $data['term_condition'] ) ? $data['term_condition'] : ''; + + // "Once per customer" checkbox. + $to_update['once_per_customer'] = isset( $data['once_per_customer'] ) + ? 1 + : 0; + + // Strip out known non-columns + $to_strip = array( + + // Legacy + 'discount-id', + + // Time + 'start_date_minute', + 'start_date_hour', + 'end_date_minute', + 'end_date_hour' + ); + + // Loop through fields to update, and unset known bad keys + foreach ( $to_update as $key => $value ) { + if ( in_array( $key, $to_strip, true ) ) { + unset( $to_update[ $key ] ); } } + + // Attempt to update + $updated = edd_update_discount( $discount_id, $to_update ); + $arg = ! empty( $updated ) + ? 'discount_updated' + : 'discount_not_changed'; + + // Redirect + edd_redirect( add_query_arg( 'edd-message', sanitize_key( $arg ), $data['edd-redirect'] ) ); } -add_action( 'edd_edit_discount', 'edd_edit_discount' ); +add_action( 'edd_edit_discount', 'edd_admin_edit_discount' ); /** - * Delete Discount + * Listens for when a discount delete button is clicked and deletes the + * discount code * - * Listens for when a discount delete button is clicked. - * - * @access public - * @since 1.0 - * @return void -*/ - -function edd_delete_discount( $data ) { - $discount_id = $data['discount']; - edd_remove_discount( $discount_id ); -} -add_action( 'edd_delete_discount', 'edd_delete_discount' ); + * @since 3.0 + * @param array $data Discount code data + * @uses edd_delete_discount() + * @return void + */ +function edd_admin_delete_discount( $data = array() ) { + + // Bail if no nonce or nonce fails + if ( ! isset( $data['_wpnonce'] ) || ! wp_verify_nonce( $data['_wpnonce'], 'edd_discount_nonce' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if current user cannot manage shop + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to delete discount codes', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if discount does not exist + if ( empty( $data['discount'] ) ) { + wp_die( __( 'No discount ID supplied', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Setup default discount values + $discount_id = absint( $data['discount'] ); + $deleted = edd_delete_discount( $discount_id ); + $arg = ! empty( $deleted ) + ? 'discount_deleted' + : 'discount_deleted_failed'; + // Redirect + edd_redirect( remove_query_arg( 'edd-action', add_query_arg( 'edd-message', sanitize_key( $arg ), $_SERVER['REQUEST_URI'] ) ) ); +} +add_action( 'edd_delete_discount', 'edd_admin_delete_discount' ); /** - * Activate Discount + * Activates Discount Code * - * Sets a discount code to active. + * Sets a discount status to active * - * @access public - * @since 1.0 - * @return void -*/ - -function edd_activate_discount( $data ) { - $id = $data['discount']; - edd_update_discount_status( $id, 'active' ); + * @since 1.0 + * @param array $data Discount code data + * @uses edd_update_discount_status() + * @return void + */ +function edd_activate_discount( $data = array() ) { + + // Bail if no nonce or nonce fails + if ( ! isset( $data['_wpnonce'] ) || ! wp_verify_nonce( $data['_wpnonce'], 'edd_discount_nonce' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if current user cannot manage shop + if( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to edit discount codes', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $discount_id = absint( $data['discount'] ); + $activated = edd_update_discount_status( $discount_id, 'active' ); + $arg = ! empty( $activated ) + ? 'discount_activated' + : 'discount_activation_failed'; + + // Redirect + edd_redirect( remove_query_arg( 'edd-action', add_query_arg( 'edd-message', sanitize_key( $arg ), $_SERVER['REQUEST_URI'] ) ) ); } add_action( 'edd_activate_discount', 'edd_activate_discount' ); - /** * Deactivate Discount * - * @access public - * @since 1.0 - * @return void -*/ - -function edd_deactivate_discount( $data) { - $id = $data['discount']; - edd_update_discount_status( $id, 'inactive' ); + * Sets a discount status to deactivate + * + * @since 1.0 + * @param array $data Discount code data + * @uses edd_update_discount_status() + * @return void + */ +function edd_deactivate_discount( $data = array() ) { + + // Bail if no nonce or nonce fails + if ( ! isset( $data['_wpnonce'] ) || ! wp_verify_nonce( $data['_wpnonce'], 'edd_discount_nonce' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if current user cannot manage shop + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to create discount codes', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $discount_id = absint( $data['discount'] ); + $activated = edd_update_discount_status( $discount_id, 'inactive' ); + $arg = ! empty( $activated ) + ? 'discount_deactivated' + : 'discount_deactivation_failed'; + + // Redirect + edd_redirect( remove_query_arg( 'edd-action', add_query_arg( 'edd-message', sanitize_key( $arg ), $_SERVER['REQUEST_URI'] ) ) ); +} +add_action( 'edd_deactivate_discount', 'edd_deactivate_discount' ); + +/** + * Archive Discount + * + * Sets a discount status to archived + * + * @since 3.2.0 + * @param array $data Discount code data + * + * @uses edd_update_discount_status() + */ +function edd_archive_discount( $data = array() ) { + // Bail if no nonce or nonce fails + if ( ! isset( $data['_wpnonce'] ) || ! wp_verify_nonce( $data['_wpnonce'], 'edd_discount_nonce' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if current user cannot manage shop + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to create discount codes', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $discount_id = absint( $data['discount'] ); + $archived = edd_update_discount_status( $discount_id, 'archived' ); + $arg = ! empty( $archived ) + ? 'discount_archived' + : 'discount_archived_failed'; + + // Redirect + edd_redirect( remove_query_arg( 'edd-action', add_query_arg( 'edd-message', sanitize_key( $arg ), $_SERVER['REQUEST_URI'] ) ) ); } -add_action( 'edd_deactivate_discount', 'edd_deactivate_discount' ); \ No newline at end of file +add_action( 'edd_archive_discount', 'edd_archive_discount' ); diff --git a/includes/admin/discounts/discount-codes.php b/includes/admin/discounts/discount-codes.php index 7a180c39c02..cf1acadc2e3 100755 --- a/includes/admin/discounts/discount-codes.php +++ b/includes/admin/discounts/discount-codes.php @@ -2,130 +2,80 @@ /** * Discount Codes * - * @package Easy Digital Downloads - * @subpackage Discount Codes - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Admin/Discounts + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 -*/ + * @since 1.0 + */ +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /** - * Discounts Page + * Renders the Discounts admin page. * - * Renders the discount page contents. + * Here only for backwards compatibility * - * @access private - * @since 1.0 - * @return void + * @since 1.4 + * @since 3.0 Nomenclature updated for consistency. */ - function edd_discounts_page() { - global $edd_options; - $current_page = get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?edit.php?post_type=download&page=edd-discounts'; - ?> -
    - - + // Enqueue scripts. + wp_enqueue_script( 'edd-admin-discounts' ); + + // Edit + if ( ! empty( $_GET['edd-action'] ) && ( 'edit_discount' === $_GET['edd-action'] ) ) { + if ( ! current_user_can( 'edit_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to edit discounts.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + wp_enqueue_script( 'edd-admin-notes' ); + require_once EDD_PLUGIN_DIR . 'includes/admin/discounts/edit-discount.php'; + + // Add + } elseif ( ! empty( $_GET['edd-action'] ) && ( 'add_discount' === $_GET['edd-action'] ) ) { + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to manage discounts.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + require_once EDD_PLUGIN_DIR . 'includes/admin/discounts/add-discount.php'; + + // List tables + } else { + edd_adjustments_page(); + } +} + +/** + * Output the discounts page content, in the adjustments page action. + * + * @since 3.0 + */ +function edd_discounts_page_content() { + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + wp_die( __( 'You do not have permission to manage discounts.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + require_once EDD_PLUGIN_DIR . 'includes/admin/discounts/class-discount-codes-table.php'; + + $discount_codes_table = new EDD_Discount_Codes_Table(); + $discount_codes_table->prepare_items(); + + do_action( 'edd_discounts_page_top' ); ?> + +
    + search_box( __( 'Search Discounts', 'easy-digital-downloads' ), 'edd-discounts' ); ?> - + + - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $discount) : ?> - - - - - - - - - - - - - - - - -
    - - - - - - - - - | - - | - - | - - -
    - + views(); + $discount_codes_table->display(); + ?> +
    - - - - -
    - 400 ) ); +} + +// Load discount +$discount_id = absint( $_GET['discount'] ); + +/** @var EDD_Discount */ +$discount = edd_get_discount( $discount_id ); + +// Bail if discount does not exist +if ( empty( $discount ) ) { + wp_die( __( 'Something went wrong.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 400 ) ); } -$discount = edd_get_discount( $_GET['discount']); + +// Setup discount vars +$product_requirements = $discount->get_product_reqs(); +$excluded_products = $discount->get_excluded_products(); +$condition = $discount->get_product_condition(); +$single_use = $discount->get_once_per_customer(); +$type = $discount->get_type(); +$notes = edd_get_discount_notes( $discount->id ); + +// Show/Hide +$flat_display = ( 'flat' === $type ) ? '' : ' style="display:none;"'; +$percent_display = ( 'percent' === $type ) ? '' : ' style="display:none;"'; +$no_notes_display = empty( $notes ) ? '' : ' style="display:none;"'; +$condition_display = ! empty( $product_requirements ) ? '' : ' style="display:none;"'; + +// Dates & times +$discount_start_date = edd_get_edd_timezone_equivalent_date_from_utc( EDD()->utils->date( $discount->start_date, 'utc' ) ); +$discount_end_date = edd_get_edd_timezone_equivalent_date_from_utc( EDD()->utils->date( $discount->end_date, 'utc' ) ); +$start_date = $discount_start_date->format( 'Y-m-d' ); +$start_hour = $discount_start_date->format( 'H' ); +$start_minute = $discount_start_date->format( 'i' ); +$end_date = $discount_end_date->format( 'Y-m-d' ); +$end_hour = $discount_end_date->format( 'H' ); +$end_minute = $discount_end_date->format( 'i' ); +$hours = edd_get_hour_values(); +$minutes = edd_get_minute_values(); ?> -

    -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    - - - -

    -
    -

    - - - - - -

    -
    \ No newline at end of file +
    +

    + +
    + +
    + id, $discount ); ?> + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, 'categories', true ); + $term_condition = edd_get_adjustment_meta( $discount->id, 'term_condition', true ); + $term_condition = $term_condition ?: ''; + require_once 'views/categories.php'; + ?> + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + + id, $discount ); ?> + + + + + + +
    + + + +

    +
    + + + +

    +
    + + + + + + + +

    +
    + + + html->product_dropdown( + array( + 'name' => 'product_reqs[]', + 'id' => 'edd_products', + 'selected' => $product_requirements, + 'multiple' => true, + 'chosen' => true, + /* translators: %s: Downloads plural label */ + 'placeholder' => sprintf( _x( 'Select %s', 'Noun: The plural label for the download post type as a placeholder for a dropdown', 'easy-digital-downloads' ), edd_get_label_plural() ), + 'variations' => true, + ) + ); + ?> +
    > +

    + +

    +

    +
    + +

    +
    +

    +
    + + + html->product_dropdown( + array( + 'name' => 'excluded_products[]', + 'id' => 'excluded_products', + 'selected' => $excluded_products, + 'multiple' => true, + 'chosen' => true, + /* translators: %s: Downloads plural label */ + 'placeholder' => sprintf( _x( 'Select %s', 'Noun: The plural label for the download post type as a placeholder for a dropdown', 'easy-digital-downloads' ), edd_get_label_plural() ), + ) + ); + ?> +

    + +

    +
    + + + + + + + : + + + + + +

    +
    + + + + + + + : + + + + + +

    +
    + + + +

    +
    + + + +

    +
    + + + 'once_per_customer', + 'current' => $single_use, + 'label' => __( 'Prevent customers from using this discount more than once.', 'easy-digital-downloads' ), + ) + ); + $toggle->output(); + ?> +
    + + + +

    +
    + + +
    + + id, 'discount' ); ?> +
    +
    + + id, $discount ); ?> + +

    + + + + 'edd-discounts', + 'edd-action' => 'edit_discount', + 'discount' => absint( $discount->id ), + ) + ) + ); + ?> + + + +

    +
    +
    diff --git a/includes/admin/discounts/views/categories.php b/includes/admin/discounts/views/categories.php new file mode 100644 index 00000000000..3ca761e62b8 --- /dev/null +++ b/includes/admin/discounts/views/categories.php @@ -0,0 +1,44 @@ + + + + + + + 'categories[]', + 'id' => 'edd-categories', + 'selected' => $categories ?: array(), // phpcs:ignore Universal.Operators.DisallowShortTernary.Found + 'multiple' => true, + 'chosen' => true, + 'show_option_all' => false, + 'show_option_none' => false, + 'number' => 30, + ) + ); + echo $dropdown->get(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ?> +
    +

    + +

    +
    +

    + +

    + + diff --git a/includes/admin/downloads/contextual-help.php b/includes/admin/downloads/contextual-help.php new file mode 100755 index 00000000000..656a52b145c --- /dev/null +++ b/includes/admin/downloads/contextual-help.php @@ -0,0 +1,150 @@ +id ) { + return; + } + + $pass_manager = new Pass_Manager(); + if ( $pass_manager->isFree() ) { + $docs_url = edd_link_helper( + 'https://easydigitaldownloads.com/docs/', + array( + 'utm_medium' => 'downloads-contextual-help', + 'utm_content' => 'documentation', + ) + ); + + $upgrade_url = edd_link_helper( + 'https://easydigitaldownloads.com/lite-upgrade/', + array( + 'utm_medium' => 'downloads-contextual-help', + 'utm_content' => 'lite-upgrade', + ) + ); + + $screen->set_help_sidebar( + '

    ' . __( 'For more information:', 'easy-digital-downloads' ) . '

    ' . + /* translators: %s: Documentation URL */ + '

    ' . sprintf( __( 'Visit the documentation on the Easy Digital Downloads website.', 'easy-digital-downloads' ), $docs_url ) . '

    ' . + '

    ' . sprintf( + /* translators: %s: Upgrade URL */ + __( 'Need more from your Easy Digital Downloads store? Upgrade Now!', 'easy-digital-downloads' ), + $upgrade_url + ) . '

    ' + ); + } + + $screen->add_help_tab( + array( + 'id' => 'edd-download-configuration', + /* translators: %s: Download singular label */ + 'title' => sprintf( __( '%s Settings', 'easy-digital-downloads' ), edd_get_label_singular() ), + 'content' => + '

    ' . __( 'File Download Limit - Define how many times customers are allowed to download their purchased files. Leave at 0 for unlimited. Resending the purchase receipt will permit the customer one additional download if their limit has already been reached.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Accounting Options - If enabled, define an individual SKU or product number for this download.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Button Options - Disable the automatic output of the purchase button. If disabled, no button will be added to the download page unless the [purchase_link] shortcode is used.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-download-prices', + /* translators: %s: Download singular label */ + 'title' => sprintf( __( '%s Prices', 'easy-digital-downloads' ), edd_get_label_singular() ), + 'content' => + '

    ' . __( 'Enable variable pricing - By enabling variable pricing, multiple download options and prices can be configured.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Enable multi-option purchases - By enabling multi-option purchases customers can add multiple variable price items to their cart at once.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-download-files', + /* translators: %s: Download singular label */ + 'title' => sprintf( __( '%s Files', 'easy-digital-downloads' ), edd_get_label_singular() ), + 'content' => + '

    ' . __( 'Product Type Options - Choose a default product type or a bundle. Bundled products automatically include access to other download's files when purchased.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'File Downloads - Define download file names and their respective file URL. Multiple files can be assigned to a single price, or variable prices.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-product-notes', + /* translators: %s: Download singular label */ + 'title' => sprintf( __( '%s Instructions', 'easy-digital-downloads' ), edd_get_label_singular() ), + /* translators: %s: Download singular label */ + 'content' => '

    ' . sprintf( __( 'Special instructions for this %s. These will be added to the sales receipt, and may be used by some extensions or themes.', 'easy-digital-downloads' ), strtolower( edd_get_label_singular() ) ) . '

    ', + ) + ); + + $colors = array( + 'gray', + 'pink', + 'blue', + 'green', + 'teal', + 'black', + 'dark gray', + 'orange', + 'purple', + 'slate', + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-purchase-shortcode', + 'title' => __( 'Purchase Shortcode', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'Purchase Shortcode - If the automatic output of the purchase button has been disabled via the Download Configuration box, a shortcode can be used to output the button or link.', 'easy-digital-downloads' ) . '

    ' . + '

    [purchase_link id="#" price="1" text="Add to Cart" color="blue"]

    ' . + '
      +
    • id - ' . __( 'The ID of a specific download to purchase.', 'easy-digital-downloads' ) . '
    • +
    • price - ' . __( 'Whether to show the price on the purchase button. 1 to show the price, 0 to disable it.', 'easy-digital-downloads' ) . '
    • +
    • text - ' . __( 'The text to be displayed on the button or link.', 'easy-digital-downloads' ) . '
    • +
    • style - ' . __( 'button | text - The style of the purchase link.', 'easy-digital-downloads' ) . '
    • +
    • color - ' . implode( ' | ', $colors ) . '
    • +
    • class - ' . __( 'One or more custom CSS classes you want applied to the button.', 'easy-digital-downloads' ) . '
    • +
    ' . + '

    ' . sprintf( + /* translators: 1: Shortcodes Codex URL, 2: EDD Documentation URL */ + __( 'For more information, see using Shortcodes on the WordPress.org Codex or Easy Digital Downloads Documentation', 'easy-digital-downloads' ), + 'https://codex.wordpress.org/Shortcode', + 'https://easydigitaldownloads.com/docs/purchase_link-shortcode/' + ) . '

    ', + ) + ); + + /** + * Fires off in the EDD Downloads Contextual Help Screen + * + * @since 1.2.3 + * @param object $screen The current admin screen + */ + do_action( 'edd_downloads_contextual_help', $screen ); +} +add_action( 'load-post.php', 'edd_downloads_contextual_help' ); +add_action( 'load-post-new.php', 'edd_downloads_contextual_help' ); diff --git a/includes/admin/downloads/dashboard-columns.php b/includes/admin/downloads/dashboard-columns.php index e23232e48b5..3dbe72506d4 100755 --- a/includes/admin/downloads/dashboard-columns.php +++ b/includes/admin/downloads/dashboard-columns.php @@ -2,272 +2,369 @@ /** * Dashboard Columns * - * @package Easy Digital Downloads - * @subpackage Dashboard Columns - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Admin/Downloads + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 -*/ + * @since 1.0 + */ +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /** - * Donwload Columns + * Download Columns * - * Defines the custom columns and their order. + * Defines the custom columns and their order * - * @access private - * @since 1.0 - * @return array -*/ + * @since 1.0 + * @param array $download_columns Array of download columns + * @return array $download_columns Updated array of download columns for Downloads + * Post Type List Table + */ +function edd_download_columns( $download_columns ) { + $category_labels = edd_get_taxonomy_labels( 'download_category' ); + $tag_labels = edd_get_taxonomy_labels( 'download_tag' ); -function edd_download_columns( $download_columns ){ - $download_columns = array( + return apply_filters( 'edd_download_columns', array( 'cb' => '', - 'title' => __( 'Name', 'edd' ), - 'download_category' => __( 'Categories', 'edd' ), - 'download_tag' => __( 'Tags', 'edd' ), - 'price' => __( 'Price', 'edd' ), - 'sales' => __( 'Sales', 'edd' ), - 'earnings' => __( 'Earnings', 'edd' ), - 'shortcode' => __( 'Short Code', 'edd' ), - 'date' => __( 'Date', 'edd' ) - ); - return $download_columns; + 'title' => __( 'Name', 'easy-digital-downloads' ), + 'download_category' => $category_labels['menu_name'], + 'download_tag' => $tag_labels['menu_name'], + 'price' => __( 'Price', 'easy-digital-downloads' ), + 'sales' => __( 'Net Sales', 'easy-digital-downloads' ), + 'earnings' => __( 'Net Revenue', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ) + ) ); } add_filter( 'manage_edit-download_columns', 'edd_download_columns' ); - /** - * Render Donwload Columns - * - * Render the custom columns content. + * Render Download Columns * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @param string $column_name Column name + * @param int $post_id Download (Post) ID + * @return void + */ function edd_render_download_columns( $column_name, $post_id ) { - if(get_post_type( $post_id) == 'download') { - global $edd_options; - $sales = edd_get_download_sales_stats( $post_id ); - $earnings = edd_get_download_earnings_stats( $post_id ); - $style = isset( $edd_options['button_style'] ) ? $edd_options['button_style'] : 'button'; - $color = isset( $edd_options['checkout_color'] ) ? $edd_options['checkout_color'] : 'blue'; - $purchase_text = isset( $edd_options['add_to_cart_text'] ) ? $edd_options['add_to_cart_text'] : __( 'Purchase', 'edd' ); - - switch ( $column_name) { - case 'download_category': - echo get_the_term_list( $post_id, 'download_category', '', ', ', ''); - break; - case 'download_tag': - echo get_the_term_list( $post_id, 'download_tag', '', ', ', ''); - break; - case 'price': - echo edd_price( $post_id, false); - if ( !edd_has_variable_prices( $post_id) ) { - echo ''; - } - break; - case 'sales': - echo $sales; - break; - case 'earnings': - echo edd_currency_filter( $earnings); - break; - case 'shortcode': - echo '[purchase_link id="' . absint( $post_id ) . '" text="' . esc_html( $purchase_text ) . '" style="' . $style . '" color="' . esc_attr( $color ) . '"]'; - break; - } + + // Bail if not a download + if ( get_post_type( $post_id ) !== 'download' ) { + return; + } + + switch ( $column_name ) { + case 'download_category': + $terms = get_the_term_list( $post_id, 'download_category', '', ', ', ''); + echo ! empty( $terms ) + ? $terms + : '—'; + break; + case 'download_tag': + $terms = get_the_term_list( $post_id, 'download_tag', '', ', ', ''); + echo ! empty( $terms ) + ? $terms + : '—'; + break; + case 'price': + if ( edd_has_variable_prices( $post_id ) ) { + echo edd_price_range( $post_id ); + } else { + echo edd_price( $post_id, false ); + echo ''; + } + break; + case 'sales': + if ( current_user_can( 'view_product_stats', $post_id ) ) { + $sales_url = add_query_arg( array( + 'page' => 'edd-payment-history', + 'product-id' => urlencode( $post_id ) + ), edd_get_admin_base_url() ); + + echo ''; + echo edd_get_download_sales_stats( $post_id ); + echo ''; + } else { + echo '-'; + } + break; + case 'earnings': + if ( current_user_can( 'view_product_stats', $post_id ) ) { + $report_url = edd_get_admin_url( array( + 'page' => 'edd-reports', + 'view' => 'downloads', + 'products' => absint( $post_id ), + ) ); + + echo ''; + echo edd_currency_filter( edd_format_amount( edd_get_download_earnings_stats( $post_id ) ) ); + echo ''; + } else { + echo '-'; + } + break; } } add_action( 'manage_posts_custom_column', 'edd_render_download_columns', 10, 2 ); - /** - * Sortable Donwload Columns - * - * Set the sortable columns content. + * Registers the sortable columns in the list table * - * @access private - * @since 1.0 - * @return array -*/ - + * @since 1.0 + * @param array $columns Array of the columns + * @return array $columns Array of sortable columns + */ function edd_sortable_download_columns( $columns ) { - - $columns['price'] = 'price'; - $columns['sales'] = 'sales'; + $columns['price'] = 'price'; + $columns['sales'] = 'sales'; $columns['earnings'] = 'earnings'; return $columns; } add_filter( 'manage_edit-download_sortable_columns', 'edd_sortable_download_columns' ); - /** - * Sorts Downloads - * - * Sorts the downloads. + * Sorts Columns in the Downloads List Table * - * @access private - * @since 1.0 - * @return array -*/ - + * @since 1.0 + * @param array $vars Array of all the sort variables + * @return array $vars Array of all the sort variables + */ function edd_sort_downloads( $vars ) { - - // check if we're viewing the "download" post type + // Check if we're viewing the "download" post type if ( isset( $vars['post_type'] ) && 'download' == $vars['post_type'] ) { - - // check if 'orderby' is set to "sales" + // Check if 'orderby' is set to "sales" if ( isset( $vars['orderby'] ) && 'sales' == $vars['orderby'] ) { - - // merge the query vars with our custom variables $vars = array_merge( $vars, array( 'meta_key' => '_edd_download_sales', - 'orderby' => 'meta_value_num' + 'orderby' => 'meta_value_num' ) ); } - - // check if "orderby" is set to "earnings" + + // Check if "orderby" is set to "earnings" if ( isset( $vars['orderby'] ) && 'earnings' == $vars['orderby'] ) { - // merge the query vars with our custom variables $vars = array_merge( $vars, array( 'meta_key' => '_edd_download_earnings', - 'orderby' => 'meta_value_num' + 'orderby' => 'meta_value_num' ) ); } - // check if "orderby" is set to "earnings" + // Check if "orderby" is set to "earnings" if ( isset( $vars['orderby'] ) && 'price' == $vars['orderby'] ) { - // merge the query vars with our custom variables $vars = array_merge( $vars, array( 'meta_key' => 'edd_price', - 'orderby' => 'meta_value_num' + 'orderby' => 'meta_value_num' ) ); } } - + return $vars; } +/** + * Sets restrictions on author of Downloads List Table + * + * @since 2.2 + * @param array $vars Array of all sort variables + * @return array Array of all sort variables + */ +function edd_filter_downloads( $vars ) { + if ( isset( $vars['post_type'] ) && 'download' == $vars['post_type'] ) { + + // If an author ID was passed, use it + if ( isset( $_REQUEST['author'] ) && ! current_user_can( 'view_shop_reports' ) ) { + + $author_id = $_REQUEST['author']; + if ( (int) $author_id !== get_current_user_id() ) { + // Tried to view the products of another person, sorry + wp_die( __( 'You do not have permission to view this data.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + $vars = array_merge( + $vars, + array( + 'author' => get_current_user_id() + ) + ); + } + } + + return $vars; +} /** * Download Load * * Sorts the downloads. * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @return void + */ function edd_download_load() { - add_filter( 'request', 'edd_sort_downloads' ); + add_filter( 'request', 'edd_sort_downloads' ); + add_filter( 'request', 'edd_filter_downloads' ); } add_action( 'load-edit.php', 'edd_download_load', 9999 ); - /** * Add Download Filters * - * Add taxonomy drop down filters for downloads. + * Adds taxonomy drop down filters for downloads. * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @return void + */ function edd_add_download_filters() { global $typenow; - - // the current post type - if( $typenow == 'download') { - - $terms = get_terms( 'download_category' ); - if(count( $terms) > 0) { - echo ""; + + // Checks if the current post type is 'download'. + if ( 'download' !== $typenow ) { + return; + } + + $category_args = array( + 'taxonomy' => 'download_category', + 'number' => 30, + ); + + $categories = get_terms( $category_args ); + if ( ! is_wp_error( $categories ) && ! empty( $categories ) ) { + $category_labels = edd_get_taxonomy_labels( 'download_category' ); + + $options = array(); + $options[''] = sprintf( _x( 'All %s', 'plural: Example: "All Categories"', 'easy-digital-downloads' ), $category_labels['name'] ); + + // Ensure we include the selected value in the pre-populated list. + $selected = ! empty( $_GET['download_category'] ) ? $_GET['download_category'] : ''; + if ( ! empty( $selected ) ) { + $selected_term = get_term_by( 'slug', $selected, 'download_category' ); + + $options[ $selected_term->slug ] = $selected_term->name . ' (' . $selected_term->count . ')'; } - - $terms = get_terms('download_tag'); - if(count( $terms) > 0) { - echo ""; + + foreach ( $categories as $category ) { + $options[ $category->slug ] = $category->name . ' (' . $category->count . ')'; } - + + echo EDD()->html->select( + array( + 'name' => 'download_category', + 'id' => 'download_category', + 'class' => 'postform', + 'chosen' => true, + 'show_option_all' => false, + 'show_option_none' => false, + 'options' => $options, + 'selected' => $selected, + 'data' => array( + /* translators: %s: Download Category taxonomy name */ + 'placeholder' => sprintf( _x( 'Search %s', 'plural: Example: "Search Download Categories"', 'easy-digital-downloads' ), $category_labels['name'] ), + 'search-type' => 'download_category', + /* translators: %s: Download Category taxonomy name */ + 'search-placeholder' => sprintf( _x( 'Search %s', 'plural: Example: "Search Download Categories"', 'easy-digital-downloads' ), $category_labels['name'] ), + ), + ) + ); } + if ( isset( $_REQUEST['all_posts'] ) && '1' === $_REQUEST['all_posts'] ) { + echo ''; + } else if ( ! current_user_can( 'view_shop_reports' ) ) { + $author_id = get_current_user_id(); + echo ''; + } } add_action( 'restrict_manage_posts', 'edd_add_download_filters', 100 ); +/** + * Remove Download Month Filter + * + * Removes the drop down filter for downloads by date. + * + * @author Daniel J Griffiths + * @since 2.1 + * @param array $dates The preset array of dates + * @global $typenow The post type we are viewing + * @return array Empty array disables the dropdown + */ +function edd_remove_month_filter( $dates ) { + global $typenow; + + if ( 'download' === $typenow ) { + $dates = array(); + } + + return $dates; +} +add_filter( 'months_dropdown_results', 'edd_remove_month_filter', 99 ); /** * Adds price field to Quick Edit options * - * @access public - * @since 1.1.3.4 - * @return void -*/ - + * @since 1.1.3.4 + * @param string $column_name Name of the column + * @param string $post_type Current Post Type (i.e. download) + * @return void + */ function edd_price_field_quick_edit( $column_name, $post_type ) { - if ( $column_name != 'price' || $post_type != 'download' ) return; - ?> -
    -
    -

    + // Bail if not price or download + if ( $column_name !== 'price' || $post_type !== 'download' ) { + return; + } ?> +
    +
    + +


    -
    + post_type ) && $post->post_type == 'revision' ) - return $post_id; - - // check permissions - if ( ! current_user_can( 'edit_pages', $post_id ) ) { - return $post_id; - } - - // these are the default fields that get saved - $fields = apply_filters( 'edd_metabox_fields_save', array( - 'edd_price', - '_variable_pricing', - 'edd_variable_prices', - 'edd_download_files', - '_edd_purchase_text', - '_edd_purchase_style', - '_edd_purchase_color', - '_edd_hide_purchase_link', - 'edd_product_notes' - ) +function edd_download_metabox_fields() { + + $fields = array( + '_edd_product_type', + 'edd_price', + '_variable_pricing', + '_edd_price_options_mode', + 'edd_variable_prices', + 'edd_download_files', + '_edd_purchase_text', + '_edd_purchase_style', + '_edd_purchase_color', + '_edd_bundled_products', + '_edd_hide_purchase_link', + '_edd_download_tax_exclusive', + '_edd_button_behavior', + '_edd_quantities_disabled', + 'edd_product_notes', + '_edd_default_price_id', + '_edd_bundled_products_conditions', ); - foreach( $fields as $field ) { - if( isset( $_POST[ $field ] ) ) { - if ( is_string( $_POST[$field] ) ) { - $new = esc_attr( $_POST[$field] ); + if ( current_user_can( 'manage_shop_settings' ) ) { + $fields[] = '_edd_download_limit'; + $fields[] = '_edd_refundability'; + $fields[] = '_edd_refund_window'; + } + + if ( edd_use_skus() ) { + $fields[] = 'edd_sku'; + } + + return apply_filters( 'edd_metabox_fields_save', $fields ); +} + +/** + * Save post meta when the save_post action is called + * + * @since 1.0 + * @param int $post_id Download (Post) ID. + * @global array $post All the data of the the current post + * @return void + */ +function edd_download_meta_box_save( $post_id, $post ) { + if ( + ! isset( $_POST['edd_download_meta_box_nonce'] ) || + ! wp_verify_nonce( $_POST['edd_download_meta_box_nonce'], basename( __FILE__ ) ) + ) { + return; + } + + if ( edd_doing_autosave() || edd_doing_ajax() || isset( $_REQUEST['bulk_edit'] ) ) { + return; + } + + if ( isset( $post->post_type ) && 'revision' === $post->post_type ) { + return; + } + + if ( ! current_user_can( 'edit_product', $post_id ) ) { + return; + } + + edd_download_meta_box_fields_save( $post_id, $post ); +} + +add_action( 'save_post', 'edd_download_meta_box_save', 10, 2 ); + + +/** + * Save post meta when the save_post action is called + * + * As a note, this entire function is reliant on the fact that the edd_download_metabox_fields() function + * orders the _variable_pricing field before the edd_variable_prices field. If this is changed, this function + * will fail to detect that variable pricing is enabled since the option hasn't been updated to enable it yet. + * + * This shouldn't be an issue, but since there is a filter on these fields, it is possible for a developer to adjust the order + * of the fields, causing problems, but we should fix that in a future refactor of this. + * + * @since 3.2 + * @param int $post_id Download (Post) ID. + * @global WP_Post $post All the data of the the current post. + * @return void + */ +function edd_download_meta_box_fields_save( $post_id, $post ) { + if ( ! current_user_can( 'edit_product', $post_id ) ) { + return; + } + + // The default fields that get saved. + $fields = edd_download_metabox_fields(); + + foreach ( $fields as $field ) { + + if ( '_edd_default_price_id' === $field && edd_has_variable_prices( $post_id ) ) { + if ( isset( $_POST[ $field ] ) ) { + $use_value = ( ! empty( $_POST[ $field ] ) && is_numeric( $_POST[ $field ] ) ) || ( 0 === (int) $_POST[ $field ] ); + + $new_default_price_id = $use_value ? + intval( $_POST[ $field ] ) : + 1; } else { - $new = $_POST[ $field ]; + $new_default_price_id = 1; } - - $new = apply_filters( 'edd_metabox_save_' . $field, $new ); + update_post_meta( $post_id, $field, $new_default_price_id ); + continue; + } + + // No value stored when product type is "default" ("0") for backwards compatibility. + if ( '_edd_product_type' === $field && empty( $_POST[ $field ] ) ) { + delete_post_meta( $post_id, '_edd_product_type' ); + continue; + } + + // Skip saving bundled products if not set so that a previous value is not lost. + if ( '_edd_bundled_products' === $field && ! isset( $_POST[ $field ] ) ) { + continue; + } + + $new = false; + if ( ! empty( $_POST[ $field ] ) ) { + $new = apply_filters( 'edd_metabox_save_' . $field, $_POST[ $field ] ); + } + + if ( ! empty( $new ) ) { update_post_meta( $post_id, $field, $new ); } else { delete_post_meta( $post_id, $field ); } } + + if ( edd_has_variable_prices( $post_id ) ) { + $lowest = edd_get_lowest_price_option( $post_id ); + update_post_meta( $post_id, 'edd_price', $lowest ); + } + + do_action( 'edd_save_download', $post_id, $post ); +} + + +/** + * Sanitize bundled products on save + * + * Ensures a user doesn't try and include a product's ID in the products bundled with that product + * + * @since 1.6 + * + * @param array $products Array of product IDs. + * @return array + */ +function edd_sanitize_bundled_products_save( $products = array() ) { + + $products = array_map( + function ( $value ) { + return preg_replace( '/[^0-9_]/', '', $value ); + }, + (array) $products + ); + + foreach ( $products as $key => $value ) { + $underscore_pos = strpos( $value, '_' ); + if ( is_numeric( $underscore_pos ) ) { + $product_id = substr( $value, 0, $underscore_pos ); + } else { + $product_id = $value; + } + + if ( in_array( intval( $product_id ), array( 0, get_the_ID() ), true ) ) { + unset( $products[ $key ] ); + } + } + + $products = array_unique( $products ); + + return ! empty( $products ) ? array_combine( + range( 1, count( $products ) ), + array_values( $products ) + ) : false; +} +add_filter( 'edd_metabox_save__edd_bundled_products', 'edd_sanitize_bundled_products_save' ); + +/** + * Sanitize bundled products conditions on save + * + * @since 3.1 + * + * @param array $bundled_products_conditions Array of bundled products conditions. + * @return array + */ +function edd_sanitize_bundled_products_conditions_save( $bundled_products_conditions = array() ) { + return ! empty( $bundled_products_conditions ) ? array_combine( + range( 1, count( $bundled_products_conditions ) ), + array_values( $bundled_products_conditions ) + ) : false; +} +add_filter( 'edd_metabox_save__edd_bundled_products_conditions', 'edd_sanitize_bundled_products_conditions_save' ); + +/** + * Don't save blank rows. + * + * When saving, check the price and file table for blank rows. + * If the name of the price or file is empty, that row should not + * be saved. + * + * @since 1.2.2 + * @param array $updated_meta Array of all the meta values. + * @return array $new New meta value with empty keys removed + */ +function edd_metabox_save_check_blank_rows( $updated_meta ) { + foreach ( $updated_meta as $key => $value ) { + if ( empty( $value['name'] ) && empty( $value['amount'] ) && empty( $value['file'] ) ) { + unset( $updated_meta[ $key ] ); + } + } + + return $updated_meta; } -add_action( 'save_post', 'edd_download_meta_box_save' ); -/** Download Configuration *****************************************************************/ +/** Download Configuration ****************************************************/ /** * Download Metabox * * Extensions (as well as the core plugin) can add items to the main download - * configuration metabox via the `edd_meta_box_fields` action. + * configuration metabox via the `edd_meta_box_fields` action. * - * @access private - * @since 1.0 - * @return void + * @since 1.0 + * @return void */ function edd_render_download_meta_box() { - global $post, $edd_options; - - do_action( 'edd_meta_box_fields', $post->ID ); + $post_id = get_the_ID(); + + /* + * Output the price fields + * @since 1.9 + */ + do_action( 'edd_meta_box_price_fields', $post_id ); + + /* + * Output the price fields + * + * Left for backwards compatibility + * + */ + do_action( 'edd_meta_box_fields', $post_id ); + wp_nonce_field( basename( __FILE__ ), 'edd_download_meta_box_nonce' ); } /** - * Price section. + * Download Files Metabox + * + * @since 1.9 + * @return void + */ +function edd_render_files_meta_box() { + /* + * Output the files fields + * @since 1.9 + */ + do_action( 'edd_meta_box_files_fields', get_the_ID(), '' ); +} + +/** + * Download Settings Metabox + * + * @since 1.9 + * @return void + */ +function edd_render_settings_meta_box() { + /* + * Output the files fields + * @since 1.9 + */ + do_action( 'edd_meta_box_settings_fields', get_the_ID() ); +} + +/** + * Price Section * * If variable pricing is not enabled, simply output a single input box. * - * If variable pricing is enabled, outputs a table of all current prices. - * Extensions can add column heads to the table via the `edd_download_file_table_head` + * If variable pricing is enabled, outputs a table of all current prices. + * Extensions can add column heads to the table via the `edd_download_file_table_head` * hook, and actual columns via `edd_download_file_table_row` * - * @see edd_render_price_row() + * @since 1.0 * - * @access private - * @since 1.0 - * @return void + * @see edd_render_price_row() + * + * @param int $post_id Download (Post) ID. */ -function edd_render_price_field( $post_id) { - global $edd_options; +function edd_render_price_field( $post_id ) { + if ( is_numeric( $post_id ) && ! current_user_can( 'edit_product', $post_id ) ) { + return; + } - $price = edd_get_download_price( $post_id ); - $variable_pricing = edd_has_variable_prices( $post_id ); - $prices = edd_get_variable_prices( $post_id ); + if ( is_null( $post_id ) && ! current_user_can( 'edit_products' ) ) { + return; + } - $price_display = $variable_pricing ? ' style="display:none;"' : ''; - $variable_display = $variable_pricing ? '' : ' style="display:none;"'; -?> + $price = edd_get_download_price( $post_id ); + $variable_pricing = edd_has_variable_prices( $post_id ); + $prices = edd_get_variable_prices( $post_id ); + $single_option_mode = edd_single_price_option_mode( $post_id ); + $price_display = $variable_pricing ? ' style="display:none;"' : ''; + $variable_display = $variable_pricing ? '' : ' style="display:none;"'; + $currency_position = edd_get_option( 'currency_position', 'before' ); + ?>

    - +

    - -

    -

    +
    + /> + +
    +
    + +
    > + -

    +
    + 'edd_price', + 'id' => 'edd_price', + 'value' => isset( $price ) ? esc_attr( edd_format_amount( $price ) ) : '', + 'class' => 'edd-form-group__input edd-price-field', + ); + if ( 'before' === $currency_position ) { + ?> + + html->text( $price_args ); + } else { + echo EDD()->html->text( $price_args ); + ?> + + > - - - - - + do_action( 'edd_price_field', $post_id ); + ?> +
    + +
    > - -
    - - - - - - - - - - - $value ) : - $name = isset( $prices[ $key ]['name'] ) ? $prices[ $key ]['name'] : ''; - $amount = isset( $prices[ $key ]['amount'] ) ? $prices[ $key ]['amount'] : ''; - - $args = apply_filters( 'edd_price_row_args', compact( 'name', 'amount' ) ); +
    +
    + html->checkbox( + array( + 'name' => '_edd_price_options_mode', + 'current' => $single_option_mode, + 'class' => 'edd-form-group__input', + ) + ); + ?> +
    - - + + + +
    +
    + +
    $value ) : + $name = ( isset( $value['name'] ) && ! empty( $value['name'] ) ) ? $value['name'] : ''; + $index = ( isset( $value['index'] ) && '' !== $value['index'] ) ? $value['index'] : $key; + $amount = isset( $value['amount'] ) ? $value['amount'] : ''; + $args = apply_filters( 'edd_price_row_args', compact( 'name', 'amount' ), $value ); + ?> +
    + +
    + -
    - - + ?> +
    + +
    - - - - -
    - -
    +
    + +
    + +
    +
    -
    - + null, - 'amount' => null + 'amount' => null, ); $args = wp_parse_args( $args, $defaults ); - extract( $args, EXTR_SKIP ); -?> - - - - - - - - - - - - - - - - × - - +
    + + ' . esc_html( $key ) . '' + ); + ?> + + + %s', + __( 'Show advanced settings', 'easy-digital-downloads' ) + ); + } + + $actions['remove'] = sprintf( + /* translators: %1$s is the remove link, %2$s is the screen reader text. */ + '%1$s%2$s', + __( 'Remove', 'easy-digital-downloads' ), + sprintf( + /* translators: %s: price ID. */ + __( 'Remove price option %s', 'easy-digital-downloads' ), + esc_html( $key ) + ) + ); + ?> + + + +
    + +
    + +
    + +
    + html->text( + array( + 'name' => 'edd_variable_prices[' . $key . '][name]', + 'id' => 'edd_variable_prices-' . $key . '-name', + 'value' => esc_attr( $args['name'] ), + 'placeholder' => __( 'Option Name', 'easy-digital-downloads' ), + 'class' => 'edd_variable_prices_name large-text', + ) + ); + ?> +
    +
    + +
    + + 'edd_variable_prices[' . $key . '][amount]', + 'id' => 'edd_variable_prices-' . $key . '-amount', + 'value' => $args['amount'], + 'placeholder' => edd_format_amount( 9.99 ), + 'class' => 'edd-form-group__input edd-price-field', + ); + ?> + +
    + + + html->text( $price_args ); + } else { + echo EDD()->html->text( $price_args ); + ?> + + +
    +
    + +
    +
    + + ', + checked( $default_price_id, $key, false ), + 'edd_default_price_id_' . esc_attr( $key ), + esc_attr( $key ) + ); + ?> + + + +
    +
    + +
    + + + +
    +
    + +
    +
    + + +
    + +
    + html->select( + array( + 'options' => $types, + 'name' => '_edd_product_type', + 'id' => '_edd_product_type', + 'selected' => $type, + 'show_option_all' => false, + 'show_option_none' => false, + 'class' => 'edd-form-group__input', + ) + ); + ?> +
    +

    + +

    +
    + get_type(); + } + if ( 'bundle' !== $type ) { + return; + } + include 'views/metabox-bundled-products.php'; +} +add_action( 'edd_meta_box_files_fields', 'edd_render_products_field', 10, 2 ); /** * File Downloads section. * * Outputs a table of all current files. Extensions can add column heads to the table - * via the `edd_download_file_table_head` hook, and actual columns via + * via the `edd_download_file_table_head` hook, and actual columns via * `edd_download_file_table_row` * - * @see edd_render_file_row() - * - * @access private - * @since 1.0 - * @return void + * @since 1.0 + * @see edd_render_file_row() + * @param int $post_id Download (Post) ID. + * @param string $type The download type (used in ajax requests since 3.2.0). + * @return void */ -function edd_render_files_field( $post_id ) { - $files = edd_get_download_files( $post_id ); - $variable_pricing = edd_has_variable_prices( $post_id ); - $variable_display = $variable_pricing ? '' : 'display:none;'; -?> -
    +function edd_render_files_field( $post_id = 0, $type = '' ) { + if ( is_numeric( $post_id ) && ! current_user_can( 'edit_product', $post_id ) ) { + return; + } -

    - -

    + if ( is_null( $post_id ) && ! current_user_can( 'edit_products' ) ) { + return; + } - - -
    - - - - - - - - - - - - $value ) : - $name = isset( $files[ $key ]['name'] ) ? $files[ $key ]['name'] : ''; - $file = isset( $files[ $key ]['file'] ) ? $files[ $key ]['file'] : ''; - $condition = isset( $files[ $key ]['condition'] ) ? $files[ $key ]['condition'] : false; - - $args = apply_filters( 'edd_file_row_args', compact( 'name', 'file', 'condition' ) ); - ?> - - - - - - - - - - - - -
    - -
    -
    -
    - null, - 'file' => null, - 'condition' => null - ); +function edd_render_file_row( $key, $args, $post_id, $index ) { - $args = wp_parse_args( $args, $defaults ); - extract( $args, EXTR_SKIP ); - - $prices = edd_get_variable_prices( $post_id ); + $args = wp_parse_args( + $args, + array( + 'name' => null, + 'file' => null, + 'condition' => null, + 'attachment_id' => null, + 'thumbnail_size' => null, + ) + ); + $prices = edd_get_variable_prices( $post_id ); $variable_pricing = edd_has_variable_prices( $post_id ); $variable_display = $variable_pricing ? '' : ' style="display:none;"'; -?> - - - - - - - - - + $variable_class = $variable_pricing ? ' has-variable-pricing' : ''; + ?> + +
    + + ' . esc_html( $key ) . '' + ); + + printf( + '', + esc_attr( $key ), + esc_attr( $index ) + ); + ?> - - - > - - - - - - - × - - + + + + + + + +
    + +
    +
    + +
    + + + html->text( + array( + 'name' => 'edd_download_files[' . $key . '][name]', + 'id' => 'edd_download_files-' . $key . '-name', + 'value' => $args['name'], + 'placeholder' => __( 'My Neat File', 'easy-digital-downloads' ), + 'class' => 'edd-form-group__input edd_repeatable_name_field large-text', + ) + ); + ?> +
    +
    + +
    + +
    + html->text( + array( + 'name' => 'edd_download_files[' . $key . '][file]', + 'id' => 'edd_download_files-' . $key . '-file', + 'value' => $args['file'], + 'placeholder' => __( 'Enter, upload, choose from Media Library', 'easy-digital-downloads' ), + 'class' => 'edd-form-group__input edd_repeatable_upload_field edd_upload_field large-text', + ) + ); + ?> + + + + +
    +
    + +
    > + + +
    + $price ) { + $options[ $price_key ] = $prices[ $price_key ]['name']; + } + } + + echo EDD()->html->select( + array( + 'name' => 'edd_download_files[' . $key . '][condition]', + 'id' => 'edd_download_files-' . $key . '-condition', + 'class' => 'edd-form-group__input edd_repeatable_condition_field', + 'options' => $options, + 'selected' => $args['condition'], + 'show_option_none' => false, + ) + ); + ?> +
    +
    + + + +
    + -

    - -

    +function edd_download_media_strings( $strings ) { + global $post; -

    - -

    -post_type ) ) { + return $strings; + } + $downloads_object = get_post_type_object( 'download' ); + $labels = $downloads_object->labels; + + /* translators: %s: Download singular label, in lowercase form. */ + $strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'easy-digital-downloads' ), strtolower( $labels->singular_name ) ); + + return $strings; +} +add_filter( 'media_view_strings', 'edd_download_media_strings', 10, 1 ); /** - * Don't save blank rows. + * Refund Window * - * When saving, check the price and file table for blank rows. - * If the name of the price or file is empty, that row should not - * be saved. + * The refund window is the maximum number of days each + * can be downloaded by the buyer * - * @access private - * @since 1.2.2 - * @return array $new New meta value with empty keys removed + * @since 3.0 + * @param int $post_id Download (Post) ID. + * @return void */ -function edd_metabox_save_check_blank_rows( $new ) { - foreach ( $new as $key => $value ) { - if ( $value['name'] == '' ) - unset( $new[ $key ] ); +function edd_render_refund_row( $post_id ) { + + // Bail if user cannot manage shop settings. + if ( ! current_user_can( 'manage_shop_settings' ) ) { + return; } - return $new; + $types = edd_get_refundability_types(); + $global_ability = edd_get_option( 'refundability', 'refundable' ); + $global_window = edd_get_option( 'refund_window', 30 ); + $edd_refund_window = edd_get_download_refund_window( $post_id ); + ?> + +
    +
    + __( 'Refundable', 'easy-digital-downloads' ), + 'content' => __( 'Allow or disallow refunds for this specific product. When allowed, the refund window will be used on all future purchases.
    Refund Window: Limit the number of days this product can be refunded after purchasing.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +
    + +
    + + html->select( + array( + 'name' => '_edd_refundability', + 'id' => 'edd_refundability', + 'class' => 'edd-form-group__input', + 'options' => array_merge( + // Manually define a "none" option to set a blank value, vs. -1. + array( + '' => sprintf( + /* translators: %s: Default refund status */ + esc_html_x( 'Default (%s)', 'Download refund status', 'easy-digital-downloads' ), + $types[ $global_ability ], + ), + ), + $types + ), + // Use the direct meta value to avoid falling back to default. + 'selected' => get_post_meta( $post_id, '_edd_refundability', true ), + 'show_option_all' => '', + 'show_option_none' => false, + ) + ); + ?> +
    + +
    + + + +
    +

    + 0 for unlimited', 'easy-digital-downloads' ); ?> +

    +
    + +
    > +
    + + +
    +

    + 0 for unlimited', 'easy-digital-downloads' ); ?> +

    +
    + ID ); +function edd_render_down_tax_options( $post_id = 0 ) { + + // Bail if current user cannot view shop reports, or taxes are disabled. + if ( ! current_user_can( 'view_shop_reports' ) || ! edd_use_taxes() ) { + return; + } + + $exclusive = edd_download_is_tax_exclusive( $post_id ); + ?> + +
    +
    + __( 'Taxability', 'easy-digital-downloads' ), + 'content' => __( 'When taxes are enabled, all products are taxable by default. Check this box to mark this product as non-taxable.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +
    +
    + html->checkbox( + array( + 'name' => '_edd_download_tax_exclusive', + 'id' => '_edd_download_tax_exclusive', + 'current' => $exclusive, + 'class' => 'edd-form-group__input', + ) + ); + ?> + +
    +
    + - -

    - + +
    +
    + __( 'Item Quantities', 'easy-digital-downloads' ), + 'content' => __( 'If disabled, customers will not be provided an option to change the number they wish to purchase.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +
    +
    + html->checkbox( + array( + 'name' => '_edd_quantities_disabled', + 'id' => '_edd_quantities_disabled', + 'current' => $disabled, + 'class' => 'edd-form-group__input', + ) + ); + ?> + +
    +
    + + + +
    +
    + + +
    +
    + ID ); - $sales = edd_get_download_sales_stats( $post->ID ); - - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - do_action('edd_stats_meta_box'); - echo '
    ' . __( 'Sales:', 'edd' ) . ''; - echo $sales; - echo '
    ' . __( 'Earnings:', 'edd' ) . ''; - echo edd_currency_filter( $earnings ); - echo '
    '; +function edd_render_accounting_options( $post_id ) { + if ( ! current_user_can( 'edit_product', $post_id ) ) { + return; + } + + if ( ! edd_use_skus() ) { + return; + } + + $edd_sku = get_post_meta( $post_id, 'edd_sku', true ); + ?> + +
    +
    + __( 'SKU', 'easy-digital-downloads' ), + 'content' => __( 'If an SKU is entered for this product, it will be shown on the purchase receipt and exported purchase histories.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +
    +
    + + html->text( + array( + 'name' => 'edd_sku', + 'id' => 'edd_sku', + 'value' => $edd_sku, + 'class' => 'edd-form-group__input small-text', + ) + ); + ?> +
    +
    + ID); - - $per_page = 10; - - if( isset( $_GET['edd_sales_log_page'] ) ) { - $page = intval( $_GET['edd_sales_log_page'] ); - $offset = $per_page * ( $page - 1 ); - $sales_log = edd_get_download_sales_log( $post->ID, true, $per_page, $offset ); +function edd_render_disable_button( $post_id ) { + if ( ! current_user_can( 'edit_product', $post_id ) ) { + return; + } + + $supports_buy_now = edd_shop_supports_buy_now(); + $hide_button = get_post_meta( $post_id, '_edd_hide_purchase_link', true ) ? 1 : 0; + $behavior = get_post_meta( $post_id, '_edd_button_behavior', true ); + $content = __( 'By default, the purchase buttons will be displayed at the bottom of the download, when disabled you will need to use the Purchase link shortcode below to output the ability to buy the product where you prefer.', 'easy-digital-downloads' ); + $content .= '

    '; + if ( $supports_buy_now ) { + $content .= __( 'Purchase button behavior: Add to Cart buttons follow a traditional eCommerce flow. A Buy Now button bypasses most of the process, taking the customer directly from button click to payment, greatly speeding up the process of buying the product.', 'easy-digital-downloads' ); } else { - $page = 1; - $sales_log = edd_get_download_sales_log( $post->ID, false ); - } - - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - if( $sales_log['sales']) { - foreach( $sales_log['sales'] as $sale ) { - if( $sale['user_info']['id'] != 0) { - $user_data = get_userdata( $sale['user_info']['id'] ); - $name = $user_data->display_name; - } else { - $name = $sale['user_info']['first_name'] . ' ' . $sale['user_info']['last_name']; - } - echo ''; - - echo ''; - - echo ''; - - echo ''; - echo ''; - } // endforeach - do_action('edd_purchase_log_meta_box'); - } else { - echo ''; - echo ''; - echo ''; + $content .= __( 'Purchase button behavior: Add to Cart buttons follow a traditional eCommerce flow. Buy Now buttons are only available for stores that have a single supported gateway active and that do not use taxes.', 'easy-digital-downloads' ); + } + ?> + +
    +
    + __( 'Hide purchase buttons', 'easy-digital-downloads' ), + 'content' => $content, + ) + ); + $tooltip->output(); + ?> +
    +
    + html->checkbox( + array( + 'name' => '_edd_hide_purchase_link', + 'id' => '_edd_hide_purchase_link', + 'current' => $hide_button, + 'class' => 'edd-form-group__input', + ) + ); + ?> + +
    + +
    + + '_edd_button_behavior', + 'id' => 'edd_button_behavior', + 'selected' => $behavior, + 'options' => array( + 'add_to_cart' => __( 'Add to Cart', 'easy-digital-downloads' ), + 'direct' => __( 'Buy Now', 'easy-digital-downloads' ), + ), + 'show_option_all' => null, + 'show_option_none' => null, + 'class' => 'edd-form-group__input', + ); + echo EDD()->html->select( $args ); + ?> +
    + '; - - $total_log_entries = $sales_log['number']; - $total_pages = ceil( $total_log_entries / $per_page ); - - if ( $total_pages > 1) : - echo '
    '; - echo '
    '; - $base = 'post.php?post=' . $post->ID . '&action=edit%_%'; - echo paginate_links( array( - 'base' => $base, - 'format' => '&edd_sales_log_page=%#%', - 'prev_text' => '« ' . __( 'Previous', 'edd' ), - 'next_text' => __( 'Next', 'edd' ) . ' »', - 'total' => $total_pages, - 'current' => $page, - 'end_size' => 1, - 'mid_size' => 5, - 'add_fragment' => '#edd_purchase_log' - )); - echo '
    '; - echo '
    '; - endif; - + ?> +
    + + ID, true, $per_page, $offset ); - } else { - $page = 1; - $download_log = edd_get_file_download_log( $post->ID, true ); - } - - $files = edd_get_download_files( $post->ID ); - - echo '
    ' . __( 'Sales Log', 'edd' ) . ''; - _e('Each sale for this download is listed below.', 'edd' ); - echo '
    '; - echo '' . __( 'Date:', 'edd' ) . ' ' . $sale['date']; - echo ''; - echo '' . __( 'Buyer:', 'edd' ) . ' ' . $name; - echo ''; - echo '' . __( 'Purchase ID:', 'edd' ) . ' ' . $sale['payment_id'] . ''; - echo '
    '; - echo __( 'No sales yet', 'edd' ); - echo '
    '; - echo ''; - echo ''; - echo ''; - echo ''; - if( $download_log) { - foreach( $download_log['downloads'] as $file_download ) { - $user_id = isset( $file_download['user_info']['id']) ? $file_download['user_info']['id'] : 0; - $user_data = get_userdata( $user_id ); - if( $user_data ) { - $name = $user_data->display_name; - } else { - $name = $file_download['user_info']['email']; - } - $file_name = $files[$file_download['file_id']]['name']; - - echo ''; - - echo ''; - - echo ''; - - echo ''; - - echo ''; - - echo ''; - do_action('edd_download_log__meta_box'); - } // endforeach - } else { - echo ''; - echo ''; - echo ''; - } - echo '
    ' . __( 'Download Log', 'edd' ) . ''; - _e('Each time a file is downloaded, it is recorded below.', 'edd' ); - echo '
    '; - echo '' . __( 'Date:', 'edd' ) . ' ' . $file_download['date']; - echo ''; - echo '' . __( 'Downloaded by:', 'edd' ) . ' ' . $name; - echo ''; - echo '' . __( 'IP Address:', 'edd' ) . ' ' . $file_download['ip']; - echo ''; - echo '' . __( 'File: ', 'edd' ) . ' ' . $file_name; - echo '
    '; - echo __( 'No file downloads yet yet', 'edd' ); - echo '
    '; - - $total_log_entries = $download_log['number']; - $total_pages = ceil( $total_log_entries / $per_page ); - - if ( $total_pages > 1) : - echo '
    '; - echo '
    '; - $base = 'post.php?post=' . $post->ID . '&action=edit%_%'; - echo paginate_links( array( - 'base' => $base, - 'format' => '&edd_log_page=%#%', - 'prev_text' => '« ' . __( 'Previous', 'edd' ), - 'next_text' => __( 'Next', 'edd' ) . ' »', - 'total' => $total_pages, - 'current' => $page, - 'end_size' => 1, - 'mid_size' => 5, - 'add_fragment' => '#edd_file_download_log' - )); - echo '
    '; - echo '
    '; - endif; -} \ No newline at end of file +function edd_render_product_notes_meta_box() { + do_action( 'edd_product_notes_meta_box_fields', get_the_ID() ); +} + +/** + * Render Product Notes Field + * + * @since 1.2.1 + * @param int $post_id Download (Post) ID. + * @return void + */ +function edd_render_product_notes_field( $post_id ) { + // Check if the user can edit this specific download ID (post ID). + if ( ! current_user_can( 'edit_product', $post_id ) ) { + return; + } + + $product_notes = edd_get_product_notes( $post_id ); + ?> +
    +
    + + +
    +

    + +

    +
    + 'edd-payment-history', + 'product-id' => urlencode( $post_id ), + ), + edd_get_admin_base_url() + ); + + $earnings_report_url = edd_get_admin_url( + array( + 'page' => 'edd-reports', + 'view' => 'downloads', + 'products' => absint( $post_id ), + ) + ); + ?> + +

    + + +

    + +

    + + + + + + +

    + +
    + +

    + 'edd-tools', + 'view' => 'file_downloads', + 'tab' => 'logs', + 'download' => absint( $post_id ), + ) + ); + ?> + + + + + +
    +

    + get_bundled_downloads(); +$variable_pricing = $download->has_variable_prices(); +$variable_display = $variable_pricing ? '' : 'display:none;'; +$variable_class = $variable_pricing ? ' has-variable-pricing' : ''; +$prices = $download->get_prices(); +$bundle_options = EDD()->html->get_products( + array( + 'bundles' => false, + ) +); +?> + +
    +
    +
    + + + +
    + + + +
    + + +
    + + + $product ) : ?> +
    +
    +
    + + + +
    +
    + + +
    + html->product_dropdown( + array( + 'name' => '_edd_bundled_products[' . $index . ']', + 'id' => 'edd_bundled_products_' . esc_attr( $index ), + 'selected' => $product, + 'multiple' => false, + 'chosen' => true, + 'products' => $bundle_options, + 'variations' => true, + 'show_variations_only' => false, + 'class' => 'edd-form-group__input', + 'bundles' => false, + 'exclude_current' => true, + ) + ); + ?> +
    +
    +
    + +
    + $price ) { + $options[ $price_key ] = $prices[ $price_key ]['name']; + } + } + + $price_assignments = edd_get_bundle_pricing_variations( $post_id ); + if ( ! empty( $price_assignments[0] ) ) { + $price_assignments = $price_assignments[0]; + } + + $selected = isset( $price_assignments[ $index ] ) ? $price_assignments[ $index ] : null; + + echo EDD()->html->select( + array( + 'name' => '_edd_bundled_products_conditions[' . $index . ']', + 'id' => 'edd_bundled_products_conditions_'. esc_attr( $index ), + 'class' => 'edd_repeatable_condition_field', + 'options' => $options, + 'show_option_none' => false, + 'selected' => $selected, + ) + ); + ?> +
    +
    +
    + + +
    + +
    +
    + + + + + +
    + + +
    +
    +
    + +
    + + + +
    +
    + + +
    + html->product_dropdown( array( + 'name' => '_edd_bundled_products[1]', + 'id' => 'edd_bundled_products_1', + 'multiple' => false, + 'chosen' => true, + 'products' => $bundle_options, + 'variations' => true, + 'show_variations_only' => false, + 'bundles' => false, + 'exclude_current' => true, + ) ); + ?> +
    +
    +
    + +
    + $price ) { + $options[ $price_key ] = $prices[ $price_key ]['name']; + } + } + + $price_assignments = edd_get_bundle_pricing_variations( $post_id ); + + echo EDD()->html->select( + array( + 'name' => '_edd_bundled_products_conditions[1]', + 'id' => 'edd_bundled_products_conditions_1', + 'class' => 'edd-form-group__input edd_repeatable_condition_field', + 'options' => $options, + 'show_option_none' => false, + 'selected' => null, + ) + ); + ?> +
    +
    +
    + +
    + +
    +
    + + + +
    + +
    + +
    +
    +
    +
    diff --git a/includes/admin/downloads/views/metabox-files.php b/includes/admin/downloads/views/metabox-files.php new file mode 100644 index 00000000000..9deabbb019d --- /dev/null +++ b/includes/admin/downloads/views/metabox-files.php @@ -0,0 +1,49 @@ + + +
    +
    +
    + +
    + $value ) : + $index = isset( $value['index'] ) ? $value['index'] : $key; + $name = isset( $value['name'] ) ? $value['name'] : ''; + $file = isset( $value['file'] ) ? $value['file'] : ''; + $condition = isset( $value['condition'] ) ? $value['condition'] : false; + $thumbnail_size = isset( $value['thumbnail_size'] ) ? $value['thumbnail_size'] : ''; + $attachment_id = isset( $value['attachment_id'] ) ? absint( $value['attachment_id'] ) : false; + + $args = apply_filters( 'edd_file_row_args', compact( 'name', 'file', 'condition', 'attachment_id', 'thumbnail_size' ), $value ); ?> + +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
    +
    +
    +
    diff --git a/includes/admin/emails/email-summary/class-edd-email-summary-admin.php b/includes/admin/emails/email-summary/class-edd-email-summary-admin.php new file mode 100644 index 00000000000..1381a8baa66 --- /dev/null +++ b/includes/admin/emails/email-summary/class-edd-email-summary-admin.php @@ -0,0 +1,99 @@ + 'error', + 'message' => __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), + ) + ); + } + + add_action( 'wp_mail_failed', array( $this, 'mail_failed' ) ); + + $output = array( + 'status' => 'success', + 'message' => __( 'The test Email Summary was sent successfully!', 'easy-digital-downloads' ), + ); + $email = new EDD_Email_Summary( true ); + $email_status = $email->send_email(); + if ( ! $email_status ) { + $output['status'] = 'error'; + + // Generic error. + $output['message'] = __( 'There was an unknown problem while sending test Email Summary!', 'easy-digital-downloads' ); + + // SMTP error. + if ( $this->mail_smtp_error ) { + $output['message'] = $this->mail_smtp_error; + } + } + + echo wp_json_encode( $output ); + edd_die(); + } + + /** + * Get error message from failed SMTP. + * + * @since 3.1 + * + * @param \WP_Error $error The WP Error thrown in WP core: `wp_mail_failed` hook. + */ + public function mail_failed( $error ) { + if ( ! is_wp_error( $error ) ) { + return; + } + + $this->mail_smtp_error = $error->get_error_message(); + } + +} diff --git a/includes/admin/export-functions.php b/includes/admin/export-functions.php deleted file mode 100644 index 77209a7b302..00000000000 --- a/includes/admin/export-functions.php +++ /dev/null @@ -1,172 +0,0 @@ - 0, - 'number' => -1, - 'mode' => $mode, - 'orderby' => $orderby, - 'order' => $order, - 'user' => $user, - 'status' => $status - ) ); - if($payments){ - $i = 0; - echo '"' . __('ID', 'edd') . '",'; - echo '"' . __('Email', 'edd') . '",'; - echo '"' . __('First Name', 'edd') . '",'; - echo '"' . __('Last Name', 'edd') . '",'; - echo '"' . __('Products', 'edd') . '",'; - echo '"' . __('Discounts,', 'edd') . '",'; - echo '"' . __('Amount paid', 'edd') . '",'; - echo '"' . __('Payment method', 'edd') . '",'; - echo '"' . __('Key', 'edd') . '",'; - echo '"' . __('Date', 'edd') . '",'; - echo '"' . __('User', 'edd') . '",'; - echo '"' . __('Status', 'edd') . '"'; - echo "\r\n"; - foreach($payments as $payment){ - - $payment_meta = edd_get_payment_meta( $payment->ID ); - $user_info = maybe_unserialize($payment_meta['user_info']); - - echo '"' . $payment->ID . '",'; - echo '"' . $payment_meta['email'] . '",'; - echo '"' . $user_info['first_name'] . '",'; - echo '"' . $user_info['last_name']. '",'; - $downloads = isset($payment_meta['cart_details']) ? maybe_unserialize($payment_meta['cart_details']) : false; - if (empty($downloads ) || !$downloads ) { - $downloads = maybe_unserialize($payment_meta['downloads']); - } - - if ($downloads) { - - foreach($downloads as $key => $download) { - - // retrieve the ID of the download - $id = isset($payment_meta['cart_details']) ? $download['id'] : $download; - - // if download has variable prices, override the default price - $price_override = isset($payment_meta['cart_details']) ? $download['price'] : null; - - $user_info = unserialize($payment_meta['user_info']); - - // calculate the final price - $price = edd_get_download_final_price($id, $user_info, $price_override); - - // show name of download - echo get_the_title($id); - - echo ' - '; - - if (isset($downloads[$key]['item_number'])) { - - $price_options = $downloads[$key]['item_number']['options']; - - if (isset($price_options['price_id']) ) { - echo edd_get_price_option_name($id, $price_options['price_id']); - echo ' - '; - } - } - echo html_entity_decode( edd_currency_filter($price) ); - - if( $key != ( count( $downloads ) -1 ) ) { - echo ' / '; - } - - } - - echo ','; - - } - - if (isset($user_info['discount']) && $user_info['discount'] != 'none') { - echo '"' . $user_info['discount'] . '",'; - } else { - - echo '"' . __('none', 'edd') . '",'; - } - echo '"' . html_entity_decode( edd_currency_filter($payment_meta['amount']) ) . '",'; - - $gateway = get_post_meta($payment->ID, '_edd_payment_gateway', true); - if ($gateway) { - echo '"' . edd_get_gateway_admin_label($gateway) . '",'; - } else { - echo '"' . __('none', 'edd') . '",'; - } - echo '"' . $payment_meta['key'] . '",'; - echo '"' . date(get_option('date_format'), strtotime($payment->post_date)) . '",'; - - $user_id = isset($user_info['id']) && $user_info['id'] != -1 ? $user_info['id'] : $user_info['email']; - - echo '"'; - echo is_numeric($user_id) ? get_user_by('id', $user_id)->display_name : __('guest', 'edd'); - echo '",'; - echo '"' . edd_get_payment_status($payment, true) . '"'; - echo "\r\n"; - - $i++; - } - } else { - echo __('No payments recorded yet', 'edd'); - } - } - die(); -} -add_action('admin_init', 'edd_export_payment_history'); - - -/** - * Export all customers to CSV - * - * Using wpdb directly for performance reasons (workaround of calling all posts and fetch data respectively) - * - * @access private - * @since 1.2 - * @return void -*/ -function edd_export_all_customers() { - if( current_user_can( 'administrator' ) ) { - global $wpdb; - - $emails = $wpdb->get_col("SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = '_edd_payment_user_email' "); - - if( ! empty( $emails ) ) { - header("Content-type: text/csv"); - $today = date("Y-m-d"); - header("Content-Disposition: attachment; filename=user_emails-$today.csv"); - header("Pragma: no-cache"); - header("Expires: 0"); - - echo implode( "\n", $emails ); - exit; - } - } else { - wp_die(__( 'Export not allowed for non-administrators.', 'edd' ) ); - } -} -add_action( 'edd_email_export', 'edd_export_all_customers' ); diff --git a/includes/admin/import/class-batch-import-downloads.php b/includes/admin/import/class-batch-import-downloads.php new file mode 100644 index 00000000000..ac5c0bc980f --- /dev/null +++ b/includes/admin/import/class-batch-import-downloads.php @@ -0,0 +1,550 @@ +field_mapping = array( + 'post_title' => '', + 'post_name' => '', + 'post_status' => 'draft', + 'post_author' => '', + 'post_date' => '', + 'post_content' => '', + 'post_excerpt' => '', + 'price' => '', + 'files' => '', + 'categories' => '', + 'tags' => '', + 'sku' => '', + 'earnings' => '', + 'sales' => '', + 'featured_image' => '', + 'download_limit' => '', + 'notes' => '', + ); + } + + /** + * Process a step + * + * @since 2.6 + * @return bool + */ + public function process_step() { + + $more = false; + + if ( ! $this->can_import() ) { + wp_die( __( 'You do not have permission to import data.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $i = 1; + $offset = $this->step > 1 ? ( $this->per_step * ( $this->step - 1 ) ) : 0; + + if ( $offset > $this->total ) { + $this->done = true; + + // Delete the uploaded CSV file. + unlink( $this->file ); + } + + if ( ! $this->done && $this->csv ) { + + $more = true; + + foreach ( $this->csv as $key => $row ) { + + // Skip all rows until we pass our offset. + if ( $key + 1 <= $offset ) { + continue; + } + + // Done with this batch. + if ( $i > $this->per_step ) { + break; + } + + // Import Download. + $args = array( + 'post_type' => 'download', + 'post_title' => '', + 'post_name' => '', + 'post_status' => '', + 'post_author' => '', + 'post_date' => '', + 'post_content' => '', + 'post_excerpt' => '', + ); + + foreach ( $args as $key => $field ) { + if ( ! empty( $this->field_mapping[ $key ] ) && ! empty( $row[ $this->field_mapping[ $key ] ] ) ) { + $args[ $key ] = $row[ $this->field_mapping[ $key ] ]; + } + } + + if ( empty( $args['post_author'] ) ) { + $user = wp_get_current_user(); + $args['post_author'] = $user->ID; + } else { + + // Check all forms of possible user inputs, email, ID, login. + if ( is_email( $args['post_author'] ) ) { + $user = get_user_by( 'email', $args['post_author'] ); + } elseif ( is_numeric( $args['post_author'] ) ) { + $user = get_user_by( 'ID', $args['post_author'] ); + } else { + $user = get_user_by( 'login', $args['post_author'] ); + } + + // If we don't find one, resort to the logged in user. + if ( false === $user ) { + $user = wp_get_current_user(); + } + + $args['post_author'] = $user->ID; + } + + // Format the date properly. + if ( ! empty( $args['post_date'] ) ) { + + $timestamp = strtotime( $args['post_date'], current_time( 'timestamp' ) ); + $date = date( 'Y-m-d H:i:s', $timestamp ); + + // If the date provided results in a date string, use it, or just default to today so it imports. + if ( ! empty( $date ) ) { + $args['post_date'] = $date; + } else { + $date = ''; + } + } + + // Detect any status that could map to `publish`. + if ( ! empty( $args['post_status'] ) ) { + + $published_statuses = array( + 'live', + 'published', + ); + + $current_status = strtolower( $args['post_status'] ); + + if ( in_array( $current_status, $published_statuses ) ) { + $args['post_status'] = 'publish'; + } + } + + $download_id = wp_insert_post( $args ); + + // setup categories. + if ( ! empty( $this->field_mapping['categories'] ) && ! empty( $row[ $this->field_mapping['categories'] ] ) ) { + + $categories = $this->str_to_array( $row[ $this->field_mapping['categories'] ] ); + + $this->set_taxonomy_terms( $download_id, $categories, 'download_category' ); + + } + + // setup tags. + if ( ! empty( $this->field_mapping['tags'] ) && ! empty( $row[ $this->field_mapping['tags'] ] ) ) { + + $tags = $this->str_to_array( $row[ $this->field_mapping['tags'] ] ); + + $this->set_taxonomy_terms( $download_id, $tags, 'download_tag' ); + + } + + // setup price(s). + if ( ! empty( $this->field_mapping['price'] ) && ! empty( $row[ $this->field_mapping['price'] ] ) ) { + + $price = $row[ $this->field_mapping['price'] ]; + + $this->set_price( $download_id, $price ); + + } + + // setup files. + if ( ! empty( $this->field_mapping['files'] ) && ! empty( $row[ $this->field_mapping['files'] ] ) ) { + + $files = $this->convert_file_string_to_array( $row[ $this->field_mapping['files'] ] ); + + $this->set_files( $download_id, $files ); + + } + + // Product Image. + if ( ! empty( $this->field_mapping['featured_image'] ) && ! empty( $row[ $this->field_mapping['featured_image'] ] ) ) { + + $image = sanitize_text_field( $row[ $this->field_mapping['featured_image'] ] ); + + $this->set_image( $download_id, $image, $args['post_author'] ); + + } + + // File download limit. + if ( ! empty( $this->field_mapping['download_limit'] ) && ! empty( $row[ $this->field_mapping['download_limit'] ] ) ) { + + update_post_meta( $download_id, '_edd_download_limit', absint( $row[ $this->field_mapping['download_limit'] ] ) ); + } + + // Sale count. + if ( ! empty( $this->field_mapping['sales'] ) && ! empty( $row[ $this->field_mapping['sales'] ] ) ) { + + update_post_meta( $download_id, '_edd_download_sales', absint( $row[ $this->field_mapping['sales'] ] ) ); + } + + // Earnings. + if ( ! empty( $this->field_mapping['earnings'] ) && ! empty( $row[ $this->field_mapping['earnings'] ] ) ) { + + update_post_meta( $download_id, '_edd_download_earnings', edd_sanitize_amount( $row[ $this->field_mapping['earnings'] ] ) ); + } + + // Notes. + if ( ! empty( $this->field_mapping['notes'] ) && ! empty( $row[ $this->field_mapping['notes'] ] ) ) { + + update_post_meta( $download_id, 'edd_product_notes', sanitize_text_field( $row[ $this->field_mapping['notes'] ] ) ); + } + + // SKU. + if ( ! empty( $this->field_mapping['sku'] ) && ! empty( $row[ $this->field_mapping['sku'] ] ) ) { + + update_post_meta( $download_id, 'edd_sku', sanitize_text_field( $row[ $this->field_mapping['sku'] ] ) ); + } + + // Custom fields. + + ++$i; + } + } + + return $more; + } + + /** + * Return the calculated completion percentage + * + * @since 2.6 + * @return int + */ + public function get_percentage_complete() { + + $percentage = 0; + if ( $this->total > 0 ) { + $percentage = ( $this->step * $this->per_step / $this->total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set up and store the price for the download + * + * @since 2.6 + * @return void + */ + private function set_price( $download_id = 0, $price = '' ) { + + if ( is_numeric( $price ) ) { + + update_post_meta( $download_id, 'edd_price', edd_sanitize_amount( $price ) ); + + } else { + + $prices = $this->str_to_array( $price ); + + if ( ! empty( $prices ) ) { + + $variable_prices = array(); + $price_id = 1; + foreach ( $prices as $price ) { + + // See if this matches the EDD Download export for variable prices. + if ( false !== strpos( $price, ':' ) ) { + + $price = array_map( 'trim', explode( ':', $price ) ); + + $variable_prices[ $price_id ] = array( + 'name' => $price[0], + 'amount' => $price[1], + ); + ++$price_id; + + } + } + + update_post_meta( $download_id, '_variable_pricing', 1 ); + update_post_meta( $download_id, 'edd_variable_prices', $variable_prices ); + + } + } + } + + /** + * Set up and store the file downloads + * + * @since 2.6 + * @return void + */ + private function set_files( $download_id = 0, $files = array() ) { + + if ( ! empty( $files ) ) { + + $download_files = array(); + $file_id = 1; + foreach ( $files as $file ) { + + $condition = ''; + + if ( false !== strpos( $file, ';' ) ) { + + $split_on = strpos( $file, ';' ); + $file_url = substr( $file, 0, $split_on ); + $condition = substr( $file, $split_on + 1 ); + + } else { + + $file_url = $file; + + } + + $download_file_args = array( + 'index' => $file_id, + 'file' => $file_url, + 'name' => basename( $file_url ), + 'condition' => empty( $condition ) ? 'all' : $condition, + ); + + $download_files[ $file_id ] = $download_file_args; + ++$file_id; + + } + + update_post_meta( $download_id, 'edd_download_files', $download_files ); + + } + } + + /** + * Set up and store the Featured Image + * + * @since 2.6 + * @return bool + */ + private function set_image( $download_id = 0, $image = '', $post_author = 0 ) { + + $is_url = false !== filter_var( $image, FILTER_VALIDATE_URL ); + $is_local = $is_url && false !== strpos( $image, site_url() ); + $ext = edd_get_file_extension( $image ); + + if ( $is_url && $is_local ) { + + // Image given by URL, see if we have an attachment already. + $attachment_id = attachment_url_to_postid( $image ); + + } elseif ( $is_url ) { + + if ( ! function_exists( 'media_sideload_image' ) ) { + + require_once ABSPATH . 'wp-admin/includes/file.php'; + + } + + // Image given by external URL. + $url = media_sideload_image( $image, $download_id, '', 'src' ); + + if ( ! is_wp_error( $url ) ) { + + $attachment_id = attachment_url_to_postid( $url ); + + } + } elseif ( false === strpos( $image, '/' ) && edd_get_file_extension( $image ) ) { + + // Image given by name only. + + $upload_dir = wp_upload_dir(); + + if ( FileSystem::file_exists( trailingslashit( $upload_dir['path'] ) . $image ) ) { + + // Look in current upload directory first. + $file = trailingslashit( $upload_dir['path'] ) . $image; + + } else { + + // Now look through year/month sub folders of upload directory for files with our image's same extension. + $files = glob( $upload_dir['basedir'] . '/*/*/*' . $ext ); + foreach ( $files as $file ) { + + if ( basename( $file ) == $image ) { + + // Found our file. + break; + + } + + // Make sure $file is unset so our empty check below does not return a false positive. + unset( $file ); + + } + } + + if ( ! empty( $file ) ) { + + // We found the file, let's see if it already exists in the media library. + $guid = str_replace( $upload_dir['basedir'], $upload_dir['baseurl'], $file ); + $attachment_id = attachment_url_to_postid( $guid ); + + if ( empty( $attachment_id ) ) { + + // Doesn't exist in the media library, let's add it. + + $filetype = wp_check_filetype( basename( $file ), null ); + + // Prepare an array of post data for the attachment. + $attachment = array( + 'guid' => $guid, + 'post_mime_type' => $filetype['type'], + 'post_title' => preg_replace( '/\.[^.]+$/', '', $image ), + 'post_content' => '', + 'post_status' => 'inherit', + 'post_author' => $post_author, + ); + + // Insert the attachment. + $attachment_id = wp_insert_attachment( $attachment, $file, $download_id ); + + // Make sure that this file is included, as wp_generate_attachment_metadata() depends on it. + require_once ABSPATH . 'wp-admin/includes/image.php'; + + // Generate the metadata for the attachment, and update the database record. + $attach_data = wp_generate_attachment_metadata( $attachment_id, $file ); + wp_update_attachment_metadata( $attachment_id, $attach_data ); + + } + } + } + + if ( ! empty( $attachment_id ) ) { + + return set_post_thumbnail( $download_id, $attachment_id ); + + } + + return false; + } + + /** + * Set up and taxonomy terms + * + * @since 2.6 + * @return void + */ + private function set_taxonomy_terms( $download_id = 0, $terms = array(), $taxonomy = 'download_category' ) { + + $terms = $this->maybe_create_terms( $terms, $taxonomy ); + + if ( ! empty( $terms ) ) { + + wp_set_object_terms( $download_id, $terms, $taxonomy ); + + } + } + + /** + * Locate term IDs or create terms if none are found + * + * @since 2.6 + * @return array + */ + private function maybe_create_terms( $terms = array(), $taxonomy = 'download_category' ) { + + // Return of term IDs. + $term_ids = array(); + + foreach ( $terms as $term ) { + + if ( is_numeric( $term ) && 0 === (int) $term ) { + + $t = get_term( $term, $taxonomy ); + + } else { + + $t = get_term_by( 'name', $term, $taxonomy ); + + if ( ! $t ) { + + $t = get_term_by( 'slug', $term, $taxonomy ); + + } + } + + if ( ! empty( $t ) ) { + + $term_ids[] = $t->term_id; + + } else { + + $term_data = wp_insert_term( $term, $taxonomy, array( 'slug' => sanitize_title( $term ) ) ); + + if ( ! is_wp_error( $term_data ) ) { + + $term_ids[] = $term_data['term_id']; + + } + } + } + + return array_map( 'absint', $term_ids ); + } + + /** + * Retrieve URL to Downloads list table + * + * @since 2.6 + * @return string + */ + public function get_list_table_url() { + return edd_get_admin_base_url(); + } + + /** + * Retrieve Download label + * + * @since 2.6 + * @return string + */ + public function get_import_type_label() { + return edd_get_label_plural( true ); + } +} diff --git a/includes/admin/import/class-batch-import-payments.php b/includes/admin/import/class-batch-import-payments.php new file mode 100644 index 00000000000..f91fd34dd08 --- /dev/null +++ b/includes/admin/import/class-batch-import-payments.php @@ -0,0 +1,650 @@ +per_step = 5; + + // Set up default field map values + $this->field_mapping = array( + 'total' => '', + 'subtotal' => '', + 'tax' => 'draft', + 'number' => '', + 'mode' => '', + 'gateway' => '', + 'date' => '', + 'status' => '', + 'email' => '', + 'name' => '', + 'first_name' => '', + 'last_name' => '', + 'edd_customer_id' => '', + 'user_id' => '', + 'discounts' => '', + 'key' => '', + 'transaction_id' => '', + 'ip' => '', + 'currency' => '', + 'parent_payment_id' => '', + 'downloads' => '', + 'line1' => '', + 'line2' => '', + 'city' => '', + 'state' => '', + 'zip' => '', + 'country' => '', + ); + } + + /** + * Process a step + * + * @since 2.6 + * @return bool + */ + public function process_step() { + + $more = false; + + if ( ! $this->can_import() ) { + wp_die( __( 'You do not have permission to import data.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $i = 1; + $offset = $this->step > 1 ? ( $this->per_step * ( $this->step - 1 ) ) : 0; + + if( $offset > $this->total ) { + $this->done = true; + + // Clean up the temporary records in the payment import process + global $wpdb; + $sql = "DELETE FROM {$wpdb->prefix}edd_customermeta WHERE meta_key = '_canonical_import_id'"; + $wpdb->query( $sql ); + + // Delete the uploaded CSV file. + unlink( $this->file ); + } + + if( ! $this->done && $this->csv ) { + + $more = true; + + foreach( $this->csv as $key => $row ) { + + // Skip all rows until we pass our offset + if( $key + 1 <= $offset ) { + continue; + } + + // Done with this batch + if( $i > $this->per_step ) { + break; + } + + // Import payment + $this->create_payment( $row ); + + $i++; + } + + } + + return $more; + } + + /** + * Set up and store a payment record from a CSV row + * + * @since 2.6 + * @return void + */ + public function create_payment( $row = array() ) { + + $payment = new EDD_Payment; + $payment->status = 'pending'; + + if( ! empty( $this->field_mapping['number'] ) && ! empty( $row[ $this->field_mapping['number'] ] ) ) { + + $payment->number = sanitize_text_field( $row[ $this->field_mapping['number'] ] ); + + } + + if( ! empty( $this->field_mapping['mode'] ) && ! empty( $row[ $this->field_mapping['mode'] ] ) ) { + + $mode = strtolower( sanitize_text_field( $row[ $this->field_mapping['mode'] ] ) ); + $mode = 'test' != $mode && 'live' != $mode ? false : $mode; + if( ! $mode ) { + $mode = edd_is_test_mode() ? 'test' : 'live'; + } + + $payment->mode = $mode; + + } + + if( ! empty( $this->field_mapping['date'] ) && ! empty( $row[ $this->field_mapping['date'] ] ) ) { + + $date = sanitize_text_field( $row[ $this->field_mapping['date'] ] ); + + if( ! strtotime( $date ) ) { + + $date = date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ); + + } else { + + $date = date( 'Y-m-d H:i:s', strtotime( $date ) ); + + } + + $payment->date = $date; + + } + + $payment->customer_id = $this->set_customer( $row ); + + if( ! empty( $this->field_mapping['email'] ) && ! empty( $row[ $this->field_mapping['email'] ] ) ) { + + $payment->email = sanitize_text_field( $row[ $this->field_mapping['email'] ] ); + + } + + if ( ! empty( $this->field_mapping['name'] ) && ! empty( $row[ $this->field_mapping['name'] ] ) ) { + + $payment->name = sanitize_text_field( $row[ $this->field_mapping['name'] ] ); + + } else { + + if ( ! empty( $this->field_mapping['first_name'] ) && ! empty( $row[ $this->field_mapping['first_name'] ] ) ) { + + $payment->first_name = sanitize_text_field( $row[ $this->field_mapping['first_name'] ] ); + + } + + if ( ! empty( $this->field_mapping['last_name'] ) && ! empty( $row[ $this->field_mapping['last_name'] ] ) ) { + + $payment->last_name = sanitize_text_field( $row[ $this->field_mapping['last_name'] ] ); + + } + } + + if( ! empty( $this->field_mapping['user_id'] ) && ! empty( $row[ $this->field_mapping['user_id'] ] ) ) { + + $user_id = sanitize_text_field( $row[ $this->field_mapping['user_id'] ] ); + + if( is_numeric( $user_id ) ) { + + $user_id = absint( $row[ $this->field_mapping['user_id'] ] ); + $user = get_userdata( $user_id ); + + } elseif( is_email( $user_id ) ) { + + $user = get_user_by( 'email', $user_id ); + + } else { + + $user = get_user_by( 'login', $user_id ); + + } + + if( $user ) { + + $payment->user_id = $user->ID; + + $customer = new EDD_Customer( $payment->customer_id ); + + if( empty( $customer->user_id ) ) { + $customer->update( array( 'user_id' => $user->ID ) ); + } + + } + + } + + if( ! empty( $this->field_mapping['discounts'] ) && ! empty( $row[ $this->field_mapping['discounts'] ] ) ) { + + $payment->discounts = sanitize_text_field( $row[ $this->field_mapping['discounts'] ] ); + + } + + if( ! empty( $this->field_mapping['transaction_id'] ) && ! empty( $row[ $this->field_mapping['transaction_id'] ] ) ) { + + $payment->transaction_id = sanitize_text_field( $row[ $this->field_mapping['transaction_id'] ] ); + + } + + if( ! empty( $this->field_mapping['ip'] ) && ! empty( $row[ $this->field_mapping['ip'] ] ) ) { + + $payment->ip = sanitize_text_field( $row[ $this->field_mapping['ip'] ] ); + + } + + if( ! empty( $this->field_mapping['gateway'] ) && ! empty( $row[ $this->field_mapping['gateway'] ] ) ) { + + $gateways = edd_get_payment_gateways(); + $gateway = strtolower( sanitize_text_field( $row[ $this->field_mapping['gateway'] ] ) ); + + if( ! array_key_exists( $gateway, $gateways ) ) { + + foreach( $gateways as $key => $enabled_gateway ) { + + if( $enabled_gateway['checkout_label'] == $gateway ) { + + $gateway = $key; + break; + + } + + } + + } + + $payment->gateway = $gateway; + + } + + if( ! empty( $this->field_mapping['currency'] ) && ! empty( $row[ $this->field_mapping['currency'] ] ) ) { + + $payment->currency = strtoupper( sanitize_text_field( $row[ $this->field_mapping['currency'] ] ) ); + + } + + if( ! empty( $this->field_mapping['key'] ) && ! empty( $row[ $this->field_mapping['key'] ] ) ) { + + $payment->key = sanitize_text_field( $row[ $this->field_mapping['key'] ] ); + + } + + if( ! empty( $this->field_mapping['parent_payment_id'] ) && ! empty( $row[ $this->field_mapping['parent_payment_id'] ] ) ) { + + $payment->parent_payment_id = absint( $row[ $this->field_mapping['parent_payment_id'] ] ); + + } + + if( ! empty( $this->field_mapping['downloads'] ) && ! empty( $row[ $this->field_mapping['downloads'] ] ) ) { + + if( __( 'Products (Raw)', 'easy-digital-downloads' ) == $this->field_mapping['downloads'] ) { + + // This is an EDD export so we can extract prices + $downloads = $this->get_downloads_from_edd( $row[ $this->field_mapping['downloads'] ] ); + + } else { + + $downloads = $this->str_to_array( $row[ $this->field_mapping['downloads'] ] ); + + } + + if( is_array( $downloads ) ) { + + $download_count = count( $downloads ); + + foreach( $downloads as $download ) { + + if( is_array( $download ) ) { + $download_name = $download['download']; + $price = $download['price']; + $tax = $download['tax']; + $price_id = $download['price_id']; + } else { + $download_name = $download; + } + + $download_id = $this->maybe_create_download( $download_name ); + + if( ! $download_id ) { + continue; + } + + $item_price = ! isset( $price ) ? edd_get_download_price( $download_id ) : $price; + $item_tax = ! isset( $tax ) ? ( $download_count > 1 ? 0.00 : $payment->tax ) : $tax; + $price_id = ! isset( $price_id ) ? false : $price_id; + + $args = array( + 'item_price' => $item_price, + 'tax' => $item_tax, + 'price_id' => $price_id, + ); + + $payment->add_download( $download_id, $args ); + + } + + } + + } + + if( ! empty( $this->field_mapping['total'] ) && ! empty( $row[ $this->field_mapping['total'] ] ) ) { + + $payment->total = edd_sanitize_amount( $row[ $this->field_mapping['total'] ] ); + + } + + if( ! empty( $this->field_mapping['tax'] ) && ! empty( $row[ $this->field_mapping['tax'] ] ) ) { + + $payment->tax = edd_sanitize_amount( $row[ $this->field_mapping['tax'] ] ); + + } + + if( ! empty( $this->field_mapping['subtotal'] ) && ! empty( $row[ $this->field_mapping['subtotal'] ] ) ) { + + $payment->subtotal = edd_sanitize_amount( $row[ $this->field_mapping['subtotal'] ] ); + + } else { + + $payment->subtotal = $payment->total - $payment->tax; + + } + + $address = array( 'line1' => '', 'line2' => '', 'city' => '', 'state' => '', 'zip' => '', 'country' => '' ); + + foreach( $address as $key => $address_field ) { + + if( ! empty( $this->field_mapping[ $key ] ) && ! empty( $row[ $this->field_mapping[ $key ] ] ) ) { + + $address[ $key ] = sanitize_text_field( $row[ $this->field_mapping[ $key ] ] ); + + } + + } + + $payment->address = $address; + + $payment->save(); + + + // The status has to be set after payment is created to ensure status update properly + if( ! empty( $this->field_mapping['status'] ) && ! empty( $row[ $this->field_mapping['status'] ] ) ) { + + $payment->status = strtolower( sanitize_text_field( $row[ $this->field_mapping['status'] ] ) ); + + } else { + + $payment->status = 'complete'; + + } + + // Save a second time to update stats. + $payment->save(); + + // Add a meta key to indicate this payment was imported. + edd_add_order_meta( $payment->ID, '_edd_imported', time() ); + + /** + * Fires after an order is created during a batch import of payments. + * + * @since 3.3.0 + * @param int $payment_id The ID of the payment. + */ + do_action( 'edd_batch_import_order_created', $payment->ID ); + } + + private function set_customer( $row ) { + + global $wpdb; + $customer = false; + + $customer = false; + $email = ''; + + if( ! empty( $this->field_mapping['email'] ) && ! empty( $row[ $this->field_mapping['email'] ] ) ) { + + $email = sanitize_text_field( $row[ $this->field_mapping['email'] ] ); + + } + + // Look for a customer from the canonical source, if any + if( ! empty( $this->field_mapping['edd_customer_id'] ) && ! empty( $row[ $this->field_mapping['edd_customer_id'] ] ) ) { + + $canonical_id = absint( $row[ $this->field_mapping['edd_customer_id'] ] ); + $mapped_id = $wpdb->get_var( $wpdb->prepare( "SELECT edd_customer_id FROM $wpdb->edd_customermeta WHERE meta_key = '_canonical_import_id' AND meta_value = %d LIMIT 1", $canonical_id ) ); + + } + + if( ! empty( $mapped_id ) ) { + + $customer = new EDD_Customer( $mapped_id ); + + } + + if( empty( $mapped_id ) || ! $customer->id > 0 ) { + + // Look for a customer based on provided ID, if any + if ( ! empty( $this->field_mapping['edd_customer_id'] ) && ! empty( $row[ $this->field_mapping['edd_customer_id'] ] ) ) { + + $customer_id = absint( $row[ $this->field_mapping['edd_customer_id'] ] ); + + $customer_by_id = new EDD_Customer( $customer_id ); + + } + + // Now look for a customer based on provided email + + if( ! empty( $email ) ) { + + $customer_by_email = new EDD_Customer( $email ); + + } + + // Now compare customer records. If they don't match, customer_id will be stored in meta and we will use the customer that matches the email + + if ( ! empty( $customer_by_email ) && ( empty( $customer_by_id ) || $customer_by_id->id !== $customer_by_email->id ) ) { + + $customer = $customer_by_email; + + } elseif ( ! empty( $customer_by_id ) ) { + + $customer = $customer_by_id; + + if( ! empty( $email ) ) { + $customer->add_email( $email ); + } + + } + + // Make sure we found a customer. Create one if not. + if ( empty( $customer->id ) ) { + + if ( ! $customer instanceof EDD_Customer ) { + $customer = new EDD_Customer(); + } + } + + if ( ! empty( $this->field_mapping['name'] ) && ! empty( $row[ $this->field_mapping['name'] ] ) ) { + + $name = $row[ $this->field_mapping['name'] ]; + + } else { + $first_name = ''; + $last_name = ''; + if ( ! empty( $this->field_mapping['first_name'] ) && ! empty( $row[ $this->field_mapping['first_name'] ] ) ) { + + $first_name = $row[ $this->field_mapping['first_name'] ]; + + } + + if ( ! empty( $this->field_mapping['last_name'] ) && ! empty( $row[ $this->field_mapping['last_name'] ] ) ) { + + $last_name = $row[ $this->field_mapping['last_name'] ]; + + } + $name = $first_name . ' ' . $last_name; + } + + $customer->create( + array( + 'name' => sanitize_text_field( $name ), + 'email' => empty( $email ) ? '' : $email, + ) + ); + + if( ! empty( $canonical_id ) && (int) $canonical_id !== (int) $customer->id ) { + $customer->update_meta( '_canonical_import_id', $canonical_id ); + } + } + + if ( ! empty( $email ) && $email !== $customer->email ) { + $customer->add_email( $email ); + } + + return $customer->id; + + } + + /** + * Look up Download by title and create one if none is found + * + * @since 2.6 + * @return int|false Download ID or false if the download could not be created. + */ + private function maybe_create_download( $title = '' ) { + + if ( ! is_string( $title ) ) { + return false; + } + + $download = new WP_Query( + array( + 'post_type' => 'download', + 'title' => $title, + 'post_status' => 'all', + 'posts_per_page' => 1, + 'no_found_rows' => true, + 'ignore_sticky_posts' => true, + 'update_post_term_cache' => false, + 'update_post_meta_cache' => false, + 'orderby' => 'post_date ID', + 'order' => 'ASC', + ) + ); + + if ( ! empty( $download->post ) ) { + return $download->post->ID; + } + + $args = array( + 'post_type' => 'download', + 'post_title' => $title, + 'post_author' => get_current_user_id(), + ); + + return wp_insert_post( $args ); + } + + /** + * Return the calculated completion percentage + * + * @since 2.6 + * @return int + */ + public function get_downloads_from_edd( $data_str ) { + + // Break string into separate products + + $d_array = array(); + $downloads = (array) explode( '/', $data_str ); + + if( $downloads ) { + + foreach( $downloads as $key => $download ) { + + $d = (array) explode( '|', $download ); + if ( ! array_key_exists( 1, $d ) ) { + continue; + } + preg_match_all( '/\{(\d|(\d+(\.\d+|\d+)))\}/', $d[1], $matches ); + + if( false !== strpos( $d[1], '{' ) ) { + + $price = trim( substr( $d[1], 0, strpos( $d[1], '{' ) ) ); + + } else { + + $price = trim( $d[1] ); + } + + $price = floatval( $price ); + $tax = isset( $matches[1][0] ) ? floatval( trim( $matches[1][0] ) ) : 0; + $price_id = isset( $matches[1][1] ) ? trim( $matches[1][1] ) : false; + + $d_array[] = array( + 'download' => trim( $d[0] ), + 'price' => $price - $tax, + 'tax' => $tax, + 'price_id' => $price_id, + ); + + } + + } + + return $d_array; + + } + + /** + * Return the calculated completion percentage + * + * @since 2.6 + * @return int + */ + public function get_percentage_complete() { + + $percentage = 0; + $total = count( $this->csv ); + + if ( $total > 0 ) { + $percentage = ( $this->step * $this->per_step / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Retrieve the URL to the payments list table + * + * @since 2.6 + * @return string + */ + public function get_list_table_url() { + return admin_url( 'edit.php?post_type=download&page=edd-payment-history' ); + } + + /** + * Retrieve the payments labels + * + * @since 2.6 + * @return string + */ + public function get_import_type_label() { + return __( 'payments', 'easy-digital-downloads' ); + } +} diff --git a/includes/admin/import/class-batch-import.php b/includes/admin/import/class-batch-import.php new file mode 100644 index 00000000000..c8ffdb17475 --- /dev/null +++ b/includes/admin/import/class-batch-import.php @@ -0,0 +1,362 @@ + database fields + * + * @since 2.6 + */ + public $field_mapping = array(); + + /** + * Is the import done? + * + * @since 2.6 + * @var bool + */ + public $done = false; + + /** + * Get things started + * + * @param $_step int The step to process + * @since 2.6 + */ + public function __construct( $_file = '', $_step = 1 ) { + + $this->step = $_step; + if ( ! empty( $_file ) ) { + $this->set_up_csv( $_file ); + } + } + + /** + * Sets up the CSV file for importing. + * + * @param [type] $file + * @return void + */ + public function set_up_csv( $file ) { + $this->csv = $this->get_csv_file( $file ); + $this->total = count( $this->csv ); + $this->init(); + } + + /** + * Initialize the updater. Runs after import file is loaded but before any processing is done. + * + * @since 2.6 + * @return void + */ + public function init() {} + + /** + * Can we import? + * + * @since 2.6 + * @return bool Whether we can iport or not + */ + public function can_import() { + return (bool) apply_filters( 'edd_import_capability', current_user_can( $this->capability_type ) ); + } + + /** + * Parses the CSV from the file and returns the data as an array. + * + * @since 2.11.5 + * @param string $file + * + * @return array + */ + public function get_csv_file( $file ) { + $this->file = $file; + $csv = array_map( 'str_getcsv', EDD\Utils\FileSystem::file( $file ) ); + array_walk( + $csv, + function ( &$a ) use ( $csv ) { + /* + * Make sure the two arrays have the same lengths. + * If not, we trim the larger array to match the smaller one. + */ + $min = min( count( $csv[0] ), count( $a ) ); + $headers = array_slice( $csv[0], 0, $min ); + $values = array_slice( $a, 0, $min ); + $a = array_combine( $headers, $values ); + } + ); + array_shift( $csv ); + + return $csv; + } + + /** + * Get the CSV columns + * + * @since 2.6 + * @return array The columns in the CSV + */ + public function get_columns() { + + $columns = array(); + + if ( isset( $this->csv[0] ) && is_array( $this->csv[0] ) ) { + $columns = array_keys( $this->csv[0] ); + } + + return $columns; + } + + /** + * Get the first row of the CSV + * + * This is used for showing an example of what the import will look like + * + * @since 2.6 + * @return array The first row after the header of the CSV + */ + public function get_first_row() { + + if ( ! is_array( $this->csv ) ) { + return array(); + } + + return array_map( array( $this, 'trim_preview' ), current( $this->csv ) ); + } + + /** + * Process a step + * + * @since 2.6 + * @return bool + */ + public function process_step() { + + $more = false; + + if ( ! $this->can_import() ) { + wp_die( __( 'You do not have permission to import data.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + return $more; + } + + /** + * Return the calculated completion percentage + * + * @since 2.6 + * @return int + */ + public function get_percentage_complete() { + return 100; + } + + /** + * Map CSV columns to import fields + * + * @since 2.6 + * @return void + */ + public function map_fields( $import_fields = array() ) { + + $this->field_mapping = array_map( 'sanitize_text_field', $import_fields ); + + } + + /** + * Retrieve the URL to the list table for the import data type + * + * @since 2.6 + * @return string + */ + public function get_list_table_url() {} + + /** + * Retrieve the label for the import type. Example: Payments + * + * @since 2.6 + * @return string + */ + public function get_import_type_label() {} + + /** + * Convert a string containing delimiters to an array + * + * @since 2.6 + * @param $str Input string to convert to an array + * @return array + */ + public function str_to_array( $str = '' ) { + + $array = array(); + + if( is_array( $str ) ) { + return array_map( 'trim', $str ); + } + + // Look for standard delimiters + if( false !== strpos( $str, '|' ) ) { + + $delimiter = '|'; + + } elseif( false !== strpos( $str, ',' ) ) { + + $delimiter = ','; + + } elseif( false !== strpos( $str, ';' ) ) { + + $delimiter = ';'; + + } elseif( false !== strpos( $str, '/' ) && ! filter_var( str_replace( ' ', '%20', $str ), FILTER_VALIDATE_URL ) && '/' !== substr( $str, 0, 1 ) ) { + + $delimiter = '/'; + + } + + if( ! empty( $delimiter ) ) { + + $array = (array) explode( $delimiter, $str ); + + } else { + + $array[] = $str; + } + + return array_map( 'trim', $array ); + + } + + /** + * Convert a files string containing delimiters to an array. + * + * This is identical to str_to_array() except it ignores all / characters. + * + * @since 2.9.20 + * @param $str Input string to convert to an array + * @return array + */ + public function convert_file_string_to_array( $str = '' ) { + + $array = array(); + + if( is_array( $str ) ) { + return array_map( 'trim', $str ); + } + + // Look for standard delimiters + if( false !== strpos( $str, '|' ) ) { + + $delimiter = '|'; + + } elseif( false !== strpos( $str, ',' ) ) { + + $delimiter = ','; + + } elseif( false !== strpos( $str, ';' ) ) { + + $delimiter = ';'; + + } + + if( ! empty( $delimiter ) ) { + + $array = (array) explode( $delimiter, $str ); + + } else { + + $array[] = $str; + } + + return array_map( 'trim', $array ); + + } + + /** + * Trims a column value for preview + * + * @since 2.6 + * @param $str Input string to trim down + * @return string + */ + public function trim_preview( $str = '' ) { + + if( ! is_numeric( $str ) ) { + + $long = strlen( $str ) >= 30; + $str = substr( $str, 0, 30 ); + $str = $long ? $str . '...' : $str; + + } + + return $str; + + } +} diff --git a/includes/admin/import/import-actions.php b/includes/admin/import/import-actions.php new file mode 100644 index 00000000000..f42d990a310 --- /dev/null +++ b/includes/admin/import/import-actions.php @@ -0,0 +1,75 @@ + __( 'Nonce verification failed.', 'easy-digital-downloads' ) ) ); + } + + if ( empty( $_POST['edd-import-class'] ) ) { + wp_send_json_error( array( 'error' => __( 'Missing import parameters. Import class must be specified.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + if ( ! function_exists( 'wp_handle_upload' ) ) { + require_once ABSPATH . 'wp-admin/includes/file.php'; + } + + require_once EDD_PLUGIN_DIR . 'includes/admin/import/class-batch-import.php'; + + $importer_class = sanitize_text_field( $_POST['edd-import-class'] ); + $is_class_allowed = edd_importer_is_class_allowed( $importer_class ); + if ( false === $is_class_allowed ) { + wp_send_json_error( array( 'error' => __( 'Invalid importer class supplied', 'easy-digital-downloads' ) ) ); + } + + do_action( 'edd_batch_import_class_include', $importer_class ); + + $import = new $importer_class(); + + // The import class checks for the user's capability. + if ( ! $import->can_import() ) { + wp_send_json_error( array( 'error' => __( 'You do not have permission to import data', 'easy-digital-downloads' ) ) ); + } + + if ( empty( $_FILES['edd-import-file'] ) ) { + wp_send_json_error( array( 'error' => __( 'Missing import file. Please provide an import file.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + if ( empty( $_FILES['edd-import-file']['type'] ) || ! in_array( strtolower( $_FILES['edd-import-file']['type'] ), edd_importer_accepted_mime_types(), true ) ) { + wp_send_json_error( array( 'error' => __( 'The file you uploaded does not appear to be a CSV file.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + if ( ! FileSystem::file_exists( $_FILES['edd-import-file']['tmp_name'] ) ) { + wp_send_json_error( array( 'error' => __( 'Something went wrong during the upload process, please try again.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + // Let WordPress import the file. We will remove it after import is complete + $import_file = wp_handle_upload( $_FILES['edd-import-file'], array( 'test_form' => false ) ); + + if ( $import_file && empty( $import_file['error'] ) ) { + + $import->set_up_csv( $import_file['file'] ); + wp_send_json_success( array( + 'form' => $_POST, + 'class' => $importer_class, + 'upload' => $import_file, + 'first_row' => $import->get_first_row(), + 'columns' => $import->get_columns(), + 'nonce' => wp_create_nonce( 'edd_ajax_import', 'edd_ajax_import' ) + ) ); + + } else { + + /** + * Error generated by _wp_handle_upload() + * @see _wp_handle_upload() in wp-admin/includes/file.php + */ + + wp_send_json_error( array( 'error' => $import_file['error'] ) ); + } + + exit; + +} +add_action( 'edd_upload_import_file', 'edd_do_ajax_import_file_upload' ); + +/** + * Process batch imports via ajax + * + * @since 2.6 + * @return void + */ +function edd_do_ajax_import() { + + require_once EDD_PLUGIN_DIR . 'includes/admin/import/class-batch-import.php'; + + if( ! wp_verify_nonce( $_REQUEST['nonce'], 'edd_ajax_import' ) ) { + wp_send_json_error( array( 'error' => __( 'Nonce verification failed.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + if ( empty( $_REQUEST['class'] ) ) { + wp_send_json_error( array( 'error' => __( 'Missing import parameters. Import class must be specified.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + if ( ! FileSystem::file_exists( $_REQUEST['upload']['file'] ) ) { + wp_send_json_error( array( 'error' => __( 'Something went wrong during the upload process, please try again.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + $file = sanitize_text_field( $_REQUEST['upload']['file'] ); + + $mime_type_allowed = false; + if ( is_callable( 'mime_content_type' ) ) { + if ( in_array( mime_content_type( $file ), edd_importer_accepted_mime_types(), true ) ) { + $mime_type_allowed = true; + } + } else { + if ( wp_check_filetype( $file, edd_importer_accepted_mime_types() ) ) { + $mime_type_allowed = true; + } + } + + if ( false === $mime_type_allowed ) { + wp_send_json_error( array( 'error' => __( 'The file you uploaded does not appear to be a CSV file.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) ); + } + + $importer_class = sanitize_text_field( $_REQUEST['class'] ); + $is_class_allowed = edd_importer_is_class_allowed( $importer_class ); + + if ( ! $is_class_allowed ) { + wp_send_json_error( array( 'error' => __( 'Invalid importer class supplied', 'easy-digital-downloads' ) ) ); + } + + do_action( 'edd_batch_import_class_include', $importer_class ); + + $step = absint( $_REQUEST['step'] ); + $class = $importer_class; + $import = new $class( '', $step ); + + if ( ! $import->can_import() ) { + wp_send_json_error( array( 'error' => __( 'You do not have permission to import data', 'easy-digital-downloads' ) ) ); + } + $import->set_up_csv( $file ); + + parse_str( $_REQUEST['mapping'], $map ); + + $import->map_fields( $map['edd-import-field'] ); + + $ret = $import->process_step( $step ); + + $percentage = $import->get_percentage_complete(); + + if( $ret ) { + + $step += 1; + wp_send_json_success( array( + 'step' => $step, + 'percentage' => $percentage, + 'columns' => $import->get_columns(), + 'mapping' => $import->field_mapping, + 'total' => $import->total + ) ); + + } elseif ( true === $import->is_empty ) { + + wp_send_json_error( array( + 'error' => __( 'No data found for import parameters', 'easy-digital-downloads' ) + ) ); + + } else { + + wp_send_json_success( array( + 'step' => 'done', + 'message' => sprintf( + /* translators: 1: URL to view imported items, 2: Import type label */ + __( 'Import complete! View imported %2$s.', 'easy-digital-downloads' ), + esc_url( $import->get_list_table_url() ), + esc_html( $import->get_import_type_label() ) + ) + ) ); + + } +} +add_action( 'wp_ajax_edd_do_ajax_import', 'edd_do_ajax_import' ); + +/** + * Returns the array of accepted mime types for the importer. + * + * @since 3.0 + * @return array + */ +function edd_importer_accepted_mime_types() { + return array( + 'text/csv', + 'text/comma-separated-values', + 'text/plain', + 'text/anytext', + 'text/*', + 'text/plain', + 'text/anytext', + 'text/*', + 'application/csv', + 'application/excel', + 'application/vnd.ms-excel', + 'application/vnd.msexcel', + ); +} + +/** + * Given an importer class name, is it allowed to process as an importer. + * + * @since 3.0.2 + * + * @param string $class The class name to check. + * + * @return bool If the class is allowed to be used as an importer. + */ +function edd_importer_is_class_allowed( $class = '' ) { + $allowed_importer_classes = edd_get_importer_accepted_classes(); + return in_array( $class, $allowed_importer_classes, true ); +} + +/** + * Returns a list of allowed importer classes. + * + * @since 3.0.2 + * + * @return array An array of class names to allow during imports. + */ +function edd_get_importer_accepted_classes() { + return apply_filters( + 'edd_accepted_importer_classes', + array( + 'EDD_Batch_Downloads_Import', + 'EDD_Batch_Payments_Import', + ) + ); +} diff --git a/includes/admin/notes/note-actions.php b/includes/admin/notes/note-actions.php new file mode 100644 index 00000000000..f39eacba400 --- /dev/null +++ b/includes/admin/notes/note-actions.php @@ -0,0 +1,136 @@ + $object_id, + 'object_type' => $object_type, + 'content' => $note, + 'user_id' => get_current_user_id() + ) ); + + $x = new WP_Ajax_Response(); + $x->add( + array( + 'what' => 'edd_note_html', + 'data' => edd_admin_get_note_html( $note_id, $object_id ), + ) + ); + $x->send(); +} +add_action( 'wp_ajax_edd_add_note', 'edd_admin_ajax_add_note' ); + +/** + * Delete a note. + * + * @since 3.0 + * + * @param array $data Data from $_GET. + */ +function edd_admin_delete_note( $data = array() ) { + + // Bail if missing any data + if ( empty( $data['_wpnonce'] ) || empty( $data['note_id'] ) ) { + return; + } + + // Bail if nonce fails + if ( ! wp_verify_nonce( $data['_wpnonce'], 'edd_delete_note_' . $data['note_id'] ) ) { + return; + } + + if ( ! current_user_can( 'edit_shop_payments' ) ) { + return; + } + + // Try to delete + edd_delete_note( $data['note_id'] ); + + edd_redirect( edd_get_note_delete_redirect_url() ); +} +add_action( 'edd_delete_note', 'edd_admin_delete_note' ); + +/** + * Delete a discount note via AJAX. + * + * @since 3.0 + */ +function edd_admin_ajax_delete_note() { + + // Check AJAX referrer + check_ajax_referer( 'edd_note', 'nonce' ); + + // Bail if user cannot delete notes + if ( ! current_user_can( 'manage_shop_settings' ) ) { + wp_die( -1 ); + } + + // Get note ID + $note_id = ! empty( $_POST['note_id'] ) + ? absint( $_POST['note_id'] ) + : 0; + + // Bail if no note + if ( empty( $note_id ) ) { + wp_die( -1 ); + } + + // Delete note + if ( edd_delete_note( $note_id ) ) { + wp_die( 1 ); + } + + wp_die( 0 ); +} +add_action( 'wp_ajax_edd_delete_note', 'edd_admin_ajax_delete_note' ); diff --git a/includes/admin/notes/note-functions.php b/includes/admin/notes/note-functions.php new file mode 100644 index 00000000000..9b2b2c82938 --- /dev/null +++ b/includes/admin/notes/note-functions.php @@ -0,0 +1,223 @@ + + +
    + + +

    > + +

    +
    + + user_id; + $author = edd_get_bot_name(); + if ( ! empty( $user_id ) ) { + /* translators: user ID */ + $author = sprintf( __( 'User ID #%s', 'easy-digital-downloads' ), $user_id ); + $user_object = get_userdata( $user_id ); + if ( $user_object ) { + $author = ! empty( $user_object->display_name ) ? $user_object->display_name : $user_object->user_login; + } + } + + // URL to delete note + $delete_note_url = wp_nonce_url( add_query_arg( array( + 'edd-action' => 'delete_note', + 'note_id' => absint( $note->id ), + ) ), 'edd_delete_note_' . absint( $note->id ) ); + + // Start a buffer + ob_start(); + ?> + +
    +
    + + + + + +
    + + content ) ); ?> +
    + + + +
    +
    + + +
    + +
    +
    + +
    + + +
    + + +
    + + 0, + 'pag_arg' => 'paged', + 'base' => '%_%', + 'show_all' => true, + 'prev_text' => is_rtl() ? '→' : '←', + 'next_text' => is_rtl() ? '←' : '→', + 'add_fragment' => '' + ) ); + + // Maximum notes per page + $per_page = apply_filters( 'edd_notes_per_page', 20 ); + $r['total'] = ceil( $r['total'] / $per_page ); + $r['format'] = "?{$r['pag_arg']}=%#%"; + + // Don't allow pagination beyond the boundaries + $r['current'] = ! empty( $_GET[ $r['pag_arg'] ] ) && is_numeric( $_GET[ $r['pag_arg'] ] ) + ? absint( $_GET[ $r['pag_arg'] ] ) + : 1; + + // Start a buffer + ob_start(); ?> + +
    + +
    + + 'edd-payment-history', + 'view' => 'view-order-details', + 'id' => absint( $request['id'] ), + ) + ) + ); + } +} +add_action( 'edd_handle_order_item_change', 'edd_handle_order_item_change' ); + +/** + * Process the changes from the `View Order Details` page. + * + * @since 1.9 + * @since 3.0 Refactored to use new core objects and query methods. + * + * @param array $data Order data. + */ +function edd_update_payment_details( $data = array() ) { + + // Bail if an empty array is passed. + if ( empty( $data ) ) { + wp_die( esc_html__( 'You do not have permission to edit this payment record', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Bail if the user does not have the correct permissions. + if ( ! current_user_can( 'edit_shop_payments', $data['edd_payment_id'] ) ) { + wp_die( esc_html__( 'You do not have permission to edit this payment record', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + check_admin_referer( 'edd_update_payment_details_nonce' ); + + // Retrieve the order ID and set up the order. + $order_id = absint( $data['edd_payment_id'] ); + $order = edd_get_order( $order_id ); + + $order_update_args = array(); + + $unlimited = isset( $data['edd-unlimited-downloads'] ) ? '1' : null; + $new_status = sanitize_key( $data['edd-payment-status'] ); + $date_string = EDD()->utils->get_date_string( + sanitize_text_field( $data['edd-payment-date'] ), + sanitize_text_field( $data['edd-payment-time-hour'] ), + sanitize_text_field( $data['edd-payment-time-min'] ) + ); + + // The date is entered in the WP timezone. We need to convert it to UTC prior to saving now. + $order_update_args['date_created'] = edd_get_utc_date_string( $date_string ); + + // Customer + $curr_customer_id = sanitize_text_field( $data['current-customer-id'] ); + $new_customer_id = sanitize_text_field( $data['customer-id'] ); + + // Create a new customer. + if ( isset( $data['edd-new-customer'] ) && 1 === (int) $data['edd-new-customer'] ) { + $email = isset( $data['edd-new-customer-email'] ) + ? sanitize_text_field( $data['edd-new-customer-email'] ) + : ''; + + // Sanitize first name + $first_name = isset( $data['edd-new-customer-first-name'] ) + ? sanitize_text_field( $data['edd-new-customer-first-name'] ) + : ''; + + // Sanitize last name + $last_name = isset( $data['edd-new-customer-last-name'] ) + ? sanitize_text_field( $data['edd-new-customer-last-name'] ) + : ''; + + // Combine + $name = $first_name . ' ' . $last_name; + + if ( empty( $email ) || empty( $name ) ) { + wp_die( esc_html__( 'New Customers require a name and email address', 'easy-digital-downloads' ) ); + } + + $customer = new EDD_Customer( $email ); + + if ( empty( $customer->id ) ) { + $customer_data = array( + 'name' => $name, + 'email' => $email, + ); + + $user_id = email_exists( $email ); + + if ( false !== $user_id ) { + $customer_data['user_id'] = $user_id; + } + + if ( ! $customer->create( $customer_data ) ) { + $customer = new EDD_Customer( $curr_customer_id ); + edd_set_error( 'edd-payment-new-customer-fail', __( 'Error creating new customer', 'easy-digital-downloads' ) ); + } + } else { + /* translators: %s: email address */ + wp_die( sprintf( __( 'A customer with the email address %s already exists. Please go back and assign this payment to them.', 'easy-digital-downloads' ), $email ) ); + } + + $previous_customer = new EDD_Customer( $curr_customer_id ); + } elseif ( $curr_customer_id !== $new_customer_id ) { + $customer = new EDD_Customer( $new_customer_id ); + + $previous_customer = new EDD_Customer( $curr_customer_id ); + } else { + $customer = new EDD_Customer( $curr_customer_id ); + } + + // Remove the stats and payment from the previous customer and attach it to the new customer. + if ( isset( $previous_customer ) ) { + $previous_customer->remove_payment( $order_id, false ); + $customer->attach_payment( $order_id, false ); + + $order_update_args['customer_id'] = $customer->id; + } + + $order_update_args['user_id'] = $customer->user_id; + $order_update_args['email'] = $customer->email; + + // Address. + $address = $data['edd_order_address']; + + $order_address_id = absint( $address['address_id'] ); + $order_address_details = array( + 'name' => $customer->name, + 'address' => $address['address'], + 'address2' => $address['address2'], + 'city' => $address['city'], + 'region' => $address['region'], + 'postal_code' => $address['postal_code'], + 'country' => $address['country'], + ); + + if ( empty( $order_address_id ) ) { + + // Unset the address_id which is 0. + unset( $address['address_id'] ); + + // Add the $order_id to the arguments to create this order address. + $order_address_details['order_id'] = $order_id; + + edd_add_order_address( $order_address_details ); + } else { + edd_update_order_address( $order_address_id, $order_address_details ); + } + + // Unlimited downloads. + if ( 1 === (int) $unlimited ) { + edd_update_order_meta( $order_id, 'unlimited_downloads', $unlimited ); + } else { + edd_delete_order_meta( $order_id, 'unlimited_downloads' ); + } + + // Don't set the status in the update call (for back compat) + unset( $order_update_args['status'] ); + + // Attempt to update the order + $updated = edd_update_order( $order_id, $order_update_args ); + + // Bail if an error occurred + if ( false === $updated ) { + wp_die( __( 'Error updating order.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 400 ) ); + } + + // Check if the status has changed, if so, we need to invoke the pertinent + // status processing method (for back compat) + if ( $new_status !== $order->status ) { + edd_update_order_status( $order_id, $new_status ); + } + + do_action( 'edd_updated_edited_purchase', $order_id ); + + edd_redirect( + edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'view' => 'view-order-details', + 'edd-message' => 'payment-updated', + 'id' => absint( $order_id ), + ) + ) + ); +} +add_action( 'edd_update_payment_details', 'edd_update_payment_details' ); + +/** + * New in 3.0, permanently destroys an order, and all its data, and related data. + * + * @since 3.0 + * + * @param array $data Arguments passed. + */ +function edd_trigger_destroy_order( $data ) { + + if ( wp_verify_nonce( $data['_wpnonce'], 'edd_payment_nonce' ) ) { + + $payment_id = absint( $data['purchase_id'] ); + + if ( ! current_user_can( 'delete_shop_payments', $payment_id ) ) { + wp_die( esc_html__( 'You do not have permission to edit this order.', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + edd_destroy_order( $payment_id ); + + $redirect_link = add_query_arg( + array( + 'page' => 'edd-payment-history', + 'edd-message' => 'payment_deleted', + 'status' => 'trash', + ), + edd_get_admin_base_url() + ); + edd_redirect( $redirect_link ); + } +} +add_action( 'edd_delete_order', 'edd_trigger_destroy_order' ); + +/** + * Trigger the action of moving an order to the 'trash' status + * + * @since 3.0 + * + * @param $data + * @return void + */ +function edd_trigger_trash_order( $data ) { + if ( wp_verify_nonce( $data['_wpnonce'], 'edd_payment_nonce' ) ) { + + $payment_id = absint( $data['purchase_id'] ); + + if ( ! current_user_can( 'delete_shop_payments', $payment_id ) ) { + wp_die( __( 'You do not have permission to edit this payment record', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + edd_trash_order( $payment_id ); + + $redirect = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'edd-message' => 'order_trashed', + 'order_type' => esc_attr( $data['order_type'] ), + ) + ); + + edd_redirect( $redirect ); + } +} +add_action( 'edd_trash_order', 'edd_trigger_trash_order' ); + +/** + * Trigger the action of restoring an order from the 'trash' status + * + * @since 3.0 + * + * @param $data + * @return void + */ +function edd_trigger_restore_order( $data ) { + if ( wp_verify_nonce( $data['_wpnonce'], 'edd_payment_nonce' ) ) { + + $payment_id = absint( $data['purchase_id'] ); + + if ( ! current_user_can( 'delete_shop_payments', $payment_id ) ) { + wp_die( __( 'You do not have permission to edit this payment record', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + edd_restore_order( $payment_id ); + + $redirect = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'edd-message' => 'order_restored', + 'order_type' => esc_attr( $data['order_type'] ), + ) + ); + + edd_redirect( $redirect ); + } +} +add_action( 'edd_restore_order', 'edd_trigger_restore_order' ); + +/** + * Retrieves a new download link for a purchased file + * + * @since 2.0 + * @return string + */ +function edd_ajax_generate_file_download_link() { + + $customer_view_role = apply_filters( 'edd_view_customers_role', 'view_shop_reports' ); + if ( ! current_user_can( $customer_view_role ) ) { + die( '-1' ); + } + + $payment_id = absint( $_POST['payment_id'] ); + $download_id = absint( $_POST['download_id'] ); + $price_id = isset( $_POST['price_id'] ) && is_numeric( $_POST['price_id'] ) ? absint( $_POST['price_id'] ) : null; + + if ( empty( $payment_id ) ) { + die( '-2' ); + } + + if ( empty( $download_id ) ) { + die( '-3' ); + } + + $limit = edd_get_file_download_limit( $download_id ); + if ( ! empty( $limit ) ) { + // Increase the file download limit when generating new links + edd_set_file_download_limit_override( $download_id, $payment_id ); + } + + $files = edd_get_download_files( $download_id, $price_id ); + if ( ! $files ) { + die( '-4' ); + } + + $order = edd_get_order( $payment_id ); + $file_urls = ''; + foreach ( $files as $file_key => $file ) { + $file_urls .= edd_get_download_file_url( $order, $order->email, $file_key, $download_id, $price_id ); + $file_urls .= "\n\n"; + } + + die( $file_urls ); +} +add_action( 'wp_ajax_edd_get_file_download_link', 'edd_ajax_generate_file_download_link' ); + +/** + * Renders the refund form that is used to process a refund. + * + * @since 3.0 + * + * @return void + */ +function edd_ajax_generate_refund_form() { + + // Verify we have a logged user. + if ( ! is_user_logged_in() ) { + $return = array( + 'success' => false, + 'message' => __( 'You must be logged in to perform this action.', 'easy-digital-downloads' ), + ); + + wp_send_json( $return, 401 ); + } + + // Verify the logged in user has permission to edit shop payments. + if ( ! current_user_can( 'edit_shop_payments' ) ) { + $return = array( + 'success' => false, + 'message' => __( 'Your account does not have permission to perform this action.', 'easy-digital-downloads' ), + ); + + wp_send_json( $return, 401 ); + } + + $order_id = isset( $_POST['order_id'] ) && is_numeric( $_POST['order_id'] ) ? absint( $_POST['order_id'] ) : false; + + if ( empty( $order_id ) ) { + $return = array( + 'success' => false, + 'message' => __( 'Invalid order ID', 'easy-digital-downloads' ), + ); + + wp_send_json( $return, 400 ); + } + + $order = edd_get_order( $order_id ); + if ( empty( $order ) ) { + $return = array( + 'success' => false, + 'message' => __( 'Invalid order', 'easy-digital-downloads' ), + ); + + wp_send_json( $return, 404 ); + } + + if ( 'refunded' === $order->status ) { + $return = array( + 'success' => false, + 'message' => __( 'Order is already refunded', 'easy-digital-downloads' ), + ); + + wp_send_json( $return, 404 ); + } + + if ( 'refund' === $order->type ) { + $return = array( + 'success' => false, + 'message' => __( 'Cannot refund an order that is already refunded.', 'easy-digital-downloads' ), + ); + + wp_send_json( $return, 404 ); + } + + // Output buffer the form before we include it in the JSON response. + ob_start(); + ?> + +
    + prepare_items(); + $refund_items->display(); + ?> +
    + true, + 'html' => $html, + ); + + wp_send_json( $return, 200 ); +} +add_action( 'wp_ajax_edd_generate_refund_form', 'edd_ajax_generate_refund_form' ); + +/** + * Processes the results from the Submit Refund form + * + * @since 3.0 + * @return void + */ +function edd_ajax_process_refund_form() { + + // Verify we have a logged user. + if ( ! is_user_logged_in() ) { + wp_send_json_error( __( 'You must be logged in to perform this action.', 'easy-digital-downloads' ), 401 ); + } + + // Verify the logged in user has permission to edit shop payments. + if ( ! current_user_can( 'edit_shop_payments' ) ) { + wp_send_json_error( __( 'Your account does not have permission to perform this action.', 'easy-digital-downloads' ), 401 ); + } + + if ( empty( $_POST['data'] ) || empty( $_POST['order_id'] ) ) { + wp_send_json_error( __( 'Missing form data or order ID.', 'easy-digital-downloads' ), 400 ); + } + + // Get our data out of the serialized string. + parse_str( $_POST['data'], $form_data ); + + // Verify the nonce. + $nonce = ! empty( $form_data['edd_process_refund'] ) ? sanitize_text_field( $form_data['edd_process_refund'] ) : false; + if ( empty( $nonce ) || ! wp_verify_nonce( $nonce, 'edd_process_refund' ) ) { + wp_send_json_error( __( 'Nonce validation failed when submitting refund.', 'easy-digital-downloads' ), 401 ); + } + + // Collect selected order items. + $order_items = array(); + if ( ! empty( $form_data['refund_order_item'] ) && is_array( $form_data['refund_order_item'] ) ) { + foreach ( $form_data['refund_order_item'] as $order_item_id => $order_item ) { + // If there's no quantity or subtotal - bail. + if ( empty( $order_item['quantity'] ) || empty( $order_item['subtotal'] ) ) { + continue; + } + + $order_items[] = array( + 'order_item_id' => absint( $order_item_id ), + 'quantity' => intval( $order_item['quantity'] ), + 'subtotal' => edd_sanitize_amount( $order_item['subtotal'] ), + 'tax' => ! empty( $order_item['tax'] ) ? edd_sanitize_amount( $order_item['tax'] ) : 0.00, + ); + } + } + + // Collect selected adjustments. + $adjustments = array(); + if ( ! empty( $form_data['refund_order_adjustment'] ) && is_array( $form_data['refund_order_adjustment'] ) ) { + foreach ( $form_data['refund_order_adjustment'] as $adjustment_id => $adjustment ) { + // If there's no quantity or subtotal - bail. + if ( empty( $adjustment['quantity'] ) || empty( $adjustment['subtotal'] ) ) { + continue; + } + + $adjustments[] = array( + 'adjustment_id' => absint( $adjustment_id ), + 'quantity' => intval( $adjustment['quantity'] ), + 'subtotal' => floatval( edd_sanitize_amount( $adjustment['subtotal'] ) ), + 'tax' => ! empty( $adjustment['tax'] ) ? floatval( edd_sanitize_amount( $adjustment['tax'] ) ) : 0.00, + ); + } + } + + $order_id = absint( $_POST['order_id'] ); + $refund_id = edd_refund_order( $order_id, $order_items, $adjustments ); + + if ( is_wp_error( $refund_id ) ) { + wp_send_json_error( $refund_id->get_error_message() ); + } elseif ( ! empty( $refund_id ) ) { + $return = array( + 'refund_id' => $refund_id, + 'message' => sprintf( __( 'Refund successfully processed.', 'easy-digital-downloads' ) ), + 'refund_url' => edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'view' => 'view-refund-details', + 'id' => urlencode( $refund_id ), + ) + ), + ); + wp_send_json_success( $return, 200 ); + } else { + wp_send_json_error( __( 'Unable to process refund.', 'easy-digital-downloads' ), 401 ); + } +} +add_action( 'wp_ajax_edd_process_refund_form', 'edd_ajax_process_refund_form' ); + +/** + * Process Orders list table bulk actions. This is necessary because we need to + * redirect to ensure filters do not get applied when bulk actions are being + * processed. This processing cannot happen within the `EDD_Payment_History_Table` + * class as at that point, it is too late to do a redirect. + * + * @since 3.0 + */ +function edd_orders_list_table_process_bulk_actions() { + + // Bail if this method was called directly. + if ( 'load-download_page_edd-payment-history' !== current_action() ) { + _doing_it_wrong( __FUNCTION__, 'This method is not meant to be called directly.', 'EDD 3.0' ); + } + + $action = isset( $_REQUEST['action'] ) // WPCS: CSRF ok. + ? sanitize_text_field( $_REQUEST['action'] ) + : ''; + + // If this is a 'delete' action, the capability changes from edit to delete. + $cap = 'delete' === $action ? 'delete_shop_payments' : 'edit_shop_payments'; + + // Check the current user's capability. + if ( ! current_user_can( $cap ) ) { + return; + } + + // Bail if we aren't processing bulk actions. + if ( '-1' === $action ) { + return; + } + + $ids = isset( $_GET['order'] ) // WPCS: CSRF ok. + ? $_GET['order'] + : false; + + if ( ! is_array( $ids ) ) { + $ids = array( $ids ); + } + + if ( empty( $action ) ) { + return; + } + + check_admin_referer( 'bulk-orders' ); + + $ids = wp_parse_id_list( $ids ); + + foreach ( $ids as $id ) { + switch ( $action ) { + case 'trash': + edd_trash_order( $id ); + break; + case 'restore': + edd_restore_order( $id ); + break; + case 'delete': + edd_destroy_order( $id ); + break; + case 'set-status-complete': + edd_update_payment_status( $id, 'complete' ); + break; + + case 'set-status-pending': + edd_update_payment_status( $id, 'pending' ); + break; + + case 'set-status-processing': + edd_update_payment_status( $id, 'processing' ); + break; + + case 'set-status-revoked': + edd_update_payment_status( $id, 'revoked' ); + break; + + case 'set-status-failed': + edd_update_payment_status( $id, 'failed' ); + break; + + case 'set-status-abandoned': + edd_update_payment_status( $id, 'abandoned' ); + break; + + case 'set-status-cancelled': + edd_update_payment_status( $id, 'cancelled' ); + break; + + case 'resend-receipt': + $order = edd_get_order( $id ); + $order_receipt = EDD\Emails\Registry::get( 'order_receipt', array( $order ) ); + $order_receipt->send(); + break; + } + + do_action( 'edd_payments_table_do_bulk_action', $id, $action ); + } + + wp_safe_redirect( wp_get_referer() ); +} +add_action( 'load-download_page_edd-payment-history', 'edd_orders_list_table_process_bulk_actions' ); + +/** + * Recalculate the values of an order. + * + * @since 3.3.4 + * @param array $data + */ +function edd_recalculate_order_values( $data ) { + if ( ! current_user_can( 'edit_shop_payments' ) ) { + return; + } + if ( empty( $data['_wpnonce'] ) || ! wp_verify_nonce( $data['_wpnonce'], 'edd_recalculate_order_nonce' ) ) { + return; + } + $order = edd_get_order( $data['id'] ); + $recalculated = $order->recalculate(); + + $url = remove_query_arg( 'edd-action', wp_get_referer() ); + if ( $recalculated ) { + $url = add_query_arg( 'edd-message', 'order_recalculated', $url ); + } else { + $url = add_query_arg( 'edd-message', 'order_not_recalculated', $url ); + } + + edd_redirect( $url ); +} +add_action( 'edd_recalculate_order', 'edd_recalculate_order_values' ); diff --git a/includes/admin/payments/add-order.php b/includes/admin/payments/add-order.php new file mode 100644 index 00000000000..a1aeff48c5c --- /dev/null +++ b/includes/admin/payments/add-order.php @@ -0,0 +1,158 @@ + 0, + 'parent' => 0, + 'order_number' => 0, + 'status' => 'complete', + 'date_created' => date( 'Y-m-d H:i:s' ), + 'date_modified' => date( 'Y-m-d H:i:s' ), + 'date_refundable' => null, + 'user_id' => 0, + 'customer_id' => 0, + 'email' => '', + 'ip' => edd_get_ip(), + 'gateway' => '', + 'mode' => '', + 'currency' => edd_get_currency(), + 'payment_key' => '', + 'subtotal' => 0, + 'discount' => 0, + 'tax' => 0, + 'total' => 0, + ) ); + + ?> + +
    + + + +
    +

    + +
    + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + +use_js ) + ? ' use-js' + : ''; + $role = $this->use_js ? 'tablist' : 'menu'; + ?> + +
    +
    +
      + get_all_section_links(); ?> +
    + +
    + get_all_section_contents(); ?> +
    +
    +
    +
    + + 'order', + 'plural' => 'orders', + 'ajax' => false, + ) + ); + + // Use registered types. + $types = array_keys( edd_get_order_types() ); + if ( ! empty( $_GET['order_type'] ) && in_array( $_GET['order_type'], $types, true ) ) { + $this->type = sanitize_key( $_GET['order_type'] ); + + // Default to 'sale' if type is unrecognized. + } else { + $this->type = 'sale'; + } + + $this->set_base_url(); + $this->filter_bar_hooks(); + $this->get_payment_counts(); + } + + /** + * Set the base URL. + * + * This retains the current order-type, or 'sale' by default. + * + * @since 3.0 + */ + private function set_base_url() { + // Carry the type over to the base URL. + $this->base_url = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'order_type' => sanitize_key( $this->type ), + ) + ); + } + + /** + * Hook in filter bar actions + * + * @since 3.0 + */ + private function filter_bar_hooks() { + add_action( 'edd_admin_filter_bar_orders', array( $this, 'filter_bar_items' ) ); + add_action( 'edd_after_admin_filter_bar_orders', array( $this, 'filter_bar_searchbox' ) ); + } + + /** + * Display advanced filters. + * + * @since 1.4 + * @since 3.0 Add a filter for modes. + * Display 'Advanced Filters' + */ + public function advanced_filters() { + // Hide when viewing Refunds. + if ( 'refund' === $this->type ) { + return; + } + + edd_admin_filter_bar( 'orders' ); + } + + /** + * Output filter bar items + * + * @since 3.0 + */ + public function filter_bar_items() { + + // Get values. + $start_date = isset( $_GET['start-date'] ) ? sanitize_text_field( $_GET['start-date'] ) : null; + $end_date = isset( $_GET['end-date'] ) ? sanitize_text_field( $_GET['end-date'] ) : null; + $gateway = isset( $_GET['gateway'] ) ? sanitize_key( $_GET['gateway'] ) : 'all'; + $mode = isset( $_GET['mode'] ) ? sanitize_key( $_GET['mode'] ) : 'all'; + $order_total_filter_type = isset( $_GET['order-amount-filter-type'] ) ? sanitize_text_field( $_GET['order-amount-filter-type'] ) : false; + $order_total_filter_amount = isset( $_GET['order-amount-filter-value'] ) ? sanitize_text_field( $_GET['order-amount-filter-value'] ) : ''; + $country = isset( $_GET['order-country-filter-value'] ) ? sanitize_text_field( $_GET['order-country-filter-value'] ) : ''; + $region = isset( $_GET['order-region-filter-value'] ) ? sanitize_text_field( $_GET['order-region-filter-value'] ) : ''; + $product_id = ! empty( $_GET['product-id'] ) ? sanitize_text_field( $_GET['product-id'] ) : false; + + $status = $this->get_status(); + $clear_url = $this->base_url; + + // Filters. + $all_modes = edd_get_payment_modes(); + $all_gateways = edd_get_payment_gateways(); + + // No modes. + if ( empty( $all_modes ) ) { + $modes = array(); + + // Add "All" and pluck labels. + } else { + $modes = array_merge( + array( + 'all' => __( 'All modes', 'easy-digital-downloads' ), + ), + wp_list_pluck( $all_modes, 'admin_label' ) + ); + } + + // No gateways. + if ( empty( $all_gateways ) ) { + $gateways = array(); + + // Add "All" and pluck labels. + } else { + $gateways = array_merge( + array( + 'all' => __( 'All gateways', 'easy-digital-downloads' ), + ), + wp_list_pluck( $all_gateways, 'admin_label' ) + ); + } + + /** + * Allow gateways that aren't registered the standard way to be displayed in the dropdown. + * + * @since 2.8.11 + */ + $gateways = apply_filters( 'edd_payments_table_gateways', $gateways ); + + // Output the items. + if ( ! empty( $modes ) ) : ?> + + + html->select( + array( + 'options' => $modes, + 'name' => 'mode', + 'id' => 'mode', + 'selected' => $mode, + 'show_option_all' => false, + 'show_option_none' => false, + ) + ); + ?> + + + + + + html->date_field( + array( + 'id' => 'start-date', + 'name' => 'start-date', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ), + 'value' => $start_date, + ) + ); + + echo EDD()->html->date_field( + array( + 'id' => 'end-date', + 'name' => 'end-date', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ), + 'value' => $end_date, + ) + ); + + ?> + + + + + html->select( + array( + 'options' => $gateways, + 'name' => 'gateway', + 'id' => 'gateway', + 'selected' => $gateway, + 'show_option_all' => false, + 'show_option_none' => false, + ) + ); + ?> + + + + + + + +
    +
    + + __( 'equal to', 'easy-digital-downloads' ), + 'gt' => __( 'greater than', 'easy-digital-downloads' ), + 'lt' => __( 'less than', 'easy-digital-downloads' ), + ); + + echo EDD()->html->select( + array( + 'id' => 'order-amount-filter-type', + 'name' => 'order-amount-filter-type', + 'options' => $options, + 'selected' => $order_total_filter_type, + 'show_option_all' => false, + 'show_option_none' => false, + ) + ); + ?> + + +
    + +
    + + html->product_dropdown( + array( + 'id' => 'orders-filter-product-id', + 'name' => 'product-id', + 'chosen' => true, + 'selected' => $product_id, + 'variations' => true, + ) + ); + ?> +
    + +
    + + html->country_select( + array( + 'name' => 'order-country-filter-value', + ), + esc_html( $country ) + ); + echo EDD()->html->region_select( + array( + 'name' => 'order-region-filter-value', + ), + esc_html( $country ), + esc_html( $region ) + ); + ?> +
    + + + +
    + + + + +
    + + +
    +
    + + + + + + + + + + + + + + search_box( esc_html__( 'Search', 'easy-digital-downloads' ), 'edd-payments' ); + } + + /** + * Show the search field. + * + * @since 1.4 + * + * @param string $text Label for the search box. + * @param string $input_id ID of the search box. + */ + public function search_box( $text, $input_id ) { + + // Bail if no customers and no search. + if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) { + return; + } + + $input_id = $input_id . '-search-input'; + + if ( ! empty( $_REQUEST['orderby'] ) ) { + echo ''; + } + + if ( ! empty( $_REQUEST['order'] ) ) { + echo ''; + } + + ?> + +

    + + + +

    + + get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'edd_payment' LIMIT 1" ); + if ( ! empty( $orders ) ) { + esc_html_e( 'Easy Digital Downloads needs to upgrade the database. Orders will be available when that has completed.', 'easy-digital-downloads' ); + return; + } + } + + esc_html_e( 'No orders found.', 'easy-digital-downloads' ); + } + + /** + * Retrieve the table columns. + * + * @since 1.4 + * + * @return array $columns Array of all the list table columns. + */ + public function get_columns() { + $columns = array( + 'cb' => '', + 'number' => __( 'Number', 'easy-digital-downloads' ), + 'customer' => __( 'Customer', 'easy-digital-downloads' ), + 'gateway' => __( 'Gateway', 'easy-digital-downloads' ), + 'amount' => __( 'Total', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ), + 'status' => __( 'Status', 'easy-digital-downloads' ), + ); + + if ( 'refund' === $this->type ) { + unset( $columns['status'] ); + } + + /** + * Filters the columns for Orders and Refunds table. + * + * @since unknown + * + * @param array $columns Table columns. + */ + $columns = apply_filters( 'edd_payments_table_columns', $columns ); + + return $columns; + } + + /** + * Retrieve the sortable columns. + * + * @since 1.4 + * + * @return array Array of all the sortable columns. + */ + public function get_sortable_columns() { + return apply_filters( + 'edd_payments_table_sortable_columns', + array( + 'number' => array( 'id', true ), + 'status' => array( 'status', false ), + 'customer' => array( 'customer_id', false ), + 'gateway' => array( 'gateway', false ), + 'amount' => array( 'total', false ), + 'date' => array( 'date_created', false ), + ) + ); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'number'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 1.4 + * @since 3.0 Updated to use the new EDD\Orders\Order class. + * + * @param EDD\Orders\Order $order Order object. + * @param string $column_name The name of the column. + * + * @return string Column name. + */ + public function column_default( $order, $column_name ) { + $timezone_abbreviation = edd_get_timezone_abbr(); + switch ( $column_name ) { + case 'amount': + $currency = ! empty( $order->currency ) ? $order->currency : edd_get_currency(); + $value = edd_display_amount( $order->total, $currency ); + break; + case 'date': + $value = ''; + break; + case 'gateway': + $value = edd_get_gateway_admin_label( $order->gateway ); + + if ( empty( $value ) ) { + $value = '—'; + } + + break; + case 'status': + $value = edd_get_order_status_badge( $order->status, $order ); + break; + default: + $value = method_exists( $order, 'get_' . $column_name ) + ? call_user_func( array( $order, 'get_' . $column_name ) ) + : ''; + break; + } + + return apply_filters( 'edd_payments_table_column', $value, $order->id, $column_name ); + } + + /** + * Render the checkbox column. + * + * @since 1.4 + * @since 3.0 Updated to use the new EDD\Orders\Order class. + * + * @param EDD\Orders\Order $order Order object. + * @return string Displays a checkbox. + */ + public function column_cb( $order ) { + $order_number = 'sale' === $order->type ? $order->get_number() : $order->order_number; + return sprintf( + '', + 'order', + absint( $order->id ), + /* translators: %s: the order number */ + esc_html( sprintf( _x( 'Select %s', 'Number: The order ID in alpha numeric representation', 'easy-digital-downloads' ), $order_number ) ) + ); + } + + /** + * Render the ID column. + * + * @since 2.0 + * @since 3.0 Updated to use the new EDD\Orders\Order class. + * + * @param EDD\Orders\Order $order Order object. + * @return string Displays a checkbox. + */ + public function column_number( $order ) { + $status = $this->get_status(); + + // View URL. + $view_url = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'view' => 'sale' === $order->type + ? 'view-order-details' + : 'view-refund-details', + 'id' => absint( $order->id ), + ) + ); + + // Default row actions. + $row_actions = array( + 'view' => '' . esc_html__( 'Edit', 'easy-digital-downloads' ) . '', + ); + + // View receipt. + if ( 'sale' === $order->type && edd_can_view_receipt( $order ) ) { + $row_actions['receipt'] = sprintf( + '%s', + edd_get_receipt_page_uri( $order->id ), + __( 'View Receipt', 'easy-digital-downloads' ) + ); + } + + // Resend Receipt. + if ( 'sale' === $this->type && 'complete' === $order->status && ! empty( $order->email ) && $this->order_receipts_enabled() ) { + $url = esc_url( + add_query_arg( + array( + 'edd-action' => 'email_links', + 'purchase_id' => absint( $order->id ), + ), + $this->base_url + ) + ); + $row_actions['email_links'] = '' . __( 'Resend Receipt', 'easy-digital-downloads' ) . ''; + } + + // Keep Delete at the end. + if ( edd_is_order_trashable( $order->id ) ) { + $trash_url = wp_nonce_url( + add_query_arg( + array( + 'edd-action' => 'trash_order', + 'purchase_id' => absint( $order->id ), + ), + $this->base_url + ), + 'edd_payment_nonce' + ); + $row_actions['trash'] = '' . esc_html__( 'Trash', 'easy-digital-downloads' ) . ''; + } elseif ( edd_is_order_restorable( $order->id ) ) { + $restore_url = wp_nonce_url( + add_query_arg( + array( + 'edd-action' => 'restore_order', + 'purchase_id' => absint( $order->id ), + ), + $this->base_url + ), + 'edd_payment_nonce' + ); + $row_actions['restore'] = '' . esc_html__( 'Restore', 'easy-digital-downloads' ) . ''; + + $delete_url = wp_nonce_url( + add_query_arg( + array( + 'edd-action' => 'delete_order', + 'purchase_id' => absint( $order->id ), + ), + $this->base_url + ), + 'edd_payment_nonce' + ); + $row_actions['delete'] = '' . esc_html__( 'Delete Permanently', 'easy-digital-downloads' ) . ''; + + unset( $row_actions['view'] ); + } + + if ( has_filter( 'edd_payment_row_actions' ) ) { + $payment = edd_get_payment( $order->id ); + + /** + * Filters the row actions. + * + * @deprecated 3.0 + * + * @param array $row_actions + * @param EDD_Payment|false $payment + */ + $row_actions = apply_filters_deprecated( 'edd_payment_row_actions', array( $row_actions, $payment ), '3.0', 'edd_order_row_actions' ); + } + + /** + * Filters the row actions. + * + * @param array $row_actions Array of row actions. + * @param EDD\Orders\Order $order Order object. + * + * @since 3.0 + */ + $row_actions = apply_filters( 'edd_order_row_actions', $row_actions, $order ); + + // Row actions. + $actions = $this->row_actions( $row_actions ); + + // Primary link. + $order_number = 'sale' === $order->type ? $order->get_number() : $order->order_number; + $link = edd_is_order_restorable( $order->id ) ? '' . esc_html( $order_number ) . '' : '' . esc_html( $order_number ) . ''; + + // Concatenate & return the results. + return $link . $actions; + } + + /** + * Render the Customer column. + * + * @since 2.4.3 + * @since 3.0 Updated to use the new EDD\Orders\Order class. + * + * @param EDD\Orders\Order $order Order object. + * @return string Data shown in the Customer column. + */ + public function column_customer( $order ) { + $customer_id = $order->customer_id; + $customer = edd_get_customer( $customer_id ); + + // Actions if exists. + if ( ! empty( $customer ) ) { + + // Use customer name, if exists. + $name = ! empty( $customer->name ) + ? $customer->name + : $order->email; + + // Link to View Customer. + $url = edd_get_admin_url( + array( + 'page' => 'edd-customers', + 'view' => 'overview', + 'id' => absint( $customer_id ), + ) + ); + + $name = '' . esc_html( $name ) . ''; + if ( ! empty( $customer->name ) ) { + $name .= '
    ' . $order->email . '
    '; + } + } else { + $name = $order->email; + } + + /** + * Filters the output of the Email column in the Payments table. + * + * @since 1.4 + * @since 3.0 Run manually inside of the `customer` column for backwards compatibility. + * + * @param string $name Customer name. + * @param int $order_id ID of the Payment/Order. + * @param string $column_name Name of the current column (email). + */ + $name = apply_filters( 'edd_payments_table_column', $name, $order->id, 'email' ); + + return $name; + } + + /** + * Retrieve the bulk actions. + * + * @since 1.4 + * + * @return array $actions Bulk actions. + */ + public function get_bulk_actions() { + if ( 'refund' !== $this->type ) { + $action = array( + 'set-status-complete' => __( 'Mark Completed', 'easy-digital-downloads' ), + 'set-status-pending' => __( 'Mark Pending', 'easy-digital-downloads' ), + 'set-status-processing' => __( 'Mark Processing', 'easy-digital-downloads' ), + 'set-status-revoked' => __( 'Mark Revoked', 'easy-digital-downloads' ), + 'set-status-failed' => __( 'Mark Failed', 'easy-digital-downloads' ), + 'set-status-abandoned' => __( 'Mark Abandoned', 'easy-digital-downloads' ), + 'resend-receipt' => __( 'Resend Receipts', 'easy-digital-downloads' ), + ); + } else { + $action = array(); + } + + if ( 'trash' === $this->get_status() ) { + $action = array( + 'restore' => __( 'Restore', 'easy-digital-downloads' ), + ); + + if ( current_user_can( 'delete_shop_payments' ) ) { + $action['delete'] = __( 'Delete permanently', 'easy-digital-downloads' ); + } + } else { + $action['trash'] = __( 'Move to Trash', 'easy-digital-downloads' ); + } + + return apply_filters( 'edd_payments_table_bulk_actions', $action ); + } + + /** + * Process the bulk actions. + * + * @since 1.4 + * @since 3.0 Updated to display _doing_it_wrong(). + * + * @see edd_orders_list_table_process_bulk_actions() + */ + public function process_bulk_action() { + _doing_it_wrong( __FUNCTION__, 'Orders list table bulk actions are now handled by edd_orders_list_table_process_bulk_actions(). Please do not call this method directly.', 'EDD 3.0' ); + } + + /** + * Retrieve the payment counts. + * + * @since 1.4 + */ + public function get_payment_counts() { + + // Get the args (without pagination). + $args = $this->parse_args( false ); + + unset( $args['status'], $args['status__not_in'], $args['status__in'] ); + + // Get order counts by type. + $this->counts = edd_get_order_counts( $args ); + } + + /** + * Retrieves all the data for all the orders. + * + * @since 1.4 + * @deprecated 3.0 Use get_data() + * + * @return array $payment_data Array of all the data for the orders. + */ + public function payments_data() { + _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Payment_History_Table::get_data()' ); + + return $this->get_data(); + } + + /** + * Retrieves all of the orders data based on current filters. + * + * @since 3.0 + * + * @return array Orders table data. + */ + public function get_data() { + + // Parse args (with pagination). + $this->args = $this->parse_args( true ); + + // Force EDD\Orders\Order objects to be returned. + $this->args['output'] = 'orders'; + + if ( empty( $this->args['status'] ) ) { + $this->args['status__not_in'] = array( 'trash' ); + } + + // Get data. + $items = edd_get_orders( $this->args ); + + // Get customer IDs and count from payments. + $customer_ids = array_unique( wp_list_pluck( $items, 'customer_id' ) ); + $cust_count = count( $customer_ids ); + + // Maybe prime customer objects (if more than number of queries). + if ( $cust_count > 1 ) { + edd_get_customers( + array( + 'id__in' => $customer_ids, + 'no_found_rows' => true, + 'number' => $cust_count, + ) + ); + } + + return $items; + } + + /** + * Retrieves the Payments table views. + * + * @since 1.4 + * + * @return array $views Available views. + */ + public function get_views() { + $views = parent::get_views(); + + /** + * Filters the Payment table's views. + * + * @since 1.4 + * + * @param array $views Payment table's views. + */ + return apply_filters( 'edd_payments_table_views', $views ); + } + + /** + * Builds an array of arguments for getting orders for the list table, counts, and pagination. + * + * @since 3.0 + * + * @param bool $paginate Whether to add pagination arguments. + * + * @return array Array of arguments to use for querying orders. + */ + private function parse_args( $paginate = true ) { + $status = $this->get_status(); + $user = isset( $_GET['user'] ) ? absint( $_GET['user'] ) : null; + $customer = isset( $_GET['customer'] ) ? absint( $_GET['customer'] ) : null; + $search = isset( $_GET['s'] ) ? sanitize_text_field( $_GET['s'] ) : null; + $start_date = isset( $_GET['start-date'] ) ? sanitize_text_field( $_GET['start-date'] ) : null; + $end_date = isset( $_GET['end-date'] ) ? sanitize_text_field( $_GET['end-date'] ) : $start_date; + $gateway = isset( $_GET['gateway'] ) ? sanitize_text_field( $_GET['gateway'] ) : null; + $mode = isset( $_GET['mode'] ) ? sanitize_text_field( $_GET['mode'] ) : null; + $type = isset( $_GET['order_type'] ) ? sanitize_text_field( $_GET['order_type'] ) : 'sale'; + + /** + * Introduced as part of #6063. Allow a gateway to specified based on the context. + * + * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6063 + * @since 2.8.11 + * + * @param string $gateway + */ + $gateway = apply_filters( 'edd_payments_table_search_gateway', $gateway ); + + if ( 'all' === $gateway ) { + $gateway = null; + } + + if ( 'all' === $mode ) { + $mode = null; + } + + $args = array_filter( + array( + 'user_id' => $user, + 'customer_id' => $customer, + 'status' => $status, + 'gateway' => $gateway, + 'mode' => $mode, + 'type' => $type, + ) + ); + + // If no specific ordering has been requested, order by `date_created`. + if ( empty( $_GET['orderby'] ) ) { + $args['orderby'] = 'date_created'; + $args['order'] = 'DESC'; + } + + // Update args by search query. + if ( ! empty( $search ) ) { + $args = $this->parse_search( $search, $args ); + } + + // Date query. + if ( ! empty( $start_date ) || ! empty( $end_date ) ) { + + // start AND end. + $args['date_query'] = array( + 'relation' => 'AND', + ); + + // Start (of day). + if ( ! empty( $start_date ) ) { + $args['date_query'][] = array( + 'column' => 'date_created', + 'after' => edd_get_utc_date_string( $start_date, 'mysql' ), + ); + } + + // End (of day). + if ( ! empty( $end_date ) ) { + $end_date_string = EDD()->utils->get_date_string( $end_date, 23, 59, 59 ); + $args['date_query'][] = array( + 'column' => 'date_created', + 'before' => edd_get_utc_date_string( $end_date_string, 'mysql' ), + ); + } + } + + // Maybe filter by order amount. + if ( isset( $_GET['order-amount-filter-type'] ) && ! empty( $_GET['order-amount-filter-value'] ) ) { + $filter_amount = floatval( sanitize_text_field( $_GET['order-amount-filter-value'] ) ); + + switch ( $_GET['order-amount-filter-type'] ) { + case 'lt': + $filter_type = '<'; + break; + case 'gt': + $filter_type = '>'; + break; + default: + $filter_type = '='; + break; + } + + $args['compare_query'] = array( + array( + 'key' => 'total', + 'value' => $filter_amount, + 'compare' => $filter_type, + ), + ); + } + + // Maybe filter by product. + if ( ! empty( $_GET['product-id'] ) ) { + if ( false !== strpos( $_GET['product-id'], '_' ) ) { + $product_pieces = explode( '_', $_GET['product-id'] ); + $args['product_id'] = absint( $product_pieces[0] ); + $args['product_price_id'] = absint( $product_pieces[1] ); + } else { + $args['product_id'] = absint( $_GET['product-id'] ); + } + } + + // Maybe filter by country. + if ( ! empty( $_GET['order-country-filter-value'] ) ) { + $args['country'] = sanitize_text_field( $_GET['order-country-filter-value'] ); + } + + // Maybe filter by region. + if ( ! empty( $_GET['order-region-filter-value'] ) ) { + $args['region'] = sanitize_text_field( $_GET['order-region-filter-value'] ); + } + + // Maybe filter by discount ID. + if ( ! empty( $_GET['discount_id'] ) ) { + $args['discount_id'] = absint( $_GET['discount_id'] ); + } + + /** + * Filters array of arguments for getting orders for the list table, counts, and pagination. + * + * @since 3.0 + * + * @param array $args Array of arguments to use for querying orders. + * @param bool $paginate $paginate Whether to add pagination arguments + */ + $args = apply_filters( 'edd_payments_table_parse_args', $args, $paginate ); + + // Return args, possibly with pagination. + return ( true === $paginate ) + ? $this->parse_pagination_args( $args ) + : $args; + } + + /** + * Parse the search query. + * + * @since 3.0.2 + * @param string $search Search query. + * @param array $args The array of arguments. + * @return array + */ + private function parse_search( $search, $args ) { + + // Order ID/number. + if ( is_numeric( $search ) ) { + $args['id'] = $search; + $args['order_number'] = $search; + + return $args; + } + + // Transaction ID. + if ( is_string( $search ) && ( false !== strpos( $search, 'txn:' ) ) ) { + $args['txn'] = trim( str_replace( 'txn:', '', $search ) ); + + return $args; + } + + // Email. + if ( is_email( $search ) ) { + $args['email'] = $search; + + return $args; + } + + // Download ID. + if ( is_string( $search ) && ( false !== strpos( $search, '#' ) ) ) { + $args['product_id'] = intval( trim( str_replace( '#', '', $search ) ) ); + + return $args; + } + + // The customer’s name or ID prefixed by `customer:`. + if ( ! is_array( $search ) && ( false !== strpos( $search, 'customer:' ) ) ) { + $search = trim( str_replace( 'customer:', '', $search ) ); + + // Search by customer ID. + if ( is_numeric( $search ) ) { + $args['customer_id'] = absint( $search ); + + return $args; + } + + // Get customer IDs that match the search string. + $customers = edd_get_customers( + array( + 'search' => $search, + 'fields' => 'ids', + ) + ); + if ( ! empty( $customers ) ) { + $args['customer_id__in'] = $customers; + } else { + $args['customer_id__in'] = array( null ); + } + + return $args; + } + + // The user ID prefixed by `user:`. + if ( ! is_array( $search ) && ( false !== strpos( $search, 'user:' ) ) ) { + $search = trim( str_replace( 'user:', '', $search ) ); + if ( is_numeric( $search ) ) { + $args['user_id'] = absint( $search ); + + return $args; + } + } + + // The Discount Code prefixed by `discount:`. + if ( is_string( $search ) && ( false !== strpos( $search, 'discount:' ) ) ) { + $discount = edd_get_discount_by_code( trim( str_replace( 'discount:', '', $search ) ) ); + if ( ! empty( $discount->id ) ) { + $args['discount_id'] = $discount->id; + } else { + // If no discount object is found, we force the results to be empty. + $args['id__in'] = array( null ); + } + + return $args; + } + + // Default search. + $args['search'] = $search; + + return $args; + } + + /** + * Setup the final data for the table. + * + * @since 1.4 + */ + public function prepare_items() { + wp_reset_vars( array( 'action', 'order', 'orderby', 'order', 's' ) ); + + $hidden = array(); // No hidden columns. + $columns = $this->get_columns(); + $sortable = $this->get_sortable_columns(); + $status = $this->get_status( 'total' ); + $this->items = $this->get_data(); + + $this->_column_headers = array( $columns, $hidden, $sortable ); + if ( empty( $this->counts[ $status ] ) ) { + return; + } + + $this->set_pagination_args( + array( + 'total_pages' => ceil( $this->counts[ $status ] / $this->per_page ), + 'total_items' => $this->counts[ $status ], + 'per_page' => $this->per_page, + ) + ); + } + + /** + * Generate the table navigation above or below the table. + * We're overriding this to turn off the referer param in `wp_nonce_field()`. + * + * @param string $which Which side of the table we're rendering. + * @since 3.1.0.4 + * @since 3.1.1 Outputs the dialogs for deleting orders. + */ + protected function display_tablenav( $which ) { + if ( 'top' === $which ) : + wp_nonce_field( 'bulk-' . $this->_args['plural'], '_wpnonce', false ); + ?> +
    + +
    +
    + +
    + +
    + + has_items() ) : ?> +
    + bulk_actions( $which ); ?> +
    + extra_tablenav( $which ); + $this->pagination( $which ); + ?> + +
    +
    + order_receipts_enabled ) ) { + $email = edd_get_email_by( 'email_id', 'order_receipt' ); + + $this->order_receipts_enabled = $email && $email->status; + } + + return $this->order_receipts_enabled; + } +} diff --git a/includes/admin/payments/class-refund-items-table.php b/includes/admin/payments/class-refund-items-table.php new file mode 100644 index 00000000000..b729c86b741 --- /dev/null +++ b/includes/admin/payments/class-refund-items-table.php @@ -0,0 +1,755 @@ + 'refund-item', + 'plural' => 'refund-items', + 'ajax' => false, + ) ); + + $this->get_counts(); + } + + /** + * Get the base URL for the order item list table. + * + * @since 3.0 + * + * @return string Base URL. + */ + public function get_base_url() {} + + /** + * Retrieve the view types. + * + * @since 3.0 + * + * @return array $views All the views available. + */ + public function get_views() { + return array(); + } + + /** + * Retrieve the table columns. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns. + */ + public function get_columns() { + $columns = array( + 'cb' => '', + 'name' => __( 'Product', 'easy-digital-downloads' ), + 'amount' => __( 'Unit Price', 'easy-digital-downloads' ), + 'quantity' => __( 'Quantity', 'easy-digital-downloads' ), + 'subtotal' => __( 'Subtotal', 'easy-digital-downloads' ), + ); + + // Maybe add tax column. + $order = $this->get_order(); + if ( $order && $order->get_tax_rate() ) { + $columns['tax'] = __( 'Tax', 'easy-digital-downloads' ); + } + + // Total at the end. + $columns['total'] = __( 'Total', 'easy-digital-downloads' ); + + // Return columns. + return $columns; + } + + /** + * Retrieve the sortable columns. + * + * @since 3.0 + * + * @return array Array of all the sortable columns. + */ + public function get_sortable_columns() { return array(); } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'name'; + } + + /** + * Generates a unique ID for an item, to be used as HTML IDs. + * We cannot simply use `$item->id` because it's possible that an order item and order adjustment + * could have the same ID. + * + * @param Order_Item|Order_Adjustment $item + * + * @since 3.0 + * @return string + */ + private function get_item_unique_id( $item ) { + return $item instanceof Order_Item ? 'order-item-' . $item->id : 'order-adjustment-' . $item->id; + } + + /** + * Returns a string that designates the type of object. This is used in HTML `name` attributes. + * + * @param Order_Item|Order_Adjustment $item + * + * @since 3.0 + * @return string + */ + private function get_object_type( $item ) { + return $item instanceof Order_Item ? 'order_item' : 'order_adjustment'; + } + + /** + * Returns the item display name. + * + * @param Order_Item|Order_Adjustment $item + * + * @since 3.0 + * @return string + */ + private function get_item_display_name( $item ) { + $name = ''; + if ( $item instanceof Order_Item ) { + return $item->get_order_item_name(); + } + if ( $item instanceof Order_Adjustment ) { + $name = __( 'Order Fee', 'easy-digital-downloads' ); + if ( 'credit' === $item->type ) { + $name = __( 'Order Credit', 'easy-digital-downloads' ); + } + if ( ! empty( $item->description ) ) { + $name .= ': ' . $item->description; + } + } + + return $name; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 3.0 + * + * @param Order_Item|Order_Adjustment $item Order item or adjustment object. + * @param string $column_name The name of the column. + * + * @return string Column name. + */ + public function column_default( $item, $column_name ) { + $object_type = $this->get_object_type( $item ); + $item_id = $this->get_item_unique_id( $item ); + + switch ( $column_name ) { + case 'amount': + return $this->format_currency( $item, $column_name ); + + case 'total': + return $this->format_currency( $item, $column_name, 0 ); + + case 'quantity': + return $this->get_quantity_column( $item, $column_name, $item_id, $object_type ); + + case 'subtotal': + case 'tax': + return $this->get_adjustable_column( $item, $column_name, $item_id, $object_type ); + + default: + return property_exists( $item, $column_name ) + ? $item->{$column_name} + : ''; + } + } + + /** + * This private function formats a column value for currency. + * + * @since 3.0 + * + * @param Order_Item|Order_Adjustment $item Item object. + * @param string $column_name ID of the column being displayed. + * @param false|float $amount_override Amount override, in case it's not in the order item. + * + * @return string Formatted amount. + */ + private function format_currency( $item, $column_name, $amount_override = false ) { + $symbol = $this->get_currency_symbol( $item->order_id ); + $currency_pos = edd_get_option( 'currency_position', 'before' ); + + $formatted_amount = ''; + + if ( 'before' === $currency_pos ) { + $formatted_amount .= $symbol; + } + + // Order Adjustments do not have an `amount` column. We can use `subtotal` instead. + if ( 'amount' === $column_name && $item instanceof Order_Adjustment ) { + $column_name = 'subtotal'; + } + + $amount = false !== $amount_override ? $amount_override : $item->{$column_name}; + + $formatted_amount .= '' . edd_format_amount( $amount, true, $this->get_order_currency_decimals( $item->order_id ) ) . ''; + + if ( 'after' === $currency_pos ) { + $formatted_amount .= $symbol; + } + + return $formatted_amount; + } + + /** + * This private function returns the form input for refundable items, + * or amounts for items which have already been refunded. + * + * @param Order_Item $item The item object. + * @param string $column_name ID of the column being displayed. + * @param string $item_id Unique ID of the order item for the refund modal. + * @param string $object_type The item type. + * @return string + */ + private function get_adjustable_column( $item, $column_name, $item_id, $object_type ) { + + if ( 'refunded' === $item->status ) { + return $this->format_currency( $item, $column_name, 0 ); + } + + $currency_pos = edd_get_option( 'currency_position', 'before' ); + + // Maximum amounts that can be refunded. + $refundable_amounts = $item->get_refundable_amounts(); + $amount_remaining = array_key_exists( $column_name, $refundable_amounts ) ? $refundable_amounts[ $column_name ] : $item->{$column_name}; + + /* + * Original amount. + * For subtotals, we actually do subtotal minus discounts for simplicity so that the end user + * doesn't have to juggle that. + */ + $original_amount = $item->{$column_name}; + if ( 'subtotal' === $column_name && ! empty( $item->discount ) ) { + $original_amount -= $item->discount; + } + ob_start(); + ?> +
    + +
    + '; + echo esc_html( $this->get_currency_symbol( $item->order_id ) ); + echo ''; + } + ?> + + + + '; + echo esc_html( $this->get_currency_symbol( $item->order_id ) ); + echo ''; + } + ?> +
    + + format_currency( $item, $column_name, $amount_remaining ); + ?> + +
    + get_refundable_amounts(); + $item_quantity = 'order_item' === $object_type ? $refundable_amounts['quantity'] : 1; + ob_start(); + ?> +
    + +
    + + + + $options, + 'name' => 'refund_' . esc_attr( $object_type ) . '[' . esc_attr( $item->id ) . '][quantity]', + 'id' => 'edd-order-item-quantity-' . esc_attr( $item_id ), + 'class' => 'edd-order-item-refund-quantity edd-order-item-refund-input', + 'disabled' => true, + 'show_option_all' => false, + 'show_option_none' => false, + 'chosen' => false, + 'selected' => $item_quantity, + 'data' => array( + 'max' => intval( $item_quantity ), + 'original' => intval( $item->quantity ), + ), + ); + ?> + html->select( $args ); ?> + +
    +
    + currency ); + } else { + $currency_decimals = 2; + } + } + + return $currency_decimals; + } + + /** + * Retrieves the currency symbol for a given order item. + * + * @param int $order_id + * + * @since 3.0 + * @return string|null + */ + private function get_currency_symbol( $order_id ) { + static $symbol = null; + + if ( is_null( $symbol ) ) { + $order = edd_get_order( $order_id ); + + if ( $order ) { + $symbol = edd_currency_symbol( $order->currency ); + } + } + + return $symbol; + } + + /** + * Render the checkbox column + * + * @since 3.0 + * + * @param Order_Item|Order_Adjustment $item Order Item or Order Adjustment object. + * + * @return string + */ + public function column_cb( $item ) { + $object_type = $this->get_object_type( $item ); + $refundable_amounts = $item->get_refundable_amounts(); + $total_remaining = array_key_exists( 'total', $refundable_amounts ) ? floatval( $refundable_amounts['total'] ) : 0.00; + + if ( 'refunded' !== $item->status && 0.00 != $total_remaining ) { + + return sprintf( + '', + /*$1%s*/ + 'refund_' . esc_attr( $object_type ), + /*$2%s*/ + esc_attr( $item->id ), + /* translators: %s: The product name */ + esc_html( sprintf( _x( 'Select %s', 'Title: The title of the current download product', 'easy-digital-downloads' ), $this->get_item_display_name( $item ) ) ) + ); + } + + return ''; + } + + /** + * Render the Name Column + * + * @since 3.0 + * + * @param Order_Item|Order_Adjustment $item Order Item object. + * + * @return string Data shown in the Name column + */ + public function column_name( $item ) { + $checkbox_id = 'refund_' . $this->get_object_type( $item ) . '-' . $item->id; + $display_name = esc_html( $this->get_item_display_name( $item ) ); + $status_label = ! empty( $item->status ) && 'complete' !== $item->status ? ' — ' . edd_get_status_label( $item->status ) : ''; + + if ( 'refunded' === $item->status ) { + return '' . $display_name . '' . esc_html( $status_label ); + } + + return '' . $status_label; + } + + /** + * Message to be displayed when there are no items + * + * @since 3.0 + */ + public function no_items() { + esc_html_e( 'No items found.', 'easy-digital-downloads' ); + } + + /** + * Retrieve the bulk actions + * + * @since 3.0 + * @return array $actions Array of the bulk actions + */ + public function get_bulk_actions() { return array(); } + + /** + * Process the bulk actions + * + * @since 3.0 + */ + public function process_bulk_action() {} + + /** + * Retrieve the order_item code counts + * + * @todo Fees aren't included in this count, but where does this actually get used anyway? + * + * @since 3.0 + */ + public function get_counts() { + + // Maybe retrieve counts. + if ( ! edd_is_add_order_page() ) { + + // Check for an order ID + $order_id = ! empty( $_POST['order_id'] ) + ? absint( $_POST['order_id'] ) // WPCS: CSRF ok. + : 0; + + // Get counts + $this->counts = edd_get_order_item_counts( array( + 'order_id' => $order_id, + ) ); + } + } + + /** + * Retrieve all order data to be shown on the refund table. + * This includes order items and order adjustments. + * + * @since 3.0 + * @return Order[]|Order_Adjustment[] All order items and order adjustments associated with the current order. + */ + public function get_data() { + $order = $this->get_order(); + + if ( empty( $order ) ) { + return array(); + } + + // Get order items. + $order_items = edd_get_order_items( array( + 'order_id' => $order->id, + 'number' => 999, + ) ); + + // Get order fees + $order_fees = $order->get_fees(); + + // Get order credits. + $credits = edd_get_order_adjustments( array( + 'object_id' => $order->id, + 'object_type' => 'order', + 'type' => 'credit', + ) ); + + return array_merge( $order_items, $order_fees, $credits ); + } + + /** + * Setup the final data for the table + * + * @since 3.0 + */ + public function prepare_items() { + $this->_column_headers = array( + $this->get_columns(), + array(), + $this->get_sortable_columns(), + ); + + $this->items = $this->get_data(); + } + + /** + * Generates content for a single row of the table + * + * @since 3.0 + * + * @param Order_Item|Order_Adjustment $item Order item object. + */ + public function single_row( $item ) { + + $is_adjustment = $item instanceof Order_Adjustment; + $item_class = $is_adjustment ? $item->object_id : $item->order_id; + // Status. + $classes = array_map( 'sanitize_html_class', array( + 'order-' . $item_class, + $item->status, + 'refunditem', + ) ); + + // Turn into a string. + $class = implode( ' ', $classes ); + $item_id = $this->get_item_unique_id( $item ); + + $is_credit = $is_adjustment && 'credit' === $item->type; + ?> + ="id ); ?>" class=""> + single_row_columns( $item ); ?> + + _args['singular']; + + wp_nonce_field( 'edd_process_refund', 'edd_process_refund' ); + $this->screen->render_screen_reader_content( 'heading_list' ); + ?> + + + + print_column_headers(); ?> + + + + > + display_rows_or_placeholder(); ?> + + +
    +
    + get_order() ); + + $this->display_tablenav( 'bottom' ); + ?> +
    + +
    + +
    + items as $item ) { + + if ( empty( $order_id ) ) { + $order_id = $item->order_id; + } + + $this->single_row( $item ); + } + + $currency_symbol = $this->get_currency_symbol( $order_id ); + + // Now we need to add the columns for the totals. + ?> + + + + + %s', $currency_symbol ); + $before = 'before' === $currency_position ? $currency_symbol_output : ''; + $after = 'after' === $currency_position ? $currency_symbol_output : ''; + $amount = edd_format_amount( 0.00, true, $this->get_order_currency_decimals( $order_id ) ); + printf( + '%1$s%2$s%3$s', + $before, // phpcs:ignore + esc_attr( $amount ), + $after // phpcs:ignore + ); + ?> + + + + get_order(); + if ( $order && $order->get_tax_rate() ) : + ?> + + + + + %1$s%2$s%3$s', + $before, // phpcs:ignore + esc_attr( $amount ), + $after // phpcs:ignore + ); + ?> + + + + + + + + + %1$s%2$s%3$s', + $before, // phpcs:ignore + esc_attr( $amount ), + $after // phpcs:ignore + ); + ?> + + + id ) { + return; + } + + // Do not show on Add or View Order/Refund. + if ( isset( $_GET['view'] ) ) { + return; + } + + $pass_manager = new Pass_Manager(); + if ( $pass_manager->isFree() ) { + $docs_url = edd_link_helper( + 'https://easydigitaldownloads.com/docs/', + array( + 'utm_medium' => 'orders-contextual-help', + 'utm_content' => 'documentation', + ) + ); + + $upgrade_url = edd_link_helper( + 'https://easydigitaldownloads.com/lite-upgrade/', + array( + 'utm_medium' => 'orders-contextual-help', + 'utm_content' => 'lite-upgrade', + ) + ); + + $screen->set_help_sidebar( + '

    ' . __( 'For more information:', 'easy-digital-downloads' ) . '

    ' . + /* translators: %s: Documentation URL */ + '

    ' . sprintf( __( 'Visit the documentation on the Easy Digital Downloads website.', 'easy-digital-downloads' ), $docs_url ) . '

    ' . + '

    ' . sprintf( + /* translators: %s: Upgrade URL */ + __( 'Need more from your Easy Digital Downloads store? Upgrade Now!', 'easy-digital-downloads' ), + $upgrade_url + ) . '

    ' + ); + } + + $screen->add_help_tab( + array( + 'id' => 'edd-payments-overview', + 'title' => __( 'Overview', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'This screen provides access to all of the orders and refunds in your store.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Orders can be searched by email address, user name, or filtered by status, mode, date range, gateway, and more!', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'To maintain accurate reporting and accounting, we strongly advise against deleting any completed order data.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-orders', + 'title' => __( '— Orders', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'Orders are placed by customers when they buy things from your store.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Every order contains a snapshot of your store at the time the order was placed, and is made up of many different pieces of information.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Things like products, discounts, taxes, fees, and customer email address, are all examples of information that is saved with each order.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Both full and partial refunds are supported.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-refunds', + 'title' => __( '— Refunds', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'Refunds are created when a customer would like money back from a completed order.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Every refund refers back to the original order, and only contains the items and adjustments that were refunded.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Refunds could be entire orders, or single products.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Once an item is refunded, it cannot be undone; it can only be repurchased.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-payments-search', + 'title' => __( 'Search', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'The order history can be searched in several different ways.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'You can enter:', 'easy-digital-downloads' ) . '

    ' . + '
      +
    • ' . __( 'The specific order ID', 'easy-digital-downloads' ) . '
    • +
    • ' . __( 'The 32-character order key', 'easy-digital-downloads' ) . '
    • +
    • ' . __( 'The customer\'s email address', 'easy-digital-downloads' ) . '
    • +
    • ' . sprintf( + /* translators: %s: the prefix needed to search by customer - This should remain untranslated `customer:` */ + __( 'The customer\'s name or ID prefixed by %s', 'easy-digital-downloads' ), + 'customer:' + ) . '
    • +
    • ' . sprintf( + /* translators: %s: the prefix needed to search by user - This should remain untranslated `user:` */ + __( 'A user\'s ID prefixed by %s', 'easy-digital-downloads' ), + 'user:' + ) . '
    • +
    • ' . sprintf( + /* translators: %s: the prefix needed to search by Order ID - This should remain untranslated `#` */ + __( 'The %1$s ID prefixed by %2$s', 'easy-digital-downloads' ), + edd_get_label_singular(), + '#' + ) . '
    • +
    • ' . sprintf( + /* translators: %s: the prefix needed to search by discount code - This should remain untranslated `discount:` */ + __( 'The Discount Code prefixed by %s', 'easy-digital-downloads' ), + 'discount:' + ) . '
    • +
    • ' . sprintf( + /* translators: %s: the prefix needed to search by transaction ID - This should remain untranslated `txn:` */ + __( 'A transaction ID prefixed by %s', 'easy-digital-downloads' ), + 'txn:' + ) . '
    • +
    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-payments-details', + 'title' => __( 'Details', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'Each order can be further inspected by clicking the corresponding View Order Details link. This will provide more information including:', 'easy-digital-downloads' ) . '

    ' . + + '
      +
    • Purchased File - ' . __( 'The file associated with the purchase.', 'easy-digital-downloads' ) . '
    • +
    • Purchase Date - ' . __( 'The exact date and time the order was completed.', 'easy-digital-downloads' ) . '
    • +
    • Discount Used - ' . __( 'If a coupon or discount was used during the checkout process.', 'easy-digital-downloads' ) . '
    • +
    • Name - ' . __( "The buyer's name.", 'easy-digital-downloads' ) . '
    • +
    • Email - ' . __( "The buyer's email address.", 'easy-digital-downloads' ) . '
    • +
    • Payment Notes - ' . __( 'Any customer-specific notes related to the order.', 'easy-digital-downloads' ) . '
    • +
    • Payment Method - ' . __( 'The name of the order gateway used to complete the order.', 'easy-digital-downloads' ) . '
    • +
    • Purchase Key - ' . __( 'A unique key used to identify the order.', 'easy-digital-downloads' ) . '
    • +
    ', + ) + ); + + do_action( 'edd_payments_contextual_help', $screen ); +} +add_action( 'load-download_page_edd-payment-history', 'edd_payments_contextual_help' ); diff --git a/includes/admin/payments/edit-payment.php b/includes/admin/payments/edit-payment.php deleted file mode 100755 index 9c3d0f8492c..00000000000 --- a/includes/admin/payments/edit-payment.php +++ /dev/null @@ -1,96 +0,0 @@ - -
    -

    : -

    -
    - - - - - - - - - - - - - - - - - - - -
    - - - -

    -
    - - - ' . get_the_title($id) . ' - Remove'; - endforeach; - endif; - ?> -

    -
    - - - -
    - - - - - - -
    - -
    \ No newline at end of file diff --git a/includes/admin/payments/orders.php b/includes/admin/payments/orders.php new file mode 100644 index 00000000000..00766bf4261 --- /dev/null +++ b/includes/admin/payments/orders.php @@ -0,0 +1,1364 @@ + + +
    +
    + +
    + +
    +
    +
    + + + + __( 'Checking this box will email the purchase receipt to the selected customer.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +
    +
    +
    + + +
    + + + autofocus + + /> +
    +
    + +
    +
    + +
    + +
    + + use_js = true; + $sections->current_section = 'customer'; + $sections->item = $item; + $sections->base_url = ''; + + // Get all registered tabs & views + $o_sections = edd_get_order_details_sections( $item ); + + // Set the customer sections + $sections->set_sections( $o_sections ); + + // Display the sections + $sections->display(); +} + +/** + * Return the order details sections. + * + * @since 3.0 + * + * @param object $order + * @return array Sections. + */ +function edd_get_order_details_sections( $order ) { + $sections = array( + array( + 'id' => 'customer', + 'label' => __( 'Customer', 'easy-digital-downloads' ), + 'icon' => 'businessman', + 'callback' => 'edd_order_details_customer', + ), + array( + 'id' => 'email', + 'label' => __( 'Email', 'easy-digital-downloads' ), + 'icon' => 'email', + 'callback' => 'edd_order_details_email', + ), + array( + 'id' => 'address', + 'label' => __( 'Address', 'easy-digital-downloads' ), + 'icon' => 'admin-home', + 'callback' => 'edd_order_details_addresses', + ), + array( + 'id' => 'notes', + 'label' => __( 'Notes', 'easy-digital-downloads' ), + 'icon' => 'admin-comments', + 'callback' => 'edd_order_details_notes', + ), + array( + 'id' => 'logs', + 'label' => __( 'Tools', 'easy-digital-downloads' ), + 'icon' => 'admin-tools', + 'callback' => 'edd_order_details_logs', + ), + ); + + // Override sections if adding a new order. + if ( edd_is_add_order_page() ) { + $sections = array( + array( + 'id' => 'customer', + 'label' => __( 'Customer', 'easy-digital-downloads' ), + 'icon' => 'businessman', + 'callback' => 'edd_order_details_customer', + ), + array( + 'id' => 'address', + 'label' => __( 'Address', 'easy-digital-downloads' ), + 'icon' => 'admin-home', + 'callback' => 'edd_order_details_addresses', + ), + ); + } + + /** + * Filter the sections. + * + * @since 3.0 + * + * @param array $sections Sections. + * @param object $order Order object. + */ + return (array) apply_filters( 'edd_get_order_details_sections', $sections, $order ); +} + +/** + * Output the order details customer section + * + * @since 3.0 + * + * @param EDD\Orders\Order $order The order object. + */ +function edd_order_details_customer( $order ) { + $customer = edd_get_customer( $order->customer_id ); + $payment = edd_get_payment( $order->id ); + $user_info = $payment + ? $payment->user_info + : array(); + + $change_text = edd_is_add_order_page() + ? esc_html__( 'Assign', 'easy-digital-downloads' ) + : esc_html__( 'Switch Customer', 'easy-digital-downloads' ); + + $customer_id = ! empty( $customer ) + ? $customer->id + : 0; + ?> + +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + html->customer_dropdown( + array( + 'class' => 'edd-payment-change-customer-input edd-form-group__input', + 'selected' => $customer_id, + 'id' => 'customer_id', + 'name' => 'customer-id', + 'none_selected' => esc_html__( 'Search for a customer', 'easy-digital-downloads' ), + 'placeholder' => esc_html__( 'Search for a customer', 'easy-digital-downloads' ), + ) + ); // WPCS: XSS ok. + ?> +
    +
    + + + +
    + +
    +
    + +
    + +
    +
    + + +
    + + get_meta(), $user_info ); + } + do_action( 'edd_payment_view_details', $order->id ); +} + +/** + * Output the order details email section + * + * @since 3.0 + * + * @param object $order + */ +function edd_order_details_email( $order ) { + $customer = edd_get_customer( $order->customer_id ); + $all_emails = array( 'primary' => $customer->email ); + + if ( $customer->email !== $order->email ) { + $all_emails['order'] = $order->email; + } + + foreach ( $customer->emails as $key => $email ) { + if ( $customer->email === $email ) { + continue; + } + + $all_emails[ $key ] = $email; + } + + $help = sprintf( + /* translators: email type */ + __( 'Send a new copy of the purchase receipt to the %s email address. If download URLs were included in the original receipt, new ones will be included.', 'easy-digital-downloads' ), + count( $all_emails ) > 1 ? __( 'selected', 'easy-digital-downloads' ) : __( 'customer', 'easy-digital-downloads' ) + ); + $order_receipt = edd_get_email_by( 'email_id', 'order_receipt' ); + if ( $order_receipt && ! $order_receipt->status ) { + $help = __( 'Sending purchase receipts from Easy Digital Downloads has been disabled.', 'easy-digital-downloads' ); + } + + $is_multiselect = count( $all_emails ) > 1; + $label_text = $is_multiselect ? __( 'Send email receipt to', 'easy-digital-downloads' ) : __( 'Email Address', 'easy-digital-downloads' ); + ?> + +
    +
    + + +
    + + + + + +
    + +

    + +

    +
    + +

    + status ) : ?> + 'email_links', + 'purchase_id' => absint( $order->id ), + ) + ); + ?> + href="" + + disabled + + id="" + class="button button-secondary" + > + + +

    + + id ); ?> +
    + 0, + 'order_id' => 0, + 'first_name' => '', + 'last_name' => '', + 'address' => '', + 'address2' => '', + 'city' => '', + 'region' => '', + 'postal_code' => '', + 'country' => '', + ) + : $order->get_address(); + ?> + +
    + id ); ?> + +
    +

    + + + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + html->country_select( + array( + 'name' => 'edd_order_address[country]', + 'id' => 'edd-order-address-country', + 'class' => 'edd-order-address-country edd-form-group__input', + 'show_option_all' => false, + 'data' => array( + 'nonce' => wp_create_nonce( 'edd-country-field-nonce' ), + 'search-type' => 'no_ajax', + 'search-placeholder' => esc_html__( 'Search Countries', 'easy-digital-downloads' ), + ), + ), + $address->country + ); // WPCS: XSS ok. + ?> +
    +
    + +
    + +
    + country ); + if ( ! empty( $states ) ) { + echo EDD()->html->region_select( + array( + 'name' => 'edd_order_address[region]', + 'id' => 'edd_order_address_region', + 'class' => 'edd-order-address-region edd-form-group__input', + 'data' => array( + 'search-type' => 'no_ajax', + 'search-placeholder' => esc_html__( 'Search Regions', 'easy-digital-downloads' ), + ), + ), + $address->country, + $address->region + ); // WPCS: XSS ok. + } else { + ?> + + +
    +
    + + + +
    + +
    + + id ); +} + +/** + * Output the order details notes section + * + * @since 3.0 + * + * @param object $order + */ +function edd_order_details_notes( $order ) { + $notes = edd_get_payment_notes( $order->id ); + ?> + +
    + + id, 'order' ); // WPCS: XSS ok. ?> +
    + + + +
    + id ); + $download_log_url = edd_get_admin_url( + array( + 'page' => 'edd-tools', + 'tab' => 'logs', + 'payment' => absint( $order->id ), + ) + ); + $customer_log_url = edd_get_admin_url( + array( + 'page' => 'edd-tools', + 'tab' => 'logs', + 'customer' => absint( $order->customer_id ), + ) + ); + $customer_orders_url = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'customer' => absint( $order->customer_id ), + ) + ); + ?> +

    +

    +

    +

    + + id ); + + if ( current_user_can( 'edit_shop_payments' ) ) { + $link = wp_nonce_url( add_query_arg( 'edd-action', 'recalculate_order' ), 'edd_recalculate_order_nonce' ); + ?> +
    +
    + +
    + +
    + + $order->id, + 'number' => 999, + ) + ); + + foreach ( $items as $item ) { + $item_adjustments = array(); + + $adjustments = edd_get_order_adjustments( + array( + 'object_id' => $item->id, + 'number' => 999, + 'object_type' => 'order_item', + 'type' => array( + 'discount', + 'credit', + 'fee', + ), + ) + ); + + foreach ( $adjustments as $adjustment ) { + // @todo edd_get_order_adjustment_to_json()? + $adjustment_args = array( + 'id' => esc_html( $adjustment->id ), + 'objectId' => esc_html( $adjustment->object_id ), + 'objectType' => esc_html( $adjustment->object_type ), + 'typeId' => esc_html( $adjustment->type_id ), + 'type' => esc_html( $adjustment->type ), + 'description' => esc_html( $adjustment->description ), + 'subtotal' => esc_html( $adjustment->subtotal ), + 'tax' => esc_html( $adjustment->tax ), + 'total' => esc_html( $adjustment->total ), + 'dateCreated' => esc_html( $adjustment->date_created ), + 'dateModified' => esc_html( $adjustment->date_modified ), + 'uuid' => esc_html( $adjustment->uuid ), + ); + + $item_adjustments[] = $adjustment_args; + $_adjustments[] = $adjustment_args; + } + + // @todo edd_get_order_item_to_json()? + $_items[] = array( + 'id' => esc_html( $item->id ), + 'orderId' => esc_html( $item->order_id ), + 'productId' => esc_html( $item->product_id ), + 'productName' => esc_html( $item->get_order_item_name() ), + 'priceId' => esc_html( $item->price_id ), + 'cartIndex' => esc_html( $item->cart_index ), + 'type' => esc_html( $item->type ), + 'status' => esc_html( $item->status ), + 'statusLabel' => esc_html( edd_get_status_label( $item->status ) ), + 'quantity' => esc_html( $item->quantity ), + 'amount' => esc_html( $item->amount ), + 'subtotal' => esc_html( $item->subtotal ), + 'discount' => esc_html( $item->discount ), + 'tax' => esc_html( $item->tax ), + 'total' => esc_html( $item->total ), + 'dateCreated' => esc_html( $item->date_created ), + 'dateModified' => esc_html( $item->date_modified ), + 'uuid' => esc_html( $item->uuid ), + 'deliverable' => $item->is_deliverable(), + 'adjustments' => $item_adjustments, + ); + } + + $adjustments = edd_get_order_adjustments( + array( + 'object_id' => $order->id, + 'number' => 999, + 'object_type' => 'order', + 'type' => array( + 'discount', + 'credit', + 'fee', + ), + ) + ); + + foreach ( $adjustments as $adjustment ) { + // @todo edd_get_order_adjustment_to_json()? + $_adjustments[] = array( + 'id' => esc_html( $adjustment->id ), + 'objectId' => esc_html( $adjustment->object_id ), + 'objectType' => esc_html( $adjustment->object_type ), + 'typeId' => esc_html( $adjustment->type_id ), + 'type' => esc_html( $adjustment->type ), + 'description' => esc_html( $adjustment->description ), + 'subtotal' => esc_html( $adjustment->subtotal ), + 'tax' => esc_html( $adjustment->tax ), + 'total' => esc_html( $adjustment->total ), + 'dateCreated' => esc_html( $adjustment->date_created ), + 'dateModified' => esc_html( $adjustment->date_modified ), + 'uuid' => esc_html( $adjustment->uuid ), + ); + } + + $refunds = edd_get_order_refunds( $order->id ); + + foreach ( $refunds as $refund ) { + $_refunds[] = array( + 'id' => esc_html( $refund->id ), + 'number' => esc_html( $refund->order_number ), + 'total' => esc_html( $refund->total ), + 'dateCreated' => esc_html( $refund->date_created ), + 'dateCreatedi18n' => esc_html( edd_date_i18n( $refund->date_created ) ), + 'uuid' => esc_html( $refund->uuid ), + ); + } + } + + $has_tax = 'none'; + $tax_rate = $order->id ? $order->get_tax_rate() : false; + + $location = array( + 'rate' => $tax_rate, + 'country' => '', + 'region' => '', + 'inclusive' => edd_prices_include_tax(), + ); + + if ( edd_is_add_order_page() && edd_use_taxes() ) { + $default_rate = edd_get_tax_rate_by_location( + array( + 'country' => '', + 'region' => '', + ) + ); + if ( $default_rate ) { + $location['rate'] = floatval( $default_rate->amount ); + } + $has_tax = $location; + } elseif ( $tax_rate ) { + $has_tax = $location; + $has_tax['rate'] = $tax_rate; + + if ( $order->tax_rate_id ) { + $tax_rate_object = $order->get_tax_rate_object(); + + if ( $tax_rate_object ) { + $has_tax['country'] = $tax_rate_object->name; + $has_tax['region'] = $tax_rate_object->description; + } + } + } + + $has_quantity = true; + if ( edd_is_add_order_page() && ! edd_item_quantities_enabled() ) { + $has_quantity = false; + } + + wp_localize_script( + 'edd-admin-orders', + 'eddAdminOrderOverview', + array( + 'items' => $_items, + 'adjustments' => $_adjustments, + 'refunds' => $_refunds, + 'isAdding' => true === edd_is_add_order_page(), + 'hasQuantity' => $has_quantity, + 'hasTax' => $has_tax, + 'hasDiscounts' => true === edd_has_active_discounts(), + 'order' => array( + 'status' => $order->status, + 'currency' => $order->currency, + 'currencySymbol' => html_entity_decode( edd_currency_symbol( $order->currency ) ), + 'subtotal' => $order->subtotal, + 'discount' => $order->discount, + 'tax' => $order->tax, + 'total' => $order->total, + ), + 'nonces' => array( + 'edd_admin_order_get_item_amounts' => wp_create_nonce( 'edd_admin_order_get_item_amounts' ), + ), + 'i18n' => array( + 'closeText' => esc_html__( 'Close', 'easy-digital-downloads' ), + ), + ) + ); + + $templates = array( + 'actions', + 'subtotal', + 'tax', + 'total', + 'item', + 'adjustment', + 'adjustment-discount', + 'refund', + 'no-items', + 'copy-download-link', + 'form-add-order-item', + 'form-add-order-discount', + 'form-add-order-adjustment', + ); + + foreach ( $templates as $tmpl ) { + echo ''; + } + ?> + +
    + + + + + + + + + + + +
    + +
    +
    + + id ); +} + +/** + * Output the order details sections box + * + * @since 3.0 + * + * @param object $order + */ +function edd_order_details_sections( $order ) { + ?> + +
    +

    + +

    + +
    + + id ) + ? $order->get_transaction_id() + : ''; + + $unlimited = ! empty( $order->id ) + ? $order->has_unlimited_downloads() + : false; + + $readonly = ! empty( $order->id ) + ? 'readonly' + : ''; + + // Setup gateway list. + if ( empty( $order->id ) ) { + $known_gateways = edd_get_payment_gateways(); + + $gateways = array(); + + foreach ( $known_gateways as $id => $data ) { + $gateways[ $id ] = esc_html( $data['admin_label'] ); + } + } + + // Filter the transaction ID (here specifically for back-compat) + if ( ! empty( $transaction_id ) ) { + $transaction_id = apply_filters( 'edd_payment_details_transaction_id-' . $order->gateway, $transaction_id, $order->id ); + } + ?> + +
    +

    + +

    + +
    +
    + id ); ?> + + + +
    + + gateway ); ?> +
    + +
    +
    + +
    + html->select( + array( + 'name' => 'gateway', + 'class' => 'edd-form-group__input', + 'id' => 'edd_gateway_select', + 'options' => $gateways, + 'selected' => 'manual', + 'show_option_none' => false, + 'show_option_all' => false, + ) + ); // WPCS: XSS ok. + ?> +
    +
    +
    + + +
    +
    + +
    + value="payment_key ); ?>" /> +
    +
    +
    + + +
    +
    + +
    + +
    +
    +
    + +
    + + id ); // WPCS: XSS ok. ?> +
    + + + +
    + + +
    + + + status ) { + $dispute_id = edd_get_order_dispute_id( $order->id ); + if ( $dispute_id ) { + $dispute_id = apply_filters( "edd_payment_details_dispute_id_{$order->gateway}", $dispute_id, $order ); + ?> +
    + + +
    + + + +
    +
    + +
    + +
    +
    +
    + + +
    +
    +
    + /> + + + __( 'Checking this box will override all other file download limits for this purchase, granting the customer unlimited downloads of all files included on the purchase.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +
    +
    +
    + + +
    + + date_actions_run ) ) { + $status = 'success'; + $label = __( 'Completed', 'easy-digital-downloads' ); + } elseif ( wp_next_scheduled( 'edd_after_payment_scheduled_actions', array( intval( $order->id ), false ) ) ) { + $status = 'processing'; + $label = __( 'Scheduled', 'easy-digital-downloads' ); + } + + $status_badge = new EDD\Utils\StatusBadge( + array( + 'status' => $status, + 'label' => $label, + ) + ); + + echo $status_badge->get(); + if ( empty( $status ) ) { + $tooltip = new EDD\HTML\Tooltip( + array( + 'content' => __( 'Deferred Actions were added in Easy Digital Downloads 2.8. Orders placed on prior versions will not have a deferred actions status. If this order was placed on a version of Easy Digital Downloads supporting Deferred Actions, please verify that WP Cron is able to be run.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + } + ?> +
    + + + id ); ?> +
    +
    +
    + + id )->get_recovery_url(); + + $order_date = edd_get_edd_timezone_equivalent_date_from_utc( EDD()->utils->date( $order->date_created, 'utc', true ) ); + + ?> + +
    +

    + +

    + +
    +
    +
    +
    + +
    + +
    +
    + + id ); + if ( $hold_reason ) { + $label = 'on_hold' === $order->status ? + __( 'On Hold Due To:', 'easy-digital-downloads' ) : + __( 'Original Hold Reason:', 'easy-digital-downloads' ); + if ( is_array( $hold_reason ) ) { + $hold_reason = array_map( 'edd_get_order_hold_reason_label', $hold_reason ); + $hold_reason = implode( ', ', $hold_reason ); + } else { + $hold_reason = edd_get_order_hold_reason_label( $hold_reason ); + } + ?> +
    + + +
    + 'edd-payment-history', + 'order_type' => 'sale', + 'edd-action' => 'trash_order', + 'purchase_id' => absint( $order->id ), + ) + ), + 'edd_payment_nonce' + ); + ?> +
    + + + +
    + +
    + + id ) && ! empty( $recovery_url ) ) : ?> +
    +
    + +
    + +
    +
    +
    + + +
    +
    + +
    + +
    +
    +
    + +
    +
    + + + + +
    + + + : + + + +
    +
    +
    + + id ); ?> + +
    +
    + +
    + + $status, + 'label' => edd_get_payment_status_label( $order_status ), + 'icon' => $icon, + 'class' => "edd-admin-order-status-badge--{$order_status}", + ), + $order_status, + $order + ); + $status_badge = new EDD\Utils\StatusBadge( $status_badge_args ); + + /** + * Filters the markup for the order status badge icon. + * + * @since 3.0 + * + * @param string $icon Icon HTML markup. + * @param string $order_status Order status slug. + * @param EDD\Orders\Order $order Order object. Added in 3.2.7. + */ + $icon = apply_filters( 'edd_get_order_status_badge_icon', $status_badge->get_icon(), $order_status, $order ); + + return $status_badge->get( $icon ); +} diff --git a/includes/admin/payments/payments-history.php b/includes/admin/payments/payments-history.php index 1d16e4afc42..16e9354d97a 100755 --- a/includes/admin/payments/payments-history.php +++ b/includes/admin/payments/payments-history.php @@ -1,333 +1,224 @@ $label ) { + $tabs[ $type ] = array( + 'name' => $label, + 'url' => edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'order_type' => $type, + ), + ), + ); + } + $navigation = new EDD\Admin\Menu\SecondaryNavigation( + $tabs, + 'edd-payment-history', + array( + 'active_tab' => $active_tab, + 'show_search' => $show_search, + ) + ); + $navigation->render(); +} /** - * Payment History Page + * Retrieve the order pages. * - * Renders the payment history page contents. + * Used only by the primary tab navigation for orders. * - * @access private - * @since 1.0 - * @return void -*/ + * @since 3.0 + * + * @return array + */ +function edd_get_order_pages() { + + // Get types and setup return value + $types = edd_get_order_types(); + $retval = array(); + + // Loop through and get type IDs and labels + foreach ( $types as $type_id => $type ) { + + // Skip if hidden + if ( empty( $type['show_ui'] ) ) { + continue; + } + + // Add to return array + $retval[ $type_id ] = ! empty( $type['labels']['plural'] ) + ? $type['labels']['plural'] + : ucwords( $type_id ); + } + + // Filter & return + return (array) apply_filters( 'edd_get_order_pages', $retval ); +} + +/** + * Get the payment view + * + * @since 3.0 + * + * @return string + */ +function edd_get_payment_view() { + return ! empty( $_GET['view'] ) // WPCS: CSRF ok. + ? sanitize_key( $_GET['view'] ) // WPCS: CSRF ok. + : 'list'; +} +/** + * Render one of the Order pages. + * + * @since 1.0 + * @since 3.0 Nomenclature updated for consistency. + * Add a link to manually add orders. + * Changed to switch statement. + */ function edd_payment_history_page() { - global $edd_options; - - if(isset($_GET['edd-action']) && $_GET['edd-action'] == 'edit-payment') { - include_once(EDD_PLUGIN_DIR . '/includes/admin/payments/edit-payment.php'); - } else { - - $current_page = admin_url('edit.php?post_type=download&page=edd-payment-history'); + + // What are we viewing? + switch ( edd_get_payment_view() ) { + + // View Order + case 'view-order-details': + require_once EDD_PLUGIN_DIR . 'includes/admin/payments/view-order-details.php'; + break; + + // Add Order + case 'add-order': + require_once EDD_PLUGIN_DIR . 'includes/admin/payments/add-order.php'; + edd_add_order_page_content(); + break; + + // View Refund + case 'view-refund-details': + require_once EDD_PLUGIN_DIR . 'includes/admin/payments/view-refund.php'; + edd_view_refund_page_content(); + break; + + // List Table + case 'list': + default: + edd_order_list_table_content(); + break; + } +} + +/** + * Output the list table used to list out all orders. + * + * @since 3.0 + */ +function edd_order_list_table_content() { + require_once EDD_PLUGIN_DIR . 'includes/admin/payments/class-payments-table.php'; + $orders_table = new EDD_Payment_History_Table(); + $orders_table->prepare_items(); + + $active_tab = sanitize_key( $orders_table->get_request_var( 'order_type', 'sale' ) ); + $admin_url = edd_get_admin_url( array( 'page' => 'edd-payment-history' ) ); + + edd_orders_page_primary_nav( $active_tab, true ); + ?> +
    +

    + 'add-order' ), $admin_url ); + printf( + '%s', + esc_url( $add_new_url ), + esc_html__( 'Add New', 'easy-digital-downloads' ) + ); + } ?> -
    - 0) { - $per_page = intval($_GET['show']); - } - $total_pages = 1; - $offset = $per_page * ($page-1); - - $mode = isset($_GET['mode']) ? $_GET['mode'] : 'live'; - if(edd_is_test_mode() && !isset($_GET['mode'])) $mode = 'test'; - - $orderby = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'ID'; - $order = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC'; - $order_inverse = $order == 'DESC' ? 'ASC' : 'DESC'; - $order_class = strtolower($order_inverse); - $user = isset( $_GET['user'] ) ? $_GET['user'] : null; - $status = isset( $_GET['status'] ) ? $_GET['status'] : 'any'; - $meta_key = isset( $_GET['meta_key'] ) ? $_GET['meta_key'] : null; - - $payments = edd_get_payments( array( - 'offset' => $offset, - 'number' => $per_page, - 'mode' => $mode, - 'orderby' => $orderby, - 'order' => $order, - 'user' => $user, - 'status' => $status, - 'meta_key' => $meta_key - ) ); - $payment_count = wp_count_posts('edd_payment'); - - $total_count = $payment_count->publish + $payment_count->pending + $payment_count->refunded + $payment_count->trash; - - switch( $status ) { - case 'publish': - $current_count = $payment_count->publish; - break; - case 'pending': - $current_count = $payment_count->pending; - break; - case 'refunded': - $current_count = $payment_count->refunded; - break; - case 'any': - $current_count = $total_count; - break; - } - - $total_pages = ceil($current_count/$per_page); - +
    + + + +
    + + + + views(); + $orders_table->advanced_filters(); + $orders_table->display(); ?> -

    - - -
      -
    •  : CSV
    • - -
    - - - - - - - - - - - - - - -
    - display_name : $user; - ?> -

     - 

    - - - - - - - - - - - - - - - - - - - - - - - - - - - ID, '_edd_payment_meta', true); - $user_info = maybe_unserialize($payment_meta['user_info']); - $classes = array(); - $classes[] = edd_is_odd($i) ? 'alternate' : ''; - $payment_classes = get_post_class( apply_filters( 'edd_payment_row_classes', $classes ), $payment->ID ); - ?> - - - - - - - - - - - - -
    - - - - - - - -
    ID; ?> - -
    - '' . __('Edit', 'edd') . '', - 'email_links' => edd_is_payment_complete($payment->ID) ? '' . __('Resend Purchase Receipt', 'edd') . '' : NULL, - 'delete' => '' . __('Delete', 'edd') . '' - ); - $row_actions = apply_filters('edd_payment_row_actions', $row_actions, $payment); - $action_count = count($row_actions); $i = 1; - foreach($row_actions as $key => $action) { - if($action_count == $i) { $sep = ''; } else { $sep = ' | '; } - echo !is_null( $action ) ? '' . $action . '' . $sep : ''; - $i++; - } - ?> -
    -
    - - ID ); ?>post_date)); ?> - - - display_name : __('guest', 'edd'); - } else { - echo __('guest', 'edd'); - } - ?> - -
    -
    - -
    -

     

    - -
    - 1) : ?> -
    - $base, - 'format' => '&p=%#%', - 'prev_text' => '« ' . __('Previous', 'edd'), - 'next_text' => __('Next', 'edd') . ' »', - 'total' => $total_pages, - 'current' => $page, - 'end_size' => 1, - 'mid_size' => 5, - )); - ?> -
    - -
    - -
    - + + + + + base ) { + return $admin_title; } + + // Get the view + $view = edd_get_payment_view(); + + // Which view? + switch ( $view ) { + + // Edit/View + case 'view-order-details': + case 'edit-payment': + $title = __( 'Edit Order', 'easy-digital-downloads' ) . ' — ' . $admin_title; + break; + + // Add + case 'add-order': + $title = __( 'Add New Order', 'easy-digital-downloads' ) . ' — ' . $admin_title; + break; + + // List + case 'list': + default: + $title = $admin_title; + break; + } + + return $title; } +add_filter( 'admin_title', 'edd_view_order_details_title', 10, 2 ); diff --git a/includes/admin/payments/refunds.php b/includes/admin/payments/refunds.php new file mode 100644 index 00000000000..95c45ce84e3 --- /dev/null +++ b/includes/admin/payments/refunds.php @@ -0,0 +1,375 @@ + absint( $refund->parent ), + 'page' => 'edd-payment-history', + 'view' => 'view-order-details', + ) + ); +?> + +
    +
    + +
    + + + +
    + +
    + __( 'A refund is a read-only record to help balance your store's books.', 'easy-digital-downloads' ), + ) + ); + $tooltip->output(); + ?> +
    + +
    +
    + + $refund->id, + 'number' => 999, + ) ); + + foreach ( $items as $item ) { + $item_adjustments = array(); + + $adjustments = edd_get_order_adjustments( array( + 'object_id' => $item->id, + 'number' => 999, + 'object_type' => 'order_item', + 'type' => array( + 'discount', + 'credit', + 'fee', + ), + ) ); + + foreach ( $adjustments as $adjustment ) { + // @todo edd_get_order_adjustment_to_json()? + $adjustment_args = array( + 'id' => esc_html( $adjustment->id ), + 'objectId' => esc_html( $adjustment->object_id ), + 'objectType' => esc_html( $adjustment->object_type ), + 'typeId' => esc_html( $adjustment->type_id ), + 'type' => esc_html( $adjustment->type ), + 'description' => esc_html( $adjustment->description ), + 'subtotal' => esc_html( $adjustment->subtotal ), + 'tax' => esc_html( $adjustment->tax ), + 'total' => esc_html( $adjustment->total ), + 'dateCreated' => esc_html( $adjustment->date_created ), + 'dateModified' => esc_html( $adjustment->date_modified ), + 'uuid' => esc_html( $adjustment->uuid ), + ); + + $item_adjustments[] = $adjustment_args; + $_adjustments[] = $adjustment_args; + } + + // @todo edd_get_order_item_to_json()? + $_items[] = array( + 'id' => esc_html( $item->id ), + 'orderId' => esc_html( $item->order_id ), + 'productId' => esc_html( $item->product_id ), + 'productName' => esc_html( $item->get_order_item_name() ), + 'priceId' => esc_html( $item->price_id ), + 'cartIndex' => esc_html( $item->cart_index ), + 'type' => esc_html( $item->type ), + 'status' => esc_html( $item->status ), + 'quantity' => esc_html( $item->quantity ), + 'amount' => esc_html( $item->amount ), + 'subtotal' => esc_html( $item->subtotal ), + 'discount' => esc_html( $item->discount ), + 'tax' => esc_html( $item->tax ), + 'total' => esc_html( $item->total ), + 'dateCreated' => esc_html( $item->date_created ), + 'dateModified' => esc_html( $item->date_modified ), + 'uuid' => esc_html( $item->uuid ), + ); + } + + $adjustments = edd_get_order_adjustments( array( + 'object_id' => $refund->id, + 'number' => 999, + 'object_type' => 'order', + 'type' => array( + 'discount', + 'credit', + 'fee', + ), + ) ); + + foreach ( $adjustments as $adjustment ) { + // @todo edd_get_order_adjustment_to_json()? + $_adjustments[] = array( + 'id' => esc_html( $adjustment->id ), + 'objectId' => esc_html( $adjustment->object_id ), + 'objectType' => esc_html( $adjustment->object_type ), + 'typeId' => esc_html( $adjustment->type_id ), + 'type' => esc_html( $adjustment->type ), + 'description' => esc_html( $adjustment->description ), + 'subtotal' => esc_html( $adjustment->subtotal ), + 'tax' => esc_html( $adjustment->tax ), + 'total' => esc_html( $adjustment->total ), + 'dateCreated' => esc_html( $adjustment->date_created ), + 'dateModified' => esc_html( $adjustment->date_modified ), + 'uuid' => esc_html( $adjustment->uuid ), + ); + } + + $has_tax = 'none'; + $tax_rate = $refund->id ? $refund->get_tax_rate() : false; + $location = array( + 'rate' => $tax_rate, + 'country' => '', + 'region' => '', + ); + if ( $tax_rate ) { + $has_tax = $location; + $has_tax['rate'] = $tax_rate; + if ( $refund->tax_rate_id ) { + $tax_rate_object = $refund->get_tax_rate_object(); + if ( $tax_rate_object ) { + $has_tax['country'] = $tax_rate_object->name; + $has_tax['region'] = $tax_rate_object->description; + } + } + } + + wp_localize_script( + 'edd-admin-orders', + 'eddAdminOrderOverview', + array( + 'items' => $_items, + 'adjustments' => $_adjustments, + 'refunds' => array(), + 'isAdding' => false, + 'isRefund' => true, + 'hasQuantity' => true, + 'hasTax' => $has_tax, + 'order' => array( + 'currency' => $refund->currency, + 'currencySymbol' => html_entity_decode( edd_currency_symbol( $refund->currency ) ), + 'subtotal' => $refund->subtotal, + 'discount' => $refund->discount, + 'tax' => $refund->tax, + 'total' => $refund->total, + ), + ) + ); + + $templates = array( + 'no-items', + 'subtotal', + 'tax', + 'total', + 'item', + 'adjustment', + 'adjustment-discount', + ); + + foreach ( $templates as $tmpl ) { + echo ''; + } +?> + +
    + + + + + + + + + +
    +
    + + + +
    +

    + +

    + +
    + +
    +
    + +utils->date( $refund->date_created, 'utc', true ) ); + + $trash_url = wp_nonce_url( + edd_get_admin_url( array( + 'edd-action' => 'trash_order', + 'purchase_id' => absint( $refund->id ), + 'order_type' => 'refund', + 'page' => 'edd-payment-history', + ) ), + 'edd_payment_nonce' + ); + + $order_url = edd_get_admin_url( + array( + 'id' => absint( $refund->parent ), + 'page' => 'edd-payment-history', + 'view' => 'view-order-details', + ) + ); + + $order = edd_get_order( $refund->parent ); +?> + +
    +

    + +

    + +
    + + +

    + + + + +
    + +
    +
    + + + + +
    +
    +
    + +parent ), + function( $related_refund ) use ( $refund ) { + return $related_refund->id !== $refund->id; + } + ); + + if ( empty( $refunds ) ) { + return; + } +?> + +
    +

    + +

    + + 'edd-payment-history', + 'view' => 'view-refund-details', + 'id' => absint( $refund->id ), + ) ); + ?> +
    +
    + + number ); ?> + +
    + +
    +
    + +
    + +type ) { + $refund_link = edd_get_admin_url( + array( + 'page' => 'edd-payment-history', + 'view' => 'view-refund-details', + 'id' => urlencode( $order->id ), + ) + ); + /* translators: %s: refund link */ + wp_die( sprintf( __( 'The specified ID is for a refund, not an order. Please access the refund directly.', 'easy-digital-downloads' ), esc_url( $refund_link ) ), __( 'Error', 'easy-digital-downloads' ) ); +} + +wp_enqueue_script( 'edd-admin-orders' ); +// Enqueued for backwards compatibility. Empty file. +wp_enqueue_script( 'edd-admin-payments' ); +?> + +
    + + + +
    + +

    number ) ); ?>

    + +
    + + + + id ); ?> + + id ); ?> + +
    +
    +
    +
    +
    + id ); + + // Overview + edd_order_details_overview( $order ); + + // Details sections + edd_order_details_sections( $order ); + + // Legacy hook from pre version 3 of Easy Digital Downloads. + do_action( 'edd_view_order_details_billing_after', $order->id ); + + // After body + do_action( 'edd_view_order_details_main_after', $order->id ); + + ?> +
    +
    + +
    +
    + id ); + + // Attributes + edd_order_details_attributes( $order ); + + // Extras + edd_order_details_extras( $order ); + + // After sidebar + do_action( 'edd_view_order_details_sidebar_after', $order->id ); + + ?> +
    +
    +
    +
    +
    + + id ); + + wp_nonce_field( 'edd_update_payment_details_nonce' ); ?> + + + + + id ); ?> + +
    + +
    + +
    + + diff --git a/includes/admin/payments/view-refund.php b/includes/admin/payments/view-refund.php new file mode 100644 index 00000000000..b3220e25b0c --- /dev/null +++ b/includes/admin/payments/view-refund.php @@ -0,0 +1,128 @@ +type ) { + wp_die( __( 'The specified ID does not belong to an refund. Please try again.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ) ); + } + + wp_enqueue_script( 'edd-admin-orders' ); + // Enqueued for backwards compatibility. Empty file. + wp_enqueue_script( 'edd-admin-payments' ); +?> + + + +
    + +

    order_number ); ?>

    + + id ); + ?> + +
    +
    +
    + +
    +
    + id ); + + // Refund Items. + edd_refund_details_items( $refund ); + + // Notes. + edd_refund_details_notes( $refund ); + + /** + * Allows further output after the Refund details. + * + * @since 3.0 + * + * @param int $refund_id ID of the current Refund. + */ + do_action( 'edd_view_refund_details_main_after', $refund->id ); + ?> +
    +
    + +
    +
    + id ); + + // Attributes. + edd_refund_details_attributes( $refund ); + + // Related Refunds. + edd_refund_details_related_refunds( $refund ); + + /** + * Allows further output after Refund sidebar content. + * + * @since 3.0 + * + * @param int $refund_id ID of the current Refund. + */ + do_action( 'edd_view_refund_details_sidebar_after', $refund->id ); + ?> +
    +
    + +
    +
    +
    + +
    + +has_pass() ) { + + $url = edd_link_helper( + 'https://easydigitaldownloads.com/lite-upgrade/', + array( + 'utm_medium' => 'all-plugins', + 'utm_content' => 'upgrade-to-pro', + ) + ); + + $edd_links['edd-pro-upgrade'] = sprintf( '' . __( 'Upgrade to Pro', 'easy-digital-downloads' ) . '', $url ); + } + + $settings_url = edd_get_admin_url( + array( + 'page' => 'edd-settings', + ) + ); + + $edd_links['settings'] = '' . esc_html__( 'Settings', 'easy-digital-downloads' ) . ''; + + // Return array of links. + return array_merge( $edd_links, $links ); +} +add_filter( 'plugin_action_links_easy-digital-downloads/easy-digital-downloads.php', 'edd_plugin_action_links', 10, 2 ); + +/** + * Load any CSS we need for the plugins list table. + */ +function edd_plugin_list_styles() { + echo ''; +} +add_action( 'admin_print_styles-plugins.php', 'edd_plugin_list_styles' ); diff --git a/includes/admin/promos/email-summary/blurbs.json b/includes/admin/promos/email-summary/blurbs.json new file mode 100644 index 00000000000..19c5204de6c --- /dev/null +++ b/includes/admin/promos/email-summary/blurbs.json @@ -0,0 +1,54 @@ +{ + "blurbs":[ + { + "headline":"Are new features and products getting ignored?", + "content":"Smart marketers know that emails with high click-through rates that promote new products and features will lead to more sales. Connect your Easy Digital Downloads powered store to your favorite email marketing service to boost revenue.", + "button_text":"Read More", + "button_link":"https://easydigitaldownloads.com/downloads/category/extensions/email/?utm_source=plugin&utm_medium=email&utm_campaign=summaries", + "conditions":{ + "current_pass":"free" + } + }, + { + "headline":"Are you missing out on future revenue?", + "content":"On average, up to 60% of customers do not manually renew their license keys. That's lost revenue for your business. Enable subscriptions on your licensed products and keep the revenue flowing!", + "button_text":"Read More", + "button_link":"https://easydigitaldownloads.com/downloads/recurring-payments/?utm_source=plugin&utm_medium=email&utm_campaign=summaries", + "conditions":{ + "active_plugins":[ + "EDD-Software-Licensing/edd-software-licenses.php" + ], + "inactive_plugins":[ + "edd-recurring/edd-recurring.php" + ], + "current_pass":"pass-any" + } + }, + { + "headline":"Are you giving things away for free?", + "content":"Lead magnets are the easiest way to capture potential customers. Use our Free Downloads add-on, and start capturing those leads today.", + "button_text":"Read More", + "button_link":"https://easydigitaldownloads.com/blog/how-to-add-lead-magnets-in-wordpress-to-grow-your-email-list/?utm_source=plugin&utm_medium=email&utm_campaign=summaries", + "conditions":{ + "has_downloads":[ + "free" + ], + "inactive_plugins":[ + "edd-free-downloads/edd-free-downloads.php" + ] + } + }, + { + "headline":"Who are your biggest fans?", + "content":"Did you know that 72% of customers say that a product review is the key to making their purchasing decision? Learn how to add reviews to your store, and let your happy customers be your brand ambassadors!", + "button_text":"Read More", + "button_link":"https://easydigitaldownloads.com/blog/how-to-add-product-reviews-to-your-website/?utm_source=plugin&utm_medium=email&utm_campaign=summaries", + "conditions":{ + "inactive_plugins":[ + "edd-reviews/edd-reviews.php" + ], + "current_pass":"pass-any" + } + } + ] +} diff --git a/includes/admin/promos/notices/class-five-star-review-dashboard.php b/includes/admin/promos/notices/class-five-star-review-dashboard.php new file mode 100644 index 00000000000..9a5c33c22d0 --- /dev/null +++ b/includes/admin/promos/notices/class-five-star-review-dashboard.php @@ -0,0 +1,191 @@ + +
    + _display(); + ?> +
    + +
    +

    +
    +
    + +
    +
    + + + + + time() ) { + return false; + } + $orders = edd_count_orders( + array( + 'type' => 'sale', + 'status__in' => edd_get_complete_order_statuses(), + ) + ); + + return $orders >= 15; + } + + /** + * Builds the UTM parameters for the URLs. + * + * @since 2.11.4 + * + * @return string + */ + private function url() { + $url = edd_link_helper( + 'https://easydigitaldownloads.com/plugin-feedback/', + array( + 'utm_medium' => 'feedback-' . static::TYPE, + 'utm_content' => 'give-feedback', + ) + ); + + return $url; + } +} diff --git a/includes/admin/promos/notices/class-five-star-review-settings.php b/includes/admin/promos/notices/class-five-star-review-settings.php new file mode 100644 index 00000000000..ed9427d5607 --- /dev/null +++ b/includes/admin/promos/notices/class-five-star-review-settings.php @@ -0,0 +1,68 @@ + +
    + +
    + __( 'Log ID', 'easy-digital-downloads' ), + 'details' => __( 'Request Details', 'easy-digital-downloads' ), + 'version' => __( 'API Version', 'easy-digital-downloads' ), + 'ip' => __( 'Request IP', 'easy-digital-downloads' ), + 'speed' => __( 'Request Speed', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ) + ); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'ID'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 1.5 + * + * @param array $item Contains all the data of the api request + * @param string $column_name The name of the column + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + switch ( $column_name ) { + case 'ip': + return '' . esc_html( $item['ip'] ) . ''; + default: + return $item[ $column_name ]; + } + } + + /** + * Output Error Message column + * + * @since 1.5 + * @param array $item Contains all the data of the log + * @return void + */ + public function column_details( $item ) { + ?> + + + $log->id, + 'version' => $log->version, + 'speed' => $log->time, + 'ip' => $log->ip, + 'date' => $log->date_created, + 'api_key' => $log->api_key, + 'request' => $log->request, + 'error' => $log->error, + 'user_id' => $log->user_id, + ); + } + } + + return $logs_data; + } + + /** + * Get the total number of items + * + * @since 3.0 + * + * @param array $log_query + * + * @return int + */ + public function get_total( $log_query = array() ) { + return edd_count_api_request_logs( $log_query ); + } +} diff --git a/includes/admin/reporting/class-base-logs-list-table.php b/includes/admin/reporting/class-base-logs-list-table.php new file mode 100644 index 00000000000..349e9c05e6a --- /dev/null +++ b/includes/admin/reporting/class-base-logs-list-table.php @@ -0,0 +1,561 @@ + 'log', + 'plural' => 'logs', + 'ajax' => false + ) ); + + $this->filter_bar_hooks(); + } + + /** + * Generate the table navigation above or below the table + * + * Removes the referrer nonce from parent class. + * + * @since 3.0.0 + * @param string $which + */ + protected function display_tablenav( $which ) { + ?> +
    + has_items() ) : ?> +
    + bulk_actions( $which ); ?> +
    + extra_tablenav( $which ); + $this->pagination( $which ); ?> + +
    +
    id ) ) { + $ret = $customer->id; + } + } + + return $ret; + } + + /** + * Return the start-date of the filter + * + * @since 3.0 + * + * @return string Start date to filter by + */ + public function get_filtered_start_date() { + return sanitize_text_field( $this->get_request_var( 'start-date', null ) ); + } + + /** + * Return the end-date of the filter + * + * @since 3.0 + * + * @return string End date to filter by + */ + public function get_filtered_end_date() { + return sanitize_text_field( $this->get_request_var( 'end-date', null ) ); + } + + /** + * Return the ID of the download we're filtering logs by + * + * @since 3.0 + * + * @return int Download ID. + */ + public function get_filtered_download() { + return absint( $this->get_request_var( 'download', false ) ); + } + + /** + * Return the ID of the payment we're filtering logs by + * + * @since 3.0 + * + * @return int Payment ID. + */ + public function get_filtered_payment() { + return absint( $this->get_request_var( 'payment', false ) ); + } + + /** + * Gets the meta query for the log query. + * + * This is used to return log entries that match our search query, user query, or download query. + * + * @since 3.0 + * + * @return array $meta_query + */ + public function get_meta_query() { + return array(); + } + + /** + * Outputs the log views. + * + * @since 3.0 + */ + public function bulk_actions( $which = '' ) { + return; + } + + /** + * Renders the Reports page views drop down + * + * @since 3.0 + * @return void + */ + public function log_views() { + $views = edd_log_default_views(); + $current_view = $this->get_filtered_view(); ?> + + + + + + + + + + + 'edd-log-download-filter', + 'name' => 'download', + 'chosen' => true, + ); + + if ( ! empty( $download ) ) { + $args['selected'] = $download; + } + + echo EDD()->html->product_dropdown( $args ); + } + + /** + * Gets the log entries for the current view + * + * @since 3.0 + * + * @return array $logs_data Array of all the logs. + */ + function get_logs( $log_query = array() ) { + return array(); + } + + /** + * Get the total number of items + * + * @since 3.0 + * + * @param array $log_query + * + * @return int + */ + public function get_total( $log_query = array() ) { + return count( array() ); + } + + /** + * Empty method to hide view links on all logs table + * + * @since 3.0 + */ + public function get_views() { + // Intentionally empty + } + + /** + * Retrieves the logs data. + * + * @since 3.0 + * + * @return array Logs data. + */ + public function get_data() { + $log_query = $this->get_query_args(); + + return $this->get_logs( $log_query ); + } + + /** + * Setup the final data for the table. + * + * @since 3.0 + */ + public function prepare_items() { + + $this->_column_headers = array( + $this->get_columns(), + array(), + $this->get_sortable_columns() + ); + + $this->items = $this->get_data(); + $log_query = $this->get_query_args( false ); + $total_items = $this->get_total( $log_query ); + + $this->set_pagination_args( array( + 'total_pages' => ceil( $total_items / $this->per_page ), + 'total_items' => $total_items, + 'per_page' => $this->per_page, + ) ); + } + + /** + * Return array of query arguments + * + * @since 3.0 + * + * @param bool $paginate Whether to add pagination arguments + * + * @return array + */ + protected function get_query_args( $paginate = true ) { + + // Defaults + $retval = array( + 'product_id' => $this->get_filtered_download(), + 'customer_id' => $this->get_filtered_customer(), + 'order_id' => $this->get_filtered_payment(), + 'meta_query' => $this->get_meta_query(), + ); + + // Search + $search = $this->get_search(); + if ( ! empty( $search ) ) { + if ( filter_var( $search, FILTER_VALIDATE_IP ) ) { + $retval['ip'] = $search; + } elseif ( is_email( $search ) ) { + if ( 'api_requests' === $this->log_type ) { + // API requests are linked to user accounts, so we're checking user data here. + $user = get_user_by( 'email', $search ); + if ( ! empty( $user->ID ) ) { + $retval['user_id'] = $user->ID; + } else { + // This is a fallback to help ensure an invalid email will produce zero results. + $retval['search'] = $search; + } + } else { + // All other logs are linked to customers. + $customer = edd_get_customer_by( 'email', $search ); + if ( ! empty( $customer->id ) ) { + $retval['customer_id'] = $customer->id; + } else { + // This is a fallback to help ensure an invalid email will produce zero results. + $retval['search'] = $search; + } + } + } elseif ( 'api_requests' === $this->log_type && 32 === strlen( $search ) ) { + // Look for an API key + $retval['api_key'] = $search; + } elseif ( 'api_requests' === $this->log_type && stristr( $search, 'token:' ) ) { + // Look for an API token + $retval['token'] = str_ireplace( 'token:', '', $search ); + } elseif ( is_numeric( $search ) ) { + if ( 'api_requests' === $this->log_type ) { + // API requests are linked to user accounts, so we're checking user data here. + $user = get_user_by( 'email', $search ); + if ( ! empty( $user->ID ) ) { + $retval['user_id'] = $user->ID; + } else { + $retval['search'] = $search; + } + } else { + // All other logs are linked to customers. + $customer = edd_get_customer( $search ); + if ( ! empty( $customer->id ) ) { + $retval['customer_id'] = $customer->id; + } elseif ( 'file_downloads' === $this->log_type ) { + $retval['product_id'] = $search; + } else { + $retval['search'] = $search; + } + } + } else { + if ( 'file_downloads' === $this->log_type ) { + $this->file_search = true; + } else { + $retval['search'] = $search; + } + } + } + + // Start date + $start_date = $this->get_filtered_start_date(); + $end_date = $this->get_filtered_end_date(); + + // Setup original array + if ( ! empty( $start_date ) || ! empty( $end_date ) ) { + $retval['date_created_query']['column'] = 'date_created'; + + // Start date + if ( ! empty( $start_date ) ) { + $retval['date_created_query'][] = array( + 'column' => 'date_created', + 'after' => \EDD\Utils\Date::parse( date( 'Y-m-d H:i:s', strtotime( "{$start_date} midnight" ) ), edd_get_timezone_id() )->setTimezone( 'UTC' )->toDateTimeString(), + ); + } + + // End date + if ( ! empty( $end_date ) ) { + $retval['date_created_query'][] = array( + 'column' => 'date_created', + 'before' => \EDD\Utils\Date::parse( date( 'Y-m-d H:i:s', strtotime( "{$end_date} + 1 day" ) ), edd_get_timezone_id() )->setTimezone( 'UTC' )->toDateTimeString(), + ); + } + } + + $retval = array_filter( $retval ); + + // Return query arguments + return ( true === $paginate ) + ? $this->parse_pagination_args( $retval ) + : $retval; + } + + /** + * Output advanced filters for payments + * + * @since 3.0 + */ + public function advanced_filters() { + edd_admin_filter_bar( 'logs' ); + } + + /** + * Output filter bar items + * + * @since 3.0 + */ + public function filter_bar_items() { + + // Get values + $start_date = $this->get_filtered_start_date(); + $end_date = $this->get_filtered_end_date(); + $download = $this->get_filtered_download(); + $customer = $this->get_filtered_customer(); + $view = $this->get_filtered_view(); + $clear_url = edd_get_admin_url( array( + 'page' => 'edd-tools', + 'tab' => 'logs', + 'view' => sanitize_key( $view ), + ) ); ?> + + + log_views(); ?> + + + + html->date_field( array( + 'id' => 'start-date', + 'name' => 'start-date', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ), + 'value' => $start_date + ) ); + + echo EDD()->html->date_field( array( + 'id' => 'end-date', + 'name' => 'end-date', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ), + 'value' => $end_date + ) ); + + ?> + + + downloads_filter( $download ); ?> + + + + + + + + + + + + + + + + + + + + search_box( __( 'Search', 'easy-digital-downloads' ), 'edd-logs' ); + } + + /** + * Show the search field + * + * @since 3.0 + * + * @param string $text Label for the search box + * @param string $input_id ID of the search box + * + * @return void + */ + public function search_box( $text, $input_id ) { + + // Bail if no customers and no search + if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) { + return; + } + + $input_id = $input_id . '-search-input'; + + if ( ! empty( $_REQUEST['orderby'] ) ) { + echo ''; + } + + if ( ! empty( $_REQUEST['order'] ) ) { + echo ''; + } + + ?> + +

    + + +

    + + 'report-earning', + 'plural' => 'report-earnings', + 'ajax' => false + ) ); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'label'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 2.4 + * + * @param array $item Contains all the data of the downloads + * @param string $column_name The name of the column + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Retrieve the table columns + * + * @since 2.4 + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'label' => __( 'Category', 'easy-digital-downloads' ), + 'total_sales' => __( 'Total Sales', 'easy-digital-downloads' ), + 'total_earnings' => __( 'Total Earnings', 'easy-digital-downloads' ), + 'avg_sales' => __( 'Monthly Sales Avg', 'easy-digital-downloads' ), + 'avg_earnings' => __( 'Monthly Earnings Avg', 'easy-digital-downloads' ) + ); + } + + /** + * Outputs the reporting views + * + * @since 1.5 + * @return void + */ + public function display_tablenav( $which = '' ) { + ?> +
    +
    + +
    +
    + get_data(); + } + + /** + * Builds and retrieves all of the categories reports data. + * + * @since 3.0 + * + * @return array Categories reports table data. + */ + public function get_data() { + + /* + * Date filtering + */ + $dates = edd_get_report_dates(); + + $include_taxes = empty( $_GET['exclude_taxes'] ) ? true : false; + + if ( ! empty( $dates[ 'year' ] ) ) { + $date = new DateTime(); + $date->setDate( $dates[ 'year' ], $dates[ 'm_start' ], $dates[ 'day' ] ); + $start_date = $date->format( 'Y-m-d' ); + + $date->setDate( $dates[ 'year_end' ], $dates[ 'm_end' ], $dates[ 'day_end' ] ); + $end_date = $date->format( 'Y-m-d' ); + $cached_report_key = 'edd_earnings_by_category_data' . $start_date . '_' . $end_date; + } else { + $start_date = false; + $end_date = false; + $cached_report_key = 'edd_earnings_by_category_data'; + } + + $cached_reports = get_transient( $cached_report_key ); + + if ( false !== $cached_reports ) { + $reports_data = $cached_reports; + + } else { + $reports_data = array(); + $categories = get_terms( 'download_category', array( + 'parent' => 0, + 'hierarchical' => 0, + 'hide_empty' => false + ) ); + + if ( ! is_wp_error( $categories ) && ! empty( $categories ) ) { + foreach ( $categories as $category ) { + + $category_slugs = array( $category->slug ); + $child_terms = get_terms( 'download_category', array( + 'parent' => $category->term_id, + 'hierarchical' => 0 + ) ); + + if ( ! empty( $child_terms ) ) { + foreach ( $child_terms as $child_term ) { + $category_slugs[] = $child_term->slug; + } + } + + $downloads = get_posts( array( + 'post_type' => 'download', + 'posts_per_page' => -1, + 'fields' => 'ids', + 'tax_query' => array( + array( + 'taxonomy' => 'download_category', + 'field' => 'slug', + 'terms' => $category_slugs + ) + ) + ) ); + + $sales = $avg_sales = 0; + $earnings = $avg_earnings = 0.00; + + foreach ( $downloads as $download ) { + $current_sales = EDD()->payment_stats->get_sales( $download, $start_date, $end_date ); + $current_earnings = EDD()->payment_stats->get_earnings( $download, $start_date, $end_date, $include_taxes ); + + $current_average_sales = edd_get_average_monthly_download_sales( $download ); + $current_average_earnings = edd_get_average_monthly_download_earnings( $download ); + + $sales += $current_sales; + $earnings += $current_earnings; + $avg_sales += $current_average_sales; + $avg_earnings += $current_average_earnings; + } + + $avg_earnings = round( $avg_earnings, edd_currency_decimal_filter() ); + if ( ! empty( $avg_earnings ) && $avg_sales < 1 ) { + $avg_sales = __( 'Less than 1', 'easy-digital-downloads' ); + } else { + $avg_sales = round( edd_format_amount( $avg_sales, false ) ); + } + + $reports_data[] = array( + 'ID' => $category->term_id, + 'label' => $category->name, + 'total_sales' => edd_format_amount( $sales, false ), + 'total_sales_raw' => $sales, + 'total_earnings' => edd_currency_filter( edd_format_amount( $earnings ) ), + 'total_earnings_raw' => $earnings, + 'avg_sales' => $avg_sales, + 'avg_earnings' => edd_currency_filter( edd_format_amount( $avg_earnings ) ), + 'is_child' => false, + ); + + if ( ! empty( $child_terms ) ) { + foreach ( $child_terms as $child_term ) { + $child_downloads = get_posts( array( + 'post_type' => 'download', + 'posts_per_page' => -1, + 'fields' => 'ids', + 'tax_query' => array( + array( + 'taxonomy' => 'download_category', + 'field' => 'slug', + 'terms' => $child_term->slug + ) + ) + ) ); + + $child_sales = $child_avg_sales = 0; + $child_earnings = $child_avg_earnings = 0.00; + + foreach ( $child_downloads as $child_download ) { + $current_average_sales = $current_sales = EDD()->payment_stats->get_sales( $child_download, $start_date, $end_date ); + $current_average_earnings = $current_earnings = EDD()->payment_stats->get_earnings( $child_download, $start_date, $end_date ); + + $release_date = get_post_field( 'post_date', $child_download ); + $diff = abs( current_time( 'timestamp' ) - strtotime( $release_date ) ); + $months = floor( $diff / ( 30 * 60 * 60 * 24 ) ); // Number of months since publication + + if ( $months > 0 ) { + $current_average_sales = ( $current_sales / $months ); + $current_average_earnings = ( $current_earnings / $months ); + } + + $child_sales += $current_sales; + $child_earnings += $current_earnings; + $child_avg_sales += $current_average_sales; + $child_avg_earnings += $current_average_earnings; + } + + $child_avg_sales = round( $child_avg_sales / count( $child_downloads ) ); + $child_avg_earnings = round( $child_avg_earnings / count( $child_downloads ), edd_currency_decimal_filter() ); + + $reports_data[] = array( + 'ID' => $child_term->term_id, + 'label' => '— ' . $child_term->name, + 'total_sales' => edd_format_amount( $child_sales, false ), + 'total_sales_raw' => $child_sales, + 'total_earnings' => edd_currency_filter( edd_format_amount( $child_earnings ) ), + 'total_earnings_raw' => $child_earnings, + 'avg_sales' => edd_format_amount( $child_avg_sales, false ), + 'avg_earnings' => edd_currency_filter( edd_format_amount( $child_avg_earnings ) ), + 'is_child' => true + ); + } + } + } + } + } + + return $reports_data; + } + + /** + * Output the Category Sales Mix Pie Chart + * + * @since 2.4 + * @return string The HTML for the outputted graph + */ + public function output_sales_graph() { + if ( empty( $this->items ) ) { + return; + } + + $data = array(); + $total_sales = 0; + + foreach ( $this->items as $item ) { + $total_sales += $item['total_sales_raw']; + + if ( ! empty( $item[ 'is_child' ] ) || empty( $item[ 'total_sales_raw' ] ) ) { + continue; + } + + $data[ $item[ 'label' ] ] = $item[ 'total_sales_raw' ]; + } + + + if ( empty( $total_sales ) ) { + echo '

    ' . __( 'No sales for dates provided.', 'easy-digital-downloads' ) . '

    '; + } + + // Sort High to Low, prior to filter so people can reorder if they please + arsort( $data ); + $data = apply_filters( 'edd_category_sales_graph_data', $data ); + + $options = apply_filters( 'edd_category_sales_graph_options', array( + 'legend_formatter' => 'eddLegendFormatterSales', + ), $data ); + + $pie_graph = new EDD_Pie_Graph( $data, $options ); + $pie_graph->display(); + } + + /** + * Output the Category Earnings Mix Pie Chart + * + * @since 2.4 + * @return string The HTML for the outputted graph + */ + public function output_earnings_graph() { + if ( empty( $this->items ) ) { + return; + } + + $data = array(); + $total_earnings = 0; + + foreach ( $this->items as $item ) { + $total_earnings += $item['total_earnings_raw']; + + if ( ! empty( $item[ 'is_child' ] ) || empty( $item[ 'total_earnings_raw' ] ) ) { + continue; + } + + $data[ $item[ 'label' ] ] = $item[ 'total_earnings_raw' ]; + + } + + if ( empty( $total_earnings ) ) { + echo '

    ' . __( 'No earnings for dates provided.', 'easy-digital-downloads' ) . '

    '; + } + + // Sort High to Low, prior to filter so people can reorder if they please + arsort( $data ); + $data = apply_filters( 'edd_category_earnings_graph_data', $data ); + + $options = apply_filters( 'edd_category_earnings_graph_options', array( + 'legend_formatter' => 'eddLegendFormatterEarnings', + ), $data ); + + $pie_graph = new EDD_Pie_Graph( $data, $options ); + $pie_graph->display(); + } + + /** + * Setup the final data for the table + * + * @since 2.4 + * @uses EDD_Categories_Reports_Table::get_columns() + * @uses EDD_Categories_Reports_Table::get_sortable_columns() + * @uses EDD_Categories_Reports_Table::reports_data() + * @return void + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); // No hidden columns + $sortable = $this->get_sortable_columns(); + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + } +} diff --git a/includes/admin/reporting/class-download-reports-table.php b/includes/admin/reporting/class-download-reports-table.php new file mode 100755 index 00000000000..2e89f2a25be --- /dev/null +++ b/includes/admin/reporting/class-download-reports-table.php @@ -0,0 +1,300 @@ + 'report-download', + 'plural' => 'report-downloads', + 'ajax' => false + ) ); + + add_action( 'edd_report_view_actions', array( $this, 'category_filter' ) ); + + $this->query(); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'title'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 1.5 + * + * @param array $item Contains all the data of the downloads + * @param string $column_name The name of the column + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + switch( $column_name ){ + case 'earnings' : + return edd_currency_filter( edd_format_amount( $item[ $column_name ] ) ); + case 'average_sales' : + return round( $item[ $column_name ] ); + case 'average_earnings' : + return edd_currency_filter( edd_format_amount( $item[ $column_name ] ) ); + case 'details' : + $url = edd_get_admin_url( + array( + 'page' => 'edd-reports', + 'view' => 'downloads', + 'download-id' => absint( $item['ID'] ), + ) + ); + return '' . __( 'View Detailed Report', 'easy-digital-downloads' ) . ''; + default: + return $item[ $column_name ]; + } + } + + /** + * Retrieve the table columns + * + * @since 1.5 + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'title' => edd_get_label_singular(), + 'sales' => __( 'Sales', 'easy-digital-downloads' ), + 'earnings' => __( 'Earnings', 'easy-digital-downloads' ), + 'average_sales' => __( 'Monthly Average Sales', 'easy-digital-downloads' ), + 'average_earnings' => __( 'Monthly Average Earnings', 'easy-digital-downloads' ), + 'details' => __( 'Detailed Report', 'easy-digital-downloads' ) + ); + } + + /** + * Retrieve the sortable columns + * + * @since 1.4 + * @return array Array of all the sortable columns + */ + public function get_sortable_columns() { + return array( + 'title' => array( 'title', true ), + 'sales' => array( 'sales', false ), + 'earnings' => array( 'earnings', false ) + ); + } + + /** + * Retrieve the category being viewed + * + * @since 1.5.2 + * @return int Category ID + */ + public function get_category() { + return absint( $this->get_request_var( 'category', 0 ) ); + } + + /** + * Retrieve the total number of downloads + * + * @since 1.5 + * @return int $total Total number of downloads + */ + public function get_total_downloads() { + $total = 0; + $counts = wp_count_posts( 'download', 'readable' ); + + foreach( $counts as $count ) { + $total += $count; + } + + return $total; + } + + /** + * Outputs the reporting views + * + * These aren't really bulk actions but this outputs the markup in the + * right place. + * + * @since 1.5 + * @return void + */ + public function bulk_actions( $which = '' ) { + edd_report_views(); + } + + /** + * Attaches the category filter to the log views + * + * @since 1.5.2 + * @return void + */ + public function category_filter() { + $categories = get_terms( 'download_category' ); + + if ( ! is_wp_error( $categories ) && ! empty( $categories ) ) { + echo EDD()->html->category_dropdown( 'category', $this->get_category() ); + } + } + + /** + * Performs the products query + * + * @since 1.5.2 + * @return void + */ + public function query() { + + $orderby = sanitize_text_field( $this->get_request_var( 'orderby', 'title' ) ); + $order = sanitize_text_field( $this->get_request_var( 'order', 'DESC' ) ); + $category = $this->get_category(); + + $args = array( + 'post_type' => 'download', + 'post_status' => 'publish', + 'order' => $order, + 'fields' => 'ids', + 'posts_per_page' => $this->per_page, + 'paged' => $this->get_paged(), + 'suppress_filters' => true + ); + + if ( ! empty( $category ) ) { + $args['tax_query'] = array( + array( + 'taxonomy' => 'download_category', + 'terms' => $category + ) + ); + } + + switch ( $orderby ) { + case 'title' : + $args['orderby'] = 'title'; + break; + + case 'sales' : + $args['orderby'] = 'meta_value_num'; + $args['meta_key'] = '_edd_download_sales'; + break; + + case 'earnings' : + $args['orderby'] = 'meta_value_num'; + $args['meta_key'] = '_edd_download_earnings'; + break; + } + + $r = apply_filters( 'edd_download_reports_prepare_items_args', $args, $this ); + + $this->products = new WP_Query( $r ); + } + + /** + * Build and retrieves all of the download reports data. + * + * @since 1.5 + * @deprecated 3.0 Use get_data() + * + * @return array All the data for customer reports. + */ + public function reports_data() { + _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Download_Reports_Table::get_data()' ); + + return $this->get_data(); + } + + /** + * Retrieves all of the download reports data. + * + * @since 3.0 + * + * @return array Download reports table data. + */ + public function get_data() { + $reports_data = array(); + + $downloads = $this->products->posts; + + if ( $downloads ) { + foreach ( $downloads as $download ) { + $reports_data[] = array( + 'ID' => $download, + 'title' => get_the_title( $download ), + 'sales' => edd_get_download_sales_stats( $download ), + 'earnings' => edd_get_download_earnings_stats( $download ), + 'average_sales' => edd_get_average_monthly_download_sales( $download ), + 'average_earnings' => edd_get_average_monthly_download_earnings( $download ), + ); + } + } + + return $reports_data; + } + + /** + * Setup the final data for the table + * + * @since 1.5 + * @uses EDD_Download_Reports_Table::get_columns() + * @uses EDD_Download_Reports_Table::get_sortable_columns() + * @uses EDD_Download_Reports_Table::get_total_downloads() + * @uses EDD_Download_Reports_Table::get_data() + * @uses EDD_Download_Reports_Table::set_pagination_args() + * @return void + */ + public function prepare_items() { + $this->_column_headers = array( + $this->get_columns(), + array(), + $this->get_sortable_columns() + ); + + $total_items = $this->get_total_downloads(); + $this->items = $this->get_data(); + + $this->set_pagination_args( array( + 'total_pages' => ceil( $total_items / $this->per_page ), + 'total_items' => $total_items, + 'per_page' => $this->per_page, + ) ); + } +} diff --git a/includes/admin/reporting/class-edd-graph.php b/includes/admin/reporting/class-edd-graph.php new file mode 100755 index 00000000000..0cd1e1317de --- /dev/null +++ b/includes/admin/reporting/class-edd-graph.php @@ -0,0 +1,291 @@ + array( + array( 1, 5 ), + array( 3, 8 ), + array( 10, 2 ) + ), + + 'Second Label' => array( + array( 1, 7 ), + array( 4, 5 ), + array( 12, 8 ) + ) + ); + + $graph = new EDD_Graph( $data ); + $graph->display(); + + */ + + /** + * Data to graph + * + * @var array + * @since 1.9 + */ + private $data; + + /** + * Unique ID for the graph + * + * @var string + * @since 1.9 + */ + private $id = ''; + + /** + * Graph options + * + * @var array + * @since 1.9 + */ + private $options = array(); + + /** + * Get things started + * + * @since 1.9 + */ + public function __construct( $_data ) { + + $this->data = $_data; + + // Generate unique ID + $this->id = 'a' . md5( rand() ); + + // Setup default options; + $this->options = array( + 'y_mode' => null, + 'x_mode' => null, + 'y_decimals' => 0, + 'x_decimals' => 0, + 'y_position' => 'right', + 'time_format' => '%d/%b', + 'ticksize_unit' => 'day', + 'ticksize_num' => 1, + 'multiple_y_axes' => false, + 'bgcolor' => '#f9f9f9', + 'bordercolor' => '#ccc', + 'color' => '#bbb', + 'borderwidth' => 2, + 'bars' => false, + 'lines' => true, + 'points' => true, + 'additional_options' => '', + ); + + } + + /** + * Set an option + * + * @param $key The option key to set + * @param $value The value to assign to the key + * @since 1.9 + */ + public function set( $key, $value ) { + $this->options[ $key ] = $value; + } + + /** + * Get an option + * + * @param $key The option key to get + * @since 1.9 + */ + public function get( $key ) { + return isset( $this->options[ $key ] ) ? $this->options[ $key ] : false; + } + + /** + * Get graph data + * + * @since 1.9 + */ + public function get_data() { + return apply_filters( 'edd_get_graph_data', $this->data, $this ); + } + + /** + * Load the graphing library script + * + * @since 1.9 + */ + public function load_scripts() { + wp_enqueue_script( 'edd-jquery-flot', EDD_PLUGIN_URL . 'assets/js/vendor/jquery.flot.min.js' ); + wp_enqueue_script( 'edd-jquery-flot-time', EDD_PLUGIN_URL . 'assets/js/vendor/jquery.flot.time.min.js' ); + + /** + * Fires immediately after the legacy Flot JS graphing framework is enqueued. + * + * @since 1.9 + */ + do_action( 'edd_graph_load_scripts' ); + } + + /** + * Build the graph and return it as a string + * + * @var array + * @since 1.9 + * @return string + */ + public function build_graph() { + + $yaxis_count = 1; + + $this->load_scripts(); + ob_start(); +?> + +
    +build_graph(); + do_action( 'edd_after_graph', $this ); + } + +} diff --git a/includes/admin/reporting/class-edd-pie-graph.php b/includes/admin/reporting/class-edd-pie-graph.php new file mode 100644 index 00000000000..27fc32e77b8 --- /dev/null +++ b/includes/admin/reporting/class-edd-pie-graph.php @@ -0,0 +1,199 @@ + 'value' ), + array( 'Label 2' => 'value 2' ), + ); + + $graph = new EDD_Pie_Graph( $data ); + $graph->display(); + + */ + + /** + * Data to graph + * + * @var array + * @since 2.4 + */ + private $data; + + /** + * Unique ID for the graph + * + * @var string + * @since 2.4 + */ + private $id = ''; + + /** + * Graph options + * + * @var array + * @since 2.4 + */ + private $options = array(); + + /** + * Get things started + * + * @since 2.4 + */ + public function __construct( $_data, $options = array() ) { + + $this->data = $_data; + + // Set this so filters recieving $this can quickly know if it's a graph they want to modify + $this->type = 'pie'; + + // Generate unique ID, add 'a' since md5 can leave a numerical first character + $this->id = 'a' . md5( rand() ); + + // Setup default options; + $this->options = wp_parse_args( $options, array( + 'radius' => 1, + 'legend' => true, + 'legend_formatter' => false, + 'legend_columns' => 3, + 'legend_position' => 's', + 'show_labels' => false, + 'label_threshold' => 0.01, + 'label_formatter' => 'eddLabelFormatter', + 'label_bg_opacity' => 0.75, + 'label_radius' => 1, + 'height' => '300', + 'hoverable' => true, + 'clickable' => false, + 'threshold' => false, + ) ); + + add_action( 'edd_graph_load_scripts', array( $this, 'load_additional_scripts' ) ); + } + + /** + * Load the graphing library script + * + * @since 2.4 + */ + public function load_additional_scripts() { + wp_enqueue_script( 'edd-jquery-flot-pie', EDD_PLUGIN_URL . 'assets/js/vendor/jquery.flot.pie.min.js' ); + } + + /** + * Build the graph and return it as a string + * + * @var array + * @since 2.4 + * @return string + */ + public function build_graph() { + + if ( count( $this->data ) ) { + $this->load_scripts(); + + ob_start(); + ?> + +
    +
    +
    +
    + id, $this->data, $this->options ); + + } + +} diff --git a/includes/admin/reporting/class-export-customers.php b/includes/admin/reporting/class-export-customers.php new file mode 100755 index 00000000000..82a98de80c2 --- /dev/null +++ b/includes/admin/reporting/class-export-customers.php @@ -0,0 +1,165 @@ +export_type . '-' . date( 'm-d-Y' ) ) . '.csv"' ); + header( 'Expires: 0' ); + } + + /** + * Set the CSV columns + * + * @since 1.4.4 + * @return array $cols All the columns + */ + public function csv_cols() { + if ( ! empty( $_POST['edd_export_download'] ) ) { + $cols = array( + 'first_name' => __( 'First Name', 'easy-digital-downloads' ), + 'last_name' => __( 'Last Name', 'easy-digital-downloads' ), + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'date' => __( 'Date Purchased', 'easy-digital-downloads' ) + ); + } else { + + $cols = array(); + + if( 'emails' != $_POST['edd_export_option'] ) { + $cols['name'] = __( 'Name', 'easy-digital-downloads' ); + } + + $cols['email'] = __( 'Email', 'easy-digital-downloads' ); + + if( 'full' == $_POST['edd_export_option'] ) { + $cols['purchases'] = __( 'Total Purchases', 'easy-digital-downloads' ); + $cols['amount'] = __( 'Total Purchased', 'easy-digital-downloads' ) . ' (' . html_entity_decode( edd_currency_filter( '' ) ) . ')'; + } + + } + + return $cols; + } + + /** + * Get the Export Data + * + * @since 1.4.4 + * @global object $wpdb Used to query the database using the WordPress + * Database API + * @global object $edd_logs EDD Logs Object + * @return array $data The data for the CSV file + */ + public function get_data() { + + $data = array(); + + if ( ! empty( $_POST['edd_export_download'] ) ) { + + $edd_logs = EDD()->debug_log; + + $args = array( + 'post_parent' => absint( $_POST['edd_export_download'] ), + 'log_type' => 'sale', + 'nopaging' => true + ); + + if( isset( $_POST['edd_price_option'] ) ) { + $args['meta_query'] = array( + array( + 'key' => '_edd_log_price_id', + 'value' => (int) $_POST['edd_price_option'] + ) + ); + } + + $logs = $edd_logs->get_connected_logs( $args ); + + if ( $logs ) { + foreach ( $logs as $log ) { + $payment_id = get_post_meta( $log->ID, '_edd_log_payment_id', true ); + $user_info = edd_get_payment_meta_user_info( $payment_id ); + $data[] = array( + 'first_name' => $user_info['first_name'], + 'last_name' => $user_info['last_name'], + 'email' => $user_info['email'], + 'date' => $log->post_date + ); + } + } + + } else { + + // Export all customers + $customers = edd_get_customers( array( + 'limit' => 9999999, + ) ); + + $i = 0; + + foreach ( $customers as $customer ) { + + if( 'emails' != $_POST['edd_export_option'] ) { + $data[$i]['name'] = $customer->name; + } + + $data[$i]['email'] = $customer->email; + + if( 'full' == $_POST['edd_export_option'] ) { + + $data[$i]['purchases'] = $customer->purchase_count; + $data[$i]['amount'] = edd_format_amount( $customer->purchase_value ); + + } + $i++; + } + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } +} diff --git a/includes/admin/reporting/class-export-download-history.php b/includes/admin/reporting/class-export-download-history.php new file mode 100755 index 00000000000..ca2e1e7d412 --- /dev/null +++ b/includes/admin/reporting/class-export-download-history.php @@ -0,0 +1,113 @@ +export_type . '-' . $month . '-' . $year ) . '.csv"' ); + header( 'Expires: 0' ); + } + + + /** + * Set the CSV columns + * + * @since 1.4.4 + * @return array $cols All the columns + */ + public function csv_cols() { + $cols = array( + 'date' => __( 'Date', 'easy-digital-downloads' ), + 'user' => __( 'Downloaded by', 'easy-digital-downloads' ), + 'ip' => __( 'IP Address', 'easy-digital-downloads' ), + 'download' => __( 'Product', 'easy-digital-downloads' ), + 'file' => __( 'File', 'easy-digital-downloads' ) + ); + return $cols; + } + + /** + * Get the Export Data + * + * @since 1.4.4 + * @global object $edd_logs EDD Logs Object + * @return array $data The data for the CSV file + */ + public function get_data() { + $edd_logs = EDD()->debug_log; + + $data = array(); + + $args = array( + 'nopaging' => true, + 'log_type' => 'file_download', + 'monthnum' => isset( $_POST['month'] ) ? absint( $_POST['month'] ) : date( 'n' ), + 'year' => isset( $_POST['year'] ) ? absint( $_POST['year'] ) : date( 'Y' ) + ); + + $logs = $edd_logs->get_connected_logs( $args ); + + if ( $logs ) { + foreach ( $logs as $log ) { + $user_info = get_post_meta( $log->ID, '_edd_log_user_info', true ); + $files = edd_get_download_files( $log->post_parent ); + $file_id = (int) get_post_meta( $log->ID, '_edd_log_file_id', true ); + $file_name = isset( $files[ $file_id ]['name'] ) ? $files[ $file_id ]['name'] : null; + $user = get_userdata( $user_info['id'] ); + $user = $user ? $user->user_login : $user_info['email']; + + $data[] = array( + 'date' => $log->post_date, + 'user' => $user, + 'ip' => get_post_meta( $log->ID, '_edd_log_ip', true ), + 'download' => get_the_title( $log->post_parent ), + 'file' => $file_name + ); + } + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } +} diff --git a/includes/admin/reporting/class-export-payments.php b/includes/admin/reporting/class-export-payments.php new file mode 100755 index 00000000000..f96eef98e8c --- /dev/null +++ b/includes/admin/reporting/class-export-payments.php @@ -0,0 +1,201 @@ +export_type . '-' . $month . '-' . $year ) . '.csv"' ); + header( 'Expires: 0' ); + } + + /** + * Set the CSV columns + * + * @since 1.4.4 + * @return array $cols All the columns + */ + public function csv_cols() { + $cols = array( + 'id' => __( 'ID', 'easy-digital-downloads' ), // unaltered payment ID (use for querying) + 'seq_id' => __( 'Payment Number', 'easy-digital-downloads' ), // sequential payment ID + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'first' => __( 'First Name', 'easy-digital-downloads' ), + 'last' => __( 'Last Name', 'easy-digital-downloads' ), + 'address1' => __( 'Address', 'easy-digital-downloads' ), + 'address2' => __( 'Address (Line 2)', 'easy-digital-downloads' ), + 'city' => __( 'City', 'easy-digital-downloads' ), + 'state' => __( 'State', 'easy-digital-downloads' ), + 'country' => __( 'Country', 'easy-digital-downloads' ), + 'zip' => __( 'Zip / Postal Code', 'easy-digital-downloads' ), + 'products' => __( 'Products', 'easy-digital-downloads' ), + 'skus' => __( 'SKUs', 'easy-digital-downloads' ), + 'currency' => __( 'Currency', 'easy-digital-downloads' ), + 'amount' => __( 'Amount', 'easy-digital-downloads' ), + 'tax' => __( 'Tax', 'easy-digital-downloads' ), + 'discount' => __( 'Discount Code', 'easy-digital-downloads' ), + 'gateway' => __( 'Payment Method', 'easy-digital-downloads' ), + 'trans_id' => __( 'Transaction ID', 'easy-digital-downloads' ), + 'key' => __( 'Purchase Key', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ), + 'user' => __( 'User', 'easy-digital-downloads' ), + 'status' => __( 'Status', 'easy-digital-downloads' ) + ); + + if( ! edd_use_skus() ){ + unset( $cols['skus'] ); + } + if ( ! edd_get_option( 'enable_sequential' ) ) { + unset( $cols['seq_id'] ); + } + + return $cols; + } + + /** + * Get the Export Data + * + * @since 1.4.4 + * @global object $wpdb Used to query the database using the WordPress + * Database API + * @return array $data The data for the CSV file + */ + public function get_data() { + global $wpdb; + + $data = array(); + + $payments = edd_get_payments( array( + 'offset' => 0, + 'number' => 9999999, + 'mode' => edd_is_test_mode() ? 'test' : 'live', + 'status' => isset( $_POST['edd_export_payment_status'] ) ? $_POST['edd_export_payment_status'] : 'any', + 'month' => isset( $_POST['month'] ) ? absint( $_POST['month'] ) : date( 'n' ), + 'year' => isset( $_POST['year'] ) ? absint( $_POST['year'] ) : date( 'Y' ) + ) ); + + foreach ( $payments as $payment ) { + $payment_meta = edd_get_payment_meta( $payment->ID ); + $user_info = edd_get_payment_meta_user_info( $payment->ID ); + $downloads = edd_get_payment_meta_cart_details( $payment->ID ); + $total = edd_get_payment_amount( $payment->ID ); + $user_id = isset( $user_info['id'] ) && $user_info['id'] != -1 ? $user_info['id'] : $user_info['email']; + $products = ''; + $skus = ''; + + if ( $downloads ) { + foreach ( $downloads as $key => $download ) { + // Download ID + $id = isset( $payment_meta['cart_details'] ) ? $download['id'] : $download; + + // If the download has variable prices, override the default price + $price_override = isset( $payment_meta['cart_details'] ) ? $download['price'] : null; + + $price = edd_get_download_final_price( $id, $user_info, $price_override ); + + // Display the Downoad Name + $products .= get_the_title( $id ) . ' - '; + + if ( edd_use_skus() ) { + $sku = edd_get_download_sku( $id ); + + if ( ! empty( $sku ) ) + $skus .= $sku; + } + + if ( isset( $downloads[ $key ]['item_number'] ) && isset( $downloads[ $key ]['item_number']['options'] ) ) { + $price_options = $downloads[ $key ]['item_number']['options']; + + if ( isset( $price_options['price_id'] ) ) { + $products .= edd_get_price_option_name( $id, $price_options['price_id'], $payment->ID ) . ' - '; + } + } + $products .= html_entity_decode( edd_currency_filter( $price ) ); + + if ( $key != ( count( $downloads ) -1 ) ) { + $products .= ' / '; + + if( edd_use_skus() ) + $skus .= ' / '; + } + } + } + + if ( is_numeric( $user_id ) ) { + $user = get_userdata( $user_id ); + } else { + $user = false; + } + + $currency_code = edd_get_payment_currency_code( $payment->ID ); + + $data[] = array( + 'id' => $payment->ID, + 'seq_id' => edd_get_payment_number( $payment->ID ), + 'email' => $payment_meta['email'], + 'first' => $user_info['first_name'], + 'last' => $user_info['last_name'], + 'address1' => isset( $user_info['address']['line1'] ) ? $user_info['address']['line1'] : '', + 'address2' => isset( $user_info['address']['line2'] ) ? $user_info['address']['line2'] : '', + 'city' => isset( $user_info['address']['city'] ) ? $user_info['address']['city'] : '', + 'state' => isset( $user_info['address']['state'] ) ? $user_info['address']['state'] : '', + 'country' => isset( $user_info['address']['country'] ) ? $user_info['address']['country'] : '', + 'zip' => isset( $user_info['address']['zip'] ) ? $user_info['address']['zip'] : '', + 'products' => $products, + 'skus' => $skus, + 'currency' => $currency_code, + 'amount' => html_entity_decode( edd_format_amount( $total, $currency_code ) ), + 'tax' => html_entity_decode( edd_format_amount( edd_get_payment_tax( $payment->ID, $payment_meta ), $currency_code ) ), + 'discount' => isset( $user_info['discount'] ) && $user_info['discount'] != 'none' ? $user_info['discount'] : __( 'none', 'easy-digital-downloads' ), + 'gateway' => edd_get_gateway_admin_label( edd_get_payment_meta( $payment->ID, '_edd_payment_gateway', true ) ), + 'trans_id' => edd_get_payment_transaction_id( $payment->ID ), + 'key' => $payment_meta['key'], + 'date' => $payment->post_date, + 'user' => $user ? $user->display_name : __( 'guest', 'easy-digital-downloads' ), + 'status' => edd_get_payment_status( $payment, true ) + ); + + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } +} diff --git a/includes/admin/reporting/class-export.php b/includes/admin/reporting/class-export.php new file mode 100755 index 00000000000..364656076e1 --- /dev/null +++ b/includes/admin/reporting/class-export.php @@ -0,0 +1,203 @@ +export_type . '-' . date( 'm-d-Y' ) . '.csv"' ); + header( 'Expires: 0' ); + + /** + * We need to append a BOM to the export so that Microsoft Excel knows + * that the file is in Unicode. + * + * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/4859 + */ + echo "\xEF\xBB\xBF"; + } + + /** + * Set the CSV columns. + * + * @since 1.4.4 + * + * @return array $cols CSV columns. + */ + public function csv_cols() { + $cols = array( + 'id' => __( 'ID', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ), + ); + return $cols; + } + + /** + * Retrieve the CSV columns. + * + * @since 1.4.4 + * + * @return array $cols Array of the columns. + */ + public function get_csv_cols() { + $cols = $this->csv_cols(); + return apply_filters( 'edd_export_csv_cols_' . $this->export_type, $cols ); + } + + /** + * Output the CSV columns. + * + * @since 1.4.4 + */ + public function csv_cols_out() { + $cols = $this->get_csv_cols(); + + $i = 1; + + // Output each column. + foreach ( $cols as $col_id => $column ) { + echo '"' . addslashes( $column ) . '"'; + + echo count( $cols ) === $i + ? '' + : ','; + + ++$i; + } + echo "\r\n"; + } + + /** + * Get the data being exported. + * + * @since 1.4.4 + * + * @return array $data Data for export. + */ + public function get_data() { + + // Just a sample data array. + $data = array( + 0 => array( + 'id' => '', + 'data' => date( 'F j, Y' ), + ), + 1 => array( + 'id' => '', + 'data' => date( 'F j, Y' ), + ), + ); + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } + + /** + * Output the CSV rows. + * + * @since 1.4.4 + */ + public function csv_rows_out() { + $data = $this->get_data(); + + $cols = $this->get_csv_cols(); + + // Output each row. + foreach ( $data as $row ) { + $i = 1; + + foreach ( $row as $col_id => $column ) { + + // Make sure the column is valid. + if ( array_key_exists( $col_id, $cols ) ) { + echo '"' . addslashes( $column ) . '"'; + + echo count( $cols ) === $i + ? '' + : ','; + + $i++; + } + } + echo "\r\n"; + } + } + + /** + * Perform the export. + * + * @since 1.4.4 + * + * @uses EDD_Export::can_export() + * @uses EDD_Export::headers() + * @uses EDD_Export::csv_cols_out() + * @uses EDD_Export::csv_rows_out() + */ + public function export() { + + // Bail if user if unauthorized. + if ( ! $this->can_export() ) { + wp_die( __( 'You do not have permission to export data.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Set headers. + $this->headers(); + + // Output CSV columns (headers). + $this->csv_cols_out(); + + // Output CSV rows. + $this->csv_rows_out(); + + edd_die(); + } +} diff --git a/includes/admin/reporting/class-file-downloads-logs-list-table.php b/includes/admin/reporting/class-file-downloads-logs-list-table.php new file mode 100755 index 00000000000..b48cafdbfb7 --- /dev/null +++ b/includes/admin/reporting/class-file-downloads-logs-list-table.php @@ -0,0 +1,258 @@ +ID, $item['price_id'] ) + : edd_get_download_name( $download->ID ); + + return '' . esc_html( $column_value ) . ''; + case 'customer' : + return ! empty( $item[ 'customer' ]->id ) + ? '' . esc_html( $item['customer']->name ) . '' + : '—'; + + case 'payment_id' : + $number = edd_get_payment_number( $item['payment_id'] ); + return ! empty( $number ) + ? '' . esc_html( $number ) . '' + : '—'; + case 'ip' : + return '' . esc_html( $item['ip'] ) . ''; + case 'file': + return ! empty( $item['file'] ) + ? esc_html( $item['file'] ) + : '—'; + default: + return $item[ $column_name ]; + } + } + + /** + * Set the table columns. + * + * @since 1.4 + * + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'ID' => __( 'Log ID', 'easy-digital-downloads' ), + 'download' => edd_get_label_singular(), + 'customer' => __( 'Customer', 'easy-digital-downloads' ), + 'payment_id' => __( 'Order Number', 'easy-digital-downloads' ), + 'file' => __( 'File', 'easy-digital-downloads' ), + 'ip' => __( 'IP Address', 'easy-digital-downloads' ), + 'user_agent' => __( 'User Agent', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ) + ); + } + + /** + * Gets the log entries for the current view + * + * @since 1.4 + * + * @param $log_query array Arguments for getting logs. + * + * @return array $logs_data Array of all the logs. + */ + function get_logs( $log_query = array() ) { + $logs_data = array(); + + $logs = edd_get_file_download_logs( $log_query ); + + if ( $logs ) { + foreach ( $logs as $log ) { + /** @var $log File_Download_Log */ + + $customer_id = ! empty( $log->customer_id ) ? (int) $log->customer_id : edd_get_payment_customer_id( $log->order_id ); + + $files = $this->get_log_files( $log, $customer_id ); + + $file_id = $log->file_id; + + /** + * Filters the ID of the file that was actually downloaded from this log. + * + * @param int $file_id + * @param File_Download_Log $log + */ + $file_id = apply_filters( 'edd_log_file_download_file_id', $file_id, $log ); + + $file_name = edd_get_file_download_log_meta( $log->id, 'file_name', true ); + + if ( empty( $file_name ) && is_array( $files ) && isset( $files[ $file_id ] ) ) { + $file_name = ! empty( $files[ $file_id ]['name'] ) + ? $files[ $file_id ]['name'] + : edd_get_file_name( $files[ $file_id ] ); + } + + if ( empty( $this->file_search ) || ( ! empty( $this->file_search ) && strpos( strtolower( $file_name ), strtolower( $this->get_search() ) ) !== false ) ) { + $logs_data[] = array( + 'ID' => $log->id, + 'download' => $log->product_id, + 'customer' => new EDD_Customer( $customer_id ), + 'payment_id' => $log->order_id, + 'price_id' => $log->price_id, + 'file' => $file_name, + 'ip' => $log->ip, + 'user_agent' => $log->user_agent, + 'date' => $log->date_created, + ); + } + } + } + + return $logs_data; + } + + /** + * Retrieves the array of files associated with the log. + * + * This method contains a lot of logic to ensure backwards compatibility with how + * the `edd_log_file_download_download_files` filter was formatted in EDD 2.x. + * + * @since 3.0 + * + * @param File_Download_Log $log + * @param int $customer_id + * + * @return array + */ + protected function get_log_files( File_Download_Log $log, $customer_id ) { + $customer = ! empty( $customer_id ) ? edd_get_customer( $customer_id ) : false; + + /* + * Get the files associated with this download and store them in a property to prevent + * multiple queries for the same download. + * This is needed for backwards compatibility in the `edd_log_file_download_download_files` filter. + */ + if ( ! array_key_exists( $log->product_id, $this->queried_files ) ) { + $files = get_post_meta( $log->product_id, 'edd_download_files', true ); + $this->queried_files[ $log->product_id ] = $files; + } else { + $files = $this->queried_files[ $log->product_id ]; + } + + /* + * User info is needed for backwards compatibility in the `edd_log_file_download_download_files` filter. + */ + $user = ! empty( $customer->user_id ) ? get_userdata( $customer->user_id ) : false; + + $user_info = ! empty( $user ) + ? array( + 'id' => $user->ID, + 'email' => $user->user_email, + 'name' => $user->display_name, + ) + : array(); + + /* + * Build up an array of meta. + */ + $meta = edd_get_file_download_log_meta( $log->id ); + + // These meta keys no longer exist, but we need to create them for use in the filter. + $backwards_compat_meta = array( + '_edd_log_user_info' => $user_info, + '_edd_log_user_id' => ! empty( $customer->user_id ) ? $customer->user_id : false, + '_edd_log_customer_id' => $customer_id, + '_edd_log_file_id' => $log->file_id, + '_edd_log_ip' => $log->ip, + '_edd_log_payment_id' => $log->order_id, + '_edd_log_price_id' => $log->price_id, + ); + + foreach( $backwards_compat_meta as $meta_key => $meta_value ) { + $meta[ $meta_key ] = array( $meta_value ); + } + + /** + * Filters the array of all files linked to the product. + * + * @param array $files Files linked to the product. + * @param File_Download_Log $log Log record from the database. + * @param array $meta What used to be the meta array in EDD 2.9 and lower. + */ + return apply_filters( 'edd_log_file_download_download_files', $files, $log, $meta ); + } + + /** + * Setup the final data for the table. + * + * @since 1.5 + */ + public function get_total( $log_query = array() ) { + return edd_count_file_download_logs( $log_query ); + } +} diff --git a/includes/admin/reporting/class-gateway-error-logs-list-table.php b/includes/admin/reporting/class-gateway-error-logs-list-table.php new file mode 100755 index 00000000000..a19ee6159e7 --- /dev/null +++ b/includes/admin/reporting/class-gateway-error-logs-list-table.php @@ -0,0 +1,158 @@ + + + + __( 'Log ID', 'easy-digital-downloads' ), + 'payment_id' => __( 'Order Number', 'easy-digital-downloads' ), + 'error' => __( 'Error', 'easy-digital-downloads' ), + 'message' => __( 'Error Message', 'easy-digital-downloads' ), + 'gateway' => __( 'Gateway', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ) + ); + } + + /** + * Gets the log entries for the current view + * + * @since 1.4 + * @param array $log_query Query arguments + * @global object $edd_logs EDD Logs Object + * @return array $logs_data Array of all the Log entries + */ + public function get_logs( $log_query = array() ) { + $logs_data = array(); + $log_query['type'] = 'gateway_error'; + + $logs = edd_get_logs( $log_query ); + + if ( $logs ) { + foreach ( $logs as $log ) { + /** @var $log EDD\Logs\Log */ + + $logs_data[] = array( + 'ID' => $log->id, + 'payment_id' => $log->object_id, + 'error' => $log->title ? $log->title : __( 'Payment Error', 'easy-digital-downloads' ), + 'gateway' => edd_get_payment_gateway( $log->object_id ), + 'date' => $log->date_created, + 'content' => $log->content, + ); + } + } + + return $logs_data; + } + + /** + * Setup the final data for the table. + * + * @since 1.5 + */ + public function get_total( $log_query = array() ) { + $log_query['type'] = 'gateway_error'; + + return edd_count_logs( $log_query ); + } +} diff --git a/includes/admin/reporting/class-gateways-reports-table.php b/includes/admin/reporting/class-gateways-reports-table.php new file mode 100755 index 00000000000..bd9b7ed009a --- /dev/null +++ b/includes/admin/reporting/class-gateways-reports-table.php @@ -0,0 +1,159 @@ + 'report-gateway', + 'plural' => 'report-gateways', + 'ajax' => false + ) ); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'label'; + } + + /** + * This function renders most of the columns in the list table. + * + * @since 1.5 + * + * @param array $item Contains all the data of the downloads + * @param string $column_name The name of the column + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Retrieve the table columns + * + * @since 1.5 + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'label' => __( 'Gateway', 'easy-digital-downloads' ), + 'complete_sales' => __( 'Complete Sales', 'easy-digital-downloads' ), + 'pending_sales' => __( 'Pending / Failed Sales', 'easy-digital-downloads' ), + 'total_sales' => __( 'Total Sales', 'easy-digital-downloads' ) + ); + } + + /** + * Outputs the reporting views + * + * @since 1.5 + * @return void + */ + public function bulk_actions( $which = '' ) { + // These aren't really bulk actions but this outputs the markup in + // the right place. + edd_report_views(); + } + + /** + * Builds and retrieves all of the payment gateways reports data. + * + * @since 1.5 + * @deprecated 3.0 Use get_data() + * + * @return array All the data for customer reports. + */ + public function reports_data() { + _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Gateway_Reports_Table::get_data()' ); + + return $this->get_data(); + } + + /** + * Retrieves all of the payment gateways reports data. + * + * @since 3.0 + * + * @return array Payment gateways reports table data. + */ + public function get_data() { + + $reports_data = array(); + $gateways = edd_get_payment_gateways(); + + foreach ( $gateways as $gateway_id => $gateway ) { + + $complete_count = edd_count_sales_by_gateway( $gateway_id, edd_get_gross_order_statuses() ); + $pending_count = edd_count_sales_by_gateway( $gateway_id, edd_get_incomplete_order_statuses() ); + + $reports_data[] = array( + 'ID' => $gateway_id, + 'label' => $gateway['admin_label'], + 'complete_sales' => edd_format_amount( $complete_count, false ), + 'pending_sales' => edd_format_amount( $pending_count, false ), + 'total_sales' => edd_format_amount( $complete_count + $pending_count, false ), + ); + } + + return $reports_data; + } + + /** + * Setup the final data for the table + * + * @since 1.5 + * @uses EDD_Gateway_Reports_Table::get_columns() + * @uses EDD_Gateway_Reports_Table::get_sortable_columns() + * @uses EDD_Gateway_Reports_Table::reports_data() + * @return void + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); // No hidden columns + $sortable = $this->get_sortable_columns(); + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + } +} + +/** + * Back-compat for typo + * + * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6549 + */ +class_alias( 'EDD_Gateway_Reports_Table', 'EDD_Gateawy_Reports_Table' ); diff --git a/includes/admin/reporting/class-reports-sections.php b/includes/admin/reporting/class-reports-sections.php new file mode 100644 index 00000000000..27b403ba359 --- /dev/null +++ b/includes/admin/reporting/class-reports-sections.php @@ -0,0 +1,51 @@ +use_js ) + ? ' use-js' + : ''; + + $role = $this->use_js ? 'tablist' : 'menu'; + ?> +
    + +
    +
      + get_all_section_links(); ?> +
    + +
    + get_all_section_contents(); ?> +
    +
    +
    +
    + get_name( $price_id ); + $return = '' . esc_html( $title ) . ''; + break; + + case 'customer': + $name = ! empty( $item['customer']->name ) + ? $item['customer']->name + : '' . __( 'Unnamed Customer', 'easy-digital-downloads' ) . ''; + + $return = '#' . esc_html( $item['customer']->id ) . ' ' . esc_html( $name ) . ''; + break; + + case 'item_price': + $return = edd_currency_filter( edd_format_amount( $item['item_price'] ), $currency ); + break; + + case 'amount': + $return = edd_currency_filter( edd_format_amount( $item['amount'] / $item['quantity'] ), $currency ); + break; + + case 'ID': + $return = '' . absint( $item['ID'] ) . ''; + break; + + default: + $return = $item[ $column_name ]; + break; + } + + return $return; + } + + /** + * Retrieve the table columns + * + * @since 1.4 + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'ID' => __( 'Order Number', 'easy-digital-downloads' ), + 'customer' => __( 'Customer', 'easy-digital-downloads' ), + 'download' => edd_get_label_singular(), + 'amount' => __( 'Item Amount', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ), + ); + } + + /** + * Return array of query arguments. + * + * @since 3.0 + * + * @param boolean $paginate + * + * @return array + */ + protected function get_query_args( $paginate = true ) { + $retval = parent::get_query_args( $paginate ); + + $user = $this->get_filtered_user(); + + if ( $user ) { + // Show only logs from a specific user + $retval['user_id'] = $user; + } + + $search = $this->get_search(); + if ( $search ) { + if ( is_email( $search ) ) { + $field = 'email'; + } else { + // Look for a user + $field = 'user_id'; + + if ( ! is_numeric( $search ) ) { + // Searching for user by username + $user = get_user_by( 'login', $search ); + + if ( $user ) { + // Found one, set meta value to user's ID + $search = $user->ID; + } else { + // No user found so let's do a real search query + $users = new WP_User_Query( array( + 'search' => $search, + 'search_columns' => array( 'user_url', 'user_nicename' ), + 'number' => 1, + 'fields' => 'ids', + ) ); + + $found_user = $users->get_results(); + + if ( $found_user ) { + $search = $found_user[0]; + } + } + } + } + + if ( ! $this->file_search ) { + $retval[ $field ] = $search; + } + } + + return $retval; + } + + /** + * Gets the log entries for the current view. + * + * @since 1.4 + * @since 3.0 Refactored to fetch from order items table. + * + * @param array $log_query Query vars. + * @return array $data Array of all the sales. + */ + public function get_logs( $log_query = array() ) { + $data = $order_args = array(); + + // Customer ID + if ( ! empty( $log_query['customer_id'] ) ) { + $order_args = array( + 'customer_id' => $log_query['customer_id'], + 'no_found_rows' => true + ); + + // Customer Email + } elseif ( ! empty( $log_query['email'] ) ) { + $order_args = array( + 'email' => $log_query['email'], + 'no_found_rows' => true + ); + } + + // Maybe query for orders first + if ( ! empty( $order_args ) ) { + $orders = edd_get_orders( $order_args ); + $log_query['order_id__in'] = wp_list_pluck( $orders, 'id' ); + } + + // Query order items + $order_items = edd_get_order_items( $log_query ); + + // Bail if no order items + if ( empty( $order_items ) ) { + return $data; + } + + // Maybe prime orders + if ( empty( $orders ) ) { + $order_ids = array_values( array_unique( wp_list_pluck( $order_items, 'order_id' ) ) ); + + if ( count( $order_ids ) > 2 ) { + $orders = edd_get_orders( array( + 'id__in' => $order_ids, + 'no_found_rows' => true + ) ); + } + } + + // Maybe prime customers + if ( ! empty( $orders ) ) { + $customer_ids = array_values( array_unique( wp_list_pluck( $orders, 'customer_id' ) ) ); + + if ( count( $customer_ids ) > 2 ) { + edd_get_customers( array( + 'id__in' => $customer_ids, + 'no_found_rows' => true + ) ); + } + } + + // Loop through order items + foreach ( $order_items as $order_item ) { + $order = edd_get_order( $order_item->order_id ); + + $data[] = array( + 'ID' => $order->get_number(), + 'order_id' => $order->id, + 'customer' => edd_get_customer( $order->customer_id ), + 'download' => $order_item->product_id, + 'price_id' => $order_item->price_id, + 'item_price' => $order_item->amount, + 'amount' => $order_item->total, + 'date' => EDD()->utils->date( $order_item->date_created, null, true )->toDateTimeString(), + 'quantity' => $order_item->quantity, + 'currency' => $order->currency, + ); + } + + return $data; + } + + /** + * Get the total number of items + * + * @since 3.0 + * + * @param array $log_query + * + * @return int + */ + public function get_total( $log_query = array() ) { + return edd_count_order_items( $log_query ); + } +} diff --git a/includes/admin/reporting/contextual-help.php b/includes/admin/reporting/contextual-help.php new file mode 100755 index 00000000000..46686fd0949 --- /dev/null +++ b/includes/admin/reporting/contextual-help.php @@ -0,0 +1,92 @@ +id != 'download_page_edd-reports' ) { + return; + } + + $pass_manager = new Pass_Manager(); + if ( $pass_manager->isFree() ) { + $docs_url = edd_link_helper( + 'https://easydigitaldownloads.com/docs/', + array( + 'utm_medium' => 'reports-contextual-help', + 'utm_content' => 'documentation', + ) + ); + + $upgrade_url = edd_link_helper( + 'https://easydigitaldownloads.com/lite-upgrade/', + array( + 'utm_medium' => 'reports-contextual-help', + 'utm_content' => 'lite-upgrade', + ) + ); + + $screen->set_help_sidebar( + '

    ' . __( 'For more information:', 'easy-digital-downloads' ) . '

    ' . + '

    ' . sprintf( __( 'Visit the documentation on the Easy Digital Downloads website.', 'easy-digital-downloads' ), $docs_url ) . '

    ' . + '

    ' . sprintf( + __( 'Need more from your Easy Digital Downloads store? Upgrade Now!', 'easy-digital-downloads' ), + $upgrade_url + ) . '

    ' + ); + } + + $screen->add_help_tab( array( + 'id' => 'edd-reports', + 'title' => __( 'Reports', 'easy-digital-downloads' ), + 'content' => '

    ' . __( 'This screen provides you with reports for your earnings, downloads, customers and taxes.', 'easy-digital-downloads' ) . '

    ' + ) ); + + $screen->add_help_tab( array( + 'id' => 'edd-reports-export', + 'title' => __( 'Export', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'This screen allows you to export your reports into a CSV format.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Sales and Earnings - This report exports all of the sales and earnings that you have made in the current year. It includes your sales and earnings for each product as well a graphs of sales and earnings so you can compare them for each month.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Payment History - This report exports all of the payments you have received on your EDD store in a CSV format. It includes the contact details of the customer, the products they have purchased as well as any discount codes they have used and the final price they have paid.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( "Customers - This report exports all of your customers in a CSV format. It exports the customer's name and email address and the amount of products they have purchased as well as the final price of their total purchases.", 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Download History - This report exports all of the downloads you have received in the current month into a CSV. It exports the date the file was downloaded, the customer it was downloaded by, their IP address, the name of the product and the file they downloaded.', 'easy-digital-downloads' ) . '

    ' + ) ); + + if( ! empty( $_GET['tab'] ) && 'logs' == $_GET['tab'] ) { + $screen->add_help_tab( array( + 'id' => 'edd-reports-log-search', + 'title' => __( 'Search File Downloads', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'The file download log can be searched in several different ways:', 'easy-digital-downloads' ) . '

    ' . + '
      +
    • ' . __( 'You can enter the customer\'s email address', 'easy-digital-downloads' ) . '
    • +
    • ' . __( 'You can enter the customer\'s IP address', 'easy-digital-downloads' ) . '
    • +
    • ' . __( 'You can enter the download file\'s name', 'easy-digital-downloads' ) . '
    • +
    ' + ) ); + } + + do_action( 'edd_reports_contextual_help', $screen ); +} +add_action( 'load-download_page_edd-reports', 'edd_reporting_contextual_help' ); diff --git a/includes/admin/reporting/export/class-batch-export-api-requests.php b/includes/admin/reporting/export/class-batch-export-api-requests.php new file mode 100644 index 00000000000..3b18964de26 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-api-requests.php @@ -0,0 +1,132 @@ + __( 'Log ID', 'easy-digital-downloads' ), + 'request' => __( 'API Request', 'easy-digital-downloads' ), + 'ip' => __( 'IP Address', 'easy-digital-downloads' ), + 'user' => __( 'API User', 'easy-digital-downloads' ), + 'key' => __( 'API Key', 'easy-digital-downloads' ), + 'version' => __( 'API Version', 'easy-digital-downloads' ), + 'speed' => __( 'Request Speed', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ) + ); + + return $cols; + } + + /** + * Get the export data. + * + * @since 2.7 + * @since 3.0 Updated to use new query methods. + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + $data = array(); + + $args = array( + 'number' => 30, + 'offset' => ( $this->step * 30 ) - 30 + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + $logs = edd_get_api_request_logs( $args ); + + foreach ( $logs as $log ) { + /** @var EDD\Logs\Api_Request_Log $log */ + + $data[] = array( + 'ID' => $log->id, + 'request' => $log->request, + 'ip' => $log->ip, + 'user' => $log->user_id, + 'key' => $log->api_key, + 'version' => $log->version, + 'speed' => $log->time, + 'date' => $log->date_created + ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return ! empty( $data ) + ? $data + : false; + } + + /** + * Return the calculated completion percentage. + * + * @since 2.7 + * @since 3.0 Updated to use new query methods. + * + * @return int Percentage complete. + */ + public function get_percentage_complete() { + $args = array( + 'fields' => 'ids', + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + $total = edd_count_api_request_logs( $args ); + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + public function set_properties( $request ) { + $this->start = isset( $request['api-requests-export-start'] ) ? sanitize_text_field( $request['api-requests-export-start'] ) : ''; + $this->end = isset( $request['api-requests-export-end'] ) ? sanitize_text_field( $request['api-requests-export-end'] ) : ''; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-customers.php b/includes/admin/reporting/export/class-batch-export-customers.php new file mode 100644 index 00000000000..395472827e6 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-customers.php @@ -0,0 +1,230 @@ + __( 'ID', 'easy-digital-downloads' ), + 'user_id' => __( 'User ID', 'easy-digital-downloads' ), + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'purchases' => __( 'Number of Purchases', 'easy-digital-downloads' ), + 'amount' => __( 'Customer Value', 'easy-digital-downloads' ), + 'payment_ids' => __( 'Payment IDs', 'easy-digital-downloads' ), + 'date_created' => __( 'Date Created', 'easy-digital-downloads' ), + ); + } + + /** + * Get the export data. + * + * @since 2.4 + * @since 3.0 Updated to use new query methods. + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + global $wpdb; + + $data = array(); + + // Taxonomy. + if ( ! empty( $this->taxonomy ) ) { + $taxonomy = $wpdb->prepare( 't.term_id = %d', $this->taxonomy ); + + $limit = $wpdb->prepare( '%d, %d', 30 * ( $this->step - 1 ), 30 ); + + $sql = "SELECT DISTINCT o.customer_id + FROM {$wpdb->terms} t + INNER JOIN {$wpdb->term_taxonomy} tt ON t.term_id = tt.term_id + INNER JOIN {$wpdb->term_relationships} tr ON tr.term_taxonomy_id = tt.term_taxonomy_id + INNER JOIN {$wpdb->edd_order_items} oi ON tr.object_id = oi.product_id + INNER JOIN {$wpdb->edd_orders} o ON oi.order_id = o.id + WHERE {$taxonomy} + LIMIT {$limit}"; + + $results = $wpdb->get_col( $sql ); // WPCS: unprepared SQL ok. + + if ( $results ) { + foreach ( $results as $customer_id ) { + $customer = new EDD_Customer( $customer_id ); + $name = ! empty( $customer->name ) ? $customer->name : ''; + if ( preg_match( '~^[+\-=@]~m', $name ) ) { + $name = "'{$name}"; + } + + $data[] = array( + 'id' => $customer->id, + 'name' => $name, + 'email' => $customer->email, + 'purchases' => $customer->purchase_count, + 'amount' => edd_format_amount( $customer->purchase_value ), + ); + } + } + + // Download. + } elseif ( ! empty( $this->download ) ) { + // Export customers of a specific product + + $args = array( + 'product_id' => absint( $this->download ), + 'number' => 30, + 'offset' => 30 * ( $this->step - 1 ), + ); + + if ( null !== $this->price_id ) { + $args['price_id'] = (int) $this->price_id; + } + + $order_items = edd_get_order_items( $args ); + + if ( $order_items ) { + foreach ( $order_items as $item ) { + $order = edd_get_order( $item->order_id ); + + $customer = new EDD_Customer( $order->customer_id ); + $name = ! empty( $customer->name ) ? $customer->name : ''; + if ( preg_match( '~^[+\-=@]~m', $name ) ) { + $name = "'{$name}"; + } + + $data[] = array( + 'id' => $customer->id, + 'user_id' => $customer->user_id, + 'name' => $name, + 'email' => $customer->email, + 'purchases' => $customer->purchase_count, + 'amount' => edd_format_amount( $customer->purchase_value ), + 'payment_ids' => $customer->payment_ids, + 'date_created' => $customer->date_created, + ); + } + } + + // All customers. + } else { + $customers = edd_get_customers( array( + 'number' => 30, + 'offset' => 30 * ( $this->step - 1 ), + ) ); + + $i = 0; + + foreach ( $customers as $customer ) { + $name = ! empty( $customer->name ) ? $customer->name : ''; + if ( preg_match( '~^[+\-=@]~m', $name ) ) { + $name = "'{$name}"; + } + $data[ $i ]= array( + 'id' => $customer->id, + 'user_id' => $customer->user_id, + 'name' => $name, + 'email' => $customer->email, + 'purchases' => $customer->purchase_count, + 'amount' => edd_format_amount( $customer->purchase_value ), + 'payment_ids' => $customer->payment_ids, + 'date_created' => $customer->date_created, + ); + + $i++; + } + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } + + /** + * Return the calculated completion percentage. + * + * @since 2.4 + * + * @return float Percentage complete. + */ + public function get_percentage_complete() { + $percentage = 0; + + // We can't count the number when getting them for a specific download. + if ( empty( $this->download ) ) { + $total = edd_count_customers(); + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set the properties specific to the Customers export + * + * @since 2.4.2 + * + * @param array $request Form data passed into the batch processing. + */ + public function set_properties( $request ) { + $this->taxonomy = isset( $request['taxonomy'] ) + ? absint( $request['taxonomy'] ) + : null; + + $this->download = isset( $request['download'] ) + ? absint( $request['download'] ) + : null; + + $this->price_id = ! empty( $request['edd_price_option'] ) && 0 !== $request['edd_price_option'] + ? absint( $request['edd_price_option'] ) + : null; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-downloads.php b/includes/admin/reporting/export/class-batch-export-downloads.php new file mode 100644 index 00000000000..1ea03b64091 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-downloads.php @@ -0,0 +1,234 @@ + __( 'ID', 'easy-digital-downloads' ), + 'post_name' => __( 'Slug', 'easy-digital-downloads' ), + 'post_title' => __( 'Name', 'easy-digital-downloads' ), + 'post_date' => __( 'Date Created', 'easy-digital-downloads' ), + 'post_author' => __( 'Author', 'easy-digital-downloads' ), + 'post_content' => __( 'Description', 'easy-digital-downloads' ), + 'post_excerpt' => __( 'Excerpt', 'easy-digital-downloads' ), + 'post_status' => __( 'Status', 'easy-digital-downloads' ), + 'categories' => __( 'Categories', 'easy-digital-downloads' ), + 'tags' => __( 'Tags', 'easy-digital-downloads' ), + 'edd_price' => __( 'Price', 'easy-digital-downloads' ), + '_edd_files' => __( 'Files', 'easy-digital-downloads' ), + '_edd_download_limit' => __( 'File Download Limit', 'easy-digital-downloads' ), + '_thumbnail_id' => __( 'Featured Image', 'easy-digital-downloads' ), + 'edd_sku' => __( 'SKU', 'easy-digital-downloads' ), + 'edd_product_notes' => __( 'Notes', 'easy-digital-downloads' ), + '_edd_download_sales' => __( 'Sales', 'easy-digital-downloads' ), + '_edd_download_earnings' => __( 'Earnings', 'easy-digital-downloads' ), + ); + + return $cols; + } + + /** + * Get the export data. + * + * @since 2.5 + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + $data = array(); + + $meta = array( + 'edd_price', + '_edd_files', + '_edd_download_limit', + '_thumbnail_id', + 'edd_sku', + 'edd_product_notes', + '_edd_download_sales', + '_edd_download_earnings', + ); + + $args = array( + 'post_type' => 'download', + 'posts_per_page' => 30, + 'paged' => $this->step, + 'orderby' => 'ID', + 'order' => 'ASC', + ); + + if ( 0 !== $this->download ) { + $args['post__in'] = array( $this->download ); + } + + $downloads = new WP_Query( $args ); + + if ( $downloads->posts ) { + foreach ( $downloads->posts as $download ) { + $row = array(); + + foreach ( $this->csv_cols() as $key => $value ) { + + // Setup default value + $row[ $key ] = ''; + + if ( in_array( $key, $meta ) ) { + switch ( $key ) { + case '_thumbnail_id' : + $image_id = get_post_thumbnail_id( $download->ID ); + $row[ $key ] = wp_get_attachment_url( $image_id ); + break; + + case 'edd_price' : + if ( edd_has_variable_prices( $download->ID ) ) { + $prices = array(); + foreach ( edd_get_variable_prices( $download->ID ) as $price ) { + $prices[] = $price['name'] . ': ' . $price['amount']; + } + + $row[ $key ] = implode( ' | ', $prices ); + } else { + $row[ $key ] = edd_get_download_price( $download->ID ); + } + break; + + case '_edd_files' : + $files = array(); + + foreach ( edd_get_download_files( $download->ID ) as $file ) { + $f = $file['file']; + + if ( edd_has_variable_prices( $download->ID ) ) { + $condition = isset( $file['condition'] ) ? $file['condition'] : 'all'; + $f .= ';' . $condition; + } + + $files[] = $f; + + unset( $file ); + } + + $row[ $key ] = implode( ' | ', $files ); + break; + + default : + $row[ $key ] = get_post_meta( $download->ID, $key, true ); + break; + } + } elseif ( isset( $download->$key ) ) { + switch ( $key ) { + case 'post_author': + $row[ $key ] = get_the_author_meta( 'user_login', $download->post_author ); + break; + + default: + $row[ $key ] = $download->$key; + break; + } + } elseif ( 'tags' == $key ) { + $terms = get_the_terms( $download->ID, 'download_tag' ); + + if ( $terms ) { + $terms = wp_list_pluck( $terms, 'name' ); + $row[ $key ] = implode( ' | ', $terms ); + } + } elseif ( 'categories' == $key ) { + $terms = get_the_terms( $download->ID, 'download_category' ); + + if ( $terms ) { + $terms = wp_list_pluck( $terms, 'name' ); + $row[ $key ] = implode( ' | ', $terms ); + } + } + } + + $data[] = $row; + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } + + return false; + } + + /** + * Return the calculated completion percentage. + * + * @since 2.5 + * + * @return int Percentage complete. + */ + public function get_percentage_complete() { + $args = array( + 'post_type' => 'download', + 'posts_per_page' => - 1, + 'post_status' => 'any', + 'fields' => 'ids', + ); + + if ( 0 !== $this->download ) { + $args['post__in'] = array( $this->download ); + } + + $downloads = new WP_Query( $args ); + $total = (int) $downloads->post_count; + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set the properties specific to the downloads export. + * + * @since 3.0 + * + * @param array $request Form data passed into the batch processor. + */ + public function set_properties( $request ) { + $this->download = isset( $request['download_id'] ) ? absint( $request['download_id'] ) : null; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-earnings-report.php b/includes/admin/reporting/export/class-batch-export-earnings-report.php new file mode 100644 index 00000000000..af4e6ff72a9 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-earnings-report.php @@ -0,0 +1,383 @@ +export_type . '-' . date( 'm' ) . '-' . date( 'Y' ) ) . '.csv"' ); + header( 'Expires: 0' ); + } + + /** + * Get the column headers for the Earnings Report. + * + * @since 2.8.18 + * + * @return array CSV columns. + */ + public function get_csv_cols() { + + // Always start with the date column. + $pre_status_columns = array( + __( 'Monthly Sales Activity', 'easy-digital-downloads' ), + __( 'Gross Activity', 'easy-digital-downloads' ), + ); + + $status_cols = $this->get_status_cols(); + + // Append the arrays together so it starts with the date, then include the status list. + $cols = array_merge( $pre_status_columns, $status_cols ); + + // Include the 'net' after all other columns. + $cols[] = __( 'Net Activity', 'easy-digital-downloads' ); + + return $cols; + } + + /** + * Specifically retrieve the headers for supported order statuses. + * + * @since 2.8.18 + * + * @return array Order status columns. + */ + public function get_status_cols() { + $status_cols = edd_get_payment_statuses(); + $supported_statuses = $this->get_supported_statuses(); + + foreach ( $status_cols as $id => $label ) { + if ( ! in_array( $id, $supported_statuses ) ) { + unset( $status_cols[ $id ] ); + } + } + + return array_values( $status_cols ); + } + + /** + * Get a list of the statuses supported in this report. + * + * @since 2.8.18 + * + * @return array The status keys supported (not labels). + */ + public function get_supported_statuses() { + $statuses = edd_get_payment_statuses(); + + // Unset a few statuses we don't need in the report: + unset( $statuses['pending'], $statuses['processing'], $statuses['preapproval'] ); + $supported_statuses = array_keys( $statuses ); + + return array_unique( apply_filters( 'edd_export_earnings_supported_statuses', $supported_statuses ) ); + } + + /** + * Output the CSV columns. + * + * We make use of this function to set up the header of the earnings report. + * + * @since 2.7 + * + * @return string $col_data CSV cols. + */ + public function print_csv_cols() { + $cols = $this->get_csv_cols(); + $col_data = ''; + $column_count = count( $cols ); + for ( $i = 0; $i < $column_count; $i++ ) { + $col_data .= $cols[ $i ]; + + // We don't need an extra space after the first column. + if ( $i == 0 ) { + $col_data .= ','; + continue; + } + + if ( $i == ( $column_count - 1 ) ) { + $col_data .= "\r\n"; + } else { + $col_data .= ",,"; + } + } + + $statuses = $this->get_supported_statuses(); + $number_cols = count( $statuses ) + 2; + + $col_data .= ','; + for ( $i = 1; $i <= $number_cols; $i++ ) { + $col_data .= __( 'Order Count', 'easy-digital-downloads' ) . ','; + $col_data .= __( 'Gross Amount', 'easy-digital-downloads' ); + + if ( $number_cols !== $i ) { + $col_data .= ','; + } + } + $col_data .= "\r\n"; + + $this->stash_step_data( $col_data ); + + return $col_data; + } + + /** + * Print the CSV rows for the current step. + * + * @since 2.7 + * + * @return mixed string|false + */ + public function print_csv_rows() { + $row_data = ''; + + $data = $this->get_data(); + + if ( $data ) { + $start_date = date( 'Y-m-d', strtotime( $this->start ) ); + + if ( $this->count() == 0 ) { + $end_date = date( 'Y-m-d', strtotime( $this->end ) ); + } else { + $end_date = date( 'Y-m-d', strtotime( 'first day of +1 month', strtotime( $start_date ) ) ); + } + + if ( $this->step == 1 ) { + $row_data .= $start_date . ','; + } elseif ( $this->step > 1 ) { + $start_date = date( 'Y-m-d', strtotime( 'first day of +' . ( $this->step - 1 ) . ' month', strtotime( $start_date ) ) ); + + if ( date( 'Y-m', strtotime( $start_date ) ) == date( 'Y-m', strtotime( $this->end ) ) ) { + $end_date = date( 'Y-m-d', strtotime( $this->end ) ); + $row_data .= $end_date . ','; + } else { + $row_data .= $start_date . ','; + } + } + + $gross_count = 0; + $gross_amount = 0; + foreach ( edd_get_gross_order_statuses() as $status ) { + $gross_count += absint( $data[ $status ]['count'] ); + $gross_amount += $data[ $status ]['amount']; + } + + $row_data .= $gross_count . ','; + $row_data .= '"' . edd_format_amount( $gross_amount ) . '",'; + + foreach ( $data as $status => $status_data ) { + $row_data .= isset( $data[ $status ]['count'] ) ? $data[ $status ]['count'] . ',' : 0 . ','; + + $column_amount = isset( $data[ $status ]['amount'] ) ? edd_format_amount( $data[ $status ]['amount'] ) : 0; + if ( ! empty( $column_amount ) && 'refunded' == $status ) { + $column_amount = '-' . $column_amount; + } + + $row_data .= isset( $data[ $status ]['amount'] ) ? '"' . $column_amount . '"' . ',' : 0 . ','; + } + + // Allows extensions with other 'completed' statuses to alter net earnings, like recurring. + $completed_statuses = array_unique( apply_filters( 'edd_export_earnings_completed_statuses', edd_get_net_order_statuses() ) ); + + $net_count = 0; + $net_amount = 0; + foreach ( $completed_statuses as $status ) { + if ( ! isset( $data[ $status ] ) ) { + continue; + } + $net_count += absint( $data[ $status ]['count'] ); + $net_amount += floatval( $data[ $status ]['amount'] ); + } + if ( ! empty( $this->partial_refunds ) ) { + $net_amount += floatval( $this->partial_refunds['total'] ); + } + $row_data .= $net_count . ','; + $row_data .= '"' . edd_format_amount( $net_amount ) . '"'; + + $row_data .= "\r\n"; + + $this->stash_step_data( $row_data ); + + return $row_data; + } + + return false; + } + + /** + * Get the Export Data. + * + * @since 2.7 + * + * @return array $data The data for the CSV file + */ + public function get_data() { + global $wpdb; + + $data = array(); + + $start_date = date( 'Y-m-d 00:00:00', strtotime( $this->start ) ); + $end_date = date( 'Y-m-t 23:59:59', strtotime( $this->start ) ); + + if ( $this->step > 1 ) { + $start_timestamp = strtotime( 'first day of +' . ( $this->step - 1 ) . ' month', strtotime( $start_date ) ); + $start_date = date( 'Y-m-d 00:00:00', $start_timestamp ); + $end_date = date( 'Y-m-t 23:59:59', $start_timestamp ); + } + + if ( strtotime( $start_date ) > strtotime( $this->end ) ) { + return false; + } + + $statuses = $this->get_supported_statuses(); + $totals = $wpdb->get_results( $wpdb->prepare( + "SELECT SUM(total) AS total, COUNT(DISTINCT id) AS count, status + FROM {$wpdb->edd_orders} + WHERE type = 'sale' + AND date_created >= %s AND date_created <= %s + GROUP BY YEAR(date_created), MONTH(date_created), status + ORDER by date_created ASC", $start_date, $end_date ), ARRAY_A ); + + $total_data = array(); + foreach ( $totals as $row ) { + $total_data[ $row['status'] ] = array( + 'count' => $row['count'], + 'amount' => floatval( $row['total'] ), + ); + } + + foreach ( $statuses as $status ) { + + if ( ! isset( $total_data[ $status ] ) ) { + $data[ $status ] = array( + 'count' => 0, + 'amount' => 0, + ); + } else { + $data[ $status ] = array( + 'count' => $total_data[ $status ]['count'], + 'amount' => $total_data[ $status ]['amount'], + ); + } + } + + // Get partial refund amounts to factor into net activity amounts. + $partial_refunds = $wpdb->get_results( + $wpdb->prepare( + "SELECT SUM(total) AS total, COUNT(DISTINCT id) AS count + FROM {$wpdb->edd_orders} + WHERE type = 'refund' + AND parent IN ( + SELECT id + FROM {$wpdb->edd_orders} + WHERE status = 'partially_refunded' + AND date_created >= %s + AND date_created <= %s + GROUP BY YEAR(date_created), MONTH(date_created) + ORDER by date_created ASC + );", + $start_date, + $end_date + ), + ARRAY_A + ); + if ( ! empty( $partial_refunds ) ) { + $this->partial_refunds = reset( $partial_refunds ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data, $start_date, $end_date ); + + return $data; + } + + /** + * Count the number of months we are dealing with. + * + * @since 2.7 + * @access private + * + * @return void + */ + private function count() { + return abs( ( date( 'Y', strtotime( $this->end ) ) - date( 'Y', strtotime( $this->start ) ) ) * 12 + ( date( 'm', strtotime( $this->end ) ) - date( 'm', strtotime( $this->start ) ) ) ); + } + + /** + * Return the calculated completion percentage + * + * @since 2.7 + * + * @return int Percentage of batch processing complete. + */ + public function get_percentage_complete() { + $percentage = 100; + + $total = $this->count(); + + if ( $total > 0 ) { + $percentage = ( $this->step / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set the properties specific to the earnings report. + * + * @since 2.7 + * + * @param array $request The Form Data passed into the batch processing + * @return void + */ + public function set_properties( $request ) { + $this->start = ( isset( $request['start_month'] ) && isset( $request['start_year'] ) ) ? sanitize_text_field( $request['start_year'] ) . '-' . sanitize_text_field( $request['start_month'] ) . '-1' : ''; + $this->end = ( isset( $request['end_month'] ) && isset( $request['end_year'] ) ) ? sanitize_text_field( $request['end_year'] ) . '-' . sanitize_text_field( $request['end_month'] ) . '-' . cal_days_in_month( CAL_GREGORIAN, sanitize_text_field( $request['end_month'] ), sanitize_text_field( $request['end_year'] ) ) : ''; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-file-downloads.php b/includes/admin/reporting/export/class-batch-export-file-downloads.php new file mode 100644 index 00000000000..b4d8ca6ede5 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-file-downloads.php @@ -0,0 +1,169 @@ + __( 'Date', 'easy-digital-downloads' ), + 'user' => __( 'Downloaded by', 'easy-digital-downloads' ), + 'ip' => __( 'IP Address', 'easy-digital-downloads' ), + 'user_agent' => __( 'User Agent', 'easy-digital-downloads' ), + 'download' => __( 'Product', 'easy-digital-downloads' ), + 'file' => __( 'File', 'easy-digital-downloads' ), + ); + + return $cols; + } + + /** + * Get the export data. + * + * @since 2.4 + * @since 3.0 Refactored to use new query methods. + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + $data = array(); + + $args = array( + 'number' => 30, + 'offset' => ( $this->step * 30 ) - 30, + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_created_query'] = $this->get_date_query(); + } + + if ( 0 !== $this->download_id ) { + $args['product_id'] = $this->download_id; + } + + $logs = edd_get_file_download_logs( $args ); + + foreach ( $logs as $log ) { + /** @var EDD\Logs\File_Download_Log $log */ + + $files = edd_get_download_files( $log->product_id ); + $file_id = $log->file_id; + $file_name = isset( $files[ $file_id ]['name'] ) ? $files[ $file_id ]['name'] : null; + $customer = edd_get_customer( $log->customer_id ); + + if ( $customer ) { + $customer = $customer->email; + if ( ! empty( $customer->name ) ) { + $customer = $customer->name; + if ( preg_match( '~^[+\-=@]~m', $customer ) ) { + $customer = "'{$customer}"; + } + } + } else { + $order = edd_get_order( $log->order_id ); + + if ( $order ) { + $customer = $order->email; + } + } + + $data[] = array( + 'date' => $log->date_created, + 'user' => $customer, + 'ip' => $log->ip, + 'user_agent' => $log->user_agent, + 'download' => get_the_title( $log->product_id ), + 'file' => $file_name, + ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return ! empty( $data ) + ? $data + : false; + } + + /** + * Return the calculated completion percentage. + * + * @since 2.4 + * @since 3.0 Updated to use new query methods. + * + * @return int Percentage complete. + */ + public function get_percentage_complete() { + $args = array( + 'fields' => 'ids', + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_created_query'] = $this->get_date_query(); + } + + if ( 0 !== $this->download_id ) { + $args['download_id'] = $this->download_id; + } + + $total = edd_count_file_download_logs( $args ); + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + public function set_properties( $request ) { + $this->start = isset( $request['file-download-export-start'] ) ? sanitize_text_field( $request['file-download-export-start'] ) : ''; + $this->end = isset( $request['file-download-export-end'] ) ? sanitize_text_field( $request['file-download-export-end'] ) : ''; + $this->download_id = isset( $request['download_id'] ) ? absint( $request['download_id'] ) : 0; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-payments.php b/includes/admin/reporting/export/class-batch-export-payments.php new file mode 100644 index 00000000000..39231a05dbe --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-payments.php @@ -0,0 +1,281 @@ + __( 'Order ID', 'easy-digital-downloads' ), // unaltered payment ID (use for querying) + 'seq_id' => __( 'Order Number', 'easy-digital-downloads' ), // sequential payment ID + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'customer_id' => __( 'Customer ID', 'easy-digital-downloads' ), + 'name' => __( 'Customer Name', 'easy-digital-downloads' ), + 'address1' => __( 'Address', 'easy-digital-downloads' ), + 'address2' => __( 'Address (Line 2)', 'easy-digital-downloads' ), + 'city' => __( 'City', 'easy-digital-downloads' ), + 'state' => __( 'State', 'easy-digital-downloads' ), + 'country' => __( 'Country', 'easy-digital-downloads' ), + 'zip' => __( 'Zip / Postal Code', 'easy-digital-downloads' ), + 'products' => __( 'Products (Verbose)', 'easy-digital-downloads' ), + 'products_raw' => __( 'Products (Raw)', 'easy-digital-downloads' ), + 'skus' => __( 'SKUs', 'easy-digital-downloads' ), + 'currency' => __( 'Currency', 'easy-digital-downloads' ), + 'amount' => __( 'Amount', 'easy-digital-downloads' ), + 'tax' => __( 'Tax', 'easy-digital-downloads' ), + 'discount' => __( 'Discount Code', 'easy-digital-downloads' ), + 'gateway' => __( 'Payment Method', 'easy-digital-downloads' ), + 'trans_id' => __( 'Transaction ID', 'easy-digital-downloads' ), + 'key' => __( 'Purchase Key', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ), + 'user' => __( 'User', 'easy-digital-downloads' ), + 'ip' => __( 'IP Address', 'easy-digital-downloads' ), + 'mode' => __( 'Mode (Live|Test)', 'easy-digital-downloads' ), + 'status' => __( 'Status', 'easy-digital-downloads' ), + 'country_name' => __( 'Country Name', 'easy-digital-downloads' ), + 'state_name' => __( 'State Name', 'easy-digital-downloads' ), + ); + + if ( ! edd_use_skus() ){ + unset( $cols['skus'] ); + } + + if ( ! edd_get_option( 'enable_sequential' ) ) { + unset( $cols['seq_id'] ); + } + + return $cols; + } + + /** + * Get the export data. + * + * @since 2.4 + * @since 3.0 Updated to use new query methods. + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + $data = array(); + + $args = array( + 'number' => 30, + 'offset' => ( $this->step * 30 ) - 30, + 'status' => $this->status, + 'order' => 'ASC', + 'orderby' => 'date_created', + 'type' => 'sale', + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + if ( in_array( $args['status'], array( 'any', 'all' ), true ) ) { + unset( $args['status'] ); + $args['status__not_in'] = array( 'trash' ); + } + + $orders = edd_get_orders( $args ); + + foreach ( $orders as $order ) { + /** @var EDD\Orders\Order $order */ + + $items = $order->get_items(); + $address = $order->get_address(); + $total = $order->total; + $user_id = ! empty( $order->user_id ) ? $order->user_id : $order->email; + $customer = edd_get_customer( $order->customer_id ); + $products = ''; + $products_raw = ''; + $skus = ''; + + $discounts = $order->get_discounts(); + $discounts = ! empty( $discounts ) + ? implode( ', ', $discounts ) + : __( 'none', 'easy-digital-downloads' ); + + foreach ( $items as $key => $item ) { + /** @var EDD\Orders\Order_Item $item */ + + // Setup item information. + $id = $item->product_id; + $qty = $item->quantity; + $price = $item->amount; + $tax = $item->tax; + $price_id = $item->price_id; + + // Set up verbose product column. + $products .= html_entity_decode( get_the_title( $id ) ); + + if ( $qty > 1 ) { + $products .= html_entity_decode( ' (' . $qty . ')' ); + } + + $products .= ' - '; + + if ( edd_use_skus() ) { + $sku = edd_get_download_sku( $id ); + + if ( ! empty( $sku ) ) { + $skus .= $sku; + } + } + + if ( 0 < $item->price_id ) { + $products .= html_entity_decode( edd_get_price_option_name( $id, $item->price_id, $order->id ) ) . ' - '; + } + + $products .= html_entity_decode( edd_currency_filter( edd_format_amount( $price ), $order->currency ) ); + + if ( $key != ( count( $items ) -1 ) ) { + $products .= ' / '; + + if ( edd_use_skus() ) { + $skus .= ' / '; + } + } + + // Set up raw products column; nothing but product names. + $products_raw .= html_entity_decode( get_the_title( $id ) ) . '|' . $price . '{' . $tax . '}'; + + // If we have a price ID, include it. + if ( false !== $price_id ) { + $products_raw .= '{' . $price_id . '}'; + } + + if ( $key != ( count( $items ) -1 ) ) { + $products_raw .= ' / '; + } + } + + $user = is_numeric( $user_id ) + ? get_userdata( $user_id ) + : false; + + $name = ! empty( $customer->name ) ? $customer->name : ''; + if ( preg_match( '~^[+\-=@]~m', $name ) ) { + $name = "'{$name}"; + } + + $data[] = array( + 'id' => $order->id, + 'seq_id' => $order->get_number(), + 'email' => $order->email, + 'customer_id' => $order->customer_id, + 'name' => $name, + 'address1' => isset( $address->address ) ? $address->address : '', + 'address2' => isset( $address->address2 ) ? $address->address2 : '', + 'city' => isset( $address->city ) ? $address->city : '', + 'state' => isset( $address->region ) ? $address->region : '', + 'country' => isset( $address->country ) ? $address->country : '', + 'zip' => isset( $address->postal_code ) ? $address->postal_code : '', + 'products' => $products, + 'products_raw' => $products_raw, + 'skus' => $skus, + 'currency' => $order->currency, + 'amount' => html_entity_decode( edd_format_amount( $total ) ), // The non-discounted item price. + 'tax' => html_entity_decode( edd_format_amount( $order->tax ) ), + 'discount' => $discounts, + 'gateway' => edd_get_gateway_admin_label( $order->gateway ), + 'trans_id' => $order->get_transaction_id(), + 'key' => $order->payment_key, + 'date' => $order->date_created, + 'user' => $user ? $user->display_name : __( 'guest', 'easy-digital-downloads' ), + 'ip' => $order->ip, + 'mode' => $order->mode, + 'status' => $order->status, + 'country_name' => isset( $address->country ) ? edd_get_country_name( $address->country ) : '', + 'state_name' => isset( $address->country ) && isset( $address->region ) ? edd_get_state_name( $address->country, $address->region ) : '', + ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return ! empty( $data ) + ? $data + : false; + } + + /** + * Return the calculated completion percentage + * + * @since 2.4 + * @since 3.0 Updated to use new query methods. + * + * @return int + */ + public function get_percentage_complete() { + $args = array( + 'fields' => 'ids', + 'status' => $this->status, + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + if ( in_array( $args['status'], array( 'any', 'all' ), true ) ) { + unset( $args['status'] ); + } + + $total = edd_count_orders( $args ); + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set the properties specific to the payments export + * + * @since 2.4.2 + * + * @param array $request The Form Data passed into the batch processing + */ + public function set_properties( $request ) { + $this->start = isset( $request['orders-export-start'] ) ? sanitize_text_field( $request['orders-export-start'] ) : ''; + $this->end = isset( $request['orders-export-end'] ) ? sanitize_text_field( $request['orders-export-end'] ) : ''; + $this->status = isset( $request['status'] ) ? sanitize_text_field( $request['status'] ) : 'complete'; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-sales-and-earnings.php b/includes/admin/reporting/export/class-batch-export-sales-and-earnings.php new file mode 100644 index 00000000000..4d0ad54dff8 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-sales-and-earnings.php @@ -0,0 +1,238 @@ + __( 'Date', 'easy-digital-downloads' ), + 'sales' => __( 'Sales', 'easy-digital-downloads' ), + 'earnings' => __( 'Earnings', 'easy-digital-downloads' ), + ); + + return $cols; + } + + /** + * Get the export data. + * + * @since 3.0 + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + global $wpdb; + + $data = array(); + + $args = array( + 'number' => 30, + 'offset' => ( $this->step * 30 ) - 30, + ); + + $status = "AND {$wpdb->edd_orders}.status IN ( '" . implode( "', '", $wpdb->_escape( edd_get_complete_order_statuses() ) ) . "' )"; + $date_query_sql = ''; + + // Customer ID. + $customer_id = ! empty( $this->customer_id ) + ? $wpdb->prepare( "AND {$wpdb->edd_orders}.customer_id = %d", $this->customer_id ) + : ''; + + // Download ID. + $download_id = ! empty( $this->download_id ) + ? $wpdb->prepare( "AND {$wpdb->edd_order_items}.product_id = %d", $this->download_id ) + : ''; + + // Generate date query SQL if dates have been set. + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + + // Fetch GMT offset. + $offset = EDD()->utils->get_gmt_offset(); + + $date_query_sql = 'AND '; + + if ( ! empty( $this->start ) ) { + $this->start = date( 'Y-m-d 00:00:00', strtotime( $this->start ) ); + + $this->start = 0 < $offset + ? EDD()->utils->date( $this->start )->subSeconds( $offset )->format( 'mysql' ) + : EDD()->utils->date( $this->start )->addSeconds( $offset )->format( 'mysql' ); + + $date_query_sql .= $wpdb->prepare( "{$wpdb->edd_orders}.date_created >= %s", $this->start ); + } + + // Join dates with `AND` if start and end date set. + if ( ! empty( $this->start ) && ! empty( $this->end ) ) { + $this->end = date( 'Y-m-d 23:59:59', strtotime( $this->end ) ); + + $this->end = 0 < $offset + ? EDD()->utils->date( $this->end )->addSeconds( $offset )->format( 'mysql' ) + : EDD()->utils->date( $this->end )->subSeconds( $offset )->format( 'mysql' ); + + $date_query_sql .= ' AND '; + } + + if ( ! empty( $this->end ) ) { + $date_query_sql .= $wpdb->prepare( "{$wpdb->edd_orders}.date_created <= %s", $this->end ); + } + } + + // Look in orders table if a product ID was not passed. + if ( 0 === $this->download_id ) { + $sql = " + SELECT COUNT(id) AS sales, SUM(total) AS earnings, date_created + FROM {$wpdb->edd_orders} + WHERE 1=1 {$status} {$customer_id} {$date_query_sql} + GROUP BY YEAR(date_created), MONTH(date_created), DAY(date_created) + ORDER BY YEAR(date_created), MONTH(date_created), DAY(date_created) ASC + LIMIT {$args['offset']}, {$args['number']} + "; + + // Join orders and order items table. + } else { + $sql = " + SELECT SUM({$wpdb->edd_order_items}.quantity) AS sales, SUM({$wpdb->edd_order_items}.total) AS earnings, {$wpdb->edd_orders}.date_created + FROM {$wpdb->edd_orders} + INNER JOIN {$wpdb->edd_order_items} ON {$wpdb->edd_orders}.id = {$wpdb->edd_order_items}.order_id + WHERE 1=1 {$status} {$download_id} {$date_query_sql} + GROUP BY YEAR({$wpdb->edd_orders}.date_created), MONTH({$wpdb->edd_orders}.date_created), DAY({$wpdb->edd_orders}.date_created) + ORDER BY YEAR({$wpdb->edd_orders}.date_created), MONTH({$wpdb->edd_orders}.date_created), DAY({$wpdb->edd_orders}.date_created) ASC + LIMIT {$args['offset']}, {$args['number']} + "; + } + + $results = $wpdb->get_results( $sql ); + + foreach ( $results as $result ) { + + // Localize the returned time. + $d = EDD()->utils->date( $result->date_created, null, true )->format( 'date' ); + + $sales = isset( $result->sales ) + ? absint( $result->sales ) + : 0; + + $earnings = isset( $result->earnings ) + ? edd_format_amount( $result->earnings ) + : floatval( 0 ); + + $data[] = array( + 'date' => $d, + 'sales' => $sales, + 'earnings' => $earnings, + ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } + + /** + * Return the calculated completion percentage + * + * @since 2.4 + * @since 3.0 Updated to use new query methods. + * + * @return int + */ + public function get_percentage_complete() { + $args = array( + 'fields' => 'ids', + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + $total = edd_count_orders( $args ); + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set the properties specific to the sales and earnings export. + * + * @since 3.0 + * + * @param array $request Form data passed to the batch processor. + */ + public function set_properties( $request ) { + $this->start = isset( $request['order-export-start'] ) + ? sanitize_text_field( $request['order-export-start'] ) + : ''; + + $this->end = isset( $request['order-export-end'] ) + ? sanitize_text_field( $request['order-export-end'] ) + : ''; + + $this->download_id = isset( $request['download_id'] ) + ? absint( $request['download_id'] ) + : 0; + + $this->customer_id = isset( $request['customer_id'] ) + ? absint( $request['customer_id'] ) + : 0; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-sales.php b/includes/admin/reporting/export/class-batch-export-sales.php new file mode 100644 index 00000000000..006c66ad5bf --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-sales.php @@ -0,0 +1,197 @@ + __( 'Product ID', 'easy-digital-downloads' ), + 'user_id' => __( 'User', 'easy-digital-downloads' ), + 'customer_id' => __( 'Customer ID', 'easy-digital-downloads' ), + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'download' => edd_get_label_singular(), + 'quantity' => __( 'Quantity', 'easy-digital-downloads' ), + 'amount' => __( 'Item Amount', 'easy-digital-downloads' ), + 'tax' => __( 'Tax', 'easy-digital-downloads' ), + 'currency' => __( 'Currency', 'easy-digital-downloads' ), + 'order_id' => __( 'Order ID', 'easy-digital-downloads' ), + 'price_id' => __( 'Price ID', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ), + ); + } + + /** + * Get the Export Data + * + * @since 2.7 + * @since 3.0 Updated to use new query methods. + * + * @return array|bool The data for the CSV file, false if no data to return. + */ + public function get_data() { + $data = array(); + + $args = array_merge( + $this->get_order_item_args(), + array( + 'number' => 30, + 'offset' => ( $this->step * 30 ) - 30, + 'order' => 'ASC' + ) + ); + + $items = edd_get_order_items( $args ); + + foreach ( $items as $item ) { + + if ( 'refunded' === $item->status ) { + continue; + } + + /** @var EDD\Orders\Order_Item $item */ + $order = edd_get_order( $item->order_id ); + + $data[] = array( + 'ID' => $item->product_id, + 'user_id' => $order->user_id, + 'customer_id' => $order->customer_id, + 'email' => $order->email, + 'name' => edd_get_customer_field( $order->customer_id, 'name' ), + 'download' => $item->product_name, + 'quantity' => $item->quantity, + 'amount' => edd_format_amount( $item->get_net_total() ), + 'tax' => edd_format_amount( $item->tax ), + 'currency' => $order->currency, + 'order_id' => $order->id, + 'price_id' => $item->price_id, + 'date' => $order->date_created, + ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return ! empty( $data ) + ? $data + : false; + } + /** + * Return the calculated completion percentage. + * + * @since 2.7 + * @since 3.0 Updated to use new query methods. + * + * @return int + */ + public function get_percentage_complete() { + $args = $this->get_order_item_args(); + $total = edd_count_order_items( $args ); + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Gets the default order item parameters based on the class properties. + * + * @since 3.1.1.4 + * @return array + */ + private function get_order_item_args() { + $args = array(); + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + if ( ! empty( $this->download_id ) ) { + $args['product_id'] = $this->download_id; + } + + if ( ! empty( $this->orders ) ) { + $args['order_id__in'] = $this->orders; + } + + return $args; + } + + public function set_properties( $request ) { + $this->start = isset( $request['sales-export-start'] ) ? sanitize_text_field( $request['sales-export-start'] ) : ''; + $this->end = isset( $request['sales-export-end'] ) ? sanitize_text_field( $request['sales-export-end'] ) : ''; + $this->download_id = isset( $request['download_id'] ) ? absint( $request['download_id'] ) : 0; + $this->orders = $this->get_orders(); + } + + /** + * Gets the array of complete order IDs for the time period. + * + * @return array + */ + private function get_orders() { + $args = array( + 'fields' => 'ids', + 'type' => 'sale', + 'number' => 999999999, + 'status__in' => edd_get_complete_order_statuses(), + ); + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + return edd_get_orders( $args ); + } +} diff --git a/includes/admin/reporting/export/class-batch-export-taxed-customers.php b/includes/admin/reporting/export/class-batch-export-taxed-customers.php new file mode 100644 index 00000000000..2ea4e1ad41e --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-taxed-customers.php @@ -0,0 +1,183 @@ + __( 'ID', 'easy-digital-downloads' ), + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'purchases' => __( 'Number of Purchases', 'easy-digital-downloads' ), + 'amount' => __( 'Customer Value', 'easy-digital-downloads' ), + ); + + return $cols; + } + + /** + * Get the export data. + * + * @since 3.0 + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + $data = array(); + + $args = array( + 'number' => 30, + 'offset' => ( $this->step * 30 ) - 30, + 'status__in' => edd_get_complete_order_statuses(), + 'order' => 'ASC', + 'orderby' => 'date_created', + 'fields' => 'customer_id', + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + add_filter( 'edd_orders_query_clauses', array( $this, 'query_clauses' ), 10, 2 ); + + $customer_ids = edd_get_orders( $args ); + + remove_filter( 'edd_orders_query_clauses', array( $this, 'query_clauses' ), 10 ); + + $customer_ids = array_unique( $customer_ids ); + + asort( $customer_ids ); + + foreach ( $customer_ids as $customer_id ) { + + // Bail if a customer ID was not set. + if ( 0 === $customer_id ) { + continue; + } + + $customer = edd_get_customer( $customer_id ); + + // Bail if a customer record does not exist. + if ( ! $customer ) { + continue; + } + + $name = ! empty( $customer->name ) ? $customer->name : ''; + if ( preg_match( '~^[+\-=@]~m', $name ) ) { + $name = "'{$name}"; + } + + $data[] = array( + 'id' => $customer->id, + 'name' => $name, + 'email' => $customer->email, + 'purchases' => $customer->purchase_count, + 'amount' => edd_format_amount( $customer->purchase_value ), + ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return $data; + } + + /** + * Return the calculated completion percentage. + * + * @since 3.0 + * + * @return int + */ + public function get_percentage_complete() { + $args = array( + 'fields' => 'ids', + 'status__in' => edd_get_complete_order_statuses(), + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_query'] = $this->get_date_query(); + } + + add_filter( 'edd_orders_query_clauses', array( $this, 'query_clauses' ), 10, 2 ); + + $total = edd_count_orders( $args ); + + remove_filter( 'edd_orders_query_clauses', array( $this, 'query_clauses' ), 10 ); + + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set the properties specific to the taxed orders export. + * + * @since 3.0 + * + * @param array $request The form data passed into the batch processing. + */ + public function set_properties( $request ) { + $this->start = isset( $request['taxed-customers-export-start'] ) ? sanitize_text_field( $request['taxed-customers-export-start'] ) : ''; + $this->end = isset( $request['taxed-customers-export-end'] ) ? sanitize_text_field( $request['taxed-customers-export-end'] ) : ''; + } + + /** + * Filter the database query to only return orders which have tax applied to them. + * + * @since 3.0 + * + * @param array $clauses A compacted array of item query clauses. + * @param \EDD\Database\Query $base Instance passed by reference. + * + * @return array + */ + public function query_clauses( $clauses, $base ) { + $clauses['where'] = ! empty( $clauses['where'] ) + ? $clauses['where'] .= ' AND tax > 0' + : 'tax > 0'; + + return $clauses; + } +} diff --git a/includes/admin/reporting/export/class-batch-export-taxed-orders.php b/includes/admin/reporting/export/class-batch-export-taxed-orders.php new file mode 100644 index 00000000000..a006e91e449 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export-taxed-orders.php @@ -0,0 +1,323 @@ + __( 'Order ID', 'easy-digital-downloads' ), // unaltered payment ID (use for querying) + 'seq_id' => __( 'Order Number', 'easy-digital-downloads' ), // sequential payment ID + 'email' => __( 'Email', 'easy-digital-downloads' ), + 'customer_id' => __( 'Customer ID', 'easy-digital-downloads' ), + 'first' => __( 'First Name', 'easy-digital-downloads' ), + 'last' => __( 'Last Name', 'easy-digital-downloads' ), + 'address1' => __( 'Address', 'easy-digital-downloads' ), + 'address2' => __( 'Address (Line 2)', 'easy-digital-downloads' ), + 'city' => __( 'City', 'easy-digital-downloads' ), + 'state' => __( 'State', 'easy-digital-downloads' ), + 'country' => __( 'Country', 'easy-digital-downloads' ), + 'zip' => __( 'Zip / Postal Code', 'easy-digital-downloads' ), + 'products' => __( 'Products (Verbose)', 'easy-digital-downloads' ), + 'products_raw' => __( 'Products (Raw)', 'easy-digital-downloads' ), + 'skus' => __( 'SKUs', 'easy-digital-downloads' ), + 'amount' => __( 'Amount', 'easy-digital-downloads' ) . ' (' . html_entity_decode( edd_currency_filter( '' ) ) . ')', + 'tax' => __( 'Tax', 'easy-digital-downloads' ) . ' (' . html_entity_decode( edd_currency_filter( '' ) ) . ')', + 'discount' => __( 'Discount Code', 'easy-digital-downloads' ), + 'gateway' => __( 'Gateway', 'easy-digital-downloads' ), + 'trans_id' => __( 'Transaction ID', 'easy-digital-downloads' ), + 'key' => __( 'Purchase Key', 'easy-digital-downloads' ), + 'date' => __( 'Date', 'easy-digital-downloads' ), + 'user' => __( 'User', 'easy-digital-downloads' ), + 'currency' => __( 'Currency', 'easy-digital-downloads' ), + 'ip' => __( 'IP Address', 'easy-digital-downloads' ), + 'mode' => __( 'Mode (Live|Test)', 'easy-digital-downloads' ), + 'status' => __( 'Status', 'easy-digital-downloads' ), + 'country_name' => __( 'Country Name', 'easy-digital-downloads' ), + ); + + if ( ! edd_use_skus() ) { + unset( $cols['skus'] ); + } + + if ( ! edd_get_option( 'enable_sequential' ) ) { + unset( $cols['seq_id'] ); + } + + return $cols; + } + + /** + * Get the export data. + * + * @since 3.0 + * + * @return array $data The data for the CSV file. + */ + public function get_data() { + $data = array(); + + $args = array( + 'number' => 30, + 'offset' => ( $this->step * 30 ) - 30, + 'status' => $this->status, + 'order' => 'ASC', + 'orderby' => 'date_created', + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_created_query'] = $this->get_date_query(); + } + + if ( in_array( $args['status'], array( 'any', 'all' ), true ) ) { + unset( $args['status'] ); + $args['status__not_in'] = array( 'trash' ); + } + + add_filter( 'edd_orders_query_clauses', array( $this, 'query_clauses' ), 10, 2 ); + + $orders = edd_get_orders( $args ); + + remove_filter( 'edd_orders_query_clauses', array( $this, 'query_clauses' ), 10 ); + + foreach ( $orders as $order ) { + /** @var EDD\Orders\Order $order */ + + $items = $order->get_items(); + $address = $order->get_address(); + $total = $order->total; + $user_id = $order->user_id; + $products = ''; + $products_raw = ''; + $skus = ''; + + $discounts = $order->get_discounts(); + $discounts = ! empty( $discounts ) + ? implode( ', ', $discounts ) + : __( 'none', 'easy-digital-downloads' ); + + foreach ( $items as $key => $item ) { + /** @var EDD\Orders\Order_Item $item */ + + // Setup item information. + $id = $item->product_id; + $qty = $item->quantity; + $price = $item->amount; + $tax = $item->tax; + $price_id = $item->price_id; + + // Set up verbose product column. + $products .= html_entity_decode( get_the_title( $id ) ); + + if ( $qty > 1 ) { + $products .= html_entity_decode( ' (' . $qty . ')' ); + } + + $products .= ' - '; + + if ( edd_use_skus() ) { + $sku = edd_get_download_sku( $id ); + + if ( ! empty( $sku ) ) { + $skus .= $sku; + } + } + + if ( 0 < $item->price_id ) { + $products .= html_entity_decode( edd_get_price_option_name( $id, $item->price_id, $order->id ) ) . ' - '; + } + + $products .= html_entity_decode( edd_currency_filter( edd_format_amount( $price ) ) ); + + if ( ( count( $items ) - 1 ) !== $key ) { + $products .= ' / '; + + if ( edd_use_skus() ) { + $skus .= ' / '; + } + } + + // Set up raw products column; nothing but product names. + $products_raw .= html_entity_decode( get_the_title( $id ) ) . '|' . $price . '{' . $tax . '}'; + + // If we have a price ID, include it. + if ( false !== $price_id ) { + $products_raw .= '{' . $price_id . '}'; + } + + if ( ( count( $items ) - 1 ) !== $key ) { + $products_raw .= ' / '; + } + } + + $user = is_numeric( $user_id ) + ? get_userdata( $user_id ) + : false; + + $data[] = array( + 'id' => $order->id, + 'seq_id' => $order->get_number(), + 'email' => $order->email, + 'customer_id' => $order->customer_id, + 'first' => $address->first_name, + 'last' => $address->last_name, + 'address1' => $address->address, + 'address2' => $address->address2, + 'city' => $address->city, + 'state' => $address->region, + 'country' => $address->country, + 'zip' => $address->postal_code, + 'products' => $products, + 'products_raw' => $products_raw, + 'skus' => $skus, + 'amount' => html_entity_decode( edd_format_amount( $total ) ), // The non-discounted item price + 'tax' => html_entity_decode( edd_format_amount( $order->tax ) ), + 'discount' => $discounts, + 'gateway' => edd_get_gateway_admin_label( $order->gateway ), + 'trans_id' => $order->get_transaction_id(), + 'key' => $order->payment_key, + 'date' => $order->date_created, + 'user' => $user ? $user->display_name : __( 'guest', 'easy-digital-downloads' ), + 'currency' => $order->currency, + 'ip' => $order->ip, + 'mode' => $order->mode, + 'status' => $order->status, + 'country_name' => isset( $user_info['address']['country'] ) ? edd_get_country_name( $user_info['address']['country'] ) : '', + ); + } + + $data = apply_filters( 'edd_export_get_data', $data ); + $data = apply_filters( 'edd_export_get_data_' . $this->export_type, $data ); + + return ! empty( $data ) + ? $data + : false; + } + + /** + * Return the calculated completion percentage. + * + * @since 3.0 + * + * @return int + */ + public function get_percentage_complete() { + $args = array( + 'fields' => 'ids', + 'status' => $this->status, + ); + + if ( ! empty( $this->start ) || ! empty( $this->end ) ) { + $args['date_created_query'] = $this->get_date_query(); + } + + if ( in_array( $args['status'], array( 'any', 'all' ), true ) ) { + unset( $args['status'] ); + } + + $total = edd_count_orders( $args ); + $percentage = 100; + + if ( $total > 0 ) { + $percentage = ( ( 30 * $this->step ) / $total ) * 100; + } + + if ( $percentage > 100 ) { + $percentage = 100; + } + + return $percentage; + } + + /** + * Set the properties specific to the taxed orders export. + * + * @since 3.0 + * + * @param array $request The form data passed into the batch processing. + */ + public function set_properties( $request ) { + $this->start = isset( $request['taxed-orders-export-start'] ) ? sanitize_text_field( $request['taxed-orders-export-start'] ) : ''; + $this->end = isset( $request['taxed-orders-export-end'] ) ? sanitize_text_field( $request['taxed-orders-export-end'] ) : ''; + $this->status = isset( $request['status'] ) ? sanitize_text_field( $request['status'] ) : 'complete'; + $this->country = isset( $request['country'] ) ? sanitize_text_field( $request['country'] ) : ''; + $this->region = isset( $request['region'] ) ? sanitize_text_field( $request['region'] ) : ''; + } + + /** + * Filter the database query to only return orders which have tax applied to them. + * + * @since 3.0 + * + * @param array $clauses A compacted array of item query clauses. + * @param \EDD\Database\Query $base Instance passed by reference. + * + * @return array + */ + public function query_clauses( $clauses, $base ) { + global $wpdb; + + $clauses['where'] = ! empty( $clauses['where'] ) + ? $clauses['where'] .= ' AND edd_o.tax > 0' + : 'edd_o.tax > 0'; + + if ( ! empty( $this->country ) ) { + $clauses['join'] = " INNER JOIN {$wpdb->edd_order_addresses} edd_oa ON edd_o.id = edd_oa.order_id"; + $clauses['where'] .= $wpdb->prepare( ' AND edd_oa.country = %s', $this->country ); + } + + if ( ! empty( $this->region ) ) { + $clauses['where'] .= $wpdb->prepare( ' AND edd_oa.region = %s', $this->region ); + } + + return $clauses; + } +} diff --git a/includes/admin/reporting/export/class-batch-export.php b/includes/admin/reporting/export/class-batch-export.php new file mode 100644 index 00000000000..8a73609d1c6 --- /dev/null +++ b/includes/admin/reporting/export/class-batch-export.php @@ -0,0 +1,380 @@ +file_system = FileSystem::get_fs(); + + $exports_dir = edd_get_exports_dir(); + $this->filetype = '.csv'; + $file_date = date( 'Y-m-d' ); + $file_hash = substr( wp_hash( 'edd-' . $this->export_type . '-export', 'nonce' ), 0, 8 ); + $this->filename = sprintf( + 'edd-%1$s-export-%2$s-%3$s%4$s', + $this->export_type, + $file_date, + $file_hash, + $this->filetype + ); + $this->file = trailingslashit( $exports_dir ) . $this->filename; + + if ( ! $this->file_system->is_writable( $exports_dir ) ) { + $this->is_writable = false; + } + + $this->step = $_step; + $this->done = false; + } + + /** + * Process a step + * + * @since 2.4 + * @return bool + */ + public function process_step() { + + if ( ! $this->can_export() ) { + wp_die( __( 'You do not have permission to export data.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( $this->step < 2 ) { + + // Make sure we start with a fresh file on step 1. + if ( FileSystem::file_exists( $this->file ) ) { + $this->file_system->delete( $this->file ); + } + $this->print_csv_cols(); + } + + $rows = $this->print_csv_rows(); + + if ( $rows ) { + return true; + } else { + return false; + } + } + + /** + * Output the CSV columns + * + * @since 2.4 + * @uses EDD_Export::get_csv_cols() + * @return string + */ + public function print_csv_cols() { + + $col_data = ''; + $cols = $this->get_csv_cols(); + $i = 1; + foreach ( $cols as $col_id => $column ) { + $col_data .= '"' . addslashes( $column ) . '"'; + $col_data .= count( $cols ) === $i ? '' : ','; + ++$i; + } + $col_data .= "\r\n"; + + $this->stash_step_data( $col_data ); + + return $col_data; + } + + /** + * Print the CSV rows for the current step + * + * @since 2.4 + * @return string|false + */ + public function print_csv_rows() { + + $row_data = ''; + $data = $this->get_data(); + $cols = $this->get_csv_cols(); + + if ( $data ) { + + // Output each row. + foreach ( $data as $row ) { + $i = 1; + foreach ( $row as $col_id => $column ) { + // Make sure the column is valid. If not, skip it. + if ( array_key_exists( $col_id, $cols ) ) { + $column = is_numeric( $column ) || ! empty( $column ) ? $column : ''; + $row_data .= '"' . addslashes( preg_replace( '/\"/', "'", $column ) ) . '"'; + $row_data .= count( $cols ) === $i ? '' : ','; + ++$i; + } + } + $row_data .= "\r\n"; + } + + $this->stash_step_data( $row_data ); + + return $row_data; + } + + return false; + } + + /** + * Return the calculated completion percentage + * + * @since 2.4 + * @return int + */ + public function get_percentage_complete() { + return 100; + } + + /** + * Retrieve the file data is written to + * + * @since 2.4 + * @return string + */ + protected function get_file() { + + $file = ''; + + if ( FileSystem::file_exists( $this->file ) ) { + + if ( ! $this->file_system->is_writable( $this->file ) ) { + $this->is_writable = false; + } + + $file = FileSystem::get_contents( $this->file ); + + } else { + + $this->file_system->put_contents( $this->file, '' ); + $this->file_system->chmod( $this->file, 0664 ); + + } + + return $file; + } + + /** + * Append data to export file + * + * @since 2.4 + * @param string $data The data to add to the file. + * @return void + */ + protected function stash_step_data( $data = '' ) { + + $file = $this->get_file(); + $file .= $data; + $this->file_system->put_contents( $this->file, $file ); + + // If we have no rows after this step, mark it as an empty export. + $file_rows = FileSystem::file( $this->file, FILE_SKIP_EMPTY_LINES ); + $default_cols = $this->get_csv_cols(); + $default_cols = empty( $default_cols ) ? 0 : 1; + + $this->is_empty = count( $file_rows ) === $default_cols ? true : false; + } + + /** + * Perform the export + * + * @since 2.4 + * @return void + */ + public function export() { + + // Set headers. + $this->headers(); + + $file = $this->get_file(); + + $this->file_system->delete( $this->file ); + + echo $file; + + die(); + } + + /** + * Set the properties specific to the export + * + * @since 2.4.2 + * @param array $request The Form Data passed into the batch processing. + */ + public function set_properties( $request ) {} + + /** + * Allow for prefetching of data for the remainder of the exporter + * + * @since 2.5 + * @return void + */ + public function pre_fetch() {} + + /** + * Gets the date query. + * + * @since 3.0 + * @return array + */ + protected function get_date_query() { + $date_query = array( + 'after' => '', + 'before' => '', + 'inclusive' => true, + ); + + if ( $this->start ) { + $start_date_string = EDD()->utils->get_date_string( $this->start ); + $date_query['after'] = edd_get_utc_date_string( $start_date_string ); + } + + if ( $this->end ) { + $end_date_string = EDD()->utils->get_date_string( $this->end, 23, 59, 59 ); + $date_query['before'] = edd_get_utc_date_string( $end_date_string ); + } + + return array( $date_query ); + } +} diff --git a/includes/admin/reporting/export/export-actions.php b/includes/admin/reporting/export/export-actions.php new file mode 100644 index 00000000000..77de3b24b4b --- /dev/null +++ b/includes/admin/reporting/export/export-actions.php @@ -0,0 +1,309 @@ + 403 ) ); + } + + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export.php'; + do_action( 'edd_batch_export_class_include', $_REQUEST['class'] ); + + if ( class_exists( $_REQUEST['class'] ) && 'EDD_Batch_Export' === get_parent_class( $_REQUEST['class'] ) ) { + $export = new $_REQUEST['class'](); + $export->export(); + } +} +add_action( 'edd_download_batch_export', 'edd_process_batch_export_download' ); + +/** + * Export all the customers to a CSV file. + * + * Note: The WordPress Database API is being used directly for performance + * reasons (workaround of calling all posts and fetch data respectively) + * + * @since 1.4.4 + * @return void + */ +function edd_export_all_customers() { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/class-export-customers.php'; + + $customer_export = new EDD_Customers_Export(); + + $customer_export->export(); +} +add_action( 'edd_email_export', 'edd_export_all_customers' ); + +/** + * Exports all the downloads to a CSV file using the EDD_Export class. + * + * @since 1.4.4 + * @return void + */ +function edd_export_all_downloads_history() { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/class-export-download-history.php'; + + $file_download_export = new EDD_Download_History_Export(); + + $file_download_export->export(); +} +add_action( 'edd_downloads_history_export', 'edd_export_all_downloads_history' ); + +/** + * Add a hook allowing extensions to register a hook on the batch export process + * + * @since 2.4.2 + * @return void + */ +function edd_register_batch_exporters() { + if ( is_admin() ) { + do_action( 'edd_register_batch_exporter' ); + } +} +add_action( 'plugins_loaded', 'edd_register_batch_exporters', 99 ); + +/** + * Register the payments batch exporter + * @since 2.4.2 + */ +function edd_register_payments_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_payments_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_payments_batch_export', 10 ); + +/** + * Loads the payments batch processor if needed. + * + * @since 2.4.2 + * + * @param string $class The class being requested to run for the batch export + */ +function edd_include_payments_batch_processor( $class ) { + if ( 'EDD_Batch_Payments_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-payments.php'; + } +} + +/** + * Register the customers batch exporter. + * + * @since 2.4.2 + */ +function edd_register_customers_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_customers_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_customers_batch_export', 10 ); + +/** + * Loads the customers batch processor if needed. + * + * @since 2.4.2 + * + * @param string $class The class being requested to run for the batch export. + */ +function edd_include_customers_batch_processor( $class ) { + if ( 'EDD_Batch_Customers_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-customers.php'; + } +} + +/** + * Register the download products batch exporter + * + * @since 2.5 + */ +function edd_register_downloads_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_downloads_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_downloads_batch_export', 10 ); + +/** + * Loads the file downloads batch process if needed + * + * @since 2.5 + * @param string $class The class being requested to run for the batch export + * @return void + */ +function edd_include_downloads_batch_processor( $class ) { + if ( 'EDD_Batch_Downloads_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-downloads.php'; + } +} + +/** + * Register the file downloads batch exporter + * @since 2.4.2 + */ +function edd_register_file_downloads_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_file_downloads_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_file_downloads_batch_export', 10 ); + +/** + * Loads the file downloads batch process if needed + * + * @since 2.4.2 + * @param string $class The class being requested to run for the batch export + * @return void + */ +function edd_include_file_downloads_batch_processor( $class ) { + if ( 'EDD_Batch_File_Downloads_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-file-downloads.php'; + } +} + +/** + * Register the sales batch exporter. + * + * @since 2.7 + */ +function edd_register_sales_export_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_sales_export_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_sales_export_batch_export', 10 ); + +/** + * Loads the sales export batch process if needed + * + * @since 2.7 + * @param string $class The class being requested to run for the batch export + * @return void + */ +function edd_include_sales_export_batch_processor( $class ) { + if ( 'EDD_Batch_Sales_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-sales.php'; + } +} + +/** + * Register the earnings report batch exporter + * + * @since 2.7 + */ +function edd_register_earnings_report_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_earnings_report_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_earnings_report_batch_export', 10 ); + +/** + * Loads the earnings report batch process if needed + * + * @since 2.7 + * @param string $class The class being requested to run for the batch export + * @return void + */ +function edd_include_earnings_report_batch_processor( $class ) { + if ( 'EDD_Batch_Earnings_Report_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-earnings-report.php'; + } +} + +/** + * Register the API requests batch exporter + * + * @since 2.7 + */ +function edd_register_api_requests_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_api_requests_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_api_requests_batch_export', 10 ); + +/** + * Loads the API requests batch process if needed + * + * @since 2.7 + * @param string $class The class being requested to run for the batch export + * @return void + */ +function edd_include_api_requests_batch_processor( $class ) { + if ( 'EDD_Batch_API_Requests_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-api-requests.php'; + } +} + +/** + * Register the taxed orders report batch exporter. + * + * @since 3.0 + */ +function edd_register_taxed_orders_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_taxed_orders_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_taxed_orders_batch_export', 10 ); + +/** + * Loads the taxed orders report batch process if needed. + * + * @since 3.0 + * + * @param string $class The class being requested to run for the batch export + */ +function edd_include_taxed_orders_batch_processor( $class ) { + if ( 'EDD_Batch_Taxed_Orders_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-taxed-orders.php'; + } +} + +/** + * Register the taxed customers report batch exporter. + * + * @since 3.0 + */ +function edd_register_taxed_customers_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_taxed_customers_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_taxed_customers_batch_export', 10 ); + +/** + * Loads the taxed customers report batch process if needed. + * + * @since 3.0 + * + * @param string $class The class being requested to run for the batch export + */ +function edd_include_taxed_customers_batch_processor( $class ) { + if ( 'EDD_Batch_Taxed_Customers_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-taxed-customers.php'; + } +} + +/** + * Register the sales and earnings report batch exporter. + * + * @since 3.0 + */ +function edd_register_sales_and_earnings_batch_export() { + add_action( 'edd_batch_export_class_include', 'edd_include_sales_and_earnings_batch_processor', 10, 1 ); +} +add_action( 'edd_register_batch_exporter', 'edd_register_sales_and_earnings_batch_export', 10 ); + +/** + * Loads the sales and earnings batch process if needed. + * + * @since 3.0 + * + * @param string $class The class being requested to run for the batch export + */ +function edd_include_sales_and_earnings_batch_processor( $class ) { + if ( 'EDD_Batch_Sales_And_Earnings_Export' === $class ) { + require_once EDD_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export-sales-and-earnings.php'; + } +} diff --git a/includes/admin/reporting/export/export-functions.php b/includes/admin/reporting/export/export-functions.php new file mode 100755 index 00000000000..61f9489b934 --- /dev/null +++ b/includes/admin/reporting/export/export-functions.php @@ -0,0 +1,112 @@ +can_export() ) { + die( '-1' ); + } + + if ( ! $export->is_writable ) { + echo wp_json_encode( array( + 'error' => true, + 'message' => __( 'Export location or file not writable', 'easy-digital-downloads' ), + )); + + exit; + } + + $export->set_properties( $_REQUEST ); + + // Added in 2.5 to allow a bulk processor to pre-fetch some data to speed up the remaining steps and cache data. + $export->pre_fetch(); + + $ret = $export->process_step(); + + $percentage = $export->get_percentage_complete(); + + if ( $ret ) { + $step++; + + echo wp_json_encode( array( + 'step' => absint( $step ), + 'percentage' => esc_attr( $percentage ), + ) ); + + exit; + } elseif ( true === $export->is_empty ) { + echo wp_json_encode( array( + 'error' => true, + 'message' => __( 'No data found for export parameters', 'easy-digital-downloads' ), + ) ); + + exit; + } elseif ( true === $export->done && true === $export->is_void ) { + $message = ! empty( $export->message ) + ? $export->message + : __( 'Batch Processing Complete', 'easy-digital-downloads' ); + + echo wp_json_encode( array( + 'success' => true, + 'message' => $message, + 'data' => $export->result_data, + ) ); + + exit; + } else { + $args = array_merge( $_REQUEST, array( + 'step' => absint( $step ), + 'class' => urlencode( $class ), + 'nonce' => wp_create_nonce( 'edd-batch-export' ), + 'edd_action' => 'download_batch_export', + ) ); + + $download_url = add_query_arg( $args, admin_url() ); + + echo wp_json_encode( array( + 'step' => 'done', + 'url' => esc_url_raw( $download_url ), + ) ); + + exit; + } +} +add_action( 'wp_ajax_edd_do_ajax_export', 'edd_do_ajax_export' ); diff --git a/includes/admin/reporting/graphing.php b/includes/admin/reporting/graphing.php index 46b418a7169..0ca331b64f5 100755 --- a/includes/admin/reporting/graphing.php +++ b/includes/admin/reporting/graphing.php @@ -2,248 +2,829 @@ /** * Graphing Functions * - * @package Easy Digital Downloads - * @subpackage Graphing Functions - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Admin/Reports + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 + * @since 1.0 */ +use EDD\Reports; + +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /** - * Show Download Sales Graph + * Show report graphs * - * @access public - * @since 1.0 - * @return void + * @since 1.3 + * @return void */ +function edd_reports_graph() { + // Retrieve the queried dates + $dates = Reports\get_dates_filter( 'objects' ); + + $day_by_day = Reports\get_dates_filter_day_by_day(); + + $earnings_totals = 0.00; // Total earnings for time period shown + $sales_totals = 0; // Total sales for time period shown + + $include_taxes = empty( $_GET['exclude_taxes'] ) ? true : false; + + if ( $dates['range'] == 'today' || $dates['range'] == 'yesterday' ) { + // Hour by hour + $hour = 0; + $month = $dates['start']->month; + + $i = 0; + $j = 0; + + $start = $dates['start']->format( 'Y-m-d' ); + $end = $dates['end']->format( 'Y-m-d' ); + + $sales = EDD()->payment_stats->get_sales_by_range( $dates['range'], true, $start, $end ); + $earnings = EDD()->payment_stats->get_earnings_by_range( $dates['range'], true, $start, $end, $include_taxes ); + + while ( $hour <= 23 ) { + $date = mktime( $hour, 0, 0, $month, $dates['start']->day, $dates['start']->year ) * 1000; + + if ( isset( $earnings[ $i ] ) && $earnings[ $i ]['h'] == $hour ) { + $earnings_data[] = array( $date, $earnings[ $i ]['total'] ); + $earnings_totals += $earnings[ $i ]['total']; + $i++; + } else { + $earnings_data[] = array( $date, 0 ); + } + + if ( isset( $sales[ $j ] ) && $sales[ $j ]['h'] == $hour ) { + $sales_data[] = array( $date, $sales[ $j ]['count'] ); + $sales_totals += $sales[ $j ]['count']; + $j++; + } else { + $sales_data[] = array( $date, 0 ); + } + + $hour++; + } + } elseif ( $dates['range'] == 'this_week' || $dates['range'] == 'last_week' ) { + $report_dates = array(); + $i = 0; + while ( $i <= 6 ) { + if ( ( $dates['start']->day + $i ) <= $dates['end']->day ) { + $report_dates[ $i ] = array( + 'day' => (string) $dates['start']->day + $i, + 'month' => $dates['start']->month, + 'year' => $dates['start']->year, + ); + } else { + $report_dates[ $i ] = array( + 'day' => (string) $i, + 'month' => $dates['end']->month, + 'year' => $dates['end']->year, + ); + } + + $i++; + } + + $start_date = $report_dates[0]; + $end_date = end( $report_dates ); + + $sales = EDD()->payment_stats->get_sales_by_range( $dates['range'], true, $start_date['year'] . '-' . $start_date['month'] . '-' . $start_date['day'], $end_date['year'] . '-' . $end_date['month'] . '-' . $end_date['day'] ); + $earnings = EDD()->payment_stats->get_earnings_by_range( $dates['range'], true, $start_date['year'] . '-' . $start_date['month'] . '-' . $start_date['day'], $end_date['year'] . '-' . $end_date['month'] . '-' . $end_date['day'], $include_taxes ); + + $i = 0; + $j = 0; + foreach ( $report_dates as $report_date ) { + $date = mktime( 0, 0, 0, $report_date['month'], $report_date['day'], $report_date['year'] ) * 1000; + + if ( array_key_exists( $i, $sales ) && $report_date['day'] == $sales[ $i ]['d'] && $report_date['month'] == $sales[ $i ]['m'] && $report_date['year'] == $sales[ $i ]['y'] ) { + $sales_data[] = array( $date, $sales[ $i ]['count'] ); + $sales_totals += $sales[ $i ]['count']; + $i++; + } else { + $sales_data[] = array( $date, 0 ); + } + + if ( array_key_exists( $j, $earnings ) && $report_date['day'] == $earnings[ $j ]['d'] && $report_date['month'] == $earnings[ $j ]['m'] && $report_date['year'] == $earnings[ $j ]['y'] ) { + $earnings_data[] = array( $date, $earnings[ $j ]['total'] ); + $earnings_totals += $earnings[ $j ]['total']; + $j++; + } else { + $earnings_data[] = array( $date, 0 ); + } + } + + } else { + $date_start = $dates['start']->format( 'Y-m-d' ); + $date_end = $dates['end']->format( 'Y-m-d' ); + + $sales = EDD()->payment_stats->get_sales_by_range( $dates['range'], $day_by_day, $date_start, $date_end ); + $earnings = EDD()->payment_stats->get_earnings_by_range( $dates['range'], $day_by_day, $date_start, $date_end, $include_taxes ); + + $temp_data = array( + 'sales' => array(), + 'earnings' => array(), + ); + + foreach ( $sales as $sale ) { + if ( $day_by_day ) { + $temp_data['sales'][ $sale['y'] ][ $sale['m'] ][ $sale['d'] ] = $sale['count']; + } else { + $temp_data['sales'][ $sale['y'] ][ $sale['m'] ] = $sale['count']; + } + $sales_totals += $sale['count']; + } + + foreach ( $earnings as $earning ) { + if ( $day_by_day ) { + $temp_data['earnings'][ $earning['y'] ][ $earning['m'] ][ $earning['d'] ] = $earning['total']; + } else { + $temp_data['earnings'][ $earning['y'] ][ $earning['m'] ] = $earning['total']; + } + $earnings_totals += $earning['total']; + } + + while ( $day_by_day && ( strtotime( $date_start ) <= strtotime( $date_end ) ) ) { + $d = $dates['start']->day; + $m = $dates['start']->month; + $y = $dates['start']->year; + + if ( ! isset( $temp_data['sales'][ $y ][ $m ][ $d ] ) ) { + $temp_data['sales'][ $y ][ $m ][ $d ] = 0; + } + + if ( ! isset( $temp_data['earnings'][ $y ][ $m ][ $d ] ) ) { + $temp_data['earnings'][ $y ][ $m ][ $d ] = 0; + } + + $date_start = $dates['start']->addDays( 1 )->format( 'Y-m-d' ); + } + + while ( ! $day_by_day && ( strtotime( $date_start ) <= strtotime( $date_end ) ) ) { + $m = $dates['start']->month; + $y = $dates['start']->year; + + if ( ! isset( $temp_data['sales'][ $y ][ $m ] ) ) { + $temp_data['sales'][ $y ][ $m ] = 0; + } + + if ( ! isset( $temp_data['earnings'][ $y ][ $m ] ) ) { + $temp_data['earnings'][ $y ][ $m ] = 0; + } + + $date_start = $dates['start']->addMonths( 1 )->format( 'Y-m' ); + } + + $sales_data = array(); + $earnings_data = array(); + + // When using 3 months or smaller as the custom range, show each day individually on the graph + if ( $day_by_day ) { + foreach ( $temp_data['sales'] as $year => $months ) { + foreach ( $months as $month => $days ) { + foreach ( $days as $day => $count ) { + $date = mktime( 0, 0, 0, $month, $day, $year ) * 1000; + $sales_data[] = array( $date, $count ); + } + } + } + + foreach ( $temp_data['earnings'] as $year => $months ) { + foreach ( $months as $month => $days ) { + foreach ( $days as $day => $total ) { + $date = mktime( 0, 0, 0, $month, $day, $year ) * 1000; + $earnings_data[] = array( $date, $total ); + } + } + } + + // Sort dates in ascending order + foreach ( $sales_data as $key => $value ) { + $timestamps[ $key ] = $value[0]; + } + if ( ! empty( $timestamps ) ) { + array_multisort( $timestamps, SORT_ASC, $sales_data ); + } + + foreach ( $earnings_data as $key => $value ) { + $earnings_timestamps[ $key ] = $value[0]; + } + if ( ! empty( $earnings_timestamps ) ) { + array_multisort( $earnings_timestamps, SORT_ASC, $earnings_data ); + } + + // When showing more than 3 months of results, group them by month, by the first (except for the last month, group on the last day of the month selected) + } else { + + foreach ( $temp_data['sales'] as $year => $months ) { + $month_keys = array_keys( $months ); + $last_month = end( $month_keys ); + + if ( $day_by_day ) { + foreach ( $months as $month => $days ) { + $day_keys = array_keys( $days ); + $last_day = end( $day_keys ); -function edd_show_download_sales_graph($bgcolor = 'white') { - $downloads = get_posts(array('post_type' => 'download', 'posts_per_page' => -1)); - if($downloads) { - ob_start(); ?> - -
    - $count ) { + $month_keys = array_keys( $months ); + $consolidated_date = $month === end( $month_keys ) ? cal_days_in_month( CAL_GREGORIAN, $month, $year ) : 1; + + $date = mktime( 0, 0, 0, $month, $consolidated_date, $year ) * 1000; + $sales_data[] = array( $date, $count ); + } + } + } + + // Sort dates in ascending order + foreach ( $sales_data as $key => $value ) { + $timestamps[ $key ] = $value[0]; + } + if ( ! empty( $timestamps ) ) { + array_multisort( $timestamps, SORT_ASC, $sales_data ); + } + + foreach ( $temp_data['earnings'] as $year => $months ) { + $month_keys = array_keys( $months ); + $last_month = end( $month_keys ); + + if ( $day_by_day ) { + foreach ( $months as $month => $days ) { + $day_keys = array_keys( $days ); + $last_day = end( $day_keys ); + + $month_keys = array_keys( $months ); + + $consolidated_date = $month === end( $month_keys ) + ? cal_days_in_month( CAL_GREGORIAN, $month, $year ) + : 1; + + $earnings = array_sum( $days ); + $date = mktime( 0, 0, 0, $month, $consolidated_date, $year ) * 1000; + $earnings_data[] = array( $date, $earnings ); + } + } else { + foreach ( $months as $month => $count ) { + $month_keys = array_keys( $months ); + $consolidated_date = $month === end( $month_keys ) + ? cal_days_in_month( CAL_GREGORIAN, $month, $year ) + : 1; + + $date = mktime( 0, 0, 0, $month, $consolidated_date, $year ) * 1000; + $earnings_data[] = array( $date, $count ); + } + } + } + + // Sort dates in ascending order + foreach ( $earnings_data as $key => $value ) { + $earnings_timestamps[ $key ] = $value[0]; + } + if ( ! empty( $earnings_timestamps ) ) { + array_multisort( $earnings_timestamps, SORT_ASC, $earnings_data ); + } + } } -} + $data = array( + __( 'Earnings', 'easy-digital-downloads' ) => $earnings_data, + __( 'Sales', 'easy-digital-downloads' ) => $sales_data + ); + + // start our own output buffer + ob_start(); + + do_action( 'edd_reports_graph_before' ); ?> + +
    +
    +
    +

    + +
    + set( 'x_mode', 'time' ); + $graph->set( 'multiple_y_axes', true ); + $graph->display(); + + if( ! empty( $dates['range'] ) && 'this_month' == $dates['range'] ) { + $estimated = edd_estimated_monthly_stats( $include_taxes ); + } + ?> + +

    + + + + + + +

    +

    + + +

    + + + + + + +

    +

    + + + + +

    + + + +

    +
    +
    +
    +
    + + 'download', 'posts_per_page' => -1)); - if($downloads) { - ob_start(); ?> - -
    - = 3 || ( $dates['year_end'] > $dates['year'] && ( $dates['m_start'] - $dates['m_end'] ) != 10 ) ) { + $day_by_day = false; + } else { + $day_by_day = true; + } + break; + default: + $day_by_day = true; + break; } -} + $earnings_totals = (float) 0.00; // Total earnings for time period shown + $sales_totals = 0; // Total sales for time period shown -/** - * Show Monthly Earnings Graph - * - * @access public - * @since 1.0 - * @return void -*/ + $include_taxes = empty( $_GET['exclude_taxes'] ) ? true : false; + $earnings_data = array(); + $sales_data = array(); + + if ( $dates['range'] == 'today' || $dates['range'] == 'yesterday' ) { + // Hour by hour + $month = $dates['m_start']; + $hour = 0; + $minute = 0; + $second = 0; + while ( $hour <= 23 ) : + if ( $hour == 23 ) { + $minute = $second = 59; + } + + $date = mktime( $hour, $minute, $second, $month, $dates['day'], $dates['year'] ); + $date_end = mktime( $hour + 1, $minute, $second, $month, $dates['day'], $dates['year'] ); + + $sales = EDD()->payment_stats->get_sales( $download_id, $date, $date_end ); + $sales_totals += $sales; + + $earnings = EDD()->payment_stats->get_earnings( $download_id, $date, $date_end, $include_taxes ); + $earnings_totals += $earnings; + + $sales_data[] = array( $date * 1000, $sales ); + $earnings_data[] = array( $date * 1000, $earnings ); + + $hour++; + endwhile; + } elseif( $dates['range'] == 'this_week' || $dates['range'] == 'last_week' ) { + $num_of_days = cal_days_in_month( CAL_GREGORIAN, $dates['m_start'], $dates['year'] ); + + $report_dates = array(); + $i = 0; + while ( $i <= 6 ) { + if ( ( $dates['day'] + $i ) <= $num_of_days ) { + $report_dates[ $i ] = array( + 'day' => (string) $dates['day'] + $i, + 'month' => $dates['m_start'], + 'year' => $dates['year'], + ); + } else { + $report_dates[ $i ] = array( + 'day' => (string) $i, + 'month' => $dates['m_end'], + 'year' => $dates['year_end'], + ); + } + + $i++; + } -function edd_show_monthly_eanings_graph($bgcolor = 'white') { - ob_start(); ?> - -
    +

    + + + +

    +

    + + + +

    +

    + + + +

    +

    + + + +

    +
    + + - -
    - 'edd-reports', + ) + ); + + $filter_args = array(); + + // Parse and validate filters. + foreach ( $filters as $filter => $attributes ) { + + switch ( $filter ) { + + case 'dates': + if ( ! empty( $form_data['range'] ) ) { + $range = sanitize_key( $form_data['range'] ); + $relative_range = sanitize_key( $form_data['relative_range'] ); + } else { + $range = Reports\get_dates_filter_range(); + $relative_range = Reports\get_relative_dates_filter_range(); + } + + if ( 'other' === $range ) { + try { + /* + * This validates the input dates before saving. If they're not valid, an exception + * will be thrown. + */ + EDD()->utils->date( $form_data['filter_from'] ); + EDD()->utils->date( $form_data['filter_to'] ); + } catch ( \Exception $e ) { + wp_die( + esc_html__( 'Invalid date format. Please enter a date in the format: YYYY-mm-dd.', 'easy-digital-downloads' ), + esc_html__( 'Invalid Date Error', 'easy-digital-downloads' ), + array( 'response' => 400, 'back_link' => true ) + ); + } + + $filter_args = array_merge( + array( + 'filter_from' => ! empty( $form_data['filter_from'] ) + ? sanitize_text_field( $form_data['filter_from'] ) + : '', + 'filter_to' => ! empty( $form_data['filter_to'] ) + ? sanitize_text_field( $form_data['filter_to'] ) + : '', + 'range' => 'other', + 'relative_range' => 'previous_period', + ), + $filter_args + ); + + } else { + + $dates = Reports\parse_dates_for_range( $range ); + + $filter_args = array_merge( + array( + 'filter_from' => $dates['start']->format( 'date-mysql' ), + 'filter_to' => $dates['end']->format( 'date-mysql' ), + 'range' => $range, + 'relative_range' => $relative_range, + ), + $filter_args + ); + + } + break; + + case 'taxes': + $filter_args = array_merge( + array( + 'exclude_taxes' => isset( $form_data['exclude_taxes'] ), + ), + $filter_args + ); + + break; + + default: + $filter_arg = isset( $form_data[ $filter ] ) + ? $form_data[ $filter ] + : array(); + + if ( ! empty( $filter_arg ) ) { + $filter_args[ $filter ] = $filter_arg; + } + + break; + } + } + + // Redirect back to report. + $redirect = add_query_arg( $filter_args, $redirect ); + + edd_redirect( $redirect ); +} +add_action( 'edd_filter_reports', 'edd_parse_report_dates' ); + +/** + * EDD Reports Refresh Button + * @since 2.7 + * @description: Outputs a "Refresh Reports" button for graphs + */ +function edd_reports_refresh_button() { + if ( ! current_user_can( 'view_shop_reports' ) ) { + return; + } + + $url = wp_nonce_url( add_query_arg( array( + 'edd_action' => 'refresh_reports_transients', + 'edd-message' => 'refreshed-reports' + ) ), 'edd-refresh-reports' ); + + echo '' . esc_html__( 'Refresh Reports', 'easy-digital-downloads' ) . ''; } +add_action( 'edd_reports_graph_after', 'edd_reports_refresh_button' ); /** - * Show Sales Per Month Graph + * EDD trigger the refresh of reports transients * - * @access public - * @since 1.0 - * @return void -*/ + * @since 2.7 + * + * @param array $data Parameters sent from Settings page + * @return void + */ +function edd_run_refresh_reports_transients( $data ) { + if ( ! wp_verify_nonce( $data['_wpnonce'], 'edd-refresh-reports' ) ) { + return; + } -function edd_show_monthly_sales_graph($bgcolor = 'white') { - ob_start(); ?> - -
    - AddPage('L', 'A4'); - - $pdf->SetTitle( __('Sales and earnings reports for the current year for all products', 'edd') ); - $pdf->SetAuthor( __('Easy Digital Downloads', 'edd') ); - $pdf->SetCreator( __('Easy Digital Downloads', 'edd') ); - - $pdf->Image(EDD_PLUGIN_URL . 'includes/images/edd-logo.png', 205, 10); - - $pdf->SetMargins( 8, 8, 8 ); - $pdf->SetX( 8 ); - - $pdf->SetFont( 'Helvetica', '', 16 ); - $pdf->SetTextColor( 50, 50, 50 ); - $pdf->Cell( 0, 3, __('Sales and earnings reports for the current year for all products', 'edd'), 0, 2, 'L', false ); - - $pdf->SetFont( 'Helvetica', '', 13 ); - $pdf->Ln(); - $pdf->SetTextColor( 150, 150, 150 ); - $pdf->Cell( 0, 6, __('Date Range: ', 'edd') . $daterange, 0, 2, 'L', false ); - $pdf->Ln(); - $pdf->SetTextColor( 50, 50, 50 ); - $pdf->SetFont( 'Helvetica', '', 14 ); - $pdf->Cell( 0, 10, __('Table View', 'edd'), 0, 2, 'L', false ); - $pdf->SetFont( 'Helvetica', '', 12 ); - - $pdf->SetFillColor( 238, 238, 238 ); - $pdf->Cell( 70, 6, __('Product Name', 'edd'), 1, 0, 'L', true ); - $pdf->Cell( 30, 6, __('Price', 'edd'), 1, 0, 'L', true ); - $pdf->Cell( 50, 6, __('Categories', 'edd'), 1, 0, 'L', true ); - $pdf->Cell( 50, 6, __('Tags', 'edd'), 1, 0, 'L', true ); - $pdf->Cell( 45, 6, __('Number of Sales', 'edd'), 1, 0, 'L', true ); - $pdf->Cell( 35, 6, __('Earnings to Date', 'edd'), 1, 1, 'L', true ); - - $year = date('Y'); - $downloads = get_posts( array( 'post_type' => 'download', 'year' => $year, 'posts_per_page' => -1 ) ); - if ( $downloads ) : - $pdf->SetWidths( array( 70, 30, 50, 50, 45, 35 ) ); - - foreach ( $downloads as $download ) : - - $pdf->SetFillColor( 255, 255, 255 ); - - $title = utf8_decode( get_the_title( $download->ID ) ); - - if ( edd_has_variable_prices( $download->ID ) ) { - $prices = edd_get_variable_prices( $download->ID ); - $total = count( $prices ) - 1; - if ( $prices[0]['amount'] < $prices[$total]['amount'] ) { - $min = $prices[0]['amount']; - $max = $prices[$total]['amount']; - } else { - $min = $prices[$total]['amount']; - $max = $prices[0]['amount']; - } - $price = html_entity_decode( sprintf( '%s - %s', edd_currency_filter( $min ), edd_currency_filter( $max ) ) ); - } else { - $price = html_entity_decode( edd_currency_filter( edd_get_download_price( $download->ID ) ) ); - } - - $categories = get_the_term_list( $download->ID, 'download_category', '', ', ', '' ); - $categories = $categories ? strip_tags( $categories ) : ''; - - $tags = get_the_term_list( $download->ID, 'download_tag', '', ', ', '' ); - $tags = $tags ? strip_tags( $tags ) : ''; - - $sales = edd_get_download_sales_stats( $download->ID ); - $link = get_permalink( $download->ID ); - $earnings = html_entity_decode ( edd_currency_filter( edd_get_download_earnings_stats( $download->ID ) ) ); - - $pdf->Row( array( $title, $price, $categories, $tags, $sales, $earnings ) ); - endforeach; - else: - $pdf->SetWidths( array( 280 ) ); - $title = __('No Downloads found.', 'edd'); - $pdf->Row( array($title) ); - endif; - - $pdf->Ln(); - $pdf->SetTextColor( 50, 50, 50 ); - $pdf->SetFont( 'Helvetica', '', 14 ); - $pdf->Cell( 0, 10, __('Graph View', 'edd'), 0, 2, 'L', false ); - $pdf->SetFont( 'Helvetica', '', 12 ); - - $image = html_entity_decode( urldecode( edd_draw_chart_image() ) ); - $image = str_replace( ' ', '%20', $image ); - - $pdf->SetX( 25 ); - $pdf->Image( $image .'&file=.png' ); - $pdf->Ln( 7 ); - $pdf->Output( 'edd-report-' . date('Y-m-d') . '.pdf', 'D' ); - - } -} -add_action('edd_generate_pdf', 'edd_generate_pdf'); - - -/** - * Draws Chart for PDF Report - * - * Draws the sales and earnings chart for the PDF report. - * - * @access public - * @since 1.1.4.0 - * @author Sunny Ratilal - * @return string -*/ - -function edd_draw_chart_image() { - include_once(EDD_PLUGIN_DIR . '/includes/libraries/googlechartlib/GoogleChart.php'); - include_once(EDD_PLUGIN_DIR . '/includes/libraries/googlechartlib/markers/GoogleChartShapeMarker.php'); - include_once(EDD_PLUGIN_DIR . '/includes/libraries/googlechartlib/markers/GoogleChartTextMarker.php'); - - $chart = new GoogleChart( 'lc', 900, 330 ); - - $i = 1; - $earnings = ""; - $sales = ""; - while( $i <= 12 ) : - $earnings .= edd_get_earnings_by_date( null, $i, date('Y') ) . ","; - $sales .= edd_get_sales_by_date( $i, date('Y') ) . ","; - $i++; - endwhile; - - $earnings_array = explode( ",", $earnings ); - $sales_array = explode( ",", $sales ); - - $i = 0; - while( $i <= 11 ) { - if( empty( $sales_array[$i] ) ) - $sales_array[$i] = 0; - $i++; - } - - $min_earnings = 0; - $max_earnings = max( $earnings_array ); - $earnings_scale = round( $max_earnings, -1 ); - - $data = new GoogleChartData( array( - $earnings_array[0], - $earnings_array[1], - $earnings_array[2], - $earnings_array[3], - $earnings_array[4], - $earnings_array[5], - $earnings_array[6], - $earnings_array[7], - $earnings_array[8], - $earnings_array[9], - $earnings_array[10], - $earnings_array[11] - ) ); - - $data->setLegend( __('Earnings', 'edd') ); - $data->setColor( '1b58a3' ); - $chart->addData( $data ); - - $shape_marker = new GoogleChartShapeMarker( GoogleChartShapeMarker::CIRCLE ); - $shape_marker->setColor( '000000' ); - $shape_marker->setSize( 7 ); - $shape_marker->setBorder( 2 ); - $shape_marker->setData( $data ); - $chart->addMarker( $shape_marker ); - - $value_marker = new GoogleChartTextMarker( GoogleChartTextMarker::VALUE ); - $value_marker->setColor( '000000' ); - $value_marker->setData( $data ); - $chart->addMarker( $value_marker ); - - $data = new GoogleChartData( array( $sales_array[0],$sales_array[1], $sales_array[2],$sales_array[3], $sales_array[4],$sales_array[5],$sales_array[6],$sales_array[7],$sales_array[8],$sales_array[9],$sales_array[10],$sales_array[11] ) ); - $data->setLegend( __('Sales', 'edd') ); - $data->setColor( 'ff6c1c' ); - $chart->addData( $data ); - - $chart->setTitle( __('Sales and Earnings by Month for all Products', 'edd'), '336699', 18 ); - - $chart->setScale( 0, $max_earnings ); - - $y_axis = new GoogleChartAxis( 'y' ); - $y_axis->setDrawTickMarks( true )->setLabels( array( - 0, - $max_earnings - ) ); - $chart->addAxis( $y_axis ); - - $x_axis = new GoogleChartAxis( 'x' ); - $x_axis->setTickMarks( 5 ); - $x_axis->setLabels( array( - __('Jan', 'edd'), - __('Feb', 'edd'), - __('Mar', 'edd'), - __('Apr', 'edd'), - __('May', 'edd'), - __('June', 'edd'), - __('July', 'edd'), - __('Aug', 'edd'), - __('Sept', 'edd'), - __('Oct', 'edd'), - __('Nov', 'edd'), - __('Dec', 'edd') - ) ); - $chart->addAxis( $x_axis ); - - $shape_marker = new GoogleChartShapeMarker( GoogleChartShapeMarker::CIRCLE ); - $shape_marker->setSize( 6 ); - $shape_marker->setBorder( 2 ); - $shape_marker->setData( $data ); - $chart->addMarker( $shape_marker ); - - $value_marker = new GoogleChartTextMarker( GoogleChartTextMarker::VALUE ); - $value_marker->setData( $data ); - $chart->addMarker( $value_marker ); - - return $chart->getUrl(); -} \ No newline at end of file diff --git a/includes/admin/reporting/reports-callbacks.php b/includes/admin/reporting/reports-callbacks.php new file mode 100755 index 00000000000..af571be690b --- /dev/null +++ b/includes/admin/reporting/reports-callbacks.php @@ -0,0 +1,259 @@ +prepare( " AND currency = %s ", strtoupper( $currency ) ); + } + + // Revenue calculations should include gross statuses to negate refunds properly. + $statuses = edd_get_gross_order_statuses(); + $statuses = apply_filters( 'edd_payment_stats_post_statuses', $statuses ); + $statuses = "'" . implode( "', '", $statuses ) . "'"; + + $earnings_results = $wpdb->get_results( + $wpdb->prepare( + "SELECT SUM({$column}) AS earnings, {$sql_clauses['select']} + FROM {$wpdb->edd_orders} edd_o + WHERE date_created >= %s AND date_created <= %s + AND status IN( {$statuses} ) + AND type IN ( 'sale', 'refund' ) + {$sql_clauses['where']} + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + $dates['start']->copy()->format( 'mysql' ), + $dates['end']->copy()->format( 'mysql' ) + ) + ); + + // Sales counts should count by 'net' statuses, which excludes refunds. + $statuses = edd_get_net_order_statuses(); + $statuses = apply_filters( 'edd_payment_stats_post_statuses', $statuses ); + $statuses = "'" . implode( "', '", $statuses ) . "'"; + + $sales_results = $wpdb->get_results( + $wpdb->prepare( + "SELECT COUNT(*) AS sales, {$sql_clauses['select']} + FROM {$wpdb->edd_orders} edd_o + WHERE date_created >= %s AND date_created <= %s + AND status IN( {$statuses} ) + AND type = 'sale' + {$sql_clauses['where']} + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + $dates['start']->copy()->format( 'mysql' ), + $dates['end']->copy()->format( 'mysql' ) + ) + ); + + $sales = array(); + $earnings = array(); + + /** + * Initialise all arrays with timestamps and set values to 0. + * + * We use the Chart based dates for this loop, so the graph shows in the proper date ranges while the actual DB queries are all UTC based. + */ + while ( strtotime( $chart_dates['start']->copy()->format( 'mysql' ) ) <= strtotime( $chart_dates['end']->copy()->format( 'mysql' ) ) ) { + $timestamp = $chart_dates['start']->copy()->format( 'U' ); + $date_on_chart = $chart_dates['start']; + + $sales[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $sales[ $timestamp ][1] = 0; + + $earnings[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $earnings[ $timestamp ][1] = 0.00; + + // Loop through each date there were sales/earnings, which we queried from the database. + foreach ( $earnings_results as $earnings_result ) { + $date_of_db_value = EDD()->utils->date( $earnings_result->date ); + + // Add any sales/earnings that happened during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $earnings[ $timestamp ][1] += $earnings_result->earnings; + } + // Add any sales/earnings that happened during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $earnings[ $timestamp ][1] += $earnings_result->earnings; + } + // Add any sales/earnings that happened during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $earnings[ $timestamp ][1] += $earnings_result->earnings; + } + } + } + + // Loop through each date there were sales/earnings, which we queried from the database. + foreach ( $sales_results as $sales_result ) { + $date_of_db_value = EDD()->utils->date( $sales_result->date ); + + // Add any sales/earnings that happened during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $sales[ $timestamp ][1] += $sales_result->sales; + } + // Add any sales/earnings that happened during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $sales[ $timestamp ][1] += $sales_result->sales; + } + // Add any sales/earnings that happened during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $sales[ $timestamp ][1] += $sales_result->sales; + } + } + } + + // Move the chart along to the next hour/day/month to get ready for the next loop. + if ( 'hour' === $period ) { + $chart_dates['start']->addHour( 1 ); + } elseif ( 'day' === $period ) { + $chart_dates['start']->addDays( 1 ); + } else { + $chart_dates['start']->addMonth( 1 ); + } + } + + return array( + 'sales' => array_values( $sales ), + 'earnings' => array_values( $earnings ), + ); + +} + +/** + * The callback function which fetches the data for the edd_overview_refunds_chart reports endpoint. + * + * @since 3.0 + */ +function edd_overview_refunds_chart() { + global $wpdb; + + $dates = Reports\get_dates_filter( 'objects' ); + $chart_dates = Reports\parse_dates_for_range( null, 'now', false ); + $column = Reports\get_taxes_excluded_filter() ? 'total - tax' : 'total'; + $currency = Reports\get_filter_value( 'currencies' ); + $period = Reports\get_graph_period(); + $sql_clauses = Reports\get_sql_clauses( $period ); + + if ( empty( $currency ) || 'convert' === $currency ) { + $column = sprintf( '(%s) / rate', $column ); + } else { + $sql_clauses['where'] = $wpdb->prepare( " AND currency = %s ", strtoupper( $currency ) ); + } + + $results = $wpdb->get_results( + $wpdb->prepare( + "SELECT COUNT(*) AS number, SUM({$column}) AS amount, {$sql_clauses['select']} + FROM {$wpdb->edd_orders} edd_o + WHERE status IN (%s, %s) AND date_created >= %s AND date_created <= %s AND type = 'refund' + {$sql_clauses['where']} + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + esc_sql( 'complete' ), + esc_sql( 'partially_refunded' ), + $dates['start']->copy()->format( 'mysql' ), + $dates['end']->copy()->format( 'mysql' ) + ) + ); + + $number = array(); + $amount = array(); + + // Initialise all arrays with timestamps and set values to 0. + while ( strtotime( $chart_dates['start']->copy()->format( 'mysql' ) ) <= strtotime( $chart_dates['end']->copy()->format( 'mysql' ) ) ) { + $timestamp = $chart_dates['start']->copy()->format( 'U' ); + $date_on_chart = $chart_dates['start']; + + $number[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $number[ $timestamp ][1] = 0; + + $amount[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $amount[ $timestamp ][1] = 0.00; + + // Loop through each date there were refunds, which we queried from the database. + foreach ( $results as $result ) { + $date_of_db_value = EDD()->utils->date( $result->date ); + + // Add any refunds that happened during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $number[ $timestamp ][1] += $result->number; + $amount[ $timestamp ][1] += abs( $result->amount ); + } + // Add any refunds that happened during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $number[ $timestamp ][1] += $result->number; + $amount[ $timestamp ][1] += abs( $result->amount ); + } + // Add any refunds that happened during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $number[ $timestamp ][1] += $result->number; + $amount[ $timestamp ][1] += abs( $result->amount ); + } + } + } + + // Move the chart along to the next hour/day/month to get ready for the next loop. + if ( 'hour' === $period ) { + $chart_dates['start']->addHour( 1 ); + } elseif ( 'day' === $period ) { + $chart_dates['start']->addDays( 1 ); + } else { + $chart_dates['start']->addMonth( 1 ); + } + } + + return array( + 'number' => array_values( $number ), + 'amount' => array_values( $amount ), + ); +} diff --git a/includes/admin/reporting/reports.php b/includes/admin/reporting/reports.php index f9cc681b8be..ad25aff1f5e 100755 --- a/includes/admin/reporting/reports.php +++ b/includes/admin/reporting/reports.php @@ -1,47 +1,2852 @@ - -
    -

    - -

    - - -

    -

    -
    - 'edd-reports', + 'view' => 'overview', + ) ); + + // Redirect if user cannot view reports + if ( ! current_user_can( 'view_shop_reports' ) ) { + edd_redirect( $redirect_url ); + } + + // Start the Reports API. + new Reports\Init(); + + add_filter( 'edd_admin_is_single_view', '__return_false' ); + + // Get the section and report + $section = Reports\get_current_report(); + $report = Reports\get_report( $section ); + + // Redirect if report is invalid + if ( empty( $report ) || is_wp_error( $report ) ) { + edd_redirect( $redirect_url ); + } + + // Stash the report in the EDD global for future reference + EDD()->report = $report; +} +add_action( 'load-download_page_edd-reports', 'edd_admin_load_report' ); + +/** + * Contains backwards compat code to shim tabs & views to EDD_Sections() + * + * @since 3.0 + */ +function edd_reports_sections() { + + // Instantiate the Sections class and sections array + $sections = new EDD\Admin\Reports_Sections(); + $c_sections = array(); + + // Setup sections variables + $sections->use_js = false; + $sections->current_section = Reports\get_current_report(); + $sections->item = null; + + // Find persisted filters to append to the base URL. + $persisted_filters = Reports\get_persisted_filters(); + $persisted_filter_args = array(); + + foreach ( $persisted_filters as $filter ) { + if ( isset( $_GET[ $filter ] ) ) { + $persisted_filter_args[ $filter ] = sanitize_text_field( $_GET[ $filter ] ); + } + } + + // Build the section base URL. + $sections->base_url = edd_get_admin_url( + array_merge( + array( + 'page' => 'edd-reports', + ), + $persisted_filter_args + ) + ); + + // Get all registered tabs & views + $tabs = Reports\get_reports(); + + // Loop through tabs & setup sections + if ( ! empty( $tabs ) ) { + foreach ( $tabs as $id => $tab ) { + + // Add to sections array + $c_sections[] = array( + 'id' => $id, + 'label' => $tab['label'], + 'icon' => $tab['icon'], + 'callback' => array( 'edd_output_report_callback', array( $id ) ) + ); + } + } + + // Set the customer sections + $sections->set_sections( $c_sections ); + + // Display the sections + $sections->display(); +} + +/** + * Output a report via a callback + * + * @since 3.0 + * + * @param string $report_id + */ +function edd_output_report_callback( $report_id = '' ) { + + // Maybe use the already loaded report + $report = EDD()->report + ? EDD()->report + : EDD\Reports\get_report( $report_id ); + + /** + * Fires at the top of the content area of a Reports tab. + * + * @since 1.0 + * @since 3.0 Added the `$report` parameter. + * + * @param \EDD\Reports\Data\Report|\WP_Error $report The current report object, + * or WP_Error if invalid. + */ + do_action( 'edd_reports_page_top', $report ); + + if ( ! is_wp_error( $report ) ) { + printf( '

    %s

    ', esc_html( $report->label ) ); + $report->display(); + } else { + Reports\default_display_report( $report ); + } + + /** + * Fires at the bottom of the content area of a Reports tab. + * + * @since 1.0 + * @since 3.0 Added the `$report` parameter. + * + * @param \EDD\Reports\Data\Report|\WP_Error $report The current report object, + * or WP_Error if invalid. + */ + do_action( 'edd_reports_page_bottom', $report ); +} + +/** + * Reports Page + * + * Renders the reports page contents. + * + * @since 1.0 + * @return void + */ +function edd_reports_page() { + // Enqueue scripts. + wp_enqueue_script( 'edd-admin-reports' ); + ?> + +
    +

    + + report ); ?> + +
    + +
    +
    + + add_report( 'overview', array( + 'label' => __( 'Overview', 'easy-digital-downloads' ), + 'icon' => 'dashboard', + 'priority' => 5, + 'endpoints' => array( + 'tiles' => array( + 'overview_sales', + 'overview_earnings', + 'overview_average_order_value', + 'overview_new_customers', + 'overview_refunded_amount', + ), + 'charts' => array( + 'overview_sales_earnings_chart', + ), + ), + 'filters' => array( + 'dates', + 'taxes', + 'currencies', + ) + ) ); + + $reports->register_endpoint( 'overview_sales', array( + 'label' => __( 'Sales', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $stats = new EDD\Stats( + array( + 'range' => $dates['range'], + 'relative' => true, + 'currency' => $currency, + 'revenue_type' => 'net', + ) + ); + return $stats->get_order_count(); + }, + 'display_args' => array( + 'comparison_label' => $label . ' — ' . __( 'Net', 'easy-digital-downloads' ), + ), + ), + ), + ) ); + + $reports->register_endpoint( 'overview_earnings', array( + 'label' => __( 'Earnings', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $stats = new EDD\Stats( + array( + 'range' => $dates['range'], + 'function' => 'SUM', + 'exclude_taxes' => $exclude_taxes, + 'currency' => $currency, + 'relative' => true, + 'output' => 'formatted', + 'revenue_type' => 'net', + ) + ); + return $stats->get_order_earnings(); + }, + 'display_args' => array( + 'comparison_label' => $label . ' — ' . __( 'Net', 'easy-digital-downloads' ), + ), + ), + ), + ) ); + + $reports->register_endpoint( 'overview_average_order_value', array( + 'label' => __( 'Average Order Value', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $stats = new EDD\Stats( + array( + 'function' => 'AVG', + 'output' => 'formatted', + 'relative' => true, + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'currency' => $currency, + ) + ); + return $stats->get_order_earnings(); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'overview_new_customers', array( + 'label' => __( 'New Customers', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates ) { + $stats = new EDD\Stats(); + return $stats->get_customer_count( array( + 'range' => $dates['range'], + 'relative' => true, + 'purchase_count' => true, + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'overview_refunded_amount', array( + 'label' => __( 'Total Refund Amount', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $stats = new EDD\Stats(); + return $stats->get_order_refund_amount( array( + 'range' => $dates['range'], + 'function' => 'SUM', + 'exclude_taxes' => $exclude_taxes, + 'currency' => $currency, + 'relative' => true, + 'output' => 'formatted', + ) ); + + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'overview_sales_earnings_chart', array( + 'label' => __( 'Sales and Earnings', 'easy-digital-downloads' ) . ' — ' . $label . ' — ' . __( 'Net', 'easy-digital-downloads' ), + 'views' => array( + 'chart' => array( + 'data_callback' => 'edd_overview_sales_earnings_chart', + 'type' => 'line', + 'options' => array( + 'datasets' => array( + 'earnings' => array( + 'label' => __( 'Earnings', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(24,126,244,0.75)', + 'backgroundColor' => 'rgba(24,126,244,0.1)', + 'fill' => true, + 'borderWidth' => 2, + 'type' => 'currency', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'earnings-y', + ), + 'sales' => array( + 'label' => __( 'Sales', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(252,108,18,0.75)', + 'backgroundColor' => 'rgba(252,108,18,0.05)', + 'fill' => true, + 'borderWidth' => 2, + 'borderCapStyle' => 'round', + 'borderJoinStyle' => 'round', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'sales-y', + ), + ), + 'scales' => array( + 'yAxes' => array( + array( + 'id' => 'earnings-y', + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'formattingType' => 'format', + 'beginAtZero' => true, + 'precision' => 0, + ), + 'gridLines' => array( + 'display' => true, + ), + ), + array( + 'id' => 'sales-y', + 'type' => 'linear', + 'position' => 'right', + 'display' => true, + 'ticks' => array( + 'formattingType' => 'integer', + 'beginAtZero' => true, + 'hideNegativeTicks' => true, + 'precision' => 0, + ), + 'gridLines' => array( + 'display' => true, + 'color' => 'rgba(0,0,0,0.03)', + ), + ), + ), + ), + ), + ), + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_overview_report' ); + +/** + * Register downloads report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_downloads_report( $reports ) { + try { + $options = Reports\get_dates_filter_options(); + $dates = Reports\get_filter_value( 'dates' ); + $exclude_taxes = Reports\get_taxes_excluded_filter(); + $currency = ''; + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $dates['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $download_data = Reports\get_filter_value( 'products' ); + $download_data = ! empty( $download_data ) && 'all' !== Reports\get_filter_value( 'products' ) + ? edd_parse_product_dropdown_value( Reports\get_filter_value( 'products' ) ) + : false; + + $endpoint_label = __( 'Sales / Earnings', 'easy-digital-downloads' ); + + // Mock downloads and prices in case they cannot be found later. + $download = edd_get_download(); + $prices = array(); + $download_label = Reports\get_download_label( $download_data ); + + $tiles = array_filter( array( + 'most_valuable_download', + 'average_download_sales_earnings', + 'download_sales_earnings', + ), function( $endpoint ) use ( $download_data ) { + switch( $endpoint ) { + case 'download_sales_earnings': + return false !== $download_data; + break; + default: + return false === $download_data; + } + } ); + + $charts = array_filter( array( + 'download_sales_by_variations', + 'download_earnings_by_variations', + 'download_sales_earnings_chart' + ), function( $endpoint ) use ( $download_data, $download ) { + switch( $endpoint ) { + case 'download_sales_by_variations': + case 'download_earnings_by_variations': + return ( + false !== $download_data && + false === $download_data['price_id'] && + true === $download->has_variable_prices() + ); + + break; + + default: + return false !== $download_data; + } + } ); + + $tables = array_filter( array( + 'top_selling_downloads', + ), function( $endpoint ) use ( $download_data ) { + return false === $download_data; + } ); + + $reports->add_report( 'downloads', array( + 'label' => edd_get_label_plural(), + 'priority' => 10, + 'icon' => 'download', + 'endpoints' => array( + 'tiles' => $tiles, + 'charts' => $charts, + 'tables' => $tables, + ), + 'filters' => array( 'dates', 'products', 'taxes' ), + ) ); + + $reports->register_endpoint( 'most_valuable_download', array( + /* translators: %s: Download singular label */ + 'label' => sprintf( __( 'Most Valuable %s', 'easy-digital-downloads' ), edd_get_label_singular() ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $stats = new EDD\Stats(); + $d = $stats->get_most_valuable_order_items( array( + 'range' => $dates['range'], + 'currency' => $currency, + 'function' => 'SUM' + ) ); + + if ( ! empty( $d ) && isset( $d[0] ) ) { + $d = $d[0]; + + if ( $d->object instanceof EDD_Download ) { + $title = $d->object->post_title; + + if ( $d->object->has_variable_prices() ) { + $prices = array_values( wp_filter_object_list( $d->object->get_prices(), array( 'index' => absint( $d->price_id ) ) ) ); + + $title .= ( is_array( $prices ) && isset( $prices[0] ) ) + ? ': ' . $prices[0]['name'] + : ''; + } + + return esc_html( $title ); + } + } + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_download_sales_earnings', array( + 'label' => __( 'Average Sales / Earnings', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $stats = new EDD\Stats( array( + 'function' => 'AVG', + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'currency' => $currency, + 'output' => 'formatted', + ) ); + + return $stats->get_order_item_count() . ' / ' . $stats->get_order_item_earnings(); + }, + 'display_args' => array( + 'comparison_label' => $label . ' — ' . __( 'Net ', 'easy-digital-downloads' ), + ), + ), + ), + ) ); + + $reports->register_endpoint( 'download_sales_earnings', array( + 'label' => $endpoint_label, + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $download_data, $dates, $currency ) { + $price_id = isset( $download_data['price_id'] ) && is_numeric( $download_data['price_id'] ) ? absint( $download_data['price_id'] ) : null; + $stats = new EDD\Stats( array( + 'product_id' => absint( $download_data['download_id'] ), + 'price_id' => $price_id, + 'currency' => $currency, + 'range' => $dates['range'], + 'output' => 'formatted', + ) ); + + $earnings = $stats->get_order_item_earnings( array( + 'function' => 'SUM' + ) ); + $sales = $stats->get_order_item_count( array( + 'function' => 'COUNT' + ) ); + + return esc_html( $sales . ' / ' . $earnings ); + }, + 'display_args' => array( + 'comparison_label' => $label . $download_label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'top_selling_downloads', array( + /* translators: %s: Downloads plural label */ + 'label' => sprintf( __( 'Top Selling %s', 'easy-digital-downloads' ), edd_get_label_plural() ) . ' — ' . $label, + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\Downloads\\Top_Selling_Downloads_List_Table', + 'class_file' => EDD_PLUGIN_DIR . 'includes/reports/data/downloads/class-top-selling-downloads-list-table.php', + ), + ), + ), + ) ); + + $reports->register_endpoint( 'download_sales_by_variations', array( + 'label' => __( 'Sales by Variation', 'easy-digital-downloads' ) . $download_label, + 'views' => array( + 'chart' => array( + 'data_callback' => function() use ( $download_data, $download, $dates, $prices, $currency ) { + $stats = new EDD\Stats(); + $sales = $stats->get_order_item_count( array( + 'product_id' => absint( $download_data['download_id'] ), + 'range' => $dates['range'], + 'grouped' => true, + 'currency' => $currency + ) ); + + // Set all values to 0. + foreach ( $prices as $key => $price ) { + $prices[ $key ]['sales'] = 0; + } + + // Parse results from the database. + foreach ( $sales as $data ) { + $prices[ $data->price_id ]['sales'] = absint( $data->total ); + } + + $sales = array_values( wp_list_pluck( $prices, 'sales' ) ); + + return array( + 'sales' => $sales, + ); + }, + 'type' => 'pie', + 'options' => array( + 'cutoutPercentage' => 0, + 'datasets' => array( + 'sales' => array( + 'label' => __( 'Sales', 'easy-digital-downloads' ), + 'backgroundColor' => array( + 'rgb(133,175,91)', + 'rgb(9,149,199)', + 'rgb(8,189,231)', + 'rgb(137,163,87)', + 'rgb(27,98,122)', + ), + ), + ), + 'labels' => array_values( wp_list_pluck( $prices, 'name' ) ) + ), + ), + ) + ) ); + + $reports->register_endpoint( 'download_earnings_by_variations', array( + 'label' => __( 'Earnings by Variation', 'easy-digital-downloads' ) . $download_label, + 'views' => array( + 'chart' => array( + 'data_callback' => function() use ( $download_data, $prices, $dates, $currency ) { + $stats = new EDD\Stats(); + $earnings = $stats->get_order_item_earnings( array( + 'product_id' => absint( $download_data['download_id'] ), + 'range' => $dates['range'], + 'grouped' => true, + 'currency' => $currency + ) ); + + // Set all values to 0. + foreach ( $prices as $key => $price ) { + $prices[ $key ]['earnings'] = floatval( 0 ); + } + + // Parse results from the database. + foreach ( $earnings as $data ) { + $prices[ $data->price_id ]['earnings'] = floatval( $data->total ); + } + + $earnings = array_values( wp_list_pluck( $prices, 'earnings' ) ); + + return array( + 'earnings' => $earnings, + ); + }, + 'type' => 'pie', + 'options' => array( + 'cutoutPercentage' => 0, + 'datasets' => array( + 'earnings' => array( + 'label' => __( 'Earnings', 'easy-digital-downloads' ), + 'type' => 'currency', + 'backgroundColor' => array( + 'rgb(133,175,91)', + 'rgb(9,149,199)', + 'rgb(8,189,231)', + 'rgb(137,163,87)', + 'rgb(27,98,122)', + ), + ), + ), + 'labels' => array_values( wp_list_pluck( $prices, 'name' ) ) + ), + ), + ) + ) ); + + $reports->register_endpoint( 'download_sales_earnings_chart', array( + 'label' => __( 'Sales and Earnings', 'easy-digital-downloads' ) . esc_html( $download_label ), + 'views' => array( + 'chart' => array( + 'data_callback' => function () use ( $download_data, $currency ) { + global $wpdb; + + $dates = Reports\get_dates_filter( 'objects' ); + $chart_dates = Reports\parse_dates_for_range( null, 'now', false ); + $period = Reports\get_graph_period(); + $sql_clauses = Reports\get_sql_clauses( $period, 'edd_oi.date_created' ); + + $union_clauses = array( + 'select' => 'date', + 'groupby' => 'date', + 'orderby' => 'date', + ); + + $price_id = isset( $download_data['price_id'] ) && is_numeric( $download_data['price_id'] ) + ? sprintf( 'AND price_id = %d', absint( $download_data['price_id'] ) ) + : ''; + + $earnings_statuses = edd_get_gross_order_statuses(); + $earnings_status_string = implode( ', ', array_fill( 0, count( $earnings_statuses ), '%s' ) ); + + $order_item_earnings = $wpdb->prepare( + "SELECT SUM(edd_oi.total / edd_oi.rate) AS earnings, {$sql_clauses['select']} + FROM {$wpdb->edd_order_items} edd_oi + INNER JOIN {$wpdb->edd_orders} edd_o ON edd_oi.order_id = edd_o.id + WHERE edd_oi.product_id = %d {$price_id} AND edd_oi.date_created >= %s AND edd_oi.date_created <= %s AND edd_o.status IN ({$earnings_status_string}) + GROUP BY {$sql_clauses['groupby']}", + $download_data['download_id'], + $dates['start']->copy()->format( 'mysql' ), + $dates['end']->copy()->format( 'mysql' ), + ...$earnings_statuses + ); + + /** + * The adjustments query needs a different order status check than the order items. This is due to the fact that + * adjustments refunded would end up being double counted, and therefore create an inaccurate revenue report. + */ + $adjustments_statuses = edd_get_net_order_statuses(); + $adjustments_status_string = implode( ', ', array_fill( 0, count( $adjustments_statuses ), '%s' ) ); + + $order_adjustments = $wpdb->prepare( + "SELECT SUM(edd_oa.total / edd_oa.rate) AS earnings, {$sql_clauses['select']} + FROM {$wpdb->edd_order_adjustments} edd_oa + INNER JOIN {$wpdb->edd_order_items} edd_oi ON + edd_oi.id = edd_oa.object_id + AND edd_oi.product_id = %d + {$price_id} + AND edd_oi.date_created >= %s AND edd_oi.date_created <= %s + INNER JOIN {$wpdb->edd_orders} edd_o ON edd_oi.order_id = edd_o.id AND edd_o.type = 'sale' AND edd_o.status IN ({$adjustments_status_string}) + WHERE edd_oa.object_type = 'order_item' + AND edd_oa.type != 'discount' + GROUP BY {$sql_clauses['groupby']}", + $download_data['download_id'], + $dates['start']->copy()->format( 'mysql' ), + $dates['end']->copy()->format( 'mysql' ), + ...$adjustments_statuses + ); + + $earnings_sql = "SELECT SUM(earnings) as earnings, {$union_clauses['select']} FROM ({$order_item_earnings} UNION {$order_adjustments})a GROUP BY {$union_clauses['groupby']} ORDER BY {$union_clauses['orderby']}"; + $earnings_results = $wpdb->get_results( $earnings_sql ); + + $statuses = edd_get_net_order_statuses(); + $status_string = implode( ', ', array_fill( 0, count( $statuses ), '%s' ) ); + + $join = $wpdb->prepare( + "INNER JOIN {$wpdb->edd_orders} edd_o ON (edd_oi.order_id = edd_o.id) AND edd_o.status IN({$status_string}) AND edd_o.type = 'sale' ", + ...$statuses + ); + + $sales_sql = $wpdb->prepare( + "SELECT COUNT(edd_oi.total) AS sales, {$sql_clauses['select']} + FROM {$wpdb->edd_order_items} edd_oi + {$join} + WHERE edd_oi.product_id = %d %1s AND edd_oi.date_created >= %s AND edd_oi.date_created <= %s AND edd_oi.status IN ({$status_string}) + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + $download_data['download_id'], + $price_id, + $dates['start']->copy()->format( 'mysql' ), + $dates['end']->copy()->format( 'mysql' ), + ...$statuses + ); + + $sales_results = $wpdb->get_results( $sales_sql ); + + $sales = array(); + $earnings = array(); + + // Initialise all arrays with timestamps and set values to 0. + while ( strtotime( $chart_dates['start']->copy()->format( 'mysql' ) ) <= strtotime( $chart_dates['end']->copy()->format( 'mysql' ) ) ) { + $timestamp = $chart_dates['start']->copy()->format( 'U' ); + $date_on_chart = $chart_dates['start']; + + $sales[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $sales[ $timestamp ][1] = 0; + + $earnings[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $earnings[ $timestamp ][1] = 0.00; + + // Loop through each date there were sales/earnings, which we queried from the database. + foreach ( $earnings_results as $earnings_result ) { + $date_of_db_value = EDD()->utils->date( $earnings_result->date ); + + // Add any sales/earnings that happened during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $earnings[ $timestamp ][1] += $earnings_result->earnings; + } + // Add any sales/earnings that happened during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $earnings[ $timestamp ][1] += $earnings_result->earnings; + } + // Add any sales/earnings that happened during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $earnings[ $timestamp ][1] += $earnings_result->earnings; + } + } + } + + // Loop through each date there were sales/earnings, which we queried from the database. + foreach ( $sales_results as $sales_result ) { + $date_of_db_value = EDD()->utils->date( $sales_result->date ); + + // Add any sales/earnings that happened during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $sales[ $timestamp ][1] += $sales_result->sales; + } + // Add any sales/earnings that happened during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $sales[ $timestamp ][1] += $sales_result->sales; + } + // Add any sales/earnings that happened during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $sales[ $timestamp ][1] += $sales_result->sales; + } + } + } + + // Move the chart along to the next hour/day/month to get ready for the next loop. + if ( 'hour' === $period ) { + $chart_dates['start']->addHour( 1 ); + } elseif ( 'day' === $period ) { + $chart_dates['start']->addDays( 1 ); + } else { + $chart_dates['start']->addMonth( 1 ); + } + } + + return array( + 'earnings' => array_values( $earnings ), + 'sales' => array_values( $sales ), + ); + }, + 'type' => 'line', + 'options' => array( + 'datasets' => array( + 'earnings' => array( + 'label' => __( 'Earnings', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(24,126,244,0.75)', + 'backgroundColor' => 'rgba(24,126,244,0.1)', + 'fill' => true, + 'borderWidth' => 2, + 'type' => 'currency', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'earnings-y', + ), + 'sales' => array( + 'label' => __( 'Sales', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(252,108,18,0.75)', + 'backgroundColor' => 'rgba(252,108,18,0.05)', + 'fill' => true, + 'borderWidth' => 2, + 'borderCapStyle' => 'round', + 'borderJoinStyle' => 'round', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'sales-y', + ), + ), + 'scales' => array( + 'yAxes' => array( + array( + 'id' => 'earnings-y', + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'format', + 'suggestedMin' => 0, + 'beginAtZero' => true, + ), + 'gridLines' => array( + 'display' => true, + ), + ), + array( + 'id' => 'sales-y', + 'type' => 'linear', + 'position' => 'right', + 'display' => true, + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'integer', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'hideNegativeTicks' => true, + ), + 'gridLines' => array( + 'display' => true, + 'color' => 'rgba(0,0,0,0.03)', + ), + ), + ), + ), + ), + ), + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_downloads_report' ); + +/** + * Register downloads taxonomy report and endpoints. + * + * @since 3.2.7 + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_downloads_taxonomy_report( $reports ) { + try { + $options = Reports\get_dates_filter_options(); + $dates = Reports\get_filter_value( 'dates' ); + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $dates['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $reports->add_report( + 'downloads_taxonomy', + array( + /* translators: %s: Downloads label */ + 'label' => sprintf( __( '%s Terms', 'easy-digital-downloads' ), edd_get_label_singular() ), + 'priority' => 11, + 'icon' => 'category', + 'endpoints' => array( + 'tables' => array( + 'earnings_by_taxonomy', + ), + ), + 'filters' => array( 'dates' ), + ) + ); + + $reports->register_endpoint( + 'earnings_by_taxonomy', + array( + 'label' => __( 'Earnings By Term', 'easy-digital-downloads' ) . ' — ' . $label, + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\Downloads\\Earnings_By_Taxonomy_List_Table', + 'class_file' => EDD_PLUGIN_DIR . 'src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php', + ), + ), + ), + ) + ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_downloads_taxonomy_report' ); + + +/** + * Register refunds report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_refunds_report( $reports ) { + try { + + // Variables to hold date filter values. + $options = Reports\get_dates_filter_options(); + $dates = Reports\get_filter_value( 'dates' ); + $exclude_taxes = Reports\get_taxes_excluded_filter(); + $currency = Reports\get_filter_value( 'currencies' ); + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $dates['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $reports->add_report( 'refunds', array( + 'label' => __( 'Refunds', 'easy-digital-downloads' ), + 'icon' => 'image-rotate', + 'priority' => 15, + 'endpoints' => array( + 'tiles' => array( + 'refund_count', + 'fully_refunded_order_count', + 'fully_refunded_order_item_count', + 'refund_amount', + 'average_refund_amount', + 'average_time_to_refund', + 'refund_rate', + ), + 'charts' => array( + 'refunds_chart', + ), + ), + 'filters' => array( + 'dates', + 'taxes', + 'currencies' + ) + ) ); + + $reports->register_endpoint( 'refund_count', array( + 'label' => __( 'Number of Refunds', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $stats = new EDD\Stats(); + + return esc_html( + $stats->get_order_refund_count( + array( + 'range' => $dates['range'], + 'currency' => $currency, + ) + ) + ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'fully_refunded_order_count', array( + 'label' => __( 'Number of Fully Refunded Orders', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $stats = new EDD\Stats(); + + return esc_html( + $stats->get_order_refund_count( + array( + 'range' => $dates['range'], + 'currency' => $currency, + 'fully_refunded' => true, + ) + ) + ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'fully_refunded_order_item_count', array( + 'label' => __( 'Number of Fully Refunded Items', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $stats = new EDD\Stats(); + $number = $stats->get_order_item_refund_count( array( + 'range' => $dates['range'], + 'currency' => $currency, + ) ); + return esc_html( $number ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'refund_amount', array( + 'label' => __( 'Total Refund Amount', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $stats = new EDD\Stats(); + return $stats->get_order_refund_amount( array( + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'output' => 'formatted', + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_refund_amount', array( + 'label' => __( 'Average Refund Amount', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $stats = new EDD\Stats(); + return $stats->get_order_refund_amount( array( + 'function' => 'AVG', + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'output' => 'formatted', + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_time_to_refund', array( + 'label' => __( 'Average Time to Refund', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $stats = new EDD\Stats(); + return $stats->get_average_refund_time( array( + 'range' => $dates['range'], + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'refund_rate', array( + 'label' => __( 'Refund Rate', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $stats = new EDD\Stats(); + return $stats->get_refund_rate( array( + 'range' => $dates['range'], + 'output' => 'formatted', + 'status' => edd_get_gross_order_statuses(), + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'refunds_chart', array( + 'label' => __( 'Refunds', 'easy-digital-downloads' ) . ' — ' . $label, + 'views' => array( + 'chart' => array( + 'data_callback' => 'edd_overview_refunds_chart', + 'type' => 'line', + 'options' => array( + 'datasets' => array( + 'amount' => array( + 'label' => __( 'Amount', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(24,126,244,0.75)', + 'backgroundColor' => 'rgba(24,126,244,0.1)', + 'fill' => true, + 'borderWidth' => 2, + 'type' => 'currency', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'amount-y', + ), + 'number' => array( + 'label' => _x( 'Number', 'Context: As in the total number of items', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(252,108,18,0.75)', + 'backgroundColor' => 'rgba(252,108,18,0.05)', + 'fill' => true, + 'borderWidth' => 2, + 'borderCapStyle' => 'round', + 'borderJoinStyle' => 'round', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'number-y', + ), + ), + 'scales' => array( + 'yAxes' => array( + array( + 'id' => 'amount-y', + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'format', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'precision' => 0, + ), + 'gridLines' => array( + 'display' => true, + ), + ), + array( + 'id' => 'number-y', + 'type' => 'linear', + 'position' => 'right', + 'display' => true, + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'integer', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'precision' => 0, + ), + 'gridLines' => array( + 'display' => true, + 'color' => 'rgba(0,0,0,0.03)', + ), + ), + ), + ), + ), + ), + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_refunds_report' ); + +/** + * Register payment gateways report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_payment_gateways_report( $reports ) { + try { + + // Variables to hold date filter values. + $options = Reports\get_dates_filter_options(); + $dates = Reports\get_filter_value( 'dates' ); + $exclude_taxes = Reports\get_taxes_excluded_filter(); + $currency = Reports\get_filter_value( 'currencies' ); + $gateway = Reports\get_filter_value( 'gateways' ); + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $dates['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $tiles = array( + 'sales_per_gateway', + 'earnings_per_gateway', + 'refunds_per_gateway', + 'average_value_per_gateway', + ); + + $tables = array_filter( array( + 'gateway_stats', + ), function( $endpoint ) use ( $gateway ) { + return empty( $gateway ) || 'all' === $gateway; + } ); + + $charts = array_filter( array( + 'gateway_sales_breakdown', + 'gateway_earnings_breakdown', + 'gateway_sales_earnings_chart', + ), function( $endpoint ) use ( $gateway ) { + switch( $endpoint ) { + case 'gateway_sales_earnings_chart': + return ! empty( $gateway ) && 'all' !== $gateway; + break; + default: + return ( empty( $gateway ) || 'all' === $gateway ); + } + } ); + + $reports->add_report( 'gateways', array( + 'label' => __( 'Payment Gateways', 'easy-digital-downloads' ), + 'icon' => 'image-filter', + 'priority' => 20, + 'endpoints' => array( + 'tiles' => $tiles, + 'tables' => $tables, + 'charts' => $charts, + ), + 'filters' => array( 'dates', 'gateways', 'taxes', 'currencies' ), + ) ); + + $reports->register_endpoint( 'sales_per_gateway', array( + 'label' => __( 'Sales', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $gateway = 'all' !== Reports\get_filter_value( 'gateways' ) + ? Reports\get_filter_value( 'gateways' ) + : ''; + + $stats = new EDD\Stats(); + + return $stats->get_gateway_sales( array( + 'range' => $dates['range'], + 'gateway' => $gateway, + 'currency' => $currency, + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'earnings_per_gateway', array( + 'label' => __( 'Earnings', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $gateway = 'all' !== Reports\get_filter_value( 'gateways' ) + ? Reports\get_filter_value( 'gateways' ) + : ''; + + $stats = new EDD\Stats(); + + return $stats->get_gateway_earnings( array( + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'gateway' => $gateway, + 'output' => 'formatted', + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'refunds_per_gateway', array( + 'label' => __( 'Refunds', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $gateway = 'all' !== Reports\get_filter_value( 'gateways' ) + ? Reports\get_filter_value( 'gateways' ) + : ''; + + $stats = new EDD\Stats(); + + return $stats->get_gateway_earnings( array( + 'range' => $dates['range'], + 'gateway' => $gateway, + 'output' => 'formatted', + 'type' => 'refund', + 'status' => array( 'complete' ), + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_value_per_gateway', array( + 'label' => __( 'Average Order Value', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + $gateway = 'all' !== Reports\get_filter_value( 'gateways' ) + ? Reports\get_filter_value( 'gateways' ) + : ''; + + $stats = new EDD\Stats(); + + if ( empty( $gateway ) ) { + return $stats->get_order_earnings( array( + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'function' => 'AVG', + 'output' => 'formatted', + 'currency' => $currency + ) ); + } else { + return $stats->get_gateway_earnings( array( + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'gateway' => $gateway, + 'function' => 'AVG', + 'output' => 'formatted', + 'currency' => $currency + ) ); + } + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'gateway_stats', array( + 'label' => __( 'Gateway Stats', 'easy-digital-downloads' ) . ' — ' . $options[ $dates['range'] ], + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\Payment_Gateways\\Gateway_Stats', + 'class_file' => EDD_PLUGIN_DIR . 'includes/reports/data/payment-gateways/class-gateway-stats-list-table.php', + ), + ), + ), + ) ); + + $gateway_list = array_map( 'edd_get_gateway_admin_label', array_keys( edd_get_payment_gateways() ) ); + + $reports->register_endpoint( 'gateway_sales_breakdown', array( + 'label' => __( 'Gateway Sales', 'easy-digital-downloads' ) . ' — ' . $options[ $dates['range'] ], + 'views' => array( + 'chart' => array( + 'data_callback' => function() use ( $dates, $currency ) { + $stats = new EDD\Stats(); + $g = $stats->get_gateway_sales( array( + 'range' => $dates['range'], + 'grouped' => true, + 'currency' => $currency + ) ); + + $gateways = array_flip( array_keys( edd_get_payment_gateways() ) ); + + foreach ( $g as $data ) { + $gateways[ $data->gateway ] = $data->total; + } + + $gateways = array_map( function( $v ) { + return null === $v + ? 0 + : $v; + }, $gateways ); + + return array( + 'sales' => array_values( $gateways ), + ); + }, + 'type' => 'pie', + 'options' => array( + 'cutoutPercentage' => 0, + 'datasets' => array( + 'sales' => array( + 'label' => __( 'Sales', 'easy-digital-downloads' ), + 'backgroundColor' => array( + 'rgb(133,175,91)', + 'rgb(9,149,199)', + 'rgb(8,189,231)', + 'rgb(137,163,87)', + 'rgb(27,98,122)', + ), + ), + ), + 'labels' => $gateway_list, + ), + ), + ) + ) ); + + $reports->register_endpoint( 'gateway_earnings_breakdown', array( + 'label' => __( 'Gateway Earnings', 'easy-digital-downloads' ) . ' — ' . $options[ $dates['range'] ], + 'views' => array( + 'chart' => array( + 'data_callback' => function() use ( $dates, $exclude_taxes, $currency ) { + $stats = new EDD\Stats(); + $g = $stats->get_gateway_earnings( array( + 'grouped' => true, + 'range' => $dates['range'], + 'exclude_taxes' => $exclude_taxes, + 'currency' => $currency + ) ); + + $gateways = array_flip( array_keys( edd_get_payment_gateways() ) ); + + foreach ( $g as $data ) { + $gateways[ $data->gateway ] = $data->earnings; + } + + $gateways = array_values( array_map( function( $v ) { + return null === $v + ? 0.00 + : $v; + }, $gateways ) ); + + return array( + 'earnings' => $gateways, + ); + }, + 'type' => 'pie', + 'options' => array( + 'cutoutPercentage' => 0, + 'datasets' => array( + 'earnings' => array( + 'label' => __( 'Earnings', 'easy-digital-downloads' ), + 'backgroundColor' => array( + 'rgb(133,175,91)', + 'rgb(9,149,199)', + 'rgb(8,189,231)', + 'rgb(137,163,87)', + 'rgb(27,98,122)', + ), + 'type' => 'currency', + ), + ), + 'labels' => $gateway_list, + ), + ), + ) + ) ); + + $reports->register_endpoint( 'gateway_sales_earnings_chart', array( + 'label' => __( 'Sales and Earnings', 'easy-digital-downloads' ) . ' — ' . $label, + 'views' => array( + 'chart' => array( + 'data_callback' => function () use ( $dates, $exclude_taxes, $currency ) { + global $wpdb; + + $dates = Reports\get_dates_filter( 'objects' ); + $chart_dates = Reports\parse_dates_for_range( null, 'now', false ); + $period = Reports\get_graph_period(); + $sql_clauses = Reports\get_sql_clauses( $period, 'date_created' ); + + $gateway = Reports\get_filter_value( 'gateways' ); + $column = $exclude_taxes + ? '( total - tax ) / rate' + : 'total / rate'; + + $currency_sql = ''; + if ( ! empty( $currency ) && array_key_exists( strtoupper( $currency ), edd_get_currencies() ) ) { + $currency_sql = $wpdb->prepare( + " AND currency = %s ", + strtoupper( $currency ) + ); + } + + $results = $wpdb->get_results( $wpdb->prepare( + "SELECT COUNT({$column}) AS sales, SUM({$column}) AS earnings, {$sql_clauses['select']} + FROM {$wpdb->edd_orders} o + WHERE gateway = %s AND status IN ('complete', 'revoked') {$currency_sql} AND date_created >= %s AND date_created <= %s + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + esc_sql( $gateway ), $dates['start']->copy()->format( 'mysql' ), $dates['end']->copy()->format( 'mysql' ) ) ); + + $sales = array(); + $earnings = array(); + + /** + * Initialise all arrays with timestamps and set values to 0. + * + * We use the Chart based dates for this loop, so the graph shows in the proper date ranges while the actual DB queries are all UTC based. + */ + while ( strtotime( $chart_dates['start']->copy()->format( 'mysql' ) ) <= strtotime( $chart_dates['end']->copy()->format( 'mysql' ) ) ) { + $timestamp = $chart_dates['start']->copy()->format( 'U' ); + $date_on_chart = $chart_dates['start']; + + $sales[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $sales[ $timestamp ][1] = 0; + + $earnings[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $earnings[ $timestamp ][1] = 0.00; + + // Loop through each date there were sales/earnings, which we queried from the database. + foreach ( $results as $result ) { + $date_of_db_value = EDD()->utils->date( $result->date ); + + // Add any sales/earnings that happened during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $sales[ $timestamp ][1] += $result->sales; + $earnings[ $timestamp ][1] += $result->earnings; + } + // Add any sales/earnings that happened during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $sales[ $timestamp ][1] += $result->sales; + $earnings[ $timestamp ][1] += $result->earnings; + } + // Add any sales/earnings that happened during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $sales[ $timestamp ][1] += $result->sales; + $earnings[ $timestamp ][1] += $result->earnings; + } + } + } + + // Move the chart along to the next hour/day/month to get ready for the next loop. + if ( 'hour' === $period ) { + $chart_dates['start']->addHour( 1 ); + } elseif ( 'day' === $period ) { + $chart_dates['start']->addDays( 1 ); + } else { + $chart_dates['start']->addMonth( 1 ); + } + } + + $sales = array_values( $sales ); + $earnings = array_values( $earnings ); + + return array( + 'earnings' => $earnings, + 'sales' => $sales, + ); + }, + 'type' => 'line', + 'options' => array( + 'datasets' => array( + 'earnings' => array( + 'label' => __( 'Earnings', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(24,126,244,0.75)', + 'backgroundColor' => 'rgba(24,126,244,0.1)', + 'fill' => true, + 'borderWidth' => 2, + 'type' => 'currency', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'earnings-y', + ), + 'sales' => array( + 'label' => __( 'Sales', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(252,108,18,0.75)', + 'backgroundColor' => 'rgba(252,108,18,0.05)', + 'fill' => true, + 'borderWidth' => 2, + 'borderCapStyle' => 'round', + 'borderJoinStyle' => 'round', + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'sales-y', + ), + ), + 'scales' => array( + 'yAxes' => array( + array( + 'id' => 'earnings-y', + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'format', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'precision' => 0, + ), + 'gridLines' => array( + 'display' => true, + ), + ), + array( + 'id' => 'sales-y', + 'type' => 'linear', + 'position' => 'right', + 'display' => true, + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'integer', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'hideNegativeTicks' => true, + 'precision' => 0, + ), + 'gridLines' => array( + 'display' => true, + 'color' => 'rgba(0,0,0,0.03)', + ), + ), + ), + ), + ), + ), + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_payment_gateways_report' ); + +/** + * Register taxes report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_taxes_report( $reports ) { + try { + + // Variables to hold date filter values. + $options = Reports\get_dates_filter_options(); + $dates = Reports\get_filter_value( 'dates' ); + $currency = Reports\get_filter_value( 'currencies' ); + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $dates['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $download_data = Reports\get_filter_value( 'products' ); + $download_data = ! empty( $download_data ) && 'all' !== Reports\get_filter_value( 'products' ) + ? edd_parse_product_dropdown_value( Reports\get_filter_value( 'products' ) ) + : false; + + $download_label = Reports\get_download_label( $download_data ); + + $country = Reports\get_filter_value( 'countries' ); + $region = Reports\get_filter_value( 'regions' ); + + $tiles = array( + 'total_tax_collected', + 'total_tax_collected_for_location', + ); + + $tables = array_filter( array( + 'tax_collected_by_location', + ), function( $table ) use ( $download_data ) { + return false === $download_data; + } ); + + $reports->add_report( 'taxes', array( + 'label' => __( 'Taxes', 'easy-digital-downloads' ), + 'priority' => 25, + 'icon' => 'editor-paste-text', + 'endpoints' => array( + 'tiles' => $tiles, + 'tables' => $tables, + ), + 'filters' => array( 'dates', 'products', 'countries', 'regions', 'currencies' ), + ) ); + + $reports->register_endpoint( 'total_tax_collected', array( + 'label' => __( 'Total Tax Collected', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $currency ) { + $download = Reports\get_filter_value( 'products' ); + $download = ! empty( $download ) && 'all' !== Reports\get_filter_value( 'products' ) + ? edd_parse_product_dropdown_value( Reports\get_filter_value( 'products' ) ) + : array( 'download_id' => '', 'price_id' => '' ); + + $stats = new EDD\Stats(); + return $stats->get_tax( array( + 'output' => 'formatted', + 'range' => $dates['range'], + 'download_id' => $download['download_id'], + 'price_id' => (string) $download['price_id'], + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label . $download_label, + ), + ), + ), + ) ); + + if ( ! empty( $country ) && 'all' !== $country ) { + $location = ''; + + if ( ! empty( $region ) && 'all' !== $region ) { + $location = edd_get_state_name( $country, $region ) . ', '; + } + + $location .= edd_get_country_name( $country ); + + $reports->register_endpoint( 'total_tax_collected_for_location', array( + 'label' => __( 'Total Tax Collected for ', 'easy-digital-downloads' ) . $location, + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates, $country, $region, $currency ) { + $download = Reports\get_filter_value( 'products' ); + $download = ! empty( $download ) && 'all' !== Reports\get_filter_value( 'products' ) + ? edd_parse_product_dropdown_value( Reports\get_filter_value( 'products' ) ) + : array( 'download_id' => '', 'price_id' => '' ); + + $stats = new EDD\Stats(); + + return $stats->get_tax_by_location( array( + 'output' => 'formatted', + 'range' => $dates['range'], + 'download_id' => $download['download_id'], + 'price_id' => (string) $download['price_id'], + 'country' => $country, + 'region' => $region, + 'currency' => $currency + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label . $download_label, + ), + ), + ), + ) ); + } + + $reports->register_endpoint( 'tax_collected_by_location', array( + 'label' => __( 'Tax Collected by Location', 'easy-digital-downloads' ), + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\Taxes\\Tax_Collected_By_Location', + 'class_file' => EDD_PLUGIN_DIR . 'includes/reports/data/taxes/class-tax-collected-by-location-list-table.php', + ), + ), + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_taxes_report' ); + +/** + * Register file downloads report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_file_downloads_report( $reports ) { + try { + + // Variables to hold date filter values. + $options = Reports\get_dates_filter_options(); + $filter = Reports\get_filter_value( 'dates' ); + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $filter['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $download_data = Reports\get_filter_value( 'products' ); + $download_data = ! empty( $download_data ) && 'all' !== Reports\get_filter_value( 'products' ) + ? edd_parse_product_dropdown_value( Reports\get_filter_value( 'products' ) ) + : false; + + $download_label = Reports\get_download_label( $download_data ); + + $tiles = array_filter( array( + 'number_of_file_downloads', + 'average_file_downloads_per_customer', + 'most_downloaded_product', + 'average_file_downloads_per_order', + ), function( $endpoint ) use ( $download_data ) { + switch( $endpoint ) { + case 'average_file_downloads_per_customer': + case 'most_downloaded_product': + case 'average_file_downloads_per_order': + return false === $download_data; + break; + default: + return true; + } + } ); + + $tables = array_filter( array( + 'top_five_most_downloaded_products', + ), function( $endpoint ) use ( $download_data ) { + return false === $download_data; + } ); + + $charts = array( + 'file_downloads_chart', + ); + + $reports->add_report( 'file_downloads', array( + 'label' => __( 'File Downloads', 'easy-digital-downloads' ), + 'icon' => 'download', + 'priority' => 30, + 'endpoints' => array( + 'tiles' => $tiles, + 'tables' => $tables, + 'charts' => $charts, + ), + 'filters' => array( 'dates', 'products' ), + ) ); + + $reports->register_endpoint( 'number_of_file_downloads', array( + 'label' => __( 'Number of File Downloads', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $download = Reports\get_filter_value( 'products' ); + $download = ! empty( $download ) && 'all' !== Reports\get_filter_value( 'products' ) + ? edd_parse_product_dropdown_value( Reports\get_filter_value( 'products' ) ) + : array( 'download_id' => '', 'price_id' => '' ); + + $stats = new EDD\Stats(); + return $stats->get_file_download_count( array( + 'range' => $filter['range'], + 'download_id' => $download['download_id'], + 'price_id' => (string) $download['price_id'], + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label . $download_label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_file_downloads_per_customer', array( + 'label' => __( 'Average per Customer', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $stats = new EDD\Stats(); + return $stats->get_average_file_download_count( array( + 'range' => $filter['range'], + 'column' => 'customer_id', + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_file_downloads_per_order', array( + 'label' => __( 'Average per Order', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $stats = new EDD\Stats(); + return $stats->get_average_file_download_count( array( + 'range' => $filter['range'], + 'column' => 'order_id', + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'most_downloaded_product', array( + 'label' => __( 'Most Downloaded Product', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $stats = new EDD\Stats(); + $d = $stats->get_most_downloaded_products( array( 'range' => $filter['range'] ) ); + if ( $d ) { + return esc_html( $d[0]->object->post_title ); + } + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'top_five_most_downloaded_products', array( + 'label' => __( 'Top Five Most Downloaded Products', 'easy-digital-downloads' ) . ' – ' . $label, + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\File_Downloads\\Top_Five_Most_Downloaded_List_Table', + 'class_file' => EDD_PLUGIN_DIR . 'includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php', + ), + ), + ), + ) ); + + $reports->register_endpoint( 'file_downloads_chart', array( + 'label' => __( 'Number of File Downloads', 'easy-digital-downloads' ) . $download_label, + 'views' => array( + 'chart' => array( + 'data_callback' => function () use ( $filter, $download_data ) { + global $wpdb; + + $dates = Reports\get_dates_filter( 'objects' ); + $chart_dates = Reports\parse_dates_for_range( null, 'now', false ); + $period = Reports\get_graph_period(); + $sql_clauses = Reports\get_sql_clauses( $period ); + + $product_id = ''; + $price_id = ''; + + if ( is_array( $download_data ) ) { + $product_id = $wpdb->prepare( 'AND product_id = %d', absint( $download_data['download_id'] ) ); + + $price_id = isset( $download_data['price_id'] ) && is_numeric( $download_data['price_id'] ) + ? $wpdb->prepare( 'AND price_id = %d', absint( $download_data['price_id'] ) ) + : ''; + } + + $results = $wpdb->get_results( $wpdb->prepare( + "SELECT COUNT(id) AS total, {$sql_clauses['select']} + FROM {$wpdb->edd_logs_file_downloads} edd_lfd + WHERE edd_lfd.date_created >= %s AND edd_lfd.date_created <= %s {$product_id} {$price_id} + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + $dates['start']->copy()->format( 'mysql' ), $dates['end']->copy()->format( 'mysql' ) ) ); + + $file_downloads = array(); + + // Initialise all arrays with timestamps and set values to 0. + while ( strtotime( $chart_dates['start']->copy()->format( 'mysql' ) ) <= strtotime( $chart_dates['end']->copy()->format( 'mysql' ) ) ) { + $timestamp = $chart_dates['start']->copy()->format( 'U' ); + $date_on_chart = $chart_dates['start']; + + $file_downloads[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $file_downloads[ $timestamp ][1] = 0; + + foreach ( $results as $result ) { + $date_of_db_value = EDD()->utils->date( $result->date ); + + // Add any file downloads that happened during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $file_downloads[ $timestamp ][1] += absint( $result->total ); + } + // Add any file downloads that happened during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $file_downloads[ $timestamp ][1] += absint( $result->total ); + } + // Add any file downloads that happened during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $file_downloads[ $timestamp ][1] += absint( $result->total ); + } + } + } + + // Move the chart along to the next hour/day/month to get ready for the next loop. + if ( 'hour' === $period ) { + $chart_dates['start']->addHour( 1 ); + } elseif ( 'day' === $period ) { + $chart_dates['start']->addDays( 1 ); + } else { + $chart_dates['start']->addMonth( 1 ); + } + } + + $file_downloads = array_values( $file_downloads ); + + return array( 'file_downloads' => $file_downloads ); + }, + 'type' => 'line', + 'options' => array( + 'datasets' => array( + 'file_downloads' => array( + 'label' => __( 'File Downloads', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(24,126,244,0.75)', + 'backgroundColor' => 'rgba(24,126,244,0.1)', + 'fill' => true, + 'borderWidth' => 2, + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + 'yAxisID' => 'file-downloads-y', + ), + ), + 'scales' => array( + 'yAxes' => array( + array( + 'id' => 'file-downloads-y', + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'integer', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'precision' => 0, + ), + ), + ), + ), + ), + ), + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_file_downloads_report' ); + +/** + * Register discounts report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_discounts_report( $reports ) { + try { + + // Variables to hold date filter values. + $options = Reports\get_dates_filter_options(); + $filter = Reports\get_filter_value( 'dates' ); + $currency = Reports\get_filter_value( 'currencies' ); + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $filter['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $discount = Reports\get_filter_value( 'discounts' ); + $discount = ! empty( $discount ) && 'all' !== $discount + ? $discount + : 0; + + $d = edd_get_discount( $discount ); + + $discount_label = false !== $d + ? esc_html( ' (' . $d->name . ')' ) + : ''; + + $tiles = array_filter( array( + 'number_of_discounts_used', + 'ratio_of_discounted_orders', + 'customer_savings', + 'average_discount_amount', + 'most_popular_discount', + 'discount_usage_count', + ), function( $tile ) use ( $discount ) { + switch ( $tile ) { + case 'discount_usage_count': + return 0 !== $discount; + break; + default: + return 0 === $discount; + } + } ); + + $tables = array_filter( array( + 'top_five_discounts', + ), function( $table ) use ( $discount ) { + return 0 === $discount; + } ); + + $charts = array( + 'discount_usage_chart', + ); + + $reports->add_report( 'discounts', array( + 'label' => __( 'Discounts', 'easy-digital-downloads' ), + 'icon' => 'tickets-alt', + 'priority' => 35, + 'endpoints' => array( + 'tiles' => $tiles, + 'tables' => $tables, + 'charts' => $charts, + ), + 'filters' => array( 'dates', 'discounts' ), + ) ); + + $reports->register_endpoint( 'number_of_discounts_used', array( + 'label' => __( 'Number of Discounts Used', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $stats = new EDD\Stats(); + return $stats->get_discount_usage_count( array( + 'range' => $filter['range'], + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'ratio_of_discounted_orders', array( + 'label' => __( 'Discount Ratio', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $stats = new EDD\Stats(); + return $stats->get_ratio_of_discounted_orders( array( + 'range' => $filter['range'], + ) ); + }, + 'display_args' => array( + 'context' => 'secondary', + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'customer_savings', array( + 'label' => __( 'Customer Savings', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter, $d ) { + $stats = new EDD\Stats(); + return $stats->get_discount_savings( array( + 'range' => $filter['range'], + 'output' => 'formatted', + 'discount_code' => isset( $d->code ) + ? $d->code + : '', + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label . $discount_label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_discount_amount', array( + 'label' => __( 'Average Discount Amount', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $stats = new EDD\Stats(); + return $stats->get_average_discount_amount( array( + 'range' => $filter['range'], + 'output' => 'formatted', + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'most_popular_discount', array( + 'label' => __( 'Most Popular Discount', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter ) { + $stats = new EDD\Stats(); + + $r = $stats->get_most_popular_discounts( array( + 'range' => $filter['range'], + 'number' => 1, + ) ); + + if ( ! empty( $r ) ) { + $r = $r[0]; + return esc_html( $r->code . ' (' . $r->count . ')' ); + } + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + if ( $d ) { + $reports->register_endpoint( 'discount_usage_count', array( + 'label' => __( 'Discount Usage Count', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $filter, $d ) { + $stats = new EDD\Stats(); + return $stats->get_discount_usage_count( array( + 'range' => $filter['range'], + 'discount_code' => $d->code, + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label . $discount_label, + ), + ), + ), + ) ); + } + + $reports->register_endpoint( 'top_five_discounts', array( + 'label' => __( 'Top Five Discounts', 'easy-digital-downloads' ) . ' – ' . $label, + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\Discounts\\Top_Five_Discounts_List_Table', + 'class_file' => EDD_PLUGIN_DIR . 'includes/reports/data/discounts/class-top-five-discounts-list-table.php', + ), + ), + ), + ) ); + + if ( $d ) { + $reports->register_endpoint( 'discount_usage_chart', array( + 'label' => __( 'Discount Usage', 'easy-digital-downloads' ), + 'views' => array( + 'chart' => array( + 'data_callback' => function () use ( $filter, $d ) { + global $wpdb; + + $dates = Reports\get_dates_filter( 'objects' ); + $chart_dates = Reports\parse_dates_for_range( null, 'now', false ); + $period = Reports\get_graph_period(); + $sql_clauses = Reports\get_sql_clauses( $period, 'edd_oa.date_created' ); + + $discount_code = ! empty( $d->code ) + ? $wpdb->prepare( 'AND type = %s AND description = %s', 'discount', esc_sql( $d->code ) ) + : $wpdb->prepare( 'AND type = %s', 'discount' ); + + $results = $wpdb->get_results( $wpdb->prepare( + "SELECT COUNT(id) AS total, {$sql_clauses['select']} + FROM {$wpdb->edd_order_adjustments} edd_oa + WHERE 1=1 {$discount_code} AND edd_oa.date_created >= %s AND edd_oa.date_created <= %s + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + $dates['start']->copy()->format( 'mysql' ), $dates['end']->copy()->format( 'mysql' ) ) ); + + $discount_usage = array(); + + // Initialise all arrays with timestamps and set values to 0. + while ( strtotime( $chart_dates['start']->copy()->format( 'mysql' ) ) <= strtotime( $chart_dates['end']->copy()->format( 'mysql' ) ) ) { + $timestamp = $chart_dates['start']->copy()->format( 'U' ); + $date_on_chart = $chart_dates['start']; + + $discount_usage[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $discount_usage[ $timestamp ][1] = 0; + + // Loop through each date in which there were discount codes used, which we queried from the database. + foreach ( $results as $result ) { + $date_of_db_value = EDD()->utils->date( $result->date ); + + // Add any discount codes that were used during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $discount_usage[ $timestamp ][1] += abs( $result->total ); + } + // Add any discount codes that were used during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $discount_usage[ $timestamp ][1] += abs( $result->total ); + } + // Add any discount codes that were used during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $discount_usage[ $timestamp ][1] += abs( $result->total ); + } + } + } + + // Move the chart along to the next hour/day/month to get ready for the next loop. + if ( 'hour' === $period ) { + $chart_dates['start']->addHour( 1 ); + } elseif ( 'day' === $period ) { + $chart_dates['start']->addDays( 1 ); + } else { + $chart_dates['start']->addMonth( 1 ); + } + } + + $discount_usage = array_values( $discount_usage ); + + return array( 'discount_usage' => $discount_usage ); + }, + 'type' => 'line', + 'options' => array( + 'datasets' => array( + 'discount_usage' => array( + 'label' => __( 'Discount Usage', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(24,126,244,0.75)', + 'backgroundColor' => 'rgba(24,126,244,0.1)', + 'fill' => true, + 'borderWidth' => 2, + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + ), + ), + 'scales' => array( + 'yAxes' => array( + array( + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'maxTicksLimit' => 2, + 'formattingType' => 'integer', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'precision' => 0, + ), + ), + ), + ), + ), + ), + ), + ) ); + } + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_discounts_report' ); + +/** + * Register customer report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_customer_report( $reports ) { + try { + + // Variables to hold date filter values. + $options = Reports\get_dates_filter_options(); + $dates = Reports\get_filter_value( 'dates' ); + $exclude_taxes = Reports\get_taxes_excluded_filter(); + + $hbh = Reports\get_dates_filter_hour_by_hour(); + $label = $options[ $dates['range'] ] . ( $hbh ? ' (' . edd_get_timezone_abbr() . ')' : '' ); + + $reports->add_report( 'customers', array( + 'label' => __( 'Customers', 'easy-digital-downloads' ), + 'icon' => 'groups', + 'priority' => 40, + 'endpoints' => array( + 'tiles' => array( + 'new_customer_growth', + 'average_revenue_per_customer', + 'average_number_of_orders_per_customer', + ), + 'tables' => array( + 'top_five_customers', + 'most_valuable_customers', + ), + 'charts' => array( + 'new_customers', + ), + ), + ) ); + + $reports->register_endpoint( 'new_customer_growth', array( + 'label' => __( 'New Customers', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates ) { + $stats = new EDD\Stats(); + return $stats->get_customer_count( array( + 'range' => $dates['range'], + 'relative' => true, + 'purchase_count' => true, + ) ); + }, + 'display_args' => array( + 'comparison_label' => $label, + ), + ), + ), + ) ); + + $reports->register_endpoint( 'average_revenue_per_customer', array( + 'label' => __( 'Average Revenue per Customer', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () { + $stats = new EDD\Stats(); + return $stats->get_customer_lifetime_value( array( + 'function' => 'AVG', + 'output' => 'formatted', + ) ); + }, + ), + ), + ) ); + + $reports->register_endpoint( 'average_number_of_orders_per_customer', array( + 'label' => __( 'Average Orders per Customer', 'easy-digital-downloads' ), + 'views' => array( + 'tile' => array( + 'data_callback' => function () use ( $dates ) { + $stats = new EDD\Stats(); + return $stats->get_customer_order_count( array( + 'range' => $dates['range'], + 'function' => 'AVG', + 'relative' => true, + ) ); + }, + ), + ), + ) ); + + $reports->register_endpoint( 'top_five_customers', array( + 'label' => __( 'Top Five Customers — All Time', 'easy-digital-downloads' ), + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\Customers\\Top_Five_Customers_List_Table', + 'class_file' => EDD_PLUGIN_DIR . 'includes/reports/data/customers/class-top-five-customers-list-table.php', + ), + ), + ), + ) ); + + $reports->register_endpoint( 'most_valuable_customers', array( + 'label' => __( 'Most Valuable Customers', 'easy-digital-downloads' ) . ' — '. $label, + 'views' => array( + 'table' => array( + 'display_args' => array( + 'class_name' => '\\EDD\\Reports\\Data\\Customers\\Most_Valuable_Customers_List_Table', + 'class_file' => EDD_PLUGIN_DIR . 'includes/reports/data/customers/class-most-valuable-customers-list-table.php', + ), + ), + ), + ) ); + + $reports->register_endpoint( 'new_customers', array( + 'label' => __( 'New Customers', 'easy-digital-downloads' ) . ' — ' . $label, + 'views' => array( + 'chart' => array( + 'data_callback' => function () { + global $wpdb; + + $dates = Reports\get_dates_filter( 'objects' ); + $chart_dates = Reports\parse_dates_for_range( null, 'now', false ); + $period = Reports\get_graph_period(); + $sql_clauses = Reports\get_sql_clauses( $period ); + + $results = $wpdb->get_results( $wpdb->prepare( + "SELECT COUNT(c.id) AS total, {$sql_clauses['select']} + FROM {$wpdb->edd_customers} c + WHERE c.date_created >= %s AND c.date_created <= %s + AND c.purchase_count > 0 + GROUP BY {$sql_clauses['groupby']} + ORDER BY {$sql_clauses['orderby']} ASC", + $dates['start']->copy()->format( 'mysql' ), + $dates['end']->copy()->format( 'mysql' ) ) ); + + $customers = array(); + + // Initialise all arrays with timestamps and set values to 0. + while ( strtotime( $chart_dates['start']->copy()->format( 'mysql' ) ) <= strtotime( $chart_dates['end']->copy()->format( 'mysql' ) ) ) { + $timestamp = $chart_dates['start']->copy()->format( 'U' ); + $date_on_chart = $chart_dates['start']; + + $customers[ $timestamp ][0] = $date_on_chart->format( 'Y-m-d H:i:s' ); + $customers[ $timestamp ][1] = 0; + + foreach ( $results as $result ) { + $date_of_db_value = EDD()->utils->date( $result->date ); + + // Add any new customers that were created during this hour. + if ( 'hour' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d H' ) === $date_on_chart->format( 'Y-m-d H' ) ) { + $customers[ $timestamp ][1] += $result->total; + } + // Add any new customers that were created during this day. + } elseif ( 'day' === $period ) { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m-d' ) === $date_on_chart->format( 'Y-m-d' ) ) { + $customers[ $timestamp ][1] += $result->total; + } + // Add any new customers that were created during this month. + } else { + // If the date of this db value matches the date on this line graph/chart, set the y axis value for the chart to the number in the DB result. + if ( $date_of_db_value->format( 'Y-m' ) === $date_on_chart->format( 'Y-m' ) ) { + $customers[ $timestamp ][1] += $result->total; + } + } + } + + // Move the chart along to the next hour/day/month to get ready for the next loop. + if ( 'hour' === $period ) { + $chart_dates['start']->addHour( 1 ); + } elseif ( 'day' === $period ) { + $chart_dates['start']->addDays( 1 ); + } else { + $chart_dates['start']->addMonth( 1 ); + } + } + + return array( + 'customers' => array_values( $customers ), + ); + }, + 'type' => 'line', + 'options' => array( + 'datasets' => array( + 'customers' => array( + 'label' => __( 'New Customers', 'easy-digital-downloads' ), + 'borderColor' => 'rgba(24,126,244,0.75)', + 'backgroundColor' => 'rgba(24,126,244,0.1)', + 'fill' => true, + 'borderWidth' => 2, + 'pointRadius' => 4, + 'pointHoverRadius' => 6, + 'pointBackgroundColor' => 'rgb(255,255,255)', + ), + ), + 'scales' => array( + 'yAxes' => array( + array( + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'maxTicksLimit' => 5, + 'formattingType' => 'integer', + 'suggestedMin' => 0, + 'beginAtZero' => true, + 'precision' => 0, + ), + ), + ), + ), + ), + ), + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_customer_report' ); + +/** + * Register export report and endpoints. + * + * @since 3.0 + * + * @param \EDD\Reports\Data\Report_Registry $reports Report registry. + */ +function edd_register_export_report( $reports ) { + try { + $reports->add_report( 'export', array( + 'label' => __( 'Export', 'easy-digital-downloads' ), + 'icon' => 'migrate', + 'priority' => 1000, + 'capability' => 'export_shop_reports', + 'display_callback' => 'display_export_report', + 'filters' => false, + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } +} +add_action( 'edd_reports_init', 'edd_register_export_report' ); +/** + * Render the `Export` report. + * + * @since 3.0 + */ +function display_export_report() { + wp_enqueue_script( 'edd-admin-tools-export' ); + ?> +
    +
    +
    +
    + +
    +
    +
    +
    + 0, + 'sales' => 0 + ); + + $stats = new EDD_Payment_Stats; + + $to_date_earnings = $stats->get_earnings( 0, 'this_month', null, $include_taxes ); + $to_date_sales = $stats->get_sales( 0, 'this_month' ); + + $current_day = date( 'd', current_time( 'timestamp' ) ); + $current_month = date( 'n', current_time( 'timestamp' ) ); + $current_year = date( 'Y', current_time( 'timestamp' ) ); + $days_in_month = cal_days_in_month( CAL_GREGORIAN, $current_month, $current_year ); + + $estimated['earnings'] = ( $to_date_earnings / $current_day ) * $days_in_month; + $estimated['sales'] = ( $to_date_sales / $current_day ) * $days_in_month; + + // Cache for one day + set_transient( 'edd_estimated_monthly_stats' . $include_taxes, $estimated, 86400 ); + } + + return maybe_unserialize( $estimated ); +} + +/** + * Adds postbox nonces, which are used to save the position of tile endpoint meta boxes. + * + * @since 3.0 + */ +function edd_add_screen_options_nonces() { + wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); + wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); +} +add_action( 'admin_footer', 'edd_add_screen_options_nonces' ); + +/** + * This function adds a notice to the bottom of the Tax reports screen if a default tax rate is detected, stating + * that we cannot report on the default tax rate. + * + * @since 3.0 + * @param \EDD\Reports\Data\Report|\WP_Error $report The current report object, or WP_Error if invalid. + */ +function edd_tax_report_notice( $report ) { + if ( 'taxes' === $report->object_id && false !== edd_get_option( 'tax_rate' ) ) { + ?> +

    + : + +

    + 'edd-reports', + 'view' => 'downloads_taxonomy', + ) + ) + ); +} +add_action( 'edd_show_downloads_taxonomy_report', 'edd_show_earnings_by_taxonomy_report' ); diff --git a/includes/admin/reporting/views/export-api-requests.php b/includes/admin/reporting/views/export-api-requests.php new file mode 100644 index 00000000000..018c7d68959 --- /dev/null +++ b/includes/admin/reporting/views/export-api-requests.php @@ -0,0 +1,38 @@ +
    +

    +
    +

    +
    +
    + + + + + html->date_field( + array( + 'id' => 'edd-api-requests-export-start', + 'class' => 'edd-export-start', + 'name' => 'api-requests-export-start', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> + + html->date_field( + array( + 'id' => 'edd-api-requests-export-end', + 'class' => 'edd-export-end', + 'name' => 'api-requests-export-end', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> +
    + + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-customers.php b/includes/admin/reporting/views/export-customers.php new file mode 100644 index 00000000000..91334f3959a --- /dev/null +++ b/includes/admin/reporting/views/export-customers.php @@ -0,0 +1,71 @@ +
    +

    +
    +

    + +

    +
    + prepare( "tt.taxonomy IN ({$placeholders})", $taxonomies ); + + $sql = "SELECT t.*, tt.*, tr.object_id + FROM {$wpdb->terms} AS t + INNER JOIN {$wpdb->term_taxonomy} AS tt ON t.term_id = tt.term_id + INNER JOIN {$wpdb->term_relationships} AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id + WHERE {$taxonomy__in}"; + + $results = $wpdb->get_results( $sql ); + + $taxonomies = array(); + + if ( $results ) { + foreach ( $results as $r ) { + $t = get_taxonomy( $r->taxonomy ); + $taxonomies[ absint( $r->term_id ) ] = $t->labels->singular_name . ': ' . esc_html( $r->name ); + } + } + ?> + + html->select( + array( + 'name' => 'taxonomy', + 'id' => 'edd_export_taxonomy', + 'options' => $taxonomies, + 'selected' => false, + 'show_option_none' => false, + 'show_option_all' => __( 'All Taxonomies', 'easy-digital-downloads' ), + ) + ); + ?> + + html->product_dropdown( + array( + 'name' => 'download', + 'id' => 'edd_customer_export_download', + 'chosen' => true, + /* translators: %s: Download plural label */ + 'placeholder' => sprintf( __( 'All %s', 'easy-digital-downloads' ), edd_get_label_plural() ), + ) + ); + + wp_nonce_field( 'edd_ajax_export', 'edd_ajax_export' ); + ?> + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-download-history.php b/includes/admin/reporting/views/export-download-history.php new file mode 100644 index 00000000000..fdf7741af9c --- /dev/null +++ b/includes/admin/reporting/views/export-download-history.php @@ -0,0 +1,49 @@ +
    +

    +
    +

    +
    + + html->product_dropdown( + array( + 'name' => 'download_id', + 'id' => 'edd_file_download_export_download', + 'chosen' => true, + /* translators: %s: Download plural label */ + 'placeholder' => sprintf( __( 'All %s', 'easy-digital-downloads' ), edd_get_label_plural() ), + ) + ); + ?> +
    + + + + + html->date_field( + array( + 'id' => 'edd-file-download-export-start', + 'class' => 'edd-export-start', + 'name' => 'file-download-export-start', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> + + html->date_field( + array( + 'id' => 'edd-file-download-export-end', + 'class' => 'edd-export-end', + 'name' => 'file-download-export-end', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> +
    + + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-downloads.php b/includes/admin/reporting/views/export-downloads.php new file mode 100644 index 00000000000..b402634ed49 --- /dev/null +++ b/includes/admin/reporting/views/export-downloads.php @@ -0,0 +1,26 @@ +
    +

    +
    +

    +
    + + html->product_dropdown( + array( + 'name' => 'download_id', + 'id' => 'edd_download_export_download', + 'chosen' => true, + /* translators: %s: Download plural label */ + 'placeholder' => sprintf( __( 'All %s', 'easy-digital-downloads' ), edd_get_label_plural() ), + ) + ); + ?> + + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-earnings-report.php b/includes/admin/reporting/views/export-earnings-report.php new file mode 100644 index 00000000000..d12e3e1a8b2 --- /dev/null +++ b/includes/admin/reporting/views/export-earnings-report.php @@ -0,0 +1,32 @@ +
    +

    +
    +

    +
    +
    + + + + + html->month_dropdown( 'start_month', 0, 'edd_export_earnings', true ); ?> + + html->year_dropdown( 'start_year', 0, 5, 0, 'edd_export_earnings' ); ?> +
    + + + +
    + + + + + html->month_dropdown( 'end_month', 0, 'edd_export_earnings', true ); ?> + + html->year_dropdown( 'end_year', 0, 5, 0, 'edd_export_earnings' ); ?> +
    + + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-orders.php b/includes/admin/reporting/views/export-orders.php new file mode 100644 index 00000000000..626ed1fe7c6 --- /dev/null +++ b/includes/admin/reporting/views/export-orders.php @@ -0,0 +1,52 @@ +
    +

    +
    +

    +
    +
    + + + + + html->date_field( + array( + 'id' => 'edd-orders-export-start', + 'class' => 'edd-export-start', + 'name' => 'orders-export-start', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ), + ) + ); + ?> + + html->date_field( + array( + 'id' => 'edd-orders-export-end', + 'class' => 'edd-export-end', + 'name' => 'orders-export-end', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ), + ) + ); + ?> +
    + + html->select( + array( + 'id' => 'edd_orders_export_status', + 'name' => 'status', + 'show_option_all' => __( 'All Statuses', 'easy-digital-downloads' ), + 'show_option_none' => false, + 'selected' => false, + 'options' => edd_get_payment_statuses(), + ) + ); + + wp_nonce_field( 'edd_ajax_export', 'edd_ajax_export' ); + ?> + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-sales-earnings.php b/includes/admin/reporting/views/export-sales-earnings.php new file mode 100644 index 00000000000..da92f4b7a68 --- /dev/null +++ b/includes/admin/reporting/views/export-sales-earnings.php @@ -0,0 +1,64 @@ +
    +

    +
    +

    +
    +
    + + + + + html->date_field( + array( + 'id' => 'edd-order-export-start', + 'class' => 'edd-export-start', + 'name' => 'order-export-start', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ), + ) + ); + ?> + + html->date_field( + array( + 'id' => 'edd-order-export-end', + 'class' => 'edd-export-end', + 'name' => 'order-export-end', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ), + ) + ); + + ?> +
    + + html->product_dropdown( + array( + 'name' => 'download_id', + 'id' => 'edd_orders_export_download', + 'chosen' => true, + /* translators: %s: Download plural label */ + 'placeholder' => sprintf( __( 'All %s', 'easy-digital-downloads' ), edd_get_label_plural() ), + ) + ); + ?> + + html->customer_dropdown( + array( + 'name' => 'customer_id', + 'id' => 'edd_order_export_customer', + 'chosen' => true, + 'none_selected' => '', + 'placeholder' => __( 'All Customers', 'easy-digital-downloads' ), + ) + ); + + wp_nonce_field( 'edd_ajax_export', 'edd_ajax_export' ); ?> + + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-sales.php b/includes/admin/reporting/views/export-sales.php new file mode 100644 index 00000000000..c324c241608 --- /dev/null +++ b/includes/admin/reporting/views/export-sales.php @@ -0,0 +1,49 @@ +
    +

    +
    +

    +
    +
    + + + + + html->date_field( + array( + 'id' => 'edd-sales-export-start', + 'class' => 'edd-sales-export-start', + 'name' => 'sales-export-start', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ), + ) + ); + ?> + + html->date_field( + array( + 'id' => 'edd-sales-export-end', + 'class' => 'edd-export-end', + 'name' => 'sales-export-end', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ), + ) + ); + + ?> +
    + + html->product_dropdown( + array( + 'name' => 'download_id', + 'id' => 'edd_sales_export_download', + 'chosen' => true, + ) + ); + ?> + + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-taxed-customers.php b/includes/admin/reporting/views/export-taxed-customers.php new file mode 100644 index 00000000000..04e86600bec --- /dev/null +++ b/includes/admin/reporting/views/export-taxed-customers.php @@ -0,0 +1,37 @@ +
    +

    +
    +

    +
    +
    + + + + html->date_field( + array( + 'id' => 'edd-taxed-customers-export-start', + 'class' => 'edd-export-start', + 'name' => 'taxed-customers-export-start', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> + + html->date_field( + array( + 'id' => 'edd-taxed-customers-export-end', + 'class' => 'edd-export-end', + 'name' => 'taxed-customers-export-end', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> +
    + + + +
    +
    +
    diff --git a/includes/admin/reporting/views/export-taxed-orders.php b/includes/admin/reporting/views/export-taxed-orders.php new file mode 100644 index 00000000000..359a5de9ed0 --- /dev/null +++ b/includes/admin/reporting/views/export-taxed-orders.php @@ -0,0 +1,72 @@ +
    +

    +
    +

    +
    +
    + + + + + html->date_field( + array( + 'id' => 'edd-taxed-orders-export-start', + 'class' => 'edd-export-start', + 'name' => 'taxed-orders-export-start', + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> + + html->date_field( + array( + 'id' => 'edd-taxed-orders-export-end', + 'class' => 'edd-export-end', + 'name' => 'taxed-orders-export-end', + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ) + ) + ); + ?> +
    + + html->select( + array( + 'id' => 'edd_taxed_orders_export_status', + 'name' => 'status', + 'show_option_all' => __( 'All Statuses', 'easy-digital-downloads' ), + 'show_option_none' => false, + 'selected' => false, + 'options' => edd_get_payment_statuses(), + ) + ); + ?> + + html->country_select( + array( + 'name' => 'country', + 'id' => 'edd_reports_filter_taxed_countries', + 'selected' => false, + 'show_option_all' => false, + ) + ); + ?> + + html->region_select( + array( + 'id' => 'edd_reports_filter_regions', + 'placeholder' => __( 'All Regions', 'easy-digital-downloads' ), + ) + ); + + wp_nonce_field( 'edd_ajax_export', 'edd_ajax_export' ); + ?> + + +
    +
    +
    diff --git a/includes/admin/settings/contextual-help.php b/includes/admin/settings/contextual-help.php new file mode 100755 index 00000000000..60d02e67ad0 --- /dev/null +++ b/includes/admin/settings/contextual-help.php @@ -0,0 +1,156 @@ +id ) { + return; + } + + $pass_manager = new Pass_Manager(); + if ( $pass_manager->isFree() ) { + $docs_url = edd_link_helper( + 'https://easydigitaldownloads.com/docs/', + array( + 'utm_medium' => 'settings-contextual-help', + 'utm_content' => 'documentation', + ) + ); + + $upgrade_url = edd_link_helper( + 'https://easydigitaldownloads.com/lite-upgrade/', + array( + 'utm_medium' => 'settings-contextual-help', + 'utm_content' => 'lite-upgrade', + ) + ); + + $screen->set_help_sidebar( + '

    ' . __( 'For more information:', 'easy-digital-downloads' ) . '

    ' . + /* translators: %s: Documentation URL */ + '

    ' . sprintf( __( 'Visit the documentation on the Easy Digital Downloads website.', 'easy-digital-downloads' ), $docs_url ) . '

    ' . + '

    ' . sprintf( + /* translators: %s: Upgrade URL */ + __( 'Need more from your Easy Digital Downloads store? Upgrade Now!.', 'easy-digital-downloads' ), + $upgrade_url + ) . '

    ' + ); + } + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-general', + 'title' => __( 'General', 'easy-digital-downloads' ), + 'content' => '

    ' . __( 'This screen provides the most basic settings for configuring your store. You can set the currency, page templates, and general store settings.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-payment-gateways', + 'title' => __( 'Payments', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'This screen provides ways to enable Test Mode, toggle payment gateways on or off, manage accounting settings, and configure gateway-specific settings. Any extra payment gateway extensions you have installed will appear on this page, and can be configured to suit your needs.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Test Payment - This included gateway is great for testing your store, as it requires no payment, and leads straight to product downloads. However, please remember to turn it off once your site is live!', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'PayPal - A PayPal payment gateway is included as standard with Easy Digital Downloads. To test the PayPal gateway, you need a Sandbox account for PayPal and the site must be placed in Test Mode from the Payments > Gateways tab. Please remember to enter your PayPal account email address in order for payments to get processed.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Stripe - The Stripe payment gateway is also included with Easy Digital Downloads. To test the Stripe gateway, you must "Connect with Stripe" and the site must be placed in Test Mode from the Payments > Gateways tab.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-emails', + 'title' => __( 'Emails', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( "This screen allows you to customize how emails act throughout your store. You can choose a premade template, set the sender's name, email address, and subject.", 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'A set of email tag markers has also been provided to allow the creation of personalized emails. A tag consists of a keyword surrounded by curly braces: {tag}.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-marketing', + 'title' => __( 'Marketing', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'Marketing settings will help you connect with your customers.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Marketing specific extensions will add their settings here as well.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-styles', + 'title' => __( 'Styles', 'easy-digital-downloads' ), + 'content' => '

    ' . __( "This screen allows customization of your store's styles. For complete control, you can completely disable all styles generated by the plugin.", 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-taxes', + 'title' => __( 'Taxes', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'This screen allows you to configure the tax rules for your store.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'If you do not wish to charge any tax on purchase, simply leave the Enable Taxes option unchecked.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Default Tax Rate: The default tax rate is the tax rate charged to customers located in your base country / state or province.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Base Country: This determines the country that is loaded by default on the checkout screen for customers that do not have an address stored in their account.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Base State / Province: This determines the region that is loaded by default on the checkout screen for customers that do not have an address stored in their account.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Prices Entered with Tax: if enabled, this means that the price entered on the product edit screens is the total amount the customer will pay after taxes. For example, if enabled and the price of a product is $20, the customer will pay 20$ at checkout. The exact amount charged in tax will be calculated automatically.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Display Tax Rate on Prices: when enabled, the amount the customer is expected to pay in tax will be displayed below purchase buttons.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Display During Checkout: This determines whether prices are shown with taxes or without taxes on checkout. If set to Including Tax, a $10 product with a 10% tax will be shown as $11.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Calculate Tax After Discounts: If enabled, this option will make it so that tax is calculated on the after-discount amount. If a purchase of $20 is made and a 20% discount is applied, tax will be calculated off of $16 instead of $20.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'Additional Tax Rates: This section lets you add tax rates for specific countries and/or states/provinces in those countries.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-privacy', + 'title' => __( 'Policies', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'This screen provides access to customer privacy policies, terms & agreements, and how to display them on the front of your site.', 'easy-digital-downloads' ) . '

    ' . + '

    ' . __( 'You may also override what happens to order records when a customer exercises their right to be forgotten from your site.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-extensions', + 'title' => __( 'Extensions', 'easy-digital-downloads' ), + 'content' => '

    ' . __( 'This screen provides access to settings added by most Easy Digital Downloads extensions.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'edd-settings-misc', + 'title' => __( 'Miscellaneous', 'easy-digital-downloads' ), + 'content' => + '

    ' . __( 'This screen provides other miscellaneous options such as configuring your store buttons, file download functionality, and terms of service.', 'easy-digital-downloads' ) . '

    ', + ) + ); + + do_action( 'edd_settings_contextual_help', $screen ); +} +add_action( 'load-download_page_edd-settings', 'edd_settings_contextual_help' ); diff --git a/includes/admin/settings/display-settings.php b/includes/admin/settings/display-settings.php new file mode 100755 index 00000000000..66a019afec7 --- /dev/null +++ b/includes/admin/settings/display-settings.php @@ -0,0 +1,84 @@ + +
    +
    +

    + +

    +
    +
    + +
    +

    + +

    + highest_license_key ) : + ?> +

    + 'edd-settings', + 'tab' => 'general', + ) + ); + printf( + wp_kses_post( + /* translators: 1: opening anchor tag, 2: closing anchor tag */ + __( 'Have a pass? You\'re ready to set up EDD (Pro). %1$sActivate Your Pass%2$s', 'easy-digital-downloads' ) + ), + '', + '' + ); + ?> +

    + +
    + $sections ) { + + // Loop through sections + foreach ( $sections as $section => $settings ) { + + // Check for backwards compatibility + $section_tabs = edd_get_settings_tab_sections( $tab ); + if ( ! is_array( $section_tabs ) || ! array_key_exists( $section, $section_tabs ) ) { + $section = 'main'; + $settings = $sections; + } + + // Current page + $page = "edd_settings_{$tab}_{$section}"; + + // Add the settings section + add_settings_section( + $page, + __return_null(), + '__return_false', + $page + ); + + foreach ( $settings as $option ) { + + // For backwards compatibility + if ( empty( $option['id'] ) ) { + continue; + } + + // Parse args + $args = wp_parse_args( $option, array( + 'section' => $section, + 'id' => null, + 'desc' => '', + 'name' => '', + 'size' => null, + 'options' => '', + 'std' => '', + 'min' => null, + 'max' => null, + 'step' => null, + 'chosen' => null, + 'multiple' => null, + 'placeholder' => null, + 'allow_blank' => true, + 'readonly' => false, + 'faux' => false, + 'tooltip_title' => false, + 'tooltip_desc' => false, + 'field_class' => '', + 'label_for' => false + ) ); + + // Callback fallback + $func = 'edd_' . $args['type'] . '_callback'; + $callback = ! function_exists( $func ) + ? 'edd_missing_callback' + : $func; + + // Link the label to the form field + if ( empty( $args['label_for'] ) ) { + $args['label_for'] = 'edd_settings[' . $args['id'] . ']'; + } + + // Add the settings field + add_settings_field( + 'edd_settings[' . $args['id'] . ']', + $args['name'], + $callback, + $page, + $page, + $args + ); + } + } + } + + // Register our setting in the options table + register_setting( 'edd_settings', 'edd_settings', 'edd_settings_sanitize' ); +} +add_action( 'admin_init', 'edd_register_settings' ); + +/** + * Retrieve the array of plugin settings + * + * @since 1.8 + * @since 3.0 Use a static variable internally to store registered settings + * @return array + */ +function edd_get_registered_settings() { + static $edd_settings = null; + + // Only build settings if not already built. + if ( null === $edd_settings && class_exists( '\\EDD\\Admin\\Settings\\Register' ) ) { + $settings = new EDD\Admin\Settings\Register(); + $edd_settings = $settings->get(); + } + + return $edd_settings; +} + +/** + * Settings Sanitization + * + * Adds a settings error (for the updated message) + * At some point this will validate input + * + * @since 1.0.8.2 + * + * @param array $input The value inputted in the field + * + * @global array $edd_options Array of all the EDD Options + * + * @return array $input Sanitized value + */ +function edd_settings_sanitize( $input = array() ) { + global $edd_options; + + // Default values. + $referrer = ''; + $setting_types = edd_get_registered_settings_types(); + $doing_section = ! empty( $_POST['_wp_http_referer'] ); + $input = ! empty( $input ) + ? $input + : array(); + + if ( true === $doing_section ) { + + // Pull out the tab and section. + parse_str( $_POST['_wp_http_referer'], $referrer ); + $tab = ! empty( $referrer['tab'] ) ? sanitize_key( $referrer['tab'] ) : 'general'; + $section = ! empty( $referrer['section'] ) ? sanitize_key( $referrer['section'] ) : 'main'; + + if ( ! empty( $_POST['edd_tab_override'] ) ) { + $tab = sanitize_text_field( $_POST['edd_tab_override'] ); + } + + // Maybe override the tab section. + if ( ! empty( $_POST['edd_section_override'] ) ) { + $section = sanitize_text_field( $_POST['edd_section_override'] ); + } + + // Get setting types for this section. + $setting_types = edd_get_registered_settings_types( $tab, $section ); + + // Run a general sanitization for the tab for special fields (like taxes). + $input = apply_filters( 'edd_settings_' . $tab . '_sanitize', $input ); + + // If we have a class for this tab, use it to sanitize the input. + // Normalize the tab name to be a class name. + $tab_class = EDD\Utils\Convert::snake_to_camel( $tab ); + $tab_class = 'EDD\\Admin\\Settings\\Sanitize\\Tabs\\' . $tab_class; + if ( class_exists( $tab_class ) ) { + $input = $tab_class::sanitize( $input ); + } + + // Run a general sanitization for the section so custom tabs with sub-sections can save special data. + $input = apply_filters( 'edd_settings_' . $tab . '-' . $section . '_sanitize', $input ); + + // If we have a class for this section, use it to sanitize the input. + // Normalize the section name to be a class name. + $section_class = $tab_class . '\\' . EDD\Utils\Convert::snake_to_camel( $section ); + if ( class_exists( $section_class ) ) { + $input = $section_class::sanitize( $input ); + } + } + + // Remove non setting types and merge settings together + $non_setting_types = edd_get_non_setting_types(); + $setting_types = array_diff( $setting_types, $non_setting_types ); + $output = array_merge( $edd_options, $input ); + + // Loop through settings, and apply any filters + foreach ( $setting_types as $key => $type ) { + + // Skip if type is empty + if ( empty( $type ) ) { + continue; + } + + if ( array_key_exists( $key, $output ) ) { + $output[ $key ] = apply_filters( 'edd_settings_sanitize_' . $type, $output[ $key ], $key ); + $output[ $key ] = apply_filters( 'edd_settings_sanitize', $output[ $key ], $key ); + + // See if we have a setting specific sanitization class for this type. + $type_class = 'EDD\\Settings\\Sanitize\\Types\\' . EDD\Utils\Convert::snake_to_camel( $type ); + if ( class_exists( $type_class ) ) { + $output[ $key ] = $type_class::sanitize( $output[ $key ], $key ); + } + } + + if ( true === $doing_section ) { + switch ( $type ) { + case 'checkbox': + case 'checkbox_description': + case 'gateways': + case 'multicheck': + case 'payment_icons': + if ( array_key_exists( $key, $input ) && $output[ $key ] === '-1' ) { + unset( $output[ $key ] ); + } + break; + case 'text': + if ( array_key_exists( $key, $input ) && empty( $input[ $key ] ) ) { + unset( $output[ $key ] ); + } + break; + case 'number': + if ( array_key_exists( $key, $output ) && ! array_key_exists( $key, $input ) ) { + unset( $output[ $key ] ); + } + + $setting_details = edd_get_registered_setting_details( $tab, $section, $key ); + $number_type = ! empty( $setting_details['step'] ) && false !== strpos( $setting_details['step'], '.' ) ? 'floatval' : 'intval'; + $minimum = isset( $setting_details['min'] ) ? $number_type( $setting_details['min'] ) : false; + $maximum = isset( $setting_details['max'] ) ? $number_type( $setting_details['max'] ) : false; + $new_value = $number_type( $input[ $key ] ); + + if ( ( false !== $minimum && $minimum > $new_value ) || ( false !== $maximum && $maximum < $new_value ) ) { + unset( $output[ $key ] ); + } + break; + default: + if ( array_key_exists( $key, $input ) && empty( $input[ $key ] ) || ( array_key_exists( $key, $output ) && ! array_key_exists( $key, $input ) ) ) { + unset( $output[ $key ] ); + } + break; + } + } elseif ( empty( $input[ $key ] ) ) { + unset( $output[ $key ] ); + } + } + + // Return output. + return (array) $output; +} + +/** + * Flattens the set of registered settings and their type so we can easily sanitize all the settings + * in a much cleaner set of logic in edd_settings_sanitize + * + * @since 2.6.5 + * @since 2.8 - Added the ability to filter setting types by tab and section + * + * @param $filtered_tab bool|string A tab to filter setting types by. + * @param $filtered_section bool|string A section to filter setting types by. + * + * @return array Key is the setting ID, value is the type of setting it is registered as + */ +function edd_get_registered_settings_types( $filtered_tab = false, $filtered_section = false ) { + $settings = edd_get_registered_settings(); + $setting_types = array(); + + foreach ( $settings as $tab_id => $tab ) { + + if ( false !== $filtered_tab && $filtered_tab !== $tab_id ) { + continue; + } + + foreach ( $tab as $section_id => $section_or_setting ) { + + // See if we have a setting registered at the tab level for backwards compatibility + if ( false !== $filtered_section && is_array( $section_or_setting ) && array_key_exists( 'type', $section_or_setting ) ) { + $setting_types[ $section_or_setting['id'] ] = $section_or_setting['type']; + continue; + } + + if ( false !== $filtered_section && $filtered_section !== $section_id ) { + continue; + } + + foreach ( $section_or_setting as $section_settings ) { + if ( ! empty( $section_settings['type'] ) ) { + $setting_types[ $section_settings['id'] ] = $section_settings['type']; + } + } + } + } + + return $setting_types; +} + +/** + * Allow getting a specific setting's details. + * + * @since 3.0 + * + * @param string $filtered_tab The tab the setting's section is in. + * @param string $filtered_section The section the setting is located in. + * @param string $setting_key The key associated with the setting. + * + * @return array + */ +function edd_get_registered_setting_details( $filtered_tab = '', $filtered_section = '', $setting_key = '' ) { + $settings = edd_get_registered_settings(); + $setting_details = array(); + + if ( isset( $settings[ $filtered_tab ][ $filtered_section ][ $setting_key ] ) ) { + $setting_details = $settings[ $filtered_tab ][ $filtered_section ][ $setting_key ]; + } + + return $setting_details; +} + +/** + * Return array of settings field types that aren't settings. + * + * @since 3.0 + * + * @return array + */ +function edd_get_non_setting_types() { + return apply_filters( + 'edd_non_setting_types', + array( + 'header', + 'descriptive_text', + 'hook', + ) + ); +} + +/** + * Sanitize text fields + * + * @since 1.8 + * @since 3.3.3 Converted to use setting type sanitization class. + * + * @param string $input The field value. + * + * @return string $input Sanitized value + */ +function edd_sanitize_text_field( $input = '' ) { + return EDD\Settings\Sanitize\Types\Text::sanitize( $input ); +} + +/** + * Sanitize HTML Class Names + * + * @since 2.6.11 + * + * @param string|array $class HTML Class Name(s) + * + * @return string $class + */ +function edd_sanitize_html_class( $class = '' ) { + + if ( is_string( $class ) ) { + $class = sanitize_html_class( $class ); + } elseif ( is_array( $class ) ) { + $class = array_values( array_map( 'sanitize_html_class', $class ) ); + $class = implode( ' ', array_unique( $class ) ); + } + + return $class; +} + +/** + * Retrieve settings tabs + * + * @since 1.8 + * @since 2.11.4 Any tabs with no registered settings are filtered out in `edd_options_page`. + * + * @return array $tabs + */ +function edd_get_settings_tabs() { + return apply_filters( 'edd_settings_tabs', array( + 'general' => __( 'General', 'easy-digital-downloads' ), + 'gateways' => __( 'Payments', 'easy-digital-downloads' ), + 'emails' => __( 'Emails', 'easy-digital-downloads' ), + 'marketing' => __( 'Marketing', 'easy-digital-downloads' ), + 'styles' => __( 'Styles', 'easy-digital-downloads' ), + 'taxes' => __( 'Taxes', 'easy-digital-downloads' ), + 'privacy' => __( 'Policies', 'easy-digital-downloads' ), + 'extensions' => __( 'Extensions', 'easy-digital-downloads' ), + 'licenses' => __( 'Licenses', 'easy-digital-downloads' ), + 'misc' => __( 'Misc', 'easy-digital-downloads' ), + ) ); +} + +/** + * Retrieve settings tabs + * + * @since 2.5 + * @return array $section + */ +function edd_get_settings_tab_sections( $tab = false ) { + $tabs = array(); + $sections = edd_get_registered_settings_sections(); + + if ( $tab && ! empty( $sections[ $tab ] ) ) { + $tabs = $sections[ $tab ]; + } else if ( $tab ) { + $tabs = array(); + } + + return $tabs; +} + +/** + * Get the settings sections for each tab + * Uses a static to avoid running the filters on every request to this function + * + * @since 2.5 + * @return array Array of tabs and sections + */ +function edd_get_registered_settings_sections() { + static $sections = null; + + if ( null === $sections ) { + $sections = array( + 'general' => apply_filters( 'edd_settings_sections_general', array( + 'main' => __( 'Store', 'easy-digital-downloads' ), + 'currency' => __( 'Currency', 'easy-digital-downloads' ), + 'pages' => __( 'Pages', 'easy-digital-downloads' ), + 'api' => __( 'API', 'easy-digital-downloads' ), + ) ), + 'gateways' => apply_filters( 'edd_settings_sections_gateways', array( + 'main' => __( 'General', 'easy-digital-downloads' ), + 'checkout' => __( 'Checkout', 'easy-digital-downloads' ), + 'refunds' => __( 'Refunds', 'easy-digital-downloads' ), + 'accounting' => __( 'Accounting', 'easy-digital-downloads' ), + ) ), + 'emails' => apply_filters( 'edd_settings_sections_emails', array( + 'main' => __( 'General', 'easy-digital-downloads' ), + 'email_summaries' => __( 'Summaries', 'easy-digital-downloads' ), + ) ), + 'marketing' => apply_filters( 'edd_settings_sections_marketing', array( + 'main' => __( 'General', 'easy-digital-downloads' ), + ) ), + 'styles' => apply_filters( 'edd_settings_sections_styles', array( + 'main' => __( 'General', 'easy-digital-downloads' ), + 'buttons' => __( 'Buttons', 'easy-digital-downloads' ) + ) ), + 'taxes' => apply_filters( 'edd_settings_sections_taxes', array( + 'main' => __( 'General', 'easy-digital-downloads' ), + 'rates' => __( 'Rates', 'easy-digital-downloads' ), + ) ), + 'privacy' => apply_filters( 'edd_settings_section_privacy', array( + 'main' => __( 'Privacy Policy', 'easy-digital-downloads' ), + 'site_terms' => __( 'Terms & Agreements', 'easy-digital-downloads' ), + 'export_erase' => __( 'Export & Erase', 'easy-digital-downloads' ) + ) ), + 'extensions' => apply_filters( 'edd_settings_sections_extensions', array( + 'main' => __( 'Main', 'easy-digital-downloads' ) + ) ), + 'licenses' => apply_filters( 'edd_settings_sections_licenses', array() ), + 'misc' => apply_filters( 'edd_settings_sections_misc', array( + 'main' => __( 'General', 'easy-digital-downloads' ), + 'button_text' => __( 'Purchase Buttons', 'easy-digital-downloads' ), + 'file_downloads' => __( 'File Downloads', 'easy-digital-downloads' ), + ) ) + ); + } + + // Filter & return + return apply_filters( 'edd_settings_sections', $sections ); +} + +/** + * Retrieve a list of all published pages + * + * On large sites this can be expensive, so only load if on the settings page or $force is set to true + * + * @since 1.9.5 + * + * @param bool $force Force the pages to be loaded even if not on settings + * + * @return array $pages_options An array of the pages + */ +function edd_get_pages( $force = false ) { + + $pages_options = array( '' => __( 'None', 'easy-digital-downloads' ) ); + + if ( ( ! isset( $_GET['page'] ) || 'edd-settings' !== $_GET['page'] ) && ! $force ) { + return $pages_options; + } + + $pages = get_pages(); + if ( $pages ) { + foreach ( $pages as $page ) { + $pages_options[ $page->ID ] = $page->post_title; + } + } + + return $pages_options; +} + +/** + * Header Callback + * + * Renders the header. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_header_callback( $args ) { + echo apply_filters( 'edd_after_setting_output', '', $args ); +} + +/** + * Checkbox Callback + * + * Renders checkboxes. + * + * @since 1.0 + * @since 3.0 Updated to use `EDD_HTML_Elements`. + * + * @param array $args Arguments passed by the setting. + */ +function edd_checkbox_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( isset( $args['faux'] ) && true === $args['faux'] ) { + $name = ''; + } else { + $name = 'edd_settings[' . edd_sanitize_key( $args['id'] ) . ']'; + } + + $class = edd_sanitize_html_class( $args['field_class'] ); + + $args['name'] = $name; + $args['class'] = $class; + $args['current'] = ! empty( $edd_option ) + ? $edd_option + : ''; + $args['label'] = wp_kses_post( $args['desc'] ); + $args['value'] = 1; + + $html = ''; + $html .= '
    '; + $html .= EDD()->html->checkbox( $args ); + $html .= '
    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Checkbox with description Callback + * + * Renders checkboxes with a description. + * + * @since 3.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_checkbox_description_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + // Allow a setting or filter to override what the found value is. + if ( isset( $args['current'] ) ) { + $edd_option = $args['current']; + } + + if ( isset( $args['faux'] ) && true === $args['faux'] ) { + $name = ''; + } else { + $name = 'edd_settings[' . edd_sanitize_key( $args['id'] ) . ']'; + } + + $args['name'] = $name; + $args['class'] = edd_sanitize_html_class( $args['field_class'] ); + $args['current'] = ! empty( $edd_option ) ? $edd_option : ''; + $args['label'] = false; + $args['value'] = 1; + + $html = ''; + $html .= '
    '; + $html .= EDD()->html->checkbox( $args ); + $html .= ''; + $html .= '
    '; + if ( ! empty( $args['desc'] ) ) { + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + } + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Multicheck Callback + * + * Renders multiple checkboxes. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_multicheck_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + $class = edd_sanitize_html_class( $args['field_class'] ); + + $html = ''; + if ( ! empty( $args['options'] ) ) { + $html .= ''; + + foreach ( $args['options'] as $key => $option ): + if ( isset( $edd_option[ $key ] ) ) { + $enabled = $option; + } else { + $enabled = null; + } + $html .= '
    '; + $html .= ' '; + $html .= ''; + $html .= '
    '; + endforeach; + $html .= '

    ' . $args['desc'] . '

    '; + } + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Payment method icons callback + * + * @since 2.1 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_payment_icons_callback( $args = array() ) { + + // Start an output buffer + ob_start(); + + $edd_option = edd_get_option( $args['id'] ); + $class = edd_sanitize_html_class( $args['field_class'] ); ?> + + + + +
      + + $option ) : + $enabled = isset( $edd_option[ $key ] ) + ? $option + : null; ?> + +
    • + +
    • + + + +
    + +

    + + $option ) : + $checked = false; + + if ( $edd_options && $edd_options == $key ) { + $checked = true; + } elseif ( isset( $args['std'] ) && $args['std'] == $key && ! $edd_options ) { + $checked = true; + } + + $html .= '
    '; + $html .= ' '; + $html .= ''; + $html .= '
    '; + endforeach; + + $html .= '

    ' . apply_filters( 'edd_after_setting_output', wp_kses_post( $args['desc'] ), $args ) . '

    '; + + echo $html; +} + +/** + * Gateways Callback + * + * Renders gateways fields. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_gateways_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + $html = ''; + $html .= ''; + + if ( ! empty( $args['options'] ) ) { + $class = edd_sanitize_html_class( $args['field_class'] ); + $html .= '
      '; + + foreach ( $args['options'] as $key => $option ) { + if ( isset( $edd_option[ $key ] ) ) { + $enabled = '1'; + } else { + $enabled = null; + } + + $html .= '
    • '; + $html .= ''; + $html .= '
    • '; + } + + $html .= '
    '; + + $url = edd_link_helper( + 'https://easydigitaldownloads.com/downloads/category/extensions/gateways/', + array( + 'utm_medium' => 'payment-settings', + 'utm_content' => 'gateways', + ) + ); + + /* translators: 1: opening link tag; do not translate, 2: closing link tag; do not translate */ + $html .= '

    ' . esc_html__( 'Choose how you want to allow your customers to pay you.', 'easy-digital-downloads' ) . '
    ' . sprintf( __( 'More %1$sPayment Gateways%2$s are available.', 'easy-digital-downloads' ), '', '' ) . '

    '; + } + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Gateways Callback (drop down) + * + * Renders gateways select menu + * + * @since 1.5 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_gateway_select_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + $class = edd_sanitize_html_class( $args['field_class'] ); + if ( isset( $args['chosen'] ) ) { + $class .= ' edd-select-chosen'; + if ( is_rtl() ) { + $class .= ' chosen-rtl'; + } + } + + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Text Callback + * + * Renders text fields. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_text_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( $edd_option ) { + $value = $edd_option; + } elseif ( ! empty( $args['allow_blank'] ) && empty( $edd_option ) ) { + $value = ''; + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + + if ( isset( $args['faux'] ) && true === $args['faux'] ) { + $args['readonly'] = true; + $value = isset( $args['std'] ) ? $args['std'] : ''; + $name = ''; + } else { + $name = 'name="edd_settings[' . esc_attr( $args['id'] ) . ']"'; + } + + $class = edd_sanitize_html_class( $args['field_class'] ); + + $placeholder = ! empty( $args['placeholder'] ) + ? ' placeholder="' . esc_attr( $args['placeholder'] ) . '"' + : ''; + + $disabled = ! empty( $args['disabled'] ) ? ' disabled="disabled"' : ''; + $readonly = $args['readonly'] === true ? ' readonly="readonly"' : ''; + $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular'; + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Email Callback + * + * Renders email fields. + * + * @since 2.8 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_email_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( $edd_option ) { + $value = $edd_option; + } elseif ( ! empty( $args['allow_blank'] ) && empty( $edd_option ) ) { + $value = ''; + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + + if ( isset( $args['faux'] ) && true === $args['faux'] ) { + $args['readonly'] = true; + $value = isset( $args['std'] ) ? $args['std'] : ''; + $name = ''; + } else { + $name = 'name="edd_settings[' . esc_attr( $args['id'] ) . ']"'; + } + + $class = edd_sanitize_html_class( $args['field_class'] ); + + $placeholder = isset( $args['placeholder'] ) + ? $args['placeholder'] + : ''; + + $disabled = ! empty( $args['disabled'] ) ? ' disabled="disabled"' : ''; + $readonly = $args['readonly'] === true ? ' readonly="readonly"' : ''; + $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular'; + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Number Callback + * + * Renders number fields. + * + * @since 1.9 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_number_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( is_numeric( $edd_option ) ) { + $value = $edd_option; + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + + if ( isset( $args['faux'] ) && true === $args['faux'] ) { + $args['readonly'] = true; + $value = isset( $args['std'] ) ? $args['std'] : ''; + $name = ''; + } else { + $name = 'name="edd_settings[' . esc_attr( $args['id'] ) . ']"'; + } + + $class = edd_sanitize_html_class( $args['field_class'] ); + + $max = isset( $args['max'] ) ? $args['max'] : 999999; + $min = isset( $args['min'] ) ? $args['min'] : 0; + $step = isset( $args['step'] ) ? $args['step'] : 1; + + $readonly = ! empty( $args['readonly'] ) ? ' readonly' : ''; + $disabled = ! empty( $args['disabled'] ) ? ' disabled="disabled"' : ''; + + $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular'; + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Textarea Callback + * + * Renders textarea fields. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_textarea_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( $edd_option ) { + if ( is_array( $edd_option ) ) { + $value = implode( "\n", maybe_unserialize( $edd_option ) ); + } else { + $value = $edd_option; + } + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + + $class = edd_sanitize_html_class( $args['field_class'] ); + $placeholder = ! empty( $args['placeholder'] ) + ? ' placeholder="' . esc_attr( $args['placeholder'] ) . '"' + : ''; + + $readonly = $args['readonly'] === true ? ' readonly="readonly"' : ''; + + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Password Callback + * + * Renders password fields. + * + * @since 1.3 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_password_callback( $args ) { + $edd_options = edd_get_option( $args['id'] ); + + if ( $edd_options ) { + $value = $edd_options; + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + + $class = edd_sanitize_html_class( $args['field_class'] ); + + $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular'; + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Missing Callback + * + * If a function is missing for settings callbacks alert the user. + * + * @since 1.3.1 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_missing_callback( $args ) { + printf( + wp_kses_post( + /* translators: %s: the setting ID */ + __( 'The callback function used for the %s setting is missing.', 'easy-digital-downloads' ) + ), + '' . esc_attr( $args['id'] ) . '' + ); +} + +/** + * Select Callback + * + * Renders select fields. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_select_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( $edd_option ) { + $value = $edd_option; + } else { + + // Properly set default fallback if the Select Field allows Multiple values. + if ( empty( $args['multiple'] ) ) { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } else { + $value = ! empty( $args['std'] ) ? $args['std'] : array(); + } + } + + $args['name'] = 'edd_settings[' . esc_attr( $args['id'] ) . ']'; + $args['id'] = 'edd_settings[' . esc_attr( $args['id'] ) . ']'; + if ( ! empty( $args['multiple'] ) ) { + $args['name'] .= '[]'; + } + $args['selected'] = $value; + $args['class'] = edd_sanitize_html_class( $args['field_class'] ); + if ( ! isset( $args['show_option_all'] ) ) { + $args['show_option_all'] = false; + } + if ( ! isset( $args['show_option_none'] ) ) { + $args['show_option_none'] = false; + } + + $html = EDD()->html->select( $args ); + if ( ! empty( $args['desc'] ) ) { + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + } + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Color select Callback + * + * Renders color select fields. + * + * @since 1.8 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_color_select_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( $edd_option ) { + $value = $edd_option; + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + + $class = edd_sanitize_html_class( $args['field_class'] ); + if ( $args['chosen'] ) { + $class .= 'edd-select-chosen'; + if ( is_rtl() ) { + $class .= ' chosen-rtl'; + } + } + + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Rich Editor Callback + * + * Renders rich editor fields. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + */ +function edd_rich_editor_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( $edd_option ) { + $value = $edd_option; + } else { + if ( ! empty( $args['allow_blank'] ) && empty( $edd_option ) ) { + $value = ''; + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + } + + $rows = isset( $args['size'] ) ? $args['size'] : 20; + + $class = edd_sanitize_html_class( $args['field_class'] ); + + ob_start(); + + wp_editor( stripslashes( $value ), 'edd_settings_' . esc_attr( $args['id'] ), array( + 'textarea_name' => 'edd_settings[' . esc_attr( $args['id'] ) . ']', + 'textarea_rows' => absint( $rows ), + 'editor_class' => $class, + ) ); + + if ( ! empty( $args['desc'] ) ) { + echo '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + } + + $html = ob_get_clean(); + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Upload Callback + * + * Renders upload fields. + * + * @since 1.0 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_upload_callback( $args ) { + $uploader = new EDD\HTML\Upload( + array( + 'value' => edd_get_option( $args['id'], $args['std'] ), + 'desc' => $args['desc'], + 'id' => 'edd_settings[' . esc_attr( $args['id'] ) . ']', + 'name' => 'edd_settings[' . esc_attr( $args['id'] ) . ']', + ) + ); + + echo apply_filters( 'edd_after_setting_output', $uploader->get(), $args ); +} + +/** + * Color picker Callback + * + * Renders color picker fields. + * + * @since 1.6 + * + * @param array $args Arguments passed by the setting + * + * @return void + */ +function edd_color_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + + if ( $edd_option ) { + $value = $edd_option; + } else { + $value = isset( $args['std'] ) ? $args['std'] : ''; + } + + $default = isset( $args['std'] ) ? $args['std'] : ''; + + $class = edd_sanitize_html_class( $args['field_class'] ); + + $html = ''; + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Shop States Callback + * + * Renders states drop down based on the currently selected country. + * + * @since 1.6 + * + * @param array $args Arguments passed by the setting. + * + * @return void + */ +function edd_shop_states_callback( $args ) { + $edd_option = edd_get_option( $args['id'] ); + $class = edd_sanitize_html_class( $args['field_class'] ); + $html = ''; + + if ( empty( edd_get_shop_states() ) ) { + $placeholder = __( 'Enter a region', 'easy-digital-downloads' ); + $html = ''; + } else { + $placeholder = isset( $args['placeholder'] ) + ? $args['placeholder'] + : ''; + if ( $args['chosen'] ) { + $class .= ' edd-select-chosen'; + if ( is_rtl() ) { + $class .= ' chosen-rtl'; + } + } + $html = EDD()->html->region_select( + array( + 'name' => 'edd_settings[' . edd_sanitize_key( $args['id'] ) . ']', + 'id' => 'edd_settings[' . edd_sanitize_key( $args['id'] ) . ']', + 'class' => $class, + 'show_option_empty' => $placeholder, + 'placeholder' => $placeholder, + ), + '', + $edd_option + ); + } + $html .= ! empty( $args['desc'] ) ? '

    ' . wp_kses_post( $args['desc'] ) . '

    ' : ''; + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Outputs the "Default Rate" setting. + * + * @since 3.0 + * + * @param array $args Arguments passed to the setting. + */ +function edd_tax_rate_callback( $args ) { + echo ''; + echo wp_kses_post( $args['desc'] ); +} + +/** + * Recapture Callback + * + * Renders Recapture Settings + * + * @since 2.10.2 + * @param array $args Arguments passed by the setting + * @return void + */ +function edd_recapture_callback($args) { + $client_connected = false; + + if ( class_exists( 'RecaptureEDD' ) ) { + $client_connected = RecaptureEDD::is_ready(); + } + + ob_start(); + + echo $args['desc']; + + // Output the appropriate button and label based on connection status + if ( $client_connected ) : + $connection_complete = get_option( 'recapture_api_key' ); + ?> +
    +

    + + ', + '' + ); + ?> +

    + + +

    + +

    + +

    + ', + '' + ); + ?> +

    + +
    + +

    + ', + '' + ); + ?> +

    + +

    + + +

    + + + $rates, + 'nonce' => wp_create_nonce( 'edd-country-field-nonce' ), + 'i18n' => array( + /* translators: Tax rate country code */ + 'duplicateRate' => esc_html__( 'Duplicate tax rates are not allowed. Please deactivate the existing %s tax rate before adding or activating another.', 'easy-digital-downloads' ), + 'emptyCountry' => esc_html__( 'Please select a country.', 'easy-digital-downloads' ), + 'negativeTax' => esc_html__( 'Please enter a tax rate greater than 0.', 'easy-digital-downloads' ), + 'emptyTax' => esc_html__( 'Are you sure you want to add a 0% tax rate?', 'easy-digital-downloads' ), + ), + ) ); + + $templates = array( + 'meta', + 'row', + 'row-empty', + 'add', + 'bulk-actions' + ); + + echo '

    ' . $args['desc'] . '

    '; + + echo '
    '; + + foreach ( $templates as $tmpl ) { +?> + + + +get(); + if ( ! empty( $args['desc'] ) ) { + $html .= '

    ' . wp_kses_post( $args['desc'] ) . '

    '; + } + + echo apply_filters( 'edd_after_setting_output', $html, $args ); +} + +/** + * Set manage_shop_settings as the cap required to save EDD settings pages + * + * @since 1.9 + * @return string capability required + */ +function edd_set_settings_cap() { + return 'manage_shop_settings'; +} +add_filter( 'option_page_capability_edd_settings', 'edd_set_settings_cap' ); + +/** + * Maybe attach a tooltip to a setting + * + * @since 1.9 + * @param string $html + * @param type $args + * @return string + */ +function edd_add_setting_tooltip( $html = '', $args = array() ) { + + // Tooltip has title & description. + if ( ! empty( $args['tooltip_title'] ) && ! empty( $args['tooltip_desc'] ) ) { + $tooltip = new EDD\HTML\Tooltip( + array( + 'title' => $args['tooltip_title'], + 'content' => $args['tooltip_desc'], + ) + ); + $tooltip = $tooltip->get(); + $has_p_tag = strstr( $html, '

    ' ); + $has_label = strstr( $html, '' ); + + // Insert tooltip at end of paragraph. + if ( false !== $has_p_tag ) { + $html = str_replace( '

    ', $tooltip . '

    ', $html ); + + // Insert tooltip at end of label. + } elseif ( false !== $has_label ) { + $html = str_replace( '', '' . $tooltip, $html ); + + // Append tooltip to end of HTML. + } else { + $html .= $tooltip; + } + } + + return $html; +} +add_filter( 'edd_after_setting_output', 'edd_add_setting_tooltip', 10, 2 ); + +/** + * Filters the edd_get_option call for test_mode. + * + * This allows us to ensure that calls directly to edd_get_option respect the constant + * in addition to the edd_is_test_mode() function call and included filter. + * + * @since 3.1 + * + * @param bool $value If test_mode is enabled in the settings. + * @param string $key The key of the setting, should be test_mode. + * @param bool $default The default setting, which is 'false' for test_mode. + */ +function edd_filter_test_mode_option( $value, $key, $default ) { + if ( edd_is_test_mode_forced() ) { + $value = true; + } + + return $value; +} +add_filter( 'edd_get_option_test_mode', 'edd_filter_test_mode_option', 10, 3 ); + +/** + * Determine if test mode is being forced to true. + * + * Using the EDD_TEST_MODE and the edd_is_test_mode filter, determine if the value of true + * is being forced for test_mode so we can properly alter the setting for it. + * + * @since 3.1 + * + * @return bool If test_mode is being forced or not. + */ +function edd_is_test_mode_forced() { + if ( defined( 'EDD_TEST_MODE' ) && true === EDD_TEST_MODE ) { + return true; + } + + if ( false !== has_filter( 'edd_is_test_mode', '__return_true' ) ) { + return true; + } + + return false; +} + +/** + * Checks for an incorrect setting for the privacy policy. + * Required in updating from EDD 2.9.2 to 2.9.3. + */ +add_filter( 'edd_get_option_show_privacy_policy_on_checkout', function( $value ) { + if ( ! empty( $value ) ) { + return $value; + } + $fix_show_privacy_policy_setting = edd_get_option( 'show_agree_to_privacy_policy_on_checkout', false ); + if ( ! empty( $fix_show_privacy_policy_setting ) ) { + edd_update_option( 'show_privacy_policy_on_checkout', $fix_show_privacy_policy_setting ); + edd_delete_option( 'show_agree_to_privacy_policy_on_checkout' ); + + return $fix_show_privacy_policy_setting; + } + + return $value; +}, 10, 3 ); diff --git a/includes/admin/settings/settings-compatibility.php b/includes/admin/settings/settings-compatibility.php new file mode 100644 index 00000000000..6d9df044cbe --- /dev/null +++ b/includes/admin/settings/settings-compatibility.php @@ -0,0 +1,164 @@ + -
    - - - -
    - - - -
    - - - -
    -
    - -
    - '; - $output = '' . $img . ''; + * @since 1.0 + * @return string "Insert Download" Button + */ +function edd_media_button() { + + // Bail if not a post new/edit screen + if ( ! edd_is_insertable_admin_page() ) { + return; } - return $context . $output; -} -add_filter('media_buttons_context', 'edd_media_button'); + // Setup the icon + $icon = ''; + /* translators: singular download label */ + $text = sprintf( __( 'Insert %s', 'easy-digital-downloads' ), edd_get_label_singular() ); + + // Output the thickbox button + echo '' . $icon . esc_html( $text ) . ''; +} +add_action( 'media_buttons', 'edd_media_button', 11 ); /** * Admin Footer For Thickbox * - * Prints the footer code needed for the Insert Download + * Prints the footer code needed for the Insert Download * TinyMCE button. * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @global $pagenow + * @global $typenow + * @return void + */ function edd_admin_footer_for_thickbox() { - global $pagenow, $typenow; - - // Only run in post/page creation and edit screens - if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) && $typenow != 'download' ) { - $downloads = get_posts(array('post_type' => 'download', 'posts_per_page' => -1)); - - ?> - - - '; - -} -add_action('edd_email_template_default', 'edd_default_email_template'); - - -/** - * Default Email Template Styling Extras - * - * @access private - * @since 1.0.9.1 - * @return string -*/ - -function edd_default_email_styling( $email_body ) { - - $first_p = strpos($email_body, '

    '); - $email_body = substr_replace($email_body, '

    ', $first_p, 3); - - return $email_body; -} -add_filter('edd_purchase_receipt_default', 'edd_default_email_styling'); - diff --git a/includes/emails/email-summary/class-edd-email-summary-blurb.php b/includes/emails/email-summary/class-edd-email-summary-blurb.php new file mode 100644 index 00000000000..d3d0da8cd08 --- /dev/null +++ b/includes/emails/email-summary/class-edd-email-summary-blurb.php @@ -0,0 +1,302 @@ +environment_checker = new EnvironmentChecker(); + } + + /** + * Fetch all blurbs from remote endpoint. + * + * @since 3.1 + * + * @return array + */ + public function fetch_blurbs() { + $existing_blurbs = get_option( 'edd_email_summary_blurbs', false ); + if ( false !== $existing_blurbs ) { + return $existing_blurbs; + } + + $blurbs = array(); + $request_body = false; + + $request = wp_safe_remote_get( self::BLURBS_ENDPOINT_URL ); + + // @todo - Detect first response code, before redirect! + if ( ! is_wp_error( $request ) && 200 === wp_remote_retrieve_response_code( $request ) ) { + $request_body = wp_remote_retrieve_body( $request ); + $blurbs = json_decode( $request_body, true ); + update_option( 'edd_email_summary_blurbs', $blurbs, false ); + } + + if ( empty( $request_body ) ) { + // HTTP Request for blurbs is empty, fallback to local .json file. + $fallback_json = wp_json_file_decode( EDD_PLUGIN_DIR . 'includes/admin/promos/email-summary/blurbs.json', array( 'associative' => true ) ); + if ( ! empty( $fallback_json ) ) { + $blurbs = $fallback_json; + } + } + + return $blurbs; + } + + + /** + * Get the next blurb that can be sent. + * + * @since 3.1 + * + * @return array + */ + public function get_next() { + $all_data = $this->fetch_blurbs(); + $blurbs = array(); + $blurbs_sent = get_option( 'email_summary_blurbs_sent', array() ); + $next_blurb = false; + + if ( empty( $all_data['blurbs'] ) ) { + return false; + } + + // Loop through the fetched blurbs and filter out all that meet the conditions. + foreach ( $all_data['blurbs'] as $key => $blurb ) { + if ( $this->does_blurb_meet_conditions( $blurb ) ) { + $blurbs[] = $blurb; + } + } + + // Find first blurb that was not yet sent. + foreach ( $blurbs as $blurb ) { + $blurb_hash = $this->get_blurb_hash( $blurb ); + if ( is_array( $blurbs_sent ) && ! in_array( $blurb_hash, $blurbs_sent, true ) ) { + $next_blurb = $blurb; + break; + } + } + + // If all of the available blurbs were already sent out, choose random blurb. + if ( ! $next_blurb && ! empty( $blurbs ) ) { + $next_blurb = $blurbs[ array_rand( $blurbs ) ]; + } + + return $next_blurb; + } + + /** + * Save blurb as sent to the options. + * + * @since 3.1 + * + * @param array $blurb Blurb data. + * @return void + */ + public function mark_blurb_sent( $blurb ) { + $blurbs_sent = get_option( 'email_summary_blurbs_sent', array() ); + if ( ! empty( $blurb ) ) { + $blurb_hash = $this->get_blurb_hash( $blurb ); + if ( ! in_array( $blurb_hash, $blurbs_sent, true ) ) { + $blurbs_sent[] = $blurb_hash; + } + } + + update_option( 'email_summary_blurbs_sent', $blurbs_sent ); + } + + + /** + * Hash blurb array + * + * @since 3.1 + * + * @param array $blurb Blurb data. + * @return string MD5 hashed blurb. + */ + public function get_blurb_hash( $blurb ) { + if ( empty( $blurb ) ) { + return false; + } + // We want to sort the array, so that we can get reliable hash everytime even if array properties order changed. + array_multisort( $blurb ); + return md5( wp_json_encode( $blurb ) ); + } + + /** + * Check if store pass matches the condition from the blurb. + * + * @since 3.1 + * + * @param string $condition Pass details. + * @return bool + */ + public function check_blurb_current_pass( $condition ) { + return $this->environment_checker->meetsCondition( $condition ); + } + + /** + * Check if store has all requested plugins active. + * + * @since 3.1 + * + * @param array $active_plugins An array of plugins that all need to be active. + * @return bool + */ + public function check_blurb_active_plugins( $active_plugins ) { + foreach ( $active_plugins as $plugin_name ) { + if ( ! is_plugin_active( $plugin_name ) ) { + return false; + } + } + + return true; + } + + /** + * Check if store has certain plugins inactive. + * + * @since 3.1 + * + * @param array $inactive_plugins An array of plugins that needs to be inactive. + * @return bool + */ + public function check_blurb_inactive_plugins( $inactive_plugins ) { + foreach ( $inactive_plugins as $plugin_name ) { + if ( is_plugin_active( $plugin_name ) ) { + return false; + } + } + + return true; + } + + /** + * Check if store has specific products/downloads active. + * + * @since 3.1 + * + * @param array $conditions An array of predefined conditions. + * @return bool + */ + public function check_blurb_has_downloads( $conditions ) { + foreach ( $conditions as $condition_name ) { + // Check if store has any products that are free. + if ( 'free' === $condition_name ) { + $args = array( + 'post_type' => 'download', + 'posts_per_page' => 1, + 'fields' => 'ids', + 'no_found_rows' => true, + 'meta_query' => array( + array( + 'key' => 'edd_price', + 'value' => '0.00', + ), + ), + ); + + $downloads = new WP_Query( $args ); + if ( 0 === $downloads->post_count ) { + return false; + } + } + } + + return true; + } + + /** + * Check if blurb meets conditions. + * + * @since 3.1 + * + * @param array $blurb Blurb data. + * @return bool + */ + public function does_blurb_meet_conditions( $blurb ) { + if ( isset( $blurb['conditions'] ) && ! empty( $blurb['conditions'] ) ) { + foreach ( $blurb['conditions'] as $condition_name => $condition ) { + if ( empty( $condition ) ) { + continue; + } + + // Pass check. + if ( 'current_pass' === $condition_name ) { + if ( ! $this->check_blurb_current_pass( $condition ) ) { + return false; + } + } + + // Active plugins check. + if ( 'active_plugins' === $condition_name ) { + if ( ! $this->check_blurb_active_plugins( $condition ) ) { + return false; + } + } + + // Inactive plugins check. + if ( 'inactive_plugins' === $condition_name ) { + if ( ! $this->check_blurb_inactive_plugins( $condition ) ) { + return false; + } + } + + // Check for specific product/downloads. + if ( 'has_downloads' === $condition_name ) { + if ( ! $this->check_blurb_has_downloads( $condition ) ) { + return false; + } + } + } + } + + return true; + } + +} diff --git a/includes/emails/email-summary/class-edd-email-summary.php b/includes/emails/email-summary/class-edd-email-summary.php new file mode 100644 index 00000000000..fed6be4a2ba --- /dev/null +++ b/includes/emails/email-summary/class-edd-email-summary.php @@ -0,0 +1,418 @@ +test_mode = $test_mode; + $this->email_options = array( + 'email_summary_frequency' => edd_get_option( 'email_summary_frequency', 'weekly' ), + ); + } + + /** + * Get site URL. + * + * @since 3.1 + * + * @return string Host of the site url. + */ + public function get_site_url() { + $site_url = get_site_url(); + $site_url_parsed = wp_parse_url( $site_url ); + $site_url = isset( $site_url_parsed['host'] ) ? $site_url_parsed['host'] : $site_url; + + return $site_url; + } + + /** + * Get email subject. + * + * @since 3.1 + * + * @return string Email subject. + */ + public function get_email_subject() { + /* translators: Site domain name */ + $email_subject = sprintf( __( 'Easy Digital Downloads Summary - %s', 'easy-digital-downloads' ), $this->get_site_url() ); + + if ( $this->test_mode ) { + $email_subject = '[TEST] ' . $email_subject; + } + + return $email_subject; + } + + /** + * Get email recipients. + * + * @since 3.1 + * + * @return array Recipients to receive the email. + */ + public function get_email_recipients() { + $recipients = array(); + + if ( 'admin' === edd_get_option( 'email_summary_recipient', 'admin' ) ) { + $recipients[] = get_option( 'admin_email' ); + } else { + $emails = edd_get_option( 'email_summary_custom_recipients', '' ); + $emails = array_map( 'trim', explode( "\n", $emails ) ); + foreach ( $emails as $email ) { + if ( is_email( $email ) ) { + $recipients[] = $email; + } + } + } + + if ( empty( $recipients ) ) { + edd_debug_log( __( 'Missing email recipients for Email Summary', 'easy-digital-downloads' ), true ); + } + + return apply_filters( 'edd_email_summary_recipients', $recipients ); + } + + /** + * Get report start date. + * + * @since 3.1 + * + * @return EDD\Utils\Date An array of start date and its relative counterpart as the EDD date object set at the UTC equivalent time. + */ + public function get_report_start_date() { + $date = EDD()->utils->date( 'now', edd_get_timezone_id(), false ); + + if ( 'monthly' === $this->email_options['email_summary_frequency'] ) { + $start_date = $date->copy()->subMonth( 1 )->startOfMonth(); + $relative_start_date = $date->copy()->subMonth( 2 )->startOfMonth(); + } else { + $start_date = $date->copy()->subDay( 7 )->startOfDay(); + $relative_start_date = $date->copy()->subDay( 14 )->startOfDay(); + } + + return array( + 'start_date' => $start_date, + 'relative_start_date' => $relative_start_date, + ); + } + + /** + * Get report end date. + * + * @since 3.1 + * + * @return EDD\Utils\Date An array of end date and its relative counterpart as the EDD date object set at the UTC equivalent time. + */ + public function get_report_end_date() { + $date = EDD()->utils->date( 'now', edd_get_timezone_id(), false ); + + if ( 'monthly' === $this->email_options['email_summary_frequency'] ) { + $end_date = $date->copy()->subMonth( 1 )->endOfMonth(); + $relative_end_date = $date->copy()->subMonth( 2 )->endOfMonth(); + } else { + $end_date = $date->copy()->endOfDay(); + $relative_end_date = $date->copy()->subDay( 7 )->endOfDay(); + } + + return array( + 'end_date' => $end_date, + 'relative_end_date' => $relative_end_date, + ); + } + + /** + * Get report date range. + * + * @since 3.1 + * + * @return array Array of start and end date objects in \EDD\Utils\Date[] format. + */ + public function get_report_date_range() { + // @todo - Check if we have to convert this to UTC because of DB? + return array_merge( + $this->get_report_start_date(), + $this->get_report_end_date() + ); + } + /** + * Retrieve ! TEST ! dataset for email content. + * + * @since 3.1 + * + * @return array Data and statistics for the period. + */ + public function get_test_report_dataset() { + $stats = new EDD\Stats(); + $args = array( + 'post_type' => 'download', + 'posts_per_page' => 5, + 'fields' => 'ids', + 'no_found_rows' => true, + ); + + $downloads = new WP_Query( $args ); + $top_selling_products = array(); + + foreach ( $downloads->posts as $post ) { + $download = new EDD_Download( $post ); + + $product = new stdClass(); + $product->object = $download; + $product->total = 100; + + $top_selling_products[] = $product; + } + + $data = array( + 'earnings_gross' => array( + 'value' => 5000, + 'relative_data' => $stats->generate_relative_data( 5000, 4000 ), + ), + 'earnings_net' => array( + 'value' => 4500, + 'relative_data' => $stats->generate_relative_data( 4500, 3500 ), + ), + 'average_order_value' => array( + 'value' => 29, + 'relative_data' => $stats->generate_relative_data( 20, 35 ), + ), + 'new_customers' => array( + 'value' => 25, + 'relative_data' => $stats->generate_relative_data( 25, 20 ), + ), + 'top_selling_products' => $top_selling_products, + 'order_count' => array( 'value' => 172 ), + ); + + return $data; + } + + /** + * Retrieve dataset for email content. + * + * @since 3.1 + * + * @return array Data and statistics for the period. + */ + public function get_report_dataset() { + if ( $this->test_mode ) { + return $this->get_test_report_dataset(); + } + + $date_range = $this->get_report_date_range(); + $start_date = $date_range['start_date']->format( 'Y-m-d H:i:s' ); + $end_date = $date_range['end_date']->format( 'Y-m-d H:i:s' ); + $relative_start_date = $date_range['relative_start_date']->format( 'Y-m-d H:i:s' ); + $relative_end_date = $date_range['relative_end_date']->format( 'Y-m-d H:i:s' ); + $stats = new EDD\Stats( + array( + 'output' => 'array', + 'start' => $start_date, + 'end' => $end_date, + 'relative' => true, + 'relative_start' => $relative_start_date, + 'relative_end' => $relative_end_date, + ) + ); + + $earnings_gross = $stats->get_order_earnings( + array( + 'function' => 'SUM', + 'exclude_taxes' => false, + 'revenue_type' => 'gross', + ) + ); + + $earnings_net = $stats->get_order_earnings( + array( + 'function' => 'SUM', + 'exclude_taxes' => true, + 'revenue_type' => 'net', + ) + ); + + $average_order_value = $stats->get_order_earnings( + array( + 'function' => 'AVG', + 'exclude_taxes' => false, + ) + ); + + $new_customers = $stats->get_customer_count( + array( + 'purchase_count' => true, + ) + ); + + $top_selling_products = $stats->get_most_valuable_order_items( + array( + 'number' => 5, + ) + ); + + $order_count = $stats->get_order_count(); + + return compact( + 'earnings_gross', + 'earnings_net', + 'average_order_value', + 'new_customers', + 'top_selling_products', + 'order_count' + ); + } + + /** + * Generate HTML for relative markup. + * + * @since 3.1 + * + * @param array $relative_data Calculated relative data. + * + * @return string HTML for relative markup. + */ + private function build_relative_markup( $relative_data ) { + $arrow = $relative_data['positive_change'] ? 'icon-arrow-up.png' : 'icon-arrow-down.png'; + $output = __( 'No data to compare', 'easy-digital-downloads' ); + if ( $relative_data['no_change'] ) { + $output = __( 'No Change', 'easy-digital-downloads' ); + } elseif ( $relative_data['comparable'] ) { + $output = $relative_data['formatted_percentage_change'] . '%'; + } + ob_start(); + ?> + + + + + + + get_report_dataset(); + // If there were no sales, do not build an email template. + if ( empty( $dataset['order_count'] ) || 0 === $dataset['order_count'] ) { + return false; + } + + $date_range = $this->get_report_date_range(); + $site_url = get_site_url(); + $view_more_url = edd_get_admin_url( + array( + 'page' => 'edd-reports', + 'range' => ( 'monthly' === $this->email_options['email_summary_frequency'] ) ? 'last_month' : 'last_week', + 'relative_range' => 'previous_period', + ) + ); + $wp_date_format = get_option( 'date_format' ); + $period_name = ( 'monthly' === $this->email_options['email_summary_frequency'] ) ? __( 'month', 'easy-digital-downloads' ) : __( 'week', 'easy-digital-downloads' ); + /* translators: period name (e.g. week) */ + $relative_text = sprintf( __( 'vs previous %s', 'easy-digital-downloads' ), $period_name ); + + ob_start(); + include EDD_PLUGIN_DIR . 'includes/emails/email-summary/edd-email-summary-template.php'; + + return ob_get_clean(); + } + + /** + * Prepare and send email. + * + * @since 3.1 + * + * @return bool True if email was sent, false if there was an error. + */ + public function send_email() { + // Get next blurb. + $email_blurbs = new EDD_Email_Summary_Blurb(); + $next_blurb = false; + + if ( ! $this->test_mode ) { + $next_blurb = $email_blurbs->get_next(); + } + + // Prepare email. + $email_body = $this->build_email_template( $next_blurb ); + // If there is no email body, we cannot continue. + if ( ! $email_body ) { + edd_debug_log( __( 'Email body for Email Summary was empty.', 'easy-digital-downloads' ), true ); + return false; + } + + $email_subject = $this->get_email_subject(); + $email_recipients = $this->get_email_recipients(); + $email_headers = array( 'Content-Type: text/html; charset=UTF-8' ); + + // Everything is ok, send email. + $email_sent = wp_mail( $email_recipients, $email_subject, $email_body, $email_headers ); + if ( $email_sent ) { + $email_blurbs->mark_blurb_sent( $next_blurb ); + } + + return $email_sent; + } +} diff --git a/includes/emails/email-summary/edd-email-summary-template.php b/includes/emails/email-summary/edd-email-summary-template.php new file mode 100644 index 00000000000..fcb06e9c4f4 --- /dev/null +++ b/includes/emails/email-summary/edd-email-summary-template.php @@ -0,0 +1,61 @@ + + + + <?php echo esc_html( $this->get_email_subject() ); ?> + + + + + + + + + + + + + + + + +

    + + + + + + + + + diff --git a/includes/emails/email-summary/template-parts/data-listing.php b/includes/emails/email-summary/template-parts/data-listing.php new file mode 100644 index 00000000000..f4ff195f77b --- /dev/null +++ b/includes/emails/email-summary/template-parts/data-listing.php @@ -0,0 +1,108 @@ + + + + + + + +
    + + + + +
    +

    + # +

    +

    + +

    +

    + +

    +

    + build_relative_markup( $dataset['earnings_gross']['relative_data'] ); ?> + + + +

    +
    +
    + + + + +
    +

    + # +

    +

    + +

    +

    + +

    +

    + build_relative_markup( $dataset['earnings_net']['relative_data'] ); ?> + + + +

    +
    +
    + + + + + + + +
    + + + + +
    +

    + # +

    +

    + +

    +

    + +

    +

    + build_relative_markup( $dataset['new_customers']['relative_data'] ); ?> + + + +

    +
    +
    + + + + +
    +

    + # +

    +

    + +

    +

    + +

    +

    + build_relative_markup( $dataset['average_order_value']['relative_data'] ); ?> + + + +

    +
    +
    diff --git a/includes/emails/email-summary/template-parts/email-styles.php b/includes/emails/email-summary/template-parts/email-styles.php new file mode 100644 index 00000000000..16139ef2ff7 --- /dev/null +++ b/includes/emails/email-summary/template-parts/email-styles.php @@ -0,0 +1,152 @@ + + diff --git a/includes/emails/email-summary/template-parts/fee-info.php b/includes/emails/email-summary/template-parts/fee-info.php new file mode 100644 index 00000000000..bb17cb5ea25 --- /dev/null +++ b/includes/emails/email-summary/template-parts/fee-info.php @@ -0,0 +1,77 @@ +application_fee->has_application_fee(); +$ignore_statuses = array( 'Not Connected', 'Not Supported' ); + +if ( false === $fees_status && in_array( edd_stripe()->application_fee->get_status(), $ignore_statuses, true ) ) { + return; +} + +if ( true === $fees_status && 'USD' !== edd_get_currency() ) { + return; +} + +$stats = new \EDD\Stats(); + +// Get the Stripe revenue so far this year, for the Stripe gateway. +$stripe_revenue = $stats->get_gateway_earnings( + array( + 'range' => 'this_year', + 'gateway' => 'stripe', + 'status' => edd_get_gross_order_statuses(), + 'type' => array( 'sale' ), + ) +); + +$savings = edd_stripe()->application_fee->get_application_fee_amount( $stripe_revenue ); + +if ( true === $fees_status && $savings < 100 ) { + return; +} + +if ( false === $fees_status && empty( $savings ) ) { + return; +} + +?> +
    +

    + +

    +

    + 'email-summaries', + 'utm_content' => 'stripe-fees', + ) + ); + + printf( + /* translators: 1: amount that could have been saved, 2: opening anchor tag, 3: closing anchor tag */ + esc_html__( 'You could have saved %1$s in transaction fees this year by %2$supgrading to an Extended Pass%3$s.', 'easy-digital-downloads' ), + edd_currency_filter( edd_format_amount( $savings ) ), + '', + '' + ); + } else { + printf( + /* translators: 1: opening span tag, 2. the formatted currency amount, 3. the closing span tag */ + esc_html__( 'You have %1$ssaved %2$s in transaction fees%3$s this year with your active license.', 'easy-digital-downloads' ), + '', + edd_currency_filter( edd_format_amount( $savings ) ), + '' + ); + } + ?> +

    +
    + +
    diff --git a/includes/emails/email-summary/template-parts/header.php b/includes/emails/email-summary/template-parts/header.php new file mode 100644 index 00000000000..5bae9d5d47c --- /dev/null +++ b/includes/emails/email-summary/template-parts/header.php @@ -0,0 +1,13 @@ + + diff --git a/includes/emails/email-summary/template-parts/preview-text.php b/includes/emails/email-summary/template-parts/preview-text.php new file mode 100644 index 00000000000..a7c8aa09572 --- /dev/null +++ b/includes/emails/email-summary/template-parts/preview-text.php @@ -0,0 +1,8 @@ + +
    + format( $wp_date_format ) ); ?> - format( $wp_date_format ) ); ?> +
    diff --git a/includes/emails/email-summary/template-parts/pro-tips.php b/includes/emails/email-summary/template-parts/pro-tips.php new file mode 100644 index 00000000000..a3ebd061a1a --- /dev/null +++ b/includes/emails/email-summary/template-parts/pro-tips.php @@ -0,0 +1,41 @@ + + diff --git a/includes/emails/email-summary/template-parts/site-info.php b/includes/emails/email-summary/template-parts/site-info.php new file mode 100644 index 00000000000..10706d2f5db --- /dev/null +++ b/includes/emails/email-summary/template-parts/site-info.php @@ -0,0 +1,42 @@ + +

    + +
    + format( $wp_date_format ) ); ?> - format( $wp_date_format ) ); ?> +
    + + + + + + +
    +

    +
    + + +

    + +

    diff --git a/includes/emails/email-summary/template-parts/top-products.php b/includes/emails/email-summary/template-parts/top-products.php new file mode 100644 index 00000000000..129d148d7b0 --- /dev/null +++ b/includes/emails/email-summary/template-parts/top-products.php @@ -0,0 +1,39 @@ + +
    +
    + # +
    + +
    + +
    + + + + + + + object instanceof \EDD_Download ) { + continue; + } + + $title = $product->object->post_title; + $revenue = edd_currency_filter( edd_format_amount( $product->total ) ); + ?> + + + + + +
    .
    +
    diff --git a/includes/emails/functions.php b/includes/emails/functions.php new file mode 100755 index 00000000000..085f7df7870 --- /dev/null +++ b/includes/emails/functions.php @@ -0,0 +1,235 @@ + 0 ? $emails : get_bloginfo( 'admin_email' ); + $emails = array_map( 'trim', explode( "\n", $emails ) ); + + /** + * Filters the emails for which admin notifications are sent. + * + * @param array $emails The emails to send admin notices to. + * @param null|EDD\Orders\Order $email Optional. The email object. Default: null. Added in 3.2.3. + */ + return apply_filters( 'edd_admin_notice_emails', $emails, $email ); +} + +/** + * Checks whether admin sale notices are disabled + * + * @since 1.5.2 + * + * @param int $payment_id The payment ID + * @return mixed + */ +function edd_admin_notices_disabled( $payment_id = 0 ) { + $email = edd_get_email( 'admin_order_notice' ); + $status = $email && $email->is_enabled(); + + return (bool) apply_filters( 'edd_admin_notices_disabled', empty( $status ), $payment_id ); +} + +/** + * Get an email. + * + * @since 3.3.0 + * + * @param int|string $email_id The email ID. This can also be the email_id because that's really how we identify emails. + * @return \EDD\Emails\Email|false + */ +function edd_get_email( $email_id = 0 ) { + $query = new Query(); + if ( ! is_numeric( $email_id ) ) { + return $query->get_item_by( 'email_id', $email_id ); + } + + return $query->get_item( $email_id ); +} + +/** + * Adds an email to the database. + * + * @since 3.3.0 + * @param array $args The query arguments. + * @return int|false + */ +function edd_add_email( $args = array() ) { + $query = new Query(); + + return $query->add_item( $args ); +} + +/** + * Updates an email in the database. + * + * @since 3.3.0 + * @param int $email_id The email ID. + * @param array $args The query arguments. + * @return bool + */ +function edd_update_email( $email_id = 0, $args = array() ) { + $query = new Query(); + + return $query->update_item( $email_id, $args ); +} + +/** + * Deletes an email from the database. + * + * @since 3.3.0 + * @param int $email_id The email ID. + * @return bool + */ +function edd_delete_email( $email_id = 0 ) { + $query = new Query(); + + return $query->delete_item( $email_id ); +} + +/** + * Gets an email by a field. + * + * @since 3.3.0 + * @param string $field The field to query by. + * @param string $value The value to query by. + * @return \EDD\Emails\Email + */ +function edd_get_email_by( $field = '', $value = '' ) { + $query = new Query(); + + return $query->get_item_by( $field, $value ); +} + +/** + * Gets emails. + * + * @since 3.3.0 + * @param array $args The query arguments. + * @return \EDD\Emails\Email[] + */ +function edd_get_emails( $args = array() ) { + + $r = wp_parse_args( + $args, + array( + 'number' => 300, + ) + ); + $query = new Query(); + + return $query->query( $r ); +} + +/** + * Add meta data field to an email. + * + * @since 3.3.0 + * + * @param int $email_id Order ID. + * @param string $meta_key Meta data name. + * @param mixed $meta_value Meta data value. Must be serializable if non-scalar. + * @param bool $unique Optional. Whether the same key should not be added. Default false. + * + * @return int|false Meta ID on success, false on failure. + */ +function edd_add_email_meta( $email_id, $meta_key, $meta_value, $unique = false ) { + return add_metadata( 'edd_email', $email_id, $meta_key, $meta_value, $unique ); +} + +/** + * Remove meta data matching criteria from an email. + * + * You can match based on the key, or key and value. Removing based on key and value, will keep from removing duplicate + * meta data with the same key. It also allows removing all meta data matching key, if needed. + * + * @since 3.3.0 + * + * @param int $email_id Order ID. + * @param string $meta_key Meta data name. + * @param mixed $meta_value Optional. Meta data value. Must be serializable if non-scalar. Default empty. + * + * @return bool True on success, false on failure. + */ +function edd_delete_email_meta( $email_id, $meta_key, $meta_value = '' ) { + return delete_metadata( 'edd_email', $email_id, $meta_key, $meta_value ); +} + +/** + * Retrieve email meta field for an email. + * + * @since 3.3.0 + * + * @param int $email_id Order ID. + * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys. Default empty. + * @param bool $single Optional, default is false. If true, return only the first value of the specified meta_key. + * This parameter has no effect if meta_key is not specified. + * + * @return mixed Will be an array if $single is false. Will be value of meta data field if $single is true. + */ +function edd_get_email_meta( $email_id, $key = '', $single = false ) { + return get_metadata( 'edd_email', $email_id, $key, $single ); +} + +/** + * Update email meta field based on email ID. + * + * Use the $prev_value parameter to differentiate between meta fields with the + * same key and email ID. + * + * If the meta field for the email does not exist, it will be added. + * + * @since 3.3.0 + * + * @param int $email_id Email ID. + * @param string $meta_key Meta data key. + * @param mixed $meta_value Meta data value. Must be serializable if non-scalar. + * @param mixed $prev_value Optional. Previous value to check before removing. Default empty. + * + * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure. + */ +function edd_update_email_meta( $email_id, $meta_key, $meta_value, $prev_value = '' ) { + return update_metadata( 'edd_email', $email_id, $meta_key, $meta_value, $prev_value ); +} + +/** + * Delete everything from email meta matching meta key. + * + * @since 3.3.0 + * @param string $meta_key Key to search for when deleting. + * @return bool Whether the email meta key was deleted from the database. + */ +function edd_delete_email_meta_by_key( $meta_key ) { + return delete_metadata( 'edd_email', null, $meta_key, '', true ); +} diff --git a/includes/emails/recapture.php b/includes/emails/recapture.php new file mode 100644 index 00000000000..c3881af47bc --- /dev/null +++ b/includes/emails/recapture.php @@ -0,0 +1,150 @@ + __( 'You do not have permission to do this.', 'easy-digital-downloads' ), + ) + ); + } + $nonce = filter_input( INPUT_POST, 'nonce', FILTER_SANITIZE_SPECIAL_CHARS ); + if ( ! $nonce || ! wp_verify_nonce( $nonce, 'edd-recapture-connect' ) ) { + wp_send_json_error( + array( + 'error' => __( 'Nonce verification failed.', 'easy-digital-downloads' ), + ) + ); + } + + include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; + include_once ABSPATH . 'wp-admin/includes/file.php'; + include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + + $plugins = get_plugins(); + + if ( ! array_key_exists( 'recapture-for-edd/recapture.php', $plugins ) ) { + + /** + * Use the WordPress Plugins API to get the plugin download link. + */ + $api = plugins_api( + 'plugin_information', + array( + 'slug' => 'recapture-for-edd', + ) + ); + + if ( is_wp_error( $api ) ) { + wp_send_json_error( + array( + 'error' => $api->get_error_message(), + 'debug' => $api, + ) + ); + } + + /* + * Use the AJAX Upgrader skin to quietly install the plugin. + */ + $upgrader = new Plugin_Upgrader( new WP_Ajax_Upgrader_Skin() ); + $install = $upgrader->install( $api->download_link ); + if ( is_wp_error( $install ) ) { + wp_send_json_error( + array( + 'error' => $install->get_error_message(), + 'debug' => $api, + ) + ); + } + + $activated = activate_plugin( $upgrader->plugin_info() ); + + } else { + + $activated = activate_plugin( 'recapture-for-edd/recapture.php' ); + + } + + /* + * Final check to see if Recapture is available. + */ + if ( is_wp_error( $activated ) ) { + wp_send_json_error( + array( + 'error' => __( 'Something went wrong. Recapture for EDD was not installed correctly.', 'easy-digital-downloads' ), + ) + ); + } + + wp_send_json_success(); +} +add_action( 'wp_ajax_edd_recapture_remote_install', 'edd_recapture_remote_install_handler' ); + +/** + * Maybe adds a notice to abandoned payments if Recapture isn't installed. + * + * @since 2.10.2 + * + * @param int $payment_id The ID of the abandoned payment, for which a Recapture notice is being thrown. + */ +function maybe_add_recapture_notice_to_abandoned_payment( $payment_id ) { + + if ( ! class_exists( 'Recapture' ) + && 'abandoned' === edd_get_payment_status( $payment_id ) + && ! get_user_meta( get_current_user_id(), '_edd_try_recapture_dismissed', true ) + ) { + ?> +
    +

    + tag, 2. tag, 3. tag, 4. tag */ + __( '%1$sRecover abandoned purchases like this one.%2$s %3$sTry Recapture for free%4$s.', 'easy-digital-downloads' ), + '', + '', + '', + '' + ) + ); + ?> +

    + 'dismiss_notices', + 'edd_notice' => 'try_recapture', + ) + ), + 'edd_notice_nonce' + ) + ), + '" type="button" class="notice-dismiss">', + '', + ' + ' + ) + ); + ?> +
    + + + + + + + + context; + $recipient = $email->recipient; + if ( ! $email->get_template()->supports_html() ) { + $content = __( 'This email will be sent as a plain text email and does not support images or HTML markup.', 'easy-digital-downloads' ); + if ( 'text/html' === EDD()->emails->get_content_type() ) { + $content .= ' ' . __( 'This is specific to this email and does not affect other emails.', 'easy-digital-downloads' ); + } + $tooltip = new \EDD\HTML\Tooltip( + array( + 'content' => $content, + 'dashicon' => 'dashicons-warning', + ) + ); + $tooltip->output(); + } + } + } + if ( wp_script_is( 'edd-admin-email-tags' ) ) { + return; + } + // Output Thickbox content. + edd_email_tags_inserter_thickbox_content( $context, $recipient ); + // Enqueue scripts. + edd_email_tags_inserter_enqueue_scripts( $context, $recipient ); +} + +/** + * Enqueue scripts for clicking a tag inside of Thickbox. + * + * @since 3.0 + * @param string $context The context to get tags for. + * @param string $recipient The recipient to get tags for. + */ +function edd_email_tags_inserter_enqueue_scripts( $context = '', $recipient = '' ) { + + wp_enqueue_style( 'edd-admin-email-tags' ); + wp_enqueue_script( 'edd-admin-email-tags' ); + + // Send information about tags to script. + $items = array(); + $tags = edd_get_email_tags( $context, $recipient ); + + foreach ( $tags as $tag ) { + $items[] = array( + 'title' => $tag['label'] ? $tag['label'] : $tag['tag'], + 'tag' => $tag['tag'], + 'keywords' => array_merge( + explode( ' ', $tag['description'] ), + array( $tag['tag'] ) + ), + ); + } + + wp_localize_script( + 'edd-admin-email-tags', + 'eddEmailTagsInserter', + array( + 'items' => $items, + ) + ); +} + +/** + * Output Thickbox content. + * + * @since 3.0 + * @param string $context The context to get tags for. + * @param string $recipient The recipient to get tags for. + */ +function edd_email_tags_inserter_thickbox_content( $context = '', $recipient = '' ) { + $tags = edd_get_email_tags( $context, $recipient ); + ?> + + email_tags->add( $tag, $description, $func, $label, $contexts, $recipients ); +} + +/** + * Remove an email tag + * + * @since 1.9 + * + * @param string $tag Email tag to remove hook from + */ +function edd_remove_email_tag( $tag ) { + EDD()->email_tags->remove( $tag ); +} + +/** + * Check if $tag is a registered email tag + * + * @since 1.9 + * + * @param string $tag Email tag that will be searched. + * @param array $context Context in which the email is being sent. + * @param string $recipient The recipient of the email. + * @return bool + */ +function edd_email_tag_exists( $tag, $context = '', $recipient = '' ) { + return EDD()->email_tags->email_tag_exists( $tag, $context, $recipient ); +} + +/** + * Get all email tags + * + * @since 1.9 + * @param string $context Context in which the email is being sent. + * @param string $recipient The recipient of the email. + * @return array + */ +function edd_get_email_tags( $context = '', $recipient = '' ) { + return EDD()->email_tags->get( $context, $recipient ); +} + +/** + * Get a formatted HTML list of all available email tags. + * + * @since 1.9 + * + * @return string + */ +function edd_get_emails_tags_list() { + + // Begin with empty list. + $list = ''; + + // Get all tags. + $email_tags = (array) edd_get_email_tags(); + + // Check. + if ( count( $email_tags ) > 0 ) { + + // Loop. + foreach ( $email_tags as $email_tag ) { + + // Add email tag to list. + $list .= '{' . $email_tag['tag'] . '} - ' . $email_tag['description'] . '
    '; + } + } + + // Return the list. + return $list; +} + +/** + * Search content for email tags and filter email tags through their hooks. + * + * @since 1.9 + * @since 3.0 Renamed `$payment_id` parameter to `$order_id`. + * Set default value of `$order_id` to 0. + * Set default value of `$content` to empty string. + * + * @param string $content Content to search for email tags. + * @param int $order_id Object ID. + * @param object $email_object This could be an order, a user, license, subscription, etc. + * @param string|\EDD\Emails\Types\Email $context Context in which the email is being sent. This should match the object if provided. + * + * @return string Content with email tags filtered out. + */ +function edd_do_email_tags( $content = '', $order_id = 0, $email_object = null, $context = 'order' ) { + + // Load email tags. + edd_load_email_tags(); + + // Replace all tags. + $content = EDD()->email_tags->do_tags( $content, $order_id, $email_object, $context ); + + if ( 'order' === $context && false !== has_filter( 'edd_email_template_tags' ) ) { + // Maintaining backwards compatibility. + $content = apply_filters( 'edd_email_template_tags', $content, edd_get_payment_meta( $order_id ), $order_id ); + } + + return $content; +} + +/** + * Load email tags. + * + * @since 1.9 + * @since 3.3.4 No longer loads on `init`; called as needed. + */ +function edd_load_email_tags() { + if ( ! did_action( 'edd_add_email_tags' ) ) { + do_action( 'edd_add_email_tags' ); + } +} + +/** + * Add default EDD email template tags. + * + * @since 1.9 + */ +function edd_setup_email_tags() { + $tags = new EDD\Emails\Tags\Registry(); + $tags->register(); +} +add_action( 'edd_add_email_tags', 'edd_setup_email_tags' ); + +/** + * Email template tag: download_list + * A list of download links for each download purchased + * + * @param int $payment_id + * + * @return string download_list + */ +function edd_email_tag_download_list( $payment_id, $order = null ) { + if ( ! $order ) { + $order = edd_get_order( $payment_id ); + } + if ( ! $order ) { + return ''; + } + + $download_list = '
      '; + $needs_notes = array(); + + if ( $order->get_items() ) { + $show_names = apply_filters( 'edd_email_show_names', true ); + $show_links = apply_filters( 'edd_email_show_links', true ); + + foreach ( $order->get_items() as $item ) { + + if ( edd_use_skus() ) { + $sku = edd_get_download_sku( $item->product_id ); + } + + if ( edd_item_quantities_enabled() ) { + $quantity = $item->quantity; + } + + if ( $show_names ) { + + $title = '' . $item->product_name . ''; + + if ( ! empty( $quantity ) && $quantity > 1 ) { + $title .= ' – ' . __( 'Quantity', 'easy-digital-downloads' ) . ': ' . $quantity; + } + + if ( ! empty( $sku ) ) { + $title .= ' – ' . __( 'SKU', 'easy-digital-downloads' ) . ': ' . $sku; + } + + if ( has_filter( 'edd_email_receipt_download_title' ) ) { + $payment = edd_get_payment( $payment_id ); + $cart_items = $payment->cart_details; + $title = apply_filters( + 'edd_email_receipt_download_title', + $title, + $cart_items[ $item->cart_index ], + $item->price_id, + $payment_id + ); + } + $download_list .= '
    • ' . $title . '
      '; + } + + $files = edd_get_download_files( $item->product_id, $item->price_id ); + + if ( ! empty( $files ) ) { + + foreach ( $files as $filekey => $file ) { + + if ( $show_links ) { + $download_list .= '
      '; + $file_url = edd_get_download_file_url( $order, $order->email, $filekey, $item->product_id, $item->price_id ); + $download_list .= '' . edd_get_file_name( $file ) . ''; + $download_list .= '
      '; + } else { + $download_list .= '
      '; + $download_list .= edd_get_file_name( $file ); + $download_list .= '
      '; + } + } + } elseif ( edd_is_bundled_product( $item->product_id ) ) { + + $bundled_products = apply_filters( 'edd_email_tag_bundled_products', edd_get_bundled_products( $item->product_id, $item->price_id ), $item, $payment_id, 'download_list' ); + + foreach ( $bundled_products as $bundle_item ) { + + $download_list .= '
      ' . get_the_title( $bundle_item ) . '
      '; + + $bundle_item_id = edd_get_bundle_item_id( $bundle_item ); + $bundle_item_price_id = edd_get_bundle_item_price_id( $bundle_item ); + $download_files = edd_get_download_files( $bundle_item_id, $bundle_item_price_id ); + + foreach ( $download_files as $filekey => $file ) { + if ( $show_links ) { + $download_list .= '
      '; + $file_url = edd_get_download_file_url( $order, $order->email, $filekey, $bundle_item_id, $bundle_item_price_id ); + $download_list .= '' . edd_get_file_name( $file ) . ''; + $download_list .= '
      '; + } else { + $download_list .= '
      '; + $download_list .= edd_get_file_name( $file ); + $download_list .= '
      '; + } + } + } + } else { + + $no_downloads_message = apply_filters( 'edd_receipt_no_files_found_text', __( 'No downloadable files found.', 'easy-digital-downloads' ), $item->product_id ); + $no_downloads_message = apply_filters( 'edd_email_receipt_no_downloads_message', $no_downloads_message, $item->product_id, $item->price_id, $payment_id ); + + if ( ! empty( $no_downloads_message ) ) { + $download_list .= '
      '; + $download_list .= $no_downloads_message; + $download_list .= '
      '; + } + } + + if ( ! array_key_exists( $item->product_id, $needs_notes ) ) { + $item_notes = edd_get_product_notes( $item->product_id ); + if ( $item_notes ) { + $needs_notes[ $item->product_id ] = array( + 'item_name' => get_the_title( $item->product_id ), + 'item_notes' => $item_notes, + ); + } + } + + if ( $show_names ) { + $download_list .= '
    • '; + } + } + } + $download_list .= '
    '; + + // Remove any empty values. + $needs_notes = array_filter( $needs_notes ); + if ( ! empty( $needs_notes ) ) { + $download_list .= __( 'Additional information about your purchase:', 'easy-digital-downloads' ); + + $download_list .= '
      '; + foreach ( $needs_notes as $note ) { + $download_list .= '
    • ' . $note['item_name'] . "\n" . '' . $note['item_notes'] . '
    • '; + } + $download_list .= '
    '; + } + + return $download_list; +} + +/** + * Email template tag: download_list + * A list of download links for each download purchased in plaintext + * + * @since 2.1.1 + * @param int $payment_id + * + * @return string download_list + */ +function edd_email_tag_download_list_plain( $payment_id ) { + $payment = new EDD_Payment( $payment_id ); + $order = edd_get_order( $payment_id ); + + $payment_data = $payment->get_meta(); + $cart_items = $payment->cart_details; + $download_list = ''; + + if ( $order->get_items() ) { + $show_names = apply_filters( 'edd_email_show_names', true ); + $show_links = apply_filters( 'edd_email_show_links', true ); + + foreach ( $order->get_items() as $item ) { + + if ( edd_use_skus() ) { + $sku = edd_get_download_sku( $item->product_id ); + } + + if ( edd_item_quantities_enabled() ) { + $quantity = $item->quantity; + } + + if ( $show_names ) { + + $title = $item->product_name; + + if ( ! empty( $quantity ) && $quantity > 1 ) { + $title .= __( 'Quantity', 'easy-digital-downloads' ) . ': ' . $quantity; + } + + if ( ! empty( $sku ) ) { + $title .= __( 'SKU', 'easy-digital-downloads' ) . ': ' . $sku; + } + + $download_list .= "\n"; + + $download_list .= apply_filters( 'edd_email_receipt_download_title', $title, $cart_items[ $item->cart_index ], $item->price_id, $payment_id ) . "\n"; + } + + $files = edd_get_download_files( $item->product_id, $item->price_id ); + + if ( ! empty( $files ) ) { + + foreach ( $files as $filekey => $file ) { + if ( $show_links ) { + $download_list .= "\n"; + $file_url = edd_get_download_file_url( $order, $order->email, $filekey, $item->product_id, $item->price_id ); + $download_list .= edd_get_file_name( $file ) . ': ' . $file_url . "\n"; + } else { + $download_list .= "\n"; + $download_list .= edd_get_file_name( $file ) . "\n"; + } + } + } elseif ( edd_is_bundled_product( $item->product_id ) ) { + + $bundled_products = apply_filters( 'edd_email_tag_bundled_products', edd_get_bundled_products( $item->product_id ), $cart_items[ $item->cart_index ], $payment_id, 'download_list' ); + + foreach ( $bundled_products as $bundle_item ) { + + $download_list .= '
    ' . get_the_title( $bundle_item ) . '
    '; + + $files = edd_get_download_files( $bundle_item ); + + foreach ( $files as $filekey => $file ) { + if ( $show_links ) { + $file_url = edd_get_download_file_url( $order, $order->email, $filekey, $bundle_item, $item->price_id ); + $download_list .= edd_get_file_name( $file ) . ': ' . $file_url . "\n"; + } else { + $download_list .= edd_get_file_name( $file ) . "\n"; + } + } + } + } + + if ( '' != edd_get_product_notes( $item->product_id ) ) { + $download_list .= "\n"; + $download_list .= edd_get_product_notes( $item->product_id ) . "\n"; + } + } + } + + return $download_list; +} + +/** + * Email template tag: file_urls + * A plain-text list of download URLs for each download purchased + * + * @param int $payment_id + * + * @return string $file_urls + */ +function edd_email_tag_file_urls( $payment_id ) { + $payment = new EDD_Payment( $payment_id ); + + $payment_data = $payment->get_meta(); + $file_urls = ''; + $cart_items = $payment->cart_details; + $email = $payment->email; + $show_links = apply_filters( 'edd_email_show_links', true ); + + foreach ( $cart_items as $item ) { + + $price_id = edd_get_cart_item_price_id( $item ); + $files = edd_get_download_files( $item['id'], $price_id ); + + if ( $files ) { + foreach ( $files as $filekey => $file ) { + $file_url = $show_links ? edd_get_download_file_url( $payment_data['key'], $email, $filekey, $item['id'], $price_id ) : '#'; + $file_urls .= esc_html( $file_url ) . '
    '; + } + } elseif ( edd_is_bundled_product( $item['id'] ) ) { + + $bundled_products = apply_filters( 'edd_email_tag_bundled_products', edd_get_bundled_products( $item['id'] ), $item, $payment_id, 'file_urls' ); + + foreach ( $bundled_products as $bundle_item ) { + + $files = edd_get_download_files( $bundle_item ); + foreach ( $files as $filekey => $file ) { + $file_url = $show_links ? edd_get_download_file_url( $payment_data['key'], $email, $filekey, $bundle_item, $price_id ) : '#'; + $file_urls .= esc_html( $file_url ) . '
    '; + } + } + } + } + + return $file_urls; +} + +/** + * Email template tag: name + * The buyer's first name + * + * @param int $payment_id + * + * @return string name + */ +function edd_email_tag_first_name( $payment_id, $email_object = null, $context = 'order' ) { + $context = EDD()->email_tags->get_context( $context ); + if ( 'user' === $context ) { + if ( ! $email_object instanceof WP_User ) { + $email_object = new WP_User( $payment_id ); + } + + return ! empty( $email_object->first_name ) ? $email_object->first_name : ''; + } + $payment = new EDD_Payment( $payment_id ); + $user_info = $payment->user_info; + + if ( empty( $user_info ) ) { + return ''; + } + + $email_name = edd_get_email_names( $user_info, $payment ); + + return $email_name['name']; +} + +/** + * Email template tag: fullname + * The buyer's full name, first and last + * + * @param int $payment_id The ID of the object of the email. + * @param null|mixed $email_object The object of the email. + * @param string $context The context of the email. + * + * @return string fullname + */ +function edd_email_tag_fullname( $payment_id, $email_object = null, $context = 'order' ) { + $context = EDD()->email_tags->get_context( $context ); + if ( 'user' === $context ) { + if ( ! $email_object instanceof WP_User ) { + $email_object = new WP_User( $payment_id ); + } + + return ! empty( $email_object->display_name ) ? $email_object->display_name : ''; + } + + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + + $customer = edd_get_customer( $email_object->customer_id ); + + return ! empty( $customer->name ) ? $customer->name : ''; +} + +/** + * Email template tag: username + * The buyer's user name on the site, if they registered an account + * + * @param int $object_id The object ID. This can be an order ID or user ID. + * @param null|mixed $email_object The object of the email. + * @param string $context The context of the email. + * @return string username + */ +function edd_email_tag_username( $object_id, $email_object = null, $context = 'order' ) { + $context = EDD()->email_tags->get_context( $context ); + if ( 'user' === $context ) { + if ( ! $email_object instanceof WP_User ) { + $email_object = new WP_User( $object_id ); + } + + return ! empty( $email_object->user_login ) ? $email_object->user_login : ''; + } + + $payment = new EDD_Payment( $object_id ); + $user_info = $payment->user_info; + + if ( empty( $user_info ) ) { + return ''; + } + + $email_name = edd_get_email_names( $user_info, $payment ); + + return $email_name['username']; +} + +/** + * Email template tag: user_email + * The buyer's email address + * + * @param int $object_id The object ID. This can be an order ID or user ID. + * @param null|mixed $email_object The object of the email. + * @param string $context The context of the email. + * @return string user_email + */ +function edd_email_tag_user_email( $object_id, $email_object = null, $context = 'order' ) { + $context = EDD()->email_tags->get_context( $context ); + if ( ! in_array( $context, array( 'order', 'user' ), true ) ) { + return ''; + } + if ( 'user' === $context ) { + if ( ! $email_object instanceof WP_User ) { + $email_object = new WP_User( $object_id ); + } + + return ! empty( $email_object->user_email ) ? $email_object->user_email : ''; + } + + $order = edd_get_order( $object_id ); + + return $order->email; +} + +/** + * Email template tag: billing_address + * The buyer's billing address + * + * @param int $payment_id + * + * @return string billing_address + */ +function edd_email_tag_billing_address( $payment_id ) { + + $user_info = edd_get_payment_meta_user_info( $payment_id ); + $user_address = ! empty( $user_info['address'] ) ? $user_info['address'] : array( + 'line1' => '', + 'line2' => '', + 'city' => '', + 'country' => '', + 'state' => '', + 'zip' => '', + ); + + $return = $user_address['line1'] . "\n"; + if ( ! empty( $user_address['line2'] ) ) { + $return .= $user_address['line2'] . "\n"; + } + $return .= $user_address['city'] . ' ' . $user_address['zip'] . ' ' . $user_address['state'] . "\n"; + $return .= $user_address['country']; + + return $return; +} + +/** + * Email template tag: date + * Date of purchase + * + * @param int $payment_id The ID of the object of the email. + * @param null|mixed $email_object The object of the email. + * + * @return string date + */ +function edd_email_tag_date( $payment_id, $email_object = null ) { + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + + return date_i18n( get_option( 'date_format' ), strtotime( $email_object->date_created ) ); +} + +/** + * Email template tag: subtotal + * Price of purchase before taxes + * + * @param int $payment_id The ID of the object of the email. + * @param null|mixed $email_object The object of the email. + * + * @return string subtotal + */ +function edd_email_tag_subtotal( $payment_id, $email_object = null ) { + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + $subtotal = edd_currency_filter( edd_format_amount( $email_object->subtotal ), $email_object->currency ); + + return html_entity_decode( $subtotal, ENT_COMPAT, 'UTF-8' ); +} + +/** + * Email template tag: tax + * The taxed amount of the purchase + * + * @param int $payment_id + * + * @return string tax + */ +function edd_email_tag_tax( $payment_id, $email_object = null ) { + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + $tax = edd_currency_filter( edd_format_amount( $email_object->tax ), $email_object->currency ); + + return html_entity_decode( $tax, ENT_COMPAT, 'UTF-8' ); +} + +/** + * Email template tag: price + * The total price of the purchase + * + * @param int $payment_id + * + * @return string price + */ +function edd_email_tag_price( $payment_id, $email_object = null ) { + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + $price = edd_currency_filter( edd_format_amount( $email_object->total ), $email_object->currency ); + + return html_entity_decode( $price, ENT_COMPAT, 'UTF-8' ); +} + +/** + * Email template tag: payment_id + * The unique ID number for this purchase + * + * @param int $payment_id + * + * @return int payment_id + */ +function edd_email_tag_payment_id( $payment_id, $email_object = null ) { + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + + return $email_object->get_number(); +} + +/** + * Email template tag: receipt_id + * The unique ID number for this purchase receipt + * + * @param int $payment_id + * + * @return string receipt_id + */ +function edd_email_tag_receipt_id( $payment_id, $email_object = null ) { + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + + return $email_object->payment_key; +} + +/** + * Email template tag: payment_method + * The method of payment used for this purchase + * + * @param int $payment_id + * + * @return string gateway + */ +function edd_email_tag_payment_method( $payment_id, $email_object = null ) { + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + + return edd_get_gateway_checkout_label( $email_object->gateway ); +} + +/** + * Email template tag: sitename + * Your site name + * + * @param int $payment_id + * + * @return string sitename + */ +function edd_email_tag_sitename( $payment_id ) { + return wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ); +} + +/** + * Email template tag: receipt + * + * Adds a link to the user's receipt page on the website. + * + * @param int $order_id + * @return string + */ +function edd_email_tag_receipt( $order_id ) { + + return sprintf( + '%s', + esc_url( edd_get_receipt_page_uri( $order_id ) ), + __( 'View Receipt', 'easy-digital-downloads' ) + ); +} + +/** + * Email template tag: receipt_link + * Adds a link so users can view their receipt directly on your website if they are unable to view it in the browser correctly + * + * @param $payment_id int + * + * @return string receipt_link + */ +function edd_email_tag_receipt_link( $payment_id ) { + $receipt_url = esc_url( + add_query_arg( + array( + 'payment_key' => urlencode( edd_get_payment_key( $payment_id ) ), + 'edd_action' => 'view_receipt', + ), + home_url() + ) + ); + if ( 'none' === edd_get_option( 'email_template' ) ) { + return $receipt_url; + } + + /* translators: 1: opening anchor tag, 2: closing anchor tag */ + return sprintf( __( '%1$sView it in your browser %2$s', 'easy-digital-downloads' ), '', '»' ); +} + +/** + * Email template tag: discount_codes + * Adds a list of any discount codes applied to this purchase + * + * @since 2.0 + * @param int $payment_id + * @return string $discount_codes + */ +function edd_email_tag_discount_codes( $payment_id ) { + $user_info = edd_get_payment_meta_user_info( $payment_id ); + + $discount_codes = ''; + + if ( isset( $user_info['discount'] ) && $user_info['discount'] !== 'none' ) { + $discount_codes = $user_info['discount']; + } + + return $discount_codes; +} + +/** + * Email template tag: IP address + * IP address of the customer + * + * @since 2.3 + * @param int $email_object_id + * @return string IP address + */ +function edd_email_tag_ip_address( $email_object_id, $email_object = null, $context = 'order' ) { + $context = EDD()->email_tags->get_context( $context ); + if ( 'user' === $context && ! is_null( $email_object ) ) { + return $_SERVER['REMOTE_ADDR']; + } + + if ( ! $email_object instanceof EDD\Orders\Order ) { + $email_object = edd_get_order( $payment_id ); + } + + return $email_object->ip; +} + +/** + * Get various correctly formatted names used in emails + * + * @since 1.9 + * @since 3.2.0 - Moved to the tags.php file, as it is exclusively is used for email tags, even in extensions. + * + * @param $user_info + * @param $payment EDD_Payment for getting the names + * + * @return array $email_names + */ +function edd_get_email_names( $user_info, $payment = false ) { + $email_names = array(); + $email_names['fullname'] = ''; + + if ( $payment instanceof EDD_Payment ) { + + $email_names['name'] = $payment->email; + $email_names['username'] = $payment->email; + if ( $payment->user_id > 0 ) { + + $user_data = get_userdata( $payment->user_id ); + $email_names['name'] = $payment->first_name; + $email_names['fullname'] = trim( $payment->first_name . ' ' . $payment->last_name ); + if ( ! empty( $user_data->user_login ) ) { + $email_names['username'] = $user_data->user_login; + } + } elseif ( ! empty( $payment->first_name ) ) { + + $email_names['name'] = $payment->first_name; + $email_names['fullname'] = trim( $payment->first_name . ' ' . $payment->last_name ); + $email_names['username'] = $payment->first_name; + + } + } else { + + if ( is_serialized( $user_info ) ) { + + preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $user_info, $matches ); + if ( ! empty( $matches ) ) { + return array( + 'name' => '', + 'fullname' => '', + 'username' => '', + ); + } else { + $user_info = maybe_unserialize( $user_info ); + } + } + + if ( isset( $user_info['id'] ) && $user_info['id'] > 0 && isset( $user_info['first_name'] ) ) { + $user_data = get_userdata( $user_info['id'] ); + $email_names['name'] = $user_info['first_name']; + $email_names['fullname'] = $user_info['first_name'] . ' ' . $user_info['last_name']; + $email_names['username'] = $user_data->user_login; + } elseif ( isset( $user_info['first_name'] ) ) { + $email_names['name'] = $user_info['first_name']; + $email_names['fullname'] = $user_info['first_name'] . ' ' . $user_info['last_name']; + $email_names['username'] = $user_info['first_name']; + } else { + $email_names['name'] = $user_info['email']; + $email_names['username'] = $user_info['email']; + } + } + + return $email_names; +} diff --git a/includes/emails/template.php b/includes/emails/template.php new file mode 100755 index 00000000000..7cc404f1ac3 --- /dev/null +++ b/includes/emails/template.php @@ -0,0 +1,174 @@ +get_templates() + * + * @since 1.0.8.2 + * @return array $templates All the registered email templates + */ +function edd_get_email_templates() { + $templates = new EDD_Emails(); + return $templates->get_templates(); +} + +/** + * Email Template Tags + * + * @since 1.0 + * + * @param string $message Message with the template tags + * @param array $payment_data Payment Data + * @param int $payment_id Payment ID + * @param bool $admin_notice Whether or not this is a notification email + * + * @return string $message Fully formatted message + */ +function edd_email_template_tags( $message, $payment_data, $payment_id, $admin_notice = false ) { + return edd_do_email_tags( $message, $payment_id ); +} + +/** + * Email Preview Template Tags + * + * @todo Currently this has a hardcoded set of tags for replacement, and doesn't include + * all tags registered, when we udpate the tag registration we should update to allow adding a 'sample' data + * for each tag. + * + * @since 1.0 + * @since 3.2.0 - Added $wpautop parameter. + * @param string $message Email message with template tags + * @param bool $disable_wpautop If we should fully disable wpautop for this content. + * + * @return string $message Fully formatted message + */ +function edd_email_preview_template_tags( $message, $disable_wpautop = false, $order_id = 0 ) { + + $notes = __( 'These are some sample notes added to a product.', 'easy-digital-downloads' ); + $message = str_replace( '{product_notes}', $notes, $message ); + + if ( empty( $order_id ) ) { + $order_numbers = new EDD\Orders\Number(); + $order_number = $order_numbers->format( wp_rand( 100, 987 ) ); + $price = edd_currency_filter( edd_format_amount( 10.50 ) ); + $gateway = edd_get_gateway_admin_label( edd_get_default_gateway() ); + $receipt_id = strtolower( md5( uniqid() ) ); + $tax = edd_currency_filter( edd_format_amount( 1.00 ) ); + $sub_total = edd_currency_filter( edd_format_amount( 9.50 ) ); + $message = str_replace( '{date}', edd_date_i18n( current_time( 'timestamp' ) ), $message ); + $message = str_replace( '{subtotal}', $sub_total, $message ); + $message = str_replace( '{tax}', $tax, $message ); + $message = str_replace( '{price}', $price, $message ); + $message = str_replace( '{receipt_id}', $receipt_id, $message ); + $message = str_replace( '{payment_method}', $gateway, $message ); + $message = str_replace( '{sitename}', get_bloginfo( 'name' ), $message ); + $message = str_replace( '{payment_id}', $order_number, $message ); + $message = str_replace( '{receipt_link}', edd_email_tag_receipt_link( 0 ), $message ); + $message = str_replace( '{receipt}', edd_email_tag_receipt( 0 ), $message ); + } + + $user = wp_get_current_user(); + $message = str_replace( '{name}', $user->display_name, $message ); + $message = str_replace( '{fullname}', $user->display_name, $message ); + $message = str_replace( '{username}', $user->user_login, $message ); + + $message = apply_filters( 'edd_email_preview_template_tags', $message ); + + $wpautop = $disable_wpautop ? false : apply_filters( 'edd_email_preview_template_wpautop', true ); + + return $wpautop ? wpautop( $message ) : $message; +} + +/** + * Render Receipt in the Browser + * + * A link is added to the Purchase Receipt to view the email in the browser and + * this function renders the Purchase Receipt in the browser. It overrides the + * Purchase Receipt template and provides its only styling. + * + * @since 1.5 + * @author Sunny Ratilal + * @param array $data The request data. + */ +function edd_render_receipt_in_browser( $data ) { + if ( ! isset( $data['payment_key'] ) ) { + wp_die( __( 'Missing purchase key.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ) ); + } + + if ( ! empty( $_POST['edd_action'] ) && ! empty( $_POST['edd_user_login'] ) && ! empty( $_POST['edd_login_nonce'] ) ) { + return; + } + + $key = urlencode( $data['payment_key'] ); + + ob_start(); + + // Disallows caching of the page + header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); + header( 'Cache-Control: no-store, no-cache, must-revalidate' ); // HTTP/1.1 + header( 'Cache-Control: post-check=0, pre-check=0', false ); + header( 'Pragma: no-cache' ); // HTTP/1.0 + header( 'Expires: Sat, 23 Oct 1977 05:00:00 PST' ); // Date in the past + ?> + + + + <?php esc_html_e( 'Receipt', 'easy-digital-downloads' ); ?> + + + + + + +
    + + + +
    + + + + '; - // Loop error codes and display errors - foreach($errors as $error_id => $error){ - echo '

    ' . __('Error', 'edd') . ': ' . $error . '

    '; - } - echo ''; + $errors = edd_get_errors(); + $successes = EDD()->session->get( 'edd_success_errors' ); + if ( $errors || $successes ) { + + echo edd_build_errors_html( $errors ); + echo edd_build_successes_html( $successes ); + edd_clear_errors(); } } -add_action('edd_payment_mode_bottom', 'edd_print_errors'); -add_action('edd_before_purchase_form', 'edd_print_errors'); -add_action('edd_before_checkout_register_form', 'edd_print_errors'); +add_action( 'edd_purchase_form_before_submit', 'edd_print_errors' ); +add_action( 'edd_ajax_checkout_errors', 'edd_print_errors' ); +add_action( 'edd_print_errors', 'edd_print_errors' ); + +/** + * Formats error messages and returns an HTML string. + * + * @param array $errors + * + * @since 2.11 + * @return string + */ +function edd_build_errors_html( $errors ) { + $error_html = ''; + + $classes = apply_filters( 'edd_error_class', array( + 'edd_errors', 'edd-alert', 'edd-alert-error' + ) ); + + if ( ! empty( $errors ) && is_array( $errors ) ) { + $error_html .= '
    '; + // Loop error codes and display errors + foreach ( $errors as $error_id => $error ) { + $error_html .= '

    ' . __( 'Error', 'easy-digital-downloads' ) . ': ' . $error . '

    '; + + } + $error_html .= '
    '; + } + + return $error_html; +} +/** + * Builds the HTML output for the sucess messages. + * + * @since 3.1 + * @param array $successes + * @return string + */ +function edd_build_successes_html( $successes ) { + if ( empty( $successes ) || ! is_array( $successes ) ) { + return ''; + } + + $html = '
    '; + foreach ( $successes as $id => $message ) { + $html .= '

    '; + $html .= '' . esc_html__( 'Success', 'easy-digital-downloads' ) . ': '; + $html .= $message; + $html .= '

    '; + } + $html .= '
    '; + + return $html; +} /** * Get Errors @@ -44,52 +96,113 @@ function edd_print_errors() { * Retrieves all error messages stored during the checkout process. * If errors exist, they are returned. * - * @access public - * @since 1.0 - * @return mixed - array if errors are present, false if none found -*/ - + * @since 1.0 + * @uses EDD\Sessions\Handler::get() + * @return mixed array if errors are present, false if none found + */ function edd_get_errors() { - if(isset($_SESSION['edd-errors'])) { - $errors = $_SESSION['edd-errors']; - return $errors; - } - return false; + $errors = EDD()->session->get( 'edd_errors' ); + $errors = apply_filters( 'edd_errors', $errors ); + return $errors; } - /** * Set Error * * Stores an error in a session var. * - * @access public - * @since 1.0 - * @param $error_id string - the ID of the error being set - * @param $error_message - the message to store with the error - * @return void -*/ - -function edd_set_error($error_id, $error_message) { + * @since 1.0 + * @uses EDD\Sessions\Handler::get() + * @param int $error_id ID of the error being set + * @param string $error_message Message to store with the error + * @return void + */ +function edd_set_error( $error_id, $error_message ) { $errors = edd_get_errors(); - if(!$errors) { + if ( ! $errors ) { $errors = array(); } - $errors[$error_id] = $error_message; - $_SESSION['edd-errors'] = $errors; + $errors[ $error_id ] = $error_message; + EDD()->session->set( 'edd_errors', $errors ); } - /** - * Clear Errors + * Stores an array of success messages in a session variable. * + * @since 3.1 + * @uses EDD\Sessions\Handler::set() + * @param string $error_id + * @param string $error_message + * @return void + */ +function edd_set_success( $error_id, $error_message ) { + $successes = EDD()->session->get( 'edd_success_errors' ); + if ( ! $successes ) { + $successes = array(); + } + $successes[ $error_id ] = $error_message; + + EDD()->session->set( 'edd_success_errors', $successes ); +} + +/** * Clears all stored errors. * - * @access public - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @uses EDD\Sessions\Handler::set() + * @return void + */ function edd_clear_errors() { - if(isset($_SESSION['edd-errors'])) $_SESSION['edd-errors'] = null; -} \ No newline at end of file + EDD()->session->set( 'edd_errors', null ); + EDD()->session->set( 'edd_success_errors', null ); +} + +/** + * Removes (unsets) a stored error + * + * @since 1.3.4 + * @uses EDD\Sessions\Handler::set() + * @param int $error_id ID of the error being set + * @return string + */ +function edd_unset_error( $error_id ) { + $errors = edd_get_errors(); + + if ( $errors && isset( $errors[ $error_id ] ) ) { + unset( $errors[ $error_id ] ); + EDD()->session->set( 'edd_errors', $errors ); + } +} + +/** + * Register die handler for edd_die() + * + * @author Sunny Ratilal + * @since 1.6 + * + * @return void + */ +function _edd_die_handler() { + die(); +} + +/** + * Wrapper function for wp_die(). + * + * This function adds filters for wp_die() which kills execution of the script + * using wp_die(). This allows us to then to work with functions using edd_die() + * in the unit tests. + * + * @author Sunny Ratilal + * @since 1.6 + * @return void + */ +function edd_die( $message = '', $title = '', $status = 400 ) { + if ( ! defined( 'EDD_UNIT_TESTS' ) ) { + add_filter( 'wp_die_ajax_handler', '_edd_die_handler', 10, 3 ); + add_filter( 'wp_die_handler' , '_edd_die_handler', 10, 3 ); + add_filter( 'wp_die_json_handler', '_edd_die_handler', 10, 3 ); + } + + wp_die( $message, $title, array( 'response' => $status ) ); +} diff --git a/includes/extensions/licensing-functions.php b/includes/extensions/licensing-functions.php new file mode 100644 index 00000000000..db7eb54f173 --- /dev/null +++ b/includes/extensions/licensing-functions.php @@ -0,0 +1,114 @@ + strtotime( '+1 day' ), + 'products' => get_licensed_products(), + ) ), false ); + } +}, 200 ); + +/** + * Returns licensed EDD extensions that are active on this site. + * Array values are the `$item_shortname` from `\EDD_License` + * + * @see \EDD_License::$item_shortname + * + * @since 2.11.4 + * @return array + */ +function get_licensed_extension_slugs() { + $products = get_option( 'edd_licensed_extensions' ); + + /* + * If this isn't set for some reason, fall back to trying the global. There are + * probably a very limited number of cases where the option would be empty when + * the global is not, but worth a shot. + */ + if ( empty( $products ) ) { + return get_licensed_products(); + } + + $products = json_decode( $products, true ); + + return isset( $products['products'] ) && is_array( $products['products'] ) + ? $products['products'] + : array(); +} + +/** + * Triggers our hook for registering extensions. + * This needs to run after all plugins have definitely been loaded. + * + * @since 2.11.4 + */ +add_action( 'plugins_loaded', function() { + /** + * Extensions should hook in here to register themselves. + * + * @since 2.11.4 + * + * @param ExtensionRegistry + */ + do_action( 'edd_extension_license_init', EDD()->extensionRegistry ); +}, PHP_INT_MAX ); + +/** + * Helper function to get the actually licensed products from the global. + * In 3.1.1.2, all products using the licensing class add their slug to the global, + * but we are now tracking unlicensed products as well as licensed ones. + * + * @return void + */ +function get_licensed_products() { + $products = array(); + global $edd_licensed_products; + if ( empty( $edd_licensed_products ) || ! is_array( $edd_licensed_products ) ) { + return $products; + } + foreach ( $edd_licensed_products as $slug => $is_licensed ) { + if ( $is_licensed ) { + $products[] = $slug; + } + } + + return $products; +} diff --git a/includes/formatting.php b/includes/formatting.php old mode 100644 new mode 100755 index c286f3d59d0..6ebb77a14d5 --- a/includes/formatting.php +++ b/includes/formatting.php @@ -2,118 +2,356 @@ /** * Formatting functions for taking care of proper number formats and such * - * @package Easy Digital Downloads - * @subpackage Formatting functions - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Functions/Formatting + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 1.2 */ +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /** - * Sanitize Amount + * Sanitize a numeric value. * - * Returns a sanitized amount by stripping out thousands separators. + * Use this function to "unformat" a previously formatted numeric value. * - * @access public - * @since 1.0 - * @param $amount string the price amount to format - * @return string - the newly sanitize amount -*/ + * (Most commonly, this is when accepting input from a form field where the + * value is likely to derived from the site or user preferences.) + * + * @since 1.0 + * + * @param mixed $amount Default 0. Numeric amount to sanitize. + * + * @return string $amount Newly sanitized amount. + */ +function edd_sanitize_amount( $amount = 0 ) { + + // Get separators + $decimal_sep = edd_get_option( 'decimal_separator', '.' ); + $thousands_sep = edd_get_option( 'thousands_separator', ',' ); -function edd_sanitize_amount( $amount ) { + // Look for separators in amount + $found_decimal = strpos( $amount, $decimal_sep ); + $found_thousands = strpos( $amount, $thousands_sep ); - global $edd_options; - $thousands_sep = isset($edd_options['thousands_separator']) ? $edd_options['thousands_separator'] : ','; - $decimal_sep = isset($edd_options['decimal_separator']) ? $edd_options['decimal_separator'] : '.'; + // Amount contains comma as decimal separator + if ( ( $decimal_sep === ',' ) && ( false !== $found_decimal ) ) { - // sanitize the amount - if( $thousands_sep == '.' && false !== ( $found = strpos( $amount, $thousands_sep ) ) ) { + // Amount contains period or space as thousands separator + if ( in_array( $thousands_sep, array( '.', ' ' ), true ) && ( false !== $found_thousands ) ) { + $amount = str_replace( $thousands_sep, '', $amount ); + + // Amount contains period + } elseif ( empty( $thousands_sep ) && ( false !== strpos( $amount, '.' ) ) ) { + $amount = str_replace( '.', '', $amount ); + } + + $amount = str_replace( $decimal_sep, '.', $amount ); + + // Amount contains comma as thousands separator + } elseif ( ( $thousands_sep === ',' ) && ( false !== $found_thousands ) ) { $amount = str_replace( $thousands_sep, '', $amount ); } - if( $decimal_sep == ',' && false !== ( $found = strpos( $amount, $decimal_sep ) ) ) { - $amount = str_replace( $decimal_sep, '.', $amount ); + + // Remove anything that's not a number, period, or negative sign. + $amount = preg_replace( '/[^0-9\.\-]/', '', $amount ); + + // Check if negative. + $negative_exponent = ( $amount < 0 ) + ? -1 + : 1; + + // Cast the amount to an absolute value. + $amount = '' === $amount ? 0 : abs( (float) $amount ); + + /** + * Filter number of decimals to use for sanitized amount + * + * @since unknown + * + * @param int $number Default 2. Number of decimals. + * @param int|string $amount Amount being sanitized. + */ + $decimals = apply_filters( 'edd_sanitize_amount_decimals', 2, $amount ); + + // Flip back to negative + $sanitized = $amount * $negative_exponent; + + // Format amount using decimals and a period for the decimal separator + // (no thousands separator; also rounds up or down) + $sanitized = number_format( (float) $sanitized, $decimals, '.', '' ); + + /** + * Filter the sanitized amount before returning + * + * @since unknown + * + * @param mixed $sanitized Sanitized amount. + * @param mixed $amount Original amount. + * @param int $decimals Default 2. Number of decimals. + * @param string $decimal_sep Default '.'. Decimal separator. + * @param string $thousands_sep Default ','. Thousands separator. + */ + return apply_filters( 'edd_sanitize_amount', $sanitized, $amount, $decimals, $decimal_sep, $thousands_sep ); +} + +/** + * Format a numeric value. + * + * Uses the decimal & thousands separator settings, and the number of decimals, + * to format any numeric value. + * + * (Most commonly, this is used to apply site or user preferences to a numeric + * value for output to the page.) + * + * @since 1.0 + * @since 3.0 Added `$currency` parameter. + * + * @param mixed $amount Default 0. Numeric amount to format. + * @param string $decimals Default true. Whether or not to use decimals. Useful when set to false for non-currency numbers. + * @param string $currency Currency code to format the amount for. This determines how many decimals are used. + * If omitted, site-wide currency is used. + * @param string $context Defines the context in which we are formatting the data (formatted), for display or for data useage like API (typed). + * + * @return string $amount Newly formatted amount or Price Not Available + */ +function edd_format_amount( $amount = 0, $decimals = true, $currency = '', $context = 'display' ) { + if ( empty( $currency ) ) { + $currency = edd_get_currency(); + } + + $formatter = new \EDD\Currency\Money_Formatter( $amount, new \EDD\Currency\Currency( $currency ) ); + + switch ( $context ) { + case 'typed': + $return_value = $formatter->format_for_typed( $decimals )->typed_amount; + break; + case 'display': + default: + $return_value = $formatter->format_for_display( $decimals )->amount; + break; } - return apply_filters( 'edd_sanitize_amount', $amount ); + return $return_value; } +/** + * Formats the currency display + * + * @since 1.0 + * + * @param string $price Price. This should already be formatted. + * @param string $currency Currency code. When this function is used on an order's amount, the order's currency + * should always be provided here. If omitted, the store currency is used instead. + * But to ensure immutability with orders, the currency should always be explicitly provided + * if known and tied to an existing order. + * + * @return string $currency Currencies displayed correctly + */ +function edd_currency_filter( $price = '', $currency = '' ) { + + // Fallback to default currency. + if ( empty( $currency ) ) { + $currency = edd_get_currency(); + } + + $currency = new \EDD\Currency\Currency( esc_html( $currency ) ); + if ( '' === $price ) { + return $currency->symbol; + } + + $formatter = new \EDD\Currency\Money_Formatter( $price, $currency ); + + return $formatter->apply_symbol(); +} /** - * Format Amount + * Set the number of decimal places per currency + * + * @since 1.4.2 + * @since 3.0 Updated to allow currency to be passed in. * - * Returns a nicely formatted amount. + * @param int $decimals Number of decimal places. + * @param string $currency Currency. * - * @access public - * @since 1.0 - * @param $amount string the price amount to format - * @return string - the newly formatted amount + * @return int $decimals Number of decimal places for currency. */ +function edd_currency_decimal_filter( $decimals = 2, $currency = '' ) { + $currency = empty( $currency ) + ? edd_get_currency() + : $currency; -function edd_format_amount($amount) { - global $edd_options; - $thousands_sep = isset($edd_options['thousands_separator']) ? $edd_options['thousands_separator'] : ','; - $decimal_sep = isset($edd_options['decimal_separator']) ? $edd_options['decimal_separator'] : '.'; + switch ( $currency ) { + case 'RIAL' : + case 'JPY' : + case 'TWD' : + case 'HUF' : + $decimals = 0; + break; + } + return apply_filters( 'edd_currency_decimal_count', $decimals, $currency ); +} +add_filter( 'edd_sanitize_amount_decimals', 'edd_currency_decimal_filter' ); +add_filter( 'edd_format_amount_decimals', 'edd_currency_decimal_filter', 10, 2 ); - // format the amount - if( $decimal_sep == ',' && false !== ( $found = strpos( $amount, $decimal_sep ) ) ) { - $whole = substr( $amount, 0, $sep_found ); - $part = substr( $amount, $sep_found + 1, ( strlen( $amount ) - 1 ) ); - $amount = $whole . '.' . $part; - } - return number_format( $amount, 2, $decimal_sep, $thousands_sep ); +/** + * Sanitizes a string key for EDD Settings + * + * Keys are used as internal identifiers. Alphanumeric characters, dashes, + * underscores, stops, colons and slashes are allowed. + * + * This differs from `sanitize_key()` in that it allows uppercase letters, + * stops, colons, and slashes. + * + * @since 2.5.8 + * @param string $key String key + * @return string Sanitized key + */ +function edd_sanitize_key( $key = '' ) { + $raw_key = $key; + $key = preg_replace( '/[^a-zA-Z0-9_\-\.\:\/]/', '', $key ); + + /** + * Filter a sanitized key string. + * + * @since 2.5.8 + * @param string $key Sanitized key. + * @param string $raw_key The key prior to sanitization. + */ + return apply_filters( 'edd_sanitize_key', $key, $raw_key ); } +/** + * Never let a numeric value be less than zero. + * + * Adapted from bbPress. + * + * @since 3.0 + * + * @param int $number Default 0. + * @return int. + */ +function edd_number_not_negative( $number = 0 ) { + + // Protect against formatted strings + if ( is_string( $number ) ) { + $number = strip_tags( $number ); // No HTML + $number = preg_replace( '/[^0-9-]/', '', $number ); // No number-format + // Protect against objects, arrays, scalars, etc... + } elseif ( ! is_numeric( $number ) ) { + $number = 0; + } + + // Make the number an integer + $casted_number = is_float( $number ) + ? floatval( $number ) + : intval( $number ); + + $max_value = is_float( $number ) + ? 0.00 + : 0; + // Pick the maximum value, never less than zero + $not_less_than_zero = max( $max_value, $casted_number ); + + // Filter & return + return (int) apply_filters( 'edd_number_not_negative', $not_less_than_zero, $casted_number, $number ); +} /** - * Formats the currency display + * Return array of allowed HTML tags. * - * @access public - * @since 1.0 - * @return array -*/ + * Used with wp_kses() to filter unsafe HTML out of settings and notes. + * + * @since 3.0 + * + * @return array + */ +function edd_get_allowed_tags() { + return (array) apply_filters( 'edd_allowed_html_tags', array( + 'p' => array( + 'class' => array(), + 'id' => array(), + ), + 'span' => array( + 'class' => array(), + 'id' => array(), + ), + 'a' => array( + 'href' => array(), + 'target' => array(), + 'title' => array(), + 'class' => array(), + 'id' => array(), + ), + 'code' => array(), + 'strong' => array(), + 'em' => array(), + 'br' => array(), + 'img' => array( + 'src' => array(), + 'title' => array(), + 'alt' => array(), + 'id' => array(), + ), + 'div' => array( + 'class' => array(), + 'id' => array(), + ), + 'ul' => array( + 'class' => array(), + 'id' => array(), + ), + 'ol' => array( + 'class' => array(), + 'id' => array(), + ), + 'li' => array( + 'class' => array(), + 'id' => array(), + ), + 'blockquote' => array( + 'class' => array(), + 'id' => array(), + ), + ) ); +} -function edd_currency_filter( $price ) { - global $edd_options; - $currency = isset($edd_options['currency']) ? $edd_options['currency'] : 'USD'; - $position = isset($edd_options['currency_position']) ? $edd_options['currency_position'] : 'before'; - if($position == 'before') : - switch ($currency) : - case "GBP" : return '£' . $price; break; - case "USD" : - case "AUD" : - case "BRL" : - case "CAD" : - case "HKD" : - case "MXN" : - case "SGD" : - return '$' . $price; - break; - case "JPY" : return '¥' . $price; break; - default : - $formatted = $currency . ' ' . $price; - return apply_filters('edd_' . strtolower($currency) . '_currency_filter_before', $formatted, $currency, $price); - break; - endswitch; - else : - switch ($currency) : - case "GBP" : return $price . '£'; break; - case "USD" : - case "AUD" : - case "BRL" : - case "CAD" : - case "HKD" : - case "MXN" : - case "SGD" : - return $price . '$'; - break; - case "JPY" : return $price . '¥'; break; - default : - $formatted = $price . ' ' . $currency; - return apply_filters('edd_' . strtolower($currency) . '_currency_filter_after', $formatted, $currency, $price); - break; - endswitch; - endif; -} \ No newline at end of file +/** + * Return a translatable and display ready string for an address type. + * + * @since 3.0 + * @param string $address_type The type of address to get the display label for. + * + * @return string The translatable string for the display type, in lowercase. + */ +function edd_get_address_type_label( $address_type = 'billing' ) { + + // Core default address types and their labels. + $address_type_labels = array( + 'billing' => __( 'Billing', 'easy-digital-downloads' ), + ); + + /** + * Physical address type labels. + * + * A key/value array of billing types found in the 'type' column of the customer address table, and their translatable + * strings for output. + * + * @since 3.0 + * @param array $address_type_labels + * Array of the address type labels, in key/value form. The key should match the database entry for the + * wp_edd_customer_addresses table in the 'type' column. The value of each array entry should be a translatable + * string for output in the UI. + */ + $address_type_labels = apply_filters( 'edd_address_type_labels', $address_type_labels ); + + // Fallback to just applying an upper case to any words not in the filter. + return array_key_exists( $address_type, $address_type_labels ) ? + $address_type_labels[ $address_type ] : + $address_type; + +} diff --git a/includes/gateway-functions.php b/includes/gateway-functions.php deleted file mode 100755 index d4dd92f4545..00000000000 --- a/includes/gateway-functions.php +++ /dev/null @@ -1,126 +0,0 @@ - array('admin_label' => 'PayPal', 'checkout_label' => 'PayPal'), - 'manual' => array('admin_label' => __('Test Payment', 'edd'), 'checkout_label' => __('Test Payment', 'edd')), - ); - - return apply_filters('edd_payment_gateways', $gateways); - -} - - -/** - * Get Enabled Payment Gateways - * - * Returns a list of all enabled gateways. - * - * @access public - * @since 1.0 - * @return array -*/ - -function edd_get_enabled_payment_gateways() { - global $edd_options; - $gateways = edd_get_payment_gateways(); - $enabled_gateways = isset( $edd_options['gateways'] ) ? $edd_options['gateways'] : ''; - $gateway_list = array(); - foreach($gateways as $key => $gateway) : - if(isset($enabled_gateways[$key]) && $enabled_gateways[$key] == 1) : - $gateway_list[$key] = $gateway; - endif; - endforeach; - return $gateway_list; -} - - -/** - * Is Gateway Active - * - * Checks whether a specified gateway is activated. - * - * @access public - * @since 1.0 - * @param string - The ID name of the gateway to check for - * @return boolean - true if enabled, false otherwise -*/ - -function edd_is_gateway_active($gateway) { - $gateways = edd_get_enabled_payment_gateways(); - if(array_key_exists($gateway, $gateways)) { - return true; - } - return false; -} - - -/** - * Get gateway admin label - * - * Returns the admin label for the specified gateway. - * - * @access public - * @since 1.0.8.3 - * @param string - The ID name of the gateway to retrieve a label for - * @return string -*/ - -function edd_get_gateway_admin_label($gateway) { - $gateways = edd_get_enabled_payment_gateways(); - return isset( $gateways[$gateway] ) ? $gateways[$gateway]['admin_label'] : $gateway; -} - - -/** - * Get gateway checkout label - * - * Returns the checkout label for the specified gateway. - * - * @access public - * @since 1.0.8.5 - * @param string - The ID name of the gateway to retrieve a label for - * @return string -*/ - -function edd_get_gateway_checkout_label($gateway) { - $gateways = edd_get_enabled_payment_gateways(); - return isset( $gateways[$gateway] ) ? $gateways[$gateway]['checkout_label'] : $gateway; -} - -/** - * Send to Gateway - * - * Sends the registration data to the specified gateway. - * - * @access public - * @since 1.0 - * @return void -*/ - -function edd_send_to_gateway($gateway, $payment_data) { - // $gateway must match the ID used when registering the gateway - do_action('edd_gateway_' . $gateway, $payment_data); -} \ No newline at end of file diff --git a/includes/gateways/actions.php b/includes/gateways/actions.php new file mode 100755 index 00000000000..59d1c6a209a --- /dev/null +++ b/includes/gateways/actions.php @@ -0,0 +1,80 @@ + 0 ) { + remove_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' ); + remove_action( 'edd_cc_form', 'edd_get_cc_form' ); + if ( current_user_can( 'manage_shop_settings' ) ) { + $error_message = __( 'You must enable a payment gateway to use Easy Digital Downloads.', 'easy-digital-downloads' ); + } else { + $error_message = __( 'Your order cannot be completed at this time. Please try again or contact site support.', 'easy-digital-downloads' ); + } + edd_set_error( 'no_gateways', $error_message ); + } else { + edd_unset_error( 'no_gateways' ); + } +} +add_action( 'edd_before_checkout_cart', 'edd_no_gateway_error', 5 ); diff --git a/includes/gateways/amazon-payments.php b/includes/gateways/amazon-payments.php new file mode 100644 index 00000000000..12910bb648c --- /dev/null +++ b/includes/gateways/amazon-payments.php @@ -0,0 +1,1215 @@ +reference_id = ! empty( $_REQUEST['amazon_reference_id'] ) + ? sanitize_text_field( $_REQUEST['amazon_reference_id'] ) + : ''; + + // Run this separate so we can ditch as early as possible + $this->register(); + + if ( ! edd_is_gateway_active( $this->gateway_id ) ) { + return; + } + + $this->config(); + $this->includes(); + $this->setup_client(); + $this->filters(); + $this->actions(); + } + + /** + * Retrieve current instance + * + * @access private + * @since 2.4 + * @return EDD_Amazon_Payments instance + */ + public static function getInstance() { + if ( ! isset( self::$instance ) && ! ( self::$instance instanceof EDD_Amazon_Payments ) ) { + self::$instance = new EDD_Amazon_Payments; + } + + return self::$instance; + } + + /** + * Register the payment gateway + * + * @access private + * @since 2.4 + * @return void + */ + private function register() { + add_filter( 'edd_payment_gateways', array( $this, 'register_gateway' ), 1, 1 ); + if ( is_admin() ) { + add_filter( 'edd_settings_sections_gateways', array( $this, 'register_gateway_section' ), 1, 1 ); + add_filter( 'edd_settings_gateways', array( $this, 'register_gateway_settings' ), 1, 1 ); + add_action( 'admin_notices', array( $this, 'amazon_payments_notice' ) ); + add_filter( 'edd_payment_details_transaction_id-' . $this->gateway_id, array( $this, 'link_transaction_id' ), 10, 2 ); + } + } + + /** + * Adds an admin notice to switch to Stripe. + * This notice is only shown if the user has Amazon Payments enabled. + * + * @todo Update words, especially if Stripe is already active. + * @since 3.2.0 + * @return void + */ + public function amazon_payments_notice() { + if ( ! edd_is_gateway_active( $this->gateway_id ) ) { + return; + } + $stripe_url = edd_get_admin_url( + array( + 'page' => 'edd-settings', + 'tab' => 'gateways', + 'section' => 'edd-stripe', + ) + ); + $benefits_url = edd_link_helper( + 'https://easydigitaldownloads.com/edd-stripe-integration', + array( + 'utm_medium' => 'admin-notice', + 'utm_content' => 'amazon-deprecated-notice', + ), + false + ); + EDD()->notices->add_notice( + array( + 'id' => 'amazon-gateway-notice', + 'class' => 'error', + 'message' => sprintf( + /* translators: %1$s Opening anchor tag, %2$s Closing anchor tag, %3$s Opening anchor tag */ + __( 'Amazon Payments for Easy Digital Downloads has been deprecated and will be removed in a future version. To continue to accept credit card payments in the future, please %1$senable Stripe now%2$s or %3$slearn more about the benefits of using Stripe%2$s.', 'easy-digital-downloads' ), + '', + '', + '', + ), + 'is_dismissible' => false, + ) + ); + } + + /** + * Setup constant configuration for file paths + * + * @access private + * @since 2.4 + * @return void + */ + private function config() { + if ( ! defined( 'EDD_AMAZON_CLASS_DIR' ) ) { + $path = trailingslashit( plugin_dir_path( EDD_PLUGIN_FILE ) ) . 'includes/gateways/libs/amazon'; + define( 'EDD_AMAZON_CLASS_DIR', trailingslashit( $path ) ); + } + } + + /** + * Method to check if all the required settings have been filled out, allowing us to not output information without it. + * + * @since 2.7 + * @return bool + */ + public function is_setup() { + if ( ! is_null( $this->is_setup ) ) { + return $this->is_setup; + } + + $this->is_setup = edd_is_gateway_setup( 'amazon' ); + + return $this->is_setup; + } + + /** + * Load additional files + * + * @access private + * @since 2.4 + * @return void + */ + private function includes() { + require_once EDD_AMAZON_CLASS_DIR . 'Client.php'; // Requires the other files itself + require_once EDD_AMAZON_CLASS_DIR . 'IpnHandler.php'; + } + + /** + * Add filters + * + * @since 2.4 + * @return void + */ + private function filters() { + + add_filter( 'edd_accepted_payment_icons', array( $this, 'register_payment_icon' ), 10, 1 ); + add_filter( 'edd_show_gateways', array( $this, 'maybe_hide_gateway_select' ) ); + + // Since the Amazon Gateway loads scripts on page, it needs the scripts to load in the header. + add_filter( 'edd_load_scripts_in_footer', '__return_false' ); + } + + /** + * Add actions + * + * @access private + * @since 2.4 + * @return void + */ + private function actions() { + add_action( 'wp_enqueue_scripts', array( $this, 'print_client' ), 10 ); + add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ), 11 ); + add_action( 'edd_pre_process_purchase', array( $this, 'check_config' ), 1 ); + add_action( 'init', array( $this, 'capture_oauth' ), 9 ); + add_action( 'init', array( $this, 'signin_redirect' ) ); + add_action( 'edd_purchase_form_before_register_login', array( $this, 'login_form' ) ); + add_action( 'edd_checkout_error_check', array( $this, 'checkout_errors' ), 10, 2 ); + add_action( 'edd_gateway_amazon', array( $this, 'process_purchase' ) ); + add_action( 'wp_ajax_edd_amazon_get_address', array( $this, 'ajax_get_address' ) ); + add_action( 'wp_ajax_nopriv_edd_amazon_get_address', array( $this, 'ajax_get_address' ) ); + add_action( 'edd_pre_process_purchase', array( $this, 'disable_address_requirement' ), 99999 ); + add_action( 'init', array( $this, 'process_ipn' ) ); + + if ( empty( $this->reference_id ) ) { + return; + } + + add_action( 'edd_amazon_cc_form', array( $this, 'wallet_form' ) ); + } + + /** + * Show an error message on checkout if Amazon is enabled but not setup. + * + * @since 2.7 + */ + public function check_config() { + $is_enabled = edd_is_gateway_active( $this->gateway_id ); + if ( ( ! $is_enabled || false === $this->is_setup() ) && 'amazon' == edd_get_chosen_gateway() ) { + edd_set_error( 'amazon_gateway_not_configured', __( 'There is an error with the Amazon Payments configuration.', 'easy-digital-downloads' ) ); + } + } + + /** + * Retrieve the client object + * + * @access private + * @since 2.4 + * @return PayWithAmazon\Client + */ + private function get_client() { + + if ( ! $this->is_setup() ) { + return false; + } + + if ( ! is_null( $this->client ) ) { + return $this->client; + } + + $this->setup_client(); + + return $this->client; + } + + /** + * Setup the client object + * + * @access private + * @since 2.4 + * @return void + */ + private function setup_client() { + + if ( ! $this->is_setup() ) { + return; + } + + $region = edd_get_shop_country(); + + if ( 'GB' === $region ) { + $region = 'UK'; + } + + $config = array( + 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ), + 'client_id' => edd_get_option( 'amazon_client_id', '' ), + 'access_key' => edd_get_option( 'amazon_mws_access_key', '' ), + 'secret_key' => edd_get_option( 'amazon_mws_secret_key', '' ), + 'region' => $region, + 'sandbox' => edd_is_test_mode(), + ); + + $config = apply_filters( 'edd_amazon_client_config', $config ); + + $this->client = new Client( $config ); + } + + /** + * Register the gateway + * + * @since 2.4 + * @param $gateways array + * @return array + */ + public function register_gateway( $gateways ) { + + $default_amazon_info = array( + $this->gateway_id => array( + 'admin_label' => __( 'Amazon', 'easy-digital-downloads' ), + 'checkout_label' => __( 'Amazon', 'easy-digital-downloads' ), + 'supports' => array(), + 'icons' => array( 'amazon' ), + ), + ); + + $default_amazon_info = apply_filters( 'edd_register_amazon_gateway', $default_amazon_info ); + $gateways = array_merge( $gateways, $default_amazon_info ); + + return $gateways; + } + + /** + * Register the payment icon + * + * @since 2.4 + * @param array $payment_icons Array of payment icons + * @return array The array of icons with Amazon Added + */ + public function register_payment_icon( $payment_icons ) { + $payment_icons['amazon'] = 'Amazon'; + + return $payment_icons; + } + + /** + * Hides payment gateway select options after return from Amazon + * + * @since 2.7.6 + * @param bool $show Should gateway select be shown + * @return bool + */ + public function maybe_hide_gateway_select( $show ) { + + if ( ! empty( $_REQUEST['payment-mode'] ) && 'amazon' == $_REQUEST['payment-mode'] && ! empty( $_REQUEST['amazon_reference_id'] ) && ! empty( $_REQUEST['state'] ) && 'authorized' == $_REQUEST['state'] ) { + $show = false; + } + + return $show; + } + + /** + * Register the payment gateways setting section + * + * @since 2.5 + * @param array $gateway_sections Array of sections for the gateways tab + * @return array Added Amazon Payments into sub-sections + */ + public function register_gateway_section( $gateway_sections ) { + $gateway_sections['amazon'] = __( 'Amazon Payments', 'easy-digital-downloads' ); + + return $gateway_sections; + } + + /** + * Register the gateway settings + * + * @since 2.4 + * @param $gateway_settings array + * @return array + */ + public function register_gateway_settings( $gateway_settings ) { + $default_amazon_settings = array( + 'amazon_register' => array( + 'id' => 'amazon_register', + 'name' => __( 'Register with Amazon', 'easy-digital-downloads' ), + 'desc' => '

    ' . + __( 'Connect Easy Digital Downloads to Amazon', 'easy-digital-downloads' ) . + '

    ' . + '

    ' . + __( 'Once registration is complete, enter your API credentials below.', 'easy-digital-downloads' ) . + '

    ', + 'type' => 'descriptive_text', + ), + 'amazon_seller_id' => array( + 'id' => 'amazon_seller_id', + 'name' => __( 'Seller ID', 'easy-digital-downloads' ), + 'desc' => __( 'Found in the Integration settings. Also called a Merchant ID', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'amazon_mws_access_key' => array( + 'id' => 'amazon_mws_access_key', + 'name' => __( 'MWS Access Key', 'easy-digital-downloads' ), + 'desc' => __( 'Found on Seller Central in the MWS Keys section', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'amazon_mws_secret_key' => array( + 'id' => 'amazon_mws_secret_key', + 'name' => __( 'MWS Secret Key', 'easy-digital-downloads' ), + 'desc' => __( 'Found on Seller Central in the MWS Keys section', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'amazon_client_id' => array( + 'id' => 'amazon_client_id', + 'name' => __( 'Client ID', 'easy-digital-downloads' ), + 'desc' => __( 'The Amazon Client ID. Should look like `amzn1.application-oa2...`', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'amazon_mws_callback_url' => array( + 'id' => 'amazon_callback_url', + 'name' => __( 'Amazon MWS Callback URL', 'easy-digital-downloads' ), + 'desc' => __( 'The Return URL to provide in your MWS Application. Enter this under your Login and Pay → Web Settings', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'large', + 'std' => $this->get_amazon_authenticate_redirect(), + 'faux' => true, + ), + 'amazon_mws_ipn_url' => array( + 'id' => 'amazon_ipn_url', + 'name' => __( 'Amazon Merchant IPN URL', 'easy-digital-downloads' ), + /* translators: %s: Integration Settings URL */ + 'desc' => sprintf( __( 'The IPN URL to provide in your MWS account. Enter this under your Integration Settings', 'easy-digital-downloads' ), 'https://sellercentral.amazon.com/gp/pyop/seller/account/settings/user-settings-edit.html' ), + 'type' => 'text', + 'size' => 'large', + 'std' => $this->get_amazon_ipn_url(), + 'faux' => true, + ), + ); + + $default_amazon_settings = apply_filters( 'edd_default_amazon_settings', $default_amazon_settings ); + $gateway_settings['amazon'] = $default_amazon_settings; + + return $gateway_settings; + } + + /** + * Load javascript files and localized variables + * + * @since 2.4 + * @return void + */ + public function load_scripts() { + + if ( ! $this->is_setup() ) { + return; + } + + if ( ! edd_is_checkout() ) { + return; + } + + $test_mode = edd_is_test_mode(); + $seller_id = edd_get_option( 'amazon_seller_id', '' ); + $client_id = edd_get_option( 'amazon_client_id', '' ); + + $default_amazon_scope = array( + 'profile', + 'postal_code', + 'payments:widget', + ); + + if ( edd_use_taxes() ) { + $default_amazon_scope[] = 'payments:shipping_address'; + } + + $default_amazon_button_settings = array( + 'type' => 'PwA', + 'color' => 'Gold', + 'size' => 'medium', + 'scope' => implode( ' ', $default_amazon_scope ), + 'popup' => true, + ); + + $amazon_button_settings = apply_filters( 'edd_amazon_button_settings', $default_amazon_button_settings ); + $base_url = ''; + $sandbox = $test_mode ? 'sandbox/' : ''; + + switch ( edd_get_shop_country() ) { + case 'GB': + $base_url = 'https://static-eu.payments-amazon.com/OffAmazonPayments/uk/' . $sandbox . 'lpa/'; + break; + case 'DE': + $base_url = 'https://static-eu.payments-amazon.com/OffAmazonPayments/de/' . $sandbox. 'lpa/'; + break; + default: + $base_url = 'https://static-na.payments-amazon.com/OffAmazonPayments/us/' . $sandbox; + break; + } + + if ( ! empty( $base_url ) ) { + $url = $base_url . 'js/Widgets.js?sellerId=' . $seller_id; + + wp_enqueue_script( 'edd-amazon-widgets', $url, array( 'jquery' ), null, false ); + wp_localize_script( 'edd-amazon-widgets', 'edd_amazon', apply_filters( 'edd_amazon_checkout_vars', array( + 'sellerId' => $seller_id, + 'clientId' => $client_id, + 'referenceID' => $this->reference_id, + 'buttonType' => $amazon_button_settings['type'], + 'buttonColor' => $amazon_button_settings['color'], + 'buttonSize' => $amazon_button_settings['size'], + 'scope' => $amazon_button_settings['scope'], + 'popup' => $amazon_button_settings['popup'], + 'checkoutUri' => $this->get_amazon_checkout_uri(), + 'redirectUri' => $this->get_amazon_authenticate_redirect(), + 'signinUri' => $this->get_amazon_signin_redirect(), + ) ) ); + } + } + + /** + * Print client ID in header + * + * @since 2.4 + * @return void + */ + public function print_client() { + + if ( ! $this->is_setup() ) { + return false; + } + + if ( ! edd_is_checkout() ) { + return; + } + ?> + + client->getUserInfo( $_GET['access_token'] ); + + EDD()->session->set( 'amazon_access_token', $_GET['access_token'] ); + EDD()->session->set( 'amazon_profile', $profile ); + } catch( Exception $e ) { + wp_die( print_r( $e, true ) ); + } + } + + /** + * Set customer details after authentication + * + * @since 2.4 + * @return void + */ + public function signin_redirect() { + + if ( ! isset( $_GET['edd-listener'] ) || $_GET['edd-listener'] !== 'amazon' ) { + return; + } + + if ( ! isset( $_GET['state'] ) || $_GET['state'] !== 'signed-in' ) { + return; + } + + $profile = EDD()->session->get( 'amazon_profile' ); + $reference = $_GET['amazon_reference_id']; + + if ( ! is_user_logged_in() ) { + $user = get_user_by( 'email', $profile['email'] ); + + if ( $user ) { + edd_log_user_in( $user->ID, $user->user_login, '' ); + + $customer = array( + 'first_name' => $user->first_name, + 'last_name' => $user->last_name, + 'email' => $user->user_email + ); + + } else { + $names = explode( ' ', $profile['name'], 2 ); + + $customer = array( + 'first_name' => $names[0], + 'last_name' => isset( $names[1] ) ? $names[1] : '', + 'email' => $profile['email'] + ); + + // Create a customer account if registration is not disabled + if ( 'none' !== edd_get_option( 'show_register_form' ) ) { + $args = array( + 'user_email' => $profile['email'], + 'user_login' => $profile['email'], + 'display_name' => $profile['name'], + 'first_name' => $customer['first_name'], + 'last_name' => $customer['last_name'], + 'user_pass' => wp_generate_password( 20 ), + ); + + $user_id = wp_insert_user( $args ); + + edd_log_user_in( $user_id, $args['user_login'], $args['user_pass'] ); + } + } + + EDD()->session->set( 'customer', $customer ); + } + + edd_redirect( edd_get_checkout_uri( array( 'payment-mode' => 'amazon', 'state' => 'authorized', 'amazon_reference_id' => urlencode( $reference ) ) ) ); + } + + /** + * Display the log in button + * + * @since 2.4 + * @return void + */ + public function login_form() { + + if ( ! $this->is_setup() ) { + return false; + } + + if ( empty( $this->reference_id ) && 'amazon' == edd_get_chosen_gateway() ) : + + remove_all_actions( 'edd_purchase_form_after_cc_form' ); + remove_all_actions( 'edd_purchase_form_after_user_info' ); + remove_all_actions( 'edd_purchase_form_register_fields' ); + remove_all_actions( 'edd_purchase_form_login_fields' ); + remove_all_actions( 'edd_register_fields_before' ); + remove_all_actions( 'edd_cc_form' ); + remove_all_actions( 'edd_checkout_form_top' ); + + ob_start(); ?> +
    + +
    + + +
    + + is_setup() ) { + return false; + } + + $profile = EDD()->session->get( 'amazon_profile' ); + remove_action( 'edd_purchase_form_after_cc_form', 'edd_checkout_tax_fields', 999 ); + ob_start(); ?> + +
    +

    + : + () +

    + +
    + +
    + + +
    + + + + + + + +
    +
    + + is_setup() ) { + return false; + } + + if ( empty( $_POST['reference_id'] ) ) { + die( '-2' ); + } + + $request = $this->client->getOrderReferenceDetails( array( + 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ), + 'amazon_order_reference_id' => $_POST['reference_id'], + 'address_consent_token' => EDD()->session->get( 'amazon_access_token' ) + ) ); + + $address = array(); + $data = new ResponseParser( $request->response ); + $data = $data->toArray(); + + if ( isset( $data['GetOrderReferenceDetailsResult']['OrderReferenceDetails']['Destination']['PhysicalDestination'] ) ) { + + $address = $data['GetOrderReferenceDetailsResult']['OrderReferenceDetails']['Destination']['PhysicalDestination']; + $address = wp_parse_args( $address, array( 'City', 'CountryCode', 'StateOrRegion', 'PostalCode', 'AddressLine1', 'AddressLine2' ) ); + + } + + echo json_encode( $address ); exit; + } + + /** + * Check for errors during checkout + * + * @since 2.4 + * @param $valid_data Customer / product data from checkout + * @param $post_data $_POST + * @return void + */ + public function checkout_errors( $valid_data, $post_data ) { + + // should validate that we have a reference ID here, perhaps even fire the API call here + if ( empty( $post_data['edd_amazon_reference_id'] ) ) { + edd_set_error( 'missing_reference_id', __( 'Missing Reference ID, please try again.', 'easy-digital-downloads' ) ); + } + } + + /** + * Process the purchase and create the charge in Amazon + * + * @since 2.4 + * @param $purchase_data array Cart details + * @return void + */ + public function process_purchase( $purchase_data ) { + + if ( empty( $purchase_data['post_data']['edd_amazon_reference_id'] ) ) { + edd_set_error( 'missing_reference_id', __( 'Missing Reference ID, please try again.', 'easy-digital-downloads' ) ); + } + + $errors = edd_get_errors(); + if ( ! empty( $errors ) ) { + edd_send_back_to_checkout( '?payment-mode=amazon' ); + } + + $args = apply_filters( 'edd_amazon_charge_args', array( + 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ), + 'amazon_reference_id' => $purchase_data['post_data']['edd_amazon_reference_id'], + 'authorization_reference_id' => $purchase_data['purchase_key'], + 'charge_amount' => $purchase_data['price'], + 'currency_code' => edd_get_currency(), + 'charge_note' => html_entity_decode( edd_get_purchase_summary( $purchase_data, false ) ), + 'charge_order_id' => $purchase_data['purchase_key'], + 'store_name' => remove_accents( wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ), + 'transaction_timeout' => 0 + ), $purchase_data ); + + $args['platform_id'] = 'A3JST9YM1SX7LB'; + + $charge = $this->client->charge( $args ); + + if ( 200 == $charge->response['Status'] ) { + $charge = new ResponseParser( $charge->response ); + $charge = $charge->toArray(); + + $status = $charge['AuthorizeResult']['AuthorizationDetails']['AuthorizationStatus']['State']; + + if ( 'Declined' === $status ) { + + $reason = $charge['AuthorizeResult']['AuthorizationDetails']['AuthorizationStatus']['ReasonCode']; + /* translators: %s: Payment Failure Reason (dynamic, provided by the gateway) */ + edd_set_error( 'payment_declined', sprintf( __( 'Your payment could not be authorized, please try a different payment method. Reason: %s', 'easy-digital-downloads' ), $reason ) ); + edd_send_back_to_checkout( '?payment-mode=amazon&amazon_reference_id=' . $purchase_data['post_data']['edd_amazon_reference_id'] ); + } + + // Setup payment data to be recorded + $payment_data = array( + 'price' => $purchase_data['price'], + 'date' => $purchase_data['date'], + 'user_email' => $purchase_data['user_email'], + 'purchase_key' => $purchase_data['purchase_key'], + 'currency' => edd_get_currency(), + 'downloads' => $purchase_data['downloads'], + 'user_info' => $purchase_data['user_info'], + 'cart_details' => $purchase_data['cart_details'], + 'gateway' => $this->gateway_id, + 'status' => 'pending', + ); + + $payment_id = edd_insert_payment( $payment_data ); + + $authorization_id = $charge['AuthorizeResult']['AuthorizationDetails']['AmazonAuthorizationId']; + $capture_id = str_replace( '-A', '-C', $authorization_id ); + $reference_id = sanitize_text_field( $_POST['edd_amazon_reference_id'] ); + + // Confirm the capture was completed + $capture = $this->client->getCaptureDetails( array( + 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ), + 'amazon_capture_id' => $capture_id + ) ); + + $capture = new ResponseParser( $capture->response ); + $capture = $capture->toArray(); + + edd_update_payment_meta( $payment_id, '_edd_amazon_authorization_id', $authorization_id ); + edd_update_payment_meta( $payment_id, '_edd_amazon_capture_id', $capture_id ); + + edd_set_payment_transaction_id( $payment_id, $reference_id, $purchase_data['price'] ); + + edd_update_payment_status( $payment_id, 'complete' ); + + // Empty the shopping cart + edd_empty_cart(); + edd_send_to_success_page(); + + // Set an error + } else { + /* translators: %s: Amazon Error (dynamic, provided by the gateway) */ + edd_set_error( 'amazon_error',sprintf( __( 'There was an issue processing your payment. Amazon error: %s', 'easy-digital-downloads' ), print_r( $charge, true ) ) ); + edd_send_back_to_checkout( '?payment-mode=amazon&amazon_reference_id=' . $purchase_data['post_data']['edd_amazon_reference_id'] ); + } + } + + /** + * Retrieve the checkout URL for Amazon after authentication is complete + * + * @since 2.4 + * @return string + */ + private function get_amazon_checkout_uri() { + if ( is_null( $this->checkout_uri ) ) { + $this->checkout_uri = esc_url_raw( add_query_arg( array( 'payment-mode' => 'amazon' ), edd_get_checkout_uri() ) ); + } + + return $this->checkout_uri; + } + + /** + * Retrieve the return URL for Amazon after authentication on Amazon is complete + * + * @since 2.4 + * @return string + */ + private function get_amazon_authenticate_redirect() { + if ( is_null( $this->redirect_uri ) ) { + $this->redirect_uri = esc_url_raw( add_query_arg( array( 'edd-listener' => 'amazon', 'state' => 'return_auth' ), edd_get_checkout_uri() ) ); + } + + return $this->redirect_uri; + } + + /** + * Retrieve the URL to send customers too once sign-in is complete + * + * @since 2.4 + * @return string + */ + private function get_amazon_signin_redirect() { + if ( is_null( $this->signin_redirect ) ) { + $this->signin_redirect = esc_url_raw( add_query_arg( array( 'edd-listener' => 'amazon', 'state' => 'signed-in' ), home_url() ) ); + } + + return $this->signin_redirect; + } + + /** + * Retrieve the IPN URL for Amazon + * + * @since 2.4 + * @return string + */ + private function get_amazon_ipn_url() { + return esc_url_raw( add_query_arg( array( 'edd-listener' => 'amazon' ), home_url( 'index.php' ) ) ); + } + + /** + * Removes the requirement for entering the billing address + * + * Address is pulled directly from Amazon + * + * @since 2.4 + * @return void + */ + public function disable_address_requirement() { + if ( ! empty( $_POST['edd-gateway'] ) && $this->gateway_id == $_REQUEST['edd-gateway'] ) { + add_filter( 'edd_require_billing_address', '__return_false', 9999 ); + } + } + + /** + * Given a transaction ID, generate a link to the Amazon transaction ID details + * + * @since 2.4 + * @param string $transaction_id The Transaction ID + * @param int $payment_id The payment ID for this transaction + * @return string A link to the PayPal transaction details + */ + public function link_transaction_id( $transaction_id, $payment_id ) { + $base_url = 'https://sellercentral.amazon.com/hz/me/pmd/payment-details?orderReferenceId='; + $transaction_url = '' . esc_html( $transaction_id ) . ''; + + return apply_filters( 'edd_' . $this->gateway_id . '_link_payment_details_transaction_id', $transaction_url ); + } + + /** + * Process IPN messages from Amazon + * + * @since 2.4 + * @return void + */ + public function process_ipn() { + + if ( ! isset( $_GET['edd-listener'] ) || $_GET['edd-listener'] !== 'amazon' ) { + return; + } + + if ( isset( $_GET['state'] ) ) { + return; + } + + // Get the IPN headers and Message body + $headers = getallheaders(); + $body = file_get_contents( 'php://input' ); + + $this->doing_ipn = true; + + try { + $ipn = new IpnHandler( $headers, $body ); + $data = $ipn->toArray(); + $seller_id = $data['SellerId']; + + if ( $seller_id != edd_get_option( 'amazon_seller_id', '' ) ) { + wp_die( + __( 'Invalid Amazon seller ID', 'easy-digital-downloads' ), + __( 'IPN Error', 'easy-digital-downloads' ), + array( 'response' => 401 ) + ); + } + + switch( $data['NotificationType'] ) { + case 'OrderReferenceNotification' : + break; + + case 'PaymentAuthorize' : + break; + + case 'PaymentCapture' : + $key = $data['CaptureDetails']['CaptureReferenceId']; + $status = $data['CaptureDetails']['CaptureStatus']['State']; + + if ( 'Declined' === $status ) { + $payment_id = edd_get_purchase_id_by_key( $key ); + + edd_update_payment_status( $payment_id, 'failed' ); + + edd_insert_payment_note( $payment_id, __( 'Capture declined in Amazon', 'easy-digital-downloads' ) ); + } + + break; + + case 'PaymentRefund' : + $trans_id = substr( $data['RefundDetails']['AmazonRefundId'], 0, 19 ); + $status = $data['RefundDetails']['RefundStatus']['State']; + + if ( 'Completed' === $status ) { + $payment_id = edd_get_purchase_id_by_transaction_id( $trans_id ); + + edd_update_payment_status( $payment_id, 'refunded' ); + + /* translators: %s: Amazon Refund ID */ + edd_insert_payment_note( $payment_id, sprintf( __( 'Refund completed in Amazon. Refund ID: %s', 'easy-digital-downloads' ), $data['RefundDetails']['AmazonRefundId'] ) ); + } + + break; + } + } catch ( Exception $e ) { + wp_die( + $e->getErrorMessage(), + __( 'IPN Error', 'easy-digital-downloads' ), + array( 'response' => 401 ) + ); + } + } + + /** + * Detect a refund action from EDD + * + * @deprecated 3.0 Due to issues with Amazon, refunds must be processed at the gateway. + * @since 2.4 + * @param $payment_id int The ID number of the payment being refunded + * @param $new_status string The new status assigned to the payment + * @param $old_status string The previous status of the payment + * @return void + */ + public function process_refund( $payment_id, $new_status, $old_status ) { + _edd_deprecated_function( __METHOD__, '3.0' ); + + if ( 'complete' !== $old_status && 'revoked' !== $old_status ) { + return; + } + + if ( 'refunded' !== $new_status ) { + return; + } + + if ( ! empty( $this->doing_ipn ) ) { + return; + } + + if ( 'amazon' !== edd_get_payment_gateway( $payment_id ) ) { + return; + } + + $this->refund( $payment_id ); + + } + + /** + * Refund a charge in Amazon + * + * @since 2.4 + * @param $payment_id int The ID number of the payment being refunded + * @return string + */ + private function refund( $payment_id = 0 ) { + + $refund = $this->client->refund( array( + 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ), + 'amazon_capture_id' => edd_get_payment_meta( $payment_id, '_edd_amazon_capture_id', true ), + 'refund_reference_id' => md5( edd_get_payment_key( $payment_id ) . '-refund' ), + 'refund_amount' => edd_get_payment_amount( $payment_id ), + 'currency_code' => edd_get_payment_currency_code( $payment_id ), + ) ); + + if ( 200 == $refund->response['Status'] ) { + $refund = new ResponseParser( $refund->response ); + $refund = $refund->toArray(); + + $reference_id = $refund['RefundResult']['RefundDetails']['RefundReferenceId']; + $status = $refund['RefundResult']['RefundDetails']['RefundStatus']['State']; + + switch( $status ) { + case 'Declined' : + /* translators: %s: Amazon Refund ID */ + $note = __( 'Refund declined in Amazon. Refund ID: %s', 'easy-digital-downloads' ); + break; + + case 'Completed' : + $refund_id = $refund['RefundResult']['RefundDetails']['AmazonRefundId']; + /* translators: %s: Amazon Refund ID */ + $note = sprintf( __( 'Refund completed in Amazon. Refund ID: %s', 'easy-digital-downloads' ), $refund_id ); + break; + + case 'Pending' : + /* translators: %s: Amazon Refund ID */ + $note = sprintf( __( 'Refund initiated in Amazon. Reference ID: %s', 'easy-digital-downloads' ), $reference_id ); + break; + } + edd_insert_payment_note( $payment_id, $note ); + + } else { + edd_insert_payment_note( $payment_id, __( 'Refund request failed in Amazon.', 'easy-digital-downloads' ) ); + } + } + + /** + * Retrieve the URL for connecting Amazon account to EDD + * + * @since 2.4 + * @since 2.9.8 - Updated registration URL per Amazon Reps + * @return string + */ + private function get_registration_url() { + + switch ( edd_get_shop_country() ) { + case 'GB': + $base_url = 'https://payments.amazon.co.uk/preregistration/lpa'; + break; + case 'DE': + $base_url = 'https://payments.amazon.de/preregistration/lpa'; + break; + default: + $base_url = 'https://sellercentral.amazon.com/hz/me/sp/signup'; + break; + } + + $query_args = array( + 'registration_source' => 'SPPD', + 'spId' => 'A3JST9YM1SX7LB', + ); + + return add_query_arg( $query_args, $base_url ); + } +} diff --git a/includes/gateways/functions.php b/includes/gateways/functions.php new file mode 100755 index 00000000000..65115c901b0 --- /dev/null +++ b/includes/gateways/functions.php @@ -0,0 +1,673 @@ + array( + 'admin_label' => __( 'Live', 'easy-digital-downloads' ), + ), + 'test' => array( + 'admin_label' => __( 'Test', 'easy-digital-downloads' ), + ), + ); + } + + return (array) apply_filters( 'edd_payment_modes', $modes ); +} + +/** + * Returns a list of all available gateways. + * + * @since 1.0 + * + * @return array $gateways All the available gateways. + */ +function edd_get_payment_gateways() { + static $gateways = null; + + // Default, built-in gateways + if ( is_null( $gateways ) ) { + $gateways = array( + 'paypal_commerce' => array( + 'admin_label' => __( 'PayPal', 'easy-digital-downloads' ), + 'checkout_label' => __( 'PayPal', 'easy-digital-downloads' ), + 'supports' => array( + 'buy_now', + ), + 'icons' => array( + 'paypal', + ), + ), + /** + * PayPal Standard is available only if it was used prior to 2.11 and the store owner hasn't + * yet been onboarded to PayPal Commerce. + * + * @see \EDD\Gateways\PayPal\maybe_remove_paypal_standard() + */ + 'paypal' => array( + 'admin_label' => __( 'PayPal Standard', 'easy-digital-downloads' ), + 'checkout_label' => __( 'PayPal', 'easy-digital-downloads' ), + 'supports' => array( + 'buy_now', + ), + 'icons' => array( + 'paypal', + ), + ), + 'manual' => array( + 'admin_label' => __( 'Store Gateway', 'easy-digital-downloads' ), + 'checkout_label' => __( 'Store Gateway', 'easy-digital-downloads' ), + ), + ); + } + + $gateways = apply_filters( 'edd_payment_gateways', $gateways ); + + // Since Stripe is added via a filter still, move to the top. + if ( array_key_exists( 'stripe', $gateways ) ) { + $stripe_attributes = $gateways['stripe']; + unset( $gateways['stripe'] ); + + $gateways = array_merge( array( 'stripe' => $stripe_attributes ), $gateways ); + } + + return (array) apply_filters( 'edd_payment_gateways', $gateways ); +} + +/** + * Enforce the gateway order (from the sortable admin area UI). + * + * @since 3.0 + * + * @param array $gateways + * @return array + */ +function edd_order_gateways( $gateways = array() ) { + + // Get the order option + $order = edd_get_option( 'gateways_order', '' ); + + // If order is set, enforce it + if ( ! empty( $order ) ) { + $order = array_flip( explode( ',', $order ) ); + $order = array_intersect_key( $order, $gateways ); + $gateways = array_merge( $order, $gateways ); + } + + // Return ordered gateways + return $gateways; +} +add_filter( 'edd_payment_gateways', 'edd_order_gateways', 99 ); +add_filter( 'edd_enabled_payment_gateways_before_sort', 'edd_order_gateways', 99 ); + +/** + * Returns a list of all enabled gateways. + * + * @since 1.0 + * @param bool $sort If true, the default gateway will be first + * @return array $gateway_list All the available gateways + */ +function edd_get_enabled_payment_gateways( $sort = false ) { + $gateways = edd_get_payment_gateways(); + $enabled = (array) edd_get_option( 'gateways', false ); + + $gateway_list = array(); + + foreach ( $gateways as $key => $gateway ) { + if ( isset( $enabled[ $key ] ) && 1 === (int) $enabled[ $key ] ) { + $gateway_list[ $key ] = $gateway; + } + } + + /** + * Filter the enabled payment gateways before the default is bumped to the + * front of the array. + * + * @since 3.0 + * + * @param array $gateway_list List of enabled payment gateways + * @return array Array of sorted gateways + */ + $gateway_list = apply_filters( 'edd_enabled_payment_gateways_before_sort', $gateway_list ); + + // Reorder our gateways so the default is first + if ( true === $sort ) { + $default_gateway_id = edd_get_default_gateway(); + + // Only put default on top if it's active + if ( edd_is_gateway_active( $default_gateway_id ) ) { + $default_gateway = array( $default_gateway_id => $gateway_list[ $default_gateway_id ] ); + unset( $gateway_list[ $default_gateway_id ] ); + + $gateway_list = array_merge( $default_gateway, $gateway_list ); + } + } + + return apply_filters( 'edd_enabled_payment_gateways', $gateway_list ); +} + +/** + * Checks whether a specified gateway is activated. + * + * @since 1.0 + * + * @param string $gateway Name of the gateway to check for. + * @return boolean true if enabled, false otherwise. + */ +function edd_is_gateway_active( $gateway ) { + $gateways = edd_get_enabled_payment_gateways(); + $retval = array_key_exists( $gateway, $gateways ); + + return apply_filters( 'edd_is_gateway_active', $retval, $gateway, $gateways ); +} + +/** + * Gets the default payment gateway selected from the EDD Settings. + * + * @since 1.5 + * + * @return string $default Default gateway ID. + */ +function edd_get_default_gateway() { + $default = edd_get_option( 'default_gateway', 'paypal' ); + + // Use the first enabled one + if ( ! edd_is_gateway_active( $default ) ) { + $gateways = edd_get_enabled_payment_gateways(); + $gateways = array_keys( $gateways ); + $default = reset( $gateways ); + } + + return apply_filters( 'edd_default_gateway', $default ); +} + +/** + * Returns the admin label for the specified gateway + * + * @since 1.0.8.3 + * + * @param string $gateway Name of the gateway to retrieve a label for + * @return string Gateway admin label + */ +function edd_get_gateway_admin_label( $gateway ) { + $gateways = edd_get_payment_gateways(); + + $label = isset( $gateways[ $gateway ] ) + ? $gateways[ $gateway ]['admin_label'] + : ucwords( $gateway ); + + return apply_filters( 'edd_gateway_admin_label', $label, $gateway ); +} + +/** + * Returns the checkout label for the specified gateway. + * + * @since 1.0.8.5 + * + * @param string $gateway Name of the gateway to retrieve a label for. + * @return string Checkout label for the gateway. + */ +function edd_get_gateway_checkout_label( $gateway ) { + $gateways = edd_get_payment_gateways(); + $label = isset( $gateways[ $gateway ] ) ? $gateways[ $gateway ]['checkout_label'] : $gateway; + + return apply_filters( 'edd_gateway_checkout_label', $label, $gateway ); +} + +/** + * Returns the options a gateway supports. + * + * @since 1.8 + * + * @param string $gateway ID of the gateway to retrieve a label for. + * @return array Options the gateway supports. + */ +function edd_get_gateway_supports( $gateway ) { + $gateways = edd_get_enabled_payment_gateways(); + $supports = isset( $gateways[ $gateway ]['supports'] ) ? $gateways[ $gateway ]['supports'] : array(); + + return apply_filters( 'edd_gateway_supports', $supports, $gateway ); +} + +/** + * Checks if a gateway supports buy now. + * + * @since 1.8 + * + * @param string $gateway ID of the gateway to retrieve a label for. + * @return bool True if the gateway supports buy now, false otherwise. + */ +function edd_gateway_supports_buy_now( $gateway ) { + $supports = edd_get_gateway_supports( $gateway ); + $ret = in_array( 'buy_now', $supports, true ); + + return apply_filters( 'edd_gateway_supports_buy_now', $ret, $gateway ); +} + +/** + * Checks if an enabled gateway supports buy now. + * + * @since 1.8 + * + * @return bool True if the shop supports buy now, false otherwise. + */ +function edd_shop_supports_buy_now() { + $gateways = edd_get_enabled_payment_gateways(); + $ret = false; + + if ( ! edd_use_taxes() && $gateways && 1 === count( $gateways ) ) { + foreach ( $gateways as $gateway_id => $gateway ) { + if ( edd_gateway_supports_buy_now( $gateway_id ) ) { + $ret = true; + break; + } + } + } + + return apply_filters( 'edd_shop_supports_buy_now', $ret ); +} + +/** + * Build the purchase data for a straight-to-gateway purchase button + * + * @since 1.7 + * + * @param int $download_id + * @param array $options + * @param int $quantity + * + * @return mixed|void + */ +function edd_build_straight_to_gateway_data( $download_id = 0, $options = array(), $quantity = 1 ) { + $price_options = array(); + + if ( empty( $options ) || ! edd_has_variable_prices( $download_id ) ) { + $price = edd_get_download_price( $download_id ); + } else { + + if ( is_array( $options['price_id'] ) ) { + $price_id = $options['price_id'][0]; + } else { + $price_id = $options['price_id']; + } + + $prices = edd_get_variable_prices( $download_id ); + + // Make sure a valid price ID was supplied + if ( ! isset( $prices[ $price_id ] ) ) { + wp_die( __( 'The requested price ID does not exist.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 404 ) ); + } + + $price_options = array( + 'price_id' => $price_id, + 'amount' => $prices[ $price_id ]['amount'], + ); + $price = $prices[ $price_id ]['amount']; + } + + // Set up Downloads array + $downloads = array( + array( + 'id' => $download_id, + 'options' => $price_options, + ), + ); + + // Set up Cart Details array + $cart_details = array( + array( + 'name' => get_the_title( $download_id ), + 'id' => $download_id, + 'item_number' => array( + 'id' => $download_id, + 'options' => $price_options, + ), + 'tax' => 0, + 'discount' => 0, + 'item_price' => $price, + 'subtotal' => ( $price * $quantity ), + 'price' => ( $price * $quantity ), + 'quantity' => $quantity, + ), + ); + + if ( is_user_logged_in() ) { + $current_user = wp_get_current_user(); + } + + // Setup user information + $user_info = array( + 'id' => is_user_logged_in() ? get_current_user_id() : -1, + 'email' => is_user_logged_in() ? $current_user->user_email : '', + 'first_name' => is_user_logged_in() ? $current_user->user_firstname : '', + 'last_name' => is_user_logged_in() ? $current_user->user_lastname : '', + 'discount' => 'none', + 'address' => array(), + ); + + // Setup purchase information + $purchase_data = array( + 'downloads' => $downloads, + 'fees' => edd_get_cart_fees(), + 'subtotal' => $price * $quantity, + 'discount' => 0, + 'tax' => 0, + 'price' => $price * $quantity, + 'purchase_key' => strtolower( md5( uniqid() ) ), + 'user_email' => $user_info['email'], + 'date' => date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ), + 'user_info' => $user_info, + 'post_data' => array(), + 'cart_details' => $cart_details, + 'gateway' => \EDD\Gateways\PayPal\paypal_standard_enabled() ? 'paypal' : 'paypal_commerce', + 'buy_now' => true, + 'card_info' => array(), + ); + + return apply_filters( 'edd_straight_to_gateway_purchase_data', $purchase_data ); +} + +/** + * Sends all the payment data to the specified gateway + * + * @since 1.0 + * + * @param string $gateway Name of the gateway. + * @param array $payment_data All the payment data to be sent to the gateway. + */ +function edd_send_to_gateway( $gateway, $payment_data ) { + $payment_data['gateway_nonce'] = wp_create_nonce( 'edd-gateway' ); + + // $gateway must match the ID used when registering the gateway + do_action( 'edd_gateway_' . $gateway, $payment_data ); +} + +/** + * Determines if the gateway menu should be shown + * + * If the cart amount is zero, no option is shown and the cart uses the manual gateway + * to emulate a no-gateway-setup for a free download + * + * @since 1.3.2 + * + * @return bool $show_gateways Whether or not to show the gateways + */ +function edd_show_gateways() { + $gateways = edd_get_enabled_payment_gateways(); + $show_gateways = false; + + if ( count( $gateways ) > 1 ) { + $show_gateways = true; + + if ( edd_get_cart_total() <= 0 ) { + $show_gateways = false; + } + } + + return apply_filters( 'edd_show_gateways', $show_gateways ); +} + +/** + * Determines what the currently selected gateway is + * + * If the cart amount is zero, no option is shown and the cart uses the manual + * gateway to emulate a no-gateway-setup for a free download + * + * @since 1.3.2 + * @return string $chosen_gateway The slug of the gateway + */ +function edd_get_chosen_gateway() { + + // Use the default gateway by default + $retval = edd_get_default_gateway(); + + // Get the chosen gateway + $chosen = isset( $_REQUEST['payment-mode'] ) + ? $_REQUEST['payment-mode'] + : false; + + // Sanitize the gateway + if ( false !== $chosen ) { + $chosen = preg_replace( '/[^a-zA-Z0-9-_]+/', '', $chosen ); + $chosen = urldecode( $chosen ); + + // Set return value if gateway is active + if ( ! empty( $chosen ) && edd_is_gateway_active( $chosen ) ) { + $retval = $chosen; + } + } + + // Override to manual if no price + if ( edd_get_cart_subtotal() <= 0 ) { + $retval = 'manual'; + } + + return apply_filters( 'edd_chosen_gateway', $retval, $chosen ); +} + +/** + * Record a gateway error + * + * A simple wrapper function for edd_record_log() + * + * @since 1.3.3 + * + * @param string $title Title of the log entry (default: empty) + * @param string $message Message to store in the log entry (default: empty) + * @param int $parent Parent log entry (default: 0) + * + * @return int ID of the new log entry. + */ +function edd_record_gateway_error( $title = '', $message = '', $parent = 0 ) { + return edd_record_log( $title, $message, $parent, 'gateway_error' ); +} + +/** + * Counts the number of orders made with a specific gateway. + * + * @since 1.6 + * @since 3.0 Use edd_count_orders(). + * + * @param string $gateway_label Gateway label. + * @param string $status Order status. + * + * @return int Number of orders placed based on the gateway. + */ +function edd_count_sales_by_gateway( $gateway_label = 'paypal', $status = 'complete' ) { + return edd_count_orders( + array( + 'gateway' => $gateway_label, + 'status' => $status, + ) + ); +} + +/** + * Determines if a gateway is setup. + * + * @since 3.1.2 + * + * @param string $gateway The gateway to check. + * @param bool $ignore_registration Whether or not to ignore if the gateway is registered. + * @return bool True if the gateway is setup, false otherwise. + */ +function edd_is_gateway_setup( $gateway = '', $ignore_registration = false ) { + // Return false if no gateway is passed. + if ( empty( $gateway ) ) { + return false; + } + + $gateways = edd_get_payment_gateways(); + + // If the gateway is not registered, return false. + if ( ! array_key_exists( $gateway, $gateways ) && ! $ignore_registration ) { + return false; + } + + // Some core gateways, we can just determine here, otherwise we'll use the default case to run the filter. + switch ( $gateway ) { + case 'stripe': + $api_key = edd_is_test_mode() + ? edd_get_option( 'test_publishable_key' ) + : edd_get_option( 'live_publishable_key' ); + + $is_setup = ! empty( $api_key ); + break; + + case 'paypal_commerce': + $is_setup = EDD\Gateways\PayPal\ready_to_accept_payments(); + break; + + case 'amazon': + $amazon_settings = array( + 'amazon_seller_id', + 'amazon_client_id', + 'amazon_mws_access_key', + 'amazon_mws_secret_key', + ); + + $is_setup = true; + foreach ( $amazon_settings as $key ) { + if ( empty( edd_get_option( $key, '' ) ) ) { + $is_setup = false; + break; + } + } + break; + + default: + /** + * Run a filter to determine if a gateway is setup. + * + * This defaults to 'true' so that gateways that do not have a setup check to + * continue to work. + * + * This hook would fire on the gateway slug, prefixed with `edd_is_gateway_setup_`. + * Example: edd_is_gateway_setup_paypal_express + * + * @since 3.1.2 + * + * @param bool $is_setup Whether or not the gateway is setup. + */ + $is_setup = apply_filters( 'edd_is_gateway_setup_' . $gateway, true ); + break; + } + + return $is_setup; +} + +/** + * Gets the URL to the gateway settings page. + * + * @since 3.1.2 + * + * @param string $gateway The gateway to get the settings URL for. + * + * @return string The URL to the gateway settings page. + */ +function edd_get_gateway_settings_url( $gateway = '' ) { + // Return false if no gateway is passed. + if ( empty( $gateway ) ) { + return ''; + } + + $gateways = edd_get_payment_gateways(); + + // If the gateway is not registered, return false. + if ( ! array_key_exists( $gateway, $gateways ) ) { + return ''; + } + + // Some core gateways, we can just determine here, otherwise we'll use the default case to run the filter. + switch ( $gateway ) { + case 'stripe': + $gateway_settings_url = edd_get_admin_url( + array( + 'page' => 'edd-settings', + 'tab' => 'gateways', + 'section' => 'edd-stripe', + ) + ); + break; + + case 'paypal_commerce': + $gateway_settings_url = EDD\Gateways\PayPal\Admin\get_settings_url(); + break; + + case 'amazon': + $gateway_settings_url = edd_get_admin_url( + array( + 'page' => 'edd-settings', + 'tab' => 'gateways', + 'section' => 'amazon', + ) + ); + break; + + default: + /** + * Run a filter to assign a settings URL for the gateway. + * + * This defaults to an empty string so that gateways that do not have + * a setup check to continue to work. + * + * This hook would fire on the gateway slug, prefixed with `edd_gateway_settings_url_`. + * Example: edd_gateway_settings_url_paypal_express + * + * @since 3.1.2 + * + * @param string $gateway_settings_url The URL to the gateway settings. + */ + $gateway_settings_url = apply_filters( 'edd_gateway_settings_url_' . $gateway, '' ); + break; + } + + return $gateway_settings_url; +} + +/** + * Checks whether the current cart setup is supported. This is intended for subscription orders. + * If the cart contains multiple products and one of them is a subscription, we need to check + * if the gateway supports a mixed cart. + * + * @since 3.2.7 + * @return bool + */ +function edd_gateway_supports_cart_contents( string $gateway ) { + + // If the cart only contains a single item, the cart is supported. + if ( count( edd_get_cart_contents() ) === 1 ) { + return true; + } + + // If Recurring isn't active, or if the cart doesn't contain a subscription, the cart is supported. + if ( ! function_exists( 'edd_recurring' ) || ! edd_recurring()->cart_contains_recurring() ) { + return true; + } + + // If the cart is mixed and the gateway supports it, the cart is supported. + // Historically, mixed carts also support multiple subscriptions. + return in_array( 'mixed_cart', edd_get_gateway_supports( $gateway ), true ); +} diff --git a/includes/gateways/libraries/paypal/ipnlistener.php b/includes/gateways/libraries/paypal/ipnlistener.php deleted file mode 100755 index 60275f55995..00000000000 --- a/includes/gateways/libraries/paypal/ipnlistener.php +++ /dev/null @@ -1,300 +0,0 @@ -use_ssl) { - $uri = 'https://'.$this->getPaypalHost().'/cgi-bin/webscr'; - $this->post_uri = $uri; - } else { - $uri = 'http://'.$this->getPaypalHost().'/cgi-bin/webscr'; - $this->post_uri = $uri; - } - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded_data); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); - curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_HEADER, true); - - if ($this->force_ssl_v3) { - curl_setopt($ch, CURLOPT_SSLVERSION, 3); - } - - $this->response = curl_exec($ch); - $this->response_status = strval(curl_getinfo($ch, CURLINFO_HTTP_CODE)); - - if ($this->response === false || $this->response_status == '0') { - $errno = curl_errno($ch); - $errstr = curl_error($ch); - throw new Exception("cURL error: [$errno] $errstr"); - } - } - - /** - * Post Back Using fsockopen() - * - * Sends the post back to PayPal using the fsockopen() function. Called by - * the processIpn() method if the use_curl property is false. Throws an - * exception if the post fails. Populates the response, response_status, - * and post_uri properties on success. - * - * @param string The post data as a URL encoded string - */ - protected function fsockPost($encoded_data) { - - if ($this->use_ssl) { - $uri = 'ssl://'.$this->getPaypalHost(); - $port = '443'; - $this->post_uri = $uri.'/cgi-bin/webscr'; - } else { - $uri = $this->getPaypalHost(); // no "http://" in call to fsockopen() - $port = '80'; - $this->post_uri = 'http://'.$uri.'/cgi-bin/webscr'; - } - - $fp = fsockopen($uri, $port, $errno, $errstr, $this->timeout); - - if (!$fp) { - // fsockopen error - throw new Exception("fsockopen error: [$errno] $errstr"); - } - - $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: ".strlen($encoded_data)."\r\n"; - $header .= "Connection: Close\r\n\r\n"; - - fputs($fp, $header.$encoded_data."\r\n\r\n"); - - while(!feof($fp)) { - if (empty($this->response)) { - // extract HTTP status from first line - $this->response .= $status = fgets($fp, 1024); - $this->response_status = trim(substr($status, 9, 4)); - } else { - $this->response .= fgets($fp, 1024); - } - } - - fclose($fp); - } - - private function getPaypalHost() { - if ($this->use_sandbox) return IpnListener::SANDBOX_HOST; - else return IpnListener::PAYPAL_HOST; - } - - /** - * Get POST URI - * - * Returns the URI that was used to send the post back to PayPal. This can - * be useful for troubleshooting connection problems. The default URI - * would be "ssl://www.sandbox.paypal.com:443/cgi-bin/webscr" - * - * @return string - */ - public function getPostUri() { - return $this->post_uri; - } - - /** - * Get Response - * - * Returns the entire response from PayPal as a string including all the - * HTTP headers. - * - * @return string - */ - public function getResponse() { - return $this->response; - } - - /** - * Get Response Status - * - * Returns the HTTP response status code from PayPal. This should be "200" - * if the post back was successful. - * - * @return string - */ - public function getResponseStatus() { - return $this->response_status; - } - - /** - * Get Text Report - * - * Returns a report of the IPN transaction in plain text format. This is - * useful in emails to order processors and system administrators. Override - * this method in your own class to customize the report. - * - * @return string - */ - public function getTextReport() { - - $r = ''; - - // date and POST url - for ($i=0; $i<80; $i++) { $r .= '-'; } - $r .= "\n[".date('m/d/Y g:i A').'] - '.$this->getPostUri(); - if ($this->use_curl) $r .= " (curl)\n"; - else $r .= " (fsockopen)\n"; - - // HTTP Response - for ($i=0; $i<80; $i++) { $r .= '-'; } - $r .= "\n{$this->getResponse()}\n"; - - // POST vars - for ($i=0; $i<80; $i++) { $r .= '-'; } - $r .= "\n"; - - foreach ($this->post_data as $key => $value) { - $r .= str_pad($key, 25)."$value\n"; - } - $r .= "\n\n"; - - return $r; - } - - /** - * Process IPN - * - * Handles the IPN post back to PayPal and parsing the response. Call this - * method from your IPN listener script. Returns true if the response came - * back as "VERIFIED", false if the response came back "INVALID", and - * throws an exception if there is an error. - * - * @param array - * - * @return boolean - */ - public function processIpn($post_data=null) { - - $encoded_data = 'cmd=_notify-validate'; - - if ($post_data === null) { - // use raw POST data - if (!empty($_POST)) { - $this->post_data = $_POST; - $encoded_data .= '&'.file_get_contents('php://input'); - } else { - throw new Exception("No POST data found."); - } - } else { - // use provided data array - $this->post_data = $post_data; - - foreach ($this->post_data as $key => $value) { - $encoded_data .= "&$key=".urlencode($value); - } - } - - if ($this->use_curl) $this->curlPost($encoded_data); - else $this->fsockPost($encoded_data); - - if (strpos($this->response_status, '200') === false) { - throw new Exception("Invalid response status: ".$this->response_status); - } - - if (strpos($this->response, "VERIFIED") !== false) { - return true; - } elseif (strpos($this->response, "INVALID") !== false) { - return false; - } else { - throw new Exception("Unexpected response from PayPal."); - } - } - - /** - * Require Post Method - * - * Throws an exception and sets a HTTP 405 response header if the request - * method was not POST. - */ - public function requirePostMethod() { - // require POST requests - if ($_SERVER['REQUEST_METHOD'] && $_SERVER['REQUEST_METHOD'] != 'POST') { - header('Allow: POST', true, 405); - throw new Exception("Invalid HTTP request method."); - } - } -} -?> \ No newline at end of file diff --git a/includes/gateways/libs/amazon/Client.php b/includes/gateways/libs/amazon/Client.php new file mode 100755 index 00000000000..62897f7eede --- /dev/null +++ b/includes/gateways/libs/amazon/Client.php @@ -0,0 +1,1582 @@ + null, + 'secret_key' => null, + 'access_key' => null, + 'region' => null, + 'currency_code' => null, + 'sandbox' => false, + 'platform_id' => null, + 'cabundle_file' => null, + 'application_name' => null, + 'application_version' => null, + 'proxy_host' => null, + 'proxy_port' => -1, + 'proxy_username' => null, + 'proxy_password' => null, + 'client_id' => null, + 'handle_throttle' => true + ); + + private $modePath = null; + + // Final URL to where the API parameters POST done, based off the config['region'] and respective $mwsServiceUrls + private $mwsServiceUrl = null; + + private $mwsServiceUrls = array('eu' => 'mws-eu.amazonservices.com', + 'na' => 'mws.amazonservices.com', + 'jp' => 'mws.amazonservices.jp'); + + // Production profile end points to get the user information + private $liveProfileEndpoint = array('uk' => 'https://api.amazon.co.uk', + 'us' => 'https://api.amazon.com', + 'de' => 'https://api.amazon.de', + 'jp' => 'https://api.amazon.co.jp'); + + // Sandbox profile end points to get the user information + private $sandboxProfileEndpoint = array('uk' => 'https://api.sandbox.amazon.co.uk', + 'us' => 'https://api.sandbox.amazon.com', + 'de' => 'https://api.sandbox.amazon.de', + 'jp' => 'https://api.sandbox.amazon.co.jp'); + + private $regionMappings = array('de' => 'eu', + 'uk' => 'eu', + 'us' => 'na', + 'jp' => 'jp'); + + // Boolean variable to check if the API call was a success + public $success = false; + + /* Takes user configuration array from the user as input + * Takes JSON file path with configuration information as input + * Validates the user configuration array against existing config array + */ + + public function __construct($config = null) + { + if (!is_null($config)) { + + if (is_array($config)) { + $configArray = $config; + } elseif (!is_array($config)) { + $configArray = $this->checkIfFileExists($config); + } + + if (is_array($configArray)) { + $this->checkConfigKeys($configArray); + } else { + throw new \Exception('$config is of the incorrect type ' . gettype($configArray) . ' and should be of the type array'); + } + } else { + throw new \Exception('$config cannot be null.'); + } + } + + /* checkIfFileExists - check if the JSON file exists in the path provided */ + + private function checkIfFileExists($config) + { + if(file_exists($config)) + { + $jsonString = file_get_contents($config); + $configArray = json_decode($jsonString, true); + + $jsonError = json_last_error(); + + if ($jsonError != 0) { + $errorMsg = "Error with message - content is not in json format" . $this->getErrorMessageForJsonError($jsonError) . " " . $configArray; + throw new \Exception($errorMsg); + } + } else { + $errorMsg ='$config is not a Json File path or the Json File was not found in the path provided'; + throw new \Exception($errorMsg); + } + return $configArray; + } + + /* Checks if the keys of the input configuration matches the keys in the config array + * if they match the values are taken else throws exception + * strict case match is not performed + */ + + private function checkConfigKeys($config) + { + $config = array_change_key_case($config, CASE_LOWER); + $config = $this->trimArray($config); + + foreach ($config as $key => $value) { + if (array_key_exists($key, $this->config)) { + $this->config[$key] = $value; + } else { + throw new \Exception('Key ' . $key . ' is either not part of the configuration or has incorrect Key name. + check the config array key names to match your key names of your config array', 1); + } + } + } + + /* Convert a json error code to a descriptive error message + * + * @param int $jsonError message code + * + * @return string error message + */ + + private function getErrorMessageForJsonError($jsonError) + { + switch ($jsonError) { + case JSON_ERROR_DEPTH: + return " - maximum stack depth exceeded."; + break; + case JSON_ERROR_STATE_MISMATCH: + return " - invalid or malformed JSON."; + break; + case JSON_ERROR_CTRL_CHAR: + return " - control character error."; + break; + case JSON_ERROR_SYNTAX: + return " - syntax error."; + break; + default: + return "."; + break; + } + } + + /* Setter for sandbox + * Sets the Boolean value for config['sandbox'] variable + */ + + public function setSandbox($value) + { + if (is_bool($value)) { + $this->config['sandbox'] = $value; + } else { + throw new \Exception($value . ' is of type ' . gettype($value) . ' and should be a boolean value'); + } + } + + /* Setter for config['client_id'] + * Sets the value for config['client_id'] variable + */ + + public function setClientId($value) + { + if (!empty($value)) { + $this->config['client_id'] = $value; + } else { + throw new \Exception('setter value for client ID provided is empty'); + } + } + + /* Setter for Proxy + * input $proxy [array] + * @param $proxy['proxy_user_host'] - hostname for the proxy + * @param $proxy['proxy_user_port'] - hostname for the proxy + * @param $proxy['proxy_user_name'] - if your proxy required a username + * @param $proxy['proxy_user_password'] - if your proxy required a password + */ + + public function setProxy($proxy) + { + $proxy = $this->trimArray($proxy); + + if (!empty($proxy['proxy_user_host'])) + $this->config['proxy_user_host'] = $proxy['proxy_user_host']; + + if (!empty($proxy['proxy_user_port'])) + $this->config['proxy_user_port'] = $proxy['proxy_user_port']; + + if (!empty($proxy['proxy_user_name'])) + $this->config['proxy_user_name'] = $proxy['proxy_user_name']; + + if (!empty($proxy['proxy_user_password'])) + $this->config['proxy_user_password'] = $proxy['proxy_user_password']; + } + + /* Setter for $mwsServiceUrl + * Set the URL to which the post request has to be made for unit testing + */ + + public function setMwsServiceUrl($url) + { + $this->mwsServiceUrl = $url; + } + + /* Getter + * Gets the value for the key if the key exists in config + */ + + public function __get($name) + { + if (array_key_exists(strtolower($name), $this->config)) { + return $this->config[strtolower($name)]; + } else { + throw new \Exception('Key ' . $name . ' is either not a part of the configuration array config or the' . $name . 'does not match the key name in the config array', 1); + } + } + + /* Getter for parameters string + * Gets the value for the parameters string for unit testing + */ + + public function getParameters() + { + return trim($this->parameters); + } + + /* Trim the input Array key values */ + + private function trimArray($array) + { + foreach ($array as $key => $value) + { + $array[$key] = trim($value); + } + return $array; + } + + /* GetUserInfo convenience function - Returns user's profile information from Amazon using the access token returned by the Button widget. + * + * @see http://login.amazon.com/website Step 4 + * @param $accessToken [String] + */ + + public function getUserInfo($accessToken) + { + // Get the correct Profile Endpoint URL based off the country/region provided in the config['region'] + $this->profileEndpointUrl(); + + if (empty($accessToken)) { + throw new \InvalidArgumentException('Access Token is a required parameter and is not set'); + } + + // To make sure double encoding doesn't occur decode first and encode again. + $accessToken = urldecode($accessToken); + $url = $this->profileEndpoint . '/auth/o2/tokeninfo?access_token=' . urlEncode($accessToken); + + $httpCurlRequest = new HttpCurl(); + + $response = $httpCurlRequest->httpGet($url); + $data = json_decode($response); + + if ($data->aud != $this->config['client_id']) { + // The access token does not belong to us + throw new \Exception('The Access token entered is incorrect'); + } + + // Exchange the access token for user profile + $url = $this->profileEndpoint . '/user/profile'; + $httpCurlRequest = new HttpCurl(); + + $httpCurlRequest->setAccessToken($accessToken); + $httpCurlRequest->setHttpHeader(true); + $response = $httpCurlRequest->httpGet($url); + + $userInfo = json_decode($response, true); + return $userInfo; + } + + /* setParametersAndPost - sets the parameters array with non empty values from the requestParameters array sent to API calls. + * If Provider Credit Details is present, values are set by setProviderCreditDetails + * If Provider Credit Reversal Details is present, values are set by setProviderCreditDetails + */ + + private function setParametersAndPost($parameters, $fieldMappings, $requestParameters) + { + /* For loop to take all the non empty parameters in the $requestParameters and add it into the $parameters array, + * if the keys are matched from $requestParameters array with the $fieldMappings array + */ + foreach ($requestParameters as $param => $value) { + + if(!is_array($value)) { + $value = trim($value); + } + + if (array_key_exists($param, $fieldMappings) && $value!='') { + + if(is_array($value)) { + // If the parameter is a provider_credit_details or provider_credit_reversal_details, call the respective functions to set the values + if($param === 'provider_credit_details') { + $parameters = $this->setProviderCreditDetails($parameters,$value); + } elseif ($param === 'provider_credit_reversal_details') { + $parameters = $this->setProviderCreditReversalDetails($parameters,$value); + } + + } else{ + // For variables that are boolean values, strtolower them + if($this->checkIfBool($value)) + { + $value = strtolower($value); + } + + $parameters[$fieldMappings[$param]] = $value; + } + } + } + + $parameters = $this->setDefaultValues($parameters, $fieldMappings, $requestParameters); + $responseObject = $this->calculateSignatureAndPost($parameters); + + return $responseObject; + } + + /* checkIfBool - checks if the input is a boolean */ + + private function checkIfBool($string) + { + $string = strtolower($string); + return in_array($string, array('true', 'false')); + } + + /* calculateSignatureAndPost - convert the Parameters array to string and curl POST the parameters to MWS */ + + private function calculateSignatureAndPost($parameters) + { + // Call the signature and Post function to perform the actions. Returns XML in array format + $parametersString = $this->calculateSignatureAndParametersToString($parameters); + + // POST using curl the String converted Parameters + $response = $this->invokePost($parametersString); + + // Send this response as args to ResponseParser class which will return the object of the class. + $responseObject = new ResponseParser($response); + return $responseObject; + } + + /* If merchant_id is not set via the requestParameters array then it's taken from the config array + * + * Set the platform_id if set in the config['platform_id'] array + * + * If currency_code is set in the $requestParameters and it exists in the $fieldMappings array, strtoupper it + * else take the value from config array if set + */ + + private function setDefaultValues($parameters, $fieldMappings, $requestParameters) + { + if (empty($requestParameters['merchant_id'])) + $parameters['SellerId'] = $this->config['merchant_id']; + + if (array_key_exists('platform_id', $fieldMappings)) { + if (empty($requestParameters['platform_id']) && !empty($this->config['platform_id'])) + $parameters[$fieldMappings['platform_id']] = $this->config['platform_id']; + } + + if (array_key_exists('currency_code', $fieldMappings)) { + if (!empty($requestParameters['currency_code'])) { + $parameters[$fieldMappings['currency_code']] = strtoupper($requestParameters['currency_code']); + } else { + $parameters[$fieldMappings['currency_code']] = strtoupper($this->config['currency_code']); + } + } + + return $parameters; + } + + /* setProviderCreditDetails - sets the provider credit details sent via the Capture or Authorize API calls + * @param provider_id - [String] + * @param credit_amount - [String] + * @optional currency_code - [String] + */ + + private function setProviderCreditDetails($parameters, $providerCreditInfo) + { + $providerIndex = 0; + $providerString = 'ProviderCreditList.member.'; + + $fieldMappings = array( + 'provider_id' => 'ProviderId', + 'credit_amount' => 'CreditAmount.Amount', + 'currency_code' => 'CreditAmount.CurrencyCode' + ); + + foreach ($providerCreditInfo as $key => $value) + { + $value = array_change_key_case($value, CASE_LOWER); + $providerIndex = $providerIndex + 1; + + foreach ($value as $param => $val) + { + if (array_key_exists($param, $fieldMappings) && trim($val)!='') { + $parameters[$providerString.$providerIndex. '.' .$fieldMappings[$param]] = $val; + } + } + + // If currency code is not entered take it from the config array + if(empty($parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']])) + { + $parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']] = strtoupper($this->config['currency_code']); + } + } + + return $parameters; + } + + /* setProviderCreditReversalDetails - sets the reverse provider credit details sent via the Refund API call. + * @param provider_id - [String] + * @param credit_amount - [String] + * @optional currency_code - [String] + */ + + private function setProviderCreditReversalDetails($parameters, $providerCreditInfo) + { + $providerIndex = 0; + $providerString = 'ProviderCreditReversalList.member.'; + + $fieldMappings = array( + 'provider_id' => 'ProviderId', + 'credit_reversal_amount' => 'CreditReversalAmount.Amount', + 'currency_code' => 'CreditReversalAmount.CurrencyCode' + ); + + foreach ($providerCreditInfo as $key => $value) + { + $value = array_change_key_case($value, CASE_LOWER); + $providerIndex = $providerIndex + 1; + + foreach ($value as $param => $val) + { + if (array_key_exists($param, $fieldMappings) && trim($val)!='') { + $parameters[$providerString.$providerIndex. '.' .$fieldMappings[$param]] = $val; + } + } + + // If currency code is not entered take it from the config array + if(empty($parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']])) + { + $parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']] = strtoupper($this->config['currency_code']); + } + } + + return $parameters; + } + + /* GetOrderReferenceDetails API call - Returns details about the Order Reference object and its current state. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetOrderReferenceDetails.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_order_reference_id'] - [String] + * @optional requestParameters['address_consent_token'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getOrderReferenceDetails($requestParameters = array()) + { + + $parameters['Action'] = 'GetOrderReferenceDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_order_reference_id' => 'AmazonOrderReferenceId', + 'address_consent_token' => 'AddressConsentToken', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + return ($responseObject); + } + + /* SetOrderReferenceDetails API call - Sets order reference details such as the order total and a description for the order. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_SetOrderReferenceDetails.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_order_reference_id'] - [String] + * @param requestParameters['amount'] - [String] + * @param requestParameters['currency_code'] - [String] + * @optional requestParameters['platform_id'] - [String] + * @optional requestParameters['seller_note'] - [String] + * @optional requestParameters['seller_order_id'] - [String] + * @optional requestParameters['store_name'] - [String] + * @optional requestParameters['custom_information'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function setOrderReferenceDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'SetOrderReferenceDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_order_reference_id' => 'AmazonOrderReferenceId', + 'amount' => 'OrderReferenceAttributes.OrderTotal.Amount', + 'currency_code' => 'OrderReferenceAttributes.OrderTotal.CurrencyCode', + 'platform_id' => 'OrderReferenceAttributes.PlatformId', + 'seller_note' => 'OrderReferenceAttributes.SellerNote', + 'seller_order_id' => 'OrderReferenceAttributes.SellerOrderAttributes.SellerOrderId', + 'store_name' => 'OrderReferenceAttributes.SellerOrderAttributes.StoreName', + 'custom_information' => 'OrderReferenceAttributes.SellerOrderAttributes.CustomInformation', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* ConfirmOrderReferenceDetails API call - Confirms that the order reference is free of constraints and all required information has been set on the order reference. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_ConfirmOrderReference.html + + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_order_reference_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function confirmOrderReference($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'ConfirmOrderReference'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_order_reference_id' => 'AmazonOrderReferenceId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* CancelOrderReferenceDetails API call - Cancels a previously confirmed order reference. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CancelOrderReference.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_order_reference_id'] - [String] + * @optional requestParameters['cancelation_reason'] [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function cancelOrderReference($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'CancelOrderReference'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_order_reference_id' => 'AmazonOrderReferenceId', + 'cancelation_reason' => 'CancelationReason', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* CloseOrderReferenceDetails API call - Confirms that an order reference has been fulfilled (fully or partially) + * and that you do not expect to create any new authorizations on this order reference. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CloseOrderReference.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_order_reference_id'] - [String] + * @optional requestParameters['closure_reason'] [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function closeOrderReference($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'CloseOrderReference'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_order_reference_id' => 'AmazonOrderReferenceId', + 'closure_reason' => 'ClosureReason', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* CloseAuthorization API call - Closes an authorization. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CloseOrderReference.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_authorization_id'] - [String] + * @optional requestParameters['closure_reason'] [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function closeAuthorization($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'CloseAuthorization'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_authorization_id' => 'AmazonAuthorizationId', + 'closure_reason' => 'ClosureReason', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* Authorize API call - Reserves a specified amount against the payment method(s) stored in the order reference. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Authorize.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_order_reference_id'] - [String] + * @param requestParameters['authorization_amount'] [String] + * @param requestParameters['currency_code'] - [String] + * @param requestParameters['authorization_reference_id'] [String] + * @optional requestParameters['capture_now'] [String] + * @optional requestParameters['provider_credit_details'] - [array (array())] + * @optional requestParameters['seller_authorization_note'] [String] + * @optional requestParameters['transaction_timeout'] [String] - Defaults to 1440 minutes + * @optional requestParameters['soft_descriptor'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function authorize($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'Authorize'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_order_reference_id' => 'AmazonOrderReferenceId', + 'authorization_amount' => 'AuthorizationAmount.Amount', + 'currency_code' => 'AuthorizationAmount.CurrencyCode', + 'authorization_reference_id' => 'AuthorizationReferenceId', + 'capture_now' => 'CaptureNow', + 'provider_credit_details' => array(), + 'seller_authorization_note' => 'SellerAuthorizationNote', + 'transaction_timeout' => 'TransactionTimeout', + 'soft_descriptor' => 'SoftDescriptor', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* GetAuthorizationDetails API call - Returns the status of a particular authorization and the total amount captured on the authorization. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetAuthorizationDetails.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_authorization_id'] [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getAuthorizationDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'GetAuthorizationDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_authorization_id' => 'AmazonAuthorizationId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* Capture API call - Captures funds from an authorized payment instrument. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Capture.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_authorization_id'] - [String] + * @param requestParameters['capture_amount'] - [String] + * @param requestParameters['currency_code'] - [String] + * @param requestParameters['capture_reference_id'] - [String] + * @optional requestParameters['provider_credit_details'] - [array (array())] + * @optional requestParameters['seller_capture_note'] - [String] + * @optional requestParameters['soft_descriptor'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function capture($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'Capture'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_authorization_id' => 'AmazonAuthorizationId', + 'capture_amount' => 'CaptureAmount.Amount', + 'currency_code' => 'CaptureAmount.CurrencyCode', + 'capture_reference_id' => 'CaptureReferenceId', + 'provider_credit_details' => array(), + 'seller_capture_note' => 'SellerCaptureNote', + 'soft_descriptor' => 'SoftDescriptor', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* GetCaptureDetails API call - Returns the status of a particular capture and the total amount refunded on the capture. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetCaptureDetails.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_capture_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getCaptureDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'GetCaptureDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_capture_id' => 'AmazonCaptureId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* Refund API call - Refunds a previously captured amount. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Refund.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_capture_id'] - [String] + * @param requestParameters['refund_reference_id'] - [String] + * @param requestParameters['refund_amount'] - [String] + * @param requestParameters['currency_code'] - [String] + * @optional requestParameters['provider_credit_reversal_details'] - [array(array())] + * @optional requestParameters['seller_refund_note'] [String] + * @optional requestParameters['soft_descriptor'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function refund($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'Refund'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_capture_id' => 'AmazonCaptureId', + 'refund_reference_id' => 'RefundReferenceId', + 'refund_amount' => 'RefundAmount.Amount', + 'currency_code' => 'RefundAmount.CurrencyCode', + 'provider_credit_reversal_details' => array(), + 'seller_refund_note' => 'SellerRefundNote', + 'soft_descriptor' => 'SoftDescriptor', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* GetRefundDetails API call - Returns the status of a particular refund. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetRefundDetails.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_refund_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getRefundDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'GetRefundDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_refund_id' => 'AmazonRefundId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* GetServiceStatus API Call - Returns the operational status of the Off-Amazon Payments API section + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetServiceStatus.html + * + * The GetServiceStatus operation returns the operational status of the Off-Amazon Payments API + * section of Amazon Marketplace Web Service (Amazon MWS). + * Status values are GREEN, GREEN_I, YELLOW, and RED. + * + * @param requestParameters['merchant_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getServiceStatus($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'GetServiceStatus'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* CreateOrderReferenceForId API Call - Creates an order reference for the given object + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CreateOrderReferenceForId.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['Id'] - [String] + * @optional requestParameters['inherit_shipping_address'] [Boolean] + * @optional requestParameters['ConfirmNow'] - [Boolean] + * @optional Amount (required when confirm_now is set to true) [String] + * @optional requestParameters['currency_code'] - [String] + * @optional requestParameters['seller_note'] - [String] + * @optional requestParameters['seller_order_id'] - [String] + * @optional requestParameters['store_name'] - [String] + * @optional requestParameters['custom_information'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function createOrderReferenceForId($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'CreateOrderReferenceForId'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'id' => 'Id', + 'id_type' => 'IdType', + 'inherit_shipping_address' => 'InheritShippingAddress', + 'confirm_now' => 'ConfirmNow', + 'amount' => 'OrderReferenceAttributes.OrderTotal.Amount', + 'currency_code' => 'OrderReferenceAttributes.OrderTotal.CurrencyCode', + 'platform_id' => 'OrderReferenceAttributes.PlatformId', + 'seller_note' => 'OrderReferenceAttributes.SellerNote', + 'seller_order_id' => 'OrderReferenceAttributes.SellerOrderAttributes.SellerOrderId', + 'store_name' => 'OrderReferenceAttributes.SellerOrderAttributes.StoreName', + 'custom_information' => 'OrderReferenceAttributes.SellerOrderAttributes.CustomInformation', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* GetBillingAgreementDetails API Call - Returns details about the Billing Agreement object and its current state. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetBillingAgreementDetails.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_billing_agreement_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getBillingAgreementDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'GetBillingAgreementDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId', + 'address_consent_token' => 'AddressConsentToken', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* SetBillingAgreementDetails API call - Sets Billing Agreement details such as a description of the agreement and other information about the seller. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_SetBillingAgreementDetails.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_billing_agreement_id'] - [String] + * @param requestParameters['amount'] - [String] + * @param requestParameters['currency_code'] - [String] + * @optional requestParameters['platform_id'] - [String] + * @optional requestParameters['seller_note'] - [String] + * @optional requestParameters['seller_billing_agreement_id'] - [String] + * @optional requestParameters['store_name'] - [String] + * @optional requestParameters['custom_information'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function setBillingAgreementDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'SetBillingAgreementDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId', + 'platform_id' => 'BillingAgreementAttributes.PlatformId', + 'seller_note' => 'BillingAgreementAttributes.SellerNote', + 'seller_billing_agreement_id' => 'BillingAgreementAttributes.SellerBillingAgreementAttributes.SellerBillingAgreementId', + 'custom_information' => 'BillingAgreementAttributes.SellerBillingAgreementAttributes.CustomInformation', + 'store_name' => 'BillingAgreementAttributes.SellerBillingAgreementAttributes.StoreName', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* ConfirmBillingAgreement API Call - Confirms that the Billing Agreement is free of constraints and all required information has been set on the Billing Agreement. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_ConfirmBillingAgreement.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_billing_agreement_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function confirmBillingAgreement($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'ConfirmBillingAgreement'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* ValidateBillignAgreement API Call - Validates the status of the Billing Agreement object and the payment method associated with it. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_ValidateBillingAgreement.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_billing_agreement_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function validateBillingAgreement($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'ValidateBillingAgreement'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* AuthorizeOnBillingAgreement API call - Reserves a specified amount against the payment method(s) stored in the Billing Agreement. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_AuthorizeOnBillingAgreement.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_billing_agreement_id'] - [String] + * @param requestParameters['authorization_reference_id'] [String] + * @param requestParameters['authorization_amount'] [String] + * @param requestParameters['currency_code'] - [String] + * @optional requestParameters['seller_authorization_note'] [String] + * @optional requestParameters['transaction_timeout'] - Defaults to 1440 minutes + * @optional requestParameters['capture_now'] [String] + * @optional requestParameters['soft_descriptor'] - - [String] + * @optional requestParameters['seller_note'] - [String] + * @optional requestParameters['platform_id'] - [String] + * @optional requestParameters['custom_information'] - [String] + * @optional requestParameters['seller_order_id'] - [String] + * @optional requestParameters['store_name'] - [String] + * @optional requestParameters['inherit_shipping_address'] [Boolean] - Defaults to true + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function authorizeOnBillingAgreement($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'AuthorizeOnBillingAgreement'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId', + 'authorization_reference_id' => 'AuthorizationReferenceId', + 'authorization_amount' => 'AuthorizationAmount.Amount', + 'currency_code' => 'AuthorizationAmount.CurrencyCode', + 'seller_authorization_note' => 'SellerAuthorizationNote', + 'transaction_timeout' => 'TransactionTimeout', + 'capture_now' => 'CaptureNow', + 'soft_descriptor' => 'SoftDescriptor', + 'seller_note' => 'SellerNote', + 'platform_id' => 'PlatformId', + 'custom_information' => 'SellerOrderAttributes.CustomInformation', + 'seller_order_id' => 'SellerOrderAttributes.SellerOrderId', + 'store_name' => 'SellerOrderAttributes.StoreName', + 'inherit_shipping_address' => 'InheritShippingAddress', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* CloseBillingAgreement API Call - Returns details about the Billing Agreement object and its current state. + * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CloseBillingAgreement.html + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_billing_agreement_id'] - [String] + * @optional requestParameters['closure_reason'] [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function closeBillingAgreement($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'CloseBillingAgreement'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId', + 'closure_reason' => 'ClosureReason', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* charge convenience method + * Performs the API calls + * 1. SetOrderReferenceDetails / SetBillingAgreementDetails + * 2. ConfirmOrderReference / ConfirmBillingAgreement + * 3. Authorize (with Capture) / AuthorizeOnBillingAgreeemnt (with Capture) + * + * @param requestParameters['merchant_id'] - [String] + * + * @param requestParameters['amazon_reference_id'] - [String] : Order Reference ID /Billing Agreement ID + * If requestParameters['amazon_reference_id'] is empty then the following is required, + * @param requestParameters['amazon_order_reference_id'] - [String] : Order Reference ID + * or, + * @param requestParameters['amazon_billing_agreement_id'] - [String] : Billing Agreement ID + * + * @param $requestParameters['charge_amount'] - [String] : Amount value to be captured + * @param requestParameters['currency_code'] - [String] : Currency Code for the Amount + * @param requestParameters['authorization_reference_id'] - [String]- Any unique string that needs to be passed + * @optional requestParameters['charge_note'] - [String] : Seller Note sent to the buyer + * @optional requestParameters['transaction_timeout'] - [String] : Defaults to 1440 minutes + * @optional requestParameters['charge_order_id'] - [String] : Custom Order ID provided + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function charge($requestParameters = array()) { + + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + $requestParameters= $this->trimArray($requestParameters); + + $setParameters = $authorizeParameters = $confirmParameters = $requestParameters; + + $chargeType = ''; + + if (!empty($requestParameters['amazon_order_reference_id'])) + { + $chargeType = 'OrderReference'; + + } elseif(!empty($requestParameters['amazon_billing_agreement_id'])) { + $chargeType = 'BillingAgreement'; + + } elseif (!empty($requestParameters['amazon_reference_id'])) { + switch (substr(strtoupper($requestParameters['amazon_reference_id']), 0, 1)) { + case 'P': + case 'S': + $chargeType = 'OrderReference'; + $setParameters['amazon_order_reference_id'] = $requestParameters['amazon_reference_id']; + $authorizeParameters['amazon_order_reference_id'] = $requestParameters['amazon_reference_id']; + $confirmParameters['amazon_order_reference_id'] = $requestParameters['amazon_reference_id']; + break; + case 'B': + case 'C': + $chargeType = 'BillingAgreement'; + $setParameters['amazon_billing_agreement_id'] = $requestParameters['amazon_reference_id']; + $authorizeParameters['amazon_billing_agreement_id'] = $requestParameters['amazon_reference_id']; + $confirmParameters['amazon_billing_agreement_id'] = $requestParameters['amazon_reference_id']; + break; + default: + throw new \Exception('Invalid Amazon Reference ID'); + } + } else { + throw new \Exception('key amazon_order_reference_id or amazon_billing_agreement_id is null and is a required parameter'); + } + + // Set the other parameters if the values are present + $setParameters['amount'] = !empty($requestParameters['charge_amount']) ? $requestParameters['charge_amount'] : ''; + $authorizeParameters['authorization_amount'] = !empty($requestParameters['charge_amount']) ? $requestParameters['charge_amount'] : ''; + + $setParameters['seller_note'] = !empty($requestParameters['charge_note']) ? $requestParameters['charge_note'] : ''; + $authorizeParameters['seller_authorization_note'] = !empty($requestParameters['charge_note']) ? $requestParameters['charge_note'] : ''; + $authorizeParameters['seller_note'] = !empty($requestParameters['charge_note']) ? $requestParameters['charge_note'] : ''; + + $setParameters['seller_order_id'] = !empty($requestParameters['charge_order_id']) ? $requestParameters['charge_order_id'] : ''; + $setParameters['seller_billing_agreement_id'] = !empty($requestParameters['charge_order_id']) ? $requestParameters['charge_order_id'] : ''; + $authorizeParameters['seller_order_id'] = !empty($requestParameters['charge_order_id']) ? $requestParameters['charge_order_id'] : ''; + + $authorizeParameters['capture_now'] = 'true'; + + $response = $this->makeChargeCalls($chargeType, $setParameters, $confirmParameters, $authorizeParameters); + return $response; + } + + /* makeChargeCalls - makes API calls based off the charge type (OrderReference or BillingAgreement) */ + + private function makeChargeCalls($chargeType, $setParameters, $confirmParameters, $authorizeParameters) + { + switch ($chargeType) { + case 'OrderReference': + $response = $this->setOrderReferenceDetails($setParameters); + if ($this->success) { + $this->confirmOrderReference($confirmParameters); + } + if ($this->success) { + $response = $this->Authorize($authorizeParameters); + } + return $response; + case 'BillingAgreement': + // Get the Billing Agreement details and feed the response object to the ResponseParser + $responseObj = $this->getBillingAgreementDetails($setParameters); + // Call the function GetBillingAgreementDetailsStatus in ResponseParser.php providing it the XML response + // $baStatus is an aray containing the State of the Billing Agreement + $baStatus = $responseObj->getBillingAgreementDetailsStatus($responseObj->toXml()); + if ($baStatus['State'] != 'Open') { + $response = $this->SetBillingAgreementDetails($setParameters); + if ($this->success) { + $response = $this->ConfirmBillingAgreement($confirmParameters); + } + } + // Check the Billing Agreement status again before making the Authorization. + $responseObj = $this->getBillingAgreementDetails($setParameters); + $baStatus = $responseObj->GetBillingAgreementDetailsStatus($responseObj->toXml()); + if ($this->success && $baStatus['State'] === 'Open') { + $response = $this->AuthorizeOnBillingAgreement($authorizeParameters); + } + return $response; + } + } + + /* GetProviderCreditDetails API Call - Get the details of the Provider Credit. + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_provider_credit_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getProviderCreditDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'GetProviderCreditDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_provider_credit_id' => 'AmazonProviderCreditId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* GetProviderCreditReversalDetails API Call - Get details of the Provider Credit Reversal. + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_provider_credit_reversal_id'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function getProviderCreditReversalDetails($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'GetProviderCreditReversalDetails'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_provider_credit_reversal_id' => 'AmazonProviderCreditReversalId', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* ReverseProviderCredit API Call - Reverse the Provider Credit. + * + * @param requestParameters['merchant_id'] - [String] + * @param requestParameters['amazon_provider_credit_id'] - [String] + * @optional requestParameters['credit_reversal_reference_id'] - [String] + * @param requestParameters['credit_reversal_amount'] - [String] + * @optional requestParameters['currency_code'] - [String] + * @optional requestParameters['credit_reversal_note'] - [String] + * @optional requestParameters['mws_auth_token'] - [String] + */ + + public function reverseProviderCredit($requestParameters = array()) + { + $parameters = array(); + $parameters['Action'] = 'ReverseProviderCredit'; + $requestParameters = array_change_key_case($requestParameters, CASE_LOWER); + + $fieldMappings = array( + 'merchant_id' => 'SellerId', + 'amazon_provider_credit_id' => 'AmazonProviderCreditId', + 'credit_reversal_reference_id' => 'CreditReversalReferenceId', + 'credit_reversal_amount' => 'CreditReversalAmount.Amount', + 'currency_code' => 'CreditReversalAmount.CurrencyCode', + 'credit_reversal_note' => 'CreditReversalNote', + 'mws_auth_token' => 'MWSAuthToken' + ); + + $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters); + + return ($responseObject); + } + + /* Create an Array of required parameters, sort them + * Calculate signature and invoke the POST to the MWS Service URL + * + * @param AWSAccessKeyId [String] + * @param Version [String] + * @param SignatureMethod [String] + * @param Timestamp [String] + * @param Signature [String] + */ + + private function calculateSignatureAndParametersToString($parameters = array()) + { + $parameters['AWSAccessKeyId'] = $this->config['access_key']; + $parameters['Version'] = self::SERVICE_VERSION; + $parameters['SignatureMethod'] = 'HmacSHA256'; + $parameters['SignatureVersion'] = 2; + $parameters['Timestamp'] = $this->getFormattedTimestamp(); + uksort($parameters, 'strcmp'); + + $this->createServiceUrl(); + + $parameters['Signature'] = $this->signParameters($parameters); + $parameters = $this->getParametersAsString($parameters); + + // Save these parameters in the parameters variable so that it can be returned for unit testing. + $this->parameters = $parameters; + return $parameters; + } + + /* Computes RFC 2104-compliant HMAC signature for request parameters + * Implements AWS Signature, as per following spec: + * + * If Signature Version is 0, it signs concatenated Action and Timestamp + * + * If Signature Version is 1, it performs the following: + * + * Sorts all parameters (including SignatureVersion and excluding Signature, + * the value of which is being created), ignoring case. + * + * Iterate over the sorted list and append the parameter name (in original case) + * and then its value. It will not URL-encode the parameter values before + * constructing this string. There are no separators. + * + * If Signature Version is 2, string to sign is based on following: + * + * 1. The HTTP Request Method followed by an ASCII newline (%0A) + * 2. The HTTP Host header in the form of lowercase host, followed by an ASCII newline. + * 3. The URL encoded HTTP absolute path component of the URI + * (up to but not including the query string parameters); + * if this is empty use a forward '/'. This parameter is followed by an ASCII newline. + * 4. The concatenation of all query string components (names and values) + * as UTF-8 characters which are URL encoded as per RFC 3986 + * (hex characters MUST be uppercase), sorted using lexicographic byte ordering. + * Parameter names are separated from their values by the '=' character + * (ASCII character 61), even if the value is empty. + * Pairs of parameter and values are separated by the '&' character (ASCII code 38). + * + */ + + private function signParameters(array $parameters) + { + $signatureVersion = $parameters['SignatureVersion']; + $algorithm = "HmacSHA1"; + $stringToSign = null; + if (2 === $signatureVersion) { + $algorithm = "HmacSHA256"; + $parameters['SignatureMethod'] = $algorithm; + $stringToSign = $this->calculateStringToSignV2($parameters); + } else { + throw new \Exception("Invalid Signature Version specified"); + } + + return $this->sign($stringToSign, $algorithm); + } + + /* Calculate String to Sign for SignatureVersion 2 + * @param array $parameters request parameters + * @return String to Sign + */ + + private function calculateStringToSignV2(array $parameters) + { + $data = 'POST'; + $data .= "\n"; + $data .= $this->mwsEndpointUrl; + $data .= "\n"; + $data .= $this->mwsEndpointPath; + $data .= "\n"; + $data .= $this->getParametersAsString($parameters); + return $data; + } + + /* Convert paremeters to Url encoded query string */ + + private function getParametersAsString(array $parameters) + { + $queryParameters = array(); + foreach ($parameters as $key => $value) { + $queryParameters[] = $key . '=' . $this->urlEncode($value); + } + + return implode('&', $queryParameters); + } + + private function urlEncode($value) + { + return str_replace('%7E', '~', rawurlencode($value)); + } + + /* Computes RFC 2104-compliant HMAC signature */ + + private function sign($data, $algorithm) + { + if ($algorithm === 'HmacSHA1') { + $hash = 'sha1'; + } else if ($algorithm === 'HmacSHA256') { + $hash = 'sha256'; + } else { + throw new \Exception("Non-supported signing method specified"); + } + + return base64_encode(hash_hmac($hash, $data, $this->config['secret_key'], true)); + } + + /* Formats date as ISO 8601 timestamp */ + + private function getFormattedTimestamp() + { + return gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time()); + } + + /* invokePost takes the parameters and invokes the httpPost function to POST the parameters + * Exponential retries on error 500 and 503 + * The response from the POST is an XML which is converted to Array + */ + + private function invokePost($parameters) + { + $response = array(); + $statusCode = 200; + $this->success = false; + + // Submit the request and read response body + try { + $shouldRetry = true; + $retries = 0; + do { + try { + $this->constructUserAgentHeader(); + + $httpCurlRequest = new HttpCurl($this->config); + $response = $httpCurlRequest->httpPost($this->mwsServiceUrl, $this->userAgent, $parameters); + + // Split the API response into Response Body and the other parts of the response into other + list($other, $responseBody) = explode("\r\n\r\n", $response, 2); + $other = preg_split("/\r\n|\n|\r/", $other); + + list($protocol, $code, $text) = explode(' ', trim(array_shift($other)), 3); + $response = array( + 'Status' => (int) $code, + 'ResponseBody' => $responseBody + ); + + $statusCode = $response['Status']; + + if ($statusCode == 200) { + $shouldRetry = false; + $this->success = true; + } elseif ($statusCode == 500 || $statusCode == 503) { + + $shouldRetry = true; + if ($shouldRetry && strtolower($this->config['handle_throttle'])) { + $this->pauseOnRetry(++$retries, $statusCode); + } + } else { + $shouldRetry = false; + } + } catch (\Exception $e) { + throw $e; + } + } while ($shouldRetry); + } catch (\Exception $se) { + throw $se; + } + + return $response; + } + + /* Exponential sleep on failed request + * @param retries current retry + * @throws Exception if maximum number of retries has been reached + */ + + private function pauseOnRetry($retries, $status) + { + if ($retries <= self::MAX_ERROR_RETRY) { + $delay = (int) (pow(4, $retries) * 100000); + usleep($delay); + } else { + throw new \Exception('Error Code: '. $status.PHP_EOL.'Maximum number of retry attempts - '. $retries .' reached'); + } + } + + /* Create MWS service URL and the Endpoint path */ + + private function createServiceUrl() + { + $this->modePath = strtolower($this->config['sandbox']) ? 'OffAmazonPayments_Sandbox' : 'OffAmazonPayments'; + + if (!empty($this->config['region'])) { + $region = strtolower($this->config['region']); + if (array_key_exists($region, $this->regionMappings)) { + $this->mwsEndpointUrl = $this->mwsServiceUrls[$this->regionMappings[$region]]; + $this->mwsServiceUrl = 'https://' . $this->mwsEndpointUrl . '/' . $this->modePath . '/' . self::SERVICE_VERSION; + $this->mwsEndpointPath = '/' . $this->modePath . '/' . self::SERVICE_VERSION; + } else { + throw new \Exception($region . ' is not a valid region'); + } + } else { + throw new \Exception("config['region'] is a required parameter and is not set"); + } + } + + /* Based on the config['region'] and config['sandbox'] values get the user profile URL */ + + private function profileEndpointUrl() + { + if (!empty($this->config['region'])) { + $region = strtolower($this->config['region']); + + if (array_key_exists($region, $this->sandboxProfileEndpoint) && $this->config['sandbox'] ) { + $this->profileEndpoint = $this->sandboxProfileEndpoint[$region]; + } elseif (array_key_exists($region, $this->liveProfileEndpoint)) { + $this->profileEndpoint = $this->liveProfileEndpoint[$region]; + } else{ + throw new \Exception($region . ' is not a valid region'); + } + } else { + throw new \Exception("config['region'] is a required parameter and is not set"); + } + } + + /* Create the User Agent Header sent with the POST request */ + + private function constructUserAgentHeader() + { + $this->userAgent = $this->quoteApplicationName($this->config['application_name']) . '/' . $this->quoteApplicationVersion($this->config['application_version']); + $this->userAgent .= ' ('; + $this->userAgent .= 'Language=PHP/' . phpversion(); + $this->userAgent .= '; '; + $this->userAgent .= 'Platform=' . php_uname('s') . '/' . php_uname('m') . '/' . php_uname('r'); + $this->userAgent .= '; '; + $this->userAgent .= 'MWSClientVersion=' . self::MWS_CLIENT_VERSION; + $this->userAgent .= ')'; + } + + /* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', + * and '/' characters from a string. + * @param $s + * @return string + */ + + private function quoteApplicationName($s) + { + $quotedString = preg_replace('/ {2,}|\s/', ' ', $s); + $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); + $quotedString = preg_replace('/\//', '\\/', $quotedString); + return $quotedString; + } + + /* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', + * and '(' characters from a string. + * + * @param $s + * @return string + */ + + private function quoteApplicationVersion($s) + { + $quotedString = preg_replace('/ {2,}|\s/', ' ', $s); + $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); + $quotedString = preg_replace('/\\(/', '\\(', $quotedString); + return $quotedString; + } +} diff --git a/includes/gateways/libs/amazon/HttpCurl.php b/includes/gateways/libs/amazon/HttpCurl.php new file mode 100755 index 00000000000..937329a06a7 --- /dev/null +++ b/includes/gateways/libs/amazon/HttpCurl.php @@ -0,0 +1,129 @@ +config = $config; + } + + /* Setter for boolean header to get the user info */ + + public function setHttpHeader() + { + $this->header = true; + } + + /* Setter for Access token to get the user info */ + + public function setAccessToken($accesstoken) + { + $this->accessToken = $accesstoken; + } + + /* Add the common Curl Parameters to the curl handler $ch + * Also checks for optional parameters if provided in the config + * config['cabundle_file'] + * config['proxy_port'] + * config['proxy_host'] + * config['proxy_username'] + * config['proxy_password'] + */ + + private function commonCurlParams($url,$userAgent) + { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_PORT, 443); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + if (!is_null($this->config['cabundle_file'])) { + curl_setopt($ch, CURLOPT_CAINFO, $this->config['cabundle_file']); + } + + if (!empty($userAgent)) + curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); + + if ($this->config['proxy_host'] != null && $this->config['proxy_port'] != -1) { + curl_setopt($ch, CURLOPT_PROXY, $this->config['proxy_host'] . ':' . $this->config['proxy_port']); + } + + if ($this->config['proxy_username'] != null && $this->config['proxy_password'] != null) { + curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->config['proxy_username'] . ':' . $this->config['proxy_password']); + } + + return $ch; + } + + /* POST using curl for the following situations + * 1. API calls + * 2. IPN certificate retrieval + * 3. Get User Info + */ + + public function httpPost($url, $userAgent = null, $parameters = null) + { + $ch = $this->commonCurlParams($url,$userAgent); + + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); + curl_setopt($ch, CURLOPT_HEADER, true); + + $response = $this->execute($ch); + return $response; + } + + /* GET using curl for the following situations + * 1. IPN certificate retrieval + * 2. Get User Info + */ + + public function httpGet($url, $userAgent = null) + { + $ch = $this->commonCurlParams($url,$userAgent); + + // Setting the HTTP header with the Access Token only for Getting user info + if ($this->header) { + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + 'Authorization: bearer ' . $this->accessToken + )); + } + + $response = $this->execute($ch); + return $response; + } + + /* Execute Curl request */ + + private function execute($ch) + { + $response = ''; + if (!$response = curl_exec($ch)) { + $error_msg = "Unable to post request, underlying exception of " . curl_error($ch); + curl_close($ch); + throw new \Exception($error_msg); + } + curl_close($ch); + return $response; + } +} diff --git a/includes/gateways/libs/amazon/Interface.php b/includes/gateways/libs/amazon/Interface.php new file mode 100755 index 00000000000..65a6bd63ffd --- /dev/null +++ b/includes/gateways/libs/amazon/Interface.php @@ -0,0 +1,482 @@ +_response [XML] + */ + + public function toArray(); + + /* Get the status of the BillingAgreement */ + + public function getBillingAgreementDetailsStatus($response); +} diff --git a/includes/gateways/libs/amazon/IpnHandler.php b/includes/gateways/libs/amazon/IpnHandler.php new file mode 100755 index 00000000000..7de7f5c78cd --- /dev/null +++ b/includes/gateways/libs/amazon/IpnHandler.php @@ -0,0 +1,421 @@ + null, + 'proxy_host' => null, + 'proxy_port' => -1, + 'proxy_username' => null, + 'proxy_password' => null); + + + public function __construct($headers, $body, $ipnConfig = null) + { + $this->headers = array_change_key_case($headers, CASE_LOWER); + $this->body = $body; + + if ($ipnConfig != null) { + $this->checkConfigKeys($ipnConfig); + } + + // Get the list of fields that we are interested in + $this->fields = array( + "Timestamp" => true, + "Message" => true, + "MessageId" => true, + "Subject" => false, + "TopicArn" => true, + "Type" => true + ); + + // Validate the IPN message header [x-amz-sns-message-type] + $this->validateHeaders(); + + // Converts the IPN [Message] to Notification object + $this->getMessage(); + + // Checks if the notification [Type] is Notification and constructs the signature fields + $this->checkForCorrectMessageType(); + + // Verifies the signature against the provided pem file in the IPN + $this->constructAndVerifySignature(); + } + + private function checkConfigKeys($ipnConfig) + { + $ipnConfig = array_change_key_case($ipnConfig, CASE_LOWER); + $ipnConfig = trimArray($ipnConfig); + + foreach ($ipnConfig as $key => $value) { + if (array_key_exists($key, $this->ipnConfig)) { + $this->ipnConfig[$key] = $value; + } else { + throw new \Exception('Key ' . $key . ' is either not part of the configuration or has incorrect Key name. + check the ipnConfig array key names to match your key names of your config array ', 1); + } + } + } + + /* Setter function + * Sets the value for the key if the key exists in ipnConfig + */ + + public function __set($name, $value) + { + if (array_key_exists(strtolower($name), $this->ipnConfig)) { + $this->ipnConfig[$name] = $value; + } else { + throw new \Exception("Key " . $name . " is not part of the configuration", 1); + } + } + + /* Getter function + * Returns the value for the key if the key exists in ipnConfig + */ + + public function __get($name) + { + if (array_key_exists(strtolower($name), $this->ipnConfig)) { + return $this->ipnConfig[$name]; + } else { + throw new \Exception("Key " . $name . " was not found in the configuration", 1); + } + } + + /* Trim the input Array key values */ + + private function trimArray($array) + { + foreach ($array as $key => $value) + { + $array[$key] = trim($value); + } + return $array; + } + + private function validateHeaders() + { + // Quickly check that this is a sns message + if (!array_key_exists('x-amz-sns-message-type', $this->headers)) { + throw new \Exception("Error with message - header " . "does not contain x-amz-sns-message-type header"); + } + + if ($this->headers['x-amz-sns-message-type'] !== 'Notification') { + throw new \Exception("Error with message - header x-amz-sns-message-type is not " . "Notification, is " . $this->headers['x-amz-sns-message-type']); + } + } + + private function getMessage() + { + $this->snsMessage = json_decode($this->body, true); + + $json_error = json_last_error(); + + if ($json_error != 0) { + $errorMsg = "Error with message - content is not in json format" . $this->getErrorMessageForJsonError($json_error) . " " . $this->snsMessage; + throw new \Exception($errorMsg); + } + } + + /* Convert a json error code to a descriptive error message + * + * @param int $json_error message code + * + * @return string error message + */ + + private function getErrorMessageForJsonError($json_error) + { + switch ($json_error) { + case JSON_ERROR_DEPTH: + return " - maximum stack depth exceeded."; + break; + case JSON_ERROR_STATE_MISMATCH: + return " - invalid or malformed JSON."; + break; + case JSON_ERROR_CTRL_CHAR: + return " - control character error."; + break; + case JSON_ERROR_SYNTAX: + return " - syntax error."; + break; + default: + return "."; + break; + } + } + + /* checkForCorrectMessageType() + * + * Checks if the Field [Type] is set to ['Notification'] + * Gets the value for the fields marked true in the fields array + * Constructs the signature string + */ + + private function checkForCorrectMessageType() + { + $type = $this->getMandatoryField("Type"); + if (strcasecmp($type, "Notification") != 0) { + throw new \Exception("Error with SNS Notification - unexpected message with Type of " . $type); + } + + if (strcmp($this->getMandatoryField("Type"), "Notification") != 0) { + throw new \Exception("Error with signature verification - unable to verify " . $this->getMandatoryField("Type") . " message"); + } else { + + // Sort the fields into byte order based on the key name(A-Za-z) + ksort($this->fields); + + // Extract the key value pairs and sort in byte order + $signatureFields = array(); + foreach ($this->fields as $fieldName => $mandatoryField) { + if ($mandatoryField) { + $value = $this->getMandatoryField($fieldName); + } else { + $value = $this->getField($fieldName); + } + + if (!is_null($value)) { + array_push($signatureFields, $fieldName); + array_push($signatureFields, $value); + } + } + + /* Create the signature string - key / value in byte order + * delimited by newline character + ending with a new line character + */ + $this->signatureFields = implode("\n", $signatureFields) . "\n"; + + } + } + + /* Verify that the signature is correct for the given data and + * public key + * + * @param string $data data to validate + * @param string $signature decoded signature to compare against + * @param string $certificatePath path to certificate, can be file or url + * + * @throws Exception if there is an error with the call + * + * @return bool true if valid + */ + + private function constructAndVerifySignature() + { + $signature = base64_decode($this->getMandatoryField("Signature")); + $certificatePath = $this->getMandatoryField("SigningCertURL"); + + $this->certificate = $this->getCertificate($certificatePath); + + $result = $this->verifySignatureIsCorrectFromCertificate($signature); + if (!$result) { + throw new \Exception("Unable to match signature from remote server: signature of " . $this->getCertificate($certificatePath) . " , SigningCertURL of " . $this->getMandatoryField("SigningCertURL") . " , SignatureOf " . $this->getMandatoryField("Signature")); + } + } + + /* getCertificate($certificatePath) + * + * gets the certificate from the $certificatePath using Curl + */ + + private function getCertificate($certificatePath) + { + $httpCurlRequest = new HttpCurl($this->ipnConfig); + + $response = $httpCurlRequest->httpGet($certificatePath); + + return $response; + } + + /* Verify that the signature is correct for the given data and public key + * + * @param string $data data to validate + * @param string $signature decoded signature to compare against + * @param string $certificate certificate object defined in Certificate.php + */ + + public function verifySignatureIsCorrectFromCertificate($signature) + { + $certKey = openssl_get_publickey($this->certificate); + + if ($certKey === False) { + throw new \Exception("Unable to extract public key from cert"); + } + + try { + $certInfo = openssl_x509_parse($this->certificate, true); + $certSubject = $certInfo["subject"]; + + if (is_null($certSubject)) { + throw new \Exception("Error with certificate - subject cannot be found"); + } + } catch (\Exception $ex) { + throw new \Exception("Unable to verify certificate - error with the certificate subject", null, $ex); + } + + if (strcmp($certSubject["CN"], $this->expectedCnName)) { + throw new \Exception("Unable to verify certificate issued by Amazon - error with certificate subject"); + } + + $result = -1; + try { + $result = openssl_verify($this->signatureFields, $signature, $certKey, OPENSSL_ALGO_SHA1); + } catch (\Exception $ex) { + throw new \Exception("Unable to verify signature - error with the verification algorithm", null, $ex); + } + + return ($result > 0); + } + + + /* Extract the mandatory field from the message and return the contents + * + * @param string $fieldName name of the field to extract + * + * @throws Exception if not found + * + * @return string field contents if found + */ + + private function getMandatoryField($fieldName) + { + $value = $this->getField($fieldName); + if (is_null($value)) { + throw new \Exception("Error with json message - mandatory field " . $fieldName . " cannot be found"); + } + return $value; + } + + /* Extract the field if present, return null if not defined + * + * @param string $fieldName name of the field to extract + * + * @return string field contents if found, null otherwise + */ + + private function getField($fieldName) + { + if (array_key_exists($fieldName, $this->snsMessage)) { + return $this->snsMessage[$fieldName]; + } else { + return null; + } + } + + /* returnMessage() - JSON decode the raw [Message] portion of the IPN */ + + public function returnMessage() + { + return json_decode($this->snsMessage['Message'], true); + } + + /* toJson() - Converts IPN [Message] field to JSON + * + * Has child elements + * ['NotificationData'] [XML] - API call XML notification data + * @param remainingFields - consists of remaining IPN array fields that are merged + * Type - Notification + * MessageId - ID of the Notification + * Topic ARN - Topic of the IPN + * @return response in JSON format + */ + + public function toJson() + { + $response = $this->simpleXmlObject(); + + // Merging the remaining fields with the response + $remainingFields = $this->getRemainingIpnFields(); + $responseArray = array_merge($remainingFields,(array)$response); + + // Converting to JSON format + $response = json_encode($responseArray); + + return $response; + } + + /* toArray() - Converts IPN [Message] field to associative array + * @return response in array format + */ + + public function toArray() + { + $response = $this->simpleXmlObject(); + + // Converting the SimpleXMLElement Object to array() + $response = json_encode($response); + $response = json_decode($response, true); + + // Merging the remaining fields with the response array + $remainingFields = $this->getRemainingIpnFields(); + $response = array_merge($remainingFields,$response); + + return $response; + } + + /* addRemainingFields() - Add remaining fields to the datatype + * + * Has child elements + * ['NotificationData'] [XML] - API call XML response data + * Convert to SimpleXML element object + * Type - Notification + * MessageId - ID of the Notification + * Topic ARN - Topic of the IPN + * @return response in array format + */ + + private function simpleXmlObject() + { + $ipnMessage = $this->returnMessage(); + + // Getting the Simple XML element object of the IPN XML Response Body + $response = simplexml_load_string((string) $ipnMessage['NotificationData']); + + // Adding the Type, MessageId, TopicArn details of the IPN to the Simple XML element Object + $response->addChild('Type', $this->snsMessage['Type']); + $response->addChild('MessageId', $this->snsMessage['MessageId']); + $response->addChild('TopicArn', $this->snsMessage['TopicArn']); + + return $response; + } + + /* getRemainingIpnFields() + * Gets the remaining fields of the IPN to be later appended to the return message + */ + + private function getRemainingIpnFields() + { + $ipnMessage = $this->returnMessage(); + + $remainingFields = array( + 'NotificationReferenceId' =>$ipnMessage['NotificationReferenceId'], + 'NotificationType' =>$ipnMessage['NotificationType'], + 'IsSample' =>$ipnMessage['IsSample'], + 'SellerId' =>$ipnMessage['SellerId'], + 'ReleaseEnvironment' =>$ipnMessage['ReleaseEnvironment'], + 'Version' =>$ipnMessage['Version']); + + return $remainingFields; + } +} diff --git a/includes/gateways/libs/amazon/ResponseParser.php b/includes/gateways/libs/amazon/ResponseParser.php new file mode 100755 index 00000000000..92a2e15a53a --- /dev/null +++ b/includes/gateways/libs/amazon/ResponseParser.php @@ -0,0 +1,86 @@ +response = $response; + } + + /* Returns the XML portion of the response */ + + public function toXml() + { + return $this->response['ResponseBody']; + } + + /* toJson - converts XML into Json + * @param $response [XML] + */ + + public function toJson() + { + $response = $this->simpleXmlObject(); + + return (json_encode($response)); + } + + /* toArray - converts XML into associative array + * @param $this->response [XML] + */ + + public function toArray() + { + $response = $this->simpleXmlObject(); + + // Converting the SimpleXMLElement Object to array() + $response = json_encode($response); + + return (json_decode($response, true)); + } + + private function simpleXmlObject() + { + $response = $this->response; + + // Getting the HttpResponse Status code to the output as a string + $status = strval($response['Status']); + + // Getting the Simple XML element object of the XML Response Body + $response = simplexml_load_string((string) $response['ResponseBody']); + + // Adding the HttpResponse Status code to the output as a string + $response->addChild('ResponseStatus', $status); + + return $response; + } + + /* Get the status of the BillingAgreement */ + + public function getBillingAgreementDetailsStatus($response) + { + $data= new \SimpleXMLElement($response); + $namespaces = $data->getNamespaces(true); + foreach($namespaces as $key=>$value){ + $namespace = $value; + } + $data->registerXPathNamespace('GetBA', $namespace); + foreach ($data->xpath('//GetBA:BillingAgreementStatus') as $value) { + $baStatus = json_decode(json_encode((array)$value), TRUE); + } + + return $baStatus ; + } +} diff --git a/includes/gateways/manual.php b/includes/gateways/manual.php index 388c1523bdc..7f9d0f44527 100755 --- a/includes/gateways/manual.php +++ b/includes/gateways/manual.php @@ -2,48 +2,44 @@ /** * Manual Gateway * - * @package Easy Digital Downloads - * @subpackage Manual Gateway - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Gateways + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 -*/ + * @since 1.0 + */ +// Exit if accessed directly. +defined( 'ABSPATH' ) || exit; /** - * Manual Remove CC Form + * Manual Gateway does not need a CC form, so remove it. * - * Manual does not need a CC form, so remove it. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_manual_remove_cc_form() { - // we only register the action so that the default CC form is not shown -} -add_action('edd_manual_cc_form', 'edd_manual_remove_cc_form'); - + * @since 1.0 + * @return void + */ +add_action( 'edd_manual_cc_form', '__return_false' ); /** - * Manual Payment + * Processes the purchase data and uses the Manual Payment gateway to record + * the transaction in the Purchase History * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_manual_payment($purchase_data) { - global $edd_options; + * @since 1.0 + * @param array $purchase_data Purchase Data. + * @return void + */ +function edd_manual_payment( $purchase_data ) { + if ( ! wp_verify_nonce( $purchase_data['gateway_nonce'], 'edd-gateway' ) ) { + wp_die( __( 'Nonce verification has failed', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } - /* - * purchase data comes in like this + /* + * Purchase data comes in like this * $purchase_data = array( 'downloads' => array of download IDs, 'price' => total price of cart contents, - 'purchase_key' => // random key + 'purchase_key' => // Random key 'user_email' => $user_email, 'date' => date('Y-m-d H:i:s'), 'user_id' => $user_id, @@ -52,30 +48,32 @@ function edd_manual_payment($purchase_data) { 'cart_details' => array of cart details, ); */ - - $payment = array( - 'price' => $purchase_data['price'], - 'date' => $purchase_data['date'], - 'user_email' => $purchase_data['user_email'], + + $payment_data = array( + 'price' => $purchase_data['price'], + 'date' => $purchase_data['date'], + 'user_email' => $purchase_data['user_email'], 'purchase_key' => $purchase_data['purchase_key'], - 'currency' => $edd_options['currency'], - 'downloads' => $purchase_data['downloads'], - 'user_info' => $purchase_data['user_info'], + 'currency' => edd_get_currency(), + 'downloads' => $purchase_data['downloads'], + 'user_info' => $purchase_data['user_info'], 'cart_details' => $purchase_data['cart_details'], - 'status' => 'pending' + 'status' => 'pending', ); - - // record the pending payment - $payment = edd_insert_payment($payment); - - if($payment) { - edd_update_payment_status($payment, 'publish'); - // empty the shopping cart + + // Record the pending payment. + $payment = edd_insert_payment( $payment_data ); + + if ( $payment ) { + edd_update_payment_status( $payment, 'complete' ); + // Empty the shopping cart. edd_empty_cart(); edd_send_to_success_page(); } else { - // if errors are present, send the user back to the purchase page so they can be corrected - edd_send_back_to_checkout('?payment-mode=' . $purchase_data['post_data']['edd-gateway']); + /* translators: %s: payment data */ + edd_record_gateway_error( __( 'Payment Error', 'easy-digital-downloads' ), sprintf( __( 'Payment creation failed while processing a manual (free or test) purchase. Payment data: %s', 'easy-digital-downloads' ), json_encode( $payment_data ) ), $payment ); + // If errors are present, send the user back to the purchase page so they can be corrected. + edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['edd-gateway'] ); } } -add_action('edd_gateway_manual', 'edd_manual_payment'); \ No newline at end of file +add_action( 'edd_gateway_manual', 'edd_manual_payment' ); diff --git a/includes/gateways/paypal-standard.php b/includes/gateways/paypal-standard.php old mode 100644 new mode 100755 index 4bfb188d08b..20a41e34276 --- a/includes/gateways/paypal-standard.php +++ b/includes/gateways/paypal-standard.php @@ -2,333 +2,1404 @@ /** * PayPal Standard Gateway * - * @package Easy Digital Downloads - * @subpackage PayPal Standard Gateway - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Gateways + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 -*/ + * @since 1.0 + */ +use EDD\Orders\Order; + +// Exit if accessed directly. +defined( 'ABSPATH' ) || exit; /** * PayPal Remove CC Form * * PayPal Standard does not need a CC form, so remove it. * - * @access private - * @since 1.0 - * @return void -*/ + * @access private + * @since 1.0 + */ +add_action( 'edd_paypal_cc_form', '__return_false' ); + +/** + * Register the PayPal Standard gateway subsection + * + * @since 2.6 + * @param array $gateway_sections Current Gateway Tab subsections. + * @return array Gateway subsections with PayPal Standard + */ +function edd_register_paypal_gateway_section( $gateway_sections ) { + if ( \EDD\Gateways\PayPal\paypal_standard_enabled() ) { + $gateway_sections['paypal'] = __( 'PayPal Standard', 'easy-digital-downloads' ); + } -function edd_paypal_remove_cc_form() { - // we only register the action so that the default CC form is not shown + return $gateway_sections; } -add_action( 'edd_paypal_cc_form', 'edd_paypal_remove_cc_form' ); +add_filter( 'edd_settings_sections_gateways', 'edd_register_paypal_gateway_section', 1, 1 ); + +/** + * Registers the PayPal Standard settings for the PayPal Standard subsection + * + * @since 2.6 + * @param array $gateway_settings Gateway tab settings. + * @return array Gateway tab settings with the PayPal Standard settings + */ +function edd_register_paypal_gateway_settings( $gateway_settings ) { + if ( ! \EDD\Gateways\PayPal\paypal_standard_enabled() ) { + return $gateway_settings; + } + + $paypal_settings = array( + 'paypal_email' => array( + 'id' => 'paypal_email', + 'name' => __( 'PayPal Email', 'easy-digital-downloads' ), + 'desc' => __( 'Enter your PayPal account\'s email', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'paypal_image_url' => array( + 'id' => 'paypal_image_url', + 'name' => __( 'PayPal Image', 'easy-digital-downloads' ), + 'desc' => __( 'Upload an image to display on the PayPal checkout page.', 'easy-digital-downloads' ), + 'type' => 'upload', + 'size' => 'regular', + ), + ); + + $pdt_desc = sprintf( + /* translators: %s: Documentation URL */ + __( 'Enter your PayPal Identity Token in order to enable Payment Data Transfer (PDT). This allows payments to be verified without relying on the PayPal IPN. See our documentation for further information.', 'easy-digital-downloads' ), + 'https://easydigitaldownloads.com/docs/paypal-legacy-gateways-standard-express-pro-advanced/' + ); + + $paypal_settings['paypal_identify_token'] = array( + 'id' => 'paypal_identity_token', + 'name' => __( 'PayPal Identity Token', 'easy-digital-downloads' ), + 'type' => 'text', + 'desc' => $pdt_desc, + 'size' => 'regular', + ); + $desc = sprintf( + /* translators: %s: FAQ URL */ + __( 'If you are unable to use Payment Data Transfer and payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases. See our FAQ for further information.', 'easy-digital-downloads' ), + 'https://easydigitaldownloads.com/docs/paypal-payments-not-marked-as-complete/' + ); + + $paypal_settings['disable_paypal_verification'] = array( + 'id' => 'disable_paypal_verification', + 'name' => __( 'Disable PayPal IPN Verification', 'easy-digital-downloads' ), + 'check' => __( 'Disabled', 'easy-digital-downloads' ), + 'desc' => $desc, + 'type' => 'checkbox_description', + ); + + $api_key_settings = array( + 'paypal_api_keys_desc' => array( + 'id' => 'paypal_api_keys_desc', + 'name' => __( 'API Credentials', 'easy-digital-downloads' ), + 'type' => 'descriptive_text', + 'desc' => sprintf( + /* translators: %s: PayPal API Credentials URL */ + __( 'API credentials are necessary to process PayPal refunds from inside WordPress. These can be obtained from your PayPal account.', 'easy-digital-downloads' ), + 'https://developer.paypal.com/docs/classic/api/apiCredentials/#creating-an-api-signature' + ), + ), + 'paypal_live_api_username' => array( + 'id' => 'paypal_live_api_username', + 'name' => __( 'Live API Username', 'easy-digital-downloads' ), + 'desc' => __( 'Your PayPal live API username. ', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'paypal_live_api_password' => array( + 'id' => 'paypal_live_api_password', + 'name' => __( 'Live API Password', 'easy-digital-downloads' ), + 'desc' => __( 'Your PayPal live API password.', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'paypal_live_api_signature' => array( + 'id' => 'paypal_live_api_signature', + 'name' => __( 'Live API Signature', 'easy-digital-downloads' ), + 'desc' => __( 'Your PayPal live API signature.', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'paypal_test_api_username' => array( + 'id' => 'paypal_test_api_username', + 'name' => __( 'Test API Username', 'easy-digital-downloads' ), + 'desc' => __( 'Your PayPal test API username.', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'paypal_test_api_password' => array( + 'id' => 'paypal_test_api_password', + 'name' => __( 'Test API Password', 'easy-digital-downloads' ), + 'desc' => __( 'Your PayPal test API password.', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + 'paypal_test_api_signature' => array( + 'id' => 'paypal_test_api_signature', + 'name' => __( 'Test API Signature', 'easy-digital-downloads' ), + 'desc' => __( 'Your PayPal test API signature.', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + ), + ); + + $paypal_settings = array_merge( $paypal_settings, $api_key_settings ); + + $paypal_settings = apply_filters( 'edd_paypal_settings', $paypal_settings ); + $gateway_settings['paypal'] = $paypal_settings; + + return $gateway_settings; +} +add_filter( 'edd_settings_gateways', 'edd_register_paypal_gateway_settings', 1, 1 ); /** * Process PayPal Purchase * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @param array $purchase_data Purchase Data. + * @return void + */ function edd_process_paypal_purchase( $purchase_data ) { - global $edd_options; - - // check there is a gateway name - if ( ! isset( $purchase_data['post_data']['edd-gateway'] ) ) - return; - - /* - Purchase data comes in like this: - //////////////////////////////// - - $purchase_data = array( - 'downloads' => array of download IDs, - 'price' => total price of cart contents, - 'purchase_key' => // random key - 'user_email' => $user_email, - 'date' => date( 'Y-m-d H:i:s' ), - 'user_id' => $user_id, - 'post_data' => $_POST, - 'user_info' => array of user's information and used discount code - 'cart_details' => array of cart details, - ); - */ - - // collect payment data - $payment_data = array( - 'price' => $purchase_data['price'], - 'date' => $purchase_data['date'], - 'user_email' => $purchase_data['user_email'], - 'purchase_key' => $purchase_data['purchase_key'], - 'currency' => $edd_options['currency'], - 'downloads' => $purchase_data['downloads'], - 'user_info' => $purchase_data['user_info'], - 'cart_details' => $purchase_data['cart_details'], - 'status' => 'pending' - ); - - // record the pending payment - $payment = edd_insert_payment( $payment_data ); - - // check payment - if ( ! $payment ) { - // problems? send back - edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['edd-gateway'] ); - } else { - // only send to PayPal if the pending payment is created successfully - $listener_url = trailingslashit( home_url() ).'?edd-listener=IPN'; - - // get the success url - $return_url = add_query_arg( 'payment-confirmation', 'paypal', get_permalink( $edd_options['success_page'] ) ); - - // get the complete cart cart_summary - $summary = edd_get_purchase_summary( $purchase_data, false ); - - // get the PayPal redirect uri - $paypal_redirect = trailingslashit( edd_get_paypal_redirect() ) . '?'; - - // setup PayPal arguments - $paypal_args = array( - 'cmd' => '_xclick', - 'amount' => $purchase_data['price'], - 'business' => $edd_options['paypal_email'], - 'item_name' => stripslashes_deep( html_entity_decode( $summary, ENT_COMPAT, 'UTF-8' ) ), - 'email' => $purchase_data['user_email'], - 'no_shipping' => '1', - 'shipping' => '0', - 'no_note' => '1', - 'currency_code' => $edd_options['currency'], - 'item_number' => $purchase_data['purchase_key'], - 'charset' => get_bloginfo( 'charset' ), - 'custom' => $payment, - 'rm' => '2', - 'return' => $return_url, - 'notify_url' => $listener_url - ); - - // build query - $paypal_redirect .= http_build_query( apply_filters('edd_paypal_redirect_args', $paypal_args, $purchase_data ) ); - - // get rid of cart contents - edd_empty_cart(); - - // Redirect to PayPal - wp_redirect( $paypal_redirect ); - exit; - } - + if ( ! wp_verify_nonce( $purchase_data['gateway_nonce'], 'edd-gateway' ) ) { + wp_die( __( 'Nonce verification has failed', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + // Collect payment data. + $payment_data = array( + 'price' => $purchase_data['price'], + 'date' => $purchase_data['date'], + 'user_email' => $purchase_data['user_email'], + 'purchase_key' => $purchase_data['purchase_key'], + 'currency' => edd_get_currency(), + 'downloads' => $purchase_data['downloads'], + 'user_info' => $purchase_data['user_info'], + 'cart_details' => $purchase_data['cart_details'], + 'gateway' => 'paypal', + 'status' => ! empty( $purchase_data['buy_now'] ) ? 'private' : 'pending', + ); + + // Record the pending payment. + $payment = edd_insert_payment( $payment_data ); + + // Check payment. + if ( ! $payment ) { + // Record the error. + /* translators: %s: payment data */ + edd_record_gateway_error( __( 'Payment Error', 'easy-digital-downloads' ), sprintf( __( 'Payment creation failed before sending buyer to PayPal. Payment data: %s', 'easy-digital-downloads' ), json_encode( $payment_data ) ), $payment ); + // Problems? send back. + edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['edd-gateway'] ); + } else { + // Only send to PayPal if the pending payment is created successfully. + $listener_url = add_query_arg( 'edd-listener', 'IPN', home_url( 'index.php' ) ); + + // Set the session data to recover this payment in the event of abandonment or error. + EDD()->session->set( 'edd_resume_payment', $payment ); + + // Get the success url. + $return_url = add_query_arg( + array( + 'payment-confirmation' => 'paypal', + 'payment-id' => urlencode( $payment ), + ), + get_permalink( edd_get_option( 'success_page', false ) ) + ); + + // Get the PayPal redirect uri. + $paypal_redirect = trailingslashit( edd_get_paypal_redirect() ) . '?'; + + // Setup PayPal arguments. + $paypal_args = array( + 'business' => edd_get_option( 'paypal_email', false ), + 'email' => $purchase_data['user_email'], + 'first_name' => $purchase_data['user_info']['first_name'], + 'last_name' => $purchase_data['user_info']['last_name'], + 'invoice' => $purchase_data['purchase_key'], + 'no_shipping' => '1', + 'shipping' => '0', + 'no_note' => '1', + 'currency_code' => edd_get_currency(), + 'charset' => get_bloginfo( 'charset' ), + 'custom' => $payment, + 'rm' => '2', + 'return' => esc_url_raw( $return_url ), + 'cancel_return' => esc_url_raw( edd_get_failed_transaction_uri( '?payment-id=' . sanitize_key( $payment ) ) ), + 'notify_url' => esc_url_raw( $listener_url ), + 'image_url' => esc_url_raw( edd_get_paypal_image_url() ), + 'cbt' => get_bloginfo( 'name' ), + 'bn' => 'EasyDigitalDownloads_SP', + ); + + if ( ! empty( $purchase_data['user_info']['address'] ) ) { + $paypal_args['address1'] = $purchase_data['user_info']['address']['line1']; + $paypal_args['address2'] = $purchase_data['user_info']['address']['line2']; + $paypal_args['city'] = $purchase_data['user_info']['address']['city']; + $paypal_args['country'] = $purchase_data['user_info']['address']['country']; + } + + $paypal_extra_args = array( + 'cmd' => '_cart', + 'upload' => '1', + ); + + $paypal_args = array_merge( $paypal_extra_args, $paypal_args ); + + // Add cart items. + $i = 1; + $paypal_sum = 0; + if ( is_array( $purchase_data['cart_details'] ) && ! empty( $purchase_data['cart_details'] ) ) { + foreach ( $purchase_data['cart_details'] as $item ) { + + $item_amount = round( ( $item['subtotal'] / $item['quantity'] ) - ( $item['discount'] / $item['quantity'] ), 2 ); + + if ( $item_amount <= 0 ) { + $item_amount = 0; + } + + $paypal_args[ 'item_name_' . $i ] = stripslashes_deep( html_entity_decode( edd_get_cart_item_name( $item ), ENT_COMPAT, 'UTF-8' ) ); + $paypal_args[ 'quantity_' . $i ] = $item['quantity']; + $paypal_args[ 'amount_' . $i ] = $item_amount; + + if ( edd_use_skus() ) { + $paypal_args[ 'item_number_' . $i ] = edd_get_download_sku( $item['id'] ); + } + + $paypal_sum += ( $item_amount * $item['quantity'] ); + + ++$i; + + } + } + + // Calculate discount. + $discounted_amount = 0.00; + if ( ! empty( $purchase_data['fees'] ) ) { + $i = empty( $i ) ? 1 : $i; + foreach ( $purchase_data['fees'] as $fee ) { + if ( empty( $fee['download_id'] ) && floatval( $fee['amount'] ) > '0' ) { + // this is a positive fee. + $paypal_args[ 'item_name_' . $i ] = stripslashes_deep( html_entity_decode( wp_strip_all_tags( $fee['label'] ), ENT_COMPAT, 'UTF-8' ) ); + $paypal_args[ 'quantity_' . $i ] = '1'; + $paypal_args[ 'amount_' . $i ] = edd_sanitize_amount( $fee['amount'] ); + ++$i; + } elseif ( empty( $fee['download_id'] ) ) { + + // This is a negative fee (discount) not assigned to a specific Download. + $discounted_amount += abs( $fee['amount'] ); + } + } + } + + $price_before_discount = $purchase_data['price']; + if ( $discounted_amount > '0' ) { + $paypal_args['discount_amount_cart'] = edd_sanitize_amount( $discounted_amount ); + + /* + * Add the discounted amount back onto the price to get the "price before discount". We do this + * to avoid double applying any discounts below. + * @link https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6837 + */ + $price_before_discount += $paypal_args['discount_amount_cart']; + } + + // Check if there are any additional discounts we need to add that we haven't already accounted for. + if ( $paypal_sum > $price_before_discount ) { + $difference = round( $paypal_sum - $price_before_discount, 2 ); + if ( ! isset( $paypal_args['discount_amount_cart'] ) ) { + $paypal_args['discount_amount_cart'] = 0; + } + $paypal_args['discount_amount_cart'] += $difference; + } + + // Add taxes to the cart. + if ( edd_use_taxes() ) { + + $paypal_args['tax_cart'] = edd_sanitize_amount( $purchase_data['tax'] ); + + } + + $paypal_args = apply_filters( 'edd_paypal_redirect_args', $paypal_args, $purchase_data ); + + edd_debug_log( 'PayPal arguments: ' . print_r( $paypal_args, true ) ); + + // Build query. + $paypal_redirect .= http_build_query( $paypal_args ); + + // Fix for some sites that encode the entities. + $paypal_redirect = str_replace( '&', '&', $paypal_redirect ); + + // Allow paypal as a redirect destination. + add_filter( 'allowed_redirect_hosts', 'edd_allow_redirect_to_paypal', 10 ); + + // Redirect to PayPal. + edd_redirect( $paypal_redirect ); + } } add_action( 'edd_gateway_paypal', 'edd_process_paypal_purchase' ); - /** - * Listen For PayPal IPN + * Add paypal.com to the list of allowed hosts that wp_safe_redirect can redirect to. * - * Listens for a PayPal IPN requests and then sends to the processing function. - * - * @access private - * @since 1.0 - * @return void -*/ + * @since 3.0 + * @param array $redirects - The list of urls that wp_safe_redirect can redirect to. + * @return array + */ +function edd_allow_redirect_to_paypal( $redirects ) { + $redirects[] = 'www.sandbox.paypal.com'; + $redirects[] = 'sandbox.paypal.com'; + $redirects[] = 'www.paypal.com'; + $redirects[] = 'paypal.com'; + return $redirects; +} +/** + * Listens for a PayPal IPN requests and then sends to the processing function + * + * @since 1.0 + * @return void + */ function edd_listen_for_paypal_ipn() { - global $edd_options; - - - // regular PayPal IPN - if ( ! isset( $edd_options['paypal_alternate_verification'] ) ) { - - if ( isset( $_GET['edd-listener'] ) && $_GET['edd-listener'] == 'IPN' ) { - do_action( 'edd_verify_paypal_ipn' ); - } - - // alternate purchase verification - } else { - - if ( isset( $_GET['tx'] ) && isset( $_GET['st'] ) && isset( $_GET['amt'] ) && isset( $_GET['cc'] ) && isset( $_GET['cm'] ) && isset( $_GET['item_number'] ) ) { - // we are using the alternate method of verifying PayPal purchases - - // setup each of the variables from PayPal - $payment_status = $_GET['st']; - $paypal_amount = $_GET['amt']; - $payment_id = $_GET['cm']; - $purchase_key = $_GET['item_number']; - $currency = $_GET['cc']; - - // retrieve the meta info for this payment - $payment_meta = get_post_meta( $payment_id, '_edd_payment_meta', true ); - $payment_amount = edd_format_amount( $payment_meta['amount'] ); - - if ( $currency != $edd_options['currency'] ) { - return; // the currency code is invalid - } - if ( number_format((float)$paypal_amount, 2) != $payment_amount ) { - return; // the prices don't match - } - if ( $purchase_key != $payment_meta['key'] ) { - return; // purchase keys don't match - } - if ( strtolower( $payment_status ) != 'completed' || edd_is_test_mode() ) { - return; // payment wasn't completed - } - - // everything has been verified, update the payment to "complete" - edd_update_payment_status( $payment_id, 'publish' ); - } - } + // Regular PayPal IPN. + if ( isset( $_GET['edd-listener'] ) && 'ipn' === strtolower( $_GET['edd-listener'] ) ) { + + edd_debug_log( 'PayPal IPN endpoint loaded' ); + + /** + * This is necessary to delay execution of PayPal PDT and to avoid a race condition causing the order status + * updates to be triggered twice. + * + * @since 2.9.4 + * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6605 + */ + $token = edd_get_option( 'paypal_identity_token' ); + if ( $token ) { + sleep( 5 ); + } + + do_action( 'edd_verify_paypal_ipn' ); + } } add_action( 'init', 'edd_listen_for_paypal_ipn' ); - /** * Process PayPal IPN * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @return void + */ function edd_process_paypal_ipn() { - global $edd_options; - - // check the request method is POST - if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] != 'POST' ) { - return; - } - - // set initial post data to false - $post_data = false; - - // fallback just in case post_max_size is lower than needed - if ( ini_get( 'allow_url_fopen' ) ) { - $post_data = file_get_contents( 'php://input' ); + // Check the request method is POST. + if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' !== $_SERVER['REQUEST_METHOD'] ) { + return; + } + + edd_debug_log( 'edd_process_paypal_ipn() running during PayPal IPN processing' ); + + // Set initial post data to empty string. + $post_data = ''; + + // Fallback just in case post_max_size is lower than needed. + if ( ini_get( 'allow_url_fopen' ) ) { + $post_data = file_get_contents( 'php://input' ); } else { - // if allow_url_fopen is not enabled, then make sure that post_max_size is large enough - ini_set('post_max_size', '12M'); - } - // start the encoded data collection with notification command - $encoded_data = 'cmd=_notify-validate'; - - // get current arg separator - $arg_separator = edd_get_php_arg_separator_output(); - - // verify there is a post_data - if ( $post_data || strlen( $post_data ) > 0 ) { - // append the data - $encoded_data .= $arg_separator.$post_data; - } else { - // check if POST is empty - if ( empty( $_POST ) ) { - // nothing to do - return; - } else { - // loop trough each POST - foreach ( $_POST as $key => $value ) { - // encode the value and append the data - $encoded_data .= $arg_separator."$key=" . urlencode( $value ); - } - } - } - - // convert collected post data to an array - parse_str( $encoded_data, $encoded_data_array ); - - // get the PayPal redirect uri - $paypal_redirect = edd_get_paypal_redirect(true); - - $remote_post_vars = array( - 'method' => 'POST', - 'timeout' => 45, - 'redirection' => 5, - 'httpversion' => '1.0', - 'blocking' => true, - 'headers' => array(), - 'body' => $encoded_data_array - ); - - // get response - $api_response = wp_remote_post( edd_get_paypal_redirect(), $remote_post_vars ); - - if( is_wp_error( $api_response) ) - return; // something went wrong - - if ($api_response['body'] !== 'VERIFIED' && !isset($edd_options['disable_paypal_verification']) ) - return; // response not okay - - // convert collected post data to an array - parse_str( $post_data, $post_data_array ); - - // check if $post_data_array has been populated - if ( ! is_array( $encoded_data_array ) && ! empty( $encoded_data_array ) ) - return; - - // collect payment details - $payment_id = $encoded_data_array['custom']; - $purchase_key = $encoded_data_array['item_number']; - $paypal_amount = $encoded_data_array['mc_gross']; - $payment_status = $encoded_data_array['payment_status']; - $currency_code = strtolower( $encoded_data_array['mc_currency'] ); - - // retrieve the meta info for this payment - $payment_meta = get_post_meta( $payment_id, '_edd_payment_meta', true ); - $payment_amount = edd_format_amount( $payment_meta['amount'] ); - - // verify details - if ( $currency_code != strtolower( $edd_options['currency'] ) ) { - // the currency code is invalid - return; - } - if ( number_format((float)$paypal_amount, 2) != $payment_amount ) { - // the prices don't match - //return; - } - if ( $purchase_key != $payment_meta['key'] ) { - // purchase keys don't match - return; - } - - if ( isset( $encoded_data_array['txn_type'] ) && $encoded_data_array['txn_type'] == 'web_accept' ) { - - $status = strtolower( $payment_status ); - - if ( $status == 'completed' || edd_is_test_mode() ) { - edd_update_payment_status( $payment_id, 'publish' ); - } - - } + // If allow_url_fopen is not enabled, then make sure that post_max_size is large enough. + ini_set( 'post_max_size', '12M' ); + } + // Start the encoded data collection with notification command. + $encoded_data = 'cmd=_notify-validate'; + + // Get current arg separator. + $arg_separator = edd_get_php_arg_separator_output(); + + // Verify there is a post_data. + if ( $post_data || strlen( $post_data ) > 0 ) { + // Append the data. + $encoded_data .= $arg_separator . $post_data; + } else { + // Check if POST is empty. + if ( empty( $_POST ) ) { + // Nothing to do. + return; + } else { + // Loop through each POST. + foreach ( $_POST as $key => $value ) { + // Encode the value and append the data. + $encoded_data .= $arg_separator . "$key=" . urlencode( $value ); + } + } + } + + // Convert collected post data to an array. + parse_str( $encoded_data, $encoded_data_array ); + + foreach ( $encoded_data_array as $key => $value ) { + + if ( false !== strpos( $key, 'amp;' ) ) { + $new_key = str_replace( '&', '&', $key ); + $new_key = str_replace( 'amp;', '&', $new_key ); + + unset( $encoded_data_array[ $key ] ); + $encoded_data_array[ $new_key ] = $value; + } + } + + /** + * PayPal Web IPN Verification + * + * Allows filtering the IPN Verification data that PayPal passes back in via IPN with PayPal Standard + * + * @since 2.8.13 + * + * @param array $data The PayPal Web Accept Data + */ + $encoded_data_array = apply_filters( 'edd_process_paypal_ipn_data', $encoded_data_array ); + + edd_debug_log( 'encoded_data_array data array: ' . print_r( $encoded_data_array, true ) ); + + if ( ! edd_get_option( 'disable_paypal_verification' ) ) { + + // Validate the IPN. + + $remote_post_vars = array( + 'method' => 'POST', + 'timeout' => 45, + 'redirection' => 5, + 'httpversion' => '1.1', + 'blocking' => true, + 'headers' => array( + 'host' => 'www.paypal.com', + 'connection' => 'close', + 'content-type' => 'application/x-www-form-urlencoded', + 'post' => '/cgi-bin/webscr HTTP/1.1', + 'user-agent' => 'EDD IPN Verification/' . EDD_VERSION . '; ' . get_bloginfo( 'url' ), + + ), + 'sslverify' => false, + 'body' => $encoded_data_array, + ); + + edd_debug_log( 'Attempting to verify PayPal IPN. Data sent for verification: ' . print_r( $remote_post_vars, true ) ); + + // Get response. + $api_response = wp_remote_post( edd_get_paypal_redirect( true, true ), $remote_post_vars ); + + if ( is_wp_error( $api_response ) ) { + edd_record_gateway_error( + __( 'IPN Error', 'easy-digital-downloads' ), + /* translators: %s: IPN Verification response */ + sprintf( __( 'Invalid IPN verification response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $api_response ) ) + ); + edd_debug_log( 'Invalid IPN verification response. IPN data: ' . print_r( $api_response, true ) ); + + return; // Something went wrong. + } + + if ( wp_remote_retrieve_body( $api_response ) !== 'VERIFIED' && edd_get_option( 'disable_paypal_verification', false ) ) { + edd_record_gateway_error( + __( 'IPN Error', 'easy-digital-downloads' ), + /* translators: %s: IPN Verification response */ + sprintf( __( 'Invalid IPN verification response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $api_response ) ) + ); + edd_debug_log( 'Invalid IPN verification response. IPN data: ' . print_r( $api_response, true ) ); + + return; // Response not okay. + } + + edd_debug_log( 'IPN verified successfully' ); + } + + // Check if $post_data_array has been populated. + if ( ! is_array( $encoded_data_array ) && ! empty( $encoded_data_array ) ) { + return; + } + + $defaults = array( + 'txn_type' => '', + 'payment_status' => '', + ); + + $encoded_data_array = wp_parse_args( $encoded_data_array, $defaults ); + + $payment_id = 0; + + if ( ! empty( $encoded_data_array['parent_txn_id'] ) ) { + $payment_id = edd_get_purchase_id_by_transaction_id( $encoded_data_array['parent_txn_id'] ); + } elseif ( ! empty( $encoded_data_array['txn_id'] ) ) { + $payment_id = edd_get_purchase_id_by_transaction_id( $encoded_data_array['txn_id'] ); + } + + if ( empty( $payment_id ) ) { + $payment_id = ! empty( $encoded_data_array['custom'] ) ? absint( $encoded_data_array['custom'] ) : 0; + } + + if ( has_action( 'edd_paypal_' . $encoded_data_array['txn_type'] ) ) { + // Allow PayPal IPN types to be processed separately. + do_action( 'edd_paypal_' . $encoded_data_array['txn_type'], $encoded_data_array, $payment_id ); + } else { + // Fallback to web accept just in case the txn_type isn't present. + do_action( 'edd_paypal_web_accept', $encoded_data_array, $payment_id ); + } + exit; } add_action( 'edd_verify_paypal_ipn', 'edd_process_paypal_ipn' ); +/** + * Process web accept (one time) payment IPNs + * + * @since 1.3.4 + * @param array $data IPN Data + * @param int $payment_id Payment ID + * @return void + */ +function edd_process_paypal_web_accept_and_cart( $data, $payment_id ) { + + /** + * PayPal Web Accept Data + * + * Allows filtering the Web Accept data that PayPal passes back in via IPN with PayPal Standard + * + * @since 2.8.13 + * + * @param array $data The PayPal Web Accept Data + * @param int $payment_id The Payment ID associated with this IPN request + */ + $data = apply_filters( 'edd_paypal_web_accept_and_cart_data', $data, $payment_id ); + + if ( $data['txn_type'] != 'web_accept' && $data['txn_type'] != 'cart' && $data['payment_status'] != 'Refunded' ) { + return; + } + + if ( empty( $payment_id ) ) { + return; + } + + $payment = new EDD_Payment( $payment_id ); + + // Collect payment details. + $purchase_key = isset( $data['invoice'] ) ? $data['invoice'] : false; + if ( ! $purchase_key && ! empty( $data['item_number'] ) ) { + $purchase_key = $data['item_number']; + } + $paypal_amount = $data['mc_gross']; + $payment_status = strtolower( $data['payment_status'] ); + $currency_code = strtolower( $data['mc_currency'] ); + $business_email = isset( $data['business'] ) && is_email( $data['business'] ) ? trim( $data['business'] ) : trim( $data['receiver_email'] ); + + if ( $payment->gateway != 'paypal' ) { + return; // this isn't a PayPal standard IPN. + } + + // Verify payment recipient. + if ( strcasecmp( $business_email, trim( edd_get_option( 'paypal_email', false ) ) ) != 0 ) { + edd_record_gateway_error( + __( 'IPN Error', 'easy-digital-downloads' ), + /* translators: %s: IPN Verification response */ + sprintf( __( 'Invalid business email in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), + $payment_id + ); + edd_debug_log( 'Invalid business email in IPN response. IPN data: ' . print_r( $data, true ) ); + edd_update_payment_status( $payment_id, 'failed' ); + edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid PayPal business email.', 'easy-digital-downloads' ) ); + return; + } + + // Verify payment currency. + if ( $currency_code != strtolower( $payment->currency ) ) { + + edd_record_gateway_error( + __( 'IPN Error', 'easy-digital-downloads' ), + /* translators: %s: IPN Verification response */ + sprintf( __( 'Invalid currency in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), + $payment_id + ); + edd_debug_log( 'Invalid currency in IPN response. IPN data: ' . print_r( $data, true ) ); + edd_update_payment_status( $payment_id, 'failed' ); + edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid currency in PayPal IPN.', 'easy-digital-downloads' ) ); + return; + } + + if ( empty( $payment->email ) ) { + + // This runs when a Buy Now purchase was made. It bypasses checkout so no personal info is collected until PayPal. + + // Setup and store the customers's details. + $address = array(); + $address['line1'] = ! empty( $data['address_street'] ) ? sanitize_text_field( $data['address_street'] ) : false; + $address['city'] = ! empty( $data['address_city'] ) ? sanitize_text_field( $data['address_city'] ) : false; + $address['state'] = ! empty( $data['address_state'] ) ? sanitize_text_field( $data['address_state'] ) : false; + $address['country'] = ! empty( $data['address_country_code'] ) ? sanitize_text_field( $data['address_country_code'] ) : false; + $address['zip'] = ! empty( $data['address_zip'] ) ? sanitize_text_field( $data['address_zip'] ) : false; + + $payment->email = sanitize_text_field( $data['payer_email'] ); + $payment->first_name = sanitize_text_field( $data['first_name'] ); + $payment->last_name = sanitize_text_field( $data['last_name'] ); + $payment->address = $address; + + if ( empty( $payment->customer_id ) ) { + + $customer = new EDD_Customer( $payment->email ); + if ( ! $customer || $customer->id < 1 ) { + + $customer->create( + array( + 'email' => $payment->email, + 'name' => $payment->first_name . ' ' . $payment->last_name, + 'user_id' => $payment->user_id, + ) + ); + + } + + $payment->customer_id = $customer->id; + } + + $payment->save(); + + } + + if ( empty( $customer ) ) { + + $customer = new EDD_Customer( $payment->customer_id ); + + } + + // Record the payer email on the EDD_Customer record if it is different than the email entered on checkout. + if ( ! empty( $data['payer_email'] ) && ! in_array( strtolower( $data['payer_email'] ), array_map( 'strtolower', $customer->emails ) ) ) { + + $customer->add_email( strtolower( $data['payer_email'] ) ); + + } + + if ( $payment_status == 'refunded' || $payment_status == 'reversed' ) { + + // Process a refund. + edd_process_paypal_refund( $data, $payment_id ); + + } else { + + if ( edd_get_payment_status( $payment_id ) == 'complete' ) { + return; // Only complete payments once. + } + + // Retrieve the total purchase amount (before PayPal). + $payment_amount = edd_get_payment_amount( $payment_id ); + + if ( number_format( (float) $paypal_amount, 2 ) < number_format( (float) $payment_amount, 2 ) ) { + // The prices don't match. + edd_record_gateway_error( + __( 'IPN Error', 'easy-digital-downloads' ), + /* translators: %s: IPN Verification response */ + sprintf( __( 'Invalid payment amount in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), + $payment_id + ); + edd_debug_log( 'Invalid payment amount in IPN response. IPN data: ' . printf( $data, true ) ); + edd_update_payment_status( $payment_id, 'failed' ); + edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid amount in PayPal IPN.', 'easy-digital-downloads' ) ); + return; + } + if ( $purchase_key != edd_get_payment_key( $payment_id ) ) { + // Purchase keys don't match. + edd_debug_log( 'Invalid purchase key in IPN response. IPN data: ' . printf( $data, true ) ); + edd_record_gateway_error( + __( 'IPN Error', 'easy-digital-downloads' ), + /* translators: %s: IPN Verification response */ + sprintf( __( 'Invalid purchase key in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), + $payment_id + ); + edd_update_payment_status( $payment_id, 'failed' ); + edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid purchase key in PayPal IPN.', 'easy-digital-downloads' ) ); + return; + } + + if ( 'completed' == $payment_status || edd_is_test_mode() ) { + /* translators: %s: PayPal Transaction ID */ + edd_insert_payment_note( $payment_id, sprintf( __( 'PayPal Transaction ID: %s', 'easy-digital-downloads' ), $data['txn_id'] ) ); + edd_set_payment_transaction_id( $payment_id, $data['txn_id'], number_format( (float) $paypal_amount, 2 ) ); + edd_update_payment_status( $payment_id, 'complete' ); + + } elseif ( 'pending' == $payment_status && isset( $data['pending_reason'] ) ) { + + // Look for possible pending reasons, such as an echeck. + + $note = ''; + + switch ( strtolower( $data['pending_reason'] ) ) { + + case 'echeck': + $note = __( 'Payment made via eCheck and will clear automatically in 5-8 days', 'easy-digital-downloads' ); + $payment->status = 'processing'; + $payment->save(); + break; + + case 'address': + $note = __( 'Payment requires a confirmed customer address and must be accepted manually through PayPal', 'easy-digital-downloads' ); + + break; + + case 'intl': + $note = __( 'Payment must be accepted manually through PayPal due to international account regulations', 'easy-digital-downloads' ); + + break; + + case 'multi-currency': + $note = __( 'Payment received in non-shop currency and must be accepted manually through PayPal', 'easy-digital-downloads' ); + + break; + + case 'paymentreview': + case 'regulatory_review': + $note = __( 'Payment is being reviewed by PayPal staff as high-risk or in possible violation of government regulations', 'easy-digital-downloads' ); + + break; + + case 'unilateral': + $note = __( 'Payment was sent to non-confirmed or non-registered email address.', 'easy-digital-downloads' ); + + break; + + case 'upgrade': + $note = __( 'PayPal account must be upgraded before this payment can be accepted', 'easy-digital-downloads' ); + + break; + + case 'verify': + $note = __( 'PayPal account is not verified. Verify account in order to accept this payment', 'easy-digital-downloads' ); + + break; + + case 'other': + $note = __( 'Payment is pending for unknown reasons. Contact PayPal support for assistance', 'easy-digital-downloads' ); + + break; + + } + + if ( ! empty( $note ) ) { + + edd_debug_log( 'Payment not marked as completed because: ' . $note ); + edd_insert_payment_note( $payment_id, $note ); + + } + } + } +} +add_action( 'edd_paypal_web_accept', 'edd_process_paypal_web_accept_and_cart', 10, 2 ); /** - * Get Paypal Redirect + * Process PayPal IPN Refunds * - * @access private - * @since 1.0.8.2 - * @return string -*/ - -function edd_get_paypal_redirect( $ssl_check = false ) { - global $edd_options; - - if( is_ssl() || ! $ssl_check ) { - $protocal = 'https://'; + * @since 1.3.4 + * @param array $data IPN Data + * @return void + */ +function edd_process_paypal_refund( $data, $payment_id = 0 ) { + + /** + * PayPal Process Refund Data + * + * Allows filtering the Refund data that PayPal passes back in via IPN with PayPal Standard + * + * @since 2.8.13 + * + * @param array $data The PayPal Refund data + * @param int $payment_id The Payment ID associated with this IPN request + */ + $data = apply_filters( 'edd_process_paypal_refund_data', $data, $payment_id ); + + // Collect payment details. + if ( empty( $payment_id ) ) { + return; + } + + if ( get_post_status( $payment_id ) == 'refunded' ) { + return; // Only refund payments once. + } + + $payment_amount = edd_get_payment_amount( $payment_id ); + $refund_amount = $data['mc_gross'] * -1; + + if ( number_format( (float) $refund_amount, 2 ) < number_format( (float) $payment_amount, 2 ) ) { + /* translators: %s: PayPal transaction ID */ + edd_insert_payment_note( $payment_id, sprintf( __( 'Partial PayPal refund processed: %s', 'easy-digital-downloads' ), $data['parent_txn_id'] ) ); + return; // This is a partial refund. + + } + + /* translators: 1: PayPal transaction ID, 2: Reason for refund */ + edd_insert_payment_note( $payment_id, sprintf( __( 'PayPal Payment #%1$s Refunded for reason: %2$s', 'easy-digital-downloads' ), $data['parent_txn_id'], $data['reason_code'] ) ); + /* translators: %s: PayPal transaction ID */ + edd_insert_payment_note( $payment_id, sprintf( __( 'PayPal Refund Transaction ID: %s', 'easy-digital-downloads' ), $data['txn_id'] ) ); + edd_update_payment_status( $payment_id, 'refunded' ); +} + +/** + * Get PayPal Redirect + * + * @since 1.0.8.2 + * @param bool $ssl_check Is SSL? + * @param bool $ipn Is this an IPN verification check? + * @return string + */ +function edd_get_paypal_redirect( $ssl_check = false, $ipn = false ) { + + $protocol = 'http://'; + if ( is_ssl() || ! $ssl_check ) { + $protocol = 'https://'; + } + + // Check the current payment mode. + if ( edd_is_test_mode() ) { + + // Test mode. + + if ( $ipn ) { + + $paypal_uri = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'; + + } else { + + $paypal_uri = $protocol . 'www.sandbox.paypal.com/cgi-bin/webscr'; + + } + } else { + + // Live mode. + + if ( $ipn ) { + + $paypal_uri = 'https://ipnpb.paypal.com/cgi-bin/webscr'; + + } else { + + $paypal_uri = $protocol . 'www.paypal.com/cgi-bin/webscr'; + + } + } + + return apply_filters( 'edd_paypal_uri', $paypal_uri, $ssl_check, $ipn ); +} + +/** + * Get the image for the PayPal purchase page. + * + * @since 2.8 + * @return string + */ +function edd_get_paypal_image_url() { + $image_url = trim( edd_get_option( 'paypal_image_url', '' ) ); + return apply_filters( 'edd_paypal_image_url', $image_url ); +} + +/** + * Shows "Purchase Processing" message for PayPal payments are still pending on site return. + * + * This helps address the Race Condition, as detailed in issue #1839 + * + * @since 1.9 + * @return string + */ +function edd_paypal_success_page_content( $content ) { + + if ( ! isset( $_GET['payment-id'] ) && ! edd_get_purchase_session() ) { + return $content; + } + + edd_empty_cart(); + + $payment_id = isset( $_GET['payment-id'] ) ? absint( $_GET['payment-id'] ) : false; + + if ( ! $payment_id ) { + $session = edd_get_purchase_session(); + $payment_id = edd_get_purchase_id_by_key( $session['purchase_key'] ); + } + + $payment = new EDD_Payment( $payment_id ); + + if ( $payment->ID > 0 && 'pending' == $payment->status ) { + + // Payment is still pending so show processing indicator to fix the Race Condition, issue #. + ob_start(); + + edd_get_template_part( 'payment', 'processing' ); + + $content = ob_get_clean(); + + } + + return $content; +} +add_filter( 'edd_payment_confirm_paypal', 'edd_paypal_success_page_content' ); + +/** + * Mark payment as complete on return from PayPal if a PayPal Identity Token is present. + * + * See https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6197 + * + * @since 2.8.13 + * @return void + */ +function edd_paypal_process_pdt_on_return() { + + if ( ! isset( $_GET['payment-id'] ) || ! isset( $_GET['tx'] ) ) { + return; + } + + $token = edd_get_option( 'paypal_identity_token' ); + + if ( ! edd_is_success_page() || ! $token || ! edd_is_gateway_active( 'paypal' ) ) { + return; + } + + $payment_id = isset( $_GET['payment-id'] ) ? absint( $_GET['payment-id'] ) : false; + + if ( empty( $payment_id ) ) { + return; + } + + $purchase_session = edd_get_purchase_session(); + $payment = new EDD_Payment( $payment_id ); + + // If there is no purchase session, don't try and fire PDT. + if ( empty( $purchase_session ) ) { + return; + } + + // Do not fire a PDT verification if the purchase session does not match the payment-id PDT is asking to verify. + if ( ! empty( $purchase_session['purchase_key'] ) && $payment->key !== $purchase_session['purchase_key'] ) { + return; + } + + if ( $token && ! empty( $_GET['tx'] ) && $payment->ID > 0 ) { + + // An identity token has been provided in settings so let's immediately verify the purchase. + + $remote_post_vars = array( + 'method' => 'POST', + 'timeout' => 45, + 'redirection' => 5, + 'httpversion' => '1.1', + 'blocking' => true, + 'headers' => array( + 'host' => 'www.paypal.com', + 'connection' => 'close', + 'content-type' => 'application/x-www-form-urlencoded', + 'post' => '/cgi-bin/webscr HTTP/1.1', + 'user-agent' => 'EDD PDT Verification/' . EDD_VERSION . '; ' . get_bloginfo( 'url' ), + + ), + 'sslverify' => false, + 'body' => array( + 'tx' => sanitize_text_field( $_GET['tx'] ), + 'at' => $token, + 'cmd' => '_notify-synch', + ), + ); + + // Sanitize the data for debug logging. + $debug_args = $remote_post_vars; + $debug_args['body']['at'] = str_pad( substr( $debug_args['body']['at'], -6 ), strlen( $debug_args['body']['at'] ), '*', STR_PAD_LEFT ); + edd_debug_log( 'Attempting to verify PayPal payment with PDT. Args: ' . print_r( $debug_args, true ) ); + + edd_debug_log( 'Sending PDT Verification request to ' . edd_get_paypal_redirect() ); + + $request = wp_remote_post( edd_get_paypal_redirect(), $remote_post_vars ); + + if ( ! is_wp_error( $request ) ) { + + $body = wp_remote_retrieve_body( $request ); + + // parse the data. + $lines = explode( "\n", trim( $body ) ); + $data = array(); + if ( strcmp( $lines[0], 'SUCCESS' ) == 0 ) { + + for ( $i = 1; $i < count( $lines ); $i++ ) { + $parsed_line = explode( '=', $lines[ $i ], 2 ); + $data[ urldecode( $parsed_line[0] ) ] = urldecode( $parsed_line[1] ); + } + + if ( isset( $data['mc_gross'] ) ) { + + $total = $data['mc_gross']; + + } elseif ( isset( $data['payment_gross'] ) ) { + + $total = $data['payment_gross']; + + } elseif ( isset( $_REQUEST['amt'] ) ) { + + $total = $_REQUEST['amt']; + + } else { + + $total = null; + + } + + if ( is_null( $total ) ) { + + edd_debug_log( 'Attempt to verify PayPal payment with PDT failed due to payment total missing' ); + $payment->add_note( __( 'Payment could not be verified while validating PayPal PDT. Missing payment total fields.', 'easy-digital-downloads' ) ); + $payment->status = 'pending'; + + } elseif ( (float) $total < (float) $payment->total ) { + + /** + * Here we account for payments that are less than the expected results only. There are times that + * PayPal will sometimes round and have $0.01 more than the amount. The goal here is to protect store owners + * from getting paid less than expected. + */ + edd_debug_log( 'Attempt to verify PayPal payment with PDT failed due to payment total discrepancy' ); + /* translators: 1: Expected payment amount, 2: Received payment amount */ + $payment->add_note( sprintf( __( 'Payment failed while validating PayPal PDT. Amount expected: %1$f. Amount Received: %2$f', 'easy-digital-downloads' ), $payment->total, $data['payment_gross'] ) ); + $payment->status = 'failed'; + + } else { + + // Verify the status. + switch ( strtolower( $data['payment_status'] ) ) { + + case 'completed': + $payment->status = 'complete'; + break; + + case 'failed': + $payment->status = 'failed'; + break; + + default: + $payment->status = 'pending'; + break; + + } + } + + $payment->transaction_id = sanitize_text_field( $_GET['tx'] ); + $payment->save(); + + } elseif ( strcmp( $lines[0], 'FAIL' ) == 0 ) { + + edd_debug_log( 'Attempt to verify PayPal payment with PDT failed due to PDT failure response: ' . print_r( $body, true ) ); + $payment->add_note( __( 'Payment failed while validating PayPal PDT.', 'easy-digital-downloads' ) ); + $payment->status = 'failed'; + $payment->save(); + + } else { + + edd_debug_log( 'Attempt to verify PayPal payment with PDT met with an unexpected result: ' . print_r( $body, true ) ); + $payment->add_note( __( 'PayPal PDT encountered an unexpected result, payment set to pending', 'easy-digital-downloads' ) ); + $payment->status = 'pending'; + $payment->save(); + + } + } else { + + edd_debug_log( 'Attempt to verify PayPal payment with PDT failed. Request return: ' . print_r( $request, true ) ); + + } + } +} +add_action( 'template_redirect', 'edd_paypal_process_pdt_on_return' ); + +/** + * Given a Payment ID, extract the transaction ID + * + * @since 2.1 + * @since 3.0 Updated to use EDD_Note class. + * + * @param string $payment_id Payment ID. + * @return string Transaction ID. + */ +function edd_paypal_get_payment_transaction_id( $payment_id ) { + $transaction_id = ''; + $notes = edd_get_payment_notes( $payment_id ); + + foreach ( $notes as $note ) { + if ( preg_match( '/^PayPal Transaction ID: ([^\s]+)/', $note->content, $match ) ) { + $transaction_id = $match[1]; + continue; + } + } + + return apply_filters( 'edd_paypal_set_payment_transaction_id', $transaction_id, $payment_id ); +} +add_filter( 'edd_get_payment_transaction_id-paypal', 'edd_paypal_get_payment_transaction_id', 10, 1 ); + +/** + * Given a transaction ID, generate a link to the PayPal transaction ID details + * + * @since 2.2 + * @param string $transaction_id The Transaction ID + * @param int $payment_id The payment ID for this transaction + * @return string A link to the PayPal transaction details + */ +function edd_paypal_link_transaction_id( $transaction_id, $payment_id ) { + + $payment = new EDD_Payment( $payment_id ); + $sandbox = 'test' === $payment->mode ? 'sandbox.' : ''; + $paypal_base_url = 'https://' . $sandbox . 'paypal.com/activity/payment/'; + $transaction_url = '' . esc_html( $transaction_id ) . ''; + + return apply_filters( 'edd_paypal_link_payment_details_transaction_id', $transaction_url ); +} +add_filter( 'edd_payment_details_transaction_id-paypal', 'edd_paypal_link_transaction_id', 10, 2 ); + +/** + * Shows a checkbox to automatically refund payments in PayPal. + * + * @param Order $order The order object. + * + * @since 3.0 + * @return void + */ +function edd_paypal_refund_checkbox( Order $order ) { + if ( 'paypal' !== $order->gateway ) { + return; + } + + // If our credentials are not set, return early. + $key = $order->mode; + $username = edd_get_option( 'paypal_' . $key . '_api_username' ); + $password = edd_get_option( 'paypal_' . $key . '_api_password' ); + $signature = edd_get_option( 'paypal_' . $key . '_api_signature' ); + + if ( empty( $username ) || empty( $password ) || empty( $signature ) ) { + return; + } + ?> +
    +
    + + +
    +
    + gateway ) || 'paypal' !== $order->gateway ) { + return; + } + + // Get our data out of the serialized string. + parse_str( $_POST['data'], $form_data ); + + if ( empty( $form_data['edd-paypal-refund'] ) ) { + edd_add_note( + array( + 'object_id' => $order_id, + 'object_type' => 'order', + 'user_id' => is_admin() ? get_current_user_id() : 0, + 'content' => __( 'Transaction not refunded in PayPal, as checkbox was not selected.', 'easy-digital-downloads' ), + ) + ); + + return; + } + + $refund = edd_get_order( $refund_id ); + if ( empty( $refund->total ) ) { + return; + } + + edd_refund_paypal_purchase( $order, $refund ); +} +add_action( 'edd_refund_order', 'edd_paypal_maybe_refund_transaction', 10, 3 ); + +/** + * Refunds a purchase made via PayPal. + * + * @since 2.6.0 + * + * @param EDD_Payment|Order|int $payment_id_or_object The ID or object of the order to refund. + * @param Order|null $refund_object Optional. The refund object associated with this + * transaction refund. If provided, then the refund + * amount is used as the transaction refund amount (used for + * partial refunds), and an EDD transaction record will be + * inserted. + * + * @return void + */ +function edd_refund_paypal_purchase( $payment_id_or_object, $refund_object = null ) { + /* + * Internally we want to work with an Order object, but we also need + * an EDD_Payment object for backwards compatibility in the hooks. + */ + $order = $payment = false; + if ( $payment_id_or_object instanceof Order ) { + $order = $payment_id_or_object; + $payment = edd_get_payment( $order->id ); + } elseif ( $payment_id_or_object instanceof EDD_Payment ) { + $payment = $payment_id_or_object; + $order = edd_get_order( $payment_id_or_object->ID ); + } elseif ( is_numeric( $payment_id_or_object ) ) { + $order = edd_get_order( $payment_id_or_object ); + $payment = edd_get_payment( $payment_id_or_object ); + } + + if ( empty( $order ) || ! $order instanceof Order ) { + return; + } + + // Set PayPal API key credentials. + $credentials = array( + 'api_endpoint' => 'test' == $order->mode ? 'https://api-3t.sandbox.paypal.com/nvp' : 'https://api-3t.paypal.com/nvp', + 'api_username' => edd_get_option( 'paypal_' . $order->mode . '_api_username' ), + 'api_password' => edd_get_option( 'paypal_' . $order->mode . '_api_password' ), + 'api_signature' => edd_get_option( 'paypal_' . $order->mode . '_api_signature' ), + ); + + $credentials = apply_filters( 'edd_paypal_refund_api_credentials', $credentials, $payment ); + + $body = array( + 'USER' => $credentials['api_username'], + 'PWD' => $credentials['api_password'], + 'SIGNATURE' => $credentials['api_signature'], + 'VERSION' => '124', + 'METHOD' => 'RefundTransaction', + 'TRANSACTIONID' => $order->get_transaction_id(), + 'REFUNDTYPE' => 'Full', + ); + + // If a refund object is supplied, let's check if this should be a partial refund instead. + if ( $refund_object instanceof Order && abs( $refund_object->total ) !== abs( $order->total ) ) { + $body['REFUNDTYPE'] = 'Partial'; + $body['AMT'] = abs( $refund_object->total ); + + /* translators: %d: order ID number; %s - formatted refund amount */ + edd_debug_log( sprintf( 'Processing partial PayPal refund for order #%d. Amount: %s.', $order->id, edd_currency_filter( $refund_object->total, $refund_object->currency ) ) ); } else { - $protocal = 'http://'; - } - - // check the current payment mode - if ( edd_is_test_mode() ) { - // test mode - $paypal_uri = $protocal . 'www.sandbox.paypal.com/cgi-bin/webscr'; - } else { - // live mode - $paypal_uri = $protocal . 'www.paypal.com/cgi-bin/webscr'; - } - - return $paypal_uri; -} \ No newline at end of file + /* translators: %d: order ID number */ + edd_debug_log( sprintf( 'Processing full PayPal refund for order #%d.', $order->id ) ); + } + + $body = apply_filters( 'edd_paypal_refund_body_args', $body, $payment ); + + // Prepare the headers of the refund request. + $headers = array( + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Cache-Control' => 'no-cache', + ); + + $headers = apply_filters( 'edd_paypal_refund_header_args', $headers, $payment ); + + // Prepare args of the refund request. + $args = array( + 'body' => $body, + 'headers' => $headers, + 'httpversion' => '1.1', + ); + + $args = apply_filters( 'edd_paypal_refund_request_args', $args, $payment ); + + $error_msg = ''; + $request = wp_remote_post( $credentials['api_endpoint'], $args ); + + if ( is_wp_error( $request ) ) { + + $success = false; + $error_msg = $request->get_error_message(); + + } else { + + $body = wp_remote_retrieve_body( $request ); + if ( is_string( $body ) ) { + wp_parse_str( $body, $body ); + } + + if ( isset( $body['ACK'] ) && 'success' === strtolower( $body['ACK'] ) ) { + $success = true; + } else { + $success = false; + if ( isset( $body['L_LONGMESSAGE0'] ) ) { + $error_msg = $body['L_LONGMESSAGE0']; + } else { + $error_msg = __( 'PayPal refund failed for unknown reason.', 'easy-digital-downloads' ); + } + } + } + + if ( $success ) { + + edd_update_order_meta( $order->id, '_edd_paypal_refunded', true ); + + // Add a note to the original order, and, if provided, the new refund object. + if ( isset( $body['GROSSREFUNDAMT'] ) ) { + /* translators: 1: amount refunded; %2$s - transaction ID. */ + $note_message = sprintf( __( '%1$s refunded in PayPal. Transaction ID: %2$s', 'easy-digital-downloads' ), edd_currency_filter( edd_format_amount( $body['GROSSREFUNDAMT'] ) ), esc_html( $body['REFUNDTRANSACTIONID'] ) ); + } else { + /* translators: %s: PayPal Transaction ID. */ + $note_message = sprintf( __( 'PayPal refund transaction ID: %s', 'easy-digital-downloads' ), esc_html( $body['REFUNDTRANSACTIONID'] ) ); + } + $note_object_ids = array( $order->id ); + if ( $refund_object instanceof Order ) { + $note_object_ids[] = $refund_object->id; + } + foreach ( $note_object_ids as $note_object_id ) { + edd_add_note( + array( + 'object_id' => $note_object_id, + 'object_type' => 'order', + 'user_id' => is_admin() ? get_current_user_id() : 0, + 'content' => $note_message, + ) + ); + } + + // Add a negative transaction. + if ( $refund_object instanceof Order && isset( $body['REFUNDTRANSACTIONID'] ) && isset( $body['GROSSREFUNDAMT'] ) ) { + edd_add_order_transaction( + array( + 'object_id' => $refund_object->id, + 'object_type' => 'order', + 'transaction_id' => sanitize_text_field( $body['REFUNDTRANSACTIONID'] ), + 'gateway' => 'paypal', + 'status' => 'complete', + 'total' => edd_negate_amount( $body['GROSSREFUNDAMT'] ), + ) + ); + } + } else { + edd_add_note( + array( + 'object_id' => $order->id, + 'object_type' => 'order', + 'user_id' => is_admin() ? get_current_user_id() : 0, + /* translators: %s: error message. */ + 'content' => sprintf( __( 'PayPal refund failed: %s', 'easy-digital-downloads' ), $error_msg ), + ) + ); + } + + // Run hook letting people know the payment has been refunded successfully. + do_action( 'edd_paypal_refund_purchase', $payment ); +} diff --git a/includes/gateways/paypal.php b/includes/gateways/paypal.php deleted file mode 100755 index 7ed41eb4683..00000000000 --- a/includes/gateways/paypal.php +++ /dev/null @@ -1,274 +0,0 @@ - array of download IDs, - 'price' => total price of cart contents, - 'purchase_key' => // random key - 'user_email' => $user_email, - 'date' => date('Y-m-d H:i:s'), - 'user_id' => $user_id, - 'post_data' => $_POST, - 'user_info' => array of user's information and used discount code - 'cart_details' => array of cart details, - ); - */ - - $payment_data = array( - 'price' => $purchase_data['price'], - 'date' => $purchase_data['date'], - 'user_email' => $purchase_data['user_email'], - 'purchase_key' => $purchase_data['purchase_key'], - 'currency' => $edd_options['currency'], - 'downloads' => $purchase_data['downloads'], - 'user_info' => $purchase_data['user_info'], - 'cart_details' => $purchase_data['cart_details'], - 'status' => 'pending' - ); - - // record the pending payment - $payment = edd_insert_payment($payment_data); - - if($payment) { - // only send to paypal if the pending payment is created successfully - $listener_url = trailingslashit(home_url()).'?edd-listener=IPN'; - $return_url = add_query_arg('payment-confirmation', 'paypal', get_permalink($edd_options['success_page'])); - $cart_summary = edd_get_purchase_summary($purchase_data, false); - - // one time payment - if(edd_is_test_mode()) { - $paypal_redirect = 'https://www.sandbox.paypal.com/cgi-bin/webscr/?'; - } else { - $paypal_redirect = 'https://www.paypal.com/cgi-bin/webscr/?'; - } - $paypal_args = array( - 'cmd' => '_xclick', - 'amount' => $purchase_data['price'], - 'business' => $edd_options['paypal_email'], - 'item_name' => $cart_summary, - 'email' => $purchase_data['user_email'], - 'no_shipping' => '1', - 'no_note' => '1', - 'currency_code' => $edd_options['currency'], - 'item_number' => $purchase_data['purchase_key'], - 'charset' => 'UTF-8', - 'custom' => $payment, - 'rm' => '2', - 'return' => $return_url, - 'notify_url' => $listener_url - ); - //var_dump(http_build_query($paypal_args)); exit; - $paypal_redirect .= http_build_query($paypal_args); - - //var_dump(urldecode($paypal_redirect)); exit; - - // get rid of cart contents - edd_empty_cart(); - - // Redirect to paypal - wp_redirect($paypal_redirect); - exit; - - } else { - // if errors are present, send the user back to the purchase page so they can be corrected - edd_send_back_to_checkout('?payment-mode=' . $purchase_data['post_data']['edd-gateway']); - } -} -add_action('edd_gateway_paypal', 'edd_process_paypal_purchase'); - - -/** - * Listen For PayPal IPN - * - * Listens for a PayPal IPN requests and then sends to the processing function. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_listen_for_paypal_ipn() { - global $edd_options; - - // regular PayPal IPN - if(!isset($edd_options['paypal_alternate_verification'])) { - - if(isset($_GET['edd-listener']) && $_GET['edd-listener'] == 'IPN') { - do_action('edd_verify_paypal_ipn'); - } - - // alternate purchase verification - } else { - if(isset($_GET['tx']) && isset($_GET['st']) && isset($_GET['amt']) && isset($_GET['cc']) && isset($_GET['cm']) && isset($_GET['item_number'])) { - // we are using the alternate method of verifying PayPal purchases - - // setup each of the variables from PayPal - $payment_status = $_GET['st']; - $paypal_amount = $_GET['amt']; - $payment_id = $_GET['cm']; - $purchase_key = $_GET['item_number']; - $currency = $_GET['cc']; - - // retrieve the meta info for this payment - $payment_meta = get_post_meta($payment_id, '_edd_payment_meta', true); - $payment_amount = edd_format_amount($payment_meta['amount']); - if($currency != $edd_options['currency']) { - return; // the currency code is invalid - } - if($paypal_amount != $payment_amount) { - return; // the prices don't match - } - if($purchase_key != $payment_meta['key']) { - return; // purchase keys don't match - } - if(strtolower($payment_status) != 'completed' || edd_is_test_mode()) { - return; // payment wasn't completed - } - - // everything has been verified, update the payment to "complete" - edd_update_payment_status($payment_id, 'publish'); - } - } -} -add_action('init', 'edd_listen_for_paypal_ipn'); - - -/** - * Process PayPal IPN - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_process_paypal_ipn() { - - global $edd_options; - - // instantiate the IpnListener class - if(!class_exists('IpnListener')) { - include_once(EDD_PLUGIN_DIR . 'includes/gateways/libraries/paypal/ipnlistener.php'); - } - - $listener = new IpnListener(); - - if(edd_is_test_mode()) { - $listener->use_sandbox = true; - } - - - if(isset($edd_options['ssl'])) { - $listener->use_ssl = false; - } - // to post using the fsockopen() function rather than cURL, use: - if(isset($edd_options['paypal_disable_curl'])) { - $listener->use_curl = false; - } - - try { - $listener->requirePostMethod(); - $verified = $listener->processIpn(); - } catch (Exception $e) { - wp_mail(get_bloginfo('admin_email'), 'IPN Error', $e->getMessage()); - exit(0); - } - - if ($verified) { - $payment_id = $_POST['custom']; - $purchase_key = $_POST['item_number']; - $paypal_amount = $_POST['mc_gross']; - $payment_status = $_POST['payment_status']; - $currency_code = strtolower($_POST['mc_currency']); - - // retrieve the meta info for this payment - $payment_meta = get_post_meta($payment_id, '_edd_payment_meta', true); - $payment_amount = edd_format_amount($payment_meta['amount']); - - if($currency_code != strtolower($edd_options['currency'])) { - return; // the currency code is invalid - } - if($paypal_amount != $payment_amount) { - return; // the prices don't match - } - if($purchase_key != $payment_meta['key']) { - return; // purchase keys don't match - } - - if(isset($_POST['txn_type']) && $_POST['txn_type'] == 'web_accept') { - - $status = strtolower($payment_status); - - if( $status == 'completed' || edd_is_test_mode()) { - - // set the payment to complete. This also sends the emails - edd_update_payment_status($payment_id, 'publish'); - - } else if( $status == 'refunded' ) { - - // this refund process doesn't work yet - - $payment_data = get_post_meta($payment_id, '_edd_payment_meta', true); - $downloads = maybe_unserialize($payment_data['downloads']); - - if( is_array( $downloads ) ) { - foreach( $downloads as $download ) { - edd_undo_purchase( $download['id'], $payment_id ); - } - } - - wp_update_post(array('ID' => $payment_id, 'post_status' => 'refunded')); - - } - } - - } else { - wp_mail(get_bloginfo('admin_email'), __('Invalid IPN', 'edd'), $listener->getTextReport()); - } -} -add_action('edd_verify_paypal_ipn', 'edd_process_paypal_ipn'); \ No newline at end of file diff --git a/includes/gateways/paypal/admin/connect.php b/includes/gateways/paypal/admin/connect.php new file mode 100644 index 00000000000..46b01953d2e --- /dev/null +++ b/includes/gateways/paypal/admin/connect.php @@ -0,0 +1,919 @@ +signupLink ) ) { + ?> +
    +

    + tag, 2. closing tag */ + __( '%1$sPayPal Communication Error:%2$s We are having trouble communicating with PayPal at the moment. Please try again later, and if the issue persists, reach out to our support team.', 'easy-digital-downloads' ), + '', + '' + ), array( 'strong' => array() ) ); + ?> +

    +
    + + + + + +
    + + +
    + + + 403, + 'body' => array( + 'message' => __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), + ), + ); + } + + $mode = edd_is_test_mode() ? API::MODE_SANDBOX : API::MODE_LIVE; + + $existing_connect_details = get_partner_details( $mode ); + + if ( ! empty( $existing_connect_details ) ) { + // Ensure the data we have contains all necessary details. + if ( + ( ! empty( $existing_connect_details->expires ) && $existing_connect_details->expires > time() ) && + ! empty( $existing_connect_details->nonce ) && + ! empty( $existing_connect_details->signupLink ) && // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + ! empty( $existing_connect_details->product ) + ) { + return array( + 'code' => 200, + 'body' => $existing_connect_details, + ); + } + } + + $response = wp_remote_post( + EDD_PAYPAL_PARTNER_CONNECT_URL . 'signup-link', + array( + 'headers' => array( + 'Content-Type' => 'application/json', + ), + 'user-agent' => 'Easy Digital Downloads/' . EDD_VERSION . '; ' . get_bloginfo( 'name' ), + 'body' => wp_json_encode( + array( + 'mode' => $mode, + 'country_code' => edd_get_shop_country(), + 'currency_code' => edd_get_currency(), + 'return_url' => get_settings_url(), + ) + ), + ) + ); + + $code = wp_remote_retrieve_response_code( $response ); + + if ( is_wp_error( $response ) ) { + + return array( + 'code' => $code, + 'body' => $response->get_error_message(), + ); + } + + $body = wp_remote_retrieve_body( $response ); + $body = json_decode( $body ); + + // We're storing an expiration so we can get a new one if it's been a day. + $body->expires = time() + DAY_IN_SECONDS; + + // We need to store this temporarily so we can use the nonce again in the next request. + update_option( 'edd_paypal_commerce_connect_details_' . $mode, wp_json_encode( $body ), false ); + + return array( + 'code' => $code, + 'body' => $body, + ); +} + +/** + * AJAX handler for processing the PayPal Connection. + * + * @since 2.11 + * @deprecated 3.1.2 Instead of doing this via an AJAX request, we now do this on page load. + * + * @return void + */ +function process_connect() { + _edd_deprecated_function( __FUNCTION__, '3.1.2', 'EDD_PayPal_Commerce::get_onboarding_data()' ); + + // This validates the nonce. + check_ajax_referer( 'edd_process_paypal_connect' ); + + $onboarding_data = get_onboarding_data(); + + if ( 200 !== intval( $onboarding_data['code'] ) ) { + wp_send_json_error( sprintf( + /* translators: 1: HTTP response code, 2: error message */ + __( 'Unexpected response code: %1$d. Error: %2$s', 'easy-digital-downloads' ), + $onboarding_data['code'], + wp_json_encode( $onboarding_data['body'] ) + ) ); + } + + if ( empty( $onboarding_data['body']->signupLink ) || empty( $onboarding_data['body']->nonce ) ) { + wp_send_json_error( __( 'An unexpected error occurred.', 'easy-digital-downloads' ) ); + } + + wp_send_json_success( $onboarding_data['body'] ); +} + +/** + * AJAX handler for processing the PayPal Reconnect. + * + * @since 3.1.0.3 + * @return void + */ +function process_reconnect() { + // This validates the nonce. + check_ajax_referer( 'edd_process_paypal_connect' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ) ); + } + + $mode = edd_is_test_mode() ? API::MODE_SANDBOX : API::MODE_LIVE; + + /** + * Make sure we still have connection details from the previously connected site. + */ + $connection_details = get_option( 'edd_paypal_commerce_connect_details_' . $mode ); + + if ( empty( $connection_details ) ) { + // Somehow we ended up here, but now that we're in an invalid state, remove all settings so we can fully reset. + delete_option( 'edd_paypal_commerce_connect_details_' . $mode ); + delete_option( 'edd_paypal_commerce_webhook_id_' . $mode ); + delete_option( 'edd_paypal_' . $mode . '_merchant_details' ); + wp_send_json_error( __( 'Failure reconnecting to PayPal. Please try again', 'easy-digital-downloads' ) ); + } + + try { + PayPal\Webhooks\create_webhook( $mode ); + } catch ( \Exception $e ) { + $message = esc_html__( 'Your account has been successfully reconnected, but an error occurred while creating a webhook.', 'easy-digital-downloads' ); + } + + wp_safe_redirect( esc_url_raw( get_settings_url() ) ); +} +add_action( 'wp_ajax_edd_paypal_commerce_reconnect', __NAMESPACE__ . '\process_reconnect' ); + +/** + * Retrieves partner Connect details for the given mode. + * + * @param string $mode Store mode. If omitted, current mode is used. + * + * @return stdObj|null + */ +function get_partner_details( $mode = '' ) { + if ( ! $mode ) { + $mode = edd_is_test_mode() ? API::MODE_SANDBOX : API::MODE_LIVE; + } + return json_decode( get_option( 'edd_paypal_commerce_connect_details_' . $mode ) ); +} + +/** + * AJAX handler for retrieving a one-time access token, then used to retrieve + * the seller's API credentials. + * + * @since 2.11 + * @return void + */ +function get_and_save_credentials() { + // This validates the nonce. + check_ajax_referer( 'edd_process_paypal_connect' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ) ); + } + + if ( empty( $_POST['auth_code'] ) || empty( $_POST['share_id'] ) ) { + wp_send_json_error( __( 'Missing PayPal authentication information. Please try again.', 'easy-digital-downloads' ) ); + } + + $mode = edd_is_test_mode() ? PayPal\API::MODE_SANDBOX : PayPal\API::MODE_LIVE; + + // Store a transient to indicate that we've started the connect process. + set_transient( + 'edd_paypal_commerce_connect_started_' . $mode, + wp_hash( get_current_user_id() . '_' . $mode . '_started', 'nonce' ), + 15 * MINUTE_IN_SECONDS + ); + + $partner_details = get_partner_details( $mode ); + if ( empty( $partner_details->nonce ) ) { + wp_send_json_error( __( 'Missing nonce. Please refresh the page and try again.', 'easy-digital-downloads' ) ); + } + + $paypal_subdomain = edd_is_test_mode() ? '.sandbox' : ''; + $api_url = 'https://api-m' . $paypal_subdomain . '.paypal.com/'; + $api_args = array( + 'headers' => array( + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Authorization' => sprintf( 'Basic %s', base64_encode( $_POST['share_id'] ) ), + 'timeout' => 15, + ), + 'body' => array( + 'grant_type' => 'authorization_code', + 'code' => $_POST['auth_code'], + 'code_verifier' => $partner_details->nonce, + ), + 'user-agent' => 'Easy Digital Downloads/' . EDD_VERSION . '; ' . get_bloginfo( 'name' ), + ); + + /* + * First get a temporary access token from PayPal. + */ + $response = wp_remote_post( + $api_url . 'v1/oauth2/token', + $api_args + ); + + if ( is_wp_error( $response ) ) { + wp_send_json_error( $response->get_error_message() ); + } + + $code = wp_remote_retrieve_response_code( $response ); + $body = json_decode( wp_remote_retrieve_body( $response ) ); + + if ( empty( $body->access_token ) ) { + wp_send_json_error( + sprintf( + /* translators: %d: HTTP response code */ + __( 'Unexpected response from PayPal while generating token. Response code: %d. Please try again.', 'easy-digital-downloads' ), + $code + ) + ); + } + + /* + * Now we can use this access token to fetch the seller's credentials for all future + * API requests. + */ + $response = wp_remote_get( + $api_url . 'v1/customer/partners/' . urlencode( \EDD\Gateways\PayPal\get_partner_merchant_id( $mode ) ) . '/merchant-integrations/credentials/', + array( + 'headers' => array( + 'Authorization' => sprintf( 'Bearer %s', $body->access_token ), + 'Content-Type' => 'application/json', + 'timeout' => 15, + ), + 'user-agent' => 'Easy Digital Downloads/' . EDD_VERSION . '; ' . get_bloginfo( 'name' ), + ) + ); + + if ( is_wp_error( $response ) ) { + wp_send_json_error( $response->get_error_message() ); + } + + $code = wp_remote_retrieve_response_code( $response ); + $body = json_decode( wp_remote_retrieve_body( $response ) ); + + if ( empty( $body->client_id ) || empty( $body->client_secret ) ) { + wp_send_json_error( sprintf( + /* translators: %d: HTTP response code */ + __( 'Unexpected response from PayPal. Response code: %d. Please try again.', 'easy-digital-downloads' ), + $code + ) ); + } + + edd_update_option( 'paypal_' . $mode . '_client_id', sanitize_text_field( $body->client_id ) ); + edd_update_option( 'paypal_' . $mode . '_client_secret', sanitize_text_field( $body->client_secret ) ); + + $message = esc_html__( 'Successfully connected.', 'easy-digital-downloads' ); + + try { + PayPal\Webhooks\create_webhook( $mode ); + } catch ( \Exception $e ) { + $message = esc_html__( 'Your account has been successfully connected, but an error occurred while creating a webhook.', 'easy-digital-downloads' ); + } + + /** + * Triggers when an account is successfully connected to PayPal. + * + * @param string $mode The mode that the account was connected in. Either `sandbox` or `live`. + * + * @since 2.11 + */ + do_action( 'edd_paypal_commerce_connected', $mode ); + + wp_send_json_success( $message ); +} + +add_action( 'wp_ajax_edd_paypal_commerce_get_access_token', __NAMESPACE__ . '\get_and_save_credentials' ); + +/** + * Verifies the connected account. + * + * @since 2.11 + * @return void + */ +function get_account_info() { + check_ajax_referer( 'edd_paypal_account_information' ); + + if ( ! current_user_can( 'manage_shop_settings' ) ) { + wp_send_json_error( wpautop( __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ) ) ); + } + + try { + $status = 'success'; + $account_status = ''; + $actions = array( + 'refresh_merchant' => '', + 'webhook' => '', + ); + + $disconnect_links = array( + 'disconnect' => '' . __( 'Disconnect webhooks from PayPal', 'easy-digital-downloads' ) . '', + 'delete' => '' . __( 'Delete connection with PayPal', 'easy-digital-downloads' ) . '', + ); + + $validator = new AccountStatusValidator(); + $validator->check(); + + /* + * 1. Check REST API credentials + */ + $rest_api_message = '' . __( 'API:', 'easy-digital-downloads' ) . '' . ' '; + if ( $validator->errors_for_credentials->errors ) { + $rest_api_dashicon = 'no'; + $status = 'error'; + $rest_api_message .= $validator->errors_for_credentials->get_error_message(); + } else { + $rest_api_dashicon = 'yes'; + $mode_string = edd_is_test_mode() ? __( 'sandbox', 'easy-digital-downloads' ) : __( 'live', 'easy-digital-downloads' ); + + /* translators: %s: the connected mode, either `sandbox` or `live` */ + $rest_api_message .= sprintf( __( 'Your PayPal account is successfully connected in %s mode.', 'easy-digital-downloads' ), $mode_string ); + } + + ob_start(); + ?> +
  • + + array() ) ); ?> +
  • + ' . __( 'Payment Status:', 'easy-digital-downloads' ) . '' . ' '; + if ( $validator->errors_for_merchant_account->errors ) { + $merchant_dashicon = 'no'; + $status = 'error'; + $merchant_account_message .= __( 'You need to address the following issues before you can start receiving payments:', 'easy-digital-downloads' ); + + // We can only refresh the status if we have a merchant ID. + if ( in_array( 'missing_merchant_details', $validator->errors_for_merchant_account->get_error_codes(), true ) ) { + unset( $actions['refresh_merchant'] ); + } + } else { + $merchant_dashicon = 'yes'; + $merchant_account_message .= __( 'Ready to accept payments.', 'easy-digital-downloads' ); + } + + ob_start(); + ?> +
  • + + + errors_for_merchant_account->errors ) : ?> +
      + errors_for_merchant_account->get_error_codes() as $code ) : ?> +
    • errors_for_merchant_account->get_error_message( $code ), array( 'strong' => array() ) ); ?>
    • + +
    + +
  • + ' . __( 'Webhook:', 'easy-digital-downloads' ) . '' . ' '; + if ( $validator->errors_for_webhook->errors ) { + $webhook_dashicon = 'no'; + $status = ( 'success' === $status ) ? 'warning' : $status; + $webhook_message .= $validator->errors_for_webhook->get_error_message(); + + if ( in_array( 'webhook_missing', $validator->errors_for_webhook->get_error_codes(), true ) ) { + unset( $disconnect_links['disconnect'] ); + $actions['webhook'] = ''; + } + } else { + unset( $disconnect_links['delete'] ); + $webhook_dashicon = 'yes'; + $webhook_message .= __( 'Webhook successfully configured for the following events:', 'easy-digital-downloads' ); + } + + ob_start(); + ?> +
  • + + array() ) ); ?> + webhook ) : ?> +
      + +
    • + + +
    • + +
    + +
  • + ', + '', + '
  • ', + '', + '
  • ' + ); + } + + wp_send_json_success( + array( + 'status' => $status, + 'account_status' => '', + 'webhook_object' => isset( $validator ) ? $validator->webhook : null, + 'actions' => array_values( $actions ), + 'disconnect_links' => array_values( $disconnect_links ), + ) + ); + } catch ( \Exception $e ) { + wp_send_json_error( + array( + 'status' => isset( $status ) ? $status : 'error', + 'message' => wpautop( $e->getMessage() ), + ) + ); + } +} +add_action( 'wp_ajax_edd_paypal_commerce_get_account_info', __NAMESPACE__ . '\get_account_info' ); + +/** + * Returns the URL for disconnecting from PayPal Commerce. + * + * @since 2.11 + * @return string + */ +function get_disconnect_url() { + return wp_nonce_url( + add_query_arg( + array( + 'edd_action' => 'disconnect_paypal_commerce', + ), + admin_url() + ), + 'edd_disconnect_paypal_commerce' + ); +} + +/** + * Returns the URL for deleting the app PayPal Commerce. + * + * @since 3.1.0.3 + * @return string + */ +function get_delete_url() { + return wp_nonce_url( + add_query_arg( + array( + 'edd_action' => 'delete_paypal_commerce', + ), + admin_url() + ), + 'edd_delete_paypal_commerce' + ); +} + +/** + * Disconnects from PayPal in the current mode. + * + * @since 2.11 + * @return void + */ +function process_disconnect() { + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( esc_html__( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( empty( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'edd_disconnect_paypal_commerce' ) ) { + wp_die( esc_html__( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $mode = edd_is_test_mode() ? PayPal\API::MODE_SANDBOX : PayPal\API::MODE_LIVE; + + try { + $api = new PayPal\API(); + + try { + // Disconnect the webhook. + // This is in another try/catch because we want to delete the token cache (below) even if this fails. + // This only deletes the webhooks in PayPal, we do not remove the webhook ID in EDD until we delete the connection. + PayPal\Webhooks\delete_webhook( $mode ); + } catch ( \Exception $e ) { + // We don't want to stop the process if we can't delete the webhooks. + } + + // Also delete the token cache key, to ensure we fetch a fresh one if they connect to a different account later. + delete_option( $api->token_cache_key ); + } catch ( \Exception $e ) { + // We don't want to stop the process if we can't delete the webhook. + } + + wp_safe_redirect( esc_url_raw( get_settings_url() ) ); + exit; +} +add_action( 'edd_disconnect_paypal_commerce', __NAMESPACE__ . '\process_disconnect' ); + +/** + * Fully deletes past Merchant Information from PayPal in the current mode. + * + * @since 3.1.0.3 + * @return void + */ +function process_delete() { + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( esc_html__( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( empty( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'edd_delete_paypal_commerce' ) ) { + wp_die( esc_html__( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + $mode = edd_is_test_mode() ? PayPal\API::MODE_SANDBOX : PayPal\API::MODE_LIVE; + + // Delete merchant information. + delete_option( 'edd_paypal_' . $mode . '_merchant_details' ); + + // Delete partner connect information. + delete_option( 'edd_paypal_commerce_connect_details_' . $mode ); + + try { + $api = new PayPal\API(); + + try { + // Disconnect the webhook. + // This is in another try/catch because we want to delete the token cache (below) even if this fails. + // This only deletes the webhooks in PayPal, we do not remove the webhook ID in EDD until we delete the connection. + PayPal\Webhooks\delete_webhook( $mode ); + } catch ( \Exception $e ) { + // We don't want to stop the process if we can't delete the webhooks. + } + + // Also delete the token cache key, to ensure we fetch a fresh one if they connect to a different account later. + delete_option( $api->token_cache_key ); + } catch ( \Exception $e ) { + // We don't want to stop the process if we can't delete the webhooks. + } + + // Now delete our webhook ID. + delete_option( sanitize_key( 'edd_paypal_commerce_webhook_id_' . $mode ) ); + + // Delete API credentials. + $edd_settings_to_delete = array( + 'paypal_' . $mode . '_client_id', + 'paypal_' . $mode . '_client_secret', + ); + + foreach ( $edd_settings_to_delete as $option_name ) { + edd_delete_option( $option_name ); + } + + // Unset the PayPal Commerce gateway as an enabled gateway. + $enabled_gateways = edd_get_option( 'gateways', array() ); + unset( $enabled_gateways['paypal_commerce'] ); + edd_update_option( 'gateways', $enabled_gateways ); + + wp_safe_redirect( esc_url_raw( get_settings_url() ) ); + exit; +} +add_action( 'edd_delete_paypal_commerce', __NAMESPACE__ . '\process_delete' ); + +/** + * AJAX callback for refreshing payment status. + * + * @since 2.11 + * @throws \Exception If the merchant ID is not found. + */ +function refresh_merchant_status() { + check_ajax_referer( 'edd_check_merchant_status' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( esc_html__( 'You do not have permission to perform this action.', 'easy-digital-downloads' ) ); + } + + $merchant_details = PayPal\MerchantAccount::retrieve(); + + try { + if ( empty( $merchant_details->merchant_id ) ) { + throw new \Exception( __( 'No merchant ID saved. Please reconnect to PayPal.', 'easy-digital-downloads' ) ); + } + + $partner_details = get_partner_details(); + $nonce = isset( $partner_details->nonce ) ? $partner_details->nonce : null; + + $new_details = get_merchant_status( $merchant_details->merchant_id, $nonce ); + $merchant_account = new PayPal\MerchantAccount( $new_details ); + $merchant_account->save(); + + wp_send_json_success(); + } catch ( \Exception $e ) { + wp_send_json_error( esc_html( $e->getMessage() ) ); + } +} +add_action( 'wp_ajax_edd_paypal_commerce_check_merchant_status', __NAMESPACE__ . '\refresh_merchant_status' ); + +/** + * AJAX callback for creating a webhook. + * + * @since 2.11 + */ +function create_webhook() { + check_ajax_referer( 'edd_create_paypal_webhook' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( esc_html__( 'You do not have permission to perform this action.', 'easy-digital-downloads' ) ); + } + + try { + PayPal\Webhooks\create_webhook(); + + wp_send_json_success(); + } catch ( \Exception $e ) { + wp_send_json_error( esc_html( $e->getMessage() ) ); + } +} +add_action( 'wp_ajax_edd_paypal_commerce_create_webhook', __NAMESPACE__ . '\create_webhook' ); + +/** + * AJAX callback for syncing a webhook. This is used to fix issues with missing events. + * + * @since 2.11 + */ +function update_webhook() { + check_ajax_referer( 'edd_update_paypal_webhook' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( esc_html__( 'You do not have permission to perform this action.', 'easy-digital-downloads' ) ); + } + + try { + PayPal\Webhooks\sync_webhook(); + + wp_send_json_success(); + } catch ( \Exception $e ) { + wp_send_json_error( esc_html( $e->getMessage() ) ); + } +} +add_action( 'wp_ajax_edd_paypal_commerce_update_webhook', __NAMESPACE__ . '\update_webhook' ); + +/** + * PayPal Redirect Callback + * + * This processes after the merchant is redirected from PayPal. We immediately + * check their seller status via partner connect and save their merchant status. + * The user is then redirected back to the settings page. + * + * @since 2.11 + */ +add_action( + 'load-download_page_edd-settings', + function () { + if ( ! isset( $_GET['merchantIdInPayPal'] ) || ! edd_is_admin_page( 'settings' ) ) { + return; + } + + $mode = edd_is_test_mode() ? 'sandbox' : 'live'; + $connect_process = get_transient( 'edd_paypal_commerce_connect_started_' . $mode ); + if ( empty( $connect_process ) ) { + return; + } + $check = wp_hash( get_current_user_id() . '_' . $mode . '_started', 'nonce' ); + + if ( ! hash_equals( $connect_process, $check ) ) { + wp_die( + __( 'There was an error processing the connection to PayPal. Please attempt to connect again.', 'easy-digital-downloads' ), + __( 'Error', 'easy-digital-downloads' ), + array( + 'response' => 403, + 'link_text' => __( 'Return to settings', 'easy-digital-downloads' ), + 'link_url' => get_settings_url(), + ) + ); + } + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( + __( 'You do not have permission to perform this action.', 'easy-digital-downloads' ), + __( 'Error', 'easy-digital-downloads' ), + array( 'response' => 403 ) + ); + } + + edd_debug_log( 'PayPal Connect - Checking merchant status.' ); + + $merchant_id = urldecode( $_GET['merchantIdInPayPal'] ); + + try { + $details = get_merchant_status( $merchant_id ); + edd_debug_log( 'PayPal Connect - Successfully retrieved merchant status.' ); + } catch ( \Exception $e ) { + /* + * This won't be enough to actually validate the merchant status, but we want to ensure + * we save the merchant ID no matter what. + */ + $details = array( + 'merchant_id' => $merchant_id, + ); + + edd_debug_log( sprintf( 'PayPal Connect - Failed to retrieve merchant status from PayPal. Error: %s', $e->getMessage() ) ); + } + + $merchant_account = new PayPal\MerchantAccount( $details ); + $merchant_account->save(); + + // Remove our transient, instead of waiting for it to be removed automatically. + delete_transient( 'edd_paypal_commerce_connect_started_' . $mode ); + + edd_redirect( esc_url_raw( get_settings_url() ) ); + } +); + +/** + * Retrieves the merchant's status in PayPal. + * + * @param string $merchant_id The merchant ID to check. + * @param string $nonce The nonce to use for the request. + * + * @return array + * @throws PayPal\Exceptions\API_Exception If the request fails. + */ +function get_merchant_status( $merchant_id, $nonce = '' ) { + $response = wp_remote_post( + EDD_PAYPAL_PARTNER_CONNECT_URL . 'merchant-status', + array( + 'headers' => array( + 'Content-Type' => 'application/json', + ), + 'body' => json_encode( + array( + 'mode' => edd_is_test_mode() ? API::MODE_SANDBOX : API::MODE_LIVE, + 'merchant_id' => $merchant_id, + 'nonce' => $nonce, + ) + ), + 'user-agent' => 'Easy Digital Downloads/' . EDD_VERSION . '; ' . get_bloginfo( 'name' ), + ) + ); + + $response_code = wp_remote_retrieve_response_code( $response ); + $response_body = json_decode( wp_remote_retrieve_body( $response ), true ); + + if ( 200 !== (int) $response_code ) { + if ( ! empty( $response_body['error'] ) ) { + $error_message = $response_body['error']; + } else { + $error_message = sprintf( + 'Invalid HTTP response code: %d. Response: %s', + $response_code, + wp_remote_retrieve_body( $response ) + ); + } + // If the response code is a string, we'll default to a 403 because the API Exception requires an integer. + if ( ! is_int( $response_code ) ) { + $response_code = 403; + } + + throw new PayPal\Exceptions\API_Exception( $error_message, $response_code ); + } + + return $response_body; +} diff --git a/includes/gateways/paypal/admin/notices.php b/includes/gateways/paypal/admin/notices.php new file mode 100644 index 00000000000..04d4432e1aa --- /dev/null +++ b/includes/gateways/paypal/admin/notices.php @@ -0,0 +1,66 @@ + 'dismiss_notices', + 'edd_notice' => 'paypal_commerce' + ) ), 'edd_notice_nonce' ); + + $setup_url = add_query_arg( array( + 'post_type' => 'download', + 'page' => 'edd-settings', + 'tab' => 'gateways', + 'section' => 'paypal_commerce' + ), admin_url( 'edit.php' ) ); + + ?> +
    +

    +

    + ', + '' + ), array( 'a' => array( 'href' => true, 'target' => true ) ) ); + ?> +

    +

    + + +

    +
    + esc_html__( 'An unexpected error occurred. Please refresh the page and try again.', 'easy-digital-downloads' ), + 'isConnected' => PayPal\has_rest_api_connection(), + ) + ); + } +} +add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_connect_scripts' ); + +/** + * Forces the Cache-Control header on the PayPal Commerce settings page to send the no-store header + * which prevents the back-forward cache (bfcache) from storing a copy of this page in local + * cache. This helps make sure that page elements modified via AJAX and DOM manipulations aren't + * incorrectly shown as if they never changed. + * + * See: https://github.com/easydigitaldownloads/EDD-Software-Licensing/issues/1346#issuecomment-382159918 + * + * @since 3.6 + * @param array $headers An array of nocache headers. + * + * @return array + */ +function _bfcache_buster( $headers ) { + if ( ! is_admin() ) { + return $headers; + } + + if ( edd_is_admin_page( 'settings' ) && isset( $_GET['section'] ) && 'paypal_commerce' === $_GET['section'] ) { /* phpcs:ignore WordPress.Security.NonceVerification.Recommended */ + $headers['Cache-Control'] = 'no-cache, must-revalidate, max-age=0, no-store'; + } + + return $headers; +} +add_filter( 'nocache_headers', __NAMESPACE__ . '\_bfcache_buster', 10, 1 ); diff --git a/includes/gateways/paypal/admin/settings.php b/includes/gateways/paypal/admin/settings.php new file mode 100644 index 00000000000..5f4b6851500 --- /dev/null +++ b/includes/gateways/paypal/admin/settings.php @@ -0,0 +1,160 @@ + array( + 'id' => 'paypal_settings', + 'name' => '

    ' . __( 'PayPal Settings', 'easy-digital-downloads' ) . '

    ', + 'type' => 'header', + ), + 'paypal_connect_button' => array( + 'id' => 'paypal_connect_button', + 'name' => __( 'Connection Status', 'easy-digital-downloads' ), + 'class' => 'edd-paypal-connect-row', + 'type' => 'hook', + ), + 'paypal_sandbox_client_id' => array( + 'id' => 'paypal_sandbox_client_id', + 'name' => __( 'Test Client ID', 'easy-digital-downloads' ), + 'desc' => __( 'Enter your test client ID.', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + 'class' => 'edd-hidden', + ), + 'paypal_sandbox_client_secret' => array( + 'id' => 'paypal_sandbox_client_secret', + 'name' => __( 'Test Client Secret', 'easy-digital-downloads' ), + 'desc' => __( 'Enter your test client secret.', 'easy-digital-downloads' ), + 'type' => 'password', + 'size' => 'regular', + 'class' => 'edd-hidden', + ), + 'paypal_live_client_id' => array( + 'id' => 'paypal_live_client_id', + 'name' => __( 'Live Client ID', 'easy-digital-downloads' ), + 'desc' => __( 'Enter your live client ID.', 'easy-digital-downloads' ), + 'type' => 'text', + 'size' => 'regular', + 'class' => 'edd-hidden', + ), + 'paypal_live_client_secret' => array( + 'id' => 'paypal_live_client_secret', + 'name' => __( 'Live Client Secret', 'easy-digital-downloads' ), + 'desc' => __( 'Enter your live client secret.', 'easy-digital-downloads' ), + 'type' => 'password', + 'size' => 'regular', + 'class' => 'edd-hidden', + ), + 'paypal_documentation' => array( + 'id' => 'paypal_documentation', + 'name' => '', + 'type' => 'hook', + ), + ); + + $is_connected = PayPal\has_rest_api_connection(); + if ( ! $is_connected ) { + $paypal_settings['paypal_settings']['tooltip_title'] = __( 'Connect with PayPal', 'easy-digital-downloads' ); + $paypal_settings['paypal_settings']['tooltip_desc'] = _x( + 'Connecting your store with PayPal allows Easy Digital Downloads to automatically configure your store to securely communicate with PayPal.

    You may see \'Sandhills Development, LLC\', mentioned during the process—that is the company behind Easy Digital Downloads.', + "It is important to escape any quotations within this string, specifically \'Sandhills Development, LLC\'", + 'easy-digital-downloads' + ); + } + + /** + * Filters the PayPal Settings. + * + * @param array $paypal_settings + */ + $paypal_settings = apply_filters( 'edd_paypal_settings', $paypal_settings ); + $gateway_settings['paypal_commerce'] = $paypal_settings; + + return $gateway_settings; +} + +add_filter( 'edd_settings_gateways', __NAMESPACE__ . '\register_gateway_settings', 1, 1 ); + +/** + * Returns the content for the documentation settings. + * + * @since 2.11 + * @return string + */ +function documentation_settings_field() { + ?> +

    + + + + + + + +

    + +
    +

    + SSL setup article.', 'easy-digital-downloads' ), + 'https://easydigitaldownloads.com/docs/do-i-need-an-ssl-certificate/' + ), array( 'a' => array( 'href' => true, 'target' => true ) ) ); + ?> +

    +
    + supports_buy_now( $price_id ); + + if ( false === $supports_buy_now ) { + return $args; + } + + if ( ! empty( $args['direct'] ) ) { + $args['class'] .= ' edd-paypal-checkout-buy-now'; + } + + return $args; +} + +add_filter( 'edd_purchase_link_args', __NAMESPACE__ . '\maybe_add_purchase_link_class' ); + +/** + * Registers PayPal Commerce JavaScript if using "direct" buy now links. + * + * @param int $download_id ID of the download. + * @param array $args Purchase link arguments. + * + * @since 2.11 + */ +function maybe_enable_buy_now_js( $download_id, $args ) { + if ( empty( $args['direct'] ) || ! is_buy_now_enabled() ) { + return; + } + + $download = new \EDD_Download( $download_id ); + if ( empty( $download ) ) { + return; + } + + // Use the Download Class to determine if it supports Buy Now. + $price_id = is_numeric( $args['price_id'] ) ? absint( $args['price_id'] ) : null; + $supports_buy_now = $download->supports_buy_now( $price_id ); + + if ( false === $supports_buy_now ) { + return; + } + + register_js( true ); + $timestamp = time(); + ?> + + + + +
    +
    + + +
    +

    + +

    +
    + 403 ) ); + } + + edd_debug_log( 'PayPal - create_order()' ); + + if ( ! ready_to_accept_payments() ) { + edd_record_gateway_error( + __( 'PayPal Gateway Error', 'easy-digital-downloads' ), + __( 'Account not ready to accept payments.', 'easy-digital-downloads' ) + ); + + $error_message = current_user_can( 'manage_options' ) + ? __( 'Please connect your PayPal account in the gateway settings.', 'easy-digital-downloads' ) + : __( 'Unexpected authentication error. Please contact a site administrator.', 'easy-digital-downloads' ); + + wp_send_json_error( edd_build_errors_html( array( + 'paypal-error' => $error_message + ) ) ); + } + + try { + // Create pending payment in EDD. + $payment_args = array( + 'price' => $purchase_data['price'], + 'date' => $purchase_data['date'], + 'user_email' => $purchase_data['user_email'], + 'purchase_key' => $purchase_data['purchase_key'], + 'currency' => edd_get_currency(), + 'downloads' => $purchase_data['downloads'], + 'cart_details' => $purchase_data['cart_details'], + 'user_info' => $purchase_data['user_info'], + 'status' => 'pending', + 'gateway' => 'paypal_commerce' + ); + + $payment_id = edd_insert_payment( $payment_args ); + + if ( ! $payment_id ) { + throw new Gateway_Exception( + __( 'An unexpected error occurred. Please try again.', 'easy-digital-downloads' ), + 500, + sprintf( + 'Payment creation failed before sending buyer to PayPal. Payment data: %s', + json_encode( $payment_args ) + ) + ); + } + + $order_data = array( + 'intent' => 'CAPTURE', + 'purchase_units' => get_order_purchase_units( $payment_id, $purchase_data, $payment_args ), + 'application_context' => array( + //'locale' => get_locale(), // PayPal doesn't like this. Might be able to replace `_` with `-` + 'shipping_preference' => 'NO_SHIPPING', + 'user_action' => 'PAY_NOW', + 'return_url' => edd_get_checkout_uri(), + 'cancel_url' => edd_get_failed_transaction_uri( '?payment-id=' . urlencode( $payment_id ) ) + ), + 'payment_instructions' => array( + 'disbursement_mode' => 'INSTANT' + ) + ); + + // Add payer data if we have it. We won't have it when using Buy Now buttons. + if ( ! empty( $purchase_data['user_email'] ) ) { + $order_data['payer']['email_address'] = $purchase_data['user_email']; + } + if ( ! empty( $purchase_data['user_info']['first_name'] ) ) { + $order_data['payer']['name']['given_name'] = $purchase_data['user_info']['first_name']; + } + if ( ! empty( $purchase_data['user_info']['last_name'] ) ) { + $order_data['payer']['name']['surname'] = $purchase_data['user_info']['last_name']; + } + + /** + * Filters the arguments sent to PayPal. + * + * @param array $order_data API request arguments. + * @param array $purchase_data Purchase data. + * @param int $payment_id ID of the EDD payment. + * + * @since 2.11 + */ + $order_data = apply_filters( 'edd_paypal_order_arguments', $order_data, $purchase_data, $payment_id ); + + try { + $api = new API(); + $response = $api->make_request( 'v2/checkout/orders', $order_data ); + + if ( ! isset( $response->id ) && _is_item_total_mismatch( $response ) ) { + + edd_record_gateway_error( + __( 'PayPal Gateway Warning', 'easy-digital-downloads' ), + sprintf( + /* translators: %s: Original order data sent to PayPal. */ + __( 'PayPal could not complete the transaction with the itemized breakdown. Original order data sent: %s', 'easy-digital-downloads' ), + json_encode( $order_data ) + ), + $payment_id + ); + + // Try again without the item breakdown. That way if we have an error in our totals the whole API request won't fail. + $order_data['purchase_units'] = array( + get_order_purchase_units_without_breakdown( $payment_id, $purchase_data, $payment_args ) + ); + + // Re-apply the filter. + $order_data = apply_filters( 'edd_paypal_order_arguments', $order_data, $purchase_data, $payment_id ); + + $response = $api->make_request( 'v2/checkout/orders', $order_data ); + } + + if ( ! isset( $response->id ) ) { + throw new Gateway_Exception( + __( 'An error occurred while communicating with PayPal. Please try again.', 'easy-digital-downloads' ), + $api->last_response_code, + sprintf( + 'Unexpected response when creating order: %s', + json_encode( $response ) + ) + ); + } + + edd_debug_log( sprintf( '-- Successful PayPal response. PayPal order ID: %s; EDD order ID: %d', esc_html( $response->id ), $payment_id ) ); + + edd_update_payment_meta( $payment_id, 'paypal_order_id', sanitize_text_field( $response->id ) ); + + /* + * Send successfully created order ID back. + * We also send back a new nonce, for verification in the next step: `capture_order()`. + * If the user was just logged into a new account, the previously sent nonce may have + * become invalid. + */ + $timestamp = time(); + wp_send_json_success( array( + 'paypal_order_id' => $response->id, + 'edd_order_id' => $payment_id, + 'nonce' => wp_create_nonce( 'edd_process_paypal' ), + 'timestamp' => $timestamp, + 'token' => \EDD\Utils\Tokenizer::tokenize( $timestamp ), + ) ); + } catch ( Authentication_Exception $e ) { + throw new Gateway_Exception( __( 'An authentication error occurred. Please try again.', 'easy-digital-downloads' ), $e->getCode(), $e->getMessage() ); + } catch ( API_Exception $e ) { + throw new Gateway_Exception( __( 'An error occurred while communicating with PayPal. Please try again.', 'easy-digital-downloads' ), $e->getCode(), $e->getMessage() ); + } + } catch ( Gateway_Exception $e ) { + if ( ! isset( $payment_id ) ) { + $payment_id = 0; + } + + $e->record_gateway_error( $payment_id ); + + wp_send_json_error( edd_build_errors_html( array( + 'paypal-error' => $e->getMessage() + ) ) ); + } +} + +add_action( 'edd_gateway_paypal_commerce', __NAMESPACE__ . '\create_order', 9 ); + +/** + * Captures the order in PayPal + * + * @since 2.11 + */ +function capture_order() { + edd_debug_log( 'PayPal - capture_order()' ); + try { + + $token = isset( $_POST['token'] ) ? sanitize_text_field( $_POST['token'] ) : ''; + $timestamp = isset( $_POST['timestamp'] ) ? sanitize_text_field( $_POST['timestamp'] ) : ''; + + if ( ! empty( $timestamp ) && ! empty( $token ) ) { + if ( !\EDD\Utils\Tokenizer::is_token_valid( $token, $timestamp ) ) { + throw new Gateway_Exception( + __('A validation error occurred. Please try again.', 'easy-digital-downloads'), + 403, + 'Token validation failed.' + ); + } + } elseif ( empty( $token ) && ! empty( $_POST['edd_process_paypal_nonce'] ) ) { + if ( ! wp_verify_nonce( $_POST['edd_process_paypal_nonce'], 'edd_process_paypal' ) ) { + throw new Gateway_Exception( + __( 'A validation error occurred. Please try again.', 'easy-digital-downloads' ), + 403, + 'Nonce validation failed.' + ); + } + } else { + throw new Gateway_Exception( + __( 'A validation error occurred. Please try again.', 'easy-digital-downloads' ), + 400, + 'Missing validation fields.' + ); + } + + if ( empty( $_POST['paypal_order_id'] ) ) { + throw new Gateway_Exception( + __( 'An unexpected error occurred. Please try again.', 'easy-digital-downloads' ), + 400, + 'Missing PayPal order ID during capture.' + ); + } + + try { + $api = new API(); + $response = $api->make_request( 'v2/checkout/orders/' . urlencode( $_POST['paypal_order_id'] ) . '/capture' ); + + edd_debug_log( sprintf( '-- PayPal Response code: %d; order ID: %s', $api->last_response_code, esc_html( $_POST['paypal_order_id'] ) ) ); + + if ( ! in_array( $api->last_response_code, array( 200, 201 ) ) ) { + $message = ! empty( $response->message ) ? $response->message : __( 'Failed to process payment. Please try again.', 'easy-digital-downloads' ); + + /* + * If capture failed due to funding source, we want to send a `restart` back to PayPal. + * @link https://developer.paypal.com/docs/checkout/integration-features/funding-failure/ + */ + if ( ! empty( $response->details ) && is_array( $response->details ) ) { + foreach ( $response->details as $detail ) { + if ( isset( $detail->issue ) && 'INSTRUMENT_DECLINED' === $detail->issue ) { + $message = __( 'Unable to complete your order with your chosen payment method. Please choose a new funding source.', 'easy-digital-downloads' ); + $retry = true; + break; + } + } + } + + throw new Gateway_Exception( + $message, + 400, + sprintf( 'Order capture failure. PayPal response: %s', json_encode( $response ) ) + ); + } + + $payment = $transaction_id = false; + if ( isset( $response->purchase_units ) && is_array( $response->purchase_units ) ) { + foreach ( $response->purchase_units as $purchase_unit ) { + if ( ! empty( $purchase_unit->reference_id ) ) { + $payment = edd_get_payment_by( 'key', $purchase_unit->reference_id ); + $transaction_id = isset( $purchase_unit->payments->captures[0]->id ) ? $purchase_unit->payments->captures[0]->id : false; + + if ( ! empty( $payment ) && isset( $purchase_unit->payments->captures[0]->status ) ) { + if ( 'COMPLETED' === strtoupper( $purchase_unit->payments->captures[0]->status ) ) { + $payment->status = 'complete'; + } elseif( 'DECLINED' === strtoupper( $purchase_unit->payments->captures[0]->status ) ) { + $payment->status = 'failed'; + } + } + break; + } + } + } + + if ( ! empty( $payment ) ) { + /** + * Buy Now Button + * + * Fill in missing data when using "Buy Now". This bypasses checkout so not all information + * was collected prior to payment. Instead, we pull it from the PayPal info. + */ + if ( empty( $payment->email ) ) { + if ( ! empty( $response->payer->email_address ) ) { + $payment->email = sanitize_text_field( $response->payer->email_address ); + } + if ( empty( $payment->first_name ) && ! empty( $response->payer->name->given_name ) ) { + $payment->first_name = sanitize_text_field( $response->payer->name->given_name ); + } + if ( empty( $payment->last_name ) && ! empty( $response->payer->name->surname ) ) { + $payment->last_name = sanitize_text_field( $response->payer->name->surname ); + } + + if ( empty( $payment->customer_id ) && ! empty( $payment->email ) ) { + $customer = new \EDD_Customer( $payment->email ); + + if ( $customer->id < 1 ) { + $customer->create( array( + 'email' => $payment->email, + 'name' => trim( sprintf( '%s %s', $payment->first_name, $payment->last_name ) ), + 'user_id' => $payment->user_id + ) ); + } + } + } + + if ( ! empty( $transaction_id ) ) { + $payment->transaction_id = sanitize_text_field( $transaction_id ); + + edd_insert_payment_note( $payment->ID, sprintf( + /* translators: %s: PayPal Transaction ID */ + __( 'PayPal Transaction ID: %s', 'easy-digital-downloads' ), + esc_html( $transaction_id ) + ) ); + } + + $payment->save(); + + if ( 'failed' === $payment->status ) { + $retry = true; + throw new Gateway_Exception( + __( 'Your payment was declined. Please try a new payment method.', 'easy-digital-downloads' ), + 400, + sprintf( 'Order capture failure. PayPal response: %s', json_encode( $response ) ) + ); + } + } + + wp_send_json_success( array( 'redirect_url' => edd_get_success_page_uri() ) ); + } catch ( Authentication_Exception $e ) { + throw new Gateway_Exception( __( 'An authentication error occurred. Please try again.', 'easy-digital-downloads' ), $e->getCode(), $e->getMessage() ); + } catch ( API_Exception $e ) { + throw new Gateway_Exception( __( 'An error occurred while communicating with PayPal. Please try again.', 'easy-digital-downloads' ), $e->getCode(), $e->getMessage() ); + } + } catch ( Gateway_Exception $e ) { + if ( ! isset( $payment_id ) ) { + $payment_id = 0; + } + + $e->record_gateway_error( $payment_id ); + + wp_send_json_error( array( + 'message' => edd_build_errors_html( array( + 'paypal_capture_failure' => $e->getMessage() + ) ), + 'retry' => isset( $retry ) ? $retry : false + ) ); + } +} + +add_action( 'wp_ajax_nopriv_edd_capture_paypal_order', __NAMESPACE__ . '\capture_order' ); +add_action( 'wp_ajax_edd_capture_paypal_order', __NAMESPACE__ . '\capture_order' ); + +/** + * Gets a fresh set of gateway options when a PayPal order is cancelled. + * @link https://github.com/awesomemotive/easy-digital-downloads/issues/8883 + * + * @since 2.11.3 + * @return void + */ +function cancel_order() { + $nonces = array(); + $gateways = edd_get_enabled_payment_gateways( true ); + foreach ( $gateways as $gateway_id => $gateway ) { + $nonces[ $gateway_id ] = wp_create_nonce( 'edd-gateway-selected-' . esc_attr( $gateway_id ) ); + } + + wp_send_json_success( + array( + 'nonces' => $nonces, + ) + ); +} +add_action( 'wp_ajax_nopriv_edd_cancel_paypal_order', __NAMESPACE__ . '\cancel_order' ); +add_action( 'wp_ajax_edd_cancel_paypal_order', __NAMESPACE__ . '\cancel_order' ); diff --git a/includes/gateways/paypal/class-account-status-validator.php b/includes/gateways/paypal/class-account-status-validator.php new file mode 100644 index 00000000000..f44c3ff3873 --- /dev/null +++ b/includes/gateways/paypal/class-account-status-validator.php @@ -0,0 +1,178 @@ +mode = $mode; + + // Set up base error objects. + $this->errors_for_credentials = new \WP_Error(); + $this->errors_for_merchant_account = new \WP_Error(); + $this->errors_for_webhook = new \WP_Error(); + } + + /** + * Checks everything. + * + * @since 2.11 + */ + public function check() { + $this->check_rest(); + $this->check_merchant_account(); + $this->check_webhook(); + } + + /** + * Checks for valid REST API credentials. + * + * @since 2.11 + */ + public function check_rest() { + $credentials = array( + 'client_id' => edd_get_option( 'paypal_' . $this->mode . '_client_id' ), + 'client_secret' => edd_get_option( 'paypal_' . $this->mode . '_client_secret' ), + ); + + foreach ( $credentials as $credential ) { + if ( empty( $credential ) ) { + $this->errors_for_credentials->add( 'no_credentials', __( 'Not connected.', 'easy-digital-downloads' ) ); + break; + } + } + } + + /** + * Determines if the merchant account is ready to accept payments. + * It's possible (I think) to have valid API credentials ( @see AccountStatusValidator::check_rest() ) + * but still be unable to start taking payments, such as because your account + * email hasn't been confirmed yet. + * + * @since 2.11 + */ + public function check_merchant_account() { + try { + $this->merchant_details = MerchantAccount::retrieve(); + $this->merchant_details->validate(); + + if ( ! $this->merchant_details->is_account_ready() ) { + foreach ( $this->merchant_details->get_errors()->get_error_codes() as $code ) { + $this->errors_for_merchant_account->add( $code, $this->merchant_details->get_errors()->get_error_message( $code ) ); + } + } + } catch ( Exceptions\MissingMerchantDetails $e ) { + $this->errors_for_merchant_account->add( 'missing_merchant_details', __( 'Missing merchant details from PayPal. Please reconnect and make sure you click the button to be redirected back to your site.', 'easy-digital-downloads' ) ); + } catch ( Exceptions\InvalidMerchantDetails $e ) { + $this->errors_for_merchant_account->add( 'invalid_merchant_details', $e->getMessage() ); + } + } + + /** + * Confirms that the webhook is set up and has all the necessary events registered. + * + * @since 2.11 + */ + public function check_webhook() { + try { + $this->webhook = Webhooks\get_webhook_details( $this->mode ); + if ( empty( $this->webhook->id ) ) { + throw new \Exception( __( 'Webhook not configured. Some actions may not work properly.', 'easy-digital-downloads' ) ); + } + + // Now compare the events to make sure we have them all. + $expected_events = array_keys( Webhooks\get_webhook_events( $this->mode ) ); + + if ( ! empty( $this->webhook->event_types ) && is_array( $this->webhook->event_types ) ) { + foreach ( $this->webhook->event_types as $event_type ) { + if ( ! empty( $event_type->name ) && ! empty( $event_type->status ) && 'ENABLED' === strtoupper( $event_type->status ) ) { + $this->enabled_webhook_events[] = $event_type->name; + } + } + } + + $missing_events = array_diff( $expected_events, $this->enabled_webhook_events ); + $number_missing = count( $missing_events ); + + if ( $number_missing ) { + $this->errors_for_webhook->add( 'missing_events', _n( + 'Webhook is configured but missing an event. Click "Sync Webhook" to correct this.', + 'Webhook is configured but missing events. Click "Sync Webhook" to correct this.', + $number_missing, + 'easy-digital-downloads' + ) ); + } + } catch ( \Exception $e ) { + $this->errors_for_webhook->add( 'webhook_missing', $e->getMessage() ); + } + } + +} diff --git a/includes/gateways/paypal/class-merchant-account.php b/includes/gateways/paypal/class-merchant-account.php new file mode 100644 index 00000000000..b48cde5904d --- /dev/null +++ b/includes/gateways/paypal/class-merchant-account.php @@ -0,0 +1,207 @@ + $value ) { + if ( ! property_exists( $this, $key ) ) { + continue; + } + + $this->{$key} = $value; + } + + $this->wp_error = new \WP_Error(); + } + + /** + * Builds a new MerchantAccount object from a JSON object. + * + * @since 2.11 + * + * @param string $json + * + * @return MerchantAccount + */ + public static function from_json( $json ) { + $merchant_details = json_decode( $json, true ); + if ( empty( $merchant_details ) || ! is_array( $merchant_details ) ) { + $merchant_details = array(); + } + + return new MerchantAccount( $merchant_details ); + } + + /** + * Converts the account details to JSON. + * + * @since 2.11 + * + * @return string|false + */ + public function to_json() { + return json_encode( get_object_vars( $this ) ); + } + + /** + * Determines whether or not the details are valid. + * Note: This does NOT determine actual "ready to accept payments" status, it just + * verifies that we have all the information we need to determine that. + * + * @throws MissingMerchantDetails + * @throws InvalidMerchantDetails + */ + public function validate() { + if ( empty( $this->merchant_id ) ) { + throw new MissingMerchantDetails(); + } + + $required_properties = array( + 'merchant_id', + 'payments_receivable', + 'primary_email_confirmed', + 'products', + ); + + $valid_properties = array(); + foreach( $required_properties as $property ) { + if ( property_exists( $this, $property ) && ! is_null( $this->{$property} ) ) { + $valid_properties[] = $property; + } + } + + $difference = array_diff( $required_properties, $valid_properties ); + + if ( $difference ) { + throw new InvalidMerchantDetails( + 'Please click "Re-Check Payment Status" below to confirm your payment status.' + ); + } + } + + /** + * Determines whether or not the account is ready to accept payments. + * + * @since 2.11 + * + * @return bool + */ + public function is_account_ready() { + if ( ! $this->payments_receivable ) { + $this->wp_error->add( 'payments_receivable', __( 'Your account is unable to receive payments. Please contact PayPal customer support.', 'easy-digital-downloads' ) ); + } + + if ( ! $this->primary_email_confirmed ) { + $this->wp_error->add( + 'primary_email_confirmed', + __( 'Your PayPal email address needs to be confirmed.', 'easy-digital-downloads' ) + ); + } + + return empty( $this->wp_error->errors ); + } + + /** + * Retrieves errors preventing the account from being "ready". + * + * @see MerchantAccount::is_account_ready() + * + * @since 2.11 + * + * @return \WP_Error + */ + public function get_errors() { + return $this->wp_error; + } + + /** + * Returns the option name for the current mode. + * + * @since 2.11 + * + * @return string + */ + private static function get_option_name() { + return sprintf( + 'edd_paypal_%s_merchant_details', + edd_is_test_mode() ? API::MODE_SANDBOX : API::MODE_LIVE + ); + } + + /** + * Saves the merchant details. + * + * @since 2.11 + */ + public function save() { + update_option( self::get_option_name(), $this->to_json() ); + } + + /** + * Retrieves the saved merchant details. + * + * @since 2.11 + * + * @return MerchantAccount + * @throws \InvalidArgumentException + */ + public static function retrieve() { + return self::from_json( get_option( self::get_option_name(), '' ) ); + } + +} diff --git a/includes/gateways/paypal/class-paypal-api.php b/includes/gateways/paypal/class-paypal-api.php new file mode 100644 index 00000000000..ec1f25af76d --- /dev/null +++ b/includes/gateways/paypal/class-paypal-api.php @@ -0,0 +1,279 @@ +mode = $mode; + + if ( self::MODE_SANDBOX === $mode ) { + $this->api_url = 'https://api-m.sandbox.paypal.com'; + } else { + $this->api_url = 'https://api-m.paypal.com'; + } + + if ( empty( $credentials ) ) { + $credentials = array( + 'client_id' => edd_get_option( 'paypal_' . $this->mode . '_client_id' ), + 'client_secret' => edd_get_option( 'paypal_' . $this->mode . '_client_secret' ), + ); + } + + $this->set_credentials( $credentials ); + } + + /** + * Magic getter + * + * @param string $property + * + * @since 2.10 + * @return mixed + */ + public function __get( $property ) { + return isset( $this->{$property} ) ? $this->{$property} : null; + } + + /** + * Sets the credentials to use for API requests. + * + * @param array $creds { + * Credentials to set. + * + * @type string $client_id PayPal client ID. + * @type string $client_secret PayPal client secret. + * @type string $cache_key Cache key used for storing the access token until it expires. Should be unique to + * the set of credentials. The mode is automatically appended, so should not be + * included manually. + * } + * + * @since 2.11 + * @throws Authentication_Exception + */ + public function set_credentials( $creds ) { + $creds = wp_parse_args( $creds, array( + 'client_id' => '', + 'client_secret' => '', + 'cache_key' => 'edd_paypal_commerce_access_token' + ) ); + + $required_creds = array( 'client_id', 'client_secret', 'cache_key' ); + + foreach ( $required_creds as $cred_id ) { + if ( empty( $creds[ $cred_id ] ) ) { + throw new Authentication_Exception( sprintf( + /* translators: %s: The ID of the PayPal credential */ + __( 'Missing PayPal credential: %s', 'easy-digital-downloads' ), + $cred_id + ) ); + } + } + + foreach ( $creds as $cred_id => $cred_value ) { + $this->{$cred_id} = $cred_value; + } + + $this->token_cache_key = sanitize_key( $creds['cache_key'] . '_' . $this->mode ); + } + + /** + * Retrieves the access token. This checks cache first, and if the cached token isn't valid then + * a new one is generated from the API. + * + * @since 2.11 + * @return Token + * @throws API_Exception + */ + public function get_access_token() { + try { + $token = Token::from_json( (string) get_option( $this->token_cache_key ) ); + + return ! $token->is_expired() ? $token : $this->generate_access_token(); + } catch ( \RuntimeException $e ) { + return $this->generate_access_token(); + } + } + + /** + * Generates a new access token and caches it. + * + * @since 2.11 + * @return Token + * @throws API_Exception + */ + private function generate_access_token() { + $response = wp_remote_post( $this->api_url . '/v1/oauth2/token', array( + 'headers' => array( + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Authorization' => sprintf( 'Basic %s', base64_encode( sprintf( '%s:%s', $this->client_id, $this->client_secret ) ) ), + 'timeout' => 15 + ), + 'body' => array( + 'grant_type' => 'client_credentials' + ), + 'user-agent' => 'Easy Digital Downloads/' . EDD_VERSION . '; ' . get_bloginfo( 'name' ), + ) ); + + $body = json_decode( wp_remote_retrieve_body( $response ) ); + $code = intval( wp_remote_retrieve_response_code( $response ) ); + + if ( is_wp_error( $response ) ) { + throw new API_Exception( $response->get_error_message(), $code ); + } + + if ( ! empty( $body->error_description ) ) { + throw new API_Exception( $body->error_description, $code ); + } + + if ( 200 !== $code ) { + throw new API_Exception( sprintf( + /* translators: %d: HTTP response code. */ + __( 'Unexpected response code: %d', 'easy-digital-downloads' ), + $code + ), $code ); + } + + $token = new Token( $body ); + + update_option( $this->token_cache_key, $token->to_json() ); + + return $token; + } + + /** + * Makes an API request. + * + * @param string $endpoint API endpoint. + * @param array $body Array of data to send in the request. + * @param array $headers Array of headers. + * @param string $method HTTP method. + * + * @since 2.11 + * @return mixed + * @throws API_Exception + */ + public function make_request( $endpoint, $body = array(), $headers = array(), $method = 'POST' ) { + $headers = wp_parse_args( $headers, array( + 'Content-Type' => 'application/json', + 'Authorization' => sprintf( 'Bearer %s', $this->get_access_token()->token() ), + 'PayPal-Partner-Attribution-Id' => EDD_PAYPAL_PARTNER_ATTRIBUTION_ID + ) ); + + $request_args = array( + 'method' => $method, + 'timeout' => 15, + 'headers' => $headers, + 'user-agent' => 'Easy Digital Downloads/' . EDD_VERSION . '; ' . get_bloginfo( 'name' ), + ); + + if ( ! empty( $body ) ) { + $request_args['body'] = json_encode( $body ); + } + + // In a few rare cases, we may be providing a full URL to `$endpoint` instead of just the path. + $api_url = ( 'https://' === substr( $endpoint, 0, 8 ) ) ? $endpoint : $this->api_url . '/' . $endpoint; + + $response = wp_remote_request( $api_url, $request_args ); + + if ( is_wp_error( $response ) ) { + throw new API_Exception( $response->get_error_message() ); + } + + $this->last_response_code = intval( wp_remote_retrieve_response_code( $response ) ); + + return json_decode( wp_remote_retrieve_body( $response ) ); + } + +} diff --git a/includes/gateways/paypal/class-token.php b/includes/gateways/paypal/class-token.php new file mode 100644 index 00000000000..25cc81e399a --- /dev/null +++ b/includes/gateways/paypal/class-token.php @@ -0,0 +1,112 @@ +created ) ) { + $token_object->created = time(); + } + + if ( ! $this->is_valid( $token_object ) ) { + throw new \RuntimeException( __( 'Invalid token.', 'easy-digital-downloads' ) ); + } + + $this->token_object = $token_object; + } + + /** + * Creates a new token from a JSON string. + * + * @param string $json + * + * @return Token + * @throws \Exception + */ + public static function from_json( $json ) { + return new Token( json_decode( $json ) ); + } + + /** + * Returns the token object as a JSON string. + * + * @since 2.11 + * @return string|false + */ + public function to_json() { + return json_encode( $this->token_object ); + } + + /** + * Determines whether or not the token has expired. + * + * @since 2.11 + * @return bool + */ + public function is_expired() { + // Regenerate tokens 10 minutes early, just in case. + $expires_in = $this->token_object->expires_in - ( 10 * MINUTE_IN_SECONDS ); + + return time() > $this->token_object->created + $expires_in; + } + + /** + * Returns the access token. + * + * @since 2.11 + * @return string + */ + public function token() { + return $this->token_object->access_token; + } + + /** + * Determines whether or not we have a valid token object. + * Note: This does not check the _expiration_ of the token, just validates that the expected + * data is _present_. + * + * @param object $token_object + * + * @since 2.11 + * @return bool + */ + private function is_valid( $token_object ) { + $required_properties = array( + 'created', + 'access_token', + 'expires_in' + ); + + foreach ( $required_properties as $property ) { + if ( ! isset( $token_object->{$property} ) ) { + return false; + } + } + + return true; + } + +} diff --git a/includes/gateways/paypal/deprecated.php b/includes/gateways/paypal/deprecated.php new file mode 100644 index 00000000000..d0e18e0bece --- /dev/null +++ b/includes/gateways/paypal/deprecated.php @@ -0,0 +1,102 @@ +gateway ) { + return; + } + + $mode = ( 'live' === $payment->mode ) ? API::MODE_LIVE : API::MODE_SANDBOX; + + try { + $api = new API( $mode ); + } catch ( Exceptions\Authentication_Exception $e ) { + // If we don't have credentials. + return; + } + + $label = __( 'Refund Transaction in PayPal', 'easy-digital-downloads' ); + ?> + + ID ) ) { + return; + } + + if ( 'paypal_commerce' !== $payment->gateway || empty( $_POST['edd-paypal-commerce-refund'] ) ) { + return; + } + + // Payment status should be coming from "publish" or "revoked". + // @todo In 3.0 use `edd_get_refundable_order_statuses()` + if ( ! in_array( $payment->old_status, array( 'publish', 'complete', 'revoked', 'edd_subscription' ) ) ) { + return; + } + + // If the payment has already been refunded, bail. + if ( $payment->get_meta( '_edd_paypal_refunded', true ) ) { + return; + } + + // Process the refund. + try { + refund_transaction( $payment ); + } catch ( \Exception $e ) { + edd_insert_payment_note( $payment->ID, sprintf( + /* translators: %s: The error message */ + __( 'Failed to refund transaction in PayPal. Error Message: %s', 'easy-digital-downloads' ), + $e->getMessage() + ) ); + } +} diff --git a/includes/gateways/paypal/exceptions/class-api-exception.php b/includes/gateways/paypal/exceptions/class-api-exception.php new file mode 100644 index 00000000000..781afab4a59 --- /dev/null +++ b/includes/gateways/paypal/exceptions/class-api-exception.php @@ -0,0 +1,17 @@ +debug_message = $debug_message; + + parent::__construct( $message, $code ); + } + + /** + * Records a gateway error based off this exception. + * + * @param int $payment_id + * + * @since 2.11 + */ + public function record_gateway_error( $payment_id = 0 ) { + $message = ! empty( $this->debug_message ) ? $this->debug_message : $this->getMessage(); + + edd_record_gateway_error( + __( 'PayPal Gateway Error', 'easy-digital-downloads' ), + sprintf( + /* translators: 1: Response code, 2: Response message */ + __( 'Response Code: %1$d; Message: %2$s', 'easy-digital-downloads' ), + $this->getCode(), + $message + ), + $payment_id + ); + } + +} diff --git a/includes/gateways/paypal/exceptions/class-invalid-merchant-details.php b/includes/gateways/paypal/exceptions/class-invalid-merchant-details.php new file mode 100644 index 00000000000..6d115895b2e --- /dev/null +++ b/includes/gateways/paypal/exceptions/class-invalid-merchant-details.php @@ -0,0 +1,15 @@ +check_merchant_account(); + + return empty( $validator->errors_for_merchant_account->errors ); +} + +/** + * Determines whether or not PayPal Standard should be enabled. + * This returns true if the store owner previously had a PayPal Standard connection but has not yet + * connected to the new REST API implementation. + * + * If PayPal Standard is enabled, then PayPal payments run through the legacy API. + * + * @param string $mode If omitted, current site mode is used. + * + * @since 2.11 + * @return bool + */ +function paypal_standard_enabled( $mode = '' ) { + if ( empty( $mode ) ) { + $mode = edd_is_test_mode() ? API::MODE_SANDBOX : API::MODE_LIVE; + } + + $rest_connection = has_rest_api_connection( $mode ); + $enabled = ! $rest_connection && edd_get_option( 'paypal_email' ); + + /** + * Filters whether or not PayPal Standard is enabled. + * + * @since 2.11 + * + * @param bool $enabled + */ + return apply_filters( 'edd_paypal_standard_enabled', $enabled ); +} + +/** + * Returns the partner merchant ID for a given mode. + * + * @param string $mode If omitted, current site mode is used. + * + * @since 2.11 + * @return string + */ +function get_partner_merchant_id( $mode = '' ) { + if ( empty( $mode ) ) { + $mode = edd_is_test_mode() ? API::MODE_SANDBOX : API::MODE_LIVE; + } + + if ( API::MODE_LIVE === $mode ) { + return EDD_PAYPAL_MERCHANT_ID; + } else { + return EDD_PAYPAL_SANDBOX_MERCHANT_ID; + } +} + +/** + * Returns the styles used for the PayPal buttons. + * + * @return array + */ +function get_button_styles() { + $styles = array( + 'layout' => 'vertical', + 'size' => 'responsive', + 'shape' => 'rect', + 'color' => 'gold', + 'label' => 'paypal' + ); + + if ( ! edd_is_checkout() ) { + $styles['layout'] = 'horizontal'; + $styles['label'] = 'buynow'; + } + + /** + * Filters the button styles. + * + * @since 2.11 + */ + return apply_filters( 'edd_paypal_smart_button_style', $styles ); +} + +/** + * Gets the PayPal purchase units without the individual item breakdown. + * + * @since 2.11.2 + * + * @param int $payment_id The payment/order ID. + * @param array $purchase_data The array of purchase data. + * @param array $payment_args The array created to insert the payment into the database. + * + * @return array + */ +function get_order_purchase_units_without_breakdown( $payment_id, $purchase_data, $payment_args ) { + $order_amount = array( + 'currency_code' => edd_get_currency(), + 'value' => (string) edd_sanitize_amount( $purchase_data['price'] ), + ); + if ( (float) $purchase_data['tax'] > 0 ) { + $order_amount['breakdown'] = array( + 'item_total' => array( + 'currency_code' => edd_get_currency(), + 'value' => (string) edd_sanitize_amount( $purchase_data['price'] - $purchase_data['tax'] ) + ), + 'tax_total' => array( + 'currency_code' => edd_get_currency(), + 'value' => (string) edd_sanitize_amount( $purchase_data['tax'] ), + ) + ); + } + + return array( + 'reference_id' => $payment_args['purchase_key'], + 'amount' => $order_amount, + 'custom_id' => $payment_id + ); +} + +/** + * Gets the PayPal purchase units. The order breakdown includes the order items, tax, and discount. + * + * @since 2.11.2 + * @param int $payment_id The payment/order ID. + * @param array $purchase_data The array of purchase data. + * @param array $payment_args The array created to insert the payment into the database. + * @return array + */ +function get_order_purchase_units( $payment_id, $purchase_data, $payment_args ) { + + $currency = edd_get_currency(); + $order_subtotal = $purchase_data['subtotal']; + $items = get_order_items( $purchase_data ); + // Adjust the order subtotal if any items are discounted. + foreach ( $items as &$item ) { + // A discount can be negative, so cast it to an absolute value for comparison. + if ( (float) abs( $item['discount'] ) > 0 ) { + $order_subtotal -= $item['discount']; + } + + // The discount amount is not passed to PayPal as part of the $item. + unset( $item['discount'] ); + } + + $discount = 0; + // Fees which are not item specific need to be added to the PayPal data as order items. + if ( ! empty( $purchase_data['fees'] ) ) { + foreach ( $purchase_data['fees'] as $fee ) { + if ( ! empty( $fee['download_id'] ) ) { + continue; + } + // Positive fees. + if ( floatval( $fee['amount'] ) > 0 ) { + $items[] = array( + 'name' => stripslashes_deep( html_entity_decode( wp_strip_all_tags( $fee['label'] ), ENT_COMPAT, 'UTF-8' ) ), + 'unit_amount' => array( + 'currency_code' => $currency, + 'value' => (string) edd_sanitize_amount( $fee['amount'] ), + ), + 'quantity' => 1, + ); + $order_subtotal += abs( $fee['amount'] ); + } else { + // This is a negative fee (discount) not assigned to a specific Download + $discount += abs( $fee['amount'] ); + } + } + } + + $order_amount = array( + 'currency_code' => $currency, + 'value' => (string) edd_sanitize_amount( $purchase_data['price'] ), + 'breakdown' => array( + 'item_total' => array( + 'currency_code' => $currency, + 'value' => (string) edd_sanitize_amount( $order_subtotal ), + ), + ), + ); + + $tax = (float) $purchase_data['tax'] > 0 ? $purchase_data['tax'] : 0; + if ( $tax > 0 ) { + $order_amount['breakdown']['tax_total'] = array( + 'currency_code' => $currency, + 'value' => (string) edd_sanitize_amount( $tax ), + ); + } + + // This is only added by negative global fees. + if ( $discount > 0 ) { + $order_amount['breakdown']['discount'] = array( + 'currency_code' => $currency, + 'value' => (string) edd_sanitize_amount( $discount ), + ); + } + + return array( + wp_parse_args( array( + 'amount' => $order_amount, + 'items' => $items + ), get_order_purchase_units_without_breakdown( $payment_id, $purchase_data, $payment_args ) ) + ); +} + +/** + * Gets an array of order items, formatted for PayPal, from the $purchase_data. + * + * @since 2.11.2 + * @param array $purchase_data + * @return array + */ +function get_order_items( $purchase_data ) { + // Create an array of items for the order. + $items = array(); + if ( ! is_array( $purchase_data['cart_details'] ) || empty( $purchase_data['cart_details'] ) ) { + return $items; + } + $i = 0; + foreach ( $purchase_data['cart_details'] as $item ) { + $item_amount = ( $item['subtotal'] / $item['quantity'] ) - ( $item['discount'] / $item['quantity'] ); + + if ( $item_amount <= 0 ) { + $item_amount = 0; + } + + $substr_func = function_exists( 'mb_substr' ) ? 'mb_substr' : 'substr'; + $name = $substr_func( edd_get_cart_item_name( $item ), 0, 127 ); + + $items[ $i ] = array( + 'name' => stripslashes_deep( html_entity_decode( $name, ENT_COMPAT, 'UTF-8' ) ), + 'quantity' => $item['quantity'], + 'unit_amount' => array( + 'currency_code' => edd_get_currency(), + 'value' => (string) edd_sanitize_amount( $item_amount ), + ), + 'discount' => $item['discount'], // This is unset later and never sent to PayPal. + ); + if ( edd_use_skus() ) { + $sku = edd_get_download_sku( $item['id'] ); + if ( ! empty( $sku ) && '-' !== $sku ) { + $items[ $i ]['sku'] = $sku; + } + } + $i++; + } + + return $items; +} + +/** + * Attempts to detect if there's an item total mismatch. This means the individual item breakdowns don't + * add up to our proposed totals. + * + * @link https://github.com/easydigitaldownloads/easy-digital-downloads/pull/8835#issuecomment-921759101 + * @internal Not intended for public use. + * + * @since 2.11.2 + * + * @param object $response + * + * @return bool + */ +function _is_item_total_mismatch( $response ) { + if ( ! isset( $response->details ) || ! is_array( $response->details ) ) { + return false; + } + + foreach( $response->details as $detail ) { + if ( ! empty( $detail->issue ) && 'ITEM_TOTAL_MISMATCH' === strtoupper( $detail->issue ) ) { + return true; + } + } + + return false; +} diff --git a/includes/gateways/paypal/gateway-filters.php b/includes/gateways/paypal/gateway-filters.php new file mode 100644 index 00000000000..87cd65a9389 --- /dev/null +++ b/includes/gateways/paypal/gateway-filters.php @@ -0,0 +1,111 @@ +mode ) ? 'sandbox.' : ''; + $transaction_url = 'https://' . urlencode( $subdomain ) . 'paypal.com/activity/payment/' . urlencode( $transaction_id ); + + return '' . esc_html( $transaction_id ) . ''; +} + +add_filter( 'edd_payment_details_transaction_id-paypal_commerce', __NAMESPACE__ . '\link_transaction_id', 10, 2 ); + +/** + * By default, EDD_Payment converts an empty transaction ID to be the ID of the payment. + * We don't want that to happen... Empty should be empty. + * + * @since 2.11 + */ +add_filter( 'edd_get_payment_transaction_id-paypal_commerce', '__return_false' ); + +/** + * Adds a link to the dispute within PayPal. + * + * @since 3.2.0 + * @param string $dispute_id + * @param EDD\Orders\Order $order + * @return string + */ +function link_dispute_id( $dispute_id, $order ) { + $subdomain = 'test' === $order->mode ? 'sandbox.' : ''; + $url = 'https://www.' . urlencode( $subdomain ) . 'paypal.com/resolutioncenter/view/' . urlencode( $dispute_id ) . '/inquiry'; + + return '' . esc_html( $dispute_id ) . ''; +} +add_filter( 'edd_payment_details_dispute_id_paypal_commerce', __NAMESPACE__ . '\link_dispute_id', 10, 2 ); + +/** + * Adds PayPal-specific hold reasons. + * + * @since 3.2.0 + * @param array $reasons + * @return array + */ +function add_hold_reasons( $reasons ) { + $paypal_reasons = array( + 'MERCHANDISE_OR_SERVICE_NOT_RECEIVED' => __( 'Merchandise or service not received', 'easy-digital-downloads' ), + 'MERCHANDISE_OR_SERVICE_NOT_AS_DESCRIBED' => __( 'Merchandise or service not as described', 'easy-digital-downloads' ), + 'UNAUTHORISED' => __( 'Unauthorized', 'easy-digital-downloads' ), + 'ITEM_NOT_RECEIVED' => __( 'Item not received', 'easy-digital-downloads' ), + 'UNAUTHORIZED_TRANSACTION' => __( 'Unauthorized transaction', 'easy-digital-downloads' ), + 'BUYER_COMPLAINT' => __( 'Buyer complaint', 'easy-digital-downloads' ), + ); + + return array_merge( $reasons, $paypal_reasons ); +} +add_filter( 'edd_order_hold_reasons', __NAMESPACE__ . '\add_hold_reasons' ); diff --git a/includes/gateways/paypal/integrations.php b/includes/gateways/paypal/integrations.php new file mode 100644 index 00000000000..36bf64d05c4 --- /dev/null +++ b/includes/gateways/paypal/integrations.php @@ -0,0 +1,25 @@ +gateway ) { + return; + } + + $mode = ( 'live' === $order->mode ) ? API::MODE_LIVE : API::MODE_SANDBOX; + + try { + new API( $mode ); + } catch ( Exceptions\Authentication_Exception $e ) { + // If we don't have credentials. + return; + } + ?> +
    +
    + status ? 'disabled' : '' ); ?> + > + +
    + status ) : ?> +

    + +

    + +
    + gateway ) || 'paypal_commerce' !== $order->gateway ) { + return; + } + + // Get our data out of the serialized string. + parse_str( $_POST['data'], $form_data ); + + if ( empty( $form_data['edd-paypal-commerce-refund'] ) ) { + edd_add_note( array( + 'object_id' => $order_id, + 'object_type' => 'order', + 'user_id' => is_admin() ? get_current_user_id() : 0, + 'content' => __( 'Transaction not refunded in PayPal, as checkbox was not selected.', 'easy-digital-downloads' ) + ) ); + + return; + } + + $refund = edd_get_order( $refund_id ); + if ( empty( $refund->total ) ) { + return; + } + + try { + refund_transaction( $order, $refund ); + } catch ( \Exception $e ) { + edd_debug_log( sprintf( + 'Failure when processing refund #%d. Message: %s', + $refund->id, + $e->getMessage() + ), true ); + + edd_add_note( array( + 'object_id' => $order->id, + 'object_type' => 'order', + 'user_id' => is_admin() ? get_current_user_id() : 0, + 'content' => sprintf( + /* translators: 1: Refund ID, 2: Error message */ + __( 'Failure when processing PayPal refund #%1$d: %2$s', 'easy-digital-downloads' ), + $refund->id, + $e->getMessage() + ) + ) ); + } +}, 10, 3 ); + +/** + * Refunds a transaction in PayPal. + * + * @link https://developer.paypal.com/docs/api/payments/v2/#captures_refund + * + * @param \EDD_Payment|Order $payment_or_order + * @param Order|null $refund_object + * + * @since 2.11 + * @throws Authentication_Exception + * @throws API_Exception + * @throws \Exception + */ +function refund_transaction( $payment_or_order, Order $refund_object = null ) { + /* + * Internally we want to work with an Order object, but we also need + * an EDD_Payment object for backwards compatibility in the hooks. + */ + $order = $payment = false; + if ( $payment_or_order instanceof Order ) { + $order = $payment_or_order; + $payment = edd_get_payment( $order->id ); + } elseif ( $payment_or_order instanceof \EDD_Payment ) { + $payment = $payment_or_order; + $order = edd_get_order( $payment->ID ); + } + + if ( empty( $order ) || ! $order instanceof Order ) { + return; + } + + $transaction_id = $order->get_transaction_id(); + + if ( empty( $transaction_id ) ) { + throw new \Exception( __( 'Missing transaction ID.', 'easy-digital-downloads' ) ); + } + + $mode = ( 'live' === $order->mode ) ? API::MODE_LIVE : API::MODE_SANDBOX; + + $api = new API( $mode ); + + $args = $refund_object instanceof Order ? array( 'invoice_id' => $refund_object->id ) : array(); + if ( $refund_object instanceof Order && abs( $refund_object->total ) !== abs( $order->total ) ) { + $args['amount'] = array( + 'value' => abs( $refund_object->total ), + 'currency_code' => $refund_object->currency, + ); + } + + $response = $api->make_request( + 'v2/payments/captures/' . urlencode( $transaction_id ) . '/refund', + $args, + array( + 'Prefer' => 'return=representation', + ) + ); + + if ( 201 !== $api->last_response_code ) { + throw new API_Exception( sprintf( + /* translators: 1: Response code, 2: Response message */ + __( 'Unexpected response code: %1$d. Response: %2$s', 'easy-digital-downloads' ), + $api->last_response_code, + json_encode( $response ) + ), $api->last_response_code ); + } + + if ( empty( $response->status ) || 'COMPLETED' !== strtoupper( $response->status ) ) { + throw new API_Exception( sprintf( + /* translators: %s: API response from PayPal */ + __( 'Missing or unexpected refund status. Response: %s', 'easy-digital-downloads' ), + json_encode( $response ) + ) ); + } + + // At this point we can assume it was successful. + edd_update_order_meta( $order->id, '_edd_paypal_refunded', true ); + + if ( ! empty( $response->id ) ) { + // Add a note to the original order, and, if provided, the new refund object. + if ( isset( $response->amount->value ) ) { + $note_message = sprintf( + /* translators: 1: amount refunded; 2: transaction ID. */ + __( '%1$s refunded in PayPal. Refund transaction ID: %2$s', 'easy-digital-downloads' ), + edd_currency_filter( edd_format_amount( $response->amount->value ), $order->currency ), + esc_html( $response->id ) + ); + } else { + $note_message = sprintf( + /* translators: %s: ID of the refund in PayPal */ + __( 'Successfully refunded in PayPal. Refund transaction ID: %s', 'easy-digital-downloads' ), + esc_html( $response->id ) + ); + } + + $note_object_ids = array( $order->id ); + if ( $refund_object instanceof Order ) { + $note_object_ids[] = $refund_object->id; + } + + foreach ( $note_object_ids as $note_object_id ) { + edd_add_note( array( + 'object_id' => $note_object_id, + 'object_type' => 'order', + 'user_id' => is_admin() ? get_current_user_id() : 0, + 'content' => $note_message + ) ); + } + + // Add a negative transaction. + if ( $refund_object instanceof Order && isset( $response->amount->value ) ) { + edd_add_order_transaction( array( + 'object_id' => $refund_object->id, + 'object_type' => 'order', + 'transaction_id' => sanitize_text_field( $response->id ), + 'gateway' => 'paypal_commerce', + 'status' => 'complete', + 'total' => edd_negate_amount( $response->amount->value ), + ) ); + } + } + + /** + * Triggers after a successful refund. + * + * @param \EDD_Payment $payment + */ + do_action( 'edd_paypal_refund_purchase', $payment ); +} diff --git a/includes/gateways/paypal/scripts.php b/includes/gateways/paypal/scripts.php new file mode 100644 index 00000000000..d36e39849a8 --- /dev/null +++ b/includes/gateways/paypal/scripts.php @@ -0,0 +1,196 @@ + urlencode( $api->client_id ), + 'currency' => urlencode( strtoupper( edd_get_currency() ) ), + 'intent' => 'capture', + 'disable-funding' => 'card,credit,bancontact,blik,eps,giropay,ideal,mercadopago,mybank,p24,sepa,sofort,venmo', + ) + ); + + wp_register_script( + 'sandhills-paypal-js-sdk', + esc_url_raw( add_query_arg( array_filter( $sdk_query_args ), 'https://www.paypal.com/sdk/js' ) ) + ); + + wp_register_script( + 'edd-paypal', + EDD_PLUGIN_URL . 'assets/js/paypal-checkout.js', + array( + 'sandhills-paypal-js-sdk', + 'jquery', + 'edd-ajax', + ), + EDD_VERSION, + true + ); + + if ( edd_is_checkout() || $force_load ) { + maybe_enqueue_polyfills(); + + wp_enqueue_script( 'sandhills-paypal-js-sdk' ); + wp_enqueue_script( 'edd-paypal' ); + + $paypal_script_vars = array( + /** + * Filters the order approval handler. + * + * @since 2.11 + */ + 'approvalAction' => apply_filters( 'edd_paypal_on_approve_action', 'edd_capture_paypal_order' ), + 'defaultError' => edd_build_errors_html( + array( + 'paypal-error' => esc_html__( 'An unexpected error occurred. Please try again.', 'easy-digital-downloads' ), + ) + ), + 'intent' => ! empty( $sdk_query_args['intent'] ) ? $sdk_query_args['intent'] : 'capture', + 'style' => get_button_styles(), + ); + + wp_localize_script( 'edd-paypal', 'eddPayPalVars', $paypal_script_vars ); + } +} + +add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\register_js', 100 ); + +/** + * Removes the "?ver=" query arg from the PayPal JS SDK URL, because PayPal will throw an error + * if it's included. + * + * @param string $url The URL for the script source. + * + * @since 2.11 + * @return string + */ +function remove_ver_query_arg( $url ) { + // Account for a possibly empty URL here. + if ( empty( $url ) ) { + return $url; + } + + $sdk_url = 'https://www.paypal.com/sdk/js'; + + if ( false !== strpos( $url, $sdk_url ) ) { + $new_url = preg_split( '/(&ver|\?ver)/', $url ); + + return $new_url[0]; + } + + return $url; +} + +add_filter( 'script_loader_src', __NAMESPACE__ . '\remove_ver_query_arg', 100 ); + +/** + * Adds data attributes to the PayPal JS SDK + '); + } ); +} +add_action( 'edd_process_file_download_after_login', 'edd_redirect_file_download_after_login', 10, 2 ); + +/** + * Filter removed in EDD 2.7 + * + * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/5450 + */ +// add_action( 'edd_process_download_pre_record_log', 'edd_check_file_url_head', 10, 3 ); diff --git a/includes/process-purchase.php b/includes/process-purchase.php index 3e78ee5d084..4689db0b1db 100755 --- a/includes/process-purchase.php +++ b/includes/process-purchase.php @@ -2,13 +2,15 @@ /** * Process Purchase * - * @package Easy Digital Downloads - * @subpackage Process Purchase - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Functions + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 -*/ + * @since 1.0 + */ +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /** * Process Purchase Form @@ -17,201 +19,382 @@ * * @access private * @since 1.0 - * @version 1.0.8.1 * @return void -*/ - + */ function edd_process_purchase_form() { - global $edd_options; - // no need to run on admin - if ( is_admin() ) - return; + do_action( 'edd_pre_process_purchase' ); - // verify the nonce for this action - if ( ! isset( $_POST['edd-nonce'] ) || ! wp_verify_nonce( $_POST['edd-nonce'], 'edd-purchase-nonce' ) ) - return; + // Make sure the cart isn't empty. + if ( ! edd_get_cart_contents() && ! edd_cart_has_fees() ) { + $valid_data = false; + edd_set_error( 'empty_cart', __( 'Your cart is empty', 'easy-digital-downloads' ) ); + } else { + // Validate the form $_POST data. + $valid_data = edd_purchase_form_validate_fields(); - // validate the form $_POST data - $valid_data = edd_purchase_form_validate_fields(); + // Allow themes and plugins to hook to errors. + do_action( 'edd_checkout_error_checks', $valid_data, $_POST ); + } - // allow themes and plugins to hoook to errors - do_action('edd_checkout_error_checks', $_POST); + $is_ajax = isset( $_POST['edd_ajax'] ); + + if ( $is_ajax ) { + if ( ! isset( $_POST['edd-process-checkout-nonce'] ) ) { + edd_debug_log( __( 'Missing nonce when processing checkout. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4', 'easy-digital-downloads' ), true ); + } + + $nonce = isset( $_POST['edd-process-checkout-nonce'] ) ? sanitize_text_field( $_POST['edd-process-checkout-nonce'] ) : ''; + $nonce_verified = wp_verify_nonce( $nonce, 'edd-process-checkout' ); + + if ( false === $nonce_verified ) { + edd_set_error( 'checkout-nonce-error', __( 'Error processing purchase. Please reload the page and try again.', 'easy-digital-downloads' ) ); + } + } - // check errors - if ( false !== $errors = edd_get_errors() ) { - // we have errors, send back to checkout - edd_send_back_to_checkout('?payment-mode=' . $valid_data['gateway']); - exit; + // Process the login form. + if ( isset( $_POST['edd_login_submit'] ) ) { + edd_process_purchase_login(); } - // check user - if ( false === $user = edd_get_purchase_form_user( $valid_data ) ) { - // something went wrong when collecting data, send back to checkout - edd_send_back_to_checkout('?payment-mode=' . $valid_data['gateway']); - exit; + // Validate the user. + $user = edd_get_purchase_form_user( $valid_data, $is_ajax ); + + // Let extensions validate fields after user is logged in if user has used login/registration form. + do_action( 'edd_checkout_user_error_checks', $user, $valid_data, $_POST ); + + if ( false === $valid_data || edd_get_errors() || ! $user ) { + if ( $is_ajax ) { + do_action( 'edd_ajax_checkout_errors' ); + edd_die(); + } else { + return false; + } } + if ( $is_ajax ) { + echo 'success'; + edd_die(); + } - // setup user information + // Setup user information. $user_info = array( - 'id' => $user['user_id'], - 'email' => $user['user_email'], + 'id' => $user['user_id'], + 'email' => $user['user_email'], 'first_name' => $user['user_first'], - 'last_name' => $user['user_last'], - 'discount' => $valid_data['discount'] + 'last_name' => $user['user_last'], + 'discount' => $valid_data['discount'], + 'address' => ! empty( $user['address'] ) ? $user['address'] : array(), ); - // setup purchase information + // Update a customer record if they have added/updated information. + $customer = new EDD_Customer( $user_info['email'] ); + + $name = $user_info['first_name'] . ' ' . $user_info['last_name']; + if ( empty( $customer->name ) || $name != $customer->name ) { + $update_data = array( + 'name' => $name + ); + + // Update the customer's name and update the user record too. + $customer->update( $update_data ); + wp_update_user( array( + 'ID' => get_current_user_id(), + 'first_name' => $user_info['first_name'], + 'last_name' => $user_info['last_name'] + ) ); + } + + // Update the customer's address if different to what's in the database. + $address = wp_parse_args( $user_info['address'], array( + 'line1' => '', + 'line2' => '', + 'city' => '', + 'state' => '', + 'country' => '', + 'zip' => '', + ) ); + + $address = array( + 'address' => $address['line1'], + 'address2' => $address['line2'], + 'city' => $address['city'], + 'region' => $address['state'], + 'country' => $address['country'], + 'postal_code' => $address['zip'], + ); + + $card_country = isset( $valid_data['cc_info']['card_country'] ) ? $valid_data['cc_info']['card_country'] : false; + $card_state = isset( $valid_data['cc_info']['card_state'] ) ? $valid_data['cc_info']['card_state'] : false; + $card_zip = isset( $valid_data['cc_info']['card_zip'] ) ? $valid_data['cc_info']['card_zip'] : false; + + // Set up the unique purchase key. If we are resuming a payment, we'll overwrite this with the existing key. + + $purchase_key = edd_generate_order_payment_key( $user['user_email'] ); + $existing_payment = EDD()->session->get( 'edd_resume_payment' ); + + if ( ! empty( $existing_payment ) ) { + $order = edd_get_order( $existing_payment ); + if ( $order->is_recoverable() && ! empty( $order->payment_key ) ) { + $purchase_key = $order->payment_key; + } + } + + // Setup purchase information. $purchase_data = array( - 'downloads' => edd_get_cart_contents(), - 'price' => edd_get_cart_amount(), - 'purchase_key' => strtolower( md5( uniqid() ) ), // random key - 'user_email' => $user['user_email'], - 'date' => date( 'Y-m-d H:i:s' ), - 'user_info' => $user_info, - 'post_data' => $_POST, + 'downloads' => edd_get_cart_contents(), + 'fees' => edd_get_cart_fees(), // Any arbitrary fees that have been added to the cart. + 'subtotal' => edd_get_cart_subtotal(), // Amount before taxes and discounts. + 'discount' => edd_get_cart_discounted_amount(), // Discounted amount. + 'tax' => edd_get_cart_tax(), // Taxed amount. + 'tax_rate' => edd_use_taxes() ? edd_get_cart_tax_rate( $card_country, $card_state, $card_zip ) : 0, // Tax rate. + 'price' => edd_get_cart_total(), // Amount after taxes. + 'purchase_key' => $purchase_key, + 'user_email' => $user['user_email'], + 'date' => date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ), + 'user_info' => stripslashes_deep( $user_info ), + 'post_data' => $_POST, 'cart_details' => edd_get_cart_content_details(), - 'gateway' => $valid_data['gateway'], - 'card_info' => $valid_data['cc_info'] + 'gateway' => $valid_data['gateway'], + 'card_info' => $valid_data['cc_info'] ); - - // add the user data for hooks + + // Add the user data for hooks. $valid_data['user'] = $user; - // allow themes and plugins to hook before the gateway + // Allow themes and plugins to hook before the gateway. do_action( 'edd_checkout_before_gateway', $_POST, $user_info, $valid_data ); - // allow the purchase data to be modified before it is sent to the gateway - $purchase_data = apply_filters( - 'edd_purchase_data_before_gateway', - $purchase_data, - $valid_data + // If the total amount in the cart is 0, send to the manual gateway. This emulates a free download purchase. + if ( ! $purchase_data['price'] ) { + + // Revert to manual. + $purchase_data['gateway'] = 'manual'; + $_POST['edd-gateway'] = 'manual'; + } + + // Allow the purchase data to be modified before it is sent to the gateway. + $purchase_data = apply_filters( + 'edd_purchase_data_before_gateway', + $purchase_data, + $valid_data ); - // if the total amount in the cart is 0, send to the manaul gateway. This emulates a free download purchase - if ( $purchase_data['price'] <= 0 ) { - // revert to manual - $valid_data['gateway'] = 'manual'; + // Setup the data we're storing in the purchase session. + $session_data = $purchase_data; + + // Make sure credit card numbers are never stored in sessions. + unset( $session_data['card_info']['card_number'] ); + + // Used for showing download links to non logged-in users after purchase, and for other plugins needing purchase data. + edd_set_purchase_session( $session_data ); + + // Send info to the gateway for payment processing. + edd_send_to_gateway( $purchase_data['gateway'], $purchase_data ); + edd_die(); +} +add_action( 'edd_purchase', 'edd_process_purchase_form' ); +add_action( 'wp_ajax_edd_process_checkout', 'edd_process_purchase_form' ); +add_action( 'wp_ajax_nopriv_edd_process_checkout', 'edd_process_purchase_form' ); + +/** + * Verify that when a logged in user makes a purchase that the email address + * used doesn't belong to a different customer + * + * @since 2.6 + * @param array $valid_data Validated data submitted for the purchase + * @param array $post Additional $_POST data submitted + * @return void + */ +function edd_checkout_check_existing_email( $valid_data, $post ) { + + if ( ! is_user_logged_in() ) { + return; } - // used for showing download links to non logged-in users after purchase, and for other plugins needing purchase data. - edd_set_purchase_session( $purchase_data ); + // If the logged in user was validated. + if ( isset( $valid_data['logged_in_user']['user_email'] ) ) { + $email = strtolower( $valid_data['logged_in_user']['user_email'] ); + } elseif ( isset( $valid_data['login_user_data']['user_email'] ) ) { + // If the user is logging in. + $email = strtolower( $valid_data['login_user_data']['user_email'] ); + } else { + // The user is already logged in and EDD didn't validate the email. + $user = wp_get_current_user(); + $email = strtolower( $user->user_email ); + } + + $customer = edd_get_customer_by( 'user_id', get_current_user_id() ); - // send info to the gateway for payment processing - edd_send_to_gateway( $valid_data['gateway'], $purchase_data ); - - exit; + // If the current user has a customer record and the email address matches, we're good to go. + if ( ! empty( $customer->email ) && strtolower( $customer->email ) === $email ) { + return; + } + + // If the current user has a customer record and the email address is in the list of emails, we're good to go. + if ( + ! empty( $customer->emails ) && // If the customer has emails. + is_array( $customer->emails ) && // ...and if the customer emails are an array. + in_array( $email, array_map( 'strtolower', $customer->emails ), true ) // ...and the email is in the array. + ) { + return; // ...we're good to go here. + } + + // Now we are checking to see if any other customers have this email address. + $found_email = edd_get_customer_email_address_by( 'email', $email ); + if ( ! empty( $found_email->customer_id ) ) { + edd_set_error( + 'edd-customer-email-exists', + /* translators: %s: email address */ + sprintf( __( 'The email address %s is already in use.', 'easy-digital-downloads' ), $email ) + ); + } } -add_action('edd_purchase', 'edd_process_purchase_form'); +add_action( 'edd_checkout_error_checks', 'edd_checkout_check_existing_email', 10, 2 ); + +/** + * Process the checkout login form + * + * @access private + * @since 1.8 + * @return void + */ +function edd_process_purchase_login() { + + $is_ajax = isset( $_POST['edd_ajax'] ); + + if ( ! isset( $_POST['edd_login_nonce'] ) ) { + edd_debug_log( __( 'Missing nonce when processing login during checkout. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/09/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4', 'easy-digital-downloads' ), true ); + } + + $nonce = isset( $_POST['edd_login_nonce'] ) ? sanitize_text_field( $_POST['edd_login_nonce'] ) : ''; + $nonce_verified = wp_verify_nonce( $nonce, 'edd-login-form' ); + if ( false === $nonce_verified ) { + edd_set_error( 'edd-login-nonce-failed', __( 'Error processing login. Nonce failed.', 'easy-digital-downloads' ) ); + + if ( $is_ajax ) { + do_action( 'edd_ajax_checkout_errors' ); + edd_die(); + } else { + edd_redirect( wp_get_referer() ); + } + } + + $user_data = edd_purchase_form_validate_user_login(); + + if ( edd_get_errors() || $user_data['user_id'] < 1 ) { + if ( $is_ajax ) { + do_action( 'edd_ajax_checkout_errors' ); + edd_die(); + } else { + edd_redirect( wp_get_referer() ); + } + } + edd_log_user_in( $user_data['user_id'], $user_data['user_login'], $user_data['user_pass'] ); + + if ( $is_ajax ) { + echo 'success'; + edd_die(); + } else { + edd_redirect( edd_get_checkout_uri( $_SERVER['QUERY_STRING'] ) ); + } +} +add_action( 'wp_ajax_edd_process_checkout_login', 'edd_process_purchase_login' ); +add_action( 'wp_ajax_nopriv_edd_process_checkout_login', 'edd_process_purchase_login' ); /** * Purchase Form Validate Fields * * @access private * @since 1.0.8.1 - * @return array -*/ - + * @return bool|array + */ function edd_purchase_form_validate_fields() { - global $edd_options; - - // check if there is $_POST - if ( empty( $_POST ) ) return; - - // start an array to collect valid data + + // Bail if there is no $_POST. + if ( empty( $_POST ) ) { + return false; + } + + // Start an array to collect valid data. $valid_data = array( - 'gateway' => '', // gateway fallback - 'discount' => 'none', // set default discount - 'need_new_user' => false, // new user flag - 'need_user_login' => false, // login user flag - 'logged_user_data' => array(), // logged user collected data - 'new_user_data' => array(), // new user collected data - 'login_user_data' => array(), // login user collected data - 'guest_user_data' => array(), // guest user collected data - 'cc_info' => array() // credit card info + 'gateway' => edd_purchase_form_validate_gateway(), // Gateway fallback. + 'discount' => edd_purchase_form_validate_discounts(), // Set default discount. + 'need_new_user' => false, // New user flag. + 'need_user_login' => false, // Login user flag. + 'logged_in_user' => array(), // Logged user collected data. + 'new_user_data' => array(), // New user collected data. + 'login_user_data' => array(), // Login user collected data. + 'guest_user_data' => array(), // Guest user collected data. + 'cc_info' => edd_purchase_form_validate_cc(), // Credit card info. ); - - // validate the gateway - $valid_data['gateway'] = edd_purchase_form_validate_gateway(); - - // validate discounts - $valid_data['discount'] = edd_purchase_form_validate_discounts(); - - // collect credit card info - $valid_data['cc_info'] = edd_get_purchase_cc_info(); - - // validate agree to terms - if ( isset( $edd_options['show_agree_to_terms'] ) ) - edd_purchase_form_validate_agree_to_terms(); - - // check if user is logged in - if ( is_user_logged_in() ) { - // collect logged in user data + + // Validate agree to terms. + if ( '1' === edd_get_option( 'show_agree_to_terms', false ) ) { + edd_purchase_form_validate_agree_to_terms(); + } + + // Validate agree to privacy policy. + if ( '1' === edd_get_option( 'show_agree_to_privacy_policy', false ) ) { + edd_purchase_form_validate_agree_to_privacy_policy(); + } + + // Collect logged in user data + if ( is_user_logged_in() ) { $valid_data['logged_in_user'] = edd_purchase_form_validate_logged_in_user(); - - } else if ( isset( $_POST['edd-purchase-var'] ) && $_POST['edd-purchase-var'] == 'needs-to-register' ) { - - // set new user registrarion as required - $valid_data['need_new_user'] = true; - - // validate new user data - $valid_data['new_user_data'] = edd_purchase_form_validate_new_user(); - - // check if login validation is needed - } else if ( isset( $_POST['edd-purchase-var'] ) && $_POST['edd-purchase-var'] == 'needs-to-login' ) { - - // set user login as required + + } elseif ( isset( $_POST['edd-purchase-var'] ) && 'needs-to-register' === $_POST['edd-purchase-var'] ) { + // Set new user registration as required. + $valid_data['need_new_user'] = true; + + // Validate new user data. + $valid_data['new_user_data'] = edd_purchase_form_validate_new_user(); + + // Check if login validation is needed. + } elseif ( isset( $_POST['edd-purchase-var'] ) && 'needs-to-login' === $_POST['edd-purchase-var'] ) { + // Set user login as required. $valid_data['need_user_login'] = true; - - // validate users login info + + // Validate users login info. $valid_data['login_user_data'] = edd_purchase_form_validate_user_login(); + + // Not registering or logging in, so setup guest user data } else { - - // not registering or logging in, so setup guest user data + // Not registering or logging in, so setup guest user data. $valid_data['guest_user_data'] = edd_purchase_form_validate_guest_user(); - } - - // return collected data - return $valid_data; + // Return collected data. + return $valid_data; } - /** * Purchase Form Validate Gateway * * @access private - * @since 1.0 + * @since 1.0 * @return string -*/ - + */ function edd_purchase_form_validate_gateway() { - // check if a gateway value is present - if ( isset( $_POST['edd-gateway'] ) && trim( $_POST['edd-gateway'] ) != '' ) { - // clean gateway - $gateway = strip_tags( $_POST['edd-gateway'] ); - // verify if gateway is active - if ( edd_is_gateway_active( $gateway ) ) { - // return active gateway - return $gateway; - } else if ( edd_get_cart_amount() <= 0 ) { - return 'manual'; - } else { - // set invalid gateway error - edd_set_error( 'invalid_gateway', __( 'The selected gateway is not active', 'edd' ) ); + + $gateway = edd_get_default_gateway(); + + // Check if a gateway value is present + if ( ! empty( $_REQUEST['edd-gateway'] ) ) { + + $gateway = sanitize_text_field( $_REQUEST['edd-gateway'] ); + + if ( '0.00' == edd_get_cart_total() ) { + $gateway = 'manual'; + + } elseif ( ! edd_is_gateway_active( $gateway ) ) { + edd_set_error( 'invalid_gateway', __( 'The selected payment gateway is not enabled', 'easy-digital-downloads' ) ); } - } else { - // no gateway is present - edd_set_error( 'empty_gateway', __( 'No gateway has been selected', 'edd' ) ); } - - // return empty - return ''; -} + return $gateway; +} /** * Purchase Form Validate Discounts @@ -219,28 +402,55 @@ function edd_purchase_form_validate_gateway() { * @access private * @since 1.0.8.1 * @return string -*/ - + */ function edd_purchase_form_validate_discounts() { - // check for valid discount is present - if ( isset( $_POST['edd-discount'] ) && trim( $_POST['edd-discount'] ) != '' ) { - // clean discount - $discount = sanitize_text_field( $_POST['edd-discount'] ); - $email = sanitize_email( $_POST['edd_email'] ); - // check if validates - if ( edd_is_discount_valid( $discount, $email ) ) { - // return clean discount - return $discount; - // invalid discount - } else { - // set invalid discount error - edd_set_error( 'invalid_discount', __( 'The discount you entered is invalid', 'edd' ) ); + // Retrieve the discount stored in cookies + $discounts = edd_get_cart_discounts(); + + $user = ''; + if ( isset( $_POST['edd_user_login'] ) && ! empty( $_POST['edd_user_login'] ) ) { + $user = sanitize_text_field( $_POST['edd_user_login'] ); + } elseif ( isset( $_POST['edd_email'] ) && ! empty($_POST['edd_email'] ) ) { + $user = sanitize_text_field( $_POST['edd_email'] ); + } elseif ( is_user_logged_in() ) { + $user = wp_get_current_user()->user_email; + } + + $error = false; + + // Check for valid discount(s) is present + if ( ! empty( $_POST['edd-discount'] ) && __( 'Enter discount', 'easy-digital-downloads' ) != $_POST['edd-discount'] ) { + // Check for a posted discount + $posted_discount = isset( $_POST['edd-discount'] ) ? trim( $_POST['edd-discount'] ) : false; + + // Add the posted discount to the discounts + if ( $posted_discount && ( empty( $discounts ) || edd_multiple_discounts_allowed() ) && edd_is_discount_valid( $posted_discount, $user ) ) { + edd_set_cart_discount( $posted_discount ); } + } - // return default value - return 'none'; -} + // If we have discounts, loop through them + if ( ! empty( $discounts ) ) { + + foreach ( $discounts as $discount ) { + // Check if valid + if ( ! edd_is_discount_valid( $discount, $user ) ) { + // Discount is not valid + $error = true; + } + } + } else { + // No discounts + return 'none'; + } + + if ( $error ) { + edd_set_error( 'invalid_discount', __( 'One or more of the discounts you entered is invalid', 'easy-digital-downloads' ) ); + } + + return implode( ', ', $discounts ); +} /** * Purchase Form Validate Agree To Terms @@ -248,487 +458,909 @@ function edd_purchase_form_validate_discounts() { * @access private * @since 1.0.8.1 * @return void -*/ - + */ function edd_purchase_form_validate_agree_to_terms() { - // validate agree to terms - if ( ! isset( $_POST['edd_agree_to_terms'] ) || $_POST['edd_agree_to_terms'] != 1 ) { - // user did not agree - edd_set_error( 'agree_to_terms', __( 'You must agree to the terms of use', 'edd' ) ); + + // User did not agree + if ( ! isset( $_POST['edd_agree_to_terms'] ) || $_POST['edd_agree_to_terms'] != 1 ) { + edd_set_error( 'agree_to_terms', apply_filters( 'edd_agree_to_terms_text', __( 'You must agree to the terms of use', 'easy-digital-downloads' ) ) ); } } +/** + * Purchase Form Validate Agree To Privacy Policy + * + * @since 2.9.1 + * @return void + */ +function edd_purchase_form_validate_agree_to_privacy_policy() { + + // User did not agree + if ( ! isset( $_POST['edd_agree_to_privacy_policy'] ) || $_POST['edd_agree_to_privacy_policy'] != 1 ) { + edd_set_error( 'agree_to_privacy_policy', apply_filters( 'edd_agree_to_privacy_policy_text', __( 'You must agree to the privacy policy', 'easy-digital-downloads' ) ) ); + } +} /** - * Purchase Form Validate Logged In User + * Purchase Form Required Fields * * @access private - * @since 1.0 + * @since 1.5 * @return array -*/ + */ +function edd_purchase_form_required_fields() { + + // These fields are _always_ required + $required_fields = array( + 'edd_email' => array( + 'error_id' => 'invalid_email', + 'error_message' => __( 'Please enter a valid email address', 'easy-digital-downloads' ) + ), + 'edd_first' => array( + 'error_id' => 'invalid_first_name', + 'error_message' => __( 'Please enter your first name', 'easy-digital-downloads' ) + ) + ); + + // Let payment gateways and other extensions determine if address fields should be required + $require_address = apply_filters( 'edd_require_billing_address', edd_use_taxes() && edd_get_cart_total() ); + + if ( ! empty( $require_address ) ) { + + // Zip + $required_fields['card_zip'] = array( + 'error_id' => 'invalid_zip_code', + 'error_message' => __( 'Please enter your zip / postal code', 'easy-digital-downloads' ) + ); + + // City + $required_fields['card_city'] = array( + 'error_id' => 'invalid_city', + 'error_message' => __( 'Please enter your billing city', 'easy-digital-downloads' ) + ); + + // Country + $required_fields['billing_country'] = array( + 'error_id' => 'invalid_country', + 'error_message' => __( 'Please select your billing country', 'easy-digital-downloads' ) + ); + + // State/Region + $required_fields['card_state'] = array( + 'error_id' => 'invalid_state', + 'error_message' => __( 'Please enter billing state / region', 'easy-digital-downloads' ) + ); + + // Check if the Customer's Country has been passed in and if it has no states. + if ( isset( $_POST['billing_country'] ) && isset( $required_fields['card_state'] ) ) { + $customer_billing_country = sanitize_text_field( $_POST['billing_country'] ); + $states = edd_get_shop_states( $customer_billing_country ); + + // If this country has no states, remove the requirement of a card_state. + if ( empty( $states ) ) { + unset( $required_fields['card_state'] ); + } + } + } + // Filter & return + return (array) apply_filters( 'edd_purchase_form_required_fields', $required_fields ); +} + +/** + * Purchase Form Validate Logged In User + * + * @access private + * @since 1.0 + * @return array + */ function edd_purchase_form_validate_logged_in_user() { global $user_ID; - - // start empty array to collect valid user data + + // Start empty array to collect valid user data $valid_user_data = array( - // assume there will be errors - 'user_id' => -1 + 'user_id' => -1 ); - - // verify there is a user_ID - if ( $user_ID > 0 ) { - // get the logged in user data + // Verify there is a user_ID + if ( $user_ID > 0 ) { + // Get the logged in user data $user_data = get_userdata( $user_ID ); - if( !is_email( $_POST['edd_email'] ) ) { - // if the user enters an email other than the stored email, we must verify it - edd_set_error( 'invalid_email', __( 'Please enter a valid email address.', 'edd' ) ); + $fields = edd_purchase_form_required_fields(); + + // Loop through required fields and show error messages + foreach ( $fields as $field_name => $value ) { + if ( empty( $_POST[ $field_name ] ) && ! empty( $value['error_id'] ) && ! empty( $value['error_message'] ) ) { + edd_set_error( $value['error_id'], $value['error_message'] ); + } } - // verify data + // Verify data if ( $user_data ) { - // collected logged in user data + // Collected logged in user data $valid_user_data = array( - 'user_id' => $user_ID, - 'user_email' => sanitize_email( $_POST['edd_email'] ), - 'user_first' => sanitize_text_field( $_POST['edd_first'] ), - 'user_last' => sanitize_text_field( $_POST['edd_last'] ), - ); + 'user_id' => $user_ID, + 'user_email' => isset( $_POST['edd_email'] ) ? sanitize_email( $_POST['edd_email'] ) : $user_data->user_email, + 'user_first' => isset( $_POST['edd_first'] ) && ! empty( $_POST['edd_first'] ) ? sanitize_text_field( $_POST['edd_first'] ) : $user_data->first_name, + 'user_last' => isset( $_POST['edd_last'] ) && ! empty( $_POST['edd_last'] ) ? sanitize_text_field( $_POST['edd_last'] ) : $user_data->last_name, + ); + + if ( ! is_email( $valid_user_data['user_email'] ) ) { + edd_set_error( 'email_invalid', __( 'Invalid email', 'easy-digital-downloads' ) ); + } + } else { - // set invalid user error - edd_set_error( 'invalid_user', __( 'The user information is invalid.', 'edd' ) ); + // Set invalid user error + edd_set_error( 'invalid_user', __( 'The user information is invalid', 'easy-digital-downloads' ) ); } } - - // return user data + + // Return user data return $valid_user_data; } - /** * Purchase Form Validate New User * * @access private * @since 1.0.8.1 * @return array -*/ - + */ function edd_purchase_form_validate_new_user() { - $registering_new_user = false; - // start empty array to collect valid user data - $valid_user_data = array( - // assume there will be errors - 'user_id' => -1, - // get first name - 'user_first' => isset( $_POST["edd_first"] ) ? strip_tags( trim( $_POST["edd_first"] ) ) : '', - // get last name - 'user_last' => isset( $_POST["edd_last"] ) ? strip_tags( trim( $_POST["edd_last"] ) ) : '', - ); - - // check the new user's credentials against existing ones - $user_login = isset( $_POST["edd_user_login"] ) ? trim( $_POST["edd_user_login"] ) : false; - $user_email = isset( $_POST['edd_email'] ) ? trim( $_POST['edd_email'] ) : false; - $user_pass = isset( $_POST["edd_user_pass"] ) ? trim( $_POST["edd_user_pass"] ) : false; - $pass_confirm = isset( $_POST["edd_user_pass_confirm"] ) ? trim( $_POST["edd_user_pass_confirm"] ) : false; - - // check if we have an username to register - if ( $user_login && strlen( $user_login ) > 0 ) { - + /** Sanitize **************************************************************/ + + // Sanitize first name + $user_first = isset( $_POST['edd_first'] ) + ? sanitize_text_field( $_POST['edd_first'] ) + : ''; + + // Sanitize last name + $user_last = isset( $_POST['edd_last'] ) + ? sanitize_text_field( $_POST['edd_last'] ) + : ''; + + // Sanitize user login. + $user_login = isset( $_POST['edd_user_login'] ) + ? sanitize_user( $_POST['edd_user_login'] ) + : false; + + // Sanitize email address (allowed formatting only) + $user_email = isset( $_POST['edd_email'] ) + ? sanitize_email( $_POST['edd_email'] ) + : false; + + // Trim front/back whitespace from password (don't alter characters) + $user_pass = isset( $_POST['edd_user_pass'] ) + ? trim( $_POST['edd_user_pass'] ) + : false; + + // Trim front/back whitespace from password (don't alter characters) + $pass_confirm = isset( $_POST['edd_user_pass_confirm'] ) + ? trim( $_POST['edd_user_pass_confirm'] ) + : false; + + /** Required Fields *******************************************************/ + + // Get required fields to loop through + $fields = edd_purchase_form_required_fields(); + + // Loop through required fields and provide error messages if missing + foreach ( $fields as $field_name => $value ) { + if ( empty( $_POST[ $field_name ] ) && ! empty( $value['error_id'] ) && ! empty( $value['error_message'] ) ) { + edd_set_error( $value['error_id'], $value['error_message'] ); + } + } + + /** Setup Userdata ********************************************************/ + + // Start an empty array to collect valid user data. + $valid_user_data = array( + 'user_id' => 0, + 'user_first' => $user_first, + 'user_last' => $user_last + ); + + /** Check Login ***********************************************************/ + + // Check if we have a username to register + if ( ! empty( $user_login ) && strlen( $user_login ) > 0 ) { $registering_new_user = true; - - // we have an user name, check if it already exists + + // Error if username already exists. if ( username_exists( $user_login ) ) { - - // username already registered - edd_set_error( 'username_unavailable', __( 'Username already taken', 'edd' ) ); - - // check if it's valid - } else if ( ! validate_username( $user_login ) ) { - - // invalid username - edd_set_error( 'username_invalid', __( 'Invalid username', 'edd' ) ); - + edd_set_error( 'username_unavailable', __( 'Username already exists', 'easy-digital-downloads' ) ); + + // Error if username is not valid + } elseif ( ! edd_validate_username( $user_login ) ) { + is_multisite() + ? edd_set_error( 'username_invalid', __( 'Invalid username. Only lowercase letters (a-z) and numbers are allowed', 'easy-digital-downloads' ) ) + : edd_set_error( 'username_invalid', __( 'Invalid username', 'easy-digital-downloads' ) ); + + // Add login to valid user data } else { - - // all is good to go + // All the checks have run and it's good to go. $valid_user_data['user_login'] = $user_login; - } - } else { - - if ( edd_no_guest_checkout() ) { - edd_set_error( 'registration_required', __( 'You must register or login to complete your purchase', 'edd' ) ); - } - - } - - // check if we have an email to verify - if ( $user_email && strlen( $user_email ) > 0 ) { - - // validate email + + // Error if users are required to register and no login was provided + } elseif ( edd_no_guest_checkout() ) { + edd_set_error( 'registration_required', __( 'You must register or login to complete your purchase', 'easy-digital-downloads' ) ); + } + + /** Check Email ***********************************************************/ + + // Check if we have an email to verify + if ( ! empty( $user_email ) && strlen( $user_email ) > 0 ) { + + // Error if invalid email address if ( ! is_email( $user_email ) ) { - - // invalid email - edd_set_error( 'email_invalid', __( 'Invalid email', 'edd' ) ); - - // check if email exists - } else if ( email_exists( $user_email ) && $registering_new_user ) { - - // email address already registered - edd_set_error( 'email_used', __( 'Email already used', 'edd' ) ); - + edd_set_error( 'email_invalid', __( 'Invalid email', 'easy-digital-downloads' ) ); + + // Email address is unsafe (multisite only) + } elseif ( is_multisite() && is_email_address_unsafe( $user_email ) ) { + edd_set_error( 'email_unsafe', __( 'You cannot use that email address to signup at this time.', 'easy-digital-downloads' ) ); + } elseif ( true === $registering_new_user ) { + // Check if email exists. + $customers = edd_get_customers( + array( + 'email' => $user_email, + 'user_id__not_in' => array( null ), + ) + ); + if ( email_exists( $user_email ) || ! empty( $customers ) ) { + edd_set_error( 'email_used', __( 'Email already used. Login or use a different email to complete your purchase.', 'easy-digital-downloads' ) ); + } else { + $valid_user_data['user_email'] = $user_email; + } } else { - - // all is good to go + // Add email to valid user data. $valid_user_data['user_email'] = $user_email; - } - + + // Error if no email address was provided } else { - - // no email - edd_set_error( 'email_empty', __( 'Enter an email', 'edd' ) ); - - } - - // check password - if ( $user_pass && $pass_confirm ) { - - // verify confirmation matches - if ( $user_pass != $pass_confirm ) { - - // passwords do not match - edd_set_error( 'password_mismatch', __( 'Passwords don\'t match', 'edd' ) ); - + // No email. + edd_set_error( 'email_empty', __( 'Enter an email', 'easy-digital-downloads' ) ); + } + + /** Check Password ********************************************************/ + + // Check password + if ( ! empty( $user_pass ) && ! empty( $pass_confirm ) ) { + + // Error if passwords do not match + if ( 0 !== strcmp( $user_pass, $pass_confirm ) ) { + edd_set_error( 'password_mismatch', __( 'Passwords do not match', 'easy-digital-downloads' ) ); + + // Add password to valid user data } else { - - // all is good to go + // All is good to go. $valid_user_data['user_pass'] = $user_pass; - } - - } else { - - // pass or confrimation missing - if ( ! $user_pass && $registering_new_user ) { - - // password invalid - edd_set_error( 'password_empty', __( 'Enter a password', 'edd' ) ); - - } else if ( ! $pass_confirm && $registering_new_user ) { - - // confirmation invalid - edd_set_error( 'confirmation_empty', __( 'Enter the password confirmation', 'edd' ) ); - + + // Error if no password when signing up + } elseif ( true === $registering_new_user ) { + if ( empty( $user_pass ) ) { + edd_set_error( 'password_empty', __( 'Enter a password', 'easy-digital-downloads' ) ); + } elseif ( empty( $pass_confirm ) ) { + edd_set_error( 'confirmation_empty', __( 'Confirm your password', 'easy-digital-downloads' ) ); } } - - return $valid_user_data; + // Cast as array and return + return (array) $valid_user_data; } - /** * Purchase Form Validate User Login * * @access private * @since 1.0.8.1 - * @return void -*/ - + * @return array + */ function edd_purchase_form_validate_user_login() { - // start an array to collect valid user data + + // Start an array to collect valid user data. $valid_user_data = array( - // assume there will be errors - 'user_id' => -1 + 'user_id' => 0, ); - - // username - if ( ! isset( $_POST['edd-username'] ) || $_POST['edd-username'] == '' ) { - edd_set_error( 'must_log_in', __( 'You must login or register to complete your purchase', 'edd' ) ); + + $user_login = ! empty( $_POST['edd_user_login'] ) ? sanitize_text_field( $_POST['edd_user_login'] ) : ''; + $user_pass = ! empty( $_POST['edd_user_pass'] ) ? $_POST['edd_user_pass'] : ''; + + // Username. + if ( empty( $user_login ) && edd_no_guest_checkout() ) { + edd_set_error( 'must_log_in', __( 'You must log in or register to complete your purchase', 'easy-digital-downloads' ) ); return $valid_user_data; } - - // get the user by login - $user_data = get_user_by( 'login', strip_tags( $_POST['edd-username'] ) ); - - // check if user exists - if ( $user_data ) { - - // get password - $user_pass = isset( $_POST["edd-password"] ) ? $_POST["edd-password"] : false; - - // check user_pass - if ( $user_pass ) { - // check if password is valid - if ( ! wp_check_password( $user_pass, $user_data->user_pass, $user_data->ID ) ) { - // incorrect password - edd_set_error( 'password_incorrect', __( 'The password you entered is incorrect', 'edd' ) ); - // all is correct - } else { - // repopulate the valid user data array - $valid_user_data = array( - 'user_id' => $user_data->ID, - 'user_login' => $user_data->user_login, - 'user_email' => $user_data->user_email, - 'user_first' => $user_data->first_name, - 'user_last' => $user_data->last_name, - 'user_pass' => $user_pass, - ); - } - } else { - // empty password - edd_set_error( 'password_empty', __( 'Enter a password', 'edd' ) ); - } - } else { - // no username - edd_set_error( 'username_incorrect', __( 'The username you entered does not exist', 'edd' ) ); + + $user = edd_log_user_in( 0, $user_login, $user_pass, false ); + + if ( ! $user instanceof WP_User ) { + return $valid_user_data; } - - return $valid_user_data; - -} + // Populate the valid user data array. + return array( + 'user_id' => $user->ID, + 'user_login' => $user->user_login, + 'user_email' => $user->user_email, + 'user_first' => $user->first_name, + 'user_last' => $user->last_name, + 'user_pass' => $user_pass, + ); +} /** * Purchase Form Validate Guest User * - * @access private - * @since 1.0.8.1 - * @return void -*/ - + * @access private + * @since 1.0.8.1 + * @return array + */ function edd_purchase_form_validate_guest_user() { - // start an array to collect valid user data + + // Start an array to collect valid user data $valid_user_data = array( - // set a default id for guests - 'user_id' => 0, + 'user_id' => 0 ); - - // get the guest email - $guest_email = isset( $_POST['edd_email'] ) ? $_POST['edd_email'] : false; - - // check email - if ( $guest_email && strlen( $guest_email ) > 0 ) { - // validate email + + // Show error message if user must be logged in + if ( edd_logged_in_only() ) { + edd_set_error( 'logged_in_only', __( 'You must be logged into an account to purchase', 'easy-digital-downloads' ) ); + } + + // Get the guest email + $guest_email = isset( $_POST['edd_email'] ) + ? sanitize_email( $_POST['edd_email'] ) + : false; + + // Check email + if ( ! empty( $guest_email ) && strlen( $guest_email ) > 0 ) { + + // Invalid email if ( ! is_email( $guest_email ) ) { - // invalid email - edd_set_error( 'email_invalid', __( 'Invalid email', 'edd' ) ); + edd_set_error( 'email_invalid', __( 'Invalid email', 'easy-digital-downloads' ) ); + + // Email address is unsafe (multisite only) + } elseif ( is_multisite() && is_email_address_unsafe( $guest_email ) ) { + edd_set_error( 'email_unsafe', __( 'You cannot use that email address at this time.', 'easy-digital-downloads' ) ); + + // All is good to go } else { - // all is good to go $valid_user_data['user_email'] = $guest_email; } + + // No email } else { - // no email - edd_set_error( 'email_empty', __( 'Enter an email', 'edd' ) ); + edd_set_error( 'email_empty', __( 'Enter an email', 'easy-digital-downloads' ) ); } - - return $valid_user_data; -} + // Get fields + $fields = edd_purchase_form_required_fields(); + + // Loop through required fields and show error messages + foreach ( $fields as $field_name => $value ) { + if ( empty( $_POST[ $field_name ] ) && ! empty( $value['error_id'] ) && ! empty( $value['error_message'] ) ) { + edd_set_error( $value['error_id'], $value['error_message'] ); + } + } + + return (array) $valid_user_data; +} /** - * Register And Login New User + * Register And Login New User. * - * @access private - * @since 1.0.8.1 - * @return integer -*/ - + * @since 1.0.8.1 + * + * @param array $user_data The data provided by the checkout page's registration form. + * @return integer + */ function edd_register_and_login_new_user( $user_data = array() ) { - // verify the array - if ( empty( $user_data ) ) - return -1; - - // insert new user - $user_id = wp_insert_user(array( - 'user_login' => $user_data['user_login'], - 'user_pass' => $user_data['user_pass'], - 'user_email' => $user_data['user_email'], - 'first_name' => $user_data['user_first'], - 'last_name' => $user_data['user_last'], - 'user_registered' => date('Y-m-d H:i:s'), - 'role' => 'subscriber' - ) + + // Verify the array. + if ( empty( $user_data ) ) { + return -1; + } + + // Bail if errors. + if ( edd_get_errors() ) { + return -1; + } + + $defaults = array( + 'user_login' => '', + 'user_pass' => '', + 'user_email' => '', + 'first_name' => '', + 'last_name' => '', + 'role' => get_option( 'default_role' ), + ); + $user_args = wp_parse_args( $user_data, $defaults ); + $user_args = apply_filters( + 'edd_insert_user_args', + $user_args, + $user_data ); - - // validate inserted user - if ( is_wp_error( $user_id ) ) - return -1; - - // allow themes and plugins to hook - do_action('edd_insert_user', $user_id); - - // login new user - edd_log_user_in($user_id, $user_data['user_login'], $user_data['user_pass']); - - // return user id - return $user_id; -} + // Insert new user. + $user_id = wp_insert_user( $user_args ); + + // Validate inserted user. + if ( is_wp_error( $user_id ) ) { + return -1; + } + + // Allow themes and plugins to filter the user data. + $user_data = apply_filters( 'edd_insert_user_data', $user_data, $user_args ); + + // Allow themes and plugins to hook. + do_action( 'edd_insert_user', $user_id, $user_data ); + + // Login new user. + $user = edd_log_user_in( $user_id, $user_data['user_login'], $user_data['user_pass'] ); + + // If we have errors after trying to use wp_signon, return -1. + if ( edd_get_errors() ) { + return -1; + } + + // Return user id. + return $user->ID; +} /** * Get Purchase Form User * - * @access private - * @since 1.0.8.1 - * @return array -*/ - -function edd_get_purchase_form_user( $valid_data = array() ) { - - // initialize user - $user = false; - - // check if user is logged in - if ( is_user_logged_in() ) { - // set the valid user as the logged in collected data + * @since 1.0.8.1 + * @since 3.0 Remove `update_user_meta()` call to update the user's address + * as it is done later on in the order flow where a customer ID + * is available. + * + * @param array $valid_data + * @access private + * @since 1.0.8.1 + * + * @param array $valid_data The validated data from the checkout form validation. + * @return array + */ +function edd_get_purchase_form_user( $valid_data = array(), $is_ajax = null ) { + + // Default variables + $user = false; + $is_ajax = ( null === $is_ajax ) ? edd_doing_ajax() : $is_ajax; + + // Bail if during the ajax submission (check for errors only) + if ( $is_ajax ) { + return true; + + // Set the valid user as the logged in collected data + } elseif ( is_user_logged_in() ) { $user = $valid_data['logged_in_user']; - } - // otherwise check if we have to register or login users - else if ( $valid_data['need_new_user'] === true || $valid_data['need_user_login'] === true ) { - // new user registration - if ( $valid_data['need_new_user'] === true ) { - // set user + + // New user registration + } elseif ( true === $valid_data['need_new_user'] || true === $valid_data['need_user_login'] ) { + // This ensures $_COOKIE is available without a new HTTP request. + add_action( 'set_logged_in_cookie', 'edd_set_logged_in_cookie' ); + + if ( true === $valid_data['need_new_user'] ) { + + // Set user $user = $valid_data['new_user_data']; - // register and login new user + + // Register and login new user. $user['user_id'] = edd_register_and_login_new_user( $user ); - // user login - } else if ( $valid_data['need_user_login'] === true ) { - // set user + + // User login + } elseif ( true === $valid_data['need_user_login'] ) { + /* + * The login form is now processed in the edd_process_purchase_login() function. + * This is still here for backwards compatibility. + * This also allows the old login process to still work if a user removes the + * checkout login submit button. + * + * This also ensures that the customer is logged in correctly if they click "Purchase" + * instead of submitting the login form, meaning the customer is logged in during the purchase process. + */ + + // Set user. $user = $valid_data['login_user_data']; - // login user - edd_log_user_in( $user['user_id'], $user['user_login'], $user['user_pass'] ); - } - } - - // check guest checkout - if ( false === $user && false === edd_no_guest_checkout() ) { - // set user + + // Login user. + if ( empty( $user ) || -1 === $user['user_id'] ) { + edd_set_error( 'invalid_user', __( 'The user information is invalid', 'easy-digital-downloads' ) ); + return false; + } else { + edd_log_user_in( $user['user_id'], $user['user_login'], $user['user_pass'] ); + } + } + + remove_action( 'set_logged_in_cookie', 'edd_set_logged_in_cookie' ); + } + + // Check guest checkout + if ( empty( $user ) && ( false === edd_no_guest_checkout() ) ) { $user = $valid_data['guest_user_data']; } - - // verify we have an user - if ( false === $user || empty( $user ) ) { - // return false + + // Bail if no user. + if ( empty( $user ) ) { return false; } - - // get user first name - if ( !isset( $user['user_first'] ) || strlen( trim( $user['user_first'] ) ) < 1 ) { - $user['user_first'] = isset( $_POST["edd_first"] ) ? strip_tags( trim( $_POST["edd_first"] ) ) : ''; + + // Get user first name. + if ( ! isset( $user['user_first'] ) || strlen( trim( $user['user_first'] ) ) < 1 ) { + $user['user_first'] = isset( $_POST['edd_first'] ) + ? strip_tags( trim( $_POST['edd_first'] ) ) + : ''; + } + + // Get user last name. + if ( ! isset( $user['user_last'] ) || strlen( trim( $user['user_last'] ) ) < 1 ) { + $user['user_last'] = isset( $_POST['edd_last'] ) + ? strip_tags( trim( $_POST['edd_last'] ) ) + : ''; } - - // get user last name - if ( !isset( $user['user_last'] ) || strlen( trim( $user['user_last'] ) ) < 1 ) { - $user['user_last'] = isset( $_POST["edd_last"] ) ? strip_tags( trim( $_POST["edd_last"] ) ) : ''; + + // Get the user's billing address details. + $user['address'] = array(); + $user['address']['line1'] = ! empty( $_POST['card_address'] ) ? sanitize_text_field( $_POST['card_address'] ) : ''; + $user['address']['line2'] = ! empty( $_POST['card_address_2'] ) ? sanitize_text_field( $_POST['card_address_2'] ) : ''; + $user['address']['city'] = ! empty( $_POST['card_city'] ) ? sanitize_text_field( $_POST['card_city'] ) : ''; + $user['address']['state'] = ! empty( $_POST['card_state'] ) ? sanitize_text_field( $_POST['card_state'] ) : ''; + $user['address']['country'] = ! empty( $_POST['billing_country'] ) ? sanitize_text_field( $_POST['billing_country'] ) : ''; + $user['address']['zip'] = ! empty( $_POST['card_zip'] ) ? sanitize_text_field( $_POST['card_zip'] ) : ''; + + // Country will always be set if address fields are present + if ( empty( $user['address']['country'] ) ) { + $user['address'] = false; } - - // return valid user + + // Return valid user. return $user; } +/** + * Sets the $_COOKIE global when a logged in cookie is available. + * + * We need the global to be immediately available so calls to wp_create_nonce() + * within the same session will use the newly available data. + * + * @since 2.11 + * + * @link https://wordpress.stackexchange.com/a/184055 + * + * @param string $logged_in_cookie The logged-in cookie value. + */ +function edd_set_logged_in_cookie( $logged_in_cookie ) { + $_COOKIE[ LOGGED_IN_COOKIE ] = $logged_in_cookie; +} + +/** + * Validates the credit card info + * + * @access private + * @since 1.4.4 + * @return array + */ +function edd_purchase_form_validate_cc() { + $card_data = edd_get_purchase_cc_info(); + + // Validate the card zip + if ( ! empty( $card_data['card_zip'] ) && edd_get_cart_total() > 0.00 ) { + if ( ! edd_purchase_form_validate_cc_zip( $card_data['card_zip'], $card_data['card_country'] ) ) { + edd_set_error( 'invalid_cc_zip', __( 'The zip / postal code you entered for your billing address is invalid', 'easy-digital-downloads' ) ); + } + } + + // This should validate card numbers at some point too + return $card_data; +} /** * Get Credit Card Info * - * @access private - * @since 1.2 - * @return array -*/ - -function edd_get_purchase_cc_info( $valid_data = array() ) { - + * @access private + * @since 1.4.4 + * @return array + */ +function edd_get_purchase_cc_info() { $cc_info = array(); - $cc_info['card_name'] = isset( $_POST['card_name'] ) ? sanitize_text_field( $_POST['card_name'] ) : ''; - $cc_info['card_number'] = isset( $_POST['card_number'] ) ? sanitize_text_field( $_POST['card_number'] ) : ''; - $cc_info['card_cvc'] = isset( $_POST['card_cvc'] ) ? sanitize_text_field( $_POST['card_cvc'] ) : ''; - $cc_info['card_exp_month'] = isset( $_POST['card_exp_month'] ) ? sanitize_text_field( $_POST['card_exp_month'] ) : ''; - $cc_info['card_exp_year'] = isset( $_POST['card_exp_year'] ) ? sanitize_text_field( $_POST['card_exp_year'] ) : ''; - $cc_info['card_address'] = isset( $_POST['card_address'] ) ? sanitize_text_field( $_POST['card_address'] ) : ''; - $cc_info['card_address_2'] = isset( $_POST['card_address_2'] ) ? sanitize_text_field( $_POST['card_address_2'] ) : ''; - $cc_info['card_city'] = isset( $_POST['card_city'] ) ? sanitize_text_field( $_POST['card_city'] ) : ''; - $cc_info['card_country'] = isset( $_POST['billing_country'] )? sanitize_text_field( $_POST['billing_country'] ) : ''; - $cc_info['card_zip'] = isset( $_POST['card_zip'] ) ? sanitize_text_field( $_POST['card_zip'] ) : ''; - - switch( $cc_info['card_country'] ) : - - case 'US' : - $cc_info['card_state'] = isset( $_POST['card_state_us'] ) ? sanitize_text_field( $_POST['card_state_us'] ) : ''; - break; - case 'CA' : - $cc_info['card_state'] = isset( $_POST['card_state_ca'] ) ? sanitize_text_field( $_POST['card_state_ca'] ) : ''; - break; - default : - $cc_info['card_state'] = isset( $_POST['card_state_other'] )? sanitize_text_field( $_POST['card_state_other'] ) : ''; - break; - - endswitch; - - // return cc info + $cc_info['card_name'] = isset( $_POST['card_name'] ) ? sanitize_text_field( $_POST['card_name'] ) : ''; + $cc_info['card_number'] = isset( $_POST['card_number'] ) ? sanitize_text_field( $_POST['card_number'] ) : ''; + $cc_info['card_cvc'] = isset( $_POST['card_cvc'] ) ? sanitize_text_field( $_POST['card_cvc'] ) : ''; + $cc_info['card_exp_month'] = isset( $_POST['card_exp_month'] ) ? sanitize_text_field( $_POST['card_exp_month'] ) : ''; + $cc_info['card_exp_year'] = isset( $_POST['card_exp_year'] ) ? sanitize_text_field( $_POST['card_exp_year'] ) : ''; + $cc_info['card_address'] = isset( $_POST['card_address'] ) ? sanitize_text_field( $_POST['card_address'] ) : ''; + $cc_info['card_address_2'] = isset( $_POST['card_address_2'] ) ? sanitize_text_field( $_POST['card_address_2'] ) : ''; + $cc_info['card_city'] = isset( $_POST['card_city'] ) ? sanitize_text_field( $_POST['card_city'] ) : ''; + $cc_info['card_state'] = isset( $_POST['card_state'] ) ? sanitize_text_field( $_POST['card_state'] ) : ''; + $cc_info['card_country'] = isset( $_POST['billing_country'] ) ? sanitize_text_field( $_POST['billing_country'] ) : ''; + $cc_info['card_zip'] = isset( $_POST['card_zip'] ) ? sanitize_text_field( $_POST['card_zip'] ) : ''; + + // Return cc info return $cc_info; } - /** - * Send To Success Page + * Validate zip code based on country code * - * Sends the user to the succes page. + * @since 1.4.4 * - * @access public - * @since 1.0 - * @return void -*/ - -function edd_send_to_success_page($query_string = null) { - global $edd_options; - $redirect = get_permalink($edd_options['success_page']); - if($query_string) - $redirect .= $query_string; - - wp_redirect( apply_filters('edd_success_page_redirect', $redirect, $_POST['edd-gateway'], $query_string) ); exit; -} + * @param int $zip + * @param string $country_code + * + * @return bool|mixed|void + */ +function edd_purchase_form_validate_cc_zip( $zip = 0, $country_code = '' ) { + $ret = false; + + if ( empty( $zip ) || empty( $country_code ) ) { + return $ret; + } + $country_code = strtoupper( $country_code ); + + $zip_regex = array( + "AD" => "AD\d{3}", + "AM" => "(37)?\d{4}", + "AR" => "^([A-Z]{1}\d{4}[A-Z]{3}|[A-Z]{1}\d{4}|\d{4})$", + "AS" => "96799", + "AT" => "\d{4}", + "AU" => "^(0[289][0-9]{2})|([1345689][0-9]{3})|(2[0-8][0-9]{2})|(290[0-9])|(291[0-4])|(7[0-4][0-9]{2})|(7[8-9][0-9]{2})$", + "AX" => "22\d{3}", + "AZ" => "\d{4}", + "BA" => "\d{5}", + "BB" => "(BB\d{5})?", + "BD" => "\d{4}", + "BE" => "^[1-9]{1}[0-9]{3}$", + "BG" => "\d{4}", + "BH" => "((1[0-2]|[2-9])\d{2})?", + "BM" => "[A-Z]{2}[ ]?[A-Z0-9]{2}", + "BN" => "[A-Z]{2}[ ]?\d{4}", + "BR" => "\d{5}[\-]?\d{3}", + "BY" => "\d{6}", + "CA" => "^[ABCEGHJKLMNPRSTVXY]{1}\d{1}[A-Z]{1} *\d{1}[A-Z]{1}\d{1}$", + "CC" => "6799", + "CH" => "^[1-9][0-9][0-9][0-9]$", + "CK" => "\d{4}", + "CL" => "\d{7}", + "CN" => "\d{6}", + "CR" => "\d{4,5}|\d{3}-\d{4}", + "CS" => "\d{5}", + "CV" => "\d{4}", + "CX" => "6798", + "CY" => "\d{4}", + "CZ" => "\d{3}[ ]?\d{2}", + "DE" => "\b((?:0[1-46-9]\d{3})|(?:[1-357-9]\d{4})|(?:[4][0-24-9]\d{3})|(?:[6][013-9]\d{3}))\b", + "DK" => "^([D-d][K-k])?( |-)?[1-9]{1}[0-9]{3}$", + "DO" => "\d{5}", + "DZ" => "\d{5}", + "EC" => "([A-Z]\d{4}[A-Z]|(?:[A-Z]{2})?\d{6})?", + "EE" => "\d{5}", + "EG" => "\d{5}", + "ES" => "^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$", + "ET" => "\d{4}", + "FI" => "\d{5}", + "FK" => "FIQQ 1ZZ", + "FM" => "(9694[1-4])([ \-]\d{4})?", + "FO" => "\d{3}", + "FR" => "^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$", + "GE" => "\d{4}", + "GF" => "9[78]3\d{2}", + "GL" => "39\d{2}", + "GN" => "\d{3}", + "GP" => "9[78][01]\d{2}", + "GR" => "\d{3}[ ]?\d{2}", + "GS" => "SIQQ 1ZZ", + "GT" => "\d{5}", + "GU" => "969[123]\d([ \-]\d{4})?", + "GW" => "\d{4}", + "HM" => "\d{4}", + "HN" => "(?:\d{5})?", + "HR" => "\d{5}", + "HT" => "\d{4}", + "HU" => "\d{4}", + "ID" => "\d{5}", + "IE" => "((D|DUBLIN)?([1-9]|6[wW]|1[0-8]|2[024]))?", + "IL" => "\d{5}", + "IN"=> "^[1-9][0-9][0-9][0-9][0-9][0-9]$", //india + "IO" => "BBND 1ZZ", + "IQ" => "\d{5}", + "IS" => "\d{3}", + "IT" => "^(V-|I-)?[0-9]{5}$", + "JO" => "\d{5}", + "JP" => "\d{3}-\d{4}", + "KE" => "\d{5}", + "KG" => "\d{6}", + "KH" => "\d{5}", + "KR" => "\d{5}", + "KW" => "\d{5}", + "KZ" => "\d{6}", + "LA" => "\d{5}", + "LB" => "(\d{4}([ ]?\d{4})?)?", + "LI" => "(948[5-9])|(949[0-7])", + "LK" => "\d{5}", + "LR" => "\d{4}", + "LS" => "\d{3}", + "LT" => "\d{5}", + "LU" => "\d{4}", + "LV" => "\d{4}", + "MA" => "\d{5}", + "MC" => "980\d{2}", + "MD" => "\d{4}", + "ME" => "8\d{4}", + "MG" => "\d{3}", + "MH" => "969[67]\d([ \-]\d{4})?", + "MK" => "\d{4}", + "MN" => "\d{5}", + "MP" => "9695[012]([ \-]\d{4})?", + "MQ" => "9[78]2\d{2}", + "MT" => "[A-Z]{3}[ ]?\d{2,4}", + "MU" => "(\d{3}[A-Z]{2}\d{3})?", + "MV" => "\d{5}", + "MX" => "\d{5}", + "MY" => "\d{5}", + "NC" => "988\d{2}", + "NE" => "\d{4}", + "NF" => "2899", + "NG" => "(\d{6})?", + "NI" => "((\d{4}-)?\d{3}-\d{3}(-\d{1})?)?", + "NL" => "^[1-9][0-9]{3}\s?([a-zA-Z]{2})?$", + "NO" => "\d{4}", + "NP" => "\d{5}", + "NZ" => "\d{4}", + "OM" => "(PC )?\d{3}", + "PF" => "987\d{2}", + "PG" => "\d{3}", + "PH" => "\d{4}", + "PK" => "\d{5}", + "PL" => "\d{2}-\d{3}", + "PM" => "9[78]5\d{2}", + "PN" => "PCRN 1ZZ", + "PR" => "00[679]\d{2}([ \-]\d{4})?", + "PT" => "\d{4}([\-]\d{3})?", + "PW" => "96940", + "PY" => "\d{4}", + "RE" => "9[78]4\d{2}", + "RO" => "\d{6}", + "RS" => "\d{5}", + "RU" => "\d{6}", + "SA" => "\d{5}", + "SE" => "^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$", + "SG" => "\d{6}", + "SH" => "(ASCN|STHL) 1ZZ", + "SI" => "\d{4}", + "SJ" => "\d{4}", + "SK" => "\d{3}[ ]?\d{2}", + "SM" => "4789\d", + "SN" => "\d{5}", + "SO" => "\d{5}", + "SZ" => "[HLMS]\d{3}", + "TC" => "TKCA 1ZZ", + "TH" => "\d{5}", + "TJ" => "\d{6}", + "TM" => "\d{6}", + "TN" => "\d{4}", + "TR" => "\d{5}", + "TW" => "\d{3}(\d{2})?", + "UA" => "\d{5}", + "UK" => "^(GIR|[A-Z]\d[A-Z\d]??|[A-Z]{2}\d[A-Z\d]??)[ ]??(\d[A-Z]{2})$", + "US" => "^\d{5}([\-]?\d{4})?$", + "UY" => "\d{5}", + "UZ" => "\d{6}", + "VA" => "00120", + "VE" => "\d{4}", + "VI" => "008(([0-4]\d)|(5[01]))([ \-]\d{4})?", + "WF" => "986\d{2}", + "YT" => "976\d{2}", + "YU" => "\d{5}", + "ZA" => "\d{4}", + "ZM" => "\d{5}" + ); + + if ( ! isset ( $zip_regex[ $country_code ] ) || preg_match( "/" . $zip_regex[ $country_code ] . "/i", $zip ) ) { + $ret = true; + } + + return apply_filters( 'edd_is_zip_valid', $ret, $zip, $country_code ); +} /** - * Send Back to Checkout - * - * Used to redirect a user back to the purchase - * page if there are errors present. + * Check the purchase to ensure a banned email is not allowed through * - * @access public - * @since 1.0 + * @since 2.0 * @return void -*/ - -function edd_send_back_to_checkout($query_string = null) { - global $edd_options; - $redirect = get_permalink($edd_options['purchase_page']); - if($query_string) - $redirect .= $query_string; - - wp_redirect($redirect); exit; -} + */ +function edd_check_purchase_email( $valid_data, $posted ) { + $banned = edd_get_banned_emails(); + if ( empty( $banned ) ) { + return; + } + + $user_emails = array(); + if ( ! empty( $posted['edd_email'] ) ) { + $user_emails[] = $posted['edd_email']; + } + if ( is_user_logged_in() ) { + + // The user is logged in, check that their account email is not banned. + $user_data = get_userdata( get_current_user_id() ); + $user_emails[] = $user_data->user_email; + + } elseif ( isset( $posted['edd-purchase-var'] ) && 'needs-to-login' === $posted['edd-purchase-var'] ) { + + // The user is logging in, check that their email is not banned. + $user_data = get_user_by( 'login', $posted['edd_user_login'] ); + if ( $user_data ) { + $user_emails[] = $user_data->user_email; + } + } + + foreach ( $user_emails as $email ) { + + // Set an error and give the customer a general error (don't alert them that they were banned). + if ( edd_is_email_banned( $email ) ) { + edd_set_error( 'email_banned', __( 'An internal error has occurred, please try again or contact support.', 'easy-digital-downloads' ) ); + break; + } + } +} +add_action( 'edd_checkout_error_checks', 'edd_check_purchase_email', 10, 2 ); /** - * Get Success Page URL + * Checks the length of the user's email address. * - * Gets the success page URL. + * @since 3.1.0.5 + * @param array $valid_data The array of validated data. + * @param array $posted_data The array of posted data. + * @return void + */ +function edd_check_purchase_email_length( $valid_data, $posted_data ) { + // Customer emails are limited to 100 characters. + if ( ! empty( $posted_data['edd_email'] ) && strlen( $posted_data['edd_email'] ) > 100 ) { + edd_set_error( 'email_length', __( 'Your email address must be shorter than 100 characters.', 'easy-digital-downloads' ) ); + } +} +add_action( 'edd_checkout_error_checks', 'edd_check_purchase_email_length', 10, 2 ); + +/** + * Process a straight-to-gateway purchase * - * @access public - * @since 1.0 - * @return string -*/ - -function edd_get_success_page_url($query_string = null) { - global $edd_options; - $success_page = get_permalink($edd_options['success_page']); - if($query_string) - $success_page .= $query_string; - return $success_page; -} \ No newline at end of file + * @since 1.7 + * @return void + */ +function edd_process_straight_to_gateway( $data ) { + + $download_id = $data['download_id']; + $options = isset( $data['edd_options'] ) ? $data['edd_options'] : array(); + $quantity = isset( $data['edd_download_quantity'] ) ? $data['edd_download_quantity'] : 1; + + if ( empty( $download_id ) || ! edd_get_download( $download_id ) ) { + return; + } + + $purchase_data = edd_build_straight_to_gateway_data( $download_id, $options, $quantity ); + $enabled_gateways = edd_get_enabled_payment_gateways(); + + if ( ! array_key_exists( $purchase_data['gateway'], $enabled_gateways ) ) { + foreach ( $purchase_data['downloads'] as $download ) { + $options = isset( $download['options'] ) ? $download['options'] : array(); + + $options['quantity'] = isset( $download['quantity'] ) ? $download['quantity'] : 1; + edd_add_to_cart( $download['id'], $options ); + } + + edd_set_error( 'edd-straight-to-gateway-error', __( 'There was an error completing your purchase. Please try again.', 'easy-digital-downloads' ) ); + edd_redirect( edd_get_checkout_uri() ); + } + + edd_set_purchase_session( $purchase_data ); + edd_send_to_gateway( $purchase_data['gateway'], $purchase_data ); +} +add_action( 'edd_straight_to_gateway', 'edd_process_straight_to_gateway' ); diff --git a/includes/query-filters.php b/includes/query-filters.php old mode 100644 new mode 100755 index b07c9e6554d..81e1f7fc348 --- a/includes/query-filters.php +++ b/includes/query-filters.php @@ -1,45 +1,155 @@ 403 ) ); } -add_filter('query_vars', 'edd_query_vars'); +add_action( 'template_redirect', 'edd_block_attachments' ); + +/** + * Removes our tracking query arg so as not to interfere with the WP query. + * + * @see https://core.trac.wordpress.org/ticket/25143 + * + * @since 2.4.3 + * + * @param WP_Query $query. + */ +function edd_unset_discount_query_arg( $query ) { + if ( is_admin() || ! $query->is_main_query() || ! empty( $query->query_vars['edd-api'] ) ) { + return; + } + $discount = $query->get( 'discount' ); + if ( ! empty( $discount ) ) { + + // Unset ref var from $wp_query. + $query->set( 'discount', null ); + + global $wp; + + // Unset ref var from $wp. + unset( $wp->query_vars['discount'] ); + + // If on home (because $wp->query_vars is empty) and 'show_on_front' is page + if ( empty( $wp->query_vars ) && get_option( 'show_on_front' ) === 'page' ) { + + // Reset and re-parse query vars. + $wp->query_vars['page_id'] = get_option( 'page_on_front' ); + $query->parse_query( $wp->query_vars ); + } + } +} +add_action( 'pre_get_posts', 'edd_unset_discount_query_arg', 999999 ); /** - * Blocks access to Download attachments - * - * @access public - * @since 1.2.2 - * @return void -*/ + * Filters on canonical redirects. + * + * @since 2.4.3 + * + * @param string $redirect_url Redirect URL. + * @param string $requested_url Requested URL. + * + * @return string + */ +function edd_prevent_canonical_redirect( $redirect_url, $requested_url ) { -function edd_block_attachments() { + if ( ! is_front_page() ) { + return $redirect_url; + } - if( ! is_attachment() ) - return; + $discount = get_query_var( 'discount' ); - $parent = get_post_field( 'post_parent', get_the_ID() ); + if ( ! empty( $discount ) || false !== strpos( $requested_url, 'discount' ) ) { + $redirect_url = $requested_url; + } - if( ! $parent ) + return $redirect_url; +} +add_action( 'redirect_canonical', 'edd_prevent_canonical_redirect', 0, 2 ); + +/** + * Auto flush permalinks wth a soft flush when a 404 error is detected on an + * EDD page. + * + * @since 2.4.3 + * + * @return string + */ +function edd_refresh_permalinks_on_bad_404() { + global $wp; + + if ( ! is_404() ) { return; + } - if( 'download' != get_post_type( $parent ) ) + if ( isset( $_GET['edd-flush'] ) ) { // WPCS: CSRF ok. return; + } + + if ( false === get_transient( 'edd_refresh_404_permalinks' ) ) { + $slug = defined( 'EDD_SLUG' ) + ? EDD_SLUG + : 'downloads'; + + $parts = explode( '/', $wp->request ); + + if ( $slug !== $parts[0] ) { + return; + } + + flush_rewrite_rules( false ); - wp_die( __( 'You do not have permission to view this file.', 'edd' ), __( 'Error', 'edd' ) ); + set_transient( 'edd_refresh_404_permalinks', 1, HOUR_IN_SECONDS * 12 ); + edd_redirect( home_url( add_query_arg( array( 'edd-flush' => 1 ), $wp->request ) ) ); + } } -add_action( 'template_redirect', 'edd_block_attachments' ); \ No newline at end of file +add_action( 'template_redirect', 'edd_refresh_permalinks_on_bad_404' ); diff --git a/includes/refund-functions.php b/includes/refund-functions.php new file mode 100644 index 00000000000..f992977eca9 --- /dev/null +++ b/includes/refund-functions.php @@ -0,0 +1,64 @@ + __( 'Refundable', 'easy-digital-downloads' ), + 'nonrefundable' => __( 'Non-Refundable', 'easy-digital-downloads' ) + ); +} + +/** + * Calculate refund date. + * + * @since 3.0 + * + * @param string $date Date order was completed (Accepts UTC). + * @param int $download_id Download ID. + * + * @return string|false Date refundable (in UTC), false otherwise. + */ +function edd_get_refund_date( $date = '', $download_id = 0 ) { + + // Bail if no date was passed. + if ( empty( $date ) ) { + return false; + } + + $refund_window = absint( edd_get_option( 'refund_window', 30 ) ); + + // Refund window is infinite. + if ( 0 === $refund_window ) { + return false; + } + + if ( ! empty( $download_id ) ) { + $refund_window = edd_get_download_refund_window( $download_id ); + + $date_refundable = \EDD\Utils\Date::parse( $date, 'UTC' )->addDays( $refund_window ); + } else { + $date_refundable = \EDD\Utils\Date::parse( $date, 'UTC' )->addDays( $refund_window ); + } + + return $date_refundable->toDateTimeString(); +} diff --git a/includes/register-settings.php b/includes/register-settings.php deleted file mode 100755 index 8aa58f49ee3..00000000000 --- a/includes/register-settings.php +++ /dev/null @@ -1,789 +0,0 @@ - ''); // blank option - if($pages) { - foreach ( $pages as $page ) { - $pages_options[$page->ID] = $page->post_title; - } - } - - /* white list our settings, each in their respective section - filters can be used to add more options to each section */ - $edd_settings = array( - 'general' => apply_filters('edd_settings_general', - array( - array( - 'id' => 'test_mode', - 'name' => __('Test Mode', 'edd'), - 'desc' => __('While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'edd'), - 'type' => 'checkbox' - ), - array( - 'id' => 'purchase_page', - 'name' => __('Checkout Page', 'edd'), - 'desc' => __('This is the checkout page where buyers will complete their purchases', 'edd'), - 'type' => 'select', - 'options' => $pages_options - ), - array( - 'id' => 'success_page', - 'name' => __('Success Page', 'edd'), - 'desc' => __('This is the page buyers are sent to after completing their purchases', 'edd'), - 'type' => 'select', - 'options' => $pages_options - ), - array( - 'id' => 'show_links_on_success', - 'name' => __('Download Links on Success Page', 'edd'), - 'desc' => __('Show a list of all download links on the success page after completing a purchase?', 'edd'), - 'type' => 'checkbox' - ), - array( - 'id' => 'currency_settings', - 'name' => '' . __('Currency Settings', 'edd') . '', - 'desc' => __('Configure the currency options', 'edd'), - 'type' => 'header' - ), - array( - 'id' => 'currency', - 'name' => __('Currency', 'edd'), - 'desc' => __('Choose your currency. Note that some payment gateways have currency restrictions.', 'edd'), - 'type' => 'select', - 'options' => edd_get_currencies() - ), - array( - 'id' => 'currency_position', - 'name' => __('Currency Position', 'edd'), - 'desc' => __('Choose the location of the currency sign.', 'edd'), - 'type' => 'select', - 'options' => array( - 'before' => __('Before - $10', 'edd'), - 'after' => __('After - 10$', 'edd') - ) - ), - array( - 'id' => 'thousands_separator', - 'name' => __('Thousands Separator', 'edd'), - 'desc' => __('The symbol (usually , or .) to separate thousands', 'edd'), - 'type' => 'text', - 'size' => 'small', - 'std' => ',' - ), - array( - 'id' => 'decimal_separator', - 'name' => __('Decimal Separator', 'edd'), - 'desc' => __('The symbol (usually , or .) to separate decimal points', 'edd'), - 'type' => 'text', - 'size' => 'small', - 'std' => '.' - ) - ) - ), - 'gateways' => apply_filters('edd_settings_gateways', - array( - array( - 'id' => 'gateways', - 'name' => __('Payment Gateways', 'edd'), - 'desc' => __('Choose the payment gateways you want to enable.', 'edd'), - 'type' => 'gateways', - 'options' => edd_get_payment_gateways() - ), - array( - 'id' => 'accepted_cards', - 'name' => __('Accepted Payment Method Icons', 'edd'), - 'desc' => __('Display icons for the selected payment methods', 'edd') . '
    ' . __('You will also need to configure your gateway settings if you are accepting credit cards', 'edd'), - 'type' => 'multicheck', - 'options' => apply_filters('edd_accepted_payment_icons', array( - 'mastercard' => 'Mastercard', - 'visa' => 'Visa', - 'americanexpress' => 'American Express', - 'discover' => 'Discover', - 'paypal' => 'PayPal' - ) - ) - ), - array( - 'id' => 'paypal', - 'name' => '' . __('PayPal Settings', 'edd') . '', - 'desc' => __('Configure the PayPal settings', 'edd'), - 'type' => 'header' - ), - array( - 'id' => 'paypal_email', - 'name' => __('PayPal Email', 'edd'), - 'desc' => __('Enter your PayPal account\'s email', 'edd'), - 'type' => 'text', - 'size' => 'regular' - ), - array( - 'id' => 'paypal_alternate_verification', - 'name' => __('Alternate PayPal Purchase Verification', 'edd'), - 'desc' => __('If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal.', 'edd'), - 'type' => 'checkbox' - ), - array( - 'id' => 'disable_paypal_verification', - 'name' => __('Disable PayPal IPN Verification', 'edd'), - 'desc' => __('If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases.', 'edd'), - 'type' => 'checkbox' - ) - ) - ), - 'emails' => apply_filters('edd_settings_emails', - array( - array( - 'id' => 'email_template', - 'name' => __('Email Template', 'edd'), - 'desc' => __('Choose a template. Click "Save Changes" then "Preview Purchase Receipt" to see the new template.', 'edd'), - 'type' => 'select', - 'options' => edd_get_email_templates() - ), - array( - 'id' => 'email_settings', - 'name' => '', - 'desc' => '', - 'type' => 'hook', - ), - array( - 'id' => 'from_name', - 'name' => __('From Name', 'edd'), - 'desc' => __('The name purchase receipts are said to come from. This should probably be your site or shop name.', 'edd'), - 'type' => 'text' - ), - array( - 'id' => 'from_email', - 'name' => __('From Email', 'edd'), - 'desc' => __('Email to send purchase receipts from. This will act as the "from" and "reply-to" address.', 'edd'), - 'type' => 'text' - ), - array( - 'id' => 'purchase_subject', - 'name' => __('Purchase Email Subject', 'edd'), - 'desc' => __('Enter the subject line for the purchase receipt email', 'edd'), - 'type' => 'text' - ), - array( - 'id' => 'purchase_receipt', - 'name' => __('Purchase Receipt', 'edd'), - 'desc' => __('Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:', 'edd') . '
    ' . - '{download_list} - ' . __('A list of download URLs for each download purchased', 'edd') . '
    ' . - '{name} - ' . __('The buyer\'s name', 'edd') . '
    ' . - '{date} - ' . __('The date of the purchase', 'edd') . '
    ' . - '{price} - ' . __('The total price of the purchase', 'edd') . '
    ' . - '{receipt_id} - ' . __('The unique ID number for this purchase receipt', 'edd') . '
    ' . - '{payment_method} - ' . __('The method of payment used for this purchase', 'edd') . '
    ' . - '{sitename} - ' . __('Your site name', 'edd'), - 'type' => 'rich_editor' - ) - ) - ), - 'styles' => apply_filters('edd_settings_styles', - array( - array( - 'id' => 'disable_styles', - 'name' => __('Disable Styles', 'edd'), - 'desc' => __('Check this to disable all included styling', 'edd'), - 'type' => 'checkbox' - ), - array( - 'id' => 'buton_header', - 'name' => '' . __('Buttons', 'edd') . '', - 'desc' => __('Options for add to cart and purchase buttons', 'edd'), - 'type' => 'header' - ), - array( - 'id' => 'button_style', - 'name' => __('Default Button Style', 'edd'), - 'desc' => __('Choose the style you want to use for the buttons.', 'edd'), - 'type' => 'select', - 'options' => edd_get_button_styles() - ), - array( - 'id' => 'checkout_color', - 'name' => __('Default Button Color', 'edd'), - 'desc' => __('Choose the color you want to use for the buttons.', 'edd'), - 'type' => 'select', - 'options' => edd_get_button_colors() - ) - ) - ), - 'misc' => apply_filters('edd_settings_misc', - array( - array( - 'id' => 'disable_ajax_cart', - 'name' => __('Disable Ajax', 'edd'), - 'desc' => __('Check this to disable AJAX for the shopping cart.', 'edd'), - 'type' => 'checkbox' - ), - array( - 'id' => 'jquery_validation', - 'name' => __('Enable jQuery Validation', 'edd'), - 'desc' => __('Check this to enable jQuery validation on the checkout form.', 'edd'), - 'type' => 'checkbox' - ), - array( - 'id' => 'logged_in_only', - 'name' => __('Disable Guest Checkout', 'edd'), - 'desc' => __('Require that users be logged-in to purchase files.', 'edd'), - 'type' => 'checkbox' - ), - array( - 'id' => 'show_register_form', - 'name' => __('Show Register / Login Form?', 'edd'), - 'desc' => __('Display the registration and login forms on the checkout page for non-logged-in users.', 'edd'), - 'type' => 'checkbox', - ), - array( - 'id' => 'download_link_expiration', - 'name' => __('Download Link Expiration', 'edd'), - 'desc' => __('How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours.', 'edd'), - 'type' => 'text', - 'size' => 'small' - ), - array( - 'id' => 'disable_redownload', - 'name' => __('Disable Redownload?', 'edd'), - 'desc' => __('Check this if you do not want to allow users to redownload items from their purchase history.', 'edd'), - 'type' => 'checkbox', - ), - array( - 'id' => 'terms', - 'name' => '' . __('Terms of Agreement', 'edd') . '', - 'desc' => '', - 'type' => 'header', - ), - array( - 'id' => 'show_agree_to_terms', - 'name' => __('Agree to Terms', 'edd'), - 'desc' => __('Check this to show an agree to terms on the checkout that users must agree to before purchasing.', 'edd'), - 'type' => 'checkbox', - ), - array( - 'id' => 'agree_label', - 'name' => __('Agree to Terms Label', 'edd'), - 'desc' => __('Label shown next to the agree to terms check box.', 'edd'), - 'type' => 'text', - 'size' => 'regular' - ), - array( - 'id' => 'agree_text', - 'name' => __('Agreement Text', 'edd'), - 'desc' => __('If Agree to Terms is checked, enter the agreement terms here.', 'edd'), - 'type' => 'rich_editor', - ), - array( - 'id' => 'checkout_label', - 'name' => __('Complete Purchase Text', 'edd'), - 'desc' => __('The button label for completing a purchase.', 'edd'), - 'type' => 'text', - ), - array( - 'id' => 'add_to_cart_text', - 'name' => __('Add to Cart Text', 'edd'), - 'desc' => __('Text shown on the Add to Cart Buttons', 'edd'), - 'type' => 'text' - ) - ) - ) - ); - - if( false == get_option( 'edd_settings_general' ) ) { - add_option( 'edd_settings_general' ); - } - if( false == get_option( 'edd_settings_gateways' ) ) { - add_option( 'edd_settings_gateways' ); - } - if( false == get_option( 'edd_settings_emails' ) ) { - add_option( 'edd_settings_emails' ); - } - if( false == get_option( 'edd_settings_styles' ) ) { - add_option( 'edd_settings_styles' ); - } - if( false == get_option( 'edd_settings_misc' ) ) { - add_option( 'edd_settings_misc' ); - } - - - add_settings_section( - 'edd_settings_general', - __('General Settings', 'edd'), - 'edd_settings_general_description_callback', - 'edd_settings_general' - ); - - foreach($edd_settings['general'] as $option) { - add_settings_field( - 'edd_settings_general[' . $option['id'] . ']', - $option['name'], - 'edd_' . $option['type'] . '_callback', - 'edd_settings_general', - 'edd_settings_general', - array( - 'id' => $option['id'], - 'desc' => $option['desc'], - 'name' => $option['name'], - 'section' => 'general', - 'size' => isset($option['size']) ? $option['size'] : null, - 'options' => isset($option['options']) ? $option['options'] : '', - 'std' => isset($option['std']) ? $option['std'] : '' - ) - ); - } - - add_settings_section( - 'edd_settings_gateways', - __('Payment Gateway Settings', 'edd'), - 'edd_settings_gateways_description_callback', - 'edd_settings_gateways' - ); - - foreach($edd_settings['gateways'] as $option) { - add_settings_field( - 'edd_settings_gateways[' . $option['id'] . ']', - $option['name'], - 'edd_' . $option['type'] . '_callback', - 'edd_settings_gateways', - 'edd_settings_gateways', - array( - 'id' => $option['id'], - 'desc' => $option['desc'], - 'name' => $option['name'], - 'section' => 'gateways', - 'size' => isset($option['size']) ? $option['size'] : null, - 'options' => isset($option['options']) ? $option['options'] : '', - 'std' => isset($option['std']) ? $option['std'] : '' - ) - ); - } - - add_settings_section( - 'edd_settings_emails', - __('Email Settings', 'edd'), - 'edd_settings_emails_description_callback', - 'edd_settings_emails' - ); - - foreach($edd_settings['emails'] as $option) { - add_settings_field( - 'edd_settings_emails[' . $option['id'] . ']', - $option['name'], - 'edd_' . $option['type'] . '_callback', - 'edd_settings_emails', - 'edd_settings_emails', - array( - 'id' => $option['id'], - 'desc' => $option['desc'], - 'name' => $option['name'], - 'section' => 'emails', - 'size' => isset($option['size']) ? $option['size'] : null, - 'options' => isset($option['options']) ? $option['options'] : '', - 'std' => isset($option['std']) ? $option['std'] : '' - ) - ); - } - - add_settings_section( - 'edd_settings_styles', - __('Style Settings', 'edd'), - 'edd_settings_styles_description_callback', - 'edd_settings_styles' - ); - - foreach($edd_settings['styles'] as $option) { - add_settings_field( - 'edd_settings_styles[' . $option['id'] . ']', - $option['name'], - 'edd_' . $option['type'] . '_callback', - 'edd_settings_styles', - 'edd_settings_styles', - array( - 'id' => $option['id'], - 'desc' => $option['desc'], - 'name' => $option['name'], - 'section' => 'styles', - 'size' => isset($option['size']) ? $option['size'] : '' , - 'options' => isset($option['options']) ? $option['options'] : '', - 'std' => isset($option['std']) ? $option['std'] : '' - ) - ); - } - - - add_settings_section( - 'edd_settings_misc', - __('Misc Settings', 'edd'), - 'edd_settings_misc_description_callback', - 'edd_settings_misc' - ); - - foreach($edd_settings['misc'] as $option) { - add_settings_field( - 'edd_settings_misc[' . $option['id'] . ']', - $option['name'], - 'edd_' . $option['type'] . '_callback', - 'edd_settings_misc', - 'edd_settings_misc', - array( - 'id' => $option['id'], - 'desc' => $option['desc'], - 'name' => $option['name'], - 'section' => 'misc', - 'size' => isset($option['size']) ? $option['size'] : '' , - 'options' => isset($option['options']) ? $option['options'] : '', - 'std' => isset($option['std']) ? $option['std'] : '' - ) - ); - } - - // creates our settings in the options table - register_setting('edd_settings_general', 'edd_settings_general', 'edd_settings_sanitize'); - register_setting('edd_settings_gateways', 'edd_settings_gateways', 'edd_settings_sanitize'); - register_setting('edd_settings_emails', 'edd_settings_emails', 'edd_settings_sanitize'); - register_setting('edd_settings_styles', 'edd_settings_styles', 'edd_settings_sanitize'); - register_setting('edd_settings_misc', 'edd_settings_misc', 'edd_settings_sanitize'); -} -add_action('admin_init', 'edd_register_settings'); - - -/** - * Settings General Description Callback - * - * Renders the general section description. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_settings_general_description_callback() { - //echo __('Configure the settings below', 'edd'); -} - - -/** - * Settings Gateways Description Callback - * - * Renders the gateways section description. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_settings_gateways_description_callback() { - //echo __('Configure the settings below', 'edd'); -} - - -/** - * Settings Emails Description Callback - * - * Renders the emails section description. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_settings_emails_description_callback() { - //echo __('Configure the settings below', 'edd'); -} - - -/** - * Settings Styles Description Callback - * - * Renders the styles section description. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_settings_styles_description_callback() { - //echo __('Configure the settings below', 'edd'); -} - - -/** - * Settings Misc Description Callback - * - * Renders the misc section description. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_settings_misc_description_callback() { - //echo __('Configure the settings below', 'edd'); -} - - -/** - * Header Callback - * - * Renders the header. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_header_callback($args) { - echo ''; -} - - -/** - * Checkbox Callback - * - * Renders checkboxes. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_checkbox_callback($args) { - - global $edd_options; - - $checked = isset($edd_options[$args['id']]) ? checked(1, $edd_options[$args['id']], false) : ''; - $html = ''; - $html .= ''; - - echo $html; - -} - - -/** - * Multicheck Callback - * - * Renders multiple checkboxes. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_multicheck_callback($args) { - - global $edd_options; - - foreach($args['options'] as $key => $option) : - if(isset($edd_options[$args['id']][$key])) { $enabled = $option; } else { $enabled = NULL; } - echo ' '; - echo '
    '; - endforeach; - echo '

    ' . $args['desc'] . '

    '; - -} - - -/** - * Gateways Callback - * - * Renders gateways fields. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_gateways_callback($args) { - - global $edd_options; - - foreach($args['options'] as $key => $option) : - if(isset($edd_options['gateways'][$key])) { $enabled = '1'; } else { $enabled = NULL; } - echo ' '; - echo '
    '; - endforeach; - -} - - -/** - * Text Callback - * - * Renders text fields. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_text_callback($args) { - - global $edd_options; - - if(isset($edd_options[$args['id']])) { $value = $edd_options[$args['id']]; } else { $value = isset($args['std']) ? $args['std'] : ''; } - $size = isset($args['size']) && !is_null($args['size']) ? $args['size'] : 'regular'; - $html = ''; - $html .= ''; - - echo $html; - -} - - -/** - * Select Callback - * - * Renders select fields. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_select_callback($args) { - - global $edd_options; - - $html = ''; - $html .= ''; - - echo $html; - -} - - -/** - * Rich Editor Callback - * - * Renders rich editor fields. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_rich_editor_callback($args) { - - global $edd_options, $wp_version; - - if(isset($edd_options[$args['id']])) { $value = $edd_options[$args['id']]; } else { $value = isset($args['std']) ? $args['std'] : ''; } - if($wp_version >= 3.3 && function_exists('wp_editor')) { - $html = wp_editor($value, 'edd_settings_' . $args['section'] . '[' . $args['id'] . ']', array('textarea_name' => 'edd_settings_' . $args['section'] . '[' . $args['id'] . ']')); - } else { - $html = ''; - } - $html .= '
    '; - - echo $html; - -} - - -/** - * Upload Callback - * - * Renders upload fields. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_upload_callback($args) { - - global $edd_options; - - if(isset($edd_options[$args['id']])) { $value = $edd_options[$args['id']]; } else { $value = isset($args['std']) ? $args['std'] : ''; } - $size = isset($args['size']) && !is_null($args['size']) ? $args['size'] : 'regular'; - $html = ''; - $html .= ' '; - $html .= ''; - - echo $html; - -} - - -/** - * Hook Callback - * - * Adds a do_action() hook in place of the field - * - * @access private - * @since 1.0.8.2 - * @return void -*/ - -function edd_hook_callback($args) { - - do_action('edd_' . $args['id']); - -} - - - -/** - * Settings Sanitization - * - * Adds a settings error (for the updated message) - * At some point this will validate input - * - * @access private - * @since 1.0.8.2 - * @return void -*/ - -function edd_settings_sanitize( $input ) { - add_settings_error('edd-notices', '', __('Settings Updated', 'edd'), 'updated'); - return $input; -} - - -/** - * Get Settings - * - * Retrieves all plugin settings and returns them - * as a combined array. - * - * @access public - * @since 1.0 - * @return array -*/ - -function edd_get_settings() { - $general_settings = is_array(get_option('edd_settings_general')) ? get_option('edd_settings_general') : array(); - $gateway_settings = is_array(get_option('edd_settings_gateways')) ? get_option('edd_settings_gateways') : array(); - $email_settings = is_array(get_option('edd_settings_emails')) ? get_option('edd_settings_emails') : array(); - $style_settings = is_array(get_option('edd_settings_styles')) ? get_option('edd_settings_styles') : array(); - $misc_settings = is_array(get_option('edd_settings_misc')) ? get_option('edd_settings_misc') : array(); - - return array_merge($general_settings, $gateway_settings, $email_settings, $style_settings, $misc_settings); -} \ No newline at end of file diff --git a/includes/reports/class-init.php b/includes/reports/class-init.php new file mode 100644 index 00000000000..42a1a79b5e3 --- /dev/null +++ b/includes/reports/class-init.php @@ -0,0 +1,261 @@ +legacy_reports( $reports ); + + $reports = $this->register_core_endpoint_views( $reports ); + + /** + * Fires when the Reports API is initialized. + * + * Use this hook to register new reports and endpoints. + * + * Example: + * + * add_action( 'edd_reports_init', function( $reports ) { + * + * try { + * $reports->add_report( 'test', array( + * 'label' => 'Test', + * 'priority' => 11, + * 'endpoints' => array( + * + * // Endpoints supporting multiple view groups can be reused: + * 'tiles' => array( 'test_endpoint', ... ), + * 'tables' => array( 'test_endpoint' ), + * ), + * ) ); + * + * $reports->register_endpoint( 'test_endpoint', array( + * 'label' => 'Test Endpoint', + * 'views' => array( + * + * // Possible to register a single endpoint for multiple view groups. + * 'tile' => array( + * 'data_callback' => '__return_true', + * 'display_args' => array( + * 'context' => 'secondary', + * 'comparison_label' => 'Filtered by ...', + * ), + * ), + * 'table' => array( ... ), + * ), + * ) ); + * } catch ( \EDD_Exception $exception ) { + * + * edd_debug_log_exception( $exception ); + * + * } + * + * } ); + * + * Reports and endpoints can also be registered using standalone functions: + * + * add_action( 'edd_reports_init', function() { + * + * \EDD\Reports\add_report( 'test', array( ... ) ); + * + * \EDD\Reports\register_endpoint( 'test_endpoint', array( ... ) ); + * + * } ); + * + * @since 3.0 + * + * @param Data\Report_Registry $reports Report registry instance, + * passed by reference. + */ + do_action_ref_array( 'edd_reports_init', array( &$reports ) ); + } + + /** + * Maybe add legacy reports if any exist + * + * @since 3.0 + * + * @param Data\Report_Registry $reports Reports registry instance. + * @return Data\Report_Registry Reports registry. + */ + private function legacy_reports( $reports ) { + + // Bail if no legacy reports + if ( ! has_filter( 'edd_report_views' ) ) { + return $reports; + } + + /** + * Filters legacy 'Reports' tab views. + * + * @since 1.4 + * @deprecated 3.0 Use {@see 'edd_reports_get_reports'} + * @see 'edd_reports_get_reports' + * + * @param array $views 'Reports' tab views. + */ + $legacy_views = edd_apply_filters_deprecated( 'edd_report_views', array( array() ), '3.0', 'edd_reports_get_reports' ); + + // Bail if no legacy views + if ( empty( $legacy_views ) ) { + return $reports; + } + + // Default legacy report priority to position them towards the bottom + $priority = 800; + + // Loop through views and try to convert them + foreach ( $legacy_views as $report_id => $label ) { + + // Legacy "_tab_" action + if ( has_action( "edd_reports_tab_{$report_id}" ) ) { + $hook = "edd_reports_tab_{$report_id}"; + + // Legacy "_view_" action + } elseif ( has_action( "edd_reports_view_{$report_id}" ) ) { + $hook = "edd_reports_view_{$report_id}"; + + // Skip + } else { + continue; + } + + // Create a callback function + $callback = function() use ( $hook ) { + /** + * Legacy: Fires inside the content area of the currently active Reports tab. + * + * The dynamic portion of the hook name, `$report_id` refers to the slug of + * the current reports tab. + * + * @since 1.0 + * @deprecated 3.0 Use the new Reports API to register new tabs. + * @see \EDD\Reports\add_report() + * + * @param \EDD\Reports\Data\Report|\WP_Error $report The current report object, + * or WP_Error if invalid. + */ + edd_do_action_deprecated( $hook, array(), '3.0', '\EDD\Reports\add_report' ); + }; + + // Legacy label + $legacy_label = $label . '' . __( 'Legacy', 'easy-digital-downloads' ) . ''; + + try { + // Add report + $reports->add_report( $report_id, array( + 'label' => $legacy_label, + 'group' => 'core', + 'icon' => 'chart-area', + 'priority' => $priority, + 'display_callback' => $callback, + 'filters' => array( + 'dates', + 'taxes', + ), + ) ); + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } + + // Bump the priority + ++$priority; + } + + // Return reports array + return $reports; + } + + /** + * Registers the core endpoint views. + * + * @since 3.0 + * + * @param Data\Report_Registry $reports Reports registry instance. + */ + private function register_core_endpoint_views( $reports ) { + $views = Data\Endpoint_View_Registry::instance(); + $core_views = $views->get_core_views(); + + try { + foreach ( $core_views as $view_id => $atts ) { + $views->register_endpoint_view( $view_id, $atts ); + } + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } + + return $reports; + } + + +} diff --git a/includes/reports/class-registry.php b/includes/reports/class-registry.php new file mode 100644 index 00000000000..a56267e01ae --- /dev/null +++ b/includes/reports/class-registry.php @@ -0,0 +1,102 @@ + $value ) { + if ( in_array( $attribute, $skip, true ) ) { + continue; + } + + if ( empty( $value ) ) { + throw Reports_Exceptions\Invalid_Parameter::from( $attribute, __METHOD__, $item_id ); + } + } + } + + /** + * Retrieves all registered items with a given sorting scheme. + * + * @since 3.0 + * + * @param string $sort Optional. How to sort the list of registered items before retrieval. + * Accepts 'priority' or 'ID' (alphabetized by item ID), or empty (none). + * Default empty. + * @return array An array of all registered items, sorted if `$sort` is not empty. + */ + public function get_items_sorted( $sort = '' ) { + // If sorting, handle it before retrieval from the ArrayObject. + switch( $sort ) { + case 'ID': + parent::ksort(); + break; + + case 'priority': + parent::uasort( array( $this, 'priority_sort' ) ); + break; + + default: break; + } + + return parent::get_items(); + } + + /** + * Sorting helper to sort items by priority. + * + * @since 3.0 + * + * @param array $a Item A. + * @param array $b Item B + * @return int Zero (0) if `$a` equals `$b`. Minus one (-1) if `$a` is less than `$b`, otherwise one (1). + */ + public function priority_sort( $a, $b ) { + if ( $a['priority'] == $b['priority'] ) { + return 0; + } + + return ( $a['priority'] < $b['priority'] ) ? -1 : 1; + } + +} diff --git a/includes/reports/data/charts/v2/class-bar-dataset.php b/includes/reports/data/charts/v2/class-bar-dataset.php new file mode 100644 index 00000000000..1fdce8e1031 --- /dev/null +++ b/includes/reports/data/charts/v2/class-bar-dataset.php @@ -0,0 +1,34 @@ +setup_error_logger(); + + $this->set_id( $dataset_id ); + $this->set_endpoint( $endpoint ); + $this->validate( $options ); + } + + /** + * Retrieves the dataset ID. + * + * @since 3.0 + * + * @return string Dataset ID. + */ + public function get_id() { + return $this->dataset_id; + } + + /** + * Sets the dataset ID. + * + * @since 3.0 + * + * @param string $dataset_id Dataset ID + */ + private function set_id( $dataset_id ) { + $this->dataset_id = sanitize_key( $dataset_id ); + } + + /** + * Sets the chart endpoint object. + * + * @since 3.0 + * + * @param EDD\Reports\Data\Chart_Endpoint $endpoint Chart_Endpoint object. + */ + private function set_endpoint( $endpoint ) { + $this->endpoint = $endpoint; + } + + /** + * Retrieves the raw dataset options. + * + * @since 3.0 + * + * @return array Dataset options (raw). + */ + public function get_options() { + return $this->options; + } + + /** + * Retrieves the chart endpoint object for this dataset. + * + * @since 3.0 + * + * @return Chart_Endpoint Chart endpoint. + */ + public function get_endpoint() { + return $this->endpoint; + } + + /** + * Retrieves the list of local fields. + * + * @since 3.0 + * + * @return array List of local fields. + */ + public function get_fields() { + return $this->fields; + } + + /** + * Retrieves the list of global fields. + * + * @since 3.0 + * + * @return array List of global fields. + */ + public function get_global_fields() { + return $this->global_fields; + } + + /** + * Retrieves the list of fields for the current dataset. + * + * Includes the global fields. + * + * @since 3.0 + * + * @return array List of fields available to the dataset. + */ + public function get_all_fields() { + $fields = array_merge( $this->get_global_fields(), $this->get_fields() ); + + /** + * Filters the fields available to a ChartJS graph. + * + * @since 3.0 + * + * @param array $fields ChartJS fields (global and local). + * @param Dataset $this Dataset instance. + */ + return apply_filters( 'edd_reports_chart_fields', $fields, $this ); + } + + /** + * Attempts to retrieve data associated with the current dataset. + * + * @since 3.0 + * + * @return mixed Data associated with the current dataset. + */ + public function get_data() { + return $this->get_endpoint()->get_data_by_set( $this->get_id() ); + } + + /** + * Performs validation on incoming dataset options. + * + * @since 3.0 + * + * @param array $options Dataset options. + */ + public function validate( $options ) { + $fields = $this->get_all_fields(); + + // Strip invalid options. + foreach ( $options as $key => $value ) { + if ( ! in_array( $key, $fields, true ) ) { + unset( $options[ $key ] ); + } + } + + $data = $this->get_data(); + $processed = array(); + + if ( ! empty( $data ) ) { + + $options['data'] = $this->parse_data_for_output( $data ); + + $this->options = $options; + + } else { + + $message = sprintf( 'The data for the \'%1$s\' dataset for the \'%2$s\' endpoint in the \'%3$s\' report is missing or invalid.', + $this->get_id(), + $this->get_endpoint()->get_id(), + $this->get_endpoint()->get_report_id() + ); + + $this->errors->add( 'missing_chart_data', $message, $data ); + } + } + + /** + * Parses the dataset data for output via JS. + * + * @since 3.0 + * + * @param array $data Dataset data. + * @return array Processed data. + */ + public function parse_data_for_output( $data ) { + + if ( $this instanceof Pie_Dataset ) { + + $processed = $data; + + } else { + + foreach ( $data as $key => $values ) { + if ( is_array( $values ) && isset( $values[1] ) ) { + $processed[ $key ] = array( + 'x' => $this->adjust_time_string( $values[0] ), + 'y' => $values[1], + ); + } else { + $processed[ $key ] = array( + 'x' => $this->adjust_time_string( $values ), + ); + } + } + } + + return $processed; + } + + /** + * Given a date as a string or numeric timestamp, adjust it for a specific timezone. + * + * This allows the points on the graph to line up with the ticks, which are already adjusted. + * + * @since 3.1 + * + * @param string|int $time_string The time string to possibly adjust. + * + * @return string If a timestamp, it's adjusted for the timezone of the store. + */ + private function adjust_time_string( $time_string ) { + if ( is_numeric( $time_string ) ) { + $timezone = new \DateTimeZone( edd_get_timezone_id() ); + $date_on_chart = new \DateTime( '@' . $time_string ); + + $time_string = $date_on_chart->setTimeZone( $timezone )->format( 'Y-m-d H:i:s' ); + } + + return $time_string; + } + + /** + * Determines whether the dataset has generated errors during instantiation. + * + * @since 3.0 + * + * @return bool True if errors have been logged, otherwise false. + */ + public function has_errors() { + if ( method_exists( $this->errors, 'has_errors' ) ) { + return $this->errors->has_errors(); + } else { + $errors = $this->errors->get_error_codes(); + + return ! empty( $errors ); + } + } + + /** + * Retrieves any logged errors for the dataset. + * + * @since 3.0 + * + * @return \WP_Error WP_Error object for the current dataset. + */ + public function get_errors() { + return $this->errors; + } + + /** + * Sets up the WP_Error instance. + * + * @since 3.0 + */ + public function setup_error_logger() { + if ( ! isset( $this->errors ) ) { + $this->errors = new \WP_Error(); + } + } + +} diff --git a/includes/reports/data/charts/v2/class-line-dataset.php b/includes/reports/data/charts/v2/class-line-dataset.php new file mode 100644 index 00000000000..3c05bfff09c --- /dev/null +++ b/includes/reports/data/charts/v2/class-line-dataset.php @@ -0,0 +1,39 @@ +setup_error_logger(); + $this->set_type( $endpoint->get_type() ); + $this->set_endpoint( $endpoint ); + + $options = $endpoint->get_options(); + + if ( $this->is_pie_manifest() && ! empty( $options['labels'] ) ) { + $this->set_labels( $options['labels'] ); + + unset( $options['labels'] ); + } + + $this->set_options( $options ); + } + + /** + * Retrieves the chart type. + * + * @since 3.0 + * + * @return string Chart type. + */ + public function get_type() { + return $this->type; + } + + /** + * Sets the chart type for the manifest. + * + * @since 3.0 + * + * @param string $type Chart type to be manifested. + */ + private function set_type( $type ) { + $this->type = sanitize_key( $type ); + } + + /** + * Retrieves the chart endpoint object for this manifest. + * + * @since 3.0 + * + * @return Chart_Endpoint Chart endpoint. + */ + public function get_endpoint() { + return $this->endpoint; + } + + /** + * Sets the chart endpoint object. + * + * @since 3.0 + * + * @param EDD\Reports\Data\Chart_Endpoint $endpoint Chart_Endpoint object. + */ + private function set_endpoint( $endpoint ) { + $this->endpoint = $endpoint; + } + + /** + * Stores the unfiltered chart options for later access. + * + * @since 3.0 + * + * @param array $options Chart options and datasets. + */ + private function set_options( $options ) { + if ( ! empty( $options['datasets'] ) && is_array( $options['datasets'] ) ) { + + foreach ( $options['datasets'] as $id => $data ) { + $this->add_dataset( $id, $data ); + } + + } else { + + $message = sprintf( 'The %s endpoint has no datasets.', $this->get_endpoint()->get_id() ); + + $this->errors->add( 'missing_chart_datasets', $message, $this->get_endpoint() ); + + } + + unset( $options['datasets'] ); + + $this->options = $options; + } + + /** + * Retrieves parsed options for the chart manifest. + * + * @since 3.0 + * + * @return array Chart options. + */ + public function get_options() { + return $this->options; + } + + /** + * Retrieves the manifest datasets. + * + * @since 3.0 + * + * @return Dataset[] Datasets for this chart if any are defined, otherwise an empty array. + */ + public function get_datasets() { + return $this->datasets; + } + + /** + * Determines whether the current chart manifest contains any datasets. + * + * @since 3.0 + * + * @return bool True if there are datasets, otherwise false. + */ + public function has_datasets() { + $datasets = $this->get_datasets(); + + return ! empty( $datasets ); + } + + /** + * Sets the labels property (for pie and doughnut charts). + * + * @since 3.0 + * + * @param array $labels Array of pie or doughnut chart labels. + */ + private function set_labels( $labels ) { + $this->labels = $labels; + } + + /** + * Retrieves the manifest labels (for pie and doughnut charts). + * + * @since 3.0 + */ + public function get_labels() { + return $this->labels; + } + + /** + * Determines whether the current chart manifest contains any labels (for pie and doughnut charts). + * + * @since 3.0 + * + * @return bool True if there are labels, otherwise false. + */ + public function has_labels() { + $labels = $this->get_labels(); + + return ! empty( $labels ); + } + + /** + * Adds a dataset. + * + * @since 3.0 + * + * @param string $dataset_id ID to associate the dataset with. + * @param array $options Dataset options. + * @return bool True if the dataset was added, otherwise false. + */ + public function add_dataset( $dataset_id, $options ) { + $handler = $this->get_dataset_handler(); + + if ( ! empty( $handler ) && class_exists( $handler ) ) { + /** @var Dataset $dataset */ + $dataset = new $handler( $dataset_id, $this->get_endpoint(), $options ); + + if ( ! $dataset->has_errors() ) { + + $this->datasets[ $dataset_id ] = $dataset; + + + return true; + + } else { + + $this->errors->add( 'dataset_errors_passthrough', 'Errors have been passed through from dataset parsing.', $dataset->get_errors() ); + + } + + } + + return false; + } + + /** + * Retrieves the handler class for the current dataset type. + * + * @since 3.0 + * + * @return string Dataset handler class. + */ + public function get_dataset_handler() { + $handler = ''; + + switch( $this->get_type() ) { + + case 'doughnut': + case 'pie': + $handler = 'EDD\Reports\Data\Charts\v2\Pie_Dataset'; + break; + + case 'bar': + $handler = 'EDD\Reports\Data\Charts\v2\Bar_Dataset'; + break; + + case 'line': + $handler = 'EDD\Reports\Data\Charts\v2\Line_Dataset'; + break; + + + } + + return $handler; + } + + /** + * Generate the name of an element used to reference a rendered chart. + * + * @since 3.0 + * + * @return string + */ + public function get_target_el() { + $endpoint = $this->get_endpoint(); + $default = "edd_reports_graph_{$endpoint->get_id()}"; + + return $endpoint->get_display_arg( 'target', $default ); + } + + /** + * Renders the manifest in JS form. + * + * @since 3.0 + */ + public function render() { + // Render a element to inject the chart in to. + printf( + '
    ', + esc_attr( $this->get_type() ), + esc_attr( $this->get_target_el() ) + ); + + // Enqueue script and configuration to render the chart. + wp_enqueue_script( 'edd-admin-reports' ); + + wp_add_inline_script( + 'edd-admin-reports', + sprintf( 'window.edd.renderChart(%s)', wp_json_encode( $this->build_config() ) ) + ); + } + + /** + * Builds the chart config. + * + * @since 3.0 + * + * @return object Config object. + */ + public function build_config() { + $config = new \stdClass(); + + // Dates. + $dates = Reports\get_dates_filter( 'objects' ); + $day_by_day = Reports\get_dates_filter_day_by_day(); + $hour_by_hour = Reports\get_dates_filter_hour_by_hour(); + + // Adjust end date forward by 1 second to push into the next day (for ChartJS display purposes). + $dates['end']->addSeconds( 1 ); + + // Get the timezone ID for parsing. + $timezone = edd_get_timezone_id(); + + // Apply UTC offset. + $dates['start']->setTimezone( $timezone ); + $dates['end']->setTimezone( $timezone ); + + $time_format = 'MMM YYYY'; + + if ( $hour_by_hour ) { + $time_format = 'hA'; + } else if ( $day_by_day ) { + $time_format = 'MMM D'; + } + + $config->type = $this->get_type(); + $config->data = $this->get_chart_data(); + $config->options = $this->get_chart_options(); + $config->target = $this->get_target_el(); + $config->dates = array_merge( + $dates, + array( + 'hour_by_hour' => $hour_by_hour, + 'day_by_day' => $day_by_day, + 'utc_offset' => esc_js( EDD()->utils->get_gmt_offset() / HOUR_IN_SECONDS ), + 'timezone' => $timezone, + 'time_format' => $time_format, + ) + ); + + return $config; + } + + /** + * Retrieves the parsed chart datasets as an object. + * + * @since 3.0 + * + * @return array Parsed chart data. + */ + public function get_chart_data() { + $data = array(); + + if ( $this->has_datasets() ) { + $datasets = $this->get_datasets(); + + $data['datasets'] = array(); + + foreach ( $datasets as $id => $set ) { + if ( $set->has_errors() ) { + continue; + } + + $data['datasets'][] = $set->get_options(); + } + } + + if ( $this->is_pie_manifest() ) { + $data['labels'] = $this->get_labels(); + } + + return $data; + } + + /** + * Retrieves the parsed chart options as an object. + * + * @since 3.0 + * + * @return array Parsed chart options. + */ + public function get_chart_options() { + $endpoint_options = $this->get_endpoint()->get_options(); + + if ( $this->is_pie_manifest() ) { + $defaults = array( + 'animation' => array( + 'duration' => 0, + ), + 'responsive' => true, + 'legend' => array( + 'position' => 'left', + ), + ); + } else { + $day_by_day = Reports\get_dates_filter_day_by_day(); + $hour_by_hour = Reports\get_dates_filter_hour_by_hour(); + + $time_unit = 'month'; + $time_format = 'MMM YYYY'; + + if ( $hour_by_hour ) { + $time_unit = 'hour'; + $time_format = 'hA'; + } else if ( $day_by_day ) { + $time_unit = 'day'; + $time_format = 'MMM D'; + } + + $defaults = array( + 'animation' => array( + 'duration' => 0, + ), + 'responsive' => true, + 'hoverMode' => 'index', + 'stacked' => false, + 'title' => array( + 'display' => $this->get_endpoint()->get_label() && $this->get_endpoint()->get( 'show_chart_title' ), + 'text' => $this->get_endpoint()->get_label(), + ), + 'scales' => array( + 'xAxes' => array(), + 'yAxes' => array(), + ), + ); + + $default_xAxes = array( + array( + 'type' => 'time', + 'display' => true, + 'ticks' => array( + 'source' => 'auto', + 'maxRotation' => 0, + ), + 'position' => 'bottom', + 'time' => array( + 'unit' => $time_unit, + 'tooltipFormat' => $time_format, + ), + ), + ); + + $default_yAxes = array( + array( + 'type' => 'linear', + 'display' => true, + 'position' => 'left', + 'ticks' => array( + 'formattingType' => 'format', + 'beginAtZero' => true, + 'suggestedMin' => 0, + ), + ), + ); + + // Check if specific axes are missing from the endpoint options and load them from defaults. + foreach ( array( 'xAxes', 'yAxes' ) as $axes_name) { + if ( empty( $endpoint_options['scales'][ $axes_name ] ) ) { + $endpoint_options['scales'][ $axes_name ] = ${ "default_{$axes_name}" }; + } + } + + } + + return array_merge( $defaults, $endpoint_options ); + } + + /** + * Determines whether the chart manifest is for a pie or doughnut chart. + * + * @since 3.0 + * + * @return bool True if the manifest is for a pie or doughnut chart, otherwise false. + */ + public function is_pie_manifest() { + return in_array( $this->get_type(), array( 'pie', 'doughnut' ), true ); + } + + /** + * Determines whether the dataset has generated errors during instantiation. + * + * @since 3.0 + * + * @return bool True if errors have been logged, otherwise false. + */ + public function has_errors() { + if ( method_exists( $this->errors, 'has_errors' ) ) { + return $this->errors->has_errors(); + } else { + $errors = $this->errors->get_error_codes(); + + return ! empty( $errors ); + } + } + + /** + * Retrieves any logged errors for the dataset. + * + * @since 3.0 + * + * @return \WP_Error WP_Error object for the current dataset. + */ + public function get_errors() { + return $this->errors; + } + + /** + * Sets up the WP_Error instance. + * + * @since 3.0 + */ + public function setup_error_logger() { + if ( ! isset( $this->errors ) ) { + $this->errors = new \WP_Error(); + } + } + +} diff --git a/includes/reports/data/charts/v2/class-pie-dataset.php b/includes/reports/data/charts/v2/class-pie-dataset.php new file mode 100644 index 00000000000..e1f1d557dfe --- /dev/null +++ b/includes/reports/data/charts/v2/class-pie-dataset.php @@ -0,0 +1,34 @@ +setup_error_logger(); + $this->set_props( $args ); + } + + /** + * Sets props for the object. + * + * @since 3.0 + * + * @param array $attributes Object attributes. + */ + public function set_props( $attributes ) { + if ( ! empty( $attributes['id'] ) ) { + + $this->set_id( $attributes['id'] ); + + } else { + + $this->errors->add( 'missing_object_id', 'The object ID is missing.', $attributes ); + + } + + if ( ! empty( $attributes['label'] ) ) { + + $this->set_label( $attributes['label'] ); + + } else { + + $this->errors->add( 'missing_object_label', 'The object label is missing.', $attributes ); + + } + } + + /** + * Retrieves the object ID. + * + * @since 3.0 + * + * @return string Object ID. + */ + public function get_id() { + return $this->object_id; + } + + /** + * Sets the object ID. + * + * @since 3.0 + * + * @param string $object_id Object ID + * @return void + */ + private function set_id( $object_id ) { + $this->object_id = sanitize_key( $object_id ); + } + + /** + * Retrieves the global label for the current object. + * + * @since 3.0 + * + * @return string Object label string. + */ + public function get_label() { + return $this->label; + } + + /** + * Sets the object label. + * + * @since 3.0 + * + * @param string $label Object label. + * @return void + */ + private function set_label( $label ) { + $this->label = $label; + } + + /** + * Renders the object via its display callback. + * + * Each sub-class must define its own display() method. + * + * @since 3.0 + */ + abstract public function display(); + + /** + * Determines whether the object has generated errors during instantiation. + * + * @since 3.0 + * + * @return bool True if errors have been logged, otherwise false. + */ + public function has_errors() { + if ( method_exists( $this->errors, 'has_errors' ) ) { + return $this->errors->has_errors(); + } else { + $errors = $this->errors->get_error_codes(); + + return ! empty( $errors ); + } + } + + /** + * Retrieves any logged errors for the object. + * + * @since 3.0 + * + * @return \WP_Error WP_Error object for the current object. + */ + public function get_errors() { + return $this->errors; + } + + /** + * Sets up the WP_Error instance for logging errors. + * + * @since 3.0 + */ + public function setup_error_logger() { + if ( ! isset( $this->errors ) ) { + $this->errors = new \WP_Error(); + } + } + +} diff --git a/includes/reports/data/class-chart-endpoint.php b/includes/reports/data/class-chart-endpoint.php new file mode 100644 index 00000000000..49726672809 --- /dev/null +++ b/includes/reports/data/class-chart-endpoint.php @@ -0,0 +1,275 @@ +errors = new \WP_Error(); + + // ID and Label. + $this->set_props( $args ); + + $args = $this->parse_display_props( $args ); + + // Common values set last to account for overrides. + parent::__construct( $args ); + + // Chart props. + $this->setup_chart( $args ); + + } + + /** + * Sets up the chart props needed for rendering. + * + * @since 3.0 + * + * @param array $atts Endpoint attributes. + */ + private function setup_chart( $atts ) { + $view_type = $this->get_view(); + + if ( ! empty( $atts['views'][ $view_type ] ) ) { + + $view_atts = $atts['views'][ $view_type ]; + + if ( ! empty( $view_atts['type'] ) ) { + $this->set_type( $view_atts['type'] ); + } else { + $this->errors->add( + 'missing_chart_type', + sprintf( 'The chart type for \'%1$s\' endpoint is missing.', $this->get_id() ) + ); + } + + if ( ! empty( $view_atts['options'] ) ) { + $this->set_options( $view_atts['options'] ); + } else { + $this->errors->add( + 'missing_chart_options', + sprintf( 'The chart options for the \'%1$s\' endpoint is missing.', $this->get_id() ) + ); + } + + if ( isset( $view_atts['render_js'] ) && is_callable( $view_atts['render_js'] ) ) { + $this->js_callback = $atts['render_js']; + } + + } + + if ( null === $this->js_callback ) { + // Due to the parent constructor firing last, make sure the report gets set for the benefit of the manifest. + if ( ! empty( $atts['report'] ) ) { + parent::set_report_id( $atts['report'] ); + } + + $this->build_manifest(); + } + + } + + /** + * Sets display-related properties for the Endpoint. + * + * @since 3.0 + * + * @param array $atts Endpoint attributes. + */ + private function parse_display_props( $atts ) { + + $view_type = $this->get_view(); + + if ( ! empty( $atts['views'][ $view_type ] ) ) { + + $atts['views'][ $view_type ] = $this->maybe_convert_callbacks_to_methods( $atts['views'][ $view_type ] ); + + } + + return $atts; + } + + /** + * Retrieves the graphing library options set for the current endpoint. + * + * @since 3.0 + * + * @return array Options set for the current graph endpoint. + */ + public function get_options() { + return $this->options; + } + + /** + * Sets options for displaying the graph. + * + * @since 3.0 + * + * @param array $options Options for displaying the graph via the graphing library. + */ + protected function set_options( $options ) { + $this->options = $options; + } + + /** + * Retrieves the value of a graph option if set. + * + * @since 3.0 + * + * @param string $key Option key to retrieve a value for. + * @return mixed Value of the option key if set, otherwise an empty string. + */ + public function get( $key ) { + if ( isset( $this->options[ $key ] ) ) { + $value = $this->options[ $key ]; + } else { + $value = ''; + } + + return $value; + } + + /** + * Retrieves the chart type. + * + * @since 3.0 + * + * @return string Chart type. + */ + public function get_type() { + return $this->type; + } + + /** + * Sets the chart type. + * + * @since 3.0 + * + * @param string $type Chart type to set. + */ + private function set_type( $type ) { + $this->type = sanitize_key( $type ); + } + + /** + * Retrieves the manifest instance. + * + * @since 3.0 + * + * @return Chart\Manifest Chart manifest. + */ + public function get_manifest() { + return $this->manifest; + } + + /** + * Instantiates the manifest based on chart type and options. + * + * @since 3.0 + */ + private function build_manifest() { + $this->manifest = new Chart\Manifest( $this ); + } + + /** + * Retrieves a specific axis' data if set. + * + * @since 3.0 + * + * @param string $set Dataset to retrieve corresponding data for. + * @return array Data corresponding to `$set` if it's set, otherwise an empty array. + */ + public function get_data_by_set( $set ) { + $data = $this->get_data(); + + if ( isset( $data[ $set ] ) ) { + return $data[ $set ]; + } else { + return array(); + } + } + + /** + * Builds and outputs the graph JS to the page. + * + * @since 3.0 + */ + public function display() { + // JS callback override. + if ( is_callable( $this->js_callback ) ) { + call_user_func( $this->js_callback, $this->get_display_args() ); + + return; + } + + // Start parsing the manifest for output as JS. + $manifest = $this->get_manifest(); + + $manifest->render(); + } + +} diff --git a/includes/reports/data/class-endpoint-registry.php b/includes/reports/data/class-endpoint-registry.php new file mode 100644 index 00000000000..0570276ce56 --- /dev/null +++ b/includes/reports/data/class-endpoint-registry.php @@ -0,0 +1,314 @@ +get_items_sorted( $endpoint_id_or_sort ); + } + } + + /** + * Registers a new data endpoint to the master registry. + * + * @since 3.0 + * + * @throws \EDD_Exception if the endpoint could not be validated. + * + * @param string $endpoint_id Reports data endpoint ID. + * @param array $attributes { + * Endpoint attributes. All arguments are required unless otherwise noted. + * + * @type string $label Endpoint label. + * @type int $priority Optional. Priority by which to retrieve the endpoint. Default 10. + * @type array $views { + * Array of view handlers by type. + * + * @type array $view_type { + * View type slug, with array beneath it. + * + * @type callable $data_callback Callback used to retrieve data for the view. + * @type callable $display_callback Callback used to render the view. + * @type array $display_args Optional. Array of arguments to pass to the + * display_callback (if any). Default empty array. + * } + * } + * } + * @return bool True if the endpoint was successfully registered, otherwise false. + */ + public function register_endpoint( $endpoint_id, $attributes ) { + + $defaults = array( + 'label' => '', + 'priority' => 10, + 'views' => array(), + ); + + $attributes = array_merge( $defaults, $attributes ); + + $attributes['id'] = $endpoint_id; + $attributes['views'] = Reports\parse_endpoint_views( $attributes['views'] ); + + // Bail if this endpoint ID is already registered. + if ( $this->offsetExists( $endpoint_id ) ) { + $message = sprintf( 'The \'%1$s\' endpoint already exists and cannot be registered.', $endpoint_id ); + + throw new Utils\Exception( $message ); + } + + try { + $valid = $this->validate_endpoint( $endpoint_id, $attributes ); + } catch ( \EDD_Exception $exception ) { + throw $exception; + } + + if ( false === $valid ) { + return false; + } else { + try { + $return_value = parent::add_item( $endpoint_id, $attributes ); + } catch ( \EDD_Exception $exception ) { + throw $exception; + } + return $return_value; + } + } + + /** + * Validates the endpoint attributes. + * + * @since 3.0 + * + * @throws \EDD_Exception if the `$label` or `$views` attributes are empty. + * @throws \EDD_Exception if any of the `$views` sub-attributes are empty, except `$filters`. + * + * @param string $endpoint_id Reports data endpoint ID. + * @param array $attributes Endpoint attributes. See register_endpoint() for full accepted attributes. + * @return bool True if the endpoint is considered 'valid', otherwise false. + */ + public function validate_endpoint( $endpoint_id, $attributes ) { + $is_valid = true; + + try { + + $this->validate_attributes( $attributes, $endpoint_id ); + + try { + $this->validate_views( $attributes['views'], $endpoint_id ); + + } catch( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + + $is_valid = false; + + throw $exception; + } + + } catch( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + + $is_valid = false; + + throw $exception; + } + + return $is_valid; + } + + /** + * Builds an endpoint object from a registry entry. + * + * @since 3.0 + * + * @param string|Endpoint $endpoint Endpoint ID or object. + * @param string $view_type View type to use when building the object. + * @param string $report Optional. Report ID. Default null. + * @return Endpoint|\WP_Error Endpoint object on success, otherwise a WP_Error object. + */ + public function build_endpoint( $endpoint, $view_type, $report = null ) { + + // If an endpoint object was passed, just return it. + if ( $endpoint instanceof Endpoint ) { + return $endpoint; + } + + try { + $_endpoint = $this->get_endpoint( $endpoint ); + + } catch( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + + return new \WP_Error( 'invalid_endpoint', $exception->getMessage(), $endpoint ); + } + + if ( ! empty( $_endpoint ) ) { + + if ( Reports\validate_endpoint_view( $view_type ) ) { + $_endpoint['report'] = $report; + + $handler = Reports\get_endpoint_handler( $view_type ); + + if ( ! empty( $handler ) && class_exists( $handler ) ) { + $_endpoint = new $handler( $_endpoint ); + + } else { + $_endpoint = new \WP_Error( + 'invalid_handler', + sprintf( 'The handler for the \'%1$s\' view is invalid.', $view_type ), + $handler + ); + } + + } else { + $_endpoint = new \WP_Error( + 'invalid_view', + sprintf( 'The \'%1$s\' view is invalid.', $view_type ) + ); + } + } + + return $_endpoint; + } + + /** + * Validates view properties for an incoming endpoint. + * + * @since 3.0 + * + * @throws \EDD_Exception if the view attributes is empty or it's not a valid view. + * + * @param array $views List of attributes to check. + * @param string $endpoint_id Endpoint ID. + * @return void + */ + public function validate_views( $views, $endpoint_id ) { + $valid_views = Reports\get_endpoint_views(); + + $this->validate_attributes( $views, $endpoint_id ); + + foreach ( $views as $view => $attributes ) { + if ( array_key_exists( $view, $valid_views ) ) { + if ( ! empty( $valid_views[ $view ]['allow_empty'] ) ) { + $skip = $valid_views[ $view ]['allow_empty']; + } else { + $skip = array(); + } + + // View atts have already been parsed at this point, just validate them. + $this->validate_view_attributes( $attributes, $view, $skip ); + } else { + throw Reports_Exceptions\Invalid_View::from( $view, __METHOD__, $endpoint_id ); + } + } + } + + /** + * Validates a list of endpoint view attributes. + * + * @since 3.0 + * + * @throws \EDD_Exception if a required view attribute is empty. + * + * @param array $attributes List of view attributes to check for emptiness. + * @param string $view View slug. + * @param array $skip Optional. List of view attributes to skip validating. + * Default empty array. + * @return void + */ + public function validate_view_attributes( $attributes, $view, $skip = array() ) { + foreach ( $attributes as $attribute => $value ) { + if ( in_array( $attribute, $skip, true ) ) { + continue; + } + + if ( empty( $value ) ) { + throw Reports_Exceptions\Invalid_View_Parameter::from( $attribute, __METHOD__, $view ); + } + } + } +} diff --git a/includes/reports/data/class-endpoint-view-registry.php b/includes/reports/data/class-endpoint-view-registry.php new file mode 100644 index 00000000000..89febf08da3 --- /dev/null +++ b/includes/reports/data/class-endpoint-view-registry.php @@ -0,0 +1,242 @@ +get_core_view( $view_id ); + + if ( empty( $view_atts ) ) { + throw new Utils\Exception( sprintf( 'The \'%1$s\' endpoint view is invalid.', $view_id ) ); + } + + if ( ! empty( $attributes['group_callback'] ) ) { + $view_atts['group_callback'] = $attributes['group_callback']; + } + + if ( ! empty( $attributes['handler'] ) ) { + $view_atts['handler'] = $attributes['handler']; + } + + if ( ! empty( $attributes['fields']['display_callback'] ) ) { + $view_atts['fields']['display_callback'] = $attributes['fields']['display_callback']; + } + + try { + $this->validate_attributes( $view_atts, $view_id ); + } catch ( \EDD_Exception $exception ) { + $error = true; + + throw $exception; + } + + if ( true === $error ) { + return false; + + } else { + return parent::add_item( $view_id, $view_atts ); + } + } + + /** + * Retrieves registered endpoint views. + * + * @since 3.0 + * + * @return array Endpoint view records. + */ + public function get_endpoint_views() { + return $this->get_items_sorted( 'ID' ); + } + + /** + * Prevents removing items from the registry. + * + * @since 3.0 + * + * @param string $item_id Item ID. + */ + public function remove_item( $item_id ) { + return; + } + + /** + * Prevents removing items from the registry. + * + * @since 3.0 + * + * @param mixed $key Item index to check. + */ + #[\ReturnTypeWillChange] + public function offsetUnset( $key ) {} + + /** + * Retrieves the core-defined views and their (mostly) immutable defaults. + * + * @since 3.0 + * + * @param string $view_id View ID. + * @return array List of attributes for the given view ID if it exists, otherwise an empty array. + */ + public function get_core_view( $view_id ) { + $views = $this->get_core_views(); + + $attributes = array(); + + if ( array_key_exists( $view_id, $views ) ) { + $attributes = $views[ $view_id ]; + } + + return $attributes; + } + + /** + * Retrieves the core-defined views and their (mostly) immutable defaults. + * + * @since 3.0 + * + * @return array List of supported endpoint types and their attributes. + */ + public function get_core_views() { + return array( + 'tile' => array( + 'group' => 'tiles', + 'group_callback' => 'EDD\Reports\default_display_tiles_group', + 'handler' => 'EDD\Reports\Data\Tile_Endpoint', + 'fields' => array( + 'data_callback' => '::get_data', + 'display_callback' => 'EDD\Reports\default_display_tile', + 'display_args' => array( + 'type' => '', + 'context' => 'primary', + 'comparison_label' => __( 'All time', 'easy-digital-downloads' ), + ), + ), + ), + 'chart' => array( + 'group' => 'charts', + 'group_callback' => 'EDD\Reports\default_display_charts_group', + 'handler' => 'EDD\Reports\Data\Chart_Endpoint', + 'fields' => array( + 'type' => 'line', + 'options' => array(), + 'data_callback' => '::get_data', + 'display_callback' => '::display', + 'display_args' => array( + 'colors' => 'core', + ), + ), + ), + 'table' => array( + 'group' => 'tables', + 'group_callback' => 'EDD\Reports\default_display_tables_group', + 'handler' => 'EDD\Reports\Data\Table_Endpoint', + 'fields' => array( + 'data_callback' => '::prepare_items', + 'display_callback' => '::display', + 'display_args' => array( + 'class_name' => '', + 'class_file' => '', + ), + ), + ), + ); + } +} diff --git a/includes/reports/data/class-endpoint.php b/includes/reports/data/class-endpoint.php new file mode 100644 index 00000000000..dc3eaff40e0 --- /dev/null +++ b/includes/reports/data/class-endpoint.php @@ -0,0 +1,460 @@ +check_view(); + + if ( ! empty( $args['report'] ) ) { + $this->set_report_id( $args['report'] ); + } + + $this->set_display_props( $args ); + } + + /** + * Displays the endpoint based on the view (type). + * + * @since 3.0 + * + * @return void + */ + public function display() { + $callback = $this->get_display_callback(); + + if ( is_callable( $callback ) ) { + call_user_func_array( $callback, array( + $this, // Endpoint + $this->get_data(), // Data + $this->get_display_args(), // Args + ) ); + } + } + + /** + * Retrieves the data for the endpoint view (type). + * + * @since 3.0 + * + * @return mixed Endpoint data. + */ + public function get_data() { + $data_callback = $this->get_data_callback(); + + if ( is_callable( $data_callback ) ) { + $data = call_user_func( $data_callback ); + } else { + $data = ''; + } + + /** + * Filters data for the current endpoint. + * + * @since 3.0 + * + * @param mixed|string $data Endpoint data. + * @param Endpoint $this Endpoint object. + */ + return apply_filters( 'edd_reports_endpoint_data', $data, $this ); + } + + /** + * Retrieves the endpoint view (type). + * + * @since 3.0 + * + * @return string Endpoint view. + */ + public function get_view() { + return $this->view; + } + + /** + * Checks the endpoint view (type) against the list of available views.. + * + * @since 3.0 + * + * @param string $view_type Endpoint type. + */ + protected function check_view() { + $views = Reports\get_endpoint_views(); + + if ( ! array_key_exists( $this->get_view(), $views ) ) { + $this->errors->add( + 'invalid_view', + sprintf( 'The \'%1$s\' view is invalid.', $this->get_view() ), + $this + ); + } + } + + /** + * Retrieves the ID of the report currently associated with the endpoint. + * + * @since 3.0 + * + * @return string|null Report ID if set, otherwise null. + */ + public function get_report_id() { + return $this->report_id; + } + + /** + * Sets the ID for the report currently associated with the endpoint at the point of render. + * + * @since 3.0 + * + * @param string $report Report ID. + */ + protected function set_report_id( $report ) { + $this->report_id = $report; + } + + /** + * Sets display-related properties for the Endpoint. + * + * @since 3.0 + * + * @param array $endpoint Endpoint record from the registry. + */ + protected function set_display_props( $endpoint ) { + + $view_type = $this->get_view(); + + if ( ! empty( $endpoint['views'][ $view_type ] ) ) { + + $view_atts = $endpoint['views'][ $view_type ]; + + // display_args is optional. + if ( ! empty( $view_atts['display_args'] ) ) { + $this->set_display_args( $view_atts['display_args'] ); + } + + // display_callback + if ( ! empty( $view_atts['display_callback'] ) ) { + $this->set_display_callback( $view_atts['display_callback'] ); + } else { + $this->flag_missing_view_arg( 'display_callback' ); + } + + // data_callback + if ( ! empty( $view_atts['data_callback'] ) ) { + $this->set_data_callback( $view_atts['data_callback'] ); + } else { + $this->flag_missing_view_arg( 'data_callback' ); + } + + } else { + + $message = sprintf( 'The \'%1$s\' view type is not defined for the \'%2$s\' endpoint.', + $view_type, + $this->get_id() + ); + + $this->errors->add( 'view_not_defined', $message, array( + 'view_type' => $view_type, + 'endpoint_id' => $this->get_id(), + ) ); + + } + } + + /** + * Retrieves the value of a given display argument if set. + * + * @since 3.0 + * + * @param string $key Display argument key. + * @param string $default Optional. Default value to return in the event the argument isn't set. + * Default empty string. + * @return mixed|string Value of the display argument if set, otherwise an empty string. + */ + public function get_display_arg( $key, $default = '' ) { + $display_args = $this->get_display_args(); + + if ( isset( $display_args[ $key ] ) ) { + $value = $display_args[ $key ]; + } else { + $value = $default; + } + + return $value; + } + + /** + * Retrieves the display arguments for the view (type). + * + * @since 3.0 + * + * @return array Display arguments. + */ + public function get_display_args() { + /** + * Filters the display arguments for the current endpoint. + * + * @since 3.0 + * + * @param array $display_args Display arguments. + * @param Endpoint $this Endpoint object. + */ + return apply_filters( 'edd_reports_endpoint_display_args', $this->display_args, $this ); + } + + /** + * Validates and sets the display_args prop. + * + * @since 3.0 + * + * @param array|mixed $display_args Display arguments. + * @return void + */ + protected function set_display_args( $display_args ) { + if ( is_array( $display_args ) ) { + + $this->display_args = $display_args; + + } else { + + $this->flag_invalid_view_arg_type( 'display_args', 'array' ); + + } + } + + /** + * Retrieves the display callback for the endpoint view (type). + * + * @since 3.0 + * + * @return callable Display callback. + */ + public function get_display_callback() { + /** + * Filters the display callback for the current endpoint. + * + * @since 3.0 + * + * @param callable $display_callback Display callback. + * @param Endpoint $this Endpoint object. + */ + return apply_filters( 'edd_reports_endpoint_display_callback', $this->display_callback, $this ); + } + + /** + * Validates and sets the display_args prop. + * + * @since 3.0 + * + * @param callable|mixed $display_callback Display callback. + * @return void + */ + private function set_display_callback( $display_callback ) { + if ( is_callable( $display_callback ) ) { + + $this->display_callback = $display_callback; + + } elseif ( is_string( $display_callback ) && '::' === substr( $display_callback, 0, 2 ) ) { + + $method = str_replace( '::', '', $display_callback ); + + $display_callback = array( $this, $display_callback ); + + $this->set_display_callback( $display_callback ); + + } else { + + $this->flag_invalid_view_arg_type( 'display_callback', 'callable' ); + + } + } + + /** + * Retrieves the data callback for the endpoint view (type). + * + * @since 3.0 + * + * @return callable Data callback. + */ + public function get_data_callback() { + /** + * Filters the data callback for the current endpoint. + * + * @since 3.0 + * + * @param callable $data_callback Data callback. + * @param Endpoint $this Endpoint object. + */ + return apply_filters( 'edd_reports_endpoint_data_callback', $this->data_callback, $this ); + } + + /** + * Validates and sets the display_args prop. + * + * @since 3.0 + * + * @param callable|mixed $data_callback Data callback. + * @return void + */ + private function set_data_callback( $data_callback ) { + if ( is_callable( $data_callback ) ) { + + $this->data_callback = $data_callback; + + } elseif ( is_string( $data_callback ) && '::' === substr( $data_callback, 0, 2 ) ) { + + $method = str_replace( '::', '', $data_callback ); + + $data_callback = array( $this, $data_callback ); + + $this->set_data_callback( $data_callback ); + + } else { + + $this->flag_invalid_view_arg_type( 'data_callback', 'callable' ); + + } + } + + /** + * Flags an error for an invalid view argument type. + * + * @since 3.0 + * + * @param string $argument Argument name. + * @return void + */ + protected function flag_invalid_view_arg_type( $argument, $expected_type ) { + $message = sprintf( 'The \'%1$s\' argument must be of type %2$s for the \'%3$s\' endpoint \'%4$s\' view.', + $argument, + $expected_type, + $this->get_view(), + $this->get_id() + ); + + $this->errors->add( 'invalid_view_arg_type', $message, array( + 'view_type' => $this->get_view(), + 'endpoint_id' => $this->get_id(), + ) ); + } + + /** + * Flags an error for a missing required view argument. + * + * @since 3.0 + * + * @param string $argument Argument name. + * @return void + */ + protected function flag_missing_view_arg( $argument ) { + $message = sprintf( 'The \'%1$s\' argument must be set for the \'%2$s\' endpoint \'%3$s\' view.', + $argument, + $this->get_id(), + $this->get_view() + ); + + $this->errors->add( "missing_{$argument}", $message, array( + 'view_type' => $this->get_view(), + 'endpoint_id' => $this->get_id(), + ) ); + } + + /** + * Converts callback attributes signified as methods (prefixed with '::') + * to methods under the given object. + * + * This conversion can only really happen once the Endpoint is generated + * because the object context doesn't yet exist during registration. + * + * @since 3.0 + * + * @param array $atts View attributes for an endpoint. + * @param object $object Optional. Object under which the method should be assigned. + * Default is the current Endpoint object. + * @return array (Maybe) adjusted list of view attributes. + */ + protected function maybe_convert_callbacks_to_methods( $atts, $object = null ) { + $callbacks = array( 'display_callback', 'data_callback' ); + + if ( null === $object ) { + $object = $this; + } + + foreach ( $callbacks as $callback ) { + if ( ! empty( $atts[ $callback ] ) + && ( is_string( $atts[ $callback ] ) && '::' === substr( $atts[ $callback ], 0, 2 ) ) + ) { + $method = str_replace( '::', '', $atts[ $callback ] ); + + $atts[ $callback ] = array( $object, $method ); + } + } + + return $atts; + } + +} diff --git a/includes/reports/data/class-report-registry.php b/includes/reports/data/class-report-registry.php new file mode 100644 index 00000000000..5b63005f47e --- /dev/null +++ b/includes/reports/data/class-report-registry.php @@ -0,0 +1,292 @@ + '', + 'priority' => 10, + 'group' => 'core', + 'capability' => 'view_shop_reports', + 'filters' => array( + 'dates', + 'taxes', + ) + ); + + $attributes['id'] = $report_id; + $attributes = array_merge( $defaults, $attributes ); + + try { + // Filters can be empty. + $this->validate_attributes( $attributes, $report_id, array( 'filters' ) ); + } catch ( \EDD_Exception $exception ) { + $error = true; + + throw $exception; + } + + if ( isset( $attributes['endpoints'] ) && is_array( $attributes['endpoints'] ) ) { + foreach ( $attributes['endpoints'] as $view_group => $endpoints ) { + foreach ( $endpoints as $index => $endpoint ) { + if ( ! is_string( $endpoint ) && ! ( $endpoint instanceof \EDD\Reports\Data\Endpoint ) ) { + unset( $attributes['endpoints'][ $view_group ][ $index ] ); + + throw new Utils\Exception( sprintf( 'The \'%1$s\' report contains one or more invalidly defined endpoints.', $report_id ) ); + } + } + } + } + + if ( isset( $attributes['filters'] ) && is_array( $attributes['filters'] ) ) { + foreach ( $attributes['filters'] as $index => $filter ) { + if ( ! Reports\validate_filter( $filter ) ) { + $message = sprintf( 'The \'%1$s\' report contains one or more invalid filters.', $report_id ); + + unset( $attributes['filters'][ $index ] ); + + throw new Utils\Exception( $message ); + } + } + } + + if ( true === $error ) { + return false; + + } else { + return parent::add_item( $report_id, $attributes ); + } + } + + /** + * Retrieves registered reports. + * + * @since 3.0 + * + * @param string $sort Optional. How to sort the list of registered reports before retrieval. + * Accepts 'priority' or 'ID' (alphabetized by item ID), or empty (none). + * Default empty. + * @param string $group Optional. The reports group to retrieve reports for. Default 'core'. + * @return + */ + public function get_reports( $sort = '', $group = 'core' ) { + $reports = $this->get_items_sorted( $sort ); + + foreach ( $reports as $report_id => $atts ) { + if ( $group !== $atts['group'] ) { + unset( $reports[ $report_id ] ); + } + } + + return $reports; + } + + /** + * Registers a new data endpoint to the master endpoints registry. + * + * @since 3.0 + * + * @throws \EDD_Exception if the `$label` or `$views` attributes are empty. + * @throws \EDD_Exception if any of the required `$views` sub-attributes are empty. + * + * @see \EDD\Reports\Data\Endpoint_Registry::register_endpoint() + * + * @param string $endpoint_id Reports data endpoint ID. + * @param array $attributes Attributes of the endpoint. See Endpoint_Registry::register_endpoint() + * for more information on expected arguments. + * @return bool True if the endpoint was successfully registered, otherwise false. + */ + public function register_endpoint( $endpoint_id, $attributes ) { + /** @var \EDD\Reports\Data\Endpoint_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports:endpoints' ); + + if ( is_wp_error( $registry ) ) { + return false; + } + + return $registry->register_endpoint( $endpoint_id, $attributes ); + } + + /** + * Unregisters a data endpoint from the master endpoints registry. + * + * @since 3.0 + * + * @see \EDD\Reports\Data\Endpoint_Registry::unregister_endpoint() + * + * @param string $endpoint_id Endpoint ID. + */ + public function unregister_endpoint( $endpoint_id ) { + /** @var \EDD\Reports\Data\Endpoint_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports:endpoints' ); + + if ( ! is_wp_error( $registry ) ) { + $registry->unregister_endpoint( $endpoint_id ); + } + } + + /** + * Registers an endpoint view to the master endpoint views registry. + * + * @since 3.0 + * + * @throws \EDD_Exception if all expected attributes are not set. + * + * @see \EDD\Reports\Data\Endpoint_View_Registry::register_endpoint_view() + * + * @param string $view_id View ID. Currently only core endpoint views can be added. + * @param array $attributes Attributes of the endpoint view. See Endpoint_View_Registry::register_endpoint_view() + * for more information on expected/allowed arguments. + * @return bool True if the endpoint view was successfully registered, otherwise false. + */ + public function register_endpoint_view( $view_id, $attributes ) { + /** @var \EDD\Reports\Data\Endpoint_View_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports:endpoints:views' ); + + if ( is_wp_error( $registry ) ) { + return false; + } + + return $registry->register_endpoint_view( $view_id, $attributes ); + } + + /** + * Builds and retrieves a Report object. + * + * @since 3.0 + * + * @param string|Report $report Report ID or object. + * @param bool $build_endpoints Optional. Whether to build the endpoints (includes + * registering any endpoint dependencies, such as + * registering meta boxes). Default true. + * @return Report|\WP_Error Report object on success, otherwise a WP_Error object. + */ + public function build_report( $report, $build_endpoints = true ) { + + // If a report object was passed, just return it. + if ( $report instanceof Report ) { + return $report; + } + + try { + $_report = $this->get_report( $report ); + + } catch( \EDD_Exception $exception ) { + + edd_debug_log_exception( $exception ); + + return new \WP_Error( 'invalid_report', $exception->getMessage(), $report ); + } + + if ( ! empty( $_report ) ) { + $_report = new Report( $_report ); + + if ( true === $build_endpoints ) { + $_report->build_endpoints(); + } + } + + return $_report; + } +} diff --git a/includes/reports/data/class-report.php b/includes/reports/data/class-report.php new file mode 100644 index 00000000000..f28a51c2136 --- /dev/null +++ b/includes/reports/data/class-report.php @@ -0,0 +1,447 @@ +raw_endpoints = $args['endpoints']; + } else { + $this->errors->add( 'missing_endpoints', 'No endpoints are defined for the report.', $args ); + } + + if ( ! empty( $args['capability'] ) ) { + $this->set_capability( $args['capability'] ); + } else { + $this->errors->add( 'missing_capability', 'No capability is defined for the report.', $args ); + } + + if ( ! empty( $args['display_callback'] ) ) { + $this->set_display_callback( $args['display_callback'] ); + } + + if ( ! empty( $args['filters'] ) ) { + $this->set_filters( $args['filters'] ); + } + + if ( ! empty( $args['group'] ) ) { + $this->set_group( $args['group'] ); + } + } + + /** + * Triggers building the report's endpoints if defined and the current user + * has the ability to view them. + * + * This is abstracted away from instantiation to allow for building Report objects + * without always registering meta boxes and other endpoint dependencies for display. + * + * @since 3.0 + */ + public function build_endpoints() { + if ( ! empty( $this->raw_endpoints ) && current_user_can( $this->get_capability() ) ) { + try { + $this->parse_endpoints( $this->raw_endpoints ); + + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + } + + } else { + $this->errors->add( 'missing_endpoints', 'No endpoints are defined for the report.' ); + } + } + + /** + * Parses Endpoint objects for each endpoint in the report. + * + * @since 3.0 + * + * @throws \EDD_Exception + * + * @param array $endpoints Endpoints, keyed by view type. + */ + public function parse_endpoints( $report_endpoints ) { + /** @var \EDD\Reports\Data\Endpoint_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports:endpoints' ); + + if ( is_wp_error( $registry ) ) { + throw new Utils\Exception( $registry->get_error_message() ); + } + + $view_groups = $this->parse_view_groups(); + + // Loop through all passed endpoints using view groups. + foreach ( $report_endpoints as $group => $endpoints ) { + + // Skip any invalid views based on view group. + if ( ! array_key_exists( $group, $view_groups ) ) { + throw new Utils\Exception( sprintf( + 'The \'%1$s\' view group does not correspond to a known endpoint view type.', + $group + ) ); + } + + // Loop through all endpoints for each view group and build endpoint objects. + foreach ( $endpoints as $endpoint ) { + + $endpoint = $registry->build_endpoint( $endpoint, $view_groups[ $group ], $this->get_id() ); + + $this->validate_endpoint( $group, $endpoint ); + } + } + } + + /** + * Parses the views whitelist to retrieve corresponding view groups. + * + * @since 3.0 + * + * @return array List of view group and view slug pairs. + */ + public function parse_view_groups() { + $views = Reports\get_endpoint_views(); + + $view_groups = array(); + + foreach ( $views as $view_type => $atts ) { + if ( ! empty( $atts['group'] ) ) { + $view_group = $atts['group']; + + $view_groups[ $view_group ] = $view_type; + } + } + + return $view_groups; + } + + /** + * Validates an endpoint for rendering. + * + * @since 3.0 + * + * @see \EDD\Reports\Data\Report::$valid_endpoints + * + * @param string $view_group View group corresponding to the endpoint view. + * @param Data\Endpoint|\WP_Error $endpoint Endpoint object. + */ + public function validate_endpoint( $view_group, $endpoint ) { + if ( is_wp_error( $endpoint ) ) { + $this->errors->add( + $endpoint->get_error_code(), + $endpoint->get_error_message(), + $endpoint->get_error_data() + ); + + } elseif ( ! is_wp_error( $endpoint ) && $endpoint->has_errors() ) { + $message = sprintf( 'The \'%1$s\' endpoint is invalid.', $endpoint->get_id() ); + + $this->errors->add( 'invalid_endpoint', $message, $endpoint->get_errors() ); + + // Valid. + } else { + $this->endpoints[ $view_group ][ $endpoint->get_id() ] = $endpoint; + } + } + + /** + * Retrieves a list of validated endpoints for the current report. + * + * @since 3.0 + * + * @param string $view_group Optional. View group for the type of endpoints to retrieve. + * Default empty (all valid endpoints). + * @return Endpoint[] List of validated endpoints by view view group. + */ + public function get_endpoints( $view_group = '' ) { + if ( ! empty( $view_group ) && ! empty( $this->endpoints[ $view_group ] ) ) { + return $this->endpoints[ $view_group ]; + } else { + return $this->endpoints; + } + } + + /** + * Determines whether the report has any valid endpoints. + * + * @since 3.0 + * + * @param string $view_group Optional. View group for the type of endpoints + * to check the existence of. Default empty. + * @return bool True if there is at least one valid endpoint, otherwise false. + */ + public function has_endpoints( $view_group = '' ) { + if ( ! empty( $view_group ) ) { + $has_endpoints = ! empty( $this->endpoints[ $view_group ] ); + } else { + $has_endpoints = ! empty( $this->endpoints ); + } + + return $has_endpoints; + } + + /** + * Retrieves a given endpoint by view group. + * + * @since 3.0 + * + * @param string $endpoint_id Endpoint ID. + * @param string $view_group Endpoint view group. + * @return Endpoint|\WP_Error Endpoint object if it exists, otherwise a WP_Error object. + */ + public function get_endpoint( $endpoint_id, $view_group ) { + $endpoints = $this->get_endpoints( $view_group ); + + if ( isset( $endpoints[ $endpoint_id ] ) ) { + $endpoint = $endpoints[ $endpoint_id ]; + + } else { + $message = sprintf( 'The \'%1$s\' endpoint does not exist for the \'%2$s\' view group in the \'%3$s\' report.', + $endpoint_id, + $view_group, + $this->get_id() + ); + + $endpoint = new \WP_Error( 'invalid_report_endpoint', $message ); + } + + return $endpoint; + } + + /** + * Retrieves the capability needed to view the rendered report. + * + * @since 3.0 + * + * @return string Report capability. + */ + public function get_capability() { + return $this->capability; + } + + /** + * Sets the capability needed for the current user to view the report. + * + * @since 3.0 + * + * @param string $capability Capability. + */ + private function set_capability( $capability ) { + $this->capability = sanitize_key( $capability ); + } + + /** + * Displays the endpoint based on the view (type). + * + * @since 3.0 + * + * @return void + */ + public function display() { + $callback = $this->get_display_callback(); + + if ( is_callable( $callback ) ) { + call_user_func( $callback, $this ); + } + } + + /** + * Retrieves the current report's display callback. + * + * @since 3.0 + * + * @return callable Display callback. + */ + public function get_display_callback() { + return $this->display_callback; + } + + /** + * Sets the display callback used to render the report. + * + * @since 3.0 + * + * @param callable $callback Display callback. + */ + private function set_display_callback( $callback ) { + if ( is_callable( $callback ) ) { + $this->display_callback = $callback; + + } else { + $this->flag_invalid_report_arg_type( 'display_callback', 'callable' ); + } + } + + /** + * Retrieves the list of filters registered for use with this report. + * + * @since 3.0 + * + * @return array List of support filters. + */ + public function get_filters() { + return $this->filters; + } + + /** + * Sets the endpoint filters supported by the current report's endpoints. + * + * @since 3.0 + * + * @param array $filters Filters to set for this report. + */ + private function set_filters( $filters ) { + + foreach ( $filters as $filter ) { + if ( Reports\validate_filter( $filter ) ) { + $this->filters[] = $filter; + + } else { + $message = sprintf( 'The \'%1$s\' filter for the \'%2$s\' report is invalid.', + $filter, + $this->get_id() + ); + + $this->errors->add( 'invalid_report_filter', $message, $this ); + } + } + + $this->filters = array_unique( $this->filters ); + } + + /** + * Retrieves the display group for the current report. + * + * @since 3.0 + * + * @return string Display group. Default 'reports'. + */ + public function get_group() { + return $this->group; + } + + /** + * Sets the display group for the current report. + * + * @since 3.0 + * + * @param string $group Report display group. + */ + private function set_group( $group ) { + $this->group = sanitize_key( $group ); + } + + /** + * Displays an entire group of an endpoints view. + * + * @since 3.0 + * + * @param string $view_group Endpoints view group. + * @return void + */ + public function display_endpoint_group( $view_group ) { + $groups = $this->parse_view_groups(); + + if ( array_key_exists( $view_group, $groups ) ) { + $callback = Reports\get_endpoint_group_callback( $groups[ $view_group ] ); + + if ( is_callable( $callback ) ) { + call_user_func( $callback, $this ); + } + } + } + + /** + * Flags an error for an invalid report argument type. + * + * @since 3.0 + * + * @param string $argument Argument name. + */ + protected function flag_invalid_report_arg_type( $argument, $expected_type ) { + $message = sprintf( 'The \'%1$s\' argument must be of type %2$s for the \'%3$s\' report.', + $argument, + $expected_type, + $this->get_id() + ); + + $this->errors->add( 'invalid_report_arg_type', $message, array( + 'report_id' => $this->get_id(), + ) ); + } +} diff --git a/includes/reports/data/class-table-endpoint.php b/includes/reports/data/class-table-endpoint.php new file mode 100644 index 00000000000..effb5d93d22 --- /dev/null +++ b/includes/reports/data/class-table-endpoint.php @@ -0,0 +1,223 @@ +errors = new \WP_Error(); + + // ID and Label. + $this->set_props( $args ); + + // List table set up and dumping display args. + $this->setup_list_table( $args ); + + // Parse display attributes from defaults. + $args = $this->parse_display_props( $args ); + + parent::__construct( $args ); + } + + /** + * Sets display-related properties for the Endpoint. + * + * @since 3.0 + * + * @param array $endpoint Endpoint record from the registry. + */ + private function parse_display_props( $endpoint ) { + + $view_type = $this->get_view(); + + if ( ! empty( $endpoint['views'][ $view_type ] ) ) { + + $view_atts = $endpoint['views'][ $view_type ]; + + $list_table = $this->get_list_table(); + + if ( null === $list_table ) { + return $endpoint; + } + + $endpoint['views'][ $view_type ] = $this->maybe_convert_callbacks_to_methods( $view_atts, $list_table ); + } + + return $endpoint; + } + + /** + * Sets attributes related to the list table. + * + * @since 3.0 + * + * @param array $endpoint Table endpoint arguments. + */ + private function setup_list_table( $endpoint ) { + + if ( ! empty( $endpoint['views'][ $this->view ]['display_args'] ) ) { + + $display_args = $endpoint['views'][ $this->view ]['display_args']; + + if ( ! empty( $display_args['class_name'] ) ) { + + if ( ! empty( $display_args['class_file'] ) ) { + + $this->set_class_file( $display_args['class_file'] ); + + $this->set_list_table( $display_args['class_name'] ); + + } else { + + $this->errors->add( + 'missing_table_class_file', + sprintf( 'The list table class file for the \'%1$s\' endpoint is missing.', $this->get_id() ) + ); + + } + + } else { + + $this->errors->add( + 'missing_table_class_name', + sprintf( 'The list table class name for the \'%1$s\' endpoint is missing.', + $this->get_id() + ) + ); + + } + + // Dump the display args as they're no longer needed. + $endpoint['views'][ $this->view ]['display_args'] = array(); + + } + + } + + /** + * Retrieves the list table class file. + * + * @since 3.0 + * + * @return string|null Class file if set, otherwise null. + */ + public function get_class_file() { + return $this->class_file; + } + + /** + * Sets the list table class file. + * + * @since 3.0 + * + * @param string $file Class file. + */ + private function set_class_file( $file ) { + if ( false === strpos( $file, '..' ) && false === strpos( $file, './' ) ) { + $this->class_file = $file; + } + } + + /** + * Retrieves the list table instance. + * + * @since 3.0 + * + * @return WP_List_Table|null List table instance if set, otherwise null. + */ + public function get_list_table() { + return $this->list_table; + } + + /** + * Sets the list table instance. + * + * @since 3.0 + * + * @see get_class_file() + * + * @param string $class List table class name. + */ + private function set_list_table( $class ) { + if ( ! class_exists( $class ) ) { + $path_to_file = $this->get_class_file(); + + if ( \EDD\Utils\FileSystem::file_exists( $path_to_file ) ) { + require_once $path_to_file; + } + } + $this->list_table = new $class; + } + + /** + * Display logic for the current table endpoint. + * + * @since 3.0 + */ + public function display() { + $callback = $this->get_display_callback(); + + if ( is_callable( $callback ) ) { + $table = $this->get_list_table(); + + if ( null !== $table ) { + // Prep the table data for display (prepare_items). + $this->get_data(); + + call_user_func_array( $callback, array( + $this, // Endpoint + $table, // Table + $this->get_display_args(), // Args + ) ); + } + } + } + +} diff --git a/includes/reports/data/class-tile-endpoint.php b/includes/reports/data/class-tile-endpoint.php new file mode 100644 index 00000000000..3a09ab9ac3d --- /dev/null +++ b/includes/reports/data/class-tile-endpoint.php @@ -0,0 +1,45 @@ +get_id() ) . '" class="' . esc_attr( implode( ' ', $classnames ) ) . '">'; + parent::display(); + echo ''; + } + +} diff --git a/includes/reports/data/customers/class-most-valuable-customers-list-table.php b/includes/reports/data/customers/class-most-valuable-customers-list-table.php new file mode 100644 index 00000000000..bc577d94097 --- /dev/null +++ b/includes/reports/data/customers/class-most-valuable-customers-list-table.php @@ -0,0 +1,157 @@ +prepare( " AND currency = %s ", $currency ); + } + + $sql = "SELECT customer_id, COUNT(id) AS order_count, SUM({$column}) AS total_spent + FROM {$wpdb->edd_orders} + WHERE status IN ('complete','revoked') AND date_created >= %s AND date_created <= %s AND type = 'sale' + {$currency_clause} + GROUP BY customer_id + ORDER BY total_spent DESC + LIMIT 5"; + + $results = $wpdb->get_results( + $wpdb->prepare( + $sql, + $date_range['start']->format( 'mysql' ), + $date_range['end']->format( 'mysql' ) + ) + ); + + foreach ( $results as $result ) { + $customer = edd_get_customer( (int) $result->customer_id ); + + // Skip if customer record not found. + if ( ! $customer ) { + continue; + } + + $user_id = ! empty( $customer->user_id ) + ? intval( $customer->user_id ) + : 0; + + $data[] = array( + 'id' => $customer->id, + 'user_id' => $user_id, + 'name' => $customer->name, + 'email' => $customer->email, + 'order_count' => absint( $result->order_count ), + 'spent' => $result->total_spent, + 'date_created' => $customer->date_created, + ); + } + + return $data; + } + + /** + * Retrieve the table columns. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns. + */ + public function get_columns() { + $columns = parent::get_columns(); + + // Remove the checkbox if it exists. + if ( isset( $columns['cb'] ) ) { + unset( $columns['cb'] ); + } + + return $columns; + } + + /** + * Return empty array to disable sorting. + * + * @since 3.0 + * + * @return array + */ + public function get_sortable_columns() { + return array(); + } + + /** + * Return empty array to remove bulk actions. + * + * @since 3.0 + * + * @return array + */ + public function get_bulk_actions() { + return array(); + } + + /** + * Hide pagination. + * + * @since 3.0 + * + * @param string $which + */ + protected function pagination( $which ) { + + } + + /** + * Hide table navigation. + * + * @since 3.0 + * + * @param string $which + */ + protected function display_tablenav( $which ) { + + } +} diff --git a/includes/reports/data/customers/class-top-five-customers-list-table.php b/includes/reports/data/customers/class-top-five-customers-list-table.php new file mode 100644 index 00000000000..d50c9475a40 --- /dev/null +++ b/includes/reports/data/customers/class-top-five-customers-list-table.php @@ -0,0 +1,206 @@ + 5, + 'order' => 'DESC', + 'orderby' => 'purchase_value', + ); + + $customers = edd_get_customers( $args ); + + foreach ( $customers as $customer ) { + /** @var \EDD_Customer $customer */ + + $user_id = ! empty( $customer->user_id ) + ? intval( $customer->user_id ) + : 0; + + $data[] = array( + 'id' => $customer->id, + 'user_id' => $user_id, + 'name' => $customer->name, + 'email' => $customer->email, + 'order_count' => $customer->purchase_count, + 'spent' => $customer->purchase_value, + 'date_created' => $customer->date_created, + ); + } + } else { + global $wpdb; + + // @todo DRY with Most_Valuable_Customers_List_Table + + $column = Reports\get_taxes_excluded_filter() ? 'total - tax' : 'total'; + $currency = Reports\get_filter_value( 'currencies' ); + $currency_clause = ''; + + if ( empty( $currency ) || 'convert' === $currency ) { + $column = sprintf( '%s / rate', $column ); + } else { + $currency_clause = $wpdb->prepare( 'AND status = %s', strtoupper( $currency ) ); + } + + $sql = "SELECT customer_id, COUNT(id) AS order_count, SUM({$column}) AS total_spent + FROM {$wpdb->edd_orders} + WHERE status IN (%s, %s) AND type = 'sale' + {$currency_clause} + GROUP BY customer_id + ORDER BY total_spent DESC + LIMIT 5"; + + $results = $wpdb->get_results( $wpdb->prepare( $sql, sanitize_text_field( 'complete' ), sanitize_text_field( 'revoked' ) ) ); + + foreach ( $results as $result ) { + $customer = edd_get_customer( (int) $result->customer_id ); + + // Skip if customer record not found. + if ( ! $customer ) { + continue; + } + + $user_id = ! empty( $customer->user_id ) + ? intval( $customer->user_id ) + : 0; + + $data[] = array( + 'id' => $customer->id, + 'user_id' => $user_id, + 'name' => $customer->name, + 'email' => $customer->email, + 'order_count' => absint( $result->order_count ), + 'spent' => $result->total_spent, + 'date_created' => $customer->date_created, + ); + } + } + + return $data; + } + + /** + * Retrieve the table columns. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns. + */ + public function get_columns() { + $columns = parent::get_columns(); + + // Remove the checkbox if it exists. + if ( isset( $columns['cb'] ) ) { + unset( $columns['cb'] ); + } + + return $columns; + } + + /** + * Overrides the `spent` column value to possibly display in the filtered currency. + * + * @since 3.0 + * + * @param array $item + * @param string $column_name + * + * @return string + */ + public function column_default( $item, $column_name ) { + if ( 'spent' !== $column_name ) { + return parent::column_default( $item, $column_name ); + } + + $currency = ''; + $selected_currency = Reports\get_filter_value( 'currencies' ); + if ( ! empty( $selected_currency ) && 'convert' !== $selected_currency ) { + $currency = $selected_currency; + } + + $value = edd_currency_filter( edd_format_amount( $item[ $column_name ] ), $currency ); + + return apply_filters( 'edd_customers_column_' . $column_name, $value, $item['id'] ); + } + + /** + * Return empty array to disable sorting. + * + * @since 3.0 + * + * @return array + */ + public function get_sortable_columns() { + return array(); + } + + /** + * Return empty array to remove bulk actions. + * + * @since 3.0 + * + * @return array + */ + public function get_bulk_actions() { + return array(); + } + + /** + * Hide pagination. + * + * @since 3.0 + * + * @param string $which + */ + protected function pagination( $which ) { + + } + + /** + * Hide table navigation. + * + * @since 3.0 + * + * @param string $which + */ + protected function display_tablenav( $which ) { + + } +} diff --git a/includes/reports/data/discounts/class-top-five-discounts-list-table.php b/includes/reports/data/discounts/class-top-five-discounts-list-table.php new file mode 100644 index 00000000000..af460d487d5 --- /dev/null +++ b/includes/reports/data/discounts/class-top-five-discounts-list-table.php @@ -0,0 +1,237 @@ +get_most_popular_discounts( array( + 'number' => 5, + 'range' => $filter['range'], + ) ); + + $data = array(); + + foreach ( $d as $result ) { + if ( empty( $result->object ) ) { + continue; + } + + $c = new \stdClass(); + $c->id = $result->object->id; + $c->name = $result->object->name; + $c->status = $result->object->status; + $c->use_count = $result->count; + $c->code = $result->object->code; + $c->type = $result->object->type; + $c->amount = $result->object->amount; + + $data[] = $c; + } + + return $data; + } + + /** + * Retrieve the table columns. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'code' => __( 'Code', 'easy-digital-downloads' ), + 'use_count' => __( 'Uses', 'easy-digital-downloads' ), + 'amount' => __( 'Amount', 'easy-digital-downloads' ) + ); + } + + /** + * This function renders most of the columns in the list table. + * + * @since 3.0 + * + * @param \stdClass $discount Discount object. + * @param string $column_name The name of the column + * + * @return string Column Name + */ + public function column_default( $discount, $column_name ) { + return property_exists( $discount, $column_name ) ? $discount->$column_name : ''; + } + + /** + * This function renders the amount column. + * + * @access public + * @since 3.0 + * + * @param \stdClass $discount Data for the discount code. + * @return string Formatted amount. + */ + public function column_amount( $discount ) { + return edd_format_discount_rate( $discount->type, $discount->amount ); + } + + /** + * Render the Name Column + * + * @since 3.0 + * + * @param \stdClass $discount Discount object. + * @return string Data shown in the Name column + */ + public function column_name( $discount ) { + $base = $this->get_base_url(); + $state = ''; + + // Bail if current user cannot manage discounts + if ( ! current_user_can( 'manage_shop_discounts' ) ) { + return; + } + + // State + if ( ( ! empty( $status ) && ( $status !== $discount->status ) ) || ( $discount->status !== 'active' ) ) { + $state = ' — ' . edd_get_discount_status_label( $discount->id ); + } + + // Wrap discount title in strong anchor + $discount_title = '' . stripslashes( $discount->name ) . '' . esc_html( $state ) . ''; + + // Return discount title & row actions + return $discount_title; + } + + /** + * Setup the final data for the table. + * + * @since 3.0 + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); + $sortable = $this->get_sortable_columns(); + + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + } + + /** + * Get the base URL for the discount list table + * + * @since 3.0 + * + * @return string + */ + public function get_base_url() { + + // Remove some query arguments + $base = remove_query_arg( edd_admin_removable_query_args(), edd_get_admin_base_url() ); + + // Add base query args + return add_query_arg( array( + 'page' => 'edd-discounts', + ), $base ); + } + + /** + * Message to be displayed when there are no items + * + * @since 3.0 + */ + public function no_items() { + esc_html_e( 'No discounts found.', 'easy-digital-downloads' ); + } + + /** + * Gets the name of the primary column. + * + * @since 3.0 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'name'; + } + + /** + * Return empty array to disable sorting. + * + * @since 3.0 + * + * @return array + */ + public function get_sortable_columns() { + return array(); + } + + /** + * Return empty array to remove bulk actions. + * + * @since 3.0 + * + * @return array + */ + public function get_bulk_actions() { + return array(); + } + + /** + * Hide pagination. + * + * @since 3.0 + * + * @param string $which + */ + protected function pagination( $which ) { + + } + + /** + * Hide table navigation. + * + * @since 3.0 + * + * @param string $which + */ + protected function display_tablenav( $which ) { + + } +} diff --git a/includes/reports/data/downloads/class-top-selling-downloads-list-table.php b/includes/reports/data/downloads/class-top-selling-downloads-list-table.php new file mode 100644 index 00000000000..1367a4c5a6b --- /dev/null +++ b/includes/reports/data/downloads/class-top-selling-downloads-list-table.php @@ -0,0 +1,213 @@ +get_most_valuable_order_items( array( + 'number' => 10, + 'range' => $filter['range'], + 'currency' => '', + ) ); + } + + /** + * Retrieve the table columns. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'price' => __( 'Price', 'easy-digital-downloads' ), + 'sales' => __( 'Sales', 'easy-digital-downloads' ), + 'earnings' => __( 'Net Earnings', 'easy-digital-downloads' ), + ); + } + + /** + * Render the Name Column. + * + * @since 3.0 + * + * @param \stdClass $download Download object. + * @return string Data shown in the Name column. + */ + public function column_name( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + // Check for variable pricing + $retval = ! is_null( $download->price_id ) && is_numeric( $download->price_id ) + ? edd_get_download_name( $download->object->ID, $download->price_id ) + : edd_get_download_name( $download->object->ID ); + + return $retval; + } + + /** + * Render the Price Column. + * + * @since 3.0 + * + * @param \stdClass $download Download object. + * @return string Data shown in the Price column. + */ + public function column_price( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + // Check for variable pricing + $retval = ! is_null( $download->price_id ) && is_numeric( $download->price_id ) + ? edd_price( $download->object->ID, false, $download->price_id ) + : edd_price( $download->object->ID, false ); + + return $retval; + } + + public function column_sales( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + return current_user_can( 'view_product_stats', $download->object->ID ) + ? $download->sales + : '—'; + } + + public function column_earnings( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + return current_user_can( 'view_product_stats', $download->object->ID ) + ? edd_currency_filter( edd_format_amount( $download->total ) ) + : '—'; + } + + /** + * Setup the final data for the table. + * + * @since 3.0 + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); + $sortable = $this->get_sortable_columns(); + + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + } + + /** + * Get the base URL for the discount list table + * + * @since 3.0 + * + * @return string + */ + public function get_base_url() { + return remove_query_arg( edd_admin_removable_query_args(), edd_get_admin_base_url() ); + } + + /** + * Message to be displayed when there are no items + * + * @since 3.0 + */ + public function no_items() { + esc_html_e( 'No downloads found.', 'easy-digital-downloads' ); + } + + /** + * Gets the name of the primary column. + * + * @since 3.0 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'name'; + } + + /** + * Return empty array to disable sorting. + * + * @since 3.0 + * + * @return array + */ + public function get_sortable_columns() { + return array(); + } + + /** + * Return empty array to remove bulk actions. + * + * @since 3.0 + * + * @return array + */ + public function get_bulk_actions() { + return array(); + } + + /** + * Hide pagination. + * + * @since 3.0 + * + * @param string $which + */ + protected function pagination( $which ) { + + } + + /** + * Hide table navigation. + * + * @since 3.0 + * + * @param string $which + */ + protected function display_tablenav( $which ) { + + } +} diff --git a/includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php b/includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php new file mode 100644 index 00000000000..0685b2e599c --- /dev/null +++ b/includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php @@ -0,0 +1,227 @@ +get_most_downloaded_products( array( + 'number' => 5, + 'range' => $filter['range'] + ) ); + } + + /** + * Retrieve the table columns. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'name' => __( 'Name', 'easy-digital-downloads' ), + 'download_count' => __( 'File Downloads', 'easy-digital-downloads' ), + 'price' => __( 'Price', 'easy-digital-downloads' ), + 'sales' => __( 'Sales', 'easy-digital-downloads' ), + 'earnings' => __( 'Earnings', 'easy-digital-downloads' ) + ); + } + + /** + * Render the Name Column. + * + * @since 3.0 + * + * @param \stdClass $download Download object. + * @return string Data shown in the Name column. + */ + public function column_name( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + // Download title + return $download->object->get_name(); + } + + /** + * Render the Download Count Column. + * + * @since 3.0 + * + * @param \stdClass $download Download object. + * @return string Data shown in the Download Count column. + */ + public function column_download_count( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + return $download->total; + } + + /** + * Render the Price Column. + * + * @since 3.0 + * + * @param \stdClass $download Download object. + * @return string Data shown in the Price column. + */ + public function column_price( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + if ( $download->object->has_variable_prices() ) { + return edd_price_range( $download->object->ID ); + } else { + return edd_price( $download->object->ID, false ); + } + } + + public function column_sales( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + return current_user_can( 'view_product_stats', $download->object->ID ) + ? edd_get_download_sales_stats( $download->object->ID ) + : '—'; + } + + public function column_earnings( $download ) { + if ( ! $download->object instanceof \EDD_Download ) { + return '—'; + } + + return current_user_can( 'view_product_stats', $download->object->ID ) + ? edd_currency_filter( edd_format_amount( edd_get_download_earnings_stats( $download->object->ID ) ) ) + : '—'; + } + + /** + * Setup the final data for the table. + * + * @since 3.0 + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); + $sortable = $this->get_sortable_columns(); + + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + } + + /** + * Get the base URL for the discount list table + * + * @since 3.0 + * + * @return string + */ + public function get_base_url() { + return remove_query_arg( edd_admin_removable_query_args(), edd_get_admin_base_url() ); + } + + /** + * Message to be displayed when there are no items + * + * @since 3.0 + */ + public function no_items() { + esc_html_e( 'No downloads found.', 'easy-digital-downloads' ); + } + + /** + * Gets the name of the primary column. + * + * @since 3.0 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'name'; + } + + /** + * Return empty array to disable sorting. + * + * @since 3.0 + * + * @return array + */ + public function get_sortable_columns() { + return array(); + } + + /** + * Return empty array to remove bulk actions. + * + * @since 3.0 + * + * @return array + */ + public function get_bulk_actions() { + return array(); + } + + /** + * Hide pagination. + * + * @since 3.0 + * + * @param string $which + */ + protected function pagination( $which ) { + + } + + /** + * Hide table navigation. + * + * @since 3.0 + * + * @param string $which + */ + protected function display_tablenav( $which ) { + + } +} \ No newline at end of file diff --git a/includes/reports/data/payment-gateways/class-gateway-stats-list-table.php b/includes/reports/data/payment-gateways/class-gateway-stats-list-table.php new file mode 100644 index 00000000000..b6432913e49 --- /dev/null +++ b/includes/reports/data/payment-gateways/class-gateway-stats-list-table.php @@ -0,0 +1,205 @@ + 'report-gateway', + 'plural' => 'report-gateways', + 'ajax' => false, + ) ); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'label'; + } + + /** + * Render each column. + * + * @since 1.5 + * + * @param array $item Contains all the data of the downloads + * @param string $column_name The name of the column + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Column names. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'label' => __( 'Gateway', 'easy-digital-downloads' ), + 'complete_sales' => __( 'Complete Sales', 'easy-digital-downloads' ), + 'pending_sales' => __( 'Pending / Failed Sales', 'easy-digital-downloads' ), + 'refunded_sales' => __( 'Refunds Issued', 'easy-digital-downloads' ), + 'total_sales' => __( 'Total Sales', 'easy-digital-downloads' ), + ); + } + + /** + * Build all the reports data + * + * @since 1.5 + * @return array All the data for customer reports + */ + public function get_data() { + $filter = Reports\get_filter_value( 'dates' ); + $currency = Reports\get_filter_value( 'currencies' ); + + $reports_data = array(); + $gateways = edd_get_payment_gateways(); + + foreach ( $gateways as $gateway_id => $gateway ) { + $stats = new Stats(); + + $complete_count = $stats->get_gateway_sales( array( + 'range' => $filter['range'], + 'gateway' => $gateway_id, + 'status' => edd_get_gross_order_statuses(), + 'type' => array( 'sale' ), + 'currency' => $currency, + ) ); + + $pending_count = $stats->get_gateway_sales( array( + 'range' => $filter['range'], + 'gateway' => $gateway_id, + 'status' => edd_get_incomplete_order_statuses(), + 'type' => array( 'sale' ), + 'currency' => $currency, + ) ); + + $refunded_count = $stats->get_gateway_sales( array( + 'range' => $filter['range'], + 'gateway' => $gateway_id, + 'status' => array( 'complete' ), + 'type' => array( 'refund' ), + 'currency' => $currency, + ) ); + + $total_count = $stats->get_gateway_sales( array( + 'range' => $filter['range'], + 'gateway' => $gateway_id, + 'status' => 'any', + 'type' => array( 'sale' ), + 'currency' => $currency, + ) ); + + $reports_data[] = array( + 'ID' => $gateway_id, + 'label' => '' . esc_html( $gateway['admin_label'] ) . '', + 'complete_sales' => edd_format_amount( $complete_count, false ), + 'pending_sales' => edd_format_amount( $pending_count, false ), + 'refunded_sales' => edd_format_amount( $refunded_count, false ), + 'total_sales' => edd_format_amount( $total_count, false ), + ); + } + + return $reports_data; + } + + /** + * Setup the final data for the table + * + * @since 1.5 + * @uses EDD_Gateway_Reports_Table::get_columns() + * @uses EDD_Gateway_Reports_Table::get_sortable_columns() + * @uses EDD_Gateway_Reports_Table::reports_data() + * @return void + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); // No hidden columns + $sortable = $this->get_sortable_columns(); + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + } + + /** + * Return empty array to disable sorting. + * + * @since 3.0 + * + * @return array + */ + public function get_sortable_columns() { + return array(); + } + + /** + * Return empty array to remove bulk actions. + * + * @since 3.0 + * + * @return array + */ + public function get_bulk_actions() { + return array(); + } + + /** + * Hide pagination. + * + * @since 3.0 + * + * @param string $which + */ + protected function pagination( $which ) { + + } + + /** + * Hide table navigation. + * + * @since 3.0 + * + * @param string $which + */ + protected function display_tablenav( $which ) { + + } +} diff --git a/includes/reports/data/taxes/class-tax-collected-by-location-list-table.php b/includes/reports/data/taxes/class-tax-collected-by-location-list-table.php new file mode 100644 index 00000000000..4dc5f822616 --- /dev/null +++ b/includes/reports/data/taxes/class-tax-collected-by-location-list-table.php @@ -0,0 +1,240 @@ + 'report-tax-collected-by-location', + 'plural' => 'report-tax-collected-by-locations', + 'ajax' => false, + ) ); + } + + /** + * Gets the name of the primary column. + * + * @since 2.5 + * @access protected + * + * @return string Name of the primary column. + */ + protected function get_primary_column_name() { + return 'label'; + } + + /** + * Render each column. + * + * @since 1.5 + * + * @param array $item Contains all the data of the downloads + * @param string $column_name The name of the column + * + * @return string Column Name + */ + public function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Column names. + * + * @since 3.0 + * + * @return array $columns Array of all the list table columns + */ + public function get_columns() { + return array( + 'country' => __( 'Country/Region', 'easy-digital-downloads' ), + 'gross' => __( 'Gross', 'easy-digital-downloads' ), + 'tax' => __( 'Tax', 'easy-digital-downloads' ), + 'net' => __( 'Net', 'easy-digital-downloads' ), + ); + } + + /** + * Query data for the list table. + * + * @since 3.0 + * + * @return array $data All the data for the list table. + */ + public function get_data() { + global $wpdb; + + $data = array(); + $tax_rates = edd_get_tax_rates( array(), OBJECT ); + $date_filter = Reports\get_filter_value( 'dates' ); + $date_range = Reports\parse_dates_for_range( $date_filter['range'] ); + $currency = Reports\get_filter_value( 'currencies' ); + $convert_currency = empty( $currency ) || 'convert' === $currency; + $format_currency = $convert_currency ? edd_get_currency() : strtoupper( $currency ); + + // Date query. + $date_query = ''; + + if ( ! empty( $date_range['start'] ) && '0000-00-00 00:00:00' !== $date_range['start'] ) { + $date_query .= $wpdb->prepare( " AND {$wpdb->edd_orders}.date_created >= %s", esc_sql( $date_range['start']->format( 'mysql' ) ) ); + } + + if ( ! empty( $date_range['end'] ) && '0000-00-00 00:00:00' !== $date_range['end'] ) { + $date_query .= $wpdb->prepare( " AND {$wpdb->edd_orders}.date_created <= %s", esc_sql( $date_range['end']->format( 'mysql' ) ) ); + } + + $tax_column = $convert_currency ? 'tax / rate' : 'tax'; + $total_column = $convert_currency ? 'total / rate' : 'total'; + + $currency_sql = ''; + if ( ! $convert_currency && array_key_exists( strtoupper( $currency ), edd_get_currencies() ) ) { + $currency_sql = $wpdb->prepare( " AND currency = %s ", strtoupper( $currency ) ); + } + + /* + * We need to first calculate the total tax collected for all orders so we can determine the amount of tax collected for the global rate + * + * The total determined here will be reduced by the amount collected for each specified tax rate/region. + */ + $all_orders = $wpdb->get_results( " + SELECT SUM({$tax_column}) as tax, SUM({$total_column}) as total + FROM {$wpdb->edd_orders} + WHERE 1=1 {$currency_sql} {$date_query} + ", ARRAY_A ); + + foreach ( $tax_rates as $tax_rate ) { + + $country_region = $tax_rate->name . '-' . $tax_rate->description; + + if ( array_key_exists( $country_region, $data ) ) { + continue; // We've already pulled numbers for this country / region + } + + $location = edd_get_country_name( $tax_rate->name ); + + if ( ! empty( $tax_rate->description ) ) { + $location .= ' — ' . edd_get_state_name( $tax_rate->name, $tax_rate->description ); + } + + $region = ! empty( $tax_rate->description ) + ? $wpdb->prepare( ' AND region = %s', esc_sql( $tax_rate->description ) ) + : ''; + + $results = $wpdb->get_results( $wpdb->prepare( " + SELECT SUM($tax_column) as tax, SUM($total_column) as total, country, region + FROM {$wpdb->edd_orders} + INNER JOIN {$wpdb->edd_order_addresses} ON {$wpdb->edd_order_addresses}.order_id = {$wpdb->edd_orders}.id + WHERE {$wpdb->edd_order_addresses}.country = %s {$region} {$date_query} {$currency_sql} + ", esc_sql( $tax_rate->name ) ), ARRAY_A ); + + $all_orders[0]['tax'] -= $results[0]['tax']; + $all_orders[0]['total'] -= $results[0]['total']; + + $data[ $country_region ] = array( + 'country' => $location, + 'gross' => edd_currency_filter( edd_format_amount( floatval( $results[0]['total'] ) ), $format_currency ), + 'tax' => edd_currency_filter( edd_format_amount( floatval( $results[0]['tax'] ) ), $format_currency ), + 'net' => edd_currency_filter( edd_format_amount( floatval( $results[0]['total'] - $results[0]['tax'] ) ), $format_currency ), + ); + } + + if ( $all_orders[0]['total'] > 0 && $all_orders[0]['tax'] > 0 ) { + + $data['global'] = array( + 'country' => __( 'Global Rate', 'easy-digital-downloads' ), + 'gross' => edd_currency_filter( edd_format_amount( floatval( max( 0, $all_orders[0]['total'] ) ) ), $format_currency ), + 'tax' => edd_currency_filter( edd_format_amount( floatval( max( 0, $all_orders[0]['tax'] ) ) ), $format_currency ), + 'net' => edd_currency_filter( edd_format_amount( floatval( max( 0, $all_orders[0]['total'] - $all_orders[0]['tax'] ) ) ), $format_currency ), + ); + + } + + return $data; + } + + /** + * Setup the final data for the table + * + * @since 1.5 + * @uses EDD_Gateway_Reports_Table::get_columns() + * @uses EDD_Gateway_Reports_Table::get_sortable_columns() + * @uses EDD_Gateway_Reports_Table::reports_data() + * @return void + */ + public function prepare_items() { + $columns = $this->get_columns(); + $hidden = array(); // No hidden columns + $sortable = $this->get_sortable_columns(); + $this->_column_headers = array( $columns, $hidden, $sortable ); + $this->items = $this->get_data(); + } + + /** + * Return empty array to disable sorting. + * + * @since 3.0 + * + * @return array + */ + public function get_sortable_columns() { + return array(); + } + + /** + * Return empty array to remove bulk actions. + * + * @since 3.0 + * + * @return array + */ + public function get_bulk_actions() { + return array(); + } + + /** + * Hide pagination. + * + * @since 3.0 + * + * @param string $which + */ + protected function pagination( $which ) { + + } + + /** + * Hide table navigation. + * + * @since 3.0 + * + * @param string $which + */ + protected function display_tablenav( $which ) { + + } +} diff --git a/includes/reports/exceptions/class-invalid-parameter.php b/includes/reports/exceptions/class-invalid-parameter.php new file mode 100644 index 00000000000..8f9b66ce973 --- /dev/null +++ b/includes/reports/exceptions/class-invalid-parameter.php @@ -0,0 +1,43 @@ +utils->get_registry( 'reports:endpoints' ); + + if ( empty( $registry ) || is_wp_error( $registry ) ) { + return false; + } + + try { + $added = $registry->register_endpoint( $endpoint_id, $attributes ); + + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + + $added = false; + } + + return $added; +} + +/** + * Retrieves and builds an endpoint object. + * + * @since 3.0 + * + * @see \EDD\Reports\Data\Endpoint_Registry::build_endpoint() + * + * @param string $endpoint_id Endpoint ID. + * @param string $view_type View type to use when building the object. + * @return Data\Endpoint|\WP_Error Endpoint object on success, otherwise a WP_Error object. + */ +function get_endpoint( $endpoint_id, $view_type ) { + + /** @var Data\Endpoint_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports:endpoints' ); + + if ( empty( $registry ) || is_wp_error( $registry ) ) { + return $registry; + } + + return $registry->build_endpoint( $endpoint_id, $view_type ); +} + +/** + * Registers a new report. + * + * @since 3.0 + * + * @see \EDD\Reports\Data\Report_Registry::add_report() + * + * @param string $report_id Report ID. + * @param array $attributes { + * Reports attributes. All arguments are required unless otherwise noted. + * + * @type string $label Report label. + * @type int $priority Optional. Priority by which to register the report. Default 10. + * @type array $filters Filters available to the report. + * @type array $endpoints Endpoints to associate with the report. + * } + * @return bool True if the report was successfully registered, otherwise false. + */ +function add_report( $report_id, $attributes ) { + + /** @var Data\Report_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports' ); + + if ( empty( $registry ) || is_wp_error( $registry ) ) { + return false; + } + + try { + $added = $registry->add_report( $report_id, $attributes ); + + } catch ( \EDD_Exception $exception ) { + edd_debug_log_exception( $exception ); + + $added = false; + } + + return $added; +} + +/** + * Retrieves and builds a report object. + * + * @since 3.0 + * + * @see \EDD\Reports\Data\Report_Registry::build_report() + * + * @param string $report_id Report ID. + * @param bool $build_endpoints Optional. Whether to build the endpoints (includes registering + * any endpoint dependencies, such as registering meta boxes). + * Default true. + * @return Data\Report|\WP_Error Report object on success, otherwise a WP_Error object. + */ +function get_report( $report_id = false, $build_endpoints = true ) { + + /** @var Data\Report_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports' ); + + if ( empty( $registry ) || is_wp_error( $registry ) ) { + return $registry; + } + + return $registry->build_report( $report_id, $build_endpoints ); +} + +/** Sections ******************************************************************/ + +/** + * Retrieves the list of slug/label report pairs. + * + * @since 3.0 + * + * @return array List of reports, otherwise an empty array. + */ +function get_reports() { + + /** @var Data\Report_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports' ); + + if ( empty( $registry ) || is_wp_error( $registry ) ) { + return array(); + } else { + $reports = $registry->get_reports( 'priority', 'core' ); + } + + // Re-sort by priority. + uasort( $reports, array( $registry, 'priority_sort' ) ); + + /** + * Filters the list of report slug/label pairs. + * + * @since 3.0 + * + * @param array $reports List of slug/label pairs as representative of reports. + */ + return apply_filters( 'edd_get_reports', $reports ); +} + +/** + * Retrieves the slug for the active report. + * + * @since 3.0 + * + * @return string The active report, or the 'overview' report if no view defined + */ +function get_current_report() { + /** + * Filters the default report view. + * + * Due to the reports being registered later on, we cannot validate this, however, the reports do gracefully fail + * and redirect the user back to the `overview` report if someone supplies a bad value in the filter. + * + * @since 3.3.0 + * + * @param string $default_report_view The default report view. + */ + $default_report_view = apply_filters( 'edd_default_report_view', 'overview' ); + + return isset( $_REQUEST['view'] ) + ? sanitize_key( $_REQUEST['view'] ) + : $default_report_view; +} + +/** Endpoints *****************************************************************/ + +/** + * Retrieves the list of supported endpoint view types and their attributes. + * + * @since 3.0 + * + * @return array List of supported endpoint types. + */ +function get_endpoint_views() { + if ( ! did_action( 'edd_reports_init' ) ) { + _doing_it_wrong( __FUNCTION__, 'Endpoint views cannot be retrieved prior to the firing of the edd_reports_init hook.', 'EDD 3.0' ); + + return array(); + } + + /** @var Data\Endpoint_View_Registry|\WP_Error $registry */ + $registry = EDD()->utils->get_registry( 'reports:endpoints:views' ); + + if ( empty( $registry ) || is_wp_error( $registry ) ) { + return array(); + } else { + $views = $registry->get_endpoint_views(); + } + + return $views; +} + +/** + * Retrieves the name of the handler class for a given endpoint view. + * + * @since 3.0 + * + * @param string $view Endpoint view. + * @return string Handler class name if set and the view exists, otherwise an empty string. + */ +function get_endpoint_handler( $view ) { + $views = get_endpoint_views(); + + return isset( $views[ $view ]['handler'] ) + ? $views[ $view ]['handler'] + : ''; +} + +/** + * Retrieves the group display callback for a given endpoint view. + * + * @since 3.0 + * + * @param string $view Endpoint view. + * @return string Group callback if set, otherwise an empty string. + */ +function get_endpoint_group_callback( $view ) { + $views = get_endpoint_views(); + + return isset( $views[ $view ]['group_callback'] ) + ? $views[ $view ]['group_callback'] + : ''; +} + +/** + * Determines whether an endpoint view is valid. + * + * @since 3.0 + * + * @param string $view Endpoint view slug. + * @return bool True if the view is valid, otherwise false. + */ +function validate_endpoint_view( $view ) { + return array_key_exists( $view, get_endpoint_views() ); +} + +/** + * Parses views for an incoming endpoint. + * + * @since 3.0 + * + * @see get_endpoint_views() + * + * @param array $views View slugs and attributes as dictated by get_endpoint_views(). + * + * @return array (Maybe) adjusted views slugs and attributes array. + */ +function parse_endpoint_views( $views ) { + $valid_views = get_endpoint_views(); + + foreach ( $views as $view => $attributes ) { + if ( ! empty( $valid_views[ $view ]['fields'] ) ) { + $fields = $valid_views[ $view ]['fields']; + + // Merge the incoming args with the field defaults. + $view_args = wp_parse_args( $attributes, $fields ); + + // Overwrite the view attributes, keeping only the valid fields. + $views[ $view ] = array_intersect_key( $view_args, $fields ); + + if ( $views[ $view ]['display_callback'] === $fields['display_callback'] ) { + $views[ $view ]['display_args'] = wp_parse_args( $views[ $view ]['display_args'], $fields['display_args'] ); + } + } + } + + return $views; +} + +/** Filters *******************************************************************/ + +/** + * Retrieves the list of registered reports filters and their attributes. + * + * @since 3.0 + * + * @return array List of supported endpoint filters. + */ +function get_filters() { + $filters = array( + 'dates' => array( + 'label' => __( 'Date', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_dates_filter' + ), + 'products' => array( + 'label' => __( 'Products', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_products_filter' + ), + 'product_categories' => array( + 'label' => __( 'Product Categories', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_product_categories_filter' + ), + 'taxes' => array( + 'label' => __( 'Exclude Taxes', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_taxes_filter' + ), + 'gateways' => array( + 'label' => __( 'Gateways', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_gateways_filter' + ), + 'discounts' => array( + 'label' => __( 'Discounts', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_discounts_filter' + ), + 'regions' => array( + 'label' => __( 'Regions', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_region_filter' + ), + 'countries' => array( + 'label' => __( 'Countries', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_country_filter' + ), + 'currencies' => array( + 'label' => __( 'Currencies', 'easy-digital-downloads' ), + 'display_callback' => __NAMESPACE__ . '\\display_currency_filter' + ) + ); + + /** + * Filters the list of available report filters. + * + * @since 3.0 + * + * @param array[] $filters + */ + return apply_filters( 'edd_report_filters', $filters ); +} + +/** + * Determines whether the given filter is valid. + * + * @since 3.0 + * + * @param string $filter Filter key. + * @return bool True if the filter is valid, otherwise false. + */ +function validate_filter( $filter ) { + return array_key_exists( $filter, get_filters() ); +} + +/** + * Retrieves the value of an endpoint filter for the current session and report. + * + * @since 3.0 + * + * @param string $filter Filter key to retrieve the value for. + * @return mixed|string Value of the filter if it exists, otherwise an empty string. + */ +function get_filter_value( $filter ) { + $value = ''; + + // Bail if filter does not validate + if ( ! validate_filter( $filter ) ) { + return $value; + } + + switch ( $filter ) { + // Handle dates. + case 'dates': + /** + * Default date range. + * + * @since 3.3.0 + * + * @param string $default_range Default date range. + */ + $default_range = apply_filters( 'edd_reports_default_date_range', 'this_month' ); + + // If the default range is not valid, default to 'this_month'. + if ( ! array_key_exists( $default_range, get_dates_filter_options() ) ) { + $default_range = 'this_month'; + } + + /** + * Default relative date range. + * + * @since 3.3.0 + * + * @param string $default_relative_range Default relative date range. + */ + $default_relative_range = apply_filters( 'edd_reports_default_relative_date_range', 'previous_period' ); + + // If the default relative range is not valid, default to 'previous_period'. + if ( ! array_key_exists( $default_relative_range, get_relative_dates_filter_options() ) ) { + $default_relative_range = 'previous_period'; + } + + if ( ! isset( $_GET['range'] ) ) { + $dates = parse_dates_for_range( $default_range ); + $value = array( + 'range' => $default_range, + 'relative_range' => $default_relative_range, + 'from' => $dates['start']->format( 'Y-m-d' ), + 'to' => $dates['end']->format( 'Y-m-d' ), + ); + } else { + $value = array( + 'range' => isset( $_GET['range'] ) + ? sanitize_text_field( $_GET['range'] ) + : $default_range, + 'relative_range' => isset( $_GET['relative_range'] ) + ? sanitize_text_field( $_GET['relative_range'] ) + : $default_relative_range, + 'from' => isset( $_GET['filter_from'] ) + ? sanitize_text_field( $_GET['filter_from'] ) + : '', + 'to' => isset( $_GET['filter_to'] ) + ? sanitize_text_field( $_GET['filter_to'] ) + : '' + ); + } + + break; + + // Handle taxes. + case 'taxes': + $value = array(); + + if ( isset( $_GET['exclude_taxes'] ) ) { + $value['exclude_taxes'] = true; + } + + break; + + // Handle default (direct from URL). + default: + $value = isset( $_GET[ $filter ] ) + ? sanitize_text_field( $_GET[ $filter ] ) + : ''; + + /** + * Filters the value of a report filter. + * + * @since 3.0 + * + * @param string $value Report filter value. + * @param string $filter Report filter. + */ + $value = apply_filters( 'edd_reports_get_filter_value', $value, $filter ); + } + + return $value; +} + +/** + * Returns a list of registered report filters that should be persisted across views. + * + * @since 3.0 + * + * @return array + */ +function get_persisted_filters() { + $filters = array( + 'range', + 'relative_range', + 'filter_from', + 'filter_to', + 'exclude_taxes', + ); + + /** + * Filters registered report filters that should be persisted across views. + * + * @since 3.0 + * + * @param array $filters List of registered filters to persist. + */ + $filters = apply_filters( 'edd_reports_get_persisted_filters', $filters ); + + return $filters; +} + +/** + * Retrieves key/label pairs of date filter options for use in a drop-down. + * + * @since 3.0 + * + * @return array Key/label pairs of date filter options. + */ +function get_dates_filter_options() { + static $options = null; + + if ( is_null( $options ) ) { + $options = array( + 'other' => __( 'Custom', 'easy-digital-downloads' ), + 'today' => __( 'Today', 'easy-digital-downloads' ), + 'yesterday' => __( 'Yesterday', 'easy-digital-downloads' ), + 'this_week' => __( 'This Week', 'easy-digital-downloads' ), + 'last_week' => __( 'Last Week', 'easy-digital-downloads' ), + 'last_30_days' => __( 'Last 30 Days', 'easy-digital-downloads' ), + 'this_month' => __( 'Month to Date', 'easy-digital-downloads' ), + 'last_month' => __( 'Last Month', 'easy-digital-downloads' ), + 'this_quarter' => __( 'Quarter to Date', 'easy-digital-downloads' ), + 'last_quarter' => __( 'Last Quarter', 'easy-digital-downloads' ), + 'this_year' => __( 'Year to Date', 'easy-digital-downloads' ), + 'last_year' => __( 'Last Year', 'easy-digital-downloads' ), + ); + } + + /** + * Filters the list of key/label pairs of date filter options. + * + * @since 1.3 + * + * @param array $date_options Date filter options. + */ + return apply_filters( 'edd_report_date_options', $options ); +} + + +/** + * Retrieves the default relative range key for a specific range. + * + * @since 3.1 + * + * @return string Relative date range key. + */ +function get_default_relative_range( $range ) { + + switch ( $range ) { + case 'this_month': + case 'last_month': + $relative_range = 'previous_month'; + break; + + case 'this_quarter': + case 'last_quarter': + $relative_range = 'previous_quarter'; + break; + + case 'this_year': + case 'last_year': + $relative_range = 'previous_year'; + break; + + default: + $relative_range = 'previous_period'; + break; + } + + return $relative_range; +} + + +/** + * Retrieves key/label pairs of relative date filter options for use in a drop-down. + * + * @since 3.1 + * + * @return array Key/label pairs of relative date filter options. + */ +function get_relative_dates_filter_options() { + static $options = null; + + if ( is_null( $options ) ) { + $options = array( + 'previous_period' => __( 'Previous period', 'easy-digital-downloads' ), + 'previous_month' => __( 'Previous month', 'easy-digital-downloads' ), + 'previous_quarter' => __( 'Previous quarter', 'easy-digital-downloads' ), + 'previous_year' => __( 'Previous year', 'easy-digital-downloads' ), + ); + } + + return $options; +} + +/** + * Retrieves the start and end date filters for use with the Reports API. + * + * @since 3.0 + * + * @param string $values Optional. What format to retrieve dates in the resulting array in. + * Accepts 'strings' or 'objects'. Default 'strings'. + * @param string $timezone Optional. Timezone to force for filter dates. Primarily used for + * legacy testing purposes. Default empty. + * @return array|\EDD\Utils\Date[] { + * Query date range for the current graph filter request. + * + * @type string|\EDD\Utils\Date $start Start day and time (based on the beginning of the given day). + * If `$values` is 'objects', a Carbon object, otherwise a date + * time string. + * @type string|\EDD\Utils\Date $end End day and time (based on the end of the given day). If `$values` + * is 'objects', a Carbon object, otherwise a date time string. + * } + */ +function get_dates_filter( $values = 'strings', $timezone = null ) { + $dates = parse_dates_for_range(); + + if ( 'strings' === $values ) { + if ( ! empty( $dates['start'] ) ) { + $dates['start'] = $dates['start']->toDateTimeString(); + } + if ( ! empty( $dates['end'] ) ) { + $dates['end'] = $dates['end']->toDateTimeString(); + } + } + + /** + * Filters the start and end date filters for use with the Graphs API. + * + * @since 3.0 + * + * @param array|\EDD\Utils\Date[] $dates { + * Query date range for the current graph filter request. + * + * @type string|\EDD\Utils\Date $start Start day and time (based on the beginning of the given day). + * If `$values` is 'objects', a Date object, otherwise a date + * time string. + * @type string|\EDD\Utils\Date $end End day and time (based on the end of the given day). If `$values` + * is 'objects', a Date object, otherwise a date time string. + * } + */ + return apply_filters( 'edd_get_dates_filter', $dates ); +} + +/** + * Parses start and end dates for the given range. + * + * @since 3.0 + * + * @param string $range Optional. Range value to generate start and end dates for against `$date`. + * Default is the current range as derived from the session. + * @param string $date Date string converted to `\EDD\Utils\Date` to anchor calculations to. + * @param bool $convert_to_utc Optional. If we should convert the results to UTC for Database Queries + * @return \EDD\Utils\Date[] Array of start and end date objects. + */ +function parse_dates_for_range( $range = null, $date = 'now', $convert_to_utc = true ) { + + // Set the time ranges in the user's timezone, so they ultimately see them in their own timezone. + $date = EDD()->utils->date( $date, null, true ); + + if ( null === $range || ! array_key_exists( $range, get_dates_filter_options() ) ) { + $range = get_dates_filter_range(); + } + + switch ( $range ) { + + case 'this_month': + $dates = array( + 'start' => $date->copy()->startOfMonth(), + 'end' => $date->copy()->endOfDay(), + ); + break; + + case 'last_month': + $dates = array( + 'start' => $date->copy()->subMonthNoOverflow( 1 )->startOfMonth(), + 'end' => $date->copy()->subMonthNoOverflow( 1 )->endOfMonth(), + ); + break; + + case 'today': + $dates = array( + 'start' => $date->copy()->startOfDay(), + 'end' => $date->copy()->endOfDay(), + ); + break; + + case 'yesterday': + $dates = array( + 'start' => $date->copy()->subDay( 1 )->startOfDay(), + 'end' => $date->copy()->subDay( 1 )->endOfDay(), + ); + break; + + case 'this_week': + $dates = array( + 'start' => $date->copy()->startOfWeek(), + 'end' => $date->copy()->endOfDay(), + ); + break; + + case 'last_week': + $dates = array( + 'start' => $date->copy()->subWeek( 1 )->startOfWeek(), + 'end' => $date->copy()->subWeek( 1 )->endOfWeek(), + ); + break; + + case 'last_30_days': + $dates = array( + 'start' => $date->copy()->subDay( 30 )->startOfDay(), + 'end' => $date->copy()->endOfDay(), + ); + break; + + case 'this_quarter': + $dates = array( + 'start' => $date->copy()->startOfQuarter(), + 'end' => $date->copy()->endOfDay(), + ); + break; + + case 'last_quarter': + $dates = array( + 'start' => $date->copy()->subQuarter( 1 )->startOfQuarter(), + 'end' => $date->copy()->subQuarter( 1 )->endOfQuarter(), + ); + break; + + case 'this_year': + $dates = array( + 'start' => $date->copy()->startOfYear(), + 'end' => $date->copy()->endOfDay(), + ); + break; + + case 'last_year': + $dates = array( + 'start' => $date->copy()->subYear( 1 )->startOfYear(), + 'end' => $date->copy()->subYear( 1 )->endOfYear(), + ); + break; + + case 'other': + default: + $dates_from_report = get_filter_value( 'dates' ); + + if ( ! empty( $dates_from_report ) ) { + $start = $dates_from_report['from']; + $end = $dates_from_report['to']; + } else { + $start = $end = 'now'; + } + + $dates = array( + 'start' => EDD()->utils->date( $start )->startOfDay(), + 'end' => EDD()->utils->date( $end )->endOfDay(), + ); + break; + } + + if ( $convert_to_utc ) { + // Convert the values to the UTC equivalent so that we can query the database using UTC. + $dates['start'] = edd_get_utc_equivalent_date( $dates['start'] ); + $dates['end'] = edd_get_utc_equivalent_date( $dates['end'] ); + } + + $dates['range'] = $range; + + return $dates; +} + +/** + * Parses relative start and end dates for the given range. + * + * @since 3.1 + * + * @param string $range Optional. Range value to generate start and end dates for against `$date`. + * @param string $relative_range Optional. Range value to generate relative start and end dates for against `$date`. + * Default is the current range as derived from the session. + * @param string $date Date string converted to `\EDD\Utils\Date` to anchor calculations to. + * @param bool $convert_to_utc Optional. If we should convert the results to UTC for Database Queries + * @return \EDD\Utils\Date[] Array of start and end date objects. + */ +function parse_relative_dates_for_range( $range = null, $relative_range = null, $date = 'now', $convert_to_utc = true ) { + + + if ( null === $range || ! array_key_exists( $range, get_dates_filter_options() ) ) { + $range = get_dates_filter_range(); + } + + if ( null === $relative_range || ! array_key_exists( $relative_range, get_relative_dates_filter_options() ) ) { + $relative_range = get_relative_dates_filter_range(); + } + + $dates = parse_dates_for_range( $range, $date, false ); + + switch ( $relative_range ) { + case 'previous_period': + $days_diff = $dates['start']->copy()->diffInDays( $dates['end'], true ) + 1; + $dates = array( + 'start' => $dates['start']->copy()->subDays( $days_diff ), + 'end' => $dates['end']->copy()->subDays( $days_diff ), + ); + break; + case 'previous_month': + $dates = array( + 'start' => $dates['start']->copy()->subMonth( 1 ), + 'end' => $dates['end']->copy()->subMonthNoOverflow( 1 ), + ); + break; + case 'previous_quarter': + $dates = array( + 'start' => $dates['start']->copy()->subQuarter( 1 ), + 'end' => $dates['end']->copy()->subQuarter( 1 ), + ); + break; + case 'previous_year': + $dates = array( + 'start' => $dates['start']->copy()->subYear( 1 ), + 'end' => $dates['end']->copy()->subYear( 1 ), + ); + break; + } + + if ( $convert_to_utc ) { + // Convert the values to the UTC equivalent so that we can query the database using UTC. + $dates['start'] = edd_get_utc_equivalent_date( $dates['start'] ); + $dates['end'] = edd_get_utc_equivalent_date( $dates['end'] ); + } + + $dates['range'] = $range; + + return $dates; +} + +/** + * Retrieves the date filter range. + * + * @since 3.0 + * + * @return string Date filter range. + */ +function get_dates_filter_range() { + + $dates = get_filter_value( 'dates' ); + + if ( isset( $dates['range'] ) ) { + $range = sanitize_key( $dates['range'] ); + + } else { + + /** + * Filters the report dates default range. + * + * @since 1.3 + * + * @param string $range Date range as derived from the session. Default 'last_30_days' + * @param array $dates Dates filter data array. + */ + $range = apply_filters( 'edd_get_report_dates_default_range', 'this_month', $dates ); + } + + /** + * Filters the dates filter range. + * + * @since 3.0 + * + * @param string $range Dates filter range. + * @param array $dates Dates filter data array. + */ + return apply_filters( 'edd_get_dates_filter_range', $range, $dates ); +} + + +/** + * Retrieves the date filter for relative range. + * + * @since 3.1 + * + * @return string Date filter range. + */ +function get_relative_dates_filter_range() { + + $dates = get_filter_value( 'dates' ); + + if ( isset( $dates['relative_range'] ) ) { + $relative_range = sanitize_key( $dates['relative_range'] ); + } else { + + /** + * Filters the report dates default range. + * + * @since 3.1 + * + * @param string $range Relative daate range as derived from the session. Default 'previous_period' + * @param array $dates Dates filter data array. + */ + $relative_range = apply_filters( 'edd_get_report_dates_default_relative_range', 'previous_period', $dates ); + } + + /** + * Filters the dates filter range. + * + * @since 3.1 + * + * @param string $range Dates filter relative range. + * @param array $dates Dates filter data array. + */ + return apply_filters( 'edd_get_dates_filter_relative_range', $relative_range, $dates ); +} + +/** + * Determines whether results should be displayed hour by hour, or not. + * + * @since 3.0 + * + * @return bool True if results should use hour by hour, otherwise false. + */ +function get_dates_filter_hour_by_hour() { + $hour_by_hour = false; + + // Retrieve the queried dates. + $dates = get_dates_filter( 'objects' ); + + // Determine graph options. + switch ( $dates['range'] ) { + case 'today': + case 'yesterday': + $hour_by_hour = true; + break; + case 'this_week': + case 'this_month': + case 'this_quarter': + case 'this_year': + case 'other': + $difference = ( $dates['end']->getTimestamp() - $dates['start']->getTimestamp() ); + if ( $difference <= ( DAY_IN_SECONDS * 2 ) ) { + $hour_by_hour = true; + } + break; + default: + $hour_by_hour = false; + break; + } + + return $hour_by_hour; +} + +/** + * Determines whether results should be displayed day by day or not. + * + * @since 3.0 + * + * @return bool True if results should use day by day, otherwise false. + */ +function get_dates_filter_day_by_day() { + // Retrieve the queried dates + $dates = get_dates_filter( 'objects' ); + + // Determine graph options + switch ( $dates['range'] ) { + case 'today': + case 'yesterday': + case 'this_year': + case 'last_year': + $day_by_day = false; + break; + case 'other': + $difference = ( $dates['end']->getTimestamp() - $dates['start']->getTimestamp() ); + + if ( $difference >= ( YEAR_IN_SECONDS / 4 ) ) { + $day_by_day = false; + } else { + $day_by_day = true; + } + break; + default: + $day_by_day = true; + break; + } + + return $day_by_day; +} + +/** + * Gets the period for a graph. + * + * @since 3.1.1.4 + * @return string + */ +function get_graph_period() { + if ( get_dates_filter_hour_by_hour() ) { + return 'hour'; + } + if ( get_dates_filter_day_by_day() ) { + return 'day'; + } + + return 'month'; +} + +/** + * Gets the SQL clauses. + * The result of this function should be run through $wpdb->prepare(). + * + * @since 3.1.1.4 + * @param string $period The period for the query. + * @param string $column The column to query. + * @return array + */ +function get_sql_clauses( $period, $column = 'date_created' ) { + + // Get the date for the query. + $converted_date = get_column_conversion( $column ); + + switch ( $period ) { + case 'hour': + $date_format = '%%Y-%%m-%%d %%H:00:00'; + break; + case 'day': + $date_format = '%%Y-%%m-%%d'; + break; + default: + $date_format = '%%Y-%%m'; + break; + } + + return array( + 'select' => "DATE_FORMAT({$converted_date}, \"{$date_format}\") AS date", + 'where' => '', + 'groupby' => 'date', + 'orderby' => 'date', + ); +} + +/** + * Given a function and column, make a timezone converted groupby query. + * + * @since 3.0 + * @since 3.0.4 If MONTH is passed as the function, always add YEAR and MONTH + * to avoid issues with spanning multiple years. + * @since 3.1.1.4 This function isn't needed anymore due to using DATE_FORMAT in the select clause. + * + * @param string $function The function to run the value through, like DATE, HOUR, MONTH. + * @param string $column The column to group by. + * + * @return string + */ +function get_groupby_date_string( $function = 'DATE', $column = 'date_created' ) { + /** + * If there is no offset, the default column will be returned. + * Otherwise, the column will be converted to the timezone offset. + */ + $column_conversion = get_column_conversion( $column ); + + $function = strtoupper( $function ); + switch ( $function ) { + case 'HOUR': + $group_by_string = "DAY({$column_conversion}), HOUR({$column_conversion})"; + break; + case 'MONTH': + $group_by_string = "YEAR({$column_conversion}), MONTH({$column_conversion})"; + break; + default: + $group_by_string = "{$function}({$column_conversion})"; + break; + } + + return $group_by_string; +} + +/** + * Get the time zone converted dates for the query. + * + * @since 3.1.1.4 + * @param string $column + * @return string + */ +function get_column_conversion( $column = 'date_created' ) { + $date = EDD()->utils->date( 'now', edd_get_timezone_id(), false ); + $gmt_offset = $date->getOffset(); + if ( empty( $gmt_offset ) ) { + return $column; + } + + // Output the offset in the proper format. + $hours = abs( floor( $gmt_offset / HOUR_IN_SECONDS ) ); + $minutes = abs( floor( ( $gmt_offset / MINUTE_IN_SECONDS ) % MINUTE_IN_SECONDS ) ); + $math = ( $gmt_offset >= 0 ) ? '+' : '-'; + + $formatted_offset = ! empty( $minutes ) ? "{$hours}:{$minutes}" : $hours . ':00'; + + /** + * There is a limitation here that we cannot get past due to MySQL not having timezone information. + * + * When a requested date group spans the DST change. For instance, a 6 month graph will have slightly + * different results for each month than if you pulled each of those 6 months individually. This is because + * our 'grouping' can only convert the timezone based on the current offset and that can change if the + * range spans the DST break, which would have some dates be in a +/- 1 hour state. + * + * @see https://github.com/awesomemotive/easy-digital-downloads/pull/9449 + */ + return "CONVERT_TZ({$column}, '+00:00', '{$math}{$formatted_offset}')"; +} + +/** + * Retrieves the tax exclusion filter. + * + * @since 3.0 + * + * @return bool True if taxes should be excluded from calculations. + */ +function get_taxes_excluded_filter() { + $taxes = get_filter_value( 'taxes' ); + + if ( ! isset( $taxes['exclude_taxes'] ) ) { + return false; + } + + return (bool) $taxes['exclude_taxes']; +} + +/** Display *******************************************************************/ + +/** + * Handles display of a report. + * + * @since 3.0 + * + * @param Data\Report $report Report object. + */ +function default_display_report( $report ) { + + // Bail if erroneous report + if ( empty( $report ) || is_wp_error( $report ) ) { + return; + } + + // Try to output: tiles, tables, and charts + $report->display_endpoint_group( 'tiles' ); + $report->display_endpoint_group( 'tables' ); + $report->display_endpoint_group( 'charts' ); +} + +/** + * Displays the default content for a tile endpoint. + * + * @since 3.0 + * + * @param Data\Report $report Report object the tile endpoint is being rendered in. + * Not always set. + * @param array $tile { + * Tile display arguments. + * + * @type Data\Tile_Endpoint $endpoint Endpoint object. + * @type mixed|array $data Date for display. By default, will be an array, + * but can be of other types. + * @type array $display_args Array of any display arguments. + * } + * @return void Meta box display callbacks only echo output. + */ +function default_display_tile( $endpoint, $data, $args ) { + echo '
    ' . esc_html( $endpoint->get_label() ) . '
    '; + + if ( empty( $data ) ) { + echo '
    '; + } else { + switch ( $args['type'] ) { + case 'number': + echo '
    ' . edd_format_amount( $data ) . '
    '; + break; + + case 'split-number': + printf( '
    %1$d / %2$d
    ', + edd_format_amount( $data['first_value'] ), + edd_format_amount( $data['second_value'] ) + ); + break; + + case 'split-amount': + printf( '
    %1$d / %2$d
    ', + edd_currency_filter( edd_format_amount( $data['first_value'] ) ), + edd_currency_filter( edd_format_amount( $data['second_value'] ) ) + ); + break; + + case 'relative': + $direction = ( ! empty( $data['direction'] ) && in_array( $data['direction'], array( 'up', 'down' ), true ) ) + ? '-' . sanitize_key( $data['direction'] ) + : ''; + echo '
    ' . edd_format_amount( $data['value'] ) . '
    '; + break; + + case 'amount': + echo '
    ' . edd_currency_filter( edd_format_amount( $data ) ) . '
    '; + break; + + case 'url': + echo '
    ' . esc_url( $data ) . '
    '; + break; + + default: + $tags = wp_kses_allowed_html( 'post' ); + echo '
    ' . wp_kses( $data, $tags ) . '
    '; + break; + } + } + + if ( ! empty( $args['comparison_label'] ) ) { + echo '
    ' . esc_attr( $args['comparison_label'] ) . '
    '; + } +} + +/** + * Handles default display of all tile endpoints registered against a report. + * + * @since 3.0 + * + * @param Data\Report $report Report object. + */ +function default_display_tiles_group( $report ) { + if ( ! $report->has_endpoints( 'tiles' ) ) { + return; + } + + $tiles = $report->get_endpoints( 'tiles' ); +?> + +
    + $tile ) : + $tile->display(); + endforeach; + ?> +
    + + has_endpoints( 'tables' ) ) { + return; + } + + $tables = $report->get_endpoints( 'tables' ); ?> + +
    $table ) : + + ?>
    +

    get_label() ); ?>

    display(); + + ?>
    has_endpoints( 'charts' ) ) { + return; + } + + ?> +
    + get_endpoints( 'charts' ); + + foreach ( $charts as $endpoint_id => $chart ) { + ?> +
    +

    get_label() ); ?>

    + + display(); ?> +
    + +
    + +
    +
    + html->select( + array( + 'name' => 'range', + 'class' => 'edd-graphs-date-options', + 'options' => $range_options, + 'variations' => false, + 'show_option_all' => false, + 'show_option_none' => false, + 'selected' => $selected_range, + ) + ); + + $relative_range_select = EDD()->html->select( + array( + 'name' => 'relative_range', + 'class' => 'edd-graphs-relative-date-options', + 'options' => $relative_range_options, + 'variations' => false, + 'show_option_all' => false, + 'show_option_none' => false, + 'selected' => $selected_relative_range, + ) + ); + + // From. + $from = EDD()->html->date_field( + array( + 'id' => 'filter_from', + 'name' => 'filter_from', + 'value' => ( empty( $dates['from'] ) || ( 'other' !== $dates['range'] ) ) ? '' : $dates['from'], + 'placeholder' => _x( 'From', 'date filter', 'easy-digital-downloads' ), + ) + ); + + // To. + $to = EDD()->html->date_field( + array( + 'id' => 'filter_to', + 'name' => 'filter_to', + 'value' => ( empty( $dates['to'] ) || ( 'other' !== $dates['range'] ) ) ? '' : $dates['to'], + 'placeholder' => _x( 'To', 'date filter', 'easy-digital-downloads' ), + ) + ); + + // Output fields + ?> +
    + + +
    + +
    + $range_name ) : + $range_dates = \EDD\Reports\parse_dates_for_range( $range_key ); + $selected_range_class = ( $selected_range !== $range_key ) ? 'hidden' : ''; + $start_date = edd_get_edd_timezone_equivalent_date_from_utc( $range_dates['start'] )->format( $date_format ); + $end_date = edd_get_edd_timezone_equivalent_date_from_utc( $range_dates['end'] )->format( $date_format ); + $label = $start_date; + if ( $start_date !== $end_date ) { + $label = $start_date . ' - ' . $end_date; + } + ?> + + +
    +
    + +
    + + + + +
    + + + + +
    + +
    +
    +
    +
    + + + + +
      + $relative_range_name ) : + $relative_range_dates = \EDD\Reports\parse_relative_dates_for_range( $range, $relative_range_key ); + $selected_range_class = ( $selected_relative_range === $relative_range_key ) ? 'active' : ''; + ?> +
    • + + format( $date_format ) ); ?> - format( $date_format ) ); ?> +
    • + +
    + html->product_dropdown( array( + 'chosen' => true, + 'variations' => true, + 'selected' => empty( $products ) ? 0 : $products, + 'show_option_none' => false, + 'show_option_all' => sprintf( __( 'All %s', 'easy-digital-downloads' ), edd_get_label_plural() ), + ) ); ?> + + + + html->category_dropdown( 'product_categories', get_filter_value( 'product_categories' ) ); ?> + + + + + + array( 'code', 'name' ), + 'number' => 100, + 'status' => array( 'active', 'inactive', 'expired', 'archived' ), + ) ); + + $discounts = array(); + + foreach ( $d as $discount_data ) { + $discounts[ $discount_data->code ] = esc_html( $discount_data->name ); + } + + // Get the select + $select = EDD()->html->discount_dropdown( array( + 'name' => 'discounts', + 'chosen' => true, + 'selected' => empty( $discount ) ? 0 : $discount, + ) ); ?> + + $data ) { + $gateways[ $id ] = esc_html( $data['admin_label'] ); + } + + // Get the select + $select = EDD()->html->select( array( + 'name' => 'gateways', + 'options' => $gateways, + 'selected' => empty( $gateway ) ? 0 : $gateway, + 'show_option_none' => false, + ) ); ?> + + html->region_select( + array( + 'name' => 'regions', + 'id' => 'edd_reports_filter_regions', + 'options' => $regions, + ), + $country, + $region + ); + ?> + + html->country_select( + array( + 'name' => 'countries', + 'id' => 'edd_reports_filter_countries', + 'options' => $countries, + ), + $country + ); + ?> + + get_col( + "SELECT distinct currency FROM {$wpdb->edd_orders}" + ); + + if ( is_array( $order_currencies ) ) { + $order_currencies = array_filter( $order_currencies ); + } + + set_transient( 'edd_distinct_order_currencies', $order_currencies, 3 * HOUR_IN_SECONDS ); + } + + if ( ! is_array( $order_currencies ) || count( $order_currencies ) <= 1 ) { + return; + } + + $all_currencies = array_intersect_key( edd_get_currencies(), array_flip( $order_currencies ) ); + if ( array_key_exists( edd_get_currency(), $all_currencies ) ) { + $all_currencies = array_merge( + array( + /* translators: %s: Default currency of the store, in standard 3 character format (example: USD or EUR) */ + 'convert' => sprintf( __( '%s - Converted', 'easy-digital-downloads' ), $all_currencies[ edd_get_currency() ] ), + ), + $all_currencies + ); + } + ?> + + html->select( array( + 'name' => 'currencies', + 'id' => 'edd_reports_filter_currencies', + 'options' => $all_currencies, + 'selected' => $currency, + 'show_option_all' => false, + 'show_option_none' => false + ) ); + ?> + + 'edd-reports', + ) ); + ?> + +
    + +
    + + get_id(); + + // Bail if no report + if ( empty( $report_id ) ) { + return; + } + + $redirect_url = edd_get_admin_url( array( + 'page' => 'edd-reports', + 'view' => sanitize_key( $report_id ), + ) ); + + // Bail if no filters + $filters = $report->get_filters(); + if ( empty( $filters ) ) { + return; + } + + // Bail if no manifest + $manifest = get_filters(); + if ( empty( $manifest ) ) { + return; + } + + // Setup callables + $callables = array(); + + // Loop through filters and find the callables + foreach ( $filters as $filter ) { + + // Skip if empty + if ( empty( $manifest[ $filter ]['display_callback'] ) ) { + continue; + } + + // Skip if not callable + $callback = $manifest[ $filter ]['display_callback']; + if ( ! is_callable( $callback ) ) { + continue; + } + + // Add callable to callables + $callables[] = $callback; + } + + // Bail if no callables + if ( empty( $callables ) ) { + return; + } + + // Start an output buffer + ob_start(); + + // Call the callables in the buffer + foreach ( $callables as $to_call ) { + call_user_func( $to_call, $report ); + } ?> + + + + + + + + 'reports', + 'utm_content' => 'ios-app', + ) + ); + ?> + + + + + + $download_data['price_id'] ); + $price_name = edd_get_price_name( $download->ID, $args ); + if ( $price_name ) { + $download->post_title .= ': ' . $price_name; + } + } + + return esc_html( ' (' . $download->post_title . ')' ); +} diff --git a/includes/scripts.php b/includes/scripts.php index 2371e30ac1a..24e2d2825e7 100755 --- a/includes/scripts.php +++ b/includes/scripts.php @@ -2,161 +2,298 @@ /** * Scripts * - * @package Easy Digital Downloads - * @subpackage Scripts - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Functions + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 -*/ + * @since 1.0 + */ +// Exit if accessed directly. +defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore + +/** Front End *****************************************************************/ + +/** + * Register all front-end scripts + * + * @since 3.0 + */ +function edd_register_scripts() { + EDD\Assets\Checkout::register(); +} +add_action( 'init', 'edd_register_scripts' ); + +/** + * Register styles + * + * Checks the styles option and hooks the required filter. + * + * @since 1.0 + */ +function edd_register_styles() { + EDD\Assets\Styles::register(); +} +add_action( 'init', 'edd_register_styles' ); /** * Load Scripts * * Enqueues the required scripts. * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @since 3.0 calls edd_enqueue_scripts() + */ function edd_load_scripts() { + edd_enqueue_scripts(); + edd_localize_scripts(); +} +add_action( 'wp_enqueue_scripts', 'edd_load_scripts' ); - global $edd_options, $post; +/** + * Load Scripts + * + * Enqueues the required scripts. + * + * @since 3.0 + */ +function edd_enqueue_scripts() { - wp_enqueue_script('jquery'); - - // Get position in cart of current download - if(isset($post->ID)) { - $position = edd_get_item_position_in_cart($post->ID); - } - - // Load AJAX scripts, if enabled - if( edd_is_ajax_enabled()) { - wp_enqueue_script('edd-ajax', EDD_PLUGIN_URL . 'includes/js/edd-ajax.js'); - wp_localize_script('edd-ajax', 'edd_scripts', array( - 'ajaxurl' => admin_url( 'admin-ajax.php' ), - 'ajax_nonce' => wp_create_nonce( 'edd_ajax_nonce' ), - 'no_discount' => __('Please enter a discount code', 'edd'), // blank discount code message - 'discount_applied' => __('Discount Applied', 'edd'), // discount verified message - 'no_email' => __('Please enter an email address before applying a discount code', 'edd'), - 'position_in_cart' => isset($position) ? $position : -1, - 'already_in_cart_message' => __('You have already added this item to your cart', 'edd'), // item already in the cart message - 'empty_cart_message' => __('Your cart is empty', 'edd'), // item already in the cart message - 'loading' => __('Loading', 'edd') , // general loading message - 'ajax_loader' => EDD_PLUGIN_URL . 'includes/images/loading.gif', // ajax loading image - 'checkout_page' => isset($edd_options['purchase_page']) ? get_permalink($edd_options['purchase_page']) : '', - 'permalinks' => get_option( 'permalink_structure' ) ? '1' : '0' - ) - ); + // Checkout scripts. + if ( edd_is_checkout() ) { + EDD\Assets\Checkout::enqueue(); } - - // Load jQuery validation - if(isset($edd_options['jquery_validation']) && is_page($edd_options['purchase_page'])) { - wp_enqueue_script('jquery-validation', EDD_PLUGIN_URL . 'includes/js/jquery.validate.min.js'); - wp_enqueue_script('edd-validation', EDD_PLUGIN_URL . 'includes/js/form-validation.js'); - $required = array( 'firstname' => true, 'lastname' => true ); - wp_localize_script('edd-validation', 'edd_scripts_validation', apply_filters('edd_scripts_validation',$required)); + + // AJAX scripts, if enabled. + if ( ! edd_is_ajax_disabled() ) { + wp_enqueue_script( 'edd-ajax' ); } - wp_enqueue_script('edd-checkout-global', EDD_PLUGIN_URL . 'includes/js/edd-checkout-global.js'); } -add_action('wp_enqueue_scripts', 'edd_load_scripts'); - /** - * Register Styles + * Enqueue styles * * Checks the styles option and hooks the required filter. * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_register_styles() { - global $edd_options; - if(!isset($edd_options['disable_styles'])) { - wp_enqueue_style('edd-styles', EDD_PLUGIN_URL . 'includes/css/edd.css'); - } + * @since 3.0 + */ +function edd_enqueue_styles() { + wp_enqueue_style( 'edd-styles' ); } -add_action('wp_enqueue_scripts', 'edd_register_styles'); +add_action( 'wp_enqueue_scripts', 'edd_enqueue_styles' ); +/** + * Localize scripts + * + * @since 3.0 + * + * @global $post $post + */ +function edd_localize_scripts() { + EDD\Assets\Localization::checkout(); + EDD\Assets\Localization::ajax(); +} /** - * Load Admin Scripts + * Load head styles * - * Enqueues the required admin scripts. + * Ensures download styling is still shown correctly if a theme is using the CSS template file * - * @access private - * @since 1.0 - * @return void -*/ + * @since 2.5 + * @global $post + */ +function edd_load_head_styles() { + EDD\Assets\Styles::head(); +} +add_action( 'wp_print_styles', 'edd_load_head_styles' ); -function edd_load_admin_scripts($hook) { +/** + * Determine if the frontend scripts should be loaded in the footer or header (default: footer) + * + * @since 2.8.6 + * @return mixed + */ +function edd_scripts_in_footer() { + return apply_filters( 'edd_load_scripts_in_footer', true ); +} - global $post, $pagenow, $edd_discounts_page, $edd_payments_page, $edd_settings_page, $edd_reports_page, $edd_add_ons_page; +/** Admin Area ****************************************************************/ - $edd_pages = array($edd_discounts_page, $edd_payments_page, $edd_settings_page, $edd_reports_page, $edd_add_ons_page, 'index.php'); - $edd_cpt = apply_filters( 'edd_load_scripts_for_these_types', array( 'download', 'edd_payment' ) ); +/** + * Return the current script version + * + * @since 3.0 + * + * @return string + */ +function edd_admin_get_script_version() { + return edd_doing_script_debug() + ? time() + : EDD_VERSION; +} - if ( ! in_array( $hook, $edd_pages ) && ! is_object( $post ) ) - return; +/** + * Register all admin area scripts + * + * @since 3.0 + */ +function edd_register_admin_scripts() { + EDD\Admin\Assets\Scripts::register(); +} +add_action( 'admin_init', 'edd_register_admin_scripts' ); - if ( is_object( $post ) && ! in_array( $post->post_type, $edd_cpt ) ) - return; - - if($hook == 'download_page_edd-reports') { - wp_enqueue_script('google-charts', 'https://www.google.com/jsapi'); - } - if($hook == 'download_page_edd-discounts') { - wp_enqueue_script('jquery-ui-datepicker'); - } - if($hook == $edd_settings_page) { - wp_enqueue_style('colorbox', EDD_PLUGIN_URL . 'includes/css/colorbox.css'); - wp_enqueue_script('colorbox', EDD_PLUGIN_URL . 'includes/js/jquery.colorbox-min.js', array('jquery'), '1.3.19.3'); - } - wp_enqueue_script('media-upload'); - wp_enqueue_script('thickbox'); - wp_enqueue_script('edd-admin-scripts', EDD_PLUGIN_URL . 'includes/js/admin-scripts.js'); - wp_localize_script('edd-admin-scripts', 'edd_vars', array( - 'post_id' => isset($post->ID) ? $post->ID : null, - 'add_new_download' => __('Add New Download', 'edd'), // thickbox title - 'use_this_file' => __('Use This File','edd'), // "use this file" button - 'quick_edit_warning'=> __('Sorry, not available for variable priced products.', 'edd'), - 'delete_payment' => __('Are you sure you wish to delete this payment?', 'edd'), - 'one_price_min' => __('You must have at least one price', 'edd'), - 'one_file_min' => __('You must have at least one file', 'edd'), - 'one_field_min' => __('You must have at least one field', 'edd') - )); - wp_enqueue_style('thickbox'); - wp_enqueue_style('jquery-ui-css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css', false, '1.8', 'all'); - wp_enqueue_style('edd-admin', EDD_PLUGIN_URL . 'includes/css/edd-admin.css'); -} -add_action('admin_enqueue_scripts', 'edd_load_admin_scripts', 100); +/** + * Register all admin area styles + * + * @since 3.0 + */ +function edd_register_admin_styles() { + EDD\Admin\Assets\Styles::register(); +} +add_action( 'admin_init', 'edd_register_admin_styles' ); + +/** + * Print admin area scripts + * + * @since 3.0 + */ +function edd_enqueue_admin_scripts( $hook = '' ) { + EDD\Admin\Assets\Scripts::enqueue( $hook ); +} +add_action( 'admin_enqueue_scripts', 'edd_enqueue_admin_scripts' ); + +/** + * Enqueue admin area styling. + * + * Always enqueue the menu styling. Only enqueue others on EDD pages. + * + * @since 3.0 + */ +function edd_enqueue_admin_styles( $hook = '' ) { + EDD\Admin\Assets\Styles::enqueue( $hook ); +} +add_action( 'admin_enqueue_scripts', 'edd_enqueue_admin_styles' ); +/** + * Localize all admin scripts + * + * @since 3.0 + */ +function edd_localize_admin_scripts() { + EDD\Admin\Assets\Localization::admin(); + EDD\Admin\Assets\Localization::upgrades(); +} +add_action( 'admin_enqueue_scripts', 'edd_localize_admin_scripts' ); /** * Admin Downloads Icon * * Echoes the CSS for the downloads post type icon. * - * @access private - * @since 1.0 - * @return void -*/ - + * @since 1.0 + * @since 2.6.11 Removed globals and CSS for custom icon + */ function edd_admin_downloads_icon() { - global $post_type; - $icon_url = EDD_PLUGIN_URL . 'includes/images/edd-icon.png'; + + $images_url = EDD_PLUGIN_URL . 'assets/images/'; + $menu_icon = '\f316'; + $icon_cpt_url = $images_url . 'edd-cpt.png'; + $icon_cpt_2x_url = $images_url . 'edd-cpt-2x.png'; ?> - + + + '', - 'text' => __('Purchase', 'edd'), - 'style' => 'button', - 'color' => 'blue', - 'class' => '' - ), $atts ) - ); - - $download = edd_get_download($id); - - if($download) { - return edd_get_purchase_link($download->ID, $text, $style, $color, $class); - } -} -add_shortcode('purchase_link', 'edd_download_shortcode'); - - -/** - * Download History Shortcode - * - * Displays a user's download history. - * - * @access public - * @since 1.0 - * @return string -*/ - -function edd_download_history() { - - if(is_user_logged_in()) { - ob_start(); - edd_get_template_part( 'history', 'downloads' ); - return ob_get_clean(); - } -} -add_shortcode('download_history', 'edd_download_history'); - -/** - * Purchase History Shortcode - * - * Displays a user's purchsae history. - * - * @access public - * @since 1.0 - * @return string -*/ - -function edd_purchase_history() { - if(is_user_logged_in()) { - ob_start(); - edd_get_template_part( 'history', 'purchases' ); - return ob_get_clean(); - } -} -add_shortcode('purchase_history', 'edd_purchase_history'); - - -/** - * Checkout Form Shortcode - * - * Show the checkout form. - * - * @access public - * @since 1.0 - * @return string -*/ - -function edd_checkout_form_shortcode($atts, $content = null) { - return edd_checkout_form(); -} -add_shortcode('download_checkout', 'edd_checkout_form_shortcode'); - - -/** - * Download Cart Shortcode - * - * Show the shopping cart. - * - * @access public - * @since 1.0 - * @return string -*/ - -function edd_cart_shortcode($atts, $content = null) { - return edd_shopping_cart(); -} -add_shortcode('download_cart', 'edd_cart_shortcode'); - - -/** - * Login Shortcode - * - * Shows the login form. - * - * @access public - * @since 1.0 - * @return string -*/ - -function edd_login_form_shortcode($atts, $content = null) { - - extract( shortcode_atts( array( - 'redirect' => '', - ), $atts ) - ); - return edd_login_form($redirect); -} -add_shortcode('edd_login', 'edd_login_form_shortcode'); - - -/** - * Discounts short code - * - * Displays a list of all active discounts - * - * @access public - * @since 1.0.8.2 - * @return string -*/ - -function edd_discounts_shortcode( $atts, $content = null ) { - - $discounts = edd_get_discounts(); - - if( ! $discounts && edd_has_active_discounts() ) - return; - - $discounts_list = '
      '; - - foreach( $discounts as $discount ) { - - if( edd_is_discount_valid( $discount['code'] ) ) { - - $discounts_list .= '
    • '; - - $discounts_list .= '' . $discount['name'] . ''; - $discounts_list .= ' - '; - $discounts_list .= '' . edd_format_discount_rate( $discount['type'], $discount['amount'] ) . ''; - - $discounts_list .= '
    • '; - - } - - } - - $discounts_list .= '
    '; - - return $discounts_list; - -} -add_shortcode('download_discounts', 'edd_discounts_shortcode'); - - - -/** - * Purchase Collection Shortcode - * - * Displays a collection purchase link for adding all - * items in a taxonomy term to the cart. - * - * @access public - * @since 1.0.6 - * @return string -*/ - -function edd_purchase_collection_shortcode($atts, $content = null) { - extract( shortcode_atts( array( - 'taxonomy' => '', - 'terms' => '', - 'link' => __('Purchase All Items', 'edd') - ), $atts ) - ); - - $link = is_null( $content ) ? $link : $content; - - return '' . $link . ''; -} -add_shortcode('purchase_collection', 'edd_purchase_collection_shortcode'); - - -/** - * Downloads Shortcode - * - * Incomplete short code for querying downloads. - * - * Contributor: Sunny Ratilal - * - * @access public - * @since 1.0.6 - * @return string -*/ - -function edd_downloads_query($atts, $content = null) { - - extract( shortcode_atts( array( - 'category' => '', - 'tags' => '', - 'relation' => 'OR', - 'number' => 10, - 'price' => 'yes', - 'excerpt' => 'yes', - 'full_content' => 'no', - 'buy_button' => 'yes', - 'columns' => 3, - 'thumbnails' => 'true', - 'orderby' => 'post_date', - 'order' => 'DESC' - ), $atts ) - ); - - $query = array( - 'post_type' => 'download', - 'posts_per_page' => absint($number), - 'orderby' => $orderby, - 'order' => $order - ); - - switch ( $orderby ) { - case 'price': - $orderby = 'meta_value'; - $query['meta_key'] = 'edd_price'; - $query['orderby'] = 'meta_value_num'; - break; - - case 'title': - $query['orderby'] = 'title'; - break; - - case 'id': - $query['orderby'] = 'ID'; - break; - - case 'random': - $query['orderby'] = 'rand'; - break; - - default: - $query['orderby'] = 'post_date'; - break; - } - - if ( $tags ) { - $query['download_tag'] = $tags; - } - if ( $category ) { - $query['download_category'] = $category; - } - - switch( intval( $columns ) ) : - - case 1: - $column_width = '100%'; break; - case 2: - $column_width = '50%'; break; - case 3: - $column_width = '33%'; break; - case 4: - $column_width = '25%'; break; - case 5: - $column_width = '20%'; break; - case 6: - $column_width = '16.6%'; break; - - endswitch; - - // allow the query to be manipulated by other plugins - $query = apply_filters('edd_downloads_query', $query); - - $downloads = new WP_Query( $query ); - if ( $downloads->have_posts() ) : - $i = 1; - ob_start(); ?> -
    - have_posts() ) : $downloads->the_post(); ?> -
    -
    - -
    -
    -
    - - -
    -
    - NULL, - ), $atts ) - ); - - - if( is_null( $id ) ) - $id = get_the_ID(); - - return edd_price( $id, false ); - -} -add_shortcode('edd_price', 'edd_download_price_shortcode'); \ No newline at end of file +ID : 0; + + $atts = shortcode_atts( array( + 'id' => $post_id, + 'price_id' => isset( $atts['price_id'] ) ? $atts['price_id'] : false, + 'sku' => '', + 'price' => '1', + 'direct' => '0', + 'text' => '', + 'style' => edd_get_option( 'button_style', 'button' ), + 'color' => edd_get_button_color_class(), + 'class' => 'edd-submit', + 'form_id' => '', + ), + $atts, 'purchase_link' ); + + // Override text only if not provided / empty + if ( ! $atts['text'] ) { + if( $atts['direct'] == '1' || $atts['direct'] == 'true' ) { + $atts['text'] = edd_get_option( 'buy_now_text', __( 'Buy Now', 'easy-digital-downloads' ) ); + } else { + $atts['text'] = edd_get_option( 'add_to_cart_text', __( 'Purchase', 'easy-digital-downloads' ) ); + } + } + + $atts['text'] = sanitize_text_field( $atts['text'] ); + + if( ! empty( $atts['sku'] ) ) { + + $download = edd_get_download_by( 'sku', $atts['sku'] ); + + if ( $download ) { + $atts['download_id'] = $download->ID; + } + + } elseif( isset( $atts['id'] ) ) { + + // Edd_get_purchase_link() expects the ID to be download_id since v1.3 + $atts['download_id'] = $atts['id']; + + $download = edd_get_download( $atts['download_id'] ); + + } + + if ( $download ) { + return edd_get_purchase_link( $atts ); + } +} +add_shortcode( 'purchase_link', 'edd_download_shortcode' ); + +/** + * Download History Shortcode + * + * Displays a user's download history. + * + * @since 1.0 + * @return string + */ +function edd_download_history() { + if ( is_user_logged_in() ) { + ob_start(); + + if( ! edd_user_pending_verification() ) { + + edd_get_template_part( 'history', 'downloads' ); + + } else { + + edd_get_template_part( 'account', 'pending' ); + + } + + return ob_get_clean(); + } +} +add_shortcode( 'download_history', 'edd_download_history' ); + +/** + * Purchase History Shortcode + * + * Displays a user's purchase history. + * + * @since 1.0 + * @return string + */ +function edd_purchase_history() { + ob_start(); + + if( ! edd_user_pending_verification() ) { + + edd_get_template_part( 'history', 'purchases' ); + + } else { + + edd_get_template_part( 'account', 'pending' ); + + } + + return ob_get_clean(); +} +add_shortcode( 'purchase_history', 'edd_purchase_history' ); + +/** + * Checkout Form Shortcode + * + * Show the checkout form. + * + * @since 1.0 + * @param array $atts Shortcode attributes + * @param string $content + * @return string + */ +function edd_checkout_form_shortcode( $atts, $content = null ) { + return edd_checkout_form(); +} +add_shortcode( 'download_checkout', 'edd_checkout_form_shortcode' ); + +/** + * Download Cart Shortcode + * + * Show the shopping cart. + * + * @since 1.0 + * @param array $atts Shortcode attributes + * @param string $content + * @return string + */ +function edd_cart_shortcode( $atts, $content = null ) { + return edd_shopping_cart(); +} +add_shortcode( 'download_cart', 'edd_cart_shortcode' ); + +/** + * Login Shortcode + * + * Shows a login form allowing users to users to log in. This function simply + * calls the edd_login_form function to display the login form. + * + * @since 1.0 + * @param array $atts Shortcode attributes + * @param string $content + * @uses edd_login_form() + * @return string + */ +function edd_login_form_shortcode( $atts, $content = null ) { + $redirect = ''; + + extract( shortcode_atts( array( + 'redirect' => $redirect + ), $atts, 'edd_login' ) ); + + if ( empty( $redirect ) ) { + $login_redirect_page = edd_get_option( 'login_redirect_page', '' ); + + if ( ! empty( $login_redirect_page ) ) { + $redirect = get_permalink( $login_redirect_page ); + } + } + + if ( empty( $redirect ) ) { + $purchase_history = edd_get_option( 'purchase_history_page', 0 ); + + if ( ! empty( $purchase_history ) ) { + $redirect = get_permalink( $purchase_history ); + } + } + + if ( empty( $redirect ) ) { + $redirect = home_url(); + } + + return edd_login_form( $redirect ); +} +add_shortcode( 'edd_login', 'edd_login_form_shortcode' ); + +/** + * Register Shortcode + * + * Shows a registration form allowing users to users to register for the site + * + * @since 2.0 + * @param array $atts Shortcode attributes + * @param string $content + * @uses edd_register_form() + * @return string + */ +function edd_register_form_shortcode( $atts, $content = null ) { + $redirect = home_url(); + $purchase_history = edd_get_option( 'purchase_history_page', 0 ); + + if ( ! empty( $purchase_history ) ) { + $redirect = get_permalink( $purchase_history ); + } + + extract( shortcode_atts( array( + 'redirect' => $redirect + ), $atts, 'edd_register' ) ); + + return edd_register_form( $redirect ); +} +add_shortcode( 'edd_register', 'edd_register_form_shortcode' ); + +/** + * Discounts shortcode + * + * Displays a list of all the active discounts. The active discounts can be configured + * from the Discount Codes admin screen. + * + * @since 1.0.8.2 + * @param array $atts Shortcode attributes + * @param string $content + * @uses edd_get_discounts() + * @return string $discounts_lists List of all the active discount codes + */ +function edd_discounts_shortcode( $atts, $content = null ) { + $discounts = edd_get_discounts(); + + $discounts_list = '
      '; + + if ( ! empty( $discounts ) && edd_has_active_discounts() ) { + + foreach ( $discounts as $discount ) { + + if ( edd_is_discount_active( $discount->id ) ) { + $discounts_list .= '
    • '; + $discounts_list .= '' . edd_get_discount_code( $discount->id ) . ''; + $discounts_list .= ' - '; + $discounts_list .= '' . edd_format_discount_rate( edd_get_discount_type( $discount->id ), edd_get_discount_amount( $discount->id ) ) . ''; + $discounts_list .= '
    • '; + } + } + + } else { + $discounts_list .= '
    • ' . __( 'No discounts found', 'easy-digital-downloads' ) . '
    • '; + } + + $discounts_list .= '
    '; + + return $discounts_list; +} +add_shortcode( 'download_discounts', 'edd_discounts_shortcode' ); + +/** + * Purchase Collection Shortcode + * + * Displays a collection purchase link for adding all items in a taxonomy term + * to the cart. + * + * @since 1.0.6 + * @param array $atts Shortcode attributes + * @param string $content + * @return string + */ +function edd_purchase_collection_shortcode( $atts, $content = null ) { + extract( shortcode_atts( array( + 'taxonomy' => '', + 'terms' => '', + 'text' => __( 'Purchase All Items', 'easy-digital-downloads' ), + 'style' => edd_get_option( 'button_style', 'button' ), + 'color' => edd_get_button_color_class(), + 'class' => 'edd-submit', + ), $atts, 'purchase_collection' ) ); + + $button_display = implode( ' ', array_filter( array( $style, $color, $class ) ) ); + + return '' . esc_html( $text ) . ''; +} +add_shortcode( 'purchase_collection', 'edd_purchase_collection_shortcode' ); + +/** + * Downloads Shortcode + * + * This shortcodes uses the WordPress Query API to get downloads with the + * arguments specified when using the shortcode. A list of the arguments + * can be found from the EDD Documentation. The shortcode will take all the + * parameters and display the downloads queried in a valid HTML
    tags. + * + * @since 1.0.6 + * @internal Incomplete shortcode + * @param array $atts Shortcode attributes + * @param string $content + * @return string $display Output generated from the downloads queried + */ +function edd_downloads_query( $atts, $content = null ) { + $atts = shortcode_atts( array( + 'category' => '', + 'exclude_category' => '', + 'tags' => '', + 'exclude_tags' => '', + 'author' => false, + 'relation' => 'OR', + 'number' => 9, + 'price' => 'no', + 'excerpt' => 'yes', + 'full_content' => 'no', + 'buy_button' => 'yes', + 'columns' => 3, + 'thumbnails' => 'true', + 'orderby' => 'post_date', + 'order' => 'DESC', + 'ids' => '', + 'class' => '', + 'pagination' => 'true', + ), $atts, 'downloads' ); + + $query = array( + 'post_type' => 'download', + 'orderby' => $atts['orderby'], + 'order' => $atts['order'] + ); + + if ( filter_var( $atts['pagination'], FILTER_VALIDATE_BOOLEAN ) || ( ! filter_var( $atts['pagination'], FILTER_VALIDATE_BOOLEAN ) && $atts[ 'number' ] ) ) { + + $query['posts_per_page'] = (int) $atts['number']; + + if ( $query['posts_per_page'] < 0 ) { + $query['posts_per_page'] = abs( $query['posts_per_page'] ); + } + } else { + $query['nopaging'] = true; + } + + if( 'random' == $atts['orderby'] ) { + $atts['pagination'] = false; + } + + switch ( $atts['orderby'] ) { + case 'price': + $atts['orderby'] = 'meta_value'; + $query['meta_key'] = 'edd_price'; + $query['orderby'] = 'meta_value_num'; + break; + + case 'sales': + $atts['orderby'] = 'meta_value'; + $query['meta_key'] = '_edd_download_sales'; + $query['orderby'] = 'meta_value_num'; + break; + + case 'earnings': + $atts['orderby'] = 'meta_value'; + $query['meta_key'] = '_edd_download_earnings'; + $query['orderby'] = 'meta_value_num'; + break; + + case 'title': + $query['orderby'] = 'title'; + break; + + case 'id': + $query['orderby'] = 'ID'; + break; + + case 'random': + $query['orderby'] = 'rand'; + break; + + case 'post__in': + $query['orderby'] = 'post__in'; + break; + + default: + $query['orderby'] = 'post_date'; + break; + } + + if ( $atts['tags'] || $atts['category'] || $atts['exclude_category'] || $atts['exclude_tags'] ) { + + $query['tax_query'] = array( + 'relation' => $atts['relation'] + ); + + if ( $atts['tags'] ) { + + $tag_list = explode( ',', $atts['tags'] ); + + foreach( $tag_list as $tag ) { + + $t_id = (int) $tag; + $is_id = is_int( $t_id ) && ! empty( $t_id ); + + if( $is_id ) { + + $term_id = $tag; + + } else { + + $term = get_term_by( 'slug', $tag, 'download_tag' ); + + if( ! $term ) { + continue; + } + + $term_id = $term->term_id; + } + + $query['tax_query'][] = array( + 'taxonomy' => 'download_tag', + 'field' => 'term_id', + 'terms' => $term_id + ); + } + + } + + if ( $atts['category'] ) { + + $categories = explode( ',', $atts['category'] ); + + foreach( $categories as $category ) { + + $t_id = (int) $category; + $is_id = is_int( $t_id ) && ! empty( $t_id ); + + if( $is_id ) { + + $term_id = $category; + + } else { + + $term = get_term_by( 'slug', $category, 'download_category' ); + + if( ! $term ) { + continue; + } + + $term_id = $term->term_id; + + } + + $query['tax_query'][] = array( + 'taxonomy' => 'download_category', + 'field' => 'term_id', + 'terms' => $term_id, + ); + + } + + } + + if ( $atts['exclude_category'] ) { + + $categories = explode( ',', $atts['exclude_category'] ); + + foreach( $categories as $category ) { + + $t_id = (int) $category; + $is_id = is_int( $t_id ) && ! empty( $t_id ); + + if( $is_id ) { + + $term_id = $category; + + } else { + + $term = get_term_by( 'slug', $category, 'download_category' ); + + if( ! $term ) { + continue; + } + + $term_id = $term->term_id; + } + + $query['tax_query'][] = array( + 'taxonomy' => 'download_category', + 'field' => 'term_id', + 'terms' => $term_id, + 'operator' => 'NOT IN' + ); + } + + } + + if ( $atts['exclude_tags'] ) { + + $tag_list = explode( ',', $atts['exclude_tags'] ); + + foreach( $tag_list as $tag ) { + + $t_id = (int) $tag; + $is_id = is_int( $t_id ) && ! empty( $t_id ); + + if( $is_id ) { + + $term_id = $tag; + + } else { + + $term = get_term_by( 'slug', $tag, 'download_tag' ); + + if( ! $term ) { + continue; + } + + $term_id = $term->term_id; + } + + $query['tax_query'][] = array( + 'taxonomy' => 'download_tag', + 'field' => 'term_id', + 'terms' => $term_id, + 'operator' => 'NOT IN' + ); + + } + + } + } + + if ( $atts['exclude_tags'] || $atts['exclude_category'] ) { + $query['tax_query']['relation'] = 'AND'; + } + + if ( $atts['author'] ) { + $authors = explode( ',', $atts['author'] ); + if ( ! empty( $authors ) ) { + $author_ids = array(); + $author_names = array(); + + foreach ( $authors as $author ) { + if ( is_numeric( $author ) ) { + $author_ids[] = $author; + } else { + $user = get_user_by( 'login', $author ); + if ( $user ) { + $author_ids[] = $user->ID; + } + } + } + + if ( ! empty( $author_ids ) ) { + $author_ids = array_unique( array_map( 'absint', $author_ids ) ); + $query['author'] = implode( ',', $author_ids ); + } + } + } + + if( ! empty( $atts['ids'] ) ) { + $query['post__in'] = explode( ',', $atts['ids'] ); + } + + if ( get_query_var( 'paged' ) ) { + $query['paged'] = get_query_var('paged'); + } else if ( get_query_var( 'page' ) ) { + $query['paged'] = get_query_var( 'page' ); + } else { + $query['paged'] = 1; + } + + // Allow the query to be manipulated by other plugins + $query = apply_filters( 'edd_downloads_query', $query, $atts ); + + $downloads = new WP_Query( $query ); + + do_action( 'edd_downloads_list_before', $atts ); + + // Ensure buttons are not appended to content. + remove_filter( 'the_content', 'edd_after_download_content' ); + + ob_start(); + + + if ( $downloads->have_posts() ) : + $i = 1; + $columns_class = array( 'edd_download_columns_' . $atts['columns'] ); + $custom_classes = array_map( 'sanitize_html_class', explode( ',', $atts['class'] ) ); + $wrapper_classes = array_unique( array_merge( $columns_class, $custom_classes ) ); + $wrapper_classes = implode( ' ', $wrapper_classes ); + ?> + +
    + + + + have_posts() ) : $downloads->the_post(); ?> + + + + + + + +
    + + null, + 'price_id' => false, + ), $atts, 'edd_price' ) ); + + if ( is_null( $id ) ) { + $id = get_the_ID(); + } + + return edd_price( $id, false, $price_id ); +} +add_shortcode( 'edd_price', 'edd_download_price_shortcode' ); + +/** + * Receipt Shortcode + * + * Shows an order receipt. + * + * @since 1.4 + * @param array $atts Shortcode attributes + * @param string $content + * @return string + */ +function edd_receipt_shortcode( $atts, $content = null ) { + global $edd_receipt_args; + + $edd_receipt_args = shortcode_atts( + array( + 'error' => __( 'Sorry, trouble retrieving order receipt.', 'easy-digital-downloads' ), + 'price' => true, + 'discount' => true, + 'products' => true, + 'date' => true, + 'notes' => true, + 'payment_key' => false, + 'payment_method' => true, + 'payment_id' => true, + ), + $atts, + 'edd_receipt' + ); + + $session = edd_get_purchase_session(); + + $payment_key = false; + if ( isset( $_GET['payment_key'] ) ) { + $payment_key = urldecode( $_GET['payment_key'] ); + } elseif ( ! empty( $_GET['order'] ) && ! empty( $_GET['id'] ) ) { + $payment_key = edd_get_payment_key( absint( $_GET['id'] ) ); + } elseif ( $session ) { + $payment_key = $session['purchase_key']; + } elseif ( $edd_receipt_args['payment_key'] ) { + $payment_key = $edd_receipt_args['payment_key']; + } + + $order = edd_get_order_by( 'payment_key', $payment_key ); + if ( ! $order ) { + return '

    ' . $edd_receipt_args['error'] . '

    '; + } + + $user_can_view = edd_can_view_receipt( $order ); + + // Key was provided, but user is logged out. Offer them the ability to login and view the receipt. + if ( ! $user_can_view && ! empty( $payment_key ) && ! is_user_logged_in() && ! edd_is_guest_payment( $order ) ) { + global $edd_login_redirect; + $edd_login_redirect = edd_get_receipt_page_uri( $order->id ); + + ob_start(); + + echo '

    ' . __( 'You must be logged in to view this payment receipt.', 'easy-digital-downloads' ) . '

    '; + edd_get_template_part( 'shortcode', 'login' ); + + $login_form = ob_get_clean(); + + return $login_form; + } + + $user_can_view = apply_filters( 'edd_user_can_view_receipt', $user_can_view, $edd_receipt_args ); + + // If this was a guest checkout and the purchase session is empty, output a relevant error message. + if ( empty( $session ) && ! is_user_logged_in() && ! $user_can_view ) { + return '

    ' . apply_filters( 'edd_receipt_guest_error_message', __( 'Receipt could not be retrieved, your purchase session has expired.', 'easy-digital-downloads' ) ) . '

    '; + } + + /* + * Check if the user has permission to view the receipt + * + * If user is logged in, user ID is compared to user ID of ID stored in payment meta + * + * Or if user is logged out and purchase was made as a guest, the purchase session is checked for + * + * Or if user is logged in and the user can view sensitive shop data + */ + + if ( ! $user_can_view ) { + return '

    ' . $edd_receipt_args['error'] . '

    '; + } + + ob_start(); + + edd_get_template_part( 'shortcode', 'receipt' ); + + $display = ob_get_clean(); + + return $display; +} +add_shortcode( 'edd_receipt', 'edd_receipt_shortcode' ); + +/** + * Render the profile editor shortcode. + * + * @since 1.4 + * + * @param null $atts Unused parameter. + * @param null $content Unused parameter. + * + * @return string Shortcode template. + */ +function edd_profile_editor_shortcode( $atts = null, $content = null ) { + ob_start(); + + if ( ! edd_user_pending_verification() ) { + edd_get_template_part( 'shortcode', 'profile-editor' ); + } else { + edd_get_template_part( 'account', 'pending' ); + } + + $display = ob_get_clean(); + + return $display; +} +add_shortcode( 'edd_profile_editor', 'edd_profile_editor_shortcode' ); + +/** + * Process profile updates. + * + * @since 1.4 + * @since 3.0 Updated to use new custom tables. + * + * @param array $data Data sent from the profile editor. + * @return bool False on error. + */ +function edd_process_profile_editor_updates( $data ) { + + // Profile field change request. + if ( empty( $data['edd_profile_editor_submit'] ) && ! is_user_logged_in() ) { + return false; + } + + // Pending users can't edit their profile. + if ( edd_user_pending_verification() ) { + return false; + } + + // Verify nonce. + if ( empty( $data['edd_profile_editor_nonce'] ) || ! wp_verify_nonce( $data['edd_profile_editor_nonce'], 'edd-profile-editor-nonce' ) ) { + return false; + } + + $user_id = get_current_user_id(); + $old_user_data = get_userdata( $user_id ); + + // Fetch customer record. + $customer = edd_get_customer_by( 'user_id', $user_id ); + if ( ! empty( $customer->user_id ) && $customer->user_id != $user_id ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison + edd_set_error( 'customer_mismatch', __( 'Your profile could not be updated. Please contact a site administrator.', 'easy-digital-downloads' ) ); + } + + $display_name = isset( $data['edd_display_name'] ) ? sanitize_text_field( $data['edd_display_name'] ) : $old_user_data->display_name; + $first_name = isset( $data['edd_first_name'] ) ? sanitize_text_field( $data['edd_first_name'] ) : $old_user_data->first_name; + $last_name = isset( $data['edd_last_name'] ) ? sanitize_text_field( $data['edd_last_name'] ) : $old_user_data->last_name; + $email = isset( $data['edd_email'] ) ? sanitize_email( $data['edd_email'] ) : $old_user_data->user_email; + $line1 = isset( $data['edd_address_line1'] ) ? sanitize_text_field( $data['edd_address_line1'] ) : ''; + $line2 = isset( $data['edd_address_line2'] ) ? sanitize_text_field( $data['edd_address_line2'] ) : ''; + $city = isset( $data['edd_address_city'] ) ? sanitize_text_field( $data['edd_address_city'] ) : ''; + $state = isset( $data['edd_address_state'] ) ? sanitize_text_field( $data['edd_address_state'] ) : ''; + $zip = isset( $data['edd_address_zip'] ) ? sanitize_text_field( $data['edd_address_zip'] ) : ''; + $country = isset( $data['edd_address_country'] ) ? sanitize_text_field( $data['edd_address_country'] ) : ''; + + $userdata = array( + 'ID' => $user_id, + 'first_name' => $first_name, + 'last_name' => $last_name, + 'display_name' => $display_name, + 'user_email' => $email, + ); + + $address = array( + 'line1' => $line1, + 'line2' => $line2, + 'city' => $city, + 'state' => $state, + 'zip' => $zip, + 'country' => $country, + ); + + do_action( 'edd_pre_update_user_profile', $user_id, $userdata ); + + // New password + if ( ! empty( $data['edd_new_user_pass1'] ) ) { + if ( $data['edd_new_user_pass1'] !== $data['edd_new_user_pass2'] ) { + edd_set_error( 'password_mismatch', __( 'The passwords you entered do not match. Please try again.', 'easy-digital-downloads' ) ); + } else { + $userdata['user_pass'] = $data['edd_new_user_pass1']; + } + } + + // Make sure the new email doesn't belong to another user. + if ( $email !== $old_user_data->user_email ) { + + // Make sure the new email is valid. + if ( ! is_email( $email ) ) { + edd_set_error( 'email_invalid', __( 'The email you entered is invalid. Please enter a valid email.', 'easy-digital-downloads' ) ); + } + + $customers = edd_get_customers( + array( + 'email' => $email, + 'user_id__not_in' => array( $user_id ), + ) + ); + // Make sure the new email doesn't belong to another user. + if ( email_exists( $email ) || ! empty( $customers ) ) { + edd_set_error( 'email_exists', __( 'This email address is not available.', 'easy-digital-downloads' ) ); + } + } + + // Check for errors. + $errors = edd_get_errors(); + + // Send back to the profile editor if there are errors. + if ( ! empty( $errors ) ) { + if ( ! empty( $data['edd_redirect'] ) ) { + edd_redirect( $data['edd_redirect'] ); + } + return false; + } + + // Update user. + $updated = wp_update_user( $userdata ); + + // If the current user does not have an associated customer record, create one so that all of the customer's data is stored. + if ( ! $customer && $updated ) { + $customer_id = edd_add_customer( + array( + 'user_id' => $updated, + 'email' => $email, + ) + ); + + $customer = edd_get_customer_by( 'id', $customer_id ); + } + + // Try to update customer data. + if ( $customer ) { + + // Update the primary address. + $customer_address_id = edd_get_customer_addresses( array( + 'customer_id' => $customer->id, + 'type' => 'billing', + 'is_primary' => 1, + 'number' => 1, + 'fields' => 'ids', + ) ); + + // Try updating the address if it exists. + if ( ! empty( $customer_address_id ) ) { + $customer_address_id = $customer_address_id[0]; + + edd_update_customer_address( $customer_address_id, array( + 'name' => stripslashes( $first_name . ' ' . $last_name ), + 'address' => $address['line1'], + 'address2' => $address['line2'], + 'city' => $address['city'], + 'country' => $address['country'], + 'region' => $address['state'], + 'postal_code' => $address['zip'], + 'country' => $address['country'] + ) ); + + // Add a customer address. + } else { + edd_maybe_add_customer_address( + $customer->id, + array( + 'name' => stripslashes( $first_name . ' ' . $last_name ), + 'type' => 'billing', + 'address' => $address['line1'], + 'address2' => $address['line2'], + 'city' => $address['city'], + 'country' => $address['country'], + 'region' => $address['state'], + 'postal_code' => $address['zip'], + 'country' => $address['country'], + 'is_primary' => true, + ) + ); + } + + if ( $customer->email === $email || ( is_array( $customer->emails ) && in_array( $email, $customer->emails ) ) ) { + $customer->set_primary_email( $email ); + } + + $update_args = array( + 'name' => stripslashes( $first_name . ' ' . $last_name ), + ); + + $customer->update( $update_args ); + } + + if ( $updated ) { + do_action( 'edd_user_profile_updated', $user_id, $userdata ); + + edd_redirect( add_query_arg( 'updated', 'true', $data['edd_redirect'] ) ); + } +} +add_action( 'edd_edit_user_profile', 'edd_process_profile_editor_updates' ); + +/** + * Process the 'remove' URL on the profile editor when customers wish to remove an email address. + * + * @since 2.6 + * @param array $data The array of data passed from the profile editor. + * @return void + */ +function edd_process_profile_editor_remove_email( $data ) { + if ( ! is_user_logged_in() ) { + return; + } + + // Pending users can't edit their profile + if ( edd_user_pending_verification() ) { + return; + } + + // Nonce security + if ( ! wp_verify_nonce( $data['_wpnonce'], 'edd-remove-customer-email' ) ) { + return; + } + + if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) { + return; + } + + $user_id = get_current_user_id(); + $customer = new EDD_Customer( $user_id, true ); + + if ( $customer->user_id == $user_id && $customer->remove_email( $data['email'] ) ) { + + $url = add_query_arg( 'updated', true, $data['redirect'] ); + + $user = wp_get_current_user(); + $user_login = ! empty( $user->user_login ) ? $user->user_login : edd_get_bot_name(); + /* translators: 1: email address, 2: username */ + $customer_note = sprintf( __( 'Email address %1$s removed by %2$s', 'easy-digital-downloads' ), sanitize_email( $data['email'] ), $user_login ); + $customer->add_note( $customer_note ); + + } else { + edd_set_error( 'profile-remove-email-failure', __( 'Error removing email address from profile. Please try again later.', 'easy-digital-downloads' ) ); + $url = $data['redirect']; + } + + edd_redirect( $url ); +} +add_action( 'edd_profile-remove-email', 'edd_process_profile_editor_remove_email' ); diff --git a/includes/tax-functions.php b/includes/tax-functions.php old mode 100644 new mode 100755 index a4abe2dafcb..3565e812d1b --- a/includes/tax-functions.php +++ b/includes/tax-functions.php @@ -1,2 +1,562 @@ 9999, + 'type' => 'tax_rate', + 'orderby' => 'date_created', + 'order' => 'ASC', + ) ); + + if ( isset( $args['status'] ) && 'active' === $args['status'] ) { + remove_filter( 'edd_adjustments_query_clauses', 'edd_active_tax_rates_query_clauses' ); + } + + $adjustments->query( $r ); + + if ( OBJECT === $output ) { + return $adjustments->items; + } + + $rates = array(); + + if ( $adjustments->items ) { + foreach ( $adjustments->items as $tax_rate ) { + $rate = array( + 'id' => absint( $tax_rate->id ), + 'country' => esc_attr( $tax_rate->name ), + 'rate' => floatval( $tax_rate->amount ), + 'state' => '', + 'global' => '1', + 'status' => esc_attr( $tax_rate->status ), + 'scope' => esc_attr( $tax_rate->scope ), + ); + + if ( ! empty( $tax_rate->description ) ) { + $rate['state'] = esc_attr( $tax_rate->description ); + } + + if ( 'region' === $tax_rate->scope ) { + $rate['global'] = '0'; + } + + $rates[] = $rate; + } + } + + return (array) apply_filters( 'edd_get_tax_rates', $rates ); +} + +/** + * Query for and return array of tax rates counts, keyed by status. + * + * @since 3.0 + * + * @return array + */ +function edd_get_tax_rate_counts( $args = array() ) { + + // Parse arguments + $r = wp_parse_args( $args, array( + 'count' => true, + 'groupby' => 'status', + 'type' => 'tax_rate' + ) ); + + // Query for count. + $counts = new EDD\Database\Queries\Adjustment( $r ); + + // Format & return + return edd_format_counts( $counts, $r['groupby'] ); +} + +/** + * Add a WHERE clause to ensure only active tax rates are returned. + * + * @since 3.0 + * + * @param array $clauses Query clauses. + * @return array $clauses Updated query clauses. + */ +function edd_active_tax_rates_query_clauses( $clauses ) { + $date = \EDD\Utils\Date::now( edd_get_timezone_id() )->toDateTimeString(); + + $clauses['where'] .= " + AND ( start_date < '{$date}' OR start_date IS NULL ) + AND ( end_date > '{$date}' OR end_date IS NULL ) + "; + + return $clauses; +} + +/** + * Get taxation rate. + * + * @since 1.3.3 + * @since 3.0 Refactored to work with custom tables and start and end dates. + * Renamed $state parameter to $region. + * Added $fallback parameter to only get rate for passed Country and Region. + * + * @param string $country Country. + * @param string $region Region. + * @param boolean $fallback Fall back to (in order): server $_POST data, the current Customer's + * address information, then your store's Business Country setting. + * Default true. + * + * @return float + */ +function edd_get_tax_rate( $country = '', $region = '', $fallback = true ) { + + // Get the address, to try to get the tax rate + $user_address = edd_get_customer_address(); + + $address_line_1 = ! empty( $_POST['card_address'] ) + ? sanitize_text_field( $_POST['card_address'] ) + : ''; + + $address_line_2 = ! empty( $_POST['card_address_2'] ) + ? sanitize_text_field( $_POST['card_address_2'] ) + : ''; + + $city = ! empty( $_POST['card_city'] ) + ? sanitize_text_field( $_POST['card_city'] ) + : ''; + + $zip = ! empty( $_POST['card_zip'] ) + ? sanitize_text_field( $_POST['card_zip'] ) + : ''; + + // Country + if ( empty( $country ) && true === $fallback ) { + if ( ! empty( $_POST['billing_country'] ) ) { + $country = $_POST['billing_country']; + } elseif ( is_user_logged_in() && ! empty( $user_address['country'] ) ) { + $country = $user_address['country']; + } + + $country = empty( $country ) + ? edd_get_shop_country() + : $country; + } + + // Region + if ( empty( $region ) && true === $fallback ) { + if ( ! empty( $_POST['state'] ) ) { + $region = $_POST['state']; + } elseif ( ! empty( $_POST['card_state'] ) ) { + $region = $_POST['card_state']; + } elseif ( is_user_logged_in() && ! empty( $user_address['state'] ) ) { + $region = $user_address['state']; + } + + $region = empty( $region ) + ? edd_get_shop_state() + : $region; + } + + $tax_rate = edd_get_tax_rate_by_location( + array( + 'country' => $country, + 'region' => $region, + ) + ); + + $rate = $tax_rate ? $tax_rate->amount : 0.00; + + // Convert to a number we can use + $rate = $rate / 100; + + /** + * Allow the tax rate to be filtered. + * + * @since 1.3.3 + * @since 3.0 Added entire customer address. + * + * @param float $rate Calculated tax rate. + * @param string $country Country. + * @param string $region Region. + * @param string $address_line_1 First line of address. + * @param string $address_line_2 Second line of address. + * @param string $city City. + * @param string $zip ZIP code. + */ + return apply_filters( 'edd_tax_rate', $rate, $country, $region, $address_line_1, $address_line_2, $city, $zip ); +} + +/** + * Retrieve a fully formatted tax rate + * + * @since 1.9 + * @param string $country The country to retrieve a rate for + * @param string $state The state to retrieve a rate for + * @return string Formatted rate + */ +function edd_get_formatted_tax_rate( $country = false, $state = false ) { + $rate = edd_get_tax_rate( $country, $state ); + $rate = round( $rate * 100, 4 ); + $formatted = $rate .= '%'; + + return apply_filters( 'edd_formatted_tax_rate', $formatted, $rate, $country, $state ); +} + +/** + * Calculate the taxed amount. + * + * @since 1.3.3 + * @since 3.0 Renamed $state parameter to $region. + * Added $fallback parameter. + * Added `$tax_rate` parameter. + * + * @param float $amount Amount. + * @param string $country Country. Default base country. + * @param string $region Region. Default base region. + * @param boolean $fallback Fall back to (in order): server $_POST data, the current Customer's + * address information, then your store's Business Country setting. + * Default true. + * @param null|float $tax_rate Tax rate to use for the calculataion. If `null`, the rate is retrieved using + * `edd_get_tax_rate()`. + * + * @return float $tax Taxed amount. + */ +function edd_calculate_tax( $amount = 0.00, $country = '', $region = '', $fallback = true, $tax_rate = null ) { + $rate = $tax_rate; + $tax = 0.00; + + if ( edd_use_taxes() && $amount > 0 ) { + if ( is_null( $rate ) ) { + $rate = edd_get_tax_rate( $country, $region, $fallback ); + } + if ( edd_prices_include_tax() ) { + $pre_tax = ( $amount / ( 1 + $rate ) ); + $tax = $amount - $pre_tax; + } else { + $tax = $amount * $rate; + } + } + + /** + * Filter the taxed amount. + * + * @since 1.5.3 + * + * @param float $tax Taxed amount. + * @param float $rate Tax rate applied. + * @param string $country Country. + * @param string $region Region. + */ + return apply_filters( 'edd_taxed_amount', $tax, $rate, $country, $region ); +} + +/** + * Returns the formatted tax amount for the given year + * + * @since 1.3.3 + * @param $year int The year to retrieve taxes for, i.e. 2012 + * @uses edd_get_sales_tax_for_year() + * @return void + */ +function edd_sales_tax_for_year( $year = null ) { + echo edd_currency_filter( edd_format_amount( edd_get_sales_tax_for_year( $year ) ) ); +} + +/** + * Gets the sales tax for the given year + * + * @since 1.3.3 + * @param $year int The year to retrieve taxes for, i.e. 2012 + * @uses edd_get_payment_tax() + * @return float $tax Sales tax + */ +function edd_get_sales_tax_for_year( $year = null ) { + global $wpdb; + + // Start at zero + $tax = 0; + + if ( ! empty( $year ) ) { + $year = absint( $year ); + + $tax = $wpdb->get_var( $wpdb->prepare( "SELECT SUM(tax) FROM {$wpdb->edd_orders} WHERE status IN('complete', 'revoked') AND YEAR(date_created) = %d", $year ) ); + } + + if ( ! $tax || is_null( $tax ) ) { + $tax = 0.00; + } + + // Filter & return + return (float) apply_filters( 'edd_get_sales_tax_for_year', $tax, $year ); +} + +/** + * Is the cart taxed? + * + * This used to include a check for local tax opt-in, but that was ripped out in v1.6, so this is just a wrapper now + * + * @since 1.5 + * @return bool + */ +function edd_is_cart_taxed() { + return edd_use_taxes(); +} + +/** + * Check if the individual product prices include tax + * + * @since 1.5 + * @return bool $include_tax + */ +function edd_prices_include_tax() { + $ret = ( edd_get_option( 'prices_include_tax', false ) === 'yes' && edd_use_taxes() ); + + return apply_filters( 'edd_prices_include_tax', $ret ); +} + +/** + * Checks whether the user has enabled display of taxes on the checkout + * + * @since 1.5 + * @return bool $include_tax + */ +function edd_prices_show_tax_on_checkout() { + $ret = ( edd_get_option( 'checkout_include_tax', false ) === 'yes' && edd_use_taxes() ); + + return apply_filters( 'edd_taxes_on_prices_on_checkout', $ret ); +} + +/** + * Check to see if we should show included taxes + * + * Some countries (notably in the EU) require included taxes to be displayed. + * + * @since 1.7 + * @author Daniel J Griffiths + * @return bool + */ +function edd_display_tax_rate() { + $ret = edd_use_taxes() && edd_get_option( 'display_tax_rate', false ); + + return apply_filters( 'edd_display_tax_rate', $ret ); +} + +/** + * Should we show address fields for taxation purposes? + * + * @since 1.y + * @return bool + */ +function edd_cart_needs_tax_address_fields() { + + if ( ! edd_is_cart_taxed() ) { + return false; + } + + return ! did_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' ); +} + +/** + * Is this Download excluded from tax? + * + * @since 1.9 + * @return bool + */ +function edd_download_is_tax_exclusive( $download_id = 0 ) { + $ret = (bool) get_post_meta( $download_id, '_edd_download_tax_exclusive', true ); + + return (Bool) apply_filters( 'edd_download_is_tax_exclusive', $ret, $download_id ); +} + +/** + * Gets the tax rate object from the database for a given country / region. + * Used in `edd_get_tax_rate`, `edd_build_order`, `edd_add_manual_order`. + * If a regional tax rate is found, it will be returned immediately, + * so rates with a scope of `country` may be overridden by a more specific rate. + * + * @param array $args { + * Country and, optionally, region to get the tax rate for. + * + * @type string $country Required - country to check. + * @type string $region Optional - check a specific region within the country. + * } + * @return \EDD\Database\Rows\Adjustment|false + * + * @since 3.0 + */ +function edd_get_tax_rate_by_location( $args ) { + + $rate = false; + $tax_rates = array(); + + // Ensure the region is a string (CFM may pass an array). + $region = false; + if ( ! empty( $args['region'] ) ) { + $region = $args['region']; + if ( is_array( $region ) ) { + $region = reset( $region ); + } + } + + // Fetch all the active country tax rates from the database. + // The region is not passed in deliberately in order to check for country-wide tax rates. + if ( ! empty( $args['country'] ) ) { + $tax_rates = edd_get_tax_rates( + array( + 'name' => $args['country'], + 'status' => 'active', + ), + OBJECT + ); + } + + if ( ! empty( $tax_rates ) ) { + foreach ( $tax_rates as $tax_rate ) { + + // Regional tax rate. + if ( ! empty( $region ) && ! empty( $tax_rate->description ) && 'region' === $tax_rate->scope ) { + if ( strtolower( $region ) !== strtolower( $tax_rate->description ) ) { + continue; + } + + // A tax rate matching the region/description was found, so return it. + return $tax_rate; + } elseif ( 'country' === $tax_rate->scope ) { + // Countrywide tax rate. + $rate = $tax_rate; + } + } + + if ( $rate ) { + return $rate; + } + } + + // No regional or country rate was found, so look for a global rate. + $global_rates = edd_get_tax_rates( + array( + 'name' => '', + 'scope' => 'global', + 'status' => 'active', + ), + OBJECT + ); + + return ! empty( $global_rates ) ? reset( $global_rates ) : $rate; +} + +/** + * Clears the tax rate cache prior to displaying the cart. + * This fixes potential issues with custom tax rates / rate filtering from after we added + * tax rate caching logic. + * + * @link https://github.com/easydigitaldownloads/easy-digital-downloads/pull/8509#issuecomment-926576698 + * + * @since 3.0 + */ +add_action( 'edd_before_checkout_cart', function () { + EDD()->cart->set_tax_rate( null ); +} ); + +/** + * Adds a tax rate to the database. + * If an active tax rate is found, it's demoted to inactive and the new one is added. + * + * @since 3.0.3 + * @param array $data The array of data to create the tax rate. + * @return int|false Returns the tax rate ID if one is added; otherwise false. + */ +function edd_add_tax_rate( $data = array() ) { + $data = wp_parse_args( + $data, + array( + 'name' => '', + 'description' => '', + 'status' => 'active', + ) + ); + + // The type and amount type for tax rates cannot be overridden. + $data['type'] = 'tax_rate'; + $data['amount_type'] = 'percent'; + + if ( empty( $data['scope'] ) ) { + $scope = 'country'; + if ( empty( $data['name'] ) && empty( $data['description'] ) ) { + $scope = 'global'; + } elseif ( ! empty( $data['name'] ) && ! empty( $data['description'] ) ) { + $scope = 'region'; + } + $data['scope'] = $scope; + } + + // Check if the tax rate exists. + $data_to_check = array( + 'type' => 'tax_rate', + 'fields' => 'ids', + 'status' => 'active', + 'name' => $data['name'], + 'description' => $data['description'], + 'scope' => $data['scope'], + ); + + // Query for potentially matching active rates. + $tax_rate_exists = edd_get_adjustments( $data_to_check ); + $tax_rate_id = edd_add_adjustment( $data ); + + // If the new tax rate was successfully added, set the old one to inactive. + if ( $tax_rate_id && ! empty( $tax_rate_exists ) ) { + edd_update_adjustment( $tax_rate_exists[0], array( 'status' => 'inactive' ) ); + } + + return $tax_rate_id; +} diff --git a/includes/template-actions.php b/includes/template-actions.php new file mode 100644 index 00000000000..68ac4c80774 --- /dev/null +++ b/includes/template-actions.php @@ -0,0 +1,34 @@ +' . esc_html__( 'You need to log in to edit your profile.', 'easy-digital-downloads' ) . '

    '; + echo edd_login_form(); // WPCS: XSS ok. +} +add_action( 'edd_profile_editor_logged_out', 'edd_profile_editor_logged_out' ); + +/** + * Output a message on the login form when a user is already logged in. + * + * This remains mainly for backwards compatibility. + * + * @since 2.8 + */ +function edd_login_form_logged_in() { + echo '

    ' . esc_html__( 'You are already logged in', 'easy-digital-downloads' ) . '

    '; +} +add_action( 'edd_login_form_logged_in', 'edd_login_form_logged_in' ); \ No newline at end of file diff --git a/includes/template-functions.php b/includes/template-functions.php index e3b58d7248b..947e8f6ebea 100755 --- a/includes/template-functions.php +++ b/includes/template-functions.php @@ -2,30 +2,30 @@ /** * Template Functions * - * @package Easy Digital Downloads - * @subpackage Template Functions - * @copyright Copyright ( c ) 2012, Pippin Williamson + * @package EDD + * @subpackage Functions/Templates + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 -*/ + * @since 1.0 + */ +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /** * Append Purchase Link * * Automatically appends the purchase link to download content, if enabled. * - * @access private - * @since 1.0 - * @return string -*/ + * @since 1.0 + * @param int $download_id Download ID + * @return void + */ function edd_append_purchase_link( $download_id ) { - - if ( ! get_post_meta( $download_id, '_edd_hide_purchase_link', true ) ) { - echo edd_get_purchase_link( $download_id ); + if ( ! get_post_meta( $download_id, '_edd_hide_purchase_link', true ) ) { + echo edd_get_purchase_link( array( 'download_id' => $download_id ) ); } - } add_action( 'edd_after_download_content', 'edd_append_purchase_link' ); @@ -33,377 +33,594 @@ function edd_append_purchase_link( $download_id ) { /** * Get Purchase Link * - * Returns the purchase link. + * Builds a Purchase link for a specified download based on arguments passed. + * This function is used all over EDD to generate the Purchase or Add to Cart + * buttons. If no arguments are passed, the function uses the defaults that have + * been set by the plugin. The Purchase link is built for simple and variable + * pricing and filters are available throughout the function to override + * certain elements of the function. * - * @access public - * @since 1.0 - * @return string -*/ + * $download_id = null, $link_text = null, $style = null, $color = null, $class = null + * + * @since 1.0 + * @param array $args Arguments for display + * @return string $purchase_form + */ +function edd_get_purchase_link( $args = array() ) { + global $post, $edd_displayed_form_ids; -function edd_get_purchase_link( $download_id = null, $link_text = null, $style = null, $color = null, $class = '' ) { + $purchase_page = edd_get_option( 'purchase_page', false ); + if ( ! $purchase_page || $purchase_page == 0 ) { - global $edd_options, $post, $user_ID; + global $no_checkout_error_displayed; + if ( ! is_null( $no_checkout_error_displayed ) ) { + return false; + } - if ( ! isset( $edd_options['purchase_page'] ) || $edd_options['purchase_page'] == 0 ) { - edd_set_error( 'set_checkout', sprintf( __( 'No checkout page has been configured. Visit Settings to set one.', 'edd' ), admin_url( 'edit.php?post_type=download&page=edd-settings' ) ) ); + edd_set_error( + 'set_checkout', + sprintf( + /* translators: the settings screen URL */ + __( 'No checkout page has been configured. Visit Settings to set one.', 'easy-digital-downloads' ), + esc_url( edd_get_admin_url( array( + 'page' => 'edd-settings', + 'tab' => 'general', + 'section' => 'pages', + ) ) ) + ) + ); edd_print_errors(); + + $no_checkout_error_displayed = true; + return false; + } - - $page = get_permalink( $post->ID ); // current page - $link_args = array( 'download_id' => $download_id, 'edd_action' => 'add_to_cart' ); - $link = add_query_arg( $link_args, $page ); - $checkout_url = edd_get_checkout_uri(); - $variable_pricing = edd_has_variable_prices( $download_id ); - - if ( is_null( $link_text ) ) { - $link_text = isset( $edd_options['add_to_cart_text'] ) ? $edd_options['add_to_cart_text'] : __( 'Purchase', 'edd' ); - } - - if ( is_null( $style ) ) { - $style = isset( $edd_options['button_style'] ) ? $edd_options['button_style'] : 'button'; - } - - if ( is_null( $color ) ) { - $color = isset( $edd_options['checkout_color'] ) ? $edd_options['checkout_color'] : 'blue'; - } - - $purchase_form = '
    '; - - if ( $variable_pricing ) { - $prices = edd_get_variable_prices( $download_id ); - $purchase_form .= '
    '; - if ( $prices ) { - foreach( $prices as $key => $price ) { - $checked = ''; - - if ( $key == 0 ) { - $checked = 'checked="checked"'; - } - - $purchase_form .= sprintf( ' ', - $checked, - esc_attr( 'edd_price_option_' . $download_id . '_' . $key ), - esc_attr( 'edd_price_option_' . $download_id ), - esc_attr( $key ) - ); - - $purchase_form .= sprintf( '
    ', - esc_attr( 'edd_price_option_' . $download_id . '_' . $key ), - esc_html( $price['name'] . ' - ' . edd_currency_filter( $price['amount'] ) ) - ); - - } - } - $purchase_form .= '
    '; + + $post_id = is_object( $post ) ? $post->ID : 0; + if ( empty( $post_id ) && isset( $args['download_id'] ) ) { + $post_id = $args['download_id']; + } + + $button_behavior = edd_get_download_button_behavior( $post_id ); + + $defaults = apply_filters( 'edd_purchase_link_defaults', array( + 'download_id' => $post_id, + 'price' => (bool) true, + 'price_id' => isset( $args['price_id'] ) ? $args['price_id'] : false, + 'direct' => $button_behavior == 'direct' ? true : false, + 'text' => $button_behavior == 'direct' ? edd_get_option( 'buy_now_text', __( 'Buy Now', 'easy-digital-downloads' ) ) : edd_get_option( 'add_to_cart_text', __( 'Purchase', 'easy-digital-downloads' ) ), + 'checkout' => edd_get_option( 'checkout_button_text', _x( 'Checkout', 'text shown on the Add to Cart Button when the product is already in the cart', 'easy-digital-downloads' ) ), + 'style' => edd_get_option( 'button_style', 'button' ), + 'color' => edd_get_button_color_class(), + 'class' => 'edd-submit', + ) ); + + $args = wp_parse_args( $args, $defaults ); + + $download = new EDD_Download( $args['download_id'] ); + + if( empty( $download->ID ) ) { + return false; + } + + // Product not published or user doesn't have permission to view drafts. + if ( 'publish' !== $download->post_status && ! current_user_can( 'edit_product', $download->ID ) ) { + return false; + } + + // Override the straight_to_gateway if the shop doesn't support it. + if ( ! edd_shop_supports_buy_now() || ! $download->supports_buy_now() ) { + $args['direct'] = false; + } + + $options = array(); + $variable_pricing = $download->has_variable_prices(); + $data_variable = $variable_pricing ? ' data-variable-price="yes"' : 'data-variable-price="no"'; + $type = $download->is_single_price_mode() ? 'data-price-mode=multi' : 'data-price-mode=single'; + + $show_price = $args['price'] && $args['price'] !== 'no'; + $data_price_value = 0; + $price = false; + + if ( $variable_pricing && false !== $args['price_id'] ) { + + $price_id = $args['price_id']; + $prices = $download->prices; + $options['price_id'] = $args['price_id']; + $found_price = isset( $prices[$price_id] ) ? $prices[$price_id]['amount'] : false; + + $data_price_value = $found_price; + + if ( $show_price ) { + $price = $found_price; } - - $purchase_form .= '
    '; - - $data_variable = $variable_pricing ? ' data-variable-price="yes"' : ''; - - if ( edd_item_in_cart( $download_id ) ) { - $button_display = 'style="display:none;"'; - $checkout_display = ''; - } else { - $button_display = ''; - $checkout_display = 'style="display:none;"'; - } - - if ( $style == 'button' ) { - - $purchase_button = sprintf( '', - esc_attr( 'edd_button edd_add_to_cart_wrap edd_' . $color ), - $button_display - ); - $purchase_button .= ''; - $purchase_button .= ''; - $purchase_button .= sprintf( '', - esc_attr( 'edd_button_text edd-submit edd-add-to-cart ' . $class ), - esc_attr( $link_text ), - esc_attr( $download_id ), - $data_variable - ); - $purchase_button .= ''; - $purchase_button .= ''; - $purchase_button .= ''; - - $checkout_link = sprintf( '', - esc_url( $checkout_url ), - esc_attr( 'edd_go_to_checkout edd_button edd_' . $color ), - $checkout_display - ); - $checkout_link .= ''; - $checkout_link .= '' . __( 'Checkout', 'edd' ) . ''; - $checkout_link .= ''; - $checkout_link .= ''; - - $purchase_form .= $purchase_button . $checkout_link; - - } else { - - $purchase_text = sprintf( '', - esc_attr( 'edd_submit_plain edd-add-to-cart ' . $class ), - esc_attr( $link_text ), - esc_attr( $download_id ), - esc_attr( $data_variable ), - $button_display - ); - - $checkout_link = sprintf( '', - esc_url( $checkout_url ), - esc_attr( 'edd_go_to_checkout edd_button edd_' . $color ), - $checkout_display - ); - $checkout_link .= __( 'Checkout', 'edd' ); - $checkout_link .= ''; - - $purchase_form .= $purchase_text . $checkout_link; - } - if ( edd_is_ajax_enabled() ) { - $purchase_form .= sprintf( '
    ', - esc_url( EDD_PLUGIN_URL . 'includes/images/loading.gif' ) - ); - $purchase_form .= ' 
    '; + + } elseif ( ! $variable_pricing ) { + + $data_price_value = $download->price; + + if ( $show_price ) { + $price = $download->price; + } + + } + + $data_price = 'data-price="' . $data_price_value . '"'; + + $button_text = ! empty( $args['text'] ) ? ' – ' . $args['text'] : ''; + + if ( false !== $price ) { + + if ( 0 == $price ) { + $args['text'] = __( 'Free', 'easy-digital-downloads' ) . $button_text; + } else { + $args['text'] = edd_currency_filter( edd_format_amount( $price ) ) . $button_text; + } + + } + + $button_display = ''; + $checkout_display = 'style="display:none;"'; + if ( edd_item_in_cart( $download->ID, $options ) && ( ! $variable_pricing || ! $download->is_single_price_mode() ) ) { + $button_display = 'style="display:none;"'; + $checkout_display = ''; + } + + // Collect any form IDs we've displayed already so we can avoid duplicate IDs + if ( isset( $edd_displayed_form_ids[ $download->ID ] ) ) { + $edd_displayed_form_ids[ $download->ID ]++; + } else { + $edd_displayed_form_ids[ $download->ID ] = 1; + } + + $form_id = ! empty( $args['form_id'] ) ? $args['form_id'] : 'edd_purchase_' . $download->ID; + + // If we've already generated a form ID for this download ID, append -# + if ( $edd_displayed_form_ids[ $download->ID ] > 1 ) { + $form_id .= '-' . $edd_displayed_form_ids[ $download->ID ]; + } + + /** + * Filter the purchase link arguments. + * + * @param array $args The purchase link arguments. + * @param EDD_Download $download The download object. Added in 3.2.4. + */ + $args = apply_filters( 'edd_purchase_link_args', $args, $download ); + + ob_start(); +?> + + + ID, $args ); ?> + +
    + ID ) ) . '" data-timestamp="' . esc_attr( $timestamp ) . '" data-token="' . esc_attr( EDD\Utils\Tokenizer::tokenize( $timestamp ) ) . '" data-action="edd_add_to_cart" data-download-id="' . esc_attr( $download->ID ) . '" ' . $data_variable . ' ' . $type . ' ' . $data_price . ' ' . $button_display . '>' . $args['text'] . ' '; + } - - $purchase_form .= '
    '; - $purchase_form .= ''; - $purchase_form .= ''; - $purchase_form .= ''; - - return apply_filters( 'edd_purchase_download_form', $purchase_form, $download_id, $link_text, $style, $color, $class ); - -} + echo ''; + echo '' . $args['checkout'] . ''; + ?> + + + + + + + is_free( $args['price_id'] ) && ! edd_download_is_tax_exclusive( $download->ID ) ): ?> + ' . sprintf( esc_html__( 'Includes %1$s tax', 'easy-digital-downloads' ), esc_html( edd_get_formatted_tax_rate() ) ) . ''; + } elseif ( edd_display_tax_rate() && ! edd_prices_include_tax() ) { + /* translators: the formatted tax rate */ + echo '' . sprintf( esc_html__( 'Excluding %1$s tax', 'easy-digital-downloads' ), esc_html( edd_get_formatted_tax_rate() ) ) . ''; + } ?> + +
    + + + + + + is_free( $args['price_id'] ) ) { ?> + + + + + + + ID, $args ) ) : ?> + + + + ID, $args ); ?> + + +post_type == 'download' && is_singular() && is_main_query() ) { - ob_start(); - do_action( 'edd_after_download_content', $post->ID ); - $content .= ob_get_clean(); + // If we've already generated a form ID for this download ID, append -# + $form_id = ''; + if ( $edd_displayed_form_ids[ $download_id ] > 1 ) { + $form_id .= '-' . $edd_displayed_form_ids[ $download_id ]; } - - return $content; - + + $variable_pricing = edd_has_variable_prices( $download_id ); + + if ( ! $variable_pricing ) { + return; + } + + $prices = apply_filters( 'edd_purchase_variable_prices', edd_get_variable_prices( $download_id ), $download_id ); + + // If the price_id passed is found in the variable prices, do not display all variable prices. + if ( false !== $args['price_id'] && isset( $prices[ $args['price_id'] ] ) ) { + return; + } + + $type = edd_single_price_option_mode( $download_id ) ? 'checkbox' : 'radio'; + $mode = edd_single_price_option_mode( $download_id ) ? 'multi' : 'single'; + + // Filter the class names for the edd_price_options div + $css_classes_array = apply_filters( 'edd_price_options_classes', array( + 'edd_price_options', + 'edd_' . esc_attr( $mode ) . '_mode' + ), $download_id ); + + // Sanitize those class names and form them into a string + $css_classes_string = implode( ' ', array_map( 'sanitize_html_class', $css_classes_array ) ); + + if ( edd_item_in_cart( $download_id ) && ! edd_single_price_option_mode( $download_id ) ) { + return; + } + + do_action( 'edd_before_price_options', $download_id ); ?> +
    +
      + $price ) : + echo '
    • '; + echo ''; + do_action( 'edd_after_price_option', $key, $price, $download_id ); + echo '
    • '; + endforeach; + endif; + do_action( 'edd_after_price_options_list', $download_id, $prices, $type ); + ?> +
    +
    + +
    + +
    + +
    +  x  + +
    +post_type && is_singular( 'download' ) && is_main_query() && ! post_password_required() ) { + ob_start(); + do_action( 'edd_before_download_content', $post->ID ); + $content = ob_get_clean() . $content; } return $content; - } -add_filter( 'the_content', 'edd_filter_success_page_content' ); +add_filter( 'the_content', 'edd_before_download_content' ); +/** + * After Download Content + * + * Adds an action to the end of download post content that can be hooked to by + * other functions. + * + * @since 1.0.8 + * @global $post + * + * @param $content The the_content field of the download object + * @return string the content with any additional data attached + */ +function edd_after_download_content( $content ) { + global $post; + + if ( $post && $post->post_type == 'download' && is_singular( 'download' ) && is_main_query() && !post_password_required() ) { + ob_start(); + do_action( 'edd_after_download_content', $post->ID ); + $content .= ob_get_clean(); + } + + return $content; +} +add_filter( 'the_content', 'edd_after_download_content' ); /** * Get Button Colors * * Returns an array of button colors. * - * @access public - * @since 1.0 - * @return array -*/ - + * @since 1.0 + * @return array $colors Button colors + */ function edd_get_button_colors() { - - $colors = array( - 'gray' => __( 'Gray', 'edd' ), - 'pink' => __( 'Pink', 'edd' ), - 'blue' => __( 'Blue', 'edd' ), - 'green' => __( 'Green', 'edd' ), - 'teal' => __( 'Teal', 'edd' ), - 'black' => __( 'Black', 'edd' ), - 'dark gray' => __( 'Dark Gray', 'edd' ), - 'orange' => __( 'Orange', 'edd' ), - 'purple' => __( 'Purple', 'edd' ), - 'slate' => __( 'Slate', 'edd' ) + $colors = array( + 'white' => array( + 'label' => __( 'White', 'easy-digital-downloads' ), + 'hex' => '#ffffff' + ), + 'gray' => array( + 'label' => __( 'Gray', 'easy-digital-downloads' ), + 'hex' => '#f0f0f0' + ), + 'blue' => array( + 'label' => __( 'Blue', 'easy-digital-downloads' ), + 'hex' => '#428bca' + ), + 'red' => array( + 'label' => __( 'Red', 'easy-digital-downloads' ), + 'hex' => '#d9534f' + ), + 'green' => array( + 'label' => __( 'Green', 'easy-digital-downloads' ), + 'hex' => '#5cb85c' + ), + 'yellow' => array( + 'label' => __( 'Yellow', 'easy-digital-downloads' ), + 'hex' => '#f0ad4e' + ), + 'orange' => array( + 'label' => __( 'Orange', 'easy-digital-downloads' ), + 'hex' => '#ed9c28' + ), + 'dark-gray' => array( + 'label' => __( 'Dark Gray', 'easy-digital-downloads' ), + 'hex' => '#363636' + ), + 'inherit' => array( + 'label' => __( 'Inherit', 'easy-digital-downloads' ), + 'hex' => '' + ) ); - - return apply_filters( 'edd_button_colors', $colors ); + return apply_filters( 'edd_button_colors', $colors ); } - /** * Get Button Styles * * Returns an array of button styles. * - * @access public - * @since 1.2.2 - * @return array -*/ - + * @since 1.2.2 + * @return array $styles Button styles + */ function edd_get_button_styles() { - - $styles = array( - 'button' => __( 'Button', 'edd' ), - 'plain' => __( 'Plain Text', 'edd' ) + $styles = array( + 'button' => __( 'Button', 'easy-digital-downloads' ), + 'plain' => __( 'Plain Text', 'easy-digital-downloads' ) ); - - return apply_filters( 'edd_button_styles', $styles ); - -} - -/** - * Show Has Purchased Item Message - * - * Prints a notice when user has already purchased the item. - * - * @access private - * @since 1.0 - * @return void -*/ - -function edd_show_has_purchased_item_message( $download_id ) { - - global $user_ID; - - if ( edd_has_user_purchased( $user_ID, $download_id ) ) { - echo '

    ' . __( 'You have already purchased this item, but you may purchase it again.', 'edd' ) . '

    '; - } - + return apply_filters( 'edd_button_styles', $styles ); } -add_action( 'edd_after_download_content', 'edd_show_has_purchased_item_message' ); - /** * Default formatting for download excerpts * - * This excerpt is primarily used in the [downloads] short code + * This excerpt is primarily used in the [downloads] shortcode * - * @access private - * @since 1.0.8.4 - * @return string -*/ - + * @since 1.0.8.4 + * @param string $excerpt Content before filtering + * @return string $excerpt Content after filtering + * @return string + */ function edd_downloads_default_excerpt( $excerpt ) { - return do_shortcode( wpautop( $excerpt ) ); - } add_filter( 'edd_downloads_excerpt', 'edd_downloads_default_excerpt' ); - /** * Default formatting for full download content * - * This is primarily used in the [downloads] short code + * This is primarily used in the [downloads] shortcode * - * @access private - * @since 1.0.8.4 - * @return string -*/ - + * @since 1.0.8.4 + * @param string $content Content before filtering + * @return string $content Content after filtering + */ function edd_downloads_default_content( $content ) { - return do_shortcode( wpautop( $content ) ); - } add_filter( 'edd_downloads_content', 'edd_downloads_default_content' ); - /** * Gets the download links for each item purchased * - * @access private - * @since 1.1.5 - * @return string -*/ - -function edd_get_purchase_download_links( $purchase_data ) { + * @since 1.1.5 + * @param int $payment_id The ID of the payment to retrieve download links for + * @return string + */ +function edd_get_purchase_download_links( $payment_id = 0 ) { - $links = '
    \ No newline at end of file diff --git a/includes/templates/shortcode-content-excerpt.php b/includes/templates/shortcode-content-excerpt.php deleted file mode 100644 index b9fd077342d..00000000000 --- a/includes/templates/shortcode-content-excerpt.php +++ /dev/null @@ -1,6 +0,0 @@ -
    - -
    \ No newline at end of file diff --git a/includes/templates/shortcode-content-full.php b/includes/templates/shortcode-content-full.php deleted file mode 100644 index 4880d3695a6..00000000000 --- a/includes/templates/shortcode-content-full.php +++ /dev/null @@ -1,3 +0,0 @@ -
    - -
    \ No newline at end of file diff --git a/includes/templates/shortcode-content-image.php b/includes/templates/shortcode-content-image.php deleted file mode 100644 index 5c24e0c7ef3..00000000000 --- a/includes/templates/shortcode-content-image.php +++ /dev/null @@ -1,5 +0,0 @@ - -
    - -
    - \ No newline at end of file diff --git a/includes/templates/shortcode-content-price.php b/includes/templates/shortcode-content-price.php deleted file mode 100644 index 6bd3842b97b..00000000000 --- a/includes/templates/shortcode-content-price.php +++ /dev/null @@ -1,5 +0,0 @@ - -
    - -
    - \ No newline at end of file diff --git a/includes/templates/shortcode-content-title.php b/includes/templates/shortcode-content-title.php deleted file mode 100644 index 8b11fbf811d..00000000000 --- a/includes/templates/shortcode-content-title.php +++ /dev/null @@ -1,3 +0,0 @@ -

    - -

    \ No newline at end of file diff --git a/includes/theme-compatibility.php b/includes/theme-compatibility.php new file mode 100755 index 00000000000..93358f06eda --- /dev/null +++ b/includes/theme-compatibility.php @@ -0,0 +1,42 @@ +subtotal; + if ( ! empty( $this->discount ) ) { + $subtotal -= $this->discount; + } + + $maximums = array( + 'subtotal' => $subtotal, + 'tax' => $this->tax, + 'total' => $this->total, + 'quantity' => $this->quantity, + ); + + $refunded_items = $this->get_refunded_items(); + + if ( ! empty( $refunded_items ) ) { + foreach ( $refunded_items as $refunded_item ) { + // We're adding numbers here, because `$refund_item` has negative amounts already. + $maximums['subtotal'] += $refunded_item->subtotal; + $maximums['tax'] += $refunded_item->tax; + $maximums['total'] += $refunded_item->total; + // If a partial refund was spread across all order items, just use the original quantity. + if ( abs( $refunded_item->quantity ) < abs( $this->quantity ) ) { + $maximums['quantity'] += $refunded_item->quantity; + } + } + } + + $maximums['subtotal'] = number_format( $maximums['subtotal'], edd_currency_decimal_filter(), '.', '' ); + $maximums['tax'] = number_format( $maximums['tax'], edd_currency_decimal_filter(), '.', '' ); + $maximums['total'] = number_format( $maximums['total'], edd_currency_decimal_filter(), '.', '' ); + $maximums['quantity'] = intval( $maximums['quantity'] ); + + return $maximums; + } + +} diff --git a/includes/upgrades/functions.php b/includes/upgrades/functions.php new file mode 100644 index 00000000000..7d97faaa76a --- /dev/null +++ b/includes/upgrades/functions.php @@ -0,0 +1,234 @@ + array( + 'name' => __( 'Tax Rates', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Tax_Rates', + ), + 'migrate_discounts' => array( + 'name' => __( 'Discounts', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Discounts', + ), + 'migrate_orders' => array( + 'name' => __( 'Orders', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Orders', + ), + 'migrate_customer_addresses' => array( + 'name' => __( 'Customer Addresses', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Customer_Addresses', + ), + 'migrate_customer_email_addresses' => array( + 'name' => __( 'Customer Email Addresses', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Customer_Email_Addresses', + ), + 'migrate_customer_notes' => array( + 'name' => __( 'Customer Notes', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Customer_Notes', + ), + 'migrate_logs' => array( + 'name' => __( 'Logs', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Logs', + ), + 'migrate_order_notes' => array( + 'name' => __( 'Order Notes', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Order_Notes', + ), + 'v30_legacy_data_removed' => array( + 'name' => __( 'Remove Legacy Data', 'easy-digital-downloads' ), + 'class' => 'EDD\\Admin\\Upgrades\\v3\\Remove_Legacy_Data', + ), + ); +} + +/** + * Perform automatic database upgrades when necessary + * + * @since 2.6 + * @return void + */ +function edd_do_automatic_upgrades() { + + $edd_version = edd_get_db_version(); + if ( version_compare( $edd_version, EDD_VERSION, '>=' ) ) { + return; + } + + $set_stripe_transients = true; + if ( ! empty( $edd_version ) ) { + update_option( 'edd_version_upgraded_from', $edd_version, false ); + + // Existing stores should set the upgraded version and the onboarding wizard as complete. + if ( ! get_option( 'edd_onboarding_completed', false ) && ! get_option( 'edd_onboarding_started', false ) ) { + update_option( 'edd_onboarding_completed', true, false ); + } + + // Stores upgrading from 3.2.0 or greater should not set the Stripe transients. + if ( version_compare( $edd_version, '3.2.0', '>=' ) ) { + $set_stripe_transients = false; + } + } + + /** + * If PayPal is connected, schedule a cron event to sync the webhooks in the background. + * + * @since 3.2.0 + */ + if ( EDD\Gateways\PayPal\has_rest_api_connection() && EDD\Gateways\PayPal\Webhooks\get_webhook_id() ) { + // Schedule a one time cron event to sync the webhooks. + \EDD\Cron\Events\SingleEvent::add( + time() + ( 5 * MINUTE_IN_SECONDS ), + 'edd_paypal_commerce_sync_webhooks' + ); + } + + /** + * If Stripe is active and EDD Pro or EDD Stripe is active, set a transient to check the license. + * + * @since 3.2.0 + */ + if ( $set_stripe_transients && edd_is_gateway_active( 'stripe' ) && ( edd_is_pro() || edds_is_pro() ) ) { + set_transient( 'edd_stripe_check_license', true, 30 ); + set_transient( 'edd_stripe_new_install', time(), HOUR_IN_SECONDS * 72 ); + } + + edd_update_db_version(); +} diff --git a/includes/user-functions.php b/includes/user-functions.php old mode 100644 new mode 100755 index c8e7e66ad55..9a25927c77f --- a/includes/user-functions.php +++ b/includes/user-functions.php @@ -4,146 +4,1135 @@ * * Functions related to users / customers * - * @package Easy Digital Downloads - * @subpackage AJAX - * @copyright Copyright (c) 2012, Pippin Williamson + * @package EDD + * @subpackage Functions + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 1.0.8.6 -*/ + */ + +// Exit if accessed directly. +defined( 'ABSPATH' ) || exit; /** * Get Users Purchases * * Retrieves a list of all purchases by a specific user. * - * @access public - * @since 1.0 - * @return array -*/ - -function edd_get_users_purchases( $user_id = 0 ) { - - if( empty( $user_id ) ) { - global $user_ID; - $user_id = $user_ID; + * @since 1.0 + * + * @param int|string $user User ID or email address. + * @param int $number Number of purchases to retrieve. + * @param bool $pagination Page number to retrieve. + * @param string|array $status Either an array of statuses, a single status as a string literal or a comma + * separated list of statues. Default 'complete'. + * + * @return WP_Post[]|false List of all user purchases. + */ +function edd_get_users_purchases( $user = 0, $number = 20, $pagination = false, $status = 'complete' ) { + if ( empty( $user ) ) { + $user = get_current_user_id(); } - $purchases = get_transient('edd_user_' . $user_id . '_purchases'); - if(false === $purchases || edd_is_test_mode()) { - $mode = edd_is_test_mode() ? 'test' : 'live'; - $purchases = get_posts( + if ( is_email( $user ) ) { + $customers = edd_get_customers( array( - 'meta_query' => array( - 'relation' => 'AND', - array( - 'key' => '_edd_payment_mode', - 'value' => $mode - ), - array( - 'key' => '_edd_payment_user_id', - 'value' => $user_id - ) - ), - 'post_type' => 'edd_payment', - 'posts_per_page' => -1 + 'email' => $user, ) ); - set_transient('edd_user_' . $user_id . '_purchases', $purchases, 7200); + if ( $customers ) { + $user = $customers[0]->user_id; + } + } + + // Bail if no user found. + if ( empty( $user ) ) { + return false; + } + + if ( is_string( $status ) ) { + if ( strpos( $status, ',' ) ) { + $status = explode( ',', $status ); + } else { + $status = 'publish' === $status + ? 'complete' + : $status; + + $status = array( $status ); + } + } + + if ( is_array( $status ) ) { + $status = array_unique( $status ); + } + + if ( $pagination ) { + if ( get_query_var( 'paged' ) ) { + $paged = get_query_var( 'paged' ); + } elseif ( get_query_var( 'page' ) ) { + $paged = get_query_var( 'page' ); + } else { + $paged = 1; + } + } + + $args = array( + 'user' => $user, + 'number' => $number, + 'status' => $status, + 'orderby' => 'date', + ); + + if ( $pagination ) { + $args['page'] = $paged; + } else { + $args['nopaging'] = true; + } + + if ( 'any' === $status ) { + unset( $args['status'] ); + } + + $purchases = edd_get_payments( apply_filters( 'edd_get_users_purchases_args', $args ) ); + + return $purchases + ? $purchases + : false; +} + +/** + * Retrieve products purchased by a specific user. + * + * @since 2.0 + * @since 3.0 Refactored to use new query methods and to be more efficient. + * + * @param int|string $user User ID or email address. + * @param string $status Order status. + * + * @return WP_Post[]|false Array of products, false otherwise. + */ +function edd_get_users_purchased_products( $user = 0, $status = 'complete' ) { + + if ( 'publish' === $status ) { + $status = 'complete'; + } + + // Fall back to user ID. + if ( empty( $user ) ) { + $user = get_current_user_id(); + } + + // Bail if no user. + if ( empty( $user ) ) { + return false; + } + + // Try to get customer. + if ( is_numeric( $user ) ) { + $customer = edd_get_customer_by( 'user_id', $user ); + } elseif ( is_email( $user ) ) { + $customer = edd_get_customer_by( 'email', $user ); + } else { + return false; + } + + if ( empty( $customer ) ) { + return false; + } + + // Fetch the order IDs. + $number = apply_filters( 'edd_users_purchased_products_payments', 9999999 ); + + $order_ids = edd_get_orders( + array( + 'customer_id' => $customer->id, + 'fields' => 'ids', + 'status' => $status, + 'number' => $number, + ) + ); + + $product_ids = edd_get_order_items( + array( + 'order_id__in' => $order_ids, + 'number' => $number, + 'fields' => 'product_id', + ) + ); + + $product_ids = array_unique( $product_ids ); + + // Bail if no product IDs found. + if ( empty( $product_ids ) ) { + return false; + } + + $args = apply_filters( + 'edd_get_users_purchased_products_args', + array( + 'include' => $product_ids, + 'post_type' => 'download', + 'posts_per_page' => -1, + ) + ); + + return apply_filters( 'edd_users_purchased_products_list', get_posts( $args ) ); +} + +/** + * Checks to see if a user has purchased a product. + * + * @since 1.0 + * @since 3.0 Refactored to be more efficient. + * + * @param int $user_id User ID. + * @param array|int $downloads Download IDs to check against. + * @param int $variable_price_id - the variable price ID to check for. + * + * @return bool True if purchased, false otherwise. + */ +function edd_has_user_purchased( $user_id = 0, $downloads = array(), $variable_price_id = null ) { + global $wpdb; + + // Bail if no user ID passed. + if ( empty( $user_id ) ) { + return false; + } + + /** + * Fires before the queries execute. + * + * @since 2.7.7 + */ + do_action( 'edd_has_user_purchased_before', $user_id, $downloads, $variable_price_id ); + + if ( ! is_array( $downloads ) ) { + $downloads = array( $downloads ); + } + + // Bail if no downloads passed. + if ( empty( $downloads ) ) { + return false; + } + + $number = apply_filters( 'edd_users_purchased_products_payments', 9999999 ); + + $where_id = "'" . implode( "', '", $wpdb->_escape( $downloads ) ) . "'"; + $product_id = "oi.product_id IN ({$where_id})"; + + $price_id = isset( $variable_price_id ) + ? $wpdb->prepare( 'AND oi.price_id = %d', absint( $variable_price_id ) ) + : ''; + + $statuses = "'" . implode( "', '", $wpdb->_escape( edd_get_deliverable_order_item_statuses() ) ) . "'"; + $status_id = " AND oi.status IN({$statuses})"; + + // Perform a direct database query as it is more efficient. + $sql = $wpdb->prepare( + " + SELECT COUNT(o.id) AS count + FROM {$wpdb->edd_orders} o + INNER JOIN {$wpdb->edd_order_items} oi ON o.id = oi.order_id + WHERE {$product_id} {$price_id} {$status_id} + AND o.type = 'sale' + AND user_id = %d + LIMIT %d", + absint( $user_id ), + $number + ); + + $result = (int) $wpdb->get_var( $sql ); + + $return = 0 === $result + ? false + : true; + + /** + * @since 2.7.7 + * + * Filter has purchased result + */ + return apply_filters( 'edd_has_user_purchased', $return, $user_id, $downloads, $variable_price_id ); +} + +/** + * Check if a user has made any purchases. + * + * @since 1.0 + * + * @param int $user_id User ID. + * @return bool True if user has purchased, false otherwise. + */ +function edd_has_purchases( $user_id = null ) { + + // Maybe fallback to logged in user. + if ( empty( $user_id ) ) { + $user_id = get_current_user_id(); + } + + if ( empty( $user_id ) ) { + return false; + } + + return (bool) edd_get_orders( + array( + 'user_id' => $user_id, + 'type' => 'sale', + 'status__in' => edd_get_complete_order_statuses(), + 'number' => 1, + ) + ); +} + + +/** + * Get purchase statistics for user. + * + * @since 1.6 + * @since 3.0 Updated to use new query method. + * + * @param int|string $user User ID or email address. + * + * @return array|false $stats Number of purchases and total amount spent by customer. False otherwise. + */ +function edd_get_purchase_stats_by_user( $user = '' ) { + if ( is_email( $user ) ) { + $field = 'email'; + } elseif ( is_numeric( $user ) ) { + $field = 'user_id'; + } else { + return false; + } + + $stats = array(); + $customer = edd_get_customer_by( $field, $user ); + + if ( $customer ) { + $stats['purchases'] = edd_count_orders( array( $field => $user ) ); + $stats['total_spent'] = edd_sanitize_amount( $customer->purchase_value ); } - if($purchases) { - // return the download list - return $purchases; + + return (array) apply_filters( 'edd_purchase_stats_by_user', $stats, $user ); +} + + +/** + * Count number of purchases of a customer. + * + * @since 1.3 + * + * @param string|int $user User ID or email. + * @return int Number of purchases. + */ +function edd_count_purchases_of_customer( $user = null ) { + if ( empty( $user ) ) { + $user = get_current_user_id(); + } + + $stats = ! empty( $user ) + ? edd_get_purchase_stats_by_user( $user ) + : false; + + return isset( $stats['purchases'] ) + ? $stats['purchases'] + : 0; +} + +/** + * Calculates the total amount spent by a user + * + * @since 1.3 + * @param mixed $user - ID or email. + * @return float - the total amount the user has spent + */ +function edd_purchase_total_of_user( $user = null ) { + $stats = edd_get_purchase_stats_by_user( $user ); + + return isset( $stats['total_spent'] ) ? $stats['total_spent'] : 0.00; +} + +/** + * Counts the total number of files a user (or customer if an email address is + * given) has downloaded + * + * @since 1.3 + * @since 3.0 Updated to use edd_count_file_download_logs. + * @param mixed $user - ID or email. + * @return int - The total number of files the user has downloaded + */ +function edd_count_file_downloads_of_user( $user ) { + + // If we got an email, look up the customer ID and call the direct query + // for customer download counts. + if ( is_email( $user ) ) { + return edd_count_file_downloads_of_customer( $user ); } - - // no downloads - return false; + + $customer = edd_get_customer_by( 'user_id', $user ); + + return ! empty( $customer->id ) ? edd_count_file_download_logs( + array( + 'customer_id' => $customer->id, + ) + ) : 0; } +/** + * Counts the total number of files a customer has downloaded. + * + * @since unknown + * @since 3.0 Updated to use edd_count_file_download_logs. + * @param string|int $customer_id_or_email The email address or id of the customer. + * + * @return int The total number of files the customer has downloaded. + */ +function edd_count_file_downloads_of_customer( $customer_id_or_email = '' ) { + $customer = new EDD_Customer( $customer_id_or_email ); + return edd_count_file_download_logs( + array( + 'customer_id' => $customer->id, + ) + ); +} /** - * Has User Purchased + * Validate a potential username * - * Checks to see if a user has purchased a download. + * @since 1.3.4 + * @param string $username The username to validate. + * @return bool + */ +function edd_validate_username( $username ) { + $sanitized = sanitize_user( $username, false ); + $valid = ( $sanitized == $username ); + + return (bool) apply_filters( 'edd_validate_username', $valid, $username ); +} + +/** + * Attach the customer to an existing user account when completing guest purchase. + * + * This only runs when a user account already exists and a guest purchase is made + * with the account's email address. + * + * After attaching the customer to the user ID, the account is set to pending. * - * @access public - * @since 1.0 - * @param int $user_id - the ID of the user to check - * @param int $download_Id - the ID of the download to check for - * @param int $variable_price_id - the variable price ID to check for - * @return boolean - true if has purchased, false otherwise -*/ + * @since 2.8 + * @param bool $success True if payment was added successfully, false otherwise. + * @param int $payment_id The ID of the EDD_Payment that was added. + * @param int $customer_id The ID of the EDD_Customer object. + * @param object $customer The EDD_Customer object. + * @return void + */ +function edd_connect_guest_customer_to_existing_user( $success, $payment_id, $customer_id, $customer ) { + + // If for some reason we don't get a customer object here, return. + if ( ! $customer instanceof EDD_Customer ) { + return; + } + + if ( ! empty( $customer->user_id ) || empty( $customer->email ) ) { + return; + } + + $user = get_user_by( 'email', $customer->email ); -function edd_has_user_purchased($user_id, $download_id, $variable_price_id = null) { - - if( !is_user_logged_in() ) - return false; // at some point this should support email checking + if ( ! $user instanceof WP_User ) { + return; + } - $users_purchases = edd_get_users_purchases($user_id); + $customer->update( array( 'user_id' => $user->ID ) ); - $return = false; + // Set a flag to force the account to be verified before purchase history can be accessed. + edd_set_user_to_pending( $user->ID ); + edd_send_user_verification_email( $user->ID ); +} +add_action( 'edd_customer_post_attach_payment', 'edd_connect_guest_customer_to_existing_user', 10, 4 ); - if($users_purchases) { - foreach($users_purchases as $purchase) { +/** + * Attach the newly created user_id to a customer, if one exists + * + * @since 2.4.6 + * @param int $user_id The User ID that was created. + * @return void + */ +function edd_connect_existing_customer_to_new_user( $user_id ) { + $email = get_the_author_meta( 'user_email', $user_id ); - $purchase_meta = edd_get_payment_meta( $purchase->ID ); - $purchased_files = maybe_unserialize($purchase_meta['downloads']); + // Update the user ID on the customer. + $customer = new EDD_Customer( $email ); - if(is_array($purchased_files)) { + if ( $customer->id > 0 ) { + $customer->update( array( 'user_id' => $user_id ) ); + } +} +add_action( 'user_register', 'edd_connect_existing_customer_to_new_user', 10, 1 ); - foreach($purchased_files as $download) { +/** + * Looks up purchases by email that match the registering user + * + * This is for users that purchased as a guest and then came + * back and created an account. + * + * @since 1.6 + * @param int $user_id - the new user's ID. + * @return void + */ +function edd_add_past_purchases_to_new_user( $user_id ) { - if($download['id'] == $download_id) { + $email = get_the_author_meta( 'user_email', $user_id ); + + if ( empty( $email ) ) { + return; + } - if( !is_null( $variable_price_id ) && $variable_price_id !== false ) { + $payments = edd_get_payments( + array( + 's' => $email, + 'output' => 'payments', + ) + ); - if( $variable_price_id == $download['options']['price_id'] ) { - - return true; - - } else { - - $return = false; - - } + if ( $payments ) { - } else { - - $return = true; - - } + // Set a flag to force the account to be verified before purchase history can be accessed. + edd_set_user_to_pending( $user_id ); - } + edd_send_user_verification_email( $user_id ); + foreach ( $payments as $payment ) { + if ( is_object( $payment ) && $payment instanceof EDD_Payment ) { + if ( intval( $payment->user_id ) > 0 ) { + continue; // This payment already associated with an account. } + $payment->user_id = $user_id; + $payment->save(); + } + } + } +} +add_action( 'user_register', 'edd_add_past_purchases_to_new_user', 10, 1 ); + + +/** + * Counts the total number of customers. + * + * @since 1.7 + * @return int - The total number of customers. + */ +function edd_count_total_customers( $args = array() ) { + return edd_count_customers(); +} + + +/** + * Returns the saved address for a customer + * + * @since 1.8 + * @since 3.0 Update to use new query methods. + + * @param int $user_id User ID. + * @return array Customer address. + */ +function edd_get_customer_address( $user_id = 0 ) { + + // Maybe fall back to logged in user ID. + if ( empty( $user_id ) ) { + $user_id = get_current_user_id(); + } + + $customer = edd_get_customer_by( 'user_id', $user_id ); + + $parsed_address = array(); + + if ( $customer ) { + $address = $customer->get_address(); + + if ( $address instanceof EDD\Customers\Customer_Address ) { + $parsed_address = array( + 'line1' => $address->address, + 'line2' => $address->address2, + 'city' => $address->city, + 'zip' => $address->postal_code, + 'country' => $address->country, + 'state' => $address->region, + ); + } + } + + return wp_parse_args( + $parsed_address, + array( + 'line1' => '', + 'line2' => '', + 'city' => '', + 'zip' => '', + 'country' => '', + 'state' => '', + ) + ); +} + +/** + * Set a user's status to pending + * + * @since 2.4.4 + * @param integer $user_id The User ID to set to pending. + * @return bool If the update was successful + */ +function edd_set_user_to_pending( $user_id = 0 ) { + if ( empty( $user_id ) ) { + return false; + } + + do_action( 'edd_pre_set_user_to_pending', $user_id ); + + $update_successful = (bool) update_user_meta( $user_id, '_edd_pending_verification', '1' ); + + do_action( 'edd_post_set_user_to_pending', $user_id, $update_successful ); + + return $update_successful; +} + +/** + * Set the user from pending to active + * + * @since 2.4.4 + * @param integer $user_id The User ID to activate. + * @return bool If the user was marked as active or not + */ +function edd_set_user_to_verified( $user_id = 0 ) { + + if ( empty( $user_id ) ) { + return false; + } + + if ( ! edd_user_pending_verification( $user_id ) ) { + return false; + } + + do_action( 'edd_pre_set_user_to_active', $user_id ); + + $update_successful = delete_user_meta( $user_id, '_edd_pending_verification', '1' ); + + do_action( 'edd_post_set_user_to_active', $user_id, $update_successful ); + + return $update_successful; +} + +/** + * Determines if the user account is pending verification. Pending accounts cannot view purchase history + * + * @since 2.4.4 + * @return bool + */ +function edd_user_pending_verification( $user_id = null ) { + + if ( is_null( $user_id ) ) { + $user_id = get_current_user_id(); + } + + // No need to run a DB lookup on an empty user id. + if ( empty( $user_id ) ) { + return false; + } + + $pending = get_user_meta( $user_id, '_edd_pending_verification', true ); + + return (bool) apply_filters( 'edd_user_pending_verification', ! empty( $pending ), $user_id ); +} + +/** + * Gets the activation URL for the specified user + * + * @since 2.4.4 + * @return string + */ +function edd_get_user_verification_url( $user_id = 0 ) { + + if ( empty( $user_id ) ) { + return false; + } + + $base_url = add_query_arg( + array( + 'edd_action' => 'verify_user', + 'user_id' => absint( $user_id ), + 'ttl' => strtotime( '+24 hours' ), + ), + untrailingslashit( edd_get_user_verification_page() ) + ); + + $token = edd_get_user_verification_token( $base_url ); + $url = add_query_arg( 'token', $token, $base_url ); + + return apply_filters( 'edd_get_user_verification_url', $url, $user_id ); +} + +/** + * Gets the URL that triggers a new verification email to be sent + * + * @since 2.4.4 + * @return string + */ +function edd_get_user_verification_request_url( $user_id = 0 ) { + + if ( empty( $user_id ) ) { + $user_id = get_current_user_id(); + } + + $url = esc_url( + wp_nonce_url( + add_query_arg( + array( + 'edd_action' => 'send_verification_email', + ) + ), + 'edd-request-verification' + ) + ); + + return apply_filters( 'edd_get_user_verification_request_url', $url, $user_id ); +} + +/** + * Sends an email to the specified user with a URL to verify their account + * + * @since 2.4.4 + * @param int $user_id The User ID to send the email to. + */ +function edd_send_user_verification_email( $user_id = 0 ) { + + if ( empty( $user_id ) ) { + return; + } + + if ( ! edd_user_pending_verification( $user_id ) ) { + return; + } + $email = new EDD\Emails\Types\UserVerification( $user_id ); + $email->send(); +} + +/** + * Generates a token for a user verification URL. + * + * An 'o' query parameter on a URL can include optional variables to test + * against when verifying a token without passing those variables around in + * the URL. For example, downloads can be limited to the IP that the URL was + * generated for by adding 'o=ip' to the query string. + * + * Or suppose when WordPress requested a URL for automatic updates, the user + * agent could be tested to ensure the URL is only valid for requests from + * that user agent. + * + * @since 2.4.4 + * + * @param string $url The URL to generate a token for. + * @return string The token for the URL. + */ +function edd_get_user_verification_token( $url = '' ) { + + $args = array(); + $hash = apply_filters( 'edd_get_user_verification_token_algorithm', 'sha256' ); + $secret = apply_filters( 'edd_get_user_verification_token_secret', hash( $hash, wp_salt() ) ); + + /* + * Add additional args to the URL for generating the token. + * Allows for restricting access to IP and/or user agent. + */ + $parts = parse_url( $url ); + $options = array(); + + if ( isset( $parts['query'] ) ) { + + wp_parse_str( $parts['query'], $query_args ); + + // o = option checks (ip, user agent). + if ( ! empty( $query_args['o'] ) ) { + + // Multiple options can be checked by separating them with a colon in the query parameter. + $options = explode( ':', rawurldecode( $query_args['o'] ) ); + + if ( in_array( 'ip', $options ) ) { + + $args['ip'] = edd_get_ip(); + + } + + if ( in_array( 'ua', $options ) ) { + + $ua = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : ''; + $args['user_agent'] = rawurlencode( $ua ); + } } } - return $return; + + /* + * Filter to modify arguments and allow custom options to be tested. + * Be sure to rawurlencode any custom options for consistent results. + */ + $args = apply_filters( 'edd_get_user_verification_token_args', $args, $url, $options ); + + $args['secret'] = $secret; + $args['token'] = false; // Removes a token if present. + + $url = add_query_arg( $args, $url ); + $parts = parse_url( $url ); + + // In the event there isn't a path, set an empty one so we can MD5 the token. + if ( ! isset( $parts['path'] ) ) { + + $parts['path'] = ''; + + } + + $token = md5( $parts['path'] . '?' . $parts['query'] ); + + return $token; +} + +/** + * Generate a token for a URL and match it against the existing token to make + * sure the URL hasn't been tampered with. + * + * @since 2.4.4 + * + * @param string $url URL to test. + * @return bool + */ +function edd_validate_user_verification_token( $url = '' ) { + + $ret = false; + $parts = parse_url( $url ); + $query_args = array(); + + if ( isset( $parts['query'] ) ) { + + wp_parse_str( $parts['query'], $query_args ); + + if ( isset( $query_args['ttl'] ) && current_time( 'timestamp' ) > $query_args['ttl'] ) { + + do_action( 'edd_user_verification_token_expired' ); + + $link_text = sprintf( + /* translators: %s: URL to request a new verification link */ + __( 'Sorry but your account verification link has expired. Click here to request a new verification URL.', 'easy-digital-downloads' ), + esc_url( edd_get_user_verification_request_url() ) + ); + + wp_die( apply_filters( 'edd_verification_link_expired_text', $link_text ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + + } + + if ( isset( $query_args['token'] ) && edd_get_user_verification_token( $url ) === $query_args['token'] ) { + + $ret = true; + + } + } + + return apply_filters( 'edd_validate_user_verification_token', $ret, $url, $query_args ); +} + +/** + * Processes an account verification email request + * + * @since 2.4.4 + * + * @return void + */ +function edd_process_user_verification_request() { + + if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'edd-request-verification' ) ) { + wp_die( __( 'Nonce verification failed.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( ! is_user_logged_in() ) { + wp_die( __( 'You must be logged in to verify your account.', 'easy-digital-downloads' ), __( 'Notice', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + if ( ! edd_user_pending_verification( get_current_user_id() ) ) { + wp_die( __( 'Your account has already been verified.', 'easy-digital-downloads' ), __( 'Notice', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + edd_send_user_verification_email( get_current_user_id() ); + + $redirect = apply_filters( + 'edd_user_account_verification_request_redirect', + add_query_arg( 'edd-verify-request', '1', edd_get_user_verification_page() ) + ); + + edd_redirect( $redirect ); +} +add_action( 'edd_send_verification_email', 'edd_process_user_verification_request' ); + +/** + * Processes an account verification + * + * @since 2.4.4 + */ +function edd_process_user_account_verification() { + + if ( empty( $_GET['token'] ) ) { + return false; + } + + if ( empty( $_GET['user_id'] ) ) { + return false; + } + + if ( empty( $_GET['ttl'] ) ) { + return false; + } + + $parts = parse_url( add_query_arg( array() ) ); + wp_parse_str( $parts['query'], $query_args ); + $url = add_query_arg( $query_args, untrailingslashit( edd_get_user_verification_page() ) ); + + if ( ! edd_validate_user_verification_token( $url ) ) { + + do_action( 'edd_invalid_user_verification_token' ); + + wp_die( __( 'Invalid verification token provided.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); + } + + edd_set_user_to_verified( absint( $_GET['user_id'] ) ); + + do_action( 'edd_user_verification_token_validated' ); + + $redirect = apply_filters( + 'edd_user_account_verified_redirect', + add_query_arg( 'edd-verify-success', '1', edd_get_user_verification_page() ) + ); + + edd_redirect( $redirect ); } +add_action( 'edd_verify_user', 'edd_process_user_account_verification' ); +/** + * Retrieves the purchase history page, or main URL for the account verification process + * + * @since 2.4.6 + * @return string The base URL to use for account verification + */ +function edd_get_user_verification_page() { + $url = home_url(); + $purchase_history = edd_get_option( 'purchase_history_page', 0 ); + + if ( ! empty( $purchase_history ) ) { + $url = get_permalink( $purchase_history ); + } + + return apply_filters( 'edd_user_verification_base_url', $url ); +} /** - * Has Purchases + * When a user is deleted, detach that user id from the customer record * - * Checks to see if a user has purchased at least one item. + * @since 2.5 + * @param int $user_id The User ID being deleted. + * @return bool If the detachment was successful + */ +function edd_detach_deleted_user( $user_id ) { + + $customer = new EDD_Customer( $user_id, true ); + $detached = false; + + if ( $customer->id > 0 ) { + $detached = $customer->update( array( 'user_id' => 0 ) ); + } + + do_action( 'edd_detach_deleted_user', $user_id, $customer, $detached ); + + return $detached; +} +add_action( 'delete_user', 'edd_detach_deleted_user', 10, 1 ); + +/** + * Modify User Profile + * + * Modifies the output of profile.php to add key generation/revocation * - * @access public - * @since 1.0 - * @param $user_id int - the ID of the user to check - * @return bool - true if has purchased, false other wise. -*/ + * @since 2.6 + * @param object $user Current user info. + * @return void + */ +function edd_show_user_api_key_field( $user ) { + // If we didn't get a user, bail. + if ( empty( $user ) ) { + return; + } + + /** + * Show API User Key Fields + * + * Allows showing/hiding the user API Key fields. By default will only try to show on admin pages. The filter + * allows for developers to choose to show it in other places that the WordPress profile editor hooks are used + * like bbPress + * + * @since 2.9.1 + * + * @param boolean If EDD should attempt to load the user API fields + * @param WP_User The User object currently being viewed. + */ + $show_fields = apply_filters( 'edd_show_user_api_key_fields', is_admin(), $user ); + if ( ! $show_fields ) { + return; + } -function edd_has_purchases($user_id = null) { - - if(is_null($user_id)) { - global $user_ID; - $user_id = $user_ID; + /** + * If the store does not allow users to create API Keys, + * and the current user is not able to manage shop settings...bail. + */ + if ( ! edd_get_option( 'api_allow_user_keys', false ) && ! current_user_can( 'manage_shop_settings' ) ) { + return; } - - if(edd_get_users_purchases($user_id)) { - return true; // user has at least one purchase + + // If the user is allowed to edit the current user, show the API Key fields. + if ( current_user_can( 'edit_user', $user->ID ) ) { + $user = get_userdata( $user->ID ); + $public_key = EDD()->api->get_user_public_key( $user->ID ); + $secret_key = EDD()->api->get_user_secret_key( $user->ID ); + $token = EDD()->api->get_token( $user->ID ); + ?> + + + + + + + + + + +
    + + + edd_user_public_key ) ) { ?> +

    + +

    + +
    + + +
    + + +
    + + +
    +

    + +

    +

    + api->get_last_used( $user->ID ); + if ( empty( $last_used ) ) { + esc_html_e( 'Never Used', 'easy-digital-downloads' ); + } else { + // Convert the date to the store timezone. + $converted_date = EDD()->utils->date( $last_used, null, true )->toDateTimeString(); + + // Use the UTC time for the human time diff. + $date_diff = human_time_diff( strtotime( $last_used ) ); + + // Build the date diff string. + $date_diff_string = sprintf( + /* translators: %s: a length of time (e.g. "1 second") */ + __( '%s ago', 'easy-digital-downloads' ), + $date_diff + ); + echo '' . __( 'Last Used:', 'easy-digital-downloads' ) . ' '; + echo ''; + } + ?> +

    +
    + +
    + + + + + + + + + +
    + iOS App', 'easy-digital-downloads' ), 'https://itunes.apple.com/us/app/easy-digital-downloads-2/id1169488828?ls=1&mt=8' ); + ?> + + + +
    + + + api->get_user_public_key( $user_id ); + + if ( empty( $public_key ) ) { + $new_public_key = EDD()->api->generate_public_key( $user->user_email ); + $new_secret_key = EDD()->api->generate_private_key( $user->ID ); + + update_user_meta( $user_id, $new_public_key, 'edd_user_public_key' ); + update_user_meta( $user_id, $new_secret_key, 'edd_user_secret_key' ); + } else { + EDD()->api->revoke_api_key( $user_id ); + } } - return false; // user has never purchased anything } +add_action( 'personal_options_update', 'edd_update_user_api_key' ); +add_action( 'edit_user_profile_update', 'edd_update_user_api_key' ); diff --git a/includes/users/login.php b/includes/users/login.php new file mode 100644 index 00000000000..babdc984b36 --- /dev/null +++ b/includes/users/login.php @@ -0,0 +1,247 @@ +session->get( 'edd_require_login_to_download_redirect' ); + if ( ! empty( $download_require_login_redirect ) ) { + $redirect_for_download = edd_get_file_download_login_redirect( $download_require_login_redirect ); + wp_safe_redirect( esc_url( $redirect_for_download ) ); + } + + $default_redirect_url = $data['edd_redirect']; + if ( has_filter( 'edd_login_redirect' ) ) { + $user_id = $user instanceof WP_User ? $user->ID : false; + /** + * Filters the URL to which users are redirected to after logging in. + * + * @since 1.0 + * @param string $default_redirect_url The URL to which to redirect after logging in. + * @param int|false User ID. false if no ID is available. + */ + wp_redirect( esc_url_raw( apply_filters( 'edd_login_redirect', $default_redirect_url, $user_id ) ) ); + } else { + wp_safe_redirect( esc_url_raw( $default_redirect_url ) ); + } + edd_die(); + } + } +} +add_action( 'edd_user_login', 'edd_process_login_form' ); + +/** + * Log User In + * + * @since 1.0 + * @since 2.9.24 Uses the wp_signon function instead of all the additional checks which can bypass hooks in core. + * + * @param int $user_id User ID + * @param string $user_login Username + * @param string $user_pass Password + * @param boolean $remember Remember me + * @return void +*/ +function edd_log_user_in( $user_id, $user_login, $user_pass, $remember = false ) { + + $credentials = array( + 'user_login' => $user_login, + 'user_password' => $user_pass, + 'remember' => $remember, + ); + + /** + * Fires before a user is logged in. + * + * This can be useful for performing actions prior to the user being logged in. Since EDD sparingly logs users in, + * it's important to note that this action is not used in most normal WordPress operations, but primarily during checkout, + * and with the Auto Register functions. + * + * @since 3.2.8 + * + * @param int $user_id The user ID. + * @param string $user_login The user login. + */ + do_action( 'edd_pre_log_user_in', $user_id, $user_login ); + + $user = wp_signon( $credentials ); + + if ( ! $user instanceof WP_User ) { + edd_set_error( + 'edd_invalid_login', + sprintf( + /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */ + __( 'Invalid username or password. %1$sReset Password%2$s', 'easy-digital-downloads' ), + '', + '' + ) + ); + } else { + // Since wp_signon doesn't set the current user, we need to do this. + wp_set_current_user( $user->ID ); + + do_action( 'edd_log_user_in', $user_id, $user_login, $user_pass ); + } + + return $user; +} + +add_filter( 'login_url', 'edd_update_login_url', 10, 3 ); +/** + * If a login page has been set in the EDD settings, + * update the WordPress login URL. + * + * @param string $url + * @return string + */ +function edd_update_login_url( $url, $redirect_to, $force_reauth ) { + + // Don't change the login URL if the request is an admin request. + if ( ! edd_doing_ajax() && is_admin() ) { + return $url; + } + + /** + * If the $wp_rewrite global hasn't been initialized, don't do anything. + * This is added defensively for situations where `wp_login_url` may be called too early. + */ + global $wp_rewrite; + if ( ! $wp_rewrite ) { + return $url; + } + + // Get the login page URL and return the default if it's not set. + $login_url = edd_get_login_page_uri(); + if ( ! $login_url ) { + return $url; + } + + if ( ! empty( $redirect ) ) { + $login_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $login_url ); + } + if ( $force_reauth ) { + $login_url = add_query_arg( 'reauth', '1', $login_url ); + } + + return $login_url; +} + +/** + * Helper function to get the EDD login page URI. + * + * @return false|string + */ +function edd_get_login_page_uri() { + $login_page = edd_get_option( 'login_page', false ); + if ( ! function_exists( 'has_block' ) || ( $login_page && ! has_block( 'edd/login', absint( $login_page ) ) ) ) { + return false; + } + + return $login_page ? get_permalink( $login_page ) : false; +} + +/** + * Generate a redirect URL that is used when file downloads require the user to be logged in. + * + * By default uses the homepage, appends a nonce, and an action, and returns a Nonce'd URL + * + * @since 3.1 + * + * @param array $redirect_data The data stored for this specific redirect URL. + * + * @return string The URL to use in the redirect process of logging in to download the file. + */ +function edd_get_file_download_login_redirect( $redirect_data ) { + $login_redirect_page_id = edd_get_option( 'login_redirect_page', false ); + $redirect_base = ! empty( $login_redirect_page_id ) ? get_permalink( $login_redirect_page_id ) : home_url(); + + $token = \EDD\Utils\Tokenizer::tokenize( $redirect_data ); + + $redirect_for_download = add_query_arg( + array( + 'edd_action' => 'process_file_download_after_login', + '_token' => $token, + ), + apply_filters( 'edd_get_file_download_login_redirect_base', $redirect_base ) + ); + + return $redirect_for_download; +} diff --git a/includes/users/lost-password.php b/includes/users/lost-password.php new file mode 100644 index 00000000000..d549a384874 --- /dev/null +++ b/includes/users/lost-password.php @@ -0,0 +1,307 @@ +session->get( 'edd_forgot_password_redirect' ); + if ( empty( $redirect_url ) ) { + return $errors; + } + $message = sprintf( + /* translators: %s: Link to the referring page. */ + __( 'Follow the instructions in the confirmation email you just received, then return to what you were doing.', 'easy-digital-downloads' ), + esc_url( $redirect_url ) + ); + $errors->remove( 'confirm' ); + $errors->add( + 'confirm', + apply_filters( + 'edd_login_register_error_message', + $message, + $redirect_url + ), + 'message' + ); + EDD()->session->set( 'edd_forgot_password_redirect', null ); + + return $errors; +} + +/** + * Gets the lost password URL, customized for EDD. Using this allows the password + * reset form to redirect to the login screen with the EDD custom confirmation message. + * + * @since 2.10 + * @return string + */ +function edd_get_lostpassword_url() { + + $login_page_uri = edd_get_login_page_uri(); + + if ( empty( $login_page_uri ) ) { + return add_query_arg( + array( + 'edd_forgot_password' => 'confirm', + ), + wp_lostpassword_url() + ); + } + + return add_query_arg( 'action', 'lostpassword', $login_page_uri ); +} + +/** + * Gets the password reset link for a user. + * + * @param WP_User $user The user object. + * @return false|string + */ +function edd_get_password_reset_link( $user ) { + $key = get_password_reset_key( $user ); + if ( is_wp_error( $key ) ) { + return false; + } + $args = array( + 'action' => 'rp', + 'key' => rawurlencode( $key ), + 'login' => rawurlencode( $user->user_login ), + ); + if ( edd_get_login_page_uri() ) { + $args['edd_action'] = 'password_reset_requested'; + } + + return add_query_arg( + $args, + wp_login_url() + ); +} + +add_action( 'lostpassword_form', 'edd_set_lostpassword_session' ); +/** + * Sets a session value for the lost password redirect URI. + * + * @since 3.0.2 + * @return void + */ +function edd_set_lostpassword_session() { + if ( ! empty( $_GET['edd_forgot_password'] ) && 'confirm' === $_GET['edd_forgot_password'] ) { + $url = wp_validate_redirect( + wp_get_referer(), + edd_get_checkout_uri() + ); + EDD()->session->set( 'edd_forgot_password_redirect', $url ); + } +} + +add_action( 'edd_user_lost_password', 'edd_handle_lost_password_request' ); +/** + * Handles the lost password request from the EDD lost password block. + * + * @since 3.1 + * @param array $data + * @return void + */ +function edd_handle_lost_password_request( $data ) { + + // Verify the nonce. + if ( empty( $data['edd_lost-password_nonce'] ) || ! wp_verify_nonce( $data['edd_lost-password_nonce'], 'edd-lost-password-nonce' ) ) { + edd_set_error( 'edd_lost_password', __( 'Your request could not be completed.', 'easy-digital-downloads' ) ); + return; + } + + if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) { + $errors = retrieve_password(); + if ( ! is_wp_error( $errors ) ) { + edd_set_success( 'checkemail', __( 'You did it! Check your email for instructions on resetting your password.', 'easy-digital-downloads' ) ); + } else { + $error_code = $errors->get_error_code(); + $message = $errors->get_error_message( $error_code ); + if ( $message ) { + // WP_Error messages include "Error:" so we remove that here to prevent duplication. + $message = explode( ':', $message ); + $output = trim( $message[0] ); + if ( ! empty( $message[1] ) ) { + unset( $message[0] ); + $output = trim( implode( ':', $message ) ); + } + edd_set_error( $error_code, $output ); + } + } + } + edd_redirect( remove_query_arg( 'action', wp_get_referer() ) ); +} + +add_filter( 'retrieve_password_message', 'edd_retrieve_password_message', 10, 4 ); +/** + * Filters the email message sent when a password reset has been requested. + * + * @since 3.1 + * @param string $message The email message. + * @param string $key The activation key. + * @param string $user_login The username for the user. + * @param WP_User $user_data WP_User object. + * @return string + */ +function edd_retrieve_password_message( $message, $key, $user_login, $user_data ) { + if ( empty( $_POST['edd_action'] ) || 'user_lost_password' !== $_POST['edd_action'] ) { + return $message; + } + if ( empty( $_POST['edd_lost-password_nonce'] ) || ! wp_verify_nonce( $_POST['edd_lost-password_nonce'], 'edd-lost-password-nonce' ) ) { + return $message; + } + $email = edd_get_email( 'password_reset' ); + if ( ! $email ) { + return $message; + } + $message = $email->content; + if ( false === strpos( $message, '{password_reset_link}' ) ) { + $message = $email->get_template()->get_default( 'content' ); + } + $message = str_replace( + '{password_reset_link}', + add_query_arg( + array( + 'edd_action' => 'password_reset_requested', + 'key' => $key, + 'login' => rawurlencode( $user_login ), + ), + esc_url_raw( $_POST['edd_redirect'] ) + ), + $message + ); + + return edd_do_email_tags( $message, $user_data->ID, $user_data, 'user' ); +} + +add_action( 'edd_password_reset_requested', 'edd_validate_password_reset_link' ); +/** + * Validates the email link and sends the user to the password reset form upon success. + * + * @since 3.1 + * @return void + */ +function edd_validate_password_reset_link() { + list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) ); + $rp_cookie = 'wp-resetpass-' . COOKIEHASH; + $redirect = remove_query_arg( array( 'key', 'login', 'edd_action' ), wp_get_referer() ); + + // Everything is good; move forward with the password reset. + if ( isset( $_GET['key'] ) && isset( $_GET['login'] ) ) { + $value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) ); + setcookie( $rp_cookie, $value, 0, $rp_path, COOKIE_DOMAIN, is_ssl(), true ); + + edd_redirect( add_query_arg( 'action', 'rp', $redirect ) ); + } + + $user = false; + if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) { + list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 ); + + $user = check_password_reset_key( $rp_key, $rp_login ); + + if ( isset( $_POST['pass1'] ) && ! hash_equals( $rp_key, $_POST['rp_key'] ) ) { + $user = false; + } + } + + if ( ! $user || is_wp_error( $user ) ) { + setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true ); + + if ( $user && $user->get_error_code() === 'expired_key' ) { + edd_set_error( 'expiredkey', __( 'Your password reset link has expired. Please request a new link below.', 'easy-digital-downloads' ) ); + } else { + edd_set_error( 'invalidkey', __( 'Your password reset link appears to be invalid. Please request a new link below.', 'easy-digital-downloads' ) ); + } + } + + // Redirect back to the lost password form instead of the password reset. + edd_redirect( add_query_arg( 'action', 'lostpassword', $redirect ) ); +} + +add_action( 'edd_user_reset_password', 'edd_validate_password_reset' ); +/** + * Validates the password reset and redirects to the login form on success. + * + * @since 3.1 + * @param array $data + * @return void + */ +function edd_validate_password_reset( $data ) { + + // We don't need or use AJAX requests for this, so die if one is received. + if ( edd_doing_ajax() ) { + wp_die( __( 'Invalid password reset request.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 400 ) ); + } + + // Verify the nonce. + if ( ! isset( $data['edd_resetpassword_nonce'] ) || ! wp_verify_nonce( $data['edd_resetpassword_nonce'], 'edd-reset-password-nonce' ) ) { + edd_set_error( 'password_reset_failed', __( 'Invalid password reset request.', 'easy-digital-downloads' ) ); + } + + $user = false; + if ( empty( $data['rp_key'] ) ) { + edd_set_error( 'password_reset_failed', __( 'Invalid password reset request.', 'easy-digital-downloads' ) ); + } elseif ( ! empty( $data['user_login'] ) ) { + $user = check_password_reset_key( $data['rp_key'], $data['user_login'] ); + } + + if ( ! $user || is_wp_error( $user ) ) { + edd_set_error( 'password_reset_failed', __( 'Invalid password reset request.', 'easy-digital-downloads' ) ); + } + + // Check if password is one or all empty spaces. + if ( ! empty( $data['pass1'] ) ) { + $data['pass1'] = trim( $data['pass1'] ); + } + + if ( empty( $data['pass1'] ) ) { + edd_set_error( 'empty_password', __( 'The password cannot be a space or all spaces.', 'easy-digital-downloads' ) ); + } + + // Check if password fields do not match. + if ( ! empty( $data['pass1'] ) && trim( $data['pass2'] ) !== $data['pass1'] ) { + edd_set_error( 'password_reset_mismatch', __( 'The passwords do not match.', 'easy-digital-downloads' ) ); + } + + $user = !empty( $data['user_login'] ) ? get_user_by( 'login', $data['user_login'] ) : false; + if ( false === $user ) { + edd_set_error( 'password_reset_unsuccessful', __( 'Your password could not be reset.', 'easy-digital-downloads' ) ); + } + + if ( empty( $data['edd_redirect'] ) ) { + $redirect = edd_get_login_page_uri() ?: home_url(); // phpcs:ignore Universal.Operators.DisallowShortTernary.Found + edd_set_error( 'password_reset_unsuccessful', __( 'Your password could not be reset.', 'easy-digital-downloads' ) ); + } else { + $redirect = remove_query_arg( 'action', $data['edd_redirect'] ); + } + + // If no errors were registered then reset the password. + $errors = edd_get_errors(); + if ( empty( $errors ) ) { + reset_password( $user, $data['pass1'] ); + edd_set_success( 'password_reset_successful', __( 'Your password was successfully reset.', 'easy-digital-downloads' ) ); + setcookie( 'wp-resetpass-' . COOKIEHASH, ' ', time() - YEAR_IN_SECONDS, wp_make_link_relative( wp_get_referer() ), COOKIE_DOMAIN, is_ssl(), true ); + edd_redirect( $redirect ); + } + + edd_redirect( add_query_arg( 'action', 'password_reset_unsuccessful', $redirect ) ); +} diff --git a/includes/users/register.php b/includes/users/register.php new file mode 100644 index 00000000000..558dd8c7b5e --- /dev/null +++ b/includes/users/register.php @@ -0,0 +1,130 @@ + $data['edd_user_email'], + 'user_id__not_in' => array( null ), + ) + ); + if ( ( ! empty( $data['edd_user_email'] ) && email_exists( $data['edd_user_email'] ) ) || ! empty( $customers ) ) { + edd_set_error( 'email_unavailable', __( 'This email address is not available.', 'easy-digital-downloads' ) ); + } + + if ( empty( $data['edd_user_email'] ) || ! is_email( $data['edd_user_email'] ) ) { + edd_set_error( 'email_invalid', __( 'Invalid email', 'easy-digital-downloads' ) ); + } + + if ( ! empty( $data['edd_payment_email'] ) && $data['edd_payment_email'] != $data['edd_user_email'] && ! is_email( $data['edd_payment_email'] ) ) { + edd_set_error( 'payment_email_invalid', __( 'Invalid payment email', 'easy-digital-downloads' ) ); + } + + if ( isset( $data['edd_honeypot'] ) && ! empty( $data['edd_honeypot'] ) ) { + edd_set_error( 'invalid_form_data', __( 'Registration form validation failed.', 'easy-digital-downloads' ) ); + } + + // Check if password is one or all empty spaces. + if ( ! empty( $data['edd_user_pass'] ) ) { + $data['edd_user_pass'] = trim( $data['edd_user_pass'] ); + } + + if ( empty( $data['edd_user_pass'] ) ) { + edd_set_error( 'empty_password', __( 'The password cannot be a space or all spaces.', 'easy-digital-downloads' ) ); + } + + // Check if password fields do not match. + if ( ! empty( $data['edd_user_pass'] ) && ( empty( $data['edd_user_pass2'] ) || trim( $data['edd_user_pass2'] ) !== $data['edd_user_pass'] ) ) { + edd_set_error( 'password_mismatch', __( 'The passwords do not match.', 'easy-digital-downloads' ) ); + } + + do_action( 'edd_process_register_form' ); + + // Check for errors and redirect if none present. + $errors = edd_get_errors(); + + if ( empty( $errors ) ) { + + $redirect = apply_filters( 'edd_register_redirect', $data['edd_redirect'] ); + + edd_register_and_login_new_user( + array( + 'user_login' => $data['edd_user_login'], + 'user_pass' => $data['edd_user_pass'], + 'user_email' => $data['edd_user_email'], + 'user_registered' => date( 'Y-m-d H:i:s' ), + 'role' => get_option( 'default_role' ), + ) + ); + + edd_set_success( 'account_registration_successful', __( 'Your account has been successfully created.', 'easy-digital-downloads' ) ); + + edd_redirect( $redirect ); + } +} +add_action( 'edd_user_register', 'edd_process_register_form' ); diff --git a/includes/utils/class-tokenizer.php b/includes/utils/class-tokenizer.php new file mode 100644 index 00000000000..b7a08a79511 --- /dev/null +++ b/includes/utils/class-tokenizer.php @@ -0,0 +1,120 @@ +data = $data; + } + + /** + * Retrieves the signing key. + * + * @since 2.11 + * + * @return string + */ + private function get_signing_key() { + $key = get_option( 'edd_tokenizer_signing_key' ); + if ( empty( $key ) ) { + $key = $this->generate_and_save_signing_key(); + } + + return $key; + } + + /** + * Generates and saves a new signing key. + * + * @since 2.11 + * + * @return string + */ + private function generate_and_save_signing_key() { + if ( function_exists( 'random_bytes' ) ) { + try { + $key = bin2hex( random_bytes( 32 ) ); + } catch ( \Exception $e ) { + // If this failed for some reason, we'll generate using the fallback below. + } + } + + if ( empty( $key ) ) { + $key = function_exists( 'openssl_random_pseudo_bytes' ) ? bin2hex( openssl_random_pseudo_bytes( 32 ) ) : md5( uniqid() ); + } + + update_option( 'edd_tokenizer_signing_key', $key ); + + return $key; + } + + /** + * Generates a token from the data. + * + * @since 2.11 + * + * @return string|false + */ + public function generate_token() { + return hash_hmac( 'sha256', $this->data, $this->get_signing_key() ); + } + + /** + * Determines whether or not the supplied token is valid for the + * supplied data. + * + * @since 2.11 + * + * @param string $token Token to check. + * @param string|int|float $data Data that's been tokenized. + * + * @return bool + */ + public static function is_token_valid( $token, $data ) { + $real_token = self::tokenize( $data ); + + return hash_equals( $token, $real_token ); + } + + /** + * Generates a token for the supplied data. + * + * @since 2.11 + * + * @param string|int|float $data + * + * @return string|false + */ + public static function tokenize( $data ) { + if ( is_array( $data ) ) { + $data = json_encode( $data ); + } + + $generator = new Tokenizer( $data ); + + return $generator->generate_token(); + } + +} diff --git a/includes/widgets.php b/includes/widgets.php index e0d2b85f7a2..11bd19f2ccb 100755 --- a/includes/widgets.php +++ b/includes/widgets.php @@ -2,13 +2,17 @@ /** * Widgets * - * @package Easy Digital Downloads + * Widgets related funtions and widget registration. + * + * @package EDD * @subpackage Widgets - * @copyright Copyright (c) 2012, Pippin Williamson + * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * @since 1.0 + * @since 1.0 */ +// Exit if accessed directly +defined( 'ABSPATH' ) || exit; /* |-------------------------------------------------------------------------- @@ -17,333 +21,477 @@ | | - Cart Widget | - Categories / Tags Widget -| - Purchase History Widget | */ /** - * Cart Widget + * Cart Widget. * * Downloads cart widget class. * - * @access private - * @since 1.0 - * @return void + * @since 1.0 + * @return void */ - class edd_cart_widget extends WP_Widget { + /** Constructor */ + function __construct() { + parent::__construct( 'edd_cart_widget', __( 'Downloads Cart', 'easy-digital-downloads' ), array( 'description' => __( 'Display the downloads shopping cart', 'easy-digital-downloads' ) ) ); + add_filter( 'dynamic_sidebar_params', array( $this, 'cart_widget_class' ), 10, 1 ); + } - /** constructor */ - function edd_cart_widget() - { - parent::WP_Widget(false, __('Downloads Cart', 'edd'), array('description' => __('Display the downloads shopping cart', 'edd'))); - } - - /** @see WP_Widget::widget */ - function widget($args, $instance) - { - extract($args); - $title = apply_filters('widget_title', $instance['title']); - $quantity = isset($instance['quantity']) ? $instance['quantity'] : false; - - global $post, $edd_options; - - echo $before_widget; - if ($title) { - if ($quantity == 1) { - $quantity = ' - ' . edd_get_cart_quantity() . ''; - } else { - $quantity = ''; - } - echo $before_title . $title . $quantity . $after_title; - } - do_action('edd_before_cart_widget'); - edd_shopping_cart(true); - do_action('edd_after_cart_widget'); - echo $after_widget; - } - - /** @see WP_Widget::update */ - function update($new_instance, $old_instance) - { - $instance = $old_instance; - $instance['title'] = strip_tags($new_instance['title']); - $instance['quantity'] = strip_tags($new_instance['quantity']); - return $instance; - } - - /** @see WP_Widget::form */ - function form($instance) - { - $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; - $quantity = isset($instance['quantity']) ? esc_attr($instance['quantity']) : ''; - ?> -

    - - -

    -

    - - /> -

    - __('Display the downloads categories or tags', 'edd'))); - } - - /** @see WP_Widget::widget */ - function widget($args, $instance) - { - extract($args); - $title = apply_filters('widget_title', $instance['title']); - $tax = $instance['taxonomy']; - - global $post, $edd_options; - - echo $before_widget; - if ($title) { - echo $before_title . $title . $after_title; - } - - do_action('edd_before_taxonomy_widget'); - $terms = get_terms($tax); - - if (is_wp_error($terms)) { - return; - } else { - echo "\n"; - } - - do_action('edd_after_taxonomy_widget'); - echo $after_widget; - } - - /** @see WP_Widget::update */ - function update($new_instance, $old_instance) - { - $instance = $old_instance; - $instance['title'] = strip_tags($new_instance['title']); - $instance['taxonomy'] = strip_tags($new_instance['taxonomy']); - return $instance; - } - - /** @see WP_Widget::form */ - function form($instance) - { - $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; - $taxonomy = isset($instance['taxonomy']) ? esc_attr($instance['taxonomy']) : 'download_category'; - ?> -

    - - -

    -

    - - -

    - __('Display a user\'s purchase history', 'edd'))); - } - - /** @see WP_Widget::widget */ - function widget($args, $instance) - { - extract($args); - $title = apply_filters('widget_title', $instance['title']); - - global $user_ID, $edd_options; - - if(is_user_logged_in()) { - - $purchases = edd_get_users_purchases($user_ID); - - if($purchases) { - echo $before_widget; - if ($title) { - echo $before_title . $title . $after_title; - } - - foreach($purchases as $purchase) { - $purchase_data = get_post_meta($purchase->ID, '_edd_payment_meta', true); - $downloads = edd_get_downloads_of_purchase($purchase->ID); - if($downloads) { - foreach($downloads as $download) { - $id = isset($purchase_data['cart_details']) ? $download['id'] : $download; - $price_id = isset($download['options']['price_id']) ? $download['options']['price_id'] : null; - $download_files = edd_get_download_files( $id, $price_id ); - echo '
    '; - echo '
    ' . get_the_title($id) . '
    '; - echo '
      '; - if( ! edd_no_redownload() ) { - if($download_files) { - foreach($download_files as $filekey => $file) { - $download_url = edd_get_download_file_url($purchase_data['key'], $purchase_data['email'], $filekey, $id); - echo '
    • ' . $file['name'] . '
    • '; - } - } else { - echo '
    • ' . __('No downloadable files found.', 'edd'); - } - } - echo '
    '; - echo '
    '; - } - } - } - } - echo $after_widget; - } - } - - /** @see WP_Widget::update */ - function update($new_instance, $old_instance) - { - $instance = $old_instance; - $instance['title'] = strip_tags($new_instance['title']); - return $instance; - } - - /** @see WP_Widget::form */ - function form($instance) - { - $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; - ?> -

    - - -

    - '', + 'hide_on_checkout' => false, + 'hide_on_empty' => false, + ); + + $instance = wp_parse_args( (array) $instance, $defaults ); ?> +

    + + +

    + + +

    + id="get_field_id( 'hide_on_checkout' ) ); ?>" name="get_field_name( 'hide_on_checkout' ) ); ?>" type="checkbox" /> + +

    + +

    + id="get_field_id( 'hide_on_empty' ) ); ?>" name="get_field_name( 'hide_on_empty' ) ); ?>" type="checkbox" /> + +

    + + get_settings(); + $instance_settings = $all_settings[ $instance_id ]; + + if ( ! empty( $instance_settings['hide_on_empty'] ) ) { + $cart_quantity = edd_get_cart_quantity(); + $class = empty( $cart_quantity ) ? 'cart-empty' : 'cart-not-empty'; + + $params[0]['before_widget'] = preg_replace( '/class="(.*?)"/', 'class="$1 edd-hide-on-empty ' . $class . '"', $params[0]['before_widget'] ); + } + } + + return $params; + } + +} /** - * Register Widgets + * Categories / Tags Widget. * - * Registers the EDD Widgets. + * Downloads categories / tags widget class. * - * @access private - * @since 1.0 - * @return void + * @since 1.0 + * @return void */ - -function edd_register_widgets() { - register_widget('edd_cart_widget'); - register_widget('edd_categories_tags_widget'); - register_widget('edd_purchase_history_widget'); +class edd_categories_tags_widget extends WP_Widget { + /** Constructor */ + function __construct() { + parent::__construct( 'edd_categories_tags_widget', __( 'Downloads Categories / Tags', 'easy-digital-downloads' ), array( 'description' => __( 'Display the downloads categories or tags', 'easy-digital-downloads' ) ) ); + } + + /** @see WP_Widget::widget */ + function widget( $args, $instance ) { + // Set defaults. + $args['id'] = ( isset( $args['id'] ) ) ? $args['id'] : 'edd_categories_tags_widget'; + $instance['title'] = ( isset( $instance['title'] ) ) ? $instance['title'] : ''; + $instance['taxonomy'] = ( isset( $instance['taxonomy'] ) ) ? $instance['taxonomy'] : 'download_category'; + + $title = apply_filters( 'widget_title', $instance['title'], $instance, $args['id'] ); + $tax = $instance['taxonomy']; + $count = isset( $instance['count'] ) && $instance['count'] == 'on' ? 1 : 0; + $hide_empty = isset( $instance['hide_empty'] ) && $instance['hide_empty'] == 'on' ? 1 : 0; + + echo $args['before_widget']; + + if ( $title ) { + echo $args['before_title'] . $title . $args['after_title']; + } + + do_action( 'edd_before_taxonomy_widget' ); + + echo "
      \n"; + wp_list_categories( 'title_li=&taxonomy=' . $tax . '&show_count=' . $count . '&hide_empty=' . $hide_empty ); + echo "
    \n"; + + do_action( 'edd_after_taxonomy_widget' ); + + echo $args['after_widget']; + } + + /** @see WP_Widget::update */ + function update( $new_instance, $old_instance ) { + $instance = $old_instance; + $instance['title'] = strip_tags( $new_instance['title'] ); + $instance['taxonomy'] = strip_tags( $new_instance['taxonomy'] ); + $instance['count'] = isset( $new_instance['count'] ) ? $new_instance['count'] : ''; + $instance['hide_empty'] = isset( $new_instance['hide_empty'] ) ? $new_instance['hide_empty'] : ''; + return $instance; + } + + /** @see WP_Widget::form */ + function form( $instance ) { + // Set up some default widget settings. + $defaults = array( + 'title' => '', + 'taxonomy' => 'download_category', + 'count' => 'off', + 'hide_empty' => 'off', + ); + + $instance = wp_parse_args( (array) $instance, $defaults ); ?> +

    + + +

    +

    + + +

    +

    + + id="get_field_id( 'count' ) ); ?>" name="get_field_name( 'count' ) ); ?>" type="checkbox" /> +

    +

    + + id="get_field_id( 'hide_empty' ) ); ?>" name="get_field_name( 'hide_empty' ) ); ?>" type="checkbox" /> +

    + sprintf( __( 'Display the details of a specific %s', 'easy-digital-downloads' ), edd_get_label_singular() ), + ) + ); + } + + /** @see WP_Widget::widget */ + public function widget( $args, $instance ) { + $args['id'] = ( isset( $args['id'] ) ) ? $args['id'] : 'edd_download_details_widget'; + + if ( ! empty( $instance['download_id'] ) ) { + if ( 'current' === ( $instance['download_id'] ) ) { + $instance['display_type'] = 'current'; + unset( $instance['download_id'] ); + } elseif ( is_numeric( $instance['download_id'] ) ) { + $instance['display_type'] = 'specific'; + } + } + + if ( ! isset( $instance['display_type'] ) || ( 'specific' === $instance['display_type'] && ! isset( $instance['download_id'] ) ) || ( 'current' == $instance['display_type'] && ! is_singular( 'download' ) ) ) { + return; + } + + // set correct download ID. + if ( 'current' == $instance['display_type'] && is_singular( 'download' ) ) { + $download_id = get_the_ID(); + } else { + $download_id = absint( $instance['download_id'] ); + } + + // Since we can take a typed in value, make sure it's a download we're looking for + $download = get_post( $download_id ); + if ( ! is_object( $download ) || 'download' !== $download->post_type ) { + return; + } + + // Variables from widget settings. + $title = apply_filters( 'widget_title', $instance['title'], $instance, $args['id'] ); + $download_title = $instance['download_title'] ? apply_filters( 'edd_product_details_widget_download_title', '

    ' . get_the_title( $download_id ) . '

    ', $download_id ) : ''; + $purchase_button = $instance['purchase_button'] ? apply_filters( 'edd_product_details_widget_purchase_button', edd_get_purchase_link( array( 'download_id' => $download_id ) ), $download_id ) : ''; + $categories = $instance['categories'] ? $instance['categories'] : ''; + $tags = $instance['tags'] ? $instance['tags'] : ''; + + // Used by themes. Opens the widget. + echo $args['before_widget']; + + // Display the widget title. + if ( $title ) { + echo $args['before_title'] . $title . $args['after_title']; + } + + do_action( 'edd_product_details_widget_before_title' , $instance , $download_id ); + + // Download title. + echo $download_title; + + do_action( 'edd_product_details_widget_before_purchase_button' , $instance , $download_id ); + + // Purchase button. + echo $purchase_button; + + // Categories. + $category_list = false; + $category_label = ''; + if ( $categories ) { + $category_terms = (array) get_the_terms( $download_id, 'download_category' ); + + if ( $category_terms && ! is_wp_error( $category_terms ) ) { + $category_list = get_the_term_list( $download_id, 'download_category', '', ', ' ); + $category_count = count( $category_terms ); + $category_labels = edd_get_taxonomy_labels( 'download_category' ); + $category_label = $category_count > 1 ? $category_labels['name'] : $category_labels['singular_name']; + } + } + + // Tags. + $tag_list = false; + $tag_label = ''; + + if ( $tags ) { + $tag_terms = (array) get_the_terms( $download_id, 'download_tag' ); + + if ( $tag_terms && ! is_wp_error( $tag_terms ) ) { + $tag_list = get_the_term_list( $download_id, 'download_tag', '', ', ' ); + $tag_count = count( $tag_terms ); + $tag_taxonomy = edd_get_taxonomy_labels( 'download_tag' ); + $tag_label = $tag_count > 1 ? $tag_taxonomy['name'] : $tag_taxonomy['singular_name']; + } + } + + $text = ''; + + if ( $category_list || $tag_list ) { + $text .= '

    '; + + if ( $category_list ) { + $text .= '%1$s: %2$s
    '; + } + + if ( $tag_list ) { + $text .= '%3$s: %4$s'; + } + + $text .= '

    '; + } + + do_action( 'edd_product_details_widget_before_categories_and_tags', $instance, $download_id ); + + printf( $text, $category_label, $category_list, $tag_label, $tag_list ); + + do_action( 'edd_product_details_widget_before_end', $instance, $download_id ); + + // Used by themes. Closes the widget. + echo $args['after_widget']; + } + + /** @see WP_Widget::form */ + public function form( $instance ) { + // Set up some default widget settings. + $defaults = array( + 'title' => sprintf( __( '%s Details', 'easy-digital-downloads' ), edd_get_label_singular() ), + 'display_type' => 'current', + 'download_id' => false, + 'download_title' => 'on', + 'purchase_button' => 'on', + 'categories' => 'on', + 'tags' => 'on', + ); + + $instance = wp_parse_args( (array) $instance, $defaults ); ?> + + + + +

    + + +

    + +

    +
    + value="current" name="get_field_name( 'display_type' ) ); ?>" id="get_field_id( 'display_type' ) ); ?>-current"> + value="specific" name="get_field_name( 'display_type' ) ); ?>" id="get_field_id( 'display_type' ) ); ?>-specific"> +

    + + + +

    > + + + + publish < 1000 ) : ?> + 'download', + 'posts_per_page' => -1, + 'post_status' => 'publish', + ); + $downloads = get_posts( $args ); + ?> + + +
    + + + +

    + + +

    + id="get_field_id( 'download_title' ) ); ?>" name="get_field_name( 'download_title' ) ); ?>" type="checkbox" /> + + +

    + + +

    + id="get_field_id( 'purchase_button' ) ); ?>" name="get_field_name( 'purchase_button' ) ); ?>" type="checkbox" /> + +

    + + +

    + + id="get_field_id( 'categories' ) ); ?>" name="get_field_name( 'categories' ) ); ?>" type="checkbox" /> + + +

    + + +

    + + id="get_field_id( 'tags' ) ); ?>" name="get_field_name( 'tags' ) ); ?>" type="checkbox" /> + + +

    + + + -
    -

    - - - - - - - - - - - -
    -
    -
    -

    - - - - - - - - - - - -
    -
    -
    - \n" -"Language-Team: Easy Digital Downloads \n" -"Language: en_US\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_x;_n;esc_attr__;esc_attr_e;esc_html__;esc_html_e;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c\n" -"X-Poedit-Basepath: ../\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Generator: Poedit 1.5.3\n" -"X-Poedit-SearchPath-0: .\n" - -#: includes/template-functions.php:48 -#, php-format -msgid "No checkout page has been configured. Visit Settings to set one." -msgstr "" - -#: includes/template-functions.php:60 -msgid "Purchase" -msgstr "" - -#: includes/template-functions.php:137 -#: includes/template-functions.php:158 -#: includes/cart-template.php:46 -#: includes/cart-template.php:49 -msgid "Checkout" -msgstr "" - -#: includes/template-functions.php:167 -msgid "added to your cart" -msgstr "" - -#: includes/template-functions.php:263 -msgid "Gray" -msgstr "" - -#: includes/template-functions.php:264 -msgid "Pink" -msgstr "" - -#: includes/template-functions.php:265 -msgid "Blue" -msgstr "" - -#: includes/template-functions.php:266 -msgid "Green" -msgstr "" - -#: includes/template-functions.php:267 -msgid "Teal" -msgstr "" - -#: includes/template-functions.php:268 -msgid "Black" -msgstr "" - -#: includes/template-functions.php:269 -msgid "Dark Gray" -msgstr "" - -#: includes/template-functions.php:270 -msgid "Orange" -msgstr "" - -#: includes/template-functions.php:271 -msgid "Purple" -msgstr "" - -#: includes/template-functions.php:272 -msgid "Slate" -msgstr "" - -#: includes/template-functions.php:293 -msgid "Button" -msgstr "" - -#: includes/template-functions.php:294 -msgid "Plain Text" -msgstr "" - -#: includes/template-functions.php:317 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "" - -#: includes/payment-functions.php:299 -msgid "Pending" -msgstr "" - -#: includes/payment-functions.php:300 -msgid "Complete" -msgstr "" - -#: includes/payment-functions.php:301 -msgid "Refunded" -msgstr "" - -#: includes/email-template.php:23 -msgid "Default Template" -msgstr "" - -#: includes/email-template.php:24 -msgid "No template, plain text only" -msgstr "" - -#: includes/email-template.php:115 -msgid "Sample Product Title" -msgstr "" - -#: includes/email-template.php:118 -msgid "Sample Download File Name" -msgstr "" - -#: includes/email-template.php:118 -msgid "Optional notes about this download." -msgstr "" - -#: includes/email-template.php:129 -msgid "These are some sample notes added to a product." -msgstr "" - -#: includes/email-template.php:168 -msgid "Purchase Receipt Preview" -msgstr "" - -#: includes/email-template.php:168 -msgid "Preview Purchase Receipt" -msgstr "" - -#: includes/email-template.php:209 -msgid "Dear" -msgstr "" - -#: includes/email-template.php:210 -msgid "Thank you for your purchase. Please click on the link(s) below to download your files." -msgstr "" - -#: includes/cart-template.php:80 -msgid "remove" -msgstr "" - -#: includes/cart-template.php:99 -msgid "Your cart is empty." -msgstr "" - -#: includes/register-settings.php:41 -msgid "Test Mode" -msgstr "" - -#: includes/register-settings.php:42 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "" - -#: includes/register-settings.php:47 -msgid "Checkout Page" -msgstr "" - -#: includes/register-settings.php:48 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "" - -#: includes/register-settings.php:54 -msgid "Success Page" -msgstr "" - -#: includes/register-settings.php:55 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "" - -#: includes/register-settings.php:61 -msgid "Download Links on Success Page" -msgstr "" - -#: includes/register-settings.php:62 -msgid "Show a list of all download links on the success page after completing a purchase?" -msgstr "" - -#: includes/register-settings.php:67 -msgid "Currency Settings" -msgstr "" - -#: includes/register-settings.php:68 -msgid "Configure the currency options" -msgstr "" - -#: includes/register-settings.php:73 -msgid "Currency" -msgstr "" - -#: includes/register-settings.php:74 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "" - -#: includes/register-settings.php:80 -msgid "Currency Position" -msgstr "" - -#: includes/register-settings.php:81 -msgid "Choose the location of the currency sign." -msgstr "" - -#: includes/register-settings.php:84 -msgid "Before - $10" -msgstr "" - -#: includes/register-settings.php:85 -msgid "After - 10$" -msgstr "" - -#: includes/register-settings.php:90 -msgid "Thousands Separator" -msgstr "" - -#: includes/register-settings.php:91 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "" - -#: includes/register-settings.php:98 -msgid "Decimal Separator" -msgstr "" - -#: includes/register-settings.php:99 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "" - -#: includes/register-settings.php:110 -msgid "Payment Gateways" -msgstr "" - -#: includes/register-settings.php:111 -msgid "Choose the payment gateways you want to enable." -msgstr "" - -#: includes/register-settings.php:117 -msgid "Accepted Payment Method Icons" -msgstr "" - -#: includes/register-settings.php:118 -msgid "Display icons for the selected payment methods" -msgstr "" - -#: includes/register-settings.php:118 -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "" - -#: includes/register-settings.php:131 -msgid "PayPal Settings" -msgstr "" - -#: includes/register-settings.php:132 -msgid "Configure the PayPal settings" -msgstr "" - -#: includes/register-settings.php:137 -msgid "PayPal Email" -msgstr "" - -#: includes/register-settings.php:138 -msgid "Enter your PayPal account's email" -msgstr "" - -#: includes/register-settings.php:144 -msgid "Alternate PayPal Purchase Verification" -msgstr "" - -#: includes/register-settings.php:145 -msgid "If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal." -msgstr "" - -#: includes/register-settings.php:150 -msgid "Disable PayPal IPN Verification" -msgstr "" - -#: includes/register-settings.php:151 -msgid "If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases." -msgstr "" - -#: includes/register-settings.php:160 -msgid "Email Template" -msgstr "" - -#: includes/register-settings.php:161 -msgid "Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" to see the new template." -msgstr "" - -#: includes/register-settings.php:173 -msgid "From Name" -msgstr "" - -#: includes/register-settings.php:174 -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "" - -#: includes/register-settings.php:179 -msgid "From Email" -msgstr "" - -#: includes/register-settings.php:180 -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "" - -#: includes/register-settings.php:185 -msgid "Purchase Email Subject" -msgstr "" - -#: includes/register-settings.php:186 -msgid "Enter the subject line for the purchase receipt email" -msgstr "" - -#: includes/register-settings.php:191 -msgid "Purchase Receipt" -msgstr "" - -#: includes/register-settings.php:192 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "" - -#: includes/register-settings.php:193 -msgid "A list of download URLs for each download purchased" -msgstr "" - -#: includes/register-settings.php:194 -msgid "The buyer's name" -msgstr "" - -#: includes/register-settings.php:195 -msgid "The date of the purchase" -msgstr "" - -#: includes/register-settings.php:196 -msgid "The total price of the purchase" -msgstr "" - -#: includes/register-settings.php:197 -msgid "The unique ID number for this purchase receipt" -msgstr "" - -#: includes/register-settings.php:198 -msgid "The method of payment used for this purchase" -msgstr "" - -#: includes/register-settings.php:199 -msgid "Your site name" -msgstr "" - -#: includes/register-settings.php:208 -msgid "Disable Styles" -msgstr "" - -#: includes/register-settings.php:209 -msgid "Check this to disable all included styling" -msgstr "" - -#: includes/register-settings.php:214 -msgid "Buttons" -msgstr "" - -#: includes/register-settings.php:215 -msgid "Options for add to cart and purchase buttons" -msgstr "" - -#: includes/register-settings.php:220 -msgid "Default Button Style" -msgstr "" - -#: includes/register-settings.php:221 -msgid "Choose the style you want to use for the buttons." -msgstr "" - -#: includes/register-settings.php:227 -msgid "Default Button Color" -msgstr "" - -#: includes/register-settings.php:228 -msgid "Choose the color you want to use for the buttons." -msgstr "" - -#: includes/register-settings.php:238 -msgid "Disable Ajax" -msgstr "" - -#: includes/register-settings.php:239 -msgid "Check this to disable AJAX for the shopping cart." -msgstr "" - -#: includes/register-settings.php:244 -msgid "Enable jQuery Validation" -msgstr "" - -#: includes/register-settings.php:245 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "" - -#: includes/register-settings.php:250 -msgid "Disable Guest Checkout" -msgstr "" - -#: includes/register-settings.php:251 -msgid "Require that users be logged-in to purchase files." -msgstr "" - -#: includes/register-settings.php:256 -msgid "Show Register / Login Form?" -msgstr "" - -#: includes/register-settings.php:257 -msgid "Display the registration and login forms on the checkout page for non-logged-in users." -msgstr "" - -#: includes/register-settings.php:262 -msgid "Download Link Expiration" -msgstr "" - -#: includes/register-settings.php:263 -msgid "How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours." -msgstr "" - -#: includes/register-settings.php:269 -msgid "Disable Redownload?" -msgstr "" - -#: includes/register-settings.php:270 -msgid "Check this if you do not want to allow users to redownload items from their purchase history." -msgstr "" - -#: includes/register-settings.php:275 -msgid "Terms of Agreement" -msgstr "" - -#: includes/register-settings.php:281 -msgid "Agree to Terms" -msgstr "" - -#: includes/register-settings.php:282 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing." -msgstr "" - -#: includes/register-settings.php:287 -msgid "Agree to Terms Label" -msgstr "" - -#: includes/register-settings.php:288 -msgid "Label shown next to the agree to terms check box." -msgstr "" - -#: includes/register-settings.php:294 -msgid "Agreement Text" -msgstr "" - -#: includes/register-settings.php:295 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "" - -#: includes/register-settings.php:300 -msgid "Complete Purchase Text" -msgstr "" - -#: includes/register-settings.php:301 -msgid "The button label for completing a purchase." -msgstr "" - -#: includes/register-settings.php:306 -msgid "Add to Cart Text" -msgstr "" - -#: includes/register-settings.php:307 -msgid "Text shown on the Add to Cart Buttons" -msgstr "" - -#: includes/register-settings.php:333 -msgid "General Settings" -msgstr "" - -#: includes/register-settings.php:359 -msgid "Payment Gateway Settings" -msgstr "" - -#: includes/register-settings.php:385 -msgid "Email Settings" -msgstr "" - -#: includes/register-settings.php:411 -msgid "Style Settings" -msgstr "" - -#: includes/register-settings.php:438 -msgid "Misc Settings" -msgstr "" - -#: includes/register-settings.php:727 -msgid "Upload File" -msgstr "" - -#: includes/register-settings.php:765 -msgid "Settings Updated" -msgstr "" - -#: includes/query-filters.php:42 -msgid "You do not have permission to view this file." -msgstr "" - -#: includes/query-filters.php:42 -msgid "Error" -msgstr "" - -#: includes/cart-functions.php:405 -#, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "" - -#: includes/cart-functions.php:406 -msgid "Checkout." -msgstr "" - -#: includes/widgets.php:39 -msgid "Downloads Cart" -msgstr "" - -#: includes/widgets.php:39 -msgid "Display the downloads shopping cart" -msgstr "" - -#: includes/widgets.php:82 -#: includes/widgets.php:162 -msgid "Title:" -msgstr "" - -#: includes/widgets.php:87 -msgid "Show Quantity:" -msgstr "" - -#: includes/widgets.php:112 -msgid "Downloads Categories / Tags" -msgstr "" - -#: includes/widgets.php:112 -msgid "Display the downloads categories or tags" -msgstr "" - -#: includes/widgets.php:167 -msgid "Taxonomy:" -msgstr "" - -#: includes/widgets.php:169 -msgid "Categories" -msgstr "" - -#: includes/widgets.php:170 -msgid "Tags" -msgstr "" - -#: includes/widgets.php:193 -msgid "Purchase History" -msgstr "" - -#: includes/widgets.php:193 -msgid "Display a user's purchase history" -msgstr "" - -#: includes/widgets.php:232 -msgid "No downloadable files found." -msgstr "" - -#: includes/widgets.php:259 -msgid "Title" -msgstr "" - -#: includes/widgets.php:299 -msgid "Easy Digital Downloads Sales Summary" -msgstr "" - -#: includes/widgets.php:318 -msgid "Current Month" -msgstr "" - -#: includes/widgets.php:323 -msgid "Earnings" -msgstr "" - -#: includes/widgets.php:327 -msgid "Sales" -msgstr "" - -#: includes/widgets.php:333 -msgid "Totals" -msgstr "" - -#: includes/widgets.php:338 -msgid "Total Earnings" -msgstr "" - -#: includes/widgets.php:342 -msgid "Total Sales" -msgstr "" - -#: includes/scripts.php:40 -msgid "Please enter a discount code" -msgstr "" - -#: includes/scripts.php:41 -msgid "Discount Applied" -msgstr "" - -#: includes/scripts.php:42 -msgid "Please enter an email address before applying a discount code" -msgstr "" - -#: includes/scripts.php:44 -msgid "You have already added this item to your cart" -msgstr "" - -#: includes/scripts.php:45 -msgid "Your cart is empty" -msgstr "" - -#: includes/scripts.php:46 -msgid "Loading" -msgstr "" - -#: includes/scripts.php:123 -msgid "Add New Download" -msgstr "" - -#: includes/scripts.php:124 -msgid "Use This File" -msgstr "" - -#: includes/scripts.php:125 -msgid "Sorry, not available for variable priced products." -msgstr "" - -#: includes/scripts.php:126 -msgid "Are you sure you wish to delete this payment?" -msgstr "" - -#: includes/scripts.php:127 -msgid "You must have at least one price" -msgstr "" - -#: includes/scripts.php:128 -msgid "You must have at least one file" -msgstr "" - -#: includes/scripts.php:129 -msgid "You must have at least one field" -msgstr "" - -#: includes/ajax-functions.php:102 -msgid "This discount code has been used already" -msgstr "" - -#: includes/ajax-functions.php:118 -#: includes/process-purchase.php:239 -msgid "The discount you entered is invalid" -msgstr "" - -#: includes/login-register.php:45 -msgid "Log into Your Account" -msgstr "" - -#: includes/login-register.php:47 -#: includes/login-register.php:48 -#: includes/checkout-template.php:325 -#: includes/checkout-template.php:326 -#: includes/checkout-template.php:373 -msgid "Username" -msgstr "" - -#: includes/login-register.php:51 -#: includes/checkout-template.php:329 -#: includes/checkout-template.php:330 -#: includes/checkout-template.php:377 -msgid "Password" -msgstr "" - -#: includes/login-register.php:58 -#: includes/checkout-template.php:320 -msgid "Login" -msgstr "" - -#: includes/login-register.php:61 -msgid "Lost Password" -msgstr "" - -#: includes/login-register.php:62 -msgid "Lost Password?" -msgstr "" - -#: includes/login-register.php:69 -msgid "You are already logged in" -msgstr "" - -#: includes/login-register.php:92 -#: includes/process-purchase.php:472 -msgid "The password you entered is incorrect" -msgstr "" - -#: includes/login-register.php:95 -#: includes/process-purchase.php:491 -msgid "The username you entered does not exist" -msgstr "" - -#: includes/misc-functions.php:185 -msgid "US Dollars ($)" -msgstr "" - -#: includes/misc-functions.php:186 -msgid "Euros (€)" -msgstr "" - -#: includes/misc-functions.php:187 -msgid "Pounds Sterling (£)" -msgstr "" - -#: includes/misc-functions.php:188 -msgid "Australian Dollars ($)" -msgstr "" - -#: includes/misc-functions.php:189 -msgid "Brazilian Real ($)" -msgstr "" - -#: includes/misc-functions.php:190 -msgid "Canadian Dollars ($)" -msgstr "" - -#: includes/misc-functions.php:191 -msgid "Czech Koruna" -msgstr "" - -#: includes/misc-functions.php:192 -msgid "Danish Krone" -msgstr "" - -#: includes/misc-functions.php:193 -msgid "Hong Kong Dollar ($)" -msgstr "" - -#: includes/misc-functions.php:194 -msgid "Hungarian Forint" -msgstr "" - -#: includes/misc-functions.php:195 -msgid "Israeli Shekel" -msgstr "" - -#: includes/misc-functions.php:196 -msgid "Japanese Yen (¥)" -msgstr "" - -#: includes/misc-functions.php:197 -msgid "Malaysian Ringgits" -msgstr "" - -#: includes/misc-functions.php:198 -msgid "Mexican Peso ($)" -msgstr "" - -#: includes/misc-functions.php:199 -msgid "New Zealand Dollar ($)" -msgstr "" - -#: includes/misc-functions.php:200 -msgid "Norwegian Krone" -msgstr "" - -#: includes/misc-functions.php:201 -msgid "Philippine Pesos" -msgstr "" - -#: includes/misc-functions.php:202 -msgid "Polish Zloty" -msgstr "" - -#: includes/misc-functions.php:203 -msgid "Singapore Dollar ($)" -msgstr "" - -#: includes/misc-functions.php:204 -msgid "Swedish Krona" -msgstr "" - -#: includes/misc-functions.php:205 -msgid "Swiss Franc" -msgstr "" - -#: includes/misc-functions.php:206 -msgid "Taiwan New Dollars" -msgstr "" - -#: includes/misc-functions.php:207 -msgid "Thai Baht" -msgstr "" - -#: includes/misc-functions.php:208 -msgid "Indian Rupee" -msgstr "" - -#: includes/misc-functions.php:209 -msgid "Turkish Lira" -msgstr "" - -#: includes/misc-functions.php:210 -msgid "Iranian Rial" -msgstr "" - -#: includes/process-download.php:266 -#: includes/process-download.php:283 -msgid "Sorry but this file does not exist." -msgstr "" - -#: includes/process-download.php:294 -msgid "You do not have permission to download this file" -msgstr "" - -#: includes/process-download.php:294 -msgid "Purchase Verification Failed" -msgstr "" - -#: includes/checkout-template.php:101 -msgid "Personal Info" -msgstr "" - -#: includes/checkout-template.php:104 -msgid "Email address" -msgstr "" - -#: includes/checkout-template.php:105 -msgid "Email Address" -msgstr "" - -#: includes/checkout-template.php:109 -#: includes/checkout-template.php:110 -#: includes/checkout-template.php:343 -#: includes/checkout-template.php:344 -msgid "First Name" -msgstr "" - -#: includes/checkout-template.php:113 -#: includes/checkout-template.php:347 -msgid "Last name" -msgstr "" - -#: includes/checkout-template.php:114 -#: includes/checkout-template.php:348 -msgid "Last Name" -msgstr "" - -#: includes/checkout-template.php:142 -msgid "Show Terms" -msgstr "" - -#: includes/checkout-template.php:143 -msgid "Hide Terms" -msgstr "" - -#: includes/checkout-template.php:146 -msgid "Agree to Terms?" -msgstr "" - -#: includes/checkout-template.php:166 -msgid "Go back" -msgstr "" - -#: includes/checkout-template.php:170 -msgid "You must be logged in to complete your purchase" -msgstr "" - -#: includes/checkout-template.php:199 -msgid "Credit Card Info" -msgstr "" - -#: includes/checkout-template.php:201 -msgid "Card name" -msgstr "" - -#: includes/checkout-template.php:202 -msgid "Name on the Card" -msgstr "" - -#: includes/checkout-template.php:205 -msgid "Card number" -msgstr "" - -#: includes/checkout-template.php:206 -msgid "Card Number" -msgstr "" - -#: includes/checkout-template.php:209 -msgid "Security code" -msgstr "" - -#: includes/checkout-template.php:210 -msgid "CVC" -msgstr "" - -#: includes/checkout-template.php:216 -msgid "Month" -msgstr "" - -#: includes/checkout-template.php:218 -msgid "Year" -msgstr "" - -#: includes/checkout-template.php:219 -msgid "Expiration (MM/YYYY)" -msgstr "" - -#: includes/checkout-template.php:249 -msgid "Address line 1" -msgstr "" - -#: includes/checkout-template.php:250 -msgid "Billing Address" -msgstr "" - -#: includes/checkout-template.php:253 -msgid "Address line 2" -msgstr "" - -#: includes/checkout-template.php:254 -msgid "Billing Address Line 2" -msgstr "" - -#: includes/checkout-template.php:257 -msgid "City" -msgstr "" - -#: includes/checkout-template.php:258 -msgid "Billing City" -msgstr "" - -#: includes/checkout-template.php:269 -msgid "Billing Country" -msgstr "" - -#: includes/checkout-template.php:272 -msgid "State / Province" -msgstr "" - -#: includes/checkout-template.php:289 -msgid "Billing State / Province" -msgstr "" - -#: includes/checkout-template.php:292 -msgid "Zip / Postal code" -msgstr "" - -#: includes/checkout-template.php:293 -msgid "Billing Zip / Postal Code" -msgstr "" - -#: includes/checkout-template.php:320 -msgid "Already have an account?" -msgstr "" - -#: includes/checkout-template.php:322 -msgid "Create an account" -msgstr "" - -#: includes/checkout-template.php:322 -msgid "(optional)" -msgstr "" - -#: includes/checkout-template.php:333 -msgid "Confirm password" -msgstr "" - -#: includes/checkout-template.php:334 -msgid "Password Again" -msgstr "" - -#: includes/checkout-template.php:339 -#: includes/checkout-template.php:340 -msgid "Email" -msgstr "" - -#: includes/checkout-template.php:369 -msgid "Login to your account" -msgstr "" - -#: includes/checkout-template.php:372 -msgid "Your username" -msgstr "" - -#: includes/checkout-template.php:376 -msgid "Your password" -msgstr "" - -#: includes/checkout-template.php:384 -msgid "Need to create an account?" -msgstr "" - -#: includes/checkout-template.php:386 -msgid "Register" -msgstr "" - -#: includes/checkout-template.php:386 -msgid "or checkout as a guest." -msgstr "" - -#: includes/checkout-template.php:415 -msgid "Choose Your Payment Method" -msgstr "" - -#: includes/checkout-template.php:443 -msgid "Enter discount" -msgstr "" - -#: includes/checkout-template.php:445 -msgid "Discount" -msgstr "" - -#: includes/checkout-template.php:447 -msgid "Apply Discount" -msgstr "" - -#: includes/checkout-template.php:473 -msgid "Next" -msgstr "" - -#: includes/email-functions.php:62 -msgid "Hello" -msgstr "" - -#: includes/email-functions.php:62 -msgid "A download purchase has been made" -msgstr "" - -#: includes/email-functions.php:63 -msgid "Downloads sold:" -msgstr "" - -#: includes/email-functions.php:76 -msgid "Purchased by: " -msgstr "" - -#: includes/email-functions.php:77 -msgid "Amount: " -msgstr "" - -#: includes/email-functions.php:78 -msgid "Payment Method: " -msgstr "" - -#: includes/email-functions.php:79 -msgid "Thank you" -msgstr "" - -#: includes/email-functions.php:82 -msgid "New download purchase" -msgstr "" - -#: includes/install.php:42 -msgid "Purchase Confirmation" -msgstr "" - -#: includes/install.php:43 -msgid "Thank you for your purchase!" -msgstr "" - -#: includes/process-purchase.php:206 -msgid "The selected gateway is not active" -msgstr "" - -#: includes/process-purchase.php:210 -msgid "No gateway has been selected" -msgstr "" - -#: includes/process-purchase.php:259 -msgid "You must agree to the terms of use" -msgstr "" - -#: includes/process-purchase.php:289 -msgid "Please enter a valid email address." -msgstr "" - -#: includes/process-purchase.php:303 -msgid "The user information is invalid." -msgstr "" - -#: includes/process-purchase.php:349 -msgid "Username already taken" -msgstr "" - -#: includes/process-purchase.php:355 -msgid "Invalid username" -msgstr "" - -#: includes/process-purchase.php:366 -msgid "You must register or login to complete your purchase" -msgstr "" - -#: includes/process-purchase.php:378 -#: includes/process-purchase.php:522 -msgid "Invalid email" -msgstr "" - -#: includes/process-purchase.php:384 -msgid "Email already used" -msgstr "" - -#: includes/process-purchase.php:396 -#: includes/process-purchase.php:529 -msgid "Enter an email" -msgstr "" - -#: includes/process-purchase.php:407 -msgid "Passwords don't match" -msgstr "" - -#: includes/process-purchase.php:422 -#: includes/process-purchase.php:487 -msgid "Enter a password" -msgstr "" - -#: includes/process-purchase.php:427 -msgid "Enter the password confirmation" -msgstr "" - -#: includes/process-purchase.php:454 -msgid "You must login or register to complete your purchase" -msgstr "" - -#: includes/gateway-functions.php:28 -msgid "Test Payment" -msgstr "" - -#: includes/post-types.php:43 -#: includes/post-types.php:81 -msgid "Add New" -msgstr "" - -#: includes/post-types.php:44 -#, php-format -msgid "Add New %1$s" -msgstr "" - -#: includes/post-types.php:45 -#, php-format -msgid "Edit %1$s" -msgstr "" - -#: includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "" - -#: includes/post-types.php:47 -#, php-format -msgid "All %2$s" -msgstr "" - -#: includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "" - -#: includes/post-types.php:49 -#, php-format -msgid "Search %2$s" -msgstr "" - -#: includes/post-types.php:50 -#, php-format -msgid "No %2$s found" -msgstr "" - -#: includes/post-types.php:51 -#, php-format -msgid "No %2$s found in Trash" -msgstr "" - -#: includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "" - -#: includes/post-types.php:79 -msgctxt "post type general name" -msgid "Payments" -msgstr "" - -#: includes/post-types.php:80 -msgctxt "post type singular name" -msgid "Payment" -msgstr "" - -#: includes/post-types.php:82 -msgid "Add New Payment" -msgstr "" - -#: includes/post-types.php:83 -msgid "Edit Payment" -msgstr "" - -#: includes/post-types.php:84 -msgid "New Payment" -msgstr "" - -#: includes/post-types.php:85 -msgid "All Payments" -msgstr "" - -#: includes/post-types.php:86 -msgid "View Payment" -msgstr "" - -#: includes/post-types.php:87 -msgid "Search Payments" -msgstr "" - -#: includes/post-types.php:88 -msgid "No Payments found" -msgstr "" - -#: includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "" - -#: includes/post-types.php:91 -msgid "Payment History" -msgstr "" - -#: includes/post-types.php:125 -msgid "Download" -msgstr "" - -#: includes/post-types.php:126 -msgid "Downloads" -msgstr "" - -#: includes/post-types.php:173 -msgctxt "taxonomy general name" -msgid "Categories" -msgstr "" - -#: includes/post-types.php:174 -msgctxt "taxonomy singular name" -msgid "Category" -msgstr "" - -#: includes/post-types.php:175 -msgid "Search Categories" -msgstr "" - -#: includes/post-types.php:176 -msgid "All Categories" -msgstr "" - -#: includes/post-types.php:177 -msgid "Parent Category" -msgstr "" - -#: includes/post-types.php:178 -msgid "Parent Category:" -msgstr "" - -#: includes/post-types.php:179 -msgid "Edit Category" -msgstr "" - -#: includes/post-types.php:180 -msgid "Update Category" -msgstr "" - -#: includes/post-types.php:181 -msgid "Add New Category" -msgstr "" - -#: includes/post-types.php:182 -msgid "New Category Name" -msgstr "" - -#: includes/post-types.php:198 -msgctxt "taxonomy general name" -msgid "Tags" -msgstr "" - -#: includes/post-types.php:199 -msgctxt "taxonomy singular name" -msgid "Tag" -msgstr "" - -#: includes/post-types.php:200 -msgid "Search Tags" -msgstr "" - -#: includes/post-types.php:201 -msgid "All Tags" -msgstr "" - -#: includes/post-types.php:202 -msgid "Parent Tag" -msgstr "" - -#: includes/post-types.php:203 -msgid "Parent Tag:" -msgstr "" - -#: includes/post-types.php:204 -msgid "Edit Tag" -msgstr "" - -#: includes/post-types.php:205 -msgid "Update Tag" -msgstr "" - -#: includes/post-types.php:206 -msgid "Add New Tag" -msgstr "" - -#: includes/post-types.php:207 -msgid "New Tag Name" -msgstr "" - -#: includes/post-types.php:239 -#: includes/post-types.php:240 -msgid "Download updated." -msgstr "" - -#: includes/post-types.php:241 -msgid "Download published." -msgstr "" - -#: includes/post-types.php:242 -msgid "Download saved." -msgstr "" - -#: includes/post-types.php:243 -msgid "Download submitted." -msgstr "" - -#: includes/shortcodes.php:194 -msgid "Purchase All Items" -msgstr "" - -#: includes/shortcodes.php:336 -#, php-format -msgctxt "download post type name" -msgid "No %s found" -msgstr "" - -#: includes/gateways/paypal.php:271 -msgid "Invalid IPN" -msgstr "" - -#: includes/templates/history-purchases.php:11 -msgid "Purchase ID" -msgstr "" - -#: includes/templates/history-purchases.php:12 -#: includes/admin/export-functions.php:48 -msgid "Date" -msgstr "" - -#: includes/templates/history-purchases.php:13 -msgid "Amount" -msgstr "" - -#: includes/templates/history-purchases.php:14 -#: includes/templates/history-downloads.php:12 -msgid "Files" -msgstr "" - -#: includes/templates/history-purchases.php:61 -msgid "You have not made any purchases" -msgstr "" - -#: includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "" - -#: includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "" - -#: includes/templates/checkout_cart.php:8 -msgid "Actions" -msgstr "" - -#: includes/templates/checkout_cart.php:49 -msgid "Total" -msgstr "" - -#: includes/templates/history-downloads.php:10 -msgid "Download Name" -msgstr "" - -#: includes/templates/history-downloads.php:68 -msgid "You have not purchased any downloads" -msgstr "" - -#: includes/admin/export-functions.php:39 -msgid "ID" -msgstr "" - -#: includes/admin/export-functions.php:43 -msgid "Products" -msgstr "" - -#: includes/admin/export-functions.php:44 -msgid "Discounts," -msgstr "" - -#: includes/admin/export-functions.php:45 -msgid "Amount paid" -msgstr "" - -#: includes/admin/export-functions.php:46 -msgid "Payment method" -msgstr "" - -#: includes/admin/export-functions.php:47 -msgid "Key" -msgstr "" - -#: includes/admin/export-functions.php:49 -msgid "User" -msgstr "" - -#: includes/admin/export-functions.php:50 -msgid "Status" -msgstr "" - -#: includes/admin/export-functions.php:111 -#: includes/admin/export-functions.php:119 -msgid "none" -msgstr "" - -#: includes/admin/export-functions.php:127 -msgid "guest" -msgstr "" - -#: includes/admin/export-functions.php:135 -msgid "No payments recorded yet" -msgstr "" - -#: includes/admin/export-functions.php:169 -msgid "Export not allowed for non-administrators." -msgstr "" - -#: includes/admin/thickbox.php:29 -#: includes/admin/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "" - -#: includes/admin/thickbox.php:30 -msgid "Insert Download" -msgstr "" - -#: includes/admin/thickbox.php:65 -msgid "You must choose a download" -msgstr "" - -#: includes/admin/thickbox.php:88 -#, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "" - -#: includes/admin/thickbox.php:91 -#, php-format -msgid "Choose a %s" -msgstr "" - -#: includes/admin/thickbox.php:100 -msgid "Choose a style" -msgstr "" - -#: includes/admin/thickbox.php:111 -msgid "Choose a button color" -msgstr "" - -#: includes/admin/thickbox.php:120 -msgid "Link text . . ." -msgstr "" - -#: includes/admin/thickbox.php:124 -msgid "Cancel" -msgstr "" - -#: includes/admin/thickbox.php:126 -msgid "Button Styles" -msgstr "" - -#: includes/admin/admin-pages.php:27 -#: includes/admin/discounts/discount-codes.php:34 -msgid "Discount Codes" -msgstr "" - -#: includes/admin/admin-pages.php:28 -msgid "Earnings and Sales Reports" -msgstr "" - -#: includes/admin/admin-pages.php:28 -#: includes/admin/reporting/reports.php:28 -msgid "Reports" -msgstr "" - -#: includes/admin/admin-pages.php:29 -msgid "Easy Digital Download Settings" -msgstr "" - -#: includes/admin/admin-pages.php:29 -msgid "Settings" -msgstr "" - -#: includes/admin/admin-pages.php:30 -msgid "Easy Digital Download Add Ons" -msgstr "" - -#: includes/admin/admin-pages.php:30 -msgid "Add Ons" -msgstr "" - -#: includes/admin/admin-notices.php:30 -msgid "Discount code updated." -msgstr "" - -#: includes/admin/admin-notices.php:33 -msgid "There was a problem updating your discount code, please try again." -msgstr "" - -#: includes/admin/admin-notices.php:36 -msgid "The payment has been deleted." -msgstr "" - -#: includes/admin/admin-notices.php:39 -msgid "The purchase receipt has been resent." -msgstr "" - -#: includes/admin/admin-notices.php:44 -#, php-format -msgid "The payment history needs updated. %s" -msgstr "" - -#: includes/admin/admin-notices.php:44 -msgid "Click to Upgrade" -msgstr "" - -#: includes/admin/admin-notices.php:62 -msgid "There seems to be an issue with the server. Please try again in a few minutes." -msgstr "" - -#: includes/admin/add-ons.php:69 -msgid "Add Ons for Easy Digital Downloads" -msgstr "" - -#: includes/admin/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "" - -#: includes/admin/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "" - -#: includes/admin/downloads/dashboard-columns.php:26 -#: includes/admin/discounts/edit-discount.php:23 -#: includes/admin/discounts/discount-codes.php:39 -#: includes/admin/discounts/discount-codes.php:52 -#: includes/admin/discounts/add-discount.php:18 -msgid "Name" -msgstr "" - -#: includes/admin/downloads/dashboard-columns.php:29 -#: includes/admin/downloads/dashboard-columns.php:242 -#: includes/admin/downloads/metabox.php:171 -#: includes/admin/payments/payments-history.php:142 -#: includes/admin/payments/payments-history.php:158 -#: includes/admin/reporting/pdf-reports.php:66 -msgid "Price" -msgstr "" - -#: includes/admin/downloads/dashboard-columns.php:32 -msgid "Short Code" -msgstr "" - -#: includes/admin/downloads/dashboard-columns.php:200 -msgid "Show all categories" -msgstr "" - -#: includes/admin/downloads/dashboard-columns.php:211 -msgid "Show all tags" -msgstr "" - -#: includes/admin/downloads/dashboard-columns.php:239 -#, php-format -msgid "%s Data" -msgstr "" - -#: includes/admin/downloads/metabox.php:23 -#, php-format -msgid "%1$s Configuration" -msgstr "" - -#: includes/admin/downloads/metabox.php:26 -msgid "Product Notes" -msgstr "" - -#: includes/admin/downloads/metabox.php:29 -#, php-format -msgid "%1$s Stats" -msgstr "" - -#: includes/admin/downloads/metabox.php:32 -msgid "Purchase Log" -msgstr "" - -#: includes/admin/downloads/metabox.php:35 -msgid "File Download Log" -msgstr "" - -#: includes/admin/downloads/metabox.php:145 -msgid "Pricing Options:" -msgstr "" - -#: includes/admin/downloads/metabox.php:151 -msgid "Enable variable pricing" -msgstr "" - -#: includes/admin/downloads/metabox.php:170 -#: includes/admin/downloads/metabox.php:233 -msgid "Option Name" -msgstr "" - -#: includes/admin/downloads/metabox.php:199 -msgid "Add New Price" -msgstr "" - -#: includes/admin/downloads/metabox.php:275 -msgid "File Downloads:" -msgstr "" - -#: includes/admin/downloads/metabox.php:284 -#: includes/admin/downloads/metabox.php:351 -msgid "File Name" -msgstr "" - -#: includes/admin/downloads/metabox.php:285 -msgid "File URL" -msgstr "" - -#: includes/admin/downloads/metabox.php:286 -msgid "Price Assignment" -msgstr "" - -#: includes/admin/downloads/metabox.php:314 -msgid "Add New File" -msgstr "" - -#: includes/admin/downloads/metabox.php:355 -msgid "http://" -msgstr "" - -#: includes/admin/downloads/metabox.php:358 -msgid "Upload a File" -msgstr "" - -#: includes/admin/downloads/metabox.php:364 -msgid "All Prices" -msgstr "" - -#: includes/admin/downloads/metabox.php:391 -msgid "Button Options" -msgstr "" - -#: includes/admin/downloads/metabox.php:397 -msgid "Disable the automatic output of the purchase button" -msgstr "" - -#: includes/admin/downloads/metabox.php:457 -msgid "Special notes or instructions for this product. These notes will be added to the purchase receipt." -msgstr "" - -#: includes/admin/downloads/metabox.php:479 -msgid "Sales:" -msgstr "" - -#: includes/admin/downloads/metabox.php:485 -msgid "Earnings:" -msgstr "" - -#: includes/admin/downloads/metabox.php:521 -msgid "Sales Log" -msgstr "" - -#: includes/admin/downloads/metabox.php:523 -msgid "Each sale for this download is listed below." -msgstr "" - -#: includes/admin/downloads/metabox.php:537 -#: includes/admin/downloads/metabox.php:629 -msgid "Date:" -msgstr "" - -#: includes/admin/downloads/metabox.php:541 -msgid "Buyer:" -msgstr "" - -#: includes/admin/downloads/metabox.php:545 -msgid "Purchase ID:" -msgstr "" - -#: includes/admin/downloads/metabox.php:553 -msgid "No sales yet" -msgstr "" - -#: includes/admin/downloads/metabox.php:569 -#: includes/admin/downloads/metabox.php:666 -#: includes/admin/payments/payments-history.php:318 -msgid "Previous" -msgstr "" - -#: includes/admin/downloads/metabox.php:610 -msgid "Download Log" -msgstr "" - -#: includes/admin/downloads/metabox.php:612 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "" - -#: includes/admin/downloads/metabox.php:633 -msgid "Downloaded by:" -msgstr "" - -#: includes/admin/downloads/metabox.php:637 -msgid "IP Address:" -msgstr "" - -#: includes/admin/downloads/metabox.php:641 -msgid "File: " -msgstr "" - -#: includes/admin/downloads/metabox.php:650 -msgid "No file downloads yet yet" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:13 -msgid "Something went wrong." -msgstr "" - -#: includes/admin/discounts/edit-discount.php:17 -msgid "Edit Discount" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:17 -#: includes/admin/payments/edit-payment.php:16 -msgid "Go Back" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:27 -#: includes/admin/discounts/add-discount.php:22 -msgid "The name of this discount" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:32 -#: includes/admin/discounts/discount-codes.php:40 -#: includes/admin/discounts/discount-codes.php:53 -#: includes/admin/discounts/add-discount.php:27 -msgid "Code" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:36 -#: includes/admin/discounts/add-discount.php:31 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:41 -#: includes/admin/discounts/add-discount.php:36 -msgid "Type" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:45 -#: includes/admin/discounts/add-discount.php:40 -msgid "Percentage" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:46 -#: includes/admin/discounts/add-discount.php:41 -msgid "Flat amount" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:48 -#: includes/admin/discounts/add-discount.php:43 -msgid "The kind of discount to apply for this discount." -msgstr "" - -#: includes/admin/discounts/edit-discount.php:57 -#: includes/admin/discounts/add-discount.php:52 -msgid "The amount of this discount code." -msgstr "" - -#: includes/admin/discounts/edit-discount.php:62 -#: includes/admin/discounts/add-discount.php:57 -msgid "Start date" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:66 -#: includes/admin/discounts/add-discount.php:61 -msgid "Enter the start date for this discount code in the format of mm/dd/yyyy. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "" - -#: includes/admin/discounts/edit-discount.php:71 -#: includes/admin/discounts/add-discount.php:66 -msgid "Expiration date" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:75 -#: includes/admin/discounts/add-discount.php:70 -msgid "Enter the expiration date for this discount code in the format of mm/dd/yyyy. For no expiration, leave blank" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:80 -#: includes/admin/discounts/discount-codes.php:43 -#: includes/admin/discounts/discount-codes.php:56 -#: includes/admin/discounts/add-discount.php:84 -msgid "Max Uses" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:84 -#: includes/admin/discounts/add-discount.php:88 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "" - -#: includes/admin/discounts/edit-discount.php:89 -#: includes/admin/discounts/add-discount.php:75 -msgid "Minimum Amount" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:93 -#: includes/admin/discounts/add-discount.php:79 -msgid "The minimum amount that must be purchased before this discount can be used. Leave blank for no minimum." -msgstr "" - -#: includes/admin/discounts/edit-discount.php:102 -msgid "Active" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:103 -msgid "Inactive" -msgstr "" - -#: includes/admin/discounts/edit-discount.php:105 -msgid "The status of this discount code." -msgstr "" - -#: includes/admin/discounts/edit-discount.php:115 -msgid "Update Discount Code" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:42 -#: includes/admin/discounts/discount-codes.php:55 -msgid "Uses" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:44 -#: includes/admin/discounts/discount-codes.php:57 -msgid "Start Date" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:45 -#: includes/admin/discounts/discount-codes.php:58 -msgid "Expiration" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:82 -#: includes/admin/discounts/discount-codes.php:84 -msgid "unlimited" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:93 -msgid "No start date" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:100 -msgid "Expired" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:102 -msgid "no expiration" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:108 -#: includes/admin/payments/payments-history.php:183 -msgid "Edit" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:110 -msgid "Deactivate" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:112 -msgid "Activate" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:114 -#: includes/admin/payments/payments-history.php:185 -msgid "Delete" -msgstr "" - -#: includes/admin/discounts/discount-codes.php:119 -msgid "No discount codes have been created." -msgstr "" - -#: includes/admin/discounts/add-discount.php:12 -msgid "Add New Discount" -msgstr "" - -#: includes/admin/discounts/add-discount.php:96 -msgid "Add Discount Code" -msgstr "" - -#: includes/admin/payments/payments-history.php:90 -msgid "All" -msgstr "" - -#: includes/admin/payments/payments-history.php:95 -msgid "Completed" -msgstr "" - -#: includes/admin/payments/payments-history.php:106 -msgid "Export" -msgstr "" - -#: includes/admin/payments/payments-history.php:110 -msgid "Payment mode" -msgstr "" - -#: includes/admin/payments/payments-history.php:112 -msgid "Live" -msgstr "" - -#: includes/admin/payments/payments-history.php:113 -msgid "Test" -msgstr "" - -#: includes/admin/payments/payments-history.php:123 -msgid "Payments per page" -msgstr "" - -#: includes/admin/payments/payments-history.php:125 -msgid "Show" -msgstr "" - -#: includes/admin/payments/payments-history.php:131 -msgid "Showing payments for: " -msgstr "" - -#: includes/admin/payments/payments-history.php:131 -msgid "clear" -msgstr "" - -#: includes/admin/payments/payments-history.php:184 -msgid "Resend Purchase Receipt" -msgstr "" - -#: includes/admin/payments/payments-history.php:197 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "" - -#: includes/admin/payments/payments-history.php:197 -msgid "View Order Details" -msgstr "" - -#: includes/admin/payments/payments-history.php:205 -msgid "Purchased File" -msgstr "" - -#: includes/admin/payments/payments-history.php:205 -msgid "Purchased Files" -msgstr "" - -#: includes/admin/payments/payments-history.php:249 -msgid "Date and Time:" -msgstr "" - -#: includes/admin/payments/payments-history.php:250 -msgid "Discount used:" -msgstr "" - -#: includes/admin/payments/payments-history.php:251 -msgid "Total:" -msgstr "" - -#: includes/admin/payments/payments-history.php:254 -msgid "Buyer's Personal Details:" -msgstr "" - -#: includes/admin/payments/payments-history.php:256 -msgid "Name:" -msgstr "" - -#: includes/admin/payments/payments-history.php:257 -msgid "Email:" -msgstr "" - -#: includes/admin/payments/payments-history.php:266 -msgid "Payment Method:" -msgstr "" - -#: includes/admin/payments/payments-history.php:271 -msgid "Purchase Key" -msgstr "" - -#: includes/admin/payments/payments-history.php:274 -#: includes/admin/payments/edit-payment.php:92 -msgid "Close" -msgstr "" - -#: includes/admin/payments/payments-history.php:304 -msgid "Total Earnings:" -msgstr "" - -#: includes/admin/payments/edit-payment.php:22 -msgid "Buyer's Email" -msgstr "" - -#: includes/admin/payments/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "" - -#: includes/admin/payments/edit-payment.php:31 -msgid "Downloads Purchased" -msgstr "" - -#: includes/admin/payments/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "" - -#: includes/admin/payments/edit-payment.php:43 -msgid "Add download to purchase" -msgstr "" - -#: includes/admin/payments/edit-payment.php:48 -msgid "Payment Status" -msgstr "" - -#: includes/admin/payments/edit-payment.php:64 -msgid "Send Purchase Receipt" -msgstr "" - -#: includes/admin/payments/edit-payment.php:68 -msgid "Check this box to send the purchase receipt, including all download links." -msgstr "" - -#: includes/admin/payments/edit-payment.php:78 -msgid "Update Payment" -msgstr "" - -#: includes/admin/payments/edit-payment.php:91 -msgid "Add Selected Downloads" -msgstr "" - -#: includes/admin/reporting/reports.php:41 -msgid "Download Sales and Earnings PDF Report for all Products" -msgstr "" - -#: includes/admin/reporting/reports.php:42 -msgid "Download a CSV Customers List" -msgstr "" - -#: includes/admin/reporting/reports.php:44 -msgid "Please Note: Transactions created while in test mode are not included on this page or in the PDF reports." -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:36 -msgid "to" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:41 -#: includes/admin/reporting/pdf-reports.php:52 -msgid "Sales and earnings reports for the current year for all products" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:42 -#: includes/admin/reporting/pdf-reports.php:43 -msgid "Easy Digital Downloads" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:57 -msgid "Date Range: " -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:61 -msgid "Table View" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:65 -msgid "Product Name" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:69 -msgid "Number of Sales" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:70 -msgid "Earnings to Date" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:112 -msgid "No Downloads found." -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:119 -msgid "Graph View" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:212 -msgid "Sales and Earnings by Month for all Products" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:226 -msgid "Jan" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:227 -msgid "Feb" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:228 -msgid "Mar" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:229 -msgid "Apr" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:230 -msgid "May" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:231 -msgid "June" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:232 -msgid "July" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:233 -msgid "Aug" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:234 -msgid "Sept" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:235 -msgid "Oct" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:236 -msgid "Nov" -msgstr "" - -#: includes/admin/reporting/pdf-reports.php:237 -msgid "Dec" -msgstr "" - -#: includes/admin/reporting/graphing.php:42 -#, php-format -msgid "%s Performance in Sales" -msgstr "" - -#: includes/admin/reporting/graphing.php:88 -#, php-format -msgid "%s Performance in Earnings" -msgstr "" - -#: includes/admin/reporting/graphing.php:136 -msgid "Earnings per month" -msgstr "" - -#: includes/admin/reporting/graphing.php:168 -msgid "Day" -msgstr "" - -#: includes/admin/reporting/graphing.php:189 -#, php-format -msgid "Earnings per day for last %s days" -msgstr "" - -#: includes/admin/reporting/graphing.php:236 -msgid "Sales per month" -msgstr "" - -#: includes/admin/settings/settings.php:33 -msgid "General" -msgstr "" - -#: includes/admin/settings/settings.php:35 -msgid "Emails" -msgstr "" - -#: includes/admin/settings/settings.php:36 -msgid "Styles" -msgstr "" - -#: includes/admin/settings/settings.php:37 -msgid "Misc" -msgstr "" - diff --git a/languages/easy-digital-downloads.pot b/languages/easy-digital-downloads.pot new file mode 100644 index 00000000000..281b2f6f094 --- /dev/null +++ b/languages/easy-digital-downloads.pot @@ -0,0 +1,22721 @@ +# Copyright (C) 2024 Easy Digital Downloads +# This file is distributed under the same license as the Easy Digital Downloads plugin. +msgid "" +msgstr "" +"Project-Id-Version: Easy Digital Downloads 3.3.4\n" +"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/easy-digital-downloads-public\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: 2024-09-19T21:48:04+00:00\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"X-Generator: WP-CLI 2.11.0\n" + +#. Plugin Name of the plugin +#. Author of the plugin +#: easy-digital-downloads.php +#: includes/blocks/includes/functions.php:27 +#: src/Admin/Onboarding/Steps/Tools.php:152 +#: src/Admin/SiteHealth/Test.php:21 +msgid "Easy Digital Downloads" +msgstr "" + +#. Plugin URI of the plugin +#. Author URI of the plugin +#: easy-digital-downloads.php +msgid "https://easydigitaldownloads.com" +msgstr "" + +#. Description of the plugin +#: easy-digital-downloads.php +msgid "The easiest way to sell digital products with WordPress." +msgstr "" + +#: easy-digital-downloads.php:132 +msgid "Heads up!" +msgstr "" + +#: easy-digital-downloads.php:133 +msgid "Your site already has Easy Digital Downloads (Pro) activated. If you want to switch to Easy Digital Downloads, please first go to Plugins → Installed Plugins and deactivate Easy Digital Downloads (Pro). Then, you can activate Easy Digital Downloads." +msgstr "" + +#: i18n/countries.php:7 +msgid "Afghanistan" +msgstr "" + +#: i18n/countries.php:8 +msgid "Åland Islands" +msgstr "" + +#: i18n/countries.php:9 +msgid "Albania" +msgstr "" + +#: i18n/countries.php:10 +msgid "Algeria" +msgstr "" + +#: i18n/countries.php:11 +#: i18n/states-us.php:58 +msgid "American Samoa" +msgstr "" + +#: i18n/countries.php:12 +msgid "Andorra" +msgstr "" + +#: i18n/countries.php:13 +msgid "Angola" +msgstr "" + +#: i18n/countries.php:14 +msgid "Anguilla" +msgstr "" + +#: i18n/countries.php:15 +msgid "Antarctica" +msgstr "" + +#: i18n/countries.php:16 +msgid "Antigua and Barbuda" +msgstr "" + +#: i18n/countries.php:17 +msgid "Argentina" +msgstr "" + +#: i18n/countries.php:18 +msgid "Armenia" +msgstr "" + +#: i18n/countries.php:19 +msgid "Aruba" +msgstr "" + +#: i18n/countries.php:20 +msgid "Australia" +msgstr "" + +#: i18n/countries.php:21 +msgid "Austria" +msgstr "" + +#: i18n/countries.php:22 +msgid "Azerbaijan" +msgstr "" + +#: i18n/countries.php:23 +msgid "Bahamas" +msgstr "" + +#: i18n/countries.php:24 +msgid "Bahrain" +msgstr "" + +#: i18n/countries.php:25 +msgid "Bangladesh" +msgstr "" + +#: i18n/countries.php:26 +msgid "Barbados" +msgstr "" + +#: i18n/countries.php:27 +msgid "Belarus" +msgstr "" + +#: i18n/countries.php:28 +msgid "Belgium" +msgstr "" + +#: i18n/countries.php:29 +msgid "Belize" +msgstr "" + +#: i18n/countries.php:30 +msgid "Benin" +msgstr "" + +#: i18n/countries.php:31 +msgid "Bermuda" +msgstr "" + +#: i18n/countries.php:32 +msgid "Bhutan" +msgstr "" + +#: i18n/countries.php:33 +msgid "Bolivia" +msgstr "" + +#: i18n/countries.php:34 +msgid "Bonaire, Saint Eustatius and Saba" +msgstr "" + +#: i18n/countries.php:35 +msgid "Bosnia and Herzegovina" +msgstr "" + +#: i18n/countries.php:36 +msgid "Botswana" +msgstr "" + +#: i18n/countries.php:37 +msgid "Bouvet Island" +msgstr "" + +#: i18n/countries.php:38 +msgid "Brazil" +msgstr "" + +#: i18n/countries.php:39 +msgid "British Indian Ocean Territory" +msgstr "" + +#: i18n/countries.php:40 +msgid "Brunei Darrussalam" +msgstr "" + +#: i18n/countries.php:41 +msgid "Bulgaria" +msgstr "" + +#: i18n/countries.php:42 +msgid "Burkina Faso" +msgstr "" + +#: i18n/countries.php:43 +msgid "Burundi" +msgstr "" + +#: i18n/countries.php:44 +msgid "Cambodia" +msgstr "" + +#: i18n/countries.php:45 +msgid "Cameroon" +msgstr "" + +#: i18n/countries.php:46 +msgid "Canada" +msgstr "" + +#: i18n/countries.php:47 +msgid "Cape Verde" +msgstr "" + +#: i18n/countries.php:48 +msgid "Cayman Islands" +msgstr "" + +#: i18n/countries.php:49 +msgid "Central African Republic" +msgstr "" + +#: i18n/countries.php:50 +msgid "Chad" +msgstr "" + +#: i18n/countries.php:51 +msgid "Chile" +msgstr "" + +#: i18n/countries.php:52 +msgid "China" +msgstr "" + +#: i18n/countries.php:53 +msgid "Christmas Island" +msgstr "" + +#: i18n/countries.php:54 +msgid "Cocos Islands" +msgstr "" + +#: i18n/countries.php:55 +msgid "Colombia" +msgstr "" + +#: i18n/countries.php:56 +msgid "Comoros" +msgstr "" + +#: i18n/countries.php:57 +msgid "Congo, Democratic People's Republic" +msgstr "" + +#: i18n/countries.php:58 +msgid "Congo, Republic of" +msgstr "" + +#: i18n/countries.php:59 +msgid "Cook Islands" +msgstr "" + +#: i18n/countries.php:60 +msgid "Costa Rica" +msgstr "" + +#: i18n/countries.php:61 +msgid "Cote d'Ivoire" +msgstr "" + +#: i18n/countries.php:62 +msgid "Croatia/Hrvatska" +msgstr "" + +#: i18n/countries.php:63 +msgid "Cuba" +msgstr "" + +#: i18n/countries.php:64 +msgid "CuraÇao" +msgstr "" + +#: i18n/countries.php:65 +msgid "Cyprus" +msgstr "" + +#: i18n/countries.php:66 +msgid "Czechia" +msgstr "" + +#: i18n/countries.php:67 +msgid "Denmark" +msgstr "" + +#: i18n/countries.php:68 +msgid "Djibouti" +msgstr "" + +#: i18n/countries.php:69 +msgid "Dominica" +msgstr "" + +#: i18n/countries.php:70 +msgid "Dominican Republic" +msgstr "" + +#: i18n/countries.php:71 +msgid "East Timor" +msgstr "" + +#: i18n/countries.php:72 +msgid "Ecuador" +msgstr "" + +#: i18n/countries.php:73 +msgid "Egypt" +msgstr "" + +#: i18n/countries.php:74 +msgid "Equatorial Guinea" +msgstr "" + +#: i18n/countries.php:75 +msgid "El Salvador" +msgstr "" + +#: i18n/countries.php:76 +msgid "Eritrea" +msgstr "" + +#: i18n/countries.php:77 +msgid "Estonia" +msgstr "" + +#: i18n/countries.php:78 +msgid "Ethiopia" +msgstr "" + +#: i18n/countries.php:79 +msgid "Falkland Islands" +msgstr "" + +#: i18n/countries.php:80 +msgid "Faroe Islands" +msgstr "" + +#: i18n/countries.php:81 +msgid "Fiji" +msgstr "" + +#: i18n/countries.php:82 +msgid "Finland" +msgstr "" + +#: i18n/countries.php:83 +msgid "France" +msgstr "" + +#: i18n/countries.php:84 +msgid "French Guiana" +msgstr "" + +#: i18n/countries.php:85 +msgid "French Polynesia" +msgstr "" + +#: i18n/countries.php:86 +msgid "French Southern Territories" +msgstr "" + +#: i18n/countries.php:87 +msgid "Gabon" +msgstr "" + +#: i18n/countries.php:88 +msgid "Gambia" +msgstr "" + +#: i18n/countries.php:89 +#: i18n/states-us.php:17 +msgid "Georgia" +msgstr "" + +#: i18n/countries.php:90 +msgid "Germany" +msgstr "" + +#: i18n/countries.php:91 +msgid "Greece" +msgstr "" + +#: i18n/countries.php:92 +msgid "Ghana" +msgstr "" + +#: i18n/countries.php:93 +msgid "Gibraltar" +msgstr "" + +#: i18n/countries.php:94 +msgid "Greenland" +msgstr "" + +#: i18n/countries.php:95 +msgid "Grenada" +msgstr "" + +#: i18n/countries.php:96 +msgid "Guadeloupe" +msgstr "" + +#: i18n/countries.php:97 +#: i18n/states-us.php:62 +msgid "Guam" +msgstr "" + +#: i18n/countries.php:98 +msgid "Guatemala" +msgstr "" + +#: i18n/countries.php:99 +msgid "Guernsey" +msgstr "" + +#: i18n/countries.php:100 +msgid "Guinea" +msgstr "" + +#: i18n/countries.php:101 +msgid "Guinea-Bissau" +msgstr "" + +#: i18n/countries.php:102 +msgid "Guyana" +msgstr "" + +#: i18n/countries.php:103 +msgid "Haiti" +msgstr "" + +#: i18n/countries.php:104 +msgid "Heard and McDonald Islands" +msgstr "" + +#: i18n/countries.php:105 +msgid "Holy See (City Vatican State)" +msgstr "" + +#: i18n/countries.php:106 +msgid "Honduras" +msgstr "" + +#: i18n/countries.php:107 +msgid "Hong Kong" +msgstr "" + +#: i18n/countries.php:108 +msgid "Hungary" +msgstr "" + +#: i18n/countries.php:109 +msgid "Iceland" +msgstr "" + +#: i18n/countries.php:110 +msgid "India" +msgstr "" + +#: i18n/countries.php:111 +msgid "Indonesia" +msgstr "" + +#: i18n/countries.php:112 +msgid "Iran" +msgstr "" + +#: i18n/countries.php:113 +msgid "Iraq" +msgstr "" + +#: i18n/countries.php:114 +msgid "Ireland" +msgstr "" + +#: i18n/countries.php:115 +msgid "Isle of Man" +msgstr "" + +#: i18n/countries.php:116 +msgid "Israel" +msgstr "" + +#: i18n/countries.php:117 +msgid "Italy" +msgstr "" + +#: i18n/countries.php:118 +msgid "Jamaica" +msgstr "" + +#: i18n/countries.php:119 +msgid "Japan" +msgstr "" + +#: i18n/countries.php:120 +msgid "Jersey" +msgstr "" + +#: i18n/countries.php:121 +msgid "Jordan" +msgstr "" + +#: i18n/countries.php:122 +msgid "Kazakhstan" +msgstr "" + +#: i18n/countries.php:123 +msgid "Kenya" +msgstr "" + +#: i18n/countries.php:124 +msgid "Kiribati" +msgstr "" + +#: i18n/countries.php:125 +msgid "Kuwait" +msgstr "" + +#: i18n/countries.php:126 +msgid "Kyrgyzstan" +msgstr "" + +#: i18n/countries.php:127 +msgid "Lao People's Democratic Republic" +msgstr "" + +#: i18n/countries.php:128 +msgid "Latvia" +msgstr "" + +#: i18n/countries.php:129 +msgid "Lebanon" +msgstr "" + +#: i18n/countries.php:130 +msgid "Lesotho" +msgstr "" + +#: i18n/countries.php:131 +msgid "Liberia" +msgstr "" + +#: i18n/countries.php:132 +msgid "Libyan Arab Jamahiriya" +msgstr "" + +#: i18n/countries.php:133 +msgid "Liechtenstein" +msgstr "" + +#: i18n/countries.php:134 +msgid "Lithuania" +msgstr "" + +#: i18n/countries.php:135 +msgid "Luxembourg" +msgstr "" + +#: i18n/countries.php:136 +msgid "Macau" +msgstr "" + +#: i18n/countries.php:137 +msgid "Macedonia" +msgstr "" + +#: i18n/countries.php:138 +msgid "Madagascar" +msgstr "" + +#: i18n/countries.php:139 +msgid "Malawi" +msgstr "" + +#: i18n/countries.php:140 +msgid "Malaysia" +msgstr "" + +#: i18n/countries.php:141 +msgid "Maldives" +msgstr "" + +#: i18n/countries.php:142 +msgid "Mali" +msgstr "" + +#: i18n/countries.php:143 +msgid "Malta" +msgstr "" + +#: i18n/countries.php:144 +#: i18n/states-us.php:63 +msgid "Marshall Islands" +msgstr "" + +#: i18n/countries.php:145 +msgid "Martinique" +msgstr "" + +#: i18n/countries.php:146 +msgid "Mauritania" +msgstr "" + +#: i18n/countries.php:147 +msgid "Mauritius" +msgstr "" + +#: i18n/countries.php:148 +msgid "Mayotte" +msgstr "" + +#: i18n/countries.php:149 +msgid "Mexico" +msgstr "" + +#: i18n/countries.php:150 +msgid "Micronesia" +msgstr "" + +#: i18n/countries.php:151 +msgid "Moldova, Republic of" +msgstr "" + +#: i18n/countries.php:152 +msgid "Monaco" +msgstr "" + +#: i18n/countries.php:153 +msgid "Mongolia" +msgstr "" + +#: i18n/countries.php:154 +msgid "Montenegro" +msgstr "" + +#: i18n/countries.php:155 +msgid "Montserrat" +msgstr "" + +#: i18n/countries.php:156 +msgid "Morocco" +msgstr "" + +#: i18n/countries.php:157 +msgid "Mozambique" +msgstr "" + +#: i18n/countries.php:158 +msgid "Myanmar" +msgstr "" + +#: i18n/countries.php:159 +msgid "Namibia" +msgstr "" + +#: i18n/countries.php:160 +msgid "Nauru" +msgstr "" + +#: i18n/countries.php:161 +msgid "Nepal" +msgstr "" + +#: i18n/countries.php:162 +msgid "Netherlands" +msgstr "" + +#: i18n/countries.php:163 +msgid "Netherlands Antilles" +msgstr "" + +#: i18n/countries.php:164 +msgid "New Caledonia" +msgstr "" + +#: i18n/countries.php:165 +msgid "New Zealand" +msgstr "" + +#: i18n/countries.php:166 +msgid "Nicaragua" +msgstr "" + +#: i18n/countries.php:167 +msgid "Niger" +msgstr "" + +#: i18n/countries.php:168 +msgid "Nigeria" +msgstr "" + +#: i18n/countries.php:169 +msgid "Niue" +msgstr "" + +#: i18n/countries.php:170 +msgid "Norfolk Island" +msgstr "" + +#: i18n/countries.php:171 +msgid "North Korea" +msgstr "" + +#: i18n/countries.php:172 +#: i18n/states-us.php:64 +msgid "Northern Mariana Islands" +msgstr "" + +#: i18n/countries.php:173 +msgid "Norway" +msgstr "" + +#: i18n/countries.php:174 +msgid "Oman" +msgstr "" + +#: i18n/countries.php:175 +msgid "Pakistan" +msgstr "" + +#: i18n/countries.php:176 +#: i18n/states-us.php:65 +msgid "Palau" +msgstr "" + +#: i18n/countries.php:177 +msgid "Palestinian Territories" +msgstr "" + +#: i18n/countries.php:178 +msgid "Panama" +msgstr "" + +#: i18n/countries.php:179 +msgid "Papua New Guinea" +msgstr "" + +#: i18n/countries.php:180 +msgid "Paraguay" +msgstr "" + +#: i18n/countries.php:181 +msgid "Peru" +msgstr "" + +#: i18n/countries.php:182 +msgid "Philippines" +msgstr "" + +#: i18n/countries.php:183 +msgid "Pitcairn Island" +msgstr "" + +#: i18n/countries.php:184 +msgid "Poland" +msgstr "" + +#: i18n/countries.php:185 +msgid "Portugal" +msgstr "" + +#: i18n/countries.php:186 +#: i18n/states-us.php:67 +msgid "Puerto Rico" +msgstr "" + +#: i18n/countries.php:187 +msgid "Qatar" +msgstr "" + +#: i18n/countries.php:188 +msgid "Republic of Kosovo" +msgstr "" + +#: i18n/countries.php:189 +msgid "Reunion Island" +msgstr "" + +#: i18n/countries.php:190 +msgid "Romania" +msgstr "" + +#: i18n/countries.php:191 +msgid "Russian Federation" +msgstr "" + +#: i18n/countries.php:192 +msgid "Rwanda" +msgstr "" + +#: i18n/countries.php:193 +msgid "Saint Barthélemy" +msgstr "" + +#: i18n/countries.php:194 +msgid "Saint Helena" +msgstr "" + +#: i18n/countries.php:195 +msgid "Saint Kitts and Nevis" +msgstr "" + +#: i18n/countries.php:196 +msgid "Saint Lucia" +msgstr "" + +#: i18n/countries.php:197 +msgid "Saint Martin (French)" +msgstr "" + +#: i18n/countries.php:198 +msgid "Saint Martin (Dutch)" +msgstr "" + +#: i18n/countries.php:199 +msgid "Saint Pierre and Miquelon" +msgstr "" + +#: i18n/countries.php:200 +msgid "Saint Vincent and the Grenadines" +msgstr "" + +#: i18n/countries.php:201 +msgid "San Marino" +msgstr "" + +#: i18n/countries.php:202 +msgid "São Tomé and Príncipe" +msgstr "" + +#: i18n/countries.php:203 +msgid "Saudi Arabia" +msgstr "" + +#: i18n/countries.php:204 +msgid "Senegal" +msgstr "" + +#: i18n/countries.php:205 +msgid "Serbia" +msgstr "" + +#: i18n/countries.php:206 +msgid "Seychelles" +msgstr "" + +#: i18n/countries.php:207 +msgid "Sierra Leone" +msgstr "" + +#: i18n/countries.php:208 +msgid "Singapore" +msgstr "" + +#: i18n/countries.php:209 +msgid "Slovak Republic" +msgstr "" + +#: i18n/countries.php:210 +msgid "Slovenia" +msgstr "" + +#: i18n/countries.php:211 +msgid "Solomon Islands" +msgstr "" + +#: i18n/countries.php:212 +msgid "Somalia" +msgstr "" + +#: i18n/countries.php:213 +msgid "South Africa" +msgstr "" + +#: i18n/countries.php:214 +msgid "South Georgia" +msgstr "" + +#: i18n/countries.php:215 +msgid "South Korea" +msgstr "" + +#: i18n/countries.php:216 +msgid "South Sudan" +msgstr "" + +#: i18n/countries.php:217 +msgid "Spain" +msgstr "" + +#: i18n/countries.php:218 +msgid "Sri Lanka" +msgstr "" + +#: i18n/countries.php:219 +msgid "Sudan" +msgstr "" + +#: i18n/countries.php:220 +msgid "Suriname" +msgstr "" + +#: i18n/countries.php:221 +msgid "Svalbard and Jan Mayen Islands" +msgstr "" + +#: i18n/countries.php:222 +msgid "Swaziland" +msgstr "" + +#: i18n/countries.php:223 +msgid "Sweden" +msgstr "" + +#: i18n/countries.php:224 +msgid "Switzerland" +msgstr "" + +#: i18n/countries.php:225 +msgid "Syrian Arab Republic" +msgstr "" + +#: i18n/countries.php:226 +msgid "Taiwan" +msgstr "" + +#: i18n/countries.php:227 +msgid "Tajikistan" +msgstr "" + +#: i18n/countries.php:228 +msgid "Tanzania" +msgstr "" + +#: i18n/countries.php:229 +msgid "Thailand" +msgstr "" + +#: i18n/countries.php:230 +msgid "Timor-Leste" +msgstr "" + +#: i18n/countries.php:231 +msgid "Togo" +msgstr "" + +#: i18n/countries.php:232 +msgid "Tokelau" +msgstr "" + +#: i18n/countries.php:233 +msgid "Tonga" +msgstr "" + +#: i18n/countries.php:234 +msgid "Trinidad and Tobago" +msgstr "" + +#: i18n/countries.php:235 +msgid "Tunisia" +msgstr "" + +#: i18n/countries.php:236 +msgid "Turkey" +msgstr "" + +#: i18n/countries.php:237 +msgid "Turkmenistan" +msgstr "" + +#: i18n/countries.php:238 +msgid "Turks and Caicos Islands" +msgstr "" + +#: i18n/countries.php:239 +msgid "Tuvalu" +msgstr "" + +#: i18n/countries.php:240 +msgid "Uganda" +msgstr "" + +#: i18n/countries.php:241 +msgid "Ukraine" +msgstr "" + +#: i18n/countries.php:242 +msgid "United Arab Emirates" +msgstr "" + +#: i18n/countries.php:243 +msgid "United Kingdom" +msgstr "" + +#: i18n/countries.php:244 +msgid "United States" +msgstr "" + +#: i18n/countries.php:245 +msgid "Uruguay" +msgstr "" + +#: i18n/countries.php:246 +msgid "US Minor Outlying Islands" +msgstr "" + +#: i18n/countries.php:247 +msgid "Uzbekistan" +msgstr "" + +#: i18n/countries.php:248 +msgid "Vanuatu" +msgstr "" + +#: i18n/countries.php:249 +msgid "Venezuela" +msgstr "" + +#: i18n/countries.php:250 +msgid "Vietnam" +msgstr "" + +#: i18n/countries.php:251 +msgid "Virgin Islands (British)" +msgstr "" + +#: i18n/countries.php:252 +msgid "Virgin Islands (USA)" +msgstr "" + +#: i18n/countries.php:253 +msgid "Wallis and Futuna Islands" +msgstr "" + +#: i18n/countries.php:254 +msgid "Western Sahara" +msgstr "" + +#: i18n/countries.php:255 +msgid "Western Samoa" +msgstr "" + +#: i18n/countries.php:256 +msgid "Yemen" +msgstr "" + +#: i18n/countries.php:257 +msgid "Zambia" +msgstr "" + +#: i18n/countries.php:258 +msgid "Zimbabwe" +msgstr "" + +#: i18n/states-bd.php:7 +msgid "Bagerhat" +msgstr "" + +#: i18n/states-bd.php:8 +msgid "Bandarban" +msgstr "" + +#: i18n/states-bd.php:9 +msgid "Barguna" +msgstr "" + +#: i18n/states-bd.php:10 +msgid "Barisal" +msgstr "" + +#: i18n/states-bd.php:11 +msgid "Bhola" +msgstr "" + +#: i18n/states-bd.php:12 +msgid "Bogra" +msgstr "" + +#: i18n/states-bd.php:13 +msgid "Brahmanbaria" +msgstr "" + +#: i18n/states-bd.php:14 +msgid "Chandpur" +msgstr "" + +#: i18n/states-bd.php:15 +msgid "Chittagong" +msgstr "" + +#: i18n/states-bd.php:16 +msgid "Chuadanga" +msgstr "" + +#: i18n/states-bd.php:17 +msgid "Comilla" +msgstr "" + +#: i18n/states-bd.php:18 +msgid "Cox's Bazar" +msgstr "" + +#: i18n/states-bd.php:19 +msgid "Dhaka" +msgstr "" + +#: i18n/states-bd.php:20 +msgid "Dinajpur" +msgstr "" + +#: i18n/states-bd.php:21 +msgid "Faridpur" +msgstr "" + +#: i18n/states-bd.php:22 +msgid "Feni" +msgstr "" + +#: i18n/states-bd.php:23 +msgid "Gaibandha" +msgstr "" + +#: i18n/states-bd.php:24 +msgid "Gazipur" +msgstr "" + +#: i18n/states-bd.php:25 +msgid "Gopalganj" +msgstr "" + +#: i18n/states-bd.php:26 +msgid "Habiganj" +msgstr "" + +#: i18n/states-bd.php:27 +msgid "Jamalpur" +msgstr "" + +#: i18n/states-bd.php:28 +msgid "Jessore" +msgstr "" + +#: i18n/states-bd.php:29 +msgid "Jhalokati" +msgstr "" + +#: i18n/states-bd.php:30 +msgid "Jhenaidah" +msgstr "" + +#: i18n/states-bd.php:31 +msgid "Joypurhat" +msgstr "" + +#: i18n/states-bd.php:32 +msgid "Khagrachhari" +msgstr "" + +#: i18n/states-bd.php:33 +msgid "Khulna" +msgstr "" + +#: i18n/states-bd.php:34 +msgid "Kishoreganj" +msgstr "" + +#: i18n/states-bd.php:35 +msgid "Kurigram" +msgstr "" + +#: i18n/states-bd.php:36 +msgid "Kushtia" +msgstr "" + +#: i18n/states-bd.php:37 +msgid "Lakshmipur" +msgstr "" + +#: i18n/states-bd.php:38 +msgid "Lalmonirhat" +msgstr "" + +#: i18n/states-bd.php:39 +msgid "Madaripur" +msgstr "" + +#: i18n/states-bd.php:40 +msgid "Magura" +msgstr "" + +#: i18n/states-bd.php:41 +msgid "Manikganj" +msgstr "" + +#: i18n/states-bd.php:42 +msgid "Meherpur" +msgstr "" + +#: i18n/states-bd.php:43 +msgid "Moulvibazar" +msgstr "" + +#: i18n/states-bd.php:44 +msgid "Munshiganj" +msgstr "" + +#: i18n/states-bd.php:45 +msgid "Mymensingh" +msgstr "" + +#: i18n/states-bd.php:46 +msgid "Naogaon" +msgstr "" + +#: i18n/states-bd.php:47 +msgid "Narail" +msgstr "" + +#: i18n/states-bd.php:48 +msgid "Narayanganj" +msgstr "" + +#: i18n/states-bd.php:49 +msgid "Narsingdi" +msgstr "" + +#: i18n/states-bd.php:50 +msgid "Natore" +msgstr "" + +#: i18n/states-bd.php:51 +msgid "Nawabganj" +msgstr "" + +#: i18n/states-bd.php:52 +msgid "Netrakona" +msgstr "" + +#: i18n/states-bd.php:53 +msgid "Nilphamari" +msgstr "" + +#: i18n/states-bd.php:54 +msgid "Noakhali" +msgstr "" + +#: i18n/states-bd.php:55 +msgid "Pabna" +msgstr "" + +#: i18n/states-bd.php:56 +msgid "Panchagarh" +msgstr "" + +#: i18n/states-bd.php:57 +msgid "Patuakhali" +msgstr "" + +#: i18n/states-bd.php:58 +msgid "Pirojpur" +msgstr "" + +#: i18n/states-bd.php:59 +msgid "Rajbari" +msgstr "" + +#: i18n/states-bd.php:60 +msgid "Rajshahi" +msgstr "" + +#: i18n/states-bd.php:61 +msgid "Rangamati" +msgstr "" + +#: i18n/states-bd.php:62 +msgid "Rangpur" +msgstr "" + +#: i18n/states-bd.php:63 +msgid "Satkhira" +msgstr "" + +#: i18n/states-bd.php:64 +msgid "Shariatpur" +msgstr "" + +#: i18n/states-bd.php:65 +msgid "Sherpur" +msgstr "" + +#: i18n/states-bd.php:66 +msgid "Sirajganj" +msgstr "" + +#: i18n/states-bd.php:67 +msgid "Sunamganj" +msgstr "" + +#: i18n/states-bd.php:68 +msgid "Sylhet" +msgstr "" + +#: i18n/states-bd.php:69 +msgid "Tangail" +msgstr "" + +#: i18n/states-bd.php:70 +msgid "Thakurgaon" +msgstr "" + +#: i18n/states-bj.php:14 +msgid "Alibori" +msgstr "" + +#: i18n/states-bj.php:15 +msgid "Atakora" +msgstr "" + +#: i18n/states-bj.php:16 +msgid "Atlantique" +msgstr "" + +#: i18n/states-bj.php:17 +msgid "Borgou" +msgstr "" + +#: i18n/states-bj.php:18 +msgid "Collines" +msgstr "" + +#: i18n/states-bj.php:19 +msgid "Kouffo" +msgstr "" + +#: i18n/states-bj.php:20 +msgid "Donga" +msgstr "" + +#: i18n/states-bj.php:21 +msgid "Littoral" +msgstr "" + +#: i18n/states-bj.php:22 +msgid "Mono" +msgstr "" + +#: i18n/states-bj.php:23 +msgid "Ouémé" +msgstr "" + +#: i18n/states-bj.php:24 +msgid "Plateau" +msgstr "" + +#: i18n/states-bj.php:25 +msgid "Zou" +msgstr "" + +#: i18n/states-es.php:7 +msgid "A Coruña" +msgstr "" + +#: i18n/states-es.php:8 +msgid "Araba" +msgstr "" + +#: i18n/states-es.php:9 +msgid "Albacete" +msgstr "" + +#: i18n/states-es.php:10 +msgid "Alicante" +msgstr "" + +#: i18n/states-es.php:11 +msgid "Almería" +msgstr "" + +#: i18n/states-es.php:12 +msgid "Asturias" +msgstr "" + +#: i18n/states-es.php:13 +msgid "Ávila" +msgstr "" + +#: i18n/states-es.php:14 +msgid "Badajoz" +msgstr "" + +#: i18n/states-es.php:15 +msgid "Baleares" +msgstr "" + +#: i18n/states-es.php:16 +msgid "Barcelona" +msgstr "" + +#: i18n/states-es.php:17 +msgid "Burgos" +msgstr "" + +#: i18n/states-es.php:18 +msgid "Cáceres" +msgstr "" + +#: i18n/states-es.php:19 +msgid "Cádiz" +msgstr "" + +#: i18n/states-es.php:20 +msgid "Cantabria" +msgstr "" + +#: i18n/states-es.php:21 +msgid "Castellón" +msgstr "" + +#: i18n/states-es.php:22 +msgid "Ceuta" +msgstr "" + +#: i18n/states-es.php:23 +msgid "Ciudad Real" +msgstr "" + +#: i18n/states-es.php:24 +msgid "Córdoba" +msgstr "" + +#: i18n/states-es.php:25 +msgid "Cuenca" +msgstr "" + +#: i18n/states-es.php:26 +msgid "Girona" +msgstr "" + +#: i18n/states-es.php:27 +msgid "Granada" +msgstr "" + +#: i18n/states-es.php:28 +msgid "Guadalajara" +msgstr "" + +#: i18n/states-es.php:29 +msgid "Gipuzkoa" +msgstr "" + +#: i18n/states-es.php:30 +msgid "Huelva" +msgstr "" + +#: i18n/states-es.php:31 +msgid "Huesca" +msgstr "" + +#: i18n/states-es.php:32 +msgid "Jaén" +msgstr "" + +#: i18n/states-es.php:33 +msgid "La Rioja" +msgstr "" + +#: i18n/states-es.php:34 +msgid "Las Palmas" +msgstr "" + +#: i18n/states-es.php:35 +msgid "León" +msgstr "" + +#: i18n/states-es.php:36 +msgid "Lleida" +msgstr "" + +#: i18n/states-es.php:37 +msgid "Lugo" +msgstr "" + +#: i18n/states-es.php:38 +msgid "Madrid" +msgstr "" + +#: i18n/states-es.php:39 +msgid "Málaga" +msgstr "" + +#: i18n/states-es.php:40 +msgid "Melilla" +msgstr "" + +#: i18n/states-es.php:41 +msgid "Murcia" +msgstr "" + +#: i18n/states-es.php:42 +msgid "Navarra" +msgstr "" + +#: i18n/states-es.php:43 +msgid "Ourense" +msgstr "" + +#: i18n/states-es.php:44 +msgid "Palencia" +msgstr "" + +#: i18n/states-es.php:45 +msgid "Pontevedra" +msgstr "" + +#: i18n/states-es.php:46 +msgid "Salamanca" +msgstr "" + +#: i18n/states-es.php:47 +msgid "Santa Cruz de Tenerife" +msgstr "" + +#: i18n/states-es.php:48 +msgid "Segovia" +msgstr "" + +#: i18n/states-es.php:49 +msgid "Sevilla" +msgstr "" + +#: i18n/states-es.php:50 +msgid "Soria" +msgstr "" + +#: i18n/states-es.php:51 +msgid "Tarragona" +msgstr "" + +#: i18n/states-es.php:52 +msgid "Teruel" +msgstr "" + +#: i18n/states-es.php:53 +msgid "Toledo" +msgstr "" + +#: i18n/states-es.php:54 +msgid "Valencia" +msgstr "" + +#: i18n/states-es.php:55 +msgid "Valladolid" +msgstr "" + +#: i18n/states-es.php:56 +msgid "Bizkaia" +msgstr "" + +#: i18n/states-es.php:57 +msgid "Zamora" +msgstr "" + +#: i18n/states-es.php:58 +msgid "Zaragoza" +msgstr "" + +#: i18n/states-gb-legacy.php:6 +msgid "Aberdeen City" +msgstr "" + +#: i18n/states-gb-legacy.php:7 +msgid "Antrim and Newtownabbey" +msgstr "" + +#: i18n/states-gb-legacy.php:8 +msgid "Ards and North Down" +msgstr "" + +#: i18n/states-gb-legacy.php:9 +msgid "Argyll and Bute" +msgstr "" + +#: i18n/states-gb-legacy.php:10 +msgid "Armagh, Banbridge and Craigavon" +msgstr "" + +#: i18n/states-gb-legacy.php:11 +msgid "Barking and Dagenham" +msgstr "" + +#: i18n/states-gb-legacy.php:12 +msgid "Barnet" +msgstr "" + +#: i18n/states-gb-legacy.php:13 +msgid "Barnsley" +msgstr "" + +#: i18n/states-gb-legacy.php:14 +msgid "Bath and North East Somerset" +msgstr "" + +#: i18n/states-gb-legacy.php:15 +msgid "Bedford" +msgstr "" + +#: i18n/states-gb-legacy.php:16 +msgid "Belfast" +msgstr "" + +#: i18n/states-gb-legacy.php:17 +msgid "Bexley" +msgstr "" + +#: i18n/states-gb-legacy.php:18 +msgid "Birmingham" +msgstr "" + +#: i18n/states-gb-legacy.php:19 +msgid "Blackburn with Darwen" +msgstr "" + +#: i18n/states-gb-legacy.php:20 +msgid "Blackpool" +msgstr "" + +#: i18n/states-gb-legacy.php:21 +msgid "Bolton" +msgstr "" + +#: i18n/states-gb-legacy.php:22 +msgid "Bournemouth" +msgstr "" + +#: i18n/states-gb-legacy.php:23 +msgid "Bracknell Forest" +msgstr "" + +#: i18n/states-gb-legacy.php:24 +msgid "Bradford" +msgstr "" + +#: i18n/states-gb-legacy.php:25 +msgid "Brent" +msgstr "" + +#: i18n/states-gb-legacy.php:26 +msgid "Brighton and Hove" +msgstr "" + +#: i18n/states-gb-legacy.php:27 +msgid "Bristol, City of" +msgstr "" + +#: i18n/states-gb-legacy.php:28 +msgid "Bromley" +msgstr "" + +#: i18n/states-gb-legacy.php:29 +msgid "Bury" +msgstr "" + +#: i18n/states-gb-legacy.php:30 +msgid "Calderdale" +msgstr "" + +#: i18n/states-gb-legacy.php:31 +msgid "Camden" +msgstr "" + +#: i18n/states-gb-legacy.php:32 +msgid "Causeway Coast and Glens" +msgstr "" + +#: i18n/states-gb-legacy.php:33 +msgid "Central Bedfordshire" +msgstr "" + +#: i18n/states-gb-legacy.php:34 +msgid "Cheshire East" +msgstr "" + +#: i18n/states-gb-legacy.php:35 +msgid "Cheshire West and Chester" +msgstr "" + +#: i18n/states-gb-legacy.php:36 +msgid "Coventry" +msgstr "" + +#: i18n/states-gb-legacy.php:37 +msgid "Croydon" +msgstr "" + +#: i18n/states-gb-legacy.php:38 +msgid "Darlington" +msgstr "" + +#: i18n/states-gb-legacy.php:39 +msgid "Derby" +msgstr "" + +#: i18n/states-gb-legacy.php:40 +msgid "Derry and Strabane" +msgstr "" + +#: i18n/states-gb-legacy.php:41 +msgid "Doncaster" +msgstr "" + +#: i18n/states-gb-legacy.php:42 +msgid "Dudley" +msgstr "" + +#: i18n/states-gb-legacy.php:43 +msgid "Dundee City" +msgstr "" + +#: i18n/states-gb-legacy.php:44 +msgid "Durham, County" +msgstr "" + +#: i18n/states-gb-legacy.php:45 +msgid "Ealing" +msgstr "" + +#: i18n/states-gb-legacy.php:46 +msgid "Edinburgh, City of" +msgstr "" + +#: i18n/states-gb-legacy.php:47 +msgid "Eilean Siar" +msgstr "" + +#: i18n/states-gb-legacy.php:48 +msgid "Enfield" +msgstr "" + +#: i18n/states-gb-legacy.php:49 +msgid "Falkirk" +msgstr "" + +#: i18n/states-gb-legacy.php:50 +msgid "Fermanagh and Omagh" +msgstr "" + +#: i18n/states-gb-legacy.php:51 +msgid "Gateshead" +msgstr "" + +#: i18n/states-gb-legacy.php:52 +msgid "Glasgow City" +msgstr "" + +#: i18n/states-gb-legacy.php:53 +msgid "Greenwich" +msgstr "" + +#: i18n/states-gb-legacy.php:54 +msgid "Hackney" +msgstr "" + +#: i18n/states-gb-legacy.php:55 +msgid "Halton" +msgstr "" + +#: i18n/states-gb-legacy.php:56 +msgid "Hammersmith and Fulham" +msgstr "" + +#: i18n/states-gb-legacy.php:57 +msgid "Haringey" +msgstr "" + +#: i18n/states-gb-legacy.php:58 +msgid "Harrow" +msgstr "" + +#: i18n/states-gb-legacy.php:59 +msgid "Hartlepool" +msgstr "" + +#: i18n/states-gb-legacy.php:60 +msgid "Havering" +msgstr "" + +#: i18n/states-gb-legacy.php:61 +msgid "Hillingdon" +msgstr "" + +#: i18n/states-gb-legacy.php:62 +msgid "Hounslow" +msgstr "" + +#: i18n/states-gb-legacy.php:63 +msgid "Isles of Scilly" +msgstr "" + +#: i18n/states-gb-legacy.php:64 +msgid "Islington" +msgstr "" + +#: i18n/states-gb-legacy.php:65 +msgid "Kensington and Chelsea" +msgstr "" + +#: i18n/states-gb-legacy.php:66 +msgid "Kingston upon Hull" +msgstr "" + +#: i18n/states-gb-legacy.php:67 +msgid "Kingston upon Thames" +msgstr "" + +#: i18n/states-gb-legacy.php:68 +msgid "Kirklees" +msgstr "" + +#: i18n/states-gb-legacy.php:69 +msgid "Knowsley" +msgstr "" + +#: i18n/states-gb-legacy.php:70 +msgid "Lambeth" +msgstr "" + +#: i18n/states-gb-legacy.php:71 +msgid "Leeds" +msgstr "" + +#: i18n/states-gb-legacy.php:72 +msgid "Lewisham" +msgstr "" + +#: i18n/states-gb-legacy.php:73 +msgid "Lisburn and Castlereagh" +msgstr "" + +#: i18n/states-gb-legacy.php:74 +msgid "Liverpool" +msgstr "" + +#: i18n/states-gb-legacy.php:75 +msgid "London, City of" +msgstr "" + +#: i18n/states-gb-legacy.php:76 +msgid "Luton" +msgstr "" + +#: i18n/states-gb-legacy.php:77 +msgid "Manchester" +msgstr "" + +#: i18n/states-gb-legacy.php:78 +msgid "Medway" +msgstr "" + +#: i18n/states-gb-legacy.php:79 +msgid "Merton" +msgstr "" + +#: i18n/states-gb-legacy.php:80 +msgid "Mid and East Antrim" +msgstr "" + +#: i18n/states-gb-legacy.php:81 +msgid "Mid Ulster" +msgstr "" + +#: i18n/states-gb-legacy.php:82 +msgid "Middlesbrough" +msgstr "" + +#: i18n/states-gb-legacy.php:83 +msgid "Milton Keynes" +msgstr "" + +#: i18n/states-gb-legacy.php:84 +msgid "Newcastle upon Tyne" +msgstr "" + +#: i18n/states-gb-legacy.php:85 +msgid "Newham" +msgstr "" + +#: i18n/states-gb-legacy.php:86 +msgid "Newry, Mourne and Down" +msgstr "" + +#: i18n/states-gb-legacy.php:87 +msgid "North East Lincolnshire" +msgstr "" + +#: i18n/states-gb-legacy.php:88 +msgid "North Lincolnshire" +msgstr "" + +#: i18n/states-gb-legacy.php:89 +msgid "North Tyneside" +msgstr "" + +#: i18n/states-gb-legacy.php:90 +msgid "Nottingham" +msgstr "" + +#: i18n/states-gb-legacy.php:91 +msgid "Oldham" +msgstr "" + +#: i18n/states-gb-legacy.php:92 +msgid "Orkney Islands" +msgstr "" + +#: i18n/states-gb-legacy.php:93 +msgid "Peterborough" +msgstr "" + +#: i18n/states-gb-legacy.php:94 +msgid "Plymouth" +msgstr "" + +#: i18n/states-gb-legacy.php:95 +msgid "Poole" +msgstr "" + +#: i18n/states-gb-legacy.php:96 +msgid "Portsmouth" +msgstr "" + +#: i18n/states-gb-legacy.php:97 +msgid "Reading" +msgstr "" + +#: i18n/states-gb-legacy.php:98 +msgid "Redbridge" +msgstr "" + +#: i18n/states-gb-legacy.php:99 +msgid "Redcar and Cleveland" +msgstr "" + +#: i18n/states-gb-legacy.php:100 +msgid "Rhondda, Cynon, Taff" +msgstr "" + +#: i18n/states-gb-legacy.php:101 +msgid "Richmond upon Thames" +msgstr "" + +#: i18n/states-gb-legacy.php:102 +msgid "Rochdale" +msgstr "" + +#: i18n/states-gb-legacy.php:103 +msgid "Rotherham" +msgstr "" + +#: i18n/states-gb-legacy.php:104 +msgid "Salford" +msgstr "" + +#: i18n/states-gb-legacy.php:105 +msgid "Sandwell" +msgstr "" + +#: i18n/states-gb-legacy.php:106 +msgid "Scottish Borders, The" +msgstr "" + +#: i18n/states-gb-legacy.php:107 +msgid "Sefton" +msgstr "" + +#: i18n/states-gb-legacy.php:108 +msgid "Sheffield" +msgstr "" + +#: i18n/states-gb-legacy.php:109 +msgid "Slough" +msgstr "" + +#: i18n/states-gb-legacy.php:110 +msgid "Solihull" +msgstr "" + +#: i18n/states-gb-legacy.php:111 +msgid "South Tyneside" +msgstr "" + +#: i18n/states-gb-legacy.php:112 +msgid "Southampton" +msgstr "" + +#: i18n/states-gb-legacy.php:113 +msgid "Southend-on-Sea" +msgstr "" + +#: i18n/states-gb-legacy.php:114 +msgid "Southwark" +msgstr "" + +#: i18n/states-gb-legacy.php:115 +msgid "St. Helens" +msgstr "" + +#: i18n/states-gb-legacy.php:116 +msgid "Stirling" +msgstr "" + +#: i18n/states-gb-legacy.php:117 +msgid "Stockport" +msgstr "" + +#: i18n/states-gb-legacy.php:118 +msgid "Stockton-on-Tees" +msgstr "" + +#: i18n/states-gb-legacy.php:119 +msgid "Stoke-on-Trent" +msgstr "" + +#: i18n/states-gb-legacy.php:120 +msgid "Sunderland" +msgstr "" + +#: i18n/states-gb-legacy.php:121 +msgid "Sutton" +msgstr "" + +#: i18n/states-gb-legacy.php:122 +msgid "Swindon" +msgstr "" + +#: i18n/states-gb-legacy.php:123 +msgid "Tameside" +msgstr "" + +#: i18n/states-gb-legacy.php:124 +msgid "Telford and Wrekin" +msgstr "" + +#: i18n/states-gb-legacy.php:125 +msgid "Thurrock" +msgstr "" + +#: i18n/states-gb-legacy.php:126 +msgid "Torbay" +msgstr "" + +#: i18n/states-gb-legacy.php:127 +msgid "Tower Hamlets" +msgstr "" + +#: i18n/states-gb-legacy.php:128 +msgid "Trafford" +msgstr "" + +#: i18n/states-gb-legacy.php:129 +msgid "Vale of Glamorgan, The" +msgstr "" + +#: i18n/states-gb-legacy.php:130 +msgid "Wakefield" +msgstr "" + +#: i18n/states-gb-legacy.php:131 +msgid "Walsall" +msgstr "" + +#: i18n/states-gb-legacy.php:132 +msgid "Waltham Forest" +msgstr "" + +#: i18n/states-gb-legacy.php:133 +msgid "Wandsworth" +msgstr "" + +#: i18n/states-gb-legacy.php:134 +msgid "Warrington" +msgstr "" + +#: i18n/states-gb-legacy.php:135 +#: i18n/states-gb.php:105 +msgid "Warwickshire" +msgstr "" + +#: i18n/states-gb-legacy.php:136 +msgid "West Berkshire" +msgstr "" + +#: i18n/states-gb-legacy.php:137 +msgid "Westminster" +msgstr "" + +#: i18n/states-gb-legacy.php:138 +msgid "Wigan" +msgstr "" + +#: i18n/states-gb-legacy.php:139 +msgid "Windsor and Maidenhead" +msgstr "" + +#: i18n/states-gb-legacy.php:140 +msgid "Wirral" +msgstr "" + +#: i18n/states-gb-legacy.php:141 +msgid "Wokingham" +msgstr "" + +#: i18n/states-gb-legacy.php:142 +msgid "Wolverhampton" +msgstr "" + +#: i18n/states-gb-legacy.php:143 +msgid "York" +msgstr "" + +#: i18n/states-gb.php:7 +msgid "Aberdeenshire" +msgstr "" + +#: i18n/states-gb.php:8 +msgid "Angus" +msgstr "" + +#: i18n/states-gb.php:9 +msgid "Antrim" +msgstr "" + +#: i18n/states-gb.php:10 +msgid "Argyll" +msgstr "" + +#: i18n/states-gb.php:11 +msgid "Armagh" +msgstr "" + +#: i18n/states-gb.php:12 +msgid "Banffshire" +msgstr "" + +#: i18n/states-gb.php:13 +msgid "Bedfordshire" +msgstr "" + +#: i18n/states-gb.php:14 +msgid "Berkshire" +msgstr "" + +#: i18n/states-gb.php:15 +msgid "Berwickshire" +msgstr "" + +#: i18n/states-gb.php:16 +msgid "Blaenau Gwent" +msgstr "" + +#: i18n/states-gb.php:17 +msgid "Bridgend" +msgstr "" + +#: i18n/states-gb.php:18 +msgid "Bristol" +msgstr "" + +#: i18n/states-gb.php:19 +msgid "Buckinghamshire" +msgstr "" + +#: i18n/states-gb.php:20 +msgid "Caerphilly" +msgstr "" + +#: i18n/states-gb.php:21 +msgid "Caithness" +msgstr "" + +#: i18n/states-gb.php:22 +msgid "Cambridgeshire" +msgstr "" + +#: i18n/states-gb.php:23 +msgid "Cardiff" +msgstr "" + +#: i18n/states-gb.php:24 +msgid "Carmarthenshire" +msgstr "" + +#: i18n/states-gb.php:25 +msgid "Ceredigion" +msgstr "" + +#: i18n/states-gb.php:26 +msgid "Cheshire" +msgstr "" + +#: i18n/states-gb.php:27 +msgid "Clackmannanshire" +msgstr "" + +#: i18n/states-gb.php:28 +msgid "Conwy" +msgstr "" + +#: i18n/states-gb.php:29 +msgid "Cornwall" +msgstr "" + +#: i18n/states-gb.php:30 +msgid "County Down" +msgstr "" + +#: i18n/states-gb.php:31 +msgid "County Durham" +msgstr "" + +#: i18n/states-gb.php:32 +msgid "Cumbria" +msgstr "" + +#: i18n/states-gb.php:33 +msgid "Denbighshire" +msgstr "" + +#: i18n/states-gb.php:34 +msgid "Derbyshire" +msgstr "" + +#: i18n/states-gb.php:35 +msgid "Devon" +msgstr "" + +#: i18n/states-gb.php:36 +msgid "Dorset" +msgstr "" + +#: i18n/states-gb.php:37 +msgid "Dumfries and Galloway" +msgstr "" + +#: i18n/states-gb.php:38 +msgid "East Ayrshire" +msgstr "" + +#: i18n/states-gb.php:39 +msgid "East Dunbartonshire" +msgstr "" + +#: i18n/states-gb.php:40 +msgid "East Lothian" +msgstr "" + +#: i18n/states-gb.php:41 +msgid "East Renfrewshire" +msgstr "" + +#: i18n/states-gb.php:42 +msgid "East Riding of Yorkshire" +msgstr "" + +#: i18n/states-gb.php:43 +msgid "East Sussex" +msgstr "" + +#: i18n/states-gb.php:44 +msgid "Essex" +msgstr "" + +#: i18n/states-gb.php:45 +msgid "Fermanagh" +msgstr "" + +#: i18n/states-gb.php:46 +msgid "Fife" +msgstr "" + +#: i18n/states-gb.php:47 +msgid "Flintshire" +msgstr "" + +#: i18n/states-gb.php:48 +msgid "Gloucestershire" +msgstr "" + +#: i18n/states-gb.php:49 +msgid "Greater London" +msgstr "" + +#: i18n/states-gb.php:50 +msgid "Greater Manchester" +msgstr "" + +#: i18n/states-gb.php:51 +msgid "Gwynedd" +msgstr "" + +#: i18n/states-gb.php:52 +msgid "Hampshire" +msgstr "" + +#: i18n/states-gb.php:53 +msgid "Herefordshire" +msgstr "" + +#: i18n/states-gb.php:54 +msgid "Hertfordshire" +msgstr "" + +#: i18n/states-gb.php:55 +msgid "Highland" +msgstr "" + +#: i18n/states-gb.php:56 +msgid "Inverclyde" +msgstr "" + +#: i18n/states-gb.php:57 +msgid "Isle of Anglesey" +msgstr "" + +#: i18n/states-gb.php:58 +msgid "Isle of Wight" +msgstr "" + +#: i18n/states-gb.php:59 +msgid "Kent" +msgstr "" + +#: i18n/states-gb.php:60 +msgid "Kincardineshire" +msgstr "" + +#: i18n/states-gb.php:61 +msgid "Lancashire" +msgstr "" + +#: i18n/states-gb.php:62 +msgid "Leicestershire" +msgstr "" + +#: i18n/states-gb.php:63 +msgid "Lincolnshire" +msgstr "" + +#: i18n/states-gb.php:64 +msgid "Londonderry" +msgstr "" + +#: i18n/states-gb.php:65 +msgid "Merseyside" +msgstr "" + +#: i18n/states-gb.php:66 +msgid "Merthyr Tydfil" +msgstr "" + +#: i18n/states-gb.php:67 +msgid "Midlothian" +msgstr "" + +#: i18n/states-gb.php:68 +msgid "Monmouthshire" +msgstr "" + +#: i18n/states-gb.php:69 +msgid "Moray" +msgstr "" + +#: i18n/states-gb.php:70 +msgid "Neath Port Talbot" +msgstr "" + +#: i18n/states-gb.php:71 +msgid "Newport" +msgstr "" + +#: i18n/states-gb.php:72 +msgid "Norfolk" +msgstr "" + +#: i18n/states-gb.php:73 +msgid "North Ayrshire" +msgstr "" + +#: i18n/states-gb.php:74 +msgid "North Lanarkshire" +msgstr "" + +#: i18n/states-gb.php:75 +msgid "North Somerset" +msgstr "" + +#: i18n/states-gb.php:76 +msgid "North Yorkshire" +msgstr "" + +#: i18n/states-gb.php:77 +msgid "Northamptonshire" +msgstr "" + +#: i18n/states-gb.php:78 +msgid "Northumberland" +msgstr "" + +#: i18n/states-gb.php:79 +msgid "Nottinghamshire" +msgstr "" + +#: i18n/states-gb.php:80 +msgid "Orkney" +msgstr "" + +#: i18n/states-gb.php:81 +msgid "Oxfordshire" +msgstr "" + +#: i18n/states-gb.php:82 +msgid "Pembrokeshire" +msgstr "" + +#: i18n/states-gb.php:83 +msgid "Perth and Kinross" +msgstr "" + +#: i18n/states-gb.php:84 +msgid "Powys" +msgstr "" + +#: i18n/states-gb.php:85 +msgid "Renfrewshire" +msgstr "" + +#: i18n/states-gb.php:86 +msgid "Rhondda Cynon Taff" +msgstr "" + +#: i18n/states-gb.php:87 +msgid "Rutland" +msgstr "" + +#: i18n/states-gb.php:88 +msgid "Scottish Borders" +msgstr "" + +#: i18n/states-gb.php:89 +msgid "Shetland Islands" +msgstr "" + +#: i18n/states-gb.php:90 +msgid "Shropshire" +msgstr "" + +#: i18n/states-gb.php:91 +msgid "Somerset" +msgstr "" + +#: i18n/states-gb.php:92 +msgid "South Ayrshire" +msgstr "" + +#: i18n/states-gb.php:93 +msgid "South Gloucestershire" +msgstr "" + +#: i18n/states-gb.php:94 +msgid "South Lanarkshire" +msgstr "" + +#: i18n/states-gb.php:95 +msgid "South Yorkshire" +msgstr "" + +#: i18n/states-gb.php:96 +msgid "Staffordshire" +msgstr "" + +#: i18n/states-gb.php:97 +msgid "Stirlingshire" +msgstr "" + +#: i18n/states-gb.php:98 +msgid "Suffolk" +msgstr "" + +#: i18n/states-gb.php:99 +msgid "Surrey" +msgstr "" + +#: i18n/states-gb.php:100 +msgid "Swansea" +msgstr "" + +#: i18n/states-gb.php:101 +msgid "Torfaen" +msgstr "" + +#: i18n/states-gb.php:102 +msgid "Tyne & Wear" +msgstr "" + +#: i18n/states-gb.php:103 +msgid "Tyrone" +msgstr "" + +#: i18n/states-gb.php:104 +msgid "Vale of Glamorgan" +msgstr "" + +#: i18n/states-gb.php:106 +msgid "West Dunbartonshire" +msgstr "" + +#: i18n/states-gb.php:107 +msgid "West Lothian" +msgstr "" + +#: i18n/states-gb.php:108 +msgid "West Midlands" +msgstr "" + +#: i18n/states-gb.php:109 +msgid "West Sussex" +msgstr "" + +#: i18n/states-gb.php:110 +msgid "West Yorkshire" +msgstr "" + +#: i18n/states-gb.php:111 +msgid "Western Isles" +msgstr "" + +#: i18n/states-gb.php:112 +msgid "Wiltshire" +msgstr "" + +#: i18n/states-gb.php:113 +msgid "Worcestershire" +msgstr "" + +#: i18n/states-gb.php:114 +msgid "Wrexham" +msgstr "" + +#: i18n/states-in.php:7 +msgid "Andhra Pradesh" +msgstr "" + +#: i18n/states-in.php:8 +msgid "Arunachal Pradesh" +msgstr "" + +#: i18n/states-in.php:9 +msgid "Assam" +msgstr "" + +#: i18n/states-in.php:10 +msgid "Bihar" +msgstr "" + +#: i18n/states-in.php:11 +msgid "Chhattisgarh" +msgstr "" + +#: i18n/states-in.php:12 +msgid "Goa" +msgstr "" + +#: i18n/states-in.php:13 +msgid "Gujarat" +msgstr "" + +#: i18n/states-in.php:14 +msgid "Haryana" +msgstr "" + +#: i18n/states-in.php:15 +msgid "Himachal Pradesh" +msgstr "" + +#: i18n/states-in.php:16 +msgid "Jammu and Kashmir" +msgstr "" + +#: i18n/states-in.php:17 +msgid "Jharkhand" +msgstr "" + +#: i18n/states-in.php:18 +msgid "Karnataka" +msgstr "" + +#: i18n/states-in.php:19 +msgid "Kerala" +msgstr "" + +#: i18n/states-in.php:20 +msgid "Madhya Pradesh" +msgstr "" + +#: i18n/states-in.php:21 +msgid "Maharashtra" +msgstr "" + +#: i18n/states-in.php:22 +msgid "Manipur" +msgstr "" + +#: i18n/states-in.php:23 +msgid "Meghalaya" +msgstr "" + +#: i18n/states-in.php:24 +msgid "Mizoram" +msgstr "" + +#: i18n/states-in.php:25 +msgid "Nagaland" +msgstr "" + +#: i18n/states-in.php:26 +msgid "Orissa" +msgstr "" + +#: i18n/states-in.php:27 +msgid "Punjab" +msgstr "" + +#: i18n/states-in.php:28 +msgid "Rajasthan" +msgstr "" + +#: i18n/states-in.php:29 +msgid "Sikkim" +msgstr "" + +#: i18n/states-in.php:30 +msgid "Tamil Nadu" +msgstr "" + +#: i18n/states-in.php:31 +msgid "Telangana" +msgstr "" + +#: i18n/states-in.php:32 +msgid "Tripura" +msgstr "" + +#: i18n/states-in.php:33 +msgid "Uttarakhand" +msgstr "" + +#: i18n/states-in.php:34 +msgid "Uttar Pradesh" +msgstr "" + +#: i18n/states-in.php:35 +msgid "West Bengal" +msgstr "" + +#: i18n/states-in.php:36 +msgid "Andaman and Nicobar Islands" +msgstr "" + +#: i18n/states-in.php:37 +msgid "Chandigarh" +msgstr "" + +#: i18n/states-in.php:38 +msgid "Dadra and Nagar Haveli" +msgstr "" + +#: i18n/states-in.php:39 +msgid "Daman and Diu" +msgstr "" + +#: i18n/states-in.php:40 +msgid "Delhi" +msgstr "" + +#: i18n/states-in.php:41 +msgid "Lakshadweep" +msgstr "" + +#: i18n/states-in.php:42 +msgid "Pondicherry (Puducherry)" +msgstr "" + +#: i18n/states-it.php:7 +msgid "Agrigento" +msgstr "" + +#: i18n/states-it.php:8 +msgid "Alessandria" +msgstr "" + +#: i18n/states-it.php:9 +msgid "Ancona" +msgstr "" + +#: i18n/states-it.php:10 +msgid "Aosta" +msgstr "" + +#: i18n/states-it.php:11 +msgid "Arezzo" +msgstr "" + +#: i18n/states-it.php:12 +msgid "Ascoli Piceno" +msgstr "" + +#: i18n/states-it.php:13 +msgid "Asti" +msgstr "" + +#: i18n/states-it.php:14 +msgid "Avellino" +msgstr "" + +#: i18n/states-it.php:15 +msgid "Bari" +msgstr "" + +#: i18n/states-it.php:16 +msgid "Barletta-Andria-Trani" +msgstr "" + +#: i18n/states-it.php:17 +msgid "Belluno" +msgstr "" + +#: i18n/states-it.php:18 +msgid "Benevento" +msgstr "" + +#: i18n/states-it.php:19 +msgid "Bergamo" +msgstr "" + +#: i18n/states-it.php:20 +msgid "Biella" +msgstr "" + +#: i18n/states-it.php:21 +msgid "Bologna" +msgstr "" + +#: i18n/states-it.php:22 +msgid "Bolzano" +msgstr "" + +#: i18n/states-it.php:23 +msgid "Brescia" +msgstr "" + +#: i18n/states-it.php:24 +msgid "Brindisi" +msgstr "" + +#: i18n/states-it.php:25 +msgid "Cagliari" +msgstr "" + +#: i18n/states-it.php:26 +msgid "Caltanissetta" +msgstr "" + +#: i18n/states-it.php:27 +msgid "Campobasso" +msgstr "" + +#: i18n/states-it.php:28 +msgid "Caserta" +msgstr "" + +#: i18n/states-it.php:29 +msgid "Catania" +msgstr "" + +#: i18n/states-it.php:30 +msgid "Catanzaro" +msgstr "" + +#: i18n/states-it.php:31 +msgid "Chieti" +msgstr "" + +#: i18n/states-it.php:32 +msgid "Como" +msgstr "" + +#: i18n/states-it.php:33 +msgid "Cosenza" +msgstr "" + +#: i18n/states-it.php:34 +msgid "Cremona" +msgstr "" + +#: i18n/states-it.php:35 +msgid "Crotone" +msgstr "" + +#: i18n/states-it.php:36 +msgid "Cuneo" +msgstr "" + +#: i18n/states-it.php:37 +msgid "Enna" +msgstr "" + +#: i18n/states-it.php:38 +msgid "Fermo" +msgstr "" + +#: i18n/states-it.php:39 +msgid "Ferrara" +msgstr "" + +#: i18n/states-it.php:40 +msgid "Firenze" +msgstr "" + +#: i18n/states-it.php:41 +msgid "Foggia" +msgstr "" + +#: i18n/states-it.php:42 +msgid "Forli-Cesena" +msgstr "" + +#: i18n/states-it.php:43 +msgid "Frosinone" +msgstr "" + +#: i18n/states-it.php:44 +msgid "Genoa" +msgstr "" + +#: i18n/states-it.php:45 +msgid "Gorizia" +msgstr "" + +#: i18n/states-it.php:46 +msgid "Grosseto" +msgstr "" + +#: i18n/states-it.php:47 +msgid "Imperia" +msgstr "" + +#: i18n/states-it.php:48 +msgid "Isernia" +msgstr "" + +#: i18n/states-it.php:49 +msgid "La Spezia" +msgstr "" + +#: i18n/states-it.php:50 +msgid "L'Aquila" +msgstr "" + +#: i18n/states-it.php:51 +msgid "Latina" +msgstr "" + +#: i18n/states-it.php:52 +msgid "Lecce" +msgstr "" + +#: i18n/states-it.php:53 +msgid "Lecco" +msgstr "" + +#: i18n/states-it.php:54 +msgid "Livorno" +msgstr "" + +#: i18n/states-it.php:55 +msgid "Lodi" +msgstr "" + +#: i18n/states-it.php:56 +msgid "Lucca" +msgstr "" + +#: i18n/states-it.php:57 +msgid "Macerata" +msgstr "" + +#: i18n/states-it.php:58 +msgid "Mantova" +msgstr "" + +#: i18n/states-it.php:59 +msgid "Massa-Carrara" +msgstr "" + +#: i18n/states-it.php:60 +msgid "Matera" +msgstr "" + +#: i18n/states-it.php:61 +msgid "Messina" +msgstr "" + +#: i18n/states-it.php:62 +msgid "Milano" +msgstr "" + +#: i18n/states-it.php:63 +msgid "Modena" +msgstr "" + +#: i18n/states-it.php:64 +msgid "Monza e della Brianza" +msgstr "" + +#: i18n/states-it.php:65 +msgid "Napoli" +msgstr "" + +#: i18n/states-it.php:66 +msgid "Novara" +msgstr "" + +#: i18n/states-it.php:67 +msgid "Nuoro" +msgstr "" + +#: i18n/states-it.php:68 +msgid "Olbia-Tempio" +msgstr "" + +#: i18n/states-it.php:69 +msgid "Oristano" +msgstr "" + +#: i18n/states-it.php:70 +msgid "Padova" +msgstr "" + +#: i18n/states-it.php:71 +msgid "Palermo" +msgstr "" + +#: i18n/states-it.php:72 +msgid "Parma" +msgstr "" + +#: i18n/states-it.php:73 +msgid "Pavia" +msgstr "" + +#: i18n/states-it.php:74 +msgid "Perugia" +msgstr "" + +#: i18n/states-it.php:75 +msgid "Pesaro e Urbino" +msgstr "" + +#: i18n/states-it.php:76 +msgid "Pescara" +msgstr "" + +#: i18n/states-it.php:77 +msgid "Piacenza" +msgstr "" + +#: i18n/states-it.php:78 +msgid "Pisa" +msgstr "" + +#: i18n/states-it.php:79 +msgid "Pistoia" +msgstr "" + +#: i18n/states-it.php:80 +msgid "Pordenone" +msgstr "" + +#: i18n/states-it.php:81 +msgid "Potenza" +msgstr "" + +#: i18n/states-it.php:82 +msgid "Prato" +msgstr "" + +#: i18n/states-it.php:83 +msgid "Ragusa" +msgstr "" + +#: i18n/states-it.php:84 +msgid "Ravenna" +msgstr "" + +#: i18n/states-it.php:85 +msgid "Reggio Calabria" +msgstr "" + +#: i18n/states-it.php:86 +msgid "Reggio Emilia" +msgstr "" + +#: i18n/states-it.php:87 +msgid "Rieti" +msgstr "" + +#: i18n/states-it.php:88 +msgid "Rimini" +msgstr "" + +#: i18n/states-it.php:89 +msgid "Roma" +msgstr "" + +#: i18n/states-it.php:90 +msgid "Rovigo" +msgstr "" + +#: i18n/states-it.php:91 +msgid "Salerno" +msgstr "" + +#: i18n/states-it.php:92 +msgid "Medio Campidano" +msgstr "" + +#: i18n/states-it.php:93 +msgid "Sassari" +msgstr "" + +#: i18n/states-it.php:94 +msgid "Savona" +msgstr "" + +#: i18n/states-it.php:95 +msgid "Siena" +msgstr "" + +#: i18n/states-it.php:96 +msgid "Siracusa" +msgstr "" + +#: i18n/states-it.php:97 +msgid "Sondrio" +msgstr "" + +#: i18n/states-it.php:98 +msgid "Taranto" +msgstr "" + +#: i18n/states-it.php:99 +msgid "Teramo" +msgstr "" + +#: i18n/states-it.php:100 +msgid "Terni" +msgstr "" + +#: i18n/states-it.php:101 +msgid "Torino" +msgstr "" + +#: i18n/states-it.php:102 +msgid "Ogliastra" +msgstr "" + +#: i18n/states-it.php:103 +msgid "Trapani" +msgstr "" + +#: i18n/states-it.php:104 +msgid "Trento" +msgstr "" + +#: i18n/states-it.php:105 +msgid "Treviso" +msgstr "" + +#: i18n/states-it.php:106 +msgid "Trieste" +msgstr "" + +#: i18n/states-it.php:107 +msgid "Udine" +msgstr "" + +#: i18n/states-it.php:108 +msgid "Varesa" +msgstr "" + +#: i18n/states-it.php:109 +msgid "Venezia" +msgstr "" + +#: i18n/states-it.php:110 +msgid "Verbano-Cusio-Ossola" +msgstr "" + +#: i18n/states-it.php:111 +msgid "Vercelli" +msgstr "" + +#: i18n/states-it.php:112 +msgid "Verona" +msgstr "" + +#: i18n/states-it.php:113 +msgid "Vibo Valentia" +msgstr "" + +#: i18n/states-it.php:114 +msgid "Vicenza" +msgstr "" + +#: i18n/states-it.php:115 +msgid "Viterbo" +msgstr "" + +#: i18n/states-jp.php:7 +msgid "Hokkaido" +msgstr "" + +#: i18n/states-jp.php:8 +msgid "Aomori" +msgstr "" + +#: i18n/states-jp.php:9 +msgid "Iwate" +msgstr "" + +#: i18n/states-jp.php:10 +msgid "Miyagi" +msgstr "" + +#: i18n/states-jp.php:11 +msgid "Akita" +msgstr "" + +#: i18n/states-jp.php:12 +msgid "Yamagata" +msgstr "" + +#: i18n/states-jp.php:13 +msgid "Fukushima" +msgstr "" + +#: i18n/states-jp.php:14 +msgid "Ibaraki" +msgstr "" + +#: i18n/states-jp.php:15 +msgid "Tochigi" +msgstr "" + +#: i18n/states-jp.php:16 +msgid "Gunma" +msgstr "" + +#: i18n/states-jp.php:17 +msgid "Saitama" +msgstr "" + +#: i18n/states-jp.php:18 +msgid "Chiba" +msgstr "" + +#: i18n/states-jp.php:19 +msgid "Tokyo" +msgstr "" + +#: i18n/states-jp.php:20 +msgid "Kanagawa" +msgstr "" + +#: i18n/states-jp.php:21 +msgid "Niigata" +msgstr "" + +#: i18n/states-jp.php:22 +msgid "Toyama" +msgstr "" + +#: i18n/states-jp.php:23 +msgid "Ishikawa" +msgstr "" + +#: i18n/states-jp.php:24 +msgid "Fukui" +msgstr "" + +#: i18n/states-jp.php:25 +msgid "Yamanashi" +msgstr "" + +#: i18n/states-jp.php:26 +msgid "Nagano" +msgstr "" + +#: i18n/states-jp.php:27 +msgid "Gifu" +msgstr "" + +#: i18n/states-jp.php:28 +msgid "Shizuoka" +msgstr "" + +#: i18n/states-jp.php:29 +msgid "Aichi" +msgstr "" + +#: i18n/states-jp.php:30 +msgid "Mie" +msgstr "" + +#: i18n/states-jp.php:31 +msgid "Shiga" +msgstr "" + +#: i18n/states-jp.php:32 +msgid "Kyouto" +msgstr "" + +#: i18n/states-jp.php:33 +msgid "Osaka" +msgstr "" + +#: i18n/states-jp.php:34 +msgid "Hyougo" +msgstr "" + +#: i18n/states-jp.php:35 +msgid "Nara" +msgstr "" + +#: i18n/states-jp.php:36 +msgid "Wakayama" +msgstr "" + +#: i18n/states-jp.php:37 +msgid "Tottori" +msgstr "" + +#: i18n/states-jp.php:38 +msgid "Shimane" +msgstr "" + +#: i18n/states-jp.php:39 +msgid "Okayama" +msgstr "" + +#: i18n/states-jp.php:40 +msgid "Hiroshima" +msgstr "" + +#: i18n/states-jp.php:41 +msgid "Yamaguchi" +msgstr "" + +#: i18n/states-jp.php:42 +msgid "Tokushima" +msgstr "" + +#: i18n/states-jp.php:43 +msgid "Kagawa" +msgstr "" + +#: i18n/states-jp.php:44 +msgid "Ehime" +msgstr "" + +#: i18n/states-jp.php:45 +msgid "Kochi" +msgstr "" + +#: i18n/states-jp.php:46 +msgid "Fukuoka" +msgstr "" + +#: i18n/states-jp.php:47 +msgid "Saga" +msgstr "" + +#: i18n/states-jp.php:48 +msgid "Nagasaki" +msgstr "" + +#: i18n/states-jp.php:49 +msgid "Kumamoto" +msgstr "" + +#: i18n/states-jp.php:50 +msgid "Oita" +msgstr "" + +#: i18n/states-jp.php:51 +msgid "Miyazaki" +msgstr "" + +#: i18n/states-jp.php:52 +msgid "Kagoshima" +msgstr "" + +#: i18n/states-jp.php:53 +msgid "Okinawa" +msgstr "" + +#: i18n/states-np.php:7 +msgid "Illam" +msgstr "" + +#: i18n/states-np.php:8 +msgid "Jhapa" +msgstr "" + +#: i18n/states-np.php:9 +msgid "Panchthar" +msgstr "" + +#: i18n/states-np.php:10 +msgid "Taplejung" +msgstr "" + +#: i18n/states-np.php:11 +msgid "Bhojpur" +msgstr "" + +#: i18n/states-np.php:12 +msgid "Dhankuta" +msgstr "" + +#: i18n/states-np.php:13 +msgid "Morang" +msgstr "" + +#: i18n/states-np.php:14 +msgid "Sunsari" +msgstr "" + +#: i18n/states-np.php:15 +msgid "Sankhuwa" +msgstr "" + +#: i18n/states-np.php:16 +msgid "Terhathum" +msgstr "" + +#: i18n/states-np.php:17 +msgid "Khotang" +msgstr "" + +#: i18n/states-np.php:18 +msgid "Okhaldhunga" +msgstr "" + +#: i18n/states-np.php:19 +msgid "Saptari" +msgstr "" + +#: i18n/states-np.php:20 +msgid "Siraha" +msgstr "" + +#: i18n/states-np.php:21 +msgid "Solukhumbu" +msgstr "" + +#: i18n/states-np.php:22 +msgid "Udayapur" +msgstr "" + +#: i18n/states-np.php:23 +msgid "Dhanusa" +msgstr "" + +#: i18n/states-np.php:24 +msgid "Dolakha" +msgstr "" + +#: i18n/states-np.php:25 +msgid "Mohottari" +msgstr "" + +#: i18n/states-np.php:26 +msgid "Ramechha" +msgstr "" + +#: i18n/states-np.php:27 +msgid "Sarlahi" +msgstr "" + +#: i18n/states-np.php:28 +msgid "Sindhuli" +msgstr "" + +#: i18n/states-np.php:29 +msgid "Bhaktapur" +msgstr "" + +#: i18n/states-np.php:30 +msgid "Dhading" +msgstr "" + +#: i18n/states-np.php:31 +msgid "Kathmandu" +msgstr "" + +#: i18n/states-np.php:32 +msgid "Kavrepalanchowk" +msgstr "" + +#: i18n/states-np.php:33 +msgid "Lalitpur" +msgstr "" + +#: i18n/states-np.php:34 +msgid "Nuwakot" +msgstr "" + +#: i18n/states-np.php:35 +msgid "Rasuwa" +msgstr "" + +#: i18n/states-np.php:36 +msgid "Sindhupalchowk" +msgstr "" + +#: i18n/states-np.php:37 +msgid "Bara" +msgstr "" + +#: i18n/states-np.php:38 +msgid "Chitwan" +msgstr "" + +#: i18n/states-np.php:39 +msgid "Makwanpur" +msgstr "" + +#: i18n/states-np.php:40 +msgid "Parsa" +msgstr "" + +#: i18n/states-np.php:41 +msgid "Rautahat" +msgstr "" + +#: i18n/states-np.php:42 +msgid "Gorkha" +msgstr "" + +#: i18n/states-np.php:43 +msgid "Kaski" +msgstr "" + +#: i18n/states-np.php:44 +msgid "Lamjung" +msgstr "" + +#: i18n/states-np.php:45 +msgid "Manang" +msgstr "" + +#: i18n/states-np.php:46 +msgid "Syangja" +msgstr "" + +#: i18n/states-np.php:47 +msgid "Tanahun" +msgstr "" + +#: i18n/states-np.php:48 +msgid "Baglung" +msgstr "" + +#: i18n/states-np.php:49 +msgid "Parbat" +msgstr "" + +#: i18n/states-np.php:50 +msgid "Mustang" +msgstr "" + +#: i18n/states-np.php:51 +msgid "Myagdi" +msgstr "" + +#: i18n/states-np.php:52 +msgid "Agrghakanchi" +msgstr "" + +#: i18n/states-np.php:53 +msgid "Gulmi" +msgstr "" + +#: i18n/states-np.php:54 +msgid "Kapilbastu" +msgstr "" + +#: i18n/states-np.php:55 +msgid "Nawalparasi" +msgstr "" + +#: i18n/states-np.php:56 +msgid "Palpa" +msgstr "" + +#: i18n/states-np.php:57 +msgid "Rupandehi" +msgstr "" + +#: i18n/states-np.php:58 +msgid "Dang" +msgstr "" + +#: i18n/states-np.php:59 +msgid "Pyuthan" +msgstr "" + +#: i18n/states-np.php:60 +msgid "Rolpa" +msgstr "" + +#: i18n/states-np.php:61 +msgid "Rukum" +msgstr "" + +#: i18n/states-np.php:62 +msgid "Salyan" +msgstr "" + +#: i18n/states-np.php:63 +msgid "Banke" +msgstr "" + +#: i18n/states-np.php:64 +msgid "Bardiya" +msgstr "" + +#: i18n/states-np.php:65 +msgid "Dailekh" +msgstr "" + +#: i18n/states-np.php:66 +msgid "Jajarkot" +msgstr "" + +#: i18n/states-np.php:67 +msgid "Surkhet" +msgstr "" + +#: i18n/states-np.php:68 +msgid "Dolpa" +msgstr "" + +#: i18n/states-np.php:69 +msgid "Humla" +msgstr "" + +#: i18n/states-np.php:70 +msgid "Jumla" +msgstr "" + +#: i18n/states-np.php:71 +msgid "Kalikot" +msgstr "" + +#: i18n/states-np.php:72 +msgid "Mugu" +msgstr "" + +#: i18n/states-np.php:73 +msgid "Achham" +msgstr "" + +#: i18n/states-np.php:74 +msgid "Bajhang" +msgstr "" + +#: i18n/states-np.php:75 +msgid "Bajura" +msgstr "" + +#: i18n/states-np.php:76 +msgid "Doti" +msgstr "" + +#: i18n/states-np.php:77 +msgid "Kailali" +msgstr "" + +#: i18n/states-np.php:78 +msgid "Baitadi" +msgstr "" + +#: i18n/states-np.php:79 +msgid "Dadeldhura" +msgstr "" + +#: i18n/states-np.php:80 +msgid "Darchula" +msgstr "" + +#: i18n/states-np.php:81 +msgid "Kanchanpur" +msgstr "" + +#: i18n/states-th.php:7 +msgid "Amnat Charoen (อำนาจเจริญ)" +msgstr "" + +#: i18n/states-th.php:8 +msgid "Ang Thong (อ่างทอง)" +msgstr "" + +#: i18n/states-th.php:9 +msgid "Ayutthaya (พระนครศรีอยุธยา)" +msgstr "" + +#: i18n/states-th.php:10 +msgid "Bangkok (กรุงเทพมหานคร)" +msgstr "" + +#: i18n/states-th.php:11 +msgid "Bueng Kan (บึงกาฬ)" +msgstr "" + +#: i18n/states-th.php:12 +msgid "Buri Ram (บุรีรัมย์)" +msgstr "" + +#: i18n/states-th.php:13 +msgid "Chachoengsao (ฉะเชิงเทรา)" +msgstr "" + +#: i18n/states-th.php:14 +msgid "Chai Nat (ชัยนาท)" +msgstr "" + +#: i18n/states-th.php:15 +msgid "Chaiyaphum (ชัยภูมิ)" +msgstr "" + +#: i18n/states-th.php:16 +msgid "Chanthaburi (จันทบุรี)" +msgstr "" + +#: i18n/states-th.php:17 +msgid "Chiang Mai (เชียงใหม่)" +msgstr "" + +#: i18n/states-th.php:18 +msgid "Chiang Rai (เชียงราย)" +msgstr "" + +#: i18n/states-th.php:19 +msgid "Chonburi (ชลบุรี)" +msgstr "" + +#: i18n/states-th.php:20 +msgid "Chumphon (ชุมพร)" +msgstr "" + +#: i18n/states-th.php:21 +msgid "Kalasin (กาฬสินธุ์)" +msgstr "" + +#: i18n/states-th.php:22 +msgid "Kamphaeng Phet (กำแพงเพชร)" +msgstr "" + +#: i18n/states-th.php:23 +msgid "Kanchanaburi (กาญจนบุรี)" +msgstr "" + +#: i18n/states-th.php:24 +msgid "Khon Kaen (ขอนแก่น)" +msgstr "" + +#: i18n/states-th.php:25 +msgid "Krabi (กระบี่)" +msgstr "" + +#: i18n/states-th.php:26 +msgid "Lampang (ลำปาง)" +msgstr "" + +#: i18n/states-th.php:27 +msgid "Lamphun (ลำพูน)" +msgstr "" + +#: i18n/states-th.php:28 +msgid "Loei (เลย)" +msgstr "" + +#: i18n/states-th.php:29 +msgid "Lopburi (ลพบุรี)" +msgstr "" + +#: i18n/states-th.php:30 +msgid "Mae Hong Son (แม่ฮ่องสอน)" +msgstr "" + +#: i18n/states-th.php:31 +msgid "Maha Sarakham (มหาสารคาม)" +msgstr "" + +#: i18n/states-th.php:32 +msgid "Mukdahan (มุกดาหาร)" +msgstr "" + +#: i18n/states-th.php:33 +msgid "Nakhon Nayok (นครนายก)" +msgstr "" + +#: i18n/states-th.php:34 +msgid "Nakhon Pathom (นครปฐม)" +msgstr "" + +#: i18n/states-th.php:35 +msgid "Nakhon Phanom (นครพนม)" +msgstr "" + +#: i18n/states-th.php:36 +msgid "Nakhon Ratchasima (นครราชสีมา)" +msgstr "" + +#: i18n/states-th.php:37 +msgid "Nakhon Sawan (นครสวรรค์)" +msgstr "" + +#: i18n/states-th.php:38 +msgid "Nakhon Si Thammarat (นครศรีธรรมราช)" +msgstr "" + +#: i18n/states-th.php:39 +msgid "Nan (น่าน)" +msgstr "" + +#: i18n/states-th.php:40 +msgid "Narathiwat (นราธิวาส)" +msgstr "" + +#: i18n/states-th.php:41 +msgid "Nong Bua Lam Phu (หนองบัวลำภู)" +msgstr "" + +#: i18n/states-th.php:42 +msgid "Nong Khai (หนองคาย)" +msgstr "" + +#: i18n/states-th.php:43 +msgid "Nonthaburi (นนทบุรี)" +msgstr "" + +#: i18n/states-th.php:44 +msgid "Pathum Thani (ปทุมธานี)" +msgstr "" + +#: i18n/states-th.php:45 +msgid "Pattani (ปัตตานี)" +msgstr "" + +#: i18n/states-th.php:46 +msgid "Phang Nga (พังงา)" +msgstr "" + +#: i18n/states-th.php:47 +msgid "Phatthalung (พัทลุง)" +msgstr "" + +#: i18n/states-th.php:48 +msgid "Phayao (พะเยา)" +msgstr "" + +#: i18n/states-th.php:49 +msgid "Phetchabun (เพชรบูรณ์)" +msgstr "" + +#: i18n/states-th.php:50 +msgid "Phetchaburi (เพชรบุรี)" +msgstr "" + +#: i18n/states-th.php:51 +msgid "Phichit (พิจิตร)" +msgstr "" + +#: i18n/states-th.php:52 +msgid "Phitsanulok (พิษณุโลก)" +msgstr "" + +#: i18n/states-th.php:53 +msgid "Phrae (แพร่)" +msgstr "" + +#: i18n/states-th.php:54 +msgid "Phuket (ภูเก็ต)" +msgstr "" + +#: i18n/states-th.php:55 +msgid "Prachin Buri (ปราจีนบุรี)" +msgstr "" + +#: i18n/states-th.php:56 +msgid "Prachuap Khiri Khan (ประจวบคีรีขันธ์)" +msgstr "" + +#: i18n/states-th.php:57 +msgid "Ranong (ระนอง)" +msgstr "" + +#: i18n/states-th.php:58 +msgid "Ratchaburi (ราชบุรี)" +msgstr "" + +#: i18n/states-th.php:59 +msgid "Rayong (ระยอง)" +msgstr "" + +#: i18n/states-th.php:60 +msgid "Roi Et (ร้อยเอ็ด)" +msgstr "" + +#: i18n/states-th.php:61 +msgid "Sa Kaeo (สระแก้ว)" +msgstr "" + +#: i18n/states-th.php:62 +msgid "Sakon Nakhon (สกลนคร)" +msgstr "" + +#: i18n/states-th.php:63 +msgid "Samut Prakan (สมุทรปราการ)" +msgstr "" + +#: i18n/states-th.php:64 +msgid "Samut Sakhon (สมุทรสาคร)" +msgstr "" + +#: i18n/states-th.php:65 +msgid "Samut Songkhram (สมุทรสงคราม)" +msgstr "" + +#: i18n/states-th.php:66 +msgid "Saraburi (สระบุรี)" +msgstr "" + +#: i18n/states-th.php:67 +msgid "Satun (สตูล)" +msgstr "" + +#: i18n/states-th.php:68 +msgid "Sing Buri (สิงห์บุรี)" +msgstr "" + +#: i18n/states-th.php:69 +msgid "Sisaket (ศรีสะเกษ)" +msgstr "" + +#: i18n/states-th.php:70 +msgid "Songkhla (สงขลา)" +msgstr "" + +#: i18n/states-th.php:71 +msgid "Sukhothai (สุโขทัย)" +msgstr "" + +#: i18n/states-th.php:72 +msgid "Suphan Buri (สุพรรณบุรี)" +msgstr "" + +#: i18n/states-th.php:73 +msgid "Surat Thani (สุราษฎร์ธานี)" +msgstr "" + +#: i18n/states-th.php:74 +msgid "Surin (สุรินทร์)" +msgstr "" + +#: i18n/states-th.php:75 +msgid "Tak (ตาก)" +msgstr "" + +#: i18n/states-th.php:76 +msgid "Trang (ตรัง)" +msgstr "" + +#: i18n/states-th.php:77 +msgid "Trat (ตราด)" +msgstr "" + +#: i18n/states-th.php:78 +msgid "Ubon Ratchathani (อุบลราชธานี)" +msgstr "" + +#: i18n/states-th.php:79 +msgid "Udon Thani (อุดรธานี)" +msgstr "" + +#: i18n/states-th.php:80 +msgid "Uthai Thani (อุทัยธานี)" +msgstr "" + +#: i18n/states-th.php:81 +msgid "Uttaradit (อุตรดิตถ์)" +msgstr "" + +#: i18n/states-th.php:82 +msgid "Yala (ยะลา)" +msgstr "" + +#: i18n/states-th.php:83 +msgid "Yasothon (ยโสธร)" +msgstr "" + +#: i18n/states-tr.php:7 +msgid "Adana" +msgstr "" + +#: i18n/states-tr.php:8 +msgid "Adıyaman" +msgstr "" + +#: i18n/states-tr.php:9 +msgid "Afyon" +msgstr "" + +#: i18n/states-tr.php:10 +msgid "Ağrı" +msgstr "" + +#: i18n/states-tr.php:11 +msgid "Amasya" +msgstr "" + +#: i18n/states-tr.php:12 +msgid "Ankara" +msgstr "" + +#: i18n/states-tr.php:13 +msgid "Antalya" +msgstr "" + +#: i18n/states-tr.php:14 +msgid "Artvin" +msgstr "" + +#: i18n/states-tr.php:15 +msgid "Aydın" +msgstr "" + +#: i18n/states-tr.php:16 +msgid "Balıkesir" +msgstr "" + +#: i18n/states-tr.php:17 +msgid "Bilecik" +msgstr "" + +#: i18n/states-tr.php:18 +msgid "Bingöl" +msgstr "" + +#: i18n/states-tr.php:19 +msgid "Bitlis" +msgstr "" + +#: i18n/states-tr.php:20 +msgid "Bolu" +msgstr "" + +#: i18n/states-tr.php:21 +msgid "Burdur" +msgstr "" + +#: i18n/states-tr.php:22 +msgid "Bursa" +msgstr "" + +#: i18n/states-tr.php:23 +msgid "Çanakkale" +msgstr "" + +#: i18n/states-tr.php:24 +msgid "Çankıkesir" +msgstr "" + +#: i18n/states-tr.php:25 +msgid "Çorum" +msgstr "" + +#: i18n/states-tr.php:26 +msgid "Denizli" +msgstr "" + +#: i18n/states-tr.php:27 +msgid "Diyarbakır" +msgstr "" + +#: i18n/states-tr.php:28 +msgid "Edirne" +msgstr "" + +#: i18n/states-tr.php:29 +msgid "Elazığ" +msgstr "" + +#: i18n/states-tr.php:30 +msgid "Erzincan" +msgstr "" + +#: i18n/states-tr.php:31 +msgid "Erzurum" +msgstr "" + +#: i18n/states-tr.php:32 +msgid "Eskişehir" +msgstr "" + +#: i18n/states-tr.php:33 +msgid "Gaziantep" +msgstr "" + +#: i18n/states-tr.php:34 +msgid "Giresun" +msgstr "" + +#: i18n/states-tr.php:35 +msgid "Gümüşhane" +msgstr "" + +#: i18n/states-tr.php:36 +msgid "Hakkari" +msgstr "" + +#: i18n/states-tr.php:37 +msgid "Hatay" +msgstr "" + +#: i18n/states-tr.php:38 +msgid "Isparta" +msgstr "" + +#: i18n/states-tr.php:39 +msgid "İçel" +msgstr "" + +#: i18n/states-tr.php:40 +msgid "İstanbul" +msgstr "" + +#: i18n/states-tr.php:41 +msgid "İzmir" +msgstr "" + +#: i18n/states-tr.php:42 +msgid "Kars" +msgstr "" + +#: i18n/states-tr.php:43 +msgid "Kastamonu" +msgstr "" + +#: i18n/states-tr.php:44 +msgid "Kayseri" +msgstr "" + +#: i18n/states-tr.php:45 +msgid "Kırklareli" +msgstr "" + +#: i18n/states-tr.php:46 +msgid "Kırşehir" +msgstr "" + +#: i18n/states-tr.php:47 +msgid "Kocaeli" +msgstr "" + +#: i18n/states-tr.php:48 +msgid "Konya" +msgstr "" + +#: i18n/states-tr.php:49 +msgid "Kütahya" +msgstr "" + +#: i18n/states-tr.php:50 +msgid "Malatya" +msgstr "" + +#: i18n/states-tr.php:51 +msgid "Manisa" +msgstr "" + +#: i18n/states-tr.php:52 +msgid "Kahramanmaraş" +msgstr "" + +#: i18n/states-tr.php:53 +msgid "Mardin" +msgstr "" + +#: i18n/states-tr.php:54 +msgid "Muğla" +msgstr "" + +#: i18n/states-tr.php:55 +msgid "Muş" +msgstr "" + +#: i18n/states-tr.php:56 +msgid "Nevşehir" +msgstr "" + +#: i18n/states-tr.php:57 +msgid "Niğde" +msgstr "" + +#: i18n/states-tr.php:58 +msgid "Ordu" +msgstr "" + +#: i18n/states-tr.php:59 +msgid "Rize" +msgstr "" + +#: i18n/states-tr.php:60 +msgid "Sakarya" +msgstr "" + +#: i18n/states-tr.php:61 +msgid "Samsun" +msgstr "" + +#: i18n/states-tr.php:62 +msgid "Siirt" +msgstr "" + +#: i18n/states-tr.php:63 +msgid "Sinop" +msgstr "" + +#: i18n/states-tr.php:64 +msgid "Sivas" +msgstr "" + +#: i18n/states-tr.php:65 +msgid "Tekirdağ" +msgstr "" + +#: i18n/states-tr.php:66 +msgid "Tokat" +msgstr "" + +#: i18n/states-tr.php:67 +msgid "Trabzon" +msgstr "" + +#: i18n/states-tr.php:68 +msgid "Tunceli" +msgstr "" + +#: i18n/states-tr.php:69 +msgid "Şanlıurfa" +msgstr "" + +#: i18n/states-tr.php:70 +msgid "Uşak" +msgstr "" + +#: i18n/states-tr.php:71 +msgid "Van" +msgstr "" + +#: i18n/states-tr.php:72 +msgid "Yozgat" +msgstr "" + +#: i18n/states-tr.php:73 +msgid "Zonguldak" +msgstr "" + +#: i18n/states-tr.php:74 +msgid "Aksaray" +msgstr "" + +#: i18n/states-tr.php:75 +msgid "Bayburt" +msgstr "" + +#: i18n/states-tr.php:76 +msgid "Karaman" +msgstr "" + +#: i18n/states-tr.php:77 +msgid "Kırıkkale" +msgstr "" + +#: i18n/states-tr.php:78 +msgid "Batman" +msgstr "" + +#: i18n/states-tr.php:79 +msgid "Şırnak" +msgstr "" + +#: i18n/states-tr.php:80 +msgid "Bartın" +msgstr "" + +#: i18n/states-tr.php:81 +msgid "Ardahan" +msgstr "" + +#: i18n/states-tr.php:82 +msgid "Iğdır" +msgstr "" + +#: i18n/states-tr.php:83 +msgid "Yalova" +msgstr "" + +#: i18n/states-tr.php:84 +msgid "Karabük" +msgstr "" + +#: i18n/states-tr.php:85 +msgid "Kilis" +msgstr "" + +#: i18n/states-tr.php:86 +msgid "Osmaniye" +msgstr "" + +#: i18n/states-tr.php:87 +msgid "Düzce" +msgstr "" + +#: i18n/states-us.php:7 +msgid "Alabama" +msgstr "" + +#: i18n/states-us.php:8 +msgid "Alaska" +msgstr "" + +#: i18n/states-us.php:9 +msgid "Arizona" +msgstr "" + +#: i18n/states-us.php:10 +msgid "Arkansas" +msgstr "" + +#: i18n/states-us.php:11 +msgid "California" +msgstr "" + +#: i18n/states-us.php:12 +msgid "Colorado" +msgstr "" + +#: i18n/states-us.php:13 +msgid "Connecticut" +msgstr "" + +#: i18n/states-us.php:14 +msgid "Delaware" +msgstr "" + +#: i18n/states-us.php:15 +msgid "District of Columbia" +msgstr "" + +#: i18n/states-us.php:16 +msgid "Florida" +msgstr "" + +#: i18n/states-us.php:18 +msgid "Hawaii" +msgstr "" + +#: i18n/states-us.php:19 +msgid "Idaho" +msgstr "" + +#: i18n/states-us.php:20 +msgid "Illinois" +msgstr "" + +#: i18n/states-us.php:21 +msgid "Indiana" +msgstr "" + +#: i18n/states-us.php:22 +msgid "Iowa" +msgstr "" + +#: i18n/states-us.php:23 +msgid "Kansas" +msgstr "" + +#: i18n/states-us.php:24 +msgid "Kentucky" +msgstr "" + +#: i18n/states-us.php:25 +msgid "Louisiana" +msgstr "" + +#: i18n/states-us.php:26 +msgid "Maine" +msgstr "" + +#: i18n/states-us.php:27 +msgid "Maryland" +msgstr "" + +#: i18n/states-us.php:28 +msgid "Massachusetts" +msgstr "" + +#: i18n/states-us.php:29 +msgid "Michigan" +msgstr "" + +#: i18n/states-us.php:30 +msgid "Minnesota" +msgstr "" + +#: i18n/states-us.php:31 +msgid "Mississippi" +msgstr "" + +#: i18n/states-us.php:32 +msgid "Missouri" +msgstr "" + +#: i18n/states-us.php:33 +#: i18n/states.php:99 +msgid "Montana" +msgstr "" + +#: i18n/states-us.php:34 +msgid "Nebraska" +msgstr "" + +#: i18n/states-us.php:35 +msgid "Nevada" +msgstr "" + +#: i18n/states-us.php:36 +msgid "New Hampshire" +msgstr "" + +#: i18n/states-us.php:37 +msgid "New Jersey" +msgstr "" + +#: i18n/states-us.php:38 +msgid "New Mexico" +msgstr "" + +#: i18n/states-us.php:39 +msgid "New York" +msgstr "" + +#: i18n/states-us.php:40 +msgid "North Carolina" +msgstr "" + +#: i18n/states-us.php:41 +msgid "North Dakota" +msgstr "" + +#: i18n/states-us.php:42 +msgid "Ohio" +msgstr "" + +#: i18n/states-us.php:43 +msgid "Oklahoma" +msgstr "" + +#: i18n/states-us.php:44 +msgid "Oregon" +msgstr "" + +#: i18n/states-us.php:45 +msgid "Pennsylvania" +msgstr "" + +#: i18n/states-us.php:46 +msgid "Rhode Island" +msgstr "" + +#: i18n/states-us.php:47 +msgid "South Carolina" +msgstr "" + +#: i18n/states-us.php:48 +msgid "South Dakota" +msgstr "" + +#: i18n/states-us.php:49 +msgid "Tennessee" +msgstr "" + +#: i18n/states-us.php:50 +msgid "Texas" +msgstr "" + +#: i18n/states-us.php:51 +msgid "Utah" +msgstr "" + +#: i18n/states-us.php:52 +msgid "Vermont" +msgstr "" + +#: i18n/states-us.php:53 +msgid "Virginia" +msgstr "" + +#: i18n/states-us.php:54 +msgid "Washington" +msgstr "" + +#: i18n/states-us.php:55 +msgid "West Virginia" +msgstr "" + +#: i18n/states-us.php:56 +msgid "Wisconsin" +msgstr "" + +#: i18n/states-us.php:57 +msgid "Wyoming" +msgstr "" + +#: i18n/states-us.php:59 +msgid "Canal Zone" +msgstr "" + +#: i18n/states-us.php:60 +msgid "Commonwealth of the Northern Mariana Islands" +msgstr "" + +#: i18n/states-us.php:61 +msgid "Federated States of Micronesia" +msgstr "" + +#: i18n/states-us.php:66 +msgid "Philippine Islands" +msgstr "" + +#: i18n/states-us.php:68 +msgid "Trust Territory of the Pacific Islands" +msgstr "" + +#: i18n/states-us.php:69 +msgid "Virgin Islands" +msgstr "" + +#: i18n/states-us.php:70 +msgid "Armed Forces - Americas" +msgstr "" + +#: i18n/states-us.php:71 +msgid "Armed Forces - Europe, Canada, Middle East, Africa" +msgstr "" + +#: i18n/states-us.php:72 +msgid "Armed Forces - Pacific" +msgstr "" + +#: i18n/states.php:10 +msgid "Alberta" +msgstr "" + +#: i18n/states.php:11 +msgid "British Columbia" +msgstr "" + +#: i18n/states.php:12 +msgid "Manitoba" +msgstr "" + +#: i18n/states.php:13 +msgid "New Brunswick" +msgstr "" + +#: i18n/states.php:14 +msgid "Newfoundland and Labrador" +msgstr "" + +#: i18n/states.php:15 +msgid "Nova Scotia" +msgstr "" + +#: i18n/states.php:16 +msgid "Northwest Territories" +msgstr "" + +#: i18n/states.php:17 +msgid "Nunavut" +msgstr "" + +#: i18n/states.php:18 +msgid "Ontario" +msgstr "" + +#: i18n/states.php:19 +msgid "Prince Edward Island" +msgstr "" + +#: i18n/states.php:20 +msgid "Quebec" +msgstr "" + +#: i18n/states.php:21 +msgid "Saskatchewan" +msgstr "" + +#: i18n/states.php:22 +msgid "Yukon" +msgstr "" + +#: i18n/states.php:27 +msgid "Bengo" +msgstr "" + +#: i18n/states.php:28 +msgid "Benguela" +msgstr "" + +#: i18n/states.php:29 +msgid "Bié" +msgstr "" + +#: i18n/states.php:30 +msgid "Cabinda" +msgstr "" + +#: i18n/states.php:31 +msgid "Cunene" +msgstr "" + +#: i18n/states.php:32 +msgid "Huambo" +msgstr "" + +#: i18n/states.php:33 +msgid "Huíla" +msgstr "" + +#: i18n/states.php:34 +msgid "Kuando Kubango" +msgstr "" + +#: i18n/states.php:35 +msgid "Kwanza-Norte" +msgstr "" + +#: i18n/states.php:36 +msgid "Kwanza-Sul" +msgstr "" + +#: i18n/states.php:37 +msgid "Luanda" +msgstr "" + +#: i18n/states.php:38 +msgid "Lunda-Norte" +msgstr "" + +#: i18n/states.php:39 +msgid "Lunda-Sul" +msgstr "" + +#: i18n/states.php:40 +msgid "Malanje" +msgstr "" + +#: i18n/states.php:41 +msgid "Moxico" +msgstr "" + +#: i18n/states.php:42 +msgid "Namibe" +msgstr "" + +#: i18n/states.php:43 +msgid "Uíge" +msgstr "" + +#: i18n/states.php:44 +msgid "Zaire" +msgstr "" + +#: i18n/states.php:48 +msgid "Australian Capital Territory" +msgstr "" + +#: i18n/states.php:49 +msgid "New South Wales" +msgstr "" + +#: i18n/states.php:50 +msgid "Northern Territory" +msgstr "" + +#: i18n/states.php:51 +msgid "Queensland" +msgstr "" + +#: i18n/states.php:52 +msgid "South Australia" +msgstr "" + +#: i18n/states.php:53 +msgid "Tasmania" +msgstr "" + +#: i18n/states.php:54 +msgid "Victoria" +msgstr "" + +#: i18n/states.php:55 +msgid "Western Australia" +msgstr "" + +#: i18n/states.php:61 +msgid "Acre" +msgstr "" + +#: i18n/states.php:62 +msgid "Alagoas" +msgstr "" + +#: i18n/states.php:63 +msgid "Amapá" +msgstr "" + +#: i18n/states.php:64 +#: i18n/states.php:356 +msgid "Amazonas" +msgstr "" + +#: i18n/states.php:65 +msgid "Bahia" +msgstr "" + +#: i18n/states.php:66 +msgid "Ceará" +msgstr "" + +#: i18n/states.php:67 +#: i18n/states.php:279 +msgid "Distrito Federal" +msgstr "" + +#: i18n/states.php:68 +msgid "Espírito Santo" +msgstr "" + +#: i18n/states.php:69 +msgid "Goiás" +msgstr "" + +#: i18n/states.php:70 +msgid "Maranhão" +msgstr "" + +#: i18n/states.php:71 +msgid "Mato Grosso" +msgstr "" + +#: i18n/states.php:72 +msgid "Mato Grosso do Sul" +msgstr "" + +#: i18n/states.php:73 +msgid "Minas Gerais" +msgstr "" + +#: i18n/states.php:74 +msgid "Pará" +msgstr "" + +#: i18n/states.php:75 +msgid "Paraíba" +msgstr "" + +#: i18n/states.php:76 +msgid "Paraná" +msgstr "" + +#: i18n/states.php:77 +msgid "Pernambuco" +msgstr "" + +#: i18n/states.php:78 +msgid "Piauí" +msgstr "" + +#: i18n/states.php:79 +msgid "Rio de Janeiro" +msgstr "" + +#: i18n/states.php:80 +msgid "Rio Grande do Norte" +msgstr "" + +#: i18n/states.php:81 +msgid "Rio Grande do Sul" +msgstr "" + +#: i18n/states.php:82 +msgid "Rondônia" +msgstr "" + +#: i18n/states.php:83 +msgid "Roraima" +msgstr "" + +#: i18n/states.php:84 +msgid "Santa Catarina" +msgstr "" + +#: i18n/states.php:85 +msgid "São Paulo" +msgstr "" + +#: i18n/states.php:86 +msgid "Sergipe" +msgstr "" + +#: i18n/states.php:87 +msgid "Tocantins" +msgstr "" + +#: i18n/states.php:91 +msgid "Blagoevgrad" +msgstr "" + +#: i18n/states.php:92 +msgid "Burgas" +msgstr "" + +#: i18n/states.php:93 +msgid "Dobrich" +msgstr "" + +#: i18n/states.php:94 +msgid "Gabrovo" +msgstr "" + +#: i18n/states.php:95 +msgid "Haskovo" +msgstr "" + +#: i18n/states.php:96 +msgid "Kardzhali" +msgstr "" + +#: i18n/states.php:97 +msgid "Kyustendil" +msgstr "" + +#: i18n/states.php:98 +msgid "Lovech" +msgstr "" + +#: i18n/states.php:100 +msgid "Pazardzhik" +msgstr "" + +#: i18n/states.php:101 +msgid "Pernik" +msgstr "" + +#: i18n/states.php:102 +msgid "Pleven" +msgstr "" + +#: i18n/states.php:103 +msgid "Plovdiv" +msgstr "" + +#: i18n/states.php:104 +msgid "Razgrad" +msgstr "" + +#: i18n/states.php:105 +msgid "Ruse" +msgstr "" + +#: i18n/states.php:106 +msgid "Shumen" +msgstr "" + +#: i18n/states.php:107 +msgid "Silistra" +msgstr "" + +#: i18n/states.php:108 +msgid "Sliven" +msgstr "" + +#: i18n/states.php:109 +msgid "Smolyan" +msgstr "" + +#: i18n/states.php:110 +msgid "Sofia" +msgstr "" + +#: i18n/states.php:111 +msgid "Sofia-Grad" +msgstr "" + +#: i18n/states.php:112 +msgid "Stara Zagora" +msgstr "" + +#: i18n/states.php:113 +msgid "Targovishte" +msgstr "" + +#: i18n/states.php:114 +msgid "Varna" +msgstr "" + +#: i18n/states.php:115 +msgid "Veliko Tarnovo" +msgstr "" + +#: i18n/states.php:116 +msgid "Vidin" +msgstr "" + +#: i18n/states.php:117 +msgid "Vratsa" +msgstr "" + +#: i18n/states.php:118 +msgid "Yambol" +msgstr "" + +#: i18n/states.php:122 +msgid "Yunnan / 云南" +msgstr "" + +#: i18n/states.php:123 +msgid "Beijing / 北京" +msgstr "" + +#: i18n/states.php:124 +msgid "Tianjin / 天津" +msgstr "" + +#: i18n/states.php:125 +msgid "Hebei / 河北" +msgstr "" + +#: i18n/states.php:126 +msgid "Shanxi / 山西" +msgstr "" + +#: i18n/states.php:127 +msgid "Inner Mongolia / 內蒙古" +msgstr "" + +#: i18n/states.php:128 +msgid "Liaoning / 辽宁" +msgstr "" + +#: i18n/states.php:129 +msgid "Jilin / 吉林" +msgstr "" + +#: i18n/states.php:130 +msgid "Heilongjiang / 黑龙江" +msgstr "" + +#: i18n/states.php:131 +msgid "Shanghai / 上海" +msgstr "" + +#: i18n/states.php:132 +msgid "Jiangsu / 江苏" +msgstr "" + +#: i18n/states.php:133 +msgid "Zhejiang / 浙江" +msgstr "" + +#: i18n/states.php:134 +msgid "Anhui / 安徽" +msgstr "" + +#: i18n/states.php:135 +msgid "Fujian / 福建" +msgstr "" + +#: i18n/states.php:136 +msgid "Jiangxi / 江西" +msgstr "" + +#: i18n/states.php:137 +msgid "Shandong / 山东" +msgstr "" + +#: i18n/states.php:138 +msgid "Henan / 河南" +msgstr "" + +#: i18n/states.php:139 +msgid "Hubei / 湖北" +msgstr "" + +#: i18n/states.php:140 +msgid "Hunan / 湖南" +msgstr "" + +#: i18n/states.php:141 +msgid "Guangdong / 广东" +msgstr "" + +#: i18n/states.php:142 +msgid "Guangxi Zhuang / 广西壮族" +msgstr "" + +#: i18n/states.php:143 +msgid "Hainan / 海南" +msgstr "" + +#: i18n/states.php:144 +msgid "Chongqing / 重庆" +msgstr "" + +#: i18n/states.php:145 +msgid "Sichuan / 四川" +msgstr "" + +#: i18n/states.php:146 +msgid "Guizhou / 贵州" +msgstr "" + +#: i18n/states.php:147 +msgid "Shaanxi / 陕西" +msgstr "" + +#: i18n/states.php:148 +msgid "Gansu / 甘肃" +msgstr "" + +#: i18n/states.php:149 +msgid "Qinghai / 青海" +msgstr "" + +#: i18n/states.php:150 +msgid "Ningxia Hui / 宁夏" +msgstr "" + +#: i18n/states.php:151 +msgid "Macau / 澳门" +msgstr "" + +#: i18n/states.php:152 +msgid "Tibet / 西藏" +msgstr "" + +#: i18n/states.php:153 +msgid "Xinjiang / 新疆" +msgstr "" + +#: i18n/states.php:157 +msgid "Hong Kong Island" +msgstr "" + +#: i18n/states.php:158 +msgid "Kowloon" +msgstr "" + +#: i18n/states.php:159 +msgid "New Territories" +msgstr "" + +#: i18n/states.php:163 +msgid "Bács-Kiskun" +msgstr "" + +#: i18n/states.php:164 +msgid "Békés" +msgstr "" + +#: i18n/states.php:165 +msgid "Baranya" +msgstr "" + +#: i18n/states.php:166 +msgid "Borsod-Abaúj-Zemplén" +msgstr "" + +#: i18n/states.php:167 +msgid "Budapest" +msgstr "" + +#: i18n/states.php:168 +msgid "Csongrád" +msgstr "" + +#: i18n/states.php:169 +msgid "Fejér" +msgstr "" + +#: i18n/states.php:170 +msgid "Győr-Moson-Sopron" +msgstr "" + +#: i18n/states.php:171 +msgid "Hajdú-Bihar" +msgstr "" + +#: i18n/states.php:172 +msgid "Heves" +msgstr "" + +#: i18n/states.php:173 +msgid "Jász-Nagykun-Szolnok" +msgstr "" + +#: i18n/states.php:174 +msgid "Komárom-Esztergom" +msgstr "" + +#: i18n/states.php:175 +msgid "Nógrád" +msgstr "" + +#: i18n/states.php:176 +msgid "Pest" +msgstr "" + +#: i18n/states.php:177 +msgid "Somogy" +msgstr "" + +#: i18n/states.php:178 +msgid "Szabolcs-Szatmár-Bereg" +msgstr "" + +#: i18n/states.php:179 +msgid "Tolna" +msgstr "" + +#: i18n/states.php:180 +msgid "Vas" +msgstr "" + +#: i18n/states.php:181 +msgid "Veszprém" +msgstr "" + +#: i18n/states.php:182 +msgid "Zala" +msgstr "" + +#: i18n/states.php:187 +msgid "Daerah Istimewa Aceh" +msgstr "" + +#: i18n/states.php:188 +msgid "Sumatera Utara" +msgstr "" + +#: i18n/states.php:189 +msgid "Sumatera Barat" +msgstr "" + +#: i18n/states.php:190 +msgid "Riau" +msgstr "" + +#: i18n/states.php:191 +msgid "Kepulauan Riau" +msgstr "" + +#: i18n/states.php:192 +msgid "Jambi" +msgstr "" + +#: i18n/states.php:193 +msgid "Sumatera Selatan" +msgstr "" + +#: i18n/states.php:194 +msgid "Bangka Belitung" +msgstr "" + +#: i18n/states.php:195 +msgid "Bengkulu" +msgstr "" + +#: i18n/states.php:196 +msgid "Lampung" +msgstr "" + +#: i18n/states.php:197 +msgid "DKI Jakarta" +msgstr "" + +#: i18n/states.php:198 +msgid "Jawa Barat" +msgstr "" + +#: i18n/states.php:199 +msgid "Banten" +msgstr "" + +#: i18n/states.php:200 +msgid "Jawa Tengah" +msgstr "" + +#: i18n/states.php:201 +msgid "Jawa Timur" +msgstr "" + +#: i18n/states.php:202 +msgid "Daerah Istimewa Yogyakarta" +msgstr "" + +#: i18n/states.php:203 +msgid "Bali" +msgstr "" + +#: i18n/states.php:204 +msgid "Nusa Tenggara Barat" +msgstr "" + +#: i18n/states.php:205 +msgid "Nusa Tenggara Timur" +msgstr "" + +#: i18n/states.php:206 +msgid "Kalimantan Barat" +msgstr "" + +#: i18n/states.php:207 +msgid "Kalimantan Tengah" +msgstr "" + +#: i18n/states.php:208 +msgid "Kalimantan Timur" +msgstr "" + +#: i18n/states.php:209 +msgid "Kalimantan Selatan" +msgstr "" + +#: i18n/states.php:210 +msgid "Kalimantan Utara" +msgstr "" + +#: i18n/states.php:211 +msgid "Sulawesi Utara" +msgstr "" + +#: i18n/states.php:212 +msgid "Sulawesi Tengah" +msgstr "" + +#: i18n/states.php:213 +msgid "Sulawesi Tenggara" +msgstr "" + +#: i18n/states.php:214 +msgid "Sulawesi Barat" +msgstr "" + +#: i18n/states.php:215 +msgid "Sulawesi Selatan" +msgstr "" + +#: i18n/states.php:216 +msgid "Gorontalo" +msgstr "" + +#: i18n/states.php:217 +msgid "Maluku" +msgstr "" + +#: i18n/states.php:218 +msgid "Maluku Utara" +msgstr "" + +#: i18n/states.php:219 +msgid "Papua" +msgstr "" + +#: i18n/states.php:220 +msgid "Papua Barat" +msgstr "" + +#: i18n/states.php:224 +msgid "Khuzestan" +msgstr "" + +#: i18n/states.php:225 +msgid "Tehran" +msgstr "" + +#: i18n/states.php:226 +msgid "Ilaam" +msgstr "" + +#: i18n/states.php:227 +msgid "Bushehr" +msgstr "" + +#: i18n/states.php:228 +msgid "Ardabil" +msgstr "" + +#: i18n/states.php:229 +msgid "Isfahan" +msgstr "" + +#: i18n/states.php:230 +msgid "Yazd" +msgstr "" + +#: i18n/states.php:231 +msgid "Kermanshah" +msgstr "" + +#: i18n/states.php:232 +msgid "Kerman" +msgstr "" + +#: i18n/states.php:233 +msgid "Hamadan" +msgstr "" + +#: i18n/states.php:234 +msgid "Ghazvin" +msgstr "" + +#: i18n/states.php:235 +msgid "Zanjan" +msgstr "" + +#: i18n/states.php:236 +msgid "Luristan" +msgstr "" + +#: i18n/states.php:237 +msgid "Alborz" +msgstr "" + +#: i18n/states.php:238 +msgid "East Azerbaijan" +msgstr "" + +#: i18n/states.php:239 +msgid "West Azerbaijan" +msgstr "" + +#: i18n/states.php:240 +msgid "Chaharmahal and Bakhtiari" +msgstr "" + +#: i18n/states.php:241 +msgid "South Khorasan" +msgstr "" + +#: i18n/states.php:242 +msgid "Razavi Khorasan" +msgstr "" + +#: i18n/states.php:243 +msgid "North Khorasan" +msgstr "" + +#: i18n/states.php:244 +msgid "Semnan" +msgstr "" + +#: i18n/states.php:245 +msgid "Fars" +msgstr "" + +#: i18n/states.php:246 +msgid "Qom" +msgstr "" + +#: i18n/states.php:247 +msgid "Kurdistan" +msgstr "" + +#: i18n/states.php:248 +msgid "Kohgiluyeh and BoyerAhmad" +msgstr "" + +#: i18n/states.php:249 +msgid "Golestan" +msgstr "" + +#: i18n/states.php:250 +msgid "Gilan" +msgstr "" + +#: i18n/states.php:251 +msgid "Mazandaran" +msgstr "" + +#: i18n/states.php:252 +msgid "Markazi" +msgstr "" + +#: i18n/states.php:253 +msgid "Hormozgan" +msgstr "" + +#: i18n/states.php:254 +msgid "Sistan and Baluchestan" +msgstr "" + +#: i18n/states.php:260 +msgid "Johor" +msgstr "" + +#: i18n/states.php:261 +msgid "Kedah" +msgstr "" + +#: i18n/states.php:262 +msgid "Kelantan" +msgstr "" + +#: i18n/states.php:263 +msgid "Melaka" +msgstr "" + +#: i18n/states.php:264 +msgid "Negeri Sembilan" +msgstr "" + +#: i18n/states.php:265 +msgid "Pahang" +msgstr "" + +#: i18n/states.php:266 +msgid "Perak" +msgstr "" + +#: i18n/states.php:267 +msgid "Perlis" +msgstr "" + +#: i18n/states.php:268 +msgid "Pulau Pinang" +msgstr "" + +#: i18n/states.php:269 +msgid "Sabah" +msgstr "" + +#: i18n/states.php:270 +msgid "Sarawak" +msgstr "" + +#: i18n/states.php:271 +msgid "Selangor" +msgstr "" + +#: i18n/states.php:272 +msgid "Terengganu" +msgstr "" + +#: i18n/states.php:273 +msgid "W.P. Kuala Lumpur" +msgstr "" + +#: i18n/states.php:274 +msgid "W.P. Labuan" +msgstr "" + +#: i18n/states.php:275 +msgid "W.P. Putrajaya" +msgstr "" + +#: i18n/states.php:280 +msgid "Jalisco" +msgstr "" + +#: i18n/states.php:281 +msgid "Nuevo León" +msgstr "" + +#: i18n/states.php:282 +msgid "Aguascalientes" +msgstr "" + +#: i18n/states.php:283 +msgid "Baja California Norte" +msgstr "" + +#: i18n/states.php:284 +msgid "Baja California Sur" +msgstr "" + +#: i18n/states.php:285 +msgid "Campeche" +msgstr "" + +#: i18n/states.php:286 +msgid "Chiapas" +msgstr "" + +#: i18n/states.php:287 +msgid "Chihuahua" +msgstr "" + +#: i18n/states.php:288 +msgid "Coahuila" +msgstr "" + +#: i18n/states.php:289 +msgid "Colima" +msgstr "" + +#: i18n/states.php:290 +msgid "Durango" +msgstr "" + +#: i18n/states.php:291 +msgid "Guanajuato" +msgstr "" + +#: i18n/states.php:292 +msgid "Guerrero" +msgstr "" + +#: i18n/states.php:293 +msgid "Hidalgo" +msgstr "" + +#: i18n/states.php:294 +msgid "Edo. de México" +msgstr "" + +#: i18n/states.php:295 +msgid "Michoacán" +msgstr "" + +#: i18n/states.php:296 +msgid "Morelos" +msgstr "" + +#: i18n/states.php:297 +msgid "Nayarit" +msgstr "" + +#: i18n/states.php:298 +msgid "Oaxaca" +msgstr "" + +#: i18n/states.php:299 +msgid "Puebla" +msgstr "" + +#: i18n/states.php:300 +msgid "Querétaro" +msgstr "" + +#: i18n/states.php:301 +msgid "Quintana Roo" +msgstr "" + +#: i18n/states.php:302 +msgid "San Luis Potosí" +msgstr "" + +#: i18n/states.php:303 +msgid "Sinaloa" +msgstr "" + +#: i18n/states.php:304 +msgid "Sonora" +msgstr "" + +#: i18n/states.php:305 +msgid "Tabasco" +msgstr "" + +#: i18n/states.php:306 +msgid "Tamaulipas" +msgstr "" + +#: i18n/states.php:307 +msgid "Tlaxcala" +msgstr "" + +#: i18n/states.php:308 +msgid "Veracruz" +msgstr "" + +#: i18n/states.php:309 +msgid "Yucatán" +msgstr "" + +#: i18n/states.php:310 +msgid "Zacatecas" +msgstr "" + +#: i18n/states.php:315 +msgid "Drenthe" +msgstr "" + +#: i18n/states.php:316 +msgid "Flevoland" +msgstr "" + +#: i18n/states.php:317 +msgid "Friesland" +msgstr "" + +#: i18n/states.php:318 +msgid "Gelderland" +msgstr "" + +#: i18n/states.php:319 +msgid "Groningen" +msgstr "" + +#: i18n/states.php:320 +msgid "Limburg" +msgstr "" + +#: i18n/states.php:321 +msgid "North Brabant" +msgstr "" + +#: i18n/states.php:322 +msgid "North Holland" +msgstr "" + +#: i18n/states.php:323 +msgid "Overijssel" +msgstr "" + +#: i18n/states.php:324 +msgid "South Holland" +msgstr "" + +#: i18n/states.php:325 +msgid "Utrecht" +msgstr "" + +#: i18n/states.php:326 +msgid "Zeeland" +msgstr "" + +#: i18n/states.php:329 +msgid "Bonaire" +msgstr "" + +#: i18n/states.php:330 +msgid "Saba" +msgstr "" + +#: i18n/states.php:331 +msgid "Sint Eustatius" +msgstr "" + +#: i18n/states.php:335 +msgid "Auckland" +msgstr "" + +#: i18n/states.php:336 +msgid "Bay of Plenty" +msgstr "" + +#: i18n/states.php:337 +msgid "Canterbury" +msgstr "" + +#: i18n/states.php:338 +msgid "Hawke’s Bay" +msgstr "" + +#: i18n/states.php:339 +msgid "Manawatu-Wanganui" +msgstr "" + +#: i18n/states.php:340 +msgid "Marlborough" +msgstr "" + +#: i18n/states.php:341 +msgid "Nelson" +msgstr "" + +#: i18n/states.php:342 +msgid "Northland" +msgstr "" + +#: i18n/states.php:343 +msgid "Otago" +msgstr "" + +#: i18n/states.php:344 +msgid "Southland" +msgstr "" + +#: i18n/states.php:345 +msgid "Taranaki" +msgstr "" + +#: i18n/states.php:346 +msgid "Tasman" +msgstr "" + +#: i18n/states.php:347 +msgid "Waikato" +msgstr "" + +#: i18n/states.php:348 +msgid "Wairarapa" +msgstr "" + +#: i18n/states.php:349 +msgid "Wellington" +msgstr "" + +#: i18n/states.php:350 +msgid "West Coast" +msgstr "" + +#: i18n/states.php:354 +msgid "El Callao" +msgstr "" + +#: i18n/states.php:355 +msgid "Municipalidad Metropolitana de Lima" +msgstr "" + +#: i18n/states.php:357 +msgid "Ancash" +msgstr "" + +#: i18n/states.php:358 +msgid "Apurímac" +msgstr "" + +#: i18n/states.php:359 +msgid "Arequipa" +msgstr "" + +#: i18n/states.php:360 +msgid "Ayacucho" +msgstr "" + +#: i18n/states.php:361 +msgid "Cajamarca" +msgstr "" + +#: i18n/states.php:362 +msgid "Cusco" +msgstr "" + +#: i18n/states.php:363 +msgid "Huancavelica" +msgstr "" + +#: i18n/states.php:364 +msgid "Huánuco" +msgstr "" + +#: i18n/states.php:365 +msgid "Ica" +msgstr "" + +#: i18n/states.php:366 +msgid "Junín" +msgstr "" + +#: i18n/states.php:367 +msgid "La Libertad" +msgstr "" + +#: i18n/states.php:368 +msgid "Lambayeque" +msgstr "" + +#: i18n/states.php:369 +msgid "Lima" +msgstr "" + +#: i18n/states.php:370 +msgid "Loreto" +msgstr "" + +#: i18n/states.php:371 +msgid "Madre de Dios" +msgstr "" + +#: i18n/states.php:372 +msgid "Moquegua" +msgstr "" + +#: i18n/states.php:373 +msgid "Pasco" +msgstr "" + +#: i18n/states.php:374 +msgid "Piura" +msgstr "" + +#: i18n/states.php:375 +msgid "Puno" +msgstr "" + +#: i18n/states.php:376 +msgid "San Martín" +msgstr "" + +#: i18n/states.php:377 +msgid "Tacna" +msgstr "" + +#: i18n/states.php:378 +msgid "Tumbes" +msgstr "" + +#: i18n/states.php:379 +msgid "Ucayali" +msgstr "" + +#: i18n/states.php:383 +msgid "Eastern Cape" +msgstr "" + +#: i18n/states.php:384 +msgid "Free State" +msgstr "" + +#: i18n/states.php:385 +msgid "Gauteng" +msgstr "" + +#: i18n/states.php:386 +msgid "KwaZulu-Natal" +msgstr "" + +#: i18n/states.php:387 +msgid "Limpopo" +msgstr "" + +#: i18n/states.php:388 +msgid "Mpumalanga" +msgstr "" + +#: i18n/states.php:389 +msgid "Northern Cape" +msgstr "" + +#: i18n/states.php:390 +msgid "North West" +msgstr "" + +#: i18n/states.php:391 +msgid "Western Cape" +msgstr "" + +#: includes/admin/adjustments/adjustment-functions.php:53 +#: includes/admin/adjustments/adjustment-functions.php:73 +#: includes/admin/reporting/reports.php:2197 +#: includes/reports/reports-functions.php:348 +#: includes/upgrades/functions.php:148 +#: src/Admin/Menu/Header.php:154 +#: src/Admin/Menu/Pages.php:69 +#: src/Admin/Menu/Pages.php:70 +msgid "Discounts" +msgstr "" + +#: includes/admin/adjustments/adjustment-functions.php:54 +#: includes/admin/payments/payments-history.php:155 +#: includes/post-types.php:46 +msgid "Add New" +msgstr "" + +#: includes/admin/admin-bar.php:57 +msgid "Notifications" +msgstr "" + +#: includes/admin/admin-bar.php:70 +#: src/Admin/Menu/Pages.php:132 +msgid "Store Reports" +msgstr "" + +#: includes/admin/admin-bar.php:81 +msgid "Store Settings" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/admin-bar.php:93 +msgid "All %1$s" +msgstr "" + +#: includes/admin/admin-bar.php:99 +#: includes/gateways/functions.php:29 +msgid "Live" +msgstr "" + +#: includes/admin/admin-bar.php:100 +msgid "Test Mode" +msgstr "" + +#. translators: %s: store status ("Test Mode" or "Live Mode") +#: includes/admin/admin-bar.php:111 +msgid "Store Status: %s" +msgstr "" + +#: includes/admin/admin-bar.php:133 +#: includes/admin/admin-deprecated-functions.php:267 +#: includes/admin/plugins.php:39 +#: src/Admin/Discounts/Generate.php:82 +#: src/Admin/Promos/Notices/Lite.php:42 +#: src/Admin/Settings/Tabs/Gateways.php:315 +#: src/Lite/Admin/Menu.php:36 +#: src/Lite/Admin/Menu.php:37 +msgid "Upgrade to Pro" +msgstr "" + +#. translators: %s: Whether this is a development domain (1 for true, 0 for false) +#: includes/admin/admin-bar.php:148 +msgid "Development Domain %s" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:30 +#: src/Admin/Settings/Tabs/Gateways.php:135 +msgid "Banned Emails" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:32 +msgid "Emails placed in the box below will not be allowed to make purchases." +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:38 +msgid "Enter emails and/or domains (starting with \"@\") and/or TLDs (starting with \".\") to disallow, one per line." +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:43 +#: includes/admin/tools.php:245 +#: includes/admin/views/email-editor/header.php:51 +msgid "Save" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:68 +#: includes/admin/payments/actions.php:76 +#: includes/admin/payments/actions.php:81 +#: includes/admin/payments/actions.php:285 +#: includes/admin/payments/actions.php:317 +#: src/Emails/Triggers.php:125 +msgid "You do not have permission to edit this payment record" +msgstr "" + +#. translators: %s: refund link +#: includes/admin/admin-deprecated-functions.php:68 +#: includes/admin/admin-deprecated-functions.php:816 +#: includes/admin/customers/customer-actions.php:313 +#: includes/admin/customers/customer-actions.php:373 +#: includes/admin/customers/customer-actions.php:567 +#: includes/admin/customers/customer-actions.php:628 +#: includes/admin/discounts/discount-actions.php:32 +#: includes/admin/discounts/discount-actions.php:182 +#: includes/admin/discounts/discount-actions.php:187 +#: includes/admin/discounts/discount-actions.php:196 +#: includes/admin/discounts/discount-actions.php:338 +#: includes/admin/discounts/discount-actions.php:343 +#: includes/admin/discounts/discount-actions.php:348 +#: includes/admin/discounts/discount-actions.php:377 +#: includes/admin/discounts/discount-actions.php:382 +#: includes/admin/discounts/discount-actions.php:410 +#: includes/admin/discounts/discount-actions.php:442 +#: includes/admin/discounts/discount-codes.php:30 +#: includes/admin/discounts/discount-codes.php:39 +#: includes/admin/discounts/discount-codes.php:57 +#: includes/admin/discounts/edit-discount.php:17 +#: includes/admin/discounts/edit-discount.php:28 +#: includes/admin/downloads/dashboard-columns.php:190 +#: includes/admin/import/class-batch-import-downloads.php:67 +#: includes/admin/import/class-batch-import-payments.php:77 +#: includes/admin/import/class-batch-import.php:206 +#: includes/admin/payments/actions.php:76 +#: includes/admin/payments/actions.php:81 +#: includes/admin/payments/actions.php:215 +#: includes/admin/payments/actions.php:253 +#: includes/admin/payments/actions.php:285 +#: includes/admin/payments/actions.php:317 +#: includes/admin/payments/add-order.php:63 +#: includes/admin/payments/add-order.php:67 +#: includes/admin/payments/view-order-details.php:23 +#: includes/admin/payments/view-order-details.php:31 +#: includes/admin/payments/view-order-details.php:43 +#: includes/admin/payments/view-order-details.php:62 +#: includes/admin/payments/view-refund.php:23 +#: includes/admin/payments/view-refund.php:32 +#: includes/admin/reporting/class-api-requests-logs-list-table.php:106 +#: includes/admin/reporting/class-export.php:189 +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:109 +#: includes/admin/reporting/export/class-batch-export.php:178 +#: includes/admin/reporting/export/export-actions.php:24 +#: includes/admin/tools.php:1051 +#: includes/admin/tools.php:1057 +#: includes/admin/tools/class-edd-tools-recount-all-stats.php:78 +#: includes/admin/tools/class-edd-tools-recount-customer-stats.php:114 +#: includes/admin/tools/class-edd-tools-recount-download-stats.php:125 +#: includes/admin/tools/class-edd-tools-recount-single-customer-stats.php:114 +#: includes/admin/tools/class-edd-tools-recount-store-earnings.php:157 +#: includes/admin/tools/class-edd-tools-reset-stats.php:128 +#: includes/admin/upgrades/classes/class-file-download-log-migration.php:134 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:239 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:310 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:407 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:518 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:593 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:711 +#: includes/api/class-edd-api.php:1979 +#: includes/api/class-edd-api.php:1983 +#: includes/api/class-edd-api.php:2005 +#: includes/api/class-edd-api.php:2015 +#: includes/blocks/includes/forms/recaptcha.php:196 +#: includes/cart/class-edd-cart.php:1436 +#: includes/cart/class-edd-cart.php:1450 +#: includes/class-edd-license-handler.php:479 +#: includes/deprecated-functions.php:489 +#: includes/deprecated-functions.php:506 +#: includes/deprecated-functions.php:514 +#: includes/deprecated-functions.php:916 +#: includes/download-functions.php:1521 +#: includes/EDD_SL_Plugin_Updater.php:547 +#: includes/emails/template.php:109 +#: includes/error-tracking.php:60 +#: includes/gateways/functions.php:320 +#: includes/gateways/manual.php:33 +#: includes/gateways/paypal-standard.php:173 +#: includes/gateways/paypal/admin/connect.php:624 +#: includes/gateways/paypal/admin/connect.php:628 +#: includes/gateways/paypal/admin/connect.php:664 +#: includes/gateways/paypal/admin/connect.php:668 +#: includes/gateways/paypal/admin/connect.php:824 +#: includes/gateways/paypal/admin/connect.php:836 +#: includes/gateways/paypal/checkout-actions.php:114 +#: includes/gateways/stripe/includes/admin/upgrade-functions.php:87 +#: includes/process-download.php:307 +#: includes/process-download.php:942 +#: includes/query-filters.php:51 +#: includes/user-functions.php:827 +#: includes/user-functions.php:851 +#: includes/user-functions.php:900 +#: includes/users/lost-password.php:252 +#: src/Admin/Upgrades/v3/Base.php:117 +#: src/Emails/Triggers.php:125 +#: src/Extensions/Updater.php:510 +msgid "Error" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:92 +msgid "Popular" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:93 +msgid "New" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:94 +#: includes/admin/class-list-table.php:138 +msgid "All" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:162 +msgid "Apps and Integrations for Easy Digital Downloads" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:173 +#: includes/admin/admin-deprecated-functions.php:198 +msgid "Browse All Integrations" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:176 +msgid "These add functionality to your Easy Digital Downloads powered store." +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:238 +msgid "These extensions could not be retrieved from the server. Please try again later." +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:263 +#: src/Admin/Extensions/Menu.php:46 +msgid "EDD Extensions" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:263 +#: includes/admin/settings/contextual-help.php:140 +#: includes/admin/settings/register-settings.php:498 +#: src/Admin/Extensions/Menu.php:47 +msgid "Extensions" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:301 +msgid "System Information" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:304 +msgid "Use the system information below to help troubleshoot problems." +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:315 +msgid "Download System Info File" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:316 +#: includes/admin/tools.php:1156 +msgid "Copy to Clipboard" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:816 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:239 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:310 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:407 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:518 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:593 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:711 +#: includes/gateways/stripe/includes/admin/upgrade-functions.php:87 +msgid "You do not have permission to do shop upgrades" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:923 +msgid "Preview Purchase Receipt" +msgstr "" + +#: includes/admin/admin-deprecated-functions.php:924 +#: src/Admin/Settings/Tabs/Emails.php:193 +msgid "Send Test Email" +msgstr "" + +#: includes/admin/class-api-keys-table.php:126 +#: includes/user-functions.php:1057 +msgid "Never Used" +msgstr "" + +#. translators: %s: a length of time (e.g. "1 second") +#: includes/admin/class-api-keys-table.php:138 +#: includes/user-functions.php:1068 +#: src/Models/Notification.php:187 +msgid "%s ago" +msgstr "" + +#: includes/admin/class-api-keys-table.php:167 +msgid "View Log" +msgstr "" + +#: includes/admin/class-api-keys-table.php:185 +msgid "Reissue" +msgstr "" + +#: includes/admin/class-api-keys-table.php:202 +msgid "Revoke" +msgstr "" + +#: includes/admin/class-api-keys-table.php:218 +#: includes/blocks/views/checkout/purchase-form/register.php:7 +#: includes/checkout/template.php:508 +#: includes/checkout/template.php:517 +#: src/Emails/Tags/Registry.php:91 +#: templates/shortcode-register.php:20 +msgid "Username" +msgstr "" + +#: includes/admin/class-api-keys-table.php:219 +msgid "Public Key" +msgstr "" + +#: includes/admin/class-api-keys-table.php:220 +msgid "Token" +msgstr "" + +#: includes/admin/class-api-keys-table.php:221 +msgid "Secret Key" +msgstr "" + +#: includes/admin/class-api-keys-table.php:222 +msgid "Last Used" +msgstr "" + +#: includes/admin/class-api-keys-table.php:261 +msgid "Generate New API Keys" +msgstr "" + +#. translators: %s: URL to the settings page +#: includes/admin/class-edd-notices.php:283 +msgid "No checkout page is configured. Set one in Settings." +msgstr "" + +#. translators: %s: Uploads directory +#: includes/admin/class-edd-notices.php:355 +msgid "The files in %s are not currently protected." +msgstr "" + +#: includes/admin/class-edd-notices.php:356 +msgid "To protect them, you must add this NGINX redirect rule." +msgstr "" + +#. translators: %s: Dismiss notice URL +#: includes/admin/class-edd-notices.php:360 +msgid "If you have already done this, or it does not apply to your site, you may permanently dismiss this notice." +msgstr "" + +#. translators: %s: Uploads directory +#: includes/admin/class-edd-notices.php:393 +#: src/Admin/SiteHealth/Direct.php:217 +msgid "The .htaccess file is missing from: %s" +msgstr "" + +#. translators: %s: Uploads directory +#: includes/admin/class-edd-notices.php:395 +#: src/Admin/SiteHealth/Direct.php:222 +msgid "First, please re-save the Misc settings tab a few times. If this warning continues to appear, create a file called \".htaccess\" in the %s directory, and copy the following into it:" +msgstr "" + +#. translators: %s: Notice Dismissal URL +#: includes/admin/class-edd-notices.php:397 +msgid "If you have already done this, or it does not apply to your site, you may permanently %s." +msgstr "" + +#. translators: %s: Notice Dismissal URL +#: includes/admin/class-edd-notices.php:397 +msgid "dismiss this notice" +msgstr "" + +#. translators: 1: link to the recount tool, 2: link to the plugins screen. +#: includes/admin/class-edd-notices.php:421 +msgid "Easy Digital Downloads 2.5 contains a built in recount tool. Please deactivate the Easy Digital Downloads - Recount Earnings plugin" +msgstr "" + +#: includes/admin/class-edd-notices.php:465 +#: src/Admin/Notifications/GBLegacy.php:123 +msgid "Review Tax Rates" +msgstr "" + +#: includes/admin/class-edd-notices.php:472 +msgid "A default tax rate was detected." +msgstr "" + +#: includes/admin/class-edd-notices.php:472 +msgid "This setting is no longer used in this version of Easy Digital Downloads. Please confirm your regional tax rates are properly configured and update tax settings to remove this notice." +msgstr "" + +#: includes/admin/class-edd-notices.php:496 +msgid "Settings updated." +msgstr "" + +#. translators: %s: Next order number +#: includes/admin/class-edd-notices.php:509 +msgid "The sequential starting number could not be updated because it could conflict with existing orders. The next assigned order number is %s." +msgstr "" + +#: includes/admin/class-edd-notices.php:541 +msgid "Easy Digital Downloads is migrating orders. Sales and earnings data for your store will be updated when all orders have been migrated." +msgstr "" + +#. translators: 1: opening link tag, 2: opening link tag, 3: closing link tag. +#: includes/admin/class-edd-notices.php:564 +msgid "You are running an outdated version of the Easy Digital Downloads — Stripe Pro Payment Gateway. You may need to log into %1$syour account%3$s to download the latest version and %2$smanually upgrade%3$s it." +msgstr "" + +#. translators: 1: Opening anchor tag; %2$s: Closing anchor tag. +#: includes/admin/class-edd-notices.php:598 +msgid "New webhooks have been registered for PayPal Commerce, but we were unable to update them automatically. Please %1$ssync your webhooks manually%2$s." +msgstr "" + +#: includes/admin/class-edd-notices.php:631 +msgid "Discount code added." +msgstr "" + +#: includes/admin/class-edd-notices.php:639 +msgid "There was a problem adding that discount code, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:648 +msgid "A discount with that code already exists, please use a different code." +msgstr "" + +#: includes/admin/class-edd-notices.php:657 +msgid "Discount code updated." +msgstr "" + +#: includes/admin/class-edd-notices.php:665 +msgid "No changes were made to that discount code." +msgstr "" + +#: includes/admin/class-edd-notices.php:673 +msgid "There was a problem updating that discount code, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:682 +msgid "The discount code could not be added because one or more of the required fields was empty, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:691 +msgid "The discount code entered is invalid; only alphanumeric characters are allowed, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:700 +msgid "The discount amount must be a valid percentage or numeric flat amount. Please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:709 +msgid "Discount code deleted." +msgstr "" + +#: includes/admin/class-edd-notices.php:717 +msgid "There was a problem deleting that discount code, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:726 +msgid "Discount code activated." +msgstr "" + +#: includes/admin/class-edd-notices.php:734 +msgid "There was a problem activating that discount code, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:743 +msgid "Discount code deactivated." +msgstr "" + +#: includes/admin/class-edd-notices.php:751 +msgid "There was a problem deactivating that discount code, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:760 +msgid "Discount code archived." +msgstr "" + +#: includes/admin/class-edd-notices.php:768 +msgid "There was a problem archiving that discount code, please try again." +msgstr "" + +#: includes/admin/class-edd-notices.php:783 +msgid "The reports have been refreshed." +msgstr "" + +#: includes/admin/class-edd-notices.php:797 +msgid "The settings have been imported." +msgstr "" + +#: includes/admin/class-edd-notices.php:805 +msgid "API keys successfully generated." +msgstr "" + +#: includes/admin/class-edd-notices.php:813 +msgid "The specified user already has API keys." +msgstr "" + +#: includes/admin/class-edd-notices.php:822 +msgid "API keys successfully regenerated." +msgstr "" + +#: includes/admin/class-edd-notices.php:830 +msgid "API keys successfully revoked." +msgstr "" + +#: includes/admin/class-edd-notices.php:838 +msgid "The test email summary was sent successfully." +msgstr "" + +#: includes/admin/class-edd-notices.php:847 +msgid "Your extensions could not be refreshed because you have not verified your license key." +msgstr "" + +#: includes/admin/class-edd-notices.php:857 +msgid "Webhooks have been created for the Stripe gateway." +msgstr "" + +#: includes/admin/class-edd-notices.php:866 +msgid "There was an error creating webhooks for the Stripe gateway." +msgstr "" + +#: includes/admin/class-edd-notices.php:881 +msgid "The note has been added successfully." +msgstr "" + +#: includes/admin/class-edd-notices.php:889 +msgid "The order has been updated successfully." +msgstr "" + +#: includes/admin/class-edd-notices.php:897 +msgid "Order successfully created." +msgstr "" + +#: includes/admin/class-edd-notices.php:905 +msgid "The order has been moved to the trash." +msgstr "" + +#: includes/admin/class-edd-notices.php:913 +msgid "The order has been restored." +msgstr "" + +#: includes/admin/class-edd-notices.php:921 +msgid "The order has been deleted." +msgstr "" + +#: includes/admin/class-edd-notices.php:929 +msgid "The purchase receipt has been resent." +msgstr "" + +#: includes/admin/class-edd-notices.php:937 +msgid "The purchase receipt could not be resent." +msgstr "" + +#: includes/admin/class-edd-notices.php:946 +msgid "The purchase receipt may not have been sent." +msgstr "" + +#: includes/admin/class-edd-notices.php:955 +msgid "The order note has been deleted." +msgstr "" + +#: includes/admin/class-edd-notices.php:963 +msgid "The order values have been recalculated." +msgstr "" + +#: includes/admin/class-edd-notices.php:971 +msgid "The order values could not be recalculated." +msgstr "" + +#: includes/admin/class-edd-notices.php:986 +msgid "Customer successfully deleted." +msgstr "" + +#: includes/admin/class-edd-notices.php:994 +msgid "User successfully verified." +msgstr "" + +#: includes/admin/class-edd-notices.php:1002 +msgid "Customer email added." +msgstr "" + +#: includes/admin/class-edd-notices.php:1010 +msgid "Customer email deleted." +msgstr "" + +#: includes/admin/class-edd-notices.php:1018 +msgid "Failed to delete customer email." +msgstr "" + +#: includes/admin/class-edd-notices.php:1027 +msgid "Primary email updated for customer." +msgstr "" + +#: includes/admin/class-edd-notices.php:1035 +msgid "Failed to set primary email." +msgstr "" + +#: includes/admin/class-edd-notices.php:1044 +msgid "Customer address deleted." +msgstr "" + +#: includes/admin/class-edd-notices.php:1052 +msgid "Failed to delete customer address." +msgstr "" + +#. translators: 1: opening strong tag, do not translate, 2: closing strong tag, do not translate +#: includes/admin/class-edd-notices.php:1066 +msgid "Congratulations! You are now running %1$sEasy Digital Downloads (Pro)%2$s." +msgstr "" + +#: includes/admin/class-edd-notices.php:1078 +msgid "The user capabilities for Easy Digital Downloads have been reset." +msgstr "" + +#: includes/admin/class-edd-notices.php:1120 +msgid "Easy Digital Downloads debug logging is enabled. Please only leave it enabled for as long as it is needed for troubleshooting." +msgstr "" + +#: includes/admin/class-edd-notices.php:1123 +msgid "View Debug Log" +msgstr "" + +#: includes/admin/class-edd-notices.php:1124 +msgid "Delete Log File and Disable Logging" +msgstr "" + +#: includes/admin/class-edd-notices.php:1140 +#: includes/admin/customers/customer-actions.php:620 +#: includes/admin/emails/email-summary/class-edd-email-summary-admin.php:55 +#: includes/admin/tools/class-edd-tools-recount-all-stats.php:78 +#: includes/admin/tools/class-edd-tools-recount-download-stats.php:125 +#: includes/gateways/paypal/admin/connect.php:140 +#: includes/gateways/paypal/admin/connect.php:250 +#: includes/gateways/paypal/admin/connect.php:304 +#: includes/gateways/paypal/admin/connect.php:432 +#: includes/gateways/paypal/admin/connect.php:624 +#: includes/gateways/paypal/admin/connect.php:628 +#: includes/gateways/paypal/admin/connect.php:664 +#: includes/gateways/paypal/admin/connect.php:668 +#: includes/gateways/paypal/admin/connect.php:730 +#: includes/gateways/paypal/admin/connect.php:763 +#: includes/gateways/paypal/admin/connect.php:785 +#: includes/gateways/paypal/admin/connect.php:835 +#: src/Admin/Emails/Manager.php:50 +#: src/Admin/Emails/Manager.php:97 +#: src/Admin/Emails/Manager.php:203 +#: src/Admin/Promos/PromoHandler.php:156 +#: src/Admin/Promos/PromoHandler.php:163 +#: src/Admin/Promos/PromoHandler.php:168 +#: src/Admin/Promos/PromoHandler.php:192 +msgid "You do not have permission to perform this action." +msgstr "" + +#: includes/admin/class-edd-notices.php:1145 +msgid "The debug log has been cleared and logging has been disabled." +msgstr "" + +#: includes/admin/class-sections.php:100 +#: includes/admin/discounts/contextual-help.php:58 +#: includes/admin/settings/contextual-help.php:64 +#: includes/admin/settings/register-settings.php:491 +#: includes/admin/settings/register-settings.php:542 +#: includes/admin/settings/register-settings.php:548 +#: includes/admin/settings/register-settings.php:552 +#: includes/admin/settings/register-settings.php:555 +#: includes/admin/settings/register-settings.php:559 +#: includes/admin/settings/register-settings.php:572 +#: includes/gateways/stripe/includes/admin/admin-filters.php:61 +#: src/Admin/Settings/Screen.php:183 +#: src/Admin/Tools/Screen.php:69 +msgid "General" +msgstr "" + +#: includes/admin/class-sections.php:288 +msgid "Invalid section" +msgstr "" + +#: includes/admin/class-sections.php:317 +msgid "Empty" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:73 +#: includes/admin/customers/class-customer-email-addresses-table.php:80 +#: includes/admin/customers/customers.php:975 +#: includes/admin/customers/customers.php:1161 +msgid "Primary" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:142 +#: includes/admin/customers/class-customer-email-addresses-table.php:135 +#: includes/admin/customers/class-customer-table.php:131 +#: includes/admin/payments/orders.php:1124 +#: includes/misc-functions.php:1532 +#: includes/payments/functions.php:537 +msgid "Pending" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:147 +#: includes/admin/customers/class-customer-email-addresses-table.php:140 +#: includes/admin/customers/class-customer-table.php:142 +#: includes/admin/customers/customers.php:566 +#: includes/admin/discounts/edit-discount.php:299 +#: includes/class-edd-discount.php:706 +#: includes/misc-functions.php:1527 +#: src/Admin/Promos/About.php:834 +msgid "Active" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:177 +#: includes/admin/customers/class-customer-email-addresses-table.php:170 +msgid "View" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:192 +#: includes/admin/customers/class-customer-addresses-table.php:333 +#: includes/admin/customers/class-customer-email-addresses-table.php:187 +#: includes/admin/customers/class-customer-email-addresses-table.php:321 +#: includes/admin/customers/class-customer-table.php:197 +#: includes/admin/customers/class-customer-table.php:285 +#: includes/admin/customers/customers.php:1011 +#: includes/admin/customers/customers.php:1164 +#: includes/admin/customers/customers.php:1243 +#: includes/admin/discounts/class-discount-codes-table.php:282 +#: includes/admin/discounts/class-discount-codes-table.php:451 +#: includes/gateways/stripe/includes/template-functions.php:492 +#: src/Admin/PassHandler/Handler.php:74 +#: src/Admin/Settings/Tabs/Privacy.php:130 +#: src/Licensing/Traits/Controls.php:83 +msgid "Delete" +msgstr "" + +#. translators: customer address id +#: includes/admin/customers/class-customer-addresses-table.php:260 +msgid "Address ID: %s" +msgstr "" + +#. translators: %s: the customer name +#: includes/admin/customers/class-customer-addresses-table.php:271 +msgctxt "Noun: The customer name" +msgid "Select %s" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:297 +#: includes/admin/customers/customers.php:1094 +#: includes/admin/customers/customers.php:1119 +#: includes/admin/payments/orders.php:136 +#: includes/admin/payments/orders.php:165 +#: includes/admin/reporting/class-export-payments.php:61 +#: includes/admin/reporting/export/class-batch-export-payments.php:46 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:63 +#: includes/blocks/views/checkout/purchase-form/address.php:32 +msgid "Address" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:298 +#: includes/admin/customers/customers.php:1096 +#: includes/admin/customers/customers.php:1137 +#: includes/admin/views/tmpl-tax-rates-table-add.php:26 +#: includes/admin/views/tmpl-tax-rates-table-meta.php:17 +#: includes/admin/views/tmpl-tax-rates-table-row.php:27 +msgid "Region" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:299 +#: includes/admin/customers/customers.php:1098 +#: includes/admin/customers/customers.php:1151 +#: includes/admin/reporting/class-export-payments.php:65 +#: includes/admin/reporting/export/class-batch-export-payments.php:50 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:67 +#: includes/admin/tools.php:690 +#: includes/admin/views/tmpl-tax-rates-table-add.php:17 +#: includes/admin/views/tmpl-tax-rates-table-meta.php:16 +#: includes/admin/views/tmpl-tax-rates-table-row.php:18 +#: includes/blocks/views/checkout/purchase-form/address.php:8 +#: includes/gateways/stripe/includes/template-functions.php:561 +#: includes/gateways/stripe/includes/template-functions.php:570 +#: templates/shortcode-profile-editor.php:168 +msgid "Country" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:300 +#: includes/admin/customers/class-customer-email-addresses-table.php:290 +#: includes/admin/customers/customer-functions.php:134 +#: includes/admin/payments/class-payments-table.php:425 +#: includes/admin/payments/orders.php:124 +#: includes/admin/payments/orders.php:159 +#: includes/admin/reporting/class-file-downloads-logs-list-table.php:111 +#: includes/admin/reporting/class-sales-logs-list-table.php:98 +#: src/Emails/Templates/Registry.php:78 +msgid "Customer" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:301 +#: includes/admin/customers/class-customer-email-addresses-table.php:291 +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:17 +msgid "Type" +msgstr "" + +#: includes/admin/customers/class-customer-addresses-table.php:302 +#: includes/admin/customers/class-customer-email-addresses-table.php:292 +#: includes/admin/customers/class-customer-table.php:256 +#: includes/admin/customers/customers.php:796 +#: includes/admin/customers/customers.php:846 +#: includes/admin/downloads/dashboard-columns.php:37 +#: includes/admin/payments/class-payments-table.php:428 +#: includes/admin/payments/orders.php:1247 +#: includes/admin/reporting/class-api-requests-logs-list-table.php:53 +#: includes/admin/reporting/class-export-download-history.php:59 +#: includes/admin/reporting/class-export-payments.php:76 +#: includes/admin/reporting/class-export.php:77 +#: includes/admin/reporting/class-file-downloads-logs-list-table.php:116 +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:112 +#: includes/admin/reporting/class-sales-logs-list-table.php:101 +#: includes/admin/reporting/export/class-batch-export-api-requests.php:46 +#: includes/admin/reporting/export/class-batch-export-file-downloads.php:50 +#: includes/admin/reporting/export/class-batch-export-payments.php:62 +#: includes/admin/reporting/export/class-batch-export-sales-and-earnings.php:59 +#: includes/admin/reporting/export/class-batch-export-sales.php:66 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:78 +#: includes/admin/tools.php:555 +#: includes/blocks/views/orders/totals.php:38 +#: includes/privacy-functions.php:991 +#: includes/reports/reports-functions.php:328 +#: templates/history-purchases.php:52 +#: templates/shortcode-receipt.php:69 +msgid "Date" +msgstr "" + +#: includes/admin/customers/class-customer-email-addresses-table.php:81 +msgid "Secondary" +msgstr "" + +#: includes/admin/customers/class-customer-email-addresses-table.php:254 +msgid "Primary email addresses cannot be deleted." +msgstr "" + +#. translators: %s: the customer email address +#: includes/admin/customers/class-customer-email-addresses-table.php:261 +msgctxt "Noun: The customer email address" +msgid "Select %s" +msgstr "" + +#: includes/admin/customers/class-customer-email-addresses-table.php:289 +#: includes/admin/customers/class-customer-table.php:253 +#: includes/admin/customers/customers.php:959 +#: includes/admin/payments/orders.php:130 +#: includes/admin/payments/orders.php:290 +#: includes/admin/reporting/class-export-customers.php:63 +#: includes/admin/reporting/class-export-customers.php:74 +#: includes/admin/reporting/class-export-payments.php:58 +#: includes/admin/reporting/export/class-batch-export-customers.php:54 +#: includes/admin/reporting/export/class-batch-export-payments.php:43 +#: includes/admin/reporting/export/class-batch-export-sales.php:57 +#: includes/admin/reporting/export/class-batch-export-taxed-customers.php:43 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:59 +#: includes/admin/tools.php:446 +#: includes/blocks/views/forms/registration.php:25 +#: src/Admin/Emails/ListTable.php:75 +#: src/Emails/Tags/Registry.php:98 +#: templates/shortcode-register.php:25 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/register/edit.js:51 +msgid "Email" +msgstr "" + +#: includes/admin/customers/class-customer-table.php:134 +#: includes/admin/customers/customers.php:568 +#: includes/admin/views/email-editor/status.php:25 +#: includes/class-edd-cli.php:69 +#: includes/class-edd-cli.php:79 +#: includes/class-edd-cli.php:88 +#: includes/class-edd-cli.php:99 +#: includes/class-edd-cli.php:160 +#: includes/gateways/paypal-standard.php:95 +#: src/Admin/Settings/Tabs/Gateways.php:121 +msgid "Disabled" +msgstr "" + +#: includes/admin/customers/class-customer-table.php:137 +#: includes/admin/customers/customers.php:567 +#: includes/admin/discounts/edit-discount.php:300 +#: includes/class-edd-discount.php:700 +#: includes/misc-functions.php:1528 +#: src/Admin/Promos/About.php:840 +msgid "Inactive" +msgstr "" + +#: includes/admin/customers/class-customer-table.php:195 +#: includes/admin/discounts/class-discount-codes-table.php:220 +#: includes/admin/payments/class-payments-table.php:568 +#: src/Emails/Templates/Traits/Actions.php:41 +msgid "Edit" +msgstr "" + +#: includes/admin/customers/class-customer-table.php:196 +#: includes/admin/payments/orders.php:598 +#: includes/upgrades/functions.php:168 +#: src/Admin/Emails/Screen.php:37 +#: src/Admin/Tools/Screen.php:72 +msgid "Logs" +msgstr "" + +#. translators: %s: the customer name or email address +#: includes/admin/customers/class-customer-table.php:227 +msgctxt "Noun: The customer name or Email Address" +msgid "Select %s" +msgstr "" + +#: includes/admin/customers/class-customer-table.php:252 +#: includes/admin/discounts/add-discount.php:31 +#: includes/admin/discounts/class-discount-codes-table.php:79 +#: includes/admin/discounts/edit-discount.php:72 +#: includes/admin/downloads/dashboard-columns.php:31 +#: includes/admin/reporting/class-export-customers.php:71 +#: includes/admin/reporting/export/class-batch-export-customers.php:53 +#: includes/admin/reporting/export/class-batch-export-downloads.php:43 +#: includes/admin/reporting/export/class-batch-export-sales.php:58 +#: includes/admin/reporting/export/class-batch-export-taxed-customers.php:42 +#: includes/admin/tools.php:455 +#: includes/privacy-functions.php:639 +#: includes/reports/data/discounts/class-top-five-discounts-list-table.php:75 +#: includes/reports/data/downloads/class-top-selling-downloads-list-table.php:55 +#: includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php:57 +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:178 +#: templates/shortcode-receipt.php:204 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:35 +msgid "Name" +msgstr "" + +#: includes/admin/customers/class-customer-table.php:254 +#: includes/admin/payments/payments-history.php:148 +#: includes/orders/functions/types.php:85 +#: includes/upgrades/functions.php:152 +#: src/Admin/Menu/Header.php:151 +#: src/Admin/Menu/Pages.php:57 +#: src/Admin/Menu/Pages.php:58 +msgid "Orders" +msgstr "" + +#: includes/admin/customers/class-customer-table.php:255 +msgid "Spent" +msgstr "" + +#: includes/admin/customers/customer-actions.php:33 +#: includes/admin/customers/customer-actions.php:196 +#: includes/admin/customers/customer-actions.php:317 +#: includes/admin/customers/customer-actions.php:377 +#: includes/admin/customers/customer-actions.php:506 +#: includes/admin/customers/customer-actions.php:571 +msgid "You do not have permission to edit this customer." +msgstr "" + +#: includes/admin/customers/customer-actions.php:42 +#: includes/admin/customers/customer-actions.php:216 +#: includes/admin/customers/customer-actions.php:313 +#: includes/admin/customers/customer-actions.php:373 +#: includes/admin/customers/customer-actions.php:434 +#: includes/admin/customers/customer-actions.php:517 +#: includes/admin/customers/customer-actions.php:567 +#: includes/admin/customers/customer-actions.php:628 +#: includes/admin/discounts/discount-actions.php:338 +#: includes/admin/discounts/discount-actions.php:377 +#: includes/admin/discounts/discount-actions.php:410 +#: includes/admin/discounts/discount-actions.php:442 +#: includes/admin/import/import-functions.php:27 +#: includes/admin/import/import-functions.php:108 +#: includes/admin/reporting/export/export-actions.php:24 +#: includes/api/class-edd-api.php:1979 +#: includes/class-edd-license-handler.php:479 +#: includes/emails/recapture.php:24 +#: includes/user-functions.php:851 +#: src/Admin/Emails/Manager.php:46 +#: src/Admin/Emails/Manager.php:207 +msgid "Nonce verification failed." +msgstr "" + +#: includes/admin/customers/customer-actions.php:60 +msgid "Please enter a valid email address." +msgstr "" + +#. translators: %d: user ID +#: includes/admin/customers/customer-actions.php:68 +msgid "The User ID %d is already associated with a different customer." +msgstr "" + +#. translators: %d: user ID +#: includes/admin/customers/customer-actions.php:75 +msgid "The User ID %d does not exist. Please assign an existing user." +msgstr "" + +#. translators: %s: user login or email address +#: includes/admin/customers/customer-actions.php:102 +msgid "Failed to attach user. The login or email address %s was not found." +msgstr "" + +#: includes/admin/customers/customer-actions.php:206 +msgid "Email address is missing." +msgstr "" + +#: includes/admin/customers/customer-actions.php:208 +msgid "Customer ID is required." +msgstr "" + +#: includes/admin/customers/customer-actions.php:210 +msgid "An error has occured. Please try again." +msgstr "" + +#: includes/admin/customers/customer-actions.php:222 +msgid "Invalid email address." +msgstr "" + +#: includes/admin/customers/customer-actions.php:237 +msgid "Email already associated with this customer." +msgstr "" + +#: includes/admin/customers/customer-actions.php:243 +msgid "Email address is already associated with another customer." +msgstr "" + +#: includes/admin/customers/customer-actions.php:259 +msgid "Email successfully added to customer." +msgstr "" + +#. translators: 1: email address, 2: username +#: includes/admin/customers/customer-actions.php:266 +msgid "Email address %1$s added by %2$s" +msgstr "" + +#. translators: 1: email address, 2: username +#: includes/admin/customers/customer-actions.php:271 +#: includes/admin/customers/customer-actions.php:393 +msgid "Email address %1$s set as primary by %2$s" +msgstr "" + +#. translators: 1: email address, 2: username +#: includes/admin/customers/customer-actions.php:333 +#: includes/shortcodes.php:997 +msgid "Email address %1$s removed by %2$s" +msgstr "" + +#: includes/admin/customers/customer-actions.php:421 +msgid "You do not have permission to delete this customer." +msgstr "" + +#: includes/admin/customers/customer-actions.php:438 +msgid "Please confirm you want to delete this customer" +msgstr "" + +#: includes/admin/customers/customer-actions.php:484 +msgid "Error deleting customer" +msgstr "" + +#: includes/admin/customers/customer-actions.php:489 +msgid "Invalid Customer ID" +msgstr "" + +#: includes/admin/customers/customer-actions.php:536 +msgid "Failed to disconnect user from customer" +msgstr "" + +#: includes/admin/customers/customer-functions.php:43 +msgctxt "Customer Details tab title" +msgid "Profile" +msgstr "" + +#: includes/admin/customers/customer-functions.php:44 +msgctxt "Customer Emails tab title" +msgid "Emails" +msgstr "" + +#: includes/admin/customers/customer-functions.php:45 +msgctxt "Customer Addresses tab title" +msgid "Addresses" +msgstr "" + +#: includes/admin/customers/customer-functions.php:46 +msgctxt "Customer Notes tab title" +msgid "Notes" +msgstr "" + +#: includes/admin/customers/customer-functions.php:47 +msgctxt "Customer Tools tab title" +msgid "Tools" +msgstr "" + +#: includes/admin/customers/customer-functions.php:63 +msgctxt "Delete Customer tab title" +msgid "Delete" +msgstr "" + +#. translators: link to send an email +#: includes/admin/customers/customer-functions.php:110 +#: templates/account-pending.php:8 +msgid "Your account is pending verification. Please click the link in your email to activate your account. No email? Click here to send a new activation code." +msgstr "" + +#: includes/admin/customers/customer-functions.php:111 +msgid "Account Pending Verification" +msgstr "" + +#: includes/admin/customers/customer-functions.php:156 +#: includes/admin/reporting/class-sales-logs-list-table.php:64 +msgid "Unnamed Customer" +msgstr "" + +#: includes/admin/customers/customers.php:65 +#: includes/admin/reporting/reports.php:2472 +#: src/Admin/Menu/Header.php:157 +#: src/Admin/Menu/Pages.php:63 +#: src/Admin/Menu/Pages.php:64 +msgid "Customers" +msgstr "" + +#: includes/admin/customers/customers.php:66 +msgid "Email Addresses" +msgstr "" + +#: includes/admin/customers/customers.php:67 +msgid "Physical Addresses" +msgstr "" + +#. translators: the active screen, eg "Search Customers" or "Search Customer Email Addresses" +#: includes/admin/customers/customers.php:252 +msgctxt "Noun: Customers or Customer Email Addresses placeholder for a search box" +msgid "Search %s" +msgstr "" + +#: includes/admin/customers/customers.php:283 +msgid "You are not permitted to view this data." +msgstr "" + +#: includes/admin/customers/customers.php:288 +#: includes/admin/customers/customers.php:296 +msgid "Invalid Customer ID Provided." +msgstr "" + +#: includes/admin/customers/customers.php:303 +msgid "Customer Details" +msgstr "" + +#: includes/admin/customers/customers.php:474 +msgid "Edit Profile" +msgstr "" + +#: includes/admin/customers/customers.php:480 +#: includes/admin/thickbox.php:183 +#: includes/gateways/stripe/includes/template-functions.php:651 +#: includes/gateways/stripe/includes/template-functions.php:694 +#: src/Admin/Assets/Localization.php:107 +#: src/Admin/Emails/Reset.php:52 +msgid "Cancel" +msgstr "" + +#: includes/admin/customers/customers.php:481 +#: includes/gateways/stripe/includes/template-functions.php:476 +msgid "Update" +msgstr "" + +#: includes/admin/customers/customers.php:491 +msgid "Customer Address" +msgstr "" + +#: includes/admin/customers/customers.php:503 +msgid "Address 1" +msgstr "" + +#: includes/admin/customers/customers.php:504 +msgid "Address 2" +msgstr "" + +#: includes/admin/customers/customers.php:505 +#: includes/admin/customers/customers.php:1095 +#: includes/admin/customers/customers.php:1130 +#: includes/admin/reporting/class-export-payments.php:63 +#: includes/admin/reporting/export/class-batch-export-payments.php:48 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:65 +#: includes/admin/tools.php:662 +#: includes/blocks/views/checkout/purchase-form/address.php:54 +#: includes/blocks/views/checkout/purchase-form/address.php:60 +#: includes/checkout/template.php:393 +#: includes/gateways/stripe/includes/template-functions.php:536 +#: templates/shortcode-profile-editor.php:158 +msgid "City" +msgstr "" + +#: includes/admin/customers/customers.php:529 +#: includes/admin/tools.php:671 +#: templates/shortcode-profile-editor.php:177 +msgid "State / Province" +msgstr "" + +#: includes/admin/customers/customers.php:533 +#: includes/admin/customers/customers.php:1097 +#: includes/admin/customers/customers.php:1144 +msgid "Postal Code" +msgstr "" + +#: includes/admin/customers/customers.php:540 +#: includes/admin/reporting/export/class-batch-export-payments.php:45 +msgid "Customer Name" +msgstr "" + +#: includes/admin/customers/customers.php:547 +#: includes/admin/payments/orders.php:370 +msgid "Customer Email" +msgstr "" + +#: includes/admin/customers/customers.php:553 +msgid "Customer Since" +msgstr "" + +#. translators: %s: i18n formatted date that the customer was created +#: includes/admin/customers/customers.php:559 +#: includes/admin/payments/orders.php:248 +msgid "Customer since %s" +msgstr "" + +#. translators: %s: user id +#: includes/admin/customers/customers.php:582 +msgid "User %s missing" +msgstr "" + +#: includes/admin/customers/customers.php:591 +msgid "Not a registered user" +msgstr "" + +#. translators: the customer's lifetime number of sales +#: includes/admin/customers/customers.php:631 +msgid "%s Completed Sale" +msgid_plural "%s Completed Sales" +msgstr[0] "" +msgstr[1] "" + +#. translators: the customer's lifetime value +#: includes/admin/customers/customers.php:651 +msgid "%s Lifetime Value" +msgstr "" + +#: includes/admin/customers/customers.php:670 +msgid "Agreements" +msgstr "" + +#: includes/admin/customers/customers.php:682 +#: includes/admin/customers/customers.php:712 +msgid " — Agreed to Terms" +msgstr "" + +#: includes/admin/customers/customers.php:698 +#: includes/admin/customers/customers.php:753 +msgid "Previous Agreement Dates" +msgstr "" + +#: includes/admin/customers/customers.php:715 +msgid "Estimated Terms Agreement Date" +msgstr "" + +#: includes/admin/customers/customers.php:716 +msgid "This customer made a purchase prior to agreement dates being logged, this is the date of their last purchase. If your site was displaying the agreement checkbox at that time, this is our best estimate as to when they last agreed to your terms." +msgstr "" + +#: includes/admin/customers/customers.php:721 +msgid "No terms agreement found." +msgstr "" + +#: includes/admin/customers/customers.php:737 +#: includes/admin/customers/customers.php:768 +msgid " — Agreed to Privacy Policy" +msgstr "" + +#: includes/admin/customers/customers.php:771 +msgid "Estimated Privacy Policy Date" +msgstr "" + +#: includes/admin/customers/customers.php:772 +msgid "This customer made a purchase prior to privacy policy dates being logged, this is the date of their last purchase. If your site was displaying the privacy policy checkbox at that time, this is our best estimate as to when they last agreed to your privacy policy." +msgstr "" + +#: includes/admin/customers/customers.php:777 +msgid "No privacy policy agreement found." +msgstr "" + +#: includes/admin/customers/customers.php:789 +#: includes/admin/dashboard-widgets.php:224 +msgid "Recent Orders" +msgstr "" + +#: includes/admin/customers/customers.php:793 +#: includes/admin/customers/customers.php:843 +#: includes/admin/payments/class-payments-table.php:424 +msgid "Number" +msgstr "" + +#: includes/admin/customers/customers.php:794 +#: includes/admin/customers/customers.php:844 +#: includes/admin/payments/class-payments-table.php:426 +#: includes/admin/payments/orders.php:945 +#: includes/admin/payments/orders.php:951 +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:111 +#: includes/admin/reporting/class-gateways-reports-table.php:74 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:75 +#: includes/reports/data/payment-gateways/class-gateway-stats-list-table.php:76 +msgid "Gateway" +msgstr "" + +#: includes/admin/customers/customers.php:795 +#: includes/admin/customers/customers.php:845 +#: includes/admin/payments/class-payments-table.php:427 +#: includes/admin/payments/class-refund-items-table.php:90 +#: includes/admin/tools.php:612 +#: includes/admin/views/tmpl-order-refund.php:39 +#: includes/admin/views/tmpl-order-total.php:16 +#: includes/blocks/views/checkout/cart/cart-total.php:8 +#: includes/blocks/views/orders/totals.php:63 +#: includes/gateways/stripe/includes/payment-methods/payment-request/functions.php:149 +#: includes/gateways/stripe/includes/payment-methods/payment-request/functions.php:196 +#: templates/checkout_cart.php:129 +#: templates/shortcode-receipt.php:163 +msgid "Total" +msgstr "" + +#: includes/admin/customers/customers.php:834 +msgid "No orders found" +msgstr "" + +#: includes/admin/customers/customers.php:839 +msgid "Recent Refunds" +msgstr "" + +#: includes/admin/customers/customers.php:873 +msgid "No refunds found" +msgstr "" + +#. translators: %s: plural downloads label +#: includes/admin/customers/customers.php:881 +msgid "Purchased %s" +msgstr "" + +#. translators: %s: plural downloads label +#: includes/admin/customers/customers.php:906 +#: includes/blocks/build/buy-button/index.js:7 +#: includes/blocks/build/downloads/index.js:3 +#: includes/blocks/src/utilities/download-new.js:14 +msgid "No %s Found" +msgstr "" + +#: includes/admin/customers/customers.php:944 +msgid "Customer Emails" +msgstr "" + +#: includes/admin/customers/customers.php:947 +msgid "This customer can use any of the emails listed here when making new purchases." +msgstr "" + +#: includes/admin/customers/customers.php:960 +msgid "Date Added" +msgstr "" + +#: includes/admin/customers/customers.php:998 +#: includes/admin/customers/customers.php:1053 +msgid "Make Primary" +msgstr "" + +#: includes/admin/customers/customers.php:1036 +msgid "No emails found." +msgstr "" + +#: includes/admin/customers/customers.php:1045 +#: includes/admin/customers/customers.php:1047 +#: includes/admin/payments/orders.php:343 +#: includes/blocks/views/orders/guest.php:10 +#: includes/gateways/stripe/includes/payment-methods/buy-now/template.php:104 +#: includes/privacy-functions.php:818 +msgid "Email Address" +msgstr "" + +#: includes/admin/customers/customers.php:1058 +msgid "Add Email" +msgstr "" + +#: includes/admin/customers/customers.php:1087 +#: includes/upgrades/functions.php:156 +msgid "Customer Addresses" +msgstr "" + +#: includes/admin/customers/customers.php:1099 +#: includes/admin/customers/customers.php:1158 +msgid "First Used" +msgstr "" + +#: includes/admin/customers/customers.php:1199 +#: includes/admin/payments/orders.php:142 +#: includes/admin/reporting/export/class-batch-export-downloads.php:56 +msgid "Notes" +msgstr "" + +#: includes/admin/customers/customers.php:1249 +msgid "Are you sure you want to delete this customer?" +msgstr "" + +#: includes/admin/customers/customers.php:1261 +msgid "Delete all associated payments and records?" +msgstr "" + +#: includes/admin/customers/customers.php:1271 +msgid "Delete Customer" +msgstr "" + +#: includes/admin/customers/customers.php:1296 +#: includes/admin/payments/orders.php:148 +#: src/Admin/Menu/Header.php:160 +#: src/Admin/Menu/Pages.php:94 +#: src/Admin/Onboarding/Wizard.php:248 +msgid "Tools" +msgstr "" + +#: includes/admin/customers/customers.php:1299 +#: includes/admin/tools.php:59 +msgid "Recount Customer Stats" +msgstr "" + +#: includes/admin/customers/customers.php:1300 +msgid "Use this tool to recalculate the purchase count and total value of the customer." +msgstr "" + +#: includes/admin/customers/customers.php:1307 +#: includes/admin/tools.php:32 +msgid "Recount Stats" +msgstr "" + +#: includes/admin/customers/customers.php:1343 +msgid "This customer's user account is pending verification." +msgstr "" + +#: includes/admin/customers/customers.php:1345 +msgid "Verify account." +msgstr "" + +#: includes/admin/dashboard-widgets.php:24 +msgid "Easy Digital Downloads Sales Summary" +msgstr "" + +#: includes/admin/dashboard-widgets.php:45 +msgid "Easy Digital Downloads is performing a database migration via WP-CLI." +msgstr "" + +#: includes/admin/dashboard-widgets.php:46 +#: includes/admin/dashboard-widgets.php:63 +msgid "This summary will be available when that has completed." +msgstr "" + +#: includes/admin/dashboard-widgets.php:62 +msgid "Easy Digital Downloads needs to upgrade the database." +msgstr "" + +#: includes/admin/dashboard-widgets.php:65 +msgid "Begin the upgrade." +msgstr "" + +#: includes/admin/dashboard-widgets.php:134 +msgid "Current Month" +msgstr "" + +#: includes/admin/dashboard-widgets.php:134 +#: includes/admin/dashboard-widgets.php:153 +#: includes/admin/dashboard-widgets.php:175 +#: includes/admin/dashboard-widgets.php:195 +#: includes/admin/reporting/reports.php:248 +#: includes/admin/reporting/reports.php:273 +#: includes/admin/reporting/reports.php:346 +#: includes/reports/data/taxes/class-tax-collected-by-location-list-table.php:78 +msgid "Net" +msgstr "" + +#: includes/admin/dashboard-widgets.php:139 +#: includes/admin/dashboard-widgets.php:159 +#: includes/admin/dashboard-widgets.php:180 +#: includes/admin/reporting/class-download-reports-table.php:104 +#: includes/admin/reporting/export/class-batch-export-downloads.php:58 +#: includes/admin/reporting/export/class-batch-export-sales-and-earnings.php:61 +#: includes/admin/reporting/graphing.php:299 +#: includes/admin/reporting/graphing.php:598 +#: includes/admin/reporting/reports.php:255 +#: includes/admin/reporting/reports.php:354 +#: includes/admin/reporting/reports.php:692 +#: includes/admin/reporting/reports.php:881 +#: includes/admin/reporting/reports.php:1357 +#: includes/admin/reporting/reports.php:1543 +#: includes/admin/reporting/reports.php:1661 +#: includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php:61 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-order-by.js:26 +msgid "Earnings" +msgstr "" + +#: includes/admin/dashboard-widgets.php:142 +#: includes/admin/dashboard-widgets.php:165 +#: includes/admin/dashboard-widgets.php:184 +#: includes/admin/dashboard-widgets.php:205 +msgid "Sale" +msgid_plural "Sales" +msgstr[0] "" +msgstr[1] "" + +#: includes/admin/dashboard-widgets.php:153 +#: includes/class-edd-stats.php:79 +#: includes/reports/reports-functions.php:532 +msgid "Today" +msgstr "" + +#: includes/admin/dashboard-widgets.php:175 +#: includes/class-edd-stats.php:84 +#: includes/reports/reports-functions.php:538 +msgid "Last Month" +msgstr "" + +#: includes/admin/dashboard-widgets.php:195 +msgid "All Time" +msgstr "" + +#: includes/admin/dashboard-widgets.php:201 +#: includes/admin/reporting/class-categories-reports-table.php:78 +#: includes/admin/tools.php:909 +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:180 +msgid "Total Earnings" +msgstr "" + +#: includes/admin/dashboard-widgets.php:241 +msgid "No Name" +msgstr "" + +#. translators: 1: customer name, 2: number of items purchased, 3: order total +#: includes/admin/dashboard-widgets.php:246 +msgid "%1$s purchased %2$s item for %3$s" +msgid_plural "%1$s purchased %2$s items for %3$s" +msgstr[0] "" +msgstr[1] "" + +#: includes/admin/dashboard-widgets.php:270 +msgid "View All Orders" +msgstr "" + +#. translators: %s: Download label singular +#: includes/admin/dashboard-widgets.php:304 +msgid "1 %s" +msgstr "" + +#. translators: 1: Number of downloads, 2: Download label plural +#: includes/admin/dashboard-widgets.php:310 +msgid "%1$d %2$s" +msgstr "" + +#: includes/admin/discounts/add-discount.php:16 +msgid "Add New Discount" +msgstr "" + +#: includes/admin/discounts/add-discount.php:34 +#: includes/admin/discounts/edit-discount.php:75 +msgid "Summer Sale" +msgstr "" + +#: includes/admin/discounts/add-discount.php:35 +#: includes/admin/discounts/edit-discount.php:76 +msgid "The name of this discount. Customers will see this on checkout." +msgstr "" + +#: includes/admin/discounts/add-discount.php:43 +#: includes/admin/discounts/class-discount-codes-table.php:81 +#: includes/admin/discounts/edit-discount.php:84 +#: includes/reports/data/discounts/class-top-five-discounts-list-table.php:76 +msgid "Code" +msgstr "" + +#: includes/admin/discounts/add-discount.php:47 +#: includes/admin/discounts/edit-discount.php:87 +msgid "10PERCENT" +msgstr "" + +#: includes/admin/discounts/add-discount.php:51 +#: includes/admin/discounts/edit-discount.php:88 +msgid "The code customers will enter to apply this discount. Only alphanumeric characters are allowed." +msgstr "" + +#: includes/admin/discounts/add-discount.php:61 +#: includes/admin/discounts/class-discount-codes-table.php:82 +#: includes/admin/discounts/edit-discount.php:98 +#: includes/admin/payments/orders.php:858 +#: includes/admin/payments/refunds.php:232 +#: includes/admin/reporting/class-export-payments.php:70 +#: includes/admin/reporting/export/class-batch-export-payments.php:56 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:72 +#: includes/admin/reporting/reports.php:1201 +#: includes/admin/views/tmpl-order-adjustment-discount.php:41 +#: includes/admin/views/tmpl-order-adjustment.php:59 +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:80 +#: includes/admin/views/tmpl-order-form-add-order-item.php:226 +#: includes/admin/views/tmpl-order-item.php:78 +#: includes/admin/views/tmpl-order-subtotal.php:18 +#: includes/admin/views/tmpl-order-tax.php:29 +#: includes/admin/views/tmpl-order-total.php:23 +#: includes/reports/data/discounts/class-top-five-discounts-list-table.php:78 +#: templates/history-purchases.php:53 +msgid "Amount" +msgstr "" + +#: includes/admin/discounts/add-discount.php:65 +#: includes/admin/discounts/edit-discount.php:102 +msgid "10.00" +msgstr "" + +#: includes/admin/discounts/add-discount.php:66 +#: includes/admin/discounts/edit-discount.php:103 +msgid "Amount Type" +msgstr "" + +#: includes/admin/discounts/add-discount.php:72 +#: includes/admin/discounts/edit-discount.php:109 +msgid "The amount as a percentage or flat rate. Cannot be left blank." +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/discounts/add-discount.php:81 +#: includes/admin/discounts/edit-discount.php:117 +msgid "%s Requirements" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/add-discount.php:93 +#: includes/admin/discounts/add-discount.php:141 +#: includes/admin/discounts/edit-discount.php:129 +#: includes/admin/discounts/edit-discount.php:177 +msgctxt "Noun: The plural label for the download post type as a placeholder for a dropdown" +msgid "Select %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/add-discount.php:102 +#: includes/admin/discounts/edit-discount.php:137 +msgid "Cart must contain all selected %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/add-discount.php:104 +#: includes/admin/discounts/edit-discount.php:138 +msgid "Cart needs one or more of the selected %s" +msgstr "" + +#: includes/admin/discounts/add-discount.php:110 +#: includes/admin/discounts/edit-discount.php:144 +msgid "Apply discount to entire purchase." +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/add-discount.php:115 +#: includes/admin/discounts/edit-discount.php:148 +msgid "Apply discount only to selected %s." +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/add-discount.php:120 +#: includes/admin/discounts/edit-discount.php:152 +msgid "%s this discount can only be applied to. Leave blank for any." +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/add-discount.php:129 +msgctxt "Noun: The plural label for the download post type as a placeholder for a dropdown" +msgid "Excluded %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/add-discount.php:146 +#: includes/admin/discounts/edit-discount.php:184 +msgid "%s this discount cannot be applied to. Leave blank for none." +msgstr "" + +#: includes/admin/discounts/add-discount.php:160 +#: includes/admin/discounts/edit-discount.php:201 +msgid "Start date" +msgstr "" + +#: includes/admin/discounts/add-discount.php:166 +#: includes/admin/discounts/edit-discount.php:207 +msgid "Start Date Hour" +msgstr "" + +#: includes/admin/discounts/add-discount.php:172 +#: includes/admin/discounts/edit-discount.php:213 +msgid "Start Date Minute" +msgstr "" + +#: includes/admin/discounts/add-discount.php:177 +#: includes/admin/discounts/edit-discount.php:218 +msgid "Pick the date and time this discount will start on. Leave blank for no start date." +msgstr "" + +#: includes/admin/discounts/add-discount.php:185 +#: includes/admin/discounts/edit-discount.php:226 +msgid "Expiration date" +msgstr "" + +#: includes/admin/discounts/add-discount.php:191 +#: includes/admin/discounts/edit-discount.php:232 +msgid "Expiration Date Hour" +msgstr "" + +#: includes/admin/discounts/add-discount.php:197 +#: includes/admin/discounts/edit-discount.php:238 +msgid "Expiration Date Minute" +msgstr "" + +#: includes/admin/discounts/add-discount.php:202 +#: includes/admin/discounts/edit-discount.php:243 +msgid "Pick the date and time this discount will expire on. Leave blank to never expire." +msgstr "" + +#: includes/admin/discounts/add-discount.php:210 +#: includes/admin/discounts/edit-discount.php:251 +msgid "Minimum Amount" +msgstr "" + +#: includes/admin/discounts/add-discount.php:213 +#: includes/admin/discounts/edit-discount.php:254 +msgid "No minimum" +msgstr "" + +#: includes/admin/discounts/add-discount.php:214 +#: includes/admin/discounts/edit-discount.php:255 +msgid "The minimum subtotal of item prices in a cart before this discount may be applied." +msgstr "" + +#: includes/admin/discounts/add-discount.php:222 +#: includes/admin/discounts/edit-discount.php:263 +msgid "Max Uses" +msgstr "" + +#. translators: %s: The maximum number of uses of the discount +#: includes/admin/discounts/add-discount.php:225 +#: includes/admin/discounts/edit-discount.php:266 +#: includes/class-edd-cli.php:572 +msgid "Unlimited" +msgstr "" + +#: includes/admin/discounts/add-discount.php:226 +#: includes/admin/discounts/edit-discount.php:267 +msgid "The maximum number of times this discount can be used." +msgstr "" + +#: includes/admin/discounts/add-discount.php:234 +#: includes/admin/discounts/edit-discount.php:275 +msgid "Use Once Per Customer" +msgstr "" + +#: includes/admin/discounts/add-discount.php:241 +#: includes/admin/discounts/edit-discount.php:283 +msgid "Prevent customers from using this discount more than once." +msgstr "" + +#: includes/admin/discounts/add-discount.php:268 +msgid "Add Discount Code" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:80 +#: includes/admin/discounts/edit-discount.php:295 +#: includes/admin/payments/class-payments-table.php:429 +#: includes/admin/payments/orders.php:1119 +#: includes/admin/reporting/class-export-payments.php:78 +#: includes/admin/reporting/export/class-batch-export-downloads.php:48 +#: includes/admin/reporting/export/class-batch-export-payments.php:66 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:83 +#: includes/admin/tools.php:584 +#: includes/privacy-functions.php:834 +#: src/Admin/Emails/ListTable.php:81 +msgid "Status" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:83 +#: includes/reports/data/discounts/class-top-five-discounts-list-table.php:77 +msgid "Uses" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:84 +msgid "Start Date" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:85 +msgid "End Date" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:235 +#: includes/admin/discounts/class-discount-codes-table.php:449 +#: includes/admin/views/tmpl-tax-rates-table-bulk-actions.php:20 +#: includes/admin/views/tmpl-tax-rates-table-row.php:49 +#: src/Admin/PassHandler/Handler.php:101 +#: src/Licensing/Traits/Controls.php:104 +msgid "Deactivate" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:250 +#: includes/admin/discounts/class-discount-codes-table.php:448 +#: includes/admin/views/tmpl-tax-rates-table-bulk-actions.php:19 +#: includes/admin/views/tmpl-tax-rates-table-row.php:51 +#: src/Admin/Promos/About.php:841 +#: src/Licensing/Traits/Controls.php:111 +msgid "Activate" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:266 +#: includes/admin/discounts/class-discount-codes-table.php:450 +msgid "Archive" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:291 +msgid "View Orders" +msgstr "" + +#. translators: %s: Discount code title (name) +#: includes/admin/discounts/class-discount-codes-table.php:337 +msgctxt "Noun: The discount code title (name)" +msgid "Select %s" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:380 +#: includes/admin/payments/orders.php:1060 +msgid "Scheduled" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:386 +msgid "100% Claimed" +msgstr "" + +#: includes/admin/discounts/class-discount-codes-table.php:437 +#: includes/reports/data/discounts/class-top-five-discounts-list-table.php:179 +msgid "No discounts found." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:44 +#: includes/admin/downloads/contextual-help.php:49 +#: includes/admin/payments/contextual-help.php:56 +#: includes/admin/reporting/contextual-help.php:50 +#: includes/admin/settings/contextual-help.php:50 +msgid "For more information:" +msgstr "" + +#. translators: %s: Documentation URL +#: includes/admin/discounts/contextual-help.php:46 +#: includes/admin/downloads/contextual-help.php:51 +#: includes/admin/payments/contextual-help.php:58 +#: includes/admin/reporting/contextual-help.php:51 +#: includes/admin/settings/contextual-help.php:52 +msgid "Visit the documentation on the Easy Digital Downloads website." +msgstr "" + +#. translators: %s: Upgrade URL +#: includes/admin/discounts/contextual-help.php:49 +#: includes/admin/downloads/contextual-help.php:54 +#: includes/admin/payments/contextual-help.php:61 +#: includes/admin/reporting/contextual-help.php:53 +msgid "Need more from your Easy Digital Downloads store? Upgrade Now!" +msgstr "" + +#: includes/admin/discounts/contextual-help.php:60 +msgid "Discount codes allow you to offer buyers special discounts by having them enter predefined codes during checkout." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:61 +msgid "Discount codes that are set to \"inactive\" cannot be redeemed." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:62 +msgid "Discount codes can be setup to only be used only one time by each customer. If a customer attempts to use a code a second time, they will be given an error." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:63 +msgid "Discount codes that have already been used cannot be deleted for data integrity and reporting purposes." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:70 +msgid "Adding Discounts" +msgstr "" + +#: includes/admin/discounts/contextual-help.php:72 +msgid "You can create any number of discount codes easily from this page." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:73 +msgid "Discount codes have several options:" +msgstr "" + +#: includes/admin/discounts/contextual-help.php:75 +msgid "Name - this is the name given to the discount. Used primarily for administrative purposes." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:76 +msgid "Code - this is the unique code that customers will enter during checkout to redeem the code." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:77 +msgid "Type - this is the type of discount this code awards." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:78 +msgid "Amount - this is the discount amount provided by this code. For percentage based discounts, enter a number such as 70 for 70%. Do not enter a percent sign." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:79 +msgid "Requirements - this allows you to select the product(s) that are required to be purchased in order for a discount to be applied." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:80 +msgid "Condition - this lets you set whether all selected products must be in the cart, or just a minimum of one." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:81 +msgid "Apply discount only to selected Downloads? - If this box is checked, only the prices of the required products will be discounted. If left unchecked, the discount will apply to all products in the cart." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:82 +msgid "Start Date - this is the date that this code becomes available. If a customer attempts to redeem the code prior to this date, they will be given an error. This is optional." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:83 +msgid "Expiration Date - this is the end date for the discount. After this date, the code will no longer be able to be used. This is optional." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:84 +msgid "Minimum Amount - this is the minimum purchase amount required to use this code. If a customer has less than this amount in their cart, they will be given an error. This is optional." +msgstr "" + +#: includes/admin/discounts/contextual-help.php:85 +msgid "Max Uses - this is the maximum number of times this discount can be redeemed. Once this number is reached, no more customers will be allowed to use it." +msgstr "" + +#: includes/admin/discounts/discount-actions.php:32 +#: includes/admin/discounts/discount-actions.php:415 +#: includes/admin/discounts/discount-actions.php:447 +msgid "You do not have permission to create discount codes" +msgstr "" + +#: includes/admin/discounts/discount-actions.php:182 +#: includes/admin/discounts/discount-actions.php:382 +msgid "You do not have permission to edit discount codes" +msgstr "" + +#: includes/admin/discounts/discount-actions.php:187 +#: includes/admin/discounts/discount-actions.php:348 +msgid "No discount ID supplied" +msgstr "" + +#: includes/admin/discounts/discount-actions.php:196 +msgid "Invalid discount" +msgstr "" + +#: includes/admin/discounts/discount-actions.php:343 +msgid "You do not have permission to delete discount codes" +msgstr "" + +#: includes/admin/discounts/discount-codes.php:30 +msgid "You do not have permission to edit discounts." +msgstr "" + +#: includes/admin/discounts/discount-codes.php:39 +#: includes/admin/discounts/discount-codes.php:57 +msgid "You do not have permission to manage discounts." +msgstr "" + +#: includes/admin/discounts/discount-codes.php:68 +#: src/HTML/Elements.php:271 +msgid "Search Discounts" +msgstr "" + +#: includes/admin/discounts/edit-discount.php:17 +#: includes/admin/discounts/edit-discount.php:28 +msgid "Something went wrong." +msgstr "" + +#: includes/admin/discounts/edit-discount.php:58 +msgid "Edit Discount" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/discounts/edit-discount.php:163 +msgctxt "Noun: Downloads plural label" +msgid "Excluded %s" +msgstr "" + +#: includes/admin/discounts/edit-discount.php:301 +#: includes/class-edd-discount.php:703 +msgid "Archived" +msgstr "" + +#: includes/admin/discounts/edit-discount.php:303 +msgid "The status of this discount code." +msgstr "" + +#: includes/admin/discounts/edit-discount.php:311 +msgid "Discount Notes" +msgstr "" + +#: includes/admin/discounts/edit-discount.php:341 +msgid "Update Discount Code" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/discounts/views/categories.php:14 +#: includes/admin/reporting/export/class-batch-export-downloads.php:49 +#: includes/post-types.php:228 +msgid "Categories" +msgstr "" + +#: includes/admin/discounts/views/categories.php:35 +msgid "Only discount products in these categories" +msgstr "" + +#: includes/admin/discounts/views/categories.php:36 +msgid "Do not discount products in these categories" +msgstr "" + +#: includes/admin/discounts/views/categories.php:41 +msgid "Optionally include/exclude products from this discount by category. Leave blank for any." +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/contextual-help.php:64 +#: includes/admin/downloads/metabox.php:61 +msgid "%s Settings" +msgstr "" + +#: includes/admin/downloads/contextual-help.php:66 +msgid "File Download Limit - Define how many times customers are allowed to download their purchased files. Leave at 0 for unlimited. Resending the purchase receipt will permit the customer one additional download if their limit has already been reached." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:67 +msgid "Accounting Options - If enabled, define an individual SKU or product number for this download." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:68 +msgid "Button Options - Disable the automatic output of the purchase button. If disabled, no button will be added to the download page unless the [purchase_link] shortcode is used." +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/contextual-help.php:76 +msgid "%s Prices" +msgstr "" + +#: includes/admin/downloads/contextual-help.php:78 +msgid "Enable variable pricing - By enabling variable pricing, multiple download options and prices can be configured." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:79 +msgid "Enable multi-option purchases - By enabling multi-option purchases customers can add multiple variable price items to their cart at once." +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/contextual-help.php:87 +#: includes/admin/downloads/metabox.php:47 +msgid "%s Files" +msgstr "" + +#: includes/admin/downloads/contextual-help.php:89 +msgid "Product Type Options - Choose a default product type or a bundle. Bundled products automatically include access to other download's files when purchased." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:90 +msgid "File Downloads - Define download file names and their respective file URL. Multiple files can be assigned to a single price, or variable prices." +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/contextual-help.php:98 +#: includes/admin/downloads/metabox.php:75 +msgid "%s Instructions" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/contextual-help.php:100 +msgid "Special instructions for this %s. These will be added to the sales receipt, and may be used by some extensions or themes." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:120 +#: includes/admin/downloads/metabox.php:1242 +#: includes/admin/downloads/metabox.php:1245 +msgid "Purchase Shortcode" +msgstr "" + +#: includes/admin/downloads/contextual-help.php:122 +msgid "Purchase Shortcode - If the automatic output of the purchase button has been disabled via the Download Configuration box, a shortcode can be used to output the button or link." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:125 +msgid "The ID of a specific download to purchase." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:126 +msgid "Whether to show the price on the purchase button. 1 to show the price, 0 to disable it." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:127 +msgid "The text to be displayed on the button or link." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:128 +msgid "button | text - The style of the purchase link." +msgstr "" + +#: includes/admin/downloads/contextual-help.php:130 +msgid "One or more custom CSS classes you want applied to the button." +msgstr "" + +#. translators: 1: Shortcodes Codex URL, 2: EDD Documentation URL +#: includes/admin/downloads/contextual-help.php:134 +msgid "For more information, see using Shortcodes on the WordPress.org Codex or Easy Digital Downloads Documentation" +msgstr "" + +#: includes/admin/downloads/dashboard-columns.php:34 +#: includes/admin/downloads/dashboard-columns.php:330 +#: includes/admin/downloads/metabox.php:439 +#: includes/admin/downloads/metabox.php:625 +#: includes/admin/reporting/export/class-batch-export-downloads.php:51 +#: includes/reports/data/downloads/class-top-selling-downloads-list-table.php:56 +#: includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php:59 +#: src/Emails/Tags/Registry.php:147 +#: templates/shortcode-receipt.php:211 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-order-by.js:10 +msgid "Price" +msgstr "" + +#: includes/admin/downloads/dashboard-columns.php:35 +msgid "Net Sales" +msgstr "" + +#: includes/admin/downloads/dashboard-columns.php:36 +#: includes/emails/email-summary/template-parts/data-listing.php:40 +msgid "Net Revenue" +msgstr "" + +#: includes/admin/downloads/dashboard-columns.php:190 +msgid "You do not have permission to view this data." +msgstr "" + +#. translators: %s: Download Category taxonomy name +#: includes/admin/downloads/dashboard-columns.php:244 +#: src/HTML/CategorySelect.php:64 +#: src/HTML/Elements.php:356 +msgctxt "plural: Example: \"All Categories\"" +msgid "All %s" +msgstr "" + +#. translators: %s: Download Category taxonomy name +#: includes/admin/downloads/dashboard-columns.php:270 +#: includes/admin/downloads/dashboard-columns.php:273 +#: src/HTML/CategorySelect.php:68 +#: src/HTML/CategorySelect.php:71 +msgctxt "plural: Example: \"Search Download Categories\"" +msgid "Search %s" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/dashboard-columns.php:328 +msgid "%s Configuration" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/metabox.php:33 +#: includes/widgets.php:244 +#: includes/widgets.php:366 +msgid "%s Details" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/metabox.php:90 +msgid "%s Stats" +msgstr "" + +#: includes/admin/downloads/metabox.php:421 +msgid "Pricing Options:" +msgstr "" + +#: includes/admin/downloads/metabox.php:430 +msgid "Enable variable pricing" +msgstr "" + +#: includes/admin/downloads/metabox.php:486 +msgid "Enable multi-option purchase mode. Allows multiple price options to be added to your cart at once" +msgstr "" + +#: includes/admin/downloads/metabox.php:522 +#: src/Admin/Onboarding/Steps/Products.php:120 +msgid "Add New Price" +msgstr "" + +#: includes/admin/downloads/metabox.php:567 +msgid "Click and drag to re-order price options" +msgstr "" + +#. translators: %s: price ID. +#: includes/admin/downloads/metabox.php:571 +msgid "Price ID: %s" +msgstr "" + +#: includes/admin/downloads/metabox.php:582 +#: src/Admin/Assets/Localization.php:98 +msgid "Show advanced settings" +msgstr "" + +#. translators: %s: The bundle product index number. +#: includes/admin/downloads/metabox.php:589 +#: includes/admin/downloads/metabox.php:847 +#: includes/admin/downloads/views/metabox-bundled-products.php:102 +#: includes/admin/downloads/views/metabox-bundled-products.php:171 +#: includes/admin/views/tmpl-tax-rates-table-row.php:47 +#: includes/blocks/views/checkout/cart/cart-fees.php:15 +#: includes/blocks/views/checkout/cart/cart-item.php:55 +#: src/Admin/Assets/Localization.php:93 +#: templates/checkout_cart.php:57 +#: templates/checkout_cart.php:75 +#: templates/shortcode-profile-editor.php:129 +msgid "Remove" +msgstr "" + +#. translators: %s: price ID. +#: includes/admin/downloads/metabox.php:592 +msgid "Remove price option %s" +msgstr "" + +#: includes/admin/downloads/metabox.php:606 +#: includes/admin/downloads/metabox.php:615 +msgid "Option Name" +msgstr "" + +#: includes/admin/downloads/metabox.php:657 +#: includes/gateways/stripe/includes/template-functions.php:455 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/buy-button-alignment.js:6 +msgid "Default" +msgstr "" + +#. translators: %s: price ID. +#: includes/admin/downloads/metabox.php:670 +msgid "Set ID %s as default price" +msgstr "" + +#: includes/admin/downloads/metabox.php:715 +msgid "Product Type Options:" +msgstr "" + +#: includes/admin/downloads/metabox.php:735 +msgid "Sell this item as a single product with download files, or select a custom product type with different options, which may not necessarily include download files." +msgstr "" + +#: includes/admin/downloads/metabox.php:829 +msgid "Click and drag to re-order files" +msgstr "" + +#. translators: %1$s is the singular label, %2$s is the file ID. +#: includes/admin/downloads/metabox.php:833 +msgid "%1$s file ID: %2$s" +msgstr "" + +#. translators: %s: file ID. +#: includes/admin/downloads/metabox.php:851 +msgid "Remove file %s" +msgstr "" + +#: includes/admin/downloads/metabox.php:861 +msgid "File Name" +msgstr "" + +#: includes/admin/downloads/metabox.php:872 +msgid "My Neat File" +msgstr "" + +#: includes/admin/downloads/metabox.php:882 +msgid "File URL" +msgstr "" + +#: includes/admin/downloads/metabox.php:891 +msgid "Enter, upload, choose from Media Library" +msgstr "" + +#: includes/admin/downloads/metabox.php:898 +#: includes/admin/downloads/metabox.php:900 +msgid "Select Files" +msgstr "" + +#: includes/admin/downloads/metabox.php:898 +msgid "Select" +msgstr "" + +#: includes/admin/downloads/metabox.php:910 +#: includes/admin/downloads/metabox.php:913 +msgid "Price Assignment" +msgstr "" + +#: includes/admin/downloads/metabox.php:914 +msgid "With variable pricing enabled, you can choose to allow certain price variations access to specific files, or allow all price variations to access a file." +msgstr "" + +#. translators: %s: Download singular label, in lowercase form. +#: includes/admin/downloads/metabox.php:969 +msgid "Insert into %s" +msgstr "" + +#: includes/admin/downloads/metabox.php:1001 +#: includes/admin/reporting/reports.php:1023 +#: includes/admin/reporting/reports.php:1193 +#: includes/admin/reporting/reports.php:1383 +#: includes/admin/settings/register-settings.php:544 +#: includes/orders/functions/types.php:93 +#: src/Admin/Settings/Tabs/Gateways.php:144 +#: src/Admin/Settings/Tabs/Gateways.php:147 +msgid "Refunds" +msgstr "" + +#: includes/admin/downloads/metabox.php:1004 +#: includes/refund-functions.php:26 +msgid "Refundable" +msgstr "" + +#: includes/admin/downloads/metabox.php:1005 +msgid "Allow or disallow refunds for this specific product. When allowed, the refund window will be used on all future purchases.
    Refund Window: Limit the number of days this product can be refunded after purchasing." +msgstr "" + +#: includes/admin/downloads/metabox.php:1014 +msgid "Refund Status" +msgstr "" + +#. translators: %s: Default refund status +#: includes/admin/downloads/metabox.php:1027 +msgctxt "Download refund status" +msgid "Default (%s)" +msgstr "" + +#: includes/admin/downloads/metabox.php:1044 +#: src/Admin/Settings/Tabs/Gateways.php:160 +msgid "Refund Window" +msgstr "" + +#: includes/admin/downloads/metabox.php:1047 +msgctxt "refund window interval" +msgid "Days" +msgstr "" + +#: includes/admin/downloads/metabox.php:1050 +#: includes/admin/downloads/metabox.php:1097 +msgid "Leave blank to use global setting. Enter 0 for unlimited" +msgstr "" + +#: includes/admin/downloads/metabox.php:1084 +#: includes/admin/downloads/metabox.php:1087 +#: includes/admin/reporting/export/class-batch-export-downloads.php:53 +#: includes/admin/tools.php:890 +#: src/Admin/Settings/Tabs/Misc.php:187 +msgid "File Download Limit" +msgstr "" + +#: includes/admin/downloads/metabox.php:1088 +msgid "Limit the number of times a customer who purchased this product can access their download links." +msgstr "" + +#: includes/admin/downloads/metabox.php:1127 +#: includes/admin/downloads/metabox.php:1130 +msgid "Taxability" +msgstr "" + +#: includes/admin/downloads/metabox.php:1131 +msgid "When taxes are enabled, all products are taxable by default. Check this box to mark this product as non-taxable." +msgstr "" + +#: includes/admin/downloads/metabox.php:1149 +msgid "This product is non-taxable" +msgstr "" + +#: includes/admin/downloads/metabox.php:1177 +#: includes/admin/downloads/metabox.php:1180 +msgid "Item Quantities" +msgstr "" + +#: includes/admin/downloads/metabox.php:1181 +msgid "If disabled, customers will not be provided an option to change the number they wish to purchase." +msgstr "" + +#: includes/admin/downloads/metabox.php:1199 +msgid "Disable quantity input for this product" +msgstr "" + +#: includes/admin/downloads/metabox.php:1225 +#: includes/admin/thickbox.php:77 +#: includes/blocks/includes/downloads/downloads.php:136 +#: includes/checkout/template.php:1004 +#: includes/gateways/stripe/includes/payment-methods/buy-now/template.php:212 +#: includes/shortcodes.php:49 +#: includes/template-functions.php:92 +#: src/Admin/Settings/Tabs/Misc.php:129 +msgid "Purchase" +msgstr "" + +#: includes/admin/downloads/metabox.php:1246 +msgid "Use this shortcode to output a purchase link for this product in the location of your choosing." +msgstr "" + +#: includes/admin/downloads/metabox.php:1281 +msgid "Accounting Options" +msgstr "" + +#: includes/admin/downloads/metabox.php:1284 +#: includes/admin/reporting/export/class-batch-export-downloads.php:55 +#: includes/emails/tags.php:209 +#: includes/emails/tags.php:352 +#: templates/shortcode-receipt.php:206 +msgid "SKU" +msgstr "" + +#: includes/admin/downloads/metabox.php:1285 +msgid "If an SKU is entered for this product, it will be shown on the purchase receipt and exported purchase histories." +msgstr "" + +#: includes/admin/downloads/metabox.php:1293 +msgid "Enter an SKU for this product." +msgstr "" + +#: includes/admin/downloads/metabox.php:1327 +msgid "By default, the purchase buttons will be displayed at the bottom of the download, when disabled you will need to use the Purchase link shortcode below to output the ability to buy the product where you prefer." +msgstr "" + +#: includes/admin/downloads/metabox.php:1330 +msgid "Purchase button behavior: Add to Cart buttons follow a traditional eCommerce flow. A Buy Now button bypasses most of the process, taking the customer directly from button click to payment, greatly speeding up the process of buying the product." +msgstr "" + +#: includes/admin/downloads/metabox.php:1332 +msgid "Purchase button behavior: Add to Cart buttons follow a traditional eCommerce flow. Buy Now buttons are only available for stores that have a single supported gateway active and that do not use taxes." +msgstr "" + +#: includes/admin/downloads/metabox.php:1339 +msgid "Button Options" +msgstr "" + +#: includes/admin/downloads/metabox.php:1342 +msgid "Hide purchase buttons" +msgstr "" + +#: includes/admin/downloads/metabox.php:1361 +msgid "Hide purchase button" +msgstr "" + +#: includes/admin/downloads/metabox.php:1367 +msgid "Purchase button behavior" +msgstr "" + +#: includes/admin/downloads/metabox.php:1375 +#: includes/admin/thickbox.php:126 +#: src/Admin/Settings/Tabs/Misc.php:143 +msgid "Add to Cart" +msgstr "" + +#: includes/admin/downloads/metabox.php:1376 +#: includes/blocks/includes/downloads/downloads.php:162 +#: includes/gateways/stripe/includes/payment-methods/buy-now/template.php:36 +#: includes/shortcodes.php:47 +#: includes/template-functions.php:92 +#: src/Admin/Settings/Tabs/Misc.php:253 +#: includes/blocks/build/buy-button/index.js:13 +#: includes/blocks/src/buy-button/edit.js:71 +msgid "Buy Now" +msgstr "" + +#: includes/admin/downloads/metabox.php:1428 +msgid "Download Instructions" +msgstr "" + +#. translators: %s: singular label. +#: includes/admin/downloads/metabox.php:1436 +msgid "Special instructions for this %s. These will be added to the purchase receipt, and may be used by some extensions or themes." +msgstr "" + +#: includes/admin/downloads/metabox.php:1483 +msgid "Net Sales:" +msgstr "" + +#: includes/admin/downloads/metabox.php:1488 +msgid "Net Revenue:" +msgstr "" + +#: includes/admin/downloads/metabox.php:1511 +msgid "View File Download Log" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/downloads/views/metabox-bundled-products.php:33 +msgid "Bundled %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/downloads/views/metabox-bundled-products.php:42 +#: includes/admin/downloads/views/metabox-bundled-products.php:121 +msgid "Click and drag to re-order bundled %s" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/downloads/views/metabox-bundled-products.php:47 +#: includes/admin/downloads/views/metabox-bundled-products.php:126 +msgctxt "Noun: The singular label for the download post type" +msgid "Select %s:" +msgstr "" + +#: includes/admin/downloads/views/metabox-bundled-products.php:69 +#: includes/admin/downloads/views/metabox-bundled-products.php:144 +msgid "Price assignment:" +msgstr "" + +#. translators: %s: The bundle product index number. +#: includes/admin/downloads/views/metabox-bundled-products.php:102 +msgid "Remove bundle option %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/downloads/views/metabox-bundled-products.php:114 +msgid "Bundled %s:" +msgstr "" + +#: includes/admin/downloads/views/metabox-bundled-products.php:171 +msgid "Remove bundle option 1" +msgstr "" + +#: includes/admin/downloads/views/metabox-bundled-products.php:182 +#: includes/admin/downloads/views/metabox-files.php:45 +msgid "Add New File" +msgstr "" + +#: includes/admin/emails/email-summary/class-edd-email-summary-admin.php:64 +msgid "The test Email Summary was sent successfully!" +msgstr "" + +#: includes/admin/emails/email-summary/class-edd-email-summary-admin.php:72 +msgid "There was an unknown problem while sending test Email Summary!" +msgstr "" + +#: includes/admin/import/class-batch-import-downloads.php:67 +#: includes/admin/import/class-batch-import-payments.php:77 +#: includes/admin/import/class-batch-import.php:206 +msgid "You do not have permission to import data." +msgstr "" + +#: includes/admin/import/class-batch-import-payments.php:291 +#: includes/admin/reporting/export/class-batch-export-payments.php:53 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:70 +msgid "Products (Raw)" +msgstr "" + +#: includes/admin/import/class-batch-import-payments.php:648 +msgid "payments" +msgstr "" + +#: includes/admin/import/import-functions.php:31 +#: includes/admin/import/import-functions.php:112 +msgid "Missing import parameters. Import class must be specified." +msgstr "" + +#: includes/admin/import/import-functions.php:43 +#: includes/admin/import/import-functions.php:140 +msgid "Invalid importer class supplied" +msgstr "" + +#: includes/admin/import/import-functions.php:52 +#: includes/admin/import/import-functions.php:150 +msgid "You do not have permission to import data" +msgstr "" + +#: includes/admin/import/import-functions.php:56 +msgid "Missing import file. Please provide an import file." +msgstr "" + +#: includes/admin/import/import-functions.php:60 +#: includes/admin/import/import-functions.php:133 +msgid "The file you uploaded does not appear to be a CSV file." +msgstr "" + +#: includes/admin/import/import-functions.php:64 +#: includes/admin/import/import-functions.php:116 +msgid "Something went wrong during the upload process, please try again." +msgstr "" + +#: includes/admin/import/import-functions.php:176 +msgid "No data found for import parameters" +msgstr "" + +#. translators: 1: URL to view imported items, 2: Import type label +#: includes/admin/import/import-functions.php:185 +msgid "Import complete! View imported %2$s." +msgstr "" + +#: includes/admin/notes/note-functions.php:44 +msgid "No notes." +msgstr "" + +#. translators: user ID +#: includes/admin/notes/note-functions.php:81 +msgid "User ID #%s" +msgstr "" + +#: includes/admin/notes/note-functions.php:103 +msgctxt "Delete note" +msgid "×" +msgstr "" + +#: includes/admin/notes/note-functions.php:138 +msgid "Note" +msgstr "" + +#: includes/admin/notes/note-functions.php:148 +msgid "Add Note" +msgstr "" + +#: includes/admin/payments/actions.php:127 +msgid "New Customers require a name and email address" +msgstr "" + +#: includes/admin/payments/actions.php:146 +msgid "Error creating new customer" +msgstr "" + +#. translators: %s: email address +#: includes/admin/payments/actions.php:150 +msgid "A customer with the email address %s already exists. Please go back and assign this payment to them." +msgstr "" + +#: includes/admin/payments/actions.php:215 +msgid "Error updating order." +msgstr "" + +#: includes/admin/payments/actions.php:253 +msgid "You do not have permission to edit this order." +msgstr "" + +#: includes/admin/payments/actions.php:395 +#: includes/admin/payments/actions.php:491 +msgid "You must be logged in to perform this action." +msgstr "" + +#: includes/admin/payments/actions.php:405 +#: includes/admin/payments/actions.php:496 +msgid "Your account does not have permission to perform this action." +msgstr "" + +#: includes/admin/payments/actions.php:416 +msgid "Invalid order ID" +msgstr "" + +#: includes/admin/payments/actions.php:426 +msgid "Invalid order" +msgstr "" + +#: includes/admin/payments/actions.php:435 +msgid "Order is already refunded" +msgstr "" + +#: includes/admin/payments/actions.php:444 +msgid "Cannot refund an order that is already refunded." +msgstr "" + +#: includes/admin/payments/actions.php:455 +msgid "View Refund" +msgstr "" + +#: includes/admin/payments/actions.php:500 +msgid "Missing form data or order ID." +msgstr "" + +#: includes/admin/payments/actions.php:509 +msgid "Nonce validation failed when submitting refund." +msgstr "" + +#: includes/admin/payments/actions.php:556 +msgid "Refund successfully processed." +msgstr "" + +#: includes/admin/payments/actions.php:567 +msgid "Unable to process refund." +msgstr "" + +#: includes/admin/payments/add-order.php:58 +msgid "New Order" +msgstr "" + +#: includes/admin/payments/add-order.php:63 +#: includes/admin/payments/view-order-details.php:62 +msgid "Please select an existing customer or create a new customer." +msgstr "" + +#: includes/admin/payments/add-order.php:67 +msgid "Please add an item to this order." +msgstr "" + +#: includes/admin/payments/add-order.php:135 +msgid "Add Download" +msgstr "" + +#: includes/admin/payments/add-order.php:143 +#: includes/admin/views/tmpl-order-form-add-order-discount.php:65 +msgid "Add Discount" +msgstr "" + +#: includes/admin/payments/add-order.php:151 +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:168 +msgid "Add Adjustment" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:162 +msgid "All modes" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:176 +msgid "All gateways" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:216 +#: includes/admin/reporting/class-base-logs-list-table.php:477 +#: includes/admin/reporting/views/export-api-requests.php:17 +#: includes/admin/reporting/views/export-download-history.php:28 +#: includes/admin/reporting/views/export-orders.php:17 +#: includes/admin/reporting/views/export-sales-earnings.php:17 +#: includes/admin/reporting/views/export-sales.php:17 +#: includes/admin/reporting/views/export-taxed-customers.php:16 +#: includes/admin/reporting/views/export-taxed-orders.php:17 +#: includes/reports/reports-functions.php:1381 +msgctxt "date filter" +msgid "From" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:225 +#: includes/admin/reporting/class-base-logs-list-table.php:484 +#: includes/admin/reporting/views/export-api-requests.php:28 +#: includes/admin/reporting/views/export-download-history.php:39 +#: includes/admin/reporting/views/export-orders.php:28 +#: includes/admin/reporting/views/export-sales-earnings.php:28 +#: includes/admin/reporting/views/export-sales.php:28 +#: includes/admin/reporting/views/export-taxed-customers.php:27 +#: includes/admin/reporting/views/export-taxed-orders.php:28 +#: includes/reports/reports-functions.php:1391 +msgctxt "date filter" +msgid "To" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:255 +msgid "More" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:259 +msgid "Total is" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:262 +msgid "equal to" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:263 +msgid "greater than" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:264 +msgid "less than" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:283 +#: includes/admin/payments/class-refund-items-table.php:77 +#: includes/admin/reporting/class-export-download-history.php:62 +#: includes/admin/reporting/export/class-batch-export-file-downloads.php:54 +#: includes/blocks/includes/orders/orders.php:554 +#: includes/emails/email-summary/template-parts/top-products.php:17 +msgid "Product" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:298 +msgid "Country & Region" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:323 +msgid "Extras" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:334 +#: includes/admin/reporting/class-base-logs-list-table.php:503 +#: includes/admin/tools/logs.php:238 +#: includes/reports/reports-functions.php:1800 +msgid "Filter" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:338 +#: includes/admin/reporting/class-base-logs-list-table.php:507 +#: src/Admin/Emails/ListTable.php:275 +msgid "Clear" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:357 +#: includes/admin/payments/contextual-help.php:105 +#: includes/admin/reporting/class-base-logs-list-table.php:522 +msgid "Search" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:390 +msgid "Search orders..." +msgstr "" + +#: includes/admin/payments/class-payments-table.php:406 +msgid "Easy Digital Downloads needs to upgrade the database. Orders will be available when that has completed." +msgstr "" + +#: includes/admin/payments/class-payments-table.php:411 +msgid "No orders found." +msgstr "" + +#. translators: %s: the order number +#: includes/admin/payments/class-payments-table.php:539 +msgctxt "Number: The order ID in alpha numeric representation" +msgid "Select %s" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:576 +#: includes/emails/tags.php:738 +msgid "View Receipt" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:591 +#: includes/admin/payments/orders.php:406 +msgid "Resend Receipt" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:606 +msgid "Trash" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:618 +#: includes/admin/payments/class-payments-table.php:747 +msgid "Restore" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:630 +msgid "Delete Permanently" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:733 +msgid "Mark Completed" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:734 +msgid "Mark Pending" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:735 +msgid "Mark Processing" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:736 +msgid "Mark Revoked" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:737 +msgid "Mark Failed" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:738 +msgid "Mark Abandoned" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:739 +msgid "Resend Receipts" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:751 +msgid "Delete permanently" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:754 +#: includes/admin/payments/orders.php:1218 +#: includes/admin/payments/refunds.php:308 +msgid "Move to Trash" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:1150 +#: includes/admin/payments/class-payments-table.php:1153 +msgid "Confirmation Required" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:1151 +msgid "You are about to permanently delete orders from your store. Once deleted, these orders are not recoverable. Are you sure you want to continue?" +msgstr "" + +#: includes/admin/payments/class-payments-table.php:1154 +msgid "You are about to permanently delete this order from your store. Once deleted, this order is not recoverable. Are you sure you want to continue?" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:78 +#: includes/admin/payments/orders.php:854 +#: includes/admin/payments/refunds.php:230 +#: includes/admin/views/tmpl-order-form-add-order-item.php:175 +#: includes/admin/views/tmpl-order-item.php:67 +msgid "Unit Price" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:79 +#: includes/admin/payments/orders.php:856 +#: includes/admin/payments/refunds.php:231 +#: includes/admin/reporting/export/class-batch-export-sales.php:60 +#: includes/admin/views/tmpl-order-form-add-order-item.php:110 +#: includes/admin/views/tmpl-order-item.php:73 +#: includes/emails/tags.php:205 +#: includes/emails/tags.php:348 +#: templates/shortcode-receipt.php:209 +msgid "Quantity" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:80 +#: includes/admin/tools.php:594 +#: includes/admin/views/tmpl-order-subtotal.php:16 +#: includes/blocks/views/checkout/cart/cart-subtotal.php:10 +#: includes/blocks/views/orders/totals.php:43 +#: src/Emails/Tags/Registry.php:119 +#: templates/checkout_cart.php:102 +#: templates/shortcode-receipt.php:76 +msgid "Subtotal" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:86 +#: includes/admin/reporting/class-export-payments.php:71 +#: includes/admin/reporting/export/class-batch-export-payments.php:57 +#: includes/admin/reporting/export/class-batch-export-sales.php:62 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:73 +#: includes/admin/tools.php:603 +#: includes/admin/views/tmpl-order-form-add-order-item.php:196 +#: includes/admin/views/tmpl-order-tax.php:26 +#: includes/blocks/views/checkout/cart/cart-taxes.php:9 +#: includes/blocks/views/orders/totals.php:56 +#: includes/reports/data/taxes/class-tax-collected-by-location-list-table.php:77 +#: src/Emails/Tags/Registry.php:126 +#: templates/checkout_cart.php:120 +#: templates/shortcode-receipt.php:134 +msgid "Tax" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:157 +#: includes/admin/views/tmpl-order-adjustment.php:50 +msgid "Order Fee" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:159 +#: includes/admin/views/tmpl-order-adjustment.php:48 +#: includes/ajax-functions.php:1082 +msgid "Order Credit" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:278 +msgid "Amount to refund, excluding tax" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:280 +msgid "Amount of tax to refund" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:315 +msgctxt "Maximum input amount" +msgid "Max:" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:343 +msgid "Quantity to refund" +msgstr "" + +#. translators: %s: The product name +#: includes/admin/payments/class-refund-items-table.php:447 +msgctxt "Title: The title of the current download product" +msgid "Select %s" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:481 +msgid "No items found." +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:656 +#: includes/admin/payments/view-order-details.php:133 +msgid "Submit Refund" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:688 +msgid "Refund Subtotal:" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:711 +msgid "Refund Tax Total:" +msgstr "" + +#: includes/admin/payments/class-refund-items-table.php:727 +msgid "Refund Total:" +msgstr "" + +#: includes/admin/payments/contextual-help.php:70 +#: includes/admin/reporting/reports.php:210 +msgid "Overview" +msgstr "" + +#: includes/admin/payments/contextual-help.php:72 +msgid "This screen provides access to all of the orders and refunds in your store." +msgstr "" + +#: includes/admin/payments/contextual-help.php:73 +msgid "Orders can be searched by email address, user name, or filtered by status, mode, date range, gateway, and more!" +msgstr "" + +#: includes/admin/payments/contextual-help.php:74 +msgid "To maintain accurate reporting and accounting, we strongly advise against deleting any completed order data." +msgstr "" + +#: includes/admin/payments/contextual-help.php:81 +msgid "— Orders" +msgstr "" + +#: includes/admin/payments/contextual-help.php:83 +msgid "Orders are placed by customers when they buy things from your store." +msgstr "" + +#: includes/admin/payments/contextual-help.php:84 +msgid "Every order contains a snapshot of your store at the time the order was placed, and is made up of many different pieces of information." +msgstr "" + +#: includes/admin/payments/contextual-help.php:85 +msgid "Things like products, discounts, taxes, fees, and customer email address, are all examples of information that is saved with each order." +msgstr "" + +#: includes/admin/payments/contextual-help.php:86 +msgid "Both full and partial refunds are supported." +msgstr "" + +#: includes/admin/payments/contextual-help.php:93 +msgid "— Refunds" +msgstr "" + +#: includes/admin/payments/contextual-help.php:95 +msgid "Refunds are created when a customer would like money back from a completed order." +msgstr "" + +#: includes/admin/payments/contextual-help.php:96 +msgid "Every refund refers back to the original order, and only contains the items and adjustments that were refunded." +msgstr "" + +#: includes/admin/payments/contextual-help.php:97 +msgid "Refunds could be entire orders, or single products." +msgstr "" + +#: includes/admin/payments/contextual-help.php:98 +msgid "Once an item is refunded, it cannot be undone; it can only be repurchased." +msgstr "" + +#: includes/admin/payments/contextual-help.php:107 +msgid "The order history can be searched in several different ways." +msgstr "" + +#: includes/admin/payments/contextual-help.php:108 +msgid "You can enter:" +msgstr "" + +#: includes/admin/payments/contextual-help.php:110 +msgid "The specific order ID" +msgstr "" + +#: includes/admin/payments/contextual-help.php:111 +msgid "The 32-character order key" +msgstr "" + +#: includes/admin/payments/contextual-help.php:112 +msgid "The customer's email address" +msgstr "" + +#. translators: %s: the prefix needed to search by customer - This should remain untranslated `customer:` +#: includes/admin/payments/contextual-help.php:115 +msgid "The customer's name or ID prefixed by %s" +msgstr "" + +#. translators: %s: the prefix needed to search by user - This should remain untranslated `user:` +#: includes/admin/payments/contextual-help.php:120 +msgid "A user's ID prefixed by %s" +msgstr "" + +#. translators: %s: the prefix needed to search by Order ID - This should remain untranslated `#` +#: includes/admin/payments/contextual-help.php:125 +msgid "The %1$s ID prefixed by %2$s" +msgstr "" + +#. translators: %s: the prefix needed to search by discount code - This should remain untranslated `discount:` +#: includes/admin/payments/contextual-help.php:131 +msgid "The Discount Code prefixed by %s" +msgstr "" + +#. translators: %s: the prefix needed to search by transaction ID - This should remain untranslated `txn:` +#: includes/admin/payments/contextual-help.php:136 +msgid "A transaction ID prefixed by %s" +msgstr "" + +#: includes/admin/payments/contextual-help.php:146 +#: templates/history-purchases.php:54 +msgid "Details" +msgstr "" + +#: includes/admin/payments/contextual-help.php:148 +msgid "Each order can be further inspected by clicking the corresponding View Order Details link. This will provide more information including:" +msgstr "" + +#: includes/admin/payments/contextual-help.php:151 +msgid "The file associated with the purchase." +msgstr "" + +#: includes/admin/payments/contextual-help.php:152 +msgid "The exact date and time the order was completed." +msgstr "" + +#: includes/admin/payments/contextual-help.php:153 +msgid "If a coupon or discount was used during the checkout process." +msgstr "" + +#: includes/admin/payments/contextual-help.php:154 +msgid "The buyer's name." +msgstr "" + +#: includes/admin/payments/contextual-help.php:155 +msgid "The buyer's email address." +msgstr "" + +#: includes/admin/payments/contextual-help.php:156 +msgid "Any customer-specific notes related to the order." +msgstr "" + +#: includes/admin/payments/contextual-help.php:157 +msgid "The name of the order gateway used to complete the order." +msgstr "" + +#: includes/admin/payments/contextual-help.php:158 +msgid "A unique key used to identify the order." +msgstr "" + +#: includes/admin/payments/orders.php:28 +msgid "Create Order" +msgstr "" + +#: includes/admin/payments/orders.php:29 +msgid "Save Order" +msgstr "" + +#: includes/admin/payments/orders.php:43 +msgid "Send Purchase Receipt" +msgstr "" + +#: includes/admin/payments/orders.php:48 +msgid "Checking this box will email the purchase receipt to the selected customer." +msgstr "" + +#: includes/admin/payments/orders.php:198 +msgid "Assign" +msgstr "" + +#: includes/admin/payments/orders.php:199 +msgid "Switch Customer" +msgstr "" + +#: includes/admin/payments/orders.php:209 +msgid "Select existing customer" +msgstr "" + +#: includes/admin/payments/orders.php:210 +msgid "Create new customer" +msgstr "" + +#: includes/admin/payments/orders.php:216 +msgid "Select customer" +msgstr "" + +#: includes/admin/payments/orders.php:225 +#: includes/admin/payments/orders.php:226 +msgid "Search for a customer" +msgstr "" + +#: includes/admin/payments/orders.php:259 +msgid "View customer record" +msgstr "" + +#: includes/admin/payments/orders.php:270 +#: includes/admin/reporting/class-export-customers.php:61 +#: includes/admin/reporting/class-export-payments.php:59 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:61 +#: includes/admin/tools.php:465 +#: src/Emails/Tags/Registry.php:77 +#: templates/shortcode-profile-editor.php:44 +msgid "First Name" +msgstr "" + +#: includes/admin/payments/orders.php:280 +#: includes/admin/reporting/class-export-customers.php:62 +#: includes/admin/reporting/class-export-payments.php:60 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:62 +#: includes/admin/tools.php:475 +#: templates/shortcode-profile-editor.php:49 +msgid "Last Name" +msgstr "" + +#. translators: email type +#: includes/admin/payments/orders.php:334 +msgid "Send a new copy of the purchase receipt to the %s email address. If download URLs were included in the original receipt, new ones will be included." +msgstr "" + +#: includes/admin/payments/orders.php:335 +msgid "selected" +msgstr "" + +#: includes/admin/payments/orders.php:335 +msgid "customer" +msgstr "" + +#: includes/admin/payments/orders.php:339 +msgid "Sending purchase receipts from Easy Digital Downloads has been disabled." +msgstr "" + +#: includes/admin/payments/orders.php:343 +msgid "Send email receipt to" +msgstr "" + +#: includes/admin/payments/orders.php:367 +msgid "Customer Primary" +msgstr "" + +#: includes/admin/payments/orders.php:369 +msgid "Order Email" +msgstr "" + +#: includes/admin/payments/orders.php:443 +#: includes/blocks/views/checkout/purchase-form/address.php:3 +#: includes/privacy-functions.php:824 +#: src/Emails/Tags/Registry.php:105 +msgid "Billing Address" +msgstr "" + +#: includes/admin/payments/orders.php:446 +msgid "Existing Address:" +msgstr "" + +#: includes/admin/payments/orders.php:451 +msgid "Line 1:" +msgstr "" + +#: includes/admin/payments/orders.php:458 +msgid "Line 2:" +msgstr "" + +#: includes/admin/payments/orders.php:465 +msgctxt "Address City" +msgid "City:" +msgstr "" + +#: includes/admin/payments/orders.php:472 +msgctxt "Zip / Postal code of address" +msgid "Zip / Postal Code:" +msgstr "" + +#: includes/admin/payments/orders.php:479 +msgctxt "Address country" +msgid "Country:" +msgstr "" + +#: includes/admin/payments/orders.php:491 +msgid "Search Countries" +msgstr "" + +#: includes/admin/payments/orders.php:501 +msgctxt "Region of address" +msgid "Region:" +msgstr "" + +#: includes/admin/payments/orders.php:513 +msgid "Search Regions" +msgstr "" + +#: includes/admin/payments/orders.php:599 +msgid "File Download Log for Order" +msgstr "" + +#: includes/admin/payments/orders.php:600 +msgid "Customer Download Log" +msgstr "" + +#: includes/admin/payments/orders.php:601 +#: includes/privacy-functions.php:852 +msgid "Customer Orders" +msgstr "" + +#: includes/admin/payments/orders.php:618 +msgid "Recalculate Order Values" +msgstr "" + +#: includes/admin/payments/orders.php:821 +#: includes/admin/views/tmpl-order-copy-download-link.php:38 +#: includes/gateways/stripe/includes/utils/modal.php:69 +#: src/Admin/Pointers.php:42 +msgid "Close" +msgstr "" + +#: includes/admin/payments/orders.php:886 +msgid "Order Details" +msgstr "" + +#: includes/admin/payments/orders.php:935 +msgid "Order Extras" +msgstr "" + +#: includes/admin/payments/orders.php:973 +msgid "Key" +msgstr "" + +#: includes/admin/payments/orders.php:983 +#: includes/admin/payments/orders.php:991 +msgid "IP" +msgstr "" + +#: includes/admin/payments/orders.php:998 +#: includes/admin/payments/orders.php:1021 +#: includes/admin/reporting/class-export-payments.php:74 +#: includes/admin/reporting/export/class-batch-export-payments.php:60 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:76 +#: includes/admin/tools.php:622 +#: src/Emails/Tags/Registry.php:233 +msgid "Transaction ID" +msgstr "" + +#: includes/admin/payments/orders.php:1010 +msgid "Dispute ID" +msgstr "" + +#: includes/admin/payments/orders.php:1035 +msgid "Unlimited Downloads" +msgstr "" + +#: includes/admin/payments/orders.php:1039 +msgid "Checking this box will override all other file download limits for this purchase, granting the customer unlimited downloads of all files included on the purchase." +msgstr "" + +#: includes/admin/payments/orders.php:1050 +msgid "Deferred Actions" +msgstr "" + +#: includes/admin/payments/orders.php:1053 +msgid "Not Run" +msgstr "" + +#: includes/admin/payments/orders.php:1057 +#: includes/payments/functions.php:539 +msgid "Completed" +msgstr "" + +#: includes/admin/payments/orders.php:1074 +msgid "Deferred Actions were added in Easy Digital Downloads 2.8. Orders placed on prior versions will not have a deferred actions status. If this order was placed on a version of Easy Digital Downloads supporting Deferred Actions, please verify that WP Cron is able to be run." +msgstr "" + +#: includes/admin/payments/orders.php:1110 +msgid "Order Attributes" +msgstr "" + +#: includes/admin/payments/orders.php:1125 +msgid "Order is still processing or was abandoned by customer. Successful orders will be marked as Complete automatically once processing is finalized." +msgstr "" + +#: includes/admin/payments/orders.php:1128 +msgid "Complete" +msgstr "" + +#: includes/admin/payments/orders.php:1129 +msgid "All processing is completed for this purchase." +msgstr "" + +#: includes/admin/payments/orders.php:1132 +#: includes/payments/functions.php:542 +msgid "Revoked" +msgstr "" + +#: includes/admin/payments/orders.php:1133 +msgid "Access to purchased items is disabled, perhaps due to policy violation or fraud." +msgstr "" + +#: includes/admin/payments/orders.php:1136 +#: includes/payments/functions.php:540 +msgid "Refunded" +msgstr "" + +#: includes/admin/payments/orders.php:1137 +msgid "The purchase amount is returned to the customer and access to items is disabled." +msgstr "" + +#: includes/admin/payments/orders.php:1140 +#: includes/payments/functions.php:544 +msgid "Abandoned" +msgstr "" + +#: includes/admin/payments/orders.php:1141 +msgid "The purchase attempt was not completed by the customer." +msgstr "" + +#: includes/admin/payments/orders.php:1144 +#: includes/payments/functions.php:543 +msgid "Failed" +msgstr "" + +#: includes/admin/payments/orders.php:1145 +msgid "Customer clicked Cancel before completing the purchase." +msgstr "" + +#: includes/admin/payments/orders.php:1148 +#: includes/payments/functions.php:545 +msgid "On Hold" +msgstr "" + +#: includes/admin/payments/orders.php:1149 +msgid "Order is held for review. Order items are not available to download." +msgstr "" + +#: includes/admin/payments/orders.php:1188 +msgid "On Hold Due To:" +msgstr "" + +#: includes/admin/payments/orders.php:1189 +msgid "Original Hold Reason:" +msgstr "" + +#: includes/admin/payments/orders.php:1229 +msgid "Recover" +msgstr "" + +#: includes/admin/payments/orders.php:1232 +msgid "Pending and abandoned payments can be resumed by the customer, using this custom URL. Payments can be resumed only when they do not have a transaction ID from the gateway." +msgstr "" + +#: includes/admin/payments/orders.php:1258 +msgid "Time" +msgstr "" + +#: includes/admin/payments/orders.php:1263 +msgid "Hour" +msgstr "" + +#: includes/admin/payments/orders.php:1269 +msgid "Minute" +msgstr "" + +#: includes/admin/payments/payments-history.php:207 +msgid "Edit Order" +msgstr "" + +#: includes/admin/payments/payments-history.php:212 +msgid "Add New Order" +msgstr "" + +#: includes/admin/payments/refunds.php:41 +msgid "View Original Order" +msgstr "" + +#: includes/admin/payments/refunds.php:47 +msgid "You are viewing a refund record." +msgstr "" + +#: includes/admin/payments/refunds.php:50 +msgid "A refund is a read-only record to help balance your store's books." +msgstr "" + +#: includes/admin/payments/refunds.php:253 +msgid "Refund Notes" +msgstr "" + +#: includes/admin/payments/refunds.php:297 +msgid "Refund Attributes" +msgstr "" + +#: includes/admin/payments/refunds.php:315 +msgid "Original Order" +msgstr "" + +#: includes/admin/payments/refunds.php:349 +msgid "Related Refunds" +msgstr "" + +#: includes/admin/payments/view-order-details.php:23 +msgid "Order ID not supplied. Please try again" +msgstr "" + +#: includes/admin/payments/view-order-details.php:31 +msgid "The specified ID does not belong to an order. Please try again" +msgstr "" + +#. translators: %s: refund link +#: includes/admin/payments/view-order-details.php:43 +msgid "The specified ID is for a refund, not an order. Please access the refund directly." +msgstr "" + +#. translators: %s: order number +#: includes/admin/payments/view-order-details.php:57 +#: includes/blocks/views/orders/orders.php:19 +msgid "Order: %s" +msgstr "" + +#. translators: %s: singular label +#: includes/admin/payments/view-order-details.php:138 +#: includes/admin/views/tmpl-order-item.php:54 +msgid "Copy %s Links" +msgstr "" + +#: includes/admin/payments/view-refund.php:23 +msgid "Refund ID not supplied. Please try again." +msgstr "" + +#: includes/admin/payments/view-refund.php:32 +msgid "The specified ID does not belong to an refund. Please try again." +msgstr "" + +#. translators: %s Refund number, linked to Refund record. +#: includes/admin/payments/view-refund.php:44 +#: includes/admin/views/tmpl-order-refund.php:25 +msgid "Refund: %s" +msgstr "" + +#: includes/admin/plugins.php:48 +#: src/Admin/Emails/Screen.php:35 +#: src/Admin/Menu/Header.php:145 +#: src/Admin/Menu/Pages.php:82 +#: includes/blocks/build/buy-button/index.js:12 +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/build/confirmation/index.js:1 +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/build/receipt/index.js:1 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/buy-button/edit.js:55 +#: includes/blocks/src/cart/edit.js:27 +#: includes/blocks/src/confirmation/edit.js:26 +#: includes/blocks/src/login/edit.js:23 +#: includes/blocks/src/receipt/edit.js:26 +#: includes/blocks/src/register/edit.js:22 +msgid "Settings" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:78 +msgid "Hey, I noticed you've made quite a few sales with Easy Digital Downloads! Are you enjoying Easy Digital Downloads?" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:80 +#: includes/gateways/stripe/includes/admin/admin-actions.php:43 +msgid "Yes" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:81 +msgid "Not Really" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:85 +msgid "We're sorry to hear you aren't enjoying Easy Digital Downloads. We would love a chance to improve. Could you take a minute and let us know what we can do better?" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:87 +msgid "Give Feedback" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:88 +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:96 +msgid "No thanks" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:92 +msgid "That's awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:93 +msgid "~ Chris Klosowski
    President of Easy Digital Downloads" +msgstr "" + +#: includes/admin/promos/notices/class-five-star-review-dashboard.php:95 +msgid "Ok, you deserve it!" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:48 +#: includes/admin/reporting/class-file-downloads-logs-list-table.php:109 +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:107 +#: includes/admin/reporting/export/class-batch-export-api-requests.php:39 +msgid "Log ID" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:49 +msgid "Request Details" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:50 +#: includes/admin/reporting/export/class-batch-export-api-requests.php:44 +msgid "API Version" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:51 +msgid "Request IP" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:52 +#: includes/admin/reporting/export/class-batch-export-api-requests.php:45 +msgid "Request Speed" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:97 +msgid "View Request" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:103 +msgid "API Request:" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:109 +msgid "API User:" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:111 +msgid "API Key:" +msgstr "" + +#: includes/admin/reporting/class-api-requests-logs-list-table.php:113 +msgid "Request Date:" +msgstr "" + +#. translators: %d: customer ID +#: includes/admin/reporting/class-base-logs-list-table.php:498 +msgid "Customer ID: %d" +msgstr "" + +#: includes/admin/reporting/class-base-logs-list-table.php:556 +msgid "Search logs..." +msgstr "" + +#: includes/admin/reporting/class-categories-reports-table.php:76 +msgid "Category" +msgstr "" + +#: includes/admin/reporting/class-categories-reports-table.php:77 +#: includes/admin/reporting/class-gateways-reports-table.php:77 +#: includes/reports/data/payment-gateways/class-gateway-stats-list-table.php:80 +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:179 +msgid "Total Sales" +msgstr "" + +#: includes/admin/reporting/class-categories-reports-table.php:79 +msgid "Monthly Sales Avg" +msgstr "" + +#: includes/admin/reporting/class-categories-reports-table.php:80 +msgid "Monthly Earnings Avg" +msgstr "" + +#: includes/admin/reporting/class-categories-reports-table.php:206 +msgid "Less than 1" +msgstr "" + +#: includes/admin/reporting/class-categories-reports-table.php:308 +msgid "No sales for dates provided." +msgstr "" + +#: includes/admin/reporting/class-categories-reports-table.php:349 +msgid "No earnings for dates provided." +msgstr "" + +#: includes/admin/reporting/class-download-reports-table.php:88 +msgid "View Detailed Report" +msgstr "" + +#: includes/admin/reporting/class-download-reports-table.php:103 +#: includes/admin/reporting/export/class-batch-export-downloads.php:57 +#: includes/admin/reporting/export/class-batch-export-sales-and-earnings.php:60 +#: includes/admin/reporting/graphing.php:300 +#: includes/admin/reporting/graphing.php:599 +#: includes/admin/reporting/reports.php:233 +#: includes/admin/reporting/reports.php:366 +#: includes/admin/reporting/reports.php:642 +#: includes/admin/reporting/reports.php:893 +#: includes/admin/reporting/reports.php:1333 +#: includes/admin/reporting/reports.php:1493 +#: includes/admin/reporting/reports.php:1673 +#: includes/reports/data/downloads/class-top-selling-downloads-list-table.php:57 +#: includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php:60 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-order-by.js:22 +msgid "Sales" +msgstr "" + +#: includes/admin/reporting/class-download-reports-table.php:105 +msgid "Monthly Average Sales" +msgstr "" + +#: includes/admin/reporting/class-download-reports-table.php:106 +msgid "Monthly Average Earnings" +msgstr "" + +#: includes/admin/reporting/class-download-reports-table.php:107 +msgid "Detailed Report" +msgstr "" + +#: includes/admin/reporting/class-export-customers.php:64 +msgid "Date Purchased" +msgstr "" + +#: includes/admin/reporting/class-export-customers.php:77 +msgid "Total Purchases" +msgstr "" + +#: includes/admin/reporting/class-export-customers.php:78 +msgid "Total Purchased" +msgstr "" + +#: includes/admin/reporting/class-export-download-history.php:60 +#: includes/admin/reporting/export/class-batch-export-file-downloads.php:51 +msgid "Downloaded by" +msgstr "" + +#: includes/admin/reporting/class-export-download-history.php:61 +#: includes/admin/reporting/class-file-downloads-logs-list-table.php:114 +#: includes/admin/reporting/export/class-batch-export-api-requests.php:41 +#: includes/admin/reporting/export/class-batch-export-file-downloads.php:52 +#: includes/admin/reporting/export/class-batch-export-payments.php:64 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:81 +#: includes/admin/tools.php:505 +#: includes/privacy-functions.php:828 +#: includes/privacy-functions.php:921 +#: includes/privacy-functions.php:999 +#: src/Emails/Tags/Registry.php:203 +msgid "IP Address" +msgstr "" + +#: includes/admin/reporting/class-export-download-history.php:63 +#: includes/admin/reporting/class-file-downloads-logs-list-table.php:113 +#: includes/admin/reporting/export/class-batch-export-file-downloads.php:55 +msgid "File" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:56 +#: includes/admin/reporting/class-export.php:76 +#: includes/admin/reporting/export/class-batch-export-customers.php:51 +#: includes/admin/reporting/export/class-batch-export-downloads.php:41 +#: includes/admin/reporting/export/class-batch-export-taxed-customers.php:41 +#: templates/history-purchases.php:51 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:31 +#: includes/blocks/src/utilities/download-order-by.js:14 +msgid "ID" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:57 +#: includes/admin/tools.php:545 +msgid "Payment Number" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:62 +#: includes/admin/reporting/export/class-batch-export-payments.php:47 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:64 +msgid "Address (Line 2)" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:64 +#: includes/admin/reporting/export/class-batch-export-payments.php:49 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:66 +#: includes/gateways/stripe/includes/template-functions.php:586 +msgid "State" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:66 +#: includes/admin/reporting/export/class-batch-export-payments.php:51 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:68 +#: includes/admin/tools.php:680 +#: includes/blocks/views/checkout/purchase-form/address.php:105 +#: includes/checkout/template.php:403 +#: includes/gateways/stripe/includes/template-functions.php:840 +#: templates/shortcode-profile-editor.php:163 +msgid "Zip / Postal Code" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:67 +#: includes/blocks/views/orders/receipt-items.php:20 +#: includes/reports/reports-functions.php:332 +#: src/Admin/Onboarding/Wizard.php:254 +#: templates/shortcode-receipt.php:200 +msgid "Products" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:68 +#: includes/admin/reporting/export/class-batch-export-payments.php:54 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:71 +msgid "SKUs" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:69 +#: includes/admin/reporting/export/class-batch-export-payments.php:55 +#: includes/admin/reporting/export/class-batch-export-sales.php:63 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:80 +#: includes/admin/settings/register-settings.php:537 +#: src/Admin/Settings/Tabs/General.php:177 +#: src/Admin/Settings/Tabs/General.php:185 +msgid "Currency" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:72 +#: includes/admin/reporting/export/class-batch-export-payments.php:58 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:74 +msgid "Discount Code" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:73 +#: includes/admin/reporting/export/class-batch-export-payments.php:59 +#: includes/admin/tools.php:535 +#: includes/blocks/views/orders/totals.php:32 +#: src/Emails/Tags/Registry.php:168 +#: templates/shortcode-receipt.php:63 +msgid "Payment Method" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:75 +#: includes/admin/reporting/export/class-batch-export-payments.php:61 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:77 +#: includes/admin/tools.php:564 +msgid "Purchase Key" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:77 +#: includes/admin/reporting/export/class-batch-export-payments.php:63 +#: includes/admin/reporting/export/class-batch-export-sales.php:55 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:79 +#: includes/admin/tools.php:632 +#: src/Emails/Templates/Registry.php:80 +msgid "User" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:185 +#: includes/admin/reporting/export/class-batch-export-payments.php:128 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:145 +msgid "none" +msgstr "" + +#: includes/admin/reporting/class-export-payments.php:190 +#: includes/admin/reporting/export/class-batch-export-payments.php:216 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:228 +msgid "guest" +msgstr "" + +#: includes/admin/reporting/class-export.php:189 +#: includes/admin/reporting/export/class-batch-export.php:178 +#: includes/admin/tools/class-edd-tools-recount-customer-stats.php:114 +#: includes/admin/tools/class-edd-tools-recount-store-earnings.php:157 +#: includes/admin/tools/class-edd-tools-reset-stats.php:128 +msgid "You do not have permission to export data." +msgstr "" + +#: includes/admin/reporting/class-file-downloads-logs-list-table.php:112 +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:108 +#: includes/admin/reporting/class-sales-logs-list-table.php:97 +#: includes/admin/reporting/export/class-batch-export-payments.php:42 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:58 +msgid "Order Number" +msgstr "" + +#: includes/admin/reporting/class-file-downloads-logs-list-table.php:115 +#: includes/admin/reporting/export/class-batch-export-file-downloads.php:53 +msgid "User Agent" +msgstr "" + +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:74 +msgid "View Log Message" +msgstr "" + +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:88 +msgid "Log data:" +msgstr "" + +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:110 +msgid "Error Message" +msgstr "" + +#. translators: %s: payment data +#: includes/admin/reporting/class-gateway-error-logs-list-table.php:137 +#: includes/gateways/manual.php:74 +#: includes/gateways/paypal-standard.php:197 +msgid "Payment Error" +msgstr "" + +#: includes/admin/reporting/class-gateways-reports-table.php:75 +#: includes/reports/data/payment-gateways/class-gateway-stats-list-table.php:77 +msgid "Complete Sales" +msgstr "" + +#: includes/admin/reporting/class-gateways-reports-table.php:76 +#: includes/reports/data/payment-gateways/class-gateway-stats-list-table.php:78 +msgid "Pending / Failed Sales" +msgstr "" + +#: includes/admin/reporting/class-sales-logs-list-table.php:100 +#: includes/admin/reporting/export/class-batch-export-sales.php:61 +msgid "Item Amount" +msgstr "" + +#: includes/admin/reporting/contextual-help.php:61 +#: includes/admin/reporting/reports.php:179 +#: src/Admin/Menu/Header.php:148 +#: src/Admin/Menu/Pages.php:75 +#: src/Admin/Menu/Pages.php:76 +msgid "Reports" +msgstr "" + +#: includes/admin/reporting/contextual-help.php:62 +msgid "This screen provides you with reports for your earnings, downloads, customers and taxes." +msgstr "" + +#: includes/admin/reporting/contextual-help.php:67 +#: includes/admin/reporting/reports.php:2685 +#: includes/admin/reporting/views/export-sales-earnings.php:61 +#: includes/admin/tools.php:955 +msgid "Export" +msgstr "" + +#: includes/admin/reporting/contextual-help.php:69 +msgid "This screen allows you to export your reports into a CSV format." +msgstr "" + +#: includes/admin/reporting/contextual-help.php:70 +msgid "Sales and Earnings - This report exports all of the sales and earnings that you have made in the current year. It includes your sales and earnings for each product as well a graphs of sales and earnings so you can compare them for each month." +msgstr "" + +#: includes/admin/reporting/contextual-help.php:71 +msgid "Payment History - This report exports all of the payments you have received on your EDD store in a CSV format. It includes the contact details of the customer, the products they have purchased as well as any discount codes they have used and the final price they have paid." +msgstr "" + +#: includes/admin/reporting/contextual-help.php:72 +msgid "Customers - This report exports all of your customers in a CSV format. It exports the customer's name and email address and the amount of products they have purchased as well as the final price of their total purchases." +msgstr "" + +#: includes/admin/reporting/contextual-help.php:73 +msgid "Download History - This report exports all of the downloads you have received in the current month into a CSV. It exports the date the file was downloaded, the customer it was downloaded by, their IP address, the name of the product and the file they downloaded." +msgstr "" + +#: includes/admin/reporting/contextual-help.php:79 +msgid "Search File Downloads" +msgstr "" + +#: includes/admin/reporting/contextual-help.php:81 +msgid "The file download log can be searched in several different ways:" +msgstr "" + +#: includes/admin/reporting/contextual-help.php:83 +msgid "You can enter the customer's email address" +msgstr "" + +#: includes/admin/reporting/contextual-help.php:84 +msgid "You can enter the customer's IP address" +msgstr "" + +#: includes/admin/reporting/contextual-help.php:85 +msgid "You can enter the download file's name" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-api-requests.php:40 +msgid "API Request" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-api-requests.php:42 +msgid "API User" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-api-requests.php:43 +msgid "API Key" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-customers.php:52 +msgid "User ID" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-customers.php:55 +#: includes/admin/reporting/export/class-batch-export-taxed-customers.php:44 +msgid "Number of Purchases" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-customers.php:56 +#: includes/admin/reporting/export/class-batch-export-taxed-customers.php:45 +msgid "Customer Value" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-customers.php:57 +msgid "Payment IDs" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-customers.php:58 +#: includes/admin/reporting/export/class-batch-export-downloads.php:44 +#: includes/privacy-functions.php:643 +msgid "Date Created" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-downloads.php:42 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:39 +msgid "Slug" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-downloads.php:45 +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:85 +msgid "Author" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-downloads.php:46 +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:154 +msgid "Description" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-downloads.php:47 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-content.js:14 +msgid "Excerpt" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/reporting/export/class-batch-export-downloads.php:50 +#: includes/post-types.php:280 +msgid "Tags" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-downloads.php:52 +#: includes/blocks/includes/orders/orders.php:579 +#: templates/history-downloads.php:46 +msgid "Files" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-downloads.php:54 +msgid "Featured Image" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-earnings-report.php:66 +msgid "Monthly Sales Activity" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-earnings-report.php:67 +msgid "Gross Activity" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-earnings-report.php:76 +msgid "Net Activity" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-earnings-report.php:152 +msgid "Order Count" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-earnings-report.php:153 +msgid "Gross Amount" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-payments.php:41 +#: includes/admin/reporting/export/class-batch-export-sales.php:64 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:57 +#: includes/privacy-functions.php:913 +msgid "Order ID" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-payments.php:44 +#: includes/admin/reporting/export/class-batch-export-sales.php:56 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:60 +#: includes/admin/tools.php:485 +#: includes/privacy-functions.php:631 +#: includes/privacy-functions.php:917 +msgid "Customer ID" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-payments.php:52 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:69 +msgid "Products (Verbose)" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-payments.php:65 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:82 +#: includes/admin/tools.php:515 +msgid "Mode (Live|Test)" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-payments.php:67 +#: includes/admin/reporting/export/class-batch-export-taxed-orders.php:84 +msgid "Country Name" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-payments.php:68 +msgid "State Name" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-sales.php:54 +msgid "Product ID" +msgstr "" + +#: includes/admin/reporting/export/class-batch-export-sales.php:65 +msgid "Price ID" +msgstr "" + +#: includes/admin/reporting/export/export-functions.php:51 +msgid "Export location or file not writable" +msgstr "" + +#: includes/admin/reporting/export/export-functions.php:78 +msgid "No data found for export parameters" +msgstr "" + +#: includes/admin/reporting/export/export-functions.php:85 +msgid "Batch Processing Complete" +msgstr "" + +#: includes/admin/reporting/graphing.php:311 +msgid "Earnings Over Time" +msgstr "" + +#: includes/admin/reporting/graphing.php:328 +#: includes/admin/reporting/graphing.php:624 +msgid "Total earnings for period shown: " +msgstr "" + +#: includes/admin/reporting/graphing.php:336 +#: includes/admin/reporting/graphing.php:632 +msgid "Total sales for period shown: " +msgstr "" + +#: includes/admin/reporting/graphing.php:342 +msgid "Estimated monthly earnings: " +msgstr "" + +#: includes/admin/reporting/graphing.php:350 +msgid "Estimated monthly sales: " +msgstr "" + +#: includes/admin/reporting/graphing.php:357 +msgid "Excludes sales tax." +msgstr "" + +#. translators: %s: Download title +#: includes/admin/reporting/graphing.php:609 +msgid "Earnings Over Time for %s" +msgstr "" + +#. translators: %s: Formatted currency value for earnings +#: includes/admin/reporting/graphing.php:642 +msgid "Average monthly earnings: %s" +msgstr "" + +#. translators: %s: Number of sales +#: includes/admin/reporting/graphing.php:653 +msgid "Average monthly sales: %s" +msgstr "" + +#: includes/admin/reporting/graphing.php:717 +msgid "Invalid date format. Please enter a date in the format: YYYY-mm-dd." +msgstr "" + +#: includes/admin/reporting/graphing.php:718 +msgid "Invalid Date Error" +msgstr "" + +#: includes/admin/reporting/graphing.php:799 +msgid "Clicking this will clear the reports cache" +msgstr "" + +#: includes/admin/reporting/graphing.php:799 +msgid "Refresh Reports" +msgstr "" + +#: includes/admin/reporting/logs.php:20 +msgid "The logs tab has been moved to the Tools screen." +msgstr "" + +#: includes/admin/reporting/reports.php:280 +#: includes/admin/reporting/reports.php:1410 +msgid "Average Order Value" +msgstr "" + +#: includes/admin/reporting/reports.php:304 +#: includes/admin/reporting/reports.php:2492 +#: includes/admin/reporting/reports.php:2566 +#: includes/admin/reporting/reports.php:2639 +#: includes/emails/email-summary/template-parts/data-listing.php:68 +msgid "New Customers" +msgstr "" + +#: includes/admin/reporting/reports.php:323 +#: includes/admin/reporting/reports.php:1114 +msgid "Total Refund Amount" +msgstr "" + +#: includes/admin/reporting/reports.php:346 +#: includes/admin/reporting/reports.php:710 +#: includes/admin/reporting/reports.php:1561 +msgid "Sales and Earnings" +msgstr "" + +#: includes/admin/reporting/reports.php:445 +msgid "Sales / Earnings" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/reporting/reports.php:507 +msgid "Most Valuable %s" +msgstr "" + +#: includes/admin/reporting/reports.php:544 +msgid "Average Sales / Earnings" +msgstr "" + +#: includes/admin/reporting/reports.php:559 +msgid "Net\t" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/reporting/reports.php:597 +msgid "Top Selling %s" +msgstr "" + +#: includes/admin/reporting/reports.php:609 +msgid "Sales by Variation" +msgstr "" + +#: includes/admin/reporting/reports.php:659 +msgid "Earnings by Variation" +msgstr "" + +#. translators: %s: Downloads label +#: includes/admin/reporting/reports.php:970 +msgid "%s Terms" +msgstr "" + +#: includes/admin/reporting/reports.php:985 +msgid "Earnings By Term" +msgstr "" + +#: includes/admin/reporting/reports.php:1048 +msgid "Number of Refunds" +msgstr "" + +#: includes/admin/reporting/reports.php:1071 +msgid "Number of Fully Refunded Orders" +msgstr "" + +#: includes/admin/reporting/reports.php:1095 +msgid "Number of Fully Refunded Items" +msgstr "" + +#: includes/admin/reporting/reports.php:1134 +msgid "Average Refund Amount" +msgstr "" + +#: includes/admin/reporting/reports.php:1155 +msgid "Average Time to Refund" +msgstr "" + +#: includes/admin/reporting/reports.php:1173 +msgid "Refund Rate" +msgstr "" + +#: includes/admin/reporting/reports.php:1213 +msgctxt "Context: As in the total number of items" +msgid "Number" +msgstr "" + +#: includes/admin/reporting/reports.php:1321 +msgid "Payment Gateways" +msgstr "" + +#: includes/admin/reporting/reports.php:1447 +msgid "Gateway Stats" +msgstr "" + +#: includes/admin/reporting/reports.php:1461 +msgid "Gateway Sales" +msgstr "" + +#: includes/admin/reporting/reports.php:1510 +msgid "Gateway Earnings" +msgstr "" + +#: includes/admin/reporting/reports.php:1774 +#: includes/admin/settings/contextual-help.php:112 +#: includes/admin/settings/register-settings.php:496 +msgid "Taxes" +msgstr "" + +#: includes/admin/reporting/reports.php:1785 +msgid "Total Tax Collected" +msgstr "" + +#: includes/admin/reporting/reports.php:1820 +msgid "Total Tax Collected for " +msgstr "" + +#: includes/admin/reporting/reports.php:1850 +msgid "Tax Collected by Location" +msgstr "" + +#: includes/admin/reporting/reports.php:1918 +#: includes/admin/reporting/reports.php:2102 +#: includes/admin/settings/register-settings.php:574 +#: includes/admin/tools/logs.php:174 +#: includes/privacy-functions.php:591 +#: includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php:58 +msgid "File Downloads" +msgstr "" + +#: includes/admin/reporting/reports.php:1930 +#: includes/admin/reporting/reports.php:2020 +msgid "Number of File Downloads" +msgstr "" + +#: includes/admin/reporting/reports.php:1954 +msgid "Average per Customer" +msgstr "" + +#: includes/admin/reporting/reports.php:1972 +msgid "Average per Order" +msgstr "" + +#: includes/admin/reporting/reports.php:1990 +msgid "Most Downloaded Product" +msgstr "" + +#: includes/admin/reporting/reports.php:2008 +msgid "Top Five Most Downloaded Products" +msgstr "" + +#: includes/admin/reporting/reports.php:2209 +msgid "Number of Discounts Used" +msgstr "" + +#: includes/admin/reporting/reports.php:2226 +msgid "Discount Ratio" +msgstr "" + +#: includes/admin/reporting/reports.php:2244 +msgid "Customer Savings" +msgstr "" + +#: includes/admin/reporting/reports.php:2265 +msgid "Average Discount Amount" +msgstr "" + +#: includes/admin/reporting/reports.php:2283 +msgid "Most Popular Discount" +msgstr "" + +#: includes/admin/reporting/reports.php:2308 +msgid "Discount Usage Count" +msgstr "" + +#: includes/admin/reporting/reports.php:2327 +msgid "Top Five Discounts" +msgstr "" + +#: includes/admin/reporting/reports.php:2340 +#: includes/admin/reporting/reports.php:2416 +msgid "Discount Usage" +msgstr "" + +#: includes/admin/reporting/reports.php:2511 +msgid "Average Revenue per Customer" +msgstr "" + +#: includes/admin/reporting/reports.php:2526 +msgid "Average Orders per Customer" +msgstr "" + +#: includes/admin/reporting/reports.php:2542 +msgid "Top Five Customers — All Time" +msgstr "" + +#: includes/admin/reporting/reports.php:2554 +msgid "Most Valuable Customers" +msgstr "" + +#: includes/admin/reporting/reports.php:2796 +#: includes/user-functions.php:855 +#: includes/user-functions.php:859 +msgid "Notice" +msgstr "" + +#: includes/admin/reporting/reports.php:2797 +msgid "Tax reports are only generated for taxes associated with a location. The legacy default tax rate is unable to be reported on." +msgstr "" + +#: includes/admin/reporting/views/export-api-requests.php:2 +msgid "Export API Request Logs" +msgstr "" + +#: includes/admin/reporting/views/export-api-requests.php:4 +msgid "Download a CSV of API request logs." +msgstr "" + +#: includes/admin/reporting/views/export-api-requests.php:8 +msgid "Export API Request Log Dates" +msgstr "" + +#: includes/admin/reporting/views/export-api-requests.php:10 +#: includes/admin/reporting/views/export-download-history.php:21 +#: includes/admin/reporting/views/export-orders.php:10 +#: includes/admin/reporting/views/export-sales-earnings.php:10 +#: includes/admin/reporting/views/export-sales.php:10 +#: includes/admin/reporting/views/export-taxed-customers.php:9 +#: includes/admin/reporting/views/export-taxed-orders.php:10 +msgid "Set start date" +msgstr "" + +#: includes/admin/reporting/views/export-api-requests.php:21 +#: includes/admin/reporting/views/export-download-history.php:32 +#: includes/admin/reporting/views/export-orders.php:21 +#: includes/admin/reporting/views/export-sales-earnings.php:21 +#: includes/admin/reporting/views/export-sales.php:21 +#: includes/admin/reporting/views/export-taxed-customers.php:20 +#: includes/admin/reporting/views/export-taxed-orders.php:21 +msgid "Set end date" +msgstr "" + +#: includes/admin/reporting/views/export-api-requests.php:35 +#: includes/admin/reporting/views/export-customers.php:68 +#: includes/admin/reporting/views/export-download-history.php:46 +#: includes/admin/reporting/views/export-downloads.php:23 +#: includes/admin/reporting/views/export-earnings-report.php:29 +#: includes/admin/reporting/views/export-orders.php:49 +#: includes/admin/reporting/views/export-sales.php:46 +#: includes/admin/reporting/views/export-taxed-customers.php:34 +#: includes/admin/reporting/views/export-taxed-orders.php:69 +msgid "Generate CSV" +msgstr "" + +#: includes/admin/reporting/views/export-customers.php:2 +msgid "Export Customers" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/admin/reporting/views/export-customers.php:8 +msgid "Download a CSV of customers. Select a taxonomy to see all the customers who purchased %s in that taxonomy." +msgstr "" + +#: includes/admin/reporting/views/export-customers.php:40 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:50 +msgid "Select Taxonomy" +msgstr "" + +#: includes/admin/reporting/views/export-customers.php:49 +msgid "All Taxonomies" +msgstr "" + +#: includes/admin/reporting/views/export-customers.php:53 +#: includes/admin/reporting/views/export-download-history.php:6 +#: includes/admin/reporting/views/export-downloads.php:10 +#: includes/admin/reporting/views/export-sales-earnings.php:34 +#: includes/admin/reporting/views/export-sales.php:34 +msgid "Select Download" +msgstr "" + +#. translators: %s: Download plural label +#: includes/admin/reporting/views/export-customers.php:61 +#: includes/admin/reporting/views/export-download-history.php:13 +#: includes/admin/reporting/views/export-downloads.php:17 +#: includes/admin/reporting/views/export-sales-earnings.php:42 +#: includes/reports/reports-functions.php:1481 +#: src/HTML/ProductSelect.php:52 +msgid "All %s" +msgstr "" + +#: includes/admin/reporting/views/export-download-history.php:2 +msgid "Export File Download Logs" +msgstr "" + +#: includes/admin/reporting/views/export-download-history.php:4 +msgid "Download a CSV of file download logs." +msgstr "" + +#: includes/admin/reporting/views/export-download-history.php:19 +msgid "Export File Download Log Dates" +msgstr "" + +#. translators: the singular post type label +#: includes/admin/reporting/views/export-downloads.php:4 +msgid "Export %s Products" +msgstr "" + +#. translators: %s: Download plural label +#: includes/admin/reporting/views/export-downloads.php:8 +msgid "Download a CSV of product %1$s." +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:2 +msgid "Export Earnings Report" +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:4 +msgid "Download a CSV giving a detailed look into earnings over time." +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:8 +msgid "Export Earnings Start" +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:10 +msgid "Select start month" +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:12 +msgid "Select start year" +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:16 +msgctxt "Date one to date two" +msgid "— to —" +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:20 +msgid "Export Earnings End" +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:22 +msgid "Select end month" +msgstr "" + +#: includes/admin/reporting/views/export-earnings-report.php:24 +msgid "Select end year" +msgstr "" + +#: includes/admin/reporting/views/export-orders.php:2 +msgid "Export Orders" +msgstr "" + +#: includes/admin/reporting/views/export-orders.php:4 +msgid "Download a CSV of all orders." +msgstr "" + +#: includes/admin/reporting/views/export-orders.php:8 +msgid "Export Order Dates" +msgstr "" + +#: includes/admin/reporting/views/export-orders.php:33 +#: includes/admin/reporting/views/export-taxed-orders.php:33 +msgid "Select Status" +msgstr "" + +#: includes/admin/reporting/views/export-orders.php:39 +#: includes/admin/reporting/views/export-taxed-orders.php:39 +msgid "All Statuses" +msgstr "" + +#: includes/admin/reporting/views/export-sales-earnings.php:2 +msgid "Export Sales and Earnings" +msgstr "" + +#: includes/admin/reporting/views/export-sales-earnings.php:4 +msgid "Download a CSV of all sales or earnings on a day-by-day basis." +msgstr "" + +#: includes/admin/reporting/views/export-sales-earnings.php:8 +msgid "Export Sales and Earnings Dates" +msgstr "" + +#: includes/admin/reporting/views/export-sales-earnings.php:46 +msgid "Select Customer" +msgstr "" + +#: includes/admin/reporting/views/export-sales-earnings.php:54 +msgid "All Customers" +msgstr "" + +#: includes/admin/reporting/views/export-sales.php:2 +msgid "Export Product Sales" +msgstr "" + +#: includes/admin/reporting/views/export-sales.php:4 +msgid "Download a CSV file containing a record of each sale of a product along with the customer information." +msgstr "" + +#: includes/admin/reporting/views/export-sales.php:8 +msgid "Export Sales Dates" +msgstr "" + +#: includes/admin/reporting/views/export-taxed-customers.php:2 +msgid "Export Taxed Customers" +msgstr "" + +#: includes/admin/reporting/views/export-taxed-customers.php:4 +msgid "Download a CSV of all customers that were taxed." +msgstr "" + +#: includes/admin/reporting/views/export-taxed-customers.php:8 +msgid "Export Taxed Customer Dates" +msgstr "" + +#: includes/admin/reporting/views/export-taxed-orders.php:2 +msgid "Export Taxed Orders" +msgstr "" + +#: includes/admin/reporting/views/export-taxed-orders.php:4 +msgid "Download a CSV of all orders, taxed by Country and/or Region." +msgstr "" + +#: includes/admin/reporting/views/export-taxed-orders.php:8 +msgid "Export Taxed Order Dates" +msgstr "" + +#: includes/admin/reporting/views/export-taxed-orders.php:46 +msgid "Select Country" +msgstr "" + +#: includes/admin/reporting/views/export-taxed-orders.php:57 +msgid "Select Region" +msgstr "" + +#: includes/admin/reporting/views/export-taxed-orders.php:62 +#: src/HTML/Elements.php:503 +msgid "All Regions" +msgstr "" + +#. translators: %s: Upgrade URL +#: includes/admin/settings/contextual-help.php:55 +msgid "Need more from your Easy Digital Downloads store? Upgrade Now!." +msgstr "" + +#: includes/admin/settings/contextual-help.php:65 +msgid "This screen provides the most basic settings for configuring your store. You can set the currency, page templates, and general store settings." +msgstr "" + +#: includes/admin/settings/contextual-help.php:72 +#: includes/admin/settings/register-settings.php:492 +msgid "Payments" +msgstr "" + +#: includes/admin/settings/contextual-help.php:74 +msgid "This screen provides ways to enable Test Mode, toggle payment gateways on or off, manage accounting settings, and configure gateway-specific settings. Any extra payment gateway extensions you have installed will appear on this page, and can be configured to suit your needs." +msgstr "" + +#: includes/admin/settings/contextual-help.php:75 +msgid "Test Payment - This included gateway is great for testing your store, as it requires no payment, and leads straight to product downloads. However, please remember to turn it off once your site is live!" +msgstr "" + +#: includes/admin/settings/contextual-help.php:76 +msgid "PayPal - A PayPal payment gateway is included as standard with Easy Digital Downloads. To test the PayPal gateway, you need a Sandbox account for PayPal and the site must be placed in Test Mode from the Payments > Gateways tab. Please remember to enter your PayPal account email address in order for payments to get processed." +msgstr "" + +#: includes/admin/settings/contextual-help.php:77 +msgid "Stripe - The Stripe payment gateway is also included with Easy Digital Downloads. To test the Stripe gateway, you must \"Connect with Stripe\" and the site must be placed in Test Mode from the Payments > Gateways tab." +msgstr "" + +#: includes/admin/settings/contextual-help.php:84 +#: includes/admin/settings/register-settings.php:493 +#: src/Admin/Emails/Screen.php:34 +#: src/Admin/Menu/Header.php:163 +#: src/Admin/Menu/Pages.php:88 +#: src/Admin/Onboarding/Wizard.php:242 +msgid "Emails" +msgstr "" + +#: includes/admin/settings/contextual-help.php:86 +msgid "This screen allows you to customize how emails act throughout your store. You can choose a premade template, set the sender's name, email address, and subject." +msgstr "" + +#: includes/admin/settings/contextual-help.php:87 +msgid "A set of email tag markers has also been provided to allow the creation of personalized emails. A tag consists of a keyword surrounded by curly braces: {tag}." +msgstr "" + +#: includes/admin/settings/contextual-help.php:94 +#: includes/admin/settings/register-settings.php:494 +msgid "Marketing" +msgstr "" + +#: includes/admin/settings/contextual-help.php:96 +msgid "Marketing settings will help you connect with your customers." +msgstr "" + +#: includes/admin/settings/contextual-help.php:97 +msgid "Marketing specific extensions will add their settings here as well." +msgstr "" + +#: includes/admin/settings/contextual-help.php:104 +#: includes/admin/settings/register-settings.php:495 +msgid "Styles" +msgstr "" + +#: includes/admin/settings/contextual-help.php:105 +msgid "This screen allows customization of your store's styles. For complete control, you can completely disable all styles generated by the plugin." +msgstr "" + +#: includes/admin/settings/contextual-help.php:114 +msgid "This screen allows you to configure the tax rules for your store." +msgstr "" + +#: includes/admin/settings/contextual-help.php:115 +msgid "If you do not wish to charge any tax on purchase, simply leave the Enable Taxes option unchecked." +msgstr "" + +#: includes/admin/settings/contextual-help.php:116 +msgid "Default Tax Rate: The default tax rate is the tax rate charged to customers located in your base country / state or province." +msgstr "" + +#: includes/admin/settings/contextual-help.php:117 +msgid "Base Country: This determines the country that is loaded by default on the checkout screen for customers that do not have an address stored in their account." +msgstr "" + +#: includes/admin/settings/contextual-help.php:118 +msgid "Base State / Province: This determines the region that is loaded by default on the checkout screen for customers that do not have an address stored in their account." +msgstr "" + +#: includes/admin/settings/contextual-help.php:119 +msgid "Prices Entered with Tax: if enabled, this means that the price entered on the product edit screens is the total amount the customer will pay after taxes. For example, if enabled and the price of a product is $20, the customer will pay 20$ at checkout. The exact amount charged in tax will be calculated automatically." +msgstr "" + +#: includes/admin/settings/contextual-help.php:120 +msgid "Display Tax Rate on Prices: when enabled, the amount the customer is expected to pay in tax will be displayed below purchase buttons." +msgstr "" + +#: includes/admin/settings/contextual-help.php:121 +msgid "Display During Checkout: This determines whether prices are shown with taxes or without taxes on checkout. If set to Including Tax, a $10 product with a 10% tax will be shown as $11." +msgstr "" + +#: includes/admin/settings/contextual-help.php:122 +msgid "Calculate Tax After Discounts: If enabled, this option will make it so that tax is calculated on the after-discount amount. If a purchase of $20 is made and a 20% discount is applied, tax will be calculated off of $16 instead of $20." +msgstr "" + +#: includes/admin/settings/contextual-help.php:123 +msgid "Additional Tax Rates: This section lets you add tax rates for specific countries and/or states/provinces in those countries." +msgstr "" + +#: includes/admin/settings/contextual-help.php:130 +#: includes/admin/settings/register-settings.php:497 +msgid "Policies" +msgstr "" + +#: includes/admin/settings/contextual-help.php:132 +msgid "This screen provides access to customer privacy policies, terms & agreements, and how to display them on the front of your site." +msgstr "" + +#: includes/admin/settings/contextual-help.php:133 +msgid "You may also override what happens to order records when a customer exercises their right to be forgotten from your site." +msgstr "" + +#: includes/admin/settings/contextual-help.php:141 +msgid "This screen provides access to settings added by most Easy Digital Downloads extensions." +msgstr "" + +#: includes/admin/settings/contextual-help.php:148 +msgid "Miscellaneous" +msgstr "" + +#: includes/admin/settings/contextual-help.php:150 +msgid "This screen provides other miscellaneous options such as configuring your store buttons, file download functionality, and terms of service." +msgstr "" + +#: includes/admin/settings/display-settings.php:34 +msgid "Taxes are currently disabled. Rates listed below will not be applied to purchases until taxes are enabled." +msgstr "" + +#: includes/admin/settings/display-settings.php:56 +msgid "Manage extensions for Easy Digital Downloads which are not included with a pass. Having an active license for your extensions gives you access to updates when they're available." +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: includes/admin/settings/display-settings.php:73 +msgid "Have a pass? You're ready to set up EDD (Pro). %1$sActivate Your Pass%2$s" +msgstr "" + +#: includes/admin/settings/register-settings.php:499 +msgid "Licenses" +msgstr "" + +#: includes/admin/settings/register-settings.php:500 +msgid "Misc" +msgstr "" + +#: includes/admin/settings/register-settings.php:536 +msgid "Store" +msgstr "" + +#: includes/admin/settings/register-settings.php:538 +#: src/Admin/Settings/Tabs/General.php:118 +msgid "Pages" +msgstr "" + +#: includes/admin/settings/register-settings.php:539 +#: src/Admin/Settings/Tabs/General.php:225 +msgid "API" +msgstr "" + +#: includes/admin/settings/register-settings.php:543 +#: includes/blocks/includes/checkout/checkout.php:131 +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:89 +#: includes/install.php:285 +#: templates/widget-cart-checkout.php:6 +#: templates/widget-cart-empty.php:7 +msgid "Checkout" +msgstr "" + +#: includes/admin/settings/register-settings.php:545 +msgid "Accounting" +msgstr "" + +#: includes/admin/settings/register-settings.php:549 +msgid "Summaries" +msgstr "" + +#: includes/admin/settings/register-settings.php:556 +msgid "Buttons" +msgstr "" + +#: includes/admin/settings/register-settings.php:560 +msgid "Rates" +msgstr "" + +#: includes/admin/settings/register-settings.php:563 +#: src/Admin/Settings/Tabs/Privacy.php:43 +msgid "Privacy Policy" +msgstr "" + +#: includes/admin/settings/register-settings.php:564 +#: src/Admin/Settings/Tabs/Privacy.php:73 +msgid "Terms & Agreements" +msgstr "" + +#: includes/admin/settings/register-settings.php:565 +msgid "Export & Erase" +msgstr "" + +#: includes/admin/settings/register-settings.php:568 +msgid "Main" +msgstr "" + +#: includes/admin/settings/register-settings.php:573 +msgid "Purchase Buttons" +msgstr "" + +#: includes/admin/settings/register-settings.php:596 +#: includes/class-edd-discount.php:691 +#: src/Admin/Settings/Tabs/Gateways.php:385 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/image-alignment.js:6 +msgid "None" +msgstr "" + +#: includes/admin/settings/register-settings.php:954 +#: includes/gateways/functions.php:80 +#: includes/gateways/functions.php:81 +msgid "Store Gateway" +msgstr "" + +#: includes/admin/settings/register-settings.php:955 +msgid "This is an internal payment gateway which can be used for manually added orders or test purchases. No money is actually processed." +msgstr "" + +#: includes/admin/settings/register-settings.php:967 +msgid "Configure Gateway" +msgstr "" + +#. translators: 1: opening link tag; do not translate, 2: closing link tag; do not translate +#: includes/admin/settings/register-settings.php:987 +msgid "Choose how you want to allow your customers to pay you." +msgstr "" + +#. translators: 1: opening link tag; do not translate, 2: closing link tag; do not translate +#: includes/admin/settings/register-settings.php:987 +msgid "More %1$sPayment Gateways%2$s are available." +msgstr "" + +#: includes/admin/settings/register-settings.php:1016 +msgid "Automatic" +msgstr "" + +#. translators: %s: the setting ID +#: includes/admin/settings/register-settings.php:1248 +msgid "The callback function used for the %s setting is missing." +msgstr "" + +#: includes/admin/settings/register-settings.php:1457 +#: src/Admin/Assets/Localization.php:121 +msgid "Enter a region" +msgstr "" + +#: includes/admin/settings/register-settings.php:1524 +msgid "Recapture plugin activated." +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: includes/admin/settings/register-settings.php:1529 +msgid "%1$sAccess your Recapture account%2$s." +msgstr "" + +#: includes/admin/settings/register-settings.php:1539 +msgid "Disconnect Recapture" +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: includes/admin/settings/register-settings.php:1547 +msgid "%1$sComplete your connection to Recapture%2$s" +msgstr "" + +#: includes/admin/settings/register-settings.php:1561 +msgid "We recommend Recapture for recovering lost revenue by automatically sending effective, targeted emails to customers who abandon their shopping cart." +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: includes/admin/settings/register-settings.php:1566 +msgid "%1$sLearn more%2$s (Free trial available)" +msgstr "" + +#: includes/admin/settings/register-settings.php:1576 +msgid "Connect with Recapture" +msgstr "" + +#. translators: Tax rate country code +#: includes/admin/settings/register-settings.php:1610 +msgid "Duplicate tax rates are not allowed. Please deactivate the existing %s tax rate before adding or activating another." +msgstr "" + +#: includes/admin/settings/register-settings.php:1611 +msgid "Please select a country." +msgstr "" + +#: includes/admin/settings/register-settings.php:1612 +msgid "Please enter a tax rate greater than 0." +msgstr "" + +#: includes/admin/settings/register-settings.php:1613 +msgid "Are you sure you want to add a 0% tax rate?" +msgstr "" + +#. translators: singular download label +#: includes/admin/thickbox.php:31 +#: includes/admin/thickbox.php:184 +msgid "Insert %s" +msgstr "" + +#: includes/admin/thickbox.php:58 +msgid "Link" +msgstr "" + +#: includes/admin/thickbox.php:59 +#: includes/template-functions.php:533 +msgid "Button" +msgstr "" + +#: includes/admin/thickbox.php:81 +msgid "You must choose a download" +msgstr "" + +#: includes/admin/thickbox.php:115 +msgid "Choose an existing product" +msgstr "" + +#: includes/admin/thickbox.php:122 +msgid "Behavior" +msgstr "" + +#: includes/admin/thickbox.php:127 +msgid "Direct Link" +msgstr "" + +#: includes/admin/thickbox.php:129 +msgid "How do you want this to work?" +msgstr "" + +#: includes/admin/thickbox.php:136 +msgid "Style" +msgstr "" + +#: includes/admin/thickbox.php:146 +msgid "Choose between a Button or a Link" +msgstr "" + +#: includes/admin/thickbox.php:153 +msgid "Color" +msgstr "" + +#: includes/admin/thickbox.php:163 +msgid "Choose the button color" +msgstr "" + +#: includes/admin/thickbox.php:170 +#: includes/blocks/includes/admin/settings.php:169 +msgid "Text" +msgstr "" + +#: includes/admin/thickbox.php:173 +msgid "View Product" +msgstr "" + +#: includes/admin/thickbox.php:174 +msgid "This is the text inside the button or link" +msgstr "" + +#: includes/admin/tools.php:34 +msgid "Use these tools to recount / reset store stats." +msgstr "" + +#: includes/admin/tools.php:41 +#: src/Assets/Localization.php:63 +msgid "Please select an option" +msgstr "" + +#: includes/admin/tools.php:43 +msgid "Recount Store Earnings and Sales" +msgstr "" + +#. translators: %s: Singular download label, lowercase +#: includes/admin/tools.php:48 +msgid "Recount Earnings and Sales for a %s" +msgstr "" + +#. translators: %s: Plural download label, lowercase +#: includes/admin/tools.php:55 +msgid "Recount Earnings and Sales for All %s" +msgstr "" + +#: includes/admin/tools.php:62 +msgid "Reset Store" +msgstr "" + +#: includes/admin/tools.php:76 +msgid "Submit" +msgstr "" + +#: includes/admin/tools.php:82 +msgid "Recalculates the total store earnings and sales." +msgstr "" + +#. translators: %s: Singular wownload label, lowercase +#: includes/admin/tools.php:86 +msgid "Recalculates the earnings and sales stats for a specific %s." +msgstr "" + +#. translators: %s: Pural download label, lowercase +#: includes/admin/tools.php:92 +msgid "Recalculates the earnings and sales stats for all %s." +msgstr "" + +#: includes/admin/tools.php:95 +msgid "Recalculates the lifetime value and purchase counts for all customers." +msgstr "" + +#: includes/admin/tools.php:97 +msgid "Deletes all payment records, customers, and related log entries." +msgstr "" + +#: includes/admin/tools.php:127 +#: includes/admin/tools.php:136 +msgid "Clear Incomplete Upgrade Notice" +msgstr "" + +#: includes/admin/tools.php:129 +msgid "Sometimes a database upgrade notice may not be cleared after an upgrade is completed due to conflicts with other extensions or other minor issues." +msgstr "" + +#: includes/admin/tools.php:130 +msgid "If you're certain these upgrades have been completed, you can clear these upgrade notices by clicking the button below. If you have any questions about this, please contact the Easy Digital Downloads support team and we'll be happy to help." +msgstr "" + +#. translators: 1: API documentation linktag, 2: iOS app link tag, 3: closing link tag +#: includes/admin/tools.php:185 +msgid "These API keys allow you to use the %1$sEDD REST API%3$s to retrieve store data in JSON or XML for external applications or devices, such as the %2$sEDD mobile app%3$s." +msgstr "" + +#: includes/admin/tools.php:217 +msgid "Enable Beta Versions" +msgstr "" + +#: includes/admin/tools.php:219 +msgid "Checking any of the below checkboxes will opt you in to receive pre-release update notifications. You can opt-out at any time. Pre-release updates do not install automatically, you will still have the opportunity to ignore update notifications." +msgstr "" + +#. translators: %s: Product name +#: includes/admin/tools.php:235 +msgid "Get updates for pre-release versions of %s" +msgstr "" + +#: includes/admin/tools.php:391 +msgid "Import Orders" +msgstr "" + +#: includes/admin/tools.php:393 +msgid "Import a CSV file of orders." +msgstr "" + +#: includes/admin/tools.php:405 +#: includes/admin/tools.php:724 +msgid "Import CSV" +msgstr "" + +#. translators: %1$s opening anchor tag, %2$s closing anchor tag +#: includes/admin/tools.php:418 +msgid "Each column loaded from the CSV needs to be mapped to an order field. Select the column that should be mapped to each field below. Any columns not needed can be ignored. See %1$sthis guide%2$s for assistance with importing payment records." +msgstr "" + +#: includes/admin/tools.php:429 +msgid "Payment Field" +msgstr "" + +#: includes/admin/tools.php:430 +#: includes/admin/tools.php:749 +msgid "CSV Column" +msgstr "" + +#: includes/admin/tools.php:431 +#: includes/admin/tools.php:750 +msgid "Data Preview" +msgstr "" + +#: includes/admin/tools.php:436 +msgid "Currency Code" +msgstr "" + +#: includes/admin/tools.php:440 +#: includes/admin/tools.php:449 +#: includes/admin/tools.php:459 +#: includes/admin/tools.php:469 +#: includes/admin/tools.php:479 +#: includes/admin/tools.php:489 +#: includes/admin/tools.php:499 +#: includes/admin/tools.php:509 +#: includes/admin/tools.php:519 +#: includes/admin/tools.php:529 +#: includes/admin/tools.php:539 +#: includes/admin/tools.php:549 +#: includes/admin/tools.php:558 +#: includes/admin/tools.php:568 +#: includes/admin/tools.php:578 +#: includes/admin/tools.php:588 +#: includes/admin/tools.php:597 +#: includes/admin/tools.php:606 +#: includes/admin/tools.php:616 +#: includes/admin/tools.php:626 +#: includes/admin/tools.php:636 +#: includes/admin/tools.php:646 +#: includes/admin/tools.php:656 +#: includes/admin/tools.php:665 +#: includes/admin/tools.php:674 +#: includes/admin/tools.php:684 +#: includes/admin/tools.php:694 +#: includes/admin/tools.php:759 +#: includes/admin/tools.php:769 +#: includes/admin/tools.php:779 +#: includes/admin/tools.php:789 +#: includes/admin/tools.php:799 +#: includes/admin/tools.php:809 +#: includes/admin/tools.php:818 +#: includes/admin/tools.php:827 +#: includes/admin/tools.php:836 +#: includes/admin/tools.php:846 +#: includes/admin/tools.php:856 +#: includes/admin/tools.php:865 +#: includes/admin/tools.php:875 +#: includes/admin/tools.php:884 +#: includes/admin/tools.php:894 +#: includes/admin/tools.php:903 +#: includes/admin/tools.php:913 +msgid "- Ignore this field -" +msgstr "" + +#: includes/admin/tools.php:443 +#: includes/admin/tools.php:452 +#: includes/admin/tools.php:462 +#: includes/admin/tools.php:472 +#: includes/admin/tools.php:482 +#: includes/admin/tools.php:492 +#: includes/admin/tools.php:502 +#: includes/admin/tools.php:512 +#: includes/admin/tools.php:522 +#: includes/admin/tools.php:532 +#: includes/admin/tools.php:542 +#: includes/admin/tools.php:552 +#: includes/admin/tools.php:561 +#: includes/admin/tools.php:571 +#: includes/admin/tools.php:581 +#: includes/admin/tools.php:591 +#: includes/admin/tools.php:600 +#: includes/admin/tools.php:609 +#: includes/admin/tools.php:619 +#: includes/admin/tools.php:629 +#: includes/admin/tools.php:639 +#: includes/admin/tools.php:649 +#: includes/admin/tools.php:659 +#: includes/admin/tools.php:668 +#: includes/admin/tools.php:677 +#: includes/admin/tools.php:687 +#: includes/admin/tools.php:697 +#: includes/admin/tools.php:762 +#: includes/admin/tools.php:772 +#: includes/admin/tools.php:782 +#: includes/admin/tools.php:792 +#: includes/admin/tools.php:802 +#: includes/admin/tools.php:812 +#: includes/admin/tools.php:821 +#: includes/admin/tools.php:830 +#: includes/admin/tools.php:839 +#: includes/admin/tools.php:849 +#: includes/admin/tools.php:859 +#: includes/admin/tools.php:868 +#: includes/admin/tools.php:878 +#: includes/admin/tools.php:887 +#: includes/admin/tools.php:897 +#: includes/admin/tools.php:906 +#: includes/admin/tools.php:916 +msgid "- select field to preview data -" +msgstr "" + +#: includes/admin/tools.php:495 +msgid "Discount Code(s)" +msgstr "" + +#: includes/admin/tools.php:525 +msgid "Parent Payment ID" +msgstr "" + +#: includes/admin/tools.php:574 +msgid "Purchased Product(s)" +msgstr "" + +#: includes/admin/tools.php:642 +#: includes/gateways/stripe/includes/template-functions.php:508 +msgid "Address Line 1" +msgstr "" + +#: includes/admin/tools.php:652 +#: includes/blocks/views/checkout/purchase-form/address.php:43 +#: includes/gateways/stripe/includes/template-functions.php:522 +msgid "Address Line 2" +msgstr "" + +#: includes/admin/tools.php:702 +#: includes/admin/tools.php:921 +msgid "Process Import" +msgstr "" + +#: includes/admin/tools.php:710 +msgid "Import Download Products" +msgstr "" + +#: includes/admin/tools.php:712 +msgid "Import a CSV file of products." +msgstr "" + +#. translators: %1$s and %2$s opening and closing anchor tags respectively +#: includes/admin/tools.php:737 +msgid "Each column loaded from the CSV needs to be mapped to a Download product field. Select the column that should be mapped to each field below. Any columns not needed can be ignored. See %1$sthis guide%2$s for assistance with importing Download products." +msgstr "" + +#: includes/admin/tools.php:748 +msgid "Product Field" +msgstr "" + +#: includes/admin/tools.php:755 +msgid "Product Author" +msgstr "" + +#: includes/admin/tools.php:765 +#: includes/reports/reports-functions.php:336 +msgid "Product Categories" +msgstr "" + +#: includes/admin/tools.php:775 +msgid "Product Creation Date" +msgstr "" + +#: includes/admin/tools.php:785 +msgid "Product Description" +msgstr "" + +#: includes/admin/tools.php:795 +msgid "Product Excerpt" +msgstr "" + +#: includes/admin/tools.php:805 +#: src/Admin/Onboarding/Steps/Products.php:57 +msgid "Product Image" +msgstr "" + +#: includes/admin/tools.php:815 +msgid "Product Notes" +msgstr "" + +#: includes/admin/tools.php:824 +msgid "Product Price(s)" +msgstr "" + +#: includes/admin/tools.php:833 +msgid "Product SKU" +msgstr "" + +#: includes/admin/tools.php:842 +msgid "Product Slug" +msgstr "" + +#: includes/admin/tools.php:852 +msgid "Product Status" +msgstr "" + +#: includes/admin/tools.php:862 +msgid "Product Tags" +msgstr "" + +#: includes/admin/tools.php:871 +msgid "Product Title" +msgstr "" + +#: includes/admin/tools.php:881 +msgid "Download Files" +msgstr "" + +#: includes/admin/tools.php:900 +msgid "Sale Count" +msgstr "" + +#: includes/admin/tools.php:929 +msgid "Export Settings" +msgstr "" + +#: includes/admin/tools.php:931 +msgid "Export the Easy Digital Downloads settings for this site as a .json file. This allows you to easily import the configuration into another site." +msgstr "" + +#. translators: %s: Reports page URL +#: includes/admin/tools.php:937 +msgid "To export shop data (purchases, customers, etc), visit the Reports page." +msgstr "" + +#: includes/admin/tools.php:962 +msgid "Import Settings" +msgstr "" + +#: includes/admin/tools.php:964 +msgid "Import the Easy Digital Downloads settings from a .json file. This file can be obtained by exporting the settings on another site using the form above." +msgstr "" + +#: includes/admin/tools.php:973 +msgid "Import" +msgstr "" + +#: includes/admin/tools.php:1051 +msgid "Please upload a valid .json file" +msgstr "" + +#: includes/admin/tools.php:1057 +msgid "Please upload a file to import" +msgstr "" + +#: includes/admin/tools.php:1124 +msgid "No File" +msgstr "" + +#: includes/admin/tools.php:1127 +msgid "Log is Empty" +msgstr "" + +#: includes/admin/tools.php:1131 +#: src/Admin/Tools/Screen.php:74 +msgid "Debug Log" +msgstr "" + +#. translators: 1: opening anchor tag, do not translate, 2: function name, do not translate, 3: closing anchor tag, do not translate +#: includes/admin/tools.php:1139 +msgid "When debug mode is enabled, specific information will be logged here. (%1$sLearn how to use %2$s in your own code.%3$s)" +msgstr "" + +#: includes/admin/tools.php:1155 +msgid "Download Debug Log File" +msgstr "" + +#: includes/admin/tools.php:1160 +msgid "Clear Log" +msgstr "" + +#: includes/admin/tools.php:1169 +msgid "Log file" +msgstr "" + +#: includes/admin/tools/class-edd-tools-recount-all-stats.php:99 +msgid "Earnings and sales stats successfully recounted." +msgstr "" + +#: includes/admin/tools/class-edd-tools-recount-customer-stats.php:124 +#: includes/admin/tools/class-edd-tools-recount-single-customer-stats.php:124 +msgid "Customer stats successfully recounted." +msgstr "" + +#. translators: %s: download title +#: includes/admin/tools/class-edd-tools-recount-download-stats.php:138 +msgid "Earnings and sales stats successfully recounted for %s." +msgstr "" + +#: includes/admin/tools/class-edd-tools-recount-single-customer-stats.php:114 +msgid "You do not have permission to modify this data." +msgstr "" + +#: includes/admin/tools/class-edd-tools-recount-store-earnings.php:174 +msgid "Store earnings successfully recounted." +msgstr "" + +#: includes/admin/tools/class-edd-tools-reset-stats.php:152 +msgid "Your store has been successfully reset." +msgstr "" + +#: includes/admin/tools/logs.php:175 +msgid "Payment Errors" +msgstr "" + +#: includes/admin/tools/logs.php:176 +msgid "API Requests" +msgstr "" + +#: includes/admin/upgrades/classes/class-file-download-log-migration.php:133 +#: src/Admin/Upgrades/v3/Base.php:116 +msgid "You do not have permission to run this upgrade." +msgstr "" + +#: includes/admin/upgrades/classes/class-file-download-log-migration.php:147 +msgid "File download logs updated successfully." +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:98 +#: includes/install.php:294 +msgid "Transaction Failed" +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:99 +msgid "Your transaction failed, please try again or contact site support." +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:794 +msgid "Migration complete: You have already completed the update to the file download logs." +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:804 +msgid "Upgrades Complete: You may now safely navigate away from this page." +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:808 +msgid "Important: Do not navigate away from this page until all upgrades complete." +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:856 +msgid "Update file download logs" +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:861 +msgid "This will update the file download logs to remove some PII and make file download counts more accurate." +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:870 +#: includes/admin/upgrades/deprecated-upgrade-functions.php:873 +msgid "Update File Download Logs" +msgstr "" + +#: includes/admin/upgrades/deprecated-upgrade-functions.php:874 +msgid "File download logs have already been updated." +msgstr "" + +#. translators: %s: Resume upgrade link +#: includes/admin/upgrades/upgrade-functions.php:46 +msgid "Easy Digital Downloads needs to complete a database upgrade that was previously started, click here to resume the upgrade." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:89 +msgid "Easy Digital Downloads is performing a database migration via WP-CLI. Sales and earnings data for your store will be updated when all orders have been migrated. This message will be removed when the migration is complete." +msgstr "" + +#. translators: 1: Opening strong tag; do not translate. 2. Closing strong tag; do not translate. +#: includes/admin/upgrades/upgrade-functions.php:98 +msgid "Easy Digital Downloads needs to upgrade the database. %1$sLearn more about this upgrade%2$s." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:107 +msgid "About this upgrade:" +msgstr "" + +#. translators: 1: Opening strong/italics tag; do not translate. 2. Closing strong/italics tag; do not translate. +#: includes/admin/upgrades/upgrade-functions.php:113 +msgid "This is a %1$smandatory%2$s update that will migrate all Easy Digital Downloads data to custom database tables. This upgrade will provide better performance and scalability." +msgstr "" + +#. translators: 1: Opening strong tag; do not translate. 2. Closing strong tag; do not translate. 3. Plural download label +#: includes/admin/upgrades/upgrade-functions.php:123 +msgid "%1$sPlease back up your database before starting this upgrade.%2$s This upgrade routine will make irreversible changes to the database." +msgstr "" + +#. translators: 1: Opening strong tag; do not translate. 2. Closing strong tag; do not translate. 3. Line break; do not translate. 4. CLI command example; do not translate. +#: includes/admin/upgrades/upgrade-functions.php:133 +msgid "%1$sAdvanced User?%2$s This upgrade can also be run via WP-CLI with the following command:%3$s%3$s%4$s" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:142 +msgid "For large sites, this is the recommended method of upgrading." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:155 +msgid "Begin the upgrade" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:166 +msgid "Easy Digital Downloads was unable to create the necessary database tables to complete this update. Your site may not meet the minimum requirements for EDD 3.0." +msgstr "" + +#. translators: 1: opening anchor tag, do not translate, 2: closing anchor tag, do not translate, 3: MySQL database version, do not translate +#: includes/admin/upgrades/upgrade-functions.php:173 +msgid "Please contact your host and ask them to upgrade your environment to meet our %1$sminimum technical requirements%2$s. Your MySQL version is %3$s and needs to be updated." +msgstr "" + +#. translators: 1: opening anchor tag, do not translate, 2: closing anchor tag, do not translate +#: includes/admin/upgrades/upgrade-functions.php:181 +msgid "%1$sContact our support team%2$s for help with next steps." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:306 +msgid "Database Upgrade Complete: All database upgrades have been completed." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:308 +msgid "You may now leave this page." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:313 +msgid "Return to the dashboard" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:320 +msgid "Important: Do not navigate away from this page until all upgrades have completed." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:324 +msgid "Easy Digital Downloads needs to perform upgrades to your WordPress database. Your store data will be migrated to custom database tables to improve performance and efficiency. This process may take a while." +msgstr "" + +#. translators: %s: Plural label for downloads +#: includes/admin/upgrades/upgrade-functions.php:328 +msgid "Sales and earnings data for %s and customers will be updated once orders have finished migrating." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:332 +msgid "Please create a full backup of your website before proceeding." +msgstr "" + +#. translators: %s: WP-CLI command +#: includes/admin/upgrades/upgrade-functions.php:338 +msgid "This migration can also be run via WP-CLI with the following command: %s. This is the recommended method for large sites." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:349 +msgid "I have secured a backup of my website data." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:354 +msgid "Upgrade Easy Digital Downloads" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:379 +#: src/Admin/Assets/Localization.php:41 +msgid "Migration complete" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:384 +msgid "Migration pending" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:403 +msgid "The data migration has been successfully completed. You may now leave this page or proceed to remove legacy data below." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:427 +#: includes/admin/upgrades/upgrade-functions.php:499 +#: includes/upgrades/functions.php:176 +msgid "Remove Legacy Data" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:430 +msgid "Important: This removes all legacy data from where it was previously stored in custom post types and post meta. This is an optional step that is not reversible. Please back up your database and ensure your store is operational before completing this step." +msgstr "" + +#. translators: 1: Opening anchor tag; do not translate. 2: Closing anchor tag; do not translate. +#: includes/admin/upgrades/upgrade-functions.php:437 +msgid "You can complete this step later by navigating to %1$sDownloads » Tools%2$s." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:448 +msgid "I have confirmed my store is operational and I have a backup of my website data." +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:456 +msgid "Permanently Remove Legacy Data" +msgstr "" + +#: includes/admin/upgrades/upgrade-functions.php:467 +msgid "Legacy data has been successfully removed. You may now leave this page." +msgstr "" + +#: includes/admin/upgrades/upgrades.php:29 +msgid "Upgrades" +msgstr "" + +#: includes/admin/upgrades/upgrades.php:92 +#: includes/admin/upgrades/upgrades.php:118 +msgid "The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished." +msgstr "" + +#. translators: 1: Step number, %2$d: Total steps +#: includes/admin/upgrades/upgrades.php:99 +msgid "Step %1$d of approximately %2$d running" +msgstr "" + +#. translators: %s: Upgrade step name/key +#: includes/admin/upgrades/v3/upgrade-actions.php:45 +msgid "\"%s\" is not a valid 3.0 upgrade." +msgstr "" + +#: includes/admin/upgrades/v3/upgrade-actions.php:63 +msgid "Error loading migration class." +msgstr "" + +#: includes/admin/views/email-editor/content.php:32 +#: src/Admin/Onboarding/Steps/ConfigureEmails.php:103 +msgid "Message" +msgstr "" + +#: includes/admin/views/email-editor/content.php:41 +msgid "The content for this email is not editable." +msgstr "" + +#: includes/admin/views/email-editor/header.php:17 +msgid "Email Updated" +msgstr "" + +#: includes/admin/views/email-editor/header.php:20 +msgid "Email Not Updated" +msgstr "" + +#: includes/admin/views/email-editor/header.php:57 +msgid "Saving Changes" +msgstr "" + +#: includes/admin/views/email-editor/heading.php:18 +msgid "Heading" +msgstr "" + +#. translators: %s: Date and time of the scheduled event. +#: includes/admin/views/email-editor/legacy.php:35 +msgid "Success! This email has been converted to the new email management system. We will keep a backup of the old settings which are no longer used, until %s, after which we will remove them to improve site performance." +msgstr "" + +#: includes/admin/views/email-editor/recipient.php:20 +#: includes/admin/views/email-editor/recipient.php:62 +msgid "Send To" +msgstr "" + +#: includes/admin/views/email-editor/recipient.php:51 +#: src/Admin/Settings/Tabs/Emails.php:76 +msgid "Admin Email Recipients" +msgstr "" + +#: includes/admin/views/email-editor/recipient.php:55 +#: includes/admin/views/email-editor/recipient.php:131 +#: src/Admin/Settings/Tabs/Emails.php:179 +#: src/Admin/Settings/Tabs/Emails.php:185 +msgid "Custom Recipients" +msgstr "" + +#: includes/admin/views/email-editor/recipient.php:100 +msgid "Recipients" +msgstr "" + +#. translators: 1: opening anchor tag; 2: closing anchor tag +#: includes/admin/views/email-editor/recipient.php:114 +msgid "Update the admin email recipients in the %1$semail settings%2$s." +msgstr "" + +#: includes/admin/views/email-editor/recipient.php:135 +msgid "Enter one email per line." +msgstr "" + +#: includes/admin/views/email-editor/sender.php:15 +msgid "From" +msgstr "" + +#: includes/admin/views/email-editor/status.php:23 +#: includes/class-edd-cli.php:68 +#: includes/class-edd-cli.php:78 +#: includes/class-edd-cli.php:89 +#: includes/class-edd-cli.php:98 +#: includes/class-edd-cli.php:159 +msgid "Enabled" +msgstr "" + +#: includes/admin/views/email-editor/subject.php:15 +#: includes/admin/views/email-editor/subject.php:26 +#: src/Admin/Emails/ListTable.php:79 +#: src/Admin/Emails/LogsTable.php:64 +msgid "Subject" +msgstr "" + +#. translators: %s: number of notifications +#: includes/admin/views/notifications.php:35 +msgid "(%s) New Notifications" +msgstr "" + +#: includes/admin/views/notifications.php:49 +msgid "Close panel" +msgstr "" + +#: includes/admin/views/notifications.php:85 +msgid "Dismiss" +msgstr "" + +#: includes/admin/views/notifications.php:95 +msgid "You have no new notifications." +msgstr "" + +#: includes/admin/views/notifications.php:101 +msgid "Loading notifications..." +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:22 +msgctxt "Apply an adjustment to an order" +msgid "Add Adjustment" +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:30 +msgctxt "Apply a discount to an order" +msgid "Add Discount" +msgstr "" + +#. translators: %s: Download singular label +#: includes/admin/views/tmpl-order-actions.php:41 +#: includes/admin/views/tmpl-order-form-add-order-item.php:254 +msgid "Add %s" +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:47 +msgid "Order items cannot be modified." +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:50 +msgid "Issue a refund to adjust the net total for this order." +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:59 +msgid "Amazon orders must be refunded at the gateway." +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:64 +msgid "The refund window for this Order has passed; however, you have the ability to override this." +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:74 +msgid "The refund window for this Order has passed." +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:89 +msgid "Initialize Refund" +msgstr "" + +#: includes/admin/views/tmpl-order-actions.php:94 +msgid "Orders placed through the Amazon gateway must be refunded through Amazon. The order status can then be updated manually." +msgstr "" + +#: includes/admin/views/tmpl-order-adjustment-discount.php:27 +#: includes/discount-functions.php:1336 +msgid "Remove discount" +msgstr "" + +#: includes/admin/views/tmpl-order-adjustment-discount.php:35 +#: includes/admin/views/tmpl-order-form-add-order-discount.php:22 +#: includes/ajax-functions.php:1050 +#: includes/blocks/views/checkout/discount.php:16 +#: includes/blocks/views/orders/discounts.php:7 +#: includes/checkout/template.php:753 +#: includes/discount-functions.php:1300 +#: templates/shortcode-receipt.php:87 +msgid "Discount" +msgid_plural "Discounts" +msgstr[0] "" +msgstr[1] "" + +#. translators: %s: Adjustment type (discount, fee, etc) +#: includes/admin/views/tmpl-order-adjustment.php:30 +#: includes/admin/views/tmpl-order-item.php:25 +msgid "Remove %s" +msgstr "" + +#: includes/admin/views/tmpl-order-adjustment.php:46 +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:31 +#: includes/blocks/views/orders/fees.php:8 +#: includes/blocks/views/orders/fees.php:12 +#: src/Emails/Tags/Render.php:242 +#: templates/shortcode-receipt.php:116 +#: templates/shortcode-receipt.php:120 +msgid "Fee" +msgid_plural "Fees" +msgstr[0] "" +msgstr[1] "" + +#. translators: %s: Download label singular +#: includes/admin/views/tmpl-order-copy-download-link.php:20 +msgid "%s Links" +msgstr "" + +#: includes/admin/views/tmpl-order-copy-download-link.php:27 +msgid "No file links available" +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:46 +#: includes/ajax-functions.php:1083 +#: includes/blocks/views/orders/credits.php:8 +#: includes/blocks/views/orders/credits.php:12 +#: templates/shortcode-receipt.php:143 +#: templates/shortcode-receipt.php:147 +msgid "Credit" +msgid_plural "Credits" +msgstr[0] "" +msgstr[1] "" + +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:54 +msgid "Apply to" +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:62 +msgid "Entire order" +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:114 +msgid "Apply tax to fee" +msgstr "" + +#. translators: %s: Tax rate as a percentage +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:121 +#: includes/admin/views/tmpl-order-form-add-order-item.php:148 +msgid "Tax Rate: %s" +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:141 +#: includes/admin/views/tmpl-order-form-add-order-item.php:161 +msgid "No tax rate has been set." +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:142 +#: includes/admin/views/tmpl-order-form-add-order-item.php:162 +msgid "Tax rates are defined by the customer's billing address." +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-adjustment.php:146 +#: includes/admin/views/tmpl-order-form-add-order-item.php:166 +msgid "Set an address" +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-discount.php:30 +msgid "Choose a discount" +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-discount.php:52 +msgid "This Discount already applied to the Order." +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-item.php:80 +#: includes/admin/views/tmpl-order-form-add-order-item.php:81 +msgid "Search for a download" +msgstr "" + +#. translators: %s: Download label singular +#: includes/admin/views/tmpl-order-form-add-order-item.php:98 +msgid "This %s already exists in the Order. Please remove it before adding it again." +msgstr "" + +#: includes/admin/views/tmpl-order-form-add-order-item.php:142 +msgid "Automatically calculate amounts" +msgstr "" + +#. translators: %s: Tax rate as a percentage +#: includes/admin/views/tmpl-order-form-add-order-item.php:201 +msgctxt "add order item tax rate" +msgid "(%s)" +msgstr "" + +#: includes/admin/views/tmpl-order-item.php:45 +msgid "Tax:" +msgstr "" + +#: includes/admin/views/tmpl-order-item.php:62 +msgid "Show more details" +msgstr "" + +#: includes/admin/views/tmpl-order-no-items.php:14 +msgid "No order items" +msgstr "" + +#. translators: %s: Tax rate +#: includes/admin/views/tmpl-order-tax.php:47 +msgid "The tax rate has been updated to %1$s. Existing automatically calculated amounts have not been updated." +msgstr "" + +#: includes/admin/views/tmpl-order-tax.php:59 +msgid "Update Amounts" +msgstr "" + +#: includes/admin/views/tmpl-order-tax.php:64 +msgid "Dismiss this notice." +msgstr "" + +#: includes/admin/views/tmpl-order-total.php:20 +msgid "† Some amounts have been manually adjusted." +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-add.php:29 +msgid "Apply to whole country" +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-add.php:36 +#: includes/admin/views/tmpl-tax-rates-table-meta.php:18 +#: includes/admin/views/tmpl-tax-rates-table-row.php:40 +msgid "Rate" +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-add.php:41 +msgid "Add Rate" +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-bulk-actions.php:18 +msgid "Bulk Actions" +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-bulk-actions.php:23 +msgid "Apply" +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-bulk-actions.php:28 +msgid "Show deactivated rates" +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-meta.php:19 +#: includes/admin/views/tmpl-tax-rates-table-row.php:45 +#: templates/checkout_cart.php:13 +msgid "Actions" +msgstr "" + +#: includes/admin/views/tmpl-tax-rates-table-row-empty.php:15 +msgid "No rates found." +msgstr "" + +#: includes/ajax-functions.php:136 +#: includes/cart/actions.php:109 +msgid "Missing nonce when removing an item from the cart. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4" +msgstr "" + +#: includes/ajax-functions.php:195 +msgid "Missing nonce when adding an item to the cart. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4" +msgstr "" + +#: includes/ajax-functions.php:486 +msgid "Missing nonce when recalculating taxes. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4" +msgstr "" + +#: includes/ajax-functions.php:539 +msgid "Missing nonce when retrieving state list. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4" +msgstr "" + +#: includes/ajax-functions.php:654 +msgid "No results found" +msgstr "" + +#: includes/ajax-functions.php:696 +msgid "No categories found" +msgstr "" + +#: includes/ajax-functions.php:715 +#: includes/ajax-functions.php:853 +#: src/HTML/Elements.php:208 +msgid "No users found" +msgstr "" + +#: includes/ajax-functions.php:784 +msgid "All Prices" +msgstr "" + +#: includes/ajax-functions.php:1302 +#: includes/ajax-functions.php:1309 +msgid "Unable to verify action. Please refresh the page and try again." +msgstr "" + +#: includes/ajax-functions.php:1348 +msgid "Unable to find download. Please refresh the page and try again." +msgstr "" + +#. translators: %s: product ID. +#: includes/api/class-edd-api-v2.php:177 +#: includes/api/class-edd-api.php:1125 +#: includes/api/class-edd-api.php:1335 +#: includes/api/class-edd-api.php:1457 +msgid "Product %s not found!" +msgstr "" + +#: includes/api/class-edd-api-v2.php:360 +msgid "Customer not found!" +msgstr "" + +#: includes/api/class-edd-api-v2.php:365 +#: includes/api/class-edd-api.php:1074 +msgid "No customers found!" +msgstr "" + +#: includes/api/class-edd-api.php:462 +msgid "You must specify both a token and API key!" +msgstr "" + +#: includes/api/class-edd-api.php:479 +msgid "Your request could not be authenticated!" +msgstr "" + +#: includes/api/class-edd-api.php:496 +msgid "Invalid API key!" +msgstr "" + +#: includes/api/class-edd-api.php:512 +msgid "Invalid API version!" +msgstr "" + +#: includes/api/class-edd-api.php:685 +msgid "Invalid query!" +msgstr "" + +#. translators: %s: customer ID. +#: includes/api/class-edd-api.php:1068 +msgid "Customer %s not found!" +msgstr "" + +#: includes/api/class-edd-api.php:1233 +#: includes/api/class-edd-api.php:1350 +msgid "The end date must be later than the start date!" +msgstr "" + +#: includes/api/class-edd-api.php:1238 +#: includes/api/class-edd-api.php:1355 +msgid "Invalid or no date range specified!" +msgstr "" + +#: includes/api/class-edd-api.php:1625 +msgid "No discounts found!" +msgstr "" + +#. translators: %s: discount ID. +#: includes/api/class-edd-api.php:1671 +msgid "Discount %s not found!" +msgstr "" + +#: includes/api/class-edd-api.php:1717 +msgid "No download logs found!" +msgstr "" + +#: includes/api/class-edd-api.php:1983 +msgid "User ID Required" +msgstr "" + +#. translators: %s: action being performed. +#: includes/api/class-edd-api.php:2002 +#: includes/api/class-edd-api.php:2012 +msgid "You do not have permission to %s API keys for this user" +msgstr "" + +#: includes/api/v3/Notifications.php:45 +msgid "ID of the notification." +msgstr "" + +#: includes/api/v3/Notifications.php:116 +msgid "Failed to dismiss notification." +msgstr "" + +#: includes/blocks/edd-blocks.php:70 +msgid "Confirmation" +msgstr "" + +#: includes/blocks/edd-blocks.php:71 +#: includes/install.php:291 +msgid "Thank you for your purchase!" +msgstr "" + +#: includes/blocks/edd-blocks.php:74 +#: includes/emails/template.php:130 +#: src/Emails/Tags/Registry.php:182 +msgid "Receipt" +msgstr "" + +#: includes/blocks/edd-blocks.php:78 +msgid "Order History" +msgstr "" + +#: includes/blocks/includes/admin/functions.php:27 +#: includes/blocks/includes/admin/settings.php:44 +msgid "Login Page" +msgstr "" + +#: includes/blocks/includes/admin/functions.php:31 +#: includes/blocks/includes/admin/settings.php:93 +msgid "Order History Page" +msgstr "" + +#: includes/blocks/includes/admin/functions.php:35 +#: includes/blocks/includes/admin/settings.php:125 +msgid "Receipt Page" +msgstr "" + +#: includes/blocks/includes/admin/functions.php:39 +#: includes/blocks/includes/admin/settings.php:102 +msgid "Confirmation Page" +msgstr "" + +#: includes/blocks/includes/admin/notices.php:28 +msgid "EDD Blocks are now a part of Easy Digital Downloads" +msgstr "" + +#: includes/blocks/includes/admin/notices.php:29 +msgid "If you are using the original Downloads block, you will need to update it to use either the new EDD Products or EDD Downloads Terms block. All other blocks functionality is automatically updated. Once you've replaced your blocks, you can deactivate the EDD Blocks plugin." +msgstr "" + +#: includes/blocks/includes/admin/recaptcha.php:27 +msgid "reCAPTCHA v3" +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: includes/blocks/includes/admin/recaptcha.php:30 +msgid "%1$sRegister with Google%2$s to get reCAPTCHA v3 keys. Setting the keys here will enable reCAPTCHA on your registration block and when a user requests a password reset using the login block." +msgstr "" + +#: includes/blocks/includes/admin/recaptcha.php:39 +msgid "reCAPTCHA Site Key" +msgstr "" + +#: includes/blocks/includes/admin/recaptcha.php:46 +msgid "reCAPTCHA Secret Key" +msgstr "" + +#: includes/blocks/includes/admin/settings.php:31 +msgid "This page must include the EDD Login block. Setting this allows the front end form to be used for resetting passwords." +msgstr "" + +#. translators: 1: opening code tag, do not translate, 2: closing code tag, do not translate. +#: includes/blocks/includes/admin/settings.php:35 +msgid "Do not use this with the %1$s[edd_login]%2$s shortcode; it does not support resetting passwords." +msgstr "" + +#: includes/blocks/includes/admin/settings.php:49 +#: includes/blocks/includes/admin/settings.php:107 +#: src/Admin/Settings/Tabs/General.php:131 +#: src/Admin/Settings/Tabs/General.php:140 +#: src/Admin/Settings/Tabs/General.php:149 +#: src/Admin/Settings/Tabs/General.php:158 +#: src/Admin/Settings/Tabs/General.php:171 +msgid "Select a page" +msgstr "" + +#: includes/blocks/includes/admin/settings.php:55 +msgid "This is the checkout page where customers will complete their purchases." +msgstr "" + +#. translators: 1: opening code tag, do not translate, 2: closing code tag, do not translate. +#: includes/blocks/includes/admin/settings.php:59 +msgid "The Checkout block or %1$s[download_checkout]%2$s shortcode must be on this page." +msgstr "" + +#. translators: 1: opening code tag, do not translate, 2: closing code tag, do not translate. +#: includes/blocks/includes/admin/settings.php:71 +msgid "If a customer logs in using the EDD Login block or %1$s[edd_login]%2$s shortcode, will be redirected to this page." +msgstr "" + +#: includes/blocks/includes/admin/settings.php:76 +msgid "This can be overridden in the block settings or shortcode parameters." +msgstr "" + +#: includes/blocks/includes/admin/settings.php:83 +msgid "This page shows a complete order history for the current user, including download links." +msgstr "" + +#. translators: 1: opening code tag, do not translate, 2: closing code tag, do not translate. +#: includes/blocks/includes/admin/settings.php:87 +msgid "Either the EDD Order History block or the %1$s[purchase_history]%2$s shortcode must be on this page." +msgstr "" + +#: includes/blocks/includes/admin/settings.php:96 +msgid "This page must include the EDD Confirmation block." +msgstr "" + +#: includes/blocks/includes/admin/settings.php:98 +msgid "Use this page separately from your receipt page to ensure proper conversion tracking." +msgstr "" + +#: includes/blocks/includes/admin/settings.php:115 +msgid "This is the page to show a detailed receipt for an order." +msgstr "" + +#. translators: 1: opening code tag, do not translate, 2: closing code tag, do not translate. +#: includes/blocks/includes/admin/settings.php:119 +msgid "Use the EDD Receipt block or the %1$s[edd_receipt]%2$s shortcode to work with the confirmation page." +msgstr "" + +#: includes/blocks/includes/admin/settings.php:143 +msgid "Default Button Colors" +msgstr "" + +#: includes/blocks/includes/admin/settings.php:168 +msgid "Background" +msgstr "" + +#: includes/blocks/includes/admin/settings.php:195 +msgid "Do not allow users to redownload items from their order history." +msgstr "" + +#: includes/blocks/includes/checkout/ajax.php:39 +#: includes/blocks/includes/checkout/checkout.php:122 +#: includes/blocks/includes/checkout/checkout.php:162 +#: includes/cart/template.php:130 +#: includes/gateways/stripe/includes/compat.php:118 +msgid "Your cart is empty." +msgstr "" + +#: includes/blocks/includes/checkout/forms.php:211 +#: includes/blocks/views/checkout/purchase-form/login.php:29 +#: includes/checkout/template.php:497 +#: includes/checkout/template.php:614 +msgid "Log in" +msgstr "" + +#: includes/blocks/includes/checkout/forms.php:215 +msgid "Register for a new account" +msgstr "" + +#: includes/blocks/includes/checkout/forms.php:219 +msgid "Checkout as a guest" +msgstr "" + +#: includes/blocks/includes/checkout/functions.php:44 +msgid "item" +msgid_plural "items" +msgstr[0] "" +msgstr[1] "" + +#. translators: the plurals downloads name. +#: includes/blocks/includes/downloads/downloads.php:91 +msgctxt "download post type name" +msgid "No %s found." +msgstr "" + +#: includes/blocks/includes/forms/forms.php:70 +#: includes/users/lost-password.php:232 +msgid "Your password reset link appears to be invalid. Please request a new link below." +msgstr "" + +#: includes/blocks/includes/forms/recaptcha.php:112 +msgid "reCAPTCHA validation missing." +msgstr "" + +#: includes/blocks/includes/forms/recaptcha.php:148 +msgid "There was an error validating the reCAPTCHA. Please try again." +msgstr "" + +#: includes/blocks/includes/forms/recaptcha.php:165 +msgid "Unexpected reCAPTCHA error. Please try again." +msgstr "" + +#: includes/blocks/includes/forms/recaptcha.php:172 +msgid "reCAPTCHA verification failed. Please contact a site administrator." +msgstr "" + +#: includes/blocks/includes/forms/recaptcha.php:179 +msgid "reCAPTCHA verification failed with low score. Please contact a site administrator." +msgstr "" + +#: includes/blocks/includes/orders/functions.php:30 +#: templates/history-purchases.php:74 +msgid "Complete Purchase" +msgstr "" + +#: includes/blocks/includes/orders/functions.php:38 +#: includes/blocks/includes/orders/orders.php:146 +msgid "View Order Details" +msgstr "" + +#: includes/blocks/includes/orders/orders.php:115 +msgid "To view a sample confirmation screen, you need to have at least one order in your store." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:118 +msgid "Your purchase session could not be retrieved." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:168 +#: includes/shortcodes.php:671 +msgid "Sorry, trouble retrieving order receipt." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:179 +msgid "To view a sample receipt, you need to have at least one order in your store." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:223 +msgid "Sorry, you do not have permission to view this receipt." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:232 +msgid "Please confirm your email address to access your downloads." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:242 +msgid "Please log in to view your order." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:274 +msgid "Please log in to access your downloads." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:290 +#: includes/blocks/includes/orders/orders.php:302 +msgid "Your email address could not be verified." +msgstr "" + +#: includes/blocks/includes/orders/orders.php:329 +#: includes/blocks/views/orders/receipt-files.php:70 +#: includes/emails/tags.php:270 +#: templates/history-downloads.php:89 +#: templates/shortcode-receipt.php:306 +msgid "No downloadable files found." +msgstr "" + +#: includes/blocks/includes/terms/images.php:77 +#: includes/blocks/includes/terms/images.php:178 +msgid "Select Image" +msgstr "" + +#: includes/blocks/includes/terms/images.php:93 +#: includes/blocks/includes/terms/images.php:118 +msgid "Term Image" +msgstr "" + +#: includes/blocks/includes/terms/images.php:96 +msgid "Set Term Image." +msgstr "" + +#. translators: 1: name of the term +#: includes/blocks/includes/terms/images.php:132 +msgid "Set Term Image for %1$s." +msgstr "" + +#. translators: the placeholder refers to which featured image +#: includes/blocks/includes/terms/images.php:156 +msgid "%s featured image" +msgstr "" + +#: includes/blocks/includes/terms/images.php:181 +msgid "Delete Image" +msgstr "" + +#: includes/blocks/includes/terms/images.php:214 +msgid "Image" +msgstr "" + +#: includes/blocks/views/checkout/cart/cart-item.php:23 +#: includes/blocks/views/orders/receipt-item.php:31 +msgid "Quantity:" +msgstr "" + +#: includes/blocks/views/checkout/cart/cart.php:15 +#: templates/checkout_cart.php:11 +msgid "Item Name" +msgstr "" + +#: includes/blocks/views/checkout/cart/cart.php:16 +#: templates/checkout_cart.php:12 +msgid "Item Price" +msgstr "" + +#: includes/blocks/views/checkout/discount.php:12 +msgid "Enter a discount code" +msgstr "" + +#: includes/blocks/views/checkout/discount.php:19 +msgid "Enter discount code" +msgstr "" + +#: includes/blocks/views/checkout/discount.php:20 +#: includes/checkout/template.php:758 +msgctxt "Apply discount at checkout" +msgid "Apply" +msgstr "" + +#: includes/blocks/views/checkout/logged-in.php:2 +msgid "Account Information" +msgstr "" + +#. translators: 1: The current user's email address, 2: opening anchor tag, do not translate, 3: closing anchor tag, do not translate. +#: includes/blocks/views/checkout/logged-in.php:7 +msgid "You are currently logged in as %1$s. (%2$slog out%3$s)" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/address.php:38 +#: includes/checkout/template.php:373 +msgid "Address line 1" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/address.php:49 +#: includes/checkout/template.php:383 +msgid "Address line 2" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/address.php:66 +#: includes/blocks/views/checkout/purchase-form/address.php:93 +#: includes/checkout/template.php:455 +msgid "State/Province" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/address.php:99 +msgid "ZIP/Postal Code" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:2 +#: includes/gateways/stripe/includes/template-functions.php:39 +msgid "Credit Card Info" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:11 +#: includes/checkout/template.php:249 +msgid "Secure SSL encrypted payment" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:16 +#: includes/gateways/stripe/includes/template-functions.php:60 +msgid "This is a secure SSL encrypted payment." +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:22 +#: includes/gateways/stripe/includes/template-functions.php:140 +#: includes/gateways/stripe/includes/template-functions.php:162 +msgid "Name on the Card" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:26 +#: includes/checkout/template.php:280 +#: includes/gateways/stripe/includes/template-functions.php:143 +#: includes/gateways/stripe/includes/template-functions.php:166 +msgid "Card name" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:31 +msgid "Card Number" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:36 +#: includes/checkout/template.php:259 +#: includes/checkout/template.php:264 +msgid "Card number" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:42 +#: includes/checkout/template.php:268 +#: includes/gateways/stripe/includes/template-functions.php:208 +msgid "CVC" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:46 +#: includes/checkout/template.php:272 +msgid "Security code" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/credit-card.php:52 +#: includes/checkout/template.php:285 +#: includes/gateways/stripe/includes/template-functions.php:608 +msgid "Expiration (MM/YY)" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/gateways.php:9 +msgid "Select Payment Method" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/gateways.php:51 +#: includes/checkout/template.php:959 +#: includes/gateways/stripe/includes/scripts.php:85 +#: src/Admin/Pointers.php:41 +msgid "Next" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/login.php:2 +msgid "Log Into Your Account" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/login.php:6 +#: includes/blocks/views/forms/login.php:11 +#: includes/blocks/views/forms/registration.php:14 +#: templates/shortcode-login.php:15 +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/login/edit.js:42 +#: includes/blocks/src/register/edit.js:42 +msgid "Username or Email" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/login.php:17 +#: includes/blocks/views/checkout/purchase-form/register.php:18 +#: includes/blocks/views/forms/login.php:22 +#: includes/blocks/views/forms/registration.php:36 +#: includes/checkout/template.php:522 +#: includes/checkout/template.php:529 +#: includes/checkout/template.php:602 +#: templates/shortcode-login.php:19 +#: templates/shortcode-register.php:30 +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/login/edit.js:48 +#: includes/blocks/src/register/edit.js:60 +msgid "Password" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/personal-info.php:7 +msgid "Personal Info" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/personal-info.php:12 +#: includes/blocks/views/checkout/purchase-form/personal-info.php:16 +#: includes/checkout/template.php:183 +#: includes/checkout/template.php:189 +msgid "Email address" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/personal-info.php:17 +#: includes/checkout/template.php:188 +msgid "We will send the purchase receipt to this address." +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/personal-info.php:24 +#: includes/blocks/views/checkout/purchase-form/personal-info.php:30 +#: includes/checkout/template.php:194 +#: includes/checkout/template.php:200 +msgid "First name" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/personal-info.php:31 +#: includes/checkout/template.php:199 +msgid "We will use this to personalize your account experience." +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/personal-info.php:38 +#: includes/blocks/views/checkout/purchase-form/personal-info.php:44 +#: includes/checkout/template.php:204 +#: includes/checkout/template.php:210 +msgid "Last name" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/personal-info.php:45 +#: includes/checkout/template.php:209 +msgid "We will use this as well to personalize your account experience." +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/register.php:3 +msgid "Register For a New Account" +msgstr "" + +#: includes/blocks/views/checkout/purchase-form/register.php:29 +#: includes/blocks/views/forms/registration.php:58 +#: templates/shortcode-register.php:35 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/register/edit.js:69 +msgid "Confirm Password" +msgstr "" + +#: includes/blocks/views/downloads/content.php:18 +#: includes/template-functions.php:156 +msgid "Free" +msgstr "" + +#: includes/blocks/views/forms/login.php:33 +#: templates/shortcode-login.php:23 +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/src/login/edit.js:57 +msgid "Remember Me" +msgstr "" + +#: includes/blocks/views/forms/login.php:40 +#: templates/shortcode-login.php:29 +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/login/edit.js:67 +#: includes/blocks/src/login/edit.js:68 +#: includes/blocks/src/register/edit.js:82 +#: includes/blocks/src/register/edit.js:83 +msgid "Log In" +msgstr "" + +#: includes/blocks/views/forms/login.php:44 +#: includes/payments/actions.php:343 +#: templates/shortcode-login.php:33 +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/src/login/edit.js:74 +msgid "Lost Password?" +msgstr "" + +#: includes/blocks/views/forms/lost-password.php:9 +msgid "Please enter your username or email address. You will receive an email message with instructions on how to reset your password." +msgstr "" + +#: includes/blocks/views/forms/lost-password.php:15 +msgid "Username or Email Address" +msgstr "" + +#: includes/blocks/views/forms/lost-password.php:28 +msgid "Get New Password" +msgstr "" + +#: includes/blocks/views/forms/registration.php:43 +#: includes/blocks/views/forms/reset-password.php:17 +msgid "Hide password" +msgstr "" + +#: includes/blocks/views/forms/registration.php:46 +#: includes/blocks/views/forms/reset-password.php:20 +msgid "Strength indicator" +msgstr "" + +#: includes/blocks/views/forms/registration.php:52 +#: includes/blocks/views/forms/reset-password.php:26 +msgid "Confirm use of weak password" +msgstr "" + +#: includes/blocks/views/forms/registration.php:73 +#: includes/blocks/views/forms/reset-password.php:43 +msgid "Generate Password" +msgstr "" + +#: includes/blocks/views/forms/registration.php:74 +#: includes/checkout/template.php:581 +#: templates/shortcode-register.php:46 +msgid "Register" +msgstr "" + +#: includes/blocks/views/forms/reset-password.php:7 +msgid "Enter your new password below or generate one." +msgstr "" + +#: includes/blocks/views/forms/reset-password.php:13 +msgid "New password" +msgstr "" + +#: includes/blocks/views/forms/reset-password.php:31 +msgid "Confirm new password" +msgstr "" + +#: includes/blocks/views/forms/reset-password.php:44 +msgid "Save Password" +msgstr "" + +#: includes/blocks/views/orders/guest.php:22 +msgid "Confirm Email" +msgstr "" + +#: includes/blocks/views/orders/orders.php:4 +msgid "You have no orders." +msgstr "" + +#: includes/blocks/views/orders/pending.php:5 +#: templates/account-pending.php:3 +msgid "An email with an activation link has been sent." +msgstr "" + +#. translators: 1: Opening anchor tag. 2: Closing anchor tag. +#: includes/blocks/views/orders/pending.php:13 +msgid "Your account is pending verification. Please click the link in your email to activate your account. No email? %1$sSend a new activation code.%2$s" +msgstr "" + +#: includes/blocks/views/orders/receipt-files.php:61 +#: templates/shortcode-receipt.php:297 +msgid "No downloadable files found for this bundled item." +msgstr "" + +#: includes/blocks/views/orders/receipt-item.php:25 +msgid "SKU:" +msgstr "" + +#: includes/blocks/views/orders/receipt-items.php:7 +#: templates/shortcode-receipt.php:19 +msgid "The specified receipt ID appears to be invalid." +msgstr "" + +#: includes/blocks/views/orders/totals.php:14 +#: templates/shortcode-receipt.php:42 +msgctxt "heading" +msgid "Order" +msgstr "" + +#: includes/blocks/views/orders/totals.php:19 +#: templates/shortcode-receipt.php:50 +msgid "Order Status" +msgstr "" + +#: includes/blocks/views/orders/totals.php:25 +#: templates/shortcode-receipt.php:56 +msgid "Payment Key" +msgstr "" + +#: includes/blocks/views/search.php:2 +#: includes/blocks/views/search.php:7 +msgid "Search Downloads" +msgstr "" + +#. translators: %s: tax rate formatted as a percentage +#: includes/cart/class-edd-cart.php:894 +msgid "includes %s tax" +msgstr "" + +#. translators: %s: tax rate formatted as a percentage +#: includes/cart/class-edd-cart.php:897 +msgid "excludes %s tax" +msgstr "" + +#: includes/cart/class-edd-cart.php:1401 +#: includes/cart/class-edd-cart.php:1461 +#: includes/error-tracking.php:84 +#: templates/shortcode-profile-editor.php:28 +msgid "Success" +msgstr "" + +#: includes/cart/class-edd-cart.php:1402 +msgid "Cart saved successfully. You can restore your cart using this URL:" +msgstr "" + +#: includes/cart/class-edd-cart.php:1436 +#: includes/cart/class-edd-cart.php:1450 +msgid "Cart restoration failed. Invalid token." +msgstr "" + +#: includes/cart/class-edd-cart.php:1444 +#: includes/cart/class-edd-cart.php:1453 +msgid "The cart cannot be restored. Invalid token." +msgstr "" + +#: includes/cart/class-edd-cart.php:1461 +msgid "Cart restored successfully." +msgstr "" + +#: includes/cart/template.php:203 +msgid "Restore Previous Cart" +msgstr "" + +#: includes/cart/template.php:205 +msgid "Save Cart" +msgstr "" + +#: includes/cart/template.php:229 +msgid "Restore Previous Cart." +msgstr "" + +#: includes/cart/template.php:247 +msgid "Update Cart" +msgstr "" + +#. Translators: %s: name of the download that was added to the cart. +#: includes/cart/template.php:310 +msgid "You have successfully added %s to your shopping cart." +msgstr "" + +#: includes/cart/template.php:311 +msgid "Checkout." +msgstr "" + +#: includes/checkout/template.php:179 +msgid "Personal info" +msgstr "" + +#: includes/checkout/template.php:240 +msgid "Credit card info" +msgstr "" + +#: includes/checkout/template.php:254 +msgid "This is a secure SSL encrypted payment" +msgstr "" + +#: includes/checkout/template.php:263 +msgid "The (typically) 16 digits on the front of your credit card." +msgstr "" + +#: includes/checkout/template.php:271 +msgid "The 3 digit (back) or 4 digit (front) value on your card." +msgstr "" + +#: includes/checkout/template.php:276 +msgid "Name on the card" +msgstr "" + +#: includes/checkout/template.php:279 +#: includes/gateways/stripe/includes/template-functions.php:165 +msgid "The name printed on the front of your credit card." +msgstr "" + +#: includes/checkout/template.php:288 +msgid "The date your credit card expires, typically on the front of the card." +msgstr "" + +#: includes/checkout/template.php:363 +msgid "Billing details" +msgstr "" + +#: includes/checkout/template.php:367 +msgid "Billing address" +msgstr "" + +#: includes/checkout/template.php:372 +msgid "The primary billing address for your credit card." +msgstr "" + +#: includes/checkout/template.php:377 +msgid "Billing address line 2 (optional)" +msgstr "" + +#: includes/checkout/template.php:382 +msgid "The suite, apt no, PO box, etc, associated with your billing address." +msgstr "" + +#: includes/checkout/template.php:387 +msgid "Billing city" +msgstr "" + +#: includes/checkout/template.php:392 +msgid "The city for your billing address." +msgstr "" + +#: includes/checkout/template.php:397 +msgid "Billing zip/Postal code" +msgstr "" + +#: includes/checkout/template.php:402 +#: includes/gateways/stripe/includes/template-functions.php:839 +msgid "The zip or postal code for your billing address." +msgstr "" + +#: includes/checkout/template.php:407 +msgid "Billing country" +msgstr "" + +#: includes/checkout/template.php:412 +#: includes/gateways/stripe/includes/template-functions.php:815 +msgid "The country for your billing address." +msgstr "" + +#: includes/checkout/template.php:430 +msgid "Billing state/Province" +msgstr "" + +#: includes/checkout/template.php:435 +msgid "The state or province for your billing address." +msgstr "" + +#: includes/checkout/template.php:497 +msgid "Already have an account?" +msgstr "" + +#: includes/checkout/template.php:504 +msgid "Create an account" +msgstr "" + +#: includes/checkout/template.php:504 +msgid "(optional)" +msgstr "" + +#: includes/checkout/template.php:516 +msgid "The username you will use to log into your account." +msgstr "" + +#: includes/checkout/template.php:528 +msgid "The password used to access your account." +msgstr "" + +#: includes/checkout/template.php:534 +msgid "Password again" +msgstr "" + +#: includes/checkout/template.php:540 +msgid "Confirm your password." +msgstr "" + +#: includes/checkout/template.php:541 +msgid "Confirm password" +msgstr "" + +#: includes/checkout/template.php:579 +msgid "Need to create an account?" +msgstr "" + +#: includes/checkout/template.php:581 +msgid "or checkout as a guest" +msgstr "" + +#: includes/checkout/template.php:591 +msgid "Username or email" +msgstr "" + +#: includes/checkout/template.php:597 +msgid "Your username or email address" +msgstr "" + +#: includes/checkout/template.php:608 +msgid "Your password" +msgstr "" + +#: includes/checkout/template.php:646 +msgid "Select payment method" +msgstr "" + +#: includes/checkout/template.php:749 +msgid "Have a discount code?" +msgstr "" + +#: includes/checkout/template.php:749 +msgctxt "Entering a discount code" +msgid "Click to enter it" +msgstr "" + +#: includes/checkout/template.php:755 +msgid "Enter a discount code if you have one." +msgstr "" + +#: includes/checkout/template.php:757 +#: includes/process-purchase.php:422 +#: src/Assets/Localization.php:98 +msgid "Enter discount" +msgstr "" + +#: includes/checkout/template.php:785 +msgid "Agree to Terms?" +msgstr "" + +#: includes/checkout/template.php:806 +msgid "Show Terms" +msgstr "" + +#: includes/checkout/template.php:807 +msgid "Hide Terms" +msgstr "" + +#: includes/checkout/template.php:856 +msgid "Agree to Privacy Policy?" +msgstr "" + +#: includes/checkout/template.php:878 +msgid "Show Privacy Policy" +msgstr "" + +#: includes/checkout/template.php:880 +msgid "Hide Privacy Policy" +msgstr "" + +#: includes/checkout/template.php:914 +msgid "Purchase Total:" +msgstr "" + +#: includes/checkout/template.php:938 +msgid "Go back" +msgstr "" + +#: includes/checkout/template.php:1009 +#: src/Admin/Settings/Tabs/Misc.php:136 +msgid "Free Download" +msgstr "" + +#: includes/class-easy-digital-downloads.php:274 +#: includes/class-easy-digital-downloads.php:286 +msgid "Method Not Allowed." +msgstr "" + +#. translators: %s: W3 Total Cache settings URL +#: includes/class-edd-cache-helper.php:114 +msgid "In order for database caching to work with Easy Digital Downloads you must add _wp_session_ to the \"Ignored query stems\" option in W3 Total Cache settings here." +msgstr "" + +#. translators: %s: EDD version +#: includes/class-edd-cli.php:61 +msgid "You are running EDD version: %s" +msgstr "" + +#. translators: %s: The status of test mode, either Enabled or Disabled +#: includes/class-edd-cli.php:66 +msgid "Test mode is: %s" +msgstr "" + +#. translators: %s: The status of AJAX, either Enabled or Disabled +#: includes/class-edd-cli.php:76 +msgid "AJAX is: %s" +msgstr "" + +#. translators: %s: The status of guest checkouts, either Enabled or Disabled +#: includes/class-edd-cli.php:86 +msgid "Guest checkouts are: %s" +msgstr "" + +#. translators: %s: The status of file downloads via symlink setting, either Enabled or Disabled +#: includes/class-edd-cli.php:96 +msgid "Symlinks are: %s" +msgstr "" + +#. translators: %s: The status of the checkout page, either Valid or Invalid +#: includes/class-edd-cli.php:107 +msgid "Checkout page is: %s" +msgstr "" + +#: includes/class-edd-cli.php:109 +msgid "Valid" +msgstr "" + +#: includes/class-edd-cli.php:110 +msgid "Invalid" +msgstr "" + +#. translators: %s: The URL of the checkout page +#: includes/class-edd-cli.php:116 +msgid "Checkout URL is: %s" +msgstr "" + +#: includes/class-edd-cli.php:119 +#: includes/class-edd-cli.php:129 +#: includes/class-edd-cli.php:139 +msgid "Undefined" +msgstr "" + +#. translators: %s: The URL of the success page +#: includes/class-edd-cli.php:126 +msgid "Success URL is: %s" +msgstr "" + +#. translators: %s: The URL of the failure page +#: includes/class-edd-cli.php:136 +msgid "Failure URL is: %s" +msgstr "" + +#. translators: %s: The download slug used in the WordPress Permalinks, defaults to /downloads +#: includes/class-edd-cli.php:146 +msgid "Downloads slug is: %s" +msgstr "" + +#. translators: %s: The status of the taxes enabled setting, either Enabled or Disabled +#: includes/class-edd-cli.php:157 +msgid "Taxes are: %s" +msgstr "" + +#. translators: %s: The default tax rate formatted as a percentage +#: includes/class-edd-cli.php:165 +msgid "Tax rate is: %s" +msgstr "" + +#. translators: 1: The country code, 2: The state code, 3: The tax rate formatted as a percentage +#: includes/class-edd-cli.php:171 +msgid "Country: %1$s, State: %2$s, Rate: %3$s" +msgstr "" + +#. translators: %s: The earnings formatted for the currency +#: includes/class-edd-cli.php:215 +msgid "Earnings: %s" +msgstr "" + +#. translators: %s: The sales count +#: includes/class-edd-cli.php:217 +msgid "Sales: %s" +msgstr "" + +#: includes/class-edd-cli.php:242 +msgid "No Downloads found" +msgstr "" + +#. translators: %d: The product ID (post ID) +#: includes/class-edd-cli.php:282 +msgctxt "The Download/Product ID" +msgid "ID: %d" +msgstr "" + +#. translators: %s: The status of the product +#: includes/class-edd-cli.php:284 +msgctxt "The Download/Product Status" +msgid "Status: %s" +msgstr "" + +#. translators: %s: The date the product was posted +#: includes/class-edd-cli.php:286 +msgid "Posted: %s" +msgstr "" + +#. translators: %s: The product categories +#: includes/class-edd-cli.php:288 +msgid "Categories: %s" +msgstr "" + +#. translators: %s: The product tags +#: includes/class-edd-cli.php:290 +msgid "Tags: %s" +msgstr "" + +#. translators: %s: The product pricing +#: includes/class-edd-cli.php:292 +msgid "Pricing: %s" +msgstr "" + +#. translators: %s: The product sales count +#: includes/class-edd-cli.php:294 +msgctxt "The sales count for the product" +msgid "Sales: %s" +msgstr "" + +#. translators: %s: The product earnings formatted for the currency +#: includes/class-edd-cli.php:296 +msgctxt "The product earnings" +msgid "Earnings: %s" +msgstr "" + +#. translators: %s: The product page slug +#: includes/class-edd-cli.php:299 +msgid "Slug: %s" +msgstr "" + +#. translators: %s: The product link +#: includes/class-edd-cli.php:301 +msgid "Permalink: %s" +msgstr "" + +#: includes/class-edd-cli.php:305 +msgid "Download Files:" +msgstr "" + +#. translators: 1: The file name, 2: The file path +#: includes/class-edd-cli.php:309 +msgid "File: %1$s (%2$s)" +msgstr "" + +#. translators: %s: The price assignment condition +#: includes/class-edd-cli.php:313 +msgid "Price Assignment: %s" +msgstr "" + +#. translators: %d: The customer ID +#: includes/class-edd-cli.php:377 +msgid "Customer %d created successfully" +msgstr "" + +#: includes/class-edd-cli.php:379 +msgid "Failed to create customer" +msgstr "" + +#. translators: 1: The number of customers created, %2$d: The time it took to create the customers +#: includes/class-edd-cli.php:388 +msgid "%1$d customers created in %2$d seconds" +msgstr "" + +#: includes/class-edd-cli.php:416 +#: src/HTML/Elements.php:139 +msgid "No customers found" +msgstr "" + +#. translators: %d: The customer's user ID +#: includes/class-edd-cli.php:424 +msgid "Customer User ID: %s" +msgstr "" + +#. translators: %s: The customer's username +#: includes/class-edd-cli.php:426 +#: includes/deprecated-functions.php:2498 +#: includes/deprecated-functions.php:2513 +msgid "Username: %s" +msgstr "" + +#. translators: %s: The customer's display name +#: includes/class-edd-cli.php:428 +msgid "Display Name: %s" +msgstr "" + +#. translators: %s: The customer's first name +#: includes/class-edd-cli.php:432 +msgid "First Name: %s" +msgstr "" + +#. translators: %s: The customer's surname +#: includes/class-edd-cli.php:437 +msgid "Last Name: %s" +msgstr "" + +#. translators: %s: The customer's email address +#: includes/class-edd-cli.php:441 +#: includes/class-edd-cli.php:489 +msgid "Email: %s" +msgstr "" + +#. translators: %s: The customer's total purchases +#: includes/class-edd-cli.php:445 +msgid "Purchases: %s" +msgstr "" + +#. translators: %s: The customer's total spent +#: includes/class-edd-cli.php:447 +msgid "Total Spent: %s" +msgstr "" + +#. translators: %s: The customer's total downloads +#: includes/class-edd-cli.php:449 +msgid "Total Downloads: %s" +msgstr "" + +#: includes/class-edd-cli.php:479 +msgid "No sales found" +msgstr "" + +#. translators: %s: The purchase key +#: includes/class-edd-cli.php:487 +msgid "Purchase Key: %s" +msgstr "" + +#. translators: %s: The purchase date +#: includes/class-edd-cli.php:491 +msgid "Date: %s" +msgstr "" + +#. translators: %s: The purchase subtotal +#: includes/class-edd-cli.php:493 +msgid "Subtotal: %s" +msgstr "" + +#. translators: %s: The purchase tax +#: includes/class-edd-cli.php:495 +msgid "Tax: %s" +msgstr "" + +#: includes/class-edd-cli.php:498 +msgid "Fees:" +msgstr "" + +#. translators: 1: The fee amount, 2: The currency +#: includes/class-edd-cli.php:502 +msgid " Fee: %1$s - %2$s" +msgstr "" + +#. translators: %s: The purchase total +#: includes/class-edd-cli.php:507 +msgid "Total: %s" +msgstr "" + +#. translators: %s: The payment gateway used +#: includes/class-edd-cli.php:510 +msgid "Gateway: %s" +msgstr "" + +#: includes/class-edd-cli.php:513 +msgid "Products:" +msgstr "" + +#. translators: 1: The product name, 2: The product price +#: includes/class-edd-cli.php:518 +msgid " Product: %1$s - %2$s" +msgstr "" + +#: includes/class-edd-cli.php:549 +#: includes/shortcodes.php:261 +#: src/HTML/Elements.php:309 +msgid "No discounts found" +msgstr "" + +#. translators: %s: The name of the discount +#: includes/class-edd-cli.php:557 +msgid "Name: %s" +msgstr "" + +#. translators: %s: The code of the discount +#: includes/class-edd-cli.php:559 +msgid "Code: %s" +msgstr "" + +#. translators: %s: The amount of the discount +#: includes/class-edd-cli.php:568 +msgid "Amount: %s" +msgstr "" + +#. translators: %s: The number of uses of the discount +#: includes/class-edd-cli.php:570 +msgid "Uses: %s" +msgstr "" + +#. translators: %s: The maximum number of uses of the discount +#: includes/class-edd-cli.php:572 +msgid "Max Uses: %s" +msgstr "" + +#. translators: %s: The start date of the discount +#: includes/class-edd-cli.php:574 +msgid "Start Date: %s" +msgstr "" + +#. translators: %s: The start date of the discount +#: includes/class-edd-cli.php:574 +msgid "No Start Date" +msgstr "" + +#. translators: %s: The expiration date of the discount +#: includes/class-edd-cli.php:576 +msgid "Expiration Date: %s" +msgstr "" + +#. translators: %s: The expiration date of the discount +#: includes/class-edd-cli.php:576 +msgid "No Expiration" +msgstr "" + +#. translators: %s: The status of the discount +#: includes/class-edd-cli.php:578 +msgctxt "The status of the discount code" +msgid "Status: %s" +msgstr "" + +#: includes/class-edd-cli.php:583 +msgid "Product Requirements:" +msgstr "" + +#. translators: %s: The ID of the product required for this discount +#: includes/class-edd-cli.php:587 +msgid " Product: %s" +msgstr "" + +#. translators: %s: The type of discount if it is able to be used on all products. +#: includes/class-edd-cli.php:594 +msgid "Global Discount: %s" +msgstr "" + +#. translators: %s: The type of discount if it is a single use discount. +#: includes/class-edd-cli.php:596 +msgid "Single Use: %s" +msgstr "" + +#: includes/class-edd-cli.php:623 +#: includes/class-edd-cli.php:2257 +msgid "No action specified, did you mean" +msgstr "" + +#: includes/class-edd-cli.php:625 +#: includes/class-edd-cli.php:2259 +msgid "Invalid action specified, did you mean" +msgstr "" + +#. translators: %s: The status of the payment +#: includes/class-edd-cli.php:683 +msgid "Invalid status '%s', defaulting to 'complete'" +msgstr "" + +#: includes/class-edd-cli.php:720 +msgid "Specified ID is not a product" +msgstr "" + +#. translators: %s: The number of orders created +#: includes/class-edd-cli.php:867 +msgid "Created %s orders" +msgstr "" + +#. translators: %s: The number of discounts created +#: includes/class-edd-cli.php:972 +msgid "Created %s discounts" +msgstr "" + +#: includes/class-edd-cli.php:1060 +msgid "This process will remove and recreate discounts in your database. Please make sure you've backed up your EDD database tables. Are you sure you want to delete discounts that have already been migrated and run the migration again?" +msgstr "" + +#: includes/class-edd-cli.php:1066 +msgid "The discounts custom database migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1088 +msgid "Migration complete: Discounts" +msgstr "" + +#: includes/class-edd-cli.php:1091 +#: includes/class-edd-cli.php:1211 +#: includes/class-edd-cli.php:1719 +#: includes/class-edd-cli.php:1971 +msgid "Old Records: " +msgstr "" + +#: includes/class-edd-cli.php:1092 +#: includes/class-edd-cli.php:1212 +#: includes/class-edd-cli.php:1720 +#: includes/class-edd-cli.php:1972 +msgid "New Records: " +msgstr "" + +#: includes/class-edd-cli.php:1098 +msgid "No discount records found." +msgstr "" + +#: includes/class-edd-cli.php:1128 +msgid "The logs custom table migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1131 +msgid "Preparing to migrate logs (this can take several minutes)." +msgstr "" + +#: includes/class-edd-cli.php:1134 +msgid "Migrating Logs" +msgstr "" + +#: includes/class-edd-cli.php:1206 +msgid "No log records found." +msgstr "" + +#: includes/class-edd-cli.php:1209 +msgid "Migration complete: Logs" +msgstr "" + +#: includes/class-edd-cli.php:1242 +msgid "The order notes custom table migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1245 +msgid "Preparing to migrate order notes." +msgstr "" + +#: includes/class-edd-cli.php:1247 +msgid "Migrating Order Notes" +msgstr "" + +#: includes/class-edd-cli.php:1311 +msgid "No order notes found." +msgstr "" + +#: includes/class-edd-cli.php:1313 +msgid "Migration complete: Order Notes" +msgstr "" + +#: includes/class-edd-cli.php:1315 +msgid "Old order notes: " +msgstr "" + +#: includes/class-edd-cli.php:1316 +msgid "New order notes: " +msgstr "" + +#: includes/class-edd-cli.php:1346 +msgid "The customer notes custom table migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1348 +msgid "Preparing to migrate customer notes." +msgstr "" + +#: includes/class-edd-cli.php:1350 +msgid "Migrating Customer Notes" +msgstr "" + +#: includes/class-edd-cli.php:1409 +msgid "No customer notes found." +msgstr "" + +#: includes/class-edd-cli.php:1411 +msgid "Migration complete: Customer Notes" +msgstr "" + +#: includes/class-edd-cli.php:1413 +msgid "Old customer notes: " +msgstr "" + +#: includes/class-edd-cli.php:1414 +msgid "New customer notes: " +msgstr "" + +#: includes/class-edd-cli.php:1448 +msgid "Preparing to migrate additional customer data." +msgstr "" + +#: includes/class-edd-cli.php:1473 +msgid "The user addresses custom table migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1475 +msgid "Preparing to migrate customer address data." +msgstr "" + +#: includes/class-edd-cli.php:1476 +msgid "Migrating Customer Addresses" +msgstr "" + +#: includes/class-edd-cli.php:1547 +msgid "The user email addresses custom table migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1549 +msgid "Preparing to migrate customer email addresses (this can take several minutes)." +msgstr "" + +#: includes/class-edd-cli.php:1550 +msgid "Migrating Customer Email Addresses" +msgstr "" + +#: includes/class-edd-cli.php:1659 +msgid "Migration complete: Customer Email Addresses" +msgstr "" + +#: includes/class-edd-cli.php:1687 +msgid "The tax rates custom table migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1690 +msgid "Checking for default tax rate" +msgstr "" + +#: includes/class-edd-cli.php:1693 +msgid "Migrating default tax rate" +msgstr "" + +#: includes/class-edd-cli.php:1717 +msgid "Migration complete: Tax Rates" +msgstr "" + +#: includes/class-edd-cli.php:1757 +msgid "This process will remove and recreate orders in your database. Please make sure you've backed up your EDD database tables. Are you sure you want to delete orders that have already been migrated and run the migration again?" +msgstr "" + +#: includes/class-edd-cli.php:1763 +msgid "The payments custom table migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:1766 +msgid "Preparing to migrate payments." +msgstr "" + +#: includes/class-edd-cli.php:1769 +msgid "Migrating Payments" +msgstr "" + +#: includes/class-edd-cli.php:1796 +msgid "An EDD Payment could not be found for that ID." +msgstr "" + +#: includes/class-edd-cli.php:1799 +msgid "The payment ID must be an integer from the post_id column." +msgstr "" + +#: includes/class-edd-cli.php:1810 +msgid "The starting ID must be an integer from the post_id column." +msgstr "" + +#: includes/class-edd-cli.php:1820 +msgid "The ending ID must be an integer from the post_id column." +msgstr "" + +#: includes/class-edd-cli.php:1829 +#: includes/class-edd-cli.php:2398 +msgid "No conflicting orders were found." +msgstr "" + +#: includes/class-edd-cli.php:1845 +msgid "Are you sure you want to run a partial order migration?" +msgstr "" + +#. translators: 1: the refund order ID, 2: the original payment ID. +#: includes/class-edd-cli.php:1887 +msgid "%1$d is a refund order. EDD will delete the refund and migrate payment %1$d, then re-migrate payment %2$d." +msgstr "" + +#. translators: 1: the order/payment ID. +#: includes/class-edd-cli.php:1897 +msgid "Order ID %1$d appears to be a different record from Payment ID %1$d. Are you sure you want to destroy this order and overwrite it?" +msgstr "" + +#. translators: %d: The order ID. +#: includes/class-edd-cli.php:1903 +msgid "Deleting order %d." +msgstr "" + +#. translators: %d: The payment ID. +#: includes/class-edd-cli.php:1934 +msgid "Migration failed for payment %d." +msgstr "" + +#: includes/class-edd-cli.php:1957 +msgid "No payment records found." +msgstr "" + +#: includes/class-edd-cli.php:1964 +msgid "Partial order migration complete. Orders Processed: " +msgstr "" + +#: includes/class-edd-cli.php:1965 +msgid "To recalculate all download sales and earnings, run `wp edd recalculate_download_sales_earnings`." +msgstr "" + +#: includes/class-edd-cli.php:1966 +msgid "To recalculate all customer sales and earnings, run `wp edd recalculate_customer_values`." +msgstr "" + +#: includes/class-edd-cli.php:1968 +msgid "Migration complete: Orders" +msgstr "" + +#: includes/class-edd-cli.php:1975 +msgid "Refund Records Created: " +msgstr "" + +#: includes/class-edd-cli.php:1996 +msgid "You must enter a payment ID to display legacy data." +msgstr "" + +#: includes/class-edd-cli.php:2011 +msgid "The legacy payment data could not be found." +msgstr "" + +#: includes/class-edd-cli.php:2054 +msgid "Sales and Earnings successfully recalculated for all downloads." +msgstr "" + +#: includes/class-edd-cli.php:2055 +msgid "Downloads Updated: " +msgstr "" + +#: includes/class-edd-cli.php:2081 +msgid "Sales and Earnings successfully recalculated for all customers." +msgstr "" + +#: includes/class-edd-cli.php:2082 +msgid "Customers Updated: " +msgstr "" + +#: includes/class-edd-cli.php:2100 +msgid "Do you want to remove legacy data? This will permanently remove legacy discounts, logs, and order notes." +msgstr "" + +#: includes/class-edd-cli.php:2108 +msgid "Legacy discounts have already been removed. To run this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:2110 +msgid "Removing old discount data." +msgstr "" + +#: includes/class-edd-cli.php:2131 +msgid "Legacy logs have already been removed. To run this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:2133 +msgid "Removing old logs." +msgstr "" + +#: includes/class-edd-cli.php:2154 +msgid "Legacy order notes have already been removed. To run this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:2156 +msgid "Removing old order notes." +msgstr "" + +#: includes/class-edd-cli.php:2180 +msgid "Updating customers database table." +msgstr "" + +#: includes/class-edd-cli.php:2183 +msgid "Removing Payment IDs column." +msgstr "" + +#: includes/class-edd-cli.php:2189 +msgid "Removing notes column." +msgstr "" + +#: includes/class-edd-cli.php:2199 +msgid "Legacy customer emails have already been removed. To run this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:2201 +msgid "Removing old customer emails." +msgstr "" + +#: includes/class-edd-cli.php:2212 +msgid "Legacy customer addresses have already been removed. To run this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:2214 +msgid "Removing old customer addresses." +msgstr "" + +#: includes/class-edd-cli.php:2225 +msgid "Legacy orders have already been removed. To run this anyway, use the --force argument." +msgstr "" + +#: includes/class-edd-cli.php:2227 +msgid "Removing old orders." +msgstr "" + +#. translators: %s: discount property name +#: includes/class-edd-discount.php:377 +#: includes/class-edd-download.php:377 +msgid "Can't get property %s" +msgstr "" + +#: includes/class-edd-discount.php:694 +msgid "Draft" +msgstr "" + +#: includes/class-edd-discount.php:697 +#: includes/gateways/stripe/includes/template-functions.php:377 +#: includes/misc-functions.php:1529 +msgid "Expired" +msgstr "" + +#: includes/class-edd-discount.php:1306 +msgctxt "error shown when attempting to use a discount before its start date" +msgid "This discount is invalid." +msgstr "" + +#: includes/class-edd-discount.php:1373 +msgid "This discount has reached its maximum usage." +msgstr "" + +#. translators: %s: Minimum order amount, formatted for the currency +#: includes/class-edd-discount.php:1408 +msgid "Minimum order of %s not met." +msgstr "" + +#: includes/class-edd-discount.php:1497 +msgid "The product requirements for this discount are not met." +msgstr "" + +#: includes/class-edd-discount.php:1513 +#: includes/class-edd-discount.php:1570 +msgid "This discount is not valid for the cart contents." +msgstr "" + +#: includes/class-edd-discount.php:1645 +msgid "This discount has already been redeemed." +msgstr "" + +#: includes/class-edd-discount.php:1678 +#: includes/class-edd-discount.php:1709 +#: includes/discount-functions.php:1019 +msgctxt "error for when a discount is invalid based on its configuration" +msgid "This discount is invalid." +msgstr "" + +#: includes/class-edd-discount.php:1733 +msgid "This discount is expired." +msgstr "" + +#: includes/class-edd-discount.php:1740 +msgid "This discount is not active." +msgstr "" + +#: includes/class-edd-download.php:397 +msgid "New Download Product" +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: includes/class-edd-license-handler.php:302 +#: src/Extensions/Handler.php:256 +msgid "You have invalid or expired license keys for Easy Digital Downloads. %1$sActivate License(s)%2$s" +msgstr "" + +#: includes/class-edd-license-handler.php:324 +#: src/Extensions/Handler.php:275 +msgid "Enter valid license key for automatic updates." +msgstr "" + +#: includes/class-edd-register-meta.php:82 +msgid "The total earnings for the specified product" +msgstr "" + +#: includes/class-edd-register-meta.php:93 +msgid "The number of sales for the specified product." +msgstr "" + +#: includes/class-edd-register-meta.php:104 +msgid "The price of the product." +msgstr "" + +#: includes/class-edd-register-meta.php:121 +msgid "An array of variable prices for the product." +msgstr "" + +#: includes/class-edd-register-meta.php:153 +msgid "The files associated with the product, available for download." +msgstr "" + +#: includes/class-edd-register-meta.php:165 +msgid "An array of product IDs to associate with a bundle." +msgstr "" + +#: includes/class-edd-register-meta.php:184 +msgid "Defines how this product's 'Purchase' button should behave, either add to cart or buy now" +msgstr "" + +#: includes/class-edd-register-meta.php:196 +msgid "When variable pricing is enabled, this value defines which option should be chosen by default." +msgstr "" + +#: includes/class-edd-register-meta.php:218 +msgid "The email address associated with the purchase." +msgstr "" + +#: includes/class-edd-register-meta.php:229 +msgid "The Customer ID associated with the payment." +msgstr "" + +#: includes/class-edd-register-meta.php:240 +msgid "The User ID associated with the payment." +msgstr "" + +#: includes/class-edd-register-meta.php:250 +msgid "The IP address the payment was made from." +msgstr "" + +#: includes/class-edd-register-meta.php:260 +msgid "The unique purchase key for this payment." +msgstr "" + +#: includes/class-edd-register-meta.php:270 +msgid "The purchase total for this payment." +msgstr "" + +#: includes/class-edd-register-meta.php:280 +msgid "Identifies if the purchase was made in Test or Live mode." +msgstr "" + +#: includes/class-edd-register-meta.php:290 +msgid "The registered gateway that was used to process this payment." +msgstr "" + +#: includes/class-edd-register-meta.php:300 +msgid "Array of payment meta that contains cart details, downloads, amounts, taxes, discounts, and subtotals, etc." +msgstr "" + +#: includes/class-edd-register-meta.php:310 +msgid "The total amount of tax paid for this payment." +msgstr "" + +#: includes/class-edd-register-meta.php:320 +msgid "The date this payment was changed to the `completed` status." +msgstr "" + +#: includes/class-edd-roles.php:47 +msgid "Shop Manager" +msgstr "" + +#: includes/class-edd-roles.php:82 +msgid "Shop Accountant" +msgstr "" + +#: includes/class-edd-roles.php:92 +msgid "Shop Worker" +msgstr "" + +#: includes/class-edd-roles.php:103 +msgid "Shop Vendor" +msgstr "" + +#: includes/class-edd-roles.php:339 +msgid "Reset EDD User Roles" +msgstr "" + +#: includes/class-edd-stats.php:80 +#: includes/reports/reports-functions.php:533 +msgid "Yesterday" +msgstr "" + +#: includes/class-edd-stats.php:81 +#: includes/reports/reports-functions.php:534 +msgid "This Week" +msgstr "" + +#: includes/class-edd-stats.php:82 +#: includes/reports/reports-functions.php:535 +msgid "Last Week" +msgstr "" + +#: includes/class-edd-stats.php:83 +msgid "This Month" +msgstr "" + +#: includes/class-edd-stats.php:85 +msgid "This Quarter" +msgstr "" + +#: includes/class-edd-stats.php:86 +#: includes/reports/reports-functions.php:540 +msgid "Last Quarter" +msgstr "" + +#: includes/class-edd-stats.php:87 +msgid "This Year" +msgstr "" + +#: includes/class-edd-stats.php:88 +#: includes/reports/reports-functions.php:542 +msgid "Last Year" +msgstr "" + +#: includes/class-edd-stats.php:428 +msgid "Improper date provided." +msgstr "" + +#: includes/class-stats.php:468 +msgid "Sunday" +msgstr "" + +#: includes/class-stats.php:469 +msgid "Monday" +msgstr "" + +#: includes/class-stats.php:470 +msgid "Tuesday" +msgstr "" + +#: includes/class-stats.php:471 +msgid "Wednesday" +msgstr "" + +#: includes/class-stats.php:472 +msgid "Thursday" +msgstr "" + +#: includes/class-stats.php:473 +msgid "Friday" +msgstr "" + +#: includes/class-stats.php:474 +msgid "Saturday" +msgstr "" + +#: includes/class-stats.php:3224 +#: includes/emails/email-summary/class-edd-email-summary.php:329 +msgid "No Change" +msgstr "" + +#: includes/class-stats.php:3236 +#: includes/emails/email-summary/class-edd-email-summary.php:327 +msgid "No data to compare" +msgstr "" + +#: includes/compat/class-customer.php:194 +#: includes/compat/class-discount.php:122 +#: includes/compat/class-discount.php:172 +#: includes/compat/class-log.php:67 +#: includes/compat/class-log.php:215 +#: includes/compat/class-payment.php:94 +#: includes/compat/class-payment.php:135 +msgid "This function is not meant to be called directly. It is only here for backwards compatibility purposes." +msgstr "" + +#. translators: 1: posts table, 2: adjustments table, 3: edd_get_discounts(), 4: edd_get_discount(), 5: EDD_Discount, 6: development URL +#: includes/compat/class-discount.php:78 +msgid "As of Easy Digital Downloads 3.0, discounts no longer exist in the %1$s table. They have been migrated to %2$s. Discounts should be accessed using %3$s, %4$s or instantiating a new instance of %5$s. See %6$s for more information." +msgstr "" + +#: includes/compat/class-log.php:275 +msgid "All log postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_get_api_request_log() instead." +msgstr "" + +#. translators: 1: wp_posts table, 2: edd_orders table, 3: edd_get_orders(), 4: edd_get_order(), 5: EDD development blog +#: includes/compat/class-payment.php:109 +msgid "As of Easy Digital Downloads 3.0, orders no longer exist in the %1$s table. They have been migrated to %2$s. Orders should be accessed using %3$s or %4$s. See %5$s for more information." +msgstr "" + +#: includes/compat/class-template.php:109 +msgid "Easy Digital Downloads failed to automatically update your purchase receipt template. This update is necessary for the purchase receipt to display correctly." +msgstr "" + +#. translators: 1: opening anchor tag (do not translate) 2. closing anchor tag (do not translate) +#: includes/compat/class-template.php:111 +msgid "This update must be completed manually. Please click %1$shere%2$s for more information." +msgstr "" + +#: includes/compat/class-template.php:112 +msgid "The file that needs to be updated is located at:" +msgstr "" + +#: includes/currency/functions.php:22 +msgid "US Dollars ($)" +msgstr "" + +#: includes/currency/functions.php:23 +msgid "Euros (€)" +msgstr "" + +#: includes/currency/functions.php:24 +msgid "Pound Sterling (£)" +msgstr "" + +#: includes/currency/functions.php:25 +msgid "Australian Dollars ($)" +msgstr "" + +#: includes/currency/functions.php:26 +msgid "Brazilian Real (R$)" +msgstr "" + +#: includes/currency/functions.php:27 +msgid "Canadian Dollars ($)" +msgstr "" + +#: includes/currency/functions.php:28 +msgid "Czech Koruna" +msgstr "" + +#: includes/currency/functions.php:29 +msgid "Danish Krone" +msgstr "" + +#: includes/currency/functions.php:30 +msgid "Hong Kong Dollar ($)" +msgstr "" + +#: includes/currency/functions.php:31 +msgid "Hungarian Forint" +msgstr "" + +#: includes/currency/functions.php:32 +msgid "Israeli Shekel (₪)" +msgstr "" + +#: includes/currency/functions.php:33 +msgid "Japanese Yen (¥)" +msgstr "" + +#: includes/currency/functions.php:34 +msgid "Malaysian Ringgits" +msgstr "" + +#: includes/currency/functions.php:35 +msgid "Mexican Peso ($)" +msgstr "" + +#: includes/currency/functions.php:36 +msgid "New Zealand Dollar ($)" +msgstr "" + +#: includes/currency/functions.php:37 +msgid "Norwegian Krone" +msgstr "" + +#: includes/currency/functions.php:38 +msgid "Philippine Pesos" +msgstr "" + +#: includes/currency/functions.php:39 +msgid "Polish Zloty" +msgstr "" + +#: includes/currency/functions.php:40 +msgid "Singapore Dollar ($)" +msgstr "" + +#: includes/currency/functions.php:41 +msgid "Swedish Krona" +msgstr "" + +#: includes/currency/functions.php:42 +msgid "Swiss Franc" +msgstr "" + +#: includes/currency/functions.php:43 +msgid "Taiwan New Dollars" +msgstr "" + +#: includes/currency/functions.php:44 +msgid "Thai Baht (฿)" +msgstr "" + +#: includes/currency/functions.php:45 +msgid "Indian Rupee (₹)" +msgstr "" + +#: includes/currency/functions.php:46 +msgid "Turkish Lira (₺)" +msgstr "" + +#: includes/currency/functions.php:47 +msgid "Iranian Rial (﷼)" +msgstr "" + +#: includes/currency/functions.php:48 +msgid "Russian Rubles" +msgstr "" + +#: includes/currency/functions.php:49 +msgid "Angolan Kwanza" +msgstr "" + +#: includes/customer-functions.php:317 +#: includes/payments/class-payments-query.php:619 +msgid "Do not use -1 to retrieve all results." +msgstr "" + +#: includes/deprecated-functions.php:188 +msgid "You have already purchased this item, but you may purchase it again." +msgstr "" + +#: includes/deprecated-functions.php:269 +msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" +msgstr "" + +#: includes/deprecated-functions.php:270 +#: includes/deprecated-functions.php:303 +msgid "A list of download links for each download purchased" +msgstr "" + +#: includes/deprecated-functions.php:271 +#: includes/deprecated-functions.php:304 +msgid "A plain-text list of download URLs for each download purchased" +msgstr "" + +#: includes/deprecated-functions.php:272 +#: includes/deprecated-functions.php:305 +msgid "The buyer's first name" +msgstr "" + +#: includes/deprecated-functions.php:273 +#: includes/deprecated-functions.php:306 +msgid "The buyer's full name, first and last" +msgstr "" + +#: includes/deprecated-functions.php:274 +#: includes/deprecated-functions.php:307 +msgid "The buyer's user name on the site, if they registered an account" +msgstr "" + +#: includes/deprecated-functions.php:275 +#: includes/deprecated-functions.php:308 +msgid "The buyer's email address" +msgstr "" + +#: includes/deprecated-functions.php:276 +#: includes/deprecated-functions.php:309 +msgid "The buyer's billing address" +msgstr "" + +#: includes/deprecated-functions.php:277 +#: includes/deprecated-functions.php:310 +msgid "The date of the purchase" +msgstr "" + +#: includes/deprecated-functions.php:278 +#: includes/deprecated-functions.php:311 +msgid "The price of the purchase before taxes" +msgstr "" + +#: includes/deprecated-functions.php:279 +#: includes/deprecated-functions.php:312 +#: src/Emails/Tags/Registry.php:127 +msgid "The taxed amount of the purchase" +msgstr "" + +#: includes/deprecated-functions.php:280 +#: includes/deprecated-functions.php:313 +#: src/Emails/Tags/Registry.php:148 +msgid "The total price of the purchase" +msgstr "" + +#: includes/deprecated-functions.php:281 +#: includes/deprecated-functions.php:314 +msgid "The unique ID number for this purchase" +msgstr "" + +#: includes/deprecated-functions.php:282 +#: includes/deprecated-functions.php:315 +msgid "The unique ID number for this purchase receipt" +msgstr "" + +#: includes/deprecated-functions.php:283 +#: includes/deprecated-functions.php:316 +msgid "The method of payment used for this purchase" +msgstr "" + +#: includes/deprecated-functions.php:284 +#: includes/deprecated-functions.php:317 +msgid "Your site name" +msgstr "" + +#: includes/deprecated-functions.php:285 +msgid "Adds a link so users can view their receipt directly on your website if they are unable to view it in the browser correctly." +msgstr "" + +#: includes/deprecated-functions.php:302 +msgid "Enter the email that is sent to sale notification emails after completion of a purchase. HTML is accepted. Available template tags:" +msgstr "" + +#: includes/deprecated-functions.php:489 +#: includes/process-download.php:942 +msgid "Sorry but you have hit your download limit for this file." +msgstr "" + +#: includes/deprecated-functions.php:506 +#: includes/download-functions.php:1521 +msgid "Sorry but your download link has expired." +msgstr "" + +#: includes/deprecated-functions.php:514 +msgid "No payments matching your request were found." +msgstr "" + +#: includes/deprecated-functions.php:916 +msgid "You do not have permission to access this report" +msgstr "" + +#. translators: 1: Old status, 2: New status +#: includes/deprecated-functions.php:1158 +#: includes/orders/functions/transitions.php:30 +msgid "Status changed from %1$s to %2$s" +msgstr "" + +#: includes/deprecated-functions.php:1196 +msgid "Refund Payment in PayPal" +msgstr "" + +#: includes/deprecated-functions.php:1287 +msgid "Disconnect Jilt" +msgstr "" + +#. translators: 1: tag, 2. tag +#: includes/deprecated-functions.php:1295 +msgid "%1$sClick here%2$s to visit your Jilt dashboard" +msgstr "" + +#: includes/deprecated-functions.php:1307 +msgid "Connect to Jilt" +msgstr "" + +#: includes/deprecated-functions.php:1317 +msgid "Install Jilt" +msgstr "" + +#: includes/deprecated-functions.php:1338 +#: includes/deprecated-functions.php:1417 +#: includes/deprecated-functions.php:1446 +#: includes/deprecated-functions.php:1596 +#: includes/deprecated-functions.php:1672 +#: includes/emails/recapture.php:16 +msgid "You do not have permission to do this." +msgstr "" + +#: includes/deprecated-functions.php:1396 +#: includes/deprecated-functions.php:1425 +msgid "Something went wrong. Jilt was not installed correctly." +msgstr "" + +#. translators: 1: tag, 2. tag, 3. tag, 4. tag +#: includes/deprecated-functions.php:1487 +msgid "%1$sRecover abandoned purchases like this one.%2$s %3$sTry Jilt for free%4$s." +msgstr "" + +#. translators: 1: Opening anchor tag, 2: The url to dismiss the ajax notice, 3: Complete the opening of the anchor tag, 4: Open span tag, 5: Close span tag +#: includes/deprecated-functions.php:1500 +#: includes/emails/recapture.php:126 +msgid "%1$s %2$s %3$s %4$s Dismiss this notice. %5$s" +msgstr "" + +#: includes/deprecated-functions.php:1537 +msgid "Access your SendWP account" +msgstr "" + +#: includes/deprecated-functions.php:1541 +msgid "Note: Email sending is currently disabled. Product Reviews extension." +msgstr "" + +#. translators: %s: The site name +#: includes/deprecated-functions.php:2495 +msgid "[%s] New User Registration" +msgstr "" + +#: includes/deprecated-functions.php:2496 +#: src/Emails/Templates/NewUserAdmin.php:86 +msgid "New user registration" +msgstr "" + +#. translators: the user email +#: includes/deprecated-functions.php:2500 +msgid "E-mail: %s" +msgstr "" + +#. translators: Site name +#: includes/deprecated-functions.php:2510 +msgid "[%s] Your username and password" +msgstr "" + +#: includes/deprecated-functions.php:2511 +#: src/Emails/Templates/NewUser.php:86 +msgid "Your account info" +msgstr "" + +#: includes/deprecated-functions.php:2516 +msgid "Password entered at checkout" +msgstr "" + +#: includes/deprecated-functions.php:2518 +msgid "Password entered at registration" +msgstr "" + +#. translators: %s: password message +#: includes/deprecated-functions.php:2522 +msgid "Password: %s" +msgstr "" + +#: includes/deprecated-functions.php:2527 +#: src/Emails/Templates/NewUser.php:114 +msgid "Click here to log in" +msgstr "" + +#. translators: %s: login URL +#: includes/deprecated-functions.php:2531 +#: src/Emails/Templates/NewUser.php:118 +msgid "To log in, visit: %s" +msgstr "" + +#. translators: 1: Function name, 2: Version number, 3: Replacement function name +#: includes/discount-functions.php:505 +msgid "%1$s is deprecated since Easy Digital Downloads version %2$s! Use %3$s instead." +msgstr "" + +#: includes/download-functions.php:605 +msgid "Single Product" +msgstr "" + +#: includes/download-functions.php:606 +msgid "Bundle" +msgstr "" + +#: includes/download-functions.php:607 +msgid "Service" +msgstr "" + +#. translators: the plugin name. +#: includes/EDD_SL_Plugin_Updater.php:282 +#: src/Extensions/Updater.php:315 +msgid "There is a new version of %1$s available." +msgstr "" + +#: includes/EDD_SL_Plugin_Updater.php:288 +#: src/Extensions/Updater.php:321 +msgid "Contact your network administrator to install the update." +msgstr "" + +#. translators: 1: opening anchor tag, do not translate 2. the new plugin version 3. closing anchor tag, do not translate. +#: includes/EDD_SL_Plugin_Updater.php:293 +#: src/Extensions/Updater.php:326 +msgid "%1$sView version %2$s details%3$s." +msgstr "" + +#. translators: 1: opening anchor tag, do not translate 2. the new plugin version 3. closing anchor tag, do not translate 4. opening anchor tag, do not translate 5. closing anchor tag, do not translate. +#: includes/EDD_SL_Plugin_Updater.php:301 +#: src/Extensions/Updater.php:335 +msgid "%1$sView version %2$s details%3$s or %4$supdate now%5$s." +msgstr "" + +#: includes/EDD_SL_Plugin_Updater.php:312 +#: src/Extensions/Updater.php:346 +msgid "Update now." +msgstr "" + +#: includes/EDD_SL_Plugin_Updater.php:547 +#: src/Extensions/Updater.php:510 +msgid "You do not have permission to install plugin updates" +msgstr "" + +#. translators: Site domain name +#: includes/emails/email-summary/class-edd-email-summary.php:88 +msgid "Easy Digital Downloads Summary - %s" +msgstr "" + +#: includes/emails/email-summary/class-edd-email-summary.php:120 +msgid "Missing email recipients for Email Summary" +msgstr "" + +#: includes/emails/email-summary/class-edd-email-summary.php:372 +msgid "month" +msgstr "" + +#: includes/emails/email-summary/class-edd-email-summary.php:372 +msgid "week" +msgstr "" + +#. translators: period name (e.g. week) +#: includes/emails/email-summary/class-edd-email-summary.php:374 +msgid "vs previous %s" +msgstr "" + +#: includes/emails/email-summary/class-edd-email-summary.php:402 +msgid "Email body for Email Summary was empty." +msgstr "" + +#: includes/emails/email-summary/edd-email-summary-template.php:43 +msgid "View Full Report" +msgstr "" + +#: includes/emails/email-summary/template-parts/data-listing.php:16 +#: includes/emails/email-summary/template-parts/top-products.php:18 +msgid "Gross Revenue" +msgstr "" + +#: includes/emails/email-summary/template-parts/data-listing.php:92 +msgid "Average Order" +msgstr "" + +#. translators: 1: amount that could have been saved, 2: opening anchor tag, 3: closing anchor tag +#: includes/emails/email-summary/template-parts/fee-info.php:59 +msgid "You could have saved %1$s in transaction fees this year by %2$supgrading to an Extended Pass%3$s." +msgstr "" + +#. translators: 1: opening span tag, 2. the formatted currency amount, 3. the closing span tag +#: includes/emails/email-summary/template-parts/fee-info.php:67 +msgid "You have %1$ssaved %2$s in transaction fees%3$s this year with your active license." +msgstr "" + +#: includes/emails/email-summary/template-parts/preview-text.php:7 +msgid "Store performance summary" +msgstr "" + +#: includes/emails/email-summary/template-parts/pro-tips.php:18 +msgid "Pro-tip from our expert" +msgstr "" + +#: includes/emails/email-summary/template-parts/site-info.php:6 +msgid "Your eCommerce Summary" +msgstr "" + +#: includes/emails/email-summary/template-parts/site-info.php:18 +msgid "Hey there!" +msgstr "" + +#: includes/emails/email-summary/template-parts/site-info.php:31 +msgid "Below is a look at how your store performed in the last month." +msgstr "" + +#: includes/emails/email-summary/template-parts/site-info.php:34 +msgid "Below is a look at how your store performed in the last week." +msgstr "" + +#: includes/emails/email-summary/template-parts/site-info.php:38 +msgid "Below is a look at how your store has been performing." +msgstr "" + +#: includes/emails/email-summary/template-parts/top-products.php:12 +msgid "Top 5 Products by Revenue" +msgstr "" + +#: includes/emails/recapture.php:84 +msgid "Something went wrong. Recapture for EDD was not installed correctly." +msgstr "" + +#. translators: 1: tag, 2. tag, 3. tag, 4. tag +#: includes/emails/recapture.php:113 +msgid "%1$sRecover abandoned purchases like this one.%2$s %3$sTry Recapture for free%4$s." +msgstr "" + +#: includes/emails/tags-inserter.php:80 +#: src/Admin/Onboarding/Steps/ConfigureEmails.php:110 +msgid "Insert Tag" +msgstr "" + +#: includes/emails/tags-inserter.php:90 +msgid "Restore Default" +msgstr "" + +#: includes/emails/tags-inserter.php:98 +msgid "This email will be sent as a plain text email and does not support images or HTML markup." +msgstr "" + +#: includes/emails/tags-inserter.php:100 +msgid "This is specific to this email and does not affect other emails." +msgstr "" + +#: includes/emails/tags-inserter.php:169 +msgid "Find a tag..." +msgstr "" + +#: includes/emails/tags.php:300 +msgid "Additional information about your purchase:" +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: includes/emails/tags.php:765 +msgid "%1$sView it in your browser %2$s" +msgstr "" + +#: includes/emails/template.php:61 +msgid "These are some sample notes added to a product." +msgstr "" + +#: includes/emails/template.php:109 +msgid "Missing purchase key." +msgstr "" + +#: includes/formatting.php:335 +msgid "Billing" +msgstr "" + +#: includes/gateways/actions.php:37 +#: includes/gateways/stripe/includes/payment-methods/payment-request/checkout.php:321 +msgid "Missing nonce when loading the gateway fields. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4" +msgstr "" + +#: includes/gateways/actions.php:71 +msgid "You must enable a payment gateway to use Easy Digital Downloads." +msgstr "" + +#: includes/gateways/actions.php:73 +msgid "Your order cannot be completed at this time. Please try again or contact site support." +msgstr "" + +#. translators: %1$s Opening anchor tag, %2$s Closing anchor tag, %3$s Opening anchor tag +#: includes/gateways/amazon-payments.php:121 +msgid "Amazon Payments for Easy Digital Downloads has been deprecated and will be removed in a future version. To continue to accept credit card payments in the future, please %1$senable Stripe now%2$s or %3$slearn more about the benefits of using Stripe%2$s." +msgstr "" + +#: includes/gateways/amazon-payments.php:224 +msgid "There is an error with the Amazon Payments configuration." +msgstr "" + +#: includes/gateways/amazon-payments.php:294 +#: includes/gateways/amazon-payments.php:295 +msgid "Amazon" +msgstr "" + +#: includes/gateways/amazon-payments.php:344 +msgid "Amazon Payments" +msgstr "" + +#: includes/gateways/amazon-payments.php:360 +msgid "Register with Amazon" +msgstr "" + +#: includes/gateways/amazon-payments.php:362 +msgid "Connect Easy Digital Downloads to Amazon" +msgstr "" + +#: includes/gateways/amazon-payments.php:365 +msgid "Once registration is complete, enter your API credentials below." +msgstr "" + +#: includes/gateways/amazon-payments.php:371 +msgid "Seller ID" +msgstr "" + +#: includes/gateways/amazon-payments.php:372 +msgid "Found in the Integration settings. Also called a Merchant ID" +msgstr "" + +#: includes/gateways/amazon-payments.php:378 +msgid "MWS Access Key" +msgstr "" + +#: includes/gateways/amazon-payments.php:379 +#: includes/gateways/amazon-payments.php:386 +msgid "Found on Seller Central in the MWS Keys section" +msgstr "" + +#: includes/gateways/amazon-payments.php:385 +msgid "MWS Secret Key" +msgstr "" + +#: includes/gateways/amazon-payments.php:392 +msgid "Client ID" +msgstr "" + +#: includes/gateways/amazon-payments.php:393 +msgid "The Amazon Client ID. Should look like `amzn1.application-oa2...`" +msgstr "" + +#: includes/gateways/amazon-payments.php:399 +msgid "Amazon MWS Callback URL" +msgstr "" + +#: includes/gateways/amazon-payments.php:400 +msgid "The Return URL to provide in your MWS Application. Enter this under your Login and Pay → Web Settings" +msgstr "" + +#: includes/gateways/amazon-payments.php:408 +msgid "Amazon Merchant IPN URL" +msgstr "" + +#. translators: %s: Integration Settings URL +#: includes/gateways/amazon-payments.php:410 +msgid "The IPN URL to provide in your MWS account. Enter this under your Integration Settings" +msgstr "" + +#: includes/gateways/amazon-payments.php:694 +msgid "Currently logged into Amazon as" +msgstr "" + +#: includes/gateways/amazon-payments.php:695 +msgid "Logout" +msgstr "" + +#: includes/gateways/amazon-payments.php:845 +#: includes/gateways/amazon-payments.php:859 +msgid "Missing Reference ID, please try again." +msgstr "" + +#. translators: %s: Payment Failure Reason (dynamic, provided by the gateway) +#: includes/gateways/amazon-payments.php:893 +msgid "Your payment could not be authorized, please try a different payment method. Reason: %s" +msgstr "" + +#. translators: %s: Amazon Error (dynamic, provided by the gateway) +#: includes/gateways/amazon-payments.php:940 +msgid "There was an issue processing your payment. Amazon error: %s" +msgstr "" + +#: includes/gateways/amazon-payments.php:1055 +msgid "Invalid Amazon seller ID" +msgstr "" + +#: includes/gateways/amazon-payments.php:1056 +#: includes/gateways/amazon-payments.php:1100 +#: includes/gateways/paypal-standard.php:496 +#: includes/gateways/paypal-standard.php:507 +#: includes/gateways/paypal-standard.php:603 +#: includes/gateways/paypal-standard.php:618 +#: includes/gateways/paypal-standard.php:698 +#: includes/gateways/paypal-standard.php:712 +#: src/Gateways/PayPal/IPN.php:199 +#: src/Gateways/PayPal/IPN.php:210 +msgid "IPN Error" +msgstr "" + +#: includes/gateways/amazon-payments.php:1077 +msgid "Capture declined in Amazon" +msgstr "" + +#. translators: %s: Amazon Refund ID +#: includes/gateways/amazon-payments.php:1092 +#: includes/gateways/amazon-payments.php:1172 +msgid "Refund completed in Amazon. Refund ID: %s" +msgstr "" + +#. translators: %s: Amazon Refund ID +#: includes/gateways/amazon-payments.php:1166 +msgid "Refund declined in Amazon. Refund ID: %s" +msgstr "" + +#. translators: %s: Amazon Refund ID +#: includes/gateways/amazon-payments.php:1177 +msgid "Refund initiated in Amazon. Reference ID: %s" +msgstr "" + +#: includes/gateways/amazon-payments.php:1183 +msgid "Refund request failed in Amazon." +msgstr "" + +#: includes/gateways/functions.php:32 +msgid "Test" +msgstr "" + +#: includes/gateways/functions.php:54 +#: includes/gateways/functions.php:55 +#: includes/gateways/functions.php:71 +#: includes/gateways/paypal/admin/settings.php:36 +msgid "PayPal" +msgstr "" + +#: includes/gateways/functions.php:70 +#: includes/gateways/paypal-standard.php:36 +msgid "PayPal Standard" +msgstr "" + +#: includes/gateways/functions.php:320 +msgid "The requested price ID does not exist." +msgstr "" + +#: includes/gateways/manual.php:33 +#: includes/gateways/paypal-standard.php:173 +#: includes/gateways/paypal/checkout-actions.php:114 +msgid "Nonce verification has failed" +msgstr "" + +#. translators: %s: payment data +#: includes/gateways/manual.php:74 +msgid "Payment creation failed while processing a manual (free or test) purchase. Payment data: %s" +msgstr "" + +#: includes/gateways/paypal-standard.php:58 +msgid "PayPal Email" +msgstr "" + +#: includes/gateways/paypal-standard.php:59 +msgid "Enter your PayPal account's email" +msgstr "" + +#: includes/gateways/paypal-standard.php:65 +msgid "PayPal Image" +msgstr "" + +#: includes/gateways/paypal-standard.php:66 +msgid "Upload an image to display on the PayPal checkout page." +msgstr "" + +#. translators: %s: Documentation URL +#: includes/gateways/paypal-standard.php:74 +msgid "Enter your PayPal Identity Token in order to enable Payment Data Transfer (PDT). This allows payments to be verified without relying on the PayPal IPN. See our documentation for further information." +msgstr "" + +#: includes/gateways/paypal-standard.php:80 +msgid "PayPal Identity Token" +msgstr "" + +#. translators: %s: FAQ URL +#: includes/gateways/paypal-standard.php:88 +msgid "If you are unable to use Payment Data Transfer and payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases. See our FAQ for further information." +msgstr "" + +#: includes/gateways/paypal-standard.php:94 +msgid "Disable PayPal IPN Verification" +msgstr "" + +#: includes/gateways/paypal-standard.php:103 +msgid "API Credentials" +msgstr "" + +#. translators: %s: PayPal API Credentials URL +#: includes/gateways/paypal-standard.php:107 +msgid "API credentials are necessary to process PayPal refunds from inside WordPress. These can be obtained from your PayPal account." +msgstr "" + +#: includes/gateways/paypal-standard.php:113 +msgid "Live API Username" +msgstr "" + +#: includes/gateways/paypal-standard.php:114 +msgid "Your PayPal live API username. " +msgstr "" + +#: includes/gateways/paypal-standard.php:120 +msgid "Live API Password" +msgstr "" + +#: includes/gateways/paypal-standard.php:121 +msgid "Your PayPal live API password." +msgstr "" + +#: includes/gateways/paypal-standard.php:127 +msgid "Live API Signature" +msgstr "" + +#: includes/gateways/paypal-standard.php:128 +msgid "Your PayPal live API signature." +msgstr "" + +#: includes/gateways/paypal-standard.php:134 +msgid "Test API Username" +msgstr "" + +#: includes/gateways/paypal-standard.php:135 +msgid "Your PayPal test API username." +msgstr "" + +#: includes/gateways/paypal-standard.php:141 +msgid "Test API Password" +msgstr "" + +#: includes/gateways/paypal-standard.php:142 +msgid "Your PayPal test API password." +msgstr "" + +#: includes/gateways/paypal-standard.php:148 +msgid "Test API Signature" +msgstr "" + +#: includes/gateways/paypal-standard.php:149 +msgid "Your PayPal test API signature." +msgstr "" + +#. translators: %s: payment data +#: includes/gateways/paypal-standard.php:197 +msgid "Payment creation failed before sending buyer to PayPal. Payment data: %s" +msgstr "" + +#. translators: %s: IPN Verification response +#: includes/gateways/paypal-standard.php:498 +#: includes/gateways/paypal-standard.php:509 +msgid "Invalid IPN verification response. IPN data: %s" +msgstr "" + +#. translators: %s: IPN Verification response +#: includes/gateways/paypal-standard.php:605 +msgid "Invalid business email in IPN response. IPN data: %s" +msgstr "" + +#: includes/gateways/paypal-standard.php:610 +msgid "Payment failed due to invalid PayPal business email." +msgstr "" + +#. translators: %s: IPN Verification response +#: includes/gateways/paypal-standard.php:620 +msgid "Invalid currency in IPN response. IPN data: %s" +msgstr "" + +#: includes/gateways/paypal-standard.php:625 +msgid "Payment failed due to invalid currency in PayPal IPN." +msgstr "" + +#. translators: %s: IPN Verification response +#: includes/gateways/paypal-standard.php:700 +msgid "Invalid payment amount in IPN response. IPN data: %s" +msgstr "" + +#: includes/gateways/paypal-standard.php:705 +msgid "Payment failed due to invalid amount in PayPal IPN." +msgstr "" + +#. translators: %s: IPN Verification response +#: includes/gateways/paypal-standard.php:714 +msgid "Invalid purchase key in IPN response. IPN data: %s" +msgstr "" + +#: includes/gateways/paypal-standard.php:718 +msgid "Payment failed due to invalid purchase key in PayPal IPN." +msgstr "" + +#. translators: %s: PayPal Transaction ID +#: includes/gateways/paypal-standard.php:724 +#: includes/gateways/paypal/checkout-actions.php:404 +msgid "PayPal Transaction ID: %s" +msgstr "" + +#: includes/gateways/paypal-standard.php:737 +msgid "Payment made via eCheck and will clear automatically in 5-8 days" +msgstr "" + +#: includes/gateways/paypal-standard.php:743 +msgid "Payment requires a confirmed customer address and must be accepted manually through PayPal" +msgstr "" + +#: includes/gateways/paypal-standard.php:748 +msgid "Payment must be accepted manually through PayPal due to international account regulations" +msgstr "" + +#: includes/gateways/paypal-standard.php:753 +msgid "Payment received in non-shop currency and must be accepted manually through PayPal" +msgstr "" + +#: includes/gateways/paypal-standard.php:759 +msgid "Payment is being reviewed by PayPal staff as high-risk or in possible violation of government regulations" +msgstr "" + +#: includes/gateways/paypal-standard.php:764 +msgid "Payment was sent to non-confirmed or non-registered email address." +msgstr "" + +#: includes/gateways/paypal-standard.php:769 +msgid "PayPal account must be upgraded before this payment can be accepted" +msgstr "" + +#: includes/gateways/paypal-standard.php:774 +msgid "PayPal account is not verified. Verify account in order to accept this payment" +msgstr "" + +#: includes/gateways/paypal-standard.php:779 +msgid "Payment is pending for unknown reasons. Contact PayPal support for assistance" +msgstr "" + +#. translators: %s: PayPal transaction ID +#: includes/gateways/paypal-standard.php:831 +msgid "Partial PayPal refund processed: %s" +msgstr "" + +#. translators: 1: PayPal transaction ID, 2: Reason for refund +#: includes/gateways/paypal-standard.php:837 +msgid "PayPal Payment #%1$s Refunded for reason: %2$s" +msgstr "" + +#. translators: %s: PayPal transaction ID +#: includes/gateways/paypal-standard.php:839 +msgid "PayPal Refund Transaction ID: %s" +msgstr "" + +#: includes/gateways/paypal-standard.php:1050 +msgid "Payment could not be verified while validating PayPal PDT. Missing payment total fields." +msgstr "" + +#. translators: 1: Expected payment amount, 2: Received payment amount +#: includes/gateways/paypal-standard.php:1062 +msgid "Payment failed while validating PayPal PDT. Amount expected: %1$f. Amount Received: %2$f" +msgstr "" + +#: includes/gateways/paypal-standard.php:1091 +msgid "Payment failed while validating PayPal PDT." +msgstr "" + +#: includes/gateways/paypal-standard.php:1098 +msgid "PayPal PDT encountered an unexpected result, payment set to pending" +msgstr "" + +#: includes/gateways/paypal-standard.php:1182 +#: includes/gateways/paypal/refunds.php:50 +msgid "Refund transaction in PayPal" +msgstr "" + +#: includes/gateways/paypal-standard.php:1222 +#: includes/gateways/paypal/refunds.php:93 +msgid "Transaction not refunded in PayPal, as checkbox was not selected." +msgstr "" + +#: includes/gateways/paypal-standard.php:1346 +msgid "PayPal refund failed for unknown reason." +msgstr "" + +#. translators: 1: amount refunded; %2$s - transaction ID. +#: includes/gateways/paypal-standard.php:1358 +msgid "%1$s refunded in PayPal. Transaction ID: %2$s" +msgstr "" + +#. translators: %s: PayPal Transaction ID. +#: includes/gateways/paypal-standard.php:1361 +msgid "PayPal refund transaction ID: %s" +msgstr "" + +#. translators: %s: error message. +#: includes/gateways/paypal-standard.php:1398 +msgid "PayPal refund failed: %s" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:35 +#: includes/gateways/paypal/admin/connect.php:461 +msgid "sandbox" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:35 +#: includes/gateways/paypal/admin/connect.php:461 +msgid "live" +msgstr "" + +#. translators: 1. opening tag, 2. closing tag +#: includes/gateways/paypal/admin/connect.php:46 +msgid "%1$sPayPal Communication Error:%2$s We are having trouble communicating with PayPal at the moment. Please try again later, and if the issue persists, reach out to our support team." +msgstr "" + +#. translators: %s: the store mode, either `sandbox` or `live` +#: includes/gateways/paypal/admin/connect.php:59 +msgid "Connect with PayPal in %s mode" +msgstr "" + +#. translators: 1: HTTP response code, 2: error message +#: includes/gateways/paypal/admin/connect.php:226 +msgid "Unexpected response code: %1$d. Error: %2$s" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:233 +msgid "An unexpected error occurred." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:265 +msgid "Failure reconnecting to PayPal. Please try again" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:271 +msgid "Your account has been successfully reconnected, but an error occurred while creating a webhook." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:308 +msgid "Missing PayPal authentication information. Please try again." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:322 +msgid "Missing nonce. Please refresh the page and try again." +msgstr "" + +#. translators: %d: HTTP response code +#: includes/gateways/paypal/admin/connect.php:360 +msgid "Unexpected response from PayPal while generating token. Response code: %d. Please try again." +msgstr "" + +#. translators: %d: HTTP response code +#: includes/gateways/paypal/admin/connect.php:392 +msgid "Unexpected response from PayPal. Response code: %d. Please try again." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:400 +msgid "Successfully connected." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:405 +msgid "Your account has been successfully connected, but an error occurred while creating a webhook." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:439 +msgid "Re-Check Payment Status" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:440 +msgid "Sync Webhook" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:444 +msgid "Disconnect webhooks from PayPal" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:445 +msgid "Delete connection with PayPal" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:454 +msgid "API:" +msgstr "" + +#. translators: %s: the connected mode, either `sandbox` or `live` +#: includes/gateways/paypal/admin/connect.php:464 +msgid "Your PayPal account is successfully connected in %s mode." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:479 +msgid "Payment Status:" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:483 +msgid "You need to address the following issues before you can start receiving payments:" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:491 +msgid "Ready to accept payments." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:513 +msgid "Webhook:" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:521 +msgid "Create Webhooks" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:526 +msgid "Webhook successfully configured for the following events:" +msgstr "" + +#. translators: %1$s opening anchor tag; %2$s closing anchor tag; %3$s: opening line item/status/strong tags; %4$s closing strong tag; %5$s: closing list item tag +#: includes/gateways/paypal/admin/connect.php:551 +msgid "%3$sGateway Status: %4$s PayPal is not currently active. %1$sEnable PayPal%2$s in the general gateway settings to start using it.%5$s" +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:737 +msgid "No merchant ID saved. Please reconnect to PayPal." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:823 +msgid "There was an error processing the connection to PayPal. Please attempt to connect again." +msgstr "" + +#: includes/gateways/paypal/admin/connect.php:827 +msgid "Return to settings" +msgstr "" + +#: includes/gateways/paypal/admin/notices.php:49 +msgid "Enable the new PayPal gateway for Easy Digital Downloads" +msgstr "" + +#. translators: %1$s opening anchor tag; %2$s closing anchor tag +#: includes/gateways/paypal/admin/notices.php:54 +msgid "A new, improved PayPal experience is now available in Easy Digital Downloads. You can learn more about the new integration in %1$sour documentation%2$s." +msgstr "" + +#: includes/gateways/paypal/admin/notices.php:61 +msgid "Activate the New PayPal" +msgstr "" + +#: includes/gateways/paypal/admin/notices.php:62 +msgid "Dismiss Notice" +msgstr "" + +#: includes/gateways/paypal/admin/scripts.php:28 +msgid "An unexpected error occurred. Please refresh the page and try again." +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:55 +msgid "PayPal Settings" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:60 +#: includes/gateways/stripe/includes/admin/settings.php:31 +msgid "Connection Status" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:66 +msgid "Test Client ID" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:67 +msgid "Enter your test client ID." +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:74 +msgid "Test Client Secret" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:75 +msgid "Enter your test client secret." +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:82 +msgid "Live Client ID" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:83 +msgid "Enter your live client ID." +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:90 +msgid "Live Client Secret" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:91 +msgid "Enter your live client secret." +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:105 +msgid "Connect with PayPal" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:106 +msgctxt "It is important to escape any quotations within this string, specifically \\'Sandhills Development, LLC\\'" +msgid "Connecting your store with PayPal allows Easy Digital Downloads to automatically configure your store to securely communicate with PayPal.

    You may see 'Sandhills Development, LLC', mentioned during the process—that is the company behind Easy Digital Downloads." +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:136 +#: src/Admin/Promos/Footer/FlyoutMenu.php:160 +msgid "View Documentation" +msgstr "" + +#: includes/gateways/paypal/admin/settings.php:140 +msgid "Get Help" +msgstr "" + +#. translators: %s: SSL setup article URL +#: includes/gateways/paypal/admin/settings.php:151 +msgid "PayPal requires an SSL certificate to accept payments. You can learn more about obtaining an SSL certificate in our SSL setup article." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:56 +#: includes/gateways/paypal/checkout-actions.php:126 +msgid "Please connect your PayPal account in the gateway settings." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:57 +#: includes/gateways/paypal/checkout-actions.php:127 +msgid "Unexpected authentication error. Please contact a site administrator." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:121 +#: includes/gateways/paypal/exceptions/class-gateway-exception.php:48 +msgid "PayPal Gateway Error" +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:122 +msgid "Account not ready to accept payments." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:153 +#: includes/gateways/paypal/checkout-actions.php:313 +#: includes/gateways/paypal/scripts.php:108 +msgid "An unexpected error occurred. Please try again." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:206 +msgid "PayPal Gateway Warning" +msgstr "" + +#. translators: %s: Original order data sent to PayPal. +#: includes/gateways/paypal/checkout-actions.php:209 +msgid "PayPal could not complete the transaction with the itemized breakdown. Original order data sent: %s" +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:228 +#: includes/gateways/paypal/checkout-actions.php:258 +#: includes/gateways/paypal/checkout-actions.php:425 +msgid "An error occurred while communicating with PayPal. Please try again." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:256 +#: includes/gateways/paypal/checkout-actions.php:423 +msgid "An authentication error occurred. Please try again." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:290 +#: includes/gateways/paypal/checkout-actions.php:298 +#: includes/gateways/paypal/checkout-actions.php:305 +msgid "A validation error occurred. Please try again." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:326 +msgid "Failed to process payment. Please try again." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:335 +msgid "Unable to complete your order with your chosen payment method. Please choose a new funding source." +msgstr "" + +#: includes/gateways/paypal/checkout-actions.php:414 +msgid "Your payment was declined. Please try a new payment method." +msgstr "" + +#: includes/gateways/paypal/class-account-status-validator.php:108 +msgid "Not connected." +msgstr "" + +#: includes/gateways/paypal/class-account-status-validator.php:133 +msgid "Missing merchant details from PayPal. Please reconnect and make sure you click the button to be redirected back to your site." +msgstr "" + +#: includes/gateways/paypal/class-account-status-validator.php:148 +msgid "Webhook not configured. Some actions may not work properly." +msgstr "" + +#: includes/gateways/paypal/class-account-status-validator.php:166 +msgid "Webhook is configured but missing an event. Click \"Sync Webhook\" to correct this." +msgid_plural "Webhook is configured but missing events. Click \"Sync Webhook\" to correct this." +msgstr[0] "" +msgstr[1] "" + +#: includes/gateways/paypal/class-merchant-account.php:146 +msgid "Your account is unable to receive payments. Please contact PayPal customer support." +msgstr "" + +#: includes/gateways/paypal/class-merchant-account.php:152 +msgid "Your PayPal email address needs to be confirmed." +msgstr "" + +#. translators: %s: The ID of the PayPal credential +#: includes/gateways/paypal/class-paypal-api.php:158 +msgid "Missing PayPal credential: %s" +msgstr "" + +#. translators: %d: HTTP response code. +#: includes/gateways/paypal/class-paypal-api.php:223 +msgid "Unexpected response code: %d" +msgstr "" + +#: includes/gateways/paypal/class-token.php:35 +msgid "Invalid token." +msgstr "" + +#: includes/gateways/paypal/deprecated.php:42 +msgid "Refund Transaction in PayPal" +msgstr "" + +#. translators: %s: The error message +#: includes/gateways/paypal/deprecated.php:98 +msgid "Failed to refund transaction in PayPal. Error Message: %s" +msgstr "" + +#. translators: 1: Response code, 2: Response message +#: includes/gateways/paypal/exceptions/class-gateway-exception.php:51 +msgid "Response Code: %1$d; Message: %2$s" +msgstr "" + +#: includes/gateways/paypal/gateway-filters.php:101 +msgid "Merchandise or service not received" +msgstr "" + +#: includes/gateways/paypal/gateway-filters.php:102 +msgid "Merchandise or service not as described" +msgstr "" + +#: includes/gateways/paypal/gateway-filters.php:103 +msgid "Unauthorized" +msgstr "" + +#: includes/gateways/paypal/gateway-filters.php:104 +msgid "Item not received" +msgstr "" + +#: includes/gateways/paypal/gateway-filters.php:105 +msgid "Unauthorized transaction" +msgstr "" + +#: includes/gateways/paypal/gateway-filters.php:106 +msgid "Buyer complaint" +msgstr "" + +#: includes/gateways/paypal/refunds.php:55 +msgid "This order is currently on hold. You can create the refund transaction in EDD; PayPal may have already issued a refund." +msgstr "" + +#. translators: 1: Refund ID, 2: Error message +#: includes/gateways/paypal/refunds.php:119 +msgid "Failure when processing PayPal refund #%1$d: %2$s" +msgstr "" + +#: includes/gateways/paypal/refunds.php:161 +msgid "Missing transaction ID." +msgstr "" + +#. translators: 1: Response code, 2: Response message +#: includes/gateways/paypal/refunds.php:187 +msgid "Unexpected response code: %1$d. Response: %2$s" +msgstr "" + +#. translators: %s: API response from PayPal +#: includes/gateways/paypal/refunds.php:196 +msgid "Missing or unexpected refund status. Response: %s" +msgstr "" + +#. translators: 1: amount refunded; 2: transaction ID. +#: includes/gateways/paypal/refunds.php:209 +msgid "%1$s refunded in PayPal. Refund transaction ID: %2$s" +msgstr "" + +#. translators: %s: ID of the refund in PayPal +#: includes/gateways/paypal/refunds.php:216 +msgid "Successfully refunded in PayPal. Refund transaction ID: %s" +msgstr "" + +#: includes/gateways/paypal/webhooks/functions.php:87 +msgid "An SSL certificate is required to create a PayPal webhook." +msgstr "" + +#. translators: %d: HTTP response code; %s - Full response from the API. +#: includes/gateways/paypal/webhooks/functions.php:132 +msgid "Invalid response code %1$d while creating webhook. Response: %2$s" +msgstr "" + +#: includes/gateways/paypal/webhooks/functions.php:140 +msgid "Unexpected response from PayPal." +msgstr "" + +#: includes/gateways/paypal/webhooks/functions.php:170 +msgid "Webhook not configured." +msgstr "" + +#. translators: %d: HTTP response code; %s - Full response from the API. +#: includes/gateways/paypal/webhooks/functions.php:201 +msgid "Invalid response code %1$d while syncing webhook. Response: %2$s" +msgstr "" + +#: includes/gateways/paypal/webhooks/functions.php:252 +msgid "Your store is currently not receiving webhook notifications, create the webhooks to reconnect." +msgstr "" + +#. translators: %d: HTTP response code. +#: includes/gateways/paypal/webhooks/functions.php:258 +msgid "Invalid response code %d while retrieving webhook details." +msgstr "" + +#: includes/gateways/paypal/webhooks/functions.php:266 +msgid "Unexpected response from PayPal when retrieving webhook details." +msgstr "" + +#. translators: %d: HTTP response code. +#: includes/gateways/paypal/webhooks/functions.php:303 +msgid "Invalid response code %d while deleting webhook." +msgstr "" + +#. translators: %1$s Stripe Connect error message. %2$s Retry URL. +#: includes/gateways/stripe/includes/admin/admin-actions.php:13 +msgid "There was an error connecting your Stripe account. Message: %1$s. Please try again." +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-actions.php:42 +msgid "Used Existing Card:" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-actions.php:114 +msgid "Refund Charge in Stripe" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-actions.php:119 +msgid "This order is currently on hold. You can create the refund transaction in EDD; Stripe may have already issued a refund." +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:54 +msgid "Bank cannot process" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:55 +msgid "Check returned" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:56 +msgid "Credit not processed" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:57 +msgid "Customer initiated" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:58 +msgid "Debit not authorized" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:59 +msgid "Duplicate" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:60 +msgid "Fraudulent" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:62 +msgid "Incorrect account details" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:63 +msgid "Insufficient funds" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:64 +msgid "Product not received" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:65 +msgid "Product unacceptable" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:66 +msgid "Subscription canceled" +msgstr "" + +#: includes/gateways/stripe/includes/admin/admin-filters.php:67 +msgid "Unrecognized" +msgstr "" + +#: includes/gateways/stripe/includes/admin/class-notices-registry.php:92 +msgid "A message must be specified for each notice." +msgstr "" + +#: includes/gateways/stripe/includes/admin/notices.php:39 +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:687 +#: includes/gateways/stripe/includes/payment-methods/apple-pay.php:20 +msgid "Unable to locate registry" +msgstr "" + +#: includes/gateways/stripe/includes/admin/notices/edd-recurring-requirement.php:18 +msgid "Credit card payments with Stripe are currently disabled." +msgstr "" + +#. translators: %1$s Opening strong tag, do not translate. %2$s Closing strong tag, do not translate. %3$s Opening code tag, do not translate. %4$s Closing code tag, do not translate. +#: includes/gateways/stripe/includes/admin/notices/edd-recurring-requirement.php:26 +msgid "To continue accepting credit card payments with Stripe please update %1$sEasy Digital Downloads - Recurring Payments%2$s to version %3$s2.10%4$s or higher." +msgstr "" + +#: includes/gateways/stripe/includes/admin/notices/edd-stripe-core.php:28 +msgid "Accept credit card payments with Stripe" +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. %3$s Opening anchor tag, do not translate. %4$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/notices/edd-stripe-core.php:34 +msgid "Easy Digital Downloads now lets you accept credit card payments using Stripe, including Apple Pay and Google Pay support. %1$sEnable Stripe%2$s now or %3$slearn more%4$s about the benefits of using Stripe." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:11 +msgid "Stripe" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:38 +msgid "Test Publishable Key" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:39 +msgid "Enter your test publishable key, found in your Stripe Account Settings" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:46 +msgid "Test Secret Key" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:47 +msgid "Enter your test secret key, found in your Stripe Account Settings" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:54 +msgid "Live Publishable Key" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:55 +msgid "Enter your live publishable key, found in your Stripe Account Settings" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:62 +msgid "Live Secret Key" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:63 +msgid "Enter your live secret key, found in your Stripe Account Settings" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:70 +msgid "Billing Address Display" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:71 +msgid "Select how you would like to display the billing address fields on the checkout form.

    Notes:

    If taxes are enabled, this option cannot be changed from \"Full address\".

    If set to \"No address fields\", you must disable \"zip code verification\" in your Stripe account.

    " +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:76 +msgid "Full address" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:77 +msgid "Zip / Postal Code and Country only" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:78 +msgid "No address fields" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:83 +msgid "Statement Descriptors" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:89 +#: includes/gateways/stripe/includes/gateway-actions.php:15 +msgid "Statement Descriptor" +msgstr "" + +#. translators: 1: opening link tag (do not translate), 2: closing link tag (do not translate) +#: includes/gateways/stripe/includes/admin/settings.php:92 +msgid "You can change the description of charges on a customer's bank statement in your %1$sStripe Settings%2$s." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:104 +msgid "Include Purchase Summary" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:105 +msgid "Include the product name(s) purchased in the payment descriptor for card payments. If the product name(s) are too long they will be shortened automatically." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:106 +msgid "Note: This setting does not affect non-card payment methods. Non-card payment methods will always use the Statement Descriptor above." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:112 +msgid "Shortened Descriptor" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:113 +msgid "When including the purchase summary in the payment descriptor for card payments, Stripe will use this shortened description as a prefix to the purchase summary." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:122 +msgid "Additional Settings" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:127 +msgid "Restrict Stripe Assets" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:128 +msgid "Only load Stripe.com hosted assets on pages that specifically utilize Stripe functionality." +msgstr "" + +#. translators: 1: opening link tag, 2: closing link tag +#: includes/gateways/stripe/includes/admin/settings.php:132 +msgid "Stripe advises that their Javascript library be loaded on every page to take advantage of their advanced fraud detection rules. If you are not concerned with this, enable this setting to only load the Javascript when necessary. %1$sLearn more about Stripe's recommended setup.%2$s" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:145 +msgid "Elements Mode" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:146 +msgid "Toggle between using the legacy Card Elements Stripe integration and the new Payment Elements experience." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:149 +msgid "Card Element" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:150 +msgid "Payment Element" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:153 +msgid "Transitioning to Payment Elements" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:154 +msgid "You are seeing this option because your store has been using Card Elements prior to the EDD Stripe 2.9.0 update.

    To ensure that we do not affect your current checkout experience, you can use this setting to toggle between the Card Elements (legacy) and Payment Elements (updated version) to ensure that any customizations or theming you have done still function properly.

    Please be advised, that in a future version of the Stripe extension, we will deprecate the Card Elements, so take this time to update your store!" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:160 +#: includes/gateways/stripe/includes/admin/settings.php:173 +msgid "Prepaid Cards" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:161 +msgid "Allow prepaid cards as valid payment method." +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings.php:176 +msgid "Prepaid card allowance can now be managed in your %1$sStripe Radar Rules%2$s." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:186 +msgid "Split Credit Card Form" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:187 +msgid "Use separate card number, expiration, and CVC fields in payment forms." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:194 +#: includes/gateways/stripe/includes/admin/settings.php:202 +msgid "Show Previously Used Cards" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:195 +msgid "Provides logged in customers with a list of previous used payment methods for faster checkout." +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings.php:205 +msgid "Previously used cards are now managed by %1$sLink by Stripe%2$s, for even better conversions and security." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:223 +msgid "Debugging Settings" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:225 +msgid "The following settings are available while Easy Digital Downloads is in debug mode. They are not designed to be primary settings and should be used only while debugging or when instructed to be used by the Easy Digital Downloads Team." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:226 +msgid "There is no guarantee that these settings will remain available in future versions of Easy Digital Downloads. Easy Digital Downloads Debug Mode should be disabled once changes to these settings have been made." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:233 +msgid "Disable access to Card Elements" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:233 +msgid "Enable access to Card Elements" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:234 +msgid "Access to Legacy Card Elements is Enabled" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:234 +msgid "Access to Legacy Card Elements is Disabled" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:240 +msgid "Toggle Card Elements" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:256 +msgid "Card Elements is the legacy Stripe integration. Easy Digital Downloads has updated to use the more secure and reliable Payment Elements feature of Stripe. This toggle allows sites without access to Card Elements to enable or disable it." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:267 +msgid "You have disabled the \"Test Mode\" option. Once you have saved your changes, please verify your Stripe connection, especially if you have not previously connected in with \"Test Mode\" disabled." +msgstr "" + +#. translators: %1$s PHP version requirement. %2$s Current PHP version. %3$s Opening strong tag, do not translate. %4$s Closing strong tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings.php:378 +#: includes/gateways/stripe/includes/admin/settings.php:451 +msgid "Processing credit cards with Stripe requires PHP version %1$s or higher. It looks like you're using version %2$s, which means you will need to %3$supgrade your version of PHP before acceping credit card payments%4$s." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings.php:396 +#: includes/gateways/stripe/includes/admin/settings.php:466 +msgid "Need help upgrading? Ask your web host!" +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings.php:402 +#: includes/gateways/stripe/includes/admin/settings.php:471 +msgid "Many web hosts can give you instructions on how/where to upgrade your version of PHP through their control panel, or may even be able to do it for you. If you need to change hosts, please see %1$sour hosting recommendations%2$s." +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:126 +msgid "There was an error getting your Stripe credentials. Please %1$stry again%2$s. If you continue to have this problem, please contact support." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:340 +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:631 +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:693 +#: includes/gateways/stripe/includes/admin/site-health.php:94 +msgid "Connect with Stripe" +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:349 +msgid "Have questions about connecting with Stripe? See the %1$sdocumentation%2$s." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:390 +msgid "Manage API keys manually" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:400 +msgid "Hide API keys" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:406 +msgid "Although you can add your API keys manually, we recommend using Stripe Connect: an easier and more secure way of connecting your Stripe account to your website. Stripe Connect prevents issues that can arise when copying and pasting account details from Stripe into your Easy Digital Downloads payment gateway settings. With Stripe Connect you'll be ready to go with just a few clicks." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:424 +msgid "Unable to retrieve account information." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:442 +msgctxt "Stripe Connect mode" +msgid "test" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:443 +msgctxt "Stripe Connect mode" +msgid "live" +msgstr "" + +#. translators: %1$s Stripe payment mode. %2$s Opening anchor tag for reconnecting to Stripe, do not translate. %3$s Opening anchor tag for disconnecting Stripe, do not translate. %4$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:449 +msgid "Your Stripe account is connected in %1$s mode. %2$sReconnect in %1$s mode%4$s, or %3$sdisconnect this account%4$s." +msgstr "" + +#. translators: %1$s Opening bold tag, do not translate. %2$s Closing bold tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:472 +msgid "You are currently connected to a %1$stemporary%2$s Stripe test account, which can only be used for testing purposes. You cannot manage this account in Stripe." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:478 +msgid "Webhooks cannot be configured for recurring purchases with this account." +msgstr "" + +#. translators: %1$s Opening link tag, do not translate. %2$s Closing link tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:486 +msgid "%1$sRegister a Stripe account%2$s for full access." +msgstr "" + +#. translators: 1: Opening anchor tag for disconnecting Stripe, do not translate. 2: Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:493 +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:618 +msgid "%1$sDisconnect this account%2$s." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:565 +msgid "Administrator (Owner)" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:599 +msgid "The API keys provided do not match the Stripe Connect account associated with this installation. If you have manually modified these values after connecting your account, please reconnect below or update your API keys." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:634 +msgid "It is highly recommended to Connect with Stripe for easier setup and improved security." +msgstr "" + +#. translators: %1$s Stripe payment mode. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:647 +msgid "Your manually managed %1$s mode API keys are valid." +msgstr "" + +#. translators: %1$s Stripe payment mode. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:663 +msgid "Your manually managed %1$s mode API keys are invalid." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:703 +#: src/Admin/Onboarding/Steps/PaymentMethods.php:49 +msgid "Start accepting payments with Stripe by connecting your account. Stripe Connect helps ensure easier setup and improved security." +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:714 +msgctxt "gateway test mode status" +msgid "enabled" +msgstr "" + +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:715 +msgctxt "gateway test mode status" +msgid "disabled" +msgstr "" + +#. translators: %s Test mode status. Enabled or disabled. +#: includes/gateways/stripe/includes/admin/settings/stripe-connect.php:724 +msgid "\"Test Mode\" has been %s. Please verify your Stripe connection status." +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:24 +msgid "Stripe Connect" +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:41 +msgid "You are securely connected to Stripe" +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:44 +msgid "Easy Digital Downloads: Stripe" +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:49 +msgid "Stripe Connect helps ensure easy setup and security." +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:62 +msgid "You are using the legacy Card Elements fields" +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:67 +msgid "Increase conversions, security, and reliability by using the Payment Elements integration for Stripe." +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:80 +msgid "Switch to Payment Elements" +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:84 +msgid "You are using manually managed Stripe API keys" +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:89 +msgid "By securely connecting your Easy Digital Downloads store with Stripe Connect, you'll get access to more reliable payments and use managed API keys which are more secure." +msgstr "" + +#: includes/gateways/stripe/includes/admin/site-health.php:115 +msgid "Easy Digital Downloads — Stripe" +msgstr "" + +#. translators: %s Upgrade link. +#: includes/gateways/stripe/includes/admin/upgrade-functions.php:62 +msgid "Easy Digital Downloads - Stripe Gateway needs to upgrade the customers database; click here to start the upgrade. Learn more about this upgrade" +msgstr "" + +#: includes/gateways/stripe/includes/admin/upgrade-functions.php:65 +msgid "About this upgrade:
    This upgrade will improve the reliability of associating purchase records with your existing customer records in Stripe by changing their Stripe Customer IDs to be stored locally on their EDD customer record, instead of their user record." +msgstr "" + +#: includes/gateways/stripe/includes/admin/upgrade-functions.php:67 +msgid "Advanced User?
    This upgrade can also be run via WPCLI with the following command:
    wp edd-stripe migrate_customer_ids" +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:22 +#: includes/gateways/stripe/includes/card-actions.php:141 +#: includes/gateways/stripe/includes/card-actions.php:208 +#: includes/gateways/stripe/includes/card-actions.php:258 +#: includes/gateways/stripe/includes/card-actions.php:311 +msgid "This feature is not available at this time." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:33 +#: includes/gateways/stripe/includes/card-actions.php:42 +#: includes/gateways/stripe/includes/card-actions.php:50 +#: includes/gateways/stripe/includes/card-actions.php:152 +#: includes/gateways/stripe/includes/card-actions.php:161 +#: includes/gateways/stripe/includes/card-actions.php:172 +#: includes/gateways/stripe/includes/card-actions.php:219 +#: includes/gateways/stripe/includes/card-actions.php:228 +#: includes/gateways/stripe/includes/card-actions.php:239 +msgid "Error updating card." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:115 +msgid "Card successfully updated." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:182 +msgid "Card successfully set as default." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:285 +msgid "Card successfully removed." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:322 +msgid "Unable to update your account at this time, please try again later" +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:333 +msgid "Missing card ID." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:342 +msgid "Error adding card." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:351 +msgid "Unable to retrieve customer." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:378 +msgid "Unable to create customer in Stripe." +msgstr "" + +#: includes/gateways/stripe/includes/card-actions.php:406 +msgid "Card successfully added." +msgstr "" + +#: includes/gateways/stripe/includes/class-edd-stripe-rate-limiting.php:413 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:42 +#: includes/gateways/stripe/includes/template-functions.php:24 +msgid "We are unable to process your payment at this time, please try again later or contact support." +msgstr "" + +#: includes/gateways/stripe/includes/class-edd-stripe.php:231 +#: includes/gateways/stripe/includes/template-functions.php:175 +msgid "Credit Card" +msgstr "" + +#: includes/gateways/stripe/includes/class-stripe-api.php:51 +msgid "Unable to process request: Unmet Stripe payment gateway requirements. Please contact the website administrator." +msgstr "" + +#. translators: %1$s Stripe API class name. %2$s Stripe API method name. +#: includes/gateways/stripe/includes/class-stripe-api.php:69 +msgid "Unable to call %1$s::%2$s" +msgstr "" + +#: includes/gateways/stripe/includes/compat.php:122 +#: includes/process-purchase.php:44 +msgid "Missing nonce when processing checkout. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4" +msgstr "" + +#: includes/gateways/stripe/includes/compat.php:127 +#: includes/gateways/stripe/includes/compat.php:150 +#: includes/gateways/stripe/includes/compat.php:212 +#: includes/process-purchase.php:51 +msgid "Error processing purchase. Please reload the page and try again." +msgstr "" + +#: includes/gateways/stripe/includes/deprecated.php:375 +#: includes/process-purchase.php:595 +#: includes/process-purchase.php:975 +msgid "The user information is invalid" +msgstr "" + +#: includes/gateways/stripe/includes/emails.php:29 +msgid "Your Preapproved Payment Requires Action" +msgstr "" + +#: includes/gateways/stripe/includes/emails.php:30 +msgid "Payment Requires Action" +msgstr "" + +#: includes/gateways/stripe/includes/emails.php:32 +msgid "Dear {name}," +msgstr "" + +#: includes/gateways/stripe/includes/emails.php:33 +msgid "Your preapproved payment requires further action before your purchase can be completed. Please click the link below to take finalize your purchase" +msgstr "" + +#: includes/gateways/stripe/includes/functions.php:594 +msgid "Invalid order ID." +msgstr "" + +#. translators: %1$s the amount refunded; %2$s Stripe Refund ID +#: includes/gateways/stripe/includes/functions.php:664 +msgid "%1$s refunded in Stripe. Refund ID %2$s" +msgstr "" + +#: includes/gateways/stripe/includes/gateway-actions.php:13 +msgid "Outputs a line stating what charges will appear as on customer's credit card statements." +msgstr "" + +#. translators: %s: statement descriptor +#: includes/gateways/stripe/includes/gateway-actions.php:36 +msgid "Charges will appear on your card statement as %s" +msgstr "" + +#: includes/gateways/stripe/includes/gateway-filters.php:60 +msgid "Please enter a name for the credit card." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:24 +msgid "There was an error processing your payment. Please try with a different payment method." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:25 +msgid "There was an error processing your payment. Please contact your card issuer for more information." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:28 +msgid "Payment processing cancelled; your order is not yet complete." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:29 +msgid "The card number is not a valid credit card number." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:30 +msgid "The card's expiration month is invalid." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:31 +msgid "The card's expiration year is invalid." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:32 +msgid "The card's security code is invalid." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:33 +msgid "The card number you provided is incorrect. Please check the number and try again." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:34 +msgid "The card number is incomplete." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:35 +msgid "The card's security code is incomplete." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:36 +msgid "The card's expiration date is incomplete." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:37 +msgid "The card's security code is incorrect." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:38 +msgid "The card's zip code failed validation." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:39 +msgid "The card's expiration year is in the past." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:40 +msgid "An error occurred while processing the card. Please try again." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:41 +msgid "Invalid email address, please correct and try again." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:42 +msgid "Your purchase may require additional authentication. Please try again and confirm any authentication requests." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:43 +msgid "There was an error processing your payment. Please try again, and if you continue to have problems, contact your card issuer." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:44 +msgid "Your payment method is not authorized to make purchases in this currency. Please contact your card issuer." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:45 +msgid "The payment method you have provided is expired. Please try a different payment method." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:46 +msgid "There was an error processing your payment. Please try again." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:132 +msgid "Subscriptions and non-subscriptions may not be purchased at the same time. Please purchase each separately." +msgstr "" + +#: includes/gateways/stripe/includes/i18n.php:138 +msgid "Subscriptions must be purchased individually. Please update your cart to only contain a single subscription." +msgstr "" + +#: includes/gateways/stripe/includes/integrations/wp-cli.php:49 +msgid "The Stripe customer ID migration has already been run. To do this anyway, use the --force argument." +msgstr "" + +#: includes/gateways/stripe/includes/integrations/wp-cli.php:86 +msgid "Migration complete." +msgstr "" + +#: includes/gateways/stripe/includes/integrations/wp-cli.php:88 +msgid "No user records were found that needed to be migrated." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:63 +msgid "Unable to locate payment method. Please try again with a new payment method." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:81 +msgid "Prepaid cards are not a valid payment method. Please try again with a new payment method." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:99 +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:131 +msgid "Unable to create customer. Please try again." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:222 +msgid "Charges are no longer directly created in Stripe. Please read the following for more information: https://easydigitaldownloads.com/development/" +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:371 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:396 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:417 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:499 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:587 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:677 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:770 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:990 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:1133 +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:757 +msgid "Stripe Error" +msgstr "" + +#. translators: %s: Error message +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:374 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:399 +msgid "There was an error while processing a Stripe payment. Payment data: %s" +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:463 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:473 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:538 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:548 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:625 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:636 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:715 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:725 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:809 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:820 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:832 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:843 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:860 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:891 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:1028 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:1039 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:1049 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:1068 +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:1118 +msgid "An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/card-elements-actions.php:975 +msgid "Unable to create payment." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/functions.php:94 +msgid "Charge not refunded in Stripe, as checkbox was not selected." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:69 +msgid "Error 1008: An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:354 +msgid "Stripe Error 002" +msgstr "" + +#. translators: %s: Error message +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:357 +msgid "There was an error while processing a Stripe payment. Order data: %s" +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:375 +msgid "Stripe Error 003" +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:414 +msgid "Error 1001: An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:425 +msgid "Error 1002: An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:437 +msgid "Error 1003: An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:448 +msgid "Error 1004: An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:465 +msgid "Error 1005: An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:505 +msgid "Error 1006: An error occurred, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php:733 +msgid "Error 1007: An error occurred completing the order, but your payment may have gone through. Please contact the site administrator." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/apple-pay.php:26 +msgid "Apple Pay domain verification error." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/apple-pay.php:172 +msgid "Unable to create domain association folder in domain root." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/apple-pay.php:179 +msgid "Unable to copy domain association file to domain .well-known directory." +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/payment-methods/apple-pay.php:281 +msgid "Please %1$smanually add your domain%2$s %3$s to use Apple Pay." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/buy-now/ajax.php:19 +#: includes/gateways/stripe/includes/payment-methods/buy-now/ajax.php:26 +msgid "Unable to add item to cart." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/buy-now/checkout.php:81 +#: includes/gateways/stripe/includes/payment-methods/payment-request/checkout.php:274 +#: includes/process-purchase.php:497 +msgid "Please enter a valid email address" +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:37 +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:46 +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:95 +msgid "Apple Pay/Google Pay" +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. %3$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:51 +msgid "\"Express Checkout\" via Apple Pay, Google Pay, or Microsoft Pay digital wallets. By using Apple Pay, you agree to %1$sStripe%3$s and %2$sApple's%3$s terms of service." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:57 +msgid "Apple Pay is not available in Test Mode." +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:59 +msgid "See our %1$sdocumentation%2$s for more information." +msgstr "" + +#. translators: %s Download noun +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:80 +msgid "Single %s" +msgstr "" + +#. translators: 1: Download singular label, 2: shortcode tag wrapped in span +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:85 +msgid "%1$s Archive (includes %2$s shortcode)" +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:96 +msgid "Apple Pay and Google Pay support is now provided via the Payment Elements integration." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:126 +msgid "This feature is not available when taxes are enabled." +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/gateways/stripe/includes/payment-methods/payment-request/admin/settings.php:134 +msgid "See the %1$sExpress Checkout documentation%2$s for more information." +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/payment-request/checkout.php:73 +msgid "Express Checkout (Apple Pay/Google Pay)" +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/payment-request/checkout.php:74 +msgid "Express Checkout" +msgstr "" + +#. translators: %d: Quantity. +#: includes/gateways/stripe/includes/payment-methods/payment-request/functions.php:165 +#: includes/gateways/stripe/includes/payment-methods/payment-request/functions.php:222 +msgid " × %d" +msgstr "" + +#: includes/gateways/stripe/includes/payment-methods/payment-request/template.php:200 +msgctxt "payment request button divider" +msgid "or" +msgstr "" + +#: includes/gateways/stripe/includes/scripts.php:90 +msgid "Stripe publishable key missing. Please enter your publishable key in Settings." +msgstr "" + +#: includes/gateways/stripe/includes/scripts.php:91 +msgid "Please fill out all required fields to continue your purchase." +msgstr "" + +#: includes/gateways/stripe/includes/scripts.php:92 +msgid "Please agree to the terms to complete your purchase." +msgstr "" + +#: includes/gateways/stripe/includes/scripts.php:93 +msgid "Please agree to the privacy policy to complete your purchase." +msgstr "" + +#: includes/gateways/stripe/includes/scripts.php:94 +msgid "Unable to complete your request. Please try again." +msgstr "" + +#: includes/gateways/stripe/includes/scripts.php:99 +msgid "Please wait..." +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:41 +msgid "Payment Info" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:100 +msgid "Adding new payment methods is currently unavailable." +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:173 +msgid "Credit Card Number" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:199 +msgid "Expiration" +msgstr "" + +#. translators: %1$s Card type. %2$s Card last 4. +#: includes/gateways/stripe/includes/template-functions.php:289 +msgid "Update card billing address for %1$s •••• %2$s" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:317 +msgid "We are unable to process your payment at this time, please try again later or contacts support." +msgstr "" + +#. translators: %1$s Card type. %2$s Card last 4. +#: includes/gateways/stripe/includes/template-functions.php:352 +#: includes/gateways/stripe/includes/template-functions.php:441 +msgid "%1$s •••• %2$s" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:389 +#: includes/gateways/stripe/includes/template-functions.php:665 +msgid "Add New Card" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:418 +msgid "Payment method management is currently unavailable." +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:431 +msgid "Manage Payment Methods" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:460 +msgid "Expires" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:482 +msgid "Set as Default" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:500 +#: includes/gateways/stripe/includes/template-functions.php:807 +msgid "Billing Details" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:550 +msgid "ZIP Code" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:646 +#: includes/gateways/stripe/includes/template-functions.php:690 +msgid "Please Wait…" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:647 +#: includes/gateways/stripe/includes/template-functions.php:648 +msgid "Update Card" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:667 +msgid "Credit Card Details" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:691 +#: includes/gateways/stripe/includes/template-functions.php:692 +msgid "Add new card" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:810 +msgid "Billing Country" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:834 +msgid "Billing Zip / Postal Code" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:906 +#: includes/process-purchase.php:513 +msgid "Please enter your zip / postal code" +msgstr "" + +#: includes/gateways/stripe/includes/template-functions.php:911 +#: includes/process-purchase.php:525 +msgid "Please select your billing country" +msgstr "" + +#. translators: %s: The country name. +#: includes/gateways/stripe/includes/utils/regional-support/class-edd-stripe-region-base.php:111 +msgid "Based on your store's base country of %s, it is recommended to set your Billing Address Display to use the \"Full Address\" option to ensure payments are completed successfully." +msgstr "" + +#: includes/install.php:290 +msgid "Purchase Confirmation" +msgstr "" + +#: includes/install.php:295 +msgid "Your transaction failed; please try again or contact site support." +msgstr "" + +#: includes/install.php:298 +msgid "Purchase History" +msgstr "" + +#. translators: 1: function, 2: version, 3: replacement +#: includes/misc-functions.php:514 +msgctxt "deprecated function error logging with replacement function" +msgid "%1$s is deprecated since Easy Digital Downloads version %2$s! Use %3$s instead." +msgstr "" + +#. translators: 1: function, 2: version +#: includes/misc-functions.php:523 +msgctxt "deprecated function error logging with no replacement" +msgid "%1$s is deprecated since Easy Digital Downloads version %2$s with no alternative available." +msgstr "" + +#. translators: 1: argument, 2: function, 3: version, 4: replacement +#: includes/misc-functions.php:562 +msgctxt "deprecated function argument error logging with replacement" +msgid "The %1$s argument of %2$s is deprecated since Easy Digital Downloads version %3$s! Please use %4$s instead." +msgstr "" + +#. translators: 1: argument, 2: function, 3: version +#: includes/misc-functions.php:571 +msgctxt "deprecated function argument error logging with no replacement" +msgid "The %1$s argument of %2$s is deprecated since Easy Digital Downloads version %3$s with no alternative available." +msgstr "" + +#. translators: 1: PHP file name, 2: EDD version number, 3: alternative file name +#: includes/misc-functions.php:627 +msgid "%1$s is deprecated since Easy Digital Downloads version %2$s! Use %3$s instead." +msgstr "" + +#. translators: 1: PHP file name, 2: EDD version number +#: includes/misc-functions.php:630 +msgid "%1$s is deprecated since Easy Digital Downloads version %2$s with no alternative available." +msgstr "" + +#. translators: 1: PHP file name, 2: EDD version number +#: includes/misc-functions.php:658 +msgid "Code within %1$s is deprecated since Easy Digital Downloads version %2$s. See message for further details." +msgstr "" + +#. translators: 1: PHP file name, 2: EDD version number +#: includes/misc-functions.php:700 +msgid "The class %1$s is deprecated since Easy Digital Downloads version %2$s. See message for further details." +msgstr "" + +#. translators: 1: PHP file name, 2: EDD version number, 3: alternative hook name +#: includes/misc-functions.php:828 +msgid "The %1$s hook is deprecated since Easy Digital Downloads version %2$s! Use the %3$s hook instead." +msgstr "" + +#. translators: 1: PHP file name, 2: EDD version number +#: includes/misc-functions.php:831 +msgid "The %1$s hook is deprecated since Easy Digital Downloads version %2$s with no alternative available." +msgstr "" + +#: includes/misc-functions.php:1313 +msgid "Store Bot" +msgstr "" + +#: includes/misc-functions.php:1533 +msgid "Verified" +msgstr "" + +#: includes/misc-functions.php:1534 +msgid "Spam" +msgstr "" + +#: includes/misc-functions.php:1535 +msgid "Deleted" +msgstr "" + +#: includes/misc-functions.php:1536 +msgid "Cancelled" +msgstr "" + +#: includes/misc-functions.php:1650 +msgid "Please define default parameters in the form of an array." +msgstr "" + +#: includes/misc-functions.php:1655 +msgid "Please define an SVG icon filename." +msgstr "" + +#: includes/orders/functions/orders.php:737 +msgid "Payment recovery processed" +msgstr "" + +#: includes/orders/functions/refunds.php:204 +msgid "Invalid order." +msgstr "" + +#: includes/orders/functions/refunds.php:208 +msgid "Order not refundable." +msgstr "" + +#: includes/orders/functions/refunds.php:222 +msgid "Refund not allowed on this order." +msgstr "" + +#: includes/orders/functions/refunds.php:233 +msgid "Invalid argument. Please check your amounts and try again." +msgstr "" + +#: includes/orders/functions/types.php:84 +#: includes/orders/functions/ui.php:36 +#: src/Emails/Templates/Registry.php:113 +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/downloads/edit.js:72 +#: includes/blocks/src/terms/edit.js:62 +msgid "Order" +msgstr "" + +#: includes/orders/functions/types.php:92 +#: src/Emails/Templates/Registry.php:114 +msgid "Refund" +msgstr "" + +#: includes/orders/functions/types.php:101 +msgid "Invoice" +msgstr "" + +#: includes/orders/functions/types.php:102 +#: src/Admin/Settings/Invoices.php:110 +msgid "Invoices" +msgstr "" + +#: includes/payments/actions.php:258 +#: includes/payments/actions.php:319 +msgid "Error resuming payment." +msgstr "" + +#: includes/payments/actions.php:262 +msgid "Payment recovery triggered URL" +msgstr "" + +#: includes/payments/actions.php:340 +#: includes/payments/actions.php:374 +msgid "To complete this payment, please login to your account." +msgstr "" + +#: includes/payments/actions.php:342 +#: src/Emails/Templates/PasswordReset.php:133 +msgid "Lost Password" +msgstr "" + +#: includes/payments/class-edd-payment.php:1872 +msgid "Array key \"post_status\" is no longer a supported attribute for the \"edd_update_payment_status_fields\" filter. Please use \"status\" instead." +msgstr "" + +#: includes/payments/class-edd-payment.php:2817 +msgid "The refund order could not be created, but the order status was manually set to Refunded." +msgstr "" + +#: includes/payments/functions.php:538 +msgid "Processing" +msgstr "" + +#: includes/payments/functions.php:541 +msgid "Partially Refunded" +msgstr "" + +#: includes/payments/functions.php:1936 +msgid "A store migration is in progress. Past orders will not appear in your purchase history until they have been updated." +msgstr "" + +#: includes/plugin-compatibility.php:73 +msgid "No Caching on Checkout?" +msgstr "" + +#: includes/plugin-compatibility.php:74 +msgid "Check this box in order to append a ?nocache parameter to the checkout URL to prevent caching plugins from caching the page." +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:48 +msgctxt "Text for adding a new Download/Product" +msgid "Add New %s" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:50 +msgctxt "Text for editing an existing Download/Product" +msgid "Edit %s" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:52 +msgctxt "Text for adding a new Download/Product" +msgid "New %s" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:55 +msgctxt "Text for viewing an existing Download/Product" +msgid "View %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/post-types.php:57 +msgctxt "Verb: Text hinting the user to search for Downloads/Products" +msgid "Search %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: includes/post-types.php:59 +msgctxt "Context: When no search results are found for Downloads/Products" +msgid "No %s found" +msgstr "" + +#. translators: %s: Download plural label +#: includes/post-types.php:61 +msgctxt "Context: When no Downloads/Products are found in the trash" +msgid "No %s found in Trash" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:65 +msgctxt "Context: Label for the featured images for a Download/Product" +msgid "%s Image" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:67 +msgctxt "Context: Text to set the featured image for a Download/Product" +msgid "Set %s Image" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:69 +msgctxt "Context: Text to remove the feature image for a Download/Product" +msgid "Remove %s Image" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:71 +msgctxt "Context: Text to use an image as the featured image for a Download/Produt" +msgid "Use as %s Image" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:73 +msgctxt "Context: Label for listing the attributes of a Download/Product" +msgid "%s Attributes" +msgstr "" + +#. translators: %s: Download plural label +#: includes/post-types.php:75 +msgctxt "Context: Label for filtering the Downloads/Products list" +msgid "Filter %s list" +msgstr "" + +#. translators: %s: Download plural label +#: includes/post-types.php:77 +msgctxt "Context: Label for the Downloads/Products list navigation" +msgid "%s list navigation" +msgstr "" + +#. translators: %s: Download plural label +#: includes/post-types.php:79 +msgctxt "Context: Lable for the Downloads/Products list" +msgid "%s list" +msgstr "" + +#: includes/post-types.php:127 +msgid "Download" +msgstr "" + +#: includes/post-types.php:128 +#: src/Admin/Menu/Header.php:142 +msgid "Downloads" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:179 +#: includes/post-types.php:188 +msgid "Enter %s name here" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:208 +msgctxt "taxonomy general name" +msgid "%s Categories" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:210 +msgctxt "taxonomy singular name" +msgid "%s Category" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:212 +msgid "Search %s Categories" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:214 +msgid "All %s Categories" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:216 +msgid "Parent %s Category" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:218 +msgid "Parent %s Category:" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:220 +msgid "Edit %s Category" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:222 +msgid "Update %s Category" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:224 +msgid "Add New %s Category" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:226 +msgid "New %s Category Name" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:260 +msgctxt "taxonomy general name" +msgid "%s Tags" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:262 +msgctxt "taxonomy singular name" +msgid "%s Tag" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:264 +msgctxt "singular: Download singular label" +msgid "Search %s Tags" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:266 +msgid "All %s Tags" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:268 +msgid "Parent %s Tag" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:270 +msgid "Parent %s Tag:" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:272 +msgid "Edit %s Tag" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:274 +msgid "Update %s Tag" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:276 +msgid "Add New %s Tag" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:278 +msgid "New %s Tag Name" +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:282 +msgid "Choose from most used %s tags" +msgstr "" + +#. translators: 1: Download singular label, 2: Opening anchor tag (do not translate), 3: Closing anchor tag (do not translate) +#: includes/post-types.php:385 +#: includes/post-types.php:387 +msgid "%1$s updated. %2$sView %1$s%3$s." +msgstr "" + +#. translators: 1: Download singular label, 2: Opening anchor tag (do not translate), 3: Closing anchor tag (do not translate) +#: includes/post-types.php:389 +msgid "%1$s published. %2$sView %1$s%3$s." +msgstr "" + +#. translators: 1: Download singular label, 2: Opening anchor tag (do not translate), 3: Closing anchor tag (do not translate) +#: includes/post-types.php:391 +msgid "%1$s saved. %2$sView %1$s%3$s." +msgstr "" + +#. translators: 1: Download singular label, 2: Opening anchor tag (do not translate), 3: Closing anchor tag (do not translate) +#: includes/post-types.php:393 +msgid "%1$s submitted. %2$sView %1$s%3$s." +msgstr "" + +#. translators: 1: Number of downloads updated, 2: Downloads plural label +#: includes/post-types.php:418 +msgctxt "Context: Admin notice for multiple Downloads/Products updated in bulk" +msgid "%1$d %2$s updated." +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:420 +msgctxt "Context: Admin notice for one Downloads/Products updated in bulk" +msgid "1 %s updated." +msgstr "" + +#. translators: 1: Number of downloads locked, 2: Downloads plural label +#: includes/post-types.php:423 +msgctxt "Context: Admin notice for multiple Downloads/Products not updated in bulk because they are being edited" +msgid "%1$d %2$s not updated, somebody is editing them." +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:425 +msgctxt "Context: Admin notice for one Downloads/Products not updated in bulk because it is being edited" +msgid "1 %s not updated, somebody is editing it." +msgstr "" + +#. translators: 1: Number of downloads deleted, 2: Downloads plural label +#: includes/post-types.php:428 +msgctxt "Context: Admin notice for multiple Downloads/Products permanently deleted" +msgid "%1$d %2$s permanently deleted." +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:430 +msgctxt "Context: Admin notice for one Downloads/Products permanently deleted" +msgid "1 %s permanently deleted." +msgstr "" + +#. translators: 1: Number of downloads moved to the Trash, 2: Downloads plural label +#: includes/post-types.php:433 +msgctxt "Context: Admin notice for multiple Downloads/Products moved to the Trash" +msgid "%1$d %2$s moved to the Trash." +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:435 +msgctxt "Context: Admin notice for one Downloads/Products moved to the Trash" +msgid "1 %s moved to the Trash." +msgstr "" + +#. translators: 1: Number of downloads restored from the Trash, 2: Downloads plural label +#: includes/post-types.php:438 +msgctxt "Context: Admin notice for multiple Downloads/Products restored from the Trash" +msgid "%1$d %2$s restored from the Trash." +msgstr "" + +#. translators: %s: Download singular label +#: includes/post-types.php:440 +msgctxt "Context: Admin notice for one Downloads/Products restored from the Trash" +msgid "1 %s restored from the Trash." +msgstr "" + +#: includes/post-types.php:477 +msgid "Checkout Page" +msgstr "" + +#: includes/post-types.php:481 +#: src/Admin/Settings/Tabs/General.php:135 +msgid "Success Page" +msgstr "" + +#: includes/post-types.php:485 +#: src/Admin/Settings/Tabs/General.php:144 +msgid "Failed Transaction Page" +msgstr "" + +#: includes/post-types.php:489 +#: src/Admin/Settings/Tabs/General.php:153 +msgid "Purchase History Page" +msgstr "" + +#: includes/post-types.php:493 +#: src/Admin/Settings/Tabs/General.php:162 +msgid "Login Redirect Page" +msgstr "" + +#: includes/privacy-functions.php:27 +msgid "" +"\n" +"We collect information about you during the checkout process on our store. This information may include, but is not limited to, your name, billing address, shipping address, email address, phone number, credit card/payment details and any other details that might be requested from you for the purpose of processing your orders.\n" +"Handling this data also allows us to:\n" +"- Send you important account/order/service information.\n" +"- Respond to your queries, refund requests, or complaints.\n" +"- Process payments and to prevent fraudulent transactions. We do this on the basis of our legitimate business interests.\n" +"- Set up and administer your account, provide technical and/or customer support, and to verify your identity.\n" +"" +msgstr "" + +#: includes/privacy-functions.php:39 +msgid "Location and traffic data (including IP address and browser type) if you place an order, or if we need to estimate taxes and shipping costs based on your location." +msgstr "" + +#: includes/privacy-functions.php:40 +msgid "Product pages visited and content viewed while your session is active." +msgstr "" + +#: includes/privacy-functions.php:41 +msgid "Your comments and product reviews if you choose to leave them on our website." +msgstr "" + +#: includes/privacy-functions.php:42 +msgid "Account email/password to allow you to access your account, if you have one." +msgstr "" + +#: includes/privacy-functions.php:43 +msgid "If you choose to create an account with us, your name, address, and email address, which will be used to populate the checkout for future orders." +msgstr "" + +#: includes/privacy-functions.php:48 +msgid "Additionally we may also collect the following information:" +msgstr "" + +#. translators: %d is the customer ID. +#: includes/privacy-functions.php:255 +msgid "No customer with ID %d" +msgstr "" + +#: includes/privacy-functions.php:307 +msgid "Customer could not be anonymized due to payments that could not be anonymized or deleted." +msgstr "" + +#: includes/privacy-functions.php:352 +msgid "Anonymized Customer" +msgstr "" + +#: includes/privacy-functions.php:373 +msgid "Customer anonymized successfully" +msgstr "" + +#. translators: %d is the customer ID. +#: includes/privacy-functions.php:378 +msgid "Customer ID %d successfully anonymized." +msgstr "" + +#. translators: %d is the order ID. +#: includes/privacy-functions.php:403 +msgid "No order with ID %d." +msgstr "" + +#. translators: %d is the order status. +#: includes/privacy-functions.php:441 +msgid "Order not modified, due to status: %s." +msgstr "" + +#. translators: %1$d is the order ID, %2$s is the order status. +#: includes/privacy-functions.php:451 +msgid "Order %1$d with status %2$s deleted." +msgstr "" + +#. translators: %d is the order ID. +#: includes/privacy-functions.php:490 +msgid "Order ID %d successfully anonymized." +msgstr "" + +#: includes/privacy-functions.php:580 +#: includes/privacy-functions.php:627 +#: includes/privacy-functions.php:1198 +msgid "Customer Record" +msgstr "" + +#: includes/privacy-functions.php:585 +msgid "Billing Information" +msgstr "" + +#: includes/privacy-functions.php:596 +#: includes/privacy-functions.php:1017 +#: includes/privacy-functions.php:1213 +msgid "API Access Logs" +msgstr "" + +#: includes/privacy-functions.php:635 +msgid "Primary Email" +msgstr "" + +#: includes/privacy-functions.php:647 +msgid "All Email Addresses" +msgstr "" + +#: includes/privacy-functions.php:657 +msgid "Agreed to Terms" +msgstr "" + +#: includes/privacy-functions.php:667 +msgid "Agreed to Privacy Policy" +msgstr "" + +#: includes/privacy-functions.php:796 +msgid "Order ID / Number" +msgstr "" + +#: includes/privacy-functions.php:800 +msgid "Order Date" +msgstr "" + +#: includes/privacy-functions.php:804 +msgid "Order Completed Date" +msgstr "" + +#: includes/privacy-functions.php:810 +msgid "Order Total" +msgstr "" + +#: includes/privacy-functions.php:814 +msgid "Order Items" +msgstr "" + +#: includes/privacy-functions.php:905 +msgid "Date of Download" +msgstr "" + +#: includes/privacy-functions.php:909 +msgid "Product Downloaded" +msgstr "" + +#: includes/privacy-functions.php:939 +#: includes/privacy-functions.php:1208 +msgid "File Download Logs" +msgstr "" + +#: includes/privacy-functions.php:995 +msgid "Request" +msgstr "" + +#: includes/privacy-functions.php:1082 +msgid "Possibly Delete Customer" +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1150 +msgid "Customer for %s not deleted, due to remaining payments." +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1165 +msgid "Customer for %s successfully deleted." +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1177 +msgid "Customer for %s failed to be deleted." +msgstr "" + +#: includes/privacy-functions.php:1203 +msgid "Order Record" +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1248 +msgid "Customer for %s has been anonymized." +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1273 +msgid "No orders found for %s." +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1275 +msgid "All eligible orders anonymized or deleted for %s." +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1337 +msgid "All eligible file download logs anonymized or deleted for %s." +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1387 +msgid "No User found for %s, no access logs to remove." +msgstr "" + +#. translators: %s: email address +#: includes/privacy-functions.php:1405 +msgid "All API access logs deleted for %s." +msgstr "" + +#: includes/process-download.php:146 +msgid "Error 104: Sorry, this file could not be downloaded." +msgstr "" + +#: includes/process-download.php:146 +#: includes/process-download.php:193 +msgid "Error Downloading File" +msgstr "" + +#: includes/process-download.php:159 +msgid "Error 103: Error downloading file. Please contact support." +msgstr "" + +#: includes/process-download.php:159 +msgid "File download error" +msgstr "" + +#: includes/process-download.php:193 +msgid "Sorry, this file could not be downloaded." +msgstr "" + +#: includes/process-download.php:306 +msgid "You do not have permission to download this file" +msgstr "" + +#: includes/process-download.php:307 +msgid "Purchase Verification Failed" +msgstr "" + +#: includes/process-download.php:1102 +msgid "Invalid file" +msgstr "" + +#: includes/process-download.php:1109 +msgid "The requested file could not be found. Error 404." +msgstr "" + +#: includes/process-download.php:1110 +msgid "File not found" +msgstr "" + +#: includes/process-purchase.php:31 +#: src/Assets/Localization.php:61 +msgid "Your cart is empty" +msgstr "" + +#. translators: %s: email address +#: includes/process-purchase.php:249 +msgid "The email address %s is already in use." +msgstr "" + +#: includes/process-purchase.php:267 +msgid "Missing nonce when processing login during checkout. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/09/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4" +msgstr "" + +#: includes/process-purchase.php:273 +msgid "Error processing login. Nonce failed." +msgstr "" + +#: includes/process-purchase.php:392 +msgid "The selected payment gateway is not enabled" +msgstr "" + +#: includes/process-purchase.php:449 +msgid "One or more of the discounts you entered is invalid" +msgstr "" + +#: includes/process-purchase.php:466 +msgid "You must agree to the terms of use" +msgstr "" + +#: includes/process-purchase.php:480 +msgid "You must agree to the privacy policy" +msgstr "" + +#: includes/process-purchase.php:501 +msgid "Please enter your first name" +msgstr "" + +#: includes/process-purchase.php:519 +msgid "Please enter your billing city" +msgstr "" + +#: includes/process-purchase.php:531 +msgid "Please enter billing state / region" +msgstr "" + +#: includes/process-purchase.php:590 +#: includes/process-purchase.php:700 +#: includes/process-purchase.php:826 +#: includes/users/register.php:81 +msgid "Invalid email" +msgstr "" + +#: includes/process-purchase.php:674 +msgid "Username already exists" +msgstr "" + +#: includes/process-purchase.php:679 +msgid "Invalid username. Only lowercase letters (a-z) and numbers are allowed" +msgstr "" + +#: includes/process-purchase.php:680 +#: includes/users/register.php:59 +#: includes/users/register.php:67 +msgid "Invalid username" +msgstr "" + +#: includes/process-purchase.php:690 +msgid "You must register or login to complete your purchase" +msgstr "" + +#: includes/process-purchase.php:704 +msgid "You cannot use that email address to signup at this time." +msgstr "" + +#: includes/process-purchase.php:714 +#: src/Checkout/AutoRegister.php:264 +msgid "Email already used. Login or use a different email to complete your purchase." +msgstr "" + +#: includes/process-purchase.php:726 +#: includes/process-purchase.php:839 +msgid "Enter an email" +msgstr "" + +#: includes/process-purchase.php:736 +msgid "Passwords do not match" +msgstr "" + +#: includes/process-purchase.php:747 +msgid "Enter a password" +msgstr "" + +#: includes/process-purchase.php:749 +msgid "Confirm your password" +msgstr "" + +#: includes/process-purchase.php:776 +msgid "You must log in or register to complete your purchase" +msgstr "" + +#: includes/process-purchase.php:813 +msgid "You must be logged into an account to purchase" +msgstr "" + +#: includes/process-purchase.php:830 +msgid "You cannot use that email address at this time." +msgstr "" + +#: includes/process-purchase.php:1056 +msgid "The zip / postal code you entered for your billing address is invalid" +msgstr "" + +#: includes/process-purchase.php:1309 +msgid "An internal error has occurred, please try again or contact support." +msgstr "" + +#: includes/process-purchase.php:1327 +msgid "Your email address must be shorter than 100 characters." +msgstr "" + +#: includes/process-purchase.php:1359 +msgid "There was an error completing your purchase. Please try again." +msgstr "" + +#: includes/query-filters.php:51 +msgid "You do not have permission to view this file." +msgstr "" + +#: includes/refund-functions.php:27 +msgid "Non-Refundable" +msgstr "" + +#: includes/reports/class-init.php:211 +msgid "Legacy" +msgstr "" + +#: includes/reports/data/class-endpoint-view-registry.php:209 +msgid "All time" +msgstr "" + +#: includes/reports/data/downloads/class-top-selling-downloads-list-table.php:58 +msgid "Net Earnings" +msgstr "" + +#: includes/reports/data/downloads/class-top-selling-downloads-list-table.php:155 +#: includes/reports/data/file-downloads/class-top-five-most-downloaded-list-table.php:169 +msgid "No downloads found." +msgstr "" + +#: includes/reports/data/payment-gateways/class-gateway-stats-list-table.php:79 +msgid "Refunds Issued" +msgstr "" + +#: includes/reports/data/taxes/class-tax-collected-by-location-list-table.php:75 +msgid "Country/Region" +msgstr "" + +#: includes/reports/data/taxes/class-tax-collected-by-location-list-table.php:76 +msgid "Gross" +msgstr "" + +#: includes/reports/data/taxes/class-tax-collected-by-location-list-table.php:169 +msgid "Global Rate" +msgstr "" + +#: includes/reports/reports-functions.php:340 +#: includes/reports/reports-functions.php:1518 +msgid "Exclude Taxes" +msgstr "" + +#: includes/reports/reports-functions.php:344 +msgid "Gateways" +msgstr "" + +#: includes/reports/reports-functions.php:352 +msgid "Regions" +msgstr "" + +#: includes/reports/reports-functions.php:356 +msgid "Countries" +msgstr "" + +#: includes/reports/reports-functions.php:360 +msgid "Currencies" +msgstr "" + +#: includes/reports/reports-functions.php:531 +msgid "Custom" +msgstr "" + +#: includes/reports/reports-functions.php:536 +msgid "Last 30 Days" +msgstr "" + +#: includes/reports/reports-functions.php:537 +msgid "Month to Date" +msgstr "" + +#: includes/reports/reports-functions.php:539 +msgid "Quarter to Date" +msgstr "" + +#: includes/reports/reports-functions.php:541 +msgid "Year to Date" +msgstr "" + +#: includes/reports/reports-functions.php:603 +msgid "Previous period" +msgstr "" + +#: includes/reports/reports-functions.php:604 +msgid "Previous month" +msgstr "" + +#: includes/reports/reports-functions.php:605 +msgid "Previous quarter" +msgstr "" + +#: includes/reports/reports-functions.php:606 +msgid "Previous year" +msgstr "" + +#. translators: %s: Timezone ID +#: includes/reports/reports-functions.php:1320 +msgid "Chart time zone: %s" +msgstr "" + +#: includes/reports/reports-functions.php:1424 +msgid "compared to" +msgstr "" + +#. translators: %s: Default currency of the store, in standard 3 character format (example: USD or EUR) +#: includes/reports/reports-functions.php:1690 +msgid "%s - Converted" +msgstr "" + +#: includes/reports/reports-functions.php:1829 +msgid "Try the Sales/Earnings iOS App!" +msgstr "" + +#: includes/shortcodes.php:285 +msgid "Purchase All Items" +msgstr "" + +#. translators: plural download label +#: includes/shortcodes.php:617 +msgctxt "download post type name" +msgid "No %s found" +msgstr "" + +#: includes/shortcodes.php:712 +msgid "You must be logged in to view this payment receipt." +msgstr "" + +#: includes/shortcodes.php:724 +msgid "Receipt could not be retrieved, your purchase session has expired." +msgstr "" + +#: includes/shortcodes.php:808 +msgid "Your profile could not be updated. Please contact a site administrator." +msgstr "" + +#: includes/shortcodes.php:844 +msgid "The passwords you entered do not match. Please try again." +msgstr "" + +#: includes/shortcodes.php:855 +msgid "The email you entered is invalid. Please enter a valid email." +msgstr "" + +#: includes/shortcodes.php:866 +#: includes/users/register.php:77 +msgid "This email address is not available." +msgstr "" + +#: includes/shortcodes.php:1001 +msgid "Error removing email address from profile. Please try again later." +msgstr "" + +#: includes/template-actions.php:19 +msgid "You need to log in to edit your profile." +msgstr "" + +#: includes/template-actions.php:32 +msgid "You are already logged in" +msgstr "" + +#. translators: the settings screen URL +#: includes/template-functions.php:64 +msgid "No checkout page has been configured. Visit Settings to set one." +msgstr "" + +#: includes/template-functions.php:93 +#: src/Admin/Settings/Tabs/Misc.php:150 +msgctxt "text shown on the Add to Cart Button when the product is already in the cart" +msgid "Checkout" +msgstr "" + +#: includes/template-functions.php:204 +#: src/Assets/Localization.php:62 +msgid "Loading" +msgstr "" + +#: includes/template-functions.php:218 +msgid "Added to cart" +msgstr "" + +#. translators: the formatted tax rate +#: includes/template-functions.php:225 +msgid "Includes %1$s tax" +msgstr "" + +#. translators: the formatted tax rate +#: includes/template-functions.php:228 +msgid "Excluding %1$s tax" +msgstr "" + +#: includes/template-functions.php:483 +msgid "White" +msgstr "" + +#: includes/template-functions.php:487 +msgid "Gray" +msgstr "" + +#: includes/template-functions.php:491 +msgid "Blue" +msgstr "" + +#: includes/template-functions.php:495 +msgid "Red" +msgstr "" + +#: includes/template-functions.php:499 +msgid "Green" +msgstr "" + +#: includes/template-functions.php:503 +msgid "Yellow" +msgstr "" + +#: includes/template-functions.php:507 +msgid "Orange" +msgstr "" + +#: includes/template-functions.php:511 +msgid "Dark Gray" +msgstr "" + +#: includes/template-functions.php:515 +msgid "Inherit" +msgstr "" + +#: includes/template-functions.php:534 +msgid "Plain Text" +msgstr "" + +#: includes/upgrades/functions.php:144 +msgid "Tax Rates" +msgstr "" + +#: includes/upgrades/functions.php:160 +msgid "Customer Email Addresses" +msgstr "" + +#: includes/upgrades/functions.php:164 +msgid "Customer Notes" +msgstr "" + +#: includes/upgrades/functions.php:172 +msgid "Order Notes" +msgstr "" + +#. translators: %s: URL to request a new verification link +#: includes/user-functions.php:823 +msgid "Sorry but your account verification link has expired. Click here to request a new verification URL." +msgstr "" + +#: includes/user-functions.php:855 +msgid "You must be logged in to verify your account." +msgstr "" + +#: includes/user-functions.php:859 +msgid "Your account has already been verified." +msgstr "" + +#: includes/user-functions.php:900 +msgid "Invalid verification token provided." +msgstr "" + +#: includes/user-functions.php:1026 +msgid "EDD API Keys" +msgstr "" + +#: includes/user-functions.php:1033 +msgid "Generate API Key" +msgstr "" + +#: includes/user-functions.php:1038 +msgid "Public Key:" +msgstr "" + +#: includes/user-functions.php:1041 +msgid "Secret Key:" +msgstr "" + +#: includes/user-functions.php:1044 +msgid "Token:" +msgstr "" + +#: includes/user-functions.php:1050 +msgid "Revoke API Keys" +msgstr "" + +#: includes/user-functions.php:1071 +msgid "Last Used:" +msgstr "" + +#. translators: %s: iOS App URL +#: includes/user-functions.php:1090 +msgid "Easy Digital Downloads iOS App" +msgstr "" + +#: includes/user-functions.php:1098 +msgid "Add to iOS App" +msgstr "" + +#. translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. +#: includes/users/login.php:152 +msgid "Invalid username or password. %1$sReset Password%2$s" +msgstr "" + +#. translators: %s: Link to the referring page. +#: includes/users/lost-password.php:31 +msgid "Follow the instructions in the confirmation email you just received, then return to what you were doing." +msgstr "" + +#: includes/users/lost-password.php:127 +msgid "Your request could not be completed." +msgstr "" + +#: includes/users/lost-password.php:134 +msgid "You did it! Check your email for instructions on resetting your password." +msgstr "" + +#: includes/users/lost-password.php:230 +msgid "Your password reset link has expired. Please request a new link below." +msgstr "" + +#: includes/users/lost-password.php:252 +#: includes/users/lost-password.php:257 +#: includes/users/lost-password.php:262 +#: includes/users/lost-password.php:268 +msgid "Invalid password reset request." +msgstr "" + +#: includes/users/lost-password.php:277 +#: includes/users/register.php:98 +msgid "The password cannot be a space or all spaces." +msgstr "" + +#: includes/users/lost-password.php:282 +#: includes/users/register.php:103 +msgid "The passwords do not match." +msgstr "" + +#: includes/users/lost-password.php:287 +#: includes/users/lost-password.php:292 +msgid "Your password could not be reset." +msgstr "" + +#: includes/users/lost-password.php:301 +msgid "Your password was successfully reset." +msgstr "" + +#: includes/users/register.php:63 +msgid "Username already taken" +msgstr "" + +#: includes/users/register.php:85 +msgid "Invalid payment email" +msgstr "" + +#: includes/users/register.php:89 +msgid "Registration form validation failed." +msgstr "" + +#: includes/users/register.php:125 +msgid "Your account has been successfully created." +msgstr "" + +#: includes/widgets.php:38 +msgid "Downloads Cart" +msgstr "" + +#: includes/widgets.php:38 +msgid "Display the downloads shopping cart" +msgstr "" + +#: includes/widgets.php:91 +#: includes/widgets.php:202 +#: includes/widgets.php:389 +msgid "Title:" +msgstr "" + +#: includes/widgets.php:98 +msgid "Hide on Checkout Page" +msgstr "" + +#: includes/widgets.php:104 +msgid "Hide if cart is empty" +msgstr "" + +#: includes/widgets.php:148 +msgid "Downloads Categories / Tags" +msgstr "" + +#: includes/widgets.php:148 +msgid "Display the downloads categories or tags" +msgstr "" + +#: includes/widgets.php:206 +msgid "Taxonomy:" +msgstr "" + +#: includes/widgets.php:217 +msgid "Show Count:" +msgstr "" + +#: includes/widgets.php:221 +msgid "Hide Empty Categories:" +msgstr "" + +#. translators: %s: Download singular label +#: includes/widgets.php:247 +msgid "Display the details of a specific %s" +msgstr "" + +#: includes/widgets.php:394 +msgid "Display Type:" +msgstr "" + +#: includes/widgets.php:395 +msgid "Current" +msgstr "" + +#: includes/widgets.php:396 +msgid "Specific" +msgstr "" + +#. translators: %s: Download singular label +#: includes/widgets.php:403 +msgid "%s:" +msgstr "" + +#. translators: %s: Download singular label +#: includes/widgets.php:422 +msgid "%s ID" +msgstr "" + +#. translators: %s: Download singular label +#: includes/widgets.php:430 +msgid "Show %s Title" +msgstr "" + +#: includes/widgets.php:436 +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:163 +msgid "Show Purchase Button" +msgstr "" + +#. translators: %s: download category label +#: includes/widgets.php:444 +msgctxt "plural: Download category label (example: Show Download Categories)" +msgid "Show %s" +msgstr "" + +#. translators: %s: download tag label +#: includes/widgets.php:452 +msgctxt "plural: Download tag label (example: Show Download Tags)" +msgid "Show %s" +msgstr "" + +#: src/Admin/Assets/Localization.php:66 +msgid "Add New Download" +msgstr "" + +#: src/Admin/Assets/Localization.php:67 +msgid "Use This File" +msgstr "" + +#: src/Admin/Assets/Localization.php:68 +msgid "Sorry, not available for variable priced products." +msgstr "" + +#: src/Admin/Assets/Localization.php:69 +msgid "Are you sure you want to delete this item?" +msgstr "" + +#: src/Admin/Assets/Localization.php:70 +msgid "Are you sure you want to delete this adjustment?" +msgstr "" + +#: src/Admin/Assets/Localization.php:71 +msgid "Are you sure you want to delete this note?" +msgstr "" + +#: src/Admin/Assets/Localization.php:72 +msgid "Are you sure you want to delete this tax rate?" +msgstr "" + +#: src/Admin/Assets/Localization.php:73 +msgid "Are you sure you want to revoke this API key?" +msgstr "" + +#: src/Admin/Assets/Localization.php:74 +msgid "Are you sure you want to regenerate this API key?" +msgstr "" + +#: src/Admin/Assets/Localization.php:75 +msgid "Are you sure you want to resend the purchase receipt?" +msgstr "" + +#: src/Admin/Assets/Localization.php:76 +msgid "Are you sure you want to disconnect the WordPress user from this customer record?" +msgstr "" + +#: src/Admin/Assets/Localization.php:77 +msgid "Copy these links to your clipboard and give them to your customer" +msgstr "" + +#. translators: %s: Download singular label +#: src/Admin/Assets/Localization.php:79 +msgid "Are you sure you want to delete this %s?" +msgstr "" + +#. translators: %s: Downloads plural label +#: src/Admin/Assets/Localization.php:81 +msgid "Type to search %s" +msgstr "" + +#. translators: %s: Download singular label +#: src/Admin/Assets/Localization.php:83 +#: src/HTML/ProductSelect.php:80 +msgid "Choose a %s" +msgstr "" + +#. translators: %s: Downloads plural label +#: src/Admin/Assets/Localization.php:85 +msgid "Choose one or more %s" +msgstr "" + +#: src/Admin/Assets/Localization.php:86 +msgid "You must have at least one price" +msgstr "" + +#: src/Admin/Assets/Localization.php:87 +msgid "You must have at least one field" +msgstr "" + +#: src/Admin/Assets/Localization.php:88 +msgid "Payments must contain at least one item" +msgstr "" + +#: src/Admin/Assets/Localization.php:89 +msgid "No match for:" +msgstr "" + +#: src/Admin/Assets/Localization.php:90 +msgid "Item price must be numeric" +msgstr "" + +#: src/Admin/Assets/Localization.php:91 +msgid "Item tax must be numeric" +msgstr "" + +#: src/Admin/Assets/Localization.php:92 +msgid "Quantity must be numeric" +msgstr "" + +#: src/Admin/Assets/Localization.php:94 +msgid "You must choose a method." +msgstr "" + +#: src/Admin/Assets/Localization.php:95 +msgid "Required fields not completed." +msgstr "" + +#: src/Admin/Assets/Localization.php:96 +msgid "Are you sure you want to reset your store? This process is not reversible. Please be sure you have a recent backup." +msgstr "" + +#: src/Admin/Assets/Localization.php:97 +msgid "We are sorry but your browser is not compatible with this kind of file upload. Please upgrade your browser." +msgstr "" + +#: src/Admin/Assets/Localization.php:99 +msgid "Hide advanced settings" +msgstr "" + +#: src/Admin/Assets/Localization.php:100 +msgid "There are no downloads attached to this payment" +msgstr "" + +#: src/Admin/Assets/Localization.php:101 +msgid "Please wait …" +msgstr "" + +#: src/Admin/Assets/Localization.php:102 +msgid "You must save your changes to send the test email." +msgstr "" + +#: src/Admin/Assets/Localization.php:103 +msgid "Either Letters or Numbers should be selected." +msgstr "" + +#: src/Admin/Assets/Localization.php:106 +msgid "Confirm" +msgstr "" + +#: src/Admin/Assets/Localization.php:113 +msgid "The edd_use_35_media_ui filter is no longer supported." +msgstr "" + +#: src/Admin/Assets/Localization.php:122 +#: src/Admin/Settings/Tabs/General.php:112 +msgid "Select a region" +msgstr "" + +#: src/Admin/Discounts/Generate.php:38 +msgid "Generate Code" +msgstr "" + +#: src/Admin/Discounts/Generate.php:72 +msgid "Unlock with Pro" +msgstr "" + +#: src/Admin/Discounts/Generate.php:73 +msgid "Upgrade to Easy Digital Downloads (Pro) to easily generate unique discount codes, and more." +msgstr "" + +#: src/Admin/Emails/ListTable.php:76 +msgid "Sender" +msgstr "" + +#: src/Admin/Emails/ListTable.php:77 +msgid "Context" +msgstr "" + +#: src/Admin/Emails/ListTable.php:78 +msgid "Recipient" +msgstr "" + +#: src/Admin/Emails/ListTable.php:80 +msgid "Updated" +msgstr "" + +#: src/Admin/Emails/ListTable.php:142 +msgid "Disable Email" +msgstr "" + +#: src/Admin/Emails/ListTable.php:146 +msgid "Enable Email" +msgstr "" + +#: src/Admin/Emails/ListTable.php:217 +msgid "No emails found matching filters." +msgstr "" + +#: src/Admin/Emails/ListTable.php:300 +msgid "Add New Email" +msgstr "" + +#: src/Admin/Emails/ListTable.php:396 +msgid "Filter by status" +msgstr "" + +#: src/Admin/Emails/ListTable.php:400 +msgid "All Emails" +msgstr "" + +#: src/Admin/Emails/ListTable.php:403 +msgid "Enabled Emails" +msgstr "" + +#: src/Admin/Emails/ListTable.php:406 +msgid "Disabled Emails" +msgstr "" + +#: src/Admin/Emails/ListTable.php:421 +msgid "Filter by sender" +msgstr "" + +#: src/Admin/Emails/ListTable.php:425 +msgid "All Senders" +msgstr "" + +#: src/Admin/Emails/ListTable.php:445 +msgid "Filter by recipient" +msgstr "" + +#: src/Admin/Emails/ListTable.php:449 +msgid "All Recipients" +msgstr "" + +#: src/Admin/Emails/ListTable.php:469 +msgid "Filter by context" +msgstr "" + +#: src/Admin/Emails/ListTable.php:473 +msgid "All Contexts" +msgstr "" + +#: src/Admin/Emails/LogsTable.php:65 +msgid "To" +msgstr "" + +#: src/Admin/Emails/LogsTable.php:66 +msgid "Email Object" +msgstr "" + +#: src/Admin/Emails/LogsTable.php:67 +msgid "Date Sent" +msgstr "" + +#. translators: %s: Order number +#: src/Admin/Emails/LogsTable.php:162 +msgid "Order %s" +msgstr "" + +#. translators: %s: User display name +#: src/Admin/Emails/LogsTable.php:182 +msgid "User %s" +msgstr "" + +#. translators: %s: Refund number +#: src/Admin/Emails/LogsTable.php:203 +msgid "Refund %s" +msgstr "" + +#: src/Admin/Emails/Manager.php:54 +#: src/Admin/Emails/Manager.php:87 +#: src/Admin/Emails/Manager.php:211 +#: src/Admin/Emails/Screen.php:98 +msgid "Missing email ID." +msgstr "" + +#: src/Admin/Emails/Manager.php:92 +msgid "Invalid nonce." +msgstr "" + +#: src/Admin/Emails/Manager.php:109 +msgid "This email status cannot be changed." +msgstr "" + +#: src/Admin/Emails/Manager.php:117 +msgid "This email status could not be changed." +msgstr "" + +#. translators: 1: opening strong tag, 2: closing string tag, 3: required tag +#: src/Admin/Emails/Manager.php:155 +msgid "%1$sImportant:%2$s The %3$s template tag must remain in this email. Do not delete it." +msgstr "" + +#: src/Admin/Emails/Manager.php:215 +#: src/Admin/Emails/Screen.php:105 +msgid "Invalid email ID." +msgstr "" + +#: src/Admin/Emails/Messages.php:82 +msgid "Your email could not be saved because it is missing required content." +msgstr "" + +#: src/Admin/Emails/Messages.php:87 +msgid "The test email was sent successfully." +msgstr "" + +#: src/Admin/Emails/Messages.php:91 +msgid "The test email could not be sent. Please check your email settings and try again." +msgstr "" + +#: src/Admin/Emails/Messages.php:96 +msgid "The email was successfully added." +msgstr "" + +#: src/Admin/Emails/Messages.php:100 +msgid "The email could not be added." +msgstr "" + +#: src/Admin/Emails/Messages.php:105 +msgid "The email was successfully deleted." +msgstr "" + +#: src/Admin/Emails/Messages.php:109 +msgid "The email could not be deleted." +msgstr "" + +#: src/Admin/Emails/Reset.php:49 +msgid "Restore Default Email Content?" +msgstr "" + +#: src/Admin/Emails/Reset.php:50 +msgid "Restoring the default content will remove any customizations that you have made to the current email content. Do you want to continue?" +msgstr "" + +#: src/Admin/Emails/Reset.php:53 +msgid "Confirm Restore" +msgstr "" + +#: src/Admin/Emails/Screen.php:36 +msgid "Email Reports" +msgstr "" + +#: src/Admin/Extensions/Card.php:181 +#: src/Admin/Promos/Notices/Emails.php:133 +#: src/Gateways/Stripe/Admin/LicenseManager.php:263 +#: src/Gateways/Stripe/Admin/LicenseManager.php:289 +#: src/Gateways/Stripe/Admin/LicenseManager.php:311 +#: src/Gateways/Stripe/Admin/LicenseManager.php:338 +msgid "Learn More" +msgstr "" + +#: src/Admin/Extensions/Card.php:367 +msgid "Recommended" +msgstr "" + +#. translators: the plugin version +#: src/Admin/Extensions/Card.php:386 +msgid "Version: %s" +msgstr "" + +#. translators: The extension name. +#: src/Admin/Extensions/Extension.php:273 +msgid "Log In to Your Account to Download %s" +msgstr "" + +#. translators: The extension name. +#: src/Admin/Extensions/Extension.php:281 +msgid "Upgrade Today to Access %s!" +msgstr "" + +#. translators: The extension name. +#: src/Admin/Extensions/Extension.php:297 +msgid "Activate %s" +msgstr "" + +#. translators: The extension name. +#: src/Admin/Extensions/Extension.php:301 +msgid "Deactivate %s" +msgstr "" + +#. translators: The extension name. +#: src/Admin/Extensions/Extension.php:349 +msgid "Configure %s" +msgstr "" + +#. translators: the plural Downloads label. +#: src/Admin/Extensions/Extension.php:362 +msgid "View %s" +msgstr "" + +#: src/Admin/Extensions/ExtensionPage.php:41 +#: src/Admin/Extensions/ExtensionPage.php:46 +msgid "Search Extensions" +msgstr "" + +#: src/Admin/Extensions/ExtensionPage.php:93 +msgid "Available Extensions" +msgstr "" + +#: src/Admin/Extensions/ExtensionPage.php:107 +msgid "Refresh Extensions" +msgstr "" + +#. translators: the active pass name +#: src/Admin/Extensions/ExtensionPage.php:134 +msgid "Add functionality to your Easy Digital Downloads powered store with your %s." +msgstr "" + +#: src/Admin/Extensions/ExtensionPage.php:137 +msgid "Add functionality to your Easy Digital Downloads powered store." +msgstr "" + +#. translators: 1: pass name, 2: opening anchor tag, 3: closing anchor tag. +#: src/Admin/Extensions/ExtensionPage.php:162 +msgid "Using the 1-Click Installation feature requires Easy Digital Downloads (Pro), which you have access to with your %1$s. %2$sInstall (Pro) now%3$s." +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag. +#: src/Admin/Extensions/ExtensionPage.php:180 +msgid "Missing access to an extension? %1$sAdd your license key now%2$s." +msgstr "" + +#: src/Admin/Extensions/ExtensionPage.php:214 +msgid "EDD (Pro) Required" +msgstr "" + +#: src/Admin/Extensions/ExtensionPage.php:218 +msgid "Upgrade Now" +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:89 +#: src/Admin/PassHandler/Settings.php:128 +#: src/Licensing/Settings.php:57 +msgid "Activating" +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:90 +msgid "Installing" +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:91 +msgid "Could not install the plugin. Please download and install it manually via Plugins > Add New." +msgstr "" + +#. translators: 1: opening anchor tag, do not translate, 2: closing anchor tag, do not translate +#: src/Admin/Extensions/Extension_Manager.php:94 +#: src/Admin/Extensions/Extension_Manager.php:191 +msgid "Could not install the extension. Please %1$sdownload it from your account%2$s and install it manually." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:99 +msgid "extensions found" +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:100 +#: src/Admin/PassHandler/Settings.php:129 +#: src/Licensing/Settings.php:58 +msgid "Deactivating" +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:160 +#: src/Admin/Extensions/Extension_Manager.php:273 +#: src/Admin/Extensions/Extension_Manager.php:353 +msgid "There was an error while performing your request." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:175 +msgid "Plugin installation is not available for you on this site." +msgstr "" + +#. translators: 1: opening anchor tag, do not translate, 2: closing anchor tag, do not translate. +#: src/Admin/Extensions/Extension_Manager.php:185 +msgid "Could not install the plugin. Please %1$sdownload%2$s and install it manually via Plugins > Add New." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:257 +msgid "Plugin installed." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:257 +msgid "Extension installed." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:279 +msgid "Plugin activation is not available for you on this site." +msgstr "" + +#. translators: "extension" or "plugin" as defined by $type +#: src/Admin/Extensions/Extension_Manager.php:296 +msgid "Could not activate the %s." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:319 +msgid "Plugin activated." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:319 +msgid "Extension activated." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:321 +#: src/Lite/Admin/PassHandler/Connect.php:91 +#: src/Lite/Admin/PassHandler/Connect.php:100 +#: src/Lite/Admin/PassHandler/Connect.php:146 +msgid "Plugin installed & activated." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:321 +msgid "Extension installed & activated." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:330 +msgid "Activated" +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:359 +msgid "Plugin deactivation is not available for you on this site." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:378 +msgid "Plugin deactivated." +msgstr "" + +#: src/Admin/Extensions/Extension_Manager.php:378 +msgid "Extension deactivated." +msgstr "" + +#: src/Admin/Extensions/Legacy.php:69 +msgid "Inactive — Part of EDD" +msgstr "" + +#: src/Admin/Extensions/Legacy.php:115 +msgid "Auto Register has been merged into Easy Digital Downloads. It has been deactivated and you can safely delete the Auto Register plugin. Please review your new user emails to ensure that any customizations were retained during the migration." +msgstr "" + +#: src/Admin/Extensions/Legacy.php:118 +msgid "View Emails" +msgstr "" + +#. translators: %s: name of the extension. +#: src/Admin/Extensions/Legacy.php:187 +msgid "%s is now part of EDD!" +msgstr "" + +#. translators: %s: name of the extension. +#: src/Admin/Extensions/Legacy.php:192 +msgid "The functionality of %1$s has been merged into Easy Digital Downloads. It has been deactivated and you can safely delete the %2$s plugin." +msgstr "" + +#: src/Admin/Extensions/Legacy.php:211 +msgid "View Plugins" +msgstr "" + +#. translators: %s: Email tag that will be replaced with the customer name +#: src/Admin/Extensions/Legacy/AutoRegister.php:103 +#: src/Emails/Templates/OrderReceipt.php:105 +#: src/Emails/Templates/OrderRefund.php:129 +msgctxt "Context: This is an email tag (placeholder) that will be replaced at the time of sending the email" +msgid "Dear %s," +msgstr "" + +#: src/Admin/Extensions/Legacy/AutoRegister.php:104 +msgid "Below are your login details:" +msgstr "" + +#. translators: %s: Email tag that will be replaced with the customer username +#: src/Admin/Extensions/Legacy/AutoRegister.php:106 +msgid "Your Username: %s" +msgstr "" + +#. translators: %s: Site name email tag +#: src/Admin/Extensions/Legacy/AutoRegister.php:132 +msgid "[%s] Login Details" +msgstr "" + +#. translators: %s: Email tag that will be replaced with the Site Name +#: src/Admin/Extensions/Legacy/AutoRegister.php:146 +msgctxt "Used to insert the {sitename} email tag into default email content." +msgid "New user registration on your site %s:" +msgstr "" + +#. translators: %s: Username email tag +#: src/Admin/Extensions/Legacy/AutoRegister.php:148 +msgctxt "Used to insert the {username} email tag into default email content." +msgid "Username: %s" +msgstr "" + +#. translators: %s: User email email tag +#: src/Admin/Extensions/Legacy/AutoRegister.php:150 +msgctxt "Used to insert the {user_email} email tag into default email content." +msgid "Email: %s" +msgstr "" + +#. translators: %s: Email tag that will be replaced with the Site Name +#: src/Admin/Extensions/Legacy/AutoRegister.php:163 +#: src/Emails/Templates/NewUserAdmin.php:85 +msgctxt "Context: This is an email tag (placeholder) that will be replaced at the time of sending the email" +msgid "[%s] New User Registration" +msgstr "" + +#: src/Admin/Extensions/Traits/Emails.php:60 +msgid "Update Now" +msgstr "" + +#. translators: %1$s number of notifications; %2$s opening span tag; %3$s closing span tag +#: src/Admin/Menu/Header.php:82 +msgid "%1$s %2$sunread notifications%3$s" +msgstr "" + +#: src/Admin/Menu/Header.php:166 +#: src/Admin/PassHandler/Handler.php:131 +msgid "View Extensions" +msgstr "" + +#: src/Admin/Menu/Header.php:168 +msgid "Manage Extensions" +msgstr "" + +#: src/Admin/Menu/Pages.php:81 +msgid "EDD Settings" +msgstr "" + +#: src/Admin/Menu/Pages.php:87 +msgid "EDD Emails" +msgstr "" + +#: src/Admin/Menu/Pages.php:93 +msgid "EDD Tools" +msgstr "" + +#: src/Admin/Menu/Pages.php:109 +#: src/Admin/Menu/Pages.php:110 +msgid "EDD Upgrades" +msgstr "" + +#: src/Admin/Menu/Pages.php:158 +msgid "NEW!" +msgstr "" + +#: src/Admin/Menu/SecondaryNavigation.php:62 +msgid "Secondary menu" +msgstr "" + +#. translators: %s: Search query. +#: src/Admin/Menu/SecondaryNavigation.php:84 +msgid "Search results for: %s" +msgstr "" + +#: src/Admin/Notifications/GBLegacy.php:53 +msgid "Please Update Your Settings" +msgstr "" + +#: src/Admin/Notifications/GBLegacy.php:54 +msgid "We recently updated our list of regions for the United Kingdom. We have detected that your store is using an outdated region for the business settings or tax rates. Please review these settings and update them if needed." +msgstr "" + +#: src/Admin/Notifications/GBLegacy.php:111 +msgid "Update Business Region" +msgstr "" + +#: src/Admin/Onboarding/Notice.php:33 +msgid "Wait! We still haven't finished the setup." +msgstr "" + +#: src/Admin/Onboarding/Notice.php:34 +msgid "Our Quick Setup Wizard can help you get you ready to sell your first product in minutes. If you choose to exit now, you will need to manually configure key aspects of your store. You can always restart this wizard by going to Downloads > Tools, and clicking on the 'Restart Setup Wizard' button." +msgstr "" + +#: src/Admin/Onboarding/Notice.php:36 +msgid "Let's finish now!" +msgstr "" + +#: src/Admin/Onboarding/Notice.php:37 +msgid "No thanks, I'll do it all myself." +msgstr "" + +#: src/Admin/Onboarding/Steps/ConfigureEmails.php:40 +#: src/Admin/Settings/Tabs/Emails.php:54 +msgid "Logo" +msgstr "" + +#: src/Admin/Onboarding/Steps/ConfigureEmails.php:60 +#: src/Admin/Settings/Tabs/Emails.php:60 +msgid "From Name" +msgstr "" + +#: src/Admin/Onboarding/Steps/ConfigureEmails.php:82 +#: src/Admin/Settings/Tabs/Emails.php:68 +msgid "From Email" +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:30 +msgid "The world’s most powerful and easy to use payment gateway." +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:33 +msgid "Stripe Features we can add:" +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:36 +msgid "Secure checkout" +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:37 +msgid "Accept all major credit cards" +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:38 +msgid "Supports subscriptions" +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:39 +msgid "Fraud prevention tools" +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:40 +msgid "Apple Pay & Google Pay" +msgstr "" + +#: src/Admin/Onboarding/Steps/PaymentMethods.php:41 +msgid "And more…" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:38 +msgid "Product details" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:43 +msgid "We'll get started with some basic information. Don't worry, you can add more details later. When you're finished here, the product will be saved as a draft so you can finish up later." +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:51 +msgid "Product Name" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:63 +msgid "Set image" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:63 +msgid "Set Image" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:69 +msgid "Pricing Options" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:73 +msgid "Single price" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:74 +msgid "Variable price" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:79 +msgid "Product Price" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:141 +msgid "Add your first file" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:150 +msgid "Ready to add your first downloadable file to your product? Great! These files will be protected and only available to people who purchase your product. Not ready yet? No problem, you can always add and update files later." +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:166 +msgid "Congratulations!" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:167 +msgid "You've set up your store and your first product has been created." +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:168 +msgid "Edit My Product" +msgstr "" + +#: src/Admin/Onboarding/Steps/Products.php:169 +msgid "Explore Extensions" +msgstr "" + +#. translators: the plugin name. +#: src/Admin/Onboarding/Steps/Tools.php:82 +msgid "%s is already active." +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:88 +msgid "You already have a solution installed for this feature." +msgstr "" + +#. translators: %s The plugin name. +#: src/Admin/Onboarding/Steps/Tools.php:93 +msgid "Installs %s" +msgstr "" + +#. translators: %s The plugin name. +#: src/Admin/Onboarding/Steps/Tools.php:98 +msgid "Activates %s" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:111 +msgid "Based on your selection above, the following plugins will be installed and activated:" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:115 +msgid "Some features were not able to be installed!" +msgstr "" + +#. translators: list of plugins that were not able to be installed or activated +#: src/Admin/Onboarding/Steps/Tools.php:120 +msgid "Don't worry, everything will still work without them! You can install %s later by going to Plugins > Add New." +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:125 +msgid "Continue" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:131 +msgid "Plugins were successfully installed!" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:147 +msgid "Essential eCommerce Features" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:148 +msgid "Get all the essential eCommerce features to sell digital products with WordPress." +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:159 +msgid "Reliable Email Delivery" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:160 +msgid "Email deliverability is one of the most important services for an eCommerce store. Don’t leave your customers in the dark." +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:172 +msgid "Analytics Tools" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:173 +msgid "Get the #1 analytics plugin to see useful information about your visitors right inside your WordPress dashboard." +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:189 +msgid "SEO Tools" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:190 +msgid "Get the tools used by millions of smart business owners to analyze and optimize their store’s traffic with SEO." +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:204 +msgid "Conversion Tools" +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:205 +msgid "Get the #1 conversion optimization plugin to convert your growing website traffic into subscribers, leads and sales." +msgstr "" + +#: src/Admin/Onboarding/Steps/Tools.php:266 +#: src/Telemetry/Tracking.php:143 +#: src/Telemetry/Tracking.php:270 +msgid "Join the EDD Community" +msgstr "" + +#. translators: %1$s: the opening anchor tag, %2$s: the closing anchor tag +#: src/Admin/Onboarding/Steps/Tools.php:281 +msgid "Help us provide a better experience and faster fixes by sharing some %1$sanonymous data%2$s about how you use Easy Digital Downloads." +msgstr "" + +#: src/Admin/Onboarding/Tools.php:34 +#: src/Admin/Onboarding/Tools.php:37 +msgid "Restart the Setup Wizard" +msgstr "" + +#: src/Admin/Onboarding/Tools.php:36 +msgid "If you would like to revisit our setup wizard, you can at any time." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:125 +msgid "Setup" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:230 +msgid "Business" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:231 +msgid "Tell us a little bit about your business." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:232 +msgid "Where is your business located? This helps Easy Digital Downloads configure the checkout and receipt templates." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:236 +msgid "Payment Methods" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:237 +msgid "Start accepting payments today!" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:243 +msgid "Configure your Receipts" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:244 +msgid "Customize the purchase receipt that your customers will receive." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:249 +msgid "Conversion and Optimization tools" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:250 +msgid "We have selected our recommended tools and features to help boost conversions and optimize your digital store." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:255 +msgid "What are you going to sell?" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:256 +msgid "Let's get started creating your first awesome product." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:276 +msgid "Let's get started with your next great product." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:303 +msgid "Unknown Onboarding Step." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:303 +msgid "Onboarding Wizard" +msgstr "" + +#. translators: %s: The company name of the person giving the testimonial +#: src/Admin/Onboarding/Wizard.php:424 +msgctxt "Context: The title/role of the person giving the testimonial. Example: Podcast Coach - How I Built It. The company name remains untranslated" +msgid "Podcast Coach - %s" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:431 +msgctxt "Context: Direct quote used as a testimonial for Easy Digital Downloads" +msgid "The problem with many e-commerce platforms to sell online courses is they aren't made with only digital goods in mind. EDD doesn't have that problem, and as a result their platform is perfectly made for selling my online courses." +msgstr "" + +#. translators: %s: The company name of the person giving the testimonial +#: src/Admin/Onboarding/Wizard.php:443 +msgctxt "Context: The title/role of the person giving the testimonial. Example: Flea Market Insiders. The company name remains untranslated" +msgid "Founder - %s" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:450 +msgctxt "Context: Direct quote used as a testimonial for Easy Digital Downloads" +msgid "Before EDD's Recurring Payments was made available, we were only able to sell one-time subscriptions to our customers. Since implementing recurring payments, we've been able to offer quarterly and yearly subscriptions and subsequently increase our subscriptions revenue by 200%." +msgstr "" + +#. translators: %s: The company name of the person giving the testimonial +#: src/Admin/Onboarding/Wizard.php:462 +msgctxt "Context: The title/role of the person giving the testimonial. Example: Community Leader - BobWP. The company name remains untranslated" +msgid "Community Leader & Podcaster - %s" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:469 +msgctxt "Context: Direct quote used as a testimonial for Easy Digital Downloads" +msgid "If anyone asks me what they should use for downloadable products on their WordPress site, it's a no-brainer as far as EDD goes." +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:481 +msgid "Welcome, and thanks for choosing us!" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:482 +msgid "Easy Digital Downloads setup is fast and easy. We'll walk you through the quick initial process. And don't worry. You can go back and change anything you do – at anytime. Nothing's permanent (unless you want it to be). So feel free to explore!" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:483 +msgid "Get Started" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:484 +msgid "Creators ❤️ Easy Digital Downloads" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:573 +msgid "Go Back" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:577 +msgid "Skip this step" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:578 +msgid "Save & Continue" +msgstr "" + +#: src/Admin/Onboarding/Wizard.php:583 +msgid "Close and Exit Without Saving" +msgstr "" + +#: src/Admin/PassHandler/Ajax.php:58 +#: src/Admin/PassHandler/Ajax.php:128 +#: src/Admin/PassHandler/Ajax.php:162 +msgid "You do not have permission to manage this pass." +msgstr "" + +#: src/Admin/PassHandler/Ajax.php:67 +msgid "Please enter a license key." +msgstr "" + +#: src/Admin/PassHandler/Ajax.php:146 +msgid "Your pass was successfully deactivated." +msgstr "" + +#: src/Admin/PassHandler/Ajax.php:172 +msgid "Pass key deleted." +msgstr "" + +#: src/Admin/PassHandler/Handler.php:109 +msgid "Activate License" +msgstr "" + +#: src/Admin/PassHandler/Handler.php:116 +msgid "Verify License Key" +msgstr "" + +#: src/Admin/PassHandler/Handler.php:169 +msgid "We could not reach the EDD server." +msgstr "" + +#: src/Admin/PassHandler/Settings.php:65 +msgid "License Key" +msgstr "" + +#: src/Admin/PassHandler/Settings.php:75 +msgid "Paste license key" +msgstr "" + +#: src/Admin/PassHandler/Settings.php:97 +msgid "We see that you have an active pass--just hit Verify to get started with (Pro)." +msgstr "" + +#: src/Admin/PassHandler/Settings.php:127 +msgid "Verifying" +msgstr "" + +#: src/Admin/PassHandler/Settings.php:130 +msgid "Just a moment while we connect your site and upgrade you to (Pro)." +msgstr "" + +#: src/Admin/PassHandler/Settings.php:154 +msgid "Easy Digital Downloads (Pro) Key" +msgstr "" + +#: src/Admin/PassHandler/Settings.php:155 +msgid "Go Pro With Easy Digital Downloads" +msgstr "" + +#: src/Admin/PassHandler/Settings.php:180 +msgid "You're using Easy Digital Downloads — no license needed. Enjoy!" +msgstr "" + +#. translators: 1: opening link tag; do not translate, 2: closing link tag; do not translate. +#: src/Admin/PassHandler/Settings.php:195 +msgid "To unlock more features, consider %1$supgrading to Pro%2$s." +msgstr "" + +#: src/Admin/PassHandler/Settings.php:202 +msgid "As a valued EDD user you receive 50% off, automatically applied at checkout!" +msgstr "" + +#: src/Admin/PassHandler/Settings.php:203 +msgid "Already purchased? Simply enter your license key to enable EDD (Pro)." +msgstr "" + +#: src/Admin/Pass_Manager.php:363 +msgid "Personal Pass" +msgstr "" + +#: src/Admin/Pass_Manager.php:364 +msgid "Extended Pass" +msgstr "" + +#: src/Admin/Pass_Manager.php:365 +msgid "Professional Pass" +msgstr "" + +#: src/Admin/Pass_Manager.php:366 +msgid "All Access Pass" +msgstr "" + +#: src/Admin/Pass_Manager.php:367 +msgid "Lifetime All Access Pass" +msgstr "" + +#: src/Admin/Promos/About.php:99 +msgid "About Easy Digital Downloads" +msgstr "" + +#: src/Admin/Promos/About.php:100 +#: src/Admin/Promos/About.php:143 +msgid "About Us" +msgstr "" + +#: src/Admin/Promos/About.php:144 +msgid "Getting Started" +msgstr "" + +#: src/Admin/Promos/About.php:212 +msgid "Welcome to Easy Digital Downloads, the #1 WordPress eCommerce plugin for easily collecting payments. At Easy Digital Downloads, we build software that helps you sell your digital products and services in minutes." +msgstr "" + +#: src/Admin/Promos/About.php:215 +msgid "Over the years we've watched as many plugins and platforms have been created that say they focus on \"digital products\", but take huge fees out of each sale, charge for each product created, and even charge \"relisting fees\". We take a different approach, to create the most powerful digital eCommerce solution, with no hidden fees or monthly costs." +msgstr "" + +#: src/Admin/Promos/About.php:218 +msgid "Our goal is to remove the pain from running your own eCommerce store and make it effortless, so you can get back to doing what you do best." +msgstr "" + +#: src/Admin/Promos/About.php:221 +msgid "Since 2012, we've been building the best solution for selling digital products, services, and memberships with WordPress." +msgstr "" + +#: src/Admin/Promos/About.php:224 +msgid "Thanks for being the best part of Easy Digital Downloads!" +msgstr "" + +#: src/Admin/Promos/About.php:230 +msgid "The Awesome Motive Team photo" +msgstr "" + +#: src/Admin/Promos/About.php:232 +msgid "The Awesome Motive Team" +msgstr "" + +#. translators: %s: status label. +#: src/Admin/Promos/About.php:273 +msgctxt "The status of an installed WordPress plugin" +msgid "Status: %s" +msgstr "" + +#: src/Admin/Promos/About.php:317 +msgid "How to Get Started" +msgstr "" + +#: src/Admin/Promos/About.php:320 +#: src/Admin/Promos/About.php:334 +msgid "Welcome to Easy Digital Downloads" +msgstr "" + +#: src/Admin/Promos/About.php:323 +msgid "The best WordPress eCommerce plugin for selling digital downloads. Start selling eBooks, software, music, digital art, and more within minutes. Accept payments, manage subscriptions, advanced access control, and more." +msgstr "" + +#: src/Admin/Promos/About.php:327 +msgid "Launch Setup Wizard" +msgstr "" + +#: src/Admin/Promos/About.php:328 +msgid "Read the Setup Guide" +msgstr "" + +#: src/Admin/Promos/About.php:347 +msgid "Get Easy Digital Downloads (Pro) and Unlock your Growth Potential" +msgstr "" + +#: src/Admin/Promos/About.php:353 +msgid "Thanks for being a loyal Easy Digital Downloads user. Upgrade to Easy Digital Downloads (Pro) to unlock all the awesome features and experience why Easy Digital Downloads is regarded as the best eCommerce plugin for digital products and services." +msgstr "" + +#. translators: %s: stars. +#: src/Admin/Promos/About.php:366 +msgid "We know that you will truly love Easy Digital Downloads. It has over 450+ five star ratings (%s) and over 50,000+ professionals and creators use it to run their businesses and projects." +msgstr "" + +#: src/Admin/Promos/About.php:387 +msgid "Sell subscriptions for products and services" +msgstr "" + +#: src/Admin/Promos/About.php:391 +msgid "Remove additional transaction fees" +msgstr "" + +#: src/Admin/Promos/About.php:395 +msgid "Add customers to your email subscriber list" +msgstr "" + +#: src/Admin/Promos/About.php:399 +msgid "Give away lead magnets to grow your email list" +msgstr "" + +#: src/Admin/Promos/About.php:403 +msgid "Build advanced product bundles" +msgstr "" + +#: src/Admin/Promos/About.php:411 +msgid "Connect with over 6,000+ apps and services" +msgstr "" + +#: src/Admin/Promos/About.php:415 +msgid "Support selling in multiple currencies" +msgstr "" + +#: src/Admin/Promos/About.php:419 +msgid "Collect product reviews from your customers" +msgstr "" + +#: src/Admin/Promos/About.php:423 +msgid "Add product recommendations, cross-sells, and upsells" +msgstr "" + +#: src/Admin/Promos/About.php:427 +msgid "Create advanced purchase receipt conditions" +msgstr "" + +#. translators: 1: opening link tag, 2. closing link tag. +#: src/Admin/Promos/About.php:446 +msgid "%1$sUpgrade to Pro Today%2$s" +msgstr "" + +#: src/Admin/Promos/About.php:456 +msgid "Bonus: Free Easy Digital Downloads users get 50% off regular price, automatically applied at checkout." +msgstr "" + +#: src/Admin/Promos/About.php:473 +msgid "An Introduction to Easy Digital Downloads" +msgstr "" + +#: src/Admin/Promos/About.php:475 +msgid "If you're already generally familiar with eCommerce in WordPress then this document should help you get up to speed with Easy Digital Downloads quite quickly. Unless otherwise noted, everything in this document deals with core features." +msgstr "" + +#: src/Admin/Promos/About.php:479 +msgid "How to Install and Activate EDD Extensions" +msgstr "" + +#: src/Admin/Promos/About.php:481 +msgid "Would you like to access Easy Digital Downloads extensions to extend the functionality of your store? Each EDD pass level comes with its own set of extensions to help you get the most out of your store." +msgstr "" + +#: src/Admin/Promos/About.php:485 +msgid "Using the Included Easy Digital Downloads Blocks" +msgstr "" + +#: src/Admin/Promos/About.php:487 +msgid "Creating your store has never been easier than when using the included Easy Digital Downloads Blocks, fully integrated with the WordPress Block Editor. Learn about what blocks come with Easy Digital Downloads and how you can use them on your store." +msgstr "" + +#: src/Admin/Promos/About.php:491 +msgid "Configuring Cache for Easy Digital Downloads" +msgstr "" + +#: src/Admin/Promos/About.php:493 +msgid "Caching plugins and services are designed to help ensure your site responds as quickly as possible. We understand that a fast store converts better than a slow store. We've worked with multiple caching solutions to write up guides on how to configure their plugin or services to work best with Easy Digital Downloads." +msgstr "" + +#: src/Admin/Promos/About.php:514 +msgid "Read Documentation" +msgstr "" + +#: src/Admin/Promos/About.php:537 +msgid "OptinMonster" +msgstr "" + +#: src/Admin/Promos/About.php:538 +msgid "Instantly get more subscribers, leads, and sales with the #1 conversion optimization toolkit. Create high converting popups, announcement bars, spin a wheel, and more with smart targeting and personalization." +msgstr "" + +#: src/Admin/Promos/About.php:545 +msgid "MonsterInsights" +msgstr "" + +#: src/Admin/Promos/About.php:546 +msgid "The leading WordPress analytics plugin that shows you how people find and use your website, so you can make data driven decisions to grow your business. Properly set up Google Analytics without writing code." +msgstr "" + +#: src/Admin/Promos/About.php:551 +msgid "MonsterInsights Pro" +msgstr "" + +#: src/Admin/Promos/About.php:559 +msgid "WP Mail SMTP" +msgstr "" + +#: src/Admin/Promos/About.php:560 +msgid "Improve your WordPress email deliverability and make sure that your website emails reach user's inbox with the #1 SMTP plugin for WordPress. Over 3 million websites use it to fix WordPress email issues." +msgstr "" + +#: src/Admin/Promos/About.php:565 +msgid "WP Mail SMTP Pro" +msgstr "" + +#: src/Admin/Promos/About.php:573 +msgid "AIOSEO" +msgstr "" + +#: src/Admin/Promos/About.php:574 +msgid "The original WordPress SEO plugin and toolkit that improves your website's search rankings. Comes with all the SEO features like Local SEO, WooCommerce SEO, sitemaps, SEO optimizer, schema, and more." +msgstr "" + +#: src/Admin/Promos/About.php:579 +msgid "AIOSEO Pro" +msgstr "" + +#: src/Admin/Promos/About.php:587 +msgid "SeedProd" +msgstr "" + +#: src/Admin/Promos/About.php:588 +msgid "The fastest drag & drop landing page builder for WordPress. Create custom landing pages without writing code, connect them with your CRM, collect subscribers, and grow your audience. Trusted by 1 million sites." +msgstr "" + +#: src/Admin/Promos/About.php:593 +msgid "SeedProd Pro" +msgstr "" + +#: src/Admin/Promos/About.php:601 +msgid "RafflePress" +msgstr "" + +#: src/Admin/Promos/About.php:602 +#: src/Admin/Promos/About.php:609 +msgid "Turn your website visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with the most powerful giveaways & contests plugin for WordPress." +msgstr "" + +#: src/Admin/Promos/About.php:608 +msgid "RafflePress Pro" +msgstr "" + +#: src/Admin/Promos/About.php:617 +msgid "PushEngage" +msgstr "" + +#: src/Admin/Promos/About.php:618 +msgid "Connect with your visitors after they leave your website with the leading web push notification software. Over 10,000+ businesses worldwide use PushEngage to send 15 billion notifications each month." +msgstr "" + +#: src/Admin/Promos/About.php:625 +msgid "Smash Balloon Instagram Feeds" +msgstr "" + +#: src/Admin/Promos/About.php:626 +msgid "Easily display Instagram content on your WordPress site without writing any code. Comes with multiple templates, ability to show content from multiple accounts, hashtags, and more. Trusted by 1 million websites." +msgstr "" + +#: src/Admin/Promos/About.php:631 +msgid "Smash Balloon Instagram Feeds Pro" +msgstr "" + +#: src/Admin/Promos/About.php:639 +msgid "Smash Balloon Facebook Feeds" +msgstr "" + +#: src/Admin/Promos/About.php:640 +#: src/Admin/Promos/About.php:647 +msgid "Easily display Facebook content on your WordPress site without writing any code. Comes with multiple templates, ability to embed albums, group content, reviews, live videos, comments, and reactions." +msgstr "" + +#: src/Admin/Promos/About.php:646 +msgid "Smash Balloon Facebook Feeds Pro" +msgstr "" + +#: src/Admin/Promos/About.php:655 +msgid "Smash Balloon YouTube Feeds" +msgstr "" + +#: src/Admin/Promos/About.php:656 +msgid "Easily display YouTube videos on your WordPress site without writing any code. Comes with multiple layouts, ability to embed live streams, video filtering, ability to combine multiple channel videos, and more." +msgstr "" + +#: src/Admin/Promos/About.php:661 +msgid "Smash Balloon YouTube Feeds Pro" +msgstr "" + +#: src/Admin/Promos/About.php:669 +msgid "Smash Balloon Twitter Feeds" +msgstr "" + +#: src/Admin/Promos/About.php:670 +msgid "Easily display Twitter content in WordPress without writing any code. Comes with multiple layouts, ability to combine multiple Twitter feeds, Twitter card support, tweet moderation, and more." +msgstr "" + +#: src/Admin/Promos/About.php:675 +msgid "Smash Balloon Twitter Feeds Pro" +msgstr "" + +#: src/Admin/Promos/About.php:683 +msgid "TrustPulse" +msgstr "" + +#: src/Admin/Promos/About.php:684 +msgid "Boost your sales and conversions by up to 15% with real-time social proof notifications. TrustPulse helps you show live user activity and purchases to help convince other users to purchase." +msgstr "" + +#: src/Admin/Promos/About.php:691 +msgid "SearchWP" +msgstr "" + +#: src/Admin/Promos/About.php:692 +msgid "The most advanced WordPress search plugin. Customize your WordPress search algorithm, reorder search results, track search metrics, and everything you need to leverage search to grow your business." +msgstr "" + +#: src/Admin/Promos/About.php:700 +msgid "AffiliateWP" +msgstr "" + +#: src/Admin/Promos/About.php:701 +msgid "The #1 affiliate management plugin for WordPress. Easily create an affiliate program for your eCommerce store or membership site within minutes and start growing your sales with the power of referral marketing." +msgstr "" + +#: src/Admin/Promos/About.php:709 +msgid "WP Simple Pay" +msgstr "" + +#: src/Admin/Promos/About.php:710 +msgid "The #1 Stripe payments plugin for WordPress. Start accepting one-time and recurring payments on your WordPress site without setting up a shopping cart. No code required." +msgstr "" + +#: src/Admin/Promos/About.php:715 +msgid "WP Simple Pay Pro" +msgstr "" + +#: src/Admin/Promos/About.php:723 +msgid "WPForms" +msgstr "" + +#: src/Admin/Promos/About.php:724 +msgid "The best drag & drop WordPress form builder. Easily create beautiful contact forms, surveys, payment forms, and more with our 100+ form templates. Trusted by over 4 million websites as the best forms plugin." +msgstr "" + +#: src/Admin/Promos/About.php:729 +msgid "WPForms Pro" +msgstr "" + +#: src/Admin/Promos/About.php:737 +msgid "Sugar Calendar" +msgstr "" + +#: src/Admin/Promos/About.php:738 +msgid "A simple & powerful event calendar plugin for WordPress that comes with all the event management features including payments, scheduling, timezones, ticketing, recurring events, and more." +msgstr "" + +#: src/Admin/Promos/About.php:743 +msgid "Sugar Calendar Pro" +msgstr "" + +#: src/Admin/Promos/About.php:751 +msgid "WP Charitable" +msgstr "" + +#: src/Admin/Promos/About.php:752 +msgid "Top-rated WordPress donation and fundraising plugin. Over 10,000+ non-profit organizations and website owners use Charitable to create fundraising campaigns and raise more money online." +msgstr "" + +#: src/Admin/Promos/About.php:759 +msgid "WPCode" +msgstr "" + +#: src/Admin/Promos/About.php:760 +msgid "Future proof your WordPress customizations with the most popular code snippet management plugin for WordPress. Trusted by over 1,500,000+ websites for easily adding code to WordPress right from the admin area." +msgstr "" + +#: src/Admin/Promos/About.php:765 +msgid "WPCode Pro" +msgstr "" + +#: src/Admin/Promos/About.php:773 +msgid "Duplicator" +msgstr "" + +#: src/Admin/Promos/About.php:774 +msgid "Leading WordPress backup & site migration plugin. Over 1,500,000+ smart website owners use Duplicator to make reliable and secure WordPress backups to protect their websites. It also makes website migration really easy." +msgstr "" + +#: src/Admin/Promos/About.php:779 +msgid "Duplicator Pro" +msgstr "" + +#: src/Admin/Promos/About.php:835 +msgid "Installed & Active" +msgstr "" + +#: src/Admin/Promos/About.php:847 +msgid "Not Installed" +msgstr "" + +#: src/Admin/Promos/About.php:848 +msgid "Install Plugin" +msgstr "" + +#: src/Admin/Promos/Footer/FlyoutMenu.php:43 +msgid "See Quick Links" +msgstr "" + +#: src/Admin/Promos/Footer/FlyoutMenu.php:96 +#: src/Admin/SiteHealth/Licenses.php:116 +msgid "Upgrade to EDD (Pro)" +msgstr "" + +#: src/Admin/Promos/Footer/FlyoutMenu.php:113 +msgid "Activate Your License" +msgstr "" + +#: src/Admin/Promos/Footer/FlyoutMenu.php:125 +msgid "Get a License" +msgstr "" + +#: src/Admin/Promos/Footer/FlyoutMenu.php:153 +msgid "Contact Support" +msgstr "" + +#: src/Admin/Promos/Footer/Links.php:35 +msgid "Support" +msgstr "" + +#: src/Admin/Promos/Footer/Links.php:46 +msgid "Docs" +msgstr "" + +#: src/Admin/Promos/Footer/Links.php:55 +msgid "Free Plugins" +msgstr "" + +#: src/Admin/Promos/Footer/Links.php:64 +msgid "Made with ♥ by the Easy Digital Downloads Team" +msgstr "" + +#: src/Admin/Promos/Footer/Links.php:131 +msgid "X (Formerly Twitter)" +msgstr "" + +#. translators: $1$s - Easy Digital Downloads plugin name, $2$s - Full markup for WP.org review link, $3$s - Full markup for WP.org review link. +#: src/Admin/Promos/Footer/Review.php:30 +msgid "Please rate %1$s %2$s on %3$s to help us spread the word." +msgstr "" + +#: src/Admin/Promos/Notices/Emails.php:48 +#: src/Admin/Promos/Notices/Emails.php:88 +msgid "Need More Emails?" +msgstr "" + +#: src/Admin/Promos/Notices/Emails.php:50 +msgid "Super charge your eCommerce store with these extensions which support custom emails:" +msgstr "" + +#: src/Admin/Promos/Notices/Emails.php:90 +msgid "Super charge your ecommerce store with custom emails:" +msgstr "" + +#. translators: %1$s opening anchor tag; %2$s closing anchor tag +#: src/Admin/Promos/Notices/License_Upgrade_Notice.php:167 +msgid "You are using the free version of Easy Digital Downloads. %1$sPurchase a pass%2$s to get email marketing tools and recurring payments. Already have a Pass? %3$sActivate it now%4$s" +msgstr "" + +#. translators: %1$s opening anchor tag; %2$s closing anchor tag +#: src/Admin/Promos/Notices/License_Upgrade_Notice.php:184 +msgid "For access to additional Easy Digital Downloads extensions to grow your store, consider %1$spurchasing a pass%2$s." +msgstr "" + +#. translators: %1$s opening anchor tag; %2$s closing anchor tag +#: src/Admin/Promos/Notices/License_Upgrade_Notice.php:199 +msgid "You are using Easy Digital Downloads with a Personal Pass. Consider %1$supgrading%2$s to get recurring payments and more." +msgstr "" + +#. translators: %1$s opening anchor tag; %2$s closing anchor tag +#: src/Admin/Promos/Notices/License_Upgrade_Notice.php:216 +msgid "Grow your business and make more money with affiliate marketing. %1$sGet AffiliateWP%2$s" +msgstr "" + +#. translators: %1$s opening anchor tag; %2$s closing anchor tag +#: src/Admin/Promos/Notices/License_Upgrade_Notice.php:223 +msgid "Gain access to powerful insights to grow your traffic and revenue. %1$sGet MonsterInsights%2$s" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:38 +msgid "Thanks for your interest in Easy Digital Downloads (Pro)!" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:39 +msgid "After purchasing a license, just enter your license key on the EDD Settings page. This will let your site automatically upgrade to Easy Digital Downloads (Pro)!" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:40 +msgid "(Don't worry, all your products, orders, and settings will be preserved.)" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:69 +msgid "Pro Payment Gateways" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:70 +msgid "Email Marketing Integrations" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:71 +msgid "Sell Subscriptions" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:72 +msgid "Build Lead Magnets" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:73 +msgid "Advanced Bundle Features" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:74 +msgid "Automate Your Business" +msgstr "" + +#: src/Admin/Promos/Notices/Lite.php:103 +msgid "Have a question? Let us know!" +msgstr "" + +#: src/Admin/Promos/Notices/Notice.php:150 +msgid "Dismiss notice" +msgstr "" + +#: src/Admin/Promos/PromoHandler.php:152 +#: src/Admin/Promos/PromoHandler.php:186 +msgid "Missing notice ID." +msgstr "" + +#: src/Admin/Settings/EmailMarketing.php:64 +msgid "Email Marketing" +msgstr "" + +#. translators: the product name +#: src/Admin/Settings/EmailMarketing.php:80 +msgid "Get %s Today!" +msgstr "" + +#: src/Admin/Settings/EmailMarketing.php:95 +msgid "Looks like you have an email marketing extension installed, but we support more providers!" +msgstr "" + +#: src/Admin/Settings/Invoices.php:72 +msgid "Attractive Invoices For Your Customers" +msgstr "" + +#: src/Admin/Settings/Invoices.php:75 +msgid "Generate Attractive Invoices" +msgstr "" + +#: src/Admin/Settings/Invoices.php:76 +msgid "Build Customer Confidence" +msgstr "" + +#: src/Admin/Settings/Invoices.php:77 +msgid "PDF Download Support" +msgstr "" + +#: src/Admin/Settings/Invoices.php:78 +msgid "Include in Purchase Emails" +msgstr "" + +#: src/Admin/Settings/Invoices.php:79 +msgid "Customizable Templates" +msgstr "" + +#: src/Admin/Settings/Invoices.php:92 +msgid "Impress customers and build customer loyalty with attractive invoices. Making it easy to locate, save, and print purchase history builds trust with customers." +msgstr "" + +#: src/Admin/Settings/Invoices.php:93 +msgid "Provide a professional experience with customizable templates and one-click PDF downloads. " +msgstr "" + +#: src/Admin/Settings/Pointers.php:51 +msgid "Update your Store's Country" +msgstr "" + +#: src/Admin/Settings/Pointers.php:52 +msgid "Your store does not have the Business Country set. Easy Digital Downloads uses this setting to properly configure settings for your store. Please update your country to get the best experience." +msgstr "" + +#: src/Admin/Settings/Recurring.php:73 +msgid "Increase Revenue By Selling Subscriptions!" +msgstr "" + +#: src/Admin/Settings/Recurring.php:76 +msgid "Flexible Recurring Payments" +msgstr "" + +#: src/Admin/Settings/Recurring.php:77 +msgid "Custom Reminder Emails" +msgstr "" + +#: src/Admin/Settings/Recurring.php:78 +msgid "Free Trial Support" +msgstr "" + +#: src/Admin/Settings/Recurring.php:79 +msgid "Signup Fees" +msgstr "" + +#: src/Admin/Settings/Recurring.php:80 +msgid "Recurring Revenue Reports" +msgstr "" + +#: src/Admin/Settings/Recurring.php:93 +msgid "Grow stable income by selling subscriptions and make renewals hassle free for your customers." +msgstr "" + +#: src/Admin/Settings/Recurring.php:94 +msgid "When your customers are automatically billed, you reduce the risk of missed payments and retain more customers." +msgstr "" + +#: src/Admin/Settings/Recurring.php:111 +msgid "Subscriptions" +msgstr "" + +#: src/Admin/Settings/Reviews.php:73 +msgid "Build Trust With Real Customer Reviews" +msgstr "" + +#: src/Admin/Settings/Reviews.php:79 +msgid "Request Reviews" +msgstr "" + +#: src/Admin/Settings/Reviews.php:80 +msgid "Incentivize Reviewers" +msgstr "" + +#: src/Admin/Settings/Reviews.php:81 +msgid "Full Schema.org Support" +msgstr "" + +#: src/Admin/Settings/Reviews.php:82 +msgid "Embed Reviews Via Blocks" +msgstr "" + +#: src/Admin/Settings/Reviews.php:83 +msgid "Limit Reviews to Customers" +msgstr "" + +#: src/Admin/Settings/Reviews.php:84 +msgid "Vendor Reviews (with Frontend Submissions)" +msgstr "" + +#: src/Admin/Settings/Reviews.php:98 +msgid "Increase sales on your site with social proof. 70% of online shoppers don't purchase before reading reviews." +msgstr "" + +#: src/Admin/Settings/Reviews.php:99 +msgid "Easily collect, manage, and beautifully display reviews all from your WordPress dashboard." +msgstr "" + +#: src/Admin/Settings/Reviews.php:116 +msgid "Reviews" +msgstr "" + +#: src/Admin/Settings/Reviews.php:136 +msgid "Product Reviews" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:47 +msgid "Template" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:48 +msgid "Choose a template. Once you've saved your changes, preview an email to see the new template." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:55 +msgid "Upload or choose a logo to be displayed at the top of sales receipt emails. Displayed on HTML emails only." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:61 +msgid "This should be your site or shop name. Defaults to Site Title if empty." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:69 +msgid "This will act as the \"from\" and \"reply-to\" addresses." +msgstr "" + +#. translators: %s: admin email +#: src/Admin/Settings/Tabs/Emails.php:79 +msgid "Enter the email address(es) that may receive admin notices. One per line. Leave blank to use %s." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:95 +msgid "Purchase Email Subject" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:96 +msgid "Enter the subject line for the purchase receipt email." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:98 +#: src/Admin/Settings/Tabs/Emails.php:105 +#: src/Admin/Settings/Tabs/Emails.php:109 +#: src/Emails/Templates/OrderReceipt.php:55 +#: src/Emails/Templates/OrderReceipt.php:76 +#: src/Emails/Templates/OrderReceipt.php:77 +msgid "Purchase Receipt" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:102 +msgid "Purchase Email Heading" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:103 +msgid "Enter the heading for the purchase receipt email." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:110 +#: src/Emails/Templates/OrderReceipt.php:65 +msgid "Text to email customers after completing a purchase. Personalize with HTML and {tag} markers." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:115 +msgid "Disable Order Receipt" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:116 +msgid "Do not send purchase receipt emails to customers through Easy Digital Downloads." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:123 +msgid "Sale Notification Subject" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:124 +msgid "Enter the subject line for the sale notification email." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:130 +msgid "Sale Notification Heading" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:131 +msgid "Enter the heading for the sale notification email." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:133 +#: src/Emails/Templates/AdminOrderNotice.php:91 +msgid "New Sale!" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:137 +msgid "Sale Notification" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:138 +#: src/Emails/Templates/AdminOrderNotice.php:75 +msgid "Text to email as a notification for every completed purchase. Personalize with HTML and {tag} markers." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:143 +msgid "Disable Admin Notifications" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:144 +msgid "Check this box if you do not want to receive sales notification emails." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:162 +msgid "Email Frequency" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:167 +msgid "Weekly" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:168 +msgid "Monthly" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:173 +msgid "Email Recipient" +msgstr "" + +#. translators: email +#: src/Admin/Settings/Tabs/Emails.php:178 +msgid "Administrator: %s" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:186 +msgid "Enter the email address(es) that should receive Email Summaries. One per line." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:201 +msgid "Send Report Summaries" +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:203 +msgid "Enable the summary emails." +msgstr "" + +#: src/Admin/Settings/Tabs/Emails.php:232 +msgid "The summary email is not yet scheduled. Save the settings to manually schedule it." +msgstr "" + +#. translators: formatted date +#: src/Admin/Settings/Tabs/Emails.php:239 +msgid "The next summary email is scheduled to send on %s." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:46 +msgid "Active Gateways" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:47 +msgid "Choose the payment gateways you want to enable." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:53 +msgid "Default Gateway" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:54 +msgid "Choose the gateway your checkout will use by default.
    If you choose Automatic, the first enabled gateway from the Active Gateways will be used." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:60 +msgid "Payment Method Icons" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:61 +msgid "Display icons for the selected payment methods." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:61 +msgid "You will also need to configure your gateway settings if you are accepting credit cards." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:78 +msgid "Enforce SSL on Checkout" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:79 +msgid "Redirect all customers to the secure checkout page. You must have an SSL certificate installed to use this option." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:87 +#: src/Admin/Settings/Tabs/Gateways.php:90 +msgid "Redirect to Checkout" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:88 +msgid "Immediately redirect to checkout after adding an item to the cart?" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:91 +msgid "When enabled, once an item has been added to the cart, the customer will be redirected directly to your checkout page. This is useful for stores that sell single items." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:95 +msgid "Customer Registration" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:97 +msgid "You may allow customers to place orders without a user account." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:99 +msgid "Setting this to auto will create a user account if one does not exist for a customer." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:101 +msgid "Allow customers to place orders without an account" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:102 +msgid "Customers must log in or create an account to purchase" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:103 +msgid "Automatically register new user accounts" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:109 +msgid "Enable Cart Saving" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:110 +msgid "Allow users to temporarily save their cart at checkout." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:112 +msgid "Cart Saving" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:113 +msgid "Cart saving allows shoppers to create a temporary link to their current shopping cart so they can come back to it later, or share it with someone." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:117 +msgid "Geolocation Detection" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:127 +#: src/Admin/Settings/Tabs/Gateways.php:130 +msgid "Moderation" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:131 +msgid "It is sometimes necessary to temporarily prevent certain potential customers from checking out. Use these settings to control who can make purchases." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:136 +msgid "Emails placed in the box above will not be allowed to make purchases." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:136 +msgid "One per line, enter: email addresses, domains (@example.com), or TLDs (.gov)." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:138 +msgid "@example.com" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:148 +msgid "As a shop owner, sometimes refunds are necessary. Use these settings to decide how refunds will work in your shop." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:152 +msgid "Default Status" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:153 +msgid "This will be the store default. It can be changed at a per-product level." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:161 +msgid "Number of days (after a sale) when refunds can be processed.
    Default is 30 days. Set to 0 for infinity. It can be changed at a per-product level." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:184 +msgid "Enable Test Mode" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:185 +msgid "What is Test Mode?" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:186 +msgid "While test mode is enabled, no live transactions are processed.
    Use test mode in conjunction with the sandbox/test account for the payment gateways to test your checkout process." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:200 +msgid "Forced Test Mode" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:201 +msgid "You currently cannot modify the Test Mode setting, as the 'EDD_TEST_MODE' constant has been defined as 'true' or the edd_is_test_mode filter is being forced to 'true'." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:217 +msgid "Enable SKU Entry" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:218 +msgid "SKUs will be shown on purchase receipt and exported purchase histories." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:223 +msgid "Enable Sequential Numbering" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:224 +msgid "Sequential Order Numbers" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:225 +msgid "This setting will not impact previous orders. Future orders will be assigned a sequential number." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:231 +msgid "Sequential Number Prefix" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:232 +msgid "A prefix to prepend to all sequential order numbers." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:237 +msgid "Sequential Number Postfix" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:238 +msgid "A postfix to append to all sequential order numbers." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:246 +msgid "Advanced Order Numbers" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:265 +msgid "Sequential Starting Number" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:266 +msgid "The number at which the sequence should begin." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:274 +msgid "Once sequential order numbering is active, the starting number cannot be updated to an order number that's smaller than the highest order number. Update this with care." +msgstr "" + +#. translators: %s: next order number, wrapped in code tags +#: src/Admin/Settings/Tabs/Gateways.php:278 +msgid "The next order number will be %s." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:293 +msgid "Gain access to even more control over your order numbering!" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:295 +msgid "Track free orders in a separate sequential series" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:296 +msgid "Assign temporary numbers to incomplete orders" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:297 +msgid "Abandoned orders do not interrupt the complete order series" +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: src/Admin/Settings/Tabs/Gateways.php:319 +msgid "Access %1$sAdvanced Sequential Order Numbers%2$s today." +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: src/Admin/Settings/Tabs/Gateways.php:352 +msgid "GeoLocation Detection is only available in Easy Digital Downloads Pro. %1$sVerify your pass to get access to pro features.%2$s" +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: src/Admin/Settings/Tabs/Gateways.php:368 +msgid "Increase conversions by auto-filling address information for customers during checkout. To enable GeoLocation Detection, %1$sUpgrade to Pro%2$s." +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:382 +msgid "Registration and Login Forms" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:383 +msgid "Registration Form Only" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:384 +msgid "Login Form Only" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:394 +msgid "Show Register / Login Form" +msgstr "" + +#: src/Admin/Settings/Tabs/Gateways.php:395 +msgid "Display the registration and login forms on the checkout page for non-logged-in users." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:45 +msgid "Business Info" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:48 +msgid "Business Information" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:49 +msgid "Easy Digital Downloads uses the following business information for things like pre-populating tax fields, and connecting third-party services with the same information." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:53 +msgid "Business Name" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:54 +msgid "The official (legal) name of your store. Defaults to Site Title if empty." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:61 +msgid "Business Type" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:62 +msgid "Choose \"Individual\" if you do not have an official/legal business ID, or \"Company\" if a registered business entity exists." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:65 +msgid "Individual" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:66 +msgid "Company" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:71 +msgid "Business Address" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:77 +msgid "Business Address (Extra)" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:83 +msgid "Business City" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:89 +msgid "Business Postal Code" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:96 +msgid "Business Country" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:101 +msgid "Select a country" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:108 +msgid "Business Region" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:121 +msgid "Page Settings" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:122 +msgid "Easy Digital Downloads uses the pages below for handling the display of checkout, purchase confirmation, purchase history, and purchase failures. If pages are deleted or removed in some way, they can be recreated manually from the Pages menu. When re-creating the pages, enter the shortcode shown in the page content area." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:126 +msgid "Primary Checkout Page" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:127 +msgid "This is the checkout page where buyers will complete their purchases.
    The [download_checkout] shortcode must be on this page." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:136 +msgid "This is the page buyers are sent to after completing their purchases.
    The [edd_receipt] shortcode should be on this page." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:145 +msgid "This is the page buyers are sent to if their transaction is cancelled or fails." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:154 +msgid "This page shows a complete purchase history for the current user, including download links.
    The [purchase_history] shortcode should be on this page." +msgstr "" + +#. translators: %s: home URL +#: src/Admin/Settings/Tabs/General.php:165 +msgid "If a customer logs in using the [edd_login] shortcode, this is the page they will be redirected to.
    Note: override using the redirect shortcode attribute: [edd_login redirect=\"%s\"]." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:180 +msgid "Currency Settings" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:181 +msgid "Different countries use different formatting for their currency. You will want to pick what most of your users will expect to use." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:186 +msgid "Choose your currency. Note that some payment gateways have currency restrictions." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:193 +msgid "Currency Position" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:194 +msgid "Choose the location of the currency sign." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:197 +msgid "Before ($10)" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:198 +msgid "After (10$)" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:203 +msgid "Thousands Separator" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:204 +msgid "The symbol to separate thousands. Usually , or .." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:213 +msgid "Decimal Separator" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:214 +msgid "The symbol to separate decimal points. Usually , or .." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:228 +msgid "API Settings" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:229 +msgid "The Easy Digital Downloads REST API provides access to store data through our API endpoints. Enable this setting if you would like all user accounts to be able to generate their own API keys." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:233 +msgid "Allow User Keys" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:234 +msgid "Allow all users to generate API keys." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:235 +msgid "Users who can manage_shop_settings are always allowed to generate keys." +msgstr "" + +#. translators: %s: API documentation URL +#: src/Admin/Settings/Tabs/General.php:243 +msgid "Visit the REST API documentation for further information." +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:275 +msgid "Request Logs" +msgstr "" + +#: src/Admin/Settings/Tabs/General.php:276 +msgid "Log public API requests." +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: src/Admin/Settings/Tabs/General.php:279 +msgid "Authenticated requests to the EDD API are always logged. %1$sView the API request logs.%2$s" +msgstr "" + +#: src/Admin/Settings/Tabs/Marketing.php:43 +msgid "Abandoned Cart Recovery" +msgstr "" + +#: src/Admin/Settings/Tabs/Marketing.php:49 +msgid "Multiple Discounts" +msgstr "" + +#: src/Admin/Settings/Tabs/Marketing.php:50 +msgid "Allow customers to use multiple discounts on the same purchase?" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:70 +msgid "Debug Mode" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:71 +msgid "Record important information to the debug log while troubleshooting." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:76 +msgid "Session Handling" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:80 +msgid "PHP Sessions" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:81 +msgid "Database Sessions" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:83 +msgid "Choose how you want to handle sessions. PHP based sessions are generally faster, but if you are experiencing issues with empty carts, database sessions may be more reliable." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:87 +msgid "Disable Styles" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:88 +msgid "Disable general EDD core styles for buttons, checkout fields, product pages, and other elements. EDD blocks will still load minimal styles." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:90 +msgid "Disabling Styles" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:91 +msgid "If your theme has a complete custom CSS file for Easy Digital Downloads, you may wish to disable our default styles. This is not recommended unless you're sure your theme has a complete custom CSS." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:95 +msgid "Cart Item Quantities" +msgstr "" + +#. translators: %s: Downloads plural label +#: src/Admin/Settings/Tabs/Misc.php:97 +msgid "Allow quantities to be adjusted when adding %s to the cart, and while viewing the checkout cart." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:103 +msgid "Remove Data on Uninstall" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:104 +msgid "Completely remove all EDD core data when the plugin is deleted." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:111 +msgid "Default Button Style" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:112 +msgid "Choose the style you want to use for the buttons." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:118 +msgid "Default Button Color" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:119 +msgid "Choose the color you want to use for the buttons." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:126 +msgid "Complete Purchase Text" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:127 +msgid "The button label for completing a purchase." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:133 +msgid "Complete Free Purchase Text" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:134 +msgid "The button label for completing a free purchase." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:140 +msgid "Add to Cart Text" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:141 +msgid "Text shown on the Add to Cart Buttons." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:147 +msgid "Checkout Button Text" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:148 +msgid "Text shown on the Add to Cart Button when the product is already in the cart." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:157 +#: src/Admin/Settings/Tabs/Misc.php:159 +msgid "Require Login" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:158 +msgid "Require a user to login before file download links deliver the file." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:160 +msgid "Download links expire after the link expiration setting, but you can restrict file downloads to only logged in users. Note: This may affect links from purchase receipts and customers if you have guest checkout enabled." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:165 +#: src/Admin/Settings/Tabs/Misc.php:168 +msgid "Download Method" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:166 +msgid "Select the file download method. Note, not all methods work on all servers." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:169 +msgctxt "Tooltip Display: Quotations must use escaped single quotes, for example \\'forced\\'" +msgid "Due to its consistency in multiple platforms and better file protection, 'forced' is the default method. Because Easy Digital Downloads uses PHP to process the file with the 'forced' method, larger files can cause problems with delivery, resulting in hitting the 'max execution time' of the server. If users are getting 404 or 403 errors when trying to access their purchased files when using the 'forced' method, changing to the 'redirect' method can help resolve this." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:175 +msgid "Forced" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:176 +msgid "Redirect" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:181 +msgid "Symbolically Link Files" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:182 +msgid "Check this if you are delivering really large files or having problems with file downloads completing." +msgstr "" + +#. translators: %s: Download singular label +#: src/Admin/Settings/Tabs/Misc.php:189 +msgid "The maximum number of times files can be downloaded for purchases. Can be overwritten for each %s." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:192 +msgid "File Download Limits" +msgstr "" + +#. translators: %s: Download singular label +#: src/Admin/Settings/Tabs/Misc.php:194 +msgid "Set the global default for the number of times a customer can download items they purchase. Using a value of 0 is unlimited. This can be defined on a %s-specific level as well. Download limits can also be reset for an individual purchase." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:198 +#: src/Admin/Settings/Tabs/Misc.php:200 +msgid "Download Link Expiration" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:199 +msgid "How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:201 +msgid "When a customer receives a link to their downloads via email, in their receipt, or in their purchase history, the link will only be valid for the timeframe (in hours) defined in this setting. Sending a new purchase receipt or visiting the account page will re-generate a valid link for the customer." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:209 +msgid "Limit File Access" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:210 +msgid "Only give customers access to download links right after they make a purchase." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:212 +msgid "Limiting Access" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:213 +msgctxt "It is important to escape any quotations within this string, specifically \\'File Download Limit\\'" +msgid "This will prevent customers from viewing download links on your site after their initial purchase session has expired. This does not restrict the number of times a file can be downloaded; you can set a limit on the number of times a user can download a file with the 'File Download Limit' setting." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:250 +msgid "Buy Now Text" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:251 +msgid "Text shown on the Buy Now Buttons." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:261 +msgid "Buy Now Disabled" +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:262 +msgid "Buy Now buttons are only available for stores that have a single supported gateway active and that do not use taxes." +msgstr "" + +#: src/Admin/Settings/Tabs/Misc.php:281 +msgid "View the Log" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:46 +msgid "Privacy Policy Settings" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:47 +msgid "Depending on legal and regulatory requirements, it may be necessary for your site to show a checkbox for agreement to a privacy policy." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:51 +#: src/Admin/Settings/Tabs/Privacy.php:81 +msgid "Agreement" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:52 +msgid "Customers must agree to your privacy policy before purchasing." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:57 +#: src/Admin/Settings/Tabs/Privacy.php:87 +msgid "Agreement Label" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:58 +msgid "Label for the \"Agree to Privacy Policy\" checkbox." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:60 +msgid "I agree to the privacy policy" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:65 +msgid "Privacy Policy on Checkout" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:66 +msgid "Display your Privacy Policy on checkout." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:66 +msgid "Set your Privacy Policy here" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:76 +msgid "Terms & Agreements Settings" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:77 +msgid "Depending on legal and regulatory requirements, it may be necessary for your site to show checkbox for agreement to terms." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:82 +msgid "Customers must agree to your terms before purchasing." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:88 +msgid "Label for the \"Agree to Terms\" checkbox." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:89 +msgid "I agree to the terms" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:95 +msgid "Agreement Text" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:113 +msgid "Order Statuses" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:115 +msgid "When a user requests to be anonymized or removed from a site, these are the actions that will be taken on payments associated with their customer, by status." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:116 +msgid "What settings should I use?" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:117 +msgid "By default, Easy Digital Downloads sets suggested actions based on the Payment Status. These are purely recommendations, and you may need to change them to suit your store's needs. If you are unsure, you can safely leave these settings as is." +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:121 +msgid "Rules" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:123 +msgid "When a user wants their order history anonymized or removed, the following rules will be used:" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:128 +msgid "Do Nothing" +msgstr "" + +#: src/Admin/Settings/Tabs/Privacy.php:129 +msgid "Anonymize" +msgstr "" + +#. translators: %s: Tab class name. +#: src/Admin/Settings/Tabs/Tab.php:81 +msgid "The %s settings class is missing the required ID property." +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:43 +msgid "Enable Taxes" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:45 +msgid "Enabling Taxes" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:46 +msgid "With taxes enabled, customers will be taxed based on the rates you define, and are required to input their address on checkout so rates can be calculated accordingly." +msgstr "" + +#. translators: %s: tax setup documentation URL. +#: src/Admin/Settings/Tabs/Taxes.php:52 +msgid "Visit the Tax setup documentation for further information.

    If you need VAT support, there are options listed on the documentation page.

    " +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:57 +msgid "Prices Include Tax" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:58 +msgid "This option affects how you enter prices." +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:62 +msgid "Yes, I will enter prices inclusive of tax" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:63 +msgid "No, I will enter prices exclusive of tax" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:65 +msgid "Prices Inclusive of Tax" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:66 +msgid "When using prices inclusive of tax, you will be entering your prices as the total amount you want a customer to pay for the download, including tax. Easy Digital Downloads will calculate the proper amount to tax the customer for the defined total price." +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:70 +msgid "Show Tax Rate on Prices" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:71 +msgid "Some countries require a notice that product prices include tax." +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:76 +msgid "Show in Checkout" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:77 +msgid "Should prices on the checkout page be shown with or without tax?" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:81 +msgid "Including tax" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:82 +msgid "Excluding tax" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:84 +msgid "Taxes Displayed for Products on Checkout" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:85 +msgid "This option will determine whether the product price displays with or without tax on checkout." +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:103 +msgid "Regional Rates" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:104 +msgid "Configure rates for each region you wish to collect sales tax in." +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:119 +msgid "Default Rate" +msgstr "" + +#: src/Admin/Settings/Tabs/Taxes.php:121 +msgid "This setting is no longer used in this version of Easy Digital Downloads. We have migrated any fallback tax rates for you to verify below. Click \"Save Changes\" to dismiss this notice." +msgstr "" + +#: src/Admin/Settings/WP_SMTP.php:79 +msgid "Improve Email Deliverability" +msgstr "" + +#: src/Admin/Settings/WP_SMTP.php:98 +msgid "WP Mail SMTP allows you to easily set up WordPress to use a trusted provider to reliably send emails, including sales notifications." +msgstr "" + +#: src/Admin/Settings/WP_SMTP.php:140 +msgid "Ensure your emails are always delivered with WP Mail SMTP" +msgstr "" + +#: src/Admin/Settings/WP_SMTP.php:156 +msgid "Install & Activate WP Mail SMTP" +msgstr "" + +#: src/Admin/Settings/WP_SMTP.php:161 +msgid "Activate WP Mail SMTP" +msgstr "" + +#: src/Admin/Settings/WP_SMTP.php:179 +msgid "Configure WP Mail SMTP" +msgstr "" + +#: src/Admin/Settings/WP_SMTP.php:183 +msgid "Run the WP Mail SMTP Setup Wizard" +msgstr "" + +#: src/Admin/SiteHealth/Cron.php:26 +msgid "Easy Digital Downloads — Cron Events" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:17 +msgid "EDD Checkout Page" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:22 +msgid "Protected Download Files" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:28 +msgid "Enabled Gateways" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:34 +msgid "Cron Events" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:56 +msgid "You have a checkout page set" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:61 +msgid "Your checkout page is set up and ready to process orders." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:69 +msgid "Your checkout page is missing" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:76 +msgid "Easy Digital Downloads requires a specific checkout page to be set to easily handle user interactions." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:86 +msgid "Fix the Checkout Page" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:90 +msgid "Your checkout page is using the legacy shortcode" +msgstr "" + +#. translators: 1: opening tag, 2. closing tag +#: src/Admin/SiteHealth/Direct.php:97 +msgid "Your checkout page is configured; however, it is currently using the legacy %1$s[download_checkout]%2$s shortcode. We recommend changing your checkout to use the EDD Checkout Block." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:106 +msgid "Edit Checkout Page" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:121 +msgid "Your download files are protected" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:126 +msgid "Your checkout page is a critical part of your store." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:149 +msgid "Your download files may not be protected" +msgstr "" + +#. translators: 1: opening link tag, 2: closing link tag +#: src/Admin/SiteHealth/Direct.php:156 +msgid "To ensure the best protection, you should use this doc to add this %1$sNGINX redirect rule%2$s." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:160 +msgid "If you have already done this, you can disregard this notice." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:172 +msgid "No need to worry, you are using the recommended 'Forced' download method, and customers should never see the direct path to the files. The following action is still recommended, however." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:180 +msgid "You currently are using the 'Redirect' download method, which may expose your downloadable products. Either switch to the 'Forced' method or enable 'Symlinks'." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:191 +msgid "Protect your files" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:197 +msgid "Your current download method creates a temporary copy of the file for the customer to download. After they successfully download it, it is removed, ensuring they never have direct access to your product files." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:210 +msgid "Your download files are currently not protected" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:233 +msgid "Miscellaneous Settings" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:250 +msgid "You have at least one gateway enabled" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:255 +msgid "Fantastic! You have enabled a gateway and can accept orders." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:267 +msgid "Your store is not accepting payments" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:270 +msgid "To process orders that require payment, you must have a gateway enabled." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:274 +msgid "A gateway is a service, such as PayPal or Stripe, that allows your store to accept payments." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:278 +msgid "Stores that offer multiple ways for their customers to pay see higher conversion rates." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:291 +msgid "Configure a Gateway" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:310 +msgid "Scheduled events are running" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:315 +msgid "Easy Digital Downloads uses scheduled events in a number of ways to help maintain performance and stability." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:325 +msgid "Scheduled events are not running" +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:330 +msgid "Your site has cron events disabled. WordPress cron events should run at least every ten minutes for your store to manage order related events." +msgstr "" + +#: src/Admin/SiteHealth/Direct.php:331 +msgid "Some hosting providers disable cron events by default, in favor of their own solution to running WP_CRON. Please contact your hosting provider to confirm any necessary changes." +msgstr "" + +#: src/Admin/SiteHealth/Gateways.php:25 +msgid "Easy Digital Downloads — Gateways" +msgstr "" + +#: src/Admin/SiteHealth/General.php:43 +msgid "Easy Digital Downloads — General" +msgstr "" + +#: src/Admin/SiteHealth/General.php:214 +msgid "Unknown" +msgstr "" + +#: src/Admin/SiteHealth/Licenses.php:25 +msgid "Licensed Extensions" +msgstr "" + +#: src/Admin/SiteHealth/Licenses.php:39 +msgid "Your extensions are receiving updates" +msgstr "" + +#: src/Admin/SiteHealth/Licenses.php:44 +msgid "Your EDD extensions are all licensed and receiving updates." +msgstr "" + +#: src/Admin/SiteHealth/Licenses.php:53 +msgid "You are not receiving updates for some extensions" +msgstr "" + +#: src/Admin/SiteHealth/Licenses.php:58 +msgid "At least one of your extensions is missing a license key, or the license is expired. Your site may be missing critical software updates." +msgstr "" + +#: src/Admin/SiteHealth/Licenses.php:127 +msgid "Enter a license key for EDD (Pro)" +msgstr "" + +#: src/Admin/SiteHealth/Licenses.php:136 +msgid "Enter a license key for an extension" +msgstr "" + +#: src/Admin/SiteHealth/Pages.php:26 +msgid "Easy Digital Downloads — Pages" +msgstr "" + +#: src/Admin/SiteHealth/Sessions.php:26 +msgid "Easy Digital Downloads — Sessions" +msgstr "" + +#: src/Admin/SiteHealth/Tables.php:26 +msgid "Easy Digital Downloads — Custom Tables" +msgstr "" + +#: src/Admin/SiteHealth/Taxes.php:26 +msgid "Easy Digital Downloads — Taxes" +msgstr "" + +#: src/Admin/SiteHealth/Templates.php:26 +msgid "Easy Digital Downloads — Customized Templates" +msgstr "" + +#: src/Admin/Tools/Screen.php:70 +msgid "API Keys" +msgstr "" + +#: src/Admin/Tools/Screen.php:71 +msgid "Beta Versions" +msgstr "" + +#: src/Admin/Tools/Screen.php:73 +msgid "System Info" +msgstr "" + +#: src/Admin/Tools/Screen.php:75 +msgid "Import/Export" +msgstr "" + +#: src/Admin/Upgrades/v3/Customer_Addresses.php:31 +msgid "Customer addresses migration completed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Customer_Email_Addresses.php:31 +msgid "Customer email addresses migration completed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Customer_Notes.php:33 +msgid "Customer notes migration completed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Data_Migrator.php:408 +#: src/Upgrades/Orders/MigrateAfterActionsDate.php:199 +msgid "After payment actions processed." +msgstr "" + +#: src/Admin/Upgrades/v3/Data_Migrator.php:1362 +#: src/CLI/Migration/Discounts.php:60 +msgid "Legacy Discount" +msgstr "" + +#: src/Admin/Upgrades/v3/Discounts.php:31 +msgid "Discounts migration completed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Logs.php:31 +msgid "Logs migration completed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Orders.php:31 +msgid "Orders migration completed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Order_Notes.php:31 +msgid "Order notes migration completed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Remove_Legacy_Data.php:42 +msgid "Legacy data removed successfully." +msgstr "" + +#: src/Admin/Upgrades/v3/Tax_Rates.php:31 +msgid "Tax rates migration completed successfully." +msgstr "" + +#: src/Assets/Localization.php:60 +msgid "You have already added this item to your cart" +msgstr "" + +#: src/Assets/Localization.php:96 +msgid "Please select a payment method" +msgstr "" + +#: src/Assets/Localization.php:97 +msgid "Please enter a discount code" +msgstr "" + +#: src/Assets/Localization.php:99 +msgid "Discount Applied" +msgstr "" + +#: src/Assets/Localization.php:100 +msgid "Please enter an email address before applying a discount code" +msgstr "" + +#: src/Assets/Localization.php:101 +msgid "Please enter a username before applying a discount code" +msgstr "" + +#: src/Assets/Localization.php:102 +msgid "Please Wait..." +msgstr "" + +#: src/Checkout/AutoRegister.php:127 +msgid "Your site registers a new user account when an order is placed. You may allow free downloads without account creation." +msgstr "" + +#: src/CLI/Migration/CustomerEmails.php:35 +msgid "No customers with missing emails were found." +msgstr "" + +#: src/CLI/Migration/CustomerEmails.php:78 +msgid "Missing Customer Emails Added:" +msgstr "" + +#: src/CLI/Migration/Discounts.php:42 +msgid "No orders with missing discounts were found." +msgstr "" + +#: src/CLI/Migration/Discounts.php:76 +msgid "Missing Discounts Added:" +msgstr "" + +#: src/Cron/Events/Event.php:96 +msgid "A hook and schedule are required to schedule an event." +msgstr "" + +#. translators: %s: hook name that would be run for this WP Cron event. +#: src/Cron/Events/Event.php:109 +msgid "The event %s is already scheduled." +msgstr "" + +#: src/Cron/Events/SingleEvent.php:108 +msgid "The hook name must be a string." +msgstr "" + +#: src/Cron/Events/SingleEvent.php:116 +msgid "The run time must be an integer." +msgstr "" + +#: src/Cron/Events/SingleEvent.php:120 +msgid "The run time must be set." +msgstr "" + +#: src/Cron/Events/SingleEvent.php:124 +msgid "This event is already scheduled." +msgstr "" + +#: src/Cron/Schedules/Schedule.php:75 +msgid "An ID, interval, and display name must be provided." +msgstr "" + +#: src/Cron/Schedules/Schedule.php:80 +msgid "The interval must be at least 5 minutes." +msgstr "" + +#: src/Cron/Schedules/SessionCleanup.php:40 +msgid "Easy Digital Downloads Session Cleanup" +msgstr "" + +#: src/Downloads/Search.php:96 +#: src/HTML/ProductSelect.php:270 +msgid "All Price Options" +msgstr "" + +#: src/Downloads/Services.php:92 +msgid "Downloads as Services" +msgstr "" + +#: src/Downloads/Services.php:93 +msgid "Select the categories that contain services, or products with no downloadable files." +msgstr "" + +#: src/Downloads/Services.php:98 +msgid "Select categories" +msgstr "" + +#: src/Emails/Base.php:183 +msgid "Default Template" +msgstr "" + +#: src/Emails/Base.php:184 +msgid "No template, plain text only" +msgstr "" + +#: src/Emails/Base.php:319 +msgid "You cannot send email with EDD_Emails until init/admin_init has been reached" +msgstr "" + +#. translators: 1: To address, 2: Subject +#: src/Emails/Base.php:351 +msgid "" +"Email from Easy Digital Downloads failed to send. \n" +"To: %1$s\n" +"Subject: %2$s\n" +"\n" +"" +msgstr "" + +#: src/Emails/Registry.php:61 +msgid "An email ID and class must be provided." +msgstr "" + +#: src/Emails/Registry.php:66 +msgid "The email ID provided is already registered." +msgstr "" + +#: src/Emails/Registry.php:71 +msgid "The email class must exist and extend the EDD\\Emails\\Types\\Email class." +msgstr "" + +#: src/Emails/Registry.php:101 +msgid "The email ID provided is not registered." +msgstr "" + +#. translators: 1: The number of arguments provided. 2: The number of arguments required. 3: The class name. +#: src/Emails/Registry.php:113 +msgid "The number of arguments provided (%1$d) does not match the number of arguments required (%2$d) for %3$s." +msgstr "" + +#: src/Emails/Tags/Registry.php:61 +msgid "Download List" +msgstr "" + +#: src/Emails/Tags/Registry.php:62 +msgid "A list of download links for each download purchased." +msgstr "" + +#: src/Emails/Tags/Registry.php:70 +msgid "File URLs" +msgstr "" + +#: src/Emails/Tags/Registry.php:71 +msgid "A plain-text list of download URLs for each download purchased." +msgstr "" + +#: src/Emails/Tags/Registry.php:78 +msgid "The buyer's (or user's) first name." +msgstr "" + +#: src/Emails/Tags/Registry.php:84 +msgid "Full Name" +msgstr "" + +#: src/Emails/Tags/Registry.php:85 +msgid "The buyer's (or user's) full name: first and last." +msgstr "" + +#: src/Emails/Tags/Registry.php:92 +msgid "The buyer's (or user's) user name on the site, if they registered an account." +msgstr "" + +#: src/Emails/Tags/Registry.php:99 +msgid "The buyer's (or user's) email address." +msgstr "" + +#: src/Emails/Tags/Registry.php:106 +msgid "The buyer's billing address." +msgstr "" + +#: src/Emails/Tags/Registry.php:112 +msgid "Purchase Date" +msgstr "" + +#: src/Emails/Tags/Registry.php:113 +msgid "The date of the purchase." +msgstr "" + +#: src/Emails/Tags/Registry.php:120 +msgid "The price of the purchase before taxes." +msgstr "" + +#: src/Emails/Tags/Registry.php:133 +msgid "Fees Total" +msgstr "" + +#: src/Emails/Tags/Registry.php:134 +msgid "The total fees on the order, formatted with currency." +msgstr "" + +#: src/Emails/Tags/Registry.php:140 +msgid "Fees List" +msgstr "" + +#: src/Emails/Tags/Registry.php:141 +msgid "A list of all fees on the order, with amounts." +msgstr "" + +#: src/Emails/Tags/Registry.php:154 +msgid "Payment ID" +msgstr "" + +#: src/Emails/Tags/Registry.php:155 +msgid "The unique identifier for this purchase." +msgstr "" + +#: src/Emails/Tags/Registry.php:161 +msgid "Receipt ID" +msgstr "" + +#: src/Emails/Tags/Registry.php:162 +msgid "The unique identifier for the receipt of this purchase." +msgstr "" + +#: src/Emails/Tags/Registry.php:169 +msgid "The method of payment used for this purchase." +msgstr "" + +#: src/Emails/Tags/Registry.php:175 +msgid "Site Name" +msgstr "" + +#: src/Emails/Tags/Registry.php:176 +msgid "Your site name." +msgstr "" + +#: src/Emails/Tags/Registry.php:183 +msgid "Links to the EDD success page with the text \"View Receipt\"." +msgstr "" + +#: src/Emails/Tags/Registry.php:189 +msgid "Receipt Link" +msgstr "" + +#: src/Emails/Tags/Registry.php:190 +msgid "Adds a link so users can view their receipt directly on a simplified page on your site if they are unable to view it in the browser correctly." +msgstr "" + +#: src/Emails/Tags/Registry.php:196 +msgid "Discount Codes" +msgstr "" + +#: src/Emails/Tags/Registry.php:197 +msgid "Adds a list of any discount codes applied to this purchase." +msgstr "" + +#: src/Emails/Tags/Registry.php:204 +msgid "The buyer's IP Address." +msgstr "" + +#: src/Emails/Tags/Registry.php:210 +msgid "Login Link" +msgstr "" + +#: src/Emails/Tags/Registry.php:211 +msgid "The link to log into the site." +msgstr "" + +#: src/Emails/Tags/Registry.php:217 +msgid "Refund Link" +msgstr "" + +#: src/Emails/Tags/Registry.php:218 +msgid "The link to refund record in the EDD admin." +msgstr "" + +#: src/Emails/Tags/Registry.php:225 +msgid "Order Details Link" +msgstr "" + +#: src/Emails/Tags/Registry.php:226 +msgid "The link to the order details page in the EDD admin." +msgstr "" + +#: src/Emails/Tags/Registry.php:234 +msgid "The merchant transaction ID for this order. This is for admin emails only." +msgstr "" + +#: src/Emails/Tags/Registry.php:241 +msgid "Password Reset Link" +msgstr "" + +#: src/Emails/Tags/Registry.php:242 +msgid "The link to set the user's password. In an order receipt, this will only be included for the user's first purchase." +msgstr "" + +#: src/Emails/Tags/Registry.php:248 +msgid "Refund Amount" +msgstr "" + +#: src/Emails/Tags/Registry.php:249 +msgid "The amount that was refunded to the customer." +msgstr "" + +#: src/Emails/Tags/Registry.php:255 +msgid "Refund ID" +msgstr "" + +#: src/Emails/Tags/Registry.php:256 +msgid "The unique identifier for this refund." +msgstr "" + +#: src/Emails/Tags/Render.php:38 +msgid "Login" +msgstr "" + +#: src/Emails/Tags/Render.php:87 +msgid "Set your password" +msgstr "" + +#: src/Emails/Templates/AdminOrderNotice.php:65 +msgid "Admin Sale Notification" +msgstr "" + +#. translators: %s: The email tag that will be replaced with the payment ID. +#: src/Emails/Templates/AdminOrderNotice.php:90 +msgid "New download purchase - Order #%s" +msgstr "" + +#. translators: %s: The plural label for the Download post type. +#: src/Emails/Templates/AdminOrderNotice.php:120 +#: src/Emails/Templates/StripeEarlyFraudWarning.php:162 +msgid "Hello" +msgstr "" + +#. translators: %s: The plural label for the Download post type. +#: src/Emails/Templates/AdminOrderNotice.php:124 +msgid "A %s purchase has been made" +msgstr "" + +#. translators: %s: The plural label for the Download post type. +#: src/Emails/Templates/AdminOrderNotice.php:128 +#: src/Emails/Templates/StripeEarlyFraudWarning.php:167 +msgid "%s sold:" +msgstr "" + +#. translators: %s: The email tag that will be replaced by the customer's full name +#: src/Emails/Templates/AdminOrderNotice.php:133 +#: src/Emails/Templates/StripeEarlyFraudWarning.php:170 +msgid "Purchased by: %s" +msgstr "" + +#. translators: %s: The email tag that will be replaced by the order total. +#: src/Emails/Templates/AdminOrderNotice.php:136 +#: src/Emails/Templates/StripeEarlyFraudWarning.php:172 +msgctxt "Context: This is a tag (placholder) for email content that will be replaced when sending." +msgid "Amount: %s" +msgstr "" + +#. translators: %s: The email tag that will be replaced by the payment method. +#: src/Emails/Templates/AdminOrderNotice.php:139 +msgid "Payment Method: %s" +msgstr "" + +#: src/Emails/Templates/AdminOrderNotice.php:141 +msgid "Thank you" +msgstr "" + +#: src/Emails/Templates/AdminOrderRefund.php:73 +msgid "Admin Refund Notification" +msgstr "" + +#: src/Emails/Templates/AdminOrderRefund.php:83 +msgid "Text to email to admin(s) after issuing a refund." +msgstr "" + +#: src/Emails/Templates/AdminOrderRefund.php:94 +msgid "An order has been refunded" +msgstr "" + +#. translators: %s: The email tag that will be replaced with the order ID. +#: src/Emails/Templates/AdminOrderRefund.php:140 +msgid "Order %s has been refunded." +msgstr "" + +#: src/Emails/Templates/EmailTemplate.php:218 +msgid "This email cannot be disabled." +msgstr "" + +#: src/Emails/Templates/EmailTemplate.php:220 +msgid "This email cannot be enabled." +msgstr "" + +#: src/Emails/Templates/EmailTemplate.php:247 +msgid "This tag is required for this email." +msgstr "" + +#: src/Emails/Templates/NewUser.php:63 +msgid "New User Registration" +msgstr "" + +#: src/Emails/Templates/NewUser.php:73 +msgid "This email is sent to a new user when their account is registered via EDD." +msgstr "" + +#. translators: %s: Email tag that will be replaced with the Site's Name +#: src/Emails/Templates/NewUser.php:85 +msgctxt "Context: This is an email tag (placeholder) that will be replaced at the time of sending the email" +msgid "[%s] Your username and password" +msgstr "" + +#. translators: %s: Email tag that will be replaced with the username +#: src/Emails/Templates/NewUser.php:103 +#: src/Emails/Templates/NewUserAdmin.php:101 +#: src/Emails/Templates/PasswordReset.php:181 +msgctxt "Context: This is an email tag (placeholder) that will be replaced at the time of sending the email" +msgid "Username: %s" +msgstr "" + +#: src/Emails/Templates/NewUser.php:111 +msgid "Password: [entered on site]" +msgstr "" + +#: src/Emails/Templates/NewUserAdmin.php:63 +msgid "Admin New User Notification" +msgstr "" + +#: src/Emails/Templates/NewUserAdmin.php:73 +msgid "This email is sent to the store admin when a new user is registered." +msgstr "" + +#. translators: %s: Email tag that will be replaced with the user email +#: src/Emails/Templates/NewUserAdmin.php:111 +msgctxt "Context: This is an email tag (placeholder) that will be replaced at the time of sending the email" +msgid "E-mail: %s" +msgstr "" + +#: src/Emails/Templates/OrderReceipt.php:106 +msgid "Thank you for your purchase. Please click on the link(s) below to download your files." +msgstr "" + +#: src/Emails/Templates/OrderRefund.php:63 +msgid "Refund Issued" +msgstr "" + +#: src/Emails/Templates/OrderRefund.php:73 +msgid "Text to email customers after issuing a refund." +msgstr "" + +#: src/Emails/Templates/OrderRefund.php:84 +msgid "Your order has been refunded" +msgstr "" + +#: src/Emails/Templates/OrderRefund.php:130 +msgid "Your order has been refunded." +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:60 +msgid "Password Reset" +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:69 +msgid "This email is sent by WordPress when a user requests a password reset from the EDD Login block." +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:143 +msgid "This email cannot be disabled because it is managed and sent by WordPress." +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:145 +msgid "This email cannot be enabled because the login page has not been set." +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:147 +msgid "This email cannot be enabled because it has been disabled by code." +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:164 +msgid "Password Reset URL" +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:165 +msgid "The link for the user to reset their password." +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:176 +msgid "Someone has requested a password reset for the following account:" +msgstr "" + +#. translators: %s: Email tag that will be replaced with the site name +#: src/Emails/Templates/PasswordReset.php:178 +msgid "Site Name: %s" +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:188 +msgid "If this was a mistake, ignore this email and nothing will happen." +msgstr "" + +#: src/Emails/Templates/PasswordReset.php:189 +msgid "To reset your password, visit the following address:" +msgstr "" + +#. translators: %s: IP address of password reset requester. +#: src/Emails/Templates/PasswordReset.php:195 +msgid "This password reset request originated from the IP address %s." +msgstr "" + +#. translators: %s: Site name. +#: src/Emails/Templates/PasswordReset.php:219 +msgid "[%s] Password Reset" +msgstr "" + +#: src/Emails/Templates/Registry.php:79 +msgid "Admin" +msgstr "" + +#: src/Emails/Templates/Registry.php:95 +msgid "EDD Core" +msgstr "" + +#: src/Emails/Templates/Registry.php:96 +msgid "WordPress" +msgstr "" + +#: src/Emails/Templates/Registry.php:115 +msgid "Account" +msgstr "" + +#: src/Emails/Templates/Registry.php:132 +msgid "Add License Renewal Notice" +msgstr "" + +#: src/Emails/Templates/Registry.php:136 +msgid "Add Subscription Reminder" +msgstr "" + +#: src/Emails/Templates/Registry.php:140 +msgid "Add Per Product Email" +msgstr "" + +#: src/Emails/Templates/Registry.php:214 +msgid "Invalid email template." +msgstr "" + +#. translators: %1$s is the class name, %2$s is the parent class name. +#: src/Emails/Templates/Registry.php:219 +msgid "The %1$s class must extend the %2$s class." +msgstr "" + +#: src/Emails/Templates/StripeEarlyFraudWarning.php:80 +msgid "Stripe Early Fraud Warning" +msgstr "" + +#: src/Emails/Templates/StripeEarlyFraudWarning.php:90 +msgid "Be alerted when an early fraud warning is detected by Stripe's machine learning. Avoid disputes before they even happen by reviewing flagged orders to verify them." +msgstr "" + +#. translators: %s: Email tag that will be replaced with the order ID. +#: src/Emails/Templates/StripeEarlyFraudWarning.php:105 +msgid "Stripe Early Fraud Warning - Order #%s" +msgstr "" + +#: src/Emails/Templates/StripeEarlyFraudWarning.php:106 +msgid "Possible Fraudulent Order" +msgstr "" + +#: src/Emails/Templates/StripeEarlyFraudWarning.php:124 +msgid "This email is only available if the Stripe gateway is enabled and using the Payment Elements mode." +msgstr "" + +#: src/Emails/Templates/StripeEarlyFraudWarning.php:164 +msgid "Stripe has detected a potential fraudulent order." +msgstr "" + +#. translators: 1: The opening anchor tag, 2: The closing anchor tag +#: src/Emails/Templates/StripeEarlyFraudWarning.php:174 +msgid "%1$sOrder Details%2$s" +msgstr "" + +#: src/Emails/Templates/StripeEarlyFraudWarning.php:175 +msgid "Note: Once you have reviewed the order, ensure you take the appropriate action within your Stripe dashboard to help improve future fraud detection." +msgstr "" + +#: src/Emails/Templates/Traits/Actions.php:57 +msgid "Preview" +msgstr "" + +#: src/Emails/Templates/Traits/Actions.php:72 +msgid "Send Test" +msgstr "" + +#: src/Emails/Templates/UserVerification.php:63 +msgid "User Verification" +msgstr "" + +#: src/Emails/Templates/UserVerification.php:73 +msgid "This email is sent to a user when they need to verify their account." +msgstr "" + +#: src/Emails/Templates/UserVerification.php:84 +#: src/Emails/Templates/UserVerification.php:85 +msgid "Verify your account" +msgstr "" + +#: src/Emails/Templates/UserVerification.php:99 +msgid "Verification URL" +msgstr "" + +#: src/Emails/Templates/UserVerification.php:100 +msgid "The link for the user to verify their account." +msgstr "" + +#. translators: %s: The email tag that will be replaced with the customer's full name. +#: src/Emails/Templates/UserVerification.php:136 +msgid "Hello %s," +msgstr "" + +#. translators: %s: The email tag that will be replaced with the Site Name. +#: src/Emails/Templates/UserVerification.php:141 +msgid "Your account with %s needs to be verified before you can access your order history." +msgstr "" + +#. translators: %s: The email tag that will be replaced with the verification URL. +#: src/Emails/Templates/UserVerification.php:146 +msgid "Visit this link to verify your account: %s" +msgstr "" + +#. translators: %s: IPN Verification response +#: src/Gateways/PayPal/IPN.php:201 +#: src/Gateways/PayPal/IPN.php:212 +msgid "Invalid PayPal Commerce/Express IPN verification response. IPN data: %s" +msgstr "" + +#. translators: 1: Dispute ID, 2: Dispute reason code. Example: The PayPal transaction has been disputed. Case ID: PP-R-NMW-10060094. Reason given: non_receipt. +#: src/Gateways/PayPal/IPN.php:324 +msgid "The PayPal transaction has been disputed (IPN). Case ID: %1$s. Reason given: %2$s." +msgstr "" + +#: src/Gateways/PayPal/IPN.php:326 +msgid "unknown" +msgstr "" + +#. translators: %s: The payment data sent via the IPN +#: src/Gateways/PayPal/IPN.php:434 +msgid "Invalid Currency Code" +msgstr "" + +#. translators: %s: The payment data sent via the IPN +#: src/Gateways/PayPal/IPN.php:434 +msgid "The currency code in an IPN request did not match the site currency code. Payment data: %s" +msgstr "" + +#. translators: %s: The transaction ID of the failed payment +#: src/Gateways/PayPal/IPN.php:449 +msgid "Transaction ID %s failed in PayPal" +msgstr "" + +#. translators: %s: The collected outstanding balance of the subscription +#: src/Gateways/PayPal/IPN.php:479 +msgid "Outstanding subscription balance of %s collected successfully." +msgstr "" + +#. translators: %s: Transaction ID +#: src/Gateways/PayPal/IPN.php:579 +msgid "Reversal processed in PayPal (IPN). Transaction ID: %s" +msgstr "" + +#. translators: 1: Amount refunded; %2$s - Original payment ID; %3$s - Refund transaction ID +#: src/Gateways/PayPal/IPN.php:597 +#: src/Gateways/PayPal/Webhooks/Events/Payment_Capture_Refunded.php:53 +msgid "Amount: %1$s; Payment transaction ID: %2$s; Refund transaction ID: %3$s" +msgstr "" + +#: src/Gateways/PayPal/IPN.php:609 +msgid "Partial refund processed in PayPal (IPN)." +msgstr "" + +#: src/Gateways/PayPal/IPN.php:619 +msgid "Full refund processed in PayPal (IPN)." +msgstr "" + +#. translators: 1: Dispute ID, 2: Dispute reason code. Example: The PayPal transaction has been disputed. Case ID: PP-R-NMW-10060094. Reason given: non_receipt. +#: src/Gateways/PayPal/Webhooks/Events/Customer_Dispute_Created.php:58 +msgid "The PayPal transaction has been disputed. Case ID: %1$s. Reason given: %2$s." +msgstr "" + +#. translators: dispute message added by the customer +#: src/Gateways/PayPal/Webhooks/Events/Customer_Dispute_Created.php:72 +msgid "PayPal Dispute Message: %s" +msgstr "" + +#: src/Gateways/PayPal/Webhooks/Events/Payment_Capture_Completed.php:55 +msgid "Webhook Error" +msgstr "" + +#. translators: %s: webhook data +#: src/Gateways/PayPal/Webhooks/Events/Payment_Capture_Completed.php:58 +msgid "Invalid payment amount in webhook response. Webhook data: %s" +msgstr "" + +#. translators: %1$s is the order amount, %2$s is the PayPal amount +#: src/Gateways/PayPal/Webhooks/Events/Payment_Capture_Completed.php:70 +msgid "Payment failed due to invalid amount in PayPal webhook. Expected amount: %1$s; PayPal amount: %2$s." +msgstr "" + +#: src/Gateways/PayPal/Webhooks/Events/Payment_Capture_Denied.php:31 +msgid "PayPal transaction denied." +msgstr "" + +#: src/Gateways/PayPal/Webhooks/Events/Payment_Capture_Refunded.php:65 +msgid "Partial refund processed in PayPal." +msgstr "" + +#: src/Gateways/PayPal/Webhooks/Events/Payment_Capture_Refunded.php:75 +msgid "Full refund processed in PayPal." +msgstr "" + +#. translators: 1: Webhooks setup link, 2: Closing anchor tag +#: src/Gateways/Stripe/Admin/Connect.php:32 +msgid "Webhooks are not available in local/development environments, but you can %1$stest webhook creation%2$s. This will happen automatically on production sites." +msgstr "" + +#. translators: 1: Webhooks setup link, 2: Closing anchor tag, 3: Manual setup link +#: src/Gateways/Stripe/Admin/Connect.php:58 +msgid "Webhooks not found. %1$sAutomatically set up webhooks%2$s or %3$sadd them to your account manually%2$s." +msgstr "" + +#. translators: 1: Webhooks setup link, 2: Closing anchor tag, 3: Manual setup link +#: src/Gateways/Stripe/Admin/Connect.php:69 +msgid "Some webhooks are missing. %1$sAutomatically set up webhooks%2$s or %3$sadd them to your account manually%2$s." +msgstr "" + +#: src/Gateways/Stripe/Admin/Connect.php:76 +msgid "Webhooks are configured correctly." +msgstr "" + +#. translators: %1$s is the opening link tag; %2$s is the closing link tag. +#: src/Gateways/Stripe/Admin/LicenseManager.php:147 +msgid "Your license is not active. Please %1$sactivate your license%2$s." +msgstr "" + +#. translators: %1$s is the opening link tag; %2$s is the closing link tag. +#: src/Gateways/Stripe/Admin/LicenseManager.php:154 +msgid "Your license has expired. Please %1$srenew your license%2$s." +msgstr "" + +#: src/Gateways/Stripe/Admin/LicenseManager.php:248 +msgid "Easy Digital Downloads (Pro)" +msgstr "" + +#: src/Gateways/Stripe/Admin/LicenseManager.php:248 +msgid "Easy Digital Downloads - Stripe Pro Payment Gateway" +msgstr "" + +#: src/Gateways/Stripe/Admin/LicenseManager.php:252 +msgid "Easy Digital Downloads - Stripe Pro Payment Gateway Is Not Fully Activated!" +msgstr "" + +#: src/Gateways/Stripe/Admin/LicenseManager.php:253 +msgid "Activate your license key to receive important security and feature updates and remove application fees." +msgstr "" + +#: src/Gateways/Stripe/Admin/LicenseManager.php:258 +msgid "Complete Activation" +msgstr "" + +#. translators: %s: name of the license. +#: src/Gateways/Stripe/Admin/LicenseManager.php:272 +#: src/Gateways/Stripe/Admin/LicenseManager.php:298 +msgid "Your %s license has expired!" +msgstr "" + +#. translators: %s: date the grace period ends. +#: src/Gateways/Stripe/Admin/LicenseManager.php:277 +msgid "Renew your license before %s to continue using Stripe without paying additional fees and to continue receiving important security and feature updates." +msgstr "" + +#: src/Gateways/Stripe/Admin/LicenseManager.php:284 +#: src/Gateways/Stripe/Admin/LicenseManager.php:306 +#: src/Gateways/Stripe/Admin/LicenseManager.php:333 +msgid "Renew License" +msgstr "" + +#: src/Gateways/Stripe/Admin/LicenseManager.php:301 +msgid "You are now paying additional fees with every Stripe transaction. You are no longer receiving important security and feature updates for Stripe Pro." +msgstr "" + +#. translators: %s: name of the license. +#: src/Gateways/Stripe/Admin/LicenseManager.php:320 +msgid "Your %s License Is Expiring Soon!" +msgstr "" + +#. translators: 1: the name of the license, 2: the date the license expires. +#: src/Gateways/Stripe/Admin/LicenseManager.php:325 +msgid "Your %1$s license is set to expire on %2$s. An active license key is required to create and edit payment forms, enable automatic updates, and to keep Easy Digital Downloads - Stripe Pro Payment Gateway fully activated." +msgstr "" + +#. translators: 1: opening strong tag, 2: closing strong tag, 3: the message explaining the application fee (eg "3% per-transaction fee + Stripe fees"). +#: src/Gateways/Stripe/ApplicationFee.php:106 +msgid "%1$sPay as you go pricing:%2$s %3$s." +msgstr "" + +#. translators: Replacements are for the html wrappers for the phrse Upgrade to Pro and should not be translated. +#: src/Gateways/Stripe/ApplicationFee.php:114 +msgid "%1$sUpgrade to Pro%2$s to remove transaction fees." +msgstr "" + +#. translators: the application fee percentage. +#: src/Gateways/Stripe/ApplicationFee.php:178 +msgid "%d%% per-transaction fee + Stripe fees" +msgstr "" + +#. translators: the message explaining the application fee (eg "3% per-transaction fee + Stripe fees") +#: src/Gateways/Stripe/ApplicationFee.php:217 +msgid "Connect with Stripe for pay as you go pricing: %s." +msgstr "" + +#. translators: the message explaining the application fee (eg "3% per-transaction fee + Stripe fees") +#: src/Gateways/Stripe/ApplicationFee.php:225 +msgid "Connect with Stripe for pay as you go pricing: %s. Activate your license to remove the per-transaction fee." +msgstr "" + +#. translators: the date the grace period ends +#: src/Gateways/Stripe/ApplicationFee.php:245 +msgid "You are in a grace period for your new license. Activate your license by %s to prevent additional fees." +msgstr "" + +#. translators: 1: opening link tag, do not translate, 2: closing link tag, do not translate; 3. the date the grace period ends +#: src/Gateways/Stripe/ApplicationFee.php:256 +msgid "Your license has expired, but you are in a grace period. %1$sRenew your license key%2$s before %3$s to prevent being charged additional transaction fees." +msgstr "" + +#. translators: 1: the date the license expired, 2: opening link tag, do not translate, 3: closing link tag, do not translate +#: src/Gateways/Stripe/ApplicationFee.php:265 +msgid "Your license expired on %1$s. %2$sRenew your license%3$s to prevent additional fees." +msgstr "" + +#. translators: opening link tag, do not translate; closing link tag, do not translate +#: src/Gateways/Stripe/ApplicationFee.php:274 +msgid "%1$sActivate or upgrade your license%2$s to prevent additional fees." +msgstr "" + +#. translators: The charge ID from Stripe that is being refunded. +#: src/Gateways/Stripe/Webhooks/Events/ChargeRefunded.php:70 +msgid "Charge %s has been fully refunded in Stripe." +msgstr "" + +#. translators: The charge ID from Stripe that is being partially refunded. +#: src/Gateways/Stripe/Webhooks/Events/ChargeRefunded.php:74 +msgid "Charge %s partially refunded in Stripe." +msgstr "" + +#. translators: %s Stripe Radar early fraud warning reason. +#: src/Gateways/Stripe/Webhooks/Events/RadarEarlyFraudWarningCreated.php:49 +msgid "Stripe Radar early fraud warning created with a reason of %s." +msgstr "" + +#. translators: %s Stripe Radar review closing reason. +#: src/Gateways/Stripe/Webhooks/Events/ReviewClosed.php:62 +msgid "Stripe Radar review closed with a reason of %s." +msgstr "" + +#. translators: %s Stripe Radar review opening reason. +#: src/Gateways/Stripe/Webhooks/Events/ReviewOpened.php:69 +msgid "Stripe Radar review opened with a reason of %s." +msgstr "" + +#: src/Gateways/Stripe/Webhooks/Listener.php:119 +msgid "Invalid Event" +msgstr "" + +#. translators: %s: Download Category taxonomy name +#: src/HTML/CategorySelect.php:74 +msgctxt "plural: Example: \"Choose one or more Download Categories\"" +msgid "Choose %s" +msgstr "" + +#: src/HTML/Elements.php:113 +msgid "Choose a Customer" +msgstr "" + +#: src/HTML/Elements.php:117 +msgid "Search Customers" +msgstr "" + +#: src/HTML/Elements.php:119 +msgid "No customer attached" +msgstr "" + +#: src/HTML/Elements.php:186 +msgid "Select a User" +msgstr "" + +#: src/HTML/Elements.php:190 +msgid "Search Users" +msgstr "" + +#: src/HTML/Elements.php:266 +msgid "Choose a Discount" +msgstr "" + +#: src/HTML/Elements.php:267 +msgid "All Discounts" +msgstr "" + +#: src/HTML/Elements.php:452 +msgid "Choose a Country" +msgstr "" + +#: src/HTML/Elements.php:455 +msgid "All Countries" +msgstr "" + +#: src/HTML/Elements.php:502 +msgid "Choose a Region" +msgstr "" + +#: src/HTML/Elements.php:623 +msgid "Enter Username" +msgstr "" + +#: src/HTML/Elements.php:654 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/register/edit.js:43 +#: includes/blocks/src/register/edit.js:52 +#: includes/blocks/src/register/edit.js:61 +#: includes/blocks/src/register/edit.js:70 +msgid "Required" +msgstr "" + +#. translators: %s: Download plural label +#: src/HTML/ProductSelect.php:87 +msgctxt "Noun: Download plural label for product select input" +msgid "Search %s" +msgstr "" + +#. translators: %s: Download plural label +#: src/HTML/ProductSelect.php:95 +msgctxt "Noun: Download plural label for selecting All Downloads" +msgid "All %s" +msgstr "" + +#: src/HTML/Select.php:117 +msgctxt "all dropdown items" +msgid "All" +msgstr "" + +#: src/HTML/Select.php:118 +msgctxt "no dropdown items" +msgid "None" +msgstr "" + +#. translators: %s: number of additional items that are not being displayed. +#: src/HTML/TimelineTooltip.php:134 +msgid "%s More" +msgstr "" + +#: src/HTML/Upload.php:46 +msgid "Attach File" +msgstr "" + +#: src/Licensing/Ajax.php:50 +#: src/Licensing/Ajax.php:136 +#: src/Licensing/Ajax.php:178 +msgid "You do not have permission to manage this extension." +msgstr "" + +#: src/Licensing/Ajax.php:61 +#: src/Lite/Admin/PassHandler/Connect.php:75 +msgid "No key provided." +msgstr "" + +#: src/Licensing/Ajax.php:92 +msgid "Your license key could not be activated." +msgstr "" + +#: src/Licensing/Ajax.php:162 +#: src/Licensing/Messages.php:130 +msgid "Your license key has been deactivated." +msgstr "" + +#: src/Licensing/Ajax.php:190 +msgid "License key deleted." +msgstr "" + +#: src/Licensing/Messages.php:89 +msgid "license key" +msgstr "" + +#. translators: the extension name. +#: src/Licensing/Messages.php:116 +msgid "This appears to be an invalid license key for %s." +msgstr "" + +#: src/Licensing/Messages.php:126 +msgid "The key you entered belongs to a bundle, please use the product specific license key." +msgstr "" + +#: src/Licensing/Messages.php:141 +msgid "Unlicensed: currently not receiving updates." +msgstr "" + +#: src/Licensing/Messages.php:156 +msgid "License key never expires." +msgstr "" + +#. translators: the license expiration date. +#: src/Licensing/Messages.php:162 +msgid "Your license key expires soon! It expires on %s." +msgstr "" + +#. translators: the license expiration date. +#: src/Licensing/Messages.php:169 +msgid "Your license key expires on %s." +msgstr "" + +#: src/Licensing/Messages.php:182 +msgid "Your license subscription is active and will automatically renew." +msgstr "" + +#. translators: the license subscription status. +#: src/Licensing/Messages.php:187 +msgid "Your license subscription is %s and will not automatically renew." +msgstr "" + +#. translators: 1: license expiration date. +#: src/Licensing/Messages.php:204 +msgid "Your license key expired on %1$s. Please renew your license key." +msgstr "" + +#: src/Licensing/Messages.php:209 +msgid "Your license key has expired. Please renew your license key." +msgstr "" + +#. translators: 1: license expiration date, 2: opening link tag, 3: closing link tag. +#: src/Licensing/Messages.php:228 +msgid "Your license key expired on %1$s. Please %2$srenew your license key%3$s." +msgstr "" + +#. translators: 1: opening link tag, 2: closing link tag. +#: src/Licensing/Messages.php:237 +msgid "Your license key has expired. Please %1$srenew your license key%2$s." +msgstr "" + +#: src/Licensing/Messages.php:252 +msgid "Your license key has been disabled." +msgstr "" + +#. translators: 1: opening link tag, 2: closing link tag. +#: src/Licensing/Messages.php:267 +msgid "Your license key has been disabled. Please %1$scontact support%2$s for more information." +msgstr "" + +#: src/Licensing/Messages.php:282 +msgid "Your license key has reached its activation limit." +msgstr "" + +#. translators: 1: opening link tag; 2 closing link tag. +#: src/Licensing/Messages.php:297 +msgid "Your license key has reached its activation limit. %1$sView possible upgrades%2$s now." +msgstr "" + +#: src/Licensing/Messages.php:312 +msgid "Your license key is not active for this URL." +msgstr "" + +#. translators: 1: opening link tag, 2: closing link tag. +#: src/Licensing/Messages.php:328 +msgid "Your license key is not active for this URL. Please %1$svisit your account page%2$s to manage your license keys." +msgstr "" + +#. translators: 1: the extension name, 2: opening link tag, 3: closing link tag. +#: src/Licensing/Messages.php:336 +msgid "Your %1$s license key is not active for this URL. Please %2$svisit your account page%3$s to manage your license keys." +msgstr "" + +#: src/Licensing/Messages.php:351 +msgid "Invalid license. Please verify it." +msgstr "" + +#. translators: 1: opening link tag, 2: closing link tag. +#: src/Licensing/Messages.php:364 +msgid "Invalid license. Please %1$svisit your account page%2$s and verify it." +msgstr "" + +#: src/Licensing/Messages.php:379 +msgid "pending" +msgstr "" + +#: src/Licensing/Messages.php:380 +msgid "active" +msgstr "" + +#: src/Licensing/Messages.php:381 +msgid "cancelled" +msgstr "" + +#: src/Licensing/Messages.php:382 +msgid "expired" +msgstr "" + +#: src/Licensing/Messages.php:383 +msgid "trialling" +msgstr "" + +#: src/Licensing/Messages.php:384 +msgid "failing" +msgstr "" + +#: src/Licensing/Messages.php:385 +msgid "completed" +msgstr "" + +#. translators: the all acess pass name. +#: src/Licensing/Traits/Controls.php:200 +msgid "Your %s gives you access to this extension." +msgstr "" + +#: src/Lite/Admin/PassHandler/Connect.php:52 +msgid "There was an error while installing an upgrade. Please download the plugin from easydigitaldownloads.com and install it manually." +msgstr "" + +#: src/Lite/Admin/PassHandler/Connect.php:114 +msgid "There was an error while installing an upgrade. Please check file system permissions and try again. Also, you can download the plugin from easydigitaldownloads.com and install it manually." +msgstr "" + +#: src/Lite/Admin/PassHandler/Connect.php:149 +msgid "Easy Digital Downloads (Pro) was installed, but needs to be activated on the Plugins page inside your WordPress admin." +msgstr "" + +#: src/Lite/Admin/PassHandler/Pointer.php:83 +msgid "Install the Pro Version!" +msgstr "" + +#: src/Lite/Admin/PassHandler/Pointer.php:84 +msgid "We see you already have an active pass. Click here to verify your license key and we'll connect you to install Easy Digital Downloads (Pro)." +msgstr "" + +#: src/Lite/Admin/PassHandler/Pointer.php:172 +msgid "You're eligible to install EDD (Pro)!" +msgstr "" + +#. translators: 1: opening anchor tag, 2: closing anchor tag +#: src/Lite/Admin/PassHandler/Pointer.php:175 +msgid "Good news! With your pass subscription, you can install the Pro version of Easy Digital Downloads. %1$sVisit the settings page%2$s to verify your license and access Pro only features." +msgstr "" + +#: src/Orders/Refunds/Validator.php:268 +msgid "No items have been selected to refund." +msgstr "" + +#. translators: %s: 0.00 formatted in store currency +#: src/Orders/Refunds/Validator.php:277 +msgid "The refund amount must be greater than %s." +msgstr "" + +#. translators: %s: maximum refund amount as formatted currency +#: src/Orders/Refunds/Validator.php:289 +msgid "The maximum refund amount is %s." +msgstr "" + +#. translators: %s: type of amount being refunded (e.g. "subtotal" or "tax"). Not translatable at this time. +#: src/Orders/Refunds/Validator.php:369 +msgid "An unexpected error occurred while validating the maximum %s amount." +msgstr "" + +#. Translators: %1$s - type of amount being refunded (subtotal, tax, or total); %1$s - product name; %3$s - maximum amount allowed for refund +#: src/Orders/Refunds/Validator.php:398 +msgid "The maximum refund %1$s for the product \"%2$s\" is %3$s." +msgstr "" + +#. Translators: %1$s - type of amount being refunded (subtotal, tax, or total); %1$s - adjustment description; %3$s - maximum amount allowed for refund +#: src/Orders/Refunds/Validator.php:411 +msgid "The maximum refund %1$s for the adjustment \"%2$s\" is %3$s." +msgstr "" + +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:181 +msgid "Monthly Sales Average" +msgstr "" + +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:182 +msgid "Monthly Earnings Average" +msgstr "" + +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:272 +msgid "Due to the large number of products or terms on your site, this report may be slow or sometimes fail to load." +msgstr "" + +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:290 +msgid "Continue to Report" +msgstr "" + +#: src/Reports/Data/Downloads/Earnings_By_Taxonomy_List_Table.php:297 +msgid "No taxonomies found." +msgstr "" + +#: src/RequirementsCheck.php:172 +msgid "This plugin is not fully active." +msgstr "" + +#. translators: 1: Requirement name, 2: Minimum version, 3: Current version +#: src/RequirementsCheck.php:183 +msgid "Requires %1$s (%2$s), but (%3$s) is installed." +msgstr "" + +#. translators: 1: Requirement name, 2: Minimum version +#: src/RequirementsCheck.php:194 +msgid "Requires %1$s (%2$s), but it appears to be missing." +msgstr "" + +#: src/RequirementsCheck.php:204 +msgid "Requirements" +msgstr "" + +#: src/RequirementsCheck.php:214 +msgid "Easy Digital Download Requirements" +msgstr "" + +#: src/Telemetry/Tracking.php:144 +msgid "Yes, I want to help!" +msgstr "" + +#: src/Telemetry/Tracking.php:275 +msgid "Allow" +msgstr "" + +#: src/Telemetry/Tracking.php:277 +msgid "Do not allow" +msgstr "" + +#: src/Telemetry/Tracking.php:290 +msgid "Help us provide a better experience and faster fixes by sharing some anonymous data about how you use Easy Digital Downloads." +msgstr "" + +#. translators: %1$s Link to tracking information, do not translate. %2$s clsoing link tag, do not translate +#: src/Telemetry/Tracking.php:294 +msgid "%1$sHere is what we track.%2$s" +msgstr "" + +#: src/Upgrades/Adjustments/DiscountsStartEnd.php:205 +msgid "Discount Updates Complete!" +msgstr "" + +#: src/Upgrades/Adjustments/DiscountsStartEnd.php:206 +msgid "Easy Digital Downloads has finished updating your discount codes! Thank you for your patience." +msgstr "" + +#. translators: %s: % complete. +#: src/Upgrades/Adjustments/DiscountsStartEnd.php:234 +msgid "Updating Discounts ( %d%% )" +msgstr "" + +#: src/Upgrades/Adjustments/DiscountsStartEnd.php:257 +msgid "Easy Digital Downloads is performing maintenance in the background on discount codes that may contain invalid start and end dates. This process may take a while to complete depending on the number of discounts you have. We'll let you know when the process is complete." +msgstr "" + +#: src/Upgrades/Orders/MigrateAfterActionsDate.php:267 +msgid "Order Table Optimization Complete!" +msgstr "" + +#: src/Upgrades/Orders/MigrateAfterActionsDate.php:268 +msgid "Easy Digital Downloads has finished updating your orders database! Thank you for your patience." +msgstr "" + +#. translators: %s: % complete. +#: src/Upgrades/Orders/MigrateAfterActionsDate.php:296 +msgid "Optimizing Orders Table ( %d%% )" +msgstr "" + +#: src/Upgrades/Orders/MigrateAfterActionsDate.php:319 +msgid "Easy Digital Downloads is updating the Orders and Order Meta table in the background. This process may take a while to complete depending on the number of orders you have. We'll let you know when the process is complete." +msgstr "" + +#: templates/history-downloads.php:14 +#: templates/history-purchases.php:13 +msgid "Your account has been successfully verified!" +msgstr "" + +#: templates/history-downloads.php:44 +msgid "Download Name" +msgstr "" + +#. translators: the order item's status. +#: templates/history-downloads.php:97 +msgctxt "The status of an order item" +msgid "Status: %s" +msgstr "" + +#: templates/history-downloads.php:135 +msgid "You have not purchased any downloads" +msgstr "" + +#: templates/history-purchases.php:79 +msgid "View Details and Downloads" +msgstr "" + +#: templates/history-purchases.php:102 +msgid "You have not made any purchases." +msgstr "" + +#. translators: %s: success page URL +#: templates/payment-processing.php:5 +msgid "Your purchase is processing. This page will reload automatically in 8 seconds. If it does not, click here." +msgstr "" + +#: templates/shortcode-login.php:12 +msgid "Log into Your Account" +msgstr "" + +#: templates/shortcode-profile-editor.php:19 +msgid "Saved cart" +msgstr "" + +#. translators: %s: Restore cart URL +#: templates/shortcode-profile-editor.php:22 +msgid "You have a saved cart, click here to restore it." +msgstr "" + +#: templates/shortcode-profile-editor.php:28 +msgid "Your profile has been edited successfully." +msgstr "" + +#: templates/shortcode-profile-editor.php:41 +msgid "Change Your Name" +msgstr "" + +#: templates/shortcode-profile-editor.php:54 +msgid "Display Name" +msgstr "" + +#: templates/shortcode-profile-editor.php:74 +msgid "Primary Email Address" +msgstr "" + +#: templates/shortcode-profile-editor.php:110 +msgid "Additional Email Addresses" +msgstr "" + +#: templates/shortcode-profile-editor.php:145 +msgid "Change your Billing Address" +msgstr "" + +#: templates/shortcode-profile-editor.php:148 +msgid "Line 1" +msgstr "" + +#: templates/shortcode-profile-editor.php:153 +msgid "Line 2" +msgstr "" + +#: templates/shortcode-profile-editor.php:201 +msgid "Change your Password" +msgstr "" + +#: templates/shortcode-profile-editor.php:204 +msgid "New Password" +msgstr "" + +#: templates/shortcode-profile-editor.php:209 +msgid "Re-enter Password" +msgstr "" + +#: templates/shortcode-profile-editor.php:226 +msgid "Save Changes" +msgstr "" + +#: templates/shortcode-register.php:15 +msgid "Register New Account" +msgstr "" + +#: templates/widget-cart-checkout.php:2 +#: templates/widget-cart-empty.php:3 +msgid "Subtotal:" +msgstr "" + +#: templates/widget-cart-checkout.php:3 +#: templates/widget-cart-empty.php:4 +msgid "Estimated Tax:" +msgstr "" + +#: templates/widget-cart-checkout.php:5 +#: templates/widget-cart-empty.php:6 +msgid "Total:" +msgstr "" + +#: templates/widget-cart-item.php:4 +msgid "remove" +msgstr "" + +#: templates/widget-cart.php:9 +msgid "Number of items in cart" +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/buy-button/index.js:3 +#: includes/blocks/build/buy-button/index.js:13 +#: includes/blocks/src/buy-button/edit.js:59 +#: includes/blocks/src/utilities/downloads.js:11 +msgid "Select a %s" +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/buy-button/index.js:5 +#: includes/blocks/src/utilities/downloads.js:17 +msgid "Current %s" +msgstr "" + +#. translators: %s: Download label plural +#: includes/blocks/build/buy-button/index.js:6 +#: includes/blocks/build/downloads/index.js:2 +#: includes/blocks/src/utilities/download-new.js:12 +msgid "No Published %s Found" +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/buy-button/index.js:8 +#: includes/blocks/build/downloads/index.js:4 +#: includes/blocks/src/utilities/download-new.js:23 +msgid "Create a New %s" +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/buy-button/index.js:9 +#: includes/blocks/build/downloads/index.js:5 +#: includes/blocks/src/utilities/download-new.js:26 +msgid "Create Your First %s" +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/buy-button/index.js:10 +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/utilities/download-new.js:37 +msgid "View All %s" +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/buy-button/index.js:11 +#: includes/blocks/src/buy-button/edit.js:31 +msgid "Select a %s:" +msgstr "" + +#. translators: %s: Download label plural +#: includes/blocks/build/buy-button/index.js:12 +#: includes/blocks/src/buy-button/edit.js:35 +msgid "Published %s" +msgstr "" + +#: includes/blocks/build/buy-button/index.js:13 +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/buy-button/edit.js:65 +#: includes/blocks/src/downloads/edit.js:158 +msgid "Show Price" +msgstr "" + +#: includes/blocks/build/buy-button/index.js:13 +#: includes/blocks/src/buy-button/edit.js:74 +msgid "Enable Buy Now to process a download order without going through the full checkout." +msgstr "" + +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/src/cart/edit.js:30 +msgid "Mini Cart" +msgstr "" + +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/cart/edit.js:36 +#: includes/blocks/src/utilities/download-order-by.js:18 +msgid "Title" +msgstr "" + +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/src/cart/edit.js:42 +msgid "Hide When Empty" +msgstr "" + +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/src/cart/edit.js:47 +msgid "Hide on Checkout" +msgstr "" + +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/src/cart/edit.js:54 +msgid "Link Cart to Checkout" +msgstr "" + +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/src/cart/edit.js:59 +msgid "Show Number of Items in Cart" +msgstr "" + +#: includes/blocks/build/cart/index.js:1 +#: includes/blocks/src/cart/edit.js:64 +msgid "Show Cart Total" +msgstr "" + +#: includes/blocks/build/checkout/index.js:1 +#: includes/blocks/src/checkout/edit.js:20 +msgid "This is an example of a cart with a product in it." +msgstr "" + +#: includes/blocks/build/confirmation/index.js:1 +#: includes/blocks/build/receipt/index.js:1 +#: includes/blocks/src/utilities/no-orders-placeholder.js:6 +msgid "Create at least one order to see an example of a receipt." +msgstr "" + +#: includes/blocks/build/confirmation/index.js:1 +#: includes/blocks/build/receipt/index.js:1 +#: includes/blocks/src/confirmation/edit.js:29 +#: includes/blocks/src/receipt/edit.js:29 +msgid "Show Payment Key" +msgstr "" + +#: includes/blocks/build/confirmation/index.js:1 +#: includes/blocks/build/receipt/index.js:1 +#: includes/blocks/src/confirmation/edit.js:34 +#: includes/blocks/src/receipt/edit.js:34 +msgid "Show Gateway" +msgstr "" + +#: includes/blocks/build/confirmation/index.js:1 +#: includes/blocks/src/confirmation/edit.js:40 +msgid "The editor will display a recent random order from your site." +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/buy-button-alignment.js:10 +#: includes/blocks/src/utilities/image-alignment.js:10 +msgid "Center" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/buy-button-alignment.js:14 +#: includes/blocks/src/utilities/image-alignment.js:14 +msgid "Left" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/buy-button-alignment.js:18 +#: includes/blocks/src/utilities/image-alignment.js:18 +msgid "Right" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/order.js:6 +msgid "Ascending" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/order.js:10 +msgid "Descending" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/image-size.js:6 +msgid "Thumbnail" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/image-size.js:10 +msgid "Medium" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/build/terms/index.js:1 +#: includes/blocks/src/utilities/image-size.js:14 +msgid "Large" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/buy-button-alignment.js:22 +msgid "Wide" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-order-by.js:6 +msgid "Date Published" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-order-by.js:30 +msgid "Date Modified" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-order-by.js:34 +msgid "Random" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-content.js:6 +msgid "No Content" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-content.js:10 +msgid "Full Content" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-image-location.js:6 +msgid "No Image" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-image-location.js:10 +msgid "Before Title" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/download-image-location.js:14 +msgid "After Title" +msgstr "" + +#: includes/blocks/build/downloads/index.js:1 +#: includes/blocks/src/utilities/users.js:7 +msgid "All authors" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:34 +#: includes/blocks/src/downloads/edit.js:35 +msgid "All Categories" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:41 +msgid "Product Block Settings" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:43 +msgid "Decide how to display your products." +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:45 +msgid "Downloads per Page" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:53 +msgid "Show All Access Downloads" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/downloads/edit.js:59 +#: includes/blocks/src/terms/edit.js:68 +msgid "Number of Columns" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/downloads/edit.js:66 +#: includes/blocks/src/terms/edit.js:56 +msgid "Order By" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:79 +msgid "Show Pagination" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:92 +msgid "Download Term Settings" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:98 +msgid "Show Downloads From Categories" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:106 +msgid "Show Downloads From Tags" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:114 +msgid "Individual Product Settings" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/downloads/edit.js:118 +#: includes/blocks/src/terms/edit.js:85 +msgid "Show Title" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:123 +msgid "Featured Image Location" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:130 +msgid "Should the featured image link to the product?" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:137 +msgid "Featured Image Size" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:145 +msgid "Featured Image Alignment" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:152 +msgid "Content" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:170 +msgid "Purchase Button Alignment" +msgstr "" + +#: includes/blocks/build/downloads/index.js:6 +#: includes/blocks/src/downloads/edit.js:176 +msgid "Show Price on Button" +msgstr "" + +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/src/login/edit.js:24 +msgid "Once logged in, where should the user be directed? You can choose the current page, or a custom URL." +msgstr "" + +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/login/edit.js:26 +#: includes/blocks/src/register/edit.js:25 +msgid "Redirect to Current Page" +msgstr "" + +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/login/edit.js:32 +#: includes/blocks/src/register/edit.js:31 +msgid "Custom Redirect URL" +msgstr "" + +#: includes/blocks/build/login/index.js:1 +#: includes/blocks/src/login/edit.js:39 +msgid "This form is a sample view of your login form. Logged in users will not see it." +msgstr "" + +#: includes/blocks/build/order-history/index.js:1 +#: includes/blocks/src/order-history/edit.js:22 +msgid "This is an example of a user's order history." +msgstr "" + +#: includes/blocks/build/order-history/index.js:1 +#: includes/blocks/src/order-history/edit.js:24 +msgid "Order History Settings" +msgstr "" + +#: includes/blocks/build/order-history/index.js:1 +#: includes/blocks/src/order-history/edit.js:26 +msgid "Columns" +msgstr "" + +#: includes/blocks/build/order-history/index.js:1 +#: includes/blocks/src/order-history/edit.js:33 +msgid "Orders per Page" +msgstr "" + +#: includes/blocks/build/order-history/index.js:1 +#: includes/blocks/src/order-history/edit.js:41 +msgid "Do Not Show Renewal Orders" +msgstr "" + +#: includes/blocks/build/receipt/index.js:1 +#: includes/blocks/src/receipt/edit.js:40 +msgid "The editor will display a sample random order from your site." +msgstr "" + +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/register/edit.js:23 +msgid "Once registered, where should the user be directed? You can choose the current page, or a custom URL." +msgstr "" + +#: includes/blocks/build/register/index.js:1 +#: includes/blocks/src/register/edit.js:38 +msgid "This form is a sample view of your registration form. Logged in users will not see it." +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/terms/index.js:3 +#: includes/blocks/src/utilities/download-taxonomies.js:7 +msgid "%s Categories" +msgstr "" + +#. translators: %s: Download label singular +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/utilities/download-taxonomies.js:12 +msgid "%s Tags" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:27 +msgid "Count" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:47 +msgid "Term Block Settings" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:75 +msgid "Show Empty Categories" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:81 +msgid "Individual Term Settings" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:90 +msgid "Show Thumbnails" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:96 +msgid "Image Size" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:104 +msgid "Image Alignment" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:111 +msgid "Show Description" +msgstr "" + +#: includes/blocks/build/terms/index.js:5 +#: includes/blocks/src/terms/edit.js:116 +msgid "Show Count" +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:23 +msgid "This is an example of a user's available downloads." +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:25 +msgid "Your store has disabled redownloading files, so your users will not be able to access their files from this block. You can change the \"Disable Redownload\" setting by visiting Downloads > Settings > Misc > File Downloads." +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:28 +msgid "User Download Settings" +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:31 +#: includes/blocks/src/user-downloads/edit.js:38 +msgid "Show a Search Form" +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:41 +msgid "This feature is available in EDD (Pro)." +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:45 +msgid "Show Product Variations" +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:48 +msgid "If your product variations all use the same deliverable files, you may want to disable this." +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:51 +msgid "Hide Products With No Files" +msgstr "" + +#: includes/blocks/build/user-downloads/index.js:1 +#: includes/blocks/src/user-downloads/edit.js:57 +msgid "Text to show if there are no files" +msgstr "" + +#: includes/blocks/build/buy-button/block.json +#: includes/blocks/src/buy-button/block.json +msgctxt "block title" +msgid "EDD Buy Button" +msgstr "" + +#: includes/blocks/build/buy-button/block.json +#: includes/blocks/src/buy-button/block.json +msgctxt "block description" +msgid "Quickly add a \"buy now\" button for any EDD product." +msgstr "" + +#: includes/blocks/build/buy-button/block.json +#: includes/blocks/build/cart/block.json +#: includes/blocks/build/checkout/block.json +#: includes/blocks/build/confirmation/block.json +#: includes/blocks/build/downloads/block.json +#: includes/blocks/build/login/block.json +#: includes/blocks/build/order-history/block.json +#: includes/blocks/build/receipt/block.json +#: includes/blocks/build/register/block.json +#: includes/blocks/build/terms/block.json +#: includes/blocks/build/user-downloads/block.json +#: includes/blocks/src/buy-button/block.json +#: includes/blocks/src/cart/block.json +#: includes/blocks/src/checkout/block.json +#: includes/blocks/src/confirmation/block.json +#: includes/blocks/src/downloads/block.json +#: includes/blocks/src/login/block.json +#: includes/blocks/src/order-history/block.json +#: includes/blocks/src/receipt/block.json +#: includes/blocks/src/register/block.json +#: includes/blocks/src/terms/block.json +#: includes/blocks/src/user-downloads/block.json +msgctxt "block keyword" +msgid "easy digital downloads" +msgstr "" + +#: includes/blocks/build/buy-button/block.json +#: includes/blocks/build/cart/block.json +#: includes/blocks/build/checkout/block.json +#: includes/blocks/build/confirmation/block.json +#: includes/blocks/build/downloads/block.json +#: includes/blocks/build/login/block.json +#: includes/blocks/build/order-history/block.json +#: includes/blocks/build/receipt/block.json +#: includes/blocks/build/register/block.json +#: includes/blocks/build/terms/block.json +#: includes/blocks/build/user-downloads/block.json +#: includes/blocks/src/buy-button/block.json +#: includes/blocks/src/cart/block.json +#: includes/blocks/src/checkout/block.json +#: includes/blocks/src/confirmation/block.json +#: includes/blocks/src/downloads/block.json +#: includes/blocks/src/login/block.json +#: includes/blocks/src/order-history/block.json +#: includes/blocks/src/receipt/block.json +#: includes/blocks/src/register/block.json +#: includes/blocks/src/terms/block.json +#: includes/blocks/src/user-downloads/block.json +msgctxt "block keyword" +msgid "edd" +msgstr "" + +#: includes/blocks/build/buy-button/block.json +#: includes/blocks/src/buy-button/block.json +msgctxt "block keyword" +msgid "button" +msgstr "" + +#: includes/blocks/build/cart/block.json +#: includes/blocks/src/cart/block.json +msgctxt "block title" +msgid "EDD Cart" +msgstr "" + +#: includes/blocks/build/cart/block.json +#: includes/blocks/src/cart/block.json +msgctxt "block description" +msgid "Display a mini or full shopping cart outside of checkout for Easy Digital Downloads." +msgstr "" + +#: includes/blocks/build/cart/block.json +#: includes/blocks/src/cart/block.json +msgctxt "block keyword" +msgid "cart" +msgstr "" + +#: includes/blocks/build/checkout/block.json +#: includes/blocks/src/checkout/block.json +msgctxt "block title" +msgid "EDD Checkout" +msgstr "" + +#: includes/blocks/build/checkout/block.json +#: includes/blocks/src/checkout/block.json +msgctxt "block description" +msgid "Full checkout block for Easy Digital Downloads." +msgstr "" + +#: includes/blocks/build/checkout/block.json +#: includes/blocks/src/checkout/block.json +msgctxt "block keyword" +msgid "checkout" +msgstr "" + +#: includes/blocks/build/confirmation/block.json +#: includes/blocks/src/confirmation/block.json +msgctxt "block title" +msgid "EDD Confirmation" +msgstr "" + +#: includes/blocks/build/confirmation/block.json +#: includes/blocks/src/confirmation/block.json +msgctxt "block description" +msgid "A brief confirmation screen to show to customers immediately after a successful purchase." +msgstr "" + +#: includes/blocks/build/confirmation/block.json +#: includes/blocks/build/order-history/block.json +#: includes/blocks/build/receipt/block.json +#: includes/blocks/build/user-downloads/block.json +#: includes/blocks/src/confirmation/block.json +#: includes/blocks/src/order-history/block.json +#: includes/blocks/src/receipt/block.json +#: includes/blocks/src/user-downloads/block.json +msgctxt "block keyword" +msgid "orders" +msgstr "" + +#: includes/blocks/build/downloads/block.json +#: includes/blocks/src/downloads/block.json +msgctxt "block title" +msgid "EDD Products" +msgstr "" + +#: includes/blocks/build/downloads/block.json +#: includes/blocks/src/downloads/block.json +msgctxt "block description" +msgid "A block to show your Easy Digital Download products based on visual customizations and query parameters." +msgstr "" + +#: includes/blocks/build/downloads/block.json +#: includes/blocks/build/terms/block.json +#: includes/blocks/src/downloads/block.json +#: includes/blocks/src/terms/block.json +msgctxt "block keyword" +msgid "downloads" +msgstr "" + +#: includes/blocks/build/login/block.json +#: includes/blocks/src/login/block.json +msgctxt "block title" +msgid "EDD Login Form" +msgstr "" + +#: includes/blocks/build/login/block.json +#: includes/blocks/src/login/block.json +msgctxt "block description" +msgid "Login form for Easy Digital Downloads." +msgstr "" + +#: includes/blocks/build/login/block.json +#: includes/blocks/src/login/block.json +msgctxt "block keyword" +msgid "login" +msgstr "" + +#: includes/blocks/build/order-history/block.json +#: includes/blocks/src/order-history/block.json +msgctxt "block title" +msgid "EDD Order History" +msgstr "" + +#: includes/blocks/build/order-history/block.json +#: includes/blocks/src/order-history/block.json +msgctxt "block description" +msgid "Display the Easy Digital Downloads order history of a logged in user." +msgstr "" + +#: includes/blocks/build/receipt/block.json +#: includes/blocks/src/receipt/block.json +msgctxt "block title" +msgid "EDD Receipt" +msgstr "" + +#: includes/blocks/build/receipt/block.json +#: includes/blocks/src/receipt/block.json +msgctxt "block description" +msgid "Show customers their detailed receipt. Supports guest orders." +msgstr "" + +#: includes/blocks/build/register/block.json +#: includes/blocks/src/register/block.json +msgctxt "block title" +msgid "EDD Registration Form" +msgstr "" + +#: includes/blocks/build/register/block.json +#: includes/blocks/src/register/block.json +msgctxt "block description" +msgid "Registration form for Easy Digital Downloads." +msgstr "" + +#: includes/blocks/build/register/block.json +#: includes/blocks/src/register/block.json +msgctxt "block keyword" +msgid "registration" +msgstr "" + +#: includes/blocks/build/terms/block.json +#: includes/blocks/src/terms/block.json +msgctxt "block title" +msgid "EDD Download Terms" +msgstr "" + +#: includes/blocks/build/terms/block.json +#: includes/blocks/src/terms/block.json +msgctxt "block description" +msgid "Show categories, or tags for Easy Digital Download products." +msgstr "" + +#: includes/blocks/build/user-downloads/block.json +#: includes/blocks/src/user-downloads/block.json +msgctxt "block title" +msgid "EDD User Downloads" +msgstr "" + +#: includes/blocks/build/user-downloads/block.json +#: includes/blocks/src/user-downloads/block.json +msgctxt "block description" +msgid "Allows a user to access the Easy Digital Downloads products they have purchased." +msgstr "" diff --git a/languages/edd-ar.mo b/languages/edd-ar.mo deleted file mode 100644 index 6227455526e..00000000000 Binary files a/languages/edd-ar.mo and /dev/null differ diff --git a/languages/edd-ar.po b/languages/edd-ar.po deleted file mode 100644 index 72582a8fb25..00000000000 --- a/languages/edd-ar.po +++ /dev/null @@ -1,2262 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-09-20 17:46+0300\n" -"PO-Revision-Date: 2012-09-24 20:40+0300\n" -"Last-Translator: Maoeah \n" -"Language-Team: Easy Digital Downloads \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: \n" -"X-Poedit-KeywordsList: __;_e;_x;_n\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: Arabic\n" -"X-Poedit-Country: SAUDI ARABIA\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-SearchPath-0: ..\n" -"X-Poedit-SearchPath-1: ../includes\n" -"X-Poedit-SearchPath-2: .\n" - -#: ../includes/admin-notices.php:30 -msgid "Discount code updated." -msgstr "رمز خصم محدث" - -#: ../includes/admin-notices.php:33 -msgid "There was a problem updating your discount code, please try again." -msgstr "حدثت مشكلة أثناء تحديث رمز خصمك، حاول مرة ثانية" - -#: ../includes/admin-notices.php:36 -msgid "The payment has been deleted." -msgstr "تم إلغاء الدفع" - -#: ../includes/admin-notices.php:39 -msgid "The purchase receipt has been resent." -msgstr "تم إعادة إرسال فاتورة الشراء" - -#: ../includes/admin-notices.php:44 -#, php-format -msgid "The payment history needs updated. %s" -msgstr "ينبغي تحديث تاريخ الدفع %s" - -#: ../includes/admin-notices.php:44 -msgid "Click to Upgrade" -msgstr "أنقر للترقية" - -#: ../includes/admin-notices.php:62 -msgid "There seems to be an issue with the server. Please try again in a few minutes." -msgstr "يبدو أن هناك مشكلة بالخادم ، نرجو المحاولة مرة أخرى بعد دقائق" - -#: ../includes/admin-pages.php:26 -msgid "Payment History" -msgstr "تاريخ الدفع" - -#: ../includes/admin-pages.php:27 -msgid "Discount Codes" -msgstr "رموز الخصم" - -#: ../includes/admin-pages.php:28 -msgid "Earnings and Sales Reports" -msgstr "تقارير المبيعات و الأرباح" - -#: ../includes/admin-pages.php:28 -msgid "Reports" -msgstr "تقارير" - -#: ../includes/admin-pages.php:29 -msgid "Easy Digital Download Settings" -msgstr "إعدادات إيزي ديجيتل داونلودز" - -#: ../includes/admin-pages.php:29 -msgid "Settings" -msgstr "الإعدادات" - -#: ../includes/admin-pages.php:30 -msgid "Easy Digital Download Add Ons" -msgstr "إضافات إيزي ديجيتل داونلودز" - -#: ../includes/admin-pages.php:30 -msgid "Add Ons" -msgstr "الإضافات" - -#: ../includes/ajax-functions.php:102 -msgid "This discount code has been used already" -msgstr "رمز الخصم هذا مستخدم" - -#: ../includes/ajax-functions.php:118 -msgid "The discount you entered is invalid" -msgstr "الخصم الذي أدخلته غير صالح" - -#: ../includes/cart-functions.php:405 -#, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "لقد نجحت باضافة % لسلتك" - -#: ../includes/cart-functions.php:406 -msgid "Checkout." -msgstr "الدفع و الخروج" - -#: ../includes/cart-template.php:46 -#: ../includes/cart-template.php:49 -msgid "Checkout" -msgstr "الدفع و الخروج" - -#: ../includes/cart-template.php:80 -msgid "remove" -msgstr "حذف" - -#: ../includes/cart-template.php:99 -msgid "Your cart is empty." -msgstr "سلتك فارغة" - -#: ../includes/checkout-template.php:101 -msgid "Personal Info" -msgstr "معلومات شخصية" - -#: ../includes/checkout-template.php:104 -msgid "Email address" -msgstr "البريد الإلكتروني" - -#: ../includes/checkout-template.php:105 -msgid "Email Address" -msgstr "البريد الإلكتروني" - -#: ../includes/checkout-template.php:109 -#: ../includes/checkout-template.php:110 -#: ../includes/checkout-template.php:343 -#: ../includes/checkout-template.php:344 -msgid "First Name" -msgstr "الإسم الأول" - -#: ../includes/checkout-template.php:113 -#: ../includes/checkout-template.php:347 -msgid "Last name" -msgstr "الاسم الأخير" - -#: ../includes/checkout-template.php:114 -#: ../includes/checkout-template.php:348 -msgid "Last Name" -msgstr "الإسم الأخير" - -#: ../includes/checkout-template.php:142 -msgid "Show Terms" -msgstr "عرض الشروط" - -#: ../includes/checkout-template.php:143 -msgid "Hide Terms" -msgstr "إخفاء الشروط" - -#: ../includes/checkout-template.php:146 -msgid "Agree to Terms?" -msgstr "موافق على الشروط؟" - -#: ../includes/checkout-template.php:166 -msgid "Go back" -msgstr "الرجوع" - -#: ../includes/checkout-template.php:170 -msgid "You must be logged in to complete your purchase" -msgstr "ينبغي أن تسجل دخولك لتشتري" - -#: ../includes/checkout-template.php:199 -msgid "Credit Card Info" -msgstr "معلومات البطاقة الإئتمانية" - -#: ../includes/checkout-template.php:201 -msgid "Card name" -msgstr "اسم البطاقة الإئتمانية" - -#: ../includes/checkout-template.php:202 -msgid "Name on the Card" -msgstr "الإسم الذي على البطاقة الإئتمانية" - -#: ../includes/checkout-template.php:205 -msgid "Card number" -msgstr "رقم البطاقة الإئتمانية" - -#: ../includes/checkout-template.php:206 -msgid "Card Number" -msgstr "رقم البطاقة الإئتمانية" - -#: ../includes/checkout-template.php:209 -msgid "Security code" -msgstr "الرمز السري" - -#: ../includes/checkout-template.php:210 -msgid "CVC" -msgstr "CVC الأرقام الثلاثة الأخير التي خلف البطاقة الإئتمانية" - -#: ../includes/checkout-template.php:216 -msgid "Month" -msgstr "شهر" - -#: ../includes/checkout-template.php:218 -msgid "Year" -msgstr "السنة" - -#: ../includes/checkout-template.php:219 -msgid "Expiration (MM/YYYY)" -msgstr "نهاية الصلاحية ( الشهر/السنة )" - -#: ../includes/checkout-template.php:249 -msgid "Address line 1" -msgstr "سطر العنوان 1" - -#: ../includes/checkout-template.php:250 -msgid "Billing Address" -msgstr "العنوان الذي ترسل إليه الفاتورة" - -#: ../includes/checkout-template.php:253 -msgid "Address line 2" -msgstr "سطر العنوان 2" - -#: ../includes/checkout-template.php:254 -msgid "Billing Address Line 2" -msgstr "العنوان الثاني الذي سترسل إليه الفاتورة" - -#: ../includes/checkout-template.php:257 -msgid "City" -msgstr "المدينة" - -#: ../includes/checkout-template.php:258 -msgid "Billing City" -msgstr "المدينة التي سترسل إليها الفاتورة" - -#: ../includes/checkout-template.php:269 -msgid "Billing Country" -msgstr "البلد الذي سترسل إليه الفاتورة" - -#: ../includes/checkout-template.php:272 -msgid "State / Province" -msgstr "المنطقة/الولاية" - -#: ../includes/checkout-template.php:289 -msgid "Billing State / Province" -msgstr "المنطقةالتي سترسل إليها الفاتورة" - -#: ../includes/checkout-template.php:292 -msgid "Zip / Postal code" -msgstr "الرمز البريدي" - -#: ../includes/checkout-template.php:293 -msgid "Billing Zip / Postal Code" -msgstr "رمز البريد الذي سيرسل الفاتورة" - -#: ../includes/checkout-template.php:320 -msgid "Already have an account?" -msgstr "لديك حساب مسبقاً؟" - -#: ../includes/checkout-template.php:320 -msgid "Login" -msgstr "أدخل" - -#: ../includes/checkout-template.php:322 -msgid "Create an account" -msgstr "انشاء حساب" - -#: ../includes/checkout-template.php:322 -msgid "(optional)" -msgstr "(اختياري)" - -#: ../includes/checkout-template.php:325 -#: ../includes/checkout-template.php:326 -#: ../includes/checkout-template.php:373 -msgid "Username" -msgstr "اسم المستخدم:" - -#: ../includes/checkout-template.php:329 -#: ../includes/checkout-template.php:330 -#: ../includes/checkout-template.php:377 -msgid "Password" -msgstr "كلمة المرور:" - -#: ../includes/checkout-template.php:333 -msgid "Confirm password" -msgstr "تأكيد كلمة المرور" - -#: ../includes/checkout-template.php:334 -msgid "Password Again" -msgstr "كلمة المرور مرة أخرى" - -#: ../includes/checkout-template.php:339 -#: ../includes/checkout-template.php:340 -msgid "Email" -msgstr "البريد الإلكتروني" - -#: ../includes/checkout-template.php:369 -msgid "Login to your account" -msgstr "الدخول إلى حسابك" - -#: ../includes/checkout-template.php:372 -msgid "Your username" -msgstr "اسمك" - -#: ../includes/checkout-template.php:376 -msgid "Your password" -msgstr "كلمتك السرية" - -#: ../includes/checkout-template.php:384 -msgid "Need to create an account?" -msgstr "تريد أنشاء حساب؟" - -#: ../includes/checkout-template.php:386 -msgid "Register" -msgstr "التسجيل" - -#: ../includes/checkout-template.php:386 -msgid "or checkout as a guest." -msgstr "أو الدفع و الخروج كزائر." - -#: ../includes/checkout-template.php:415 -msgid "Choose Your Payment Method" -msgstr "اختيار طريقة الدفع" - -#: ../includes/checkout-template.php:443 -msgid "Enter discount" -msgstr "أدخل الخصم" - -#: ../includes/checkout-template.php:445 -msgid "Discount" -msgstr "الخصم" - -#: ../includes/checkout-template.php:447 -msgid "Apply Discount" -msgstr "تطبيق الخصم" - -#: ../includes/checkout-template.php:473 -msgid "Next" -msgstr "التالي" - -#: ../includes/checkout-template.php:497 -#: ../includes/dashboard-columns.php:58 -msgid "Purchase" -msgstr "شراء" - -#: ../includes/dashboard-columns.php:26 -msgid "Name" -msgstr "الاسم" - -#: ../includes/dashboard-columns.php:27 -msgid "Categories" -msgstr "الفئة" - -#: ../includes/dashboard-columns.php:28 -msgid "Tags" -msgstr "العلامات" - -#: ../includes/dashboard-columns.php:29 -#: ../includes/dashboard-columns.php:231 -msgid "Price" -msgstr "السعر" - -#: ../includes/dashboard-columns.php:30 -msgid "Sales" -msgstr "المبيعات" - -#: ../includes/dashboard-columns.php:31 -msgid "Earnings" -msgstr "الأرباح" - -#: ../includes/dashboard-columns.php:32 -msgid "Short Code" -msgstr "الكود القصير" - -#: ../includes/dashboard-columns.php:33 -msgid "Date" -msgstr "التاريخ" - -#: ../includes/dashboard-columns.php:189 -msgid "Show all categories" -msgstr "اظهر جميع الفئات" - -#: ../includes/dashboard-columns.php:200 -msgid "Show all tags" -msgstr "اظهر جميع العلامات " - -#: ../includes/dashboard-columns.php:228 -#, php-format -msgid "%s Data" -msgstr "بيانات النسبة %" - -#: ../includes/email-functions.php:47 -msgid "Purchase Receipt" -msgstr "فاتورة الشراء" - -#: ../includes/email-functions.php:62 -msgid "Hello" -msgstr "مرحباً" - -#: ../includes/email-functions.php:62 -msgid "A download purchase has been made" -msgstr "تم شراء التحميل" - -#: ../includes/email-functions.php:63 -msgid "Downloads sold:" -msgstr "التحميلات المباعة:" - -#: ../includes/email-functions.php:76 -msgid "Purchased by: " -msgstr "اشتراه:" - -#: ../includes/email-functions.php:77 -msgid "Amount: " -msgstr "المبلغ:" - -#: ../includes/email-functions.php:78 -msgid "Payment Method: " -msgstr "طرق الدفع:" - -#: ../includes/email-functions.php:79 -msgid "Thank you" -msgstr "شكراً" - -#: ../includes/email-functions.php:82 -msgid "New download purchase" -msgstr "شراء تحميل جديد" - -#: ../includes/email-template.php:23 -msgid "Default Template" -msgstr "القالب الإفتراضي" - -#: ../includes/email-template.php:24 -msgid "No template, plain text only" -msgstr "لا قالب، فقط نص عادي" - -#: ../includes/email-template.php:115 -msgid "Sample Product Title" -msgstr "اسم عينة المنتج" - -#: ../includes/email-template.php:118 -msgid "Sample Download File Name" -msgstr "اسم عينة ملف التحميل" - -#: ../includes/email-template.php:118 -msgid "Optional notes about this download." -msgstr "ملاحظات اختيارية عن هذا التحميل" - -#: ../includes/email-template.php:129 -msgid "These are some sample notes added to a product." -msgstr "هناك عينة ملاحظات أضيفت للمنتج" - -#: ../includes/email-template.php:168 -msgid "Purchase Receipt Preview" -msgstr "شراء معاينة الفاتورة" - -#: ../includes/email-template.php:168 -msgid "Preview Purchase Receipt" -msgstr "معاينة فاتورة المشتريات" - -#: ../includes/email-template.php:209 -msgid "Dear" -msgstr "عزيزي" - -#: ../includes/email-template.php:210 -msgid "Thank you for your purchase. Please click on the link(s) below to download your files." -msgstr "شكراً لك على شرائك، نرجو أن تضغط على الرابط أدناه لتحميل الملف." - -#: ../includes/error-tracking.php:30 -msgid "Error" -msgstr "خطأ" - -#: ../includes/export-functions.php:39 -msgid "ID" -msgstr "المعرف" - -#: ../includes/export-functions.php:43 -msgid "Products" -msgstr "المنتج" - -#: ../includes/export-functions.php:44 -msgid "Discounts," -msgstr "الخصم" - -#: ../includes/export-functions.php:45 -msgid "Amount paid" -msgstr "مبلغ الدفع" - -#: ../includes/export-functions.php:46 -msgid "Payment method" -msgstr "طريقة الدفع" - -#: ../includes/export-functions.php:47 -msgid "Key" -msgstr "مفتاح" - -#: ../includes/export-functions.php:49 -msgid "User" -msgstr "المستخدم" - -#: ../includes/export-functions.php:50 -msgid "Status" -msgstr "الحالة" - -#: ../includes/export-functions.php:111 -#: ../includes/export-functions.php:119 -msgid "none" -msgstr "لا شئ" - -#: ../includes/export-functions.php:127 -msgid "guest" -msgstr "ضيف" - -#: ../includes/export-functions.php:135 -msgid "No payments recorded yet" -msgstr "لم يتم تسجيل أي مدفوعات" - -#: ../includes/export-functions.php:169 -msgid "Export not allowed for non-administrators." -msgstr "لا يسمح التصدير لغير المسئولين" - -#: ../includes/gateway-functions.php:28 -msgid "Test Payment" -msgstr "اختبار الدفع" - -#: ../includes/graphing.php:42 -#, php-format -msgid "%s Performance in Sales" -msgstr "أداء المبيعات بالنسبة" - -#: ../includes/graphing.php:77 -msgid "Download" -msgstr "حملّ" - -#: ../includes/graphing.php:88 -#, php-format -msgid "%s Performance in Earnings" -msgstr "أداء الأرباح بالنسبة" - -#: ../includes/graphing.php:136 -msgid "Earnings per month" -msgstr "الأرباح شهرياً" - -#: ../includes/graphing.php:168 -msgid "Day" -msgstr "يوم" - -#: ../includes/graphing.php:189 -#, php-format -msgid "Earnings per day for last %s days" -msgstr "الأرباح اليومية لآخر %s أيام" - -#: ../includes/graphing.php:236 -msgid "Sales per month" -msgstr "المبيعات شهرياً" - -#: ../includes/install.php:42 -msgid "Purchase Confirmation" -msgstr "توكيد الشراء" - -#: ../includes/install.php:43 -msgid "Thank you for your purchase!" -msgstr "شكراً لك على تسوقك عندنا" - -#: ../includes/install.php:53 -msgid "Purchase History" -msgstr "تاريخ الشراء" - -#: ../includes/login-register.php:45 -msgid "Log into Your Account" -msgstr "الدخول إلى حسابك" - -#: ../includes/login-register.php:61 -msgid "Lost Password" -msgstr "فقدان الكلمة السرية" - -#: ../includes/login-register.php:62 -msgid "Lost Password?" -msgstr "فقدت الكلمة السرية؟" - -#: ../includes/login-register.php:69 -msgid "You are already logged in" -msgstr "لقد دخلت مسبقاً" - -#: ../includes/login-register.php:92 -msgid "The password you entered is incorrect" -msgstr "كلمة المرور التي أدخلتها غير صحيحة" - -#: ../includes/login-register.php:95 -msgid "The username you entered does not exist" -msgstr "اسم المستخدم الذي أدخلته ليس موجود" - -#: ../includes/metabox.php:22 -#, php-format -msgid "%1$s Configuration" -msgstr "الترتيب 1$ %" - -#: ../includes/metabox.php:23 -msgid "Product Notes" -msgstr "ملاحظة المنتج" - -#: ../includes/metabox.php:24 -#, php-format -msgid "%1$s Stats" -msgstr "احصائيات 1$ %" - -#: ../includes/metabox.php:25 -msgid "Purchase Log" -msgstr "سجل أداء الشراء" - -#: ../includes/metabox.php:26 -msgid "File Download Log" -msgstr "سجل أداء ملف التحميل" - -#: ../includes/metabox.php:84 -msgid "Pricing" -msgstr "التسعير" - -#: ../includes/metabox.php:98 -msgid "Enable variable pricing" -msgstr "تمكين التسعير المتغير" - -#: ../includes/metabox.php:113 -#: ../includes/metabox.php:115 -#: ../includes/metabox.php:135 -#: ../includes/metabox.php:137 -msgid "9.99" -msgstr "9.99" - -#: ../includes/metabox.php:120 -#: ../includes/metabox.php:142 -msgid "Option Name" -msgstr "اسم الخيار" - -#: ../includes/metabox.php:149 -#: ../includes/metabox.php:220 -msgid "Add New" -msgstr "أضف جديد" - -#: ../includes/metabox.php:159 -msgid "for" -msgstr "لأجل" - -#: ../includes/metabox.php:181 -msgid "Download Files" -msgstr "تحميل الملفات" - -#: ../includes/metabox.php:184 -msgid "File Name" -msgstr "اسم الملف" - -#: ../includes/metabox.php:185 -msgid "File URL" -msgstr "رابط الملف" - -#: ../includes/metabox.php:196 -#: ../includes/metabox.php:215 -msgid "file name" -msgstr "اسم الملف" - -#: ../includes/metabox.php:197 -#: ../includes/metabox.php:216 -msgid "file url" -msgstr "رابط الملف" - -#: ../includes/metabox.php:199 -msgid "All Prices" -msgstr "جميع الأسعار" - -#: ../includes/metabox.php:206 -#: ../includes/metabox.php:217 -msgid "Upload File" -msgstr "رفع ملف" - -#: ../includes/metabox.php:220 -msgid "Upload the downloadable files." -msgstr "رفع الملفات القابلة للتحميل" - -#: ../includes/metabox.php:241 -msgid "Purchase Text" -msgstr "نص الشراء" - -#: ../includes/metabox.php:243 -msgid "Add the text you would like displayed for the purchase text" -msgstr "اضف النص الذي تريده لنص الشراء" - -#: ../includes/metabox.php:262 -msgid "Link Style" -msgstr "نمط الرابط" - -#: ../includes/metabox.php:264 -msgid "Button" -msgstr "زر" - -#: ../includes/metabox.php:265 -msgid "Text" -msgstr "نص" - -#: ../includes/metabox.php:266 -msgid "Choose the style of the purchase link" -msgstr "اختار نمط رابط الشراء" - -#: ../includes/metabox.php:287 -msgid "Button Color" -msgstr "لون الزر" - -#: ../includes/metabox.php:295 -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "اختار لون رابط الشراء، إذا كنت قد اخترت الزر " - -#: ../includes/metabox.php:313 -msgid "Disable the purchase button?" -msgstr "تعطيل زر الشراء؟" - -#: ../includes/metabox.php:316 -msgid "Check this if you do not want the purchase button displayed." -msgstr "علم على هذا إن كنت لا تريد عرض الزر" - -#: ../includes/metabox.php:338 -msgid "Notes" -msgstr "ملاحظات" - -#: ../includes/metabox.php:341 -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "خيار النمط أعلاه لا يعكس نمط الرمز القصير. الرمز القصير يسمح لك بوضع زر الشراء لهذا التحميل بأي مكان على الموقع" - -#: ../includes/metabox.php:347 -msgid "This short code can be placed anywhere on your site" -msgstr "هذا الرمز القصير يمكن وضعه في أي مكان في موقعك" - -#: ../includes/metabox.php:381 -msgid "Special notes or instructions for this product. These notes will be added to the purchase receipt." -msgstr "ملاحظات أو تعليمات خاصة لهذا المنتج. هذه الملاحظات ستضاف لفاتورة الشراء" - -#: ../includes/metabox.php:469 -msgid "Sales:" -msgstr "المبيعات:" - -#: ../includes/metabox.php:475 -msgid "Earnings:" -msgstr "الأرباح:" - -#: ../includes/metabox.php:511 -msgid "Sales Log" -msgstr "أداء المبيعات" - -#: ../includes/metabox.php:513 -msgid "Each sale for this download is listed below." -msgstr "كل بيع لهذا التحميل يتم سرده أدناه" - -#: ../includes/metabox.php:527 -#: ../includes/metabox.php:619 -msgid "Date:" -msgstr "التاريخ:" - -#: ../includes/metabox.php:531 -msgid "Buyer:" -msgstr "المشتري:" - -#: ../includes/metabox.php:535 -msgid "Purchase ID:" -msgstr "هوية الشراء:" - -#: ../includes/metabox.php:543 -msgid "No sales yet" -msgstr "ليس هناك مبيعات بعد" - -#: ../includes/metabox.php:559 -#: ../includes/metabox.php:656 -msgid "Previous" -msgstr "السابق" - -#: ../includes/metabox.php:600 -msgid "Download Log" -msgstr "أداء التحميل" - -#: ../includes/metabox.php:602 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "كل مرة يتم فيها تحميل ملف، فهو مسجل بالأسفل" - -#: ../includes/metabox.php:623 -msgid "Downloaded by:" -msgstr "تم تحميلة بواسطة:" - -#: ../includes/metabox.php:627 -msgid "IP Address:" -msgstr "عنوان الآيبي:" - -#: ../includes/metabox.php:631 -msgid "File: " -msgstr "ملف:" - -#: ../includes/metabox.php:640 -msgid "No file downloads yet yet" -msgstr "ليس هناك ملفات تحميل بعد بعد" - -#: ../includes/misc-functions.php:185 -msgid "US Dollars ($)" -msgstr "دولار أمريكي ($)" - -#: ../includes/misc-functions.php:186 -msgid "Euros (€)" -msgstr "يورو (€)" - -#: ../includes/misc-functions.php:187 -msgid "Pounds Sterling (£)" -msgstr "جنيه استرليني (£)" - -#: ../includes/misc-functions.php:188 -msgid "Australian Dollars ($)" -msgstr "دولار أسترالي ($)" - -#: ../includes/misc-functions.php:189 -msgid "Brazilian Real ($)" -msgstr "ريال برازيلي ($)" - -#: ../includes/misc-functions.php:190 -msgid "Canadian Dollars ($)" -msgstr "دولار كندي ($)" - -#: ../includes/misc-functions.php:191 -msgid "Czech Koruna" -msgstr "الكورونا التشيكية" - -#: ../includes/misc-functions.php:192 -msgid "Danish Krone" -msgstr "الكورونا الدنماركية" - -#: ../includes/misc-functions.php:193 -msgid "Hong Kong Dollar ($)" -msgstr "دولار هوج كونج ($)" - -#: ../includes/misc-functions.php:194 -msgid "Hungarian Forint" -msgstr "الفرونت الهنغاري" - -#: ../includes/misc-functions.php:195 -msgid "Israeli Shekel" -msgstr "الشيكل الإسرائيلي" - -#: ../includes/misc-functions.php:196 -msgid "Japanese Yen (¥)" -msgstr "ين ياباني (¥)" - -#: ../includes/misc-functions.php:197 -msgid "Malaysian Ringgits" -msgstr "رينغيت ماليزي" - -#: ../includes/misc-functions.php:198 -msgid "Mexican Peso ($)" -msgstr "بيزو مكسيكي ($)" - -#: ../includes/misc-functions.php:199 -msgid "New Zealand Dollar ($)" -msgstr "الدولار النيوزلندي ($)" - -#: ../includes/misc-functions.php:200 -msgid "Norwegian Krone" -msgstr "الكرونا النرويجية" - -#: ../includes/misc-functions.php:201 -msgid "Philippine Pesos" -msgstr "البيزو الفلبيني" - -#: ../includes/misc-functions.php:202 -msgid "Polish Zloty" -msgstr "الزلوتي البولندي" - -#: ../includes/misc-functions.php:203 -msgid "Singapore Dollar ($)" -msgstr "الدولار السنغافوري ($)" - -#: ../includes/misc-functions.php:204 -msgid "Swedish Krona" -msgstr "الكرونا السويدية" - -#: ../includes/misc-functions.php:205 -msgid "Swiss Franc" -msgstr "الفرنك السويسر" - -#: ../includes/misc-functions.php:206 -msgid "Taiwan New Dollars" -msgstr "الدولارات التايوانية الجديدة" - -#: ../includes/misc-functions.php:207 -msgid "Thai Baht" -msgstr "البات التايلندي" - -#: ../includes/misc-functions.php:208 -msgid "Indian Rupee" -msgstr "الربية الهندية" - -#: ../includes/misc-functions.php:209 -msgid "Turkish Lira" -msgstr "الليرة التركية" - -#: ../includes/misc-functions.php:210 -msgid "Iranian Rial" -msgstr "ريال إيراني" - -#: ../includes/payment-functions.php:295 -msgid "Pending" -msgstr "في الانتظار" - -#: ../includes/payment-functions.php:296 -msgid "Complete" -msgstr "تم" - -#: ../includes/payment-functions.php:297 -msgid "Refunded" -msgstr "إستعادة المال" - -#: ../includes/pdf-reports.php:36 -msgid "to" -msgstr "إلى" - -#: ../includes/pdf-reports.php:41 -#: ../includes/pdf-reports.php:52 -msgid "Sales and earnings reports for the current year for all products" -msgstr "تقرير مبيعات و أرباح السنة الحالية لجميع المنتجات" - -#: ../includes/pdf-reports.php:42 -#: ../includes/pdf-reports.php:43 -msgid "Easy Digital Downloads" -msgstr "Easy Digital Downloads ( التحميل الرقمي السهل )" - -#: ../includes/pdf-reports.php:57 -msgid "Date Range: " -msgstr "نطاق التاريخ:" - -#: ../includes/pdf-reports.php:61 -msgid "Table View" -msgstr "مشاهدة الجدول" - -#: ../includes/pdf-reports.php:65 -msgid "Product Name" -msgstr "اسم المنتج" - -#: ../includes/pdf-reports.php:69 -msgid "Number of Sales" -msgstr "عدد المبيعات" - -#: ../includes/pdf-reports.php:70 -msgid "Earnings to Date" -msgstr "تاريخ الأرباح" - -#: ../includes/pdf-reports.php:112 -msgid "No Downloads found." -msgstr "ليس هناك تحميلات" - -#: ../includes/pdf-reports.php:119 -msgid "Graph View" -msgstr "مشاهدة الرسم البياني" - -#: ../includes/pdf-reports.php:212 -msgid "Sales and Earnings by Month for all Products" -msgstr "مبيعات و أرباح كل المنتجات خلال شهر" - -#: ../includes/pdf-reports.php:226 -msgid "Jan" -msgstr "يناير" - -#: ../includes/pdf-reports.php:227 -msgid "Feb" -msgstr "فبراير" - -#: ../includes/pdf-reports.php:228 -msgid "Mar" -msgstr "مارس" - -#: ../includes/pdf-reports.php:229 -msgid "Apr" -msgstr "أبريل" - -#: ../includes/pdf-reports.php:230 -msgid "May" -msgstr "مايو" - -#: ../includes/pdf-reports.php:231 -msgid "June" -msgstr "يونيو" - -#: ../includes/pdf-reports.php:232 -msgid "July" -msgstr "يوليو" - -#: ../includes/pdf-reports.php:233 -msgid "Aug" -msgstr "أغسطس" - -#: ../includes/pdf-reports.php:234 -msgid "Sept" -msgstr "سبتمبر" - -#: ../includes/pdf-reports.php:235 -msgid "Oct" -msgstr "أوكتوبر" - -#: ../includes/pdf-reports.php:236 -msgid "Nov" -msgstr "نوفمبر" - -#: ../includes/pdf-reports.php:237 -msgid "Dec" -msgstr "ديسمبر" - -#: ../includes/post-types.php:44 -#, php-format -msgid "Add New %1$s" -msgstr "أضف %1$ جديد" - -#: ../includes/post-types.php:45 -#, php-format -msgid "Edit %1$s" -msgstr "تحرير %1$" - -#: ../includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "%1$ جديد" - -#: ../includes/post-types.php:47 -#, php-format -msgid "All %2$s" -msgstr "الكل %2$" - -#: ../includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "عرض %1$" - -#: ../includes/post-types.php:49 -#, php-format -msgid "Search %2$s" -msgstr "بحث %2$" - -#: ../includes/post-types.php:50 -#, php-format -msgid "No %2$s found" -msgstr "لم يتم العثور على %2$" - -#: ../includes/post-types.php:51 -#, php-format -msgid "No %2$s found in Trash" -msgstr "لم يتم العثور على %2$ في سلة المحذوفات" - -#: ../includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "%2$" - -#: ../includes/post-types.php:79 -msgid "Payments" -msgstr "المدفوعات" - -#: ../includes/post-types.php:80 -msgid "Payment" -msgstr "الدفع" - -#: ../includes/post-types.php:82 -msgid "Add New Payment" -msgstr "أضف دفع جديد" - -#: ../includes/post-types.php:83 -msgid "Edit Payment" -msgstr "تحرير الدفع" - -#: ../includes/post-types.php:84 -msgid "New Payment" -msgstr "دفع جديد" - -#: ../includes/post-types.php:85 -msgid "All Payments" -msgstr "كل المدفوعات" - -#: ../includes/post-types.php:86 -msgid "View Payment" -msgstr "عرض الدفع" - -#: ../includes/post-types.php:87 -msgid "Search Payments" -msgstr "البحث في المدفوعات" - -#: ../includes/post-types.php:88 -msgid "No Payments found" -msgstr "لم يتم العثور على المدفوعات" - -#: ../includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "لم يتم العثور على مدفوعات في سلة المحذوفات" - -#: ../includes/post-types.php:126 -msgid "Downloads" -msgstr "التحميلات" - -#: ../includes/post-types.php:174 -msgid "Category" -msgstr "الفئة" - -#: ../includes/post-types.php:175 -msgid "Search Categories" -msgstr "بحث في الفئة" - -#: ../includes/post-types.php:176 -msgid "All Categories" -msgstr "كل الفئات" - -#: ../includes/post-types.php:177 -msgid "Parent Category" -msgstr "الفئة الرئيسية" - -#: ../includes/post-types.php:178 -msgid "Parent Category:" -msgstr "الفئة الرئيسية:" - -#: ../includes/post-types.php:179 -msgid "Edit Category" -msgstr "تحرير الفئة" - -#: ../includes/post-types.php:180 -msgid "Update Category" -msgstr "تحديث الفئة" - -#: ../includes/post-types.php:181 -msgid "Add New Category" -msgstr "أضافة فئة جديدة" - -#: ../includes/post-types.php:182 -msgid "New Category Name" -msgstr "اسم فئة جديدة" - -#: ../includes/post-types.php:199 -msgid "Tag" -msgstr "علامة" - -#: ../includes/post-types.php:200 -msgid "Search Tags" -msgstr "البحث في العلامات" - -#: ../includes/post-types.php:201 -msgid "All Tags" -msgstr "كل العلامات" - -#: ../includes/post-types.php:202 -msgid "Parent Tag" -msgstr "العلامة الرئيسية" - -#: ../includes/post-types.php:203 -msgid "Parent Tag:" -msgstr "العلامة الرئيسية:" - -#: ../includes/post-types.php:204 -msgid "Edit Tag" -msgstr "تحرير العلامة" - -#: ../includes/post-types.php:205 -msgid "Update Tag" -msgstr "تحديث العلامة" - -#: ../includes/post-types.php:206 -msgid "Add New Tag" -msgstr "إضافة علامة جديدة" - -#: ../includes/post-types.php:207 -msgid "New Tag Name" -msgstr "اسم علامة جديدة" - -#: ../includes/post-types.php:239 -#: ../includes/post-types.php:240 -msgid "Download updated." -msgstr "تحميل محدث" - -#: ../includes/post-types.php:241 -msgid "Download published." -msgstr "تحميل منشور" - -#: ../includes/post-types.php:242 -msgid "Download saved." -msgstr "تحميل محفوظ" - -#: ../includes/post-types.php:243 -msgid "Download submitted." -msgstr "تم عرض التحميل" - -#: ../includes/process-download.php:266 -#: ../includes/process-download.php:283 -msgid "Sorry but this file does not exist." -msgstr "عفواً لكن هذا الملف غير موجود" - -#: ../includes/process-download.php:294 -msgid "You do not have permission to download this file" -msgstr "غير مصرح لك بتحميل هذا الملف" - -#: ../includes/process-download.php:294 -msgid "Purchase Verification Failed" -msgstr "فشل التحقق من الشراء" - -#: ../includes/process-purchase.php:206 -msgid "The selected gateway is not active" -msgstr "البوابة التي اخترتها ليست نشطة" - -#: ../includes/process-purchase.php:210 -msgid "No gateway has been selected" -msgstr "لم يتم اختيار البوابة" - -#: ../includes/process-purchase.php:259 -msgid "You must agree to the terms of use" -msgstr "يجب أن توافق على شروط الاستخدام" - -#: ../includes/process-purchase.php:289 -msgid "Please enter a valid email address." -msgstr "رجاءً أدخل نوان بريد إلكتروني صحيح" - -#: ../includes/process-purchase.php:303 -msgid "The user information is invalid." -msgstr "معلومات المستخدم غير صحيحة" - -#: ../includes/process-purchase.php:349 -msgid "Username already taken" -msgstr "هذا الاسم قد اختير مسبقاً" - -#: ../includes/process-purchase.php:355 -msgid "Invalid username" -msgstr "اسم مستخدم غير صالح" - -#: ../includes/process-purchase.php:366 -msgid "You must register or login to complete your purchase" -msgstr "يجب أن تسجل او تدخل لتشتري" - -#: ../includes/process-purchase.php:378 -#: ../includes/process-purchase.php:522 -msgid "Invalid email" -msgstr "بريد إلكتروني غير صالح" - -#: ../includes/process-purchase.php:384 -msgid "Email already used" -msgstr "البريد الإلكتروني موجود مسبقاً" - -#: ../includes/process-purchase.php:396 -#: ../includes/process-purchase.php:529 -msgid "Enter an email" -msgstr "أدخل البريد الإلكتروني" - -#: ../includes/process-purchase.php:407 -msgid "Passwords don't match" -msgstr "كلمة المرور غير متطابقة" - -#: ../includes/process-purchase.php:422 -#: ../includes/process-purchase.php:487 -msgid "Enter a password" -msgstr "أدخل كلمة المرور" - -#: ../includes/process-purchase.php:427 -msgid "Enter the password confirmation" -msgstr "أدخل توكيد كلمة السر" - -#: ../includes/process-purchase.php:454 -msgid "You must login or register to complete your purchase" -msgstr "يجب أن تسجل أو تدخل لتتم عملية الشراء" - -#: ../includes/register-settings.php:41 -msgid "Test Mode" -msgstr "اختبار الوضع" - -#: ../includes/register-settings.php:42 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "في وضع التجربة لن تتم معالجة أي عمليات مباشرة. لاستخدام وضع التجربة بشكل تام, يجب أن يكون لديك حساب sandbox / تجربة لبوابة الدفع التي تجربها" - -#: ../includes/register-settings.php:47 -msgid "Checkout Page" -msgstr "صفحة الدفع و الخروج" - -#: ../includes/register-settings.php:48 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "هذه صفحة الدفع و الخروج حيث يستكمل المشترين شرائهم" - -#: ../includes/register-settings.php:54 -msgid "Success Page" -msgstr "صفحة نجاح العملية" - -#: ../includes/register-settings.php:55 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "هذه الصفحة التي يُرسل لها المشترين بعد إتمام عملية الشراء" - -#: ../includes/register-settings.php:61 -msgid "Download Links on Success Page" -msgstr "تحميل الروابط على صفحة اتمام العملية بنجاح" - -#: ../includes/register-settings.php:62 -msgid "Show a list of all download links on the success page after completing a purchase?" -msgstr "هل تريد عرض قائمة بجميع روابط التحميل في صفحة تمت العملية بنجاح بعد اتمام الشراء؟" - -#: ../includes/register-settings.php:67 -msgid "Currency Settings" -msgstr "إعدادات العملة" - -#: ../includes/register-settings.php:68 -msgid "Configure the currency options" -msgstr "تكوين خيارات العملة" - -#: ../includes/register-settings.php:73 -msgid "Currency" -msgstr "العملة" - -#: ../includes/register-settings.php:74 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "اختر العملة. لاحظ أن بعض بوابات الدفع لديها قيود للعملة" - -#: ../includes/register-settings.php:80 -msgid "Currency Position" -msgstr "مكان العملة" - -#: ../includes/register-settings.php:81 -msgid "Choose the location of the currency sign." -msgstr "اختر مكان علامة العملة" - -#: ../includes/register-settings.php:84 -msgid "Before - $10" -msgstr "قبل - 10$" - -#: ../includes/register-settings.php:85 -msgid "After - 10$" -msgstr "بعد - $10" - -#: ../includes/register-settings.php:90 -msgid "Thousands Separator" -msgstr "فواصل الألوف" - -#: ../includes/register-settings.php:91 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "الرمز ( بالعادة , أو . ) لفصل الألوف" - -#: ../includes/register-settings.php:98 -msgid "Decimal Separator" -msgstr "الفاصل العشري" - -#: ../includes/register-settings.php:99 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "بالعادة الرمز ( , أو . ) للفصل بين النقاط العشرية" - -#: ../includes/register-settings.php:110 -msgid "Payment Gateways" -msgstr "بوابات الدفع الألكتروني" - -#: ../includes/register-settings.php:111 -msgid "Choose the payment gateways you want to enable." -msgstr "اختر بوابات الدفع التي تريد تمكينها" - -#: ../includes/register-settings.php:117 -msgid "Accepted Payment Method Icons" -msgstr "أيقونات طرق الدفع المقبولة" - -#: ../includes/register-settings.php:118 -msgid "Display icons for the selected payment methods" -msgstr "عرض أيقونات طرق الدفع المحددة" - -#: ../includes/register-settings.php:118 -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "ينبغي أن تضبط إعدادات بوابة الدفع الخاصة بك إن كنت تقبل بطاقات الائتمان" - -#: ../includes/register-settings.php:131 -msgid "PayPal Settings" -msgstr "إعدادات paypal" - -#: ../includes/register-settings.php:132 -msgid "Configure the PayPal settings" -msgstr "ضبط اعدادات paypal" - -#: ../includes/register-settings.php:137 -msgid "PayPal Email" -msgstr "البريد الإلكتروني للـ paypal" - -#: ../includes/register-settings.php:138 -msgid "Enter your PayPal account's email" -msgstr "ادخل حسابك الإلكتروني في الـ paypal" - -#: ../includes/register-settings.php:144 -msgid "Alternate PayPal Purchase Verification" -msgstr "بديل التحقق من الشراء في الـ PayPal" - -#: ../includes/register-settings.php:145 -msgid "If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal." -msgstr "إن لم يؤشر على أن الدفع قد تم, فتحقق من هذه الخانة. علماً أن هذا سيعيد المشترين إلى موقعك من الـ Paypal" - -#: ../includes/register-settings.php:150 -msgid "Disable PayPal IPN Verification" -msgstr "تعطيل التحقق من PayPal IPN" - -#: ../includes/register-settings.php:151 -msgid "If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases." -msgstr "إن لم يؤشر على أن الدفع قد تم. فعلم على هذه الخانة، و أشر هذه الخانة. هذا يفرض على الموقع بأن يستخدم طرق أقل أمناً للتحقق من المشتريات" - -#: ../includes/register-settings.php:160 -msgid "Email Template" -msgstr "قالب البريد الألكتروني" - -#: ../includes/register-settings.php:161 -msgid "Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" to see the new template." -msgstr "اختر قالباً. اضغط /\"حفظ التغييرات/\" ثم / \"عرض فاتورة المشتريات /\" لرؤية القالب الجديد" - -#: ../includes/register-settings.php:173 -msgid "From Name" -msgstr "من الاسم" - -#: ../includes/register-settings.php:174 -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "اسم المكان الذي أصدرت منه فاتورة مشترياتك. يحتمل أن يكون اسم موقعك او محلك التجاري" - -#: ../includes/register-settings.php:179 -msgid "From Email" -msgstr "من البريد الإلكتروني" - -#: ../includes/register-settings.php:180 -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "البريد الإلكتروني لإرسال فاتورة المشتريات منه. و هذا يمثل / \"من/\" و / \"رد على/\" العنوان" - -#: ../includes/register-settings.php:185 -msgid "Purchase Email Subject" -msgstr "موضوع رسالة الشراء" - -#: ../includes/register-settings.php:186 -msgid "Enter the subject line for the purchase receipt email" -msgstr "ادخل سطر موضوع رسالة فاتورة الشراء " - -#: ../includes/register-settings.php:192 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "أدخل عنوان البريد الإلكتروني الذي يرسل للمستخدمين بعد عملية شراء ناجحة. HTML مقبول. قالب علامات مقبول" - -#: ../includes/register-settings.php:193 -msgid "A list of download URLs for each download purchased" -msgstr "قائمة بروابط التحميل لكل تحميل تم شراءه" - -#: ../includes/register-settings.php:194 -msgid "The buyer's name" -msgstr "اسم المشتري" - -#: ../includes/register-settings.php:195 -msgid "The date of the purchase" -msgstr "تاريخ الشراء" - -#: ../includes/register-settings.php:196 -msgid "The total price of the purchase" -msgstr "السعر الإجمالي للشراء" - -#: ../includes/register-settings.php:197 -msgid "The unique ID number for this purchase receipt" -msgstr "رقم المعرف لفاتورة الشراء" - -#: ../includes/register-settings.php:198 -msgid "The method of payment used for this purchase" -msgstr "طريقة الدفع المستخدمة لهذا الشراء" - -#: ../includes/register-settings.php:199 -msgid "Your site name" -msgstr "اسم موقعك" - -#: ../includes/register-settings.php:208 -msgid "Disable Styles" -msgstr "تعطيل الأنماط" - -#: ../includes/register-settings.php:209 -msgid "Check this to disable all included styling" -msgstr "علم على هذا لتعطيل كل الأنماط" - -#: ../includes/register-settings.php:214 -msgid "Checkout Button Color" -msgstr "لون زر الدفع و الخروج" - -#: ../includes/register-settings.php:215 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "اختر لون الزر الذي تريد استخدامه لزر الدفع و الخروج" - -#: ../includes/register-settings.php:225 -msgid "Disable Ajax" -msgstr "عطل الأجاكس Ajax" - -#: ../includes/register-settings.php:226 -msgid "Check this to disable AJAX for the shopping cart." -msgstr "علم على هذا لتعطيل Ajax سلة التسوق" - -#: ../includes/register-settings.php:231 -msgid "Enable jQuery Validation" -msgstr "شغيل فاعلية jQuery " - -#: ../includes/register-settings.php:232 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "علم هذا لتشغيل فاعلية jQuery في استمارة الدفع و الخروج" - -#: ../includes/register-settings.php:237 -msgid "Disable Guest Checkout" -msgstr "تعطيل دفع و خروج الزائر" - -#: ../includes/register-settings.php:238 -msgid "Require that users be logged-in to purchase files." -msgstr "أطلب أن يكون المستخدمين مسجلين لشراء الملفات" - -#: ../includes/register-settings.php:243 -msgid "Show Register / Login Form?" -msgstr "اضهار استمارة التسجيل/الدخول؟" - -#: ../includes/register-settings.php:244 -msgid "Display the registration and login forms on the checkout page for non-logged-in users." -msgstr "اعرض استمارة التسجيل و الدخول في صفحة الدفع و الخروج لغير المشتركين" - -#: ../includes/register-settings.php:249 -msgid "Download Link Expiration" -msgstr "انتهاء صلاحية الرابط" - -#: ../includes/register-settings.php:250 -msgid "How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours." -msgstr "إلى متى سيظل رابط التحميل فعال؟ المدة الإفتراضية 24 ساعة من وقت شراءه. ادخل الوقت بالساعات" - -#: ../includes/register-settings.php:256 -msgid "Disable Redownload?" -msgstr "عطل إعادة التحميل؟" - -#: ../includes/register-settings.php:257 -msgid "Check this if you do not want to allow users to redownload items from their purchase history." -msgstr "علو على هذا إن لم تكن تريد للمستخدمين أن يعيدو التحميل من صفحة تاريخ مشترياتهم" - -#: ../includes/register-settings.php:262 -msgid "Terms of Agreement" -msgstr "شروط الاتفاقية" - -#: ../includes/register-settings.php:268 -msgid "Agree to Terms" -msgstr "الموافقة على الشروط" - -#: ../includes/register-settings.php:269 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing." -msgstr "علو على هذا لاظهار الموافقة على شروط الاتفاقية في صفحة الدفع و الخروج التي ينبغي على المستخدمين الموافقة عليها قبل الشراء" - -#: ../includes/register-settings.php:274 -msgid "Agree to Terms Label" -msgstr "ملصق شروط الاتفاقية" - -#: ../includes/register-settings.php:275 -msgid "Label shown next to the agree to terms check box." -msgstr "التسمية التي تظهر بجانب خانة الإختيار من الموافقة على الشروط" - -#: ../includes/register-settings.php:281 -msgid "Agreement Text" -msgstr "نص الإتفاقية" - -#: ../includes/register-settings.php:282 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "إن علمت على شروط الموافقة، فأدخل شروط الإتفاقية هنا" - -#: ../includes/register-settings.php:287 -msgid "Complete Purchase Text" -msgstr "نص الشراء الكامل" - -#: ../includes/register-settings.php:288 -msgid "The button label for completing a purchase." -msgstr "زر التسمية لإكمال عملية الشراء" - -#: ../includes/register-settings.php:314 -msgid "General Settings" -msgstr "إعدادات عامة" - -#: ../includes/register-settings.php:340 -msgid "Payment Gateway Settings" -msgstr "إعدادات بوابة الدفع" - -#: ../includes/register-settings.php:366 -msgid "Email Settings" -msgstr "إعدادات البريد الإلكتروني" - -#: ../includes/register-settings.php:392 -msgid "Style Settings" -msgstr "إعدادات النمط (ستايل)" - -#: ../includes/register-settings.php:419 -msgid "Misc Settings" -msgstr "إعدادات منوعة" - -#: ../includes/register-settings.php:746 -msgid "Settings Updated" -msgstr "الإعدادات المحدثة" - -#: ../includes/scripts.php:40 -msgid "Please enter a discount code" -msgstr "يرجى ادخال رمز الخصم" - -#: ../includes/scripts.php:41 -msgid "Discount Applied" -msgstr "الخصم التطبيقي" - -#: ../includes/scripts.php:42 -msgid "Please enter an email address before applying a discount code" -msgstr "يرجى ادخال عنوان البريد الإلكتروني قبل تطبيق رمز الخصم" - -#: ../includes/scripts.php:44 -msgid "You have already added this item to your cart" -msgstr "لقد سبق و أن اضفت هذا المنتج إلى سلتك" - -#: ../includes/scripts.php:45 -msgid "Your cart is empty" -msgstr "سلتك فارغة" - -#: ../includes/scripts.php:46 -msgid "Loading" -msgstr "تحميل" - -#: ../includes/scripts.php:123 -msgid "Add New Download" -msgstr "أضف تحميل جديد" - -#: ../includes/scripts.php:124 -msgid "Use This File" -msgstr "استخدم هذا الملف" - -#: ../includes/scripts.php:125 -msgid "Sorry, not available for variable priced products." -msgstr "عذراً، غير متوفر لمنتج متغير سعره" - -#: ../includes/scripts.php:126 -msgid "Are you sure you wish to delete this payment?" -msgstr "هل أنت متأكد من حذفك لهذا الدفع" - -#: ../includes/shortcodes.php:194 -msgid "Purchase All Items" -msgstr "شراء كل المواد" - -#: ../includes/shortcodes.php:336 -#, php-format -msgid "No %s found" -msgstr "لم يتم العثور على %s" - -#: ../includes/template-functions.php:48 -#, php-format -msgid "No checkout page has been configured. Visit Settings to set one." -msgstr "لم يتم تكوين صفحة الدفع و الخروج. اذهب إلى إعدادات to set one لتكوين واحدة" - -#: ../includes/template-functions.php:167 -msgid "added to your cart" -msgstr "أضيف إلى سلتك" - -#: ../includes/template-functions.php:263 -msgid "Gray" -msgstr "رمادي" - -#: ../includes/template-functions.php:264 -msgid "Pink" -msgstr "وردي" - -#: ../includes/template-functions.php:265 -msgid "Blue" -msgstr "أزرق" - -#: ../includes/template-functions.php:266 -msgid "Green" -msgstr "أخضر" - -#: ../includes/template-functions.php:267 -msgid "Teal" -msgstr "فيروزي" - -#: ../includes/template-functions.php:268 -msgid "Black" -msgstr "أسود" - -#: ../includes/template-functions.php:269 -msgid "Dark Gray" -msgstr "رمادي غامق" - -#: ../includes/template-functions.php:270 -msgid "Orange" -msgstr "برتقالي" - -#: ../includes/template-functions.php:271 -msgid "Purple" -msgstr "بنفسجي" - -#: ../includes/template-functions.php:272 -msgid "Slate" -msgstr "حجري" - -#: ../includes/template-functions.php:295 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "سبق و اشتريت هذه المادة، لكن يمكنك شرائها مرة أخرى." - -#: ../includes/thickbox.php:29 -#: ../includes/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "إدراج %" - -#: ../includes/thickbox.php:30 -msgid "Insert Download" -msgstr "إدراج تحميل" - -#: ../includes/thickbox.php:65 -msgid "You must choose a download" -msgstr "ينبغي أن تختار تحميل" - -#: ../includes/thickbox.php:88 -#, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "استخدم النموذج أدناه لإدراج كود قصير للشراء %" - -#: ../includes/thickbox.php:91 -#, php-format -msgid "Choose a %s" -msgstr "اختيار %" - -#: ../includes/thickbox.php:100 -msgid "Choose a style" -msgstr "اختيار النمط" - -#: ../includes/thickbox.php:111 -msgid "Choose a button color" -msgstr "اختيار لون الأزرار" - -#: ../includes/thickbox.php:120 -msgid "Link text . . ." -msgstr "ابط النص..." - -#: ../includes/thickbox.php:124 -msgid "Cancel" -msgstr "إلغاء" - -#: ../includes/thickbox.php:126 -msgid "Button Styles" -msgstr "نمط الأزرار" - -#: ../includes/widgets.php:39 -msgid "Downloads Cart" -msgstr "سلة التحميلات" - -#: ../includes/widgets.php:39 -msgid "Display the downloads shopping cart" -msgstr "تعطيل سلة تسوق التحميلات" - -#: ../includes/widgets.php:82 -#: ../includes/widgets.php:162 -msgid "Title:" -msgstr "الاسم:" - -#: ../includes/widgets.php:87 -msgid "Show Quantity:" -msgstr "اظهار الكمية:" - -#: ../includes/widgets.php:112 -msgid "Downloads Categories / Tags" -msgstr "فئات/علامات التحميلات" - -#: ../includes/widgets.php:112 -msgid "Display the downloads categories or tags" -msgstr "عرض فئات أو علامات التحميلات" - -#: ../includes/widgets.php:167 -msgid "Taxonomy:" -msgstr "التصنيف:" - -#: ../includes/widgets.php:193 -msgid "Display a user's purchase history" -msgstr "عرض تاريخ شراء المستخدم" - -#: ../includes/widgets.php:232 -msgid "No downloadable files found." -msgstr "لم يُعثر على ملفات قابلة للتحميل" - -#: ../includes/widgets.php:259 -msgid "Title" -msgstr "الاسم" - -#: ../includes/admin-pages/add-ons.php:69 -msgid "Add Ons for Easy Digital Downloads" -msgstr "إضافات Easy Digital Downloads " - -#: ../includes/admin-pages/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "هذه الإضافات تعزز وظائف Easy Digital Downloads" - -#: ../includes/admin-pages/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "تصفح جميع الملحقات" - -#: ../includes/admin-pages/discount-codes.php:40 -#: ../includes/admin-pages/discount-codes.php:53 -msgid "Code" -msgstr "رمز" - -#: ../includes/admin-pages/discount-codes.php:41 -#: ../includes/admin-pages/discount-codes.php:54 -msgid "Amount" -msgstr "الكمية" - -#: ../includes/admin-pages/discount-codes.php:42 -#: ../includes/admin-pages/discount-codes.php:55 -msgid "Uses" -msgstr "استخدام" - -#: ../includes/admin-pages/discount-codes.php:43 -#: ../includes/admin-pages/discount-codes.php:56 -msgid "Max Uses" -msgstr "أقصى استخدام" - -#: ../includes/admin-pages/discount-codes.php:44 -#: ../includes/admin-pages/discount-codes.php:57 -msgid "Start Date" -msgstr "تاريخ البدء" - -#: ../includes/admin-pages/discount-codes.php:45 -#: ../includes/admin-pages/discount-codes.php:58 -msgid "Expiration" -msgstr "انتهاء الصلاحية" - -#: ../includes/admin-pages/discount-codes.php:47 -#: ../includes/admin-pages/discount-codes.php:60 -msgid "Actions" -msgstr "الإجراءات" - -#: ../includes/admin-pages/discount-codes.php:82 -#: ../includes/admin-pages/discount-codes.php:84 -msgid "unlimited" -msgstr "غير محدود" - -#: ../includes/admin-pages/discount-codes.php:93 -msgid "No start date" -msgstr "لا يوجد تاريخ للبدء" - -#: ../includes/admin-pages/discount-codes.php:100 -msgid "Expired" -msgstr "انتهت صلاحيته" - -#: ../includes/admin-pages/discount-codes.php:102 -msgid "no expiration" -msgstr "لا يوجد انتهاء للصلاحية" - -#: ../includes/admin-pages/discount-codes.php:108 -#: ../includes/admin-pages/payments-history.php:183 -msgid "Edit" -msgstr "تحرير" - -#: ../includes/admin-pages/discount-codes.php:110 -msgid "Deactivate" -msgstr "تعطيل" - -#: ../includes/admin-pages/discount-codes.php:112 -msgid "Activate" -msgstr "تفعيل" - -#: ../includes/admin-pages/discount-codes.php:114 -#: ../includes/admin-pages/payments-history.php:185 -msgid "Delete" -msgstr "إلغاء" - -#: ../includes/admin-pages/discount-codes.php:119 -msgid "No discount codes have been created." -msgstr "لم ينشأ رمز للخصم" - -#: ../includes/admin-pages/payments-history.php:90 -msgid "All" -msgstr "الكل" - -#: ../includes/admin-pages/payments-history.php:95 -msgid "Completed" -msgstr "تم" - -#: ../includes/admin-pages/payments-history.php:106 -msgid "Export" -msgstr "تصدير" - -#: ../includes/admin-pages/payments-history.php:110 -msgid "Payment mode" -msgstr "حالة الدفع" - -#: ../includes/admin-pages/payments-history.php:112 -msgid "Live" -msgstr "مباشر" - -#: ../includes/admin-pages/payments-history.php:113 -msgid "Test" -msgstr "تجربة" - -#: ../includes/admin-pages/payments-history.php:123 -msgid "Payments per page" -msgstr "المدفوعات في كل صفحة" - -#: ../includes/admin-pages/payments-history.php:125 -msgid "Show" -msgstr "اعرض" - -#: ../includes/admin-pages/payments-history.php:131 -msgid "Showing payments for: " -msgstr "عرض المدفوعات لـ:" - -#: ../includes/admin-pages/payments-history.php:131 -msgid "clear" -msgstr "مسح" - -#: ../includes/admin-pages/payments-history.php:184 -msgid "Resend Purchase Receipt" -msgstr "إعادة إرسال فاتورة الشراء" - -#: ../includes/admin-pages/payments-history.php:197 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "تفاصيل دفع المشتريات" - -#: ../includes/admin-pages/payments-history.php:197 -msgid "View Order Details" -msgstr "عرض تفاصيل الطلب" - -#: ../includes/admin-pages/payments-history.php:205 -msgid "Purchased File" -msgstr "ملف الشراء" - -#: ../includes/admin-pages/payments-history.php:205 -msgid "Purchased Files" -msgstr "الملفات التي تم شراءها" - -#: ../includes/admin-pages/payments-history.php:249 -msgid "Date and Time:" -msgstr "الوقت و التاريخ:" - -#: ../includes/admin-pages/payments-history.php:250 -msgid "Discount used:" -msgstr "الخصم المستخدم" - -#: ../includes/admin-pages/payments-history.php:251 -msgid "Total:" -msgstr "إجمالي:" - -#: ../includes/admin-pages/payments-history.php:254 -msgid "Buyer's Personal Details:" -msgstr "تفاصيل المشتري الشخصية:" - -#: ../includes/admin-pages/payments-history.php:256 -msgid "Name:" -msgstr "الاسم:" - -#: ../includes/admin-pages/payments-history.php:257 -msgid "Email:" -msgstr "البريد الإلكتروني:" - -#: ../includes/admin-pages/payments-history.php:266 -msgid "Payment Method:" -msgstr "طرق الدفع:" - -#: ../includes/admin-pages/payments-history.php:271 -msgid "Purchase Key" -msgstr "مفتاح الشراء" - -#: ../includes/admin-pages/payments-history.php:274 -msgid "Close" -msgstr "مغلق" - -#: ../includes/admin-pages/payments-history.php:304 -msgid "Total Earnings:" -msgstr "إجمالي الأرباح:" - -#: ../includes/admin-pages/reports.php:41 -msgid "Download Sales and Earnings PDF Report for all Products" -msgstr "تقارير PDF لمبيعات و أرباح كل المنتجات" - -#: ../includes/admin-pages/reports.php:42 -msgid "Download a CSV Customers List" -msgstr "تحميل قائمة العملاء CSV" - -#: ../includes/admin-pages/reports.php:44 -msgid "Please Note: Transactions created while in test mode are not included on this page or in the PDF reports." -msgstr "ملاحظة: العمليات التي تتم في حالة التجربة ليست موجودة في هذه الصفحة أو في تقارير PDF" - -#: ../includes/admin-pages/settings-old.php:12 -msgid "Pages" -msgstr "الصفحات" - -#: ../includes/admin-pages/settings-old.php:14 -#: ../includes/admin-pages/settings.php:37 -msgid "Misc" -msgstr "منوع" - -#: ../includes/admin-pages/settings-old.php:25 -msgid "Purchase Form" -msgstr "نموذج شراء" - -#: ../includes/admin-pages/settings-old.php:31 -#: ../includes/admin-pages/settings-old.php:36 -msgid "Purchase Page" -msgstr "صفحة الشراء" - -#: ../includes/admin-pages/settings-old.php:49 -#: ../includes/admin-pages/settings-old.php:78 -msgid "No pages found" -msgstr "لم يتم العثور على صفحات" - -#: ../includes/admin-pages/settings-old.php:53 -msgid "Choose the page that holds the checkout form short code." -msgstr "اختيار الصفحة التي تحمل شكل الرمز القصير للدفع و الخروج" - -#: ../includes/admin-pages/settings-old.php:82 -msgid "Choose the page users are directed to after a successful purchase." -msgstr "اختارصفحة يرسل إليها المشترين بعد إتمام عملية الشراء بنجاح" - -#: ../includes/admin-pages/settings-old.php:110 -msgid "Check this to use the plugin in test mode." -msgstr "ضع علامة على هذا لتستخدم الإضافة في حالة التجربة" - -#: ../includes/admin-pages/settings-old.php:124 -#: ../includes/admin-pages/settings-old.php:129 -msgid "Gateways" -msgstr "بوابات الدفع " - -#: ../includes/admin-pages/settings-old.php:140 -msgid "Check each of the payment gateways you would like to enable. Configure the selected gateways below." -msgstr "jتحقق من كل بوابات الدفع التي ترغب بتمكينها. اضبط البوابة المختارة أدناه" - -#: ../includes/admin-pages/settings-old.php:163 -msgid "Enter your PayPal Email." -msgstr "ادخل حساب بريدك الإلكتروني في الـ paypal" - -#: ../includes/admin-pages/settings-old.php:177 -msgid "Miscellaneous" -msgstr "منوعات" - -#: ../includes/admin-pages/settings-old.php:183 -#: ../includes/admin-pages/settings-old.php:188 -msgid "Enable Ajax" -msgstr "تمكين الأجاكس Ajax" - -#: ../includes/admin-pages/settings-old.php:192 -msgid "Check this to enable AJAX for the shopping cart." -msgstr "علم على هذا لتمكين Ajax لسلة التسوق" - -#: ../includes/admin-pages/settings-old.php:199 -#: ../includes/admin-pages/settings-old.php:204 -msgid "Logged-In Only" -msgstr "تسجيل الدخول فقط" - -#: ../includes/admin-pages/settings-old.php:261 -msgid "Choose your currency." -msgstr "اختار عملتك" - -#: ../includes/admin-pages/settings-old.php:261 -msgid "Note" -msgstr "ملاحظة" - -#: ../includes/admin-pages/settings-old.php:261 -msgid "If you use Stripe, you MUST use USD." -msgstr "إن كنت تستخدم شريط الرسوم، فعليك استخدام USD" - -#: ../includes/admin-pages/settings-old.php:288 -msgid "Messages" -msgstr "رسائل" - -#: ../includes/admin-pages/settings-old.php:294 -#: ../includes/admin-pages/settings-old.php:299 -msgid "Payment Confirmation" -msgstr "توكيد الدفع" - -#: ../includes/admin-pages/settings-old.php:303 -msgid "Enter the message displayed after a user makes a successful purchase. HTML is accepted." -msgstr "أدخل العبارة التي ستظهر للمستخدم بعد عملية شراء ناجحة. HTML مقبول" - -#: ../includes/admin-pages/settings-old.php:313 -msgid "Save Options" -msgstr "حفظ الخيارات" - -#: ../includes/admin-pages/settings.php:33 -msgid "General" -msgstr "عام" - -#: ../includes/admin-pages/settings.php:35 -msgid "Emails" -msgstr "عناوين البريد الإلكتروني" - -#: ../includes/admin-pages/settings.php:36 -msgid "Styles" -msgstr "أنماط" - -#: ../includes/admin-pages/forms/add-discount.php:12 -msgid "Add New Discount" -msgstr "أضف خصم جديد" - -#: ../includes/admin-pages/forms/add-discount.php:22 -#: ../includes/admin-pages/forms/edit-discount.php:27 -msgid "The name of this discount" -msgstr "اسم هذا الخصم" - -#: ../includes/admin-pages/forms/add-discount.php:31 -#: ../includes/admin-pages/forms/edit-discount.php:36 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "أدخل رمز لهذا الخصم، مثل 10%" - -#: ../includes/admin-pages/forms/add-discount.php:36 -#: ../includes/admin-pages/forms/edit-discount.php:41 -msgid "Type" -msgstr "نوع" - -#: ../includes/admin-pages/forms/add-discount.php:40 -#: ../includes/admin-pages/forms/edit-discount.php:45 -msgid "Percentage" -msgstr "النسبة " - -#: ../includes/admin-pages/forms/add-discount.php:41 -#: ../includes/admin-pages/forms/edit-discount.php:46 -msgid "Flat amount" -msgstr "المبلغ المبسط" - -#: ../includes/admin-pages/forms/add-discount.php:43 -#: ../includes/admin-pages/forms/edit-discount.php:48 -msgid "The kind of discount to apply for this discount." -msgstr "نوع الخصم ليطبق على هذا الخصم" - -#: ../includes/admin-pages/forms/add-discount.php:52 -#: ../includes/admin-pages/forms/edit-discount.php:57 -msgid "The amount of this discount code." -msgstr "مبلغ رمز الخصم هذا" - -#: ../includes/admin-pages/forms/add-discount.php:57 -#: ../includes/admin-pages/forms/edit-discount.php:62 -msgid "Start date" -msgstr "تاريخ البدء" - -#: ../includes/admin-pages/forms/add-discount.php:61 -#: ../includes/admin-pages/forms/edit-discount.php:66 -msgid "Enter the start date for this discount code in the format of mm/dd/yyyy. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "ادخل تاريخ بدء كود الخصم هذا على شكل سنوات-شهور- أيام. دعه فارغ إن لم ترد تحديد تاريخ البدء. إن أدخلته فالخصم سيستخدم فقط بعد أو في هذا التاريخ" - -#: ../includes/admin-pages/forms/add-discount.php:66 -#: ../includes/admin-pages/forms/edit-discount.php:71 -msgid "Expiration date" -msgstr "تاريخ نهاية الصلاحية" - -#: ../includes/admin-pages/forms/add-discount.php:70 -#: ../includes/admin-pages/forms/edit-discount.php:75 -msgid "Enter the expiration date for this discount code in the format of mm/dd/yyyy. For no expiration, leave blank" -msgstr "ادخل تاريخ نهاية صلاحية كود الخصم هذا على شكل سنوات-شهور- أيام. دعه فارغ إن لم ترغب بتحديد تاريخ نهاية الصلاحية" - -#: ../includes/admin-pages/forms/add-discount.php:75 -#: ../includes/admin-pages/forms/edit-discount.php:89 -msgid "Minimum Amount" -msgstr "الحد الأدنى للمبلغ" - -#: ../includes/admin-pages/forms/add-discount.php:79 -#: ../includes/admin-pages/forms/edit-discount.php:93 -msgid "The minimum amount that must be purchased before this discount can be used. Leave blank for no minimum." -msgstr " الحد الأدنى الذي يجب شراؤه قبل هذا الخصم.. دعه فارغ في حال عدم وجود حد أدنى" - -#: ../includes/admin-pages/forms/add-discount.php:88 -#: ../includes/admin-pages/forms/edit-discount.php:84 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "الحد الأقصى لعدد مرات استخدام هذا الخصم. دعه فارغ في حالة إن كان غير محدود" - -#: ../includes/admin-pages/forms/add-discount.php:96 -msgid "Add Discount Code" -msgstr "أضف كود الخصم" - -#: ../includes/admin-pages/forms/edit-discount.php:13 -msgid "Something went wrong." -msgstr "حث خطأ ما" - -#: ../includes/admin-pages/forms/edit-discount.php:17 -msgid "Edit Discount" -msgstr "تحرير الخصم" - -#: ../includes/admin-pages/forms/edit-discount.php:17 -#: ../includes/admin-pages/forms/edit-payment.php:16 -msgid "Go Back" -msgstr "الرجوع" - -#: ../includes/admin-pages/forms/edit-discount.php:102 -msgid "Active" -msgstr "فعال" - -#: ../includes/admin-pages/forms/edit-discount.php:103 -msgid "Inactive" -msgstr "غير فعال" - -#: ../includes/admin-pages/forms/edit-discount.php:105 -msgid "The status of this discount code." -msgstr "حالة كود الخصم هذا" - -#: ../includes/admin-pages/forms/edit-discount.php:115 -msgid "Update Discount Code" -msgstr "تحديث كود الخصم" - -#: ../includes/admin-pages/forms/edit-payment.php:22 -msgid "Buyer's Email" -msgstr "البريد الإلكتروني للمشتري" - -#: ../includes/admin-pages/forms/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "إن احتجت ذلك، يمكنك تحديث البريد الإلكتروني الخاص بالمشتري" - -#: ../includes/admin-pages/forms/edit-payment.php:31 -msgid "Downloads Purchased" -msgstr "التحميلات التي اشتريت" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "أضف تحميل لتشتري #%" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -msgid "Add download to purchase" -msgstr "أضف تحميل للشراء" - -#: ../includes/admin-pages/forms/edit-payment.php:48 -msgid "Payment Status" -msgstr "حالة الدفع" - -#: ../includes/admin-pages/forms/edit-payment.php:64 -msgid "Send Purchase Receipt" -msgstr "أرسل فاتورة شراء" - -#: ../includes/admin-pages/forms/edit-payment.php:68 -msgid "Check this box to send the purchase receipt, including all download links." -msgstr "علم في المربع لإرسال فاتورة الشراء، بالإضافة لجميع الروابط المحملة" - -#: ../includes/admin-pages/forms/edit-payment.php:78 -msgid "Update Payment" -msgstr "تحديق الدفع" - -#: ../includes/admin-pages/forms/edit-payment.php:91 -msgid "Add Selected Downloads" -msgstr "إضافة التحميلات المختارة" - -#: ../includes/gateways/paypal.php:271 -msgid "Invalid IPN" -msgstr "IPN غير صالح" - -#: ../includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "اسم المادة" - -#: ../includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "سعر المادة" - -#: ../includes/templates/checkout_cart.php:49 -msgid "Total" -msgstr "الإجمالي" - -#: ../includes/templates/history-downloads.php:10 -msgid "Download Name" -msgstr "اسم التحميل" - -#: ../includes/templates/history-downloads.php:12 -#: ../includes/templates/history-purchases.php:14 -msgid "Files" -msgstr "ملفات" - -#: ../includes/templates/history-downloads.php:68 -msgid "You have not purchased any downloads" -msgstr "لم تشتري أي تحميلات" - -#: ../includes/templates/history-purchases.php:11 -msgid "Purchase ID" -msgstr "معرف الشراء" - -#: ../includes/templates/history-purchases.php:61 -msgid "You have not made any purchases" -msgstr "لم تقم بشراء أي شئ" - -#~ msgid "Payment Info" -#~ msgstr "معلومات الدفع" -#~ msgid "price name" -#~ msgstr "اسم السعر" -#~ msgid "Add New Price Option" -#~ msgstr "اضف اختيار سعر جديد" -#~ msgid "Enter the download price. Do not include a currency symbol" -#~ msgstr "ادخل سعر للتحميل. لا تدرج رمز العملة" -#~ msgid "Add to Cart" -#~ msgstr "إضافة لسلة التسوق" -#~ msgid "No downloads found" -#~ msgstr "لم يتم العثور على تحميلات" -#~ msgid "Deleted" -#~ msgstr "تم الحذف" - diff --git a/languages/edd-de_DE.mo b/languages/edd-de_DE.mo deleted file mode 100644 index 94b482eb881..00000000000 Binary files a/languages/edd-de_DE.mo and /dev/null differ diff --git a/languages/edd-de_DE.po b/languages/edd-de_DE.po deleted file mode 100644 index a23f5f9186b..00000000000 --- a/languages/edd-de_DE.po +++ /dev/null @@ -1,2923 +0,0 @@ -# This German Language File: Copyright (C) 2012 by David Decker of deckerweb.de & genesisthemes.de -# This file is distributed under the same license as the Easy Digital Downloads Plugin package. -# -# Weitere deutsche Sprachdateien fuer Easy Digital Downloads und Erweiterungen -# sowie WordPress-Plugins und -Themes sind hier zu finden: -# --> http://deckerweb.de/sprachdateien/ -# -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads Plugin (SIE-Version)\n" -"Report-Msgid-Bugs-To: https://github.com/pippinsplugins/Easy-Digital-Downloads/issues\n" -"POT-Creation-Date: 2012-04-14 16:16+0200\n" -"PO-Revision-Date: 2012-09-16 13:08+0100\n" -"Last-Translator: David Decker \n" -"Language-Team: DECKERWEB \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Poedit-Language: German\n" -"X-Poedit-Country: GERMANY\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" -"X-Textdomain-Support: yes\n" -"X-Poedit-SearchPath-0: .\n" - -#@ edd -#: includes/admin-notices.php:30 -msgid "Discount code updated." -msgstr "Gutschein-Code aktualisiert." - -#@ edd -#: includes/admin-notices.php:33 -msgid "There was a problem updating your discount code, please try again." -msgstr "Es gab ein Problem beim Aktualisieren Ihres Gutschein-Codes. Bitte versuchen Sie es erneut." - -#@ edd -#: includes/admin-pages/discount-codes.php:34 -#: includes/admin-pages.php:27 -msgid "Discount Codes" -msgstr "Gutschein-Codes" - -#@ edd -#: includes/admin-pages/discount-codes.php:39 -#: includes/admin-pages/discount-codes.php:52 -#: includes/admin-pages/forms/add-discount.php:18 -#: includes/admin-pages/forms/edit-discount.php:23 -#: includes/dashboard-columns.php:26 -msgid "Name" -msgstr "Name" - -#@ edd -#: includes/admin-pages/discount-codes.php:40 -#: includes/admin-pages/discount-codes.php:53 -#: includes/admin-pages/forms/add-discount.php:27 -#: includes/admin-pages/forms/edit-discount.php:32 -msgid "Code" -msgstr "Code" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:36 -#: includes/admin-pages/forms/edit-discount.php:41 -msgid "Type" -msgstr "Art" - -#@ edd -#: includes/admin-pages/discount-codes.php:41 -#: includes/admin-pages/discount-codes.php:54 -#: includes/admin-pages/forms/add-discount.php:48 -#: includes/admin-pages/forms/edit-discount.php:53 -#: includes/templates/history-purchases.php:13 -msgid "Amount" -msgstr "Betrag" - -#@ edd -#: includes/admin-pages/discount-codes.php:42 -#: includes/admin-pages/discount-codes.php:55 -msgid "Uses" -msgstr "Verwendung" - -#@ edd -#: includes/admin-pages/discount-codes.php:43 -#: includes/admin-pages/discount-codes.php:56 -#: includes/admin-pages/forms/add-discount.php:84 -#: includes/admin-pages/forms/edit-discount.php:80 -msgid "Max Uses" -msgstr "Max. Verwendung" - -#@ edd -#: includes/admin-pages/discount-codes.php:44 -#: includes/admin-pages/discount-codes.php:57 -msgid "Start Date" -msgstr "Startdatum" - -#@ edd -#: includes/admin-pages/discount-codes.php:45 -#: includes/admin-pages/discount-codes.php:58 -msgid "Expiration" -msgstr "Enddatum" - -#@ edd -#: includes/admin-pages/discount-codes.php:46 -#: includes/admin-pages/discount-codes.php:59 -#: includes/admin-pages/forms/edit-discount.php:98 -#: includes/admin-pages/payments-history.php:149 -#: includes/admin-pages/payments-history.php:161 -#: includes/export-functions.php:50 -msgid "Status" -msgstr "Status" - -#@ edd -#: includes/admin-pages/discount-codes.php:47 -#: includes/admin-pages/discount-codes.php:60 -#: includes/templates/checkout_cart.php:8 -msgid "Actions" -msgstr "Aktionen" - -#@ edd -#: includes/admin-pages/discount-codes.php:82 -#: includes/admin-pages/discount-codes.php:84 -msgid "unlimited" -msgstr "unbegrenzt" - -#@ edd -#: includes/admin-pages/discount-codes.php:93 -msgid "No start date" -msgstr "Kein Startdatum" - -#@ edd -#: includes/admin-pages/discount-codes.php:100 -msgid "Expired" -msgstr "Verfallen" - -#@ edd -#: includes/admin-pages/discount-codes.php:102 -msgid "no expiration" -msgstr "Verfällt nicht" - -#@ edd -#: includes/admin-pages/discount-codes.php:108 -#: includes/admin-pages/payments-history.php:183 -msgid "Edit" -msgstr "Bearbeiten" - -#@ edd -#: includes/admin-pages/discount-codes.php:110 -msgid "Deactivate" -msgstr "Deaktivieren" - -#@ edd -#: includes/admin-pages/discount-codes.php:112 -msgid "Activate" -msgstr "Aktivieren" - -#@ edd -#: includes/admin-pages/discount-codes.php:114 -#: includes/admin-pages/payments-history.php:185 -msgid "Delete" -msgstr "Löschen" - -#@ edd -#: includes/admin-pages/discount-codes.php:119 -msgid "No discount codes have been created." -msgstr "Bisher wurden keine Gutschein-Codes erstellt." - -#@ edd -#: includes/admin-pages/forms/add-discount.php:12 -msgid "Add New Discount" -msgstr "Neuen Gutschein hinzufügen" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:22 -#: includes/admin-pages/forms/edit-discount.php:27 -msgid "The name of this discount" -msgstr "Der Name dieses Gutscheins" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:31 -#: includes/admin-pages/forms/edit-discount.php:36 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "Geben Sie einen Code für diesen Gutschein ein, zum Beispiel 10PROZENT" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:40 -#: includes/admin-pages/forms/edit-discount.php:45 -msgid "Percentage" -msgstr "Prozentsatz" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:41 -#: includes/admin-pages/forms/edit-discount.php:46 -msgid "Flat amount" -msgstr "Pauschale" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:43 -#: includes/admin-pages/forms/edit-discount.php:48 -msgid "The kind of discount to apply for this discount." -msgstr "Die Art des Rabatts, die für diesen Gutschein verwendet wird." - -#@ edd -#: includes/admin-pages/forms/add-discount.php:52 -#: includes/admin-pages/forms/edit-discount.php:57 -msgid "The amount of this discount code." -msgstr "Der Rabattbetrag des Gutschein-Codes." - -#@ edd -#: includes/admin-pages/forms/add-discount.php:57 -#: includes/admin-pages/forms/edit-discount.php:62 -msgid "Start date" -msgstr "Startdatum" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:61 -#: includes/admin-pages/forms/edit-discount.php:66 -msgid "Enter the start date for this discount code in the format of yyyy-mm-dd. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "Geben Sie das Startdatum für diesen Gutschein-Code im Format JJJJ-MM-TT ein. Um kein Startdatum zu verwenden, einfach das Feld frei lassen. Falls jedoch ein Startdatum eingegeben wurde, kann der Gutschein nur an diesem Datum oder danach verwendet werden." - -#@ edd -#: includes/admin-pages/forms/add-discount.php:66 -#: includes/admin-pages/forms/edit-discount.php:71 -msgid "Expiration date" -msgstr "Verfallsdatum" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:70 -#: includes/admin-pages/forms/edit-discount.php:75 -msgid "Enter the expiration date for this discount code in the format of yyyy-mm-dd. For no expiration, leave blank" -msgstr "Geben Sie das Verfallsdatum (Enddatum) für diesen Gutschein-Code im Format JJJJ-MM-TT ein. Um kein Verfallsdatum zu verwenden, einfach das Feld frei lassen." - -#@ edd -#: includes/admin-pages/forms/add-discount.php:88 -#: includes/admin-pages/forms/edit-discount.php:84 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "Wie oft der Gutschein-Code maximal verwendet werden darf. Das Feld frei lassen für unbegrenzte Verwendung." - -#@ edd -#: includes/admin-pages/forms/add-discount.php:96 -msgid "Add Discount Code" -msgstr "Gutschein-Code hinzufügen" - -#@ edd -#: includes/admin-pages/forms/edit-discount.php:13 -msgid "Something went wrong." -msgstr "Etwas ging schief." - -#@ edd -#@ default -#: includes/admin-pages/forms/edit-discount.php:13 -#: includes/error-tracking.php:30 -#: includes/process-download.php:266 -#: includes/process-download.php:283 -msgid "Error" -msgstr "Fehler" - -#@ edd -#: includes/admin-pages/forms/edit-discount.php:17 -msgid "Edit Discount" -msgstr "Gutschein bearbeiten" - -#@ edd -#: includes/admin-pages/forms/edit-discount.php:17 -#: includes/admin-pages/forms/edit-payment.php:16 -msgid "Go Back" -msgstr "Zurückgehen" - -#@ edd -#: includes/admin-pages/forms/edit-discount.php:102 -msgid "Active" -msgstr "Aktiv" - -#@ edd -#: includes/admin-pages/forms/edit-discount.php:103 -msgid "Inactive" -msgstr "Inaktiv" - -#@ edd -#: includes/admin-pages/forms/edit-discount.php:105 -msgid "The status of this discount code." -msgstr "Der Status dieses Gutschein-Codes." - -#@ edd -#: includes/admin-pages/forms/edit-discount.php:115 -msgid "Update Discount Code" -msgstr "Gutschein-Code aktualisieren" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:16 -#: includes/post-types.php:83 -msgid "Edit Payment" -msgstr "Zahlung bearbeiten" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:31 -msgid "Downloads Purchased" -msgstr "Gekaufte Downloads" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "Download zum Kauf #%s hinzufügen" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:43 -msgid "Add download to purchase" -msgstr "Download zum Kauf hinzufügen" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:78 -msgid "Update Payment" -msgstr "Zahlung aktualisieren" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:91 -msgid "Add Selected Downloads" -msgstr "Ausgewählte Downloads hinzufügen" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:92 -#: includes/admin-pages/payments-history.php:274 -msgid "Close" -msgstr "Schliessen" - -#@ edd -#: includes/admin-pages/payments-history.php:85 -#: includes/admin-pages.php:26 -#: includes/post-types.php:91 -msgid "Payment History" -msgstr "Bisherige Zahlungen" - -#@ edd -#: includes/admin-pages/payments-history.php:110 -msgid "Payment mode" -msgstr "Zahlungsmodus" - -#@ edd -#: includes/admin-pages/payments-history.php:112 -msgid "Live" -msgstr "Live" - -#@ edd -#: includes/admin-pages/payments-history.php:113 -msgid "Test" -msgstr "Testmodus" - -#@ edd -#: includes/admin-pages/payments-history.php:123 -msgid "Payments per page" -msgstr "Zahlungen pro Seite" - -#@ edd -#: includes/admin-pages/payments-history.php:125 -msgid "Show" -msgstr "Zeigen" - -#@ edd -#: includes/admin-pages/payments-history.php:137 -#: includes/admin-pages/payments-history.php:155 -#: includes/export-functions.php:39 -msgid "ID" -msgstr "ID" - -#@ edd -#: includes/admin-pages/payments-history.php:139 -#: includes/admin-pages/payments-history.php:156 -#: includes/checkout-template.php:387 -#: includes/checkout-template.php:388 -#: includes/export-functions.php:40 -msgid "Email" -msgstr "E-Mail" - -#@ edd -#: includes/export-functions.php:47 -msgid "Key" -msgstr "Schlüssel" - -#@ edd -#: includes/admin-pages/payments-history.php:140 -#: includes/admin-pages/payments-history.php:157 -#: includes/export-functions.php:43 -msgid "Products" -msgstr "Produkte" - -#@ edd -#: includes/admin-pages/payments-history.php:142 -#: includes/admin-pages/payments-history.php:158 -#: includes/dashboard-columns.php:29 -#: includes/dashboard-columns.php:231 -#: includes/pdf-reports.php:66 -msgid "Price" -msgstr "Preis" - -#@ edd -#: includes/admin-pages/payments-history.php:145 -#: includes/admin-pages/payments-history.php:159 -#: includes/dashboard-columns.php:33 -#: includes/export-functions.php:48 -#: includes/templates/history-purchases.php:12 -msgid "Date" -msgstr "Datum" - -#@ edd -#: includes/admin-pages/payments-history.php:147 -#: includes/admin-pages/payments-history.php:160 -#: includes/export-functions.php:49 -msgid "User" -msgstr "Benutzer" - -#@ edd -#: includes/admin-pages/payments-history.php:197 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "Kauf-Details für Zahlung #%s" - -#@ edd -#: includes/admin-pages/payments-history.php:197 -msgid "View Order Details" -msgstr "Bestelldetails ansehen" - -#@ edd -#: includes/admin-pages/payments-history.php:205 -msgid "Purchased File" -msgstr "Gekaufte Datei" - -#@ edd -#: includes/admin-pages/payments-history.php:205 -msgid "Purchased Files" -msgstr "Gekaufte Dateien" - -#@ edd -#: includes/admin-pages/payments-history.php:250 -msgid "Discount used:" -msgstr "Verwendeter Gutschein:" - -#@ edd -#: includes/admin-pages/payments-history.php:250 -#: includes/export-functions.php:111 -#: includes/export-functions.php:119 -msgid "none" -msgstr "keiner" - -#@ edd -#: includes/admin-pages/payments-history.php:251 -msgid "Total:" -msgstr "Gesamt:" - -#@ edd -#: includes/admin-pages/payments-history.php:254 -msgid "Buyer's Personal Details:" -msgstr "Persönliche Details des Käufers:" - -#@ edd -#: includes/admin-pages/payments-history.php:256 -msgid "Name:" -msgstr "Name:" - -#@ edd -#: includes/admin-pages/payments-history.php:257 -msgid "Email:" -msgstr "E-Mail:" - -#@ edd -#: includes/admin-pages/payments-history.php:184 -msgid "Resend Purchase Receipt" -msgstr "Bestellbestätigung erneut senden" - -#@ edd -#: includes/admin-pages/payments-history.php:298 -#: includes/export-functions.php:135 -msgid "No payments recorded yet" -msgstr "Bisher keine Zahlungen eingegangen." - -#@ edd -#: includes/admin-pages/reports.php:28 -#: includes/admin-pages.php:28 -msgid "Reports" -msgstr "Statistiken" - -#@ edd -#: includes/admin-pages/settings-old.php:11 -#: includes/pdf-reports.php:42 -#: includes/pdf-reports.php:43 -msgid "Easy Digital Downloads" -msgstr "Einfache Digitale Downloads" - -#@ edd -#: includes/admin-pages/settings-old.php:12 -msgid "Pages" -msgstr "Seiten" - -#@ edd -#: includes/admin-pages/settings-old.php:13 -#: includes/admin-pages/settings-old.php:118 -#: includes/admin-pages/settings.php:34 -#: includes/register-settings.php:110 -msgid "Payment Gateways" -msgstr "Zahlungsweisen" - -#@ edd -#: includes/admin-pages/settings-old.php:14 -#: includes/admin-pages/settings.php:37 -msgid "Misc" -msgstr "Sonstiges" - -#@ edd -#: includes/admin-pages/settings-old.php:25 -msgid "Purchase Form" -msgstr "Kauf-Formular" - -#@ edd -#: includes/admin-pages/settings-old.php:31 -#: includes/admin-pages/settings-old.php:36 -msgid "Purchase Page" -msgstr "Kauf-Seite" - -#@ edd -#: includes/admin-pages/settings-old.php:49 -#: includes/admin-pages/settings-old.php:78 -msgid "No pages found" -msgstr "Keine Seiten gefunden" - -#@ edd -#: includes/admin-pages/settings-old.php:53 -msgid "Choose the page that holds the checkout form short code." -msgstr "Wählen Sie die Seite, welche den Formular-Code für den Bezahlvorgang enthält." - -#@ edd -#: includes/admin-pages/settings-old.php:60 -#: includes/admin-pages/settings-old.php:65 -#: includes/register-settings.php:54 -msgid "Success Page" -msgstr "Erfolg-Seite" - -#@ edd -#: includes/admin-pages/settings-old.php:82 -msgid "Choose the page users are directed to after a successful purchase." -msgstr "Wählen Sie die Seite, zu der die Benutzer/ Kunden nach einem erfolgreichen Kauf geleitet werden." - -#@ edd -#: includes/admin-pages/settings-old.php:95 -#: includes/admin-pages/settings-old.php:101 -#: includes/admin-pages/settings-old.php:106 -#: includes/register-settings.php:41 -msgid "Test Mode" -msgstr "Testmodus" - -#@ edd -#: includes/admin-pages/settings-old.php:110 -msgid "Check this to use the plugin in test mode." -msgstr "Wählen Sie diese Einstellung, um das Plugin im Testmodus zu verwenden." - -#@ edd -#: includes/admin-pages/settings-old.php:124 -#: includes/admin-pages/settings-old.php:129 -msgid "Gateways" -msgstr "Zahlungsweisen" - -#@ edd -#: includes/admin-pages/settings-old.php:140 -msgid "Check each of the payment gateways you would like to enable. Configure the selected gateways below." -msgstr "Wählen Sie alle gewünschten Zahlungsweisen, die Sie aktivieren wollen. Richten Sie die entsprechenden Zahlungsarten (Gateways) unten ein." - -#@ edd -#: includes/admin-pages/settings-old.php:148 -#: includes/register-settings.php:131 -msgid "PayPal Settings" -msgstr "PayPal Einstellungen" - -#@ edd -#: includes/admin-pages/settings-old.php:154 -#: includes/admin-pages/settings-old.php:159 -#: includes/register-settings.php:137 -msgid "PayPal Email" -msgstr "PayPal E-Mail" - -#@ edd -#: includes/admin-pages/settings-old.php:163 -msgid "Enter your PayPal Email." -msgstr "Geben Sie Ihre PayPal E-Mail-Adresse ein." - -#@ edd -#: includes/admin-pages/settings-old.php:177 -msgid "Miscellaneous" -msgstr "Sonstiges" - -#@ edd -#: includes/admin-pages/settings-old.php:183 -#: includes/admin-pages/settings-old.php:188 -msgid "Enable Ajax" -msgstr "AJAX aktivieren" - -#@ edd -#: includes/admin-pages/settings-old.php:192 -msgid "Check this to enable AJAX for the shopping cart." -msgstr "Wählen Sie diese Einstellung, um AJAX für den Warenkorb zu aktivieren." - -#@ edd -#: includes/admin-pages/settings-old.php:199 -#: includes/admin-pages/settings-old.php:204 -msgid "Logged-In Only" -msgstr "Nur angemeldete Benutzer" - -#@ edd -#: includes/admin-pages/settings-old.php:208 -#: includes/register-settings.php:238 -msgid "Require that users be logged-in to purchase files." -msgstr "Erzwingen Sie, dass Benutzer/ Kunden angemeldet (d.h. registriert) sind, um Dateien kaufen zu können." - -#@ edd -#: includes/admin-pages/settings-old.php:215 -#: includes/register-settings.php:67 -msgid "Currency Settings" -msgstr "Währungseinstellungen" - -#@ edd -#: includes/admin-pages/settings-old.php:221 -#: includes/admin-pages/settings-old.php:226 -#: includes/register-settings.php:73 -msgid "Currency" -msgstr "Währung" - -#@ edd -#: includes/admin-pages/settings-old.php:232 -#: includes/misc-functions.php:185 -msgid "US Dollars ($)" -msgstr "US Dollar ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:233 -#: includes/misc-functions.php:186 -msgid "Euros (€)" -msgstr "Euro (€)" - -#@ edd -#: includes/admin-pages/settings-old.php:234 -#: includes/misc-functions.php:187 -msgid "Pounds Sterling (£)" -msgstr "Pfund Sterling (£)" - -#@ edd -#: includes/admin-pages/settings-old.php:235 -#: includes/misc-functions.php:188 -msgid "Australian Dollars ($)" -msgstr "Australische Dollar ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:236 -#: includes/misc-functions.php:189 -msgid "Brazilian Real ($)" -msgstr "Brasilianischer Real ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:237 -#: includes/misc-functions.php:190 -msgid "Canadian Dollars ($)" -msgstr "Kanadischer Dollar ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:238 -#: includes/misc-functions.php:191 -msgid "Czech Koruna" -msgstr "Tschechische Krone" - -#@ edd -#: includes/admin-pages/settings-old.php:239 -#: includes/misc-functions.php:192 -msgid "Danish Krone" -msgstr "Dänische Krone" - -#@ edd -#: includes/admin-pages/settings-old.php:240 -#: includes/misc-functions.php:193 -msgid "Hong Kong Dollar ($)" -msgstr "Hongkong Dollar ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:241 -#: includes/misc-functions.php:194 -msgid "Hungarian Forint" -msgstr "Ungarischer Forint" - -#@ edd -#: includes/admin-pages/settings-old.php:242 -#: includes/misc-functions.php:195 -msgid "Israeli Shekel" -msgstr "Israelischer Schekel" - -#@ edd -#: includes/admin-pages/settings-old.php:243 -#: includes/misc-functions.php:196 -msgid "Japanese Yen (¥)" -msgstr "Japanischer Yen (¥)" - -#@ edd -#: includes/admin-pages/settings-old.php:244 -#: includes/misc-functions.php:197 -msgid "Malaysian Ringgits" -msgstr "Malaysischer Ringgits" - -#@ edd -#: includes/admin-pages/settings-old.php:245 -#: includes/misc-functions.php:198 -msgid "Mexican Peso ($)" -msgstr "Mexikanischer Peso ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:246 -#: includes/misc-functions.php:199 -msgid "New Zealand Dollar ($)" -msgstr "Neuseeland Dollar ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:247 -#: includes/misc-functions.php:200 -msgid "Norwegian Krone" -msgstr "Norwegische Krone" - -#@ edd -#: includes/admin-pages/settings-old.php:248 -#: includes/misc-functions.php:201 -msgid "Philippine Pesos" -msgstr "Philipinischer Pesos" - -#@ edd -#: includes/admin-pages/settings-old.php:249 -#: includes/misc-functions.php:202 -msgid "Polish Zloty" -msgstr "Polnischer Zloty" - -#@ edd -#: includes/admin-pages/settings-old.php:250 -#: includes/misc-functions.php:203 -msgid "Singapore Dollar ($)" -msgstr "Singapur Dollar ($)" - -#@ edd -#: includes/admin-pages/settings-old.php:251 -#: includes/misc-functions.php:204 -msgid "Swedish Krona" -msgstr "Schwedische Krone" - -#@ edd -#: includes/admin-pages/settings-old.php:252 -#: includes/misc-functions.php:205 -msgid "Swiss Franc" -msgstr "Schweizer Franken" - -#@ edd -#: includes/admin-pages/settings-old.php:253 -#: includes/misc-functions.php:206 -msgid "Taiwan New Dollars" -msgstr "Taiwan New Dollar" - -#@ edd -#: includes/admin-pages/settings-old.php:254 -#: includes/misc-functions.php:207 -msgid "Thai Baht" -msgstr "Thai Baht" - -#@ edd -#: includes/admin-pages/settings-old.php:261 -msgid "Choose your currency." -msgstr "Wählen Sie Ihre Währung." - -#@ edd -#: includes/admin-pages/settings-old.php:261 -msgid "Note" -msgstr "Hinweis" - -#@ edd -#: includes/admin-pages/settings-old.php:261 -msgid "If you use Stripe, you MUST use USD." -msgstr "Wenn Sie Stripe verwenden, dann MÜSSEN Sie US Dollar wählen." - -#@ edd -#: includes/admin-pages/settings-old.php:268 -#: includes/admin-pages/settings-old.php:273 -#: includes/register-settings.php:80 -msgid "Currency Position" -msgstr "Währungsposition" - -#@ edd -#: includes/admin-pages/settings-old.php:277 -#: includes/register-settings.php:84 -msgid "Before - $10" -msgstr "Davor - € 10" - -#@ edd -#: includes/admin-pages/settings-old.php:278 -#: includes/register-settings.php:85 -msgid "After - 10$" -msgstr "Danach - 10 €" - -#@ edd -#: includes/admin-pages/settings-old.php:280 -#: includes/register-settings.php:81 -msgid "Choose the location of the currency sign." -msgstr "Wählen Sie die Anordnung des Währungssymbols." - -#@ edd -#: includes/admin-pages/settings-old.php:288 -msgid "Messages" -msgstr "Benachrichtigungen" - -#@ edd -#: includes/admin-pages/settings-old.php:294 -#: includes/admin-pages/settings-old.php:299 -msgid "Payment Confirmation" -msgstr "Zahlungsbestätigung" - -#@ edd -#: includes/admin-pages/settings-old.php:303 -msgid "Enter the message displayed after a user makes a successful purchase. HTML is accepted." -msgstr "Geben Sie die Mitteilung ein, die angezeigt wird, nachdem ein Benutzer/ Kunde einen erfolgreichen Kauf getätigt hat. HTML wird akzeptiert." - -#@ edd -#: includes/admin-pages/settings-old.php:313 -msgid "Save Options" -msgstr "Einstellungen speichern" - -#@ edd -#: includes/admin-pages/settings.php:33 -msgid "General" -msgstr "Allgemein" - -#@ edd -#: includes/admin-pages/settings.php:35 -msgid "Emails" -msgstr "E-Mails" - -#@ edd -#: includes/admin-pages.php:28 -msgid "Earnings and Sales Reports" -msgstr "Einnahme- und Verkaufsstatistiken" - -#@ edd -#: includes/admin-pages.php:29 -msgid "Easy Digital Download Settings" -msgstr "Einfache Digitale Downloads - Einstellungen" - -#@ edd -#: includes/admin-pages.php:29 -msgid "Settings" -msgstr "Einstellungen" - -#@ edd -#: includes/ajax-functions.php:118 -#: includes/process-purchase.php:239 -msgid "The discount you entered is invalid" -msgstr "Der Gutschein, den Sie eingegeben haben, ist ungültig." - -#@ edd -#: includes/scripts.php:45 -msgid "Your cart is empty" -msgstr "Ihr Warenkorb ist noch leer." - -#@ edd -#: includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "Name des Elements" - -#@ edd -#: includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "Preis des Elements" - -#@ edd -#: includes/cart-template.php:80 -#: includes/templates/checkout_cart.php:36 -msgid "remove" -msgstr "entfernen" - -#@ edd -#: includes/templates/checkout_cart.php:49 -msgid "Total" -msgstr "Gesamt" - -#@ edd -#: includes/cart-template.php:46 -#: includes/cart-template.php:49 -#: includes/install.php:31 -#: includes/template-functions.php:137 -#: includes/template-functions.php:158 -msgid "Checkout" -msgstr "Kasse" - -#@ edd -#: includes/checkout-template.php:75 -msgid "Choose Your Payment Method" -msgstr "Zahlungsweise wählen" - -#@ edd -#: includes/admin-pages/payments-history.php:319 -#: includes/checkout-template.php:457 -#: includes/metabox.php:525 -#: includes/metabox.php:622 -msgid "Next" -msgstr "Weiter" - -#@ edd -#: includes/checkout-template.php:137 -msgid "Email address" -msgstr "E-Mail-Adresse" - -#@ edd -#: includes/checkout-template.php:138 -msgid "Email Address" -msgstr "E-Mail-Adresse" - -#@ edd -#: includes/checkout-template.php:142 -#: includes/checkout-template.php:143 -#: includes/checkout-template.php:391 -#: includes/checkout-template.php:392 -#: includes/export-functions.php:41 -msgid "First Name" -msgstr "Vorname" - -#@ edd -#: includes/checkout-template.php:146 -#: includes/checkout-template.php:395 -msgid "Last name" -msgstr "Nachname" - -#@ edd -#: includes/checkout-template.php:147 -#: includes/checkout-template.php:396 -#: includes/export-functions.php:42 -msgid "Last Name" -msgstr "Nachname" - -#@ edd -#: includes/checkout-template.php:159 -msgid "Enter discount" -msgstr "Gutschein eingeben" - -#@ edd -#: includes/checkout-template.php:161 -msgid "Discount" -msgstr "Rabatt" - -#@ edd -#: includes/checkout-template.php:163 -msgid "Apply Discount" -msgstr "Gutschein zuweisen" - -#@ edd -#: includes/checkout-template.php:481 -#: includes/dashboard-columns.php:58 -#: includes/metabox.php:243 -#: includes/metabox.php:333 -#: includes/shortcodes.php:26 -#: includes/template-functions.php:60 -#: includes/thickbox.php:61 -msgid "Purchase" -msgstr "Kaufen" - -#@ edd -#: includes/checkout-template.php:214 -msgid "Go back" -msgstr "Zurück gehen" - -#@ edd -#: includes/checkout-template.php:218 -msgid "You must be logged in to complete your purchase" -msgstr "Sie müssen angemeldet sein, um Ihren Kauf abschliessen zu können." - -#@ edd -#: includes/checkout-template.php:249 -msgid "Card name" -msgstr "Kartenname" - -#@ edd -#: includes/checkout-template.php:250 -msgid "Name on the Card" -msgstr "Name auf der Karte" - -#@ edd -#: includes/checkout-template.php:253 -msgid "Card number" -msgstr "Kartennummer" - -#@ edd -#: includes/checkout-template.php:254 -msgid "Card Number" -msgstr "Kartennummer" - -#@ edd -#: includes/checkout-template.php:257 -msgid "Security code" -msgstr "Sicherheits-Code" - -#@ edd -#: includes/checkout-template.php:258 -msgid "CVC" -msgstr "Prüfziffer" - -#@ edd -#: includes/checkout-template.php:264 -#: includes/graphing.php:121 -#: includes/graphing.php:221 -msgid "Month" -msgstr "Monat" - -#@ edd -#: includes/checkout-template.php:266 -msgid "Year" -msgstr "Jahr" - -#@ edd -#: includes/checkout-template.php:267 -msgid "Expiration (MM/YYYY)" -msgstr "Gültig bis (MM/JJJJ)" - -#@ edd -#: includes/checkout-template.php:247 -msgid "Credit Card Info" -msgstr "Kreditkarten-Infos" - -#@ edd -#: includes/checkout-template.php:297 -msgid "Address line 1" -msgstr "Anschrift" - -#@ edd -#: includes/checkout-template.php:298 -msgid "Billing Address" -msgstr "Rechnungsanschrift" - -#@ edd -#: includes/checkout-template.php:301 -msgid "Address line 2" -msgstr "Anschrift - Zusatz" - -#@ edd -#: includes/checkout-template.php:302 -msgid "Billing Address Line 2" -msgstr "Rechnung: Anschrift - Zusatz" - -#@ edd -#: includes/checkout-template.php:305 -msgid "City" -msgstr "Ort" - -#@ edd -#: includes/checkout-template.php:306 -msgid "Billing City" -msgstr "Rechnung: Ort" - -#@ edd -#: includes/checkout-template.php:320 -msgid "State / Province" -msgstr "Bundesland/ Kanton" - -#@ edd -#: includes/checkout-template.php:337 -msgid "Billing State / Province" -msgstr "Rechnung: Bundesland/ Kanton" - -#@ edd -#: includes/checkout-template.php:340 -msgid "Zip / Postal code" -msgstr "Postleitzahl" - -#@ edd -#: includes/checkout-template.php:341 -msgid "Billing Zip / Postal Code" -msgstr "Rechnung: Postleitzahl" - -#@ edd -#: includes/checkout-template.php:370 -msgid "Create an account" -msgstr "Ein Benutzerkonto erstellen" - -#@ edd -#: includes/checkout-template.php:373 -#: includes/checkout-template.php:374 -#: includes/checkout-template.php:421 -#: includes/login-register.php:47 -#: includes/login-register.php:48 -msgid "Username" -msgstr "Benutzername" - -#@ edd -#: includes/checkout-template.php:377 -#: includes/checkout-template.php:378 -#: includes/checkout-template.php:425 -#: includes/login-register.php:51 -msgid "Password" -msgstr "Passwort" - -#@ edd -#: includes/checkout-template.php:381 -msgid "Confirm password" -msgstr "Passwort bestätigen" - -#@ edd -#: includes/checkout-template.php:382 -msgid "Password Again" -msgstr "Passwort nochmals" - -#@ edd -#: includes/checkout-template.php:368 -msgid "Already have an account?" -msgstr "Haben Sie schon ein Benutzerkonto?" - -#@ edd -#: includes/checkout-template.php:368 -#: includes/login-register.php:58 -msgid "Login" -msgstr "Anmelden" - -#@ edd -#: includes/checkout-template.php:417 -msgid "Login to your account" -msgstr "Bei Ihrem Benutzerkonto anmelden" - -#@ edd -#: includes/checkout-template.php:420 -msgid "Your username" -msgstr "Ihr Benutzername" - -#@ edd -#: includes/checkout-template.php:424 -msgid "Your password" -msgstr "Ihr Passwort" - -#@ edd -#: includes/checkout-template.php:432 -msgid "Need to create an account?" -msgstr "Benötigen Sie ein Benutzerkonto?" - -#@ edd -#: includes/checkout-template.php:434 -msgid "Register" -msgstr "Registrieren" - -#@ edd -#: includes/dashboard-columns.php:27 -#: includes/pdf-reports.php:67 -#: includes/post-types.php:183 -#: includes/widgets.php:169 -msgid "Categories" -msgstr "Kategorien" - -#@ edd -#: includes/dashboard-columns.php:28 -#: includes/pdf-reports.php:68 -#: includes/post-types.php:205 -#: includes/widgets.php:170 -msgid "Tags" -msgstr "Schlagwörter" - -#@ edd -#: includes/dashboard-columns.php:30 -#: includes/graphing.php:32 -#: includes/graphing.php:222 -#: includes/pdf-reports.php:208 -msgid "Sales" -msgstr "Verkäufe" - -#@ edd -#: includes/dashboard-columns.php:31 -#: includes/graphing.php:78 -#: includes/graphing.php:122 -#: includes/graphing.php:169 -#: includes/pdf-reports.php:191 -msgid "Earnings" -msgstr "Einnahmen" - -#@ edd -#: includes/dashboard-columns.php:32 -#: includes/metabox.php:346 -msgid "Short Code" -msgstr "Shortcode" - -#@ edd -#: includes/dashboard-columns.php:189 -msgid "Show all categories" -msgstr "Alle Kategorien" - -#@ edd -#: includes/dashboard-columns.php:200 -msgid "Show all tags" -msgstr "Alle Schlagwörter" - -#@ edd -#: includes/email-functions.php:59 -msgid "Hello" -msgstr "Hallo" - -#@ edd -#: includes/email-functions.php:59 -msgid "A download purchase has been made" -msgstr "Ein Download-Kauf wurde getätigt" - -#@ edd -#: includes/email-functions.php:60 -msgid "Downloads sold:" -msgstr "Verkaufte Downloads:" - -#@ edd -#: includes/email-functions.php:74 -msgid "Amount: " -msgstr "Betrag: " - -#@ edd -#: includes/email-functions.php:76 -msgid "Thank you" -msgstr "Danke!" - -#@ edd -#: includes/email-functions.php:78 -msgid "New download purchase" -msgstr "Neuer Download-Kauf" - -#@ edd -#: includes/gateways/paypal.php:271 -msgid "Invalid IPN" -msgstr "Ungültige Sofortige Zahlungsbestätigung (IPN)" - -#@ edd -#: includes/graphing.php:77 -#: includes/post-types.php:125 -msgid "Download" -msgstr "Download" - -#@ edd -#: includes/graphing.php:136 -msgid "Earnings per month" -msgstr "Einnahmen pro Monat" - -#@ edd -#: includes/metabox.php:181 -msgid "Download Files" -msgstr "Dateien zum Herunterladen" - -#@ edd -#: includes/metabox.php:220 -msgid "Upload the downloadable files." -msgstr "Laden Sie die herunterladbaren Dateien hoch." - -#@ edd -#: includes/metabox.php:241 -msgid "Purchase Text" -msgstr "Kauf-Text" - -#@ edd -#: includes/metabox.php:243 -msgid "Add the text you would like displayed for the purchase text" -msgstr "Geben Sie den Text ein, den Sie für den Verkaufstext anzeigen wollen." - -#@ edd -#: includes/metabox.php:262 -msgid "Link Style" -msgstr "Linkstil" - -#@ edd -#: includes/metabox.php:266 -msgid "Choose the style of the purchase link" -msgstr "Wählen Sie den Stil für den Kauf-Link." - -#@ edd -#: includes/metabox.php:287 -msgid "Button Color" -msgstr "Buttonfarbe" - -#@ edd -#: includes/metabox.php:313 -msgid "Disable the purchase button?" -msgstr "Den Kauf-Button deaktivieren?" - -#@ edd -#: includes/metabox.php:196 -#: includes/metabox.php:215 -msgid "file name" -msgstr "Dateiname" - -#@ edd -#: includes/metabox.php:197 -#: includes/metabox.php:216 -msgid "file url" -msgstr "Datei-URL" - -#@ edd -#: includes/metabox.php:149 -#: includes/metabox.php:220 -#: includes/post-types.php:43 -#: includes/post-types.php:81 -msgid "Add New" -msgstr "Hinzufügen" - -#@ edd -#: includes/metabox.php:338 -msgid "Notes" -msgstr "Hinweise" - -#@ edd -#: includes/metabox.php:341 -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "Die Stil-Optionen oben spiegeln NICHT den Stil des Shortcodes wider! Der Shortcode erlaubt Ihnen, einen Kauf-Button für diesen Download an einer beliebigen Stelle Ihrer Webseite zu platzieren." - -#@ edd -#: includes/metabox.php:434 -msgid "Sales:" -msgstr "Verkäufe:" - -#@ edd -#: includes/metabox.php:440 -msgid "Earnings:" -msgstr "Einnahmen:" - -#@ edd -#: includes/scripts.php:123 -msgid "Add New Download" -msgstr "Neuen Download hinzufügen" - -#@ edd -#: includes/post-types.php:126 -msgid "Downloads" -msgstr "Downloads" - -#@ edd -#: includes/post-types.php:79 -msgctxt "post type general name" -msgid "Payments" -msgstr "Zahlungen" - -#@ edd -#: includes/post-types.php:80 -msgctxt "post type singular name" -msgid "Payment" -msgstr "Zahlung" - -#@ edd -#: includes/post-types.php:82 -msgid "Add New Payment" -msgstr "Neue Zahlung hinzufügen" - -#@ edd -#: includes/post-types.php:84 -msgid "New Payment" -msgstr "Neue Zahlung" - -#@ edd -#: includes/post-types.php:85 -msgid "All Payments" -msgstr "Alle Zahlungen" - -#@ edd -#: includes/post-types.php:86 -msgid "View Payment" -msgstr "Zahlung ansehen" - -#@ edd -#: includes/post-types.php:87 -msgid "Search Payments" -msgstr "Zahlungen suchen" - -#@ edd -#: includes/post-types.php:88 -msgid "No Payments found" -msgstr "Keine Zahlungen gefunden" - -#@ edd -#: includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "Es befinden sich keine Zahlungen im Papierkorb." - -#@ edd -#: includes/post-types.php:173 -msgctxt "taxonomy general name" -msgid "Categories" -msgstr "Kategorien" - -#@ edd -#: includes/post-types.php:174 -msgctxt "taxonomy singular name" -msgid "Category" -msgstr "Kategorie" - -#@ edd -#: includes/post-types.php:175 -msgid "Search Categories" -msgstr "Kategorien suchen" - -#@ edd -#: includes/post-types.php:176 -msgid "All Categories" -msgstr "Alle Kategorien" - -#@ edd -#: includes/post-types.php:177 -msgid "Parent Category" -msgstr "Übergeordnete Kategorie" - -#@ edd -#: includes/post-types.php:178 -msgid "Parent Category:" -msgstr "Übergeordnete Kategorie:" - -#@ edd -#: includes/post-types.php:179 -msgid "Edit Category" -msgstr "Kategorie bearbeiten" - -#@ edd -#: includes/post-types.php:180 -msgid "Update Category" -msgstr "Kategorie aktualisieren" - -#@ edd -#: includes/post-types.php:181 -msgid "Add New Category" -msgstr "Neue Kategorie" - -#@ edd -#: includes/post-types.php:182 -msgid "New Category Name" -msgstr "Neuer Kategoriename" - -#@ edd -#: includes/post-types.php:195 -msgctxt "taxonomy general name" -msgid "Tags" -msgstr "Schlagwörter" - -#@ edd -#: includes/post-types.php:196 -msgctxt "taxonomy singular name" -msgid "Tag" -msgstr "Schlagwort" - -#@ edd -#: includes/post-types.php:197 -msgid "Search Tags" -msgstr "Schlagwörter suchen" - -#@ edd -#: includes/post-types.php:198 -msgid "All Tags" -msgstr "Alle Schlagwörter" - -#@ edd -#: includes/post-types.php:199 -msgid "Parent Tag" -msgstr "Übergeordnetes Schlagwort" - -#@ edd -#: includes/post-types.php:200 -msgid "Parent Tag:" -msgstr "Übergeordnetes Schlagwort:" - -#@ edd -#: includes/post-types.php:201 -msgid "Edit Tag" -msgstr "Schlagwort bearbeiten" - -#@ edd -#: includes/post-types.php:202 -msgid "Update Tag" -msgstr "Schlagwort aktualisieren" - -#@ edd -#: includes/post-types.php:203 -msgid "Add New Tag" -msgstr "Neues Schlagwort" - -#@ edd -#: includes/post-types.php:204 -msgid "New Tag Name" -msgstr "Neuer Schlagwortname" - -#@ edd -#: includes/post-types.php:233 -#: includes/post-types.php:234 -msgid "Download updated." -msgstr "Download aktualisiert." - -#@ edd -#: includes/post-types.php:235 -msgid "Download published." -msgstr "Download veröffentlicht." - -#@ edd -#: includes/post-types.php:236 -msgid "Download saved." -msgstr "Download gespeichert." - -#@ edd -#: includes/post-types.php:237 -msgid "Download submitted." -msgstr "Download hinzugefügt." - -#@ edd -#: includes/process-download.php:294 -msgid "You do not have permission to download this file" -msgstr "Sie haben keine Berechtigung, diese Datei herunterzuladen." - -#@ edd -#: includes/process-download.php:294 -msgid "Purchase Verification Failed" -msgstr "Die Kauf-Bestätigung schlug fehl." - -#@ edd -#: includes/process-purchase.php:349 -msgid "Username already taken" -msgstr "Dieser Benutzername existiert bereits." - -#@ edd -#: includes/process-purchase.php:355 -msgid "Invalid username" -msgstr "Ungültiger Benutzername" - -#@ edd -#: includes/process-purchase.php:378 -#: includes/process-purchase.php:522 -msgid "Invalid email" -msgstr "Ungültige E-Mail-Adresse" - -#@ edd -#: includes/process-purchase.php:384 -msgid "Email already used" -msgstr "Diese E-Mail-Adresse wird bereits verwendet" - -#@ edd -#: includes/process-purchase.php:422 -#: includes/process-purchase.php:487 -msgid "Enter a password" -msgstr "Geben Sie ein Passwort ein" - -#@ edd -#: includes/process-purchase.php:407 -msgid "Passwords don't match" -msgstr "Die beiden Passwörter stimmen nicht überein" - -#@ edd -#: includes/login-register.php:92 -#: includes/process-purchase.php:472 -msgid "The password you entered is incorrect" -msgstr "Das von Ihnen eingegeben Passwort ist falsch." - -#@ edd -#: includes/login-register.php:95 -#: includes/process-purchase.php:491 -msgid "The username you entered does not exist" -msgstr "Der von Ihnen eingegebene Benutzername existiert nicht." - -#@ edd -#: includes/register-settings.php:42 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "Während Sie sich im Testmodus des Plugins befinden, werden keine Live-Transaktionen ausgeführt. Um den Testmodus vollständig verwenden zu können, benötigen Sie ein Sandkasten-Benutzerkonto (Sandbox Test Account) bei Ihrem Zahlungsart-Anbieter, den Sie testen möchten." - -#@ edd -#: includes/register-settings.php:48 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "Dies ist die 'Kasse'-Seite, wo Käufer ihren Kauf abschliessen werden." - -#@ edd -#: includes/register-settings.php:55 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "Dies ist die Seite, wohin Käufer nach abgeschlossenem Kauf hingeleitet werden." - -#@ edd -#: includes/register-settings.php:68 -msgid "Configure the currency options" -msgstr "Richten Sie Ihre Währungsoptionen ein." - -#@ edd -#: includes/register-settings.php:74 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "Wählen Sie Ihre Währung. Hinweis: Einige Zahlungsarten-Anbieter haben Beschränkungen für bestimmte Währungen!" - -#@ edd -#: includes/register-settings.php:90 -msgid "Thousands Separator" -msgstr "Tausender-Trennzeichen" - -#@ edd -#: includes/register-settings.php:91 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "Das Symbol, um die Tausender abzutrennen; gewöhnlich . (Punkt) oder , (Komma)." - -#@ edd -#: includes/register-settings.php:98 -msgid "Decimal Separator" -msgstr "Zehner-Trennzeichen" - -#@ edd -#: includes/register-settings.php:99 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "Das Symbol, um die Zehner-Werte abzutrennen; gewöhnlich , (Komma) oder . (Punkt)." - -#@ edd -#: includes/register-settings.php:111 -msgid "Choose the payment gateways you want to enable." -msgstr "Wählen Sie die Zahlungsweise(n), die Sie aktivieren wollen." - -#@ edd -#: includes/register-settings.php:118 -msgid "Display icons for the selected payment methods" -msgstr "Icon-Bilder für die ausgewählten Bezahlmethoden anzeigen." - -#@ edd -#: includes/register-settings.php:132 -msgid "Configure the PayPal settings" -msgstr "PayPal Einstellungen festlegen" - -#@ edd -#: includes/register-settings.php:138 -msgid "Enter your PayPal account's email" -msgstr "Geben Sie die E-Mail-Adresse Ihres PayPal-Benutzerkontos ein." - -#@ edd -#: includes/register-settings.php:144 -msgid "Alternate PayPal Purchase Verification" -msgstr "Alternative PayPal Kauf-Bestätigung" - -#@ edd -#: includes/register-settings.php:179 -msgid "From Email" -msgstr "Absender-E-Mail" - -#@ edd -#: includes/register-settings.php:180 -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "Absender-E-Mail-Adresse, von welcher aus Bestellbestätigungen versandt werden. Diese fungiert als Adresse für \"Von\" (from) sowie \"Antwort an\" (reply-to)." - -#@ edd -#: includes/register-settings.php:185 -msgid "Purchase Email Subject" -msgstr "Betreff der Bestellbestätigung" - -#@ edd -#: includes/register-settings.php:186 -msgid "Enter the subject line for the purchase receipt email" -msgstr "Geben Sie die Betreffzeile der E-Mail für die Bestellbestätigung an." - -#@ edd -#: includes/email-functions.php:47 -#: includes/register-settings.php:191 -msgid "Purchase Receipt" -msgstr "Bestellbestätigung" - -#@ edd -#: includes/register-settings.php:192 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "Geben Sie hier den E-Mail-Text ein, den Benutzer bzw. Kunden nach einem erfolgreichen, abgeschlossenen Kauf erhalten. HTML-Formatierungen sind erlaubt. Verfügbare Template-Tags sind:" - -#@ edd -#: includes/register-settings.php:193 -msgid "A list of download URLs for each download purchased" -msgstr "Eine Liste von Download-URLs für jeden gekauften Download" - -#@ edd -#: includes/register-settings.php:194 -msgid "The buyer's name" -msgstr "Name des Käufers" - -#@ edd -#: includes/register-settings.php:195 -msgid "The date of the purchase" -msgstr "Datum des Kaufs" - -#@ edd -#: includes/register-settings.php:199 -msgid "Your site name" -msgstr "Name Ihrer Webseite" - -#@ edd -#: includes/register-settings.php:231 -msgid "Enable jQuery Validation" -msgstr "jQuery-Validierung aktivieren" - -#@ edd -#: includes/register-settings.php:232 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "Wählen Sie diese Einstellung, um die jQuery-Validierung (via JavaScript) für das Bezahlformular zu aktivieren." - -#@ edd -#: includes/register-settings.php:237 -msgid "Disable Guest Checkout" -msgstr "Gastbestellungen deaktivieren" - -#@ edd -#: includes/register-settings.php:243 -msgid "Show Register / Login Form?" -msgstr "Registrierungs-/ Anmeldeformular anzeigen?" - -#@ edd -#: includes/register-settings.php:256 -msgid "Disable Redownload?" -msgstr "Erneutes Herunterladen deaktivieren?" - -#@ edd -#: includes/register-settings.php:314 -msgid "General Settings" -msgstr "Allgemeine Einstellungen" - -#@ edd -#: includes/register-settings.php:340 -msgid "Payment Gateway Settings" -msgstr "Zahlungsweisen - Einstellungen" - -#@ edd -#: includes/register-settings.php:366 -msgid "Email Settings" -msgstr "E-Mail-Einstellungen" - -#@ edd -#: includes/register-settings.php:419 -msgid "Misc Settings" -msgstr "Sonstige Einstellungen" - -#@ edd -#: includes/scripts.php:40 -msgid "Please enter a discount code" -msgstr "Bitte geben Sie einen Gutschein-Code ein." - -#@ edd -#: includes/scripts.php:41 -msgid "Discount Applied" -msgstr "Gutschein übernommen" - -#@ edd -#: includes/scripts.php:44 -msgid "You have already added this item to your cart" -msgstr "Sie haben dieses Element bereits Ihrem Warenkorb hinzugefügt." - -#@ edd -#: includes/scripts.php:46 -msgid "Loading" -msgstr "Laden..." - -#@ edd -#: includes/templates/history-downloads.php:10 -msgid "Download Name" -msgstr "Name des Downloads" - -#@ edd -#: includes/templates/history-downloads.php:12 -#: includes/templates/history-purchases.php:14 -msgid "Files" -msgstr "Dateien" - -#@ edd -#: includes/templates/history-downloads.php:48 -#: includes/templates/history-purchases.php:48 -#: includes/widgets.php:232 -msgid "No downloadable files found." -msgstr "Keine herunterladbaren Dateien gefunden." - -#@ edd -#: includes/templates/history-downloads.php:68 -msgid "You have not purchased any downloads" -msgstr "Sie haben bisher keine Downloads gekauft." - -#@ edd -#: includes/template-functions.php:167 -msgid "added to your cart" -msgstr "Zu Ihrem Warenkorb hinzugefügt." - -#@ edd -#: includes/thickbox.php:30 -msgid "Insert Download" -msgstr "Download einfügen" - -#@ edd -#: includes/thickbox.php:65 -msgid "You must choose a download" -msgstr "Sie müssen einen Download auswählen" - -#@ edd -#: includes/thickbox.php:100 -msgid "Choose a style" -msgstr "Stil auswählen" - -#@ edd -#: includes/thickbox.php:111 -msgid "Choose a button color" -msgstr "Buttonfarbe auswählen" - -#@ edd -#: includes/thickbox.php:120 -msgid "Link text . . ." -msgstr "Link-Text ..." - -#@ edd -#: includes/thickbox.php:124 -msgid "Cancel" -msgstr "Abbrechen" - -#@ edd -#: includes/thickbox.php:126 -msgid "Button Styles" -msgstr "Button-Stile" - -#@ edd -#: includes/widgets.php:39 -msgid "Downloads Cart" -msgstr "EDD: Downloads-Warenkorb" - -#@ edd -#: includes/widgets.php:39 -msgid "Display the downloads shopping cart" -msgstr "Den Downloads-Warenkorb anzeigen" - -#@ edd -#: includes/widgets.php:82 -#: includes/widgets.php:162 -msgid "Title:" -msgstr "Titel:" - -#@ edd -#: includes/widgets.php:87 -msgid "Show Quantity:" -msgstr "Menge anzeigen:" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:48 -msgid "Payment Status" -msgstr "Zahlungsstatus" - -#@ edd -#: includes/admin-pages/payments-history.php:98 -#: includes/payment-functions.php:295 -msgid "Pending" -msgstr "In Bearbeitung" - -#@ edd -#: includes/payment-functions.php:296 -msgid "Complete" -msgstr "Abgeschlossen" - -#@ edd -#: includes/admin-pages/payments-history.php:318 -#: includes/metabox.php:524 -#: includes/metabox.php:621 -msgid "Previous" -msgstr "Zurück" - -#@ edd -#: includes/metabox.php:264 -msgid "Button" -msgstr "Button" - -#@ edd -#: includes/metabox.php:265 -msgid "Text" -msgstr "Text" - -#@ edd -#: includes/metabox.php:24 -msgid "Purchase Log" -msgstr "Protokoll: Verkäufe" - -#@ edd -#: includes/metabox.php:25 -msgid "File Download Log" -msgstr "Protokoll: Heruntergeladene Dateien" - -#@ edd -#: includes/metabox.php:206 -#: includes/metabox.php:217 -#: includes/register-settings.php:708 -msgid "Upload File" -msgstr "Datei hochladen" - -#@ edd -#: includes/metabox.php:476 -msgid "Sales Log" -msgstr "Umsatzverlauf" - -#@ edd -#: includes/metabox.php:478 -msgid "Each sale for this download is listed below." -msgstr "Jeder Umsatz für diesen Download wird unten aufgelistet." - -#@ edd -#: includes/metabox.php:492 -#: includes/metabox.php:584 -msgid "Date:" -msgstr "Datum:" - -#@ edd -#: includes/metabox.php:496 -msgid "Buyer:" -msgstr "Käufer:" - -#@ edd -#: includes/metabox.php:500 -msgid "Purchase ID:" -msgstr "Kauf-ID:" - -#@ edd -#: includes/metabox.php:508 -msgid "No sales yet" -msgstr "Bisher keine Verkäufe" - -#@ edd -#: includes/metabox.php:565 -msgid "Download Log" -msgstr "Download-Verlauf" - -#@ edd -#: includes/metabox.php:567 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "Jedes Mal, wenn eine Datei heruntergeladen wird, wird es hier aufgezeichnet." - -#@ edd -#: includes/metabox.php:588 -msgid "Downloaded by:" -msgstr "Heruntergeladen von:" - -#@ edd -#: includes/metabox.php:592 -msgid "IP Address:" -msgstr "IP-Adresse:" - -#@ edd -#: includes/metabox.php:596 -msgid "File: " -msgstr "Datei: " - -#@ edd -#: includes/metabox.php:605 -msgid "No file downloads yet yet" -msgstr "Bisher keine Datei-Downloads" - -#@ edd -#: includes/register-settings.php:173 -msgid "From Name" -msgstr "Absender-Name" - -#@ edd -#: includes/register-settings.php:174 -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "Der Name, unter dem Bestellbestätigungen versandt werden. Wahrscheinlich wird dies Ihr Webseiten- oder Shop-Name sein." - -#@ edd -#: includes/misc-functions.php:208 -msgid "Indian Rupee" -msgstr "indische Rupie" - -#@ edd -#: includes/register-settings.php:117 -msgid "Accepted Payment Method Icons" -msgstr "Icons der akzeptierten Zahlungsmethoden" - -#@ edd -#: includes/register-settings.php:118 -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "Sie werden auch Ihre Zahlungsweisen entsprechend einrichten müssen, wenn Sie Kreditkarten akzeptieren." - -#@ edd -#: includes/admin-pages/payments-history.php:285 -#: includes/admin-pages/payments-history.php:287 -#: includes/export-functions.php:127 -msgid "guest" -msgstr "Gast" - -#@ edd -#: includes/checkout-template.php:370 -msgid "(optional)" -msgstr "(optional)" - -#@ edd -#: includes/admin-notices.php:36 -msgid "The payment has been deleted." -msgstr "Die Zahlung wurde gelöscht." - -#@ edd -#: includes/admin-notices.php:39 -msgid "The purchase receipt has been resent." -msgstr "Die Bestellbestätigungs-E-Mail wurde erneut versandt." - -#@ edd -#: includes/admin-pages/add-ons.php:69 -msgid "Add Ons for Easy Digital Downloads" -msgstr "Erweiterungen für Einfache Digitale Downloads" - -#@ edd -#: includes/admin-pages/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "Diese Zusatzmodule (Add-Ons) erweitern die Funktionalität von Einfache Digitale Downloads." - -#@ edd -#: includes/admin-pages/settings.php:36 -msgid "Styles" -msgstr "Stile" - -#@ edd -#: includes/admin-pages.php:30 -msgid "Easy Digital Download Add Ons" -msgstr "Einfache Digitale Downloads Erweiterungen" - -#@ edd -#: includes/admin-pages.php:30 -msgid "Add Ons" -msgstr "Erweiterungen" - -#@ edd -#: includes/cart-template.php:99 -msgid "Your cart is empty." -msgstr "Ihr Warenkorb ist noch leer." - -#@ edd -#: includes/checkout-template.php:190 -msgid "Show Terms" -msgstr "Bedingungen anzeigen" - -#@ edd -#: includes/checkout-template.php:191 -msgid "Hide Terms" -msgstr "Bedingungen verbergen" - -#@ edd -#: includes/checkout-template.php:194 -msgid "Agree to Terms?" -msgstr "Akzeptieren Sie unsere Bedingungen?" - -#@ edd -#: includes/metabox.php:84 -msgid "Pricing" -msgstr "Preisgestaltung" - -#@ edd -#: includes/metabox.php:113 -#: includes/metabox.php:115 -#: includes/metabox.php:135 -#: includes/metabox.php:137 -msgid "9.99" -msgstr "9,99" - -#@ edd -#: includes/metabox.php:295 -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "Wählen Sie eine Farbe für den Verkaufs-Link, falls oben 'Button' ausgewählt wurde." - -#@ edd -#: includes/metabox.php:316 -msgid "Check this if you do not want the purchase button displayed." -msgstr "Diese Einstellung aktivieren, falls Sie keinen Kauf-Button anzeigen wollen." - -#@ edd -#: includes/metabox.php:347 -msgid "This short code can be placed anywhere on your site" -msgstr "Dieser Shortcode kann an einer beliebigen Stelle Ihrer Webseite eingefügt werden." - -#@ edd -#: includes/process-purchase.php:259 -msgid "You must agree to the terms of use" -msgstr "Sie müssen unseren Nutzungsbedigungen zustimmen" - -#@ edd -#: includes/register-settings.php:208 -msgid "Disable Styles" -msgstr "Stile deaktivieren" - -#@ edd -#: includes/register-settings.php:209 -msgid "Check this to disable all included styling" -msgstr "Diese Einstellung auswählen, wenn Sie alle beigepackten CSS-Stile des Plugins deaktivieren wollen." - -#@ edd -#: includes/register-settings.php:214 -msgid "Checkout Button Color" -msgstr "Button-Farbe des 'Kasse'-Buttons" - -#@ edd -#: includes/register-settings.php:215 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "Wählen Sie die Button-Farbe, die Sie für die Buttons des Bezahlvorgangs möchten." - -#@ edd -#: includes/register-settings.php:262 -msgid "Terms of Agreement" -msgstr "Verkaufs- und Zahlungsbedingungen (AGB)" - -#@ edd -#: includes/register-settings.php:268 -msgid "Agree to Terms" -msgstr "Den AGB zustimmen" - -#@ edd -#: includes/register-settings.php:274 -msgid "Agree to Terms Label" -msgstr "Beschriftung für die Zustimmung zu den Bedingungen" - -#@ edd -#: includes/register-settings.php:281 -msgid "Agreement Text" -msgstr "Text der Bedingungen" - -#@ edd -#: includes/register-settings.php:392 -msgid "Style Settings" -msgstr "Stil-Einstellungen" - -#@ edd -#: includes/template-functions.php:263 -msgid "Gray" -msgstr "Grau" - -#@ edd -#: includes/template-functions.php:264 -msgid "Pink" -msgstr "Pink" - -#@ edd -#: includes/template-functions.php:266 -msgid "Green" -msgstr "Grün" - -#@ edd -#: includes/template-functions.php:267 -msgid "Teal" -msgstr "Türkis" - -#@ edd -#: includes/template-functions.php:268 -msgid "Black" -msgstr "Schwarz" - -#@ edd -#: includes/template-functions.php:269 -msgid "Dark Gray" -msgstr "Dunkelgrau" - -#@ edd -#: includes/template-functions.php:270 -msgid "Orange" -msgstr "Orange" - -#@ edd -#: includes/template-functions.php:271 -msgid "Purple" -msgstr "Violett" - -#@ edd -#: includes/template-functions.php:272 -msgid "Slate" -msgstr "Schieferfarben" - -#@ edd -#: includes/template-functions.php:295 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "Sie haben diese Datei bereits gekauft, doch Sie können sie auch mehrmals kaufen." - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:22 -msgid "Buyer's Email" -msgstr "E-Mail des Kunden" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "Falls notwendig, können Sie hier die E-Mail-Adresse des Kunden aktualisieren." - -#@ edd -#: includes/checkout-template.php:434 -msgid "or checkout as a guest." -msgstr "oder bezahlen Sie als Gast." - -#@ edd -#: includes/login-register.php:45 -msgid "Log into Your Account" -msgstr "Anmelden bei Ihrem Benutzerkonto" - -#@ edd -#: includes/login-register.php:61 -msgid "Lost Password" -msgstr "Passwort vergessen" - -#@ edd -#: includes/login-register.php:62 -msgid "Lost Password?" -msgstr "Passwort vergessen?" - -#@ edd -#: includes/login-register.php:69 -msgid "You are already logged in" -msgstr "Sie sind bereits angemeldet" - -#@ edd -#: includes/register-settings.php:196 -msgid "The total price of the purchase" -msgstr "Der Gesamtpreis der Bestellung" - -#@ edd -#: includes/scripts.php:124 -msgid "Use This File" -msgstr "Diese Datei verwenden" - -#@ edd -#: includes/template-functions.php:265 -msgid "Blue" -msgstr "Blau" - -#@ edd -#: includes/widgets.php:112 -msgid "Downloads Categories / Tags" -msgstr "EDD: Downloads-Kategorien/ -Schlagwörter" - -#@ edd -#: includes/widgets.php:112 -msgid "Display the downloads categories or tags" -msgstr "Kategorien oder Schlagwörter (Tags) für Downloads anzeigen." - -#@ edd -#: includes/widgets.php:167 -msgid "Taxonomy:" -msgstr "Taxonomie:" - -#@ edd -#: includes/cart-functions.php:401 -#, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "Sie haben %s erfolgreich zu Ihrem Warenkorb hinzugefügt." - -#@ edd -#: includes/cart-functions.php:402 -msgid "Checkout." -msgstr "Kasse." - -#@ edd -#: includes/install.php:42 -msgid "Purchase Confirmation" -msgstr "Kauf-Bestätigung" - -#@ edd -#: includes/install.php:43 -msgid "Thank you for your purchase!" -msgstr "Danke für Ihren Einkauf!" - -#@ edd -#: includes/install.php:53 -#: includes/widgets.php:193 -msgid "Purchase History" -msgstr "Bestellhistorie" - -#@ edd -#: includes/process-purchase.php:454 -msgid "You must login or register to complete your purchase" -msgstr "Sie müssen sich anmelden oder neu registrieren, um Ihre Bestellung abschließen zu können." - -#@ edd -#: includes/templates/history-purchases.php:11 -msgid "Purchase ID" -msgstr "Kauf-ID" - -#@ edd -#: includes/templates/history-purchases.php:61 -msgid "You have not made any purchases" -msgstr "Sie haben noch keine Bestellungen getätigt." - -#@ edd -#: includes/admin-notices.php:62 -msgid "There seems to be an issue with the server. Please try again in a few minutes." -msgstr "Es scheint Probleme mit dem Server zu geben. Bitte versuchen Sie es noch einmal in einigen Minuten." - -#@ edd -#: includes/admin-pages/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "Alle Erweiterungen durchstöbern" - -#@ edd -#: includes/email-template.php:107 -msgid "Sample Product Title" -msgstr "Beispiel-Produkttitel" - -#@ edd -#: includes/email-template.php:110 -msgid "Sample Download File Name" -msgstr "Beispiel-Download-Dateiname" - -#@ edd -#: includes/email-template.php:158 -msgid "Purchase Receipt Preview" -msgstr "Bestellbestätigung-Vorschau" - -#@ edd -#: includes/email-template.php:158 -msgid "Preview Purchase Receipt" -msgstr "Vorschau der Bestellbestätigung" - -#@ edd -#: includes/email-template.php:23 -msgid "Default Template" -msgstr "Standard-Vorlage" - -#@ edd -#: includes/email-template.php:24 -msgid "No template, plain text only" -msgstr "Keine Vorlage, nur reiner Text" - -#@ edd -#: includes/misc-functions.php:209 -msgid "Turkish Lira" -msgstr "Türkische Lira" - -#@ edd -#: includes/admin-pages/payments-history.php:101 -#: includes/payment-functions.php:297 -msgid "Refunded" -msgstr "Zurückerstattet" - -#@ edd -#: includes/process-purchase.php:206 -msgid "The selected gateway is not active" -msgstr "Die ausgewählte Zahlungsweise ist nicht aktiv" - -#@ edd -#: includes/process-purchase.php:210 -msgid "No gateway has been selected" -msgstr "Es wurde keine Zahlungsweise ausgewählt" - -#@ edd -#: includes/process-purchase.php:303 -msgid "The user information is invalid." -msgstr "Die Benutzerinformation ist ungültig." - -#@ edd -#: includes/process-purchase.php:366 -msgid "You must register or login to complete your purchase" -msgstr "Sie müssen sich registrieren oder anmelden, um Ihren Kauf abschließen zu können." - -#@ edd -#: includes/process-purchase.php:396 -#: includes/process-purchase.php:529 -msgid "Enter an email" -msgstr "Eine E-Mail-Adresse eingeben" - -#@ edd -#: includes/process-purchase.php:427 -msgid "Enter the password confirmation" -msgstr "Bestätigen Sie das Passwort" - -#@ edd -#: includes/register-settings.php:145 -msgid "If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal." -msgstr "Falls Zahlungen als nicht vollständig/ abgeschlossen gekennzeichnet werden, aktivieren Sie bitte dieses Kontrollkästchen. Hinweis: Dies erfordert jedoch, dass die Käufer von PayPal entsprechend zu Ihrer Webseite zurückkehren." - -#@ edd -#: includes/scripts.php:126 -msgid "Are you sure you wish to delete this payment?" -msgstr "Sind Sie sicher, dass Sie diese Zahlung löschen wollen?" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:64 -msgid "Send Purchase Receipt" -msgstr "Bestellbestätigung senden" - -#@ edd -#: includes/admin-pages/forms/edit-payment.php:68 -msgid "Check this box to send the purchase receipt, including all download links." -msgstr "Diese Einstellung wählen, um eine Bestellbestätigung zu versenden, die auch alle Download-Links enthält." - -#@ edd -#: includes/admin-pages/payments-history.php:266 -msgid "Payment Method:" -msgstr "Zahlungsweise:" - -#@ edd -#: includes/email-template.php:199 -msgid "Dear" -msgstr "Sehr geehrte/r" - -#@ edd -#: includes/email-template.php:200 -msgid "Thank you for your purchase. Please click on the link(s) below to download your files." -msgstr "Vielen Dank für Ihre Bestellung! Bitte klicken Sie auf die Links unten, um Ihre Datei(en) herunterzuladen." - -#@ edd -#: includes/graphing.php:42 -#, php-format -msgid "%s Performance in Sales" -msgstr "%s-Performance in Verkäufen" - -#@ edd -#: includes/graphing.php:88 -#, php-format -msgid "%s Performance in Earnings" -msgstr "%s-Performance bei den Einnahmen" - -#@ edd -#: includes/metabox.php:22 -#, php-format -msgid "%1$s Configuration" -msgstr "%1$s-Einstellungen" - -#@ edd -#: includes/metabox.php:23 -#, php-format -msgid "%1$s Stats" -msgstr "%1$s-Statistiken" - -#@ edd -#: includes/post-types.php:44 -#, php-format -msgid "Add New %1$s" -msgstr "Neuen %1$s hinzufügen" - -#@ edd -#: includes/post-types.php:45 -#, php-format -msgid "Edit %1$s" -msgstr "%1$s bearbeiten" - -#@ edd -#: includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "Neuer %1$s" - -#@ edd -#: includes/post-types.php:47 -#, php-format -msgid "All %2$s" -msgstr "Alle %2$s" - -#@ edd -#: includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "%1$s ansehen" - -#@ edd -#: includes/post-types.php:49 -#, php-format -msgid "Search %2$s" -msgstr "%2$s suchen" - -#@ edd -#: includes/post-types.php:50 -#, php-format -msgid "No %2$s found" -msgstr "Es wurde kein %2$s gefunden." - -#@ edd -#: includes/post-types.php:51 -#, php-format -msgid "No %2$s found in Trash" -msgstr "Es befindet sich kein %2$s im Papierkorb." - -#@ edd -#: includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "%2$s" - -#@ edd -#: includes/process-purchase.php:289 -msgid "Please enter a valid email address." -msgstr "Bitte geben Sie eine gültige E-Mail-Adresse an." - -#@ edd -#: includes/register-settings.php:225 -msgid "Disable Ajax" -msgstr "AJAX deaktivieren" - -#@ edd -#: includes/register-settings.php:226 -msgid "Check this to disable AJAX for the shopping cart." -msgstr "Wählen Sie diese Einstellung um AJAX für den Warenkorb zu deaktivieren." - -#@ edd -#: includes/thickbox.php:29 -#: includes/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "%s einfügen" - -#@ edd -#: includes/thickbox.php:88 -#, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "Verwenden Sie das Formular unten, um einen Shortcode für den Kauf eines %s einzufügen" - -#@ edd -#: includes/thickbox.php:91 -#, php-format -msgid "Choose a %s" -msgstr "Einen %s auswählen" - -#@ edd -#: includes/email-functions.php:75 -msgid "Payment Method: " -msgstr "Zahlungsmethode: " - -#@ edd -#: includes/gateway-functions.php:28 -msgid "Test Payment" -msgstr "Test-Zahlung" - -#@ edd -#: includes/register-settings.php:160 -msgid "Email Template" -msgstr "E-Mail-Template" - -#@ edd -#: includes/register-settings.php:161 -msgid "Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" to see the new template." -msgstr "Wählen Sie eine Vorlage (Template). Klicken Sie \"Änderungen übernehmen\" und danach \"Vorschau der Bestellbestätigung\", um das neue Template anzusehen." - -#@ edd -#: includes/register-settings.php:198 -msgid "The method of payment used for this purchase" -msgstr "Die Zahlungsweise, die für diesen Kauf verwendet wurde." - -#@ edd -#: includes/admin-pages/payments-history.php:90 -msgid "All" -msgstr "Alle" - -#@ edd -#: includes/admin-pages/payments-history.php:95 -msgid "Completed" -msgstr "Abgeschlossen" - -#@ edd -#: includes/admin-pages/payments-history.php:106 -msgid "Export" -msgstr "Exportieren" - -#@ edd -#: includes/admin-pages/payments-history.php:131 -msgid "Showing payments for: " -msgstr "Zahlungen anzeigen für: " - -#@ edd -#: includes/admin-pages/payments-history.php:131 -msgid "clear" -msgstr "leeren" - -#@ edd -#: includes/admin-pages/payments-history.php:271 -msgid "Purchase Key" -msgstr "Kaufschlüssel" - -#@ edd -#: includes/admin-pages/reports.php:41 -msgid "Download Sales and Earnings PDF Report for all Products" -msgstr "Umsatz- und Verdienst-Berichte (PDF) für alle Produkte herunterladen" - -#@ edd -#: includes/admin-pages/reports.php:44 -msgid "Please Note: Transactions created while in test mode are not included on this page or in the PDF reports." -msgstr "Bitte beachten: Transaktionen, die im Testmodus getätigt wurden, sind nicht auf dieser Seite oder in den PDF-Berichten enthalten." - -#@ edd -#: includes/checkout-template.php:134 -msgid "Personal Info" -msgstr "Persönliche Info" - -#@ edd -#: includes/dashboard-columns.php:228 -#, php-format -msgid "%s Data" -msgstr "%s Daten" - -#@ edd -#: includes/export-functions.php:44 -msgid "Discounts," -msgstr "Rabatte" - -#@ edd -#: includes/export-functions.php:45 -msgid "Amount paid" -msgstr "Gezahlter Betrag" - -#@ edd -#: includes/export-functions.php:46 -msgid "Payment method" -msgstr "Zahlungsweise" - -#@ edd -#: includes/graphing.php:236 -msgid "Sales per month" -msgstr "Verkäufe pro Monat" - -#@ edd -#: includes/metabox.php:184 -msgid "File Name" -msgstr "Dateiname" - -#@ edd -#: includes/metabox.php:185 -msgid "File URL" -msgstr "Datei-URL" - -#@ edd -#: includes/metabox.php:199 -msgid "All Prices" -msgstr "Alle Preise" - -#@ edd -#: includes/pdf-reports.php:36 -msgid "to" -msgstr "bis" - -#@ edd -#: includes/pdf-reports.php:41 -#: includes/pdf-reports.php:52 -msgid "Sales and earnings reports for the current year for all products" -msgstr "Umsatz- und Verdienst-Berichte für das aktuelle Jahr für alle Produkte" - -#@ edd -#: includes/pdf-reports.php:57 -msgid "Date Range: " -msgstr "Datumsbereich: " - -#@ edd -#: includes/pdf-reports.php:61 -msgid "Table View" -msgstr "Tabellarische Ansicht" - -#@ edd -#: includes/pdf-reports.php:65 -msgid "Product Name" -msgstr "Produktname" - -#@ edd -#: includes/pdf-reports.php:69 -msgid "Number of Sales" -msgstr "Anzahl der Verkäufe" - -#@ edd -#: includes/pdf-reports.php:70 -msgid "Earnings to Date" -msgstr "Bisheriger Verdienst" - -#@ edd -#: includes/pdf-reports.php:119 -msgid "Graph View" -msgstr "Diagramm-Ansicht" - -#@ edd -#: includes/pdf-reports.php:212 -msgid "Sales and Earnings by Month for all Products" -msgstr "Umsätze und Verdienste pro Monat für alle Produkte" - -#@ edd -#: includes/pdf-reports.php:226 -msgid "Jan" -msgstr "Jan" - -#@ edd -#: includes/pdf-reports.php:227 -msgid "Feb" -msgstr "Feb" - -#@ edd -#: includes/pdf-reports.php:228 -msgid "Mar" -msgstr "März" - -#@ edd -#: includes/pdf-reports.php:229 -msgid "Apr" -msgstr "Apr" - -#@ edd -#: includes/pdf-reports.php:230 -msgid "May" -msgstr "Mai" - -#@ edd -#: includes/pdf-reports.php:231 -msgid "June" -msgstr "Juni" - -#@ edd -#: includes/pdf-reports.php:232 -msgid "July" -msgstr "Juli" - -#@ edd -#: includes/pdf-reports.php:233 -msgid "Aug" -msgstr "Aug" - -#@ edd -#: includes/pdf-reports.php:234 -msgid "Sept" -msgstr "Sept" - -#@ edd -#: includes/pdf-reports.php:235 -msgid "Oct" -msgstr "Okt" - -#@ edd -#: includes/pdf-reports.php:236 -msgid "Nov" -msgstr "Nov" - -#@ edd -#: includes/pdf-reports.php:237 -msgid "Dec" -msgstr "Dez" - -#@ edd -#: includes/register-settings.php:150 -msgid "Disable PayPal IPN Verification" -msgstr "PayPal Sofortige Zahlungsbestätigung (IPN) Verifizierung deaktivieren" - -#@ edd -#: includes/register-settings.php:197 -msgid "The unique ID number for this purchase receipt" -msgstr "Die einzigartige ID-Ziffer für diese Bestellbestätigung" - -#@ edd -#: includes/register-settings.php:244 -msgid "Display the registration and login forms on the checkout page for non-logged-in users." -msgstr "Die Formulare zur Benutzerregistrierung und zum Anmelden auf der 'Kasse'-Seite auch für nicht angemeldete Besucher anzeigen." - -#@ edd -#: includes/register-settings.php:249 -msgid "Download Link Expiration" -msgstr "Ablauf von Download-Links" - -#@ edd -#: includes/register-settings.php:250 -msgid "How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours." -msgstr "Wie lange sollen Download-Links aktiv sein? Der Standard ist 24 Stunden vom Zeitpunkt der Generierung. Geben Sie eine Zeit in Stunden ein." - -#@ edd -#: includes/register-settings.php:257 -msgid "Check this if you do not want to allow users to redownload items from their purchase history." -msgstr "Aktivieren Sie diese Einstellung, wenn Sie Benutzern erlauben wollen, Dateien erneut von Ihrer Benutzerseite herunterzuladen." - -#@ edd -#: includes/register-settings.php:269 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing." -msgstr "Aktivieren Sie diese Einstellung, um beim Bezahlvorgang eine Zustimmung zu AGB/ Widerrufsbelehrung anzuzeigen, die Besucher bestätigen müssen, um die Bestellung abschliessen zu können." - -#@ edd -#: includes/register-settings.php:275 -msgid "Label shown next to the agree to terms check box." -msgstr "Beschriftung neben dem Kontrollkästchen zur Zustimmung zu AGB/ Widerrufsbelehrung." - -#@ edd -#: includes/register-settings.php:282 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "Falls Zustimmung zu AGB/ Widerrufsbelehrung aktiviert ist, geben Sie hier den entsprechenden Text ein." - -#@ edd -#: includes/register-settings.php:746 -msgid "Settings Updated" -msgstr "Einstellungen aktualisiert" - -#@ edd -#: includes/scripts.php:125 -msgid "Sorry, not available for variable priced products." -msgstr "Entschuldigung, dies ist nicht verfügbar für Produkte mit variablem Preis." - -#@ edd -#: includes/ajax-functions.php:102 -msgid "This discount code has been used already" -msgstr "Dieser Gutschein-Code wurde bereits verwendet." - -#@ edd -#: includes/email-functions.php:73 -msgid "Purchased by: " -msgstr "Gekauft von: " - -#@ edd -#: includes/misc-functions.php:210 -msgid "Iranian Rial" -msgstr "Iranischer Rial" - -#@ edd -#: includes/pdf-reports.php:112 -msgid "No Downloads found." -msgstr "Es wurden keine Downloads gefunden." - -#@ edd -#: includes/register-settings.php:47 -msgid "Checkout Page" -msgstr "'Kasse'-Seite" - -#@ edd -#: includes/register-settings.php:61 -msgid "Download Links on Success Page" -msgstr "Download-Links auf der Erfolgs-Seite" - -#@ edd -#: includes/register-settings.php:62 -msgid "Show a list of all download links on the success page after completing a purchase?" -msgstr "Eine Liste aller Download-Links auf der Erfolgs-Seite nach dem erfolgreichen Kauf anzeigen?" - -#@ edd -#: includes/register-settings.php:151 -msgid "If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases." -msgstr "Wenn Zahlungen nicht als abgeschlossen gekennzeichnet werden, dann aktivieren Sie dieses Kontrollkästchen. Dies zwingt die Webseite dazu, eine leicht weniger sichere Methode zur Kauf-Verifizierung anzuwenden." - -#@ edd -#: includes/register-settings.php:287 -msgid "Complete Purchase Text" -msgstr "Text für abgeschlossenen Kauf" - -#@ edd -#: includes/register-settings.php:288 -msgid "The button label for completing a purchase." -msgstr "Die Button-Beschriftung, um eine Bestellung abzuschließen." - -#@ edd -#: includes/scripts.php:42 -msgid "Please enter an email address before applying a discount code" -msgstr "Geben Sie bitte eine E-Mail-Adresse ein, bevor Sie einen Gutschein-Code hinzufügen." - -#@ edd -#: includes/admin-pages/forms/add-discount.php:75 -#: includes/admin-pages/forms/edit-discount.php:89 -msgid "Minimum Amount" -msgstr "Mindestbestellwert" - -#@ edd -#: includes/admin-pages/forms/add-discount.php:79 -#: includes/admin-pages/forms/edit-discount.php:93 -msgid "The minimum amount that must be purchased before this discount can be used. Leave blank for no minimum." -msgstr "Der Wert, welcher mindestens umgesetzt werden muss, bevor ein Gutschein zugewiesen werden kann. Frei lassen, um keinen Mindestbestellwert zu verwenden." - -#@ edd -#: includes/graphing.php:168 -msgid "Day" -msgstr "Tag" - -#@ default -#: includes/admin-notices.php:44 -#, php-format -msgid "The payment history needs updated. %s" -msgstr "Die bisherigen Zahlungen sollten aktualisiert werden. %s" - -#@ edd -#: includes/admin-notices.php:44 -msgid "Click to Upgrade" -msgstr "Klicken, um zu aktualisieren" - -#@ edd -#: includes/admin-pages/payments-history.php:249 -msgid "Date and Time:" -msgstr "Datum und Zeit:" - -#@ edd -#: includes/admin-pages/payments-history.php:304 -msgid "Total Earnings:" -msgstr "Gesamter Verdienst:" - -#@ edd -#: includes/admin-pages/reports.php:42 -msgid "Download a CSV Customers List" -msgstr "Eine Kundenliste als CSV-Datei herunterladen" - -#@ edd -#: includes/checkout-template.php:317 -msgid "Billing Country" -msgstr "Land für Rechnungsstellung" - -#@ edd -#: includes/export-functions.php:169 -msgid "Export not allowed for non-administrators." -msgstr "Export ist für nicht-Administratoren nicht erlaubt." - -#@ edd -#: includes/graphing.php:189 -#, php-format -msgid "Earnings per day for last %s days" -msgstr "Verdienst pro Tag für die letzten %s Tage" - -#@ edd -#: includes/metabox.php:98 -msgid "Enable variable pricing" -msgstr "Preis-Varianten aktivieren" - -#@ edd -#: includes/metabox.php:120 -#: includes/metabox.php:142 -msgid "Option Name" -msgstr "Optionsname" - -#@ edd -#: includes/metabox.php:159 -msgctxt "Variable price preposition. $2.99 for {X}" -msgid "for" -msgstr "für" - -#@ edd -#: includes/process-download.php:266 -#: includes/process-download.php:283 -msgid "Sorry but this file does not exist." -msgstr "Entschuldigung, aber diese Datei existiert nicht." - -#@ edd -#: includes/shortcodes.php:194 -msgid "Purchase All Items" -msgstr "Alle Elemente kaufen" - -#@ edd -#: includes/shortcodes.php:336 -#, php-format -msgctxt "download post type name" -msgid "No %s found" -msgstr "Kein %s gefunden" - -#@ edd -#: includes/template-functions.php:48 -#, php-format -msgid "No checkout page has been configured. Visit Settings to set one." -msgstr "Es wurde keine 'Kasse'-Seite eingerichtet. Gehen Sie zu den Einstellungen, um Eine einzurichten." - -#@ edd -#: includes/widgets.php:193 -msgid "Display a user's purchase history" -msgstr "Die Bestellhistorie eines Benutzers anzeigen" - -#@ edd -#: includes/widgets.php:259 -msgid "Title" -msgstr "Titel" - diff --git a/languages/edd-es_ES.mo b/languages/edd-es_ES.mo deleted file mode 100755 index f9aaaf67076..00000000000 Binary files a/languages/edd-es_ES.mo and /dev/null differ diff --git a/languages/edd-es_ES.po b/languages/edd-es_ES.po deleted file mode 100755 index 2b43bf6390d..00000000000 --- a/languages/edd-es_ES.po +++ /dev/null @@ -1,2026 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-11 09:21-0300\n" -"PO-Revision-Date: 2012-07-11 09:26-0300\n" -"Last-Translator: Matt Varone \n" -"Language-Team: Matt Varone \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_n;_x\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: Spanish\n" -"X-Poedit-Country: ARGENTINA\n" -"X-Poedit-SearchPath-0: ..\n" -"X-Poedit-SearchPath-1: ../includes\n" -"X-Poedit-SearchPath-2: ../includes/admin-pages\n" -"X-Poedit-SearchPath-3: ../includes/admin-pages/forms\n" -"X-Poedit-SearchPath-4: ../includes/gateways\n" -"X-Poedit-SearchPath-5: .\n" - -#: ../includes/admin-notices.php:24 -msgid "Discount code updated." -msgstr "Codigo de descuento actualizado." - -#: ../includes/admin-notices.php:27 -msgid "There was a problem updating your discount code, please try again." -msgstr "Ha ocurrido un problema al actualizar su codigo de descuento, por favor trate nuevamente" - -#: ../includes/admin-notices.php:30 -msgid "The payment has been deleted." -msgstr "El pago ha sido borrado." - -#: ../includes/admin-notices.php:33 -msgid "The purchase receipt has been resent." -msgstr "El recibo de compra ah sido reenviado." - -#: ../includes/admin-notices.php:49 -msgid "There seems to be an issue with the server. Please try again in a few minutes." -msgstr "Error en el sistema. Por favor trate nuevamente en unos minutos." - -#: ../includes/admin-pages.php:26 -msgid "Payment History" -msgstr "Historal de Pagos" - -#: ../includes/admin-pages.php:27 -msgid "Discount Codes" -msgstr "Códigos de Descuento" - -#: ../includes/admin-pages.php:28 -msgid "Earnings and Sales Reports" -msgstr "Reportes de Ganancias y Ventas" - -#: ../includes/admin-pages.php:28 -msgid "Reports" -msgstr "Reportes" - -#: ../includes/admin-pages.php:29 -msgid "Easy Digital Download Settings" -msgstr "Ajustes de Easy Digital Download" - -#: ../includes/admin-pages.php:29 -msgid "Settings" -msgstr "Ajustes" - -#: ../includes/admin-pages.php:30 -msgid "Easy Digital Download Add Ons" -msgstr "Extensiones de Easy Digital Download" - -#: ../includes/admin-pages.php:30 -msgid "Add Ons" -msgstr "Agregados" - -#: ../includes/ajax-functions.php:108 -msgid "The discount you entered is invalid" -msgstr "El descuento ingresado no es valido" - -#: ../includes/cart-functions.php:390 -#, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "Ah agregado %s con exito al su carro de compras." - -#: ../includes/cart-functions.php:391 -msgid "Checkout." -msgstr "Caja." - -#: ../includes/cart-template.php:50 -#: ../includes/cart-template.php:53 -msgid "Checkout" -msgstr "Caja" - -#: ../includes/cart-template.php:83 -msgid "remove" -msgstr "remover" - -#: ../includes/cart-template.php:100 -msgid "Your cart is empty." -msgstr "Su carrito esta vacío." - -#: ../includes/checkout-template.php:75 -msgid "Choose Your Payment Method" -msgstr "Elija Su Metodo de Pago" - -#: ../includes/checkout-template.php:86 -msgid "Next" -msgstr "Siguiente" - -#: ../includes/checkout-template.php:134 -msgid "Email address" -msgstr "Direccion de email" - -#: ../includes/checkout-template.php:135 -msgid "Email Address" -msgstr "Dirección de Email" - -#: ../includes/checkout-template.php:139 -#: ../includes/checkout-template.php:140 -#: ../includes/checkout-template.php:355 -#: ../includes/checkout-template.php:356 -msgid "First Name" -msgstr "Nombre" - -#: ../includes/checkout-template.php:143 -#: ../includes/checkout-template.php:359 -msgid "Last name" -msgstr "Apellido" - -#: ../includes/checkout-template.php:144 -#: ../includes/checkout-template.php:360 -msgid "Last Name" -msgstr "Apellido" - -#: ../includes/checkout-template.php:152 -msgid "Enter discount" -msgstr "Ingrese el descuento" - -#: ../includes/checkout-template.php:154 -msgid "Discount" -msgstr "Descuento" - -#: ../includes/checkout-template.php:156 -msgid "Apply Discount" -msgstr "Aplicar el Descuento" - -#: ../includes/checkout-template.php:182 -msgid "Show Terms" -msgstr "Mostrar Terminos" - -#: ../includes/checkout-template.php:183 -msgid "Hide Terms" -msgstr "Esconder Términos" - -#: ../includes/checkout-template.php:186 -msgid "Agree to Terms?" -msgstr "Acepta los Términos?" - -#: ../includes/checkout-template.php:203 -#: ../includes/dashboard-columns.php:73 -msgid "Purchase" -msgstr "Comprar" - -#: ../includes/checkout-template.php:210 -msgid "Go back" -msgstr "Volver" - -#: ../includes/checkout-template.php:214 -msgid "You must be logged in to complete your purchase" -msgstr "Para completar su compra debe estar registrado" - -#: ../includes/checkout-template.php:243 -msgid "Card name" -msgstr "Nombre en la tarjeta" - -#: ../includes/checkout-template.php:244 -msgid "Name on the Card" -msgstr "Titular de la Tarjeta" - -#: ../includes/checkout-template.php:247 -msgid "Card number" -msgstr "Numero de tarjeta" - -#: ../includes/checkout-template.php:248 -msgid "Card Number" -msgstr "Numero de Tarjeta" - -#: ../includes/checkout-template.php:251 -msgid "Security code" -msgstr "Codigo de Seguridad" - -#: ../includes/checkout-template.php:252 -msgid "CVC" -msgstr "CVC" - -#: ../includes/checkout-template.php:256 -msgid "Month" -msgstr "Mes" - -#: ../includes/checkout-template.php:258 -msgid "Year" -msgstr "Año" - -#: ../includes/checkout-template.php:259 -msgid "Expiration (MM/YYYY)" -msgstr "Expiración (MM/AAAA)" - -#: ../includes/checkout-template.php:287 -msgid "Credit Card Info" -msgstr "Informacion de la Tarjeta" - -#: ../includes/checkout-template.php:289 -msgid "Address line 1" -msgstr "Dirección linea 1 " - -#: ../includes/checkout-template.php:290 -msgid "Billing Address" -msgstr "Dirección que recibe la Factura" - -#: ../includes/checkout-template.php:293 -msgid "Address line 2" -msgstr "Dirección linea 2" - -#: ../includes/checkout-template.php:294 -msgid "Billing Address Line 2" -msgstr "Dirección que recibe la Factura linea 2" - -#: ../includes/checkout-template.php:297 -msgid "City" -msgstr "Ciudad" - -#: ../includes/checkout-template.php:298 -msgid "Billing City" -msgstr "Ciudad Facturacion" - -#: ../includes/checkout-template.php:301 -msgid "State / Province" -msgstr "Estado / Provincia" - -#: ../includes/checkout-template.php:302 -msgid "Billing State / Province" -msgstr "Facturacion Estado / Provincia" - -#: ../includes/checkout-template.php:305 -msgid "Zip / Postal code" -msgstr "Zip / Codigo Postal" - -#: ../includes/checkout-template.php:306 -msgid "Billing Zip / Postal Code" -msgstr "Facturación Zip / Codigo Postal" - -#: ../includes/checkout-template.php:332 -msgid "Already have an account?" -msgstr "Ya tiene una cuenta?" - -#: ../includes/checkout-template.php:332 -msgid "Login" -msgstr "Ingresar" - -#: ../includes/checkout-template.php:334 -msgid "Create an account" -msgstr "Crear una cuenta" - -#: ../includes/checkout-template.php:334 -msgid "(optional)" -msgstr "(opcional)" - -#: ../includes/checkout-template.php:337 -#: ../includes/checkout-template.php:338 -#: ../includes/checkout-template.php:385 -msgid "Username" -msgstr "Nombre de Usuario" - -#: ../includes/checkout-template.php:341 -#: ../includes/checkout-template.php:342 -#: ../includes/checkout-template.php:389 -msgid "Password" -msgstr "Contraseña" - -#: ../includes/checkout-template.php:345 -msgid "Confirm password" -msgstr "Confirmar Contraseña" - -#: ../includes/checkout-template.php:346 -msgid "Password Again" -msgstr "Reingresar Contraseña" - -#: ../includes/checkout-template.php:351 -#: ../includes/checkout-template.php:352 -msgid "Email" -msgstr "Email" - -#: ../includes/checkout-template.php:381 -msgid "Login to your account" -msgstr "Ingresa a tu cuenta" - -#: ../includes/checkout-template.php:384 -msgid "Your username" -msgstr "Su Usuario" - -#: ../includes/checkout-template.php:388 -msgid "Your password" -msgstr "Su Password" - -#: ../includes/checkout-template.php:396 -msgid "Need to create an account?" -msgstr "No tiene cuenta?" - -#: ../includes/checkout-template.php:398 -msgid "Register" -msgstr "Registro" - -#: ../includes/checkout-template.php:398 -msgid "or checkout as a guest." -msgstr "o complete el pago como visitante." - -#: ../includes/dashboard-columns.php:26 -msgid "Name" -msgstr "Nombre" - -#: ../includes/dashboard-columns.php:27 -msgid "Categories" -msgstr "Categorias" - -#: ../includes/dashboard-columns.php:28 -msgid "Tags" -msgstr "Etiquetas" - -#: ../includes/dashboard-columns.php:29 -msgid "Price" -msgstr "Precio" - -#: ../includes/dashboard-columns.php:30 -msgid "Sales" -msgstr "Ventas" - -#: ../includes/dashboard-columns.php:31 -msgid "Earnings" -msgstr "Ganancias" - -#: ../includes/dashboard-columns.php:32 -msgid "Short Code" -msgstr "Short Code" - -#: ../includes/dashboard-columns.php:33 -msgid "Date" -msgstr "Fecha" - -#: ../includes/dashboard-columns.php:181 -msgid "Show all categories" -msgstr "Mostrar todas las categorias" - -#: ../includes/dashboard-columns.php:192 -msgid "Show all tags" -msgstr "Mostrar todas las etiquetas" - -#: ../includes/email-functions.php:47 -msgid "Hello" -msgstr "Hola" - -#: ../includes/email-functions.php:47 -msgid "A download purchase has been made" -msgstr "Se ha realizado la compra de una descarga" - -#: ../includes/email-functions.php:48 -msgid "Downloads sold:" -msgstr "Descargas vendidas:" - -#: ../includes/email-functions.php:59 -msgid "Amount: " -msgstr "Monto:" - -#: ../includes/email-functions.php:60 -msgid "Payment Method: " -msgstr "Metodo de pago:" - -#: ../includes/email-functions.php:61 -msgid "Thank you" -msgstr "Gracias" - -#: ../includes/email-functions.php:63 -msgid "New download purchase" -msgstr "Nueva compra de descarga" - -#: ../includes/email-template.php:82 -msgid "Sample Product Title" -msgstr "Ejemplo de titulo de producto" - -#: ../includes/email-template.php:85 -msgid "Sample Download File Name" -msgstr "Nombre Ejemplo de Descarga" - -#: ../includes/email-template.php:133 -msgid "Purchase Receipt Preview" -msgstr "Previsualizar Recibo de Compra" - -#: ../includes/email-template.php:133 -msgid "Preview Purchase Receipt" -msgstr "Previzualizar el Recibo de Compra" - -#: ../includes/email-template.php:138 -msgid "Close" -msgstr "Cerrar" - -#: ../includes/email-template.php:175 -msgid "Dear" -msgstr "Estimado" - -#: ../includes/email-template.php:176 -msgid "Thank you for your purchase. Please click on the link(s) below to download your files." -msgstr "Gracias por su compra. Por favor haga click en/los enlace/s a continuacion para descargar sus archivos." - -#: ../includes/email-template.php:295 -msgid "Default Template" -msgstr "Plantilla por default" - -#: ../includes/email-template.php:296 -msgid "No template, plain text only" -msgstr "Sin plantilla, formato texto simple" - -#: ../includes/error-tracking.php:30 -msgid "Error" -msgstr "Error" - -#: ../includes/export-functions.php:31 -msgid "ID" -msgstr "ID" - -#: ../includes/export-functions.php:34 -msgid "Products" -msgstr "Productos" - -#: ../includes/export-functions.php:35 -msgid "Discounts," -msgstr "Descuentos," - -#: ../includes/export-functions.php:36 -msgid "Amount paid" -msgstr "Monto pagado:" - -#: ../includes/export-functions.php:37 -msgid "Payment method" -msgstr "Metodo de pago" - -#: ../includes/export-functions.php:38 -msgid "Key" -msgstr "Valor" - -#: ../includes/export-functions.php:40 -msgid "User" -msgstr "Usuario" - -#: ../includes/export-functions.php:41 -msgid "Status" -msgstr "Estado" - -#: ../includes/export-functions.php:101 -#: ../includes/export-functions.php:109 -msgid "none" -msgstr "ninguno" - -#: ../includes/export-functions.php:117 -msgid "guest" -msgstr "invitado" - -#: ../includes/export-functions.php:125 -msgid "No payments recorded yet" -msgstr "No se han registrado pagos al momento" - -#: ../includes/gateway-functions.php:28 -msgid "Test Payment" -msgstr "Probar Pago" - -#: ../includes/graphing.php:42 -#, php-format -msgid "%s Performance in Sales" -msgstr "Performance de %s en Ventas" - -#: ../includes/graphing.php:77 -#: ../includes/post-types.php:124 -msgid "Download" -msgstr "Descargar" - -#: ../includes/graphing.php:88 -#, php-format -msgid "%s Performance in Earnings" -msgstr "Performance de %s en Ganancias" - -#: ../includes/graphing.php:136 -msgid "Earnings per month" -msgstr "Ganancias por mes" - -#: ../includes/install.php:42 -msgid "Purchase Confirmation" -msgstr "Comfirmacion de Compra" - -#: ../includes/install.php:43 -msgid "Thank you for your purchase!" -msgstr "Gracias por su compra!" - -#: ../includes/install.php:53 -msgid "Purchase History" -msgstr "Historial de Compras" - -#: ../includes/login-register.php:45 -msgid "Log into Your Account" -msgstr "Ingresa A Tu Cuenta" - -#: ../includes/login-register.php:61 -msgid "Lost Password" -msgstr "Recordar Contraseña" - -#: ../includes/login-register.php:62 -msgid "Lost Password?" -msgstr "Recuperar Contraseña?" - -#: ../includes/login-register.php:69 -msgid "You are already logged in" -msgstr "Ya esta ingresado en el sistema" - -#: ../includes/login-register.php:92 -msgid "The password you entered is incorrect" -msgstr "La contraseña que ingreso no es valida" - -#: ../includes/login-register.php:95 -msgid "The username you entered does not exist" -msgstr "El nombre de usuario no existe" - -#: ../includes/metabox.php:22 -#, php-format -msgid "%1$s Configuration" -msgstr "Configurar %1$s" - -#: ../includes/metabox.php:23 -#, php-format -msgid "%1$s Stats" -msgstr "%1$s Estado" - -#: ../includes/metabox.php:24 -msgid "Purchase Log" -msgstr "Registro de Compra" - -#: ../includes/metabox.php:25 -msgid "File Download Log" -msgstr "Registro de Descargas de Archivo" - -#: ../includes/metabox.php:26 -msgid "Payment Info" -msgstr "Informacion del Pago" - -#: ../includes/metabox.php:69 -msgid "Pricing" -msgstr "Precio" - -#: ../includes/metabox.php:73 -msgid "Check this to enable variable pricing." -msgstr "Seleccione para activar precio variable." - -#: ../includes/metabox.php:96 -msgid "price option name" -msgstr "nombre de la opcion de precio" - -#: ../includes/metabox.php:97 -#: ../includes/metabox.php:107 -msgid "9.99" -msgstr "9,99" - -#: ../includes/metabox.php:106 -msgid "price name" -msgstr "nombre del precio" - -#: ../includes/metabox.php:110 -msgid "Add New Price Option" -msgstr "Agregar Nueva Opcion de Precio" - -#: ../includes/metabox.php:126 -msgid "Enter the download price. Do not include a currency symbol" -msgstr "Ingrese el precio de descarga. No incluye el simbolo de la moneda." - -#: ../includes/metabox.php:153 -msgid "Download Files" -msgstr "Descargar Archivos" - -#: ../includes/metabox.php:156 -msgid "File Name" -msgstr "Nombre del Archivo" - -#: ../includes/metabox.php:157 -msgid "File URL" -msgstr "URL Archivo:" - -#: ../includes/metabox.php:168 -#: ../includes/metabox.php:187 -msgid "file name" -msgstr "nombre del archivo" - -#: ../includes/metabox.php:169 -#: ../includes/metabox.php:188 -msgid "file url" -msgstr "url del archivo" - -#: ../includes/metabox.php:171 -msgid "All Prices" -msgstr "Todos los Precios" - -#: ../includes/metabox.php:178 -#: ../includes/metabox.php:189 -msgid "Upload File" -msgstr "Subir Archivo" - -#: ../includes/metabox.php:192 -#: ../includes/post-types.php:43 -#: ../includes/post-types.php:81 -msgid "Add New" -msgstr "Agregar Nuevo" - -#: ../includes/metabox.php:192 -msgid "Upload the downloadable files." -msgstr "Subir las descargas." - -#: ../includes/metabox.php:213 -msgid "Purchase Text" -msgstr "Texto de Compra" - -#: ../includes/metabox.php:215 -msgid "Add the text you would like displayed for the purchase text" -msgstr "Ingrese el texto a mostrar para la compra" - -#: ../includes/metabox.php:234 -msgid "Link Style" -msgstr "Estilo del Enlace" - -#: ../includes/metabox.php:236 -msgid "Button" -msgstr "Boton" - -#: ../includes/metabox.php:237 -msgid "Text" -msgstr "Texto" - -#: ../includes/metabox.php:238 -msgid "Choose the style of the purchase link" -msgstr "Elija el estilo del enlace de compra" - -#: ../includes/metabox.php:259 -msgid "Button Color" -msgstr "Color del Boton" - -#: ../includes/metabox.php:267 -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "Elija el color del enlace de compra, si se selecciono la opcion de boton." - -#: ../includes/metabox.php:285 -msgid "Disable the purchase button?" -msgstr "Mostrar el boton de compra?" - -#: ../includes/metabox.php:288 -msgid "Check this if you do not want the purchase button displayed." -msgstr "Seleccionar si no quiere que se muestre el boton de descarga." - -#: ../includes/metabox.php:306 -msgid "Notes" -msgstr "Notas" - -#: ../includes/metabox.php:309 -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "Las opciones de estilo NO reflejan el estilo del shortcode. El shortcode le permite ubicar un boton de compra para esta descarga en cualquier lugar de su sitio." - -#: ../includes/metabox.php:315 -msgid "This short code can be placed anywhere on your site" -msgstr "Puede utilizar este shortcode en cualquier lugar de su sitio." - -#: ../includes/metabox.php:402 -msgid "Sales:" -msgstr "Ventas:" - -#: ../includes/metabox.php:408 -msgid "Earnings:" -msgstr "Ganancias:" - -#: ../includes/metabox.php:444 -msgid "Sales Log" -msgstr "Log de Ventas" - -#: ../includes/metabox.php:446 -msgid "Each sale for this download is listed below." -msgstr "Cada venta para esta descarga esta listada abajo." - -#: ../includes/metabox.php:460 -#: ../includes/metabox.php:552 -msgid "Date:" -msgstr "Fecha:" - -#: ../includes/metabox.php:464 -msgid "Buyer:" -msgstr "Comprador:" - -#: ../includes/metabox.php:468 -msgid "Purchase ID:" -msgstr "ID Compra:" - -#: ../includes/metabox.php:476 -msgid "No sales yet" -msgstr "No se ha realizado ninguna venta" - -#: ../includes/metabox.php:492 -#: ../includes/metabox.php:589 -msgid "Previous" -msgstr "Anterior" - -#: ../includes/metabox.php:533 -msgid "Download Log" -msgstr "Registro de Descargas" - -#: ../includes/metabox.php:535 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "Cada vez que un archivo es descargado se registra a continuacion." - -#: ../includes/metabox.php:556 -msgid "Downloaded by:" -msgstr "Descargado por:" - -#: ../includes/metabox.php:560 -msgid "IP Address:" -msgstr "Dirección IP:" - -#: ../includes/metabox.php:564 -msgid "File: " -msgstr "Archivo:" - -#: ../includes/metabox.php:573 -msgid "No file downloads yet yet" -msgstr "No hay archivos para descargar" - -#: ../includes/misc-functions.php:185 -msgid "US Dollars ($)" -msgstr "Dólares USA ($)" - -#: ../includes/misc-functions.php:186 -msgid "Euros (€)" -msgstr "Euros (€)" - -#: ../includes/misc-functions.php:187 -msgid "Pounds Sterling (£)" -msgstr "Libras Esterlinas (£)" - -#: ../includes/misc-functions.php:188 -msgid "Australian Dollars ($)" -msgstr "Dolar Australiano ($)" - -#: ../includes/misc-functions.php:189 -msgid "Brazilian Real ($)" -msgstr "Real Brazilero ($)" - -#: ../includes/misc-functions.php:190 -msgid "Canadian Dollars ($)" -msgstr "Dolar Canadiense ($)" - -#: ../includes/misc-functions.php:191 -msgid "Czech Koruna" -msgstr "Koruna Checa" - -#: ../includes/misc-functions.php:192 -msgid "Danish Krone" -msgstr "Krone Danes " - -#: ../includes/misc-functions.php:193 -msgid "Hong Kong Dollar ($)" -msgstr "Dolar Hong Kong ($)" - -#: ../includes/misc-functions.php:194 -msgid "Hungarian Forint" -msgstr "Forint Hungaro" - -#: ../includes/misc-functions.php:195 -msgid "Israeli Shekel" -msgstr "Shekel Israeli" - -#: ../includes/misc-functions.php:196 -msgid "Japanese Yen (¥)" -msgstr "Yen Japones (¥)" - -#: ../includes/misc-functions.php:197 -msgid "Malaysian Ringgits" -msgstr "Ringgits Malasia" - -#: ../includes/misc-functions.php:198 -msgid "Mexican Peso ($)" -msgstr "Peso Mejicano ($)" - -#: ../includes/misc-functions.php:199 -msgid "New Zealand Dollar ($)" -msgstr "Dolar Neozelandés ($)" - -#: ../includes/misc-functions.php:200 -msgid "Norwegian Krone" -msgstr "Krone Noruego" - -#: ../includes/misc-functions.php:201 -msgid "Philippine Pesos" -msgstr "Pesos Filipinos" - -#: ../includes/misc-functions.php:202 -msgid "Polish Zloty" -msgstr "Zloty Polacos" - -#: ../includes/misc-functions.php:203 -msgid "Singapore Dollar ($)" -msgstr "Dolar Singapur ($)" - -#: ../includes/misc-functions.php:204 -msgid "Swedish Krona" -msgstr "Krona Sueco" - -#: ../includes/misc-functions.php:205 -msgid "Swiss Franc" -msgstr "Franco Suizo" - -#: ../includes/misc-functions.php:206 -msgid "Taiwan New Dollars" -msgstr "Nuevos Dolares Taiwain" - -#: ../includes/misc-functions.php:207 -msgid "Thai Baht" -msgstr "Bath Thailandes" - -#: ../includes/misc-functions.php:208 -msgid "Indian Rupee" -msgstr "Rupia India" - -#: ../includes/misc-functions.php:209 -msgid "Turkish Lira" -msgstr "Lira Turca" - -#: ../includes/payment-functions.php:259 -msgid "Pending" -msgstr "Pendiente" - -#: ../includes/payment-functions.php:260 -msgid "Complete" -msgstr "Completo" - -#: ../includes/payment-functions.php:261 -msgid "Refunded" -msgstr "Reintegrado" - -#: ../includes/post-types.php:44 -#, php-format -msgid "Add New %1$s" -msgstr "Agregar Nuevo %1$s" - -#: ../includes/post-types.php:45 -#, php-format -msgid "Edit %1$s" -msgstr "Editar %1$s" - -#: ../includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "Nuevo %1$s" - -#: ../includes/post-types.php:47 -#, php-format -msgid "All %2$s" -msgstr "Todas las %2$s" - -#: ../includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "Ver %1$s" - -#: ../includes/post-types.php:49 -#, php-format -msgid "Search %2$s" -msgstr "Buscar %2$s" - -#: ../includes/post-types.php:50 -#, php-format -msgid "No %2$s found" -msgstr "No se encontraron %2$s" - -#: ../includes/post-types.php:51 -#, php-format -msgid "No %2$s found in Trash" -msgstr "No se encontraron %2$s en la papelera" - -#: ../includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "%2$s" - -#: ../includes/post-types.php:79 -msgid "Payments" -msgstr "Pagos" - -#: ../includes/post-types.php:80 -msgid "Payment" -msgstr "Pago" - -#: ../includes/post-types.php:82 -msgid "Add New Payment" -msgstr "Agregar Pago" - -#: ../includes/post-types.php:83 -msgid "Edit Payment" -msgstr "Editar Pago" - -#: ../includes/post-types.php:84 -msgid "New Payment" -msgstr "Nuevo Pago" - -#: ../includes/post-types.php:85 -msgid "All Payments" -msgstr "Todos los Pagos" - -#: ../includes/post-types.php:86 -msgid "View Payment" -msgstr "Ver Pago" - -#: ../includes/post-types.php:87 -msgid "Search Payments" -msgstr "Buscar Pagos" - -#: ../includes/post-types.php:88 -msgid "No Payments found" -msgstr "No se encontraron pagos" - -#: ../includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "No se encontraron pagos en la papelera" - -#: ../includes/post-types.php:125 -msgid "Downloads" -msgstr "Descargas" - -#: ../includes/post-types.php:173 -msgid "Category" -msgstr "Categoria" - -#: ../includes/post-types.php:174 -msgid "Search Categories" -msgstr "Buscar Categorias" - -#: ../includes/post-types.php:175 -msgid "All Categories" -msgstr "Todas las Categorias" - -#: ../includes/post-types.php:176 -msgid "Parent Category" -msgstr "CAtegoria Superior" - -#: ../includes/post-types.php:177 -msgid "Parent Category:" -msgstr "Categoria Superior:" - -#: ../includes/post-types.php:178 -msgid "Edit Category" -msgstr "Editar Categoria" - -#: ../includes/post-types.php:179 -msgid "Update Category" -msgstr "Actualizar Categoría" - -#: ../includes/post-types.php:180 -msgid "Add New Category" -msgstr "Agregar Nueva Categoría" - -#: ../includes/post-types.php:181 -msgid "New Category Name" -msgstr "Nombre de la Nueva Categoría" - -#: ../includes/post-types.php:195 -msgid "Tag" -msgstr "Etiqueta" - -#: ../includes/post-types.php:196 -msgid "Search Tags" -msgstr "Buscar Etiquetas" - -#: ../includes/post-types.php:197 -msgid "All Tags" -msgstr "Todas las Etiquetas" - -#: ../includes/post-types.php:198 -msgid "Parent Tag" -msgstr "Etiqueta Superior" - -#: ../includes/post-types.php:199 -msgid "Parent Tag:" -msgstr "Etiqueta Superior:" - -#: ../includes/post-types.php:200 -msgid "Edit Tag" -msgstr "Editar Etiqeta" - -#: ../includes/post-types.php:201 -msgid "Update Tag" -msgstr "Actualizar Etiqueta" - -#: ../includes/post-types.php:202 -msgid "Add New Tag" -msgstr "Agregar Nueva Etiqueta" - -#: ../includes/post-types.php:203 -msgid "New Tag Name" -msgstr "Nombre Nueva Etiqueta" - -#: ../includes/post-types.php:232 -#: ../includes/post-types.php:233 -msgid "Download updated." -msgstr "Descarga actualizada." - -#: ../includes/post-types.php:234 -msgid "Download published." -msgstr "Descarga publicada." - -#: ../includes/post-types.php:235 -msgid "Download saved." -msgstr "Descarga Guardada." - -#: ../includes/post-types.php:236 -msgid "Download submitted." -msgstr "Descarga Enviada." - -#: ../includes/process-download.php:96 -msgid "You do not have permission to download this file" -msgstr "No tiene los permisos suficientes para descargar este archivo" - -#: ../includes/process-download.php:96 -msgid "Purchase Verification Failed" -msgstr "Fallo la Verificacion de la Compra" - -#: ../includes/process-purchase.php:193 -msgid "The selected gateway is not active" -msgstr "la pasarela de pagos seleccionada no esta activa" - -#: ../includes/process-purchase.php:197 -msgid "No gateway has been selected" -msgstr "No se ha seleccionado pasarela de pagos" - -#: ../includes/process-purchase.php:245 -msgid "You must agree to the terms of use" -msgstr "Debe aceptar los terminos de uso" - -#: ../includes/process-purchase.php:275 -msgid "Please enter a valid email address." -msgstr "Por favor ingrese una casilla de email valida." - -#: ../includes/process-purchase.php:289 -msgid "The user information is invalid." -msgstr "La información del usuario no es valida." - -#: ../includes/process-purchase.php:335 -msgid "Username already taken" -msgstr "El nombre de usuario ya esta tomado" - -#: ../includes/process-purchase.php:341 -msgid "Invalid username" -msgstr "Nombre de usuario invalido" - -#: ../includes/process-purchase.php:352 -msgid "You must register or login to complete your purchase" -msgstr "Para completar su compra debe ingresar o registrarce" - -#: ../includes/process-purchase.php:364 -#: ../includes/process-purchase.php:508 -msgid "Invalid email" -msgstr "email invalido" - -#: ../includes/process-purchase.php:370 -msgid "Email already used" -msgstr "La casilla de email ya se encuentra en uso" - -#: ../includes/process-purchase.php:382 -#: ../includes/process-purchase.php:515 -msgid "Enter an email" -msgstr "Ingrese un email" - -#: ../includes/process-purchase.php:393 -msgid "Passwords don't match" -msgstr "Las contraseñas no concuerdan" - -#: ../includes/process-purchase.php:408 -#: ../includes/process-purchase.php:473 -msgid "Enter a password" -msgstr "Ingrese una contraseña" - -#: ../includes/process-purchase.php:413 -msgid "Enter the password confirmation" -msgstr "Ingrese la confirmación de la contraseña" - -#: ../includes/process-purchase.php:440 -msgid "You must login or register to complete your purchase" -msgstr "Para completar su compra debe ingresar o registrarce" - -#: ../includes/register-settings.php:41 -msgid "Test Mode" -msgstr "Modo de prueba" - -#: ../includes/register-settings.php:42 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "El modo de prueba no procesa las transacciones. Para utilizar el modo de prueba debe tener una cuenta sandbox para la ouerta de pago que este probando." - -#: ../includes/register-settings.php:47 -msgid "Purchase Page" -msgstr "Pagina de Compra" - -#: ../includes/register-settings.php:48 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "Esta es la pagina donde los compradores completaran su compra" - -#: ../includes/register-settings.php:54 -msgid "Success Page" -msgstr "Compra de Exito" - -#: ../includes/register-settings.php:55 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "Esta es la pagina donde se envia a los compradores luego de completar una compra" - -#: ../includes/register-settings.php:61 -msgid "Currency Settings" -msgstr "Ajustes de Moneda" - -#: ../includes/register-settings.php:62 -msgid "Configure the currency options" -msgstr "Configure los ajustes de moneda" - -#: ../includes/register-settings.php:67 -msgid "Currency" -msgstr "Moneda" - -#: ../includes/register-settings.php:68 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "Elija su moneda. Tenga en cuenta que algunos gateways tienen restricciones de moneda." - -#: ../includes/register-settings.php:74 -msgid "Currency Position" -msgstr "Posicion de la Moneda" - -#: ../includes/register-settings.php:75 -msgid "Choose the location of the currency sign." -msgstr "Elija la locacion del simbolo de la moneda." - -#: ../includes/register-settings.php:78 -msgid "Before - $10" -msgstr "Antes - $10" - -#: ../includes/register-settings.php:79 -msgid "After - 10$" -msgstr "Despues - 10$" - -#: ../includes/register-settings.php:84 -msgid "Thousands Separator" -msgstr "Separador de Miles" - -#: ../includes/register-settings.php:85 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "El simbolo ( generalmente , o . ) para separa los miles" - -#: ../includes/register-settings.php:92 -msgid "Decimal Separator" -msgstr "Separador de Decimales" - -#: ../includes/register-settings.php:93 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "El simbolo ( generalmente , o . ) para separa los decimales" - -#: ../includes/register-settings.php:104 -#: ../includes/admin-pages/settings.php:34 -msgid "Payment Gateways" -msgstr "Gateways de Pago" - -#: ../includes/register-settings.php:105 -msgid "Choose the payment gateways you want to enable." -msgstr "Elija la pasarela de pago que quiere activar." - -#: ../includes/register-settings.php:111 -msgid "Accepted Payment Method Icons" -msgstr "Iconos de los Metodos de Pago aceptados" - -#: ../includes/register-settings.php:112 -msgid "Display icons for the selected payment methods" -msgstr "Mostrar iconos para los medios de pago seleccionados" - -#: ../includes/register-settings.php:112 -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "Tambien deberá configurar los ajustes de la pasarela de pagos si elige aceptar tarjeta de credito" - -#: ../includes/register-settings.php:125 -msgid "PayPal Settings" -msgstr "Ajustes de PayPal" - -#: ../includes/register-settings.php:126 -msgid "Configure the PayPal settings" -msgstr "Configure los ajustes de PayPal" - -#: ../includes/register-settings.php:131 -msgid "PayPal Email" -msgstr "PayPal Email" - -#: ../includes/register-settings.php:132 -msgid "Enter your PayPal account's email" -msgstr "Ingrese el email de su cuenta de PayPal" - -#: ../includes/register-settings.php:138 -msgid "Alternate PayPal Purchase Verification" -msgstr "Alternar la Verificacion de Compra de PayPal" - -#: ../includes/register-settings.php:139 -msgid "If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal." -msgstr "Si los pagos no estan siendo marcados como completos marque esta opcion. Nota: requiere que los compradores regresen de PayPal a su sitio." - -#: ../includes/register-settings.php:144 -msgid "Disable PayPal IPN Verification" -msgstr "Desactivar la Verificacion de Compra de PayPal" - -#: ../includes/register-settings.php:145 -msgid "If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifiyin purchases." -msgstr "Si los pagos no estan siendo marcados como completos marque esta opcion. Esto fuerza al sitio a utilizar un metodo de verificacion de compra menos seguro." - -#: ../includes/register-settings.php:154 -msgid "Email Template" -msgstr "Plantilla del Email" - -#: ../includes/register-settings.php:155 -msgid "Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" to see the new template." -msgstr "Elija una plantilla. Grabe los cambios y seleccione Previsualizar El Recibo de Compra para ver la nueva plantilla." - -#: ../includes/register-settings.php:167 -msgid "From Name" -msgstr "Nombre De" - -#: ../includes/register-settings.php:168 -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "El nombre de donde vendran los recibos. Probablemente el nombre de su sitio o tienda." - -#: ../includes/register-settings.php:173 -msgid "From Email" -msgstr "Email Envio" - -#: ../includes/register-settings.php:174 -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "Email que envia los recibos. Actua como direccion de \"from\" y \"reply-to\" ." - -#: ../includes/register-settings.php:179 -msgid "Purchase Email Subject" -msgstr "Titulo del Recibo de Compra" - -#: ../includes/register-settings.php:180 -msgid "Enter the subject line for the purchase receipt email" -msgstr "Ingrese el titulo para el recibo de compra enviado por email" - -#: ../includes/register-settings.php:185 -msgid "Purchase Receipt" -msgstr "Recibo de Compra" - -#: ../includes/register-settings.php:186 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "Ingrese el mail que es enviado a los usuarios despues de completar una compra exitosamente. Acepta HTML. Etiquetas de plantilla disponibles:" - -#: ../includes/register-settings.php:187 -msgid "A list of download URLs for each download purchased" -msgstr "Una lista de las URLs de descargar para cada producto comprado" - -#: ../includes/register-settings.php:188 -msgid "The buyer's name" -msgstr "El nombre del comprador" - -#: ../includes/register-settings.php:189 -msgid "The date of the purchase" -msgstr "La fecha de la compra" - -#: ../includes/register-settings.php:190 -msgid "The total price of the purchase" -msgstr "El precio total de la compra" - -#: ../includes/register-settings.php:191 -msgid "The unique ID number for this purchase receipt" -msgstr "El ID numerico unico para este recibo de compra" - -#: ../includes/register-settings.php:192 -msgid "The method of payment used for this purchase" -msgstr "El metodo de pago usado para esta compra" - -#: ../includes/register-settings.php:193 -msgid "Your site name" -msgstr "El nombre de su sitio" - -#: ../includes/register-settings.php:202 -msgid "Disable Styles" -msgstr "Desactivar Estilos" - -#: ../includes/register-settings.php:203 -msgid "Check this to disable all included styling" -msgstr "Seleccione para desactivar todos los estilos incluidos" - -#: ../includes/register-settings.php:208 -msgid "Checkout Button Color" -msgstr "Color del Boton de la Caja" - -#: ../includes/register-settings.php:209 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "Seleccione el color de boton deseado para la for botones de caja" - -#: ../includes/register-settings.php:219 -msgid "Disable Ajax" -msgstr "Desactivar AJAX" - -#: ../includes/register-settings.php:220 -msgid "Check this to disable AJAX for the shopping cart." -msgstr "Seleccione para desactivar AJAX para el carro de compras." - -#: ../includes/register-settings.php:225 -msgid "Enable jQuery Validation" -msgstr "Activar Validacion con jQuery" - -#: ../includes/register-settings.php:226 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "Seleccione para activar validacion de jQuery en el formulario de caja." - -#: ../includes/register-settings.php:231 -msgid "Disable Guest Checkout" -msgstr "Descativar la compra para invidatos" - -#: ../includes/register-settings.php:232 -msgid "Require that users be logged-in to purchase files." -msgstr "Requerir que los usuarios hallan ingresado a su cuenta para realizar una comra." - -#: ../includes/register-settings.php:237 -msgid "Show Register / Login Form?" -msgstr "Mostrar formulario de Registro / Ingreso " - -#: ../includes/register-settings.php:238 -msgid "Display the registration and login forms on the checkout page for non-logged-in users." -msgstr "Mostrar los formularios de registro e ingreso en la pagina de Caja para los usuarios que no hallan ingresado al sistema." - -#: ../includes/register-settings.php:243 -msgid "Download Link Expiration" -msgstr "Expiracion del enlace de Descarga" - -#: ../includes/register-settings.php:244 -msgid "How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours." -msgstr "Cuan largo deben permanecer validos los enlaces de descarga? Por defecto son validos por 24hs. Ingrese el tiempo en horas." - -#: ../includes/register-settings.php:250 -msgid "Disable Redownload?" -msgstr "Desactivar Volver a Descargar" - -#: ../includes/register-settings.php:251 -msgid "Check this if you do not want to allow users to redownload items from their purchase history." -msgstr "Seleccione si no quiere permitir a los usuarios descargar nuevamente los items desde el historial de compras/" - -#: ../includes/register-settings.php:256 -msgid "Terms of Agreement" -msgstr "Terminos de Acuerdo" - -#: ../includes/register-settings.php:262 -msgid "Agree to Terms" -msgstr "Acepte los Términos" - -#: ../includes/register-settings.php:263 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing." -msgstr "Seleccione para mostrar un Aceptar Términos requerido para los compradores en el checkout." - -#: ../includes/register-settings.php:268 -msgid "Agree to Terms Label" -msgstr "Etiqueta de Aceptar Terminos" - -#: ../includes/register-settings.php:269 -msgid "Label shown next to the agree to terms check box." -msgstr "Etiqueta mostrada al lado del chekbox de Aceptar Terminos" - -#: ../includes/register-settings.php:275 -msgid "Agreement Text" -msgstr "Condiciones de Acuerdo" - -#: ../includes/register-settings.php:276 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "Si Aceptar los Terminos esta seleccionado, ingrese los terminos a aceptar." - -#: ../includes/register-settings.php:302 -msgid "General Settings" -msgstr "Ajustes Generales" - -#: ../includes/register-settings.php:328 -msgid "Payment Gateway Settings" -msgstr "Ajustes de la Pasarela de Pago" - -#: ../includes/register-settings.php:354 -msgid "Email Settings" -msgstr "Ajustes de Email" - -#: ../includes/register-settings.php:380 -msgid "Style Settings" -msgstr "Ajustes de estilo" - -#: ../includes/register-settings.php:407 -msgid "Misc Settings" -msgstr "Ajustes Micelanoes" - -#: ../includes/register-settings.php:734 -msgid "Settings Updated" -msgstr "Ajustes Actualizados" - -#: ../includes/scripts.php:40 -msgid "Please enter a discount code" -msgstr "Por favor ingrese un codigo de descuento" - -#: ../includes/scripts.php:41 -msgid "Discount Applied" -msgstr "Descuento Aplicado" - -#: ../includes/scripts.php:43 -msgid "You have already added this item to your cart" -msgstr "Ya tiene este item en su carro" - -#: ../includes/scripts.php:44 -msgid "Your cart is empty" -msgstr "Su carrito esta vacio" - -#: ../includes/scripts.php:45 -msgid "Loading" -msgstr "Cargando" - -#: ../includes/scripts.php:112 -msgid "Add New Download" -msgstr "Agregar Nueva Descarga" - -#: ../includes/scripts.php:113 -msgid "Use This File" -msgstr "Usar Este Archivo" - -#: ../includes/scripts.php:114 -msgid "Are you sure you wish to delete this payment?" -msgstr "Esta seguro que quiere eliminar este pago?" - -#: ../includes/shortcodes.php:63 -msgid "Download Name" -msgstr "Nombre de Descarga" - -#: ../includes/shortcodes.php:65 -#: ../includes/shortcodes.php:152 -msgid "Files" -msgstr "Archivos" - -#: ../includes/shortcodes.php:103 -#: ../includes/shortcodes.php:180 -msgid "No downloadable files found." -msgstr "No se han encontrado archivos para descarga." - -#: ../includes/shortcodes.php:119 -msgid "You have not purchased any downloads" -msgstr "No ha comprado niguna descarga" - -#: ../includes/shortcodes.php:149 -msgid "Purchase ID" -msgstr "ID Compra" - -#: ../includes/shortcodes.php:151 -#: ../includes/admin-pages/discount-codes.php:42 -#: ../includes/admin-pages/discount-codes.php:56 -#: ../includes/admin-pages/forms/add-discount.php:48 -#: ../includes/admin-pages/forms/edit-discount.php:53 -msgid "Amount" -msgstr "Monto" - -#: ../includes/shortcodes.php:193 -msgid "You have not made any purchases" -msgstr "No ha realizado ninguna compra" - -#: ../includes/shortcodes.php:344 -msgid "Add to Cart" -msgstr "Agregar al Carro" - -#: ../includes/shortcodes.php:437 -msgid "No downloads found" -msgstr "No se encontraron descargas" - -#: ../includes/template-functions.php:124 -msgid "added to your cart" -msgstr "agregado a su carrito" - -#: ../includes/template-functions.php:214 -msgid "Gray" -msgstr "Gris" - -#: ../includes/template-functions.php:215 -msgid "Pink" -msgstr "Rosa" - -#: ../includes/template-functions.php:216 -msgid "Blue" -msgstr "Azul" - -#: ../includes/template-functions.php:217 -msgid "Green" -msgstr "Verde" - -#: ../includes/template-functions.php:218 -msgid "Teal" -msgstr "Turqueza" - -#: ../includes/template-functions.php:219 -msgid "Black" -msgstr "Negro" - -#: ../includes/template-functions.php:220 -msgid "Dark Gray" -msgstr "Gris Oscuro" - -#: ../includes/template-functions.php:221 -msgid "Orange" -msgstr "Naranja" - -#: ../includes/template-functions.php:222 -msgid "Purple" -msgstr "Violeta" - -#: ../includes/template-functions.php:223 -msgid "Slate" -msgstr "Granito" - -#: ../includes/template-functions.php:242 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "Usted ya ha comprado este item, pero puede comprarlo nuevamente." - -#: ../includes/thickbox.php:29 -#: ../includes/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "Insert %s" - -#: ../includes/thickbox.php:30 -msgid "Insert Download" -msgstr "Ingresar Descarga" - -#: ../includes/thickbox.php:65 -msgid "You must choose a download" -msgstr "Debe seleccionar una descarga" - -#: ../includes/thickbox.php:88 -#, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "Utilize el formulario a continuacion para ingresar el shortcode para la compra de una %s" - -#: ../includes/thickbox.php:91 -#, php-format -msgid "Choose a %s" -msgstr "Seleccione un %s" - -#: ../includes/thickbox.php:100 -msgid "Choose a style" -msgstr "Seleccione un estilo" - -#: ../includes/thickbox.php:111 -msgid "Choose a button color" -msgstr "Seleccione un color para el boton" - -#: ../includes/thickbox.php:120 -msgid "Link text . . ." -msgstr "Enlace de texto..." - -#: ../includes/thickbox.php:124 -msgid "Cancel" -msgstr "Cancelar" - -#: ../includes/thickbox.php:126 -msgid "Button Styles" -msgstr "Estilo de Botones" - -#: ../includes/widgets.php:38 -msgid "Downloads Cart" -msgstr "Carro de Descargas" - -#: ../includes/widgets.php:38 -msgid "Display the downloads shopping cart" -msgstr "Mostrar el carro de descargas" - -#: ../includes/widgets.php:81 -#: ../includes/widgets.php:161 -msgid "Title:" -msgstr "Titulo:" - -#: ../includes/widgets.php:86 -msgid "Show Quantity:" -msgstr "Mostrar Cantidad:" - -#: ../includes/widgets.php:111 -msgid "Downloads Categories / Tags" -msgstr "Categorias y Etiquetas de Descargas" - -#: ../includes/widgets.php:111 -msgid "Display the downloads categories or tags" -msgstr "Muestra categorias o etiquetas de descargas" - -#: ../includes/widgets.php:166 -msgid "Taxonomy:" -msgstr "Taxonomia:" - -#: ../includes/admin-pages/add-ons.php:69 -msgid "Add Ons for Easy Digital Downloads" -msgstr "Extenciones para Easy Digital Download" - -#: ../includes/admin-pages/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "Estos agregandos extienden la funcionalidad de Easy Digital Downloads." - -#: ../includes/admin-pages/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "Ver todas las extensiones" - -#: ../includes/admin-pages/discount-codes.php:40 -#: ../includes/admin-pages/discount-codes.php:54 -#: ../includes/admin-pages/forms/add-discount.php:27 -#: ../includes/admin-pages/forms/edit-discount.php:32 -msgid "Code" -msgstr "Codigo" - -#: ../includes/admin-pages/discount-codes.php:41 -#: ../includes/admin-pages/discount-codes.php:55 -#: ../includes/admin-pages/forms/add-discount.php:36 -#: ../includes/admin-pages/forms/edit-discount.php:41 -msgid "Type" -msgstr "Tipo" - -#: ../includes/admin-pages/discount-codes.php:43 -#: ../includes/admin-pages/discount-codes.php:57 -msgid "Uses" -msgstr "Usos" - -#: ../includes/admin-pages/discount-codes.php:44 -#: ../includes/admin-pages/discount-codes.php:58 -#: ../includes/admin-pages/forms/add-discount.php:75 -#: ../includes/admin-pages/forms/edit-discount.php:80 -msgid "Max Uses" -msgstr "Limite Usos" - -#: ../includes/admin-pages/discount-codes.php:45 -#: ../includes/admin-pages/discount-codes.php:59 -msgid "Start Date" -msgstr "Fecha Inicio" - -#: ../includes/admin-pages/discount-codes.php:46 -#: ../includes/admin-pages/discount-codes.php:60 -msgid "Expiration" -msgstr "Expiracion" - -#: ../includes/admin-pages/discount-codes.php:48 -#: ../includes/admin-pages/discount-codes.php:62 -msgid "Actions" -msgstr "Acciones" - -#: ../includes/admin-pages/discount-codes.php:85 -#: ../includes/admin-pages/discount-codes.php:87 -msgid "unlimited" -msgstr "inlimitado" - -#: ../includes/admin-pages/discount-codes.php:96 -msgid "No start date" -msgstr "Sin fecha de Inicio" - -#: ../includes/admin-pages/discount-codes.php:103 -msgid "Expired" -msgstr "Expirado" - -#: ../includes/admin-pages/discount-codes.php:105 -msgid "no expiration" -msgstr "sin expiracion" - -#: ../includes/admin-pages/discount-codes.php:111 -#: ../includes/admin-pages/payments-history.php:176 -msgid "Edit" -msgstr "Editar" - -#: ../includes/admin-pages/discount-codes.php:113 -msgid "Deactivate" -msgstr "Deactivar" - -#: ../includes/admin-pages/discount-codes.php:115 -msgid "Activate" -msgstr "Activar" - -#: ../includes/admin-pages/discount-codes.php:117 -#: ../includes/admin-pages/payments-history.php:178 -msgid "Delete" -msgstr "Borrar" - -#: ../includes/admin-pages/discount-codes.php:122 -msgid "No discount codes have been created." -msgstr "No se han creado codigos de descuento." - -#: ../includes/admin-pages/payments-history.php:82 -msgid "All" -msgstr "Todos" - -#: ../includes/admin-pages/payments-history.php:87 -msgid "Completed" -msgstr "Completado" - -#: ../includes/admin-pages/payments-history.php:96 -msgid "Deleted" -msgstr "Borrado" - -#: ../includes/admin-pages/payments-history.php:100 -msgid "Export" -msgstr "Exportar" - -#: ../includes/admin-pages/payments-history.php:103 -msgid "Payment mode" -msgstr "Modo de pago" - -#: ../includes/admin-pages/payments-history.php:105 -msgid "Live" -msgstr "Vivo" - -#: ../includes/admin-pages/payments-history.php:106 -msgid "Test" -msgstr "Prueba" - -#: ../includes/admin-pages/payments-history.php:116 -msgid "Payments per page" -msgstr "Pagos por pagina" - -#: ../includes/admin-pages/payments-history.php:118 -msgid "Show" -msgstr "Mostrar" - -#: ../includes/admin-pages/payments-history.php:124 -msgid "Showing payments for: " -msgstr "Mostrar pagos por:" - -#: ../includes/admin-pages/payments-history.php:124 -msgid "clear" -msgstr "borrar" - -#: ../includes/admin-pages/payments-history.php:177 -msgid "Resend Purchase Receipt" -msgstr "Reenviar el Recibo de Compra" - -#: ../includes/admin-pages/payments-history.php:190 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "Detalles de Pago de la Compra #%s" - -#: ../includes/admin-pages/payments-history.php:190 -msgid "View Order Details" -msgstr "Ver los Detalles de la Orden" - -#: ../includes/admin-pages/payments-history.php:198 -msgid "Purchased File" -msgstr "Archivo Comprado" - -#: ../includes/admin-pages/payments-history.php:198 -msgid "Purchased Files" -msgstr "Archivos Comprados" - -#: ../includes/admin-pages/payments-history.php:241 -msgid "Discount used:" -msgstr "Descuento utilizado:" - -#: ../includes/admin-pages/payments-history.php:242 -msgid "Total:" -msgstr "Total:" - -#: ../includes/admin-pages/payments-history.php:245 -msgid "Buyer's Personal Details:" -msgstr "Detalles Personales del Comprador:" - -#: ../includes/admin-pages/payments-history.php:247 -msgid "Name:" -msgstr "Nombre:" - -#: ../includes/admin-pages/payments-history.php:248 -msgid "Email:" -msgstr "Email:" - -#: ../includes/admin-pages/payments-history.php:257 -msgid "Payment Method:" -msgstr "Metodo de pago:" - -#: ../includes/admin-pages/payments-history.php:262 -msgid "Purchase Key" -msgstr "Identificacion Compra" - -#: ../includes/admin-pages/reports.php:34 -msgid "Transactions created while in test mode are not included on this page." -msgstr "Las transacciones creadas en modo de prueba no son incluidas en esta pagina." - -#: ../includes/admin-pages/settings.php:33 -msgid "General" -msgstr "General" - -#: ../includes/admin-pages/settings.php:35 -msgid "Emails" -msgstr "Emails" - -#: ../includes/admin-pages/settings.php:36 -msgid "Styles" -msgstr "Estilos" - -#: ../includes/admin-pages/settings.php:37 -msgid "Misc" -msgstr "Misc" - -#: ../includes/admin-pages/forms/add-discount.php:12 -msgid "Add New Discount" -msgstr "Agregar Nuevo Descuento" - -#: ../includes/admin-pages/forms/add-discount.php:22 -#: ../includes/admin-pages/forms/edit-discount.php:27 -msgid "The name of this discount" -msgstr "El nombre de este descuento" - -#: ../includes/admin-pages/forms/add-discount.php:31 -#: ../includes/admin-pages/forms/edit-discount.php:36 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "Ingrese un codigo para este descuento, como 10PORCIENTO" - -#: ../includes/admin-pages/forms/add-discount.php:40 -#: ../includes/admin-pages/forms/edit-discount.php:45 -msgid "Percentage" -msgstr "Porcentage" - -#: ../includes/admin-pages/forms/add-discount.php:41 -#: ../includes/admin-pages/forms/edit-discount.php:46 -msgid "Flat amount" -msgstr "Monto fijo" - -#: ../includes/admin-pages/forms/add-discount.php:43 -#: ../includes/admin-pages/forms/edit-discount.php:48 -msgid "The kind of discount to apply for this discount." -msgstr "El tipo de descuento que se aplica para este código." - -#: ../includes/admin-pages/forms/add-discount.php:52 -#: ../includes/admin-pages/forms/edit-discount.php:57 -msgid "The amount of this discount code." -msgstr "El monto de descuento para este codigo." - -#: ../includes/admin-pages/forms/add-discount.php:57 -#: ../includes/admin-pages/forms/edit-discount.php:62 -msgid "Start date" -msgstr "Fecha Inicio" - -#: ../includes/admin-pages/forms/add-discount.php:61 -#: ../includes/admin-pages/forms/edit-discount.php:66 -msgid "Enter the start date for this discount code in the format of yyyy-mm-dd. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "Ingrese la fecha de inicio para este código de descuento en el formato aaaa-mm-dd. Dejar en blanco para utilizar sin fecha de inicio. Si se ingresa una fecha el descuento solo puede ser utilizado a partir de esta fecha." - -#: ../includes/admin-pages/forms/add-discount.php:66 -#: ../includes/admin-pages/forms/edit-discount.php:71 -msgid "Expiration date" -msgstr "Fecha de expiracion" - -#: ../includes/admin-pages/forms/add-discount.php:70 -#: ../includes/admin-pages/forms/edit-discount.php:75 -msgid "Enter the expiration date for this discount code in the format of yyyy-mm-dd. For no expiration, leave blank" -msgstr "Ingrese la fecha de expiracion para este codigo de ddescuento en el formato aaaa-mm-dd. Para no expiración, dejar en blanco." - -#: ../includes/admin-pages/forms/add-discount.php:79 -#: ../includes/admin-pages/forms/edit-discount.php:84 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "El máximo numero de veces que este código puede ser utilizado. Dejar en blanco para ilimitado." - -#: ../includes/admin-pages/forms/add-discount.php:87 -msgid "Add Discount Code" -msgstr "Agregar Codigo de Descuento" - -#: ../includes/admin-pages/forms/edit-discount.php:13 -msgid "Something went wrong." -msgstr "Algo salio mal." - -#: ../includes/admin-pages/forms/edit-discount.php:17 -msgid "Edit Discount" -msgstr "Editar Descuento" - -#: ../includes/admin-pages/forms/edit-discount.php:17 -msgid "Go Back" -msgstr "Volver" - -#: ../includes/admin-pages/forms/edit-discount.php:93 -msgid "Active" -msgstr "Activo" - -#: ../includes/admin-pages/forms/edit-discount.php:94 -msgid "Inactive" -msgstr "Inactivo" - -#: ../includes/admin-pages/forms/edit-discount.php:96 -msgid "The status of this discount code." -msgstr "El estado de este codigo de descuento." - -#: ../includes/admin-pages/forms/edit-discount.php:106 -msgid "Update Discount Code" -msgstr "Actualizar Codigo de Descuento" - -#: ../includes/admin-pages/forms/edit-payment.php:22 -msgid "Buyer's Email" -msgstr "Email del Comprador" - -#: ../includes/admin-pages/forms/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "Si es requerido, puede actualizar el email del comprador aqui." - -#: ../includes/admin-pages/forms/edit-payment.php:31 -msgid "Downloads Purchased" -msgstr "Descargas Compradas" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "Agregar descarga a la compra #%s" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -msgid "Add download to purchase" -msgstr "Agregar descarga a la compra" - -#: ../includes/admin-pages/forms/edit-payment.php:48 -msgid "Payment Status" -msgstr "Estado del Pago" - -#: ../includes/admin-pages/forms/edit-payment.php:64 -msgid "Send Purchase Receipt" -msgstr "Enviar el Recibo de Compra" - -#: ../includes/admin-pages/forms/edit-payment.php:68 -msgid "Check this box to send the purchase receipt, including all download links." -msgstr "Enviar un recivo de compra, incluyendo los enlaces de descargas." - -#: ../includes/admin-pages/forms/edit-payment.php:78 -msgid "Update Payment" -msgstr "Actualizar Pago" - -#: ../includes/admin-pages/forms/edit-payment.php:91 -msgid "Add Selected Downloads" -msgstr "Agregar las Descargas Seleccionadas" - -#: ../includes/gateways/paypal.php:264 -msgid "Invalid IPN" -msgstr "IPN Invalido" - -#: ../includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "Nombre del item" - -#: ../includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "Precio del item" - -#: ../includes/templates/checkout_cart.php:47 -msgid "Total" -msgstr "Total" - -#~ msgid "Price: " -#~ msgstr "Precio:" - -#~ msgid "Manual Payment" -#~ msgstr "Pago Manual" - -#~ msgid "Download Stats" -#~ msgstr "Estadisticas de Descargas" - -#~ msgid "pending" -#~ msgstr "pendiente" - -#~ msgid "complete" -#~ msgstr "completo" - -#~ msgid "refunded" -#~ msgstr "reintegro" - -#~ msgid "Edit Download" -#~ msgstr "Editar Descarga" - -#~ msgid "New Download" -#~ msgstr "Nueva Descarga" - -#~ msgid "All Downloads" -#~ msgstr "Todas las Descarga" - -#~ msgid "View Download" -#~ msgstr "Ver Descarga" - -#~ msgid "Search Downloads" -#~ msgstr "Buscar Descarga" - -#~ msgid "No Downloads found" -#~ msgstr "No se han encontrado Descargas" - -#~ msgid "No Downloads found in Trash" -#~ msgstr "No se han encontrado Descargas en la papelera" - -#~ msgid "Disable cURL for PayPal IPN" -#~ msgstr "Desactivar cURL para PayPal IPN" - -#~ msgid "" -#~ "If payments are not getting marked as complete, and disabling cURL does " -#~ "not fix the problem, then check this box" -#~ msgstr "" -#~ "Si los pagos no se estan completando y desactivar cURL no lo soluciona, " -#~ "seleccione esta opcion" - -#~ msgid "Choose a download" -#~ msgstr "Seleccione una descarga" - -#~ msgid "Something has gone wrong, please try again" -#~ msgstr "Algo fallo, por favor trate nuevamente" - -#~ msgid "Short Code for this Download" -#~ msgstr "ShortCode para esta Descarga" - -#~ msgid "here" -#~ msgstr "aqui" - -#~ msgid "Click %s to purchase again." -#~ msgstr "Seleccione %s para comprar nuevamente." - -#~ msgid "Your shopping cart is empty" -#~ msgstr "Su carrito de compras esta vacio" - -#~ msgid "email@domain.com" -#~ msgstr "email@dominio.com" - -#~ msgid "Enter the download price" -#~ msgstr "Ingrese el precio de la descarga" - -#~ msgid "Use this plugin in test mode" -#~ msgstr "Usar este plugin en modo de prueba" diff --git a/languages/edd-fr_FR.mo b/languages/edd-fr_FR.mo deleted file mode 100644 index 60c2d7fec3b..00000000000 Binary files a/languages/edd-fr_FR.mo and /dev/null differ diff --git a/languages/edd-fr_FR.po b/languages/edd-fr_FR.po deleted file mode 100755 index 76ddb7b7922..00000000000 --- a/languages/edd-fr_FR.po +++ /dev/null @@ -1,2789 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads v1.1.5.2\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-09-26 13:25+0100\n" -"PO-Revision-Date: 2012-09-26 13:26+0100\n" -"Last-Translator: FxB \n" -"Language-Team: FxB \n" -"Language: fr_FR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;_n;" -"_x;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c\n" -"X-Poedit-Basepath: ../\n" -"X-Textdomain-Support: yes\n" -"X-Generator: Poedit 1.5.3\n" -"X-Poedit-SearchPath-0: .\n" - -# @ edd -#: includes/ajax-functions.php:102 -msgid "This discount code has been used already" -msgstr "Ce code de promo a déja été utilisé" - -# @ edd -#: includes/ajax-functions.php:118 includes/process-purchase.php:239 -msgid "The discount you entered is invalid" -msgstr "La remise que vous avez encodé est invalide" - -# @ edd -#: includes/cart-functions.php:405 -#, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "Vous venez d'ajouter avec succès %s à votre panier." - -# @ edd -#: includes/cart-functions.php:406 -msgid "Checkout." -msgstr "Commander." - -# @ edd -#: includes/cart-template.php:46 includes/cart-template.php:49 -#: includes/install.php:31 includes/template-functions.php:137 -#: includes/template-functions.php:158 -msgid "Checkout" -msgstr "Commander" - -# @ edd -#: includes/cart-template.php:80 includes/templates/checkout_cart.php:36 -msgid "remove" -msgstr "retirer" - -# @ edd -#: includes/cart-template.php:99 -msgid "Your cart is empty." -msgstr "Votre panier est vide." - -# @ edd -#: includes/checkout-template.php:101 -msgid "Personal Info" -msgstr "Info personnelle" - -# @ edd -#: includes/checkout-template.php:104 -msgid "Email address" -msgstr "Adresse e-mail" - -# @ edd -#: includes/checkout-template.php:105 -msgid "Email Address" -msgstr "Adresse e-mail" - -# @ edd -#: includes/checkout-template.php:109 includes/checkout-template.php:110 -#: includes/checkout-template.php:343 includes/checkout-template.php:344 -#: includes/admin/export-functions.php:41 -msgid "First Name" -msgstr "Prénom" - -# @ edd -#: includes/checkout-template.php:113 includes/checkout-template.php:347 -msgid "Last name" -msgstr "Nom" - -# @ edd -#: includes/checkout-template.php:114 includes/checkout-template.php:348 -#: includes/admin/export-functions.php:42 -msgid "Last Name" -msgstr "Nom" - -#: includes/checkout-template.php:142 -msgid "Show Terms" -msgstr "Afficher les conditions" - -#: includes/checkout-template.php:143 -msgid "Hide Terms" -msgstr "Cacher les conditions" - -#: includes/checkout-template.php:146 -msgid "Agree to Terms?" -msgstr "Accepter les conditions ?" - -# @ edd -#: includes/checkout-template.php:166 -msgid "Go back" -msgstr "Retour" - -# @ edd -#: includes/checkout-template.php:170 -msgid "You must be logged in to complete your purchase" -msgstr "Vous devez être connecté afin de poursuivre l'achat" - -# @ edd -#: includes/checkout-template.php:199 -msgid "Credit Card Info" -msgstr "Infos carte de crédit" - -# @ edd -#: includes/checkout-template.php:201 -msgid "Card name" -msgstr "Nom de la carte" - -# @ edd -#: includes/checkout-template.php:202 -msgid "Name on the Card" -msgstr "Nom sur la carte" - -# @ edd -#: includes/checkout-template.php:205 -msgid "Card number" -msgstr "Numéro de la carte" - -# @ edd -#: includes/checkout-template.php:206 -msgid "Card Number" -msgstr "Numéro de la carte" - -# @ edd -#: includes/checkout-template.php:209 -msgid "Security code" -msgstr "Code de sécurité" - -# @ edd -#: includes/checkout-template.php:210 -msgid "CVC" -msgstr "CVC" - -# @ edd -#: includes/checkout-template.php:216 -#: includes/admin/reporting/graphing.php:121 -#: includes/admin/reporting/graphing.php:221 -msgid "Month" -msgstr "Mois" - -# @ edd -#: includes/checkout-template.php:218 -msgid "Year" -msgstr "Année" - -# @ edd -#: includes/checkout-template.php:219 -msgid "Expiration (MM/YYYY)" -msgstr "Expiration (MM/AAAA)" - -# @ edd -#: includes/checkout-template.php:249 -msgid "Address line 1" -msgstr "Adresse ligne 1" - -# @ edd -#: includes/checkout-template.php:250 -msgid "Billing Address" -msgstr "Adresse de facturation" - -# @ edd -#: includes/checkout-template.php:253 -msgid "Address line 2" -msgstr "Adresse ligne 2" - -# @ edd -#: includes/checkout-template.php:254 -msgid "Billing Address Line 2" -msgstr "Adresse de facturation ligne 2" - -# @ edd -#: includes/checkout-template.php:257 -msgid "City" -msgstr "Ville" - -# @ edd -#: includes/checkout-template.php:258 -msgid "Billing City" -msgstr "Ville de facturation" - -# @ edd -#: includes/checkout-template.php:269 -msgid "Billing Country" -msgstr "Pays de facturation" - -# @ edd -#: includes/checkout-template.php:272 -msgid "State / Province" -msgstr "État / Province" - -# @ edd -#: includes/checkout-template.php:289 -msgid "Billing State / Province" -msgstr "État / Province de facturation" - -# @ edd -#: includes/checkout-template.php:292 -msgid "Zip / Postal code" -msgstr "Code postal" - -# @ edd -#: includes/checkout-template.php:293 -msgid "Billing Zip / Postal Code" -msgstr "Code Postal" - -# @ edd -#: includes/checkout-template.php:320 -msgid "Already have an account?" -msgstr "Vous avez déjà un compte ?" - -# @ edd -#: includes/checkout-template.php:320 includes/login-register.php:58 -msgid "Login" -msgstr "Se connecter" - -# @ edd -#: includes/checkout-template.php:322 -msgid "Create an account" -msgstr "Créer un compte" - -# @ edd -#: includes/checkout-template.php:322 -msgid "(optional)" -msgstr "(facultatif)" - -# @ edd -#: includes/checkout-template.php:325 includes/checkout-template.php:326 -#: includes/checkout-template.php:373 includes/login-register.php:47 -#: includes/login-register.php:48 -msgid "Username" -msgstr "Nom d'utilisateur" - -# @ edd -#: includes/checkout-template.php:329 includes/checkout-template.php:330 -#: includes/checkout-template.php:377 includes/login-register.php:51 -msgid "Password" -msgstr "Mot de passe" - -# @ edd -#: includes/checkout-template.php:333 -msgid "Confirm password" -msgstr "Confirmer le mot de passe" - -# @ edd -#: includes/checkout-template.php:334 -msgid "Password Again" -msgstr "Mot de passe à nouveau" - -# @ edd -#: includes/checkout-template.php:339 includes/checkout-template.php:340 -#: includes/admin/export-functions.php:40 -#: includes/admin/payments/payments-history.php:139 -#: includes/admin/payments/payments-history.php:156 -msgid "Email" -msgstr "E-mail " - -# @ edd -#: includes/checkout-template.php:369 -msgid "Login to your account" -msgstr "Se connecter au compte" - -# @ edd -#: includes/checkout-template.php:372 -msgid "Your username" -msgstr "Votre nom d'utilisateur" - -# @ edd -#: includes/checkout-template.php:376 -msgid "Your password" -msgstr "Votre mot de passe" - -# @ edd -#: includes/checkout-template.php:384 -msgid "Need to create an account?" -msgstr "Besoin de créer un compte ?" - -# @ edd -#: includes/checkout-template.php:386 -msgid "Register" -msgstr "Enregistrer" - -#: includes/checkout-template.php:386 -msgid "or checkout as a guest." -msgstr "ou commander en tant qu'invité." - -# @ edd -#: includes/checkout-template.php:415 -msgid "Choose Your Payment Method" -msgstr "Choisissez votre méthode de paiement" - -# @ edd -#: includes/checkout-template.php:443 -msgid "Enter discount" -msgstr "Entrer code promo" - -# @ edd -#: includes/checkout-template.php:445 -msgid "Discount" -msgstr "Remise" - -# @ edd -#: includes/checkout-template.php:447 -msgid "Apply Discount" -msgstr "Appliquer le code promo" - -# @ edd -#: includes/checkout-template.php:473 includes/admin/downloads/metabox.php:570 -#: includes/admin/downloads/metabox.php:667 -#: includes/admin/payments/payments-history.php:319 -msgid "Next" -msgstr "Suivant" - -# @ edd -#: includes/checkout-template.php:497 includes/shortcodes.php:26 -#: includes/template-functions.php:60 includes/admin/thickbox.php:61 -#: includes/admin/downloads/dashboard-columns.php:57 -msgid "Purchase" -msgstr "Acheter" - -# @ edd -#: includes/email-functions.php:47 includes/register-settings.php:191 -msgid "Purchase Receipt" -msgstr "Facture d'achat" - -# @ edd -#: includes/email-functions.php:62 -msgid "Hello" -msgstr "Bonjour" - -# @ edd -#: includes/email-functions.php:62 -msgid "A download purchase has been made" -msgstr "Un achat de téléchargement a été réalisé" - -# @ edd -#: includes/email-functions.php:63 -msgid "Downloads sold:" -msgstr "Téléchargements vendus" - -# @ edd -#: includes/email-functions.php:76 -msgid "Purchased by: " -msgstr "Acheté par :" - -# @ edd -#: includes/email-functions.php:77 -msgid "Amount: " -msgstr "Montant :" - -# @ edd -#: includes/email-functions.php:78 -msgid "Payment Method: " -msgstr "Méthode de Paiement :" - -# @ edd -#: includes/email-functions.php:79 -msgid "Thank you" -msgstr "Merci" - -# @ edd -#: includes/email-functions.php:82 -msgid "New download purchase" -msgstr "Nouvel achat de téléchargement enregistré" - -#: includes/email-template.php:23 -msgid "Default Template" -msgstr "Modèle par défaut" - -#: includes/email-template.php:24 -msgid "No template, plain text only" -msgstr "Pas de modèle, uniquement du texte" - -#: includes/email-template.php:115 -msgid "Sample Product Title" -msgstr "Le titre du produit de test" - -# @ edd -#: includes/email-template.php:118 -msgid "Sample Download File Name" -msgstr "Le nom du fichier de test de téléchargement" - -#: includes/email-template.php:118 -msgid "Optional notes about this download." -msgstr "Remarques facultatives sur ce téléchargement." - -#: includes/email-template.php:129 -msgid "These are some sample notes added to a product." -msgstr "Voici quelques exemples de remarques ajoutées à un produit." - -# @ edd -#: includes/email-template.php:168 -msgid "Purchase Receipt Preview" -msgstr "Aperçu du reçu d'achat" - -# @ edd -#: includes/email-template.php:168 -msgid "Preview Purchase Receipt" -msgstr "Aperçu du reçu d'achat" - -# @ edd -#: includes/email-template.php:209 -msgid "Dear" -msgstr "Cher" - -#: includes/email-template.php:210 -msgid "" -"Thank you for your purchase. Please click on the link(s) below to download " -"your files." -msgstr "" -"Nous vous remercions de votre achat. S'il vous plaît cliquez sur le(s) lien" -"(s) ci-dessous pour télécharger vos fichiers." - -# @ edd -#: includes/error-tracking.php:30 includes/process-download.php:266 -#: includes/process-download.php:283 includes/query-filters.php:42 -#: includes/admin/discounts/edit-discount.php:13 -msgid "Error" -msgstr "Erreur" - -# @ edd -#: includes/gateway-functions.php:28 -msgid "Test Payment" -msgstr "Paiement de test" - -# @ edd -#: includes/install.php:42 -msgid "Purchase Confirmation" -msgstr "Confirmation d'achat" - -# @ edd -#: includes/install.php:43 -msgid "Thank you for your purchase!" -msgstr "Merci pour votre achat !" - -# @ edd -#: includes/install.php:53 includes/widgets.php:193 -msgid "Purchase History" -msgstr "Historique des achats" - -# @ edd -#: includes/login-register.php:45 -msgid "Log into Your Account" -msgstr "Se connecter à votre compte" - -# @ edd -#: includes/login-register.php:61 -msgid "Lost Password" -msgstr "Mot de passe oublié" - -# @ edd -#: includes/login-register.php:62 -msgid "Lost Password?" -msgstr "Mot de Passe perdu ?" - -#: includes/login-register.php:69 -msgid "You are already logged in" -msgstr "Vous êtes déjà connecté(e)." - -# @ edd -#: includes/login-register.php:92 includes/process-purchase.php:472 -msgid "The password you entered is incorrect" -msgstr "Le mot de passe fourni ne correspond pas" - -# @ edd -#: includes/login-register.php:95 includes/process-purchase.php:491 -msgid "The username you entered does not exist" -msgstr "Le nom d'utilisateur fourni n'existe pas" - -# @ edd -#: includes/misc-functions.php:185 -msgid "US Dollars ($)" -msgstr "Dollar US ($)" - -# @ edd -#: includes/misc-functions.php:186 -msgid "Euros (€)" -msgstr "Euro (€)" - -# @ edd -#: includes/misc-functions.php:187 -msgid "Pounds Sterling (£)" -msgstr "Livre Sterling (£)" - -# @ edd -#: includes/misc-functions.php:188 -msgid "Australian Dollars ($)" -msgstr "Dollar Australien ($)" - -# @ edd -#: includes/misc-functions.php:189 -msgid "Brazilian Real ($)" -msgstr "Réal brésilien ($)" - -# @ edd -#: includes/misc-functions.php:190 -msgid "Canadian Dollars ($)" -msgstr "Dollar canadien ($)" - -# @ edd -#: includes/misc-functions.php:191 -msgid "Czech Koruna" -msgstr "Couronne tchèque" - -# @ edd -#: includes/misc-functions.php:192 -msgid "Danish Krone" -msgstr "Couronne danoise" - -# @ edd -#: includes/misc-functions.php:193 -msgid "Hong Kong Dollar ($)" -msgstr "Dollar de Hong Kong ($)" - -# @ edd -#: includes/misc-functions.php:194 -msgid "Hungarian Forint" -msgstr "Forint hongrois" - -# @ edd -#: includes/misc-functions.php:195 -msgid "Israeli Shekel" -msgstr "Nouveau Shekel" - -# @ edd -#: includes/misc-functions.php:196 -msgid "Japanese Yen (¥)" -msgstr "Yen Japonais (¥)" - -# @ edd -#: includes/misc-functions.php:197 -msgid "Malaysian Ringgits" -msgstr "Ringgit malaisien" - -# @ edd -#: includes/misc-functions.php:198 -msgid "Mexican Peso ($)" -msgstr "Peso mexicain ($)" - -# @ edd -#: includes/misc-functions.php:199 -msgid "New Zealand Dollar ($)" -msgstr "Dollar Nouvelle Zélande ($)" - -# @ edd -#: includes/misc-functions.php:200 -msgid "Norwegian Krone" -msgstr "Couronne norvégienne" - -# @ edd -#: includes/misc-functions.php:201 -msgid "Philippine Pesos" -msgstr "Peso philippin" - -# @ edd -#: includes/misc-functions.php:202 -msgid "Polish Zloty" -msgstr "Zloty polonais" - -# @ edd -#: includes/misc-functions.php:203 -msgid "Singapore Dollar ($)" -msgstr "Dollar de Singapour ($)" - -# @ edd -#: includes/misc-functions.php:204 -msgid "Swedish Krona" -msgstr "Couronne suédoise" - -# @ edd -#: includes/misc-functions.php:205 -msgid "Swiss Franc" -msgstr "Franc suisse" - -# @ edd -#: includes/misc-functions.php:206 -msgid "Taiwan New Dollars" -msgstr "Nouveau dollar de Taiwan" - -# @ edd -#: includes/misc-functions.php:207 -msgid "Thai Baht" -msgstr "Baht thaïlandais" - -# @ edd -#: includes/misc-functions.php:208 -msgid "Indian Rupee" -msgstr "Roupie indienne" - -#: includes/misc-functions.php:209 -msgid "Turkish Lira" -msgstr "Lire Turque (TL)" - -#: includes/misc-functions.php:210 -msgid "Iranian Rial" -msgstr "Rial iranian" - -# @ edd -#: includes/payment-functions.php:299 -#: includes/admin/payments/payments-history.php:98 -msgid "Pending" -msgstr "En attente" - -# @ edd -#: includes/payment-functions.php:300 -msgid "Complete" -msgstr "Terminé" - -#: includes/payment-functions.php:301 -#: includes/admin/payments/payments-history.php:101 -msgid "Refunded" -msgstr "Remboursé" - -# @ edd -#: includes/post-types.php:43 includes/post-types.php:81 -msgid "Add New" -msgstr "Ajouter Nouveau" - -# @ edd -#: includes/post-types.php:44 -#, php-format -msgid "Add New %1$s" -msgstr "Ajouter Nouveau %1$s" - -# @ edd -#: includes/post-types.php:45 -#, php-format -msgid "Edit %1$s" -msgstr "Modifier %1$s" - -#: includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "Nouveau %1$s" - -# @ edd -#: includes/post-types.php:47 -#, php-format -msgid "All %2$s" -msgstr "Tous les %2$s" - -#: includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "Afficher %1$s" - -# @ edd -#: includes/post-types.php:49 -#, php-format -msgid "Search %2$s" -msgstr "Rechercher %2$s" - -# @ edd -#: includes/post-types.php:50 -#, php-format -msgid "No %2$s found" -msgstr "Aucun %2$s trouvé" - -# @ edd -#: includes/post-types.php:51 -#, php-format -msgid "No %2$s found in Trash" -msgstr "Aucun %2$s trouvé dans la Corbeille" - -#: includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "%2$s" - -# @ edd -#: includes/post-types.php:79 -msgctxt "post type general name" -msgid "Payments" -msgstr "Paiements" - -# @ edd -#: includes/post-types.php:80 -msgctxt "post type singular name" -msgid "Payment" -msgstr "Paiement" - -# @ edd -#: includes/post-types.php:82 -msgid "Add New Payment" -msgstr "Ajouter un paiement" - -# @ edd -#: includes/post-types.php:83 includes/admin/payments/edit-payment.php:16 -msgid "Edit Payment" -msgstr "Modifier paiement" - -# @ edd -#: includes/post-types.php:84 -msgid "New Payment" -msgstr "Nouveau paiement" - -# @ edd -#: includes/post-types.php:85 -msgid "All Payments" -msgstr "Tous les paiements" - -# @ edd -#: includes/post-types.php:86 -msgid "View Payment" -msgstr "Afficher paiement" - -# @ edd -#: includes/post-types.php:87 -msgid "Search Payments" -msgstr "Rechercher paiements" - -# @ edd -#: includes/post-types.php:88 -msgid "No Payments found" -msgstr "Aucun paiement trouvé" - -# @ edd -#: includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "Aucun paiement trouvé dans la corbeille" - -# @ edd -#: includes/post-types.php:91 includes/admin/admin-pages.php:26 -#: includes/admin/payments/payments-history.php:85 -msgid "Payment History" -msgstr "Historique des paiements" - -# @ edd -#: includes/post-types.php:125 includes/admin/reporting/graphing.php:77 -msgid "Download" -msgstr "Téléchargement" - -# @ edd -#: includes/post-types.php:126 -msgid "Downloads" -msgstr "Téléchargements" - -# @ edd -#: includes/post-types.php:173 -msgctxt "taxonomy general name" -msgid "Categories" -msgstr "Catégories" - -# @ edd -#: includes/post-types.php:174 -msgctxt "taxonomy singular name" -msgid "Category" -msgstr "Catégorie" - -# @ edd -#: includes/post-types.php:175 -msgid "Search Categories" -msgstr "Rechercher catégories" - -# @ edd -#: includes/post-types.php:176 -msgid "All Categories" -msgstr "Toutes les catégories" - -# @ edd -#: includes/post-types.php:177 -msgid "Parent Category" -msgstr "Catégorie parente" - -# @ edd -#: includes/post-types.php:178 -msgid "Parent Category:" -msgstr "Catégorie parente :" - -# @ edd -#: includes/post-types.php:179 -msgid "Edit Category" -msgstr "Modifier la catégorie" - -# @ edd -#: includes/post-types.php:180 -msgid "Update Category" -msgstr "Mettre à jour la catégorie" - -# @ edd -#: includes/post-types.php:181 -msgid "Add New Category" -msgstr "Ajouter une catégorie" - -# @ edd -#: includes/post-types.php:182 -msgid "New Category Name" -msgstr "Nouveau nom de catégorie" - -# @ edd -#: includes/post-types.php:183 includes/widgets.php:169 -#: includes/admin/downloads/dashboard-columns.php:27 -#: includes/admin/reporting/pdf-reports.php:67 -msgid "Categories" -msgstr "Catégories" - -# @ edd -#: includes/post-types.php:198 -msgctxt "taxonomy general name" -msgid "Tags" -msgstr "Mots-clefs" - -# @ edd -#: includes/post-types.php:199 -msgctxt "taxonomy singular name" -msgid "Tag" -msgstr "Mot-clef" - -# @ edd -#: includes/post-types.php:200 -msgid "Search Tags" -msgstr "Rechercher mots-clefs" - -# @ edd -#: includes/post-types.php:201 -msgid "All Tags" -msgstr "Tous les mots-clefs" - -# @ edd -#: includes/post-types.php:202 -msgid "Parent Tag" -msgstr "Mot-clef parent" - -# @ edd -#: includes/post-types.php:203 -msgid "Parent Tag:" -msgstr "Mot-clef parent :" - -# @ edd -#: includes/post-types.php:204 -msgid "Edit Tag" -msgstr "Modifier mot-clef" - -# @ edd -#: includes/post-types.php:205 -msgid "Update Tag" -msgstr "Mettre à jour mot-clef" - -# @ edd -#: includes/post-types.php:206 -msgid "Add New Tag" -msgstr "Ajouter nouveau mot-clef" - -# @ edd -#: includes/post-types.php:207 -msgid "New Tag Name" -msgstr "Nouveau nom du mot-clef" - -# @ edd -#: includes/post-types.php:208 includes/widgets.php:170 -#: includes/admin/downloads/dashboard-columns.php:28 -#: includes/admin/reporting/pdf-reports.php:68 -msgid "Tags" -msgstr "Mots-clefs" - -# @ edd -#: includes/post-types.php:239 includes/post-types.php:240 -msgid "Download updated." -msgstr "Téléchargement mis à jour." - -# @ edd -#: includes/post-types.php:241 -msgid "Download published." -msgstr "Téléchargement publié." - -# @ edd -#: includes/post-types.php:242 -msgid "Download saved." -msgstr "Téléchargements sauvegardés." - -# @ edd -#: includes/post-types.php:243 -msgid "Download submitted." -msgstr "Téléchargement ajouté." - -#: includes/process-download.php:266 includes/process-download.php:283 -msgid "Sorry but this file does not exist." -msgstr "Désolé mais ce fichier n'existe pas." - -# @ edd -#: includes/process-download.php:294 -msgid "You do not have permission to download this file" -msgstr "Vous n'avez pas la permission de télécharger ce fichier" - -# @ edd -#: includes/process-download.php:294 -msgid "Purchase Verification Failed" -msgstr "Erreur lors de la vérification de l'achat" - -#: includes/process-purchase.php:206 -msgid "The selected gateway is not active" -msgstr "La passerelle sélectionnée n'est pas active" - -#: includes/process-purchase.php:210 -msgid "No gateway has been selected" -msgstr "Aucune passerelle n'a été sélectionné" - -#: includes/process-purchase.php:259 -msgid "You must agree to the terms of use" -msgstr "Vous devez accepter les conditions d'utilisation" - -# @ edd -#: includes/process-purchase.php:289 -msgid "Please enter a valid email address." -msgstr "Veuillez saisir une adresse de messagerie valide." - -#: includes/process-purchase.php:303 -msgid "The user information is invalid." -msgstr "Les informations sur l'utilisateur sont incorrectes." - -# @ edd -#: includes/process-purchase.php:349 -msgid "Username already taken" -msgstr "Nom d'utilisateur déjà utilisé" - -# @ edd -#: includes/process-purchase.php:355 -msgid "Invalid username" -msgstr "Nom d'utilisateur incorrect" - -# @ edd -#: includes/process-purchase.php:366 -msgid "You must register or login to complete your purchase" -msgstr "Vous devez être enregistré ou connecté afin de terminer votre achat" - -# @ edd -#: includes/process-purchase.php:378 includes/process-purchase.php:522 -msgid "Invalid email" -msgstr "E-mail incorrect" - -# @ edd -#: includes/process-purchase.php:384 -msgid "Email already used" -msgstr "E-mail déjà utilisé" - -# @ edd -#: includes/process-purchase.php:396 includes/process-purchase.php:529 -msgid "Enter an email" -msgstr "Entrez une adresse e-mail" - -# @ edd -#: includes/process-purchase.php:407 -msgid "Passwords don't match" -msgstr "Les mote de passe ne correspondent pas" - -# @ edd -#: includes/process-purchase.php:422 includes/process-purchase.php:487 -msgid "Enter a password" -msgstr "Entrez un mot de passe" - -# @ edd -#: includes/process-purchase.php:427 -msgid "Enter the password confirmation" -msgstr "Entrez la confirmation de mot de passe" - -# @ edd -#: includes/process-purchase.php:454 -msgid "You must login or register to complete your purchase" -msgstr "Vous devez être connecté ou enregistré afin de terminer votre achat" - -# @ edd -#: includes/query-filters.php:42 -msgid "You do not have permission to view this file." -msgstr "Vous n'avez pas la permission de voir ce fichier." - -# @ edd -#: includes/register-settings.php:41 -msgid "Test Mode" -msgstr "Mode de test" - -# @ edd -#: includes/register-settings.php:42 -msgid "" -"While in test mode no live transactions are processed. To fully use test " -"mode, you must have a sandbox (test) account for the payment gateway you are " -"testing." -msgstr "" -"En mode test, aucune transaction réelle n'est effectuée. Afin d'utiliser le " -"mode test pleinement, vous devez disposer d'un compte de test pour la " -"passerelle de paiement que vous testez." - -# @ edd -#: includes/register-settings.php:47 -msgid "Checkout Page" -msgstr "Page de commande" - -# @ edd -#: includes/register-settings.php:48 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "La page de commande où les acheteurs réalisent leurs achats." - -# @ edd -#: includes/register-settings.php:54 -msgid "Success Page" -msgstr "Page d'achat réussi" - -# @ edd -#: includes/register-settings.php:55 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "" -"La page vers laquelle les acheteurs sont redirigés après avoir réalisé leurs " -"achats." - -#: includes/register-settings.php:61 -msgid "Download Links on Success Page" -msgstr "Liens des téléchargements sur la page d'achat réussi" - -#: includes/register-settings.php:62 -msgid "" -"Show a list of all download links on the success page after completing a " -"purchase?" -msgstr "" -"Afficher la liste de tous les liens des téléchargements sur la page d'achat " -"réussi après avoir terminé un achat ?" - -# @ edd -#: includes/register-settings.php:67 -msgid "Currency Settings" -msgstr "Réglages de monnaie" - -# @ edd -#: includes/register-settings.php:68 -msgid "Configure the currency options" -msgstr "Configurer les réglages de monnaie" - -# @ edd -#: includes/register-settings.php:73 -msgid "Currency" -msgstr "Monnaie" - -# @ edd -#: includes/register-settings.php:74 -msgid "" -"Choose your currency. Note that some payment gateways have currency " -"restrictions." -msgstr "" -"Choissisez votre monnaie. Veuillez noter que certaines passerelles de " -"paiement ont des limitations quant à la monnaie." - -# @ edd -#: includes/register-settings.php:80 -msgid "Currency Position" -msgstr "Position du symbole monétaire" - -# @ edd -#: includes/register-settings.php:81 -msgid "Choose the location of the currency sign." -msgstr "Choisissez l'emplacement du symbole monétaire." - -# @ edd -#: includes/register-settings.php:84 -msgid "Before - $10" -msgstr "Avant - $10" - -# @ edd -#: includes/register-settings.php:85 -msgid "After - 10$" -msgstr "Après - 10$" - -# @ edd -#: includes/register-settings.php:90 -msgid "Thousands Separator" -msgstr "Séparateur des milliers" - -# @ edd -#: includes/register-settings.php:91 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "Le séparateur (le plus souvent , ou .) pour séparer les milliers." - -# @ edd -#: includes/register-settings.php:98 -msgid "Decimal Separator" -msgstr "Séparateur décimal" - -# @ edd -#: includes/register-settings.php:99 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "Le séparateur (le plus souvent , ou .) pour séparer les décimales." - -# @ edd -#: includes/register-settings.php:110 includes/admin/settings/settings.php:34 -msgid "Payment Gateways" -msgstr "Portails de paiement" - -# @ edd -#: includes/register-settings.php:111 -msgid "Choose the payment gateways you want to enable." -msgstr "Choisissez les passerelles de paiement que vous désirez activer." - -# @ edd -#: includes/register-settings.php:117 -msgid "Accepted Payment Method Icons" -msgstr "Icônes des méthodes de paiement acceptées" - -# @ edd -#: includes/register-settings.php:118 -msgid "Display icons for the selected payment methods" -msgstr "Afficher les icônes pour les méthodes de paiement acceptées" - -# @ edd -#: includes/register-settings.php:118 -msgid "" -"You will also need to configure your gateway settings if you are accepting " -"credit cards" -msgstr "" -"Vous devrez également configurer les réglages de votre passerelle si vous " -"acceptez les cartes de crédit." - -# @ edd -#: includes/register-settings.php:131 -msgid "PayPal Settings" -msgstr "Réglages PayPal" - -# @ edd -#: includes/register-settings.php:132 -msgid "Configure the PayPal settings" -msgstr "Configurer les réglages PayPal" - -# @ edd -#: includes/register-settings.php:137 -msgid "PayPal Email" -msgstr "E-mail PayPal" - -# @ edd -#: includes/register-settings.php:138 -msgid "Enter your PayPal account's email" -msgstr "Fournissez votre adresse e-mail PayPal." - -# @ edd -#: includes/register-settings.php:144 -msgid "Alternate PayPal Purchase Verification" -msgstr "Vérification d'achat PayPal alternative" - -# @ edd -#: includes/register-settings.php:145 -msgid "" -"If payments are not getting marked as complete, then check this box. Note, " -"this requires that buyers return to your site from PayPal." -msgstr "" -"Si les paiements ne sont pas marqués comme terminés, cocher cette option. " -"Remarque, ce qui exige que les acheteurs reviennent sur votre site de PayPal." - -# @ edd -#: includes/register-settings.php:150 -msgid "Disable PayPal IPN Verification" -msgstr "Désactiver cURL pour l'IPN PayPal" - -# @ edd -#: includes/register-settings.php:151 -msgid "" -"If payments are not getting marked as complete, then check this box. This " -"forces the site to use a slightly less secure method of verifying purchases." -msgstr "" -"Si les paiements ne sont pas marqués comme terminés, cocher cette case. Cela " -"force le site a utiliser une méthode un peu moins sécurisée pour vérifier " -"les achats." - -#: includes/register-settings.php:160 -msgid "Email Template" -msgstr "Modèle d'e-mail" - -#: includes/register-settings.php:161 -msgid "" -"Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" " -"to see the new template." -msgstr "" -"Choisissez un modèle. Cliquez sur \"Enregistrer les modifications\" puis " -"\"Aperçu de reçu d'achat\" pour voir le nouveau modèle." - -# @ edd -#: includes/register-settings.php:173 -msgid "From Name" -msgstr "Nom de l'expéditeur" - -# @ edd -#: includes/register-settings.php:174 -msgid "" -"The name purchase receipts are said to come from. This should probably be " -"your site or shop name." -msgstr "" -"Nom de l'expéditeur pour les factures d'achat. Par exemple le nom de votre " -"site ou magasin." - -# @ edd -#: includes/register-settings.php:179 -msgid "From Email" -msgstr "E-mail de l'expéditeur" - -# @ edd -#: includes/register-settings.php:180 -msgid "" -"Email to send purchase receipts from. This will act as the \"from\" and " -"\"reply-to\" address." -msgstr "Adresse e-mail de l'expéditeur." - -# @ edd -#: includes/register-settings.php:185 -msgid "Purchase Email Subject" -msgstr "Sujet de l'e-mail relatif à l'achat" - -# @ edd -#: includes/register-settings.php:186 -msgid "Enter the subject line for the purchase receipt email" -msgstr "Le sujet de l'e-mail correspondant à la facture de l'achat." - -# @ edd -#: includes/register-settings.php:192 -msgid "" -"Enter the email that is sent to users after completing a successful " -"purchase. HTML is accepted. Available template tags:" -msgstr "" -"Fournissez l'e-mail qui sera envoyé aux utilisateurs après un achat réussi. " -"HTML autorisé. Balises autorisées :" - -# @ edd -#: includes/register-settings.php:193 -msgid "A list of download URLs for each download purchased" -msgstr "Liste des URL de téléchargements pour chaque téléchargement acheté" - -# @ edd -#: includes/register-settings.php:194 -msgid "The buyer's name" -msgstr "Nom de l'acheteur" - -# @ edd -#: includes/register-settings.php:195 -msgid "The date of the purchase" -msgstr "Date de l'achat" - -# @ edd -#: includes/register-settings.php:196 -msgid "The total price of the purchase" -msgstr "Le prix total de l'achat" - -# @ edd -#: includes/register-settings.php:197 -msgid "The unique ID number for this purchase receipt" -msgstr "Le nombre de l'ID unique pour cette facture d'achat." - -# @ edd -#: includes/register-settings.php:198 -msgid "The method of payment used for this purchase" -msgstr "La méthode de paiement utilisée pour cet achat" - -# @ edd -#: includes/register-settings.php:199 -msgid "Your site name" -msgstr "Nom du site web" - -#: includes/register-settings.php:208 -msgid "Disable Styles" -msgstr "Désactiver les styles" - -#: includes/register-settings.php:209 -msgid "Check this to disable all included styling" -msgstr "Cocher cette case pour désactiver tous les style inclus." - -# @ edd -#: includes/register-settings.php:214 -msgid "Buttons" -msgstr "Boutons" - -#: includes/register-settings.php:215 -msgid "Options for add to cart and purchase buttons" -msgstr "Options pour les boutons ajouter au panier et achater" - -# @ edd -#: includes/register-settings.php:220 -msgid "Default Button Style" -msgstr "Style par défaut du bouton" - -#: includes/register-settings.php:221 -msgid "Choose the style you want to use for the buttons." -msgstr "Choisir le style que vous souhaitez utiliser pour les boutons." - -# @ edd -#: includes/register-settings.php:227 -msgid "Default Button Color" -msgstr "Couleur par défaut du bouton" - -#: includes/register-settings.php:228 -msgid "Choose the color you want to use for the buttons." -msgstr "Choisir la couleur que vous souhaitez utiliser pour les boutons." - -# @ edd -#: includes/register-settings.php:238 -msgid "Disable Ajax" -msgstr "Desactiver Ajax" - -# @ edd -#: includes/register-settings.php:239 -msgid "Check this to disable AJAX for the shopping cart." -msgstr "Cocher pour desactiver AJAX pour le panier." - -# @ edd -#: includes/register-settings.php:244 -msgid "Enable jQuery Validation" -msgstr "Activer la validation jQuery" - -# @ edd -#: includes/register-settings.php:245 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "" -"Cocher pour activer la validation jQuery sur le formulaire de commande." - -# @ edd -#: includes/register-settings.php:250 -msgid "Disable Guest Checkout" -msgstr "Désactiver la commande pour les comptes invité" - -# @ edd -#: includes/register-settings.php:251 -msgid "Require that users be logged-in to purchase files." -msgstr "" -"Exiger que les utilisateurs soient connectés pour acheter des fichiers." - -# @ edd -#: includes/register-settings.php:256 -msgid "Show Register / Login Form?" -msgstr "Montrer le fomualire de connection / inscription ?" - -# @ edd -#: includes/register-settings.php:257 -msgid "" -"Display the registration and login forms on the checkout page for non-logged-" -"in users." -msgstr "" -"Afficher les formulaires d'inscription et de connection sur la page de " -"commande pour les utilisateurs non connectés." - -# @ edd -#: includes/register-settings.php:262 -msgid "Download Link Expiration" -msgstr "Expiration du lien de téléchargement" - -#: includes/register-settings.php:263 -msgid "" -"How long should download links be valid for? Default is 24 hours from the " -"time they are generated. Enter a time in hours." -msgstr "" -"Combien de temps les liens de téléchargement sont-ils disponibles ? La " -"valeur par défaut est de 24 heures à partir du moment où ils sont générés. " -"Entrez un temps en heures." - -# @ edd -#: includes/register-settings.php:269 -msgid "Disable Redownload?" -msgstr "Désactiver le re-téléchargement" - -# @ edd -#: includes/register-settings.php:270 -msgid "" -"Check this if you do not want to allow users to redownload items from their " -"purchase history." -msgstr "" -"Cocher si vous ne désirez pas autoriser les utilisateurs à re-télécharger " -"les articles de leur historique d'achat." - -#: includes/register-settings.php:275 -msgid "Terms of Agreement" -msgstr "Termes du Contrat" - -#: includes/register-settings.php:281 -msgid "Agree to Terms" -msgstr "Accepter les termes" - -#: includes/register-settings.php:282 -msgid "" -"Check this to show an agree to terms on the checkout that users must agree " -"to before purchasing." -msgstr "" -"Cocher pour afficher un accord aux termes du contrat que les utilisateurs " -"doivent accepter avant l'achat." - -#: includes/register-settings.php:287 -msgid "Agree to Terms Label" -msgstr "Accepter les termes du contrat" - -#: includes/register-settings.php:288 -msgid "Label shown next to the agree to terms check box." -msgstr "Étiquette affiché à côté de la case accepter les termes du contrat." - -#: includes/register-settings.php:294 -msgid "Agreement Text" -msgstr "Texte du contrat" - -#: includes/register-settings.php:295 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "" -"Si accepter les termes du contrat est coché, entrez les termes de l'accord " -"ci-dessus." - -# @ edd -#: includes/register-settings.php:300 -msgid "Complete Purchase Text" -msgstr "Texte pour un achat terminé" - -# @ edd -#: includes/register-settings.php:301 -msgid "The button label for completing a purchase." -msgstr "Le libellé du bouton pour compléter un achat." - -#: includes/register-settings.php:306 -msgid "Add to Cart Text" -msgstr "Texte pour ajouter au panier" - -#: includes/register-settings.php:307 -msgid "Text shown on the Add to Cart Buttons" -msgstr "Le texte affiché sur les boutons ajouter au panier" - -# @ edd -#: includes/register-settings.php:333 -msgid "General Settings" -msgstr "Réglages généraux" - -# @ edd -#: includes/register-settings.php:359 -msgid "Payment Gateway Settings" -msgstr "Réglages des passerelles de paiement" - -# @ edd -#: includes/register-settings.php:385 -msgid "Email Settings" -msgstr "Réglages de l'e-mail" - -# @ edd -#: includes/register-settings.php:411 -msgid "Style Settings" -msgstr "Réglages de style" - -# @ edd -#: includes/register-settings.php:438 -msgid "Misc Settings" -msgstr "Réglages divers" - -# @ edd -#: includes/register-settings.php:727 -msgid "Upload File" -msgstr "Télécharger fichier" - -# @ edd -#: includes/register-settings.php:765 -msgid "Settings Updated" -msgstr "Réglages mis à jour" - -# @ edd -#: includes/scripts.php:40 -msgid "Please enter a discount code" -msgstr "Veuillez fournir un code promo" - -# @ edd -#: includes/scripts.php:41 -msgid "Discount Applied" -msgstr "Code promo appliqué" - -# @ edd -#: includes/scripts.php:42 -msgid "Please enter an email address before applying a discount code" -msgstr "Veuillez fournir une adresse e-mail avant d'appliquer un code promo" - -# @ edd -#: includes/scripts.php:44 -msgid "You have already added this item to your cart" -msgstr "Vous avez déjà ajouté cet article à votre panier" - -# @ edd -#: includes/scripts.php:45 -msgid "Your cart is empty" -msgstr "Votre panier est vide" - -# @ edd -#: includes/scripts.php:46 -msgid "Loading" -msgstr "Chargement en cours" - -# @ edd -#: includes/scripts.php:123 -msgid "Add New Download" -msgstr "Ajouter un téléchargement" - -#: includes/scripts.php:124 -msgid "Use This File" -msgstr "Utiliser ce fichier" - -#: includes/scripts.php:125 -msgid "Sorry, not available for variable priced products." -msgstr "Désolé, non disponible pour des produits à prix variables." - -#: includes/scripts.php:126 -msgid "Are you sure you wish to delete this payment?" -msgstr "Etes-vous sûr de vouloir supprimer ce paiement ?" - -#: includes/scripts.php:127 -msgid "You must have at least one price" -msgstr "Vous devez avoir au moins un prix" - -#: includes/scripts.php:128 -msgid "You must have at least one file" -msgstr "Vous devez avoir au moins un fichier" - -# @ edd -#: includes/scripts.php:129 -msgid "You must have at least one field" -msgstr "Vous devez avoir au moins un champ" - -# @ edd -#: includes/shortcodes.php:194 -msgid "Purchase All Items" -msgstr "Tout Acheter" - -# @ edd -#: includes/shortcodes.php:336 -#, php-format -msgctxt "download post type name" -msgid "No %s found" -msgstr "Aucun %s trouvé" - -#: includes/template-functions.php:48 -#, php-format -msgid "" -"No checkout page has been configured. Visit Settings to " -"set one." -msgstr "" -"Aucune page de commande n'a été configurée. Se rendre dans les Réglages pour en configurer une." - -# @ edd -#: includes/template-functions.php:167 -msgid "added to your cart" -msgstr "ajouté au panier" - -#: includes/template-functions.php:263 -msgid "Gray" -msgstr "Gris" - -#: includes/template-functions.php:264 -msgid "Pink" -msgstr "Rose" - -#: includes/template-functions.php:265 -msgid "Blue" -msgstr "Bleu" - -#: includes/template-functions.php:266 -msgid "Green" -msgstr "Vert" - -# @ edd -#: includes/template-functions.php:267 -msgid "Teal" -msgstr "Sarcelle (bleu-vert)" - -# @ edd -#: includes/template-functions.php:268 -msgid "Black" -msgstr "Noir" - -#: includes/template-functions.php:269 -msgid "Dark Gray" -msgstr "Gris foncé" - -#: includes/template-functions.php:270 -msgid "Orange" -msgstr "Orange" - -#: includes/template-functions.php:271 -msgid "Purple" -msgstr "Violet" - -# @ edd -#: includes/template-functions.php:272 -msgid "Slate" -msgstr "Ardoise" - -# @ edd -#: includes/template-functions.php:293 -msgid "Button" -msgstr "Bouton" - -# @ edd -#: includes/template-functions.php:294 -msgid "Plain Text" -msgstr "Texte brut" - -# @ edd -#: includes/template-functions.php:317 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "" -"Vous avez déjà acheté cet article, mais vous pouvez l'acheter à nouveau." - -# @ edd -#: includes/widgets.php:39 -msgid "Downloads Cart" -msgstr "Panier des téléchargements" - -# @ edd -#: includes/widgets.php:39 -msgid "Display the downloads shopping cart" -msgstr "Afficher le panier des téléchargements" - -# @ edd -#: includes/widgets.php:82 includes/widgets.php:162 -msgid "Title:" -msgstr "Titre :" - -# @ edd -#: includes/widgets.php:87 -msgid "Show Quantity:" -msgstr "Montrer la quantité :" - -# @ edd -#: includes/widgets.php:112 -msgid "Downloads Categories / Tags" -msgstr "Catégories / Mots-clefs des téléchargements" - -# @ edd -#: includes/widgets.php:112 -msgid "Display the downloads categories or tags" -msgstr "Afficher les catégories ou les mots-clefs des téléchargements" - -#: includes/widgets.php:167 -msgid "Taxonomy:" -msgstr "Taxinomie :" - -#: includes/widgets.php:193 -msgid "Display a user's purchase history" -msgstr "Affiche un historique d'achat de l'utilisateur" - -# @ edd -#: includes/widgets.php:232 includes/templates/history-downloads.php:48 -#: includes/templates/history-purchases.php:48 -msgid "No downloadable files found." -msgstr "Aucun fichier téléchargeable trouvé." - -# @ edd -#: includes/widgets.php:259 -msgid "Title" -msgstr "Titre" - -# @ edd -#: includes/widgets.php:299 -msgid "Easy Digital Downloads Sales Summary" -msgstr "Résumé des ventes d'Easy Digital Downloads" - -# @ edd -#: includes/widgets.php:318 -msgid "Current Month" -msgstr "Mois en cours" - -# @ edd -#: includes/widgets.php:323 includes/admin/downloads/dashboard-columns.php:31 -#: includes/admin/reporting/graphing.php:78 -#: includes/admin/reporting/graphing.php:122 -#: includes/admin/reporting/graphing.php:169 -#: includes/admin/reporting/pdf-reports.php:191 -msgid "Earnings" -msgstr "Revenus" - -# @ edd -#: includes/widgets.php:327 includes/admin/downloads/dashboard-columns.php:30 -#: includes/admin/reporting/graphing.php:32 -#: includes/admin/reporting/graphing.php:222 -#: includes/admin/reporting/pdf-reports.php:208 -msgid "Sales" -msgstr "Ventes" - -# @ edd -#: includes/widgets.php:333 -msgid "Totals" -msgstr "Totaux" - -# @ edd -#: includes/widgets.php:338 -msgid "Total Earnings" -msgstr "Total des gains" - -# @ edd -#: includes/widgets.php:342 -msgid "Total Sales" -msgstr "Total des ventes" - -# @ edd -#: includes/admin/add-ons.php:69 -msgid "Add Ons for Easy Digital Downloads" -msgstr "Modules complémentaires pour Easy Digital Downloads" - -#: includes/admin/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "" -"Ces modules complémentaires étendent les fonctionnalités d'Easy Digital " -"Downloads." - -#: includes/admin/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "Parcourir toutes les extensions" - -# @ edd -#: includes/admin/admin-notices.php:30 -msgid "Discount code updated." -msgstr "Code promo mis à jour." - -# @ edd -#: includes/admin/admin-notices.php:33 -msgid "There was a problem updating your discount code, please try again." -msgstr "" -"Une erreur s'est produite lors de la mise à jour de votre code promotionnel, " -"veuillez réessayer." - -#: includes/admin/admin-notices.php:36 -msgid "The payment has been deleted." -msgstr "Le paiement a été supprimé." - -#: includes/admin/admin-notices.php:39 -msgid "The purchase receipt has been resent." -msgstr "La facture d'achat a été renvoyée." - -#: includes/admin/admin-notices.php:44 -#, php-format -msgid "The payment history needs updated. %s" -msgstr "L'historique des paiements doit être mise à jour. %s" - -#: includes/admin/admin-notices.php:44 -msgid "Click to Upgrade" -msgstr "Cliquez pour mettre à niveau" - -#: includes/admin/admin-notices.php:62 -msgid "" -"There seems to be an issue with the server. Please try again in a few " -"minutes." -msgstr "" -"Il semble y avoir un problème avec le serveur. S'il vous plaît essayez de " -"nouveau dans quelques minutes." - -# @ edd -#: includes/admin/admin-pages.php:27 -#: includes/admin/discounts/discount-codes.php:34 -msgid "Discount Codes" -msgstr "Codes promo" - -# @ edd -#: includes/admin/admin-pages.php:28 -msgid "Earnings and Sales Reports" -msgstr "Rapports de revenus et de ventes" - -# @ edd -#: includes/admin/admin-pages.php:28 includes/admin/reporting/reports.php:28 -msgid "Reports" -msgstr "Rapports" - -# @ edd -#: includes/admin/admin-pages.php:29 -msgid "Easy Digital Download Settings" -msgstr "Réglages Easy Digital Download" - -# @ edd -#: includes/admin/admin-pages.php:29 -msgid "Settings" -msgstr "Réglages" - -# @ edd -#: includes/admin/admin-pages.php:30 -msgid "Easy Digital Download Add Ons" -msgstr "Modules Easy Digital Downloads" - -#: includes/admin/admin-pages.php:30 -msgid "Add Ons" -msgstr "Modules complémentaires" - -# @ edd -#: includes/admin/export-functions.php:39 -#: includes/admin/payments/payments-history.php:137 -#: includes/admin/payments/payments-history.php:155 -msgid "ID" -msgstr "ID" - -# @ edd -#: includes/admin/export-functions.php:43 -#: includes/admin/payments/payments-history.php:140 -#: includes/admin/payments/payments-history.php:157 -msgid "Products" -msgstr "Produits" - -# @ edd -#: includes/admin/export-functions.php:44 -msgid "Discounts," -msgstr "Remises," - -# @ edd -#: includes/admin/export-functions.php:45 -msgid "Amount paid" -msgstr "Somme payée" - -# @ edd -#: includes/admin/export-functions.php:46 -msgid "Payment method" -msgstr "Méthode de paiement" - -# @ edd -#: includes/admin/export-functions.php:47 -msgid "Key" -msgstr "Clé" - -# @ edd -#: includes/admin/export-functions.php:48 -#: includes/admin/downloads/dashboard-columns.php:33 -#: includes/admin/payments/payments-history.php:145 -#: includes/admin/payments/payments-history.php:159 -#: includes/templates/history-purchases.php:12 -msgid "Date" -msgstr "Date" - -# @ edd -#: includes/admin/export-functions.php:49 -#: includes/admin/payments/payments-history.php:147 -#: includes/admin/payments/payments-history.php:160 -msgid "User" -msgstr "Utilisateur" - -# @ edd -#: includes/admin/export-functions.php:50 -#: includes/admin/discounts/discount-codes.php:46 -#: includes/admin/discounts/discount-codes.php:59 -#: includes/admin/discounts/edit-discount.php:98 -#: includes/admin/payments/payments-history.php:149 -#: includes/admin/payments/payments-history.php:161 -msgid "Status" -msgstr "État" - -# @ edd -#: includes/admin/export-functions.php:111 -#: includes/admin/export-functions.php:119 -#: includes/admin/payments/payments-history.php:250 -msgid "none" -msgstr "aucun" - -# @ edd -#: includes/admin/export-functions.php:127 -#: includes/admin/payments/payments-history.php:285 -#: includes/admin/payments/payments-history.php:287 -msgid "guest" -msgstr "invité" - -# @ edd -#: includes/admin/export-functions.php:135 -#: includes/admin/payments/payments-history.php:298 -msgid "No payments recorded yet" -msgstr "Aucun paiement encore enregistré" - -#: includes/admin/export-functions.php:169 -msgid "Export not allowed for non-administrators." -msgstr "L'exportation n'est pas autorisé pour les non-administrateurs." - -#: includes/admin/thickbox.php:29 includes/admin/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "Insérer %s" - -# @ edd -#: includes/admin/thickbox.php:30 -msgid "Insert Download" -msgstr "Insérer téléchargement" - -# @ edd -#: includes/admin/thickbox.php:65 -msgid "You must choose a download" -msgstr "Vous devez sélectionner un téléchargement" - -# @ edd -#: includes/admin/thickbox.php:88 -#, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "" -"Utiliser le formulaire ci-dessous pour insérer le code macro pour acheter un " -"%s." - -# @ edd -#: includes/admin/thickbox.php:91 -#, php-format -msgid "Choose a %s" -msgstr "Choisir un %s" - -# @ edd -#: includes/admin/thickbox.php:100 -msgid "Choose a style" -msgstr "Sélectionner un style" - -# @ edd -#: includes/admin/thickbox.php:111 -msgid "Choose a button color" -msgstr "Sélectionnez une couleur pour le bouton" - -# @ edd -#: includes/admin/thickbox.php:120 -msgid "Link text . . ." -msgstr "Texte du lien . . ." - -# @ edd -#: includes/admin/thickbox.php:124 -msgid "Cancel" -msgstr "Annuler" - -# @ edd -#: includes/admin/thickbox.php:126 -msgid "Button Styles" -msgstr "Styles des boutons" - -# @ edd -#: includes/admin/discounts/add-discount.php:12 -msgid "Add New Discount" -msgstr "Ajouter une Nouvelle Promo" - -# @ edd -#: includes/admin/discounts/add-discount.php:18 -#: includes/admin/discounts/discount-codes.php:39 -#: includes/admin/discounts/discount-codes.php:52 -#: includes/admin/discounts/edit-discount.php:23 -#: includes/admin/downloads/dashboard-columns.php:26 -msgid "Name" -msgstr "Nom" - -# @ edd -#: includes/admin/discounts/add-discount.php:22 -#: includes/admin/discounts/edit-discount.php:27 -msgid "The name of this discount" -msgstr "Le nom de cette promo." - -# @ edd -#: includes/admin/discounts/add-discount.php:27 -#: includes/admin/discounts/discount-codes.php:40 -#: includes/admin/discounts/discount-codes.php:53 -#: includes/admin/discounts/edit-discount.php:32 -msgid "Code" -msgstr "Code" - -# @ edd -#: includes/admin/discounts/add-discount.php:31 -#: includes/admin/discounts/edit-discount.php:36 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "Encoder un code pour cette promo, par exemple 10POURCENT." - -# @ edd -#: includes/admin/discounts/add-discount.php:36 -#: includes/admin/discounts/edit-discount.php:41 -msgid "Type" -msgstr "Type" - -# @ edd -#: includes/admin/discounts/add-discount.php:40 -#: includes/admin/discounts/edit-discount.php:45 -msgid "Percentage" -msgstr "Pourcentage" - -# @ edd -#: includes/admin/discounts/add-discount.php:41 -#: includes/admin/discounts/edit-discount.php:46 -msgid "Flat amount" -msgstr "Montant fixe" - -# @ edd -#: includes/admin/discounts/add-discount.php:43 -#: includes/admin/discounts/edit-discount.php:48 -msgid "The kind of discount to apply for this discount." -msgstr "Le type de promo à lui appliquer." - -# @ edd -#: includes/admin/discounts/add-discount.php:48 -#: includes/admin/discounts/discount-codes.php:41 -#: includes/admin/discounts/discount-codes.php:54 -#: includes/admin/discounts/edit-discount.php:53 -#: includes/templates/history-purchases.php:13 -msgid "Amount" -msgstr "Montant" - -# @ edd -#: includes/admin/discounts/add-discount.php:52 -#: includes/admin/discounts/edit-discount.php:57 -msgid "The amount of this discount code." -msgstr "Le montant de ce code promo." - -# @ edd -#: includes/admin/discounts/add-discount.php:57 -#: includes/admin/discounts/edit-discount.php:62 -msgid "Start date" -msgstr "Date de début" - -# @ edd -#: includes/admin/discounts/add-discount.php:61 -#: includes/admin/discounts/edit-discount.php:66 -msgid "" -"Enter the start date for this discount code in the format of mm/dd/yyyy. For " -"no start date, leave blank. If entered, the discount can only be used after " -"or on this date." -msgstr "" -"Entrer la date de début pour ce code promo au format mm/jj/aaaa. Laissez le " -"champ vide pour ne pas appliquer de date de début. Si rempli, la promo ne " -"pourra être utilisée qu'à partir de cette date." - -# @ edd -#: includes/admin/discounts/add-discount.php:66 -#: includes/admin/discounts/edit-discount.php:71 -msgid "Expiration date" -msgstr "Date d'expiration" - -# @ edd -#: includes/admin/discounts/add-discount.php:70 -#: includes/admin/discounts/edit-discount.php:75 -msgid "" -"Enter the expiration date for this discount code in the format of mm/dd/" -"yyyy. For no expiration, leave blank" -msgstr "" -"Entrer la date d'expiration pour ce code promo au format mm/jj/aaaa. Laissez " -"vide pour ne pas appliquer de date d'expiration." - -# @ edd -#: includes/admin/discounts/add-discount.php:75 -#: includes/admin/discounts/edit-discount.php:89 -msgid "Minimum Amount" -msgstr "Montant minimum" - -# @ edd -#: includes/admin/discounts/add-discount.php:79 -#: includes/admin/discounts/edit-discount.php:93 -msgid "" -"The minimum amount that must be purchased before this discount can be used. " -"Leave blank for no minimum." -msgstr "" -"Le montant minimum qui doit être acheté avant que cette remise ne puisse " -"être utilisée. Laisser vide pour aucun minimum." - -# @ edd -#: includes/admin/discounts/add-discount.php:84 -#: includes/admin/discounts/discount-codes.php:43 -#: includes/admin/discounts/discount-codes.php:56 -#: includes/admin/discounts/edit-discount.php:80 -msgid "Max Uses" -msgstr "Nombre maximum d'utilisations" - -# @ edd -#: includes/admin/discounts/add-discount.php:88 -#: includes/admin/discounts/edit-discount.php:84 -msgid "" -"The maximum number of times this discount can be used. Leave blank for " -"unlimited." -msgstr "" -"Nombre maximum d'utilisations autorisées pour ce code promo. Laissez vide " -"pour un nombre illimité." - -# @ edd -#: includes/admin/discounts/add-discount.php:96 -msgid "Add Discount Code" -msgstr "Ajouter Code Promo" - -# @ edd -#: includes/admin/discounts/discount-codes.php:42 -#: includes/admin/discounts/discount-codes.php:55 -msgid "Uses" -msgstr "Utilisations" - -# @ edd -#: includes/admin/discounts/discount-codes.php:44 -#: includes/admin/discounts/discount-codes.php:57 -msgid "Start Date" -msgstr "Date de début" - -# @ edd -#: includes/admin/discounts/discount-codes.php:45 -#: includes/admin/discounts/discount-codes.php:58 -msgid "Expiration" -msgstr "Expiration" - -# @ edd -#: includes/admin/discounts/discount-codes.php:47 -#: includes/admin/discounts/discount-codes.php:60 -#: includes/templates/checkout_cart.php:8 -msgid "Actions" -msgstr "Actions" - -# @ edd -#: includes/admin/discounts/discount-codes.php:82 -#: includes/admin/discounts/discount-codes.php:84 -msgid "unlimited" -msgstr "illimité" - -# @ edd -#: includes/admin/discounts/discount-codes.php:93 -msgid "No start date" -msgstr "Pas de date de début" - -# @ edd -#: includes/admin/discounts/discount-codes.php:100 -msgid "Expired" -msgstr "Expiré" - -# @ edd -#: includes/admin/discounts/discount-codes.php:102 -msgid "no expiration" -msgstr "pas d'expiration" - -# @ edd -#: includes/admin/discounts/discount-codes.php:108 -#: includes/admin/payments/payments-history.php:183 -msgid "Edit" -msgstr "Modifier" - -# @ edd -#: includes/admin/discounts/discount-codes.php:110 -msgid "Deactivate" -msgstr "Désactiver" - -# @ edd -#: includes/admin/discounts/discount-codes.php:112 -msgid "Activate" -msgstr "Activer" - -# @ edd -#: includes/admin/discounts/discount-codes.php:114 -#: includes/admin/payments/payments-history.php:185 -msgid "Delete" -msgstr "Supprimer" - -# @ edd -#: includes/admin/discounts/discount-codes.php:119 -msgid "No discount codes have been created." -msgstr "Aucun code promo créé." - -# @ edd -#: includes/admin/discounts/edit-discount.php:13 -msgid "Something went wrong." -msgstr "Une erreur s'est produite." - -# @ edd -#: includes/admin/discounts/edit-discount.php:17 -msgid "Edit Discount" -msgstr "Éditer la promo" - -# @ edd -#: includes/admin/discounts/edit-discount.php:17 -#: includes/admin/payments/edit-payment.php:16 -msgid "Go Back" -msgstr "Retourner" - -# @ edd -#: includes/admin/discounts/edit-discount.php:102 -msgid "Active" -msgstr "Actif" - -# @ edd -#: includes/admin/discounts/edit-discount.php:103 -msgid "Inactive" -msgstr "Inactif" - -# @ edd -#: includes/admin/discounts/edit-discount.php:105 -msgid "The status of this discount code." -msgstr "L'état de ce code promo." - -# @ edd -#: includes/admin/discounts/edit-discount.php:115 -msgid "Update Discount Code" -msgstr "Mettre à jour Code Promo" - -# @ edd -#: includes/admin/downloads/dashboard-columns.php:29 -#: includes/admin/downloads/dashboard-columns.php:242 -#: includes/admin/downloads/metabox.php:171 -#: includes/admin/payments/payments-history.php:142 -#: includes/admin/payments/payments-history.php:158 -#: includes/admin/reporting/pdf-reports.php:66 -msgid "Price" -msgstr "Prix" - -# @ edd -#: includes/admin/downloads/dashboard-columns.php:32 -msgid "Short Code" -msgstr "Code de raccourci" - -# @ edd -#: includes/admin/downloads/dashboard-columns.php:200 -msgid "Show all categories" -msgstr "Montrer toutes les catégories" - -# @ edd -#: includes/admin/downloads/dashboard-columns.php:211 -msgid "Show all tags" -msgstr "Montrer tous les tags" - -#: includes/admin/downloads/dashboard-columns.php:239 -#, php-format -msgid "%s Data" -msgstr "%s Data" - -# @ edd -#: includes/admin/downloads/metabox.php:23 -#, php-format -msgid "%1$s Configuration" -msgstr "Configuration %1$s " - -# @ edd -#: includes/admin/downloads/metabox.php:26 -msgid "Product Notes" -msgstr "Notes du produit" - -# @ edd -#: includes/admin/downloads/metabox.php:29 -#, php-format -msgid "%1$s Stats" -msgstr "Statistiques %1$s " - -# @ edd -#: includes/admin/downloads/metabox.php:32 -msgid "Purchase Log" -msgstr "Compte-rendu d'achats" - -# @ edd -#: includes/admin/downloads/metabox.php:35 -msgid "File Download Log" -msgstr "Compte-rendu de téléchargement de fichiers" - -# @ edd -#: includes/admin/downloads/metabox.php:145 -msgid "Pricing Options:" -msgstr "Options de prix :" - -# @ edd -#: includes/admin/downloads/metabox.php:151 -msgid "Enable variable pricing" -msgstr "Permettre la tarification variable" - -#: includes/admin/downloads/metabox.php:170 -#: includes/admin/downloads/metabox.php:233 -msgid "Option Name" -msgstr "Nom de l'option" - -# @ edd -#: includes/admin/downloads/metabox.php:199 -msgid "Add New Price" -msgstr "Ajouter un nouveau prix" - -# @ edd -#: includes/admin/downloads/metabox.php:275 -msgid "File Downloads:" -msgstr "Téléchargements de fichiers :" - -# @ edd -#: includes/admin/downloads/metabox.php:284 -#: includes/admin/downloads/metabox.php:351 -msgid "File Name" -msgstr "Nom du fichier" - -# @ edd -#: includes/admin/downloads/metabox.php:285 -msgid "File URL" -msgstr "Adresse url du fichier" - -#: includes/admin/downloads/metabox.php:286 -msgid "Price Assignment" -msgstr "Affectation de prix" - -# @ edd -#: includes/admin/downloads/metabox.php:314 -msgid "Add New File" -msgstr "Ajouter un nouveau fichier" - -#: includes/admin/downloads/metabox.php:355 -msgid "http://" -msgstr "http://" - -# @ edd -#: includes/admin/downloads/metabox.php:358 -msgid "Upload a File" -msgstr "Télécharger un fichier" - -# @ edd -#: includes/admin/downloads/metabox.php:364 -msgid "All Prices" -msgstr "Prix catalogue" - -# @ edd -#: includes/admin/downloads/metabox.php:391 -msgid "Button Options:" -msgstr "Options du bouton :" - -# @ edd -#: includes/admin/downloads/metabox.php:397 -msgid "Disable the automatic output of the purchase button" -msgstr "Désactiver le formatage automatique du bouton d'achat" - -#: includes/admin/downloads/metabox.php:457 -msgid "" -"Special notes or instructions for this product. These notes will be added to " -"the purchase receipt." -msgstr "" -"Remarques particulières ou des instructions pour ce produit. Ces remarques " -"seront ajoutées à la facture d'achat." - -# @ edd -#: includes/admin/downloads/metabox.php:479 -msgid "Sales:" -msgstr "Ventes :" - -# @ edd -#: includes/admin/downloads/metabox.php:485 -msgid "Earnings:" -msgstr "Revenus :" - -# @ edd -#: includes/admin/downloads/metabox.php:521 -msgid "Sales Log" -msgstr "Compte-rendu de ventes" - -# @ edd -#: includes/admin/downloads/metabox.php:523 -msgid "Each sale for this download is listed below." -msgstr "Chaque vente pour ce téléchargement est affiché ci-dessous." - -# @ edd -#: includes/admin/downloads/metabox.php:537 -#: includes/admin/downloads/metabox.php:629 -msgid "Date:" -msgstr "Date:" - -# @ edd -#: includes/admin/downloads/metabox.php:541 -msgid "Buyer:" -msgstr "Acheteur :" - -# @ edd -#: includes/admin/downloads/metabox.php:545 -msgid "Purchase ID:" -msgstr "ID de l'achat :" - -# @ edd -#: includes/admin/downloads/metabox.php:553 -msgid "No sales yet" -msgstr "Pas encore de ventes" - -# @ edd -#: includes/admin/downloads/metabox.php:569 -#: includes/admin/downloads/metabox.php:666 -#: includes/admin/payments/payments-history.php:318 -msgid "Previous" -msgstr "Précédent" - -# @ edd -#: includes/admin/downloads/metabox.php:610 -msgid "Download Log" -msgstr "Compte-rendu de téléchargement" - -# @ edd -#: includes/admin/downloads/metabox.php:612 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "" -"Chaque fois qu'un fichier est téléchargé, l'opération est enregistrée ci-" -"dessous." - -# @ edd -#: includes/admin/downloads/metabox.php:633 -msgid "Downloaded by:" -msgstr "Téléchargé par :" - -# @ edd -#: includes/admin/downloads/metabox.php:637 -msgid "IP Address:" -msgstr "Adresse IP :" - -# @ edd -#: includes/admin/downloads/metabox.php:641 -msgid "File: " -msgstr "Fichier :" - -# @ edd -#: includes/admin/downloads/metabox.php:650 -msgid "No file downloads yet yet" -msgstr "Aucun fichier encore téléchargé" - -# @ edd -#: includes/admin/payments/edit-payment.php:22 -msgid "Buyer's Email" -msgstr "Adresse e-mail de l'acheteur" - -#: includes/admin/payments/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "Si nécessaire, vous pouvez mettre à jour l'e-mail de l'acheteur ici." - -# @ edd -#: includes/admin/payments/edit-payment.php:31 -msgid "Downloads Purchased" -msgstr "Téléchargements achetés" - -# @ edd -#: includes/admin/payments/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "Ajouter téléchargement à l'achat #%s" - -# @ edd -#: includes/admin/payments/edit-payment.php:43 -msgid "Add download to purchase" -msgstr "Ajouter téléchargement à l'achat" - -# @ edd -#: includes/admin/payments/edit-payment.php:48 -msgid "Payment Status" -msgstr "État du paiement" - -# @ edd -#: includes/admin/payments/edit-payment.php:64 -msgid "Send Purchase Receipt" -msgstr "Envoyer le reçu de paiement" - -#: includes/admin/payments/edit-payment.php:68 -msgid "" -"Check this box to send the purchase receipt, including all download links." -msgstr "" -"Cocher cette case pour envoyer le reçu d'achat, avec tous les liens de " -"téléchargement." - -# @ edd -#: includes/admin/payments/edit-payment.php:78 -msgid "Update Payment" -msgstr "Mettre à jour paiement" - -# @ edd -#: includes/admin/payments/edit-payment.php:91 -msgid "Add Selected Downloads" -msgstr "Ajouter les téléchargements sélectionnés" - -# @ edd -#: includes/admin/payments/edit-payment.php:92 -#: includes/admin/payments/payments-history.php:274 -msgid "Close" -msgstr "Fermer" - -#: includes/admin/payments/payments-history.php:90 -msgid "All" -msgstr "Tous" - -# @ edd -#: includes/admin/payments/payments-history.php:95 -msgid "Completed" -msgstr "Terminé" - -# @ edd -#: includes/admin/payments/payments-history.php:106 -msgid "Export" -msgstr "Exporté" - -# @ edd -#: includes/admin/payments/payments-history.php:110 -msgid "Payment mode" -msgstr "Mode de paiement" - -# @ edd -#: includes/admin/payments/payments-history.php:112 -msgid "Live" -msgstr "Réel" - -# @ edd -#: includes/admin/payments/payments-history.php:113 -msgid "Test" -msgstr "Test" - -# @ edd -#: includes/admin/payments/payments-history.php:123 -msgid "Payments per page" -msgstr "Paiements par page" - -# @ edd -#: includes/admin/payments/payments-history.php:125 -msgid "Show" -msgstr "Afficher" - -# @ edd -#: includes/admin/payments/payments-history.php:131 -msgid "Showing payments for: " -msgstr "Afficher les paiements de :" - -# @ edd -#: includes/admin/payments/payments-history.php:131 -msgid "clear" -msgstr "effacer" - -# @ edd -#: includes/admin/payments/payments-history.php:184 -msgid "Resend Purchase Receipt" -msgstr "Renvoyer la facture d'achat" - -# @ edd -#: includes/admin/payments/payments-history.php:197 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "Détails de la commande pour le paiement #%s" - -# @ edd -#: includes/admin/payments/payments-history.php:197 -msgid "View Order Details" -msgstr "Afficher les détails de la commande" - -# @ edd -#: includes/admin/payments/payments-history.php:205 -msgid "Purchased File" -msgstr "Fichier acheté" - -# @ edd -#: includes/admin/payments/payments-history.php:205 -msgid "Purchased Files" -msgstr "Fichiers achetés" - -#: includes/admin/payments/payments-history.php:249 -msgid "Date and Time:" -msgstr "Date et Heure :" - -# @ edd -#: includes/admin/payments/payments-history.php:250 -msgid "Discount used:" -msgstr "Code promo utilisé :" - -# @ edd -#: includes/admin/payments/payments-history.php:251 -msgid "Total:" -msgstr "Total :" - -# @ edd -#: includes/admin/payments/payments-history.php:254 -msgid "Buyer's Personal Details:" -msgstr "Données personnelles de l'acheteur :" - -# @ edd -#: includes/admin/payments/payments-history.php:256 -msgid "Name:" -msgstr "Nom :" - -# @ edd -#: includes/admin/payments/payments-history.php:257 -msgid "Email:" -msgstr "E-mail :" - -# @ edd -#: includes/admin/payments/payments-history.php:266 -msgid "Payment Method:" -msgstr "Méthode de Paiement :" - -# @ edd -#: includes/admin/payments/payments-history.php:271 -msgid "Purchase Key" -msgstr "Clef d'achat" - -# @ edd -#: includes/admin/payments/payments-history.php:304 -msgid "Total Earnings:" -msgstr "Total des gains :" - -# @ edd -#: includes/admin/reporting/graphing.php:42 -#, php-format -msgid "%s Performance in Sales" -msgstr "%s Rendement des Ventes" - -# @ edd -#: includes/admin/reporting/graphing.php:88 -#, php-format -msgid "%s Performance in Earnings" -msgstr "%s Rendement des Revenus" - -# @ edd -#: includes/admin/reporting/graphing.php:136 -msgid "Earnings per month" -msgstr "Revenus mensuels" - -#: includes/admin/reporting/graphing.php:168 -msgid "Day" -msgstr "Jour" - -#: includes/admin/reporting/graphing.php:189 -#, php-format -msgid "Earnings per day for last %s days" -msgstr "Bénéfice par jour pour les %s derniers jours" - -# @ edd -#: includes/admin/reporting/graphing.php:236 -msgid "Sales per month" -msgstr "Revenus mensuel" - -#: includes/admin/reporting/pdf-reports.php:36 -msgid "to" -msgstr "à" - -#: includes/admin/reporting/pdf-reports.php:41 -#: includes/admin/reporting/pdf-reports.php:52 -msgid "Sales and earnings reports for the current year for all products" -msgstr "" -"Rapports des ventes et des bénéfices pour l'année en cours pour tous les " -"produits" - -# @ edd -#: includes/admin/reporting/pdf-reports.php:42 -#: includes/admin/reporting/pdf-reports.php:43 -msgid "Easy Digital Downloads" -msgstr "Easy Digital Downloads" - -#: includes/admin/reporting/pdf-reports.php:57 -msgid "Date Range: " -msgstr "Plage de dates :" - -#: includes/admin/reporting/pdf-reports.php:61 -msgid "Table View" -msgstr "Vu en tableau" - -# @ edd -#: includes/admin/reporting/pdf-reports.php:65 -msgid "Product Name" -msgstr "Nom du produit" - -#: includes/admin/reporting/pdf-reports.php:69 -msgid "Number of Sales" -msgstr "Nombre de ventes" - -# @ edd -#: includes/admin/reporting/pdf-reports.php:70 -msgid "Earnings to Date" -msgstr "Gains à ce jour" - -# @ edd -#: includes/admin/reporting/pdf-reports.php:112 -msgid "No Downloads found." -msgstr "Aucun téléchargement trouvé." - -#: includes/admin/reporting/pdf-reports.php:119 -msgid "Graph View" -msgstr "Vu en graphique" - -#: includes/admin/reporting/pdf-reports.php:212 -msgid "Sales and Earnings by Month for all Products" -msgstr "Ventes et bénéfices par mois pour tous les produits" - -#: includes/admin/reporting/pdf-reports.php:226 -msgid "Jan" -msgstr "Jan" - -#: includes/admin/reporting/pdf-reports.php:227 -msgid "Feb" -msgstr "Fév" - -#: includes/admin/reporting/pdf-reports.php:228 -msgid "Mar" -msgstr "Mar" - -#: includes/admin/reporting/pdf-reports.php:229 -msgid "Apr" -msgstr "Avr" - -#: includes/admin/reporting/pdf-reports.php:230 -msgid "May" -msgstr "Mai" - -#: includes/admin/reporting/pdf-reports.php:231 -msgid "June" -msgstr "Juin" - -#: includes/admin/reporting/pdf-reports.php:232 -msgid "July" -msgstr "Juillet" - -#: includes/admin/reporting/pdf-reports.php:233 -msgid "Aug" -msgstr "Août" - -#: includes/admin/reporting/pdf-reports.php:234 -msgid "Sept" -msgstr "Sept" - -#: includes/admin/reporting/pdf-reports.php:235 -msgid "Oct" -msgstr "Oct" - -#: includes/admin/reporting/pdf-reports.php:236 -msgid "Nov" -msgstr "Nov" - -#: includes/admin/reporting/pdf-reports.php:237 -msgid "Dec" -msgstr "Déc" - -#: includes/admin/reporting/reports.php:41 -msgid "Download Sales and Earnings PDF Report for all Products" -msgstr "" -"Télécharger le PDF du rapport des ventes et des bénéfices pour tous les " -"produits" - -#: includes/admin/reporting/reports.php:42 -msgid "Download a CSV Customers List" -msgstr "Télécharger une liste CSV de clients" - -# @ edd -#: includes/admin/reporting/reports.php:44 -msgid "" -"Please Note: Transactions created while in test mode are not included on " -"this page or in the PDF reports." -msgstr "" -"Veuillez noter : Les transactions créées en mode test ne sont pas incluses " -"sur cette page ou dans les rapports en PDF." - -# @ edd -#: includes/admin/settings/settings.php:33 -msgid "General" -msgstr "Généraux" - -# @ edd -#: includes/admin/settings/settings.php:35 -msgid "Emails" -msgstr "E-mails" - -# @ edd -#: includes/admin/settings/settings.php:36 -msgid "Styles" -msgstr "Styles" - -# @ edd -#: includes/admin/settings/settings.php:37 -msgid "Misc" -msgstr "Divers" - -# @ edd -#: includes/gateways/paypal.php:271 -msgid "Invalid IPN" -msgstr "IPN incorrect" - -# @ edd -#: includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "Nom de l'article" - -# @ edd -#: includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "Prix de l'article" - -# @ edd -#: includes/templates/checkout_cart.php:49 -msgid "Total" -msgstr "Total" - -# @ edd -#: includes/templates/history-downloads.php:10 -msgid "Download Name" -msgstr "Nom du téléchargement" - -# @ edd -#: includes/templates/history-downloads.php:12 -#: includes/templates/history-purchases.php:14 -msgid "Files" -msgstr "Fichiers" - -# @ edd -#: includes/templates/history-downloads.php:68 -msgid "You have not purchased any downloads" -msgstr "Vous n'avez acheté aucun téléchargement" - -# @ edd -#: includes/templates/history-purchases.php:11 -msgid "Purchase ID" -msgstr "ID de l'achat " - -# @ edd -#: includes/templates/history-purchases.php:61 -msgid "You have not made any purchases" -msgstr "Vous n'avez fait aucun achat" - -#~ msgid "9.99" -#~ msgstr "9.99" - -#~ msgctxt "Variable price preposition. $2.99 for {X}" -#~ msgid "for" -#~ msgstr "pour" diff --git a/languages/edd-it_IT.mo b/languages/edd-it_IT.mo deleted file mode 100755 index 4afb89d48bc..00000000000 Binary files a/languages/edd-it_IT.mo and /dev/null differ diff --git a/languages/edd-it_IT.po b/languages/edd-it_IT.po deleted file mode 100755 index 05ba06fec67..00000000000 --- a/languages/edd-it_IT.po +++ /dev/null @@ -1,4667 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -<<<<<<< HEAD -"POT-Creation-Date: 2012-09-11 14:07-0600\n" -"PO-Revision-Date: 2012-09-11 14:07-0600\n" -======= -"POT-Creation-Date: 2012-09-11 17:41-0600\n" -"PO-Revision-Date: 2012-09-11 17:41-0600\n" ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -"Last-Translator: Pippin Williamson \n" -"Language-Team: Tronic Labs \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_n;_x\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: Italian\n" -"X-Poedit-Country: ITALY\n" -"X-Poedit-SearchPath-0: ..\n" -"X-Poedit-SearchPath-1: ../includes\n" -"X-Poedit-SearchPath-2: ../includes/admin-pages\n" -"X-Poedit-SearchPath-3: ../includes/admin-pages/forms\n" -"X-Poedit-SearchPath-4: ../includes/gateways\n" -"X-Poedit-SearchPath-5: .\n" - -<<<<<<< HEAD -#: ../includes/admin-notices.php:24 -======= -#: ../includes/template-functions.php:48 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "No checkout page has been configured." -msgstr "Non ci sono codici sconto che sono stati creati." - -<<<<<<< HEAD -#: ../includes/admin-notices.php:27 -#, fuzzy -msgid "There was a problem updating your discount code, please try again." -msgstr "C'è stato un problema aggiornare il codice di sconto, si prega di riprovare." - -#: ../includes/admin-notices.php:30 -msgid "The payment has been deleted." -msgstr "" - -#: ../includes/admin-notices.php:33 -msgid "The purchase receipt has been resent." -msgstr "" - -#: ../includes/admin-notices.php:38 -#, php-format -msgid "The payment history needs updated. %s" -msgstr "" - -#: ../includes/admin-notices.php:38 -#, fuzzy -msgid "Click to Upgrade" -msgstr "Clicca %s per l'acquisto di nuovo." - -#: ../includes/admin-notices.php:55 -msgid "There seems to be an issue with the server. Please try again in a few minutes." -msgstr "" - -#: ../includes/admin-pages.php:26 -======= -#: ../includes/template-functions.php:60 -#: ../includes/thickbox.php:61 -msgid "Purchase" -msgstr "Acquista" - -#: ../includes/template-functions.php:137 -#: ../includes/template-functions.php:158 -#: ../includes/cart-template.php:46 -#: ../includes/cart-template.php:49 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Checkout" -msgstr "Paga" - -<<<<<<< HEAD -#: ../includes/admin-pages.php:27 -======= -#: ../includes/template-functions.php:167 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "added to your cart" -msgstr "aggiunto al tuo carrello" - -<<<<<<< HEAD -#: ../includes/admin-pages.php:28 -#, fuzzy -msgid "Earnings and Sales Reports" -msgstr "Utili e rapporti di vendita" - -#: ../includes/admin-pages.php:28 -======= -#: ../includes/template-functions.php:263 -msgid "Gray" -msgstr "" - -#: ../includes/template-functions.php:264 -msgid "Pink" -msgstr "" - -#: ../includes/template-functions.php:265 -msgid "Blue" -msgstr "" - -#: ../includes/template-functions.php:266 -msgid "Green" -msgstr "" - -#: ../includes/template-functions.php:267 -msgid "Teal" -msgstr "" - -#: ../includes/template-functions.php:268 -msgid "Black" -msgstr "" - -#: ../includes/template-functions.php:269 -msgid "Dark Gray" -msgstr "" - -#: ../includes/template-functions.php:270 -msgid "Orange" -msgstr "" - -#: ../includes/template-functions.php:271 -msgid "Purple" -msgstr "" - -#: ../includes/template-functions.php:272 -msgid "Slate" -msgstr "" - -#: ../includes/template-functions.php:295 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "You have already purchased this item, but you may purchase it again." -msgstr "Hai già aggiunto questo prodotto al tuo carrello" - -<<<<<<< HEAD -#: ../includes/admin-pages.php:29 -======= -#: ../includes/export-functions.php:31 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "ID" -msgstr "ID" - -<<<<<<< HEAD -#: ../includes/admin-pages.php:29 -======= -#: ../includes/export-functions.php:32 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Email" -msgstr "Email" - -<<<<<<< HEAD -#: ../includes/admin-pages.php:30 -#, fuzzy -msgid "Easy Digital Download Add Ons" -msgstr "Easy Digital Download Impostazioni" - -#: ../includes/admin-pages.php:30 -msgid "Add Ons" -msgstr "" - -#: ../includes/ajax-functions.php:102 -#, fuzzy -msgid "This discount code has been used already" -msgstr "Non ci sono codici sconto che sono stati creati." - -#: ../includes/ajax-functions.php:118 -#, fuzzy -msgid "The discount you entered is invalid" -msgstr "Lo sconto che hai inserito non è valido" - -#: ../includes/cart-functions.php:435 -#, fuzzy, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "Hai già aggiunto questo prodotto al tuo carrello" - -#: ../includes/cart-functions.php:436 -#, fuzzy -msgid "Checkout." -msgstr "Paga" - -#: ../includes/cart-template.php:46 -#: ../includes/cart-template.php:49 -#, fuzzy -msgid "Checkout" -msgstr "Paga" - -#: ../includes/cart-template.php:80 -======= -#: ../includes/export-functions.php:33 -#, fuzzy -msgid "First Name" -msgstr "Nome" - -#: ../includes/export-functions.php:34 -#, fuzzy -msgid "Last Name" -msgstr "Cognome" - -#: ../includes/export-functions.php:35 -#, fuzzy -msgid "Products" -msgstr "Prodotti" - -#: ../includes/export-functions.php:36 -#, fuzzy -msgid "Discounts," -msgstr "Sconto" - -#: ../includes/export-functions.php:37 -#, fuzzy -msgid "Amount paid" -msgstr "Importo:" - -#: ../includes/export-functions.php:38 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Payment method" -msgstr "Modalità di pagamento" - -<<<<<<< HEAD -#: ../includes/cart-template.php:99 -#, fuzzy -msgid "Your cart is empty." -msgstr "Il carrello è vuoto" - -#: ../includes/checkout-template.php:75 -======= -#: ../includes/export-functions.php:39 -#, fuzzy -msgid "Key" -msgstr "Chiave" - -#: ../includes/export-functions.php:40 -#, fuzzy -msgid "Date" -msgstr "Data" - -#: ../includes/export-functions.php:41 -#, fuzzy -msgid "User" -msgstr "Utente" - -#: ../includes/export-functions.php:42 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Status" -msgstr "Stato" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:86 -======= -#: ../includes/export-functions.php:103 -#: ../includes/export-functions.php:111 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "none" -msgstr "nessuno" - -#: ../includes/export-functions.php:119 -msgid "guest" -msgstr "" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:141 -#, fuzzy -msgid "Personal Info" -msgstr "Pagamenti Info" - -#: ../includes/checkout-template.php:144 -======= -#: ../includes/export-functions.php:127 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "No payments recorded yet" -msgstr "Nessun pagamento ancora registrato" - -#: ../includes/export-functions.php:161 -msgid "Export not allowed for non-administrators." -msgstr "" - -#: ../includes/payment-functions.php:278 -msgid "Pending" -msgstr "In attesa" - -#: ../includes/payment-functions.php:279 -msgid "Complete" -msgstr "Completato" - -#: ../includes/payment-functions.php:280 -msgid "Refunded" -msgstr "" - -#: ../includes/email-template.php:23 -msgid "Default Template" -msgstr "" - -#: ../includes/email-template.php:24 -msgid "No template, plain text only" -msgstr "" - -#: ../includes/email-template.php:107 -msgid "Sample Product Title" -msgstr "" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:145 -======= -#: ../includes/email-template.php:110 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Sample Download File Name" -msgstr "Download Nome" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:149 -#: ../includes/checkout-template.php:150 -#: ../includes/checkout-template.php:403 -#: ../includes/checkout-template.php:404 -======= -#: ../includes/email-template.php:158 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Purchase Receipt Preview" -msgstr "Ricevuta d'acquisto" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:153 -#: ../includes/checkout-template.php:407 -======= -#: ../includes/email-template.php:158 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Preview Purchase Receipt" -msgstr "Rispedisci ricevuta d'acquisto" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:154 -#: ../includes/checkout-template.php:408 -======= -#: ../includes/email-template.php:199 -msgid "Dear" -msgstr "" - -#: ../includes/email-template.php:200 -msgid "Thank you for your purchase. Please click on the link(s) below to download your files." -msgstr "" - -#: ../includes/cart-template.php:80 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "remove" -msgstr "rimuovere" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:166 -======= -#: ../includes/cart-template.php:99 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Your cart is empty." -msgstr "Il carrello è vuoto" - -#: ../includes/thickbox.php:29 -#: ../includes/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:168 -======= -#: ../includes/thickbox.php:30 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Insert Download" -msgstr "Inserisci Download" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:170 -======= -#: ../includes/thickbox.php:65 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "You must choose a download" -msgstr "Devi scegliere un download" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:197 -msgid "Show Terms" -msgstr "" - -#: ../includes/checkout-template.php:198 -msgid "Hide Terms" -msgstr "" - -#: ../includes/checkout-template.php:201 -msgid "Agree to Terms?" -msgstr "" - -#: ../includes/checkout-template.php:218 -#: ../includes/dashboard-columns.php:58 -msgid "Purchase" -msgstr "Acquista" - -#: ../includes/checkout-template.php:226 -msgid "Go back" -msgstr "Torna dietro" - -#: ../includes/checkout-template.php:230 -======= -#: ../includes/thickbox.php:88 -#, fuzzy, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "Usa il modulo qui sotto per inserire lo short code per l'acquisto di un download." - -#: ../includes/thickbox.php:91 -#, fuzzy, php-format -msgid "Choose a %s" -msgstr "Scegli uno stile" - -#: ../includes/thickbox.php:100 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Choose a style" -msgstr "Scegli uno stile" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:259 -#, fuzzy -msgid "Credit Card Info" -msgstr "Carta di Credito Info" - -#: ../includes/checkout-template.php:261 -#, fuzzy -msgid "Card name" -msgstr "Biglietto da visita" - -#: ../includes/checkout-template.php:262 -======= -#: ../includes/thickbox.php:111 -msgid "Choose a button color" -msgstr "Scegli un colore per il pulsante" - -#: ../includes/thickbox.php:120 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Link text . . ." -msgstr "Link testo. . ." - -<<<<<<< HEAD -#: ../includes/checkout-template.php:265 -======= -#: ../includes/thickbox.php:124 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Cancel" -msgstr "Annullare" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:266 -======= -#: ../includes/thickbox.php:126 -msgid "Button Styles" -msgstr "Stili Pulsante" - -#: ../includes/register-settings.php:41 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Test Mode" -msgstr "Test" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:269 -======= -#: ../includes/register-settings.php:42 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "Mentre si è in modalità di prova non vengono elaborate le transazioni reali. Per utilizzare appieno la modalità di test, è necessario disporre di uno (test) sandbox account per il gateway di pagamento che si sta testando." - -<<<<<<< HEAD -#: ../includes/checkout-template.php:270 -======= -#: ../includes/register-settings.php:47 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Checkout Page" -msgstr "Paga" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:276 -======= -#: ../includes/register-settings.php:48 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "Questa è la pagina di pagamento in cui gli acquirenti porteranno a termine gli acquisti" - -#: ../includes/register-settings.php:54 -msgid "Success Page" -msgstr "Pagina Successo" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:278 -======= -#: ../includes/register-settings.php:55 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "Questa è la pagina acquirenti in cui saranno reindirizzati dopo aver completato i loro acquisti" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:279 -msgid "Expiration (MM/YYYY)" -msgstr "Scadenza (MM/AAAA)" - -#: ../includes/checkout-template.php:309 -======= -#: ../includes/register-settings.php:61 -msgid "Download Links on Success Page" -msgstr "" - -#: ../includes/register-settings.php:62 -msgid "Show a list of all download links on the success page after completing a purchase?" -msgstr "" - -#: ../includes/register-settings.php:67 -#, fuzzy -msgid "Currency Settings" -msgstr "Impostazioni Valuta" - -#: ../includes/register-settings.php:68 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Configure the currency options" -msgstr "Configurare le opzioni su valute" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:310 -======= -#: ../includes/register-settings.php:73 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Currency" -msgstr "Valuta" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:313 -======= -#: ../includes/register-settings.php:74 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "Scegli la tua valuta. Si noti che alcuni gateway di pagamento hanno delle restrizioni valutarie." - -<<<<<<< HEAD -#: ../includes/checkout-template.php:314 -======= -#: ../includes/register-settings.php:80 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Currency Position" -msgstr "Posizione Valuta" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:317 -======= -#: ../includes/register-settings.php:81 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Choose the location of the currency sign." -msgstr "Scegliere la posizione del simbolo della valuta." - -<<<<<<< HEAD -#: ../includes/checkout-template.php:318 -======= -#: ../includes/register-settings.php:84 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Before - $10" -msgstr "Prima - $10" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:329 -#, fuzzy -msgid "Billing Country" -msgstr "Città per la Fatturazione" - -#: ../includes/checkout-template.php:332 -======= -#: ../includes/register-settings.php:85 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "After - 10$" -msgstr "Dopo - 10$" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:349 -======= -#: ../includes/register-settings.php:90 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Thousands Separator" -msgstr "Separatore delle migliaia" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:352 -======= -#: ../includes/register-settings.php:91 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The symbol (usually , or .) to separate thousands" -msgstr "Il simbolo (di solito , oppure .) per separare migliaia" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:353 -======= -#: ../includes/register-settings.php:98 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Decimal Separator" -msgstr "Separatore decimale" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:380 -#, fuzzy -msgid "Already have an account?" -msgstr "Hai già un account." - -#: ../includes/checkout-template.php:380 -#, fuzzy -msgid "Login" -msgstr "Accesso" - -#: ../includes/checkout-template.php:382 -#, fuzzy -msgid "Create an account" -msgstr "Crea un account" - -#: ../includes/checkout-template.php:382 -msgid "(optional)" -msgstr "" - -#: ../includes/checkout-template.php:385 -#: ../includes/checkout-template.php:386 -#: ../includes/checkout-template.php:433 -#, fuzzy -msgid "Username" -msgstr "Nome utente" - -#: ../includes/checkout-template.php:389 -#: ../includes/checkout-template.php:390 -#: ../includes/checkout-template.php:437 -======= -#: ../includes/register-settings.php:99 -#, fuzzy -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "Il simbolo (di solito , oppure .) per separare le cifre decimale" - -#: ../includes/register-settings.php:110 -#, fuzzy -msgid "Payment Gateways" -msgstr "Gateway di pagamento" - -#: ../includes/register-settings.php:111 -#, fuzzy -msgid "Choose the payment gateways you want to enable." -msgstr "Scegli i gateway di pagamento che si desidera attivare." - -#: ../includes/register-settings.php:117 -#, fuzzy -msgid "Accepted Payment Method Icons" -msgstr "Metodi di pagamento accettati" - -#: ../includes/register-settings.php:118 -#, fuzzy -msgid "Display icons for the selected payment methods" -msgstr "Visualizzare le icone per i metodi di pagamento selezionati" - -#: ../includes/register-settings.php:118 -#, fuzzy -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "Sarà inoltre necessario configurare le impostazioni del gateway se si accetta carte di credito" - -#: ../includes/register-settings.php:131 -#, fuzzy -msgid "PayPal Settings" -msgstr "Impostazioni PayPal" - -#: ../includes/register-settings.php:132 -#, fuzzy -msgid "Configure the PayPal settings" -msgstr "Configurare le impostazioni PayPal" - -#: ../includes/register-settings.php:137 -#, fuzzy -msgid "PayPal Email" -msgstr "Email PayPal" - -#: ../includes/register-settings.php:138 -#, fuzzy -msgid "Enter your PayPal account's email" -msgstr "Inserisci la tua email account PayPal" - -#: ../includes/register-settings.php:144 -#, fuzzy -msgid "Alternate PayPal Purchase Verification" -msgstr "Alternare verifica Acquisto PayPal" - -#: ../includes/register-settings.php:145 -#, fuzzy -msgid "If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal." -msgstr "Se i pagamenti non sono sempre contrassegnati come completati, selezionare questa opzione" - -#: ../includes/register-settings.php:150 -#, fuzzy -msgid "Disable PayPal IPN Verification" -msgstr "Alternare verifica Acquisto PayPal" - -#: ../includes/register-settings.php:151 -#, fuzzy -msgid "If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases." -msgstr "Se i pagamenti non sono sempre contrassegnati come completati, e la disattivazione cURL non risolve il problema, quindi selezionare questa casella" - -#: ../includes/register-settings.php:160 -msgid "Email Template" -msgstr "" - -#: ../includes/register-settings.php:161 -msgid "Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" to see the new template." -msgstr "" - -#: ../includes/register-settings.php:173 -#, fuzzy -msgid "From Name" -msgstr "Da Nome" - -#: ../includes/register-settings.php:174 -#, fuzzy -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "Nome da cui proviene la vendita. Questo probabilmente dovrebbe essere il vostro sito o nome del negozio." - -#: ../includes/register-settings.php:179 -#, fuzzy -msgid "From Email" -msgstr "Da E-mail" - -#: ../includes/register-settings.php:180 -#, fuzzy -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "Email da usare nel modulo della ricevuta. Questo funzionerà come \"da\" e \"rispondere-a\" indirizzo." - -#: ../includes/register-settings.php:185 -#, fuzzy -msgid "Purchase Email Subject" -msgstr "Soggetto E-Mail Acquisto" - -#: ../includes/register-settings.php:186 -#, fuzzy -msgid "Enter the subject line for the purchase receipt email" -msgstr "Inserire la liena del soggetto della e-mail per la ricevuta d'acquisto" - -#: ../includes/register-settings.php:191 -#, fuzzy -msgid "Purchase Receipt" -msgstr "Ricevuta d'acquisto" - -#: ../includes/register-settings.php:192 -#, fuzzy -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "Inserisci l'indirizzo email che viene inviato agli utenti dopo aver completato un acquisto di successo. HTML è accettata. Tags template disponibili:" - -#: ../includes/register-settings.php:193 -#, fuzzy -msgid "A list of download URLs for each download purchased" -msgstr "Un elenco di URL di download per ogni download acquistato" - -#: ../includes/register-settings.php:194 -#, fuzzy -msgid "The buyer's name" -msgstr "Nome Articolo" - -#: ../includes/register-settings.php:195 -#, fuzzy -msgid "The date of the purchase" -msgstr "La data di acquisto" - -#: ../includes/register-settings.php:196 -#, fuzzy -msgid "The total price of the purchase" -msgstr "La data di acquisto" - -#: ../includes/register-settings.php:197 -#, fuzzy -msgid "The unique ID number for this purchase receipt" -msgstr "Inserire la liena del soggetto della e-mail per la ricevuta d'acquisto" - -#: ../includes/register-settings.php:198 -#, fuzzy -msgid "The method of payment used for this purchase" -msgstr "La data di acquisto" - -#: ../includes/register-settings.php:199 -#, fuzzy -msgid "Your site name" -msgstr "Il tuo nome del sito" - -#: ../includes/register-settings.php:208 -msgid "Disable Styles" -msgstr "" - -#: ../includes/register-settings.php:209 -msgid "Check this to disable all included styling" -msgstr "" - -#: ../includes/register-settings.php:214 -#, fuzzy -msgid "Checkout Button Color" -msgstr "Colore Pulsante " - -#: ../includes/register-settings.php:215 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "" - -#: ../includes/register-settings.php:225 -#, fuzzy -msgid "Disable Ajax" -msgstr "Abilitare Ajax" - -#: ../includes/register-settings.php:226 -#, fuzzy -msgid "Check this to disable AJAX for the shopping cart." -msgstr "Selezionare questa opzione per abilitare AJAX per il carrello della spesa." - -#: ../includes/register-settings.php:231 -#, fuzzy -msgid "Enable jQuery Validation" -msgstr "Abilita convalida jQuery" - -#: ../includes/register-settings.php:232 -#, fuzzy -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "Selezionare questa opzione per abilitare la convalida jQuery sul modulo di pagamento." - -#: ../includes/register-settings.php:237 -#, fuzzy -msgid "Disable Guest Checkout" -msgstr "Disabilita Ospiti Pagamento" - -#: ../includes/register-settings.php:238 -msgid "Require that users be logged-in to purchase files." -msgstr "Si richiede che gli utenti siano registrati per l'acquisto di file." - -#: ../includes/register-settings.php:243 -#, fuzzy -msgid "Show Register / Login Form?" -msgstr "Mostra Registrati / Registrazione Modulo?" - -#: ../includes/register-settings.php:244 -#, fuzzy -msgid "Display the registration and login forms on the checkout page for non-logged-in users." -msgstr "Visualizzare i moduli registrazione e di login nella pagina di pagamento per gli utenti non loggati." - -#: ../includes/register-settings.php:249 -#, fuzzy -msgid "Download Link Expiration" -msgstr "Configurazione Download" - -#: ../includes/register-settings.php:250 -msgid "How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours." -msgstr "" - -#: ../includes/register-settings.php:256 -#, fuzzy -msgid "Disable Redownload?" -msgstr "Disabilita Redownload?" - -#: ../includes/register-settings.php:257 -#, fuzzy -msgid "Check this if you do not want to allow users to redownload items from their purchase history." -msgstr "Selezionare questa opzione se non si desidera consentire agli utenti di scaricare di nuovo gli elementi dalla loro cronologia degli acquisti" - -#: ../includes/register-settings.php:262 -msgid "Terms of Agreement" -msgstr "" - -#: ../includes/register-settings.php:268 -msgid "Agree to Terms" -msgstr "" - -#: ../includes/register-settings.php:269 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing." -msgstr "" - -#: ../includes/register-settings.php:274 -msgid "Agree to Terms Label" -msgstr "" - -#: ../includes/register-settings.php:275 -msgid "Label shown next to the agree to terms check box." -msgstr "" - -#: ../includes/register-settings.php:281 -msgid "Agreement Text" -msgstr "" - -#: ../includes/register-settings.php:282 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "" - -#: ../includes/register-settings.php:287 -#, fuzzy -msgid "Complete Purchase Text" -msgstr "Testo per tasto Acquisto" - -#: ../includes/register-settings.php:288 -#, fuzzy -msgid "The button label for completing a purchase." -msgstr "Questa è la pagina acquirenti in cui saranno reindirizzati dopo aver completato i loro acquisti" - -#: ../includes/register-settings.php:314 -#, fuzzy -msgid "General Settings" -msgstr "Impostazioni generali" - -#: ../includes/register-settings.php:340 -#, fuzzy -msgid "Payment Gateway Settings" -msgstr "Impostazioni gateway di pagamento" - -#: ../includes/register-settings.php:366 -#, fuzzy -msgid "Email Settings" -msgstr "Impostazioni e-mail" - -#: ../includes/register-settings.php:392 -#, fuzzy -msgid "Style Settings" -msgstr "Impostazioni PayPal" - -#: ../includes/register-settings.php:419 -#, fuzzy -msgid "Misc Settings" -msgstr "Impostazioni varie" - -#: ../includes/register-settings.php:708 -#, fuzzy -msgid "Upload File" -msgstr "Carica file" - -#: ../includes/register-settings.php:746 -#, fuzzy -msgid "Settings Updated" -msgstr "Impostazioni" - -#: ../includes/cart-functions.php:435 -#, fuzzy, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "Hai già aggiunto questo prodotto al tuo carrello" - -#: ../includes/cart-functions.php:436 -#, fuzzy -msgid "Checkout." -msgstr "Paga" - -#: ../includes/dashboard-columns.php:26 -#, fuzzy -msgid "Name" -msgstr "Nome" - -#: ../includes/dashboard-columns.php:27 -#: ../includes/pdf-reports.php:67 -#: ../includes/widgets.php:169 -#, fuzzy -msgid "Categories" -msgstr "Categorie" - -#: ../includes/dashboard-columns.php:28 -#: ../includes/pdf-reports.php:68 -#: ../includes/widgets.php:170 -#, fuzzy -msgid "Tags" -msgstr "Tags" - -#: ../includes/dashboard-columns.php:29 -#: ../includes/dashboard-columns.php:231 -#: ../includes/pdf-reports.php:66 -#, fuzzy -msgid "Price" -msgstr "Prezzo" - -#: ../includes/dashboard-columns.php:30 -#: ../includes/pdf-reports.php:208 -#: ../includes/graphing.php:32 -#: ../includes/graphing.php:222 -#, fuzzy -msgid "Sales" -msgstr "Vendite" - -#: ../includes/dashboard-columns.php:31 -#: ../includes/pdf-reports.php:191 -#: ../includes/graphing.php:78 -#: ../includes/graphing.php:122 -#: ../includes/graphing.php:169 -#, fuzzy -msgid "Earnings" -msgstr "Guadagni" - -#: ../includes/dashboard-columns.php:32 -#: ../includes/metabox.php:346 -#, fuzzy -msgid "Short Code" -msgstr "Short Code" - -#: ../includes/dashboard-columns.php:189 -#, fuzzy -msgid "Show all categories" -msgstr "Mostra tutte le categorie" - -#: ../includes/dashboard-columns.php:200 -#, fuzzy -msgid "Show all tags" -msgstr "Mostra tutte le tag" - -#: ../includes/dashboard-columns.php:228 -#, php-format -msgid "%s Data" -msgstr "" - -#: ../includes/pdf-reports.php:36 -msgid "to" -msgstr "" - -#: ../includes/pdf-reports.php:41 -#: ../includes/pdf-reports.php:52 -msgid "Sales and earnings reports for the current year for all products" -msgstr "" - -#: ../includes/pdf-reports.php:42 -#: ../includes/pdf-reports.php:43 -#, fuzzy -msgid "Easy Digital Downloads" -msgstr "Easy Digital Download Impostazioni" - -#: ../includes/pdf-reports.php:57 -msgid "Date Range: " -msgstr "" - -#: ../includes/pdf-reports.php:61 -msgid "Table View" -msgstr "" - -#: ../includes/pdf-reports.php:65 -#, fuzzy -msgid "Product Name" -msgstr "Prodotti" - -#: ../includes/pdf-reports.php:69 -msgid "Number of Sales" -msgstr "" - -#: ../includes/pdf-reports.php:70 -#, fuzzy -msgid "Earnings to Date" -msgstr "Guadagni" - -#: ../includes/pdf-reports.php:112 -#, fuzzy -msgid "No Downloads found." -msgstr "Nessun Downloads trovato" - -#: ../includes/pdf-reports.php:119 -msgid "Graph View" -msgstr "" - -#: ../includes/pdf-reports.php:212 -msgid "Sales and Earnings by Month for all Products" -msgstr "" - -#: ../includes/pdf-reports.php:226 -msgid "Jan" -msgstr "" - -#: ../includes/pdf-reports.php:227 -msgid "Feb" -msgstr "" - -#: ../includes/pdf-reports.php:228 -msgid "Mar" -msgstr "" - -#: ../includes/pdf-reports.php:229 -msgid "Apr" -msgstr "" - -#: ../includes/pdf-reports.php:230 -msgid "May" -msgstr "" - -#: ../includes/pdf-reports.php:231 -msgid "June" -msgstr "" - -#: ../includes/pdf-reports.php:232 -msgid "July" -msgstr "" - -#: ../includes/pdf-reports.php:233 -msgid "Aug" -msgstr "" - -#: ../includes/pdf-reports.php:234 -msgid "Sept" -msgstr "" - -#: ../includes/pdf-reports.php:235 -msgid "Oct" -msgstr "" - -#: ../includes/pdf-reports.php:236 -msgid "Nov" -msgstr "" - -#: ../includes/pdf-reports.php:237 -msgid "Dec" -msgstr "" - -#: ../includes/widgets.php:39 -#, fuzzy -msgid "Downloads Cart" -msgstr "Downloads Carello" - -#: ../includes/widgets.php:39 -#, fuzzy -msgid "Display the downloads shopping cart" -msgstr "Visualizzare il carrello della spesa download" - -#: ../includes/widgets.php:82 -#: ../includes/widgets.php:162 -#, fuzzy -msgid "Title:" -msgstr "Titolo:" - -#: ../includes/widgets.php:87 -#, fuzzy -msgid "Show Quantity:" -msgstr "Mostra Quantità:" - -#: ../includes/widgets.php:112 -#, fuzzy -msgid "Downloads Categories / Tags" -msgstr "Downloads Carello" - -#: ../includes/widgets.php:112 -#, fuzzy -msgid "Display the downloads categories or tags" -msgstr "Visualizzare il carrello della spesa download" - -#: ../includes/widgets.php:167 -msgid "Taxonomy:" -msgstr "" - -#: ../includes/widgets.php:193 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Purchase History" -msgstr "Acquisto Registro" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:393 -#, fuzzy -msgid "Confirm password" -msgstr "Conferma password" - -#: ../includes/checkout-template.php:394 -======= -#: ../includes/widgets.php:193 -msgid "Display a user's purchase history" -msgstr "" - -#: ../includes/widgets.php:232 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "No downloadable files found." -msgstr "Nessun file scaricabile trovato." - -<<<<<<< HEAD -#: ../includes/checkout-template.php:399 -#: ../includes/checkout-template.php:400 -#, fuzzy -msgid "Email" -msgstr "Email" - -#: ../includes/checkout-template.php:429 -======= -#: ../includes/widgets.php:259 -#, fuzzy -msgid "Title" -msgstr "Titolo:" - -#: ../includes/scripts.php:40 -#, fuzzy -msgid "Please enter a discount code" -msgstr "Si prega di inserire un codice di sconto" - -#: ../includes/scripts.php:41 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Discount Applied" -msgstr "Sconto applicato" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:432 -======= -#: ../includes/scripts.php:42 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Please enter an email address before applying a discount code" -msgstr "Si prega di inserire un codice di sconto" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:436 -#, fuzzy -msgid "Your password" -msgstr "La tua password" - -#: ../includes/checkout-template.php:444 -======= -#: ../includes/scripts.php:44 -msgid "You have already added this item to your cart" -msgstr "Hai già aggiunto questo prodotto al tuo carrello" - -#: ../includes/scripts.php:45 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Your cart is empty" -msgstr "Il carrello è vuoto" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:446 -======= -#: ../includes/scripts.php:46 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Loading" -msgstr "Caricamento" - -<<<<<<< HEAD -#: ../includes/checkout-template.php:446 -msgid "or checkout as a guest." -msgstr "" - -#: ../includes/dashboard-columns.php:26 -======= -#: ../includes/scripts.php:123 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Add New Download" -msgstr "Aggiungi Nuovo Download" - -<<<<<<< HEAD -#: ../includes/dashboard-columns.php:27 -#, fuzzy -msgid "Categories" -msgstr "Categorie" - -#: ../includes/dashboard-columns.php:28 -#, fuzzy -msgid "Tags" -msgstr "Tags" - -#: ../includes/dashboard-columns.php:29 -#: ../includes/dashboard-columns.php:231 -#, fuzzy -msgid "Price" -msgstr "Prezzo" - -#: ../includes/dashboard-columns.php:30 -#, fuzzy -msgid "Sales" -msgstr "Vendite" - -#: ../includes/dashboard-columns.php:31 -#, fuzzy -msgid "Earnings" -msgstr "Guadagni" - -#: ../includes/dashboard-columns.php:32 -======= -#: ../includes/scripts.php:124 -msgid "Use This File" -msgstr "" - -#: ../includes/scripts.php:125 -msgid "Sorry, not available for variable priced products." -msgstr "" - -#: ../includes/scripts.php:126 -msgid "Are you sure you wish to delete this payment?" -msgstr "" - -#: ../includes/graphing.php:42 -#, fuzzy, php-format -msgid "%s Performance in Sales" -msgstr "Prestazioni Vendite Downloads" - -#: ../includes/graphing.php:77 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Download" -msgstr "Download" - -<<<<<<< HEAD -#: ../includes/dashboard-columns.php:33 -#, fuzzy -msgid "Date" -msgstr "Data" - -#: ../includes/dashboard-columns.php:189 -======= -#: ../includes/graphing.php:88 -#, fuzzy, php-format -msgid "%s Performance in Earnings" -msgstr "Prestazioni Utili Downloads" - -#: ../includes/graphing.php:121 -#: ../includes/graphing.php:221 -#: ../includes/checkout-template.php:276 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Month" -msgstr "Mese" - -<<<<<<< HEAD -#: ../includes/dashboard-columns.php:200 -======= -#: ../includes/graphing.php:136 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Earnings per month" -msgstr "Utili Mensili" - -<<<<<<< HEAD -#: ../includes/dashboard-columns.php:228 -#, php-format -msgid "%s Data" -msgstr "" - -#: ../includes/email-functions.php:47 -#, fuzzy -msgid "Purchase Receipt" -msgstr "Ricevuta d'acquisto" - -#: ../includes/email-functions.php:59 -#, fuzzy -msgid "Hello" -msgstr "Ciao" - -#: ../includes/email-functions.php:59 -#, fuzzy -msgid "A download purchase has been made" -msgstr "Un download è stato acquistato" - -#: ../includes/email-functions.php:60 -======= -#: ../includes/graphing.php:168 -msgid "Day" -msgstr "" - -#: ../includes/graphing.php:189 -#, php-format -msgid "Earnings per day for last %s days" -msgstr "" - -#: ../includes/graphing.php:236 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Sales per month" -msgstr "Utili Mensili" - -<<<<<<< HEAD -#: ../includes/email-functions.php:71 -#, fuzzy -msgid "Purchased by: " -msgstr "Acquisto ID:" - -#: ../includes/email-functions.php:72 -#, fuzzy -msgid "Amount: " -msgstr "Importo:" - -#: ../includes/email-functions.php:73 -#, fuzzy -msgid "Payment Method: " -msgstr "Modalità di pagamento" - -#: ../includes/email-functions.php:74 -#, fuzzy -msgid "Thank you" -msgstr "Grazie" - -#: ../includes/email-functions.php:76 -======= -#: ../includes/metabox.php:22 -#, fuzzy, php-format -msgid "%1$s Configuration" -msgstr "Configurazione Download" - -#: ../includes/metabox.php:23 -#, fuzzy, php-format -msgid "%1$s Stats" -msgstr "Stato" - -#: ../includes/metabox.php:24 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Purchase Log" -msgstr "Acquisto Registro" - -<<<<<<< HEAD -#: ../includes/email-template.php:23 -msgid "Default Template" -msgstr "" - -#: ../includes/email-template.php:24 -msgid "No template, plain text only" -msgstr "" - -#: ../includes/email-template.php:107 -msgid "Sample Product Title" -msgstr "" - -#: ../includes/email-template.php:110 -#, fuzzy -msgid "Sample Download File Name" -msgstr "Download Nome" - -#: ../includes/email-template.php:158 -#, fuzzy -msgid "Purchase Receipt Preview" -msgstr "Ricevuta d'acquisto" - -#: ../includes/email-template.php:158 -#, fuzzy -msgid "Preview Purchase Receipt" -msgstr "Rispedisci ricevuta d'acquisto" - -#: ../includes/email-template.php:199 -#, fuzzy -msgid "Dear" -msgstr "Anno" - -#: ../includes/email-template.php:200 -msgid "Thank you for your purchase. Please click on the link(s) below to download your files." -msgstr "" - -#: ../includes/error-tracking.php:30 -#, fuzzy -msgid "Error" -msgstr "Errore" - -#: ../includes/export-functions.php:31 -#, fuzzy -msgid "ID" -msgstr "ID" - -#: ../includes/export-functions.php:35 -======= -#: ../includes/metabox.php:25 -#, fuzzy -msgid "File Download Log" -msgstr "Scaricare file di registro" - -#: ../includes/metabox.php:84 -#, fuzzy -msgid "Pricing" -msgstr "Prezzo" - -#: ../includes/metabox.php:98 -msgid "Enable variable pricing" -msgstr "" - -#: ../includes/metabox.php:113 -#: ../includes/metabox.php:115 -#: ../includes/metabox.php:135 -#: ../includes/metabox.php:137 -msgid "9.99" -msgstr "" - -#: ../includes/metabox.php:120 -#: ../includes/metabox.php:142 -#, fuzzy -msgid "Option Name" -msgstr "Data di scadenza" - -#: ../includes/metabox.php:149 -#: ../includes/metabox.php:220 -#, fuzzy -msgid "Add New" -msgstr "Aggiungi nuovo" - -#: ../includes/metabox.php:159 -msgid "for" -msgstr "" - -#: ../includes/metabox.php:181 -#, fuzzy -msgid "Download Files" -msgstr "Download Files" - -#: ../includes/metabox.php:184 -#, fuzzy -msgid "File Name" -msgstr "Nome del file" - -#: ../includes/metabox.php:185 -#, fuzzy -msgid "File URL" -msgstr "File:" - -#: ../includes/metabox.php:196 -#: ../includes/metabox.php:215 -#, fuzzy -msgid "file name" -msgstr "Nome del file" - -#: ../includes/metabox.php:197 -#: ../includes/metabox.php:216 -#, fuzzy -msgid "file url" -msgstr "url del file" - -#: ../includes/metabox.php:199 -#, fuzzy -msgid "All Prices" -msgstr "Prezzo" - -#: ../includes/metabox.php:220 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Products" -msgstr "Prodotti" - -<<<<<<< HEAD -#: ../includes/export-functions.php:36 -======= -#: ../includes/metabox.php:241 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Discounts," -msgstr "Sconto" - -<<<<<<< HEAD -#: ../includes/export-functions.php:37 -======= -#: ../includes/metabox.php:243 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Amount paid" -msgstr "Importo:" - -<<<<<<< HEAD -#: ../includes/export-functions.php:38 -======= -#: ../includes/metabox.php:262 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Payment method" -msgstr "Modalità di pagamento" - -<<<<<<< HEAD -#: ../includes/export-functions.php:39 -#, fuzzy -msgid "Key" -msgstr "Chiave" - -#: ../includes/export-functions.php:41 -======= -#: ../includes/metabox.php:264 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "User" -msgstr "Utente" - -<<<<<<< HEAD -#: ../includes/export-functions.php:42 -======= -#: ../includes/metabox.php:265 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Status" -msgstr "Stato" - -<<<<<<< HEAD -#: ../includes/export-functions.php:103 -#: ../includes/export-functions.php:111 -======= -#: ../includes/metabox.php:266 -#, fuzzy -msgid "Choose the style of the purchase link" -msgstr "Scegli lo stile del link di acquisto" - -#: ../includes/metabox.php:287 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "none" -msgstr "nessuno" - -<<<<<<< HEAD -#: ../includes/export-functions.php:119 -======= -#: ../includes/metabox.php:295 -#, fuzzy -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "Scegli lo stile del link di acquisto" - -#: ../includes/metabox.php:313 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "guest" -msgstr "Test" - -<<<<<<< HEAD -#: ../includes/export-functions.php:127 -#, fuzzy -msgid "No payments recorded yet" -msgstr "Nessun pagamento ancora registrato" - -#: ../includes/export-functions.php:161 -msgid "Export not allowed for non-administrators." -msgstr "" - -#: ../includes/gateway-functions.php:28 -#, fuzzy -msgid "Test Payment" -msgstr "Nuovo Pagamento" - -#: ../includes/graphing.php:42 -#, fuzzy, php-format -msgid "%s Performance in Sales" -msgstr "Prestazioni Vendite Downloads" - -#: ../includes/graphing.php:77 -#: ../includes/post-types.php:125 -#, fuzzy -msgid "Download" -msgstr "Download" - -#: ../includes/graphing.php:88 -#, fuzzy, php-format -msgid "%s Performance in Earnings" -msgstr "Prestazioni Utili Downloads" - -#: ../includes/graphing.php:136 -#, fuzzy -msgid "Earnings per month" -msgstr "Utili Mensili" - -#: ../includes/graphing.php:168 -msgid "Day" -msgstr "" - -#: ../includes/graphing.php:189 -#, php-format -msgid "Earnings per day for last %s days" -msgstr "" - -#: ../includes/graphing.php:236 -#, fuzzy -msgid "Sales per month" -msgstr "Utili Mensili" - -#: ../includes/install.php:42 -#, fuzzy -msgid "Purchase Confirmation" -msgstr "Verifica di Acquisto non riuscita" - -#: ../includes/install.php:43 -#, fuzzy -msgid "Thank you for your purchase!" -msgstr "La data di acquisto" - -#: ../includes/install.php:53 -#, fuzzy -msgid "Purchase History" -msgstr "Acquisto Registro" - -#: ../includes/login-register.php:45 -#, fuzzy -msgid "Log into Your Account" -msgstr "Accedi al tuo account" - -#: ../includes/login-register.php:61 -#, fuzzy -msgid "Lost Password" -msgstr "Password" - -#: ../includes/login-register.php:62 -#, fuzzy -msgid "Lost Password?" -msgstr "Password" - -#: ../includes/login-register.php:69 -#, fuzzy -msgid "You are already logged in" -msgstr "Hai già acquistato questo articolo." - -#: ../includes/login-register.php:92 -#, fuzzy -msgid "The password you entered is incorrect" -msgstr "La password inserita non è corretta" - -#: ../includes/login-register.php:95 -#, fuzzy -msgid "The username you entered does not exist" -msgstr "Il nome utente che hai inserito non esiste" - -#: ../includes/metabox.php:22 -#, fuzzy, php-format -msgid "%1$s Configuration" -msgstr "Configurazione Download" - -#: ../includes/metabox.php:23 -#, fuzzy, php-format -msgid "%1$s Stats" -msgstr "Stato" - -#: ../includes/metabox.php:24 -#, fuzzy -msgid "Purchase Log" -msgstr "Acquisto Registro" - -#: ../includes/metabox.php:25 -#, fuzzy -msgid "File Download Log" -msgstr "Scaricare file di registro" - -#: ../includes/metabox.php:84 -#, fuzzy -msgid "Pricing" -msgstr "Prezzo" - -#: ../includes/metabox.php:98 -msgid "Enable variable pricing" -msgstr "" - -#: ../includes/metabox.php:113 -#: ../includes/metabox.php:115 -#: ../includes/metabox.php:135 -#: ../includes/metabox.php:137 -msgid "9.99" -msgstr "" - -#: ../includes/metabox.php:120 -#: ../includes/metabox.php:142 -#, fuzzy -msgid "Option Name" -msgstr "Data di scadenza" - -#: ../includes/metabox.php:149 -#: ../includes/metabox.php:220 -#: ../includes/post-types.php:43 -#: ../includes/post-types.php:81 -#, fuzzy -msgid "Add New" -msgstr "Aggiungi nuovo" - -#: ../includes/metabox.php:159 -msgid "for" -msgstr "" - -#: ../includes/metabox.php:181 -#, fuzzy -msgid "Download Files" -msgstr "Download Files" - -#: ../includes/metabox.php:184 -#, fuzzy -msgid "File Name" -msgstr "Nome del file" - -#: ../includes/metabox.php:185 -#, fuzzy -msgid "File URL" -msgstr "File:" - -#: ../includes/metabox.php:196 -#: ../includes/metabox.php:215 -#, fuzzy -msgid "file name" -msgstr "Nome del file" - -#: ../includes/metabox.php:197 -#: ../includes/metabox.php:216 -#, fuzzy -msgid "file url" -msgstr "url del file" - -#: ../includes/metabox.php:199 -#, fuzzy -msgid "All Prices" -msgstr "Prezzo" - -#: ../includes/metabox.php:206 -#: ../includes/metabox.php:217 -#, fuzzy -msgid "Upload File" -msgstr "Carica file" - -#: ../includes/metabox.php:220 -#, fuzzy -msgid "Upload the downloadable files." -msgstr "Caricare i file scaricabili." - -#: ../includes/metabox.php:241 -#, fuzzy -msgid "Purchase Text" -msgstr "Testo per tasto Acquisto" - -#: ../includes/metabox.php:243 -#, fuzzy -msgid "Add the text you would like displayed for the purchase text" -msgstr "Aggiungere il testo che si desidera visualizzare per il tasto acquisto" - -#: ../includes/metabox.php:262 -#, fuzzy -msgid "Link Style" -msgstr "Collegamento Style" - -#: ../includes/metabox.php:264 -#, fuzzy -msgid "Button" -msgstr "Pulsante" - -#: ../includes/metabox.php:265 -#, fuzzy -msgid "Text" -msgstr "Testo" - -#: ../includes/metabox.php:266 -#, fuzzy -msgid "Choose the style of the purchase link" -msgstr "Scegli lo stile del link di acquisto" - -#: ../includes/metabox.php:287 -#, fuzzy -msgid "Button Color" -msgstr "Colore Pulsante " - -#: ../includes/metabox.php:295 -#, fuzzy -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "Scegli lo stile del link di acquisto" - -#: ../includes/metabox.php:313 -#, fuzzy -msgid "Disable the purchase button?" -msgstr "Disattivare il pulsante di acquisto." - -#: ../includes/metabox.php:316 -#, fuzzy -msgid "Check this if you do not want the purchase button displayed." -msgstr "Spuntare questo se non si desidera che il pulsante di acquisto sia aggiunto automaticamente" - -#: ../includes/metabox.php:338 -#, fuzzy -msgid "Notes" -msgstr "Note" - -#: ../includes/metabox.php:341 -#, fuzzy -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "Le opzioni di stile di cui sopra non riflettono lo stile dello short code. Lo short code ti permette di inserire un pulsante di acquisto per il download in qualsiasi punto del sito." - -#: ../includes/metabox.php:347 -msgid "This short code can be placed anywhere on your site" -msgstr "" - -#: ../includes/metabox.php:434 -#, fuzzy -msgid "Sales:" -msgstr "Vendite:" - -#: ../includes/metabox.php:440 -#, fuzzy -msgid "Earnings:" -msgstr "Risultato:" - -#: ../includes/metabox.php:476 -#, fuzzy -msgid "Sales Log" -msgstr "Vendite Registro" - -#: ../includes/metabox.php:478 -#, fuzzy -msgid "Each sale for this download is listed below." -msgstr "Ogni vendita per questo download è elencato di seguito." - -#: ../includes/metabox.php:492 -#: ../includes/metabox.php:584 -#, fuzzy -msgid "Date:" -msgstr "Date:" - -#: ../includes/metabox.php:496 -#, fuzzy -msgid "Buyer:" -msgstr "Acquirente:" - -#: ../includes/metabox.php:500 -#, fuzzy -msgid "Purchase ID:" -msgstr "Acquisto ID:" - -#: ../includes/metabox.php:508 -#, fuzzy -msgid "No sales yet" -msgstr "Non ci sono ancora le vendite" - -#: ../includes/metabox.php:524 -#: ../includes/metabox.php:621 -#, fuzzy -msgid "Previous" -msgstr "Precedente" - -#: ../includes/metabox.php:565 -#, fuzzy -msgid "Download Log" -msgstr "Scarica Log" - -#: ../includes/metabox.php:567 -======= -#: ../includes/metabox.php:316 -#, fuzzy -msgid "Check this if you do not want the purchase button displayed." -msgstr "Spuntare questo se non si desidera che il pulsante di acquisto sia aggiunto automaticamente" - -#: ../includes/metabox.php:338 -#, fuzzy -msgid "Notes" -msgstr "Note" - -#: ../includes/metabox.php:341 -#, fuzzy -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "Le opzioni di stile di cui sopra non riflettono lo stile dello short code. Lo short code ti permette di inserire un pulsante di acquisto per il download in qualsiasi punto del sito." - -#: ../includes/metabox.php:347 -msgid "This short code can be placed anywhere on your site" -msgstr "" - -#: ../includes/metabox.php:434 -#, fuzzy -msgid "Sales:" -msgstr "Vendite:" - -#: ../includes/metabox.php:440 -#, fuzzy -msgid "Earnings:" -msgstr "Risultato:" - -#: ../includes/metabox.php:476 -#, fuzzy -msgid "Sales Log" -msgstr "Vendite Registro" - -#: ../includes/metabox.php:478 -#, fuzzy -msgid "Each sale for this download is listed below." -msgstr "Ogni vendita per questo download è elencato di seguito." - -#: ../includes/metabox.php:492 -#: ../includes/metabox.php:584 -#, fuzzy -msgid "Date:" -msgstr "Date:" - -#: ../includes/metabox.php:496 -#, fuzzy -msgid "Buyer:" -msgstr "Acquirente:" - -#: ../includes/metabox.php:500 -#, fuzzy -msgid "Purchase ID:" -msgstr "Acquisto ID:" - -#: ../includes/metabox.php:508 -#, fuzzy -msgid "No sales yet" -msgstr "Non ci sono ancora le vendite" - -#: ../includes/metabox.php:524 -#: ../includes/metabox.php:621 -#, fuzzy -msgid "Previous" -msgstr "Precedente" - -#: ../includes/metabox.php:525 -#: ../includes/metabox.php:622 -#: ../includes/checkout-template.php:86 -#, fuzzy -msgid "Next" -msgstr "Prossimo" - -#: ../includes/metabox.php:565 -#, fuzzy -msgid "Download Log" -msgstr "Scarica Log" - -#: ../includes/metabox.php:567 -#, fuzzy -msgid "Each time a file is downloaded, it is recorded below." -msgstr "Ogni volta che un file viene scaricato, questo viene registrato qui di seguito." - -#: ../includes/metabox.php:588 -#, fuzzy -msgid "Downloaded by:" -msgstr "Scaricato da:" - -#: ../includes/metabox.php:592 -#, fuzzy -msgid "IP Address:" -msgstr "Indirizzo IP:" - -#: ../includes/metabox.php:596 -#, fuzzy -msgid "File: " -msgstr "File:" - -#: ../includes/metabox.php:605 -#, fuzzy -msgid "No file downloads yet yet" -msgstr "Nessun file scaricato ancora" - -#: ../includes/ajax-functions.php:102 -#, fuzzy -msgid "This discount code has been used already" -msgstr "Non ci sono codici sconto che sono stati creati." - -#: ../includes/ajax-functions.php:118 -#, fuzzy -msgid "The discount you entered is invalid" -msgstr "Lo sconto che hai inserito non è valido" - -#: ../includes/admin-pages.php:26 -#, fuzzy -msgid "Payment History" -msgstr "Cronologia pagamenti" - -#: ../includes/admin-pages.php:27 -#, fuzzy -msgid "Discount Codes" -msgstr "Codici Sconto" - -#: ../includes/admin-pages.php:28 -#, fuzzy -msgid "Earnings and Sales Reports" -msgstr "Utili e rapporti di vendita" - -#: ../includes/admin-pages.php:28 -#, fuzzy -msgid "Reports" -msgstr "Rapporti" - -#: ../includes/admin-pages.php:29 -#, fuzzy -msgid "Easy Digital Download Settings" -msgstr "Easy Digital Download Impostazioni" - -#: ../includes/admin-pages.php:29 -#, fuzzy -msgid "Settings" -msgstr "Impostazioni" - -#: ../includes/admin-pages.php:30 -#, fuzzy -msgid "Easy Digital Download Add Ons" -msgstr "Easy Digital Download Impostazioni" - -#: ../includes/admin-pages.php:30 -msgid "Add Ons" -msgstr "" - -#: ../includes/login-register.php:45 -#, fuzzy -msgid "Log into Your Account" -msgstr "Accedi al tuo account" - -#: ../includes/login-register.php:47 -#: ../includes/login-register.php:48 -#: ../includes/checkout-template.php:385 -#: ../includes/checkout-template.php:386 -#: ../includes/checkout-template.php:433 -#, fuzzy -msgid "Username" -msgstr "Nome utente" - -#: ../includes/login-register.php:51 -#: ../includes/checkout-template.php:389 -#: ../includes/checkout-template.php:390 -#: ../includes/checkout-template.php:437 -#, fuzzy -msgid "Password" -msgstr "Password" - -#: ../includes/login-register.php:58 -#: ../includes/checkout-template.php:380 -#, fuzzy -msgid "Login" -msgstr "Accesso" - -#: ../includes/login-register.php:61 -#, fuzzy -msgid "Lost Password" -msgstr "Password" - -#: ../includes/login-register.php:62 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Lost Password?" -msgstr "Password" - -<<<<<<< HEAD -#: ../includes/metabox.php:588 -======= -#: ../includes/login-register.php:69 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "You are already logged in" -msgstr "Hai già acquistato questo articolo." - -<<<<<<< HEAD -#: ../includes/metabox.php:592 -======= -#: ../includes/login-register.php:92 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The password you entered is incorrect" -msgstr "La password inserita non è corretta" - -<<<<<<< HEAD -#: ../includes/metabox.php:596 -======= -#: ../includes/login-register.php:95 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The username you entered does not exist" -msgstr "Il nome utente che hai inserito non esiste" - -<<<<<<< HEAD -#: ../includes/metabox.php:605 -======= -#: ../includes/error-tracking.php:30 -#: ../includes/process-download.php:266 -#: ../includes/process-download.php:283 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Error" -msgstr "Errore" - -#: ../includes/misc-functions.php:185 -#, fuzzy -msgid "US Dollars ($)" -msgstr "US Dollars ($)" - -#: ../includes/misc-functions.php:186 -#, fuzzy -msgid "Euros (€)" -msgstr "Euros (€)" - -#: ../includes/misc-functions.php:187 -#, fuzzy -msgid "Pounds Sterling (£)" -msgstr "Pounds Sterling (£)" - -#: ../includes/misc-functions.php:188 -#, fuzzy -msgid "Australian Dollars ($)" -msgstr "Australian Dollars ($)" - -#: ../includes/misc-functions.php:189 -#, fuzzy -msgid "Brazilian Real ($)" -msgstr "Brazilian Real ($)" - -#: ../includes/misc-functions.php:190 -#, fuzzy -msgid "Canadian Dollars ($)" -msgstr "Canadian Dollars ($)" - -#: ../includes/misc-functions.php:191 -#, fuzzy -msgid "Czech Koruna" -msgstr "Corona ceca" - -#: ../includes/misc-functions.php:192 -#, fuzzy -msgid "Danish Krone" -msgstr "Corona danese" - -#: ../includes/misc-functions.php:193 -#, fuzzy -msgid "Hong Kong Dollar ($)" -msgstr "Hong Kong Dollar ($)" - -#: ../includes/misc-functions.php:194 -#, fuzzy -msgid "Hungarian Forint" -msgstr "Fiorino ungherese" - -#: ../includes/misc-functions.php:195 -#, fuzzy -msgid "Israeli Shekel" -msgstr "Shekel israeliano" - -#: ../includes/misc-functions.php:196 -#, fuzzy -msgid "Japanese Yen (¥)" -msgstr "Japanese Yen (¥)" - -#: ../includes/misc-functions.php:197 -#, fuzzy -msgid "Malaysian Ringgits" -msgstr "Malaysian Ringgits" - -#: ../includes/misc-functions.php:198 -#, fuzzy -msgid "Mexican Peso ($)" -msgstr "Mexican Peso ($)" - -#: ../includes/misc-functions.php:199 -#, fuzzy -msgid "New Zealand Dollar ($)" -msgstr "New Zealand Dollar ($)" - -#: ../includes/misc-functions.php:200 -#, fuzzy -msgid "Norwegian Krone" -msgstr "Corona norvegese" - -#: ../includes/misc-functions.php:201 -#, fuzzy -msgid "Philippine Pesos" -msgstr "Philippine Pesos" - -#: ../includes/misc-functions.php:202 -#, fuzzy -msgid "Polish Zloty" -msgstr "Zloty polacco" - -#: ../includes/misc-functions.php:203 -#, fuzzy -msgid "Singapore Dollar ($)" -msgstr "Singapore Dollar ($)" - -#: ../includes/misc-functions.php:204 -#, fuzzy -msgid "Swedish Krona" -msgstr "Corona svedese" - -#: ../includes/misc-functions.php:205 -#, fuzzy -msgid "Swiss Franc" -msgstr "Franco Svizzero" - -#: ../includes/misc-functions.php:206 -#, fuzzy -msgid "Taiwan New Dollars" -msgstr "Nuovi Dollari di Taiwan" - -#: ../includes/misc-functions.php:207 -#, fuzzy -msgid "Thai Baht" -msgstr "Baht thailandese" - -#: ../includes/misc-functions.php:208 -msgid "Indian Rupee" -msgstr "" - -#: ../includes/misc-functions.php:209 -msgid "Turkish Lira" -msgstr "" -<<<<<<< HEAD - -#: ../includes/misc-functions.php:210 -msgid "Iranian Rial" -msgstr "" - -#: ../includes/payment-functions.php:278 -msgid "Pending" -msgstr "In attesa" - -#: ../includes/payment-functions.php:279 -msgid "Complete" -msgstr "Completato" - -#: ../includes/payment-functions.php:280 -msgid "Refunded" -msgstr "" - -#: ../includes/pdf-reports.php:36 -msgid "to" -msgstr "" - -#: ../includes/pdf-reports.php:41 -#: ../includes/pdf-reports.php:52 -msgid "Sales and earnings reports for the current year for all products" -msgstr "" - -#: ../includes/pdf-reports.php:42 -#: ../includes/pdf-reports.php:43 -#, fuzzy -msgid "Easy Digital Downloads" -msgstr "Easy Digital Download Impostazioni" - -#: ../includes/pdf-reports.php:57 -msgid "Date Range: " -msgstr "" - -#: ../includes/pdf-reports.php:61 -msgid "Table View" -msgstr "" - -#: ../includes/pdf-reports.php:65 -#, fuzzy -msgid "Product Name" -msgstr "Prodotti" - -#: ../includes/pdf-reports.php:69 -msgid "Number of Sales" -msgstr "" - -#: ../includes/pdf-reports.php:70 -#, fuzzy -msgid "Earnings to Date" -msgstr "Guadagni" - -#: ../includes/pdf-reports.php:112 -#, fuzzy -msgid "No Downloads found." -msgstr "Nessun Downloads trovato" - -#: ../includes/pdf-reports.php:119 -msgid "Graph View" -msgstr "" - -#: ../includes/pdf-reports.php:212 -msgid "Sales and Earnings by Month for all Products" -msgstr "" - -#: ../includes/pdf-reports.php:226 -msgid "Jan" -msgstr "" - -#: ../includes/pdf-reports.php:227 -msgid "Feb" -msgstr "" - -#: ../includes/pdf-reports.php:228 -msgid "Mar" -msgstr "" - -#: ../includes/pdf-reports.php:229 -msgid "Apr" -msgstr "" - -#: ../includes/pdf-reports.php:230 -msgid "May" -msgstr "" - -#: ../includes/pdf-reports.php:231 -msgid "June" -msgstr "" - -#: ../includes/pdf-reports.php:232 -msgid "July" -msgstr "" - -#: ../includes/pdf-reports.php:233 -msgid "Aug" -msgstr "" - -#: ../includes/pdf-reports.php:234 -msgid "Sept" -msgstr "" - -#: ../includes/pdf-reports.php:235 -msgid "Oct" -msgstr "" - -#: ../includes/pdf-reports.php:236 -msgid "Nov" -msgstr "" - -#: ../includes/pdf-reports.php:237 -msgid "Dec" -msgstr "" - -#: ../includes/post-types.php:44 -#, fuzzy, php-format -msgid "Add New %1$s" -msgstr "Aggiungi nuovo" - -#: ../includes/post-types.php:45 -#, fuzzy, php-format -msgid "Edit %1$s" -msgstr "Modifica" - -#: ../includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "" - -#: ../includes/post-types.php:47 -#, fuzzy, php-format -msgid "All %2$s" -msgstr "Tutti i Tag" - -#: ../includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "" - -#: ../includes/post-types.php:49 -#, fuzzy, php-format -msgid "Search %2$s" -msgstr "Ricerca Tags" - -#: ../includes/post-types.php:50 -#, fuzzy, php-format -msgid "No %2$s found" -msgstr "Nessun pagamento trovato" - -#: ../includes/post-types.php:51 -#, fuzzy, php-format -msgid "No %2$s found in Trash" -msgstr "Nessun pagamento trovato nel Cestino" - -#: ../includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "" - -#: ../includes/post-types.php:79 -#, fuzzy -msgid "Payments" -msgstr "Pagamenti" - -#: ../includes/post-types.php:80 -#, fuzzy -msgid "Payment" -msgstr "Pagamento" - -#: ../includes/post-types.php:82 -#, fuzzy -msgid "Add New Payment" -msgstr "Aggiungi nuovo pagamento" - -#: ../includes/post-types.php:83 -======= - -#: ../includes/misc-functions.php:210 -msgid "Iranian Rial" -msgstr "" - -#: ../includes/process-download.php:266 -#: ../includes/process-download.php:283 -msgid "Sorry but this file does not exist." -msgstr "" - -#: ../includes/process-download.php:294 -#, fuzzy -msgid "You do not have permission to download this file" -msgstr "Non hai il permesso di scaricare questo file" - -#: ../includes/process-download.php:294 -msgid "Purchase Verification Failed" -msgstr "Verifica di Acquisto non riuscita" - -#: ../includes/checkout-template.php:75 -#, fuzzy -msgid "Choose Your Payment Method" -msgstr "Scegli il tuo metodo di pagamento" - -#: ../includes/checkout-template.php:141 -#, fuzzy -msgid "Personal Info" -msgstr "Pagamenti Info" - -#: ../includes/checkout-template.php:144 -#, fuzzy -msgid "Email address" -msgstr "Indirizzo e-mail" - -#: ../includes/checkout-template.php:145 -#, fuzzy -msgid "Email Address" -msgstr "Indirizzo e-mail" - -#: ../includes/checkout-template.php:153 -#: ../includes/checkout-template.php:407 -#, fuzzy -msgid "Last name" -msgstr "Cognome" - -#: ../includes/checkout-template.php:166 -#, fuzzy -msgid "Enter discount" -msgstr "Inserisci sconto" - -#: ../includes/checkout-template.php:168 -#, fuzzy -msgid "Discount" -msgstr "Sconto" - -#: ../includes/checkout-template.php:170 -#, fuzzy -msgid "Apply Discount" -msgstr "Applicare Sconto" - -#: ../includes/checkout-template.php:197 -msgid "Show Terms" -msgstr "" - -#: ../includes/checkout-template.php:198 -msgid "Hide Terms" -msgstr "" - -#: ../includes/checkout-template.php:201 -msgid "Agree to Terms?" -msgstr "" - -#: ../includes/checkout-template.php:226 -msgid "Go back" -msgstr "Torna dietro" - -#: ../includes/checkout-template.php:230 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "You must be logged in to complete your purchase" -msgstr "Devi essere loggato per completare l'acquisto" - -<<<<<<< HEAD -#: ../includes/post-types.php:84 -======= -#: ../includes/checkout-template.php:259 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Credit Card Info" -msgstr "Carta di Credito Info" - -<<<<<<< HEAD -#: ../includes/post-types.php:85 -======= -#: ../includes/checkout-template.php:261 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Card name" -msgstr "Biglietto da visita" - -<<<<<<< HEAD -#: ../includes/post-types.php:86 -======= -#: ../includes/checkout-template.php:262 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Name on the Card" -msgstr "Nome sulla Carta" - -<<<<<<< HEAD -#: ../includes/post-types.php:87 -#, fuzzy -msgid "Search Payments" -msgstr "Cerca Pagamenti" - -#: ../includes/post-types.php:88 -msgid "No Payments found" -msgstr "Nessun pagamento trovato" - -#: ../includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "Nessun pagamento trovato nel Cestino" - -#: ../includes/post-types.php:126 -#, fuzzy -msgid "Downloads" -msgstr "Downloads" - -#: ../includes/post-types.php:174 -======= -#: ../includes/checkout-template.php:265 -#, fuzzy -msgid "Card number" -msgstr "Numero di carta" - -#: ../includes/checkout-template.php:266 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Card Number" -msgstr "Numero di Carta" - -<<<<<<< HEAD -#: ../includes/post-types.php:175 -======= -#: ../includes/checkout-template.php:269 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Security code" -msgstr "Codice di sicurezza" - -<<<<<<< HEAD -#: ../includes/post-types.php:176 -======= -#: ../includes/checkout-template.php:270 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "CVC" -msgstr "CVC" - -<<<<<<< HEAD -#: ../includes/post-types.php:177 -======= -#: ../includes/checkout-template.php:278 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Year" -msgstr "Anno" - -#: ../includes/checkout-template.php:279 -msgid "Expiration (MM/YYYY)" -msgstr "Scadenza (MM/AAAA)" - -<<<<<<< HEAD -#: ../includes/post-types.php:178 -======= -#: ../includes/checkout-template.php:309 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Address line 1" -msgstr "Indirizzo riga 1" - -<<<<<<< HEAD -#: ../includes/post-types.php:179 -======= -#: ../includes/checkout-template.php:310 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Billing Address" -msgstr "Indirizzo di fatturazione" - -<<<<<<< HEAD -#: ../includes/post-types.php:180 -======= -#: ../includes/checkout-template.php:313 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Address line 2" -msgstr "Indirizzo riga 2" - -<<<<<<< HEAD -#: ../includes/post-types.php:181 -======= -#: ../includes/checkout-template.php:314 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Billing Address Line 2" -msgstr "Fatturazione Indirizzo Riga 2" - -<<<<<<< HEAD -#: ../includes/post-types.php:182 -======= -#: ../includes/checkout-template.php:317 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "City" -msgstr "Città" - -<<<<<<< HEAD -#: ../includes/post-types.php:196 -======= -#: ../includes/checkout-template.php:318 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Billing City" -msgstr "Città per la Fatturazione" - -<<<<<<< HEAD -#: ../includes/post-types.php:197 -======= -#: ../includes/checkout-template.php:329 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Billing Country" -msgstr "Città per la Fatturazione" - -<<<<<<< HEAD -#: ../includes/post-types.php:198 -======= -#: ../includes/checkout-template.php:332 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "State / Province" -msgstr "Stato / Provincia" - -<<<<<<< HEAD -#: ../includes/post-types.php:199 -======= -#: ../includes/checkout-template.php:349 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Billing State / Province" -msgstr "Fatturazione Stato / Provincia" - -<<<<<<< HEAD -#: ../includes/post-types.php:200 -======= -#: ../includes/checkout-template.php:352 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Zip / Postal code" -msgstr "Zip / CAP" - -<<<<<<< HEAD -#: ../includes/post-types.php:201 -======= -#: ../includes/checkout-template.php:353 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Billing Zip / Postal Code" -msgstr "Fatturazione Zip / CAP" - -<<<<<<< HEAD -#: ../includes/post-types.php:202 -======= -#: ../includes/checkout-template.php:380 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Already have an account?" -msgstr "Hai già un account." - -<<<<<<< HEAD -#: ../includes/post-types.php:203 -======= -#: ../includes/checkout-template.php:382 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Create an account" -msgstr "Crea un account" - -<<<<<<< HEAD -#: ../includes/post-types.php:204 -msgid "New Tag Name" -msgstr "Nuovo Nome Tag" - -#: ../includes/post-types.php:233 -#: ../includes/post-types.php:234 -======= -#: ../includes/checkout-template.php:382 -msgid "(optional)" -msgstr "" - -#: ../includes/checkout-template.php:393 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Confirm password" -msgstr "Conferma password" - -<<<<<<< HEAD -#: ../includes/post-types.php:235 -======= -#: ../includes/checkout-template.php:394 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Password Again" -msgstr "Renserire Password" - -<<<<<<< HEAD -#: ../includes/post-types.php:236 -======= -#: ../includes/checkout-template.php:429 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Login to your account" -msgstr "Accedi al tuo account" - -<<<<<<< HEAD -#: ../includes/post-types.php:237 -======= -#: ../includes/checkout-template.php:432 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Your username" -msgstr "Il tuo nome utente" - -<<<<<<< HEAD -#: ../includes/process-download.php:266 -#: ../includes/process-download.php:283 -msgid "Sorry but this file does not exist." -msgstr "" - -#: ../includes/process-download.php:294 -#, fuzzy -msgid "You do not have permission to download this file" -msgstr "Non hai il permesso di scaricare questo file" - -#: ../includes/process-download.php:294 -msgid "Purchase Verification Failed" -msgstr "Verifica di Acquisto non riuscita" - -#: ../includes/process-purchase.php:206 -msgid "The selected gateway is not active" -msgstr "" - -#: ../includes/process-purchase.php:210 -msgid "No gateway has been selected" -msgstr "" - -#: ../includes/process-purchase.php:259 -msgid "You must agree to the terms of use" -msgstr "" - -#: ../includes/process-purchase.php:289 -#, fuzzy -msgid "Please enter a valid email address." -msgstr "Devi inserire un indirizzo email valido." - -#: ../includes/process-purchase.php:303 -msgid "The user information is invalid." -msgstr "" - -#: ../includes/process-purchase.php:349 -======= -#: ../includes/checkout-template.php:436 -#, fuzzy -msgid "Your password" -msgstr "La tua password" - -#: ../includes/checkout-template.php:444 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Need to create an account?" -msgstr "Bisogna creare un account." - -<<<<<<< HEAD -#: ../includes/process-purchase.php:355 -======= -#: ../includes/checkout-template.php:446 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Register" -msgstr "Registrati" - -<<<<<<< HEAD -#: ../includes/process-purchase.php:366 -#, fuzzy -msgid "You must register or login to complete your purchase" -msgstr "Devi essere loggato per completare l'acquisto" - -#: ../includes/process-purchase.php:378 -#: ../includes/process-purchase.php:522 -======= -#: ../includes/checkout-template.php:446 -msgid "or checkout as a guest." -msgstr "" - -#: ../includes/email-functions.php:59 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Hello" -msgstr "Ciao" - -<<<<<<< HEAD -#: ../includes/process-purchase.php:384 -======= -#: ../includes/email-functions.php:59 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "A download purchase has been made" -msgstr "Un download è stato acquistato" - -<<<<<<< HEAD -#: ../includes/process-purchase.php:396 -#: ../includes/process-purchase.php:529 -#, fuzzy -msgid "Enter an email" -msgstr "Inserisci un nome utente" - -#: ../includes/process-purchase.php:407 -msgid "Passwords don't match" -msgstr "Password non corrisponde" - -#: ../includes/process-purchase.php:422 -#: ../includes/process-purchase.php:487 -#, fuzzy -msgid "Enter a password" -msgstr "Inserire una password" - -#: ../includes/process-purchase.php:427 -#, fuzzy -msgid "Enter the password confirmation" -msgstr "Inserire una password" - -#: ../includes/process-purchase.php:454 -#, fuzzy -msgid "You must login or register to complete your purchase" -msgstr "Devi essere loggato per completare l'acquisto" - -#: ../includes/register-settings.php:41 -#, fuzzy -msgid "Test Mode" -msgstr "Test" - -#: ../includes/register-settings.php:42 -======= -#: ../includes/email-functions.php:60 -#, fuzzy -msgid "Downloads sold:" -msgstr "Downloads venduti:" - -#: ../includes/email-functions.php:71 -#, fuzzy -msgid "Purchased by: " -msgstr "Acquisto ID:" - -#: ../includes/email-functions.php:72 -#, fuzzy -msgid "Amount: " -msgstr "Importo:" - -#: ../includes/email-functions.php:73 -#, fuzzy -msgid "Payment Method: " -msgstr "Modalità di pagamento" - -#: ../includes/email-functions.php:74 -#, fuzzy -msgid "Thank you" -msgstr "Grazie" - -#: ../includes/email-functions.php:76 -#, fuzzy -msgid "New download purchase" -msgstr "Nuovo download acquistabile " - -#: ../includes/install.php:42 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Purchase Confirmation" -msgstr "Verifica di Acquisto non riuscita" - -<<<<<<< HEAD -#: ../includes/register-settings.php:47 -#, fuzzy -msgid "Checkout Page" -msgstr "Paga" - -#: ../includes/register-settings.php:48 -#, fuzzy -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "Questa è la pagina di pagamento in cui gli acquirenti porteranno a termine gli acquisti" - -#: ../includes/register-settings.php:54 -msgid "Success Page" -msgstr "Pagina Successo" - -#: ../includes/register-settings.php:55 -#, fuzzy -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "Questa è la pagina acquirenti in cui saranno reindirizzati dopo aver completato i loro acquisti" - -#: ../includes/register-settings.php:61 -msgid "Download Links on Success Page" -msgstr "" - -#: ../includes/register-settings.php:62 -msgid "Show a list of all download links on the success page after completing a purchase?" -msgstr "" - -#: ../includes/register-settings.php:67 -======= -#: ../includes/install.php:43 -#, fuzzy -msgid "Thank you for your purchase!" -msgstr "La data di acquisto" - -#: ../includes/process-purchase.php:206 -msgid "The selected gateway is not active" -msgstr "" - -#: ../includes/process-purchase.php:210 -msgid "No gateway has been selected" -msgstr "" - -#: ../includes/process-purchase.php:259 -msgid "You must agree to the terms of use" -msgstr "" - -#: ../includes/process-purchase.php:289 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Please enter a valid email address." -msgstr "Devi inserire un indirizzo email valido." - -<<<<<<< HEAD -#: ../includes/register-settings.php:68 -#, fuzzy -msgid "Configure the currency options" -msgstr "Configurare le opzioni su valute" - -#: ../includes/register-settings.php:73 -======= -#: ../includes/process-purchase.php:303 -msgid "The user information is invalid." -msgstr "" - -#: ../includes/process-purchase.php:349 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Username already taken" -msgstr "Nome utente già preso" - -<<<<<<< HEAD -#: ../includes/register-settings.php:74 -======= -#: ../includes/process-purchase.php:355 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Invalid username" -msgstr "Nome utente non valido" - -<<<<<<< HEAD -#: ../includes/register-settings.php:80 -======= -#: ../includes/process-purchase.php:366 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "You must register or login to complete your purchase" -msgstr "Devi essere loggato per completare l'acquisto" - -<<<<<<< HEAD -#: ../includes/register-settings.php:81 -======= -#: ../includes/process-purchase.php:378 -#: ../includes/process-purchase.php:522 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Invalid email" -msgstr "E-mail valido" - -<<<<<<< HEAD -#: ../includes/register-settings.php:84 -======= -#: ../includes/process-purchase.php:384 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Email already used" -msgstr "Email già utilizzata" - -<<<<<<< HEAD -#: ../includes/register-settings.php:85 -======= -#: ../includes/process-purchase.php:396 -#: ../includes/process-purchase.php:529 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Enter an email" -msgstr "Inserisci un nome utente" - -<<<<<<< HEAD -#: ../includes/register-settings.php:90 -#, fuzzy -msgid "Thousands Separator" -msgstr "Separatore delle migliaia" - -#: ../includes/register-settings.php:91 -======= -#: ../includes/process-purchase.php:407 -msgid "Passwords don't match" -msgstr "Password non corrisponde" - -#: ../includes/process-purchase.php:422 -#: ../includes/process-purchase.php:487 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Enter a password" -msgstr "Inserire una password" - -<<<<<<< HEAD -#: ../includes/register-settings.php:98 -======= -#: ../includes/process-purchase.php:427 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Enter the password confirmation" -msgstr "Inserire una password" - -<<<<<<< HEAD -#: ../includes/register-settings.php:99 -======= -#: ../includes/process-purchase.php:454 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "You must login or register to complete your purchase" -msgstr "Devi essere loggato per completare l'acquisto" - -<<<<<<< HEAD -#: ../includes/register-settings.php:110 -#: ../includes/admin-pages/settings.php:34 -======= -#: ../includes/gateway-functions.php:28 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Test Payment" -msgstr "Nuovo Pagamento" - -<<<<<<< HEAD -#: ../includes/register-settings.php:111 -======= -#: ../includes/admin-notices.php:24 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Discount code updated." -msgstr "Codice di sconto aggiornato." - -<<<<<<< HEAD -#: ../includes/register-settings.php:117 -#, fuzzy -msgid "Accepted Payment Method Icons" -msgstr "Metodi di pagamento accettati" - -#: ../includes/register-settings.php:118 -#, fuzzy -msgid "Display icons for the selected payment methods" -msgstr "Visualizzare le icone per i metodi di pagamento selezionati" - -#: ../includes/register-settings.php:118 -#, fuzzy -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "Sarà inoltre necessario configurare le impostazioni del gateway se si accetta carte di credito" - -#: ../includes/register-settings.php:131 -#, fuzzy -msgid "PayPal Settings" -msgstr "Impostazioni PayPal" - -#: ../includes/register-settings.php:132 -======= -#: ../includes/admin-notices.php:27 -#, fuzzy -msgid "There was a problem updating your discount code, please try again." -msgstr "C'è stato un problema aggiornare il codice di sconto, si prega di riprovare." - -#: ../includes/admin-notices.php:30 -msgid "The payment has been deleted." -msgstr "" - -#: ../includes/admin-notices.php:33 -msgid "The purchase receipt has been resent." -msgstr "" - -#: ../includes/admin-notices.php:38 -#, php-format -msgid "The payment history needs updated. %s" -msgstr "" - -#: ../includes/admin-notices.php:38 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Click to Upgrade" -msgstr "Clicca %s per l'acquisto di nuovo." - -<<<<<<< HEAD -#: ../includes/register-settings.php:137 -#, fuzzy -msgid "PayPal Email" -msgstr "Email PayPal" - -#: ../includes/register-settings.php:138 -#, fuzzy -msgid "Enter your PayPal account's email" -msgstr "Inserisci la tua email account PayPal" - -#: ../includes/register-settings.php:144 -#, fuzzy -msgid "Alternate PayPal Purchase Verification" -msgstr "Alternare verifica Acquisto PayPal" - -#: ../includes/register-settings.php:145 -#, fuzzy -msgid "If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal." -msgstr "Se i pagamenti non sono sempre contrassegnati come completati, selezionare questa opzione" - -#: ../includes/register-settings.php:150 -#, fuzzy -msgid "Disable PayPal IPN Verification" -msgstr "Alternare verifica Acquisto PayPal" - -#: ../includes/register-settings.php:151 -#, fuzzy -msgid "If payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases." -msgstr "Se i pagamenti non sono sempre contrassegnati come completati, e la disattivazione cURL non risolve il problema, quindi selezionare questa casella" - -#: ../includes/register-settings.php:160 -msgid "Email Template" -msgstr "" - -#: ../includes/register-settings.php:161 -msgid "Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" to see the new template." -msgstr "" - -#: ../includes/register-settings.php:173 -#, fuzzy -msgid "From Name" -msgstr "Da Nome" - -#: ../includes/register-settings.php:174 -#, fuzzy -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "Nome da cui proviene la vendita. Questo probabilmente dovrebbe essere il vostro sito o nome del negozio." - -#: ../includes/register-settings.php:179 -#, fuzzy -msgid "From Email" -msgstr "Da E-mail" - -#: ../includes/register-settings.php:180 -#, fuzzy -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "Email da usare nel modulo della ricevuta. Questo funzionerà come \"da\" e \"rispondere-a\" indirizzo." - -#: ../includes/register-settings.php:185 -======= -#: ../includes/admin-notices.php:55 -msgid "There seems to be an issue with the server. Please try again in a few minutes." -msgstr "" - -#: ../includes/post-types.php:44 -#, fuzzy, php-format -msgid "Add New %1$s" -msgstr "Aggiungi nuovo" - -#: ../includes/post-types.php:45 -#, fuzzy, php-format -msgid "Edit %1$s" -msgstr "Modifica" - -#: ../includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "" - -#: ../includes/post-types.php:47 -#, fuzzy, php-format -msgid "All %2$s" -msgstr "Tutti i Tag" - -#: ../includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "" - -#: ../includes/post-types.php:49 -#, fuzzy, php-format -msgid "Search %2$s" -msgstr "Ricerca Tags" - -#: ../includes/post-types.php:50 -#, fuzzy, php-format -msgid "No %2$s found" -msgstr "Nessun pagamento trovato" - -#: ../includes/post-types.php:51 -#, fuzzy, php-format -msgid "No %2$s found in Trash" -msgstr "Nessun pagamento trovato nel Cestino" - -#: ../includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "" - -#: ../includes/post-types.php:79 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Payments" -msgstr "Pagamenti" - -<<<<<<< HEAD -#: ../includes/register-settings.php:186 -======= -#: ../includes/post-types.php:80 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Payment" -msgstr "Pagamento" - -<<<<<<< HEAD -#: ../includes/register-settings.php:192 -======= -#: ../includes/post-types.php:82 -#, fuzzy -msgid "Add New Payment" -msgstr "Aggiungi nuovo pagamento" - -#: ../includes/post-types.php:83 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Edit Payment" -msgstr "Modifica pagamento" - -<<<<<<< HEAD -#: ../includes/register-settings.php:193 -======= -#: ../includes/post-types.php:84 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "New Payment" -msgstr "Nuovo Pagamento" - -<<<<<<< HEAD -#: ../includes/register-settings.php:194 -======= -#: ../includes/post-types.php:85 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "All Payments" -msgstr "Tutti i pagamenti" - -<<<<<<< HEAD -#: ../includes/register-settings.php:195 -======= -#: ../includes/post-types.php:86 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "View Payment" -msgstr "Mostra di pagamento" - -<<<<<<< HEAD -#: ../includes/register-settings.php:196 -#, fuzzy -msgid "The total price of the purchase" -msgstr "La data di acquisto" - -#: ../includes/register-settings.php:197 -#, fuzzy -msgid "The unique ID number for this purchase receipt" -msgstr "Inserire la liena del soggetto della e-mail per la ricevuta d'acquisto" - -#: ../includes/register-settings.php:198 -#, fuzzy -msgid "The method of payment used for this purchase" -msgstr "La data di acquisto" - -#: ../includes/register-settings.php:199 -======= -#: ../includes/post-types.php:87 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Search Payments" -msgstr "Cerca Pagamenti" - -<<<<<<< HEAD -#: ../includes/register-settings.php:208 -msgid "Disable Styles" -msgstr "" - -#: ../includes/register-settings.php:209 -msgid "Check this to disable all included styling" -msgstr "" - -#: ../includes/register-settings.php:214 -#, fuzzy -msgid "Checkout Button Color" -msgstr "Colore Pulsante " - -#: ../includes/register-settings.php:215 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "" - -#: ../includes/register-settings.php:225 -#, fuzzy -msgid "Disable Ajax" -msgstr "Abilitare Ajax" - -#: ../includes/register-settings.php:226 -#, fuzzy -msgid "Check this to disable AJAX for the shopping cart." -msgstr "Selezionare questa opzione per abilitare AJAX per il carrello della spesa." - -#: ../includes/register-settings.php:231 -======= -#: ../includes/post-types.php:88 -msgid "No Payments found" -msgstr "Nessun pagamento trovato" - -#: ../includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "Nessun pagamento trovato nel Cestino" - -#: ../includes/post-types.php:126 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Downloads" -msgstr "Downloads" - -<<<<<<< HEAD -#: ../includes/register-settings.php:232 -======= -#: ../includes/post-types.php:174 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Category" -msgstr "Categoria" - -<<<<<<< HEAD -#: ../includes/register-settings.php:237 -#, fuzzy -msgid "Disable Guest Checkout" -msgstr "Disabilita Ospiti Pagamento" - -#: ../includes/register-settings.php:238 -msgid "Require that users be logged-in to purchase files." -msgstr "Si richiede che gli utenti siano registrati per l'acquisto di file." - -#: ../includes/register-settings.php:243 -#, fuzzy -msgid "Show Register / Login Form?" -msgstr "Mostra Registrati / Registrazione Modulo?" - -#: ../includes/register-settings.php:244 -#, fuzzy -msgid "Display the registration and login forms on the checkout page for non-logged-in users." -msgstr "Visualizzare i moduli registrazione e di login nella pagina di pagamento per gli utenti non loggati." - -#: ../includes/register-settings.php:249 -#, fuzzy -msgid "Download Link Expiration" -msgstr "Configurazione Download" - -#: ../includes/register-settings.php:250 -msgid "How long should download links be valid for? Default is 24 hours from the time they are generated. Enter a time in hours." -msgstr "" - -#: ../includes/register-settings.php:256 -======= -#: ../includes/post-types.php:175 -#, fuzzy -msgid "Search Categories" -msgstr "Categorie di ricerca" - -#: ../includes/post-types.php:176 -#, fuzzy -msgid "All Categories" -msgstr "Tutte le categorie" - -#: ../includes/post-types.php:177 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Parent Category" -msgstr "Parent Categoria" - -<<<<<<< HEAD -#: ../includes/register-settings.php:257 -#, fuzzy -msgid "Check this if you do not want to allow users to redownload items from their purchase history." -msgstr "Selezionare questa opzione se non si desidera consentire agli utenti di scaricare di nuovo gli elementi dalla loro cronologia degli acquisti" - -#: ../includes/register-settings.php:262 -msgid "Terms of Agreement" -msgstr "" - -#: ../includes/register-settings.php:268 -msgid "Agree to Terms" -msgstr "" - -#: ../includes/register-settings.php:269 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing." -msgstr "" - -#: ../includes/register-settings.php:274 -msgid "Agree to Terms Label" -msgstr "" - -#: ../includes/register-settings.php:275 -msgid "Label shown next to the agree to terms check box." -msgstr "" - -#: ../includes/register-settings.php:281 -msgid "Agreement Text" -msgstr "" - -#: ../includes/register-settings.php:282 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "" - -#: ../includes/register-settings.php:287 -#, fuzzy -msgid "Complete Purchase Text" -msgstr "Testo per tasto Acquisto" - -#: ../includes/register-settings.php:288 -#, fuzzy -msgid "The button label for completing a purchase." -msgstr "Questa è la pagina acquirenti in cui saranno reindirizzati dopo aver completato i loro acquisti" - -#: ../includes/register-settings.php:314 -======= -#: ../includes/post-types.php:178 -#, fuzzy -msgid "Parent Category:" -msgstr "Parent Categoria:" - -#: ../includes/post-types.php:179 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Edit Category" -msgstr "Modifica Categoria" - -<<<<<<< HEAD -#: ../includes/register-settings.php:340 -======= -#: ../includes/post-types.php:180 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Update Category" -msgstr "Aggiornare Categoria" - -<<<<<<< HEAD -#: ../includes/register-settings.php:366 -======= -#: ../includes/post-types.php:181 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Add New Category" -msgstr "Aggiungi Nuova Categoria" - -<<<<<<< HEAD -#: ../includes/register-settings.php:392 -#, fuzzy -msgid "Style Settings" -msgstr "Impostazioni PayPal" - -#: ../includes/register-settings.php:419 -======= -#: ../includes/post-types.php:182 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "New Category Name" -msgstr "Nuovo Nome Categoria " - -<<<<<<< HEAD -#: ../includes/register-settings.php:746 -#, fuzzy -msgid "Settings Updated" -msgstr "Impostazioni" - -#: ../includes/scripts.php:40 -======= -#: ../includes/post-types.php:196 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Tag" -msgstr "Etichetta" - -<<<<<<< HEAD -#: ../includes/scripts.php:41 -======= -#: ../includes/post-types.php:197 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Search Tags" -msgstr "Ricerca Tags" - -<<<<<<< HEAD -#: ../includes/scripts.php:42 -#, fuzzy -msgid "Please enter an email address before applying a discount code" -msgstr "Si prega di inserire un codice di sconto" - -#: ../includes/scripts.php:44 -msgid "You have already added this item to your cart" -msgstr "Hai già aggiunto questo prodotto al tuo carrello" - -#: ../includes/scripts.php:45 -#, fuzzy -msgid "Your cart is empty" -msgstr "Il carrello è vuoto" - -#: ../includes/scripts.php:46 -======= -#: ../includes/post-types.php:198 -#, fuzzy -msgid "All Tags" -msgstr "Tutti i Tag" - -#: ../includes/post-types.php:199 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Parent Tag" -msgstr "Parent Tag" - -<<<<<<< HEAD -#: ../includes/scripts.php:123 -#, fuzzy -msgid "Add New Download" -msgstr "Aggiungi Nuovo Download" - -#: ../includes/scripts.php:124 -msgid "Use This File" -msgstr "" - -#: ../includes/scripts.php:125 -msgid "Sorry, not available for variable priced products." -msgstr "" - -#: ../includes/scripts.php:126 -msgid "Are you sure you wish to delete this payment?" -msgstr "" - -#: ../includes/shortcodes.php:333 -#, fuzzy, php-format -msgid "No %s found" -msgstr "Nessun pagamento trovato" - -#: ../includes/template-functions.php:48 -#, fuzzy -msgid "No checkout page has been configured." -msgstr "Non ci sono codici sconto che sono stati creati." - -#: ../includes/template-functions.php:167 -#, fuzzy -msgid "added to your cart" -msgstr "aggiunto al tuo carrello" - -#: ../includes/template-functions.php:263 -msgid "Gray" -msgstr "" - -#: ../includes/template-functions.php:264 -msgid "Pink" -msgstr "" - -#: ../includes/template-functions.php:265 -#, fuzzy -msgid "Blue" -msgstr "Acquirente:" - -#: ../includes/template-functions.php:266 -msgid "Green" -msgstr "" - -#: ../includes/template-functions.php:267 -#, fuzzy -msgid "Teal" -msgstr "Totale" - -#: ../includes/template-functions.php:268 -#, fuzzy -msgid "Black" -msgstr "Torna indietro" - -#: ../includes/template-functions.php:269 -msgid "Dark Gray" -msgstr "" - -#: ../includes/template-functions.php:270 -msgid "Orange" -msgstr "" - -#: ../includes/template-functions.php:271 -msgid "Purple" -msgstr "" - -#: ../includes/template-functions.php:272 -#, fuzzy -msgid "Slate" -msgstr "Data" - -#: ../includes/template-functions.php:295 -#, fuzzy -msgid "You have already purchased this item, but you may purchase it again." -msgstr "Hai già aggiunto questo prodotto al tuo carrello" - -#: ../includes/thickbox.php:29 -#: ../includes/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "" - -#: ../includes/thickbox.php:30 -======= -#: ../includes/post-types.php:200 -#, fuzzy -msgid "Parent Tag:" -msgstr "Parent Tag:" - -#: ../includes/post-types.php:201 -#, fuzzy -msgid "Edit Tag" -msgstr "Modifica Tag" - -#: ../includes/post-types.php:202 -#, fuzzy -msgid "Update Tag" -msgstr "Aggiornamento Tag" - -#: ../includes/post-types.php:203 -#, fuzzy -msgid "Add New Tag" -msgstr "Aggiungi nuovo tag" - -#: ../includes/post-types.php:204 -msgid "New Tag Name" -msgstr "Nuovo Nome Tag" - -#: ../includes/post-types.php:233 -#: ../includes/post-types.php:234 -#, fuzzy -msgid "Download updated." -msgstr "Download aggiornato." - -#: ../includes/post-types.php:235 -#, fuzzy -msgid "Download published." -msgstr "Download pubblicato." - -#: ../includes/post-types.php:236 -#, fuzzy -msgid "Download saved." -msgstr "Download salvato." - -#: ../includes/post-types.php:237 -#, fuzzy -msgid "Download submitted." -msgstr "Download consegnato." - -#: ../includes/shortcodes.php:333 -#, fuzzy, php-format -msgid "No %s found" -msgstr "Nessun pagamento trovato" - -#: ../includes/gateways/paypal.php:271 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Invalid IPN" -msgstr "IPN non valido" - -<<<<<<< HEAD -#: ../includes/thickbox.php:65 -======= -#: ../includes/templates/history-purchases.php:11 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Purchase ID" -msgstr "Acquisto ID:" - -<<<<<<< HEAD -#: ../includes/thickbox.php:88 -#, fuzzy, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "Usa il modulo qui sotto per inserire lo short code per l'acquisto di un download." - -#: ../includes/thickbox.php:91 -#, fuzzy, php-format -msgid "Choose a %s" -msgstr "Scegli uno stile" - -#: ../includes/thickbox.php:100 -#, fuzzy -msgid "Choose a style" -msgstr "Scegli uno stile" - -#: ../includes/thickbox.php:111 -msgid "Choose a button color" -msgstr "Scegli un colore per il pulsante" - -#: ../includes/thickbox.php:120 -======= -#: ../includes/templates/history-purchases.php:13 -#, fuzzy -msgid "Amount" -msgstr "Quantità" - -#: ../includes/templates/history-purchases.php:14 -#, fuzzy -msgid "Files" -msgstr "Files" - -#: ../includes/templates/history-purchases.php:54 -#, fuzzy -msgid "You have not made any purchases" -msgstr "Hai già acquistato questo articolo." - -#: ../includes/templates/checkout_cart.php:6 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Item Name" -msgstr "Nome Articolo" - -<<<<<<< HEAD -#: ../includes/thickbox.php:124 -#, fuzzy -msgid "Cancel" -msgstr "Annullare" - -#: ../includes/thickbox.php:126 -msgid "Button Styles" -msgstr "Stili Pulsante" - -#: ../includes/widgets.php:39 -======= -#: ../includes/templates/checkout_cart.php:7 -#, fuzzy -msgid "Item Price" -msgstr "Prezzo Articolo " - -#: ../includes/templates/checkout_cart.php:8 -#: ../includes/admin-pages/discount-codes.php:47 -#: ../includes/admin-pages/discount-codes.php:60 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Actions" -msgstr "Azioni" - -<<<<<<< HEAD -#: ../includes/widgets.php:39 -======= -#: ../includes/templates/checkout_cart.php:49 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Total" -msgstr "Totale" - -<<<<<<< HEAD -#: ../includes/widgets.php:82 -#: ../includes/widgets.php:162 -======= -#: ../includes/templates/history-downloads.php:10 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Download Name" -msgstr "Download Nome" - -<<<<<<< HEAD -#: ../includes/widgets.php:87 -======= -#: ../includes/templates/history-downloads.php:72 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "You have not purchased any downloads" -msgstr "Non hai ancora acquistato alcun download" - -<<<<<<< HEAD -#: ../includes/widgets.php:112 -======= -#: ../includes/admin-pages/discount-codes.php:40 -#: ../includes/admin-pages/discount-codes.php:53 -#: ../includes/admin-pages/forms/edit-discount.php:32 -#: ../includes/admin-pages/forms/add-discount.php:27 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Downloads Categories / Tags" -msgstr "Downloads Carello" - -<<<<<<< HEAD -#: ../includes/widgets.php:112 -#, fuzzy -msgid "Display the downloads categories or tags" -msgstr "Visualizzare il carrello della spesa download" - -#: ../includes/widgets.php:167 -msgid "Taxonomy:" -msgstr "" - -#: ../includes/widgets.php:193 -msgid "Display a user's purchase history" -msgstr "" - -#: ../includes/widgets.php:232 -#, fuzzy -msgid "No downloadable files found." -msgstr "Nessun file scaricabile trovato." - -#: ../includes/widgets.php:259 -#, fuzzy -msgid "Title" -msgstr "Titolo:" - -#: ../includes/admin-pages/add-ons.php:69 -#, fuzzy -msgid "Add Ons for Easy Digital Downloads" -msgstr "Easy Digital Download Impostazioni" - -#: ../includes/admin-pages/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "" - -#: ../includes/admin-pages/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:40 -#: ../includes/admin-pages/discount-codes.php:53 -#, fuzzy -msgid "Code" -msgstr "Codice" - -#: ../includes/admin-pages/discount-codes.php:41 -#: ../includes/admin-pages/discount-codes.php:54 -#, fuzzy -msgid "Amount" -msgstr "Quantità" - -======= ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#: ../includes/admin-pages/discount-codes.php:42 -#: ../includes/admin-pages/discount-codes.php:55 -#, fuzzy -msgid "Uses" -msgstr "Utilizza" - -#: ../includes/admin-pages/discount-codes.php:43 -#: ../includes/admin-pages/discount-codes.php:56 -<<<<<<< HEAD -======= -#: ../includes/admin-pages/forms/edit-discount.php:80 -#: ../includes/admin-pages/forms/add-discount.php:84 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Max Uses" -msgstr "Max Usa" - -#: ../includes/admin-pages/discount-codes.php:44 -#: ../includes/admin-pages/discount-codes.php:57 -#, fuzzy -msgid "Start Date" -msgstr "Data di inizio" - -#: ../includes/admin-pages/discount-codes.php:45 -#: ../includes/admin-pages/discount-codes.php:58 -#, fuzzy -msgid "Expiration" -msgstr "Scadenza" - -<<<<<<< HEAD -#: ../includes/admin-pages/discount-codes.php:47 -#: ../includes/admin-pages/discount-codes.php:60 -#, fuzzy -msgid "Actions" -msgstr "Azioni" - -======= ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#: ../includes/admin-pages/discount-codes.php:82 -#: ../includes/admin-pages/discount-codes.php:84 -#, fuzzy -msgid "unlimited" -msgstr "illimitato" - -#: ../includes/admin-pages/discount-codes.php:93 -#, fuzzy -msgid "No start date" -msgstr "Nessuna data di inizio" - -#: ../includes/admin-pages/discount-codes.php:100 -#, fuzzy -msgid "Expired" -msgstr "Scaduto" - -#: ../includes/admin-pages/discount-codes.php:102 -#, fuzzy -msgid "no expiration" -msgstr "senza scadenza" - -#: ../includes/admin-pages/discount-codes.php:108 -#: ../includes/admin-pages/payments-history.php:176 -#, fuzzy -msgid "Edit" -msgstr "Modifica" - -#: ../includes/admin-pages/discount-codes.php:110 -#, fuzzy -msgid "Deactivate" -msgstr "Disattivare" - -#: ../includes/admin-pages/discount-codes.php:112 -#, fuzzy -msgid "Activate" -msgstr "Attivare" - -#: ../includes/admin-pages/discount-codes.php:114 -#: ../includes/admin-pages/payments-history.php:178 -#, fuzzy -msgid "Delete" -msgstr "Cancellare" - -#: ../includes/admin-pages/discount-codes.php:119 -#, fuzzy -msgid "No discount codes have been created." -msgstr "Non ci sono codici sconto che sono stati creati." - -<<<<<<< HEAD -======= -#: ../includes/admin-pages/reports.php:41 -msgid "Download Sales and Earnings PDF Report for all Products" -msgstr "" - -#: ../includes/admin-pages/reports.php:42 -msgid "Download a CSV Customers List" -msgstr "" - -#: ../includes/admin-pages/reports.php:44 -#, fuzzy -msgid "Please Note: Transactions created while in test mode are not included on this page or in the PDF reports." -msgstr "Transazioni create nella modalità di prova non sono incluse in questa pagina." - ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#: ../includes/admin-pages/payments-history.php:81 -msgid "All" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:86 -#, fuzzy -msgid "Completed" -msgstr "Completato" - -#: ../includes/admin-pages/payments-history.php:97 -#, fuzzy -msgid "Export" -<<<<<<< HEAD -msgstr "Scadenza" -======= -msgstr "Rapporti" ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d - -#: ../includes/admin-pages/payments-history.php:101 -#, fuzzy -msgid "Payment mode" -msgstr "Modalità di pagamento" - -#: ../includes/admin-pages/payments-history.php:103 -#, fuzzy -msgid "Live" -msgstr "Vivere" - -#: ../includes/admin-pages/payments-history.php:104 -msgid "Test" -msgstr "Test" - -#: ../includes/admin-pages/payments-history.php:114 -#, fuzzy -msgid "Payments per page" -msgstr "Pagamenti per pagina" - -#: ../includes/admin-pages/payments-history.php:116 -#, fuzzy -msgid "Show" -msgstr "Mostra" - -#: ../includes/admin-pages/payments-history.php:122 -#, fuzzy -msgid "Showing payments for: " -msgstr "Nessun pagamento trovato" - -#: ../includes/admin-pages/payments-history.php:122 -<<<<<<< HEAD -#, fuzzy -msgid "clear" -msgstr "Anno" -======= -msgid "clear" -msgstr "" ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d - -#: ../includes/admin-pages/payments-history.php:177 -#, fuzzy -msgid "Resend Purchase Receipt" -msgstr "Rispedisci ricevuta d'acquisto" - -#: ../includes/admin-pages/payments-history.php:190 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "Acquisto Dettagli per il pagamento #%s" - -#: ../includes/admin-pages/payments-history.php:190 -#, fuzzy -msgid "View Order Details" -msgstr "Visualizza dettagli dell'ordine" - -#: ../includes/admin-pages/payments-history.php:198 -#, fuzzy -msgid "Purchased File" -msgstr "File Acquistato" - -#: ../includes/admin-pages/payments-history.php:198 -#, fuzzy -msgid "Purchased Files" -msgstr "I file acquistati" - -#: ../includes/admin-pages/payments-history.php:241 -#, fuzzy -msgid "Discount used:" -msgstr "Sconto utilizzato:" - -#: ../includes/admin-pages/payments-history.php:242 -#, fuzzy -msgid "Total:" -msgstr "Totale:" - -#: ../includes/admin-pages/payments-history.php:245 -#, fuzzy -msgid "Buyer's Personal Details:" -msgstr "Dettagli personali Clienti:" - -#: ../includes/admin-pages/payments-history.php:247 -#, fuzzy -msgid "Name:" -msgstr "Nome:" - -#: ../includes/admin-pages/payments-history.php:248 -#, fuzzy -msgid "Email:" -msgstr "Email:" - -#: ../includes/admin-pages/payments-history.php:257 -<<<<<<< HEAD -#, fuzzy -msgid "Payment Method:" -msgstr "Modalità di pagamento" - -#: ../includes/admin-pages/payments-history.php:262 -#, fuzzy -msgid "Purchase Key" -msgstr "Acquista" - -#: ../includes/admin-pages/payments-history.php:265 -#, fuzzy -msgid "Close" -msgstr "Chiudere" - -#: ../includes/admin-pages/payments-history.php:295 -#, fuzzy -msgid "Total Earnings:" -msgstr "Risultato:" - -#: ../includes/admin-pages/reports.php:41 -msgid "Download Sales and Earnings PDF Report for all Products" -msgstr "" - -#: ../includes/admin-pages/reports.php:42 -msgid "Download a CSV Customers List" -msgstr "" - -#: ../includes/admin-pages/reports.php:44 -#, fuzzy -msgid "Please Note: Transactions created while in test mode are not included on this page or in the PDF reports." -msgstr "Transazioni create nella modalità di prova non sono incluse in questa pagina." -======= -#, fuzzy -msgid "Payment Method:" -msgstr "Modalità di pagamento" - -#: ../includes/admin-pages/payments-history.php:262 -#, fuzzy -msgid "Purchase Key" -msgstr "Testo per tasto Acquisto" - -#: ../includes/admin-pages/payments-history.php:265 -#: ../includes/admin-pages/forms/edit-payment.php:92 -#, fuzzy -msgid "Close" -msgstr "Chiudere" - -#: ../includes/admin-pages/payments-history.php:295 -#, fuzzy -msgid "Total Earnings:" -msgstr "Risultato:" ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d - -#: ../includes/admin-pages/settings.php:33 -#, fuzzy -msgid "General" -msgstr "Generale" - -#: ../includes/admin-pages/settings.php:35 -#, fuzzy -msgid "Emails" -msgstr "E-mail" - -#: ../includes/admin-pages/settings.php:36 -#, fuzzy -msgid "Styles" -<<<<<<< HEAD -msgstr "Vendite" -======= -msgstr "Stili Pulsante" ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d - -#: ../includes/admin-pages/settings.php:37 -#, fuzzy -msgid "Misc" -msgstr "Misc" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:12 -======= -#: ../includes/admin-pages/add-ons.php:69 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Add Ons for Easy Digital Downloads" -msgstr "Easy Digital Download Impostazioni" - -#: ../includes/admin-pages/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "" - -#: ../includes/admin-pages/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:13 -#, fuzzy -msgid "Something went wrong." -msgstr "Qualcosa è andato storto." - -#: ../includes/admin-pages/forms/edit-discount.php:17 -#, fuzzy -msgid "Edit Discount" -msgstr "Modifica Sconto" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:22 -#: ../includes/admin-pages/forms/edit-discount.php:27 -======= -#: ../includes/admin-pages/forms/edit-discount.php:17 -#: ../includes/admin-pages/forms/edit-payment.php:16 -#, fuzzy -msgid "Go Back" -msgstr "Torna indietro" - -#: ../includes/admin-pages/forms/edit-discount.php:27 -#: ../includes/admin-pages/forms/add-discount.php:22 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The name of this discount" -msgstr "Il nome di questo sconto" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:31 -#: ../includes/admin-pages/forms/edit-discount.php:36 -======= -#: ../includes/admin-pages/forms/edit-discount.php:36 -#: ../includes/admin-pages/forms/add-discount.php:31 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "Inserire un codice per lo sconto, come 10PERCENT" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:36 -#: ../includes/admin-pages/forms/edit-discount.php:41 -======= -#: ../includes/admin-pages/forms/edit-discount.php:41 -#: ../includes/admin-pages/forms/add-discount.php:36 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Type" -msgstr "Tipo" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:40 -#: ../includes/admin-pages/forms/edit-discount.php:45 -======= -#: ../includes/admin-pages/forms/edit-discount.php:45 -#: ../includes/admin-pages/forms/add-discount.php:40 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Percentage" -msgstr "Percentuale" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:41 -#: ../includes/admin-pages/forms/edit-discount.php:46 -======= -#: ../includes/admin-pages/forms/edit-discount.php:46 -#: ../includes/admin-pages/forms/add-discount.php:41 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Flat amount" -msgstr "Importo forfettario" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:43 -#: ../includes/admin-pages/forms/edit-discount.php:48 -======= -#: ../includes/admin-pages/forms/edit-discount.php:48 -#: ../includes/admin-pages/forms/add-discount.php:43 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The kind of discount to apply for this discount." -msgstr "Il tipo di sconto da applicare a questo sconto." - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:52 -#: ../includes/admin-pages/forms/edit-discount.php:57 -======= -#: ../includes/admin-pages/forms/edit-discount.php:57 -#: ../includes/admin-pages/forms/add-discount.php:52 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The amount of this discount code." -msgstr "L'importo di questo codice sconto." - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:57 -#: ../includes/admin-pages/forms/edit-discount.php:62 -======= -#: ../includes/admin-pages/forms/edit-discount.php:62 -#: ../includes/admin-pages/forms/add-discount.php:57 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Start date" -msgstr "Data di inizio" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:61 -#: ../includes/admin-pages/forms/edit-discount.php:66 -======= -#: ../includes/admin-pages/forms/edit-discount.php:66 -#: ../includes/admin-pages/forms/add-discount.php:61 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Enter the start date for this discount code in the format of yyyy-mm-dd. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "Inserisci la data di inizio per questo codice di sconto nel formato aaaa-mm-dd. Per nessuna data di inizio, lasciare in bianco. Se è inserito, lo sconto può essere utilizzato solo dopo o in questa data." - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:66 -#: ../includes/admin-pages/forms/edit-discount.php:71 -======= -#: ../includes/admin-pages/forms/edit-discount.php:71 -#: ../includes/admin-pages/forms/add-discount.php:66 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Expiration date" -msgstr "Data di scadenza" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:70 -#: ../includes/admin-pages/forms/edit-discount.php:75 -======= -#: ../includes/admin-pages/forms/edit-discount.php:75 -#: ../includes/admin-pages/forms/add-discount.php:70 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Enter the expiration date for this discount code in the format of yyyy-mm-dd. For no expiration, leave blank" -msgstr "Inserisci la data di scadenza per questo codice di sconto nel formato aaaa-mm-dd. Per nessuna scadenza, lasciare in bianco" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:75 -#: ../includes/admin-pages/forms/edit-discount.php:89 -#, fuzzy -msgid "Minimum Amount" -msgstr "Quantità" - -#: ../includes/admin-pages/forms/add-discount.php:79 -#: ../includes/admin-pages/forms/edit-discount.php:93 -#, fuzzy -msgid "The minimum amount that must be purchased before this discount can be used. Leave blank for no minimum." -msgstr "Il numero massimo di volte che questo sconto può essere utilizzato. Lasciare in bianco per un numero illimitato." - -#: ../includes/admin-pages/forms/add-discount.php:88 -#: ../includes/admin-pages/forms/edit-discount.php:84 -======= -#: ../includes/admin-pages/forms/edit-discount.php:84 -#: ../includes/admin-pages/forms/add-discount.php:88 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "Il numero massimo di volte che questo sconto può essere utilizzato. Lasciare in bianco per un numero illimitato." - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/add-discount.php:96 -#, fuzzy -msgid "Add Discount Code" -msgstr "Aggiungi Codice Sconto" - -#: ../includes/admin-pages/forms/edit-discount.php:13 -#, fuzzy -msgid "Something went wrong." -msgstr "Qualcosa è andato storto." - -#: ../includes/admin-pages/forms/edit-discount.php:17 -======= -#: ../includes/admin-pages/forms/edit-discount.php:89 -#: ../includes/admin-pages/forms/add-discount.php:75 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "Minimum Amount" -msgstr "Quantità" - -<<<<<<< HEAD -#: ../includes/admin-pages/forms/edit-discount.php:17 -#: ../includes/admin-pages/forms/edit-payment.php:16 -======= -#: ../includes/admin-pages/forms/edit-discount.php:93 -#: ../includes/admin-pages/forms/add-discount.php:79 ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -msgid "The minimum amount that must be purchased before this discount can be used. Leave blank for no minimum." -msgstr "Il numero massimo di volte che questo sconto può essere utilizzato. Lasciare in bianco per un numero illimitato." - -#: ../includes/admin-pages/forms/edit-discount.php:102 -#, fuzzy -msgid "Active" -msgstr "Attivo" - -#: ../includes/admin-pages/forms/edit-discount.php:103 -#, fuzzy -msgid "Inactive" -msgstr "Inattivo" - -#: ../includes/admin-pages/forms/edit-discount.php:105 -#, fuzzy -msgid "The status of this discount code." -msgstr "Lo stato di questo codice sconto." - -#: ../includes/admin-pages/forms/edit-discount.php:115 -#, fuzzy -msgid "Update Discount Code" -msgstr "Aggiorna il Codice Sconto" - -<<<<<<< HEAD -======= -#: ../includes/admin-pages/forms/add-discount.php:12 -#, fuzzy -msgid "Add New Discount" -msgstr "Aggiungi Nuovo Sconto" - -#: ../includes/admin-pages/forms/add-discount.php:96 -#, fuzzy -msgid "Add Discount Code" -msgstr "Aggiungi Codice Sconto" - ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#: ../includes/admin-pages/forms/edit-payment.php:22 -#, fuzzy -msgid "Buyer's Email" -msgstr "Da E-mail" - -#: ../includes/admin-pages/forms/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:31 -#, fuzzy -msgid "Downloads Purchased" -msgstr "Downloads Acquistato" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "Aggiungi il download per l'acquisto di #%s" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -#, fuzzy -msgid "Add download to purchase" -msgstr "Aggiungi il download per l'acquisto" - -#: ../includes/admin-pages/forms/edit-payment.php:48 -#, fuzzy -msgid "Payment Status" -msgstr "Controlla lo stato dell'ordine" - -#: ../includes/admin-pages/forms/edit-payment.php:64 -#, fuzzy -msgid "Send Purchase Receipt" -msgstr "Rispedisci ricevuta d'acquisto" - -#: ../includes/admin-pages/forms/edit-payment.php:68 -msgid "Check this box to send the purchase receipt, including all download links." -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:78 -#, fuzzy -msgid "Update Payment" -msgstr "Aggiorna Pagamento" - -#: ../includes/admin-pages/forms/edit-payment.php:91 -#, fuzzy -msgid "Add Selected Downloads" -msgstr "Aggiungi Downloads selezionati" - -<<<<<<< HEAD -#: ../includes/gateways/paypal.php:271 -======= ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -#~ msgid "Your shopping cart is empty" -#~ msgstr "Il carrello è vuoto" - -#, fuzzy -#~ msgid "email@domain.com" -#~ msgstr "email@dominio.com" - -#, fuzzy -#~ msgid "Manual Payment" -#~ msgstr "Pagamento Manuale" - -#, fuzzy -#~ msgid "Enter the download price" -#~ msgstr "Inserisci il prezzo per il download" - -#, fuzzy -#~ msgid "Download Stats" -#~ msgstr "Statistiche di download" - -#, fuzzy -#~ msgid "Short Code for this Download" -#~ msgstr "Short Code per questo download" - -<<<<<<< HEAD -#: ../includes/templates/checkout_cart.php:6 -#, fuzzy -msgid "Item Name" -msgstr "Nome Articolo" - -#: ../includes/templates/checkout_cart.php:7 -#, fuzzy -msgid "Item Price" -msgstr "Prezzo Articolo " - -#: ../includes/templates/checkout_cart.php:49 -#, fuzzy -msgid "Total" -msgstr "Totale" - -#: ../includes/templates/history-downloads.php:10 -#, fuzzy -msgid "Download Name" -msgstr "Download Nome" - -#: ../includes/templates/history-downloads.php:12 -#: ../includes/templates/history-purchases.php:14 -#, fuzzy -msgid "Files" -msgstr "Files" - -#: ../includes/templates/history-downloads.php:72 -#, fuzzy -msgid "You have not purchased any downloads" -msgstr "Non hai ancora acquistato alcun download" - -#: ../includes/templates/history-purchases.php:11 -#, fuzzy -msgid "Purchase ID" -msgstr "Acquisto ID:" - -#: ../includes/templates/history-purchases.php:54 -#, fuzzy -msgid "You have not made any purchases" -msgstr "Hai già acquistato questo articolo." - -#, fuzzy -#~ msgid "Your shopping cart is empty" -#~ msgstr "Il carrello è vuoto" - -#, fuzzy -#~ msgid "email@domain.com" -#~ msgstr "email@dominio.com" - -#, fuzzy -#~ msgid "Manual Payment" -#~ msgstr "Pagamento Manuale" - -#, fuzzy -#~ msgid "Enter the download price" -#~ msgstr "Inserisci il prezzo per il download" - -#, fuzzy -#~ msgid "Download Stats" -#~ msgstr "Statistiche di download" - -#, fuzzy -#~ msgid "Short Code for this Download" -#~ msgstr "Short Code per questo download" - -======= ->>>>>>> 2835288eaff7fca70441ef9afae39b132d8d211d -#, fuzzy -#~ msgid "pending" -#~ msgstr "in attesa" - -#, fuzzy -#~ msgid "complete" -#~ msgstr "completato" - -#, fuzzy -#~ msgid "Edit Download" -#~ msgstr "Modifica Scarica" - -#, fuzzy -#~ msgid "New Download" -#~ msgstr "Nuovo Scarica" - -#, fuzzy -#~ msgid "All Downloads" -#~ msgstr "Tutti i download" - -#, fuzzy -#~ msgid "View Download" -#~ msgstr "Visualizza Scarica" - -#, fuzzy -#~ msgid "Search Downloads" -#~ msgstr "Cerca Downloads" - -#~ msgid "No Downloads found in Trash" -#~ msgstr "Nessun download trovato nel Cestino" - -#, fuzzy -#~ msgid "Something has gone wrong, please try again" -#~ msgstr "Qualcosa è andato storto, riprova" - -#, fuzzy -#~ msgid "Use this plugin in test mode" -#~ msgstr "Utilizzare questo plugin in modalità di prova" - -#, fuzzy -#~ msgid "Purchase Page" -#~ msgstr "Acquisto Pagina" - -#, fuzzy -#~ msgid "Disable cURL for PayPal IPN" -#~ msgstr "Disattivare cURL per PayPal IPN" - -#, fuzzy -#~ msgid "Add to Cart" -#~ msgstr "Aggiungi al carrello" - -#, fuzzy -#~ msgid "No downloads found" -#~ msgstr "Nessun download trovato" - -#, fuzzy -#~ msgid "here" -#~ msgstr "qui" - -#, fuzzy -#~ msgid "Choose a download" -#~ msgstr "Scegli un download" - -#, fuzzy -#~ msgid "Price: " -#~ msgstr "Prezzo:" diff --git a/languages/edd-ja.mo b/languages/edd-ja.mo deleted file mode 100755 index 8a87e9a1446..00000000000 Binary files a/languages/edd-ja.mo and /dev/null differ diff --git a/languages/edd-ja.po b/languages/edd-ja.po deleted file mode 100755 index dd0a8428c67..00000000000 --- a/languages/edd-ja.po +++ /dev/null @@ -1,1824 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-31 10:45-0600\n" -"PO-Revision-Date: 2012-07-07 19:04+0900\n" -"Last-Translator: Jun Shirasawa \n" -"Language-Team: Pippin's Plugins\n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_n;_x\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: English\n" -"X-Poedit-Country: UNITED STATES\n" -"X-Poedit-SearchPath-0: ..\n" -"X-Poedit-SearchPath-1: ../includes\n" -"X-Poedit-SearchPath-2: ../includes/admin-pages\n" -"X-Poedit-SearchPath-3: ../includes/admin-pages/forms\n" -"X-Poedit-SearchPath-4: ../includes/gateways\n" -"X-Poedit-SearchPath-5: .\n" - -#: ../includes/template-functions.php:55 -#: ../includes/thickbox.php:61 -#: ../includes/dashboard-columns.php:69 -msgid "Purchase" -msgstr "購入" - -#: ../includes/template-functions.php:110 -#: ../includes/template-functions.php:121 -#: ../includes/cart-template.php:50 -#: ../includes/cart-template.php:53 -msgid "Checkout" -msgstr "お会計" - -#: ../includes/template-functions.php:128 -msgid "added to your cart" -msgstr "買い物カゴに入りました" - -#: ../includes/template-functions.php:219 -msgid "Gray" -msgstr "グレー" - -#: ../includes/template-functions.php:220 -msgid "Pink" -msgstr "ピンク" - -#: ../includes/template-functions.php:221 -msgid "Blue" -msgstr "青" - -#: ../includes/template-functions.php:222 -msgid "Green" -msgstr "緑" - -#: ../includes/template-functions.php:223 -msgid "Teal" -msgstr "青緑" - -#: ../includes/template-functions.php:224 -msgid "Black" -msgstr "黒" - -#: ../includes/template-functions.php:225 -msgid "Dark Gray" -msgstr "ダークグレイ" - -#: ../includes/template-functions.php:226 -msgid "Orange" -msgstr "オレンジ" - -#: ../includes/template-functions.php:227 -msgid "Purple" -msgstr "紫" - -#: ../includes/template-functions.php:228 -msgid "Slate" -msgstr "青灰色" - -#: ../includes/template-functions.php:245 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "既に購入済です(が、再購入は可能)。" - -#: ../includes/payment-functions.php:287 -msgid "Pending" -msgstr "保留" - -#: ../includes/payment-functions.php:288 -msgid "Complete" -msgstr "完了" - -#: ../includes/payment-functions.php:289 -msgid "Refunded" -msgstr "返金されました" - -#: ../includes/email-template.php:76 -msgid "Sample Product Title" -msgstr "[商品名]" - -#: ../includes/email-template.php:79 -msgid "Sample Download File Name" -msgstr "[ダウンロードファイル名]" - -#: ../includes/email-template.php:121 -msgid "Purchase Receipt Preview" -msgstr "購入通知プレビュー" - -#: ../includes/email-template.php:121 -msgid "Preview Purchase Receipt" -msgstr "購入通知をプレビューする" - -#: ../includes/email-template.php:126 -msgid "Close" -msgstr "閉じる" - -#: ../includes/email-template.php:255 -msgid "Default Template" -msgstr "デフォルトテンプレート" - -#: ../includes/email-template.php:256 -msgid "No template, plain text only" -msgstr "テンプレートなし、プレーンテキストのみ" - -#: ../includes/cart-template.php:83 -msgid "remove" -msgstr "削除" - -#: ../includes/cart-template.php:100 -msgid "Your cart is empty." -msgstr "買い物カゴは空です。" - -#: ../includes/thickbox.php:29 -#: ../includes/thickbox.php:30 -#: ../includes/thickbox.php:123 -msgid "Insert Download" -msgstr "ダウンロードを挿入" - -#: ../includes/thickbox.php:65 -msgid "You must choose a download" -msgstr "ダウンロードを選択して下さい" - -#: ../includes/thickbox.php:88 -msgid "Use the form below to insert the short code for purchasing a download." -msgstr "ダウンロード購入用ショートコードを挿入するのに以下のフォームを使って下さい。" - -#: ../includes/thickbox.php:91 -msgid "Choose a download" -msgstr "ダウンロードを選択" - -#: ../includes/thickbox.php:100 -msgid "Choose a style" -msgstr "スタイルを選択" - -#: ../includes/thickbox.php:111 -msgid "Choose a button color" -msgstr "ボタン色を選択" - -#: ../includes/thickbox.php:120 -msgid "Link text . . ." -msgstr "リンク文言..." - -#: ../includes/thickbox.php:124 -msgid "Cancel" -msgstr "キャンセル" - -#: ../includes/thickbox.php:126 -msgid "Button Styles" -msgstr "ボタン外観" - -#: ../includes/register-settings.php:41 -msgid "Test Mode" -msgstr "テストモード" - -#: ../includes/register-settings.php:42 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "テストモード中は、本番のトランザクションは一切処理されません。完全なテストモードを使うには、利用する決済代行機関のサンドボックス(テスト環境)アカウントを持っている必要があります。" - -#: ../includes/register-settings.php:47 -msgid "Purchase Page" -msgstr "決済ページ" - -#: ../includes/register-settings.php:48 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "購入者が決済を行って購入を完了させるためのページです" - -#: ../includes/register-settings.php:54 -msgid "Success Page" -msgstr "完了ページ" - -#: ../includes/register-settings.php:55 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "購入処理が完了した後に購入者が目にするページです" - -#: ../includes/register-settings.php:61 -msgid "Currency Settings" -msgstr "通貨設定" - -#: ../includes/register-settings.php:62 -msgid "Configure the currency options" -msgstr "通貨に関するオプション設定" - -#: ../includes/register-settings.php:67 -msgid "Currency" -msgstr "通貨" - -#: ../includes/register-settings.php:68 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "通貨を選択して下さい。いくつかの決済システムでは利用できる通貨が限られていることに留意下さい。" - -#: ../includes/register-settings.php:74 -msgid "Currency Position" -msgstr "通貨記号の位置" - -#: ../includes/register-settings.php:75 -msgid "Choose the location of the currency sign." -msgstr "通貨記号の位置を選択して下さい。" - -#: ../includes/register-settings.php:78 -msgid "Before - $10" -msgstr "前 - $10" - -#: ../includes/register-settings.php:79 -msgid "After - 10$" -msgstr "後 - 10$" - -#: ../includes/register-settings.php:84 -msgid "Thousands Separator" -msgstr "桁区切り" - -#: ../includes/register-settings.php:85 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "桁区切り記号(通常は「,」)" - -#: ../includes/register-settings.php:92 -msgid "Decimal Separator" -msgstr "小数点区切り" - -#: ../includes/register-settings.php:93 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "小数点区切り記号(通常は「.」)" - -#: ../includes/register-settings.php:104 -msgid "Payment Gateways" -msgstr "決済代行機関" - -#: ../includes/register-settings.php:105 -msgid "Choose the payment gateways you want to enable." -msgstr "利用したい決済代行機関を選んでください。" - -#: ../includes/register-settings.php:111 -msgid "Accepted Payment Method Icons" -msgstr "利用可能な決済代行機関のアイコン" - -#: ../includes/register-settings.php:112 -msgid "Display icons for the selected payment methods" -msgstr "選択された決済代行機関のアイコンを表示する" - -#: ../includes/register-settings.php:112 -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "クレジットカードを利用可能にする場合、決済代行機関用の設定が必要になる場合があります" - -#: ../includes/register-settings.php:124 -msgid "PayPal Settings" -msgstr "PayPal設定" - -#: ../includes/register-settings.php:125 -msgid "Configure the PayPal settings" -msgstr "PayPal設定の実行" - -#: ../includes/register-settings.php:130 -msgid "PayPal Email" -msgstr "PayPalメール" - -#: ../includes/register-settings.php:131 -msgid "Enter your PayPal account's email" -msgstr "PayPalアカウントのメールアドレス" - -#: ../includes/register-settings.php:137 -msgid "Alternate PayPal Purchase Verification" -msgstr "PayPal購入確認を代替する" - -#: ../includes/register-settings.php:138 -msgid "If payments are not getting marked as complete, then check this box. Note, this requires that buyers return to your site from PayPal." -msgstr "決済が完了にならない場合、このチェックボックスをオンにしてみて下さい。この場合、購入者はPayPalからあなたのサイトに戻されることに留意下さい。" - -#: ../includes/register-settings.php:147 -msgid "From Name" -msgstr "差出人名" - -#: ../includes/register-settings.php:148 -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "請求書発行元の名前です。あなたのサイトやショップの名前など。" - -#: ../includes/register-settings.php:153 -msgid "From Email" -msgstr "差出人メールアドレス" - -#: ../includes/register-settings.php:154 -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "購入通知メールの送信元アドレスです。これはFrom、またreply-toとしても機能します。" - -#: ../includes/register-settings.php:159 -msgid "Purchase Email Subject" -msgstr "購入メール件名" - -#: ../includes/register-settings.php:160 -msgid "Enter the subject line for the purchase receipt email" -msgstr "購入通知メールの件名を入力して下さい" - -#: ../includes/register-settings.php:165 -msgid "Purchase Receipt" -msgstr "購入通知" - -#: ../includes/register-settings.php:166 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "購入処理が完了した時にユーザーに送られるメールの本文を入力して下さい。HTMLも利用できます。利用可能なタグは以下の通り:" - -#: ../includes/register-settings.php:167 -msgid "A list of download URLs for each download purchased" -msgstr "購入いただいた商品のダウンロードリンクは以下の通りです" - -#: ../includes/register-settings.php:168 -msgid "The buyer's name" -msgstr "ご購入者氏名" - -#: ../includes/register-settings.php:169 -msgid "The date of the purchase" -msgstr "ご購入年月日" - -#: ../includes/register-settings.php:170 -msgid "The total price of the purchase" -msgstr "ご購入金額合計" - -#: ../includes/register-settings.php:171 -msgid "Your site name" -msgstr "サイト名" - -#: ../includes/register-settings.php:193 -msgid "Disable Styles" -msgstr "外観を無効化" - -#: ../includes/register-settings.php:194 -msgid "Check this to disable all included styling" -msgstr "すべての外観設定を無効化するにはここをチェックして下さい" - -#: ../includes/register-settings.php:199 -msgid "Checkout Button Color" -msgstr "会計ボタンの色" - -#: ../includes/register-settings.php:200 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "会計ボタンに使う色を選択して下さい" - -#: ../includes/register-settings.php:210 -msgid "Enable Ajax" -msgstr "Ajaxを有効にする" - -#: ../includes/register-settings.php:211 -msgid "Check this to enable AJAX for the shopping cart." -msgstr "買い物カゴ機能にAjaxを使いたい場合はここをチェックして下さい。" - -#: ../includes/register-settings.php:216 -msgid "Enable jQuery Validation" -msgstr "jQueryバリデーションを有効化する" - -#: ../includes/register-settings.php:217 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "会計フォームにjQueryバリデーションを利用したい場合ここをチェックして下さい。" - -#: ../includes/register-settings.php:222 -msgid "Disable Guest Checkout" -msgstr "ゲスト会計を無効化" - -#: ../includes/register-settings.php:223 -msgid "Require that users be logged-in to purchase files." -msgstr "購入するにはユーザーはログインしなければならない。" - -#: ../includes/register-settings.php:228 -msgid "Show Register / Login Form?" -msgstr "登録/ログインフォームを見せますか?" - -#: ../includes/register-settings.php:229 -msgid "Display the registration and login forms on the checkout page for non-logged-in users" -msgstr "ログインしていないユーザーに登録およびログインフォームを表示する" - -#: ../includes/register-settings.php:234 -msgid "Disable Redownload?" -msgstr "再ダウンロードを無効化しますか?" - -#: ../includes/register-settings.php:235 -msgid "Check this if you do not want to allow users to redownload items from their purchase history" -msgstr "購入記録から再ダウンロードを行えないようにするにはここをチェックして下さい" - -#: ../includes/register-settings.php:240 -msgid "Terms of Agreement" -msgstr "利用規約に同意" - -#: ../includes/register-settings.php:246 -msgid "Agree to Terms" -msgstr "利用規約に同意する" - -#: ../includes/register-settings.php:247 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing" -msgstr "購入前にユーザーが同意しなければならない規約を見せる場合ここをチェックして下さい" - -#: ../includes/register-settings.php:252 -msgid "Agree to Terms Label" -msgstr "規約同意の文言" - -#: ../includes/register-settings.php:253 -msgid "Label shown next to the agree to terms check box" -msgstr "規約同意チェックボックスにあてがう文言" - -#: ../includes/register-settings.php:259 -msgid "Agreement Text" -msgstr "同意文言" - -#: ../includes/register-settings.php:260 -msgid "If Agree to Terms is checked, enter the agreement terms here" -msgstr "規約に同意した場合、それを表す文言" - -#: ../includes/register-settings.php:286 -msgid "General Settings" -msgstr "一般設定" - -#: ../includes/register-settings.php:312 -msgid "Payment Gateway Settings" -msgstr "決済代行機関の設定" - -#: ../includes/register-settings.php:338 -msgid "Email Settings" -msgstr "メール設定" - -#: ../includes/register-settings.php:364 -msgid "Style Settings" -msgstr "スタイル設定" - -#: ../includes/register-settings.php:391 -msgid "Misc Settings" -msgstr "その他の設定" - -#: ../includes/cart-functions.php:390 -#, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "買い物カゴに%sが追加されました。" - -#: ../includes/cart-functions.php:391 -msgid "Checkout." -msgstr "会計する" - -#: ../includes/dashboard-columns.php:26 -msgid "Name" -msgstr "名前" - -#: ../includes/dashboard-columns.php:27 -#: ../includes/widgets.php:168 -msgid "Categories" -msgstr "カテゴリ" - -#: ../includes/dashboard-columns.php:28 -#: ../includes/widgets.php:169 -msgid "Tags" -msgstr "タグ" - -#: ../includes/dashboard-columns.php:29 -msgid "Sales" -msgstr "セールス" - -#: ../includes/dashboard-columns.php:30 -msgid "Earnings" -msgstr "収益" - -#: ../includes/dashboard-columns.php:31 -msgid "Short Code" -msgstr "ショートコード" - -#: ../includes/dashboard-columns.php:32 -msgid "Date" -msgstr "日付" - -#: ../includes/dashboard-columns.php:177 -msgid "Show all categories" -msgstr "すべてのカテゴリを見る" - -#: ../includes/dashboard-columns.php:188 -msgid "Show all tags" -msgstr "すべてのタグを見る" - -#: ../includes/widgets.php:38 -msgid "Downloads Cart" -msgstr "買い物カゴ" - -#: ../includes/widgets.php:38 -msgid "Display the downloads shopping cart" -msgstr "買い物カゴの中を見る" - -#: ../includes/widgets.php:81 -#: ../includes/widgets.php:161 -msgid "Title:" -msgstr "タイトル:" - -#: ../includes/widgets.php:86 -msgid "Show Quantity:" -msgstr "数量を見る:" - -#: ../includes/widgets.php:111 -msgid "Downloads Categories / Tags" -msgstr "カテゴリ/タグ" - -#: ../includes/widgets.php:111 -msgid "Display the downloads categories or tags" -msgstr "ダウンロード商品のカテゴリまたはタグを表示" - -#: ../includes/widgets.php:166 -msgid "Taxonomy:" -msgstr "分類:" - -#: ../includes/scripts.php:40 -msgid "Please enter a discount code" -msgstr "ディスカウントコードを入力してください" - -#: ../includes/scripts.php:41 -msgid "Discount Applied" -msgstr "ディスカウントが適用されました" - -#: ../includes/scripts.php:43 -msgid "You have already added this item to your cart" -msgstr "この商品はすでに買い物カゴに入っています" - -#: ../includes/scripts.php:44 -msgid "Your cart is empty" -msgstr "買い物カゴは空です" - -#: ../includes/scripts.php:45 -msgid "Loading" -msgstr "読み込み中" - -#: ../includes/scripts.php:112 -msgid "Add New Download" -msgstr "新規追加" - -#: ../includes/scripts.php:113 -msgid "Use This File" -msgstr "このファイルを使う" - -#: ../includes/scripts.php:114 -msgid "Are you sure you wish to delete this payment?" -msgstr "この支払いを削除してもよろしいですか?" - -#: ../includes/graphing.php:31 -#: ../includes/graphing.php:77 -msgid "Download" -msgstr "ダウンロード" - -#: ../includes/graphing.php:42 -msgid "Downloads Performance in Sales" -msgstr "ダウンロード売り上げ" - -#: ../includes/graphing.php:88 -msgid "Downloads Performance in Earnings" -msgstr "ダウンロード収益" - -#: ../includes/graphing.php:121 -#: ../includes/checkout-template.php:254 -msgid "Month" -msgstr "月" - -#: ../includes/graphing.php:136 -msgid "Earnings per month" -msgstr "月当たりの収益" - -#: ../includes/metabox.php:22 -msgid "Download Configuration" -msgstr "ダウンロード設定" - -#: ../includes/metabox.php:23 -msgid "Download Stats" -msgstr "ダウンロード統計" - -#: ../includes/metabox.php:24 -msgid "Purchase Log" -msgstr "購入ログ" - -#: ../includes/metabox.php:25 -msgid "File Download Log" -msgstr "ダウンロードログ" - -#: ../includes/metabox.php:26 -msgid "Payment Info" -msgstr "支払い情報" - -#: ../includes/metabox.php:69 -msgid "Pricing" -msgstr "価格設定" - -#: ../includes/metabox.php:73 -msgid "Check this to enable variable pricing." -msgstr "可変価格を有効にするにはここをチェックして下さい。" - -#: ../includes/metabox.php:96 -msgid "price option name" -msgstr "価格オプション名" - -#: ../includes/metabox.php:97 -#: ../includes/metabox.php:107 -msgid "9.99" -msgstr "9.99" - -#: ../includes/metabox.php:106 -msgid "price name" -msgstr "価格名称" - -#: ../includes/metabox.php:110 -msgid "Add New Price Option" -msgstr "価格オプションを追加" - -#: ../includes/metabox.php:126 -msgid "Enter the download price. Do not include a currency symbol" -msgstr "価格を入力してください。通貨記号は含みません" - -#: ../includes/metabox.php:147 -msgid "Download Files" -msgstr "ダウンロードファイル" - -#: ../includes/metabox.php:157 -#: ../includes/metabox.php:168 -msgid "file name" -msgstr "ファイル名" - -#: ../includes/metabox.php:158 -#: ../includes/metabox.php:169 -msgid "file url" -msgstr "ファイルURL" - -#: ../includes/metabox.php:159 -#: ../includes/metabox.php:170 -msgid "Upload File" -msgstr "アップロード" - -#: ../includes/metabox.php:173 -msgid "Add New" -msgstr "新規追加" - -#: ../includes/metabox.php:173 -msgid "Upload the downloadable files." -msgstr "ダウンロード可能なファイルをアップロード" - -#: ../includes/metabox.php:194 -msgid "Purchase Text" -msgstr "購入に対する文言" - -#: ../includes/metabox.php:196 -msgid "Add the text you would like displayed for the purchase text" -msgstr "「購入」の代わりに表示するテキストを追加して下さい" - -#: ../includes/metabox.php:215 -msgid "Link Style" -msgstr "リンクの外観" - -#: ../includes/metabox.php:217 -msgid "Button" -msgstr "ボタン" - -#: ../includes/metabox.php:218 -msgid "Text" -msgstr "テキスト" - -#: ../includes/metabox.php:219 -msgid "Choose the style of the purchase link" -msgstr "購入リンクの外観を選択して下さい" - -#: ../includes/metabox.php:240 -msgid "Button Color" -msgstr "ボタン色" - -#: ../includes/metabox.php:248 -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "上でボタンが選択されている場合、購入リンクの色を選択して下さい。" - -#: ../includes/metabox.php:266 -msgid "Disable the purchase button?" -msgstr "購入ボタンを無効にしますか?" - -#: ../includes/metabox.php:269 -msgid "Check this if you do not want the purchase button displayed." -msgstr "購入ボタンを表示したくない時はここをチェックして下さい。" - -#: ../includes/metabox.php:287 -msgid "Notes" -msgstr "注意" - -#: ../includes/metabox.php:290 -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "外観のオプションはショートコードでのスタイルには反映されません。ショートコードを使うとサイトのどこにでも購入ボタンを配置することができます。" - -#: ../includes/metabox.php:296 -msgid "This short code can be placed anywhere on your site" -msgstr "このショートコードはサイト上のどこにでも使うことができます" - -#: ../includes/metabox.php:383 -msgid "Sales:" -msgstr "セールス:" - -#: ../includes/metabox.php:389 -msgid "Earnings:" -msgstr "収益:" - -#: ../includes/metabox.php:414 -msgid "Sales Log" -msgstr "セールス記録" - -#: ../includes/metabox.php:416 -msgid "Each sale for this download is listed below." -msgstr "このダウンロードに対するそれぞれの売り上げは以下の通りです。" - -#: ../includes/metabox.php:430 -#: ../includes/metabox.php:488 -msgid "Date:" -msgstr "日付:" - -#: ../includes/metabox.php:434 -msgid "Buyer:" -msgstr "購入者:" - -#: ../includes/metabox.php:438 -msgid "Purchase ID:" -msgstr "購入ID:" - -#: ../includes/metabox.php:446 -msgid "No sales yet" -msgstr "まだ売れていません" - -#: ../includes/metabox.php:470 -msgid "Download Log" -msgstr "ダウンロード記録" - -#: ../includes/metabox.php:472 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "ダウンロードされるたびに以下に記録されます。" - -#: ../includes/metabox.php:492 -msgid "Downloaded by:" -msgstr "ダウンロードした人:" - -#: ../includes/metabox.php:496 -msgid "IP Address:" -msgstr "IPアドレス:" - -#: ../includes/metabox.php:500 -msgid "File: " -msgstr "ファイル:" - -#: ../includes/metabox.php:509 -msgid "No file downloads yet yet" -msgstr "まだダウンロードされていません" - -#: ../includes/ajax-functions.php:107 -#: ../includes/process-purchase.php:222 -msgid "The discount you entered is invalid" -msgstr "入力されたディスカウントは正しくありません" - -#: ../includes/admin-pages.php:26 -msgid "Payment History" -msgstr "支払い履歴" - -#: ../includes/admin-pages.php:27 -msgid "Discount Codes" -msgstr "ディスカウントコード" - -#: ../includes/admin-pages.php:28 -msgid "Earnings and Sales Reports" -msgstr "収益および売り上げ報告" - -#: ../includes/admin-pages.php:28 -msgid "Reports" -msgstr "レポート" - -#: ../includes/admin-pages.php:29 -msgid "Easy Digital Download Settings" -msgstr "Easy Digital Download 設定" - -#: ../includes/admin-pages.php:29 -msgid "Settings" -msgstr "設定" - -#: ../includes/admin-pages.php:30 -msgid "Easy Digital Download Add Ons" -msgstr "アドオン" - -#: ../includes/admin-pages.php:30 -msgid "Add Ons" -msgstr "アドオン" - -#: ../includes/login-register.php:45 -msgid "Log into Your Account" -msgstr "ログインする" - -#: ../includes/login-register.php:47 -#: ../includes/login-register.php:48 -#: ../includes/checkout-template.php:333 -#: ../includes/checkout-template.php:334 -#: ../includes/checkout-template.php:381 -msgid "Username" -msgstr "ユーザー名" - -#: ../includes/login-register.php:51 -#: ../includes/checkout-template.php:337 -#: ../includes/checkout-template.php:338 -#: ../includes/checkout-template.php:385 -msgid "Password" -msgstr "パスワード" - -#: ../includes/login-register.php:58 -#: ../includes/checkout-template.php:345 -msgid "Login" -msgstr "ログイン" - -#: ../includes/login-register.php:61 -msgid "Lost Password" -msgstr "パスワード忘れ" - -#: ../includes/login-register.php:62 -msgid "Lost Password?" -msgstr "パスワードを忘れてしまいましたか?" - -#: ../includes/login-register.php:69 -msgid "You are already logged in" -msgstr "すでにログインしています" - -#: ../includes/login-register.php:92 -#: ../includes/process-purchase.php:450 -msgid "The password you entered is incorrect" -msgstr "入力されたパスワードは正しくありません" - -#: ../includes/login-register.php:95 -#: ../includes/process-purchase.php:469 -msgid "The username you entered does not exist" -msgstr "入力されたユーザー名は存在しません" - -#: ../includes/error-tracking.php:30 -msgid "Error" -msgstr "エラー" - -#: ../includes/misc-functions.php:164 -msgid "US Dollars ($)" -msgstr "米ドル ($)" - -#: ../includes/misc-functions.php:165 -msgid "Euros (€)" -msgstr "ユーロ (€)" - -#: ../includes/misc-functions.php:166 -msgid "Pounds Sterling (£)" -msgstr "ポンド (£)" - -#: ../includes/misc-functions.php:167 -msgid "Australian Dollars ($)" -msgstr "豪ドル ($)" - -#: ../includes/misc-functions.php:168 -msgid "Brazilian Real ($)" -msgstr "ブラジル レアル($)" - -#: ../includes/misc-functions.php:169 -msgid "Canadian Dollars ($)" -msgstr "カナダドル ($)" - -#: ../includes/misc-functions.php:170 -msgid "Czech Koruna" -msgstr "チェコ コルナ" - -#: ../includes/misc-functions.php:171 -msgid "Danish Krone" -msgstr "デンマーク クローネ" - -#: ../includes/misc-functions.php:172 -msgid "Hong Kong Dollar ($)" -msgstr "香港ドル ($)" - -#: ../includes/misc-functions.php:173 -msgid "Hungarian Forint" -msgstr "ハンガリー フォリント" - -#: ../includes/misc-functions.php:174 -msgid "Israeli Shekel" -msgstr "イスラエル シェケル" - -#: ../includes/misc-functions.php:175 -msgid "Japanese Yen (¥)" -msgstr "日本円" - -#: ../includes/misc-functions.php:176 -msgid "Malaysian Ringgits" -msgstr "マレーシア リンギ" - -#: ../includes/misc-functions.php:177 -msgid "Mexican Peso ($)" -msgstr "メキシコ ペソ($)" - -#: ../includes/misc-functions.php:178 -msgid "New Zealand Dollar ($)" -msgstr "ニュージーランドドル ($)" - -#: ../includes/misc-functions.php:179 -msgid "Norwegian Krone" -msgstr "ノルウェー クローネ" - -#: ../includes/misc-functions.php:180 -msgid "Philippine Pesos" -msgstr "フィリピン ペソ" - -#: ../includes/misc-functions.php:181 -msgid "Polish Zloty" -msgstr "ポーランド ズローティ" - -#: ../includes/misc-functions.php:182 -msgid "Singapore Dollar ($)" -msgstr "シンガポールドル ($)" - -#: ../includes/misc-functions.php:183 -msgid "Swedish Krona" -msgstr "スゥエーデン クローナ" - -#: ../includes/misc-functions.php:184 -msgid "Swiss Franc" -msgstr "スイス フラン" - -#: ../includes/misc-functions.php:185 -msgid "Taiwan New Dollars" -msgstr "台湾ドル ($)" - -#: ../includes/misc-functions.php:186 -msgid "Thai Baht" -msgstr "タイ バーツ" - -#: ../includes/misc-functions.php:187 -msgid "Indian Rupee" -msgstr "インド ルピー" - -#: ../includes/misc-functions.php:188 -msgid "Turkish Lira" -msgstr "トルコ リラ" - -#: ../includes/process-download.php:94 -msgid "You do not have permission to download this file" -msgstr "ファイルをダウンロードするための権限がありません" - -#: ../includes/process-download.php:94 -msgid "Purchase Verification Failed" -msgstr "購入確認に失敗しました" - -#: ../includes/checkout-template.php:75 -msgid "Choose Your Payment Method" -msgstr "支払い方法を選択して下さい" - -#: ../includes/checkout-template.php:86 -msgid "Next" -msgstr "次へ" - -#: ../includes/checkout-template.php:133 -msgid "Email address" -msgstr "メールアドレス" - -#: ../includes/checkout-template.php:134 -msgid "Email Address" -msgstr "メールアドレス" - -#: ../includes/checkout-template.php:137 -#: ../includes/checkout-template.php:138 -#: ../includes/checkout-template.php:351 -#: ../includes/checkout-template.php:352 -msgid "First Name" -msgstr "名" - -#: ../includes/checkout-template.php:141 -#: ../includes/checkout-template.php:355 -msgid "Last name" -msgstr "姓" - -#: ../includes/checkout-template.php:142 -#: ../includes/checkout-template.php:356 -msgid "Last Name" -msgstr "姓" - -#: ../includes/checkout-template.php:150 -msgid "Enter discount" -msgstr "ディスカウントを入力" - -#: ../includes/checkout-template.php:152 -msgid "Discount" -msgstr "ディスカウント" - -#: ../includes/checkout-template.php:154 -msgid "Apply Discount" -msgstr "ディスカウントを適用" - -#: ../includes/checkout-template.php:180 -msgid "Show Terms" -msgstr "規約を表示" - -#: ../includes/checkout-template.php:181 -msgid "Hide Terms" -msgstr "規約を非表示" - -#: ../includes/checkout-template.php:184 -msgid "Agree to Terms?" -msgstr "利用規約に同意しますか?" - -#: ../includes/checkout-template.php:208 -msgid "Go back" -msgstr "戻る" - -#: ../includes/checkout-template.php:212 -msgid "You must be logged in to complete your purchase" -msgstr "購入するにはログインする必要があります" - -#: ../includes/checkout-template.php:241 -msgid "Card name" -msgstr "カード名義" - -#: ../includes/checkout-template.php:242 -msgid "Name on the Card" -msgstr "カード名義" - -#: ../includes/checkout-template.php:245 -msgid "Card number" -msgstr "カード番号" - -#: ../includes/checkout-template.php:246 -msgid "Card Number" -msgstr "カード番号" - -#: ../includes/checkout-template.php:249 -msgid "Security code" -msgstr "セキュリティコード" - -#: ../includes/checkout-template.php:250 -msgid "CVC" -msgstr "CVC" - -#: ../includes/checkout-template.php:256 -msgid "Year" -msgstr "年" - -#: ../includes/checkout-template.php:257 -msgid "Expiration (MM/YYYY)" -msgstr "有効期限(MM/YYYY)" - -#: ../includes/checkout-template.php:285 -msgid "Credit Card Info" -msgstr "クレジットカード情報" - -#: ../includes/checkout-template.php:287 -msgid "Address line 1" -msgstr "住所1" - -#: ../includes/checkout-template.php:288 -msgid "Billing Address" -msgstr "住所1" - -#: ../includes/checkout-template.php:291 -msgid "Address line 2" -msgstr "住所2" - -#: ../includes/checkout-template.php:292 -msgid "Billing Address Line 2" -msgstr "住所2" - -#: ../includes/checkout-template.php:295 -msgid "City" -msgstr "市区町村" - -#: ../includes/checkout-template.php:296 -msgid "Billing City" -msgstr "市区町村" - -#: ../includes/checkout-template.php:299 -msgid "State / Province" -msgstr "都道府県" - -#: ../includes/checkout-template.php:300 -msgid "Billing State / Province" -msgstr "都道府県" - -#: ../includes/checkout-template.php:303 -msgid "Zip / Postal code" -msgstr "郵便番号" - -#: ../includes/checkout-template.php:304 -msgid "Billing Zip / Postal Code" -msgstr "郵便番号" - -#: ../includes/checkout-template.php:331 -msgid "Create an account" -msgstr "アカウントを作成" - -#: ../includes/checkout-template.php:331 -msgid "(optional)" -msgstr "(任意)" - -#: ../includes/checkout-template.php:341 -msgid "Confirm password" -msgstr "パスワード確認" - -#: ../includes/checkout-template.php:342 -msgid "Password Again" -msgstr "パスワード再入力" - -#: ../includes/checkout-template.php:345 -msgid "Already have an account?" -msgstr "すでにアカウントをお持ちですか?" - -#: ../includes/checkout-template.php:347 -#: ../includes/checkout-template.php:348 -msgid "Email" -msgstr "メールアドレス" - -#: ../includes/checkout-template.php:378 -msgid "Login to your account" -msgstr "ログイン" - -#: ../includes/checkout-template.php:380 -msgid "Your username" -msgstr "ユーザーID" - -#: ../includes/checkout-template.php:384 -msgid "Your password" -msgstr "パスワード" - -#: ../includes/checkout-template.php:391 -msgid "Need to create an account?" -msgstr "アカウントを作成しますか?" - -#: ../includes/checkout-template.php:393 -msgid "Register" -msgstr "登録" - -#: ../includes/checkout-template.php:393 -msgid "or checkout as a guest." -msgstr "ゲストとして会計" - -#: ../includes/email-functions.php:47 -msgid "Hello" -msgstr "こんにちは" - -#: ../includes/email-functions.php:47 -msgid "A download purchase has been made" -msgstr "購入処理が行われました" - -#: ../includes/email-functions.php:48 -msgid "Downloads sold:" -msgstr "商品:" - -#: ../includes/email-functions.php:57 -msgid "Amount: " -msgstr "合計:" - -#: ../includes/email-functions.php:58 -msgid "Thank you" -msgstr "ありがとうございました" - -#: ../includes/email-functions.php:60 -msgid "New download purchase" -msgstr "新しいお買いもの" - -#: ../includes/install.php:41 -msgid "Purchase Confirmation" -msgstr "購入確認" - -#: ../includes/install.php:42 -msgid "Thank you for your purchase!" -msgstr "ご購入ありがとうございました!" - -#: ../includes/install.php:51 -msgid "Purchase History" -msgstr "購入履歴" - -#: ../includes/process-purchase.php:190 -msgid "The selected gateway is not active" -msgstr "選択された決済代行機関は無効です" - -#: ../includes/process-purchase.php:194 -msgid "No gateway has been selected" -msgstr "決済代行機関が選択されていません" - -#: ../includes/process-purchase.php:242 -msgid "You must agree to the terms of use" -msgstr "利用規約に同意していただく必要があります" - -#: ../includes/process-purchase.php:281 -msgid "The user information is invalid." -msgstr "ユーザー情報が正しくありません。" - -#: ../includes/process-purchase.php:327 -msgid "Username already taken" -msgstr "そのユーザーIDは既に使われています" - -#: ../includes/process-purchase.php:333 -msgid "Invalid username" -msgstr "ユーザー名が正しくありません" - -#: ../includes/process-purchase.php:344 -msgid "You must register or login to complete your purchase" -msgstr "購入を完了するには登録またはログインして下さい" - -#: ../includes/process-purchase.php:356 -#: ../includes/process-purchase.php:500 -msgid "Invalid email" -msgstr "メールアドレスが正しくありません" - -#: ../includes/process-purchase.php:362 -msgid "Email already used" -msgstr "そのメールアドレスは既に使われています" - -#: ../includes/process-purchase.php:374 -#: ../includes/process-purchase.php:507 -msgid "Enter an email" -msgstr "メールアドレスを入力して下さい" - -#: ../includes/process-purchase.php:385 -msgid "Passwords don't match" -msgstr "パスワードが合致しません" - -#: ../includes/process-purchase.php:400 -#: ../includes/process-purchase.php:465 -msgid "Enter a password" -msgstr "パスワードを入力して下さい" - -#: ../includes/process-purchase.php:405 -msgid "Enter the password confirmation" -msgstr "パスワード確認を入力して下さい" - -#: ../includes/process-purchase.php:432 -msgid "You must login or register to complete your purchase" -msgstr "購入を完了するにはログインまたは登録する必要があります" - -#: ../includes/gateway-functions.php:28 -msgid "Manual Payment" -msgstr "手動決済" - -#: ../includes/admin-notices.php:24 -msgid "Discount code updated." -msgstr "ディスカウントコードが更新されました。" - -#: ../includes/admin-notices.php:27 -msgid "There was a problem updating your discount code, please try again." -msgstr "ディスカウントコード更新中に問題が発生しました。もう一度試してみて下さい。" - -#: ../includes/admin-notices.php:30 -msgid "The payment has been deleted." -msgstr "支払いは削除されました。" - -#: ../includes/admin-notices.php:33 -msgid "The purchase receipt has been resent." -msgstr "領収書が再送されました。" - -#: ../includes/admin-notices.php:49 -msgid "There seems to be an issue with the server. Please try again in a few minutes." -msgstr "サーバー側で何か発生した模様です。しばらく立ってから再試行して下さい。" - -#: ../includes/post-types.php:46 -#: ../includes/post-types.php:58 -msgid "Downloads" -msgstr "ダウンロード商品" - -#: ../includes/post-types.php:50 -msgid "Edit Download" -msgstr "ダウンロード商品を編集" - -#: ../includes/post-types.php:51 -msgid "New Download" -msgstr "新しいダウンロード商品" - -#: ../includes/post-types.php:52 -msgid "All Downloads" -msgstr "すべてのダウンロード商品" - -#: ../includes/post-types.php:53 -msgid "View Download" -msgstr "ダウンロード商品を見る" - -#: ../includes/post-types.php:54 -msgid "Search Downloads" -msgstr "ダウンロード商品を検索する" - -#: ../includes/post-types.php:55 -msgid "No Downloads found" -msgstr "ダウンロード商品がありません" - -#: ../includes/post-types.php:56 -msgid "No Downloads found in Trash" -msgstr "ゴミ箱にダウンロード商品はありません" - -#: ../includes/post-types.php:78 -msgid "Payments" -msgstr "支払い" - -#: ../includes/post-types.php:79 -msgid "Payment" -msgstr "支払い" - -#: ../includes/post-types.php:81 -msgid "Add New Payment" -msgstr "支払いを追加" - -#: ../includes/post-types.php:82 -msgid "Edit Payment" -msgstr "支払いを編集" - -#: ../includes/post-types.php:83 -msgid "New Payment" -msgstr "新しい支払い" - -#: ../includes/post-types.php:84 -msgid "All Payments" -msgstr "すべての支払い" - -#: ../includes/post-types.php:85 -msgid "View Payment" -msgstr "支払いを見る" - -#: ../includes/post-types.php:86 -msgid "Search Payments" -msgstr "支払いを検索" - -#: ../includes/post-types.php:87 -msgid "No Payments found" -msgstr "支払いはありません" - -#: ../includes/post-types.php:88 -msgid "No Payments found in Trash" -msgstr "ゴミ箱に支払いはありません" - -#: ../includes/post-types.php:127 -msgid "Category" -msgstr "カテゴリ" - -#: ../includes/post-types.php:128 -msgid "Search Categories" -msgstr "カテゴリを検索" - -#: ../includes/post-types.php:129 -msgid "All Categories" -msgstr "すべてのカテゴリ" - -#: ../includes/post-types.php:130 -msgid "Parent Category" -msgstr "親カテゴリ" - -#: ../includes/post-types.php:131 -msgid "Parent Category:" -msgstr "親カテゴリ:" - -#: ../includes/post-types.php:132 -msgid "Edit Category" -msgstr "カテゴリを編集" - -#: ../includes/post-types.php:133 -msgid "Update Category" -msgstr "カテゴリを更新" - -#: ../includes/post-types.php:134 -msgid "Add New Category" -msgstr "カテゴリを追加" - -#: ../includes/post-types.php:135 -msgid "New Category Name" -msgstr "新しいカテゴリ名" - -#: ../includes/post-types.php:149 -msgid "Tag" -msgstr "タグ" - -#: ../includes/post-types.php:150 -msgid "Search Tags" -msgstr "タグを検索" - -#: ../includes/post-types.php:151 -msgid "All Tags" -msgstr "すべてのタグ" - -#: ../includes/post-types.php:152 -msgid "Parent Tag" -msgstr "親タグ" - -#: ../includes/post-types.php:153 -msgid "Parent Tag:" -msgstr "親タグ:" - -#: ../includes/post-types.php:154 -msgid "Edit Tag" -msgstr "タグを編集" - -#: ../includes/post-types.php:155 -msgid "Update Tag" -msgstr "タグを更新" - -#: ../includes/post-types.php:156 -msgid "Add New Tag" -msgstr "タグを新規追加" - -#: ../includes/post-types.php:157 -msgid "New Tag Name" -msgstr "新しいタグ名" - -#: ../includes/post-types.php:186 -#: ../includes/post-types.php:187 -msgid "Download updated." -msgstr "ダウンロード商品が更新されました。" - -#: ../includes/post-types.php:188 -msgid "Download published." -msgstr "ダウンロード商品が公開されました。" - -#: ../includes/post-types.php:189 -msgid "Download saved." -msgstr "ダウンロード商品が保存されました。" - -#: ../includes/post-types.php:190 -msgid "Download submitted." -msgstr "ダウンロード商品が送信されました。" - -#: ../includes/shortcodes.php:63 -msgid "Download Name" -msgstr "ダウンロード商品名" - -#: ../includes/shortcodes.php:65 -#: ../includes/shortcodes.php:133 -msgid "Files" -msgstr "ファイル" - -#: ../includes/shortcodes.php:89 -#: ../includes/shortcodes.php:160 -msgid "No downloadable files found." -msgstr "ダウンロード可能なファイルが見つかりません。" - -#: ../includes/shortcodes.php:100 -msgid "You have not purchased any downloads" -msgstr "何も購入していません" - -#: ../includes/shortcodes.php:130 -msgid "Purchase ID" -msgstr "購入ID" - -#: ../includes/shortcodes.php:132 -#: ../includes/admin-pages/discount-codes.php:42 -#: ../includes/admin-pages/discount-codes.php:56 -msgid "Amount" -msgstr "合計金額" - -#: ../includes/shortcodes.php:173 -msgid "You have not made any purchases" -msgstr "何も購入なさっていません" - -#: ../includes/shortcodes.php:275 -msgid "Add to Cart" -msgstr "カートに入れる" - -#: ../includes/shortcodes.php:302 -msgid "No downloads found" -msgstr "ダウンロード商品はありません" - -#: ../includes/gateways/paypal.php:264 -msgid "Invalid IPN" -msgstr "IPNが正しくありません" - -#: ../includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "商品名" - -#: ../includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "単価" - -#: ../includes/templates/checkout_cart.php:8 -#: ../includes/admin-pages/discount-codes.php:48 -#: ../includes/admin-pages/discount-codes.php:62 -msgid "Actions" -msgstr "操作" - -#: ../includes/templates/checkout_cart.php:47 -msgid "Total" -msgstr "合計" - -#: ../includes/admin-pages/discount-codes.php:40 -#: ../includes/admin-pages/discount-codes.php:54 -msgid "Code" -msgstr "コード" - -#: ../includes/admin-pages/discount-codes.php:41 -#: ../includes/admin-pages/discount-codes.php:55 -msgid "Type" -msgstr "タイプ" - -#: ../includes/admin-pages/discount-codes.php:43 -#: ../includes/admin-pages/discount-codes.php:57 -msgid "Uses" -msgstr "利用" - -#: ../includes/admin-pages/discount-codes.php:44 -#: ../includes/admin-pages/discount-codes.php:58 -msgid "Max Uses" -msgstr "最大利用" - -#: ../includes/admin-pages/discount-codes.php:45 -#: ../includes/admin-pages/discount-codes.php:59 -msgid "Start Date" -msgstr "開始日" - -#: ../includes/admin-pages/discount-codes.php:46 -#: ../includes/admin-pages/discount-codes.php:60 -msgid "Expiration" -msgstr "有効期限" - -#: ../includes/admin-pages/discount-codes.php:47 -#: ../includes/admin-pages/discount-codes.php:61 -#: ../includes/admin-pages/payments-history.php:83 -#: ../includes/admin-pages/payments-history.php:96 -msgid "Status" -msgstr "状態" - -#: ../includes/admin-pages/discount-codes.php:85 -#: ../includes/admin-pages/discount-codes.php:87 -msgid "unlimited" -msgstr "無制限" - -#: ../includes/admin-pages/discount-codes.php:96 -msgid "No start date" -msgstr "開始日がありません" - -#: ../includes/admin-pages/discount-codes.php:103 -msgid "Expired" -msgstr "期限切れ" - -#: ../includes/admin-pages/discount-codes.php:105 -msgid "no expiration" -msgstr "無期限" - -#: ../includes/admin-pages/discount-codes.php:111 -#: ../includes/admin-pages/payments-history.php:120 -msgid "Edit" -msgstr "編集" - -#: ../includes/admin-pages/discount-codes.php:113 -msgid "Deactivate" -msgstr "無効化" - -#: ../includes/admin-pages/discount-codes.php:115 -msgid "Activate" -msgstr "有効化" - -#: ../includes/admin-pages/discount-codes.php:117 -#: ../includes/admin-pages/payments-history.php:122 -msgid "Delete" -msgstr "削除" - -#: ../includes/admin-pages/discount-codes.php:122 -msgid "No discount codes have been created." -msgstr "ディスカウントコードが作成されていません。" - -#: ../includes/admin-pages/reports.php:34 -msgid "Transactions created while in test mode are not included on this page." -msgstr "テストモードでのトランザクションはここには記録されません。" - -#: ../includes/admin-pages/payments-history.php:57 -msgid "Payment mode" -msgstr "支払いモード" - -#: ../includes/admin-pages/payments-history.php:59 -msgid "Live" -msgstr "生" - -#: ../includes/admin-pages/payments-history.php:60 -msgid "Test" -msgstr "テスト" - -#: ../includes/admin-pages/payments-history.php:64 -msgid "Payments per page" -msgstr "ページ当たりの支払い" - -#: ../includes/admin-pages/payments-history.php:66 -msgid "Show" -msgstr "見せる" - -#: ../includes/admin-pages/payments-history.php:72 -#: ../includes/admin-pages/payments-history.php:89 -msgid "ID" -msgstr "ID" - -#: ../includes/admin-pages/payments-history.php:75 -#: ../includes/admin-pages/payments-history.php:91 -msgid "Key" -msgstr "キー" - -#: ../includes/admin-pages/payments-history.php:76 -#: ../includes/admin-pages/payments-history.php:92 -msgid "Products" -msgstr "製品" - -#: ../includes/admin-pages/payments-history.php:77 -#: ../includes/admin-pages/payments-history.php:93 -msgid "Price" -msgstr "価格" - -#: ../includes/admin-pages/payments-history.php:81 -#: ../includes/admin-pages/payments-history.php:95 -msgid "User" -msgstr "ユーザー" - -#: ../includes/admin-pages/payments-history.php:121 -msgid "Resend Purchase Receipt" -msgstr "領収書を再送" - -#: ../includes/admin-pages/payments-history.php:135 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "支払い番号%sに対する購入の詳細" - -#: ../includes/admin-pages/payments-history.php:135 -msgid "View Order Details" -msgstr "注文詳細" - -#: ../includes/admin-pages/payments-history.php:140 -msgid "Purchased File" -msgstr "購入されたファイル" - -#: ../includes/admin-pages/payments-history.php:140 -msgid "Purchased Files" -msgstr "購入されたファイル" - -#: ../includes/admin-pages/payments-history.php:155 -msgid "Price: " -msgstr "価格:" - -#: ../includes/admin-pages/payments-history.php:161 -msgid "Discount used:" -msgstr "ディスカウント利用:" - -#: ../includes/admin-pages/payments-history.php:161 -msgid "none" -msgstr "なし" - -#: ../includes/admin-pages/payments-history.php:162 -msgid "Total:" -msgstr "合計:" - -#: ../includes/admin-pages/payments-history.php:165 -msgid "Buyer's Personal Details:" -msgstr "購入者の個人的詳細:" - -#: ../includes/admin-pages/payments-history.php:167 -msgid "Name:" -msgstr "氏名:" - -#: ../includes/admin-pages/payments-history.php:168 -msgid "Email:" -msgstr "メールアドレス:" - -#: ../includes/admin-pages/payments-history.php:177 -msgid "guest" -msgstr "ゲスト" - -#: ../includes/admin-pages/payments-history.php:184 -msgid "No payments recorded yet" -msgstr "支払い記録はありません" - -#: ../includes/admin-pages/payments-history.php:199 -msgid "Previous" -msgstr "プレビュー" - -#: ../includes/admin-pages/settings.php:33 -msgid "General" -msgstr "一般" - -#: ../includes/admin-pages/settings.php:35 -msgid "Emails" -msgstr "メール" - -#: ../includes/admin-pages/settings.php:36 -msgid "Styles" -msgstr "外観" - -#: ../includes/admin-pages/settings.php:37 -msgid "Misc" -msgstr "その他" - -#: ../includes/admin-pages/add-ons.php:69 -msgid "Add Ons for Easy Digital Downloads" -msgstr "Easy Digital Downloads のためのアドオン" - -#: ../includes/admin-pages/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "これらのアドオンは、Easy Digital Downloadsの機能を拡張します。" - -#: ../includes/admin-pages/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "すべての機能拡張を見る" - -#: ../includes/admin-pages/forms/edit-discount.php:13 -msgid "Something went wrong." -msgstr "何か問題があったようです。" - -#: ../includes/admin-pages/forms/edit-discount.php:17 -msgid "Edit Discount" -msgstr "ディスカウントを編集" - -#: ../includes/admin-pages/forms/edit-discount.php:17 -#: ../includes/admin-pages/forms/edit-payment.php:16 -msgid "Go Back" -msgstr "戻る" - -#: ../includes/admin-pages/forms/edit-discount.php:27 -#: ../includes/admin-pages/forms/add-discount.php:22 -msgid "The name of this discount" -msgstr "ディスカウント名" - -#: ../includes/admin-pages/forms/edit-discount.php:36 -#: ../includes/admin-pages/forms/add-discount.php:31 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "ディスカウントコードを入力してください(例:10-PERCENT)" - -#: ../includes/admin-pages/forms/edit-discount.php:45 -#: ../includes/admin-pages/forms/add-discount.php:40 -msgid "Percentage" -msgstr "パーセンテージ" - -#: ../includes/admin-pages/forms/edit-discount.php:46 -#: ../includes/admin-pages/forms/add-discount.php:41 -msgid "Flat amount" -msgstr "単純合計" - -#: ../includes/admin-pages/forms/edit-discount.php:48 -#: ../includes/admin-pages/forms/add-discount.php:43 -msgid "The kind of discount to apply for this discount." -msgstr "適用されるディスカウントの種類" - -#: ../includes/admin-pages/forms/edit-discount.php:57 -#: ../includes/admin-pages/forms/add-discount.php:52 -msgid "The amount of this discount code." -msgstr "ディスカウント合計" - -#: ../includes/admin-pages/forms/edit-discount.php:62 -#: ../includes/admin-pages/forms/add-discount.php:57 -msgid "Start date" -msgstr "開始日" - -#: ../includes/admin-pages/forms/edit-discount.php:66 -#: ../includes/admin-pages/forms/add-discount.php:61 -msgid "Enter the start date for this discount code in the format of yyyy-mm-dd. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "ディスカウントコードの開始日を yyyy-mm-dd 形式で入力して下さい。開始日がなければ、空のままにして下さい。入力されていた場合、ディスカウントはこの日付以降にならないと利用できません。" - -#: ../includes/admin-pages/forms/edit-discount.php:71 -#: ../includes/admin-pages/forms/add-discount.php:66 -msgid "Expiration date" -msgstr "有効期限" - -#: ../includes/admin-pages/forms/edit-discount.php:75 -#: ../includes/admin-pages/forms/add-discount.php:70 -msgid "Enter the expiration date for this discount code in the format of yyyy-mm-dd. For no expiration, leave blank" -msgstr "ディスカウントコードの有効期限を yyyy-mm-dd 形式で入力して下さい。期限がないなら、空のままにして下さい。" - -#: ../includes/admin-pages/forms/edit-discount.php:84 -#: ../includes/admin-pages/forms/add-discount.php:79 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "ディスカウントの最大適用回数を入力して下さい。空にすると無制限の意味となります。" - -#: ../includes/admin-pages/forms/edit-discount.php:93 -msgid "Active" -msgstr "有効" - -#: ../includes/admin-pages/forms/edit-discount.php:94 -msgid "Inactive" -msgstr "無効" - -#: ../includes/admin-pages/forms/edit-discount.php:96 -msgid "The status of this discount code." -msgstr "ディスカウントコードの状態" - -#: ../includes/admin-pages/forms/edit-discount.php:106 -msgid "Update Discount Code" -msgstr "ディスカウントコードを更新" - -#: ../includes/admin-pages/forms/add-discount.php:12 -msgid "Add New Discount" -msgstr "ディスカウントを追加" - -#: ../includes/admin-pages/forms/add-discount.php:87 -msgid "Add Discount Code" -msgstr "ディスカウントコードを追加" - -#: ../includes/admin-pages/forms/edit-payment.php:22 -msgid "Buyer's Email" -msgstr "購入者メールアドレス" - -#: ../includes/admin-pages/forms/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "必要に応じて、購入者のメールアドレスをここで更新できます。" - -#: ../includes/admin-pages/forms/edit-payment.php:31 -msgid "Downloads Purchased" -msgstr "購入されたダウンロード商品" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "購入番号 #%s にダウンロード商品を追加" - -#: ../includes/admin-pages/forms/edit-payment.php:43 -msgid "Add download to purchase" -msgstr "ダウンロード商品を追加" - -#: ../includes/admin-pages/forms/edit-payment.php:48 -msgid "Payment Status" -msgstr "支払い状況" - -#: ../includes/admin-pages/forms/edit-payment.php:70 -msgid "Update Payment" -msgstr "支払いを更新" - -#: ../includes/admin-pages/forms/edit-payment.php:83 -msgid "Add Selected Downloads" -msgstr "選択されたダウンロード商品を追加" - diff --git a/languages/edd-nl_NL.mo b/languages/edd-nl_NL.mo deleted file mode 100644 index 823a2060b6a..00000000000 Binary files a/languages/edd-nl_NL.mo and /dev/null differ diff --git a/languages/edd-nl_NL.po b/languages/edd-nl_NL.po deleted file mode 100644 index 95ec7a1f89a..00000000000 --- a/languages/edd-nl_NL.po +++ /dev/null @@ -1,1703 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-04-30 21:43-0600\n" -"PO-Revision-Date: 2012-08-24 08:55+0830\n" -"Last-Translator: Piet Bos \n" -"Language-Team: Pippin's Plugins\n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_n;_x\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: English\n" -"X-Poedit-Country: UNITED STATES\n" -"X-Poedit-SearchPath-0: ..\n" -"X-Poedit-SearchPath-1: ../includes\n" -"X-Poedit-SearchPath-2: ../includes/admin-pages\n" -"X-Poedit-SearchPath-3: ../includes/admin-pages/forms\n" -"X-Poedit-SearchPath-4: ../includes/gateways\n" -"X-Poedit-SearchPath-5: .\n" - -#: ../includes/template-functions.php:8 -#: ../includes/dashboard-columns.php:41 -msgid "Purchase" -msgstr "Bestellen" - -#: ../includes/template-functions.php:60 -#: ../includes/template-functions.php:71 -#: ../includes/cart-template.php:23 -#: ../includes/cart-template.php:26 -msgid "Checkout" -msgstr "Afrekenen" - -#: ../includes/template-functions.php:78 -msgid "added to your cart" -msgstr "aan uw winkelmandje toegevoegd" - -#: ../includes/template-functions.php:112 -msgid "Gray" -msgstr "Grijs" - -#: ../includes/template-functions.php:113 -msgid "Pink" -msgstr "Roze" - -#: ../includes/template-functions.php:114 -msgid "blue" -msgstr "Blauw" - -#: ../includes/template-functions.php:115 -msgid "Green" -msgstr "Groen" - -#: ../includes/template-functions.php:116 -msgid "Teal" -msgstr "Zeegroen" - -#: ../includes/template-functions.php:117 -msgid "Black" -msgstr "Zwart" - -#: ../includes/template-functions.php:118 -msgid "Dark Gray" -msgstr "Donkergrijs" - -#: ../includes/template-functions.php:119 -msgid "Orange" -msgstr "Oranje" - -#: ../includes/template-functions.php:120 -msgid "Purple" -msgstr "Paars" - -#: ../includes/template-functions.php:121 -msgid "Slate" -msgstr "Leisteen" - -#: ../includes/template-functions.php:127 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "Je hebt dit item al eens besteld, maar doe dat gerust nog eens.." - -#: ../includes/payment-functions.php:141 -msgid "pending" -msgstr "in afwachting van" - -#: ../includes/payment-functions.php:144 -msgid "complete" -msgstr "voltooid" - -#: ../includes/cart-template.php:44 -msgid "remove" -msgstr "verwijder" - -#: ../includes/cart-template.php:52 -msgid "Your cart is empty." -msgstr "Je mandje is leeg." - -#: ../includes/thickbox.php:9 -#: ../includes/thickbox.php:10 -#: ../includes/thickbox.php:97 -msgid "Insert Download" -msgstr "Voeg een download toe" - -#: ../includes/thickbox.php:39 -msgid "You must choose a download" -msgstr "Je moet een download kiezen" - -#: ../includes/thickbox.php:62 -msgid "Use the form below to insert the short code for purchasing a download." -msgstr "Gebruik het formulier hieronder om de shortcode toe te voegen" - -#: ../includes/thickbox.php:65 -msgid "Choose a download" -msgstr "Kies een downloadbestand" - -#: ../includes/thickbox.php:74 -msgid "Choose a style" -msgstr "Kies een stijl" - -#: ../includes/thickbox.php:85 -msgid "Choose a button color" -msgstr "Kies een button-kleur" - -#: ../includes/thickbox.php:94 -msgid "Link text . . ." -msgstr "Link tekst..." - -#: ../includes/thickbox.php:98 -msgid "Cancel" -msgstr "Annuleer" - -#: ../includes/thickbox.php:100 -msgid "Button Styles" -msgstr "Button Stijlen" - -#: ../includes/register-settings.php:23 -msgid "Test Mode" -msgstr "Test modus" - -#: ../includes/register-settings.php:24 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "In testmodus worden geen live transacties doorgevoerd. Om de testmodus te gebruiken heb je wel een sandbox (test) account nodig voor de betaalwijze (payment gateway) die je kiest." - -#: ../includes/register-settings.php:29 -msgid "Purchase Page" -msgstr "Bestelpagina" - -#: ../includes/register-settings.php:30 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "Dit is de checkout pagina, waar bezoekers hun bestelling voltooien." - -#: ../includes/register-settings.php:36 -msgid "Success Page" -msgstr "Transactie geslaagd pagina" - -#: ../includes/register-settings.php:37 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "Hier worden bezoekers naar doorverwezen na het voltooien van de bestelling" - -#: ../includes/register-settings.php:43 -msgid "Currency Settings" -msgstr "Munteenheid" - -#: ../includes/register-settings.php:44 -msgid "Configure the currency options" -msgstr "Stel de munteenheid in" - -#: ../includes/register-settings.php:49 -msgid "Currency" -msgstr "Munteenheid" - -#: ../includes/register-settings.php:50 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "Kies welke munteenheid gebruikt moet worden; sommige gateways hebben hier wel beperkingen op staan." - -#: ../includes/register-settings.php:56 -msgid "Currency Position" -msgstr "Positie munteenheid" - -#: ../includes/register-settings.php:57 -msgid "Choose the location of the currency sign." -msgstr "Kies de plek waar het betreffende munt-teken moet staan." - -#: ../includes/register-settings.php:60 -msgid "Before - $10" -msgstr "Voor - € 10" - -#: ../includes/register-settings.php:61 -msgid "After - 10$" -msgstr "Achter - 10 €" - -#: ../includes/register-settings.php:66 -msgid "Thousands Separator" -msgstr "Scheidingsteken duizendtallen" - -#: ../includes/register-settings.php:67 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "Het scheidingsteken voor duizendtallen (b.v. 10.000)" - -#: ../includes/register-settings.php:74 -msgid "Decimal Separator" -msgstr "Decimale scheidsteken" - -#: ../includes/register-settings.php:75 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "Scheidingsteken voor decimalen (meestal . of ,)" - -#: ../includes/register-settings.php:86 -msgid "Payment Gateways" -msgstr "Payment Gateways" - -#: ../includes/register-settings.php:87 -msgid "Choose the payment gateways you want to enable." -msgstr "Kies de payment gateway(s) die je wilt gebruiken." - -#: ../includes/register-settings.php:93 -msgid "Accepted Payment Method Icons" -msgstr "Betaalmethode-icons" - -#: ../includes/register-settings.php:94 -msgid "Display icons for the selected payment methods" -msgstr "Toon de icons voor de betaalmethode(s)" - -#: ../includes/register-settings.php:94 -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "Je moet je betaalmethode ook configureren wanneer je creditcards accepteerd" - -#: ../includes/register-settings.php:106 -msgid "PayPal Settings" -msgstr "PayPal instellingen" - -#: ../includes/register-settings.php:107 -msgid "Configure the PayPal settings" -msgstr "Stel de PayPal instellingen in" - -#: ../includes/register-settings.php:112 -msgid "PayPal Email" -msgstr "PayPal email" - -#: ../includes/register-settings.php:113 -msgid "Enter your PayPal account's email" -msgstr "Voer hier het emailadres bij je PayPal account in" - -#: ../includes/register-settings.php:119 -msgid "Disable cURL for PayPal IPN" -msgstr "Schakel cURL uit voor PayPal IPN" - -#: ../includes/register-settings.php:120 -msgid "If payments are not getting marked as complete, check this option" -msgstr "Vink deze optie aan wanneer betalingen niet als voltooid worden aangemerkt" - -#: ../includes/register-settings.php:125 -msgid "Alternate PayPal Purchase Verification" -msgstr "Alternatieve PayPal bestelbevestiging" - -#: ../includes/register-settings.php:126 -msgid "If payments are not getting marked as complete, and disabling cURL does not fix the problem, then check this box" -msgstr "Vink dit aan wanneer betaling niet al voldaan worden aangemerkt en het uitschakelen van cURL niet helpt." - -#: ../includes/register-settings.php:135 -msgid "From Name" -msgstr "Afzender" - -#: ../includes/register-settings.php:136 -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "De naam van de afzender; meestal vul je hier je website naam in" - -#: ../includes/register-settings.php:141 -msgid "From Email" -msgstr "Mailadres afzender" - -#: ../includes/register-settings.php:142 -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "Dit adres fungeert ook als \"reply to\" adres" - -#: ../includes/register-settings.php:147 -msgid "Purchase Email Subject" -msgstr "Onderwerp van de bevestigingsmail" - -#: ../includes/register-settings.php:148 -msgid "Enter the subject line for the purchase receipt email" -msgstr "Voer hier het onderwerp van de bevestingsmail in." - -#: ../includes/register-settings.php:153 -msgid "Purchase Receipt" -msgstr "Ontvangstbewijs" - -#: ../includes/register-settings.php:154 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "Voer de tekst in die naar bestelllers wordt verzonden na een geslaagde bestelling; je kunt HTML en onderstaande template (merge) tags gebruiken:" - -#: ../includes/register-settings.php:155 -msgid "A list of download URLs for each download purchased" -msgstr "Een lijst met alle URLs van de gekozen downloads" - -#: ../includes/register-settings.php:156 -msgid "The buyer's name" -msgstr "Naam koper" - -#: ../includes/register-settings.php:157 -msgid "The date of the purchase" -msgstr "Besteldatum" - -#: ../includes/register-settings.php:158 -msgid "The total price of the purchase" -msgstr "Totaalprijs" - -#: ../includes/register-settings.php:159 -msgid "Your site name" -msgstr "De naam van je website" - -#: ../includes/register-settings.php:168 -msgid "Disable Styles" -msgstr "Stijlen uitschakelen" - -#: ../includes/register-settings.php:169 -msgid "Check this to disable all included styling" -msgstr "Vink dit aan om alle stijlen te verwijderen" - -#: ../includes/register-settings.php:174 -msgid "Checkout Button Color" -msgstr "Kleur van de checkout button" - -#: ../includes/register-settings.php:175 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "Kies de kleur van de button die je wilt gebruiken voor de checkout buttons" - -#: ../includes/register-settings.php:185 -msgid "Enable Ajax" -msgstr "Schakel Ajax in" - -#: ../includes/register-settings.php:186 -msgid "Check this to enable AJAX for the shopping cart." -msgstr "Vink dit aan om Ajax te activeren voor het winkelmandje" - -#: ../includes/register-settings.php:191 -msgid "Enable jQuery Validation" -msgstr "Schakel jQuery validatie in" - -#: ../includes/register-settings.php:192 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "Vink aan om jQuery validatie in te schakelen op het checkout formulier." - -#: ../includes/register-settings.php:197 -msgid "Disable Guest Checkout" -msgstr "Deactiveer Gust checkout" - -#: ../includes/register-settings.php:198 -msgid "Require that users be logged-in to purchase files." -msgstr "Alleen ingelogde gebruikers kunnen bestanden bestellen." - -#: ../includes/register-settings.php:203 -msgid "Show Register / Login Form?" -msgstr "Registratie/Login formulier tonen?" - -#: ../includes/register-settings.php:204 -msgid "Display the registration and login forms on the checkout page for non-logged-in users" -msgstr "Toon registratie- en login formulier voor niet ingelogde gebruikers op de checkout pagina." - -#: ../includes/register-settings.php:209 -msgid "Disable Redownload?" -msgstr "Opnieuw downloaden niet toestaan?" - -#: ../includes/register-settings.php:210 -msgid "Check this if you do not want to allow users to redownload items from their purchase history" -msgstr "Aanvinken als je niet wilt dat gebruikers de door hen bestelde items opnieuw kunnen downloaden." - -#: ../includes/register-settings.php:215 -msgid "Terms of Agreement" -msgstr "Algemene voorwaarden" - -#: ../includes/register-settings.php:221 -msgid "Agree to Terms" -msgstr "Akkoord gaan met de voorwaarden" - -#: ../includes/register-settings.php:222 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing" -msgstr "Aanvinken als je een \"Ga akkoord met voorwaarden\" wilt tonen, waarmee akkoord moet worden gegaan voor de aankoop." - -#: ../includes/register-settings.php:227 -msgid "Agree to Terms Label" -msgstr "Label voor \"Ga akkoord met voorwaarden\"" - -#: ../includes/register-settings.php:228 -msgid "Label shown next to the agree to terms check box" -msgstr "Het label dat naast de checkbox voor de algemene voorwaarden komt te staan." - -#: ../includes/register-settings.php:234 -msgid "Agreement Text" -msgstr "De tekst van de voorwaarden" - -#: ../includes/register-settings.php:235 -msgid "If Agree to Terms is checked, enter the agreement terms here" -msgstr "Als \"Ga akkoord met voorwaarden\" is aangevinkt, dien je hier de tekst in te voeren." - -#: ../includes/register-settings.php:261 -msgid "General Settings" -msgstr "Algemene instellingen" - -#: ../includes/register-settings.php:287 -msgid "Payment Gateway Settings" -msgstr "Instellingen betaalmethode" - -#: ../includes/register-settings.php:313 -msgid "Email Settings" -msgstr "Email instellingen" - -#: ../includes/register-settings.php:339 -msgid "Style Settings" -msgstr "Stijl instellingen" - -#: ../includes/register-settings.php:366 -msgid "Misc Settings" -msgstr "Div. instellingen" - -#: ../includes/dashboard-columns.php:7 -msgid "Name" -msgstr "Naam" - -#: ../includes/dashboard-columns.php:8 -msgid "Categories" -msgstr "Categorieën" - -#: ../includes/dashboard-columns.php:9 -msgid "Tags" -msgstr "Trefwoorden" - -#: ../includes/dashboard-columns.php:10 -#: ../includes/graphing.php:14 -msgid "Sales" -msgstr "Verkopen" - -#: ../includes/dashboard-columns.php:11 -#: ../includes/graphing.php:52 -#: ../includes/graphing.php:87 -msgid "Earnings" -msgstr "Inkomsten" - -#: ../includes/dashboard-columns.php:12 -msgid "Short Code" -msgstr "Shortcode" - -#: ../includes/dashboard-columns.php:13 -msgid "Date" -msgstr "Datum" - -#: ../includes/dashboard-columns.php:106 -msgid "Show all categories" -msgstr "Toon alle categorieën" - -#: ../includes/dashboard-columns.php:117 -msgid "Show all tags" -msgstr "Toon alle trefwoorden" - -#: ../includes/widgets.php:21 -msgid "Downloads Cart" -msgstr "Downloads-overzicht" - -#: ../includes/widgets.php:21 -msgid "Display the downloads shopping cart" -msgstr "Toon downloads winkelmandje" - -#: ../includes/widgets.php:72 -msgid "Title:" -msgstr "Titel:" - -#: ../includes/widgets.php:77 -msgid "Show Quantity:" -msgstr "Toon hoeveelheid:" - -#: ../includes/scripts.php:19 -msgid "Please enter a discount code" -msgstr "Voer aub een kortingscode in" - -#: ../includes/scripts.php:20 -msgid "Discount Applied" -msgstr "Korting toegepast" - -#: ../includes/scripts.php:21 -msgid "You have already added this item to your cart" -msgstr "Dit item zit al in je wagentje" - -#: ../includes/scripts.php:22 -msgid "Your cart is empty" -msgstr "Je winkelmandje is leeg" - -#: ../includes/scripts.php:23 -msgid "Loading" -msgstr "Laden..." - -#: ../includes/graphing.php:13 -#: ../includes/graphing.php:51 -msgid "Download" -msgstr "Download" - -#: ../includes/graphing.php:24 -msgid "Downloads Performance in Sales" -msgstr "Downloads-prestaties is verkopen" - -#: ../includes/graphing.php:62 -msgid "Downloads Performance in Earnings" -msgstr "Downloads-prestaties in inkomsten" - -#: ../includes/graphing.php:86 -msgid "Month" -msgstr "Maand" - -#: ../includes/graphing.php:101 -msgid "Earnings per month" -msgstr "Inkomsten per maand" - -#: ../includes/metabox.php:4 -msgid "Download Configuration" -msgstr "Download-instellingen" - -#: ../includes/metabox.php:5 -msgid "Download Stats" -msgstr "Dwonload-statistieken" - -#: ../includes/metabox.php:6 -msgid "Purchase Log" -msgstr "Verkoop logboek" - -#: ../includes/metabox.php:7 -msgid "File Download Log" -msgstr "Bestandsdownload-logboek" - -#: ../includes/metabox.php:8 -msgid "Payment Info" -msgstr "Betaalinformatie" - -#: ../includes/metabox.php:32 -msgid "Pricing" -msgstr "Prijs" - -#: ../includes/metabox.php:36 -msgid "Check this to enable variable pricing." -msgstr "Vink dit aan om variabele prijzen mogelijk te maken" - -#: ../includes/metabox.php:57 -msgid "price option name" -msgstr "Prijs-optie naam" - -#: ../includes/metabox.php:58 -#: ../includes/metabox.php:68 -msgid "9.99" -msgstr "9,99" - -#: ../includes/metabox.php:67 -#: ../includes/metabox.php:106 -#: ../includes/metabox.php:117 -msgid "file name" -msgstr "Bestandsnaam" - -#: ../includes/metabox.php:71 -msgid "Add New Price Option" -msgstr "Een nieuwe prijsoptie toevoegen" - -#: ../includes/metabox.php:84 -msgid "Enter the download price. Do not include a currency symbol" -msgstr "Voer de dwonloadprijs in (zonder mu8unteenheid)." - -#: ../includes/metabox.php:96 -msgid "Download Files" -msgstr "Bestanden downloaden" - -#: ../includes/metabox.php:107 -#: ../includes/metabox.php:118 -msgid "file url" -msgstr "Bestands-url" - -#: ../includes/metabox.php:108 -#: ../includes/metabox.php:119 -msgid "Upload File" -msgstr "Bestand uploaden" - -#: ../includes/metabox.php:122 -#: ../includes/post-types.php:28 -#: ../includes/post-types.php:60 -msgid "Add New" -msgstr "Nieuw bestand" - -#: ../includes/metabox.php:122 -msgid "Upload the downloadable files." -msgstr "De downloadbare bestanden uploaden." - -#: ../includes/metabox.php:134 -msgid "Purchase Text" -msgstr "Aanschaf-tekst" - -#: ../includes/metabox.php:136 -msgid "Add the text you would like displayed for the purchase text" -msgstr "Voer de tekst in die als aanschaf-tekst moet worden getoond" - -#: ../includes/metabox.php:146 -msgid "Link Style" -msgstr "Link-stijl" - -#: ../includes/metabox.php:148 -msgid "Button" -msgstr "Knop" - -#: ../includes/metabox.php:149 -msgid "Text" -msgstr "Tekst" - -#: ../includes/metabox.php:150 -msgid "Choose the style of the purchase link" -msgstr "Kies een style voor de aanschaf-link" - -#: ../includes/metabox.php:162 -msgid "Button Color" -msgstr "Kleur van de knop" - -#: ../includes/metabox.php:170 -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "Kies de kleur voor de link, wanneer hierboeven voor Knop is gekozen" - -#: ../includes/metabox.php:179 -msgid "Disable the purchase button?" -msgstr "De aanschaf-knop deactiveren?" - -#: ../includes/metabox.php:182 -msgid "Check this if you do not want the purchase button displayed." -msgstr "Vink aan wanneer je geen aanschaf-knop wilt tonen." - -#: ../includes/metabox.php:191 -msgid "Notes" -msgstr "Opmerkingen" - -#: ../includes/metabox.php:194 -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "De stijl-opties hierboven hebben GEEN invloed op de stijl van de shortcode. M.b.v. de shortcode kun je een aanschaf-knop voor dit item op elke plek op je website toevoegen." - -#: ../includes/metabox.php:200 -msgid "This short code can be placed anywhere on your site" -msgstr "Deze shortcode kun gebruiken waar je wilt" - -#: ../includes/metabox.php:263 -msgid "Sales:" -msgstr "Verkopen:" - -#: ../includes/metabox.php:269 -msgid "Earnings:" -msgstr "Verdiensten:" - -#: ../includes/metabox.php:285 -msgid "Sales Log" -msgstr "Verkoop logboek" - -#: ../includes/metabox.php:287 -msgid "Each sale for this download is listed below." -msgstr "Alle verkopen van dit item staan hier onder vermeld" - -#: ../includes/metabox.php:301 -#: ../includes/metabox.php:350 -msgid "Date:" -msgstr "Datum:" - -#: ../includes/metabox.php:305 -msgid "Buyer:" -msgstr "Koper:" - -#: ../includes/metabox.php:309 -msgid "Purchase ID:" -msgstr "Aanschaf-ID" - -#: ../includes/metabox.php:317 -msgid "No sales yet" -msgstr "Nog geen verkopen" - -#: ../includes/metabox.php:332 -msgid "Download Log" -msgstr "Download logboek" - -#: ../includes/metabox.php:334 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "Elke keer dat een bestand is gedownload wordt hieronder vermeld" - -#: ../includes/metabox.php:354 -msgid "Downloaded by:" -msgstr "Gedownload door:" - -#: ../includes/metabox.php:358 -msgid "IP Address:" -msgstr "IP-adres:" - -#: ../includes/metabox.php:362 -msgid "File: " -msgstr "Bestand:" - -#: ../includes/metabox.php:371 -msgid "No file downloads yet yet" -msgstr "Nog geen bestanden gedwonload" - -#: ../includes/ajax-functions.php:57 -#: ../includes/process-purchase.php:17 -msgid "The discount you entered is invalid" -msgstr "De korting die je hebt ingevoerd is ongeldig" - -#: ../includes/admin-pages.php:6 -#: ../includes/post-types.php:70 -msgid "Payment History" -msgstr "Betalingsgeschiedenis" - -#: ../includes/admin-pages.php:7 -msgid "Discount Codes" -msgstr "Kortingscodes" - -#: ../includes/admin-pages.php:8 -msgid "Earnings and Sales Reports" -msgstr "Inkomsten- en verkooprapportages" - -#: ../includes/admin-pages.php:8 -msgid "Reports" -msgstr "Rapporten" - -#: ../includes/admin-pages.php:9 -msgid "Easy Digital Download Settings" -msgstr "Easy Digital Download Instellingen" - -#: ../includes/admin-pages.php:9 -msgid "Settings" -msgstr "Instellingen" - -#: ../includes/admin-pages.php:10 -msgid "Easy Digital Download Add Ons" -msgstr "Easy Digital Download Add Ons" - -#: ../includes/admin-pages.php:10 -msgid "Add Ons" -msgstr "Add Ons" - -#: ../includes/error-tracking.php:13 -msgid "Error" -msgstr "Fout" - -#: ../includes/misc-functions.php:40 -msgid "US Dollars ($)" -msgstr "Amerikaanse dollars ($)" - -#: ../includes/misc-functions.php:41 -msgid "Euros (€)" -msgstr "Euros (€)" - -#: ../includes/misc-functions.php:42 -msgid "Pounds Sterling (£)" -msgstr "Britse ponden (£)" - -#: ../includes/misc-functions.php:43 -msgid "Australian Dollars ($)" -msgstr "Australische dollars ($)" - -#: ../includes/misc-functions.php:44 -msgid "Brazilian Real ($)" -msgstr "Braziliaanse reals ($)" - -#: ../includes/misc-functions.php:45 -msgid "Canadian Dollars ($)" -msgstr "Canadese dollars ($)" - -#: ../includes/misc-functions.php:46 -msgid "Czech Koruna" -msgstr "Tsjechische kronen" - -#: ../includes/misc-functions.php:47 -msgid "Danish Krone" -msgstr "Deense kronen" - -#: ../includes/misc-functions.php:48 -msgid "Hong Kong Dollar ($)" -msgstr "Hong Kong dollars ($)" - -#: ../includes/misc-functions.php:49 -msgid "Hungarian Forint" -msgstr "Hongaarse forinten" - -#: ../includes/misc-functions.php:50 -msgid "Israeli Shekel" -msgstr "Israëlische shekels" - -#: ../includes/misc-functions.php:51 -msgid "Japanese Yen (¥)" -msgstr "Japanse yen (¥)" - -#: ../includes/misc-functions.php:52 -msgid "Malaysian Ringgits" -msgstr "Maleisische ringgits" - -#: ../includes/misc-functions.php:53 -msgid "Mexican Peso ($)" -msgstr "Mexicaanse peso's ($)" - -#: ../includes/misc-functions.php:54 -msgid "New Zealand Dollar ($)" -msgstr "Nieuwzeelandse dollars ($)" - -#: ../includes/misc-functions.php:55 -msgid "Norwegian Krone" -msgstr "Noorse kronen" - -#: ../includes/misc-functions.php:56 -msgid "Philippine Pesos" -msgstr "Filippijnse Peso's" - -#: ../includes/misc-functions.php:57 -msgid "Polish Zloty" -msgstr "Poolse zloty" - -#: ../includes/misc-functions.php:58 -msgid "Singapore Dollar ($)" -msgstr "Singaporese dollars ($)" - -#: ../includes/misc-functions.php:59 -msgid "Swedish Krona" -msgstr "Zweedse kronen" - -#: ../includes/misc-functions.php:60 -msgid "Swiss Franc" -msgstr "Zwitserse franken" - -#: ../includes/misc-functions.php:61 -msgid "Taiwan New Dollars" -msgstr "Taiwanese nieuwe dollars" - -#: ../includes/misc-functions.php:62 -msgid "Thai Baht" -msgstr "Thaise baht" - -#: ../includes/misc-functions.php:63 -msgid "Indian Rupee" -msgstr "Indiase rupee" - -#: ../includes/process-download.php:64 -msgid "You do not have permission to download this file" -msgstr "Je mag dit bestand niet downloaden" - -#: ../includes/process-download.php:64 -msgid "Purchase Verification Failed" -msgstr "Bestel verifactie is mislukt" - -#: ../includes/checkout-template.php:57 -msgid "Choose Your Payment Method" -msgstr "Kies je gewenste betaalmethode" - -#: ../includes/checkout-template.php:68 -msgid "Next" -msgstr "Volgende" - -#: ../includes/checkout-template.php:115 -msgid "Email address" -msgstr "Email-adres" - -#: ../includes/checkout-template.php:116 -msgid "Email Address" -msgstr "Email adres" - -#: ../includes/checkout-template.php:119 -#: ../includes/checkout-template.php:120 -#: ../includes/checkout-template.php:289 -#: ../includes/checkout-template.php:290 -msgid "First Name" -msgstr "Voornaam" - -#: ../includes/checkout-template.php:123 -#: ../includes/checkout-template.php:293 -msgid "Last name" -msgstr "Achternaam" - -#: ../includes/checkout-template.php:124 -#: ../includes/checkout-template.php:294 -msgid "Last Name" -msgstr "Achternaam" - -#: ../includes/checkout-template.php:132 -msgid "Enter discount" -msgstr "Voeg korting toe" - -#: ../includes/checkout-template.php:134 -msgid "Discount" -msgstr "Korting" - -#: ../includes/checkout-template.php:136 -msgid "Apply Discount" -msgstr "Korting toepassen" - -#: ../includes/checkout-template.php:162 -msgid "Show Terms" -msgstr "Toon de voorwaarden" - -#: ../includes/checkout-template.php:163 -msgid "Hide Terms" -msgstr "Verberg voorwaarden" - -#: ../includes/checkout-template.php:166 -msgid "Agree to Terms?" -msgstr "Akkoord met de voorwaarden?" - -#: ../includes/checkout-template.php:190 -msgid "Go back" -msgstr "Ga terug" - -#: ../includes/checkout-template.php:194 -msgid "You must be logged in to complete your purchase" -msgstr "Je moet ingelogd zijn om een bestelling te kunnen plaatsen" - -#: ../includes/checkout-template.php:214 -msgid "Card name" -msgstr "Soort creditcard" - -#: ../includes/checkout-template.php:215 -msgid "Name on the Card" -msgstr "Naam op creditcard" - -#: ../includes/checkout-template.php:218 -msgid "Card number" -msgstr "Kaartnummer" - -#: ../includes/checkout-template.php:219 -msgid "Card Number" -msgstr "Kaartnummer" - -#: ../includes/checkout-template.php:222 -msgid "Security code" -msgstr "Security code" - -#: ../includes/checkout-template.php:223 -msgid "CVC" -msgstr "CVC" - -#: ../includes/checkout-template.php:229 -msgid "Year" -msgstr "Jaar" - -#: ../includes/checkout-template.php:230 -msgid "Expiration (MM/YYYY)" -msgstr "Geldig tot (MM/YYYY)" - -#: ../includes/checkout-template.php:248 -msgid "Credit Card Info" -msgstr "Creditcard informatie" - -#: ../includes/checkout-template.php:250 -msgid "Address line 1" -msgstr "Adresregel 1" - -#: ../includes/checkout-template.php:251 -msgid "Billing Address" -msgstr "Factuuradres" - -#: ../includes/checkout-template.php:254 -msgid "Address line 2" -msgstr "Adresregel 2" - -#: ../includes/checkout-template.php:255 -msgid "Billing Address Line 2" -msgstr "Factuuradres regel 2" - -#: ../includes/checkout-template.php:258 -msgid "City" -msgstr "Plaats" - -#: ../includes/checkout-template.php:259 -msgid "Billing City" -msgstr "Factuur - Plaats" - -#: ../includes/checkout-template.php:262 -msgid "State / Province" -msgstr "Provincie" - -#: ../includes/checkout-template.php:263 -msgid "Billing State / Province" -msgstr "Factuur - provincie" - -#: ../includes/checkout-template.php:266 -msgid "Zip / Postal code" -msgstr "Postcode" - -#: ../includes/checkout-template.php:267 -msgid "Billing Zip / Postal Code" -msgstr "Factuuradres postcode" - -#: ../includes/checkout-template.php:279 -msgid "Create an account" -msgstr "Maak een account aan" - -#: ../includes/checkout-template.php:279 -msgid "(optional)" -msgstr "(optioneel)" - -#: ../includes/checkout-template.php:281 -#: ../includes/checkout-template.php:282 -#: ../includes/checkout-template.php:318 -msgid "Username" -msgstr "Gebruikersnaam" - -#: ../includes/checkout-template.php:285 -#: ../includes/checkout-template.php:286 -msgid "Email" -msgstr "Email" - -#: ../includes/checkout-template.php:297 -#: ../includes/checkout-template.php:298 -#: ../includes/checkout-template.php:322 -msgid "Password" -msgstr "Wachtwoord" - -#: ../includes/checkout-template.php:301 -msgid "Confirm password" -msgstr "Bevestig wachtwoord" - -#: ../includes/checkout-template.php:302 -msgid "Password Again" -msgstr "Herhaal wachtwoord" - -#: ../includes/checkout-template.php:304 -msgid "Already have an account?" -msgstr "Heb je al een account?" - -#: ../includes/checkout-template.php:304 -msgid "Login" -msgstr "Inloggen" - -#: ../includes/checkout-template.php:315 -msgid "Login to your account" -msgstr "Log in op je account" - -#: ../includes/checkout-template.php:317 -msgid "Your username" -msgstr "Je gebruikersnaam" - -#: ../includes/checkout-template.php:321 -msgid "Your password" -msgstr "Je wachtwoord" - -#: ../includes/checkout-template.php:325 -msgid "Need to create an account?" -msgstr "Wil je een account aanmaken?" - -#: ../includes/checkout-template.php:325 -msgid "Register" -msgstr "Registreer" - -#: ../includes/email-functions.php:26 -msgid "Hello" -msgstr "Hallo" - -#: ../includes/email-functions.php:26 -msgid "A download purchase has been made" -msgstr "Er is een download besteld" - -#: ../includes/email-functions.php:27 -msgid "Downloads sold:" -msgstr "Verkochte downloads:" - -#: ../includes/email-functions.php:36 -msgid "Amount: " -msgstr "Hoeveelheid" - -#: ../includes/email-functions.php:37 -msgid "Thank you" -msgstr "Dank u!" - -#: ../includes/email-functions.php:39 -msgid "New download purchase" -msgstr "Nieuwe download" - -#: ../includes/process-purchase.php:20 -msgid "You must agree to the terms of use" -msgstr "Je dient akkoord te gaan met de voorwaarden" - -#: ../includes/process-purchase.php:37 -msgid "Username already taken" -msgstr "Deze gebruikersnaam is reeds in gebruik" - -#: ../includes/process-purchase.php:41 -msgid "Invalid username" -msgstr "Ongeldige gebruikersnaam" - -#: ../includes/process-purchase.php:45 -msgid "Enter a username" -msgstr "Voer een gebruikersnaam in" - -#: ../includes/process-purchase.php:49 -msgid "Invalid email" -msgstr "Ongeldig mailadres" - -#: ../includes/process-purchase.php:53 -msgid "Email already used" -msgstr "Dit emailadres is al in gebruik" - -#: ../includes/process-purchase.php:57 -msgid "Enter a password" -msgstr "Voer een wachtwoord in" - -#: ../includes/process-purchase.php:61 -msgid "Passwords don't match" -msgstr "De wachtwoorden komen niet overeen" - -#: ../includes/process-purchase.php:78 -msgid "The password you entered is incorrect" -msgstr "Dit wachtwoord is niet correct" - -#: ../includes/process-purchase.php:82 -msgid "The username you entered does not exist" -msgstr "De ingevoerde gebruiker bestaat niet" - -#: ../includes/process-purchase.php:86 -msgid "Something has gone wrong, please try again" -msgstr "Er is iets mis gegaan; probeer het a.u.b. opnieuw" - -#: ../includes/process-purchase.php:90 -msgid "You must enter a valid email address." -msgstr "Je moet een geldig mailadres invoeren" - -#: ../includes/gateway-functions.php:9 -msgid "Manual Payment" -msgstr "Handmatige betaling" - -#: ../includes/admin-notices.php:6 -msgid "Discount code updated." -msgstr "Kortingscode is bijgewerkt" - -#: ../includes/admin-notices.php:9 -msgid "There was a problem updating your discount code, please try again." -msgstr "Er was een probleem met het aanpassen van de kortingscode; probeer het nog eens." - -#: ../includes/admin-notices.php:12 -msgid "The payment has been deleted." -msgstr "De betaling is verwijderd" - -#: ../includes/admin-notices.php:15 -msgid "The purchase receipt has been resent." -msgstr "Bestelbewijs is opnieuw verstuurd" - -#: ../includes/post-types.php:26 -#: ../includes/post-types.php:38 -msgid "Downloads" -msgstr "Downloads" - -#: ../includes/post-types.php:29 -msgid "Add New Download" -msgstr "Voeg een download toe" - -#: ../includes/post-types.php:30 -msgid "Edit Download" -msgstr "Bewerk downloads" - -#: ../includes/post-types.php:31 -msgid "New Download" -msgstr "Nieuwe download" - -#: ../includes/post-types.php:32 -msgid "All Downloads" -msgstr "Alle downloads" - -#: ../includes/post-types.php:33 -msgid "View Download" -msgstr "Bekijk download" - -#: ../includes/post-types.php:34 -msgid "Search Downloads" -msgstr "Zoek downloads" - -#: ../includes/post-types.php:35 -msgid "No Downloads found" -msgstr "Geen downloads gevonden" - -#: ../includes/post-types.php:36 -msgid "No Downloads found in Trash" -msgstr "Geen downloads in de prullenbak gevonden" - -#: ../includes/post-types.php:58 -msgid "Payments" -msgstr "Transacties" - -#: ../includes/post-types.php:59 -msgid "Payment" -msgstr "Transactie" - -#: ../includes/post-types.php:61 -msgid "Add New Payment" -msgstr "Nieuwe transactie toevoegen" - -#: ../includes/post-types.php:62 -msgid "Edit Payment" -msgstr "Transactie bewerken" - -#: ../includes/post-types.php:63 -msgid "New Payment" -msgstr "Nieuwe transactie" - -#: ../includes/post-types.php:64 -msgid "All Payments" -msgstr "Alle transacties" - -#: ../includes/post-types.php:65 -msgid "View Payment" -msgstr "Bekijk transactie" - -#: ../includes/post-types.php:66 -msgid "Search Payments" -msgstr "Transactie zoeken" - -#: ../includes/post-types.php:67 -msgid "No Payments found" -msgstr "Geen transacties gevonden" - -#: ../includes/post-types.php:68 -msgid "No Payments found in Trash" -msgstr "Geen transacties in prullenbak gevonden" - -#: ../includes/post-types.php:96 -msgid "Category" -msgstr "Categorie" - -#: ../includes/post-types.php:97 -msgid "Search Categories" -msgstr "Zoek categorieën" - -#: ../includes/post-types.php:98 -msgid "All Categories" -msgstr "Alle categorieën" - -#: ../includes/post-types.php:99 -msgid "Parent Category" -msgstr "Bovenliggende categorie" - -#: ../includes/post-types.php:100 -msgid "Parent Category:" -msgstr "Bovenliggende categorie:" - -#: ../includes/post-types.php:101 -msgid "Edit Category" -msgstr "Categorie bewerken" - -#: ../includes/post-types.php:102 -msgid "Update Category" -msgstr "Categorie bijwerken" - -#: ../includes/post-types.php:103 -msgid "Add New Category" -msgstr "Categorie toevoegen" - -#: ../includes/post-types.php:104 -msgid "New Category Name" -msgstr "Nieuwe categorie-naam" - -#: ../includes/post-types.php:118 -msgid "Tag" -msgstr "Trefwoord" - -#: ../includes/post-types.php:119 -msgid "Search Tags" -msgstr "Trefwoorden zoeken" - -#: ../includes/post-types.php:120 -msgid "All Tags" -msgstr "Alle trefwoorden" - -#: ../includes/post-types.php:121 -msgid "Parent Tag" -msgstr "Bovenliggend trefwoord" - -#: ../includes/post-types.php:122 -msgid "Parent Tag:" -msgstr "Bovenliggend trefwoord:" - -#: ../includes/post-types.php:123 -msgid "Edit Tag" -msgstr "Trefwoord bewerken" - -#: ../includes/post-types.php:124 -msgid "Update Tag" -msgstr "Trefwoord bijwerken" - -#: ../includes/post-types.php:125 -msgid "Add New Tag" -msgstr "Trefwoord toevoegen" - -#: ../includes/post-types.php:126 -msgid "New Tag Name" -msgstr "Naam nieuw trefwoord" - -#: ../includes/post-types.php:144 -#: ../includes/post-types.php:145 -msgid "Download updated." -msgstr "Download bijgewerkt" - -#: ../includes/post-types.php:146 -msgid "Download published." -msgstr "Download gepupliceerd" - -#: ../includes/post-types.php:147 -msgid "Download saved." -msgstr "Download opgeslagen" - -#: ../includes/post-types.php:148 -msgid "Download submitted." -msgstr "Download toegevoegd" - -#: ../includes/shortcodes.php:35 -msgid "Download Name" -msgstr "Donwload naam" - -#: ../includes/shortcodes.php:36 -msgid "Files" -msgstr "Bestanden" - -#: ../includes/shortcodes.php:58 -msgid "No downloadable files found." -msgstr "Geen downloadable bestand gevonden" - -#: ../includes/shortcodes.php:68 -msgid "You have not purchased any downloads" -msgstr "Je hebt nog geen downloads aangeschaft" - -#: ../includes/shortcodes.php:95 -msgid "Add to Cart" -msgstr "Aan winkelmandje toevoegen" - -#: ../includes/shortcodes.php:122 -msgid "No downloads found" -msgstr "Geen downloads gevonden" - -#: ../includes/gateways/paypal.php:198 -msgid "Invalid IPN" -msgstr "Ongeldig IPN nummer" - -#: ../includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "Item naam:" - -#: ../includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "Item prijs" - -#: ../includes/templates/checkout_cart.php:8 -#: ../includes/admin-pages/discount-codes.php:28 -#: ../includes/admin-pages/discount-codes.php:42 -msgid "Actions" -msgstr "Acties" - -#: ../includes/templates/checkout_cart.php:43 -msgid "Total" -msgstr "Totaal" - -#: ../includes/admin-pages/discount-codes.php:20 -#: ../includes/admin-pages/discount-codes.php:34 -#: ../includes/admin-pages/forms/edit-discount.php:22 -#: ../includes/admin-pages/forms/add-discount.php:16 -msgid "Code" -msgstr "Code" - -#: ../includes/admin-pages/discount-codes.php:21 -#: ../includes/admin-pages/discount-codes.php:35 -#: ../includes/admin-pages/forms/edit-discount.php:31 -#: ../includes/admin-pages/forms/add-discount.php:25 -msgid "Type" -msgstr "Type" - -#: ../includes/admin-pages/discount-codes.php:22 -#: ../includes/admin-pages/discount-codes.php:36 -#: ../includes/admin-pages/forms/edit-discount.php:43 -#: ../includes/admin-pages/forms/add-discount.php:37 -msgid "Amount" -msgstr "Hoeveelheid" - -#: ../includes/admin-pages/discount-codes.php:23 -#: ../includes/admin-pages/discount-codes.php:37 -msgid "Uses" -msgstr "Gebruikt" - -#: ../includes/admin-pages/discount-codes.php:24 -#: ../includes/admin-pages/discount-codes.php:38 -#: ../includes/admin-pages/forms/edit-discount.php:70 -#: ../includes/admin-pages/forms/add-discount.php:64 -msgid "Max Uses" -msgstr "Max. te gebruiken" - -#: ../includes/admin-pages/discount-codes.php:25 -#: ../includes/admin-pages/discount-codes.php:39 -msgid "Start Date" -msgstr "Start datum" - -#: ../includes/admin-pages/discount-codes.php:26 -#: ../includes/admin-pages/discount-codes.php:40 -msgid "Expiration" -msgstr "Einddatum" - -#: ../includes/admin-pages/discount-codes.php:27 -#: ../includes/admin-pages/discount-codes.php:41 -#: ../includes/admin-pages/payments-history.php:51 -#: ../includes/admin-pages/payments-history.php:63 -#: ../includes/admin-pages/forms/edit-discount.php:79 -msgid "Status" -msgstr "Status" - -#: ../includes/admin-pages/discount-codes.php:65 -#: ../includes/admin-pages/discount-codes.php:67 -msgid "unlimited" -msgstr "onbegrensd" - -#: ../includes/admin-pages/discount-codes.php:76 -msgid "No start date" -msgstr "Geen startdatum" - -#: ../includes/admin-pages/discount-codes.php:83 -msgid "Expired" -msgstr "Verlopen" - -#: ../includes/admin-pages/discount-codes.php:85 -msgid "no expiration" -msgstr "Geen verloopdatum" - -#: ../includes/admin-pages/discount-codes.php:91 -#: ../includes/admin-pages/payments-history.php:83 -msgid "Edit" -msgstr "Bewerken" - -#: ../includes/admin-pages/discount-codes.php:93 -msgid "Deactivate" -msgstr "Deactiveren" - -#: ../includes/admin-pages/discount-codes.php:95 -msgid "Activate" -msgstr "Activeren" - -#: ../includes/admin-pages/discount-codes.php:97 -#: ../includes/admin-pages/payments-history.php:85 -msgid "Delete" -msgstr "Verwijderen" - -#: ../includes/admin-pages/discount-codes.php:102 -msgid "No discount codes have been created." -msgstr "Er zijn nog geen kortingscodes aangemaakt" - -#: ../includes/admin-pages/reports.php:14 -msgid "Transactions created while in test mode are not included on this page." -msgstr "Transacties in testmodus worden niet toegevoegd aan deze pagina" - -#: ../includes/admin-pages/payments-history.php:30 -msgid "Payment mode" -msgstr "Betaalmodus" - -#: ../includes/admin-pages/payments-history.php:32 -msgid "Live" -msgstr "Live" - -#: ../includes/admin-pages/payments-history.php:33 -msgid "Test" -msgstr "Test" - -#: ../includes/admin-pages/payments-history.php:37 -msgid "Payments per page" -msgstr "Betalingen per pagina" - -#: ../includes/admin-pages/payments-history.php:39 -msgid "Show" -msgstr "Tonen" - -#: ../includes/admin-pages/payments-history.php:44 -#: ../includes/admin-pages/payments-history.php:56 -msgid "ID" -msgstr "ID" - -#: ../includes/admin-pages/payments-history.php:46 -#: ../includes/admin-pages/payments-history.php:58 -msgid "Key" -msgstr "Sleutel" - -#: ../includes/admin-pages/payments-history.php:47 -#: ../includes/admin-pages/payments-history.php:59 -msgid "Products" -msgstr "Producten" - -#: ../includes/admin-pages/payments-history.php:48 -#: ../includes/admin-pages/payments-history.php:60 -msgid "Price" -msgstr "Prijs" - -#: ../includes/admin-pages/payments-history.php:50 -#: ../includes/admin-pages/payments-history.php:62 -msgid "User" -msgstr "Gebruiker" - -#: ../includes/admin-pages/payments-history.php:84 -msgid "Resend Purchase Receipt" -msgstr "Bestelbevesting opnieuw versturen" - -#: ../includes/admin-pages/payments-history.php:98 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "Aankoop-details voor betaling #%s" - -#: ../includes/admin-pages/payments-history.php:98 -msgid "View Order Details" -msgstr "Bekijk bestellingsdetails" - -#: ../includes/admin-pages/payments-history.php:103 -msgid "Purchased File" -msgstr "Besteld bestand" - -#: ../includes/admin-pages/payments-history.php:103 -msgid "Purchased Files" -msgstr "Bestelde bestanden" - -#: ../includes/admin-pages/payments-history.php:118 -msgid "Price: " -msgstr "Prijs:" - -#: ../includes/admin-pages/payments-history.php:124 -msgid "Discount used:" -msgstr "Toegepaste korting:" - -#: ../includes/admin-pages/payments-history.php:124 -msgid "none" -msgstr "geen" - -#: ../includes/admin-pages/payments-history.php:125 -msgid "Total:" -msgstr "Totaal:" - -#: ../includes/admin-pages/payments-history.php:128 -msgid "Buyer's Personal Details:" -msgstr "Persoonsgegevens besteller:" - -#: ../includes/admin-pages/payments-history.php:130 -msgid "Name:" -msgstr "Naam:" - -#: ../includes/admin-pages/payments-history.php:131 -msgid "Email:" -msgstr "Email:" - -#: ../includes/admin-pages/payments-history.php:134 -#: ../includes/admin-pages/forms/edit-payment.php:58 -msgid "Close" -msgstr "Sluiten" - -#: ../includes/admin-pages/payments-history.php:139 -msgid "guest" -msgstr "Gast" - -#: ../includes/admin-pages/payments-history.php:146 -msgid "No payments recorded yet" -msgstr "Nog geen betalingen geregistreerd" - -#: ../includes/admin-pages/payments-history.php:161 -msgid "Previous" -msgstr "Vorige" - -#: ../includes/admin-pages/settings.php:13 -msgid "General" -msgstr "Algemeen" - -#: ../includes/admin-pages/settings.php:15 -msgid "Emails" -msgstr "Emails" - -#: ../includes/admin-pages/settings.php:16 -msgid "Styles" -msgstr "Stijlen" - -#: ../includes/admin-pages/settings.php:17 -msgid "Misc" -msgstr "Div." - -#: ../includes/admin-pages/add-ons.php:9 -msgid "Add Ons for Easy Digital Downloads" -msgstr "Add Ons voor Easy Digital Downloads" - -#: ../includes/admin-pages/add-ons.php:10 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "Deze add-ons voegen extra functionaliteit toe." - -#: ../includes/admin-pages/forms/edit-discount.php:3 -msgid "Something went wrong." -msgstr "Er is iets mis gegaan." - -#: ../includes/admin-pages/forms/edit-discount.php:7 -msgid "Edit Discount" -msgstr "Korting bewerken" - -#: ../includes/admin-pages/forms/edit-discount.php:7 -#: ../includes/admin-pages/forms/edit-payment.php:3 -msgid "Go Back" -msgstr "Ga terug" - -#: ../includes/admin-pages/forms/edit-discount.php:17 -#: ../includes/admin-pages/forms/add-discount.php:11 -msgid "The name of this discount" -msgstr "De naam voor deze korting" - -#: ../includes/admin-pages/forms/edit-discount.php:26 -#: ../includes/admin-pages/forms/add-discount.php:20 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "Voer een code in voor deze korting (bijv. 10 procent)" - -#: ../includes/admin-pages/forms/edit-discount.php:35 -#: ../includes/admin-pages/forms/add-discount.php:29 -msgid "Percentage" -msgstr "Percentage" - -#: ../includes/admin-pages/forms/edit-discount.php:36 -#: ../includes/admin-pages/forms/add-discount.php:30 -msgid "Flat amount" -msgstr "Flat amount" - -#: ../includes/admin-pages/forms/edit-discount.php:38 -#: ../includes/admin-pages/forms/add-discount.php:32 -msgid "The kind of discount to apply for this discount." -msgstr "Het soort korting dat toegepast moet worden." - -#: ../includes/admin-pages/forms/edit-discount.php:47 -#: ../includes/admin-pages/forms/add-discount.php:41 -msgid "The amount of this discount code." -msgstr "Het bedrag voor deze kortingscode." - -#: ../includes/admin-pages/forms/edit-discount.php:52 -#: ../includes/admin-pages/forms/add-discount.php:46 -msgid "Start date" -msgstr "Start datum" - -#: ../includes/admin-pages/forms/edit-discount.php:56 -#: ../includes/admin-pages/forms/add-discount.php:50 -msgid "Enter the start date for this discount code in the format of yyyy-mm-dd. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "Voer een startdatum in voor deze kortingscode in het formaat yyyy-mm-dd. Om geen startdatum te gebruiken laat je dit leeg. Wanneer hier een datum is ingevoerd kan pas op- of na deze datum gebruik worden gemaakt van de kortingscode." - -#: ../includes/admin-pages/forms/edit-discount.php:61 -#: ../includes/admin-pages/forms/add-discount.php:55 -msgid "Expiration date" -msgstr "Verloopdatum" - -#: ../includes/admin-pages/forms/edit-discount.php:65 -#: ../includes/admin-pages/forms/add-discount.php:59 -msgid "Enter the expiration date for this discount code in the format of yyyy-mm-dd. For no expiration, leave blank" -msgstr "Voer een einddatum in voor deze kortingscode (yyyy-mm-dd). Laat leeg om geen einddatum te gebruiken." - -#: ../includes/admin-pages/forms/edit-discount.php:74 -#: ../includes/admin-pages/forms/add-discount.php:68 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "Het maximaal aantal keren dat deze kortingscode gebruikt kan worden. Laat leeg voor geen maximum." - -#: ../includes/admin-pages/forms/edit-discount.php:83 -msgid "Active" -msgstr "Actief" - -#: ../includes/admin-pages/forms/edit-discount.php:84 -msgid "Inactive" -msgstr "Niet actief" - -#: ../includes/admin-pages/forms/edit-discount.php:86 -msgid "The status of this discount code." -msgstr "De status van deze kortingscode." - -#: ../includes/admin-pages/forms/edit-discount.php:96 -msgid "Update Discount Code" -msgstr "Kortingscode bijwerken" - -#: ../includes/admin-pages/forms/add-discount.php:1 -msgid "Add New Discount" -msgstr "Nieuwe kortingscode toevoegen" - -#: ../includes/admin-pages/forms/add-discount.php:76 -msgid "Add Discount Code" -msgstr "Kortingscode toevoegen" - -#: ../includes/admin-pages/forms/edit-payment.php:9 -msgid "Downloads Purchased" -msgstr "Aantal bestelde downloads" - -#: ../includes/admin-pages/forms/edit-payment.php:21 -#, php-format -msgid "Add download to purchase #%s" -msgstr "Voeg een download toe aan bestelling #%s" - -#: ../includes/admin-pages/forms/edit-payment.php:21 -msgid "Add download to purchase" -msgstr "Download toevoegen om te bestellen" - -#: ../includes/admin-pages/forms/edit-payment.php:26 -msgid "Payment Status" -msgstr "Betaalstatus" - -#: ../includes/admin-pages/forms/edit-payment.php:31 -msgid "Pending" -msgstr "In afwachting" - -#: ../includes/admin-pages/forms/edit-payment.php:32 -msgid "Complete" -msgstr "Voltooid" - -#: ../includes/admin-pages/forms/edit-payment.php:44 -msgid "Update Payment" -msgstr "Betaling bijwerken" - -#: ../includes/admin-pages/forms/edit-payment.php:57 -msgid "Add Selected Downloads" -msgstr "Voeg geselecteerde downloads toe" - diff --git a/languages/edd-pl_PL.mo b/languages/edd-pl_PL.mo deleted file mode 100644 index 52227341060..00000000000 Binary files a/languages/edd-pl_PL.mo and /dev/null differ diff --git a/languages/edd-pl_PL.po b/languages/edd-pl_PL.po deleted file mode 100644 index 219979f731a..00000000000 --- a/languages/edd-pl_PL.po +++ /dev/null @@ -1,2286 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-09-25 10:23-0600\n" -"PO-Revision-Date: 2012-09-26 11:49+0100\n" -"Last-Translator: Bartosz Sobaczewski \n" -"Language-Team: b'art \n" -"Language: pl_PL\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_x;_n;esc_attr__;esc_attr_e;esc_html__;" -"esc_html_e;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c\n" -"X-Poedit-Basepath: ../\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Generator: Poedit 1.5.3\n" -"X-Poedit-SearchPath-0: .\n" - -#: includes/template-functions.php:48 -#, php-format -msgid "" -"No checkout page has been configured. Visit Settings to " -"set one." -msgstr "" -"Nie została skonfigurowany strona \"Płacę\". Odwiedź Ustawienia, aby ją skonfigurować." - -#: includes/template-functions.php:60 -msgid "Purchase" -msgstr "Zamów" - -#: includes/template-functions.php:137 includes/template-functions.php:158 -#: includes/cart-template.php:46 includes/cart-template.php:49 -msgid "Checkout" -msgstr "Do kasy" - -#: includes/template-functions.php:167 -msgid "added to your cart" -msgstr "dodany do koszyka" - -#: includes/template-functions.php:263 -msgid "Gray" -msgstr "Szary" - -#: includes/template-functions.php:264 -msgid "Pink" -msgstr "Różowy" - -#: includes/template-functions.php:265 -msgid "Blue" -msgstr "Niebieski" - -#: includes/template-functions.php:266 -msgid "Green" -msgstr "Zielony" - -#: includes/template-functions.php:267 -msgid "Teal" -msgstr "Żólty" - -#: includes/template-functions.php:268 -msgid "Black" -msgstr "Czarny" - -#: includes/template-functions.php:269 -msgid "Dark Gray" -msgstr "Ciemny szary" - -#: includes/template-functions.php:270 -msgid "Orange" -msgstr "Pomarańczowy" - -#: includes/template-functions.php:271 -msgid "Purple" -msgstr "Purpurowy" - -#: includes/template-functions.php:272 -msgid "Slate" -msgstr "Szaroniebieski" - -#: includes/template-functions.php:293 -msgid "Button" -msgstr "Przycisk" - -#: includes/template-functions.php:294 -msgid "Plain Text" -msgstr "Czysty tekst" - -#: includes/template-functions.php:317 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "Już kupiłeś ten plik, ale możesz kupić go ponownie jeśli chcesz." - -#: includes/payment-functions.php:299 -msgid "Pending" -msgstr "W toku" - -#: includes/payment-functions.php:300 -msgid "Complete" -msgstr "Zakończone" - -#: includes/payment-functions.php:301 -msgid "Refunded" -msgstr "Zwrócone" - -#: includes/email-template.php:23 -msgid "Default Template" -msgstr "Szablon domyślny" - -#: includes/email-template.php:24 -msgid "No template, plain text only" -msgstr "Bez szablonu, tylko czysty tekst" - -#: includes/email-template.php:115 -msgid "Sample Product Title" -msgstr "Przykładowy tytuł" - -#: includes/email-template.php:118 -msgid "Sample Download File Name" -msgstr "Przykładowa nazwa pliku" - -#: includes/email-template.php:118 -msgid "Optional notes about this download." -msgstr "Opcjonalne uwagi na temat pobieranego pliku." - -#: includes/email-template.php:129 -msgid "These are some sample notes added to a product." -msgstr "To są przykładowe uwagi dodane do produktu." - -#: includes/email-template.php:168 -msgid "Purchase Receipt Preview" -msgstr "Podgląd rachunku" - -#: includes/email-template.php:168 -msgid "Preview Purchase Receipt" -msgstr "Zobacz podgląd rachunku" - -#: includes/email-template.php:209 -msgid "Dear" -msgstr "Szanowny/a" - -#: includes/email-template.php:210 -msgid "" -"Thank you for your purchase. Please click on the link(s) below to download " -"your files." -msgstr "" -"Dziękujemy za złożenie zamówienia. Poniżej znajduje się lista linków do " -"zakupionych plików." - -#: includes/cart-template.php:80 -msgid "remove" -msgstr "usuń" - -#: includes/cart-template.php:99 -msgid "Your cart is empty." -msgstr "Twój koszyk jest pusty." - -#: includes/register-settings.php:41 -msgid "Test Mode" -msgstr "Tryb testowy" - -#: includes/register-settings.php:42 -msgid "" -"While in test mode no live transactions are processed. To fully use test " -"mode, you must have a sandbox (test) account for the payment gateway you are " -"testing." -msgstr "" -"Podczas pracy w trybie testowym żadne transakcje są przetwarzane. Aby w " -"pełni korzystać z trybu testowego, musisz mieć konto w trybie piaskownicy na " -"bramce płatności, którą testujesz." - -#: includes/register-settings.php:47 -msgid "Checkout Page" -msgstr "Strona zamówienia" - -#: includes/register-settings.php:48 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "Jest to strona, gdzie kupujący zakończy swoje zakupy." - -#: includes/register-settings.php:54 -msgid "Success Page" -msgstr "Strona Sukces" - -#: includes/register-settings.php:55 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "To jeste strona, która jest przesyłana po zakończeniu zakupów" - -#: includes/register-settings.php:61 -msgid "Download Links on Success Page" -msgstr "Linki na stronie Sukcesu" - -#: includes/register-settings.php:62 -msgid "" -"Show a list of all download links on the success page after completing a " -"purchase?" -msgstr "" -"Pokaać listę wszystkich plików do pobrania na stronie Sukces po zakończeniu " -"zakupu?" - -#: includes/register-settings.php:67 -msgid "Currency Settings" -msgstr "Ustawienia waluty" - -#: includes/register-settings.php:68 -msgid "Configure the currency options" -msgstr "Konfiguracja ustawień waluty" - -#: includes/register-settings.php:73 -msgid "Currency" -msgstr "Waluta" - -#: includes/register-settings.php:74 -msgid "" -"Choose your currency. Note that some payment gateways have currency " -"restrictions." -msgstr "" -"Wybierz walutę. Pamiętaj, że niektóre bramki płatnicze mogą nie obsługiwać " -"wybranej przez Ciebie waluty." - -#: includes/register-settings.php:80 -msgid "Currency Position" -msgstr "Pozycja walutowa" - -#: includes/register-settings.php:81 -msgid "Choose the location of the currency sign." -msgstr "Wyświetlaj symbol waluty." - -#: includes/register-settings.php:84 -msgid "Before - $10" -msgstr "Przed - $10" - -#: includes/register-settings.php:85 -msgid "After - 10$" -msgstr "Po - 10$" - -#: includes/register-settings.php:90 -msgid "Thousands Separator" -msgstr "Separator tysiąca" - -#: includes/register-settings.php:91 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "Symbol (zazwyczaj, lub.) oddzielający tysiące" - -#: includes/register-settings.php:98 -msgid "Decimal Separator" -msgstr "Separator dziesiętny" - -#: includes/register-settings.php:99 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "Symbol (zwykle lub.) oddzielający punkty dziesiętne" - -#: includes/register-settings.php:110 -msgid "Payment Gateways" -msgstr "Bramki płatności" - -#: includes/register-settings.php:111 -msgid "Choose the payment gateways you want to enable." -msgstr "Wybierz bramki płatności, które chcesz włączyć." - -#: includes/register-settings.php:117 -msgid "Accepted Payment Method Icons" -msgstr "Ikony akceptowanych metod płatności" - -#: includes/register-settings.php:118 -msgid "Display icons for the selected payment methods" -msgstr "Wyświetlaj ikony dla wybranych metod płatności" - -#: includes/register-settings.php:118 -msgid "" -"You will also need to configure your gateway settings if you are accepting " -"credit cards" -msgstr "" -"Musisz również skonfigurować ustawienia bramy, jeśli chcesz akceptować karty " -"kredytowe" - -#: includes/register-settings.php:131 -msgid "PayPal Settings" -msgstr "Ustawienia PayPal" - -#: includes/register-settings.php:132 -msgid "Configure the PayPal settings" -msgstr "Skonfiguruj ustawienia systemu PayPal" - -#: includes/register-settings.php:137 -msgid "PayPal Email" -msgstr "E-mail konta PayPal" - -#: includes/register-settings.php:138 -msgid "Enter your PayPal account's email" -msgstr "Wprowadź adres e-mail konta PayPal" - -#: includes/register-settings.php:144 -msgid "Alternate PayPal Purchase Verification" -msgstr "Alternatywna weryfikacja zakupu PayPal" - -#: includes/register-settings.php:145 -msgid "" -"If payments are not getting marked as complete, then check this box. Note, " -"this requires that buyers return to your site from PayPal." -msgstr "" -"Zaznacz to pole, jeżeli płatności nie są oznaczone jako zakończone. Uwaga, " -"to wymaga, aby kupujący powrócił do witryny z PayPal." - -#: includes/register-settings.php:150 -msgid "Disable PayPal IPN Verification" -msgstr "Wyłącz weryfikację IPN PayPal" - -#: includes/register-settings.php:151 -msgid "" -"If payments are not getting marked as complete, then check this box. This " -"forces the site to use a slightly less secure method of verifying purchases." -msgstr "" -"Zaznacz to pole, jeżeli płatności nie są coraz oznaczone jako zakończone. To " -"wymusi nieco mniej bezpieczną metodę weryfikacji zakupów." - -#: includes/register-settings.php:160 -msgid "Email Template" -msgstr "Szablon powiadomienia e-mail" - -#: includes/register-settings.php:161 -msgid "" -"Choose a template. Click \"Save Changes\" then \"Preview Purchase Receipt\" " -"to see the new template." -msgstr "" -"Wybierz szablon. Naciśnij \"Zapisz zmiany\" a następnie \"Zobacz podgląd " -"rachunku\" żeby zobaczyć nowy szablon." - -#: includes/register-settings.php:173 -msgid "From Name" -msgstr "Nazwa nadawcy" - -#: includes/register-settings.php:174 -msgid "" -"The name purchase receipts are said to come from. This should probably be " -"your site or shop name." -msgstr "" -"Wpisz nazwę nadawcy. To powinna być nazwa Twojej strony lub nazwa sklepu." - -#: includes/register-settings.php:179 -msgid "From Email" -msgstr "E-mail nadawcy" - -#: includes/register-settings.php:180 -msgid "" -"Email to send purchase receipts from. This will act as the \"from\" and " -"\"reply-to\" address." -msgstr "" -"Adres e-mail, z którego wysłany będzie rachunek. Pojawi się w polach OD i " -"odpowiedz-do." - -#: includes/register-settings.php:185 -msgid "Purchase Email Subject" -msgstr "Tytuł e-maila" - -#: includes/register-settings.php:186 -msgid "Enter the subject line for the purchase receipt email" -msgstr "Temat e-maila z potwierdzeniem zakupu" - -#: includes/register-settings.php:191 -msgid "Purchase Receipt" -msgstr "Potwierdzenie zakupu" - -#: includes/register-settings.php:192 -msgid "" -"Enter the email that is sent to users after completing a successful " -"purchase. HTML is accepted. Available template tags:" -msgstr "" -"Wpisz treść e-maila, który jest wysyłane do użytkowników po udanej " -"transakcji zakupu. Możesz użyć HTML. Dostępne znaczniki szablonu:" - -#: includes/register-settings.php:193 -msgid "A list of download URLs for each download purchased" -msgstr "Lista adresów URL z plikami do pobrania" - -#: includes/register-settings.php:194 -msgid "The buyer's name" -msgstr "Kupujący" - -#: includes/register-settings.php:195 -msgid "The date of the purchase" -msgstr "Data zamówienia" - -#: includes/register-settings.php:196 -msgid "The total price of the purchase" -msgstr "Łączna wartość zamówienia" - -#: includes/register-settings.php:197 -msgid "The unique ID number for this purchase receipt" -msgstr "Unikalny numer ID rachunku" - -#: includes/register-settings.php:198 -msgid "The method of payment used for this purchase" -msgstr "Forma płatności" - -#: includes/register-settings.php:199 -msgid "Your site name" -msgstr "Nazwa Twojej strony" - -#: includes/register-settings.php:208 -msgid "Disable Styles" -msgstr "Wyłącz style" - -#: includes/register-settings.php:209 -msgid "Check this to disable all included styling" -msgstr "Zaznacz, aby wyłączyć wszystkie wbudowane style" - -#: includes/register-settings.php:214 -msgid "Buttons" -msgstr "Przyciski" - -#: includes/register-settings.php:215 -msgid "Options for add to cart and purchase buttons" -msgstr "Opcje przycisków Dodaj do koszyka i Kupuję " - -#: includes/register-settings.php:220 -msgid "Default Button Style" -msgstr "Domyślny styl przycisku" - -#: includes/register-settings.php:221 -msgid "Choose the style you want to use for the buttons." -msgstr "Wybierz domyślny styl przycisków" - -#: includes/register-settings.php:227 -msgid "Default Button Color" -msgstr "Domyślny kolor przycisku" - -#: includes/register-settings.php:228 -msgid "Choose the color you want to use for the buttons." -msgstr "Wybierz domyślny kolor przycisków" - -#: includes/register-settings.php:238 -msgid "Disable Ajax" -msgstr "Wyłącz Ajax" - -#: includes/register-settings.php:239 -msgid "Check this to disable AJAX for the shopping cart." -msgstr "Zaznacz, żeby wyłączyć AJAX przy pokazywaniu koszyka." - -#: includes/register-settings.php:244 -msgid "Enable jQuery Validation" -msgstr "Włącz walidację jQuery" - -#: includes/register-settings.php:245 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "Zaznacz, aby włączyć jQuery na stronie finalizacji zamówienia." - -#: includes/register-settings.php:250 -msgid "Disable Guest Checkout" -msgstr "Wyłącz zakupy anonimowe." - -#: includes/register-settings.php:251 -msgid "Require that users be logged-in to purchase files." -msgstr "Użytkownik będzie musiał się zalogować, aby kontynuować zakupy." - -#: includes/register-settings.php:256 -msgid "Show Register / Login Form?" -msgstr "Pokazać formularz Zaloguj / Zarejestruj się?" - -#: includes/register-settings.php:257 -msgid "" -"Display the registration and login forms on the checkout page for non-logged-" -"in users." -msgstr "" -"Wyświetl formularz rejestracji i logowania na stronie finalizacji zakupów " -"dla niezalogowanych użytkowników" - -#: includes/register-settings.php:262 -msgid "Download Link Expiration" -msgstr "Termin ważności linku do pobrania" - -#: includes/register-settings.php:263 -msgid "" -"How long should download links be valid for? Default is 24 hours from the " -"time they are generated. Enter a time in hours." -msgstr "" -"Jak długo mają być ważne linki do pobrania? Domyślnie są to 24 godziny od " -"momentu ich wytworzenia. Wprowadź czas w godzinach." - -#: includes/register-settings.php:269 -msgid "Disable Redownload?" -msgstr "Wyłączyć możliwość ponownego pobrania?" - -#: includes/register-settings.php:270 -msgid "" -"Check this if you do not want to allow users to redownload items from their " -"purchase history." -msgstr "" -"Zaznacz, jeśli nie chcesz pozwolić użytkownikom na ponowne pobieranie plików " -"z ich historii zakupów." - -#: includes/register-settings.php:275 -msgid "Terms of Agreement" -msgstr "Warunki umowy" - -#: includes/register-settings.php:281 -msgid "Agree to Terms" -msgstr "Zgadzam się na te warunki" - -#: includes/register-settings.php:282 -msgid "" -"Check this to show an agree to terms on the checkout that users must agree " -"to before purchasing." -msgstr "" -"Zaznacz, aby pokazać Warunki umowy na stronie finalizacji zamówienia. " -"Użytkownicy muszą zgodzić się na nie przed zakupem." - -#: includes/register-settings.php:287 -msgid "Agree to Terms Label" -msgstr "Nagłówek Warunków umowy" - -#: includes/register-settings.php:288 -msgid "Label shown next to the agree to terms check box." -msgstr "Etykieta pokazana obok pola wyboru \"Akceptuję warunki umowy\"." - -#: includes/register-settings.php:294 -msgid "Agreement Text" -msgstr "Treść umowy" - -#: includes/register-settings.php:295 -msgid "If Agree to Terms is checked, enter the agreement terms here." -msgstr "Jeślis Warunki Umowy są włączone, wpisz warunki umowy tutaj." - -#: includes/register-settings.php:300 -msgid "Complete Purchase Text" -msgstr "Tekst \"Zakończ zamówienie\"" - -#: includes/register-settings.php:301 -msgid "The button label for completing a purchase." -msgstr "Etykieta przycisku do zakończenia zamówienia." - -#: includes/register-settings.php:306 -msgid "Add to Cart Text" -msgstr "Tekst przycisku \"Dodaj do koszyka\"" - -#: includes/register-settings.php:307 -msgid "Text shown on the Add to Cart Buttons" -msgstr "Tekst wyświetlany na przycisku Dodaj do koszyka" - -#: includes/register-settings.php:333 -msgid "General Settings" -msgstr "Ustawienia ogólne" - -#: includes/register-settings.php:359 -msgid "Payment Gateway Settings" -msgstr "Bramka płatności" - -#: includes/register-settings.php:385 -msgid "Email Settings" -msgstr "Powiadomienia" - -#: includes/register-settings.php:411 -msgid "Style Settings" -msgstr "Ustawienia stylu" - -#: includes/register-settings.php:438 -msgid "Misc Settings" -msgstr "Inne ustawienia" - -#: includes/register-settings.php:727 -msgid "Upload File" -msgstr "Wyślij plik na serwer" - -#: includes/register-settings.php:765 -msgid "Settings Updated" -msgstr "Ustawienia zostały zaktualizowane" - -#: includes/query-filters.php:42 -msgid "You do not have permission to view this file." -msgstr "Nie masz uprawnień, aby pobrać ten plik" - -#: includes/query-filters.php:42 -msgid "Error" -msgstr "Błąd" - -#: includes/cart-functions.php:405 -#, php-format -msgid "You have successfully added %s to your shopping cart." -msgstr "Dodałeś %s do koszyka" - -#: includes/cart-functions.php:406 -msgid "Checkout." -msgstr "Do kasy." - -#: includes/widgets.php:39 -msgid "Downloads Cart" -msgstr "Koszyk" - -#: includes/widgets.php:39 -msgid "Display the downloads shopping cart" -msgstr "Wyświetl koszyk" - -#: includes/widgets.php:82 includes/widgets.php:162 -msgid "Title:" -msgstr "Tytuł:" - -#: includes/widgets.php:87 -msgid "Show Quantity:" -msgstr "Pokaż ilość:" - -#: includes/widgets.php:112 -msgid "Downloads Categories / Tags" -msgstr "Kategorie/Tagi plików" - -#: includes/widgets.php:112 -msgid "Display the downloads categories or tags" -msgstr "Wyświetl kategorie lub tagi plików do pobrania" - -#: includes/widgets.php:167 -msgid "Taxonomy:" -msgstr "Taksonomia:" - -#: includes/widgets.php:169 -msgid "Categories" -msgstr "Kategorie" - -#: includes/widgets.php:170 -msgid "Tags" -msgstr "Tagi" - -#: includes/widgets.php:193 -msgid "Purchase History" -msgstr "Historia zamówień" - -#: includes/widgets.php:193 -msgid "Display a user's purchase history" -msgstr "Wyświetl historię zamówień użytkownika" - -#: includes/widgets.php:232 -msgid "No downloadable files found." -msgstr "Nie znaleziono plików do pobrania." - -#: includes/widgets.php:259 -msgid "Title" -msgstr "Tytuł" - -#: includes/widgets.php:299 -msgid "Easy Digital Downloads Sales Summary" -msgstr "Dodatki do Easy Digital Downloads" - -#: includes/widgets.php:318 -msgid "Current Month" -msgstr "Zyski miesięczne" - -#: includes/widgets.php:323 -msgid "Earnings" -msgstr "Zyski" - -#: includes/widgets.php:327 -msgid "Sales" -msgstr "Sprzedaż" - -#: includes/widgets.php:333 -msgid "Totals" -msgstr "Sumy" - -#: includes/widgets.php:338 -msgid "Total Earnings" -msgstr "Łączne zyski:" - -#: includes/widgets.php:342 -msgid "Total Sales" -msgstr "Łączna sprzedaż" - -#: includes/scripts.php:40 -msgid "Please enter a discount code" -msgstr "wpisz kod rabatowy" - -#: includes/scripts.php:41 -msgid "Discount Applied" -msgstr "Rabat został zastosowany" - -#: includes/scripts.php:42 -msgid "Please enter an email address before applying a discount code" -msgstr "Wpisz adres e-mail przed zastosowaniem kodu rabatowego" - -#: includes/scripts.php:44 -msgid "You have already added this item to your cart" -msgstr "Dodałeś już tą pozycję do koszyka" - -#: includes/scripts.php:45 -msgid "Your cart is empty" -msgstr "Twój koszyk jest pusty" - -#: includes/scripts.php:46 -msgid "Loading" -msgstr "Ładowanie" - -#: includes/scripts.php:123 -msgid "Add New Download" -msgstr "Dodaj nowy plik do pobrania" - -#: includes/scripts.php:124 -msgid "Use This File" -msgstr "Użyj tego pliku" - -#: includes/scripts.php:125 -msgid "Sorry, not available for variable priced products." -msgstr "Niestety, to nie jest dostępne dla produktów ze zmienną ceną." - -#: includes/scripts.php:126 -msgid "Are you sure you wish to delete this payment?" -msgstr "Czy na pewno chcesz usunąć tę płatność?" - -#: includes/scripts.php:127 -msgid "You must have at least one price" -msgstr "Musisz mieć co najmniej jedną cenę" - -#: includes/scripts.php:128 -msgid "You must have at least one file" -msgstr "Musisz mieć co najmniej jeden plik" - -#: includes/scripts.php:129 -msgid "You must have at least one field" -msgstr "Musisz mieć co najmniej jedno pole" - -#: includes/ajax-functions.php:102 -msgid "This discount code has been used already" -msgstr "Kod promocyjny był już używany" - -#: includes/ajax-functions.php:118 includes/process-purchase.php:239 -msgid "The discount you entered is invalid" -msgstr "Kod promocyjny jest niepoprawny" - -#: includes/login-register.php:45 -msgid "Log into Your Account" -msgstr "Zaloguj się do swojego konta" - -#: includes/login-register.php:47 includes/login-register.php:48 -#: includes/checkout-template.php:325 includes/checkout-template.php:326 -#: includes/checkout-template.php:373 -msgid "Username" -msgstr "Nazwa użytkownika" - -#: includes/login-register.php:51 includes/checkout-template.php:329 -#: includes/checkout-template.php:330 includes/checkout-template.php:377 -msgid "Password" -msgstr "Hasło" - -#: includes/login-register.php:58 includes/checkout-template.php:320 -msgid "Login" -msgstr "Zaloguj się" - -#: includes/login-register.php:61 -msgid "Lost Password" -msgstr "Zapomniane hasło" - -#: includes/login-register.php:62 -msgid "Lost Password?" -msgstr "Zapomniałeś swoje hasło?" - -#: includes/login-register.php:69 -msgid "You are already logged in" -msgstr "Jesteś już zalogowany" - -#: includes/login-register.php:92 includes/process-purchase.php:472 -msgid "The password you entered is incorrect" -msgstr "Podane hasło jest nieprawidłowe" - -#: includes/login-register.php:95 includes/process-purchase.php:491 -msgid "The username you entered does not exist" -msgstr "Nie ma takiego użytkownika" - -#: includes/misc-functions.php:185 -msgid "US Dollars ($)" -msgstr "Dolar amerykański ($)" - -#: includes/misc-functions.php:186 -msgid "Euros (€)" -msgstr "Euro (€)" - -#: includes/misc-functions.php:187 -msgid "Pounds Sterling (£)" -msgstr "Funt szterling (£)" - -#: includes/misc-functions.php:188 -msgid "Australian Dollars ($)" -msgstr "Dolar australijski ($)" - -#: includes/misc-functions.php:189 -msgid "Brazilian Real ($)" -msgstr "Real brazylijski ($)" - -#: includes/misc-functions.php:190 -msgid "Canadian Dollars ($)" -msgstr "Dolar kanadyjski ($)" - -#: includes/misc-functions.php:191 -msgid "Czech Koruna" -msgstr "Korona czeska" - -#: includes/misc-functions.php:192 -msgid "Danish Krone" -msgstr "Korona duńska" - -#: includes/misc-functions.php:193 -msgid "Hong Kong Dollar ($)" -msgstr "Dolar hongkoński ($)" - -#: includes/misc-functions.php:194 -msgid "Hungarian Forint" -msgstr "Forint" - -#: includes/misc-functions.php:195 -msgid "Israeli Shekel" -msgstr "Nowy szekel izraelski" - -#: includes/misc-functions.php:196 -msgid "Japanese Yen (¥)" -msgstr "Jen (¥)" - -#: includes/misc-functions.php:197 -msgid "Malaysian Ringgits" -msgstr "Ringgit malezyjski" - -#: includes/misc-functions.php:198 -msgid "Mexican Peso ($)" -msgstr "Peso meksykańskie ($)" - -#: includes/misc-functions.php:199 -msgid "New Zealand Dollar ($)" -msgstr "Dolar nowozelandzki ($)" - -#: includes/misc-functions.php:200 -msgid "Norwegian Krone" -msgstr "Korona norweska" - -#: includes/misc-functions.php:201 -msgid "Philippine Pesos" -msgstr "Peso filipińskie" - -#: includes/misc-functions.php:202 -msgid "Polish Zloty" -msgstr "Złoty" - -#: includes/misc-functions.php:203 -msgid "Singapore Dollar ($)" -msgstr "Dolar singapurski ($)" - -#: includes/misc-functions.php:204 -msgid "Swedish Krona" -msgstr "Korona szwedzka" - -#: includes/misc-functions.php:205 -msgid "Swiss Franc" -msgstr "Frank szwajcarski" - -#: includes/misc-functions.php:206 -msgid "Taiwan New Dollars" -msgstr "Nowy dolar tajwański" - -#: includes/misc-functions.php:207 -msgid "Thai Baht" -msgstr "Bat" - -#: includes/misc-functions.php:208 -msgid "Indian Rupee" -msgstr "Rupia indyjska" - -#: includes/misc-functions.php:209 -msgid "Turkish Lira" -msgstr "Lira turecka" - -#: includes/misc-functions.php:210 -msgid "Iranian Rial" -msgstr "Rial irański" - -#: includes/process-download.php:266 includes/process-download.php:283 -msgid "Sorry but this file does not exist." -msgstr "Przepraszamy, ten plik nie istnieje." - -#: includes/process-download.php:294 -msgid "You do not have permission to download this file" -msgstr "Nie masz uprawnień, aby pobrać ten plik" - -#: includes/process-download.php:294 -msgid "Purchase Verification Failed" -msgstr "Weryfikacja zakupu nie powiodła się." - -#: includes/checkout-template.php:101 -msgid "Personal Info" -msgstr "Zamawiający" - -#: includes/checkout-template.php:104 -msgid "Email address" -msgstr "Adres e-mail" - -#: includes/checkout-template.php:105 -msgid "Email Address" -msgstr "Adres e-mail" - -#: includes/checkout-template.php:109 includes/checkout-template.php:110 -#: includes/checkout-template.php:343 includes/checkout-template.php:344 -msgid "First Name" -msgstr "Imię" - -#: includes/checkout-template.php:113 includes/checkout-template.php:347 -msgid "Last name" -msgstr "Nazwisko" - -#: includes/checkout-template.php:114 includes/checkout-template.php:348 -msgid "Last Name" -msgstr "Nazwisko" - -#: includes/checkout-template.php:142 -msgid "Show Terms" -msgstr "Pokaż warunki umowy" - -#: includes/checkout-template.php:143 -msgid "Hide Terms" -msgstr "Ukryj warunki umowy" - -#: includes/checkout-template.php:146 -msgid "Agree to Terms?" -msgstr "Akceptujesz warunki umowy?" - -#: includes/checkout-template.php:166 -msgid "Go back" -msgstr "wróć" - -#: includes/checkout-template.php:170 -msgid "You must be logged in to complete your purchase" -msgstr "Musisz być zalogowany, abu kontynuować zamawianie" - -#: includes/checkout-template.php:199 -msgid "Credit Card Info" -msgstr "Informacja o karcie kredytowej" - -#: includes/checkout-template.php:201 -msgid "Card name" -msgstr "Nazwa karty" - -#: includes/checkout-template.php:202 -msgid "Name on the Card" -msgstr "Imię i nazwisko użytkownika" - -#: includes/checkout-template.php:205 -msgid "Card number" -msgstr "Numer karty" - -#: includes/checkout-template.php:206 -msgid "Card Number" -msgstr "Numer karty" - -#: includes/checkout-template.php:209 -msgid "Security code" -msgstr "Kod CVC" - -#: includes/checkout-template.php:210 -msgid "CVC" -msgstr "CVC" - -#: includes/checkout-template.php:216 -msgid "Month" -msgstr "Miesiąc" - -#: includes/checkout-template.php:218 -msgid "Year" -msgstr "Rok" - -#: includes/checkout-template.php:219 -msgid "Expiration (MM/YYYY)" -msgstr "Ważna do (MM/YYYY)" - -#: includes/checkout-template.php:249 -msgid "Address line 1" -msgstr "Adres" - -#: includes/checkout-template.php:250 -msgid "Billing Address" -msgstr "Adres (na rachunku)" - -#: includes/checkout-template.php:253 -msgid "Address line 2" -msgstr "Adres cd." - -#: includes/checkout-template.php:254 -msgid "Billing Address Line 2" -msgstr "Adres (na rachunku) cd." - -#: includes/checkout-template.php:257 -msgid "City" -msgstr "Miasto" - -#: includes/checkout-template.php:258 -msgid "Billing City" -msgstr "Miasto (na rachunku)" - -#: includes/checkout-template.php:269 -msgid "Billing Country" -msgstr "Kraj (na rachunku)" - -#: includes/checkout-template.php:272 -msgid "State / Province" -msgstr "województwo" - -#: includes/checkout-template.php:289 -msgid "Billing State / Province" -msgstr "województwo (na rachunku)" - -#: includes/checkout-template.php:292 -msgid "Zip / Postal code" -msgstr "Kod pocztowy" - -#: includes/checkout-template.php:293 -msgid "Billing Zip / Postal Code" -msgstr "Kod pocztowy (na rachunku)" - -#: includes/checkout-template.php:320 -msgid "Already have an account?" -msgstr "Masz już konto?" - -#: includes/checkout-template.php:322 -msgid "Create an account" -msgstr "Załóż konto" - -#: includes/checkout-template.php:322 -msgid "(optional)" -msgstr "(opcjonalnie)" - -#: includes/checkout-template.php:333 -msgid "Confirm password" -msgstr "Potwierdź hasło" - -#: includes/checkout-template.php:334 -msgid "Password Again" -msgstr "Wprowadź hasło ponownie" - -#: includes/checkout-template.php:339 includes/checkout-template.php:340 -msgid "Email" -msgstr "Adres e-mail" - -#: includes/checkout-template.php:369 -msgid "Login to your account" -msgstr "Zaloguj się aby kontynuować" - -#: includes/checkout-template.php:372 -msgid "Your username" -msgstr "Twoja nazwa użytkownika" - -#: includes/checkout-template.php:376 -msgid "Your password" -msgstr "Twoje hasło" - -#: includes/checkout-template.php:384 -msgid "Need to create an account?" -msgstr "Nie masz jeszcze konta?" - -#: includes/checkout-template.php:386 -msgid "Register" -msgstr "Zarejestruj się" - -#: includes/checkout-template.php:386 -msgid "or checkout as a guest." -msgstr "lub kontynuuj bez rejestracji." - -#: includes/checkout-template.php:415 -msgid "Choose Your Payment Method" -msgstr "Wybierz formę płatności" - -#: includes/checkout-template.php:443 -msgid "Enter discount" -msgstr "wprowadź kod promocyjny" - -#: includes/checkout-template.php:445 -msgid "Discount" -msgstr "Kod promocyjny" - -#: includes/checkout-template.php:447 -msgid "Apply Discount" -msgstr "zastosuj " - -#: includes/checkout-template.php:473 -msgid "Next" -msgstr "Dalej" - -#: includes/email-functions.php:62 -msgid "Hello" -msgstr "Witaj" - -#: includes/email-functions.php:62 -msgid "A download purchase has been made" -msgstr "zostało złożone zamówienie" - -#: includes/email-functions.php:63 -msgid "Downloads sold:" -msgstr "Zakupione pliki:" - -#: includes/email-functions.php:76 -msgid "Purchased by: " -msgstr "Kupujący:" - -#: includes/email-functions.php:77 -msgid "Amount: " -msgstr "Wartość:" - -#: includes/email-functions.php:78 -msgid "Payment Method: " -msgstr "Forma płatności:" - -#: includes/email-functions.php:79 -msgid "Thank you" -msgstr "Dziękujemy!" - -#: includes/email-functions.php:82 -msgid "New download purchase" -msgstr "Nowe zamówienie" - -#: includes/install.php:42 -msgid "Purchase Confirmation" -msgstr "Potwierdzenie zamówienia" - -#: includes/install.php:43 -msgid "Thank you for your purchase!" -msgstr "Dziękujemy za złożenie zamówienia!" - -#: includes/process-purchase.php:206 -msgid "The selected gateway is not active" -msgstr "Wybrana bramka płatności nie jest aktywna" - -#: includes/process-purchase.php:210 -msgid "No gateway has been selected" -msgstr "Nie wybrałeś żadnej bramki płatności" - -#: includes/process-purchase.php:259 -msgid "You must agree to the terms of use" -msgstr "Musisz zgodzić się na warunki użytkowania" - -#: includes/process-purchase.php:289 -msgid "Please enter a valid email address." -msgstr "Wpisz poprawny adres e-mail." - -#: includes/process-purchase.php:303 -msgid "The user information is invalid." -msgstr "Informacja o użytkowniku jest nieprawidłowa." - -#: includes/process-purchase.php:349 -msgid "Username already taken" -msgstr "Nazwa użytkownika już jest zajęta" - -#: includes/process-purchase.php:355 -msgid "Invalid username" -msgstr "Nieprawidłowa nazwa użytkownika" - -#: includes/process-purchase.php:366 -msgid "You must register or login to complete your purchase" -msgstr "Musisz się zarejestrować lub zalogować, aby sfinalizować zakup" - -#: includes/process-purchase.php:378 includes/process-purchase.php:522 -msgid "Invalid email" -msgstr "Niepoprawny adres e-mail" - -#: includes/process-purchase.php:384 -msgid "Email already used" -msgstr "Adres e-mail jest już zapisany w naszej bazie." - -#: includes/process-purchase.php:396 includes/process-purchase.php:529 -msgid "Enter an email" -msgstr "Wprowadź adres e-mail" - -#: includes/process-purchase.php:407 -msgid "Passwords don't match" -msgstr "Hasła nie są identyczne" - -#: includes/process-purchase.php:422 includes/process-purchase.php:487 -msgid "Enter a password" -msgstr "Wprowadź hasło" - -#: includes/process-purchase.php:427 -msgid "Enter the password confirmation" -msgstr "Wprowadź hasło ponownie" - -#: includes/process-purchase.php:454 -msgid "You must login or register to complete your purchase" -msgstr "Musisz się zalogować lub zarejestrować, aby sfinalizować zakup" - -#: includes/gateway-functions.php:28 -msgid "Test Payment" -msgstr "Płatność testowa" - -#: includes/post-types.php:43 includes/post-types.php:81 -msgid "Add New" -msgstr "Dodaj nową" - -#: includes/post-types.php:44 -#, php-format -msgid "Add New %1$s" -msgstr "Dodaj nowy %1$s" - -#: includes/post-types.php:45 -#, php-format -msgid "Edit %1$s" -msgstr "Edytuj %1$s" - -#: includes/post-types.php:46 -#, php-format -msgid "New %1$s" -msgstr "Nowy %1$s" - -#: includes/post-types.php:47 -#, php-format -msgid "All %2$s" -msgstr "Wszystkie %2$s" - -#: includes/post-types.php:48 -#, php-format -msgid "View %1$s" -msgstr "Zobacz %1$s" - -#: includes/post-types.php:49 -#, php-format -msgid "Search %2$s" -msgstr "Szukaj %2$s" - -#: includes/post-types.php:50 -#, php-format -msgid "No %2$s found" -msgstr "Nie znaleziono %2$s" - -#: includes/post-types.php:51 -#, php-format -msgid "No %2$s found in Trash" -msgstr "Nie znaleziono %2$s w usuniętych" - -#: includes/post-types.php:53 -#, php-format -msgid "%2$s" -msgstr "%2$s" - -#: includes/post-types.php:79 -msgctxt "post type general name" -msgid "Payments" -msgstr "Płatności" - -#: includes/post-types.php:80 -msgctxt "post type singular name" -msgid "Payment" -msgstr "Płatność" - -#: includes/post-types.php:82 -msgid "Add New Payment" -msgstr "Dodaj nową płatność" - -#: includes/post-types.php:83 -msgid "Edit Payment" -msgstr "Edytuj płatność" - -#: includes/post-types.php:84 -msgid "New Payment" -msgstr "Nowa płatność" - -#: includes/post-types.php:85 -msgid "All Payments" -msgstr "Wszystkie płatności" - -#: includes/post-types.php:86 -msgid "View Payment" -msgstr "Zobacz płatność" - -#: includes/post-types.php:87 -msgid "Search Payments" -msgstr "Szukaj płatności" - -#: includes/post-types.php:88 -msgid "No Payments found" -msgstr "Nie znaleziono płatności" - -#: includes/post-types.php:89 -msgid "No Payments found in Trash" -msgstr "Nie znaleziono płatności w usuniętych" - -#: includes/post-types.php:91 -msgid "Payment History" -msgstr "Historia płatności" - -#: includes/post-types.php:125 -msgid "Download" -msgstr "Pobierz" - -#: includes/post-types.php:126 -msgid "Downloads" -msgstr "Pliki do pobrania" - -#: includes/post-types.php:173 -msgctxt "taxonomy general name" -msgid "Categories" -msgstr "Kategorie" - -#: includes/post-types.php:174 -msgctxt "taxonomy singular name" -msgid "Category" -msgstr "Kategoria" - -#: includes/post-types.php:175 -msgid "Search Categories" -msgstr "Szukaj kategorii" - -#: includes/post-types.php:176 -msgid "All Categories" -msgstr "Wszystkie kategorie" - -#: includes/post-types.php:177 -msgid "Parent Category" -msgstr "Kategoria nadrzędna" - -#: includes/post-types.php:178 -msgid "Parent Category:" -msgstr "Kategoria nadrzędna:" - -#: includes/post-types.php:179 -msgid "Edit Category" -msgstr "Edytuj kategorię" - -#: includes/post-types.php:180 -msgid "Update Category" -msgstr "Aktualizuj kategorię" - -#: includes/post-types.php:181 -msgid "Add New Category" -msgstr "Dodaj nową kategorię" - -#: includes/post-types.php:182 -msgid "New Category Name" -msgstr "Nazwa nowej kategorii" - -#: includes/post-types.php:198 -msgctxt "taxonomy general name" -msgid "Tags" -msgstr "Tagi" - -#: includes/post-types.php:199 -msgctxt "taxonomy singular name" -msgid "Tag" -msgstr "Tag" - -#: includes/post-types.php:200 -msgid "Search Tags" -msgstr "Szukaj tagów" - -#: includes/post-types.php:201 -msgid "All Tags" -msgstr "Wszystkie tagi" - -#: includes/post-types.php:202 -msgid "Parent Tag" -msgstr "Tag nadrzędny" - -#: includes/post-types.php:203 -msgid "Parent Tag:" -msgstr "Tag nadrzędny:" - -#: includes/post-types.php:204 -msgid "Edit Tag" -msgstr "Edytuj tag" - -#: includes/post-types.php:205 -msgid "Update Tag" -msgstr "Aktualizuj tag" - -#: includes/post-types.php:206 -msgid "Add New Tag" -msgstr "Dodaj nowy tag" - -#: includes/post-types.php:207 -msgid "New Tag Name" -msgstr "Nazwa nowego tagu" - -#: includes/post-types.php:239 includes/post-types.php:240 -msgid "Download updated." -msgstr "Plik został zaktualizowany." - -#: includes/post-types.php:241 -msgid "Download published." -msgstr "Plik został opublikowany." - -#: includes/post-types.php:242 -msgid "Download saved." -msgstr "Plik został zapisany." - -#: includes/post-types.php:243 -msgid "Download submitted." -msgstr "Plik został zgłoszony." - -#: includes/shortcodes.php:194 -msgid "Purchase All Items" -msgstr "Zamów wszystkie" - -#: includes/shortcodes.php:336 -#, php-format -msgctxt "download post type name" -msgid "No %s found" -msgstr "Nie znaleziono %s " - -#: includes/gateways/paypal.php:271 -msgid "Invalid IPN" -msgstr "Błędny IPN" - -#: includes/templates/history-purchases.php:11 -msgid "Purchase ID" -msgstr "Numer zamówienia" - -#: includes/templates/history-purchases.php:12 -#: includes/admin/export-functions.php:48 -msgid "Date" -msgstr "Data" - -#: includes/templates/history-purchases.php:13 -msgid "Amount" -msgstr "Ilość" - -#: includes/templates/history-purchases.php:14 -#: includes/templates/history-downloads.php:12 -msgid "Files" -msgstr "Pliki" - -#: includes/templates/history-purchases.php:61 -msgid "You have not made any purchases" -msgstr "Nie dokonałeś żadnego zamówienia" - -#: includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "Nazwa" - -#: includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "Cena" - -#: includes/templates/checkout_cart.php:8 -msgid "Actions" -msgstr "Akcje" - -#: includes/templates/checkout_cart.php:49 -msgid "Total" -msgstr "Łącznie" - -#: includes/templates/history-downloads.php:10 -msgid "Download Name" -msgstr "Nazwa pliku do pobrania" - -#: includes/templates/history-downloads.php:68 -msgid "You have not purchased any downloads" -msgstr "Nie zamówiłeś żadnych plików" - -#: includes/admin/export-functions.php:39 -msgid "ID" -msgstr "ID" - -#: includes/admin/export-functions.php:43 -msgid "Products" -msgstr "Pliki" - -#: includes/admin/export-functions.php:44 -msgid "Discounts," -msgstr "Upusty," - -#: includes/admin/export-functions.php:45 -msgid "Amount paid" -msgstr "Zapłacono" - -#: includes/admin/export-functions.php:46 -msgid "Payment method" -msgstr "Forma płatności" - -#: includes/admin/export-functions.php:47 -msgid "Key" -msgstr "Klucz" - -#: includes/admin/export-functions.php:49 -msgid "User" -msgstr "Użytkownik" - -#: includes/admin/export-functions.php:50 -msgid "Status" -msgstr "Status" - -#: includes/admin/export-functions.php:111 -#: includes/admin/export-functions.php:119 -msgid "none" -msgstr "brak" - -#: includes/admin/export-functions.php:127 -msgid "guest" -msgstr "gość" - -#: includes/admin/export-functions.php:135 -msgid "No payments recorded yet" -msgstr "Nie zarejestrowano jeszcze płatności" - -#: includes/admin/export-functions.php:169 -msgid "Export not allowed for non-administrators." -msgstr "Eksport dostępny tylko dla administratorów" - -#: includes/admin/thickbox.php:29 includes/admin/thickbox.php:123 -#, php-format -msgid "Insert %s" -msgstr "Wstaw %s" - -#: includes/admin/thickbox.php:30 -msgid "Insert Download" -msgstr "Wstaw plik do pobrania" - -#: includes/admin/thickbox.php:65 -msgid "You must choose a download" -msgstr "Musisz wybrać plik do pobrania" - -#: includes/admin/thickbox.php:88 -#, php-format -msgid "Use the form below to insert the short code for purchasing a %s" -msgstr "" -"Użyj formularza poniżej żeby skonfigurować krótki kod dla zamówienia %s" - -#: includes/admin/thickbox.php:91 -#, php-format -msgid "Choose a %s" -msgstr "Wybierz %s" - -#: includes/admin/thickbox.php:100 -msgid "Choose a style" -msgstr "Wybierz styl" - -#: includes/admin/thickbox.php:111 -msgid "Choose a button color" -msgstr "Wybierz kolor przycisku" - -#: includes/admin/thickbox.php:120 -msgid "Link text . . ." -msgstr "Tekst linku . . ." - -#: includes/admin/thickbox.php:124 -msgid "Cancel" -msgstr "Anuluj" - -#: includes/admin/thickbox.php:126 -msgid "Button Styles" -msgstr "Style przycisków" - -#: includes/admin/admin-pages.php:27 -#: includes/admin/discounts/discount-codes.php:34 -msgid "Discount Codes" -msgstr "Kody promocyjne" - -#: includes/admin/admin-pages.php:28 -msgid "Earnings and Sales Reports" -msgstr "Raporty sprzedaży i płatności." - -#: includes/admin/admin-pages.php:28 includes/admin/reporting/reports.php:28 -msgid "Reports" -msgstr "Raporty" - -#: includes/admin/admin-pages.php:29 -msgid "Easy Digital Download Settings" -msgstr "Easy Digital Download - Ustawienia" - -#: includes/admin/admin-pages.php:29 -msgid "Settings" -msgstr "Ustawienia" - -#: includes/admin/admin-pages.php:30 -msgid "Easy Digital Download Add Ons" -msgstr "Easy Digital Download - Dodatki" - -#: includes/admin/admin-pages.php:30 -msgid "Add Ons" -msgstr "Dodatki" - -#: includes/admin/admin-notices.php:30 -msgid "Discount code updated." -msgstr "Kod został zaktualizowany" - -#: includes/admin/admin-notices.php:33 -msgid "There was a problem updating your discount code, please try again." -msgstr "" -"Wystąpił problem z aktualizacją kodu promocyjnego. Spróbuj jeszcze raz." - -#: includes/admin/admin-notices.php:36 -msgid "The payment has been deleted." -msgstr "Płatność została usunięta." - -#: includes/admin/admin-notices.php:39 -msgid "The purchase receipt has been resent." -msgstr "Rachunek został ponownie wysłany." - -#: includes/admin/admin-notices.php:44 -#, php-format -msgid "The payment history needs updated. %s" -msgstr "Historia płatności musi być zaktualizowana. %s" - -#: includes/admin/admin-notices.php:44 -msgid "Click to Upgrade" -msgstr "Kliknij aby zaktualizować." - -#: includes/admin/admin-notices.php:62 -msgid "" -"There seems to be an issue with the server. Please try again in a few " -"minutes." -msgstr "" -"Wygląda na to, że są problemy z serwerem. Proszę, spróbuj ponownie za kilka " -"minut." - -#: includes/admin/add-ons.php:69 -msgid "Add Ons for Easy Digital Downloads" -msgstr "Dodatki do Easy Digital Downloads" - -#: includes/admin/add-ons.php:70 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "Te dodatki zwiększają funkcjonalność Easy Digital Downloads." - -#: includes/admin/add-ons.php:73 -msgid "Browse All Extensions" -msgstr "Zobacz wszystkie dodatki" - -#: includes/admin/downloads/dashboard-columns.php:26 -#: includes/admin/discounts/edit-discount.php:23 -#: includes/admin/discounts/discount-codes.php:39 -#: includes/admin/discounts/discount-codes.php:52 -#: includes/admin/discounts/add-discount.php:18 -msgid "Name" -msgstr "Nazwa" - -#: includes/admin/downloads/dashboard-columns.php:29 -#: includes/admin/downloads/dashboard-columns.php:242 -#: includes/admin/downloads/metabox.php:171 -#: includes/admin/payments/payments-history.php:142 -#: includes/admin/payments/payments-history.php:158 -#: includes/admin/reporting/pdf-reports.php:66 -msgid "Price" -msgstr "Cena" - -#: includes/admin/downloads/dashboard-columns.php:32 -msgid "Short Code" -msgstr "Kod promocyjny" - -#: includes/admin/downloads/dashboard-columns.php:200 -msgid "Show all categories" -msgstr "Wszystkie kategorie" - -#: includes/admin/downloads/dashboard-columns.php:211 -msgid "Show all tags" -msgstr "Wszystkie tagi" - -#: includes/admin/downloads/dashboard-columns.php:239 -#, php-format -msgid "%s Data" -msgstr "%s data" - -#: includes/admin/downloads/metabox.php:23 -#, php-format -msgid "%1$s Configuration" -msgstr "%1s Konfiguracja" - -#: includes/admin/downloads/metabox.php:26 -msgid "Product Notes" -msgstr "Nazwa produktu" - -#: includes/admin/downloads/metabox.php:29 -#, php-format -msgid "%1$s Stats" -msgstr "%1s Statystyki" - -#: includes/admin/downloads/metabox.php:32 -msgid "Purchase Log" -msgstr "Dziennik zamówień" - -#: includes/admin/downloads/metabox.php:35 -msgid "File Download Log" -msgstr "Dziennik pobrań" - -#: includes/admin/downloads/metabox.php:145 -msgid "Pricing Options:" -msgstr "Opcje cen:" - -#: includes/admin/downloads/metabox.php:151 -msgid "Enable variable pricing" -msgstr "Włącz różne ceny" - -#: includes/admin/downloads/metabox.php:170 -#: includes/admin/downloads/metabox.php:233 -msgid "Option Name" -msgstr "Nazwa opcji" - -#: includes/admin/downloads/metabox.php:199 -msgid "Add New Price" -msgstr "Dodaj nową cenę" - -#: includes/admin/downloads/metabox.php:275 -msgid "File Downloads:" -msgstr "Pobrania pliku:" - -#: includes/admin/downloads/metabox.php:284 -#: includes/admin/downloads/metabox.php:351 -msgid "File Name" -msgstr "Nazwa pliku" - -#: includes/admin/downloads/metabox.php:285 -msgid "File URL" -msgstr "URL pliku" - -#: includes/admin/downloads/metabox.php:286 -msgid "Price Assignment" -msgstr "Przypisanie cen" - -#: includes/admin/downloads/metabox.php:314 -msgid "Add New File" -msgstr "Dodaj nowy plik" - -#: includes/admin/downloads/metabox.php:355 -msgid "http://" -msgstr "http://" - -#: includes/admin/downloads/metabox.php:358 -msgid "Upload a File" -msgstr "Wyślij plik na serwer" - -#: includes/admin/downloads/metabox.php:364 -msgid "All Prices" -msgstr "Wszystkie ceny" - -#: includes/admin/downloads/metabox.php:391 -msgid "Button Options" -msgstr "Opcje przycisku" - -#: includes/admin/downloads/metabox.php:397 -msgid "Disable the automatic output of the purchase button" -msgstr "Wyłącz automatyczne wyjście z przycisku zakupu" - -#: includes/admin/downloads/metabox.php:457 -msgid "" -"Special notes or instructions for this product. These notes will be added to " -"the purchase receipt." -msgstr "" -"Specjalne wskazówki lub informacje o tym produkcie. Te informacje będą " -"dodane do potwierdzenia zakupu." - -#: includes/admin/downloads/metabox.php:479 -msgid "Sales:" -msgstr "Sprzedaż:" - -#: includes/admin/downloads/metabox.php:485 -msgid "Earnings:" -msgstr "Zyski:" - -#: includes/admin/downloads/metabox.php:521 -msgid "Sales Log" -msgstr "Dziennik sprzedaży" - -#: includes/admin/downloads/metabox.php:523 -msgid "Each sale for this download is listed below." -msgstr "Każda sprzedaż tego pliku jest podana poniżej." - -#: includes/admin/downloads/metabox.php:537 -#: includes/admin/downloads/metabox.php:629 -msgid "Date:" -msgstr "Data:" - -#: includes/admin/downloads/metabox.php:541 -msgid "Buyer:" -msgstr "Kupujący:" - -#: includes/admin/downloads/metabox.php:545 -msgid "Purchase ID:" -msgstr "ID zamówienia:" - -#: includes/admin/downloads/metabox.php:553 -msgid "No sales yet" -msgstr "Jeszcze nie było sprzedaży" - -#: includes/admin/downloads/metabox.php:569 -#: includes/admin/downloads/metabox.php:666 -#: includes/admin/payments/payments-history.php:318 -msgid "Previous" -msgstr "poprzedni" - -#: includes/admin/downloads/metabox.php:610 -msgid "Download Log" -msgstr "Dziennik pobrań" - -#: includes/admin/downloads/metabox.php:612 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "Za każdym razem gdy plik jest pobrany, jest to odnotowane poniżej." - -#: includes/admin/downloads/metabox.php:633 -msgid "Downloaded by:" -msgstr "Pobrany przez:" - -#: includes/admin/downloads/metabox.php:637 -msgid "IP Address:" -msgstr "Adres IP:" - -#: includes/admin/downloads/metabox.php:641 -msgid "File: " -msgstr "Plik:" - -#: includes/admin/downloads/metabox.php:650 -msgid "No file downloads yet yet" -msgstr "Jeszcze nie było pobrań" - -#: includes/admin/discounts/edit-discount.php:13 -msgid "Something went wrong." -msgstr "Coś poszło nie tak." - -#: includes/admin/discounts/edit-discount.php:17 -msgid "Edit Discount" -msgstr "Edytuj upust" - -#: includes/admin/discounts/edit-discount.php:17 -#: includes/admin/payments/edit-payment.php:16 -msgid "Go Back" -msgstr "Wróć" - -#: includes/admin/discounts/edit-discount.php:27 -#: includes/admin/discounts/add-discount.php:22 -msgid "The name of this discount" -msgstr "Nazwa promocji" - -#: includes/admin/discounts/edit-discount.php:32 -#: includes/admin/discounts/discount-codes.php:40 -#: includes/admin/discounts/discount-codes.php:53 -#: includes/admin/discounts/add-discount.php:27 -msgid "Code" -msgstr "Kod" - -#: includes/admin/discounts/edit-discount.php:36 -#: includes/admin/discounts/add-discount.php:31 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "Wpisz kod promocji, np. 10PROCENT" - -#: includes/admin/discounts/edit-discount.php:41 -#: includes/admin/discounts/add-discount.php:36 -msgid "Type" -msgstr "Typ" - -#: includes/admin/discounts/edit-discount.php:45 -#: includes/admin/discounts/add-discount.php:40 -msgid "Percentage" -msgstr "procentowa" - -#: includes/admin/discounts/edit-discount.php:46 -#: includes/admin/discounts/add-discount.php:41 -msgid "Flat amount" -msgstr "stała wartość" - -#: includes/admin/discounts/edit-discount.php:48 -#: includes/admin/discounts/add-discount.php:43 -msgid "The kind of discount to apply for this discount." -msgstr "Sposób, w jaki ma być obliczony upust." - -#: includes/admin/discounts/edit-discount.php:57 -#: includes/admin/discounts/add-discount.php:52 -msgid "The amount of this discount code." -msgstr "Wartość upustu." - -#: includes/admin/discounts/edit-discount.php:62 -#: includes/admin/discounts/add-discount.php:57 -msgid "Start date" -msgstr "Data początkowa" - -#: includes/admin/discounts/edit-discount.php:66 -#: includes/admin/discounts/add-discount.php:61 -msgid "" -"Enter the start date for this discount code in the format of mm/dd/yyyy. For " -"no start date, leave blank. If entered, the discount can only be used after " -"or on this date." -msgstr "" -"Podaj datę początkową w formacie yyyy-mm-dd. Zostaw puste, jeśli nie chcesz " -"określać daty początkowej. Jeśli ją podasz. upust może być użyty dopiero po " -"tej dacie." - -#: includes/admin/discounts/edit-discount.php:71 -#: includes/admin/discounts/add-discount.php:66 -msgid "Expiration date" -msgstr "Wygasa" - -#: includes/admin/discounts/edit-discount.php:75 -#: includes/admin/discounts/add-discount.php:70 -msgid "" -"Enter the expiration date for this discount code in the format of mm/dd/" -"yyyy. For no expiration, leave blank" -msgstr "" -"Podaj datę ważności w formacie yyyy-mm-dd. Zostaw puste, jeśli nie chcesz " -"określać daty ważności. " - -#: includes/admin/discounts/edit-discount.php:80 -#: includes/admin/discounts/discount-codes.php:43 -#: includes/admin/discounts/discount-codes.php:56 -#: includes/admin/discounts/add-discount.php:84 -msgid "Max Uses" -msgstr "Maksymalna ilość użyć" - -#: includes/admin/discounts/edit-discount.php:84 -#: includes/admin/discounts/add-discount.php:88 -msgid "" -"The maximum number of times this discount can be used. Leave blank for " -"unlimited." -msgstr "" -"Maksymalna ilość kodów. Zostaw puste jeśli nie chcesz określać ilości " -"maksymalnej." - -#: includes/admin/discounts/edit-discount.php:89 -#: includes/admin/discounts/add-discount.php:75 -msgid "Minimum Amount" -msgstr "Minimalna ilość" - -#: includes/admin/discounts/edit-discount.php:93 -#: includes/admin/discounts/add-discount.php:79 -msgid "" -"The minimum amount that must be purchased before this discount can be used. " -"Leave blank for no minimum." -msgstr "" -"Ilość minimalna, która musi zostać zamówiona zanim kod będzie mógł być " -"użyty. Zostaw puste jeśli nie chcesz określać ilości minimalnej." - -#: includes/admin/discounts/edit-discount.php:102 -msgid "Active" -msgstr "Aktywny" - -#: includes/admin/discounts/edit-discount.php:103 -msgid "Inactive" -msgstr "Nieaktywny" - -#: includes/admin/discounts/edit-discount.php:105 -msgid "The status of this discount code." -msgstr "Status kodu promocyjnego" - -#: includes/admin/discounts/edit-discount.php:115 -msgid "Update Discount Code" -msgstr "Aktualizuj kod promocyjny" - -#: includes/admin/discounts/discount-codes.php:42 -#: includes/admin/discounts/discount-codes.php:55 -msgid "Uses" -msgstr "Ilość użyć" - -#: includes/admin/discounts/discount-codes.php:44 -#: includes/admin/discounts/discount-codes.php:57 -msgid "Start Date" -msgstr "Data początkowa" - -#: includes/admin/discounts/discount-codes.php:45 -#: includes/admin/discounts/discount-codes.php:58 -msgid "Expiration" -msgstr "Wygasa" - -#: includes/admin/discounts/discount-codes.php:82 -#: includes/admin/discounts/discount-codes.php:84 -msgid "unlimited" -msgstr "bez limitu" - -#: includes/admin/discounts/discount-codes.php:93 -msgid "No start date" -msgstr "Brak daty początkowej" - -#: includes/admin/discounts/discount-codes.php:100 -msgid "Expired" -msgstr "Wygasa" - -#: includes/admin/discounts/discount-codes.php:102 -msgid "no expiration" -msgstr "nie wygasa nigdy" - -#: includes/admin/discounts/discount-codes.php:108 -#: includes/admin/payments/payments-history.php:183 -msgid "Edit" -msgstr "Edytuj" - -#: includes/admin/discounts/discount-codes.php:110 -msgid "Deactivate" -msgstr "Wyłącz" - -#: includes/admin/discounts/discount-codes.php:112 -msgid "Activate" -msgstr "Włącz" - -#: includes/admin/discounts/discount-codes.php:114 -#: includes/admin/payments/payments-history.php:185 -msgid "Delete" -msgstr "Usuń" - -#: includes/admin/discounts/discount-codes.php:119 -msgid "No discount codes have been created." -msgstr "Nie utworzyłeś kodu promocyjnego." - -#: includes/admin/discounts/add-discount.php:12 -msgid "Add New Discount" -msgstr "Dodaj nowy upust" - -#: includes/admin/discounts/add-discount.php:96 -msgid "Add Discount Code" -msgstr "Dodaj kod promocyjny" - -#: includes/admin/payments/payments-history.php:90 -msgid "All" -msgstr "Wszystkie" - -#: includes/admin/payments/payments-history.php:95 -msgid "Completed" -msgstr "Zakończone" - -#: includes/admin/payments/payments-history.php:106 -msgid "Export" -msgstr "Eksportuj" - -#: includes/admin/payments/payments-history.php:110 -msgid "Payment mode" -msgstr "Sposób płatności" - -#: includes/admin/payments/payments-history.php:112 -msgid "Live" -msgstr "tryb rzeczywisty" - -#: includes/admin/payments/payments-history.php:113 -msgid "Test" -msgstr "tryb testowy" - -#: includes/admin/payments/payments-history.php:123 -msgid "Payments per page" -msgstr "Płatności na stronie" - -#: includes/admin/payments/payments-history.php:125 -msgid "Show" -msgstr "Pokaż" - -#: includes/admin/payments/payments-history.php:131 -msgid "Showing payments for: " -msgstr "Pokaż płatności dla:" - -#: includes/admin/payments/payments-history.php:131 -msgid "clear" -msgstr "wyczyść" - -#: includes/admin/payments/payments-history.php:184 -msgid "Resend Purchase Receipt" -msgstr "Wyślij ponownie rachunek" - -#: includes/admin/payments/payments-history.php:197 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "Szczegóły zamówienia dla płatności #%s" - -#: includes/admin/payments/payments-history.php:197 -msgid "View Order Details" -msgstr "Pokaż szczegóły zamówienia" - -#: includes/admin/payments/payments-history.php:205 -msgid "Purchased File" -msgstr "Zakupiony plik" - -#: includes/admin/payments/payments-history.php:205 -msgid "Purchased Files" -msgstr "Zakupione pliki" - -#: includes/admin/payments/payments-history.php:249 -msgid "Date and Time:" -msgstr "Data i godzina" - -#: includes/admin/payments/payments-history.php:250 -msgid "Discount used:" -msgstr "Kod promocji:" - -#: includes/admin/payments/payments-history.php:251 -msgid "Total:" -msgstr "Łącznie:" - -#: includes/admin/payments/payments-history.php:254 -msgid "Buyer's Personal Details:" -msgstr "Informacje o kupującym:" - -#: includes/admin/payments/payments-history.php:256 -msgid "Name:" -msgstr "Imię:" - -#: includes/admin/payments/payments-history.php:257 -msgid "Email:" -msgstr "E-mail:" - -#: includes/admin/payments/payments-history.php:266 -msgid "Payment Method:" -msgstr "Forma płatności:" - -#: includes/admin/payments/payments-history.php:271 -msgid "Purchase Key" -msgstr "Klucz zamówienia" - -#: includes/admin/payments/payments-history.php:274 -#: includes/admin/payments/edit-payment.php:92 -msgid "Close" -msgstr "Zamknij" - -#: includes/admin/payments/payments-history.php:304 -msgid "Total Earnings:" -msgstr "Łączne zyski:" - -#: includes/admin/payments/edit-payment.php:22 -msgid "Buyer's Email" -msgstr "E-mail kupującego" - -#: includes/admin/payments/edit-payment.php:26 -msgid "If needed, you can update the buyer's email here." -msgstr "Jeżeli potrzebujesz, możesz zaktualizować adres e-mail kupującego" - -#: includes/admin/payments/edit-payment.php:31 -msgid "Downloads Purchased" -msgstr "Zamówione pliki" - -#: includes/admin/payments/edit-payment.php:43 -#, php-format -msgid "Add download to purchase #%s" -msgstr "Dodaj plik do zamówienia #%s" - -#: includes/admin/payments/edit-payment.php:43 -msgid "Add download to purchase" -msgstr "Dodaj plik do zamówienia" - -#: includes/admin/payments/edit-payment.php:48 -msgid "Payment Status" -msgstr "Status płatności" - -#: includes/admin/payments/edit-payment.php:64 -msgid "Send Purchase Receipt" -msgstr "Wyślij rachunek" - -#: includes/admin/payments/edit-payment.php:68 -msgid "" -"Check this box to send the purchase receipt, including all download links." -msgstr "Zaznacz, aby wysłać rachunek wraz ze wszystkimi linkami do pobrania" - -#: includes/admin/payments/edit-payment.php:78 -msgid "Update Payment" -msgstr "Odświerz informację o płatności" - -#: includes/admin/payments/edit-payment.php:91 -msgid "Add Selected Downloads" -msgstr "Dodaj zaznaczone pliki" - -#: includes/admin/reporting/reports.php:41 -msgid "Download Sales and Earnings PDF Report for all Products" -msgstr "Pobierz raport zysków i sprzedaży w PDF" - -#: includes/admin/reporting/reports.php:42 -msgid "Download a CSV Customers List" -msgstr "Pobierz listę klientów jako plik CSV" - -#: includes/admin/reporting/reports.php:44 -msgid "" -"Please Note: Transactions created while in test mode are not included on " -"this page or in the PDF reports." -msgstr "" -"Uwaga: transakcje utworzone w czasie testowania nie są zawarte na tej " -"stronie i w raporcie PDF." - -#: includes/admin/reporting/pdf-reports.php:36 -msgid "to" -msgstr "do" - -#: includes/admin/reporting/pdf-reports.php:41 -#: includes/admin/reporting/pdf-reports.php:52 -msgid "Sales and earnings reports for the current year for all products" -msgstr "Raporty sprzedaży i zysków za bieżący rok dla wszystkich produktów" - -#: includes/admin/reporting/pdf-reports.php:42 -#: includes/admin/reporting/pdf-reports.php:43 -msgid "Easy Digital Downloads" -msgstr "Easy Digital Downloads" - -#: includes/admin/reporting/pdf-reports.php:57 -msgid "Date Range: " -msgstr "Zakres dat:" - -#: includes/admin/reporting/pdf-reports.php:61 -msgid "Table View" -msgstr "Zobacz tabelę" - -#: includes/admin/reporting/pdf-reports.php:65 -msgid "Product Name" -msgstr "Nazwa produktu" - -#: includes/admin/reporting/pdf-reports.php:69 -msgid "Number of Sales" -msgstr "Liczba sprzedanych" - -#: includes/admin/reporting/pdf-reports.php:70 -msgid "Earnings to Date" -msgstr "Zysk na bieżąco" - -#: includes/admin/reporting/pdf-reports.php:112 -msgid "No Downloads found." -msgstr "Nie znaleziono plików" - -#: includes/admin/reporting/pdf-reports.php:119 -msgid "Graph View" -msgstr "Zobacz wykres" - -#: includes/admin/reporting/pdf-reports.php:212 -msgid "Sales and Earnings by Month for all Products" -msgstr "Sprzedaż i zarobki w miesiącu dla wszystkich produków" - -#: includes/admin/reporting/pdf-reports.php:226 -msgid "Jan" -msgstr "Styczeń" - -#: includes/admin/reporting/pdf-reports.php:227 -msgid "Feb" -msgstr "Luty" - -#: includes/admin/reporting/pdf-reports.php:228 -msgid "Mar" -msgstr "Marzec" - -#: includes/admin/reporting/pdf-reports.php:229 -msgid "Apr" -msgstr "Kwiecień" - -#: includes/admin/reporting/pdf-reports.php:230 -msgid "May" -msgstr "Maj" - -#: includes/admin/reporting/pdf-reports.php:231 -msgid "June" -msgstr "Czerwiec" - -#: includes/admin/reporting/pdf-reports.php:232 -msgid "July" -msgstr "Lipiec" - -#: includes/admin/reporting/pdf-reports.php:233 -msgid "Aug" -msgstr "Sierpień" - -#: includes/admin/reporting/pdf-reports.php:234 -msgid "Sept" -msgstr "Wrzesień" - -#: includes/admin/reporting/pdf-reports.php:235 -msgid "Oct" -msgstr "Pażdziernik" - -#: includes/admin/reporting/pdf-reports.php:236 -msgid "Nov" -msgstr "Listopad" - -#: includes/admin/reporting/pdf-reports.php:237 -msgid "Dec" -msgstr "Grudzień" - -#: includes/admin/reporting/graphing.php:42 -#, php-format -msgid "%s Performance in Sales" -msgstr "%s wyników sprzedaży" - -#: includes/admin/reporting/graphing.php:88 -#, php-format -msgid "%s Performance in Earnings" -msgstr "%s wyników zysków" - -#: includes/admin/reporting/graphing.php:136 -msgid "Earnings per month" -msgstr "Zyski miesięczne" - -#: includes/admin/reporting/graphing.php:168 -msgid "Day" -msgstr "Dzień" - -#: includes/admin/reporting/graphing.php:189 -#, php-format -msgid "Earnings per day for last %s days" -msgstr "Zyski / dzień w ciągu ostatnich %s dni" - -#: includes/admin/reporting/graphing.php:236 -msgid "Sales per month" -msgstr "Sprzedaż miesięczna" - -#: includes/admin/settings/settings.php:33 -msgid "General" -msgstr "Ustawienia ogólne" - -#: includes/admin/settings/settings.php:35 -msgid "Emails" -msgstr "E-maile" - -#: includes/admin/settings/settings.php:36 -msgid "Styles" -msgstr "Style" - -#: includes/admin/settings/settings.php:37 -msgid "Misc" -msgstr "Różne" diff --git a/languages/edd-pt_PT.mo b/languages/edd-pt_PT.mo deleted file mode 100755 index fc15e909a35..00000000000 Binary files a/languages/edd-pt_PT.mo and /dev/null differ diff --git a/languages/edd-pt_PT.po b/languages/edd-pt_PT.po deleted file mode 100755 index 0f87cd10a02..00000000000 --- a/languages/edd-pt_PT.po +++ /dev/null @@ -1,1354 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-04-07 16:33-0600\n" -"PO-Revision-Date: 2012-04-17 22:12-0000\n" -"Last-Translator: \n" -"Language-Team: MisterWho \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_n;_x\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: Portuguese\n" -"X-Poedit-Country: PORTUGAL\n" -"X-Poedit-SearchPath-0: ..\n" -"X-Poedit-SearchPath-1: ../includes\n" -"X-Poedit-SearchPath-2: ../includes/admin-pages\n" -"X-Poedit-SearchPath-3: ../includes/admin-pages/forms\n" -"X-Poedit-SearchPath-4: ../includes/gateways\n" -"X-Poedit-SearchPath-5: .\n" - -#: ../includes/admin-notices.php:5 -msgid "Discount code updated." -msgstr "Código promocional actualizado." - -#: ../includes/admin-notices.php:8 -msgid "There was a problem updating your discount code, please try again." -msgstr "Ocorreu um erro ao actualizar o seu código promocional, por favor tente de novo." - -#: ../includes/admin-pages.php:6 -msgid "Payment History" -msgstr "Histórico de Pagamentos" - -#: ../includes/admin-pages.php:7 -msgid "Discount Codes" -msgstr "Códigos Promocionais" - -#: ../includes/admin-pages.php:8 -msgid "Earnings and Sales Reports" -msgstr "Relatórios de Vendas e Lucros" - -#: ../includes/admin-pages.php:8 -msgid "Reports" -msgstr "Relatórios" - -#: ../includes/admin-pages.php:9 -msgid "Easy Digital Download Settings" -msgstr "Configurações do Easy Digital Download" - -#: ../includes/admin-pages.php:9 -msgid "Settings" -msgstr "Configurações" - -#: ../includes/ajax-functions.php:52 -msgid "The discount you entered is invalid" -msgstr "O código promocional que indicou é inválido" - -#: ../includes/cart-functions.php:149 -#: ../includes/cart-template.php:61 -msgid "Your cart is empty" -msgstr "O seu carrinho está vazio" - -#: ../includes/cart-template.php:10 -msgid "Item Name" -msgstr "Nome do Artigo" - -#: ../includes/cart-template.php:11 -msgid "Item Price" -msgstr "Preço do Artigo" - -#: ../includes/cart-template.php:12 -msgid "Actions" -msgstr "Ações" - -#: ../includes/cart-template.php:24 -#: ../includes/cart-template.php:78 -msgid "remove" -msgstr "remover" - -#: ../includes/cart-template.php:30 -msgid "Your shopping cart is empty" -msgstr "O seu carrinho de compras está vazio" - -#: ../includes/cart-template.php:37 -msgid "Total" -msgstr "Total" - -#: ../includes/cart-template.php:59 -#: ../includes/cart-template.php:62 -msgid "Checkout" -msgstr "Pagar" - -#: ../includes/checkout-template.php:44 -msgid "Choose Your Payment Method" -msgstr "Escolha o Seu Método de Pagamento" - -#: ../includes/checkout-template.php:56 -msgid "Next" -msgstr "Seguinte" - -#: ../includes/checkout-template.php:77 -msgid "Email Address" -msgstr "Endereço de Email" - -#: ../includes/checkout-template.php:81 -msgid "First Name" -msgstr "Primeiro Nome" - -#: ../includes/checkout-template.php:85 -msgid "Last Name" -msgstr "Último Nome" - -#: ../includes/checkout-template.php:94 -msgid "Discount" -msgstr "Desconto" - -#: ../includes/checkout-template.php:96 -msgid "Apply Discount" -msgstr "Aplicar Desconto" - -#: ../includes/checkout-template.php:118 -#: ../includes/dashboard-columns.php:41 -msgid "Purchase" -msgstr "Comprar" - -#: ../includes/checkout-template.php:122 -msgid "Go back" -msgstr "Regressar" - -#: ../includes/checkout-template.php:144 -msgid "Name on the Card" -msgstr "Nome no Cartão" - -#: ../includes/checkout-template.php:148 -msgid "Card Number" -msgstr "Número do Cartão" - -#: ../includes/checkout-template.php:152 -msgid "CVC" -msgstr "CVC" - -#: ../includes/checkout-template.php:159 -msgid "Expiration (MM/YYYY)" -msgstr "Válido até (MM/YYYY)" - -#: ../includes/checkout-template.php:179 -msgid "Billing Address" -msgstr "Morada de Faturação" - -#: ../includes/checkout-template.php:183 -msgid "Billing Address Line 2" -msgstr "Morada de Faturação Linha 2" - -#: ../includes/checkout-template.php:187 -msgid "Billing City" -msgstr "Cidade de Faturação" - -#: ../includes/checkout-template.php:191 -msgid "Billing State / Province" -msgstr "Estado/Província de Faturação" - -#: ../includes/checkout-template.php:195 -msgid "Billing Zip / Postal Code" -msgstr "Código Postal de Faturação" - -#: ../includes/checkout-template.php:206 -msgid "Create an account" -msgstr "Criar uma conta" - -#: ../includes/checkout-template.php:208 -#: ../includes/checkout-template.php:209 -#: ../includes/checkout-template.php:237 -msgid "Username" -msgstr "Nome de utilizador" - -#: ../includes/checkout-template.php:212 -msgid "email@domain.com" -msgstr "email@domínio.com" - -#: ../includes/checkout-template.php:213 -msgid "Email" -msgstr "Email" - -#: ../includes/checkout-template.php:217 -#: ../includes/checkout-template.php:241 -msgid "Password" -msgstr "Senha" - -#: ../includes/checkout-template.php:221 -msgid "Password Again" -msgstr "Repetir senha" - -#: ../includes/checkout-template.php:223 -msgid "Already have an account?" -msgstr "Já tem uma conta?" - -#: ../includes/checkout-template.php:223 -msgid "Login" -msgstr "Entrar" - -#: ../includes/checkout-template.php:234 -msgid "Login to your account" -msgstr "Entre na sua conta" - -#: ../includes/checkout-template.php:236 -msgid "Your username" -msgstr "O seu nome de utilizador" - -#: ../includes/checkout-template.php:240 -msgid "Your password" -msgstr "A sua senha" - -#: ../includes/checkout-template.php:244 -msgid "Need to create an account?" -msgstr "Necessita de criar uma conta?" - -#: ../includes/checkout-template.php:244 -msgid "Register" -msgstr "Registar" - -#: ../includes/dashboard-columns.php:7 -msgid "Name" -msgstr "Nome" - -#: ../includes/dashboard-columns.php:8 -msgid "Categories" -msgstr "Categorias" - -#: ../includes/dashboard-columns.php:9 -msgid "Tags" -msgstr "Etiquetas" - -#: ../includes/dashboard-columns.php:10 -#: ../includes/graphing.php:14 -msgid "Sales" -msgstr "Vendas" - -#: ../includes/dashboard-columns.php:11 -#: ../includes/graphing.php:52 -#: ../includes/graphing.php:87 -msgid "Earnings" -msgstr "Lucros" - -#: ../includes/dashboard-columns.php:12 -msgid "Short Code" -msgstr "Short Code" - -#: ../includes/dashboard-columns.php:13 -msgid "Date" -msgstr "Data" - -#: ../includes/dashboard-columns.php:106 -msgid "Show all categories" -msgstr "Exibir todas as categorias" - -#: ../includes/dashboard-columns.php:117 -msgid "Show all tags" -msgstr "Exibir todas as etiquetas" - -#: ../includes/email-functions.php:23 -msgid "Hello" -msgstr "Olá" - -#: ../includes/email-functions.php:23 -msgid "A download purchase has been made" -msgstr "Um compra foi efectuada" - -#: ../includes/email-functions.php:24 -msgid "Downloads sold:" -msgstr "Downloads vendidos:" - -#: ../includes/email-functions.php:32 -msgid "Amount: " -msgstr "Quantia:" - -#: ../includes/email-functions.php:33 -msgid "Thank you" -msgstr "Obrigado" - -#: ../includes/email-functions.php:35 -msgid "New download purchase" -msgstr "Nova compra de download" - -#: ../includes/error-tracking.php:13 -msgid "Error" -msgstr "Erro" - -#: ../includes/gateway-functions.php:9 -msgid "Manual Payment" -msgstr "Pagamento Manual" - -#: ../includes/graphing.php:13 -#: ../includes/graphing.php:51 -msgid "Download" -msgstr "Download" - -#: ../includes/graphing.php:24 -msgid "Downloads Performance in Sales" -msgstr "" - -#: ../includes/graphing.php:62 -msgid "Downloads Performance in Earnings" -msgstr "" - -#: ../includes/graphing.php:86 -msgid "Month" -msgstr "Mês" - -#: ../includes/graphing.php:101 -msgid "Earnings per month" -msgstr "Lucros por mês" - -#: ../includes/metabox.php:11 -msgid "Price" -msgstr "Preço" - -#: ../includes/metabox.php:12 -msgid "Enter the download price" -msgstr "Introduza o preço do download" - -#: ../includes/metabox.php:19 -msgid "Download Files" -msgstr "Download de ficheiros" - -#: ../includes/metabox.php:20 -msgid "Upload the downloadable files." -msgstr "Enviar ficheiros de download" - -#: ../includes/metabox.php:27 -msgid "Show Purchase Link on Details Page" -msgstr "Exibir Ligação de Compra na Página de Detalhes" - -#: ../includes/metabox.php:28 -msgid "Check this to automatically append the purchase link to download detail pages. If unchecked, you must enter the short code manually." -msgstr "" - -#: ../includes/metabox.php:35 -msgid "Show Purchase Link on Archive Pages" -msgstr "Exibir Ligação de Compra nas Páginas Arquivadas" - -#: ../includes/metabox.php:36 -msgid "Check this to automatically append the purchase link to download excerpts." -msgstr "" - -#: ../includes/metabox.php:43 -msgid "Purchase Text" -msgstr "Texto da Compra" - -#: ../includes/metabox.php:44 -msgid "Add the text you would like displayed for the purchase text" -msgstr "" - -#: ../includes/metabox.php:51 -msgid "Link Style" -msgstr "Estilo da Ligação" - -#: ../includes/metabox.php:52 -#: ../includes/metabox.php:60 -msgid "Choose the style of the purchase link" -msgstr "Escolha o estilo da ligação de compra" - -#: ../includes/metabox.php:59 -msgid "Button Color" -msgstr "Côr do Botão" - -#: ../includes/metabox.php:74 -msgid "Download Stats" -msgstr "Estatísticas dos Downloads" - -#: ../includes/metabox.php:138 -#: ../includes/metabox.php:149 -msgid "file name" -msgstr "nome do ficheiro" - -#: ../includes/metabox.php:139 -#: ../includes/metabox.php:150 -msgid "file url" -msgstr "url do ficheiro" - -#: ../includes/metabox.php:154 -#: ../includes/post-types.php:8 -#: ../includes/post-types.php:41 -msgid "Add New" -msgstr "Adicionar Novo" - -#: ../includes/metabox.php:164 -msgid "Short Code for this Download" -msgstr "Código para este Download" - -#: ../includes/metabox.php:222 -msgid "Sales:" -msgstr "Vendas:" - -#: ../includes/metabox.php:228 -msgid "Earnings:" -msgstr "Lucros:" - -#: ../includes/misc-functions.php:24 -msgid "US Dollars ($)" -msgstr "Dolares Americanos ($)" - -#: ../includes/misc-functions.php:25 -msgid "Euros (€)" -msgstr "Euros (€)" - -#: ../includes/misc-functions.php:26 -msgid "Pounds Sterling (£)" -msgstr "Libras Estrelinas (£)" - -#: ../includes/misc-functions.php:27 -msgid "Australian Dollars ($)" -msgstr "Dolares Australianos ($)" - -#: ../includes/misc-functions.php:28 -msgid "Brazilian Real ($)" -msgstr "Real Brasileiro ($)" - -#: ../includes/misc-functions.php:29 -msgid "Canadian Dollars ($)" -msgstr "Dolars Canadianos ($)" - -#: ../includes/misc-functions.php:30 -msgid "Czech Koruna" -msgstr "Coroa da República Checa" - -#: ../includes/misc-functions.php:31 -msgid "Danish Krone" -msgstr "Coroa Dinamarquesa" - -#: ../includes/misc-functions.php:32 -msgid "Hong Kong Dollar ($)" -msgstr "Dólar de Hong Kong ($)" - -#: ../includes/misc-functions.php:33 -msgid "Hungarian Forint" -msgstr "Florim Húngaro" - -#: ../includes/misc-functions.php:34 -msgid "Israeli Shekel" -msgstr "Sheqel Israelense" - -#: ../includes/misc-functions.php:35 -msgid "Japanese Yen (¥)" -msgstr "Yen Japonês (¥)" - -#: ../includes/misc-functions.php:36 -msgid "Malaysian Ringgits" -msgstr "Ringgit Malásio" - -#: ../includes/misc-functions.php:37 -msgid "Mexican Peso ($)" -msgstr "Peso Mexicano ($)" - -#: ../includes/misc-functions.php:38 -msgid "New Zealand Dollar ($)" -msgstr "Dólar da Nova Zelândia ($)" - -#: ../includes/misc-functions.php:39 -msgid "Norwegian Krone" -msgstr "Coroa Norueguesa" - -#: ../includes/misc-functions.php:40 -msgid "Philippine Pesos" -msgstr "Pesos Filipinos" - -#: ../includes/misc-functions.php:41 -msgid "Polish Zloty" -msgstr "Zloty Polaco" - -#: ../includes/misc-functions.php:42 -msgid "Singapore Dollar ($)" -msgstr "Dólar de Singapura ($)" - -#: ../includes/misc-functions.php:43 -msgid "Swedish Krona" -msgstr "Coroa Sueca" - -#: ../includes/misc-functions.php:44 -msgid "Swiss Franc" -msgstr "Franco Suíço" - -#: ../includes/misc-functions.php:45 -msgid "Taiwan New Dollars" -msgstr "Novo Dólar Tailandês" - -#: ../includes/misc-functions.php:46 -msgid "Thai Baht" -msgstr "Baht Tailandês" - -#: ../includes/payment-functions.php:126 -msgid "pending" -msgstr "pendente" - -#: ../includes/payment-functions.php:129 -msgid "complete" -msgstr "completo" - -#: ../includes/post-types.php:6 -#: ../includes/post-types.php:18 -msgid "Downloads" -msgstr "Downloads" - -#: ../includes/post-types.php:9 -msgid "Add New Download" -msgstr "Adicionar Novo Download" - -#: ../includes/post-types.php:10 -msgid "Edit Download" -msgstr "Editar Download" - -#: ../includes/post-types.php:11 -msgid "New Download" -msgstr "Novo Download" - -#: ../includes/post-types.php:12 -msgid "All Downloads" -msgstr "Todos os Downloads" - -#: ../includes/post-types.php:13 -msgid "View Download" -msgstr "Visualizar Download" - -#: ../includes/post-types.php:14 -msgid "Search Downloads" -msgstr "Pesquisar Downloads" - -#: ../includes/post-types.php:15 -msgid "No Downloads found" -msgstr "Não foram encontrados Downloads" - -#: ../includes/post-types.php:16 -msgid "No Downloads found in Trash" -msgstr "Não foram encontrados Downloads no Lixo" - -#: ../includes/post-types.php:39 -msgid "Payments" -msgstr "Pagamentos" - -#: ../includes/post-types.php:40 -msgid "Payment" -msgstr "Pagamento" - -#: ../includes/post-types.php:42 -msgid "Add New Payment" -msgstr "Adicionar Novo Pagamento" - -#: ../includes/post-types.php:43 -msgid "Edit Payment" -msgstr "Editar Pagamento" - -#: ../includes/post-types.php:44 -msgid "New Payment" -msgstr "Novo Pagamento" - -#: ../includes/post-types.php:45 -msgid "All Payments" -msgstr "Todos os Pagamentos" - -#: ../includes/post-types.php:46 -msgid "View Payment" -msgstr "Visualizar Pagamento" - -#: ../includes/post-types.php:47 -msgid "Search Payments" -msgstr "Pesquisar Pagamentos" - -#: ../includes/post-types.php:48 -msgid "No Payments found" -msgstr "Não foram encontrados Pagamentos" - -#: ../includes/post-types.php:49 -msgid "No Payments found in Trash" -msgstr "Não foram encontrados Pagamentos no Lixo" - -#: ../includes/post-types.php:77 -msgid "Category" -msgstr "Categoria" - -#: ../includes/post-types.php:78 -msgid "Search Categories" -msgstr "Pesquisar Categorias" - -#: ../includes/post-types.php:79 -msgid "All Categories" -msgstr "Todas as Categorias" - -#: ../includes/post-types.php:80 -msgid "Parent Category" -msgstr "Categoria Pai" - -#: ../includes/post-types.php:81 -msgid "Parent Category:" -msgstr "Categoria Pai:" - -#: ../includes/post-types.php:82 -msgid "Edit Category" -msgstr "Editar Categoria" - -#: ../includes/post-types.php:83 -msgid "Update Category" -msgstr "Actualizar Categoria" - -#: ../includes/post-types.php:84 -msgid "Add New Category" -msgstr "Adicionar Nova Categoria" - -#: ../includes/post-types.php:85 -msgid "New Category Name" -msgstr "Nome da Nova Categoria" - -#: ../includes/post-types.php:99 -msgid "Tag" -msgstr "Etiqueta" - -#: ../includes/post-types.php:100 -msgid "Search Tags" -msgstr "Pesquisar Etiquetas" - -#: ../includes/post-types.php:101 -msgid "All Tags" -msgstr "Todas as Etiquetas" - -#: ../includes/post-types.php:102 -msgid "Parent Tag" -msgstr "Etiqueta Mãe" - -#: ../includes/post-types.php:103 -msgid "Parent Tag:" -msgstr "Etiqueta Mãe:" - -#: ../includes/post-types.php:104 -msgid "Edit Tag" -msgstr "Editar Etiqueta" - -#: ../includes/post-types.php:105 -msgid "Update Tag" -msgstr "Actualizar Etiqueta" - -#: ../includes/post-types.php:106 -msgid "Add New Tag" -msgstr "Adicionar Nova Etiqueta" - -#: ../includes/post-types.php:107 -msgid "New Tag Name" -msgstr "Novo Nome de Etiqueta" - -#: ../includes/post-types.php:125 -#: ../includes/post-types.php:126 -msgid "Download updated." -msgstr "Download actualizado." - -#: ../includes/post-types.php:127 -msgid "Download published." -msgstr "Download publicado." - -#: ../includes/post-types.php:128 -msgid "Download saved." -msgstr "Download gravado." - -#: ../includes/post-types.php:129 -msgid "Download submitted." -msgstr "" - -#: ../includes/process-download.php:56 -msgid "You do not have permission to download this file" -msgstr "" - -#: ../includes/process-download.php:56 -msgid "Purchase Verification Failed" -msgstr "" - -#: ../includes/process-purchase.php:28 -msgid "Username already taken" -msgstr "" - -#: ../includes/process-purchase.php:32 -msgid "Invalid username" -msgstr "Nome de Utilizador Inválido" - -#: ../includes/process-purchase.php:36 -msgid "Enter a username" -msgstr "" - -#: ../includes/process-purchase.php:40 -msgid "Invalid email" -msgstr "" - -#: ../includes/process-purchase.php:44 -msgid "Email already used" -msgstr "" - -#: ../includes/process-purchase.php:48 -msgid "Enter a password" -msgstr "" - -#: ../includes/process-purchase.php:52 -msgid "Passwords don't match" -msgstr "" - -#: ../includes/process-purchase.php:67 -msgid "The password you entered is incorrect" -msgstr "" - -#: ../includes/process-purchase.php:70 -msgid "The username you entered does not exist" -msgstr "" - -#: ../includes/process-purchase.php:74 -msgid "Something has gone wrong, please try again" -msgstr "" - -#: ../includes/register-settings.php:23 -msgid "Use this plugin in test mode" -msgstr "" - -#: ../includes/register-settings.php:24 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "" - -#: ../includes/register-settings.php:29 -msgid "Purchase Page" -msgstr "" - -#: ../includes/register-settings.php:30 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "" - -#: ../includes/register-settings.php:36 -msgid "Success Page" -msgstr "" - -#: ../includes/register-settings.php:37 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "" - -#: ../includes/register-settings.php:43 -msgid "Currency Settings" -msgstr "" - -#: ../includes/register-settings.php:44 -msgid "Configure the currency options" -msgstr "" - -#: ../includes/register-settings.php:49 -msgid "Currency" -msgstr "" - -#: ../includes/register-settings.php:50 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "" - -#: ../includes/register-settings.php:56 -msgid "Currency Position" -msgstr "" - -#: ../includes/register-settings.php:57 -msgid "Choose the location of the currency sign." -msgstr "" - -#: ../includes/register-settings.php:60 -msgid "Before - $10" -msgstr "" - -#: ../includes/register-settings.php:61 -msgid "After - 10$" -msgstr "" - -#: ../includes/register-settings.php:66 -msgid "Thousands Separator" -msgstr "" - -#: ../includes/register-settings.php:67 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "" - -#: ../includes/register-settings.php:74 -msgid "Decimal Separator" -msgstr "" - -#: ../includes/register-settings.php:75 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "" - -#: ../includes/register-settings.php:86 -msgid "Payment Gateways" -msgstr "" - -#: ../includes/register-settings.php:87 -msgid "Choose the payment gateways you want to enable." -msgstr "" - -#: ../includes/register-settings.php:93 -msgid "PayPal Settings" -msgstr "Opções do Paypal" - -#: ../includes/register-settings.php:94 -msgid "Configure the PayPal settings" -msgstr "Configurar as opções do Paypal" - -#: ../includes/register-settings.php:99 -msgid "PayPal Email" -msgstr "Email da conta Paypal" - -#: ../includes/register-settings.php:100 -msgid "Enter your PayPal account's email" -msgstr "" - -#: ../includes/register-settings.php:106 -msgid "Disable cURL for PayPal IPN" -msgstr "" - -#: ../includes/register-settings.php:107 -msgid "If payments are not getting marked as complete, check this option" -msgstr "" - -#: ../includes/register-settings.php:112 -msgid "Alternate PayPal Purchase Verification" -msgstr "" - -#: ../includes/register-settings.php:113 -msgid "If payments are not getting marked as complete, and disabling cURL does not fix the problem, then check this box" -msgstr "" - -#: ../includes/register-settings.php:122 -msgid "Purchase Email Subject" -msgstr "" - -#: ../includes/register-settings.php:123 -msgid "Enter the subject line for the purchase receipt email" -msgstr "" - -#: ../includes/register-settings.php:128 -msgid "Purchase Receipt" -msgstr "" - -#: ../includes/register-settings.php:129 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "" - -#: ../includes/register-settings.php:130 -msgid "A list of download URLs for each download purchased" -msgstr "" - -#: ../includes/register-settings.php:131 -msgid "The buyer's name" -msgstr "" - -#: ../includes/register-settings.php:132 -msgid "The date of the purchase" -msgstr "" - -#: ../includes/register-settings.php:133 -msgid "Your site name" -msgstr "" - -#: ../includes/register-settings.php:142 -msgid "Enable Ajax" -msgstr "Activar Ajax" - -#: ../includes/register-settings.php:143 -msgid "Check this to enable AJAX for the shopping cart." -msgstr "" - -#: ../includes/register-settings.php:148 -msgid "Logged-In Only" -msgstr "Apenas Utilizadores Ligados" - -#: ../includes/register-settings.php:149 -msgid "Require that users be logged-in to purchase files." -msgstr "" - -#: ../includes/register-settings.php:154 -msgid "Show Register Form?" -msgstr "" - -#: ../includes/register-settings.php:155 -msgid "Display the registration form for non-logged-in users" -msgstr "" - -#: ../includes/register-settings.php:178 -msgid "General Settings" -msgstr "Configurações Gerais" - -#: ../includes/register-settings.php:204 -msgid "Payment Gateway Settings" -msgstr "" - -#: ../includes/register-settings.php:230 -msgid "Email Settings" -msgstr "Configurações de Email" - -#: ../includes/register-settings.php:256 -msgid "Misc Settings" -msgstr "Configurações Diversas" - -#: ../includes/register-settings.php:290 -#: ../includes/register-settings.php:294 -#: ../includes/register-settings.php:298 -#: ../includes/register-settings.php:302 -msgid "Configure the settings below" -msgstr "" - -#: ../includes/scripts.php:16 -msgid "Please enter a discount code" -msgstr "" - -#: ../includes/scripts.php:17 -msgid "Discount Applied" -msgstr "" - -#: ../includes/scripts.php:18 -msgid "Loading" -msgstr "A Carregar" - -#: ../includes/shortcodes.php:54 -msgid "You have not purchased any downloads" -msgstr "" - -#: ../includes/shortcodes.php:79 -msgid "Add to Cart" -msgstr "" - -#: ../includes/shortcodes.php:106 -msgid "No downloads found" -msgstr "" - -#: ../includes/template-functions.php:43 -msgid "added to your cart" -msgstr "" - -#: ../includes/template-functions.php:47 -msgid "here" -msgstr "aqui" - -#: ../includes/template-functions.php:48 -msgid "You have already purchased this item." -msgstr "" - -#: ../includes/template-functions.php:48 -#, php-format -msgid "Click %s to purchase again." -msgstr "" - -#: ../includes/thickbox.php:9 -#: ../includes/thickbox.php:10 -#: ../includes/thickbox.php:96 -msgid "Insert Download" -msgstr "Inserir Download" - -#: ../includes/thickbox.php:39 -msgid "You must choose a download" -msgstr "" - -#: ../includes/thickbox.php:62 -msgid "Use the form below to insert the short code for purchasing a download." -msgstr "" - -#: ../includes/thickbox.php:65 -msgid "Choose a download" -msgstr "" - -#: ../includes/thickbox.php:74 -msgid "Choose a style" -msgstr "" - -#: ../includes/thickbox.php:84 -msgid "Choose a button color" -msgstr "" - -#: ../includes/thickbox.php:93 -msgid "Link text . . ." -msgstr "" - -#: ../includes/thickbox.php:97 -msgid "Cancel" -msgstr "Cancelar" - -#: ../includes/thickbox.php:99 -msgid "Button Styles" -msgstr "" - -#: ../includes/widgets.php:20 -msgid "Downloads Cart" -msgstr "" - -#: ../includes/widgets.php:20 -msgid "Display the downloads shopping cart" -msgstr "" - -#: ../includes/widgets.php:60 -msgid "Title:" -msgstr "Título:" - -#: ../includes/widgets.php:64 -msgid "Show Quantity:" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:20 -#: ../includes/admin-pages/discount-codes.php:33 -msgid "Code" -msgstr "Código" - -#: ../includes/admin-pages/discount-codes.php:21 -#: ../includes/admin-pages/discount-codes.php:34 -msgid "Type" -msgstr "Tipo" - -#: ../includes/admin-pages/discount-codes.php:22 -#: ../includes/admin-pages/discount-codes.php:35 -msgid "Amount" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:23 -#: ../includes/admin-pages/discount-codes.php:36 -msgid "Uses" -msgstr "Utilizações" - -#: ../includes/admin-pages/discount-codes.php:24 -#: ../includes/admin-pages/discount-codes.php:37 -msgid "Max Uses" -msgstr "Limite Máximo de Utilizações" - -#: ../includes/admin-pages/discount-codes.php:25 -#: ../includes/admin-pages/discount-codes.php:38 -msgid "Expiration" -msgstr "Validade" - -#: ../includes/admin-pages/discount-codes.php:26 -#: ../includes/admin-pages/discount-codes.php:39 -msgid "Status" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:63 -#: ../includes/admin-pages/discount-codes.php:65 -msgid "unlimited" -msgstr "ilimitado" - -#: ../includes/admin-pages/discount-codes.php:71 -msgid "Expired" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:73 -msgid "no expiration" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:78 -msgid "Edit" -msgstr "Editar" - -#: ../includes/admin-pages/discount-codes.php:80 -msgid "Deactivate" -msgstr "Desactivar" - -#: ../includes/admin-pages/discount-codes.php:82 -msgid "Activate" -msgstr "Activar" - -#: ../includes/admin-pages/discount-codes.php:84 -msgid "Delete" -msgstr "Eliminar" - -#: ../includes/admin-pages/discount-codes.php:89 -msgid "No discount codes have been created." -msgstr "" - -#: ../includes/admin-pages/payments-history.php:24 -msgid "Payment mode" -msgstr "Método de Pagamento" - -#: ../includes/admin-pages/payments-history.php:26 -msgid "Live" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:27 -msgid "Test" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:31 -msgid "Payments per page" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:33 -msgid "Show" -msgstr "Exibir" - -#: ../includes/admin-pages/payments-history.php:38 -#: ../includes/admin-pages/payments-history.php:51 -msgid "ID" -msgstr "ID" - -#: ../includes/admin-pages/payments-history.php:40 -#: ../includes/admin-pages/payments-history.php:53 -msgid "Key" -msgstr "Chave" - -#: ../includes/admin-pages/payments-history.php:41 -#: ../includes/admin-pages/payments-history.php:54 -msgid "Products" -msgstr "Produtos" - -#: ../includes/admin-pages/payments-history.php:44 -#: ../includes/admin-pages/payments-history.php:57 -msgid "User" -msgstr "Utilizador" - -#: ../includes/admin-pages/payments-history.php:74 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:74 -msgid "View Order Details" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:77 -msgid "Purchased File" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:77 -msgid "Purchased Files" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:82 -msgid "Price: " -msgstr "Preço:" - -#: ../includes/admin-pages/payments-history.php:87 -msgid "Discount used:" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:87 -msgid "none" -msgstr "nenhum" - -#: ../includes/admin-pages/payments-history.php:88 -msgid "Total:" -msgstr "Total:" - -#: ../includes/admin-pages/payments-history.php:91 -msgid "Buyer's Personal Details:" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:93 -msgid "Name:" -msgstr "Nome:" - -#: ../includes/admin-pages/payments-history.php:94 -msgid "Email:" -msgstr "Email:" - -#: ../includes/admin-pages/payments-history.php:97 -msgid "Close" -msgstr "Fechar" - -#: ../includes/admin-pages/payments-history.php:104 -msgid "Resend Purchase Receipt" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:110 -msgid "No payments recorded yet" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:125 -msgid "« Previous" -msgstr "« Anterior" - -#: ../includes/admin-pages/payments-history.php:126 -msgid "Next »" -msgstr "Próximo »" - -#: ../includes/admin-pages/reports.php:14 -msgid "Transactions created while in test mode are not included on this page." -msgstr "" - -#: ../includes/admin-pages/settings-old.php:11 -msgid "Easy Digital Downloads" -msgstr "" - -#: ../includes/admin-pages/settings-old.php:12 -msgid "Pages" -msgstr "Páginas" - -#: ../includes/admin-pages/settings-old.php:14 -#: ../includes/admin-pages/settings.php:16 -msgid "Misc" -msgstr "Diversos" - -#: ../includes/admin-pages/settings-old.php:25 -msgid "Purchase Form" -msgstr "Formulário de Compra" - -#: ../includes/admin-pages/settings-old.php:49 -#: ../includes/admin-pages/settings-old.php:78 -msgid "No pages found" -msgstr "Não foram encontradas páginas" - -#: ../includes/admin-pages/settings-old.php:53 -msgid "Choose the page that holds the checkout form short code." -msgstr "" - -#: ../includes/admin-pages/settings-old.php:82 -msgid "Choose the page users are directed to after a successful purchase." -msgstr "" - -#: ../includes/admin-pages/settings-old.php:95 -#: ../includes/admin-pages/settings-old.php:101 -#: ../includes/admin-pages/settings-old.php:106 -msgid "Test Mode" -msgstr "Modo de Teste" - -#: ../includes/admin-pages/settings-old.php:110 -msgid "Check this to use the plugin in test mode." -msgstr "Coloque um visto aqui para usar o plugin em modo de teste." - -#: ../includes/admin-pages/settings-old.php:124 -#: ../includes/admin-pages/settings-old.php:129 -msgid "Gateways" -msgstr "Gateways" - -#: ../includes/admin-pages/settings-old.php:140 -msgid "Check each of the payment gateways you would like to enable. Configure the selected gateways below." -msgstr "" - -#: ../includes/admin-pages/settings-old.php:163 -msgid "Enter your PayPal Email." -msgstr "Introduza o seu email Paypal." - -#: ../includes/admin-pages/settings-old.php:177 -msgid "Miscellaneous" -msgstr "Diversos" - -#: ../includes/admin-pages/settings-old.php:261 -msgid "Choose your currency." -msgstr "Escolha a sua moeda." - -#: ../includes/admin-pages/settings-old.php:261 -msgid "Note" -msgstr "Nota" - -#: ../includes/admin-pages/settings-old.php:261 -msgid "If you use Stripe, you MUST use USD." -msgstr "Se usar Stripe, TEM de escolher USD." - -#: ../includes/admin-pages/settings-old.php:288 -msgid "Messages" -msgstr "Mensagens" - -#: ../includes/admin-pages/settings-old.php:294 -#: ../includes/admin-pages/settings-old.php:299 -msgid "Payment Confirmation" -msgstr "Confirmação de Pagamento" - -#: ../includes/admin-pages/settings-old.php:303 -msgid "Enter the message displayed after a user makes a successful purchase. HTML is accepted." -msgstr "Escreva a mensagem a ser exibida quando um utilizador finaliza uma compra. Pode usar HTML." - -#: ../includes/admin-pages/settings-old.php:313 -msgid "Save Options" -msgstr "Gravar Opções" - -#: ../includes/admin-pages/settings.php:13 -msgid "General" -msgstr "Geral" - -#: ../includes/admin-pages/settings.php:15 -msgid "Emails" -msgstr "Emails" - -#: ../includes/admin-pages/forms/add-discount.php:1 -msgid "Add New Discount" -msgstr "Adicionar Novo Desconto" - -#: ../includes/admin-pages/forms/add-discount.php:11 -#: ../includes/admin-pages/forms/edit-discount.php:17 -msgid "The name of this discount" -msgstr "Nome deste desconto" - -#: ../includes/admin-pages/forms/add-discount.php:20 -#: ../includes/admin-pages/forms/edit-discount.php:26 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "" - -#: ../includes/admin-pages/forms/add-discount.php:29 -#: ../includes/admin-pages/forms/edit-discount.php:35 -msgid "Percentage" -msgstr "Percentagem" - -#: ../includes/admin-pages/forms/add-discount.php:30 -#: ../includes/admin-pages/forms/edit-discount.php:36 -msgid "Flat amount" -msgstr "Valor Fixo" - -#: ../includes/admin-pages/forms/add-discount.php:32 -#: ../includes/admin-pages/forms/edit-discount.php:38 -msgid "The kind of discount to apply for this discount." -msgstr "Tipo de desconto a aplicar neste código promocional." - -#: ../includes/admin-pages/forms/add-discount.php:41 -#: ../includes/admin-pages/forms/edit-discount.php:47 -msgid "The amount of this discount code." -msgstr "Valor deste código promocional." - -#: ../includes/admin-pages/forms/add-discount.php:46 -#: ../includes/admin-pages/forms/edit-discount.php:52 -msgid "Expiration date" -msgstr "Data Limite" - -#: ../includes/admin-pages/forms/add-discount.php:50 -#: ../includes/admin-pages/forms/edit-discount.php:56 -msgid "Enter the expiration date for this discount code in the format of yyyy-mm-dd. For no expiration, leave blank" -msgstr "" - -#: ../includes/admin-pages/forms/add-discount.php:59 -#: ../includes/admin-pages/forms/edit-discount.php:65 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "" - -#: ../includes/admin-pages/forms/add-discount.php:67 -msgid "Add Discount Code" -msgstr "Adicionar Código Promocional" - -#: ../includes/admin-pages/forms/edit-discount.php:3 -msgid "Something went wrong." -msgstr "Algo correu mal." - -#: ../includes/admin-pages/forms/edit-discount.php:7 -msgid "Edit Discount" -msgstr "Editar Desconto" - -#: ../includes/admin-pages/forms/edit-discount.php:7 -msgid "Go Back" -msgstr "Regressar" - -#: ../includes/admin-pages/forms/edit-discount.php:74 -msgid "Active" -msgstr "Activado" - -#: ../includes/admin-pages/forms/edit-discount.php:75 -msgid "Inactive" -msgstr "Desactivado" - -#: ../includes/admin-pages/forms/edit-discount.php:77 -msgid "The status of this discount code." -msgstr "Estado deste código promocional." - -#: ../includes/admin-pages/forms/edit-discount.php:87 -msgid "Update Discount Code" -msgstr "Actualizar Código Promocional" - -#: ../includes/gateways/paypal.php:171 -msgid "Invalid IPN" -msgstr "IPN Inválido" - diff --git a/languages/edd-tr_TR.mo b/languages/edd-tr_TR.mo deleted file mode 100644 index 20a1d7715e9..00000000000 Binary files a/languages/edd-tr_TR.mo and /dev/null differ diff --git a/languages/edd-tr_TR.po b/languages/edd-tr_TR.po deleted file mode 100644 index b6cb14c6253..00000000000 --- a/languages/edd-tr_TR.po +++ /dev/null @@ -1,1703 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Easy Digital Downloads\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-04-30 21:43-0600\n" -"PO-Revision-Date: 2012-06-02 05:42+0200\n" -"Last-Translator: \n" -"Language-Team: Pippin's Plugins\n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: __;_e;_n;_x\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: English\n" -"X-Poedit-Country: UNITED STATES\n" -"X-Poedit-SearchPath-0: ..\n" -"X-Poedit-SearchPath-1: ../includes\n" -"X-Poedit-SearchPath-2: ../includes/admin-pages\n" -"X-Poedit-SearchPath-3: ../includes/admin-pages/forms\n" -"X-Poedit-SearchPath-4: ../includes/gateways\n" -"X-Poedit-SearchPath-5: .\n" - -#: ../includes/template-functions.php:8 -#: ../includes/dashboard-columns.php:41 -msgid "Purchase" -msgstr "Öde" - -#: ../includes/template-functions.php:60 -#: ../includes/template-functions.php:71 -#: ../includes/cart-template.php:23 -#: ../includes/cart-template.php:26 -msgid "Checkout" -msgstr "Kasaya git" - -#: ../includes/template-functions.php:78 -msgid "added to your cart" -msgstr "" - -#: ../includes/template-functions.php:112 -msgid "Gray" -msgstr "" - -#: ../includes/template-functions.php:113 -msgid "Pink" -msgstr "" - -#: ../includes/template-functions.php:114 -msgid "blue" -msgstr "" - -#: ../includes/template-functions.php:115 -msgid "Green" -msgstr "" - -#: ../includes/template-functions.php:116 -msgid "Teal" -msgstr "" - -#: ../includes/template-functions.php:117 -msgid "Black" -msgstr "" - -#: ../includes/template-functions.php:118 -msgid "Dark Gray" -msgstr "" - -#: ../includes/template-functions.php:119 -msgid "Orange" -msgstr "" - -#: ../includes/template-functions.php:120 -msgid "Purple" -msgstr "" - -#: ../includes/template-functions.php:121 -msgid "Slate" -msgstr "" - -#: ../includes/template-functions.php:127 -msgid "You have already purchased this item, but you may purchase it again." -msgstr "" - -#: ../includes/payment-functions.php:141 -msgid "pending" -msgstr "" - -#: ../includes/payment-functions.php:144 -msgid "complete" -msgstr "" - -#: ../includes/cart-template.php:44 -msgid "remove" -msgstr "kaldır" - -#: ../includes/cart-template.php:52 -msgid "Your cart is empty." -msgstr "Sepetiniz boş." - -#: ../includes/thickbox.php:9 -#: ../includes/thickbox.php:10 -#: ../includes/thickbox.php:97 -msgid "Insert Download" -msgstr "" - -#: ../includes/thickbox.php:39 -msgid "You must choose a download" -msgstr "" - -#: ../includes/thickbox.php:62 -msgid "Use the form below to insert the short code for purchasing a download." -msgstr "" - -#: ../includes/thickbox.php:65 -msgid "Choose a download" -msgstr "" - -#: ../includes/thickbox.php:74 -msgid "Choose a style" -msgstr "" - -#: ../includes/thickbox.php:85 -msgid "Choose a button color" -msgstr "" - -#: ../includes/thickbox.php:94 -msgid "Link text . . ." -msgstr "" - -#: ../includes/thickbox.php:98 -msgid "Cancel" -msgstr "" - -#: ../includes/thickbox.php:100 -msgid "Button Styles" -msgstr "" - -#: ../includes/register-settings.php:23 -msgid "Test Mode" -msgstr "" - -#: ../includes/register-settings.php:24 -msgid "While in test mode no live transactions are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing." -msgstr "" - -#: ../includes/register-settings.php:29 -msgid "Purchase Page" -msgstr "" - -#: ../includes/register-settings.php:30 -msgid "This is the checkout page where buyers will complete their purchases" -msgstr "" - -#: ../includes/register-settings.php:36 -msgid "Success Page" -msgstr "" - -#: ../includes/register-settings.php:37 -msgid "This is the page buyers are sent to after completing their purchases" -msgstr "" - -#: ../includes/register-settings.php:43 -msgid "Currency Settings" -msgstr "" - -#: ../includes/register-settings.php:44 -msgid "Configure the currency options" -msgstr "" - -#: ../includes/register-settings.php:49 -msgid "Currency" -msgstr "" - -#: ../includes/register-settings.php:50 -msgid "Choose your currency. Note that some payment gateways have currency restrictions." -msgstr "" - -#: ../includes/register-settings.php:56 -msgid "Currency Position" -msgstr "" - -#: ../includes/register-settings.php:57 -msgid "Choose the location of the currency sign." -msgstr "" - -#: ../includes/register-settings.php:60 -msgid "Before - $10" -msgstr "" - -#: ../includes/register-settings.php:61 -msgid "After - 10$" -msgstr "" - -#: ../includes/register-settings.php:66 -msgid "Thousands Separator" -msgstr "" - -#: ../includes/register-settings.php:67 -msgid "The symbol (usually , or .) to separate thousands" -msgstr "" - -#: ../includes/register-settings.php:74 -msgid "Decimal Separator" -msgstr "" - -#: ../includes/register-settings.php:75 -msgid "The symbol (usually , or .) to separate decimal points" -msgstr "" - -#: ../includes/register-settings.php:86 -msgid "Payment Gateways" -msgstr "" - -#: ../includes/register-settings.php:87 -msgid "Choose the payment gateways you want to enable." -msgstr "" - -#: ../includes/register-settings.php:93 -msgid "Accepted Payment Method Icons" -msgstr "" - -#: ../includes/register-settings.php:94 -msgid "Display icons for the selected payment methods" -msgstr "" - -#: ../includes/register-settings.php:94 -msgid "You will also need to configure your gateway settings if you are accepting credit cards" -msgstr "" - -#: ../includes/register-settings.php:106 -msgid "PayPal Settings" -msgstr "" - -#: ../includes/register-settings.php:107 -msgid "Configure the PayPal settings" -msgstr "" - -#: ../includes/register-settings.php:112 -msgid "PayPal Email" -msgstr "" - -#: ../includes/register-settings.php:113 -msgid "Enter your PayPal account's email" -msgstr "" - -#: ../includes/register-settings.php:119 -msgid "Disable cURL for PayPal IPN" -msgstr "" - -#: ../includes/register-settings.php:120 -msgid "If payments are not getting marked as complete, check this option" -msgstr "" - -#: ../includes/register-settings.php:125 -msgid "Alternate PayPal Purchase Verification" -msgstr "" - -#: ../includes/register-settings.php:126 -msgid "If payments are not getting marked as complete, and disabling cURL does not fix the problem, then check this box" -msgstr "" - -#: ../includes/register-settings.php:135 -msgid "From Name" -msgstr "" - -#: ../includes/register-settings.php:136 -msgid "The name purchase receipts are said to come from. This should probably be your site or shop name." -msgstr "" - -#: ../includes/register-settings.php:141 -msgid "From Email" -msgstr "" - -#: ../includes/register-settings.php:142 -msgid "Email to send purchase receipts from. This will act as the \"from\" and \"reply-to\" address." -msgstr "" - -#: ../includes/register-settings.php:147 -msgid "Purchase Email Subject" -msgstr "" - -#: ../includes/register-settings.php:148 -msgid "Enter the subject line for the purchase receipt email" -msgstr "" - -#: ../includes/register-settings.php:153 -msgid "Purchase Receipt" -msgstr "" - -#: ../includes/register-settings.php:154 -msgid "Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:" -msgstr "" - -#: ../includes/register-settings.php:155 -msgid "A list of download URLs for each download purchased" -msgstr "" - -#: ../includes/register-settings.php:156 -msgid "The buyer's name" -msgstr "" - -#: ../includes/register-settings.php:157 -msgid "The date of the purchase" -msgstr "" - -#: ../includes/register-settings.php:158 -msgid "The total price of the purchase" -msgstr "" - -#: ../includes/register-settings.php:159 -msgid "Your site name" -msgstr "" - -#: ../includes/register-settings.php:168 -msgid "Disable Styles" -msgstr "" - -#: ../includes/register-settings.php:169 -msgid "Check this to disable all included styling" -msgstr "" - -#: ../includes/register-settings.php:174 -msgid "Checkout Button Color" -msgstr "" - -#: ../includes/register-settings.php:175 -msgid "Choose the button color you want to use for the checkout buttons." -msgstr "" - -#: ../includes/register-settings.php:185 -msgid "Enable Ajax" -msgstr "" - -#: ../includes/register-settings.php:186 -msgid "Check this to enable AJAX for the shopping cart." -msgstr "" - -#: ../includes/register-settings.php:191 -msgid "Enable jQuery Validation" -msgstr "" - -#: ../includes/register-settings.php:192 -msgid "Check this to enable jQuery validation on the checkout form." -msgstr "" - -#: ../includes/register-settings.php:197 -msgid "Disable Guest Checkout" -msgstr "" - -#: ../includes/register-settings.php:198 -msgid "Require that users be logged-in to purchase files." -msgstr "" - -#: ../includes/register-settings.php:203 -msgid "Show Register / Login Form?" -msgstr "" - -#: ../includes/register-settings.php:204 -msgid "Display the registration and login forms on the checkout page for non-logged-in users" -msgstr "" - -#: ../includes/register-settings.php:209 -msgid "Disable Redownload?" -msgstr "" - -#: ../includes/register-settings.php:210 -msgid "Check this if you do not want to allow users to redownload items from their purchase history" -msgstr "" - -#: ../includes/register-settings.php:215 -msgid "Terms of Agreement" -msgstr "" - -#: ../includes/register-settings.php:221 -msgid "Agree to Terms" -msgstr "" - -#: ../includes/register-settings.php:222 -msgid "Check this to show an agree to terms on the checkout that users must agree to before purchasing" -msgstr "" - -#: ../includes/register-settings.php:227 -msgid "Agree to Terms Label" -msgstr "" - -#: ../includes/register-settings.php:228 -msgid "Label shown next to the agree to terms check box" -msgstr "" - -#: ../includes/register-settings.php:234 -msgid "Agreement Text" -msgstr "" - -#: ../includes/register-settings.php:235 -msgid "If Agree to Terms is checked, enter the agreement terms here" -msgstr "" - -#: ../includes/register-settings.php:261 -msgid "General Settings" -msgstr "" - -#: ../includes/register-settings.php:287 -msgid "Payment Gateway Settings" -msgstr "" - -#: ../includes/register-settings.php:313 -msgid "Email Settings" -msgstr "" - -#: ../includes/register-settings.php:339 -msgid "Style Settings" -msgstr "" - -#: ../includes/register-settings.php:366 -msgid "Misc Settings" -msgstr "" - -#: ../includes/dashboard-columns.php:7 -msgid "Name" -msgstr "" - -#: ../includes/dashboard-columns.php:8 -msgid "Categories" -msgstr "" - -#: ../includes/dashboard-columns.php:9 -msgid "Tags" -msgstr "" - -#: ../includes/dashboard-columns.php:10 -#: ../includes/graphing.php:14 -msgid "Sales" -msgstr "" - -#: ../includes/dashboard-columns.php:11 -#: ../includes/graphing.php:52 -#: ../includes/graphing.php:87 -msgid "Earnings" -msgstr "" - -#: ../includes/dashboard-columns.php:12 -msgid "Short Code" -msgstr "" - -#: ../includes/dashboard-columns.php:13 -msgid "Date" -msgstr "" - -#: ../includes/dashboard-columns.php:106 -msgid "Show all categories" -msgstr "" - -#: ../includes/dashboard-columns.php:117 -msgid "Show all tags" -msgstr "" - -#: ../includes/widgets.php:21 -msgid "Downloads Cart" -msgstr "" - -#: ../includes/widgets.php:21 -msgid "Display the downloads shopping cart" -msgstr "" - -#: ../includes/widgets.php:72 -msgid "Title:" -msgstr "" - -#: ../includes/widgets.php:77 -msgid "Show Quantity:" -msgstr "" - -#: ../includes/scripts.php:19 -msgid "Please enter a discount code" -msgstr "" - -#: ../includes/scripts.php:20 -msgid "Discount Applied" -msgstr "" - -#: ../includes/scripts.php:21 -msgid "You have already added this item to your cart" -msgstr "" - -#: ../includes/scripts.php:22 -msgid "Your cart is empty" -msgstr "" - -#: ../includes/scripts.php:23 -msgid "Loading" -msgstr "" - -#: ../includes/graphing.php:13 -#: ../includes/graphing.php:51 -msgid "Download" -msgstr "" - -#: ../includes/graphing.php:24 -msgid "Downloads Performance in Sales" -msgstr "" - -#: ../includes/graphing.php:62 -msgid "Downloads Performance in Earnings" -msgstr "" - -#: ../includes/graphing.php:86 -msgid "Month" -msgstr "" - -#: ../includes/graphing.php:101 -msgid "Earnings per month" -msgstr "" - -#: ../includes/metabox.php:4 -msgid "Download Configuration" -msgstr "" - -#: ../includes/metabox.php:5 -msgid "Download Stats" -msgstr "" - -#: ../includes/metabox.php:6 -msgid "Purchase Log" -msgstr "" - -#: ../includes/metabox.php:7 -msgid "File Download Log" -msgstr "" - -#: ../includes/metabox.php:8 -msgid "Payment Info" -msgstr "" - -#: ../includes/metabox.php:32 -msgid "Pricing" -msgstr "" - -#: ../includes/metabox.php:36 -msgid "Check this to enable variable pricing." -msgstr "" - -#: ../includes/metabox.php:57 -msgid "price option name" -msgstr "" - -#: ../includes/metabox.php:58 -#: ../includes/metabox.php:68 -msgid "9.99" -msgstr "" - -#: ../includes/metabox.php:67 -#: ../includes/metabox.php:106 -#: ../includes/metabox.php:117 -msgid "file name" -msgstr "" - -#: ../includes/metabox.php:71 -msgid "Add New Price Option" -msgstr "" - -#: ../includes/metabox.php:84 -msgid "Enter the download price. Do not include a currency symbol" -msgstr "" - -#: ../includes/metabox.php:96 -msgid "Download Files" -msgstr "" - -#: ../includes/metabox.php:107 -#: ../includes/metabox.php:118 -msgid "file url" -msgstr "" - -#: ../includes/metabox.php:108 -#: ../includes/metabox.php:119 -msgid "Upload File" -msgstr "" - -#: ../includes/metabox.php:122 -#: ../includes/post-types.php:28 -#: ../includes/post-types.php:60 -msgid "Add New" -msgstr "" - -#: ../includes/metabox.php:122 -msgid "Upload the downloadable files." -msgstr "" - -#: ../includes/metabox.php:134 -msgid "Purchase Text" -msgstr "" - -#: ../includes/metabox.php:136 -msgid "Add the text you would like displayed for the purchase text" -msgstr "" - -#: ../includes/metabox.php:146 -msgid "Link Style" -msgstr "" - -#: ../includes/metabox.php:148 -msgid "Button" -msgstr "" - -#: ../includes/metabox.php:149 -msgid "Text" -msgstr "" - -#: ../includes/metabox.php:150 -msgid "Choose the style of the purchase link" -msgstr "" - -#: ../includes/metabox.php:162 -msgid "Button Color" -msgstr "" - -#: ../includes/metabox.php:170 -msgid "Choose the color of the purchase link, if button was selected above." -msgstr "" - -#: ../includes/metabox.php:179 -msgid "Disable the purchase button?" -msgstr "" - -#: ../includes/metabox.php:182 -msgid "Check this if you do not want the purchase button displayed." -msgstr "" - -#: ../includes/metabox.php:191 -msgid "Notes" -msgstr "" - -#: ../includes/metabox.php:194 -msgid "The style options above do NOT reflect the style of short code. The short code allows you to place a purchase button for this download anywhere on the site." -msgstr "" - -#: ../includes/metabox.php:200 -msgid "This short code can be placed anywhere on your site" -msgstr "" - -#: ../includes/metabox.php:263 -msgid "Sales:" -msgstr "" - -#: ../includes/metabox.php:269 -msgid "Earnings:" -msgstr "" - -#: ../includes/metabox.php:285 -msgid "Sales Log" -msgstr "" - -#: ../includes/metabox.php:287 -msgid "Each sale for this download is listed below." -msgstr "" - -#: ../includes/metabox.php:301 -#: ../includes/metabox.php:350 -msgid "Date:" -msgstr "" - -#: ../includes/metabox.php:305 -msgid "Buyer:" -msgstr "" - -#: ../includes/metabox.php:309 -msgid "Purchase ID:" -msgstr "" - -#: ../includes/metabox.php:317 -msgid "No sales yet" -msgstr "" - -#: ../includes/metabox.php:332 -msgid "Download Log" -msgstr "" - -#: ../includes/metabox.php:334 -msgid "Each time a file is downloaded, it is recorded below." -msgstr "" - -#: ../includes/metabox.php:354 -msgid "Downloaded by:" -msgstr "" - -#: ../includes/metabox.php:358 -msgid "IP Address:" -msgstr "" - -#: ../includes/metabox.php:362 -msgid "File: " -msgstr "" - -#: ../includes/metabox.php:371 -msgid "No file downloads yet yet" -msgstr "" - -#: ../includes/ajax-functions.php:57 -#: ../includes/process-purchase.php:17 -msgid "The discount you entered is invalid" -msgstr "" - -#: ../includes/admin-pages.php:6 -#: ../includes/post-types.php:70 -msgid "Payment History" -msgstr "" - -#: ../includes/admin-pages.php:7 -msgid "Discount Codes" -msgstr "" - -#: ../includes/admin-pages.php:8 -msgid "Earnings and Sales Reports" -msgstr "" - -#: ../includes/admin-pages.php:8 -msgid "Reports" -msgstr "" - -#: ../includes/admin-pages.php:9 -msgid "Easy Digital Download Settings" -msgstr "" - -#: ../includes/admin-pages.php:9 -msgid "Settings" -msgstr "" - -#: ../includes/admin-pages.php:10 -msgid "Easy Digital Download Add Ons" -msgstr "" - -#: ../includes/admin-pages.php:10 -msgid "Add Ons" -msgstr "" - -#: ../includes/error-tracking.php:13 -msgid "Error" -msgstr "" - -#: ../includes/misc-functions.php:40 -msgid "US Dollars ($)" -msgstr "" - -#: ../includes/misc-functions.php:41 -msgid "Euros (€)" -msgstr "" - -#: ../includes/misc-functions.php:42 -msgid "Pounds Sterling (£)" -msgstr "" - -#: ../includes/misc-functions.php:43 -msgid "Australian Dollars ($)" -msgstr "" - -#: ../includes/misc-functions.php:44 -msgid "Brazilian Real ($)" -msgstr "" - -#: ../includes/misc-functions.php:45 -msgid "Canadian Dollars ($)" -msgstr "" - -#: ../includes/misc-functions.php:46 -msgid "Czech Koruna" -msgstr "" - -#: ../includes/misc-functions.php:47 -msgid "Danish Krone" -msgstr "" - -#: ../includes/misc-functions.php:48 -msgid "Hong Kong Dollar ($)" -msgstr "" - -#: ../includes/misc-functions.php:49 -msgid "Hungarian Forint" -msgstr "" - -#: ../includes/misc-functions.php:50 -msgid "Israeli Shekel" -msgstr "" - -#: ../includes/misc-functions.php:51 -msgid "Japanese Yen (¥)" -msgstr "" - -#: ../includes/misc-functions.php:52 -msgid "Malaysian Ringgits" -msgstr "" - -#: ../includes/misc-functions.php:53 -msgid "Mexican Peso ($)" -msgstr "" - -#: ../includes/misc-functions.php:54 -msgid "New Zealand Dollar ($)" -msgstr "" - -#: ../includes/misc-functions.php:55 -msgid "Norwegian Krone" -msgstr "" - -#: ../includes/misc-functions.php:56 -msgid "Philippine Pesos" -msgstr "" - -#: ../includes/misc-functions.php:57 -msgid "Polish Zloty" -msgstr "" - -#: ../includes/misc-functions.php:58 -msgid "Singapore Dollar ($)" -msgstr "" - -#: ../includes/misc-functions.php:59 -msgid "Swedish Krona" -msgstr "" - -#: ../includes/misc-functions.php:60 -msgid "Swiss Franc" -msgstr "" - -#: ../includes/misc-functions.php:61 -msgid "Taiwan New Dollars" -msgstr "" - -#: ../includes/misc-functions.php:62 -msgid "Thai Baht" -msgstr "" - -#: ../includes/misc-functions.php:63 -msgid "Indian Rupee" -msgstr "" - -#: ../includes/process-download.php:64 -msgid "You do not have permission to download this file" -msgstr "" - -#: ../includes/process-download.php:64 -msgid "Purchase Verification Failed" -msgstr "" - -#: ../includes/checkout-template.php:57 -msgid "Choose Your Payment Method" -msgstr "Ödeme yöntemini Seçiniz" - -#: ../includes/checkout-template.php:68 -msgid "Next" -msgstr "İleri" - -#: ../includes/checkout-template.php:115 -msgid "Email address" -msgstr "Email adresiniz" - -#: ../includes/checkout-template.php:116 -msgid "Email Address" -msgstr "" - -#: ../includes/checkout-template.php:119 -#: ../includes/checkout-template.php:120 -#: ../includes/checkout-template.php:289 -#: ../includes/checkout-template.php:290 -msgid "First Name" -msgstr "Adınız" - -#: ../includes/checkout-template.php:123 -#: ../includes/checkout-template.php:293 -msgid "Last name" -msgstr "Soyadınız" - -#: ../includes/checkout-template.php:124 -#: ../includes/checkout-template.php:294 -msgid "Last Name" -msgstr "Soyadınız" - -#: ../includes/checkout-template.php:132 -msgid "Enter discount" -msgstr "" - -#: ../includes/checkout-template.php:134 -msgid "Discount" -msgstr "" - -#: ../includes/checkout-template.php:136 -msgid "Apply Discount" -msgstr "" - -#: ../includes/checkout-template.php:162 -msgid "Show Terms" -msgstr "" - -#: ../includes/checkout-template.php:163 -msgid "Hide Terms" -msgstr "" - -#: ../includes/checkout-template.php:166 -msgid "Agree to Terms?" -msgstr "" - -#: ../includes/checkout-template.php:190 -msgid "Go back" -msgstr "Geri git" - -#: ../includes/checkout-template.php:194 -msgid "You must be logged in to complete your purchase" -msgstr "" - -#: ../includes/checkout-template.php:214 -msgid "Card name" -msgstr "" - -#: ../includes/checkout-template.php:215 -msgid "Name on the Card" -msgstr "" - -#: ../includes/checkout-template.php:218 -msgid "Card number" -msgstr "" - -#: ../includes/checkout-template.php:219 -msgid "Card Number" -msgstr "" - -#: ../includes/checkout-template.php:222 -msgid "Security code" -msgstr "" - -#: ../includes/checkout-template.php:223 -msgid "CVC" -msgstr "" - -#: ../includes/checkout-template.php:229 -msgid "Year" -msgstr "" - -#: ../includes/checkout-template.php:230 -msgid "Expiration (MM/YYYY)" -msgstr "" - -#: ../includes/checkout-template.php:248 -msgid "Credit Card Info" -msgstr "" - -#: ../includes/checkout-template.php:250 -msgid "Address line 1" -msgstr "" - -#: ../includes/checkout-template.php:251 -msgid "Billing Address" -msgstr "" - -#: ../includes/checkout-template.php:254 -msgid "Address line 2" -msgstr "" - -#: ../includes/checkout-template.php:255 -msgid "Billing Address Line 2" -msgstr "" - -#: ../includes/checkout-template.php:258 -msgid "City" -msgstr "" - -#: ../includes/checkout-template.php:259 -msgid "Billing City" -msgstr "" - -#: ../includes/checkout-template.php:262 -msgid "State / Province" -msgstr "" - -#: ../includes/checkout-template.php:263 -msgid "Billing State / Province" -msgstr "" - -#: ../includes/checkout-template.php:266 -msgid "Zip / Postal code" -msgstr "" - -#: ../includes/checkout-template.php:267 -msgid "Billing Zip / Postal Code" -msgstr "" - -#: ../includes/checkout-template.php:279 -msgid "Create an account" -msgstr "Hesap açabilirsiniz" - -#: ../includes/checkout-template.php:279 -msgid "(optional)" -msgstr "(isteğe bağlı)" - -#: ../includes/checkout-template.php:281 -#: ../includes/checkout-template.php:282 -#: ../includes/checkout-template.php:318 -msgid "Username" -msgstr "Kullanıcı adı" - -#: ../includes/checkout-template.php:285 -#: ../includes/checkout-template.php:286 -msgid "Email" -msgstr "" - -#: ../includes/checkout-template.php:297 -#: ../includes/checkout-template.php:298 -#: ../includes/checkout-template.php:322 -msgid "Password" -msgstr "Şifre" - -#: ../includes/checkout-template.php:301 -msgid "Confirm password" -msgstr "Şifreyi tekrar girin" - -#: ../includes/checkout-template.php:302 -msgid "Password Again" -msgstr "Şifrenizi tekrar yazın" - -#: ../includes/checkout-template.php:304 -msgid "Already have an account?" -msgstr "Zaten bir hesabınız var mı?" - -#: ../includes/checkout-template.php:304 -msgid "Login" -msgstr "Giriş" - -#: ../includes/checkout-template.php:315 -msgid "Login to your account" -msgstr "Hesabınıza girin" - -#: ../includes/checkout-template.php:317 -msgid "Your username" -msgstr "Kullanıcı adınız" - -#: ../includes/checkout-template.php:321 -msgid "Your password" -msgstr "Şifreniz" - -#: ../includes/checkout-template.php:325 -msgid "Need to create an account?" -msgstr "Bir hesap açmalısınız" - -#: ../includes/checkout-template.php:325 -msgid "Register" -msgstr "Kayıt ol" - -#: ../includes/email-functions.php:26 -msgid "Hello" -msgstr "" - -#: ../includes/email-functions.php:26 -msgid "A download purchase has been made" -msgstr "" - -#: ../includes/email-functions.php:27 -msgid "Downloads sold:" -msgstr "" - -#: ../includes/email-functions.php:36 -msgid "Amount: " -msgstr "" - -#: ../includes/email-functions.php:37 -msgid "Thank you" -msgstr "" - -#: ../includes/email-functions.php:39 -msgid "New download purchase" -msgstr "" - -#: ../includes/process-purchase.php:20 -msgid "You must agree to the terms of use" -msgstr "" - -#: ../includes/process-purchase.php:37 -msgid "Username already taken" -msgstr "" - -#: ../includes/process-purchase.php:41 -msgid "Invalid username" -msgstr "" - -#: ../includes/process-purchase.php:45 -msgid "Enter a username" -msgstr "" - -#: ../includes/process-purchase.php:49 -msgid "Invalid email" -msgstr "" - -#: ../includes/process-purchase.php:53 -msgid "Email already used" -msgstr "" - -#: ../includes/process-purchase.php:57 -msgid "Enter a password" -msgstr "" - -#: ../includes/process-purchase.php:61 -msgid "Passwords don't match" -msgstr "" - -#: ../includes/process-purchase.php:78 -msgid "The password you entered is incorrect" -msgstr "" - -#: ../includes/process-purchase.php:82 -msgid "The username you entered does not exist" -msgstr "" - -#: ../includes/process-purchase.php:86 -msgid "Something has gone wrong, please try again" -msgstr "" - -#: ../includes/process-purchase.php:90 -msgid "You must enter a valid email address." -msgstr "" - -#: ../includes/gateway-functions.php:9 -msgid "Manual Payment" -msgstr "Elden Ödeme" - -#: ../includes/admin-notices.php:6 -msgid "Discount code updated." -msgstr "" - -#: ../includes/admin-notices.php:9 -msgid "There was a problem updating your discount code, please try again." -msgstr "" - -#: ../includes/admin-notices.php:12 -msgid "The payment has been deleted." -msgstr "" - -#: ../includes/admin-notices.php:15 -msgid "The purchase receipt has been resent." -msgstr "" - -#: ../includes/post-types.php:26 -#: ../includes/post-types.php:38 -msgid "Downloads" -msgstr "" - -#: ../includes/post-types.php:29 -msgid "Add New Download" -msgstr "" - -#: ../includes/post-types.php:30 -msgid "Edit Download" -msgstr "" - -#: ../includes/post-types.php:31 -msgid "New Download" -msgstr "" - -#: ../includes/post-types.php:32 -msgid "All Downloads" -msgstr "" - -#: ../includes/post-types.php:33 -msgid "View Download" -msgstr "" - -#: ../includes/post-types.php:34 -msgid "Search Downloads" -msgstr "" - -#: ../includes/post-types.php:35 -msgid "No Downloads found" -msgstr "" - -#: ../includes/post-types.php:36 -msgid "No Downloads found in Trash" -msgstr "" - -#: ../includes/post-types.php:58 -msgid "Payments" -msgstr "" - -#: ../includes/post-types.php:59 -msgid "Payment" -msgstr "" - -#: ../includes/post-types.php:61 -msgid "Add New Payment" -msgstr "" - -#: ../includes/post-types.php:62 -msgid "Edit Payment" -msgstr "" - -#: ../includes/post-types.php:63 -msgid "New Payment" -msgstr "" - -#: ../includes/post-types.php:64 -msgid "All Payments" -msgstr "" - -#: ../includes/post-types.php:65 -msgid "View Payment" -msgstr "" - -#: ../includes/post-types.php:66 -msgid "Search Payments" -msgstr "" - -#: ../includes/post-types.php:67 -msgid "No Payments found" -msgstr "" - -#: ../includes/post-types.php:68 -msgid "No Payments found in Trash" -msgstr "" - -#: ../includes/post-types.php:96 -msgid "Category" -msgstr "" - -#: ../includes/post-types.php:97 -msgid "Search Categories" -msgstr "" - -#: ../includes/post-types.php:98 -msgid "All Categories" -msgstr "" - -#: ../includes/post-types.php:99 -msgid "Parent Category" -msgstr "" - -#: ../includes/post-types.php:100 -msgid "Parent Category:" -msgstr "" - -#: ../includes/post-types.php:101 -msgid "Edit Category" -msgstr "" - -#: ../includes/post-types.php:102 -msgid "Update Category" -msgstr "" - -#: ../includes/post-types.php:103 -msgid "Add New Category" -msgstr "" - -#: ../includes/post-types.php:104 -msgid "New Category Name" -msgstr "" - -#: ../includes/post-types.php:118 -msgid "Tag" -msgstr "" - -#: ../includes/post-types.php:119 -msgid "Search Tags" -msgstr "" - -#: ../includes/post-types.php:120 -msgid "All Tags" -msgstr "" - -#: ../includes/post-types.php:121 -msgid "Parent Tag" -msgstr "" - -#: ../includes/post-types.php:122 -msgid "Parent Tag:" -msgstr "" - -#: ../includes/post-types.php:123 -msgid "Edit Tag" -msgstr "" - -#: ../includes/post-types.php:124 -msgid "Update Tag" -msgstr "" - -#: ../includes/post-types.php:125 -msgid "Add New Tag" -msgstr "" - -#: ../includes/post-types.php:126 -msgid "New Tag Name" -msgstr "" - -#: ../includes/post-types.php:144 -#: ../includes/post-types.php:145 -msgid "Download updated." -msgstr "" - -#: ../includes/post-types.php:146 -msgid "Download published." -msgstr "" - -#: ../includes/post-types.php:147 -msgid "Download saved." -msgstr "" - -#: ../includes/post-types.php:148 -msgid "Download submitted." -msgstr "" - -#: ../includes/shortcodes.php:35 -msgid "Download Name" -msgstr "Ürün ismi" - -#: ../includes/shortcodes.php:36 -msgid "Files" -msgstr "Dosya" - -#: ../includes/shortcodes.php:58 -msgid "No downloadable files found." -msgstr "" - -#: ../includes/shortcodes.php:68 -msgid "You have not purchased any downloads" -msgstr "Herhangi bir indirme işlemi için ödeme yapılmamış." - -#: ../includes/shortcodes.php:95 -msgid "Add to Cart" -msgstr "" - -#: ../includes/shortcodes.php:122 -msgid "No downloads found" -msgstr "" - -#: ../includes/gateways/paypal.php:198 -msgid "Invalid IPN" -msgstr "" - -#: ../includes/templates/checkout_cart.php:6 -msgid "Item Name" -msgstr "Ürünün İsmi" - -#: ../includes/templates/checkout_cart.php:7 -msgid "Item Price" -msgstr "Ürün Fiyatı" - -#: ../includes/templates/checkout_cart.php:8 -#: ../includes/admin-pages/discount-codes.php:28 -#: ../includes/admin-pages/discount-codes.php:42 -msgid "Actions" -msgstr "Eylemler" - -#: ../includes/templates/checkout_cart.php:43 -msgid "Total" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:20 -#: ../includes/admin-pages/discount-codes.php:34 -#: ../includes/admin-pages/forms/edit-discount.php:22 -#: ../includes/admin-pages/forms/add-discount.php:16 -msgid "Code" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:21 -#: ../includes/admin-pages/discount-codes.php:35 -#: ../includes/admin-pages/forms/edit-discount.php:31 -#: ../includes/admin-pages/forms/add-discount.php:25 -msgid "Type" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:22 -#: ../includes/admin-pages/discount-codes.php:36 -#: ../includes/admin-pages/forms/edit-discount.php:43 -#: ../includes/admin-pages/forms/add-discount.php:37 -msgid "Amount" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:23 -#: ../includes/admin-pages/discount-codes.php:37 -msgid "Uses" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:24 -#: ../includes/admin-pages/discount-codes.php:38 -#: ../includes/admin-pages/forms/edit-discount.php:70 -#: ../includes/admin-pages/forms/add-discount.php:64 -msgid "Max Uses" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:25 -#: ../includes/admin-pages/discount-codes.php:39 -msgid "Start Date" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:26 -#: ../includes/admin-pages/discount-codes.php:40 -msgid "Expiration" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:27 -#: ../includes/admin-pages/discount-codes.php:41 -#: ../includes/admin-pages/payments-history.php:51 -#: ../includes/admin-pages/payments-history.php:63 -#: ../includes/admin-pages/forms/edit-discount.php:79 -msgid "Status" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:65 -#: ../includes/admin-pages/discount-codes.php:67 -msgid "unlimited" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:76 -msgid "No start date" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:83 -msgid "Expired" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:85 -msgid "no expiration" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:91 -#: ../includes/admin-pages/payments-history.php:83 -msgid "Edit" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:93 -msgid "Deactivate" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:95 -msgid "Activate" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:97 -#: ../includes/admin-pages/payments-history.php:85 -msgid "Delete" -msgstr "" - -#: ../includes/admin-pages/discount-codes.php:102 -msgid "No discount codes have been created." -msgstr "" - -#: ../includes/admin-pages/reports.php:14 -msgid "Transactions created while in test mode are not included on this page." -msgstr "" - -#: ../includes/admin-pages/payments-history.php:30 -msgid "Payment mode" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:32 -msgid "Live" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:33 -msgid "Test" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:37 -msgid "Payments per page" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:39 -msgid "Show" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:44 -#: ../includes/admin-pages/payments-history.php:56 -msgid "ID" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:46 -#: ../includes/admin-pages/payments-history.php:58 -msgid "Key" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:47 -#: ../includes/admin-pages/payments-history.php:59 -msgid "Products" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:48 -#: ../includes/admin-pages/payments-history.php:60 -msgid "Price" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:50 -#: ../includes/admin-pages/payments-history.php:62 -msgid "User" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:84 -msgid "Resend Purchase Receipt" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:98 -#, php-format -msgid "Purchase Details for Payment #%s" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:98 -msgid "View Order Details" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:103 -msgid "Purchased File" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:103 -msgid "Purchased Files" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:118 -msgid "Price: " -msgstr "" - -#: ../includes/admin-pages/payments-history.php:124 -msgid "Discount used:" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:124 -msgid "none" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:125 -msgid "Total:" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:128 -msgid "Buyer's Personal Details:" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:130 -msgid "Name:" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:131 -msgid "Email:" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:134 -#: ../includes/admin-pages/forms/edit-payment.php:58 -msgid "Close" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:139 -msgid "guest" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:146 -msgid "No payments recorded yet" -msgstr "" - -#: ../includes/admin-pages/payments-history.php:161 -msgid "Previous" -msgstr "" - -#: ../includes/admin-pages/settings.php:13 -msgid "General" -msgstr "" - -#: ../includes/admin-pages/settings.php:15 -msgid "Emails" -msgstr "" - -#: ../includes/admin-pages/settings.php:16 -msgid "Styles" -msgstr "" - -#: ../includes/admin-pages/settings.php:17 -msgid "Misc" -msgstr "" - -#: ../includes/admin-pages/add-ons.php:9 -msgid "Add Ons for Easy Digital Downloads" -msgstr "" - -#: ../includes/admin-pages/add-ons.php:10 -msgid "These add-ons extend the functionality of Easy Digital Downloads." -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:3 -msgid "Something went wrong." -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:7 -msgid "Edit Discount" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:7 -#: ../includes/admin-pages/forms/edit-payment.php:3 -msgid "Go Back" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:17 -#: ../includes/admin-pages/forms/add-discount.php:11 -msgid "The name of this discount" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:26 -#: ../includes/admin-pages/forms/add-discount.php:20 -msgid "Enter a code for this discount, such as 10PERCENT" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:35 -#: ../includes/admin-pages/forms/add-discount.php:29 -msgid "Percentage" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:36 -#: ../includes/admin-pages/forms/add-discount.php:30 -msgid "Flat amount" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:38 -#: ../includes/admin-pages/forms/add-discount.php:32 -msgid "The kind of discount to apply for this discount." -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:47 -#: ../includes/admin-pages/forms/add-discount.php:41 -msgid "The amount of this discount code." -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:52 -#: ../includes/admin-pages/forms/add-discount.php:46 -msgid "Start date" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:56 -#: ../includes/admin-pages/forms/add-discount.php:50 -msgid "Enter the start date for this discount code in the format of yyyy-mm-dd. For no start date, leave blank. If entered, the discount can only be used after or on this date." -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:61 -#: ../includes/admin-pages/forms/add-discount.php:55 -msgid "Expiration date" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:65 -#: ../includes/admin-pages/forms/add-discount.php:59 -msgid "Enter the expiration date for this discount code in the format of yyyy-mm-dd. For no expiration, leave blank" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:74 -#: ../includes/admin-pages/forms/add-discount.php:68 -msgid "The maximum number of times this discount can be used. Leave blank for unlimited." -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:83 -msgid "Active" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:84 -msgid "Inactive" -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:86 -msgid "The status of this discount code." -msgstr "" - -#: ../includes/admin-pages/forms/edit-discount.php:96 -msgid "Update Discount Code" -msgstr "" - -#: ../includes/admin-pages/forms/add-discount.php:1 -msgid "Add New Discount" -msgstr "" - -#: ../includes/admin-pages/forms/add-discount.php:76 -msgid "Add Discount Code" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:9 -msgid "Downloads Purchased" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:21 -#, php-format -msgid "Add download to purchase #%s" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:21 -msgid "Add download to purchase" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:26 -msgid "Payment Status" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:31 -msgid "Pending" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:32 -msgid "Complete" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:44 -msgid "Update Payment" -msgstr "" - -#: ../includes/admin-pages/forms/edit-payment.php:57 -msgid "Add Selected Downloads" -msgstr "" - diff --git a/languages/index.php b/languages/index.php new file mode 100755 index 00000000000..16df6be3122 --- /dev/null +++ b/languages/index.php @@ -0,0 +1,6 @@ + + */ + protected function getCarbonClassName(): string + { + return Carbon::class; + } + + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string + { + $precision = min( + $fieldDeclaration['precision'] ?? DateTimeDefaultPrecision::get(), + $this->getMaximumPrecision($platform), + ); + + $type = parent::getSQLDeclaration($fieldDeclaration, $platform); + + if (!$precision) { + return $type; + } + + if (str_contains($type, '(')) { + return preg_replace('/\(\d+\)/', "($precision)", $type); + } + + [$before, $after] = explode(' ', "$type "); + + return trim("$before($precision) $after"); + } + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTimeInterface) { + return $value->format('Y-m-d H:i:s.u'); + } + + throw InvalidType::new( + $value, + static::class, + ['null', 'DateTime', 'Carbon'] + ); + } + + private function doConvertToPHPValue(mixed $value) + { + $class = $this->getCarbonClassName(); + + if ($value === null || is_a($value, $class)) { + return $value; + } + + if ($value instanceof DateTimeInterface) { + return $class::instance($value); + } + + $date = null; + $error = null; + + try { + $date = $class::parse($value); + } catch (Exception $exception) { + $error = $exception; + } + + if (!$date) { + throw ValueNotConvertible::new( + $value, + static::class, + 'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()', + $error + ); + } + + return $date; + } + + private function getMaximumPrecision(AbstractPlatform $platform): int + { + if ($platform instanceof DB2Platform) { + return 12; + } + + if ($platform instanceof OraclePlatform) { + return 9; + } + + if ($platform instanceof SQLServerPlatform || $platform instanceof SQLitePlatform) { + return 3; + } + + return 6; + } +} diff --git a/libraries/Carbon/Doctrine/DateTimeDefaultPrecision.php b/libraries/Carbon/Doctrine/DateTimeDefaultPrecision.php new file mode 100644 index 00000000000..505b1457aa9 --- /dev/null +++ b/libraries/Carbon/Doctrine/DateTimeDefaultPrecision.php @@ -0,0 +1,30 @@ + */ + use CarbonTypeConverter; + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?CarbonImmutable + { + return $this->doConvertToPHPValue($value); + } + + /** + * @return class-string + */ + protected function getCarbonClassName(): string + { + return CarbonImmutable::class; + } +} diff --git a/libraries/Carbon/Doctrine/DateTimeType.php b/libraries/Carbon/Doctrine/DateTimeType.php new file mode 100644 index 00000000000..9d54093d3f6 --- /dev/null +++ b/libraries/Carbon/Doctrine/DateTimeType.php @@ -0,0 +1,24 @@ + */ + use CarbonTypeConverter; + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?EDD\Vendor\Carbon + { + return $this->doConvertToPHPValue($value); + } +} diff --git a/libraries/Carbon/LICENSE b/libraries/Carbon/LICENSE new file mode 100644 index 00000000000..6de45ebf882 --- /dev/null +++ b/libraries/Carbon/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) Brian Nesbitt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/libraries/Carbon/bin/carbon b/libraries/Carbon/bin/carbon new file mode 100644 index 00000000000..b53ab738580 --- /dev/null +++ b/libraries/Carbon/bin/carbon @@ -0,0 +1,23 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\MessageFormatter; + +use EDD\Vendor\Symfony\Component\Translation\Formatter\MessageFormatterInterface; + +if (!class_exists(LazyMessageFormatter::class, false)) { + abstract class LazyMessageFormatter implements MessageFormatterInterface + { + public function format(string $message, string $locale, array $parameters = []): string + { + return $this->formatter->format( + $message, + $this->transformLocale($locale), + $parameters + ); + } + } +} diff --git a/libraries/Carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php b/libraries/Carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php new file mode 100644 index 00000000000..6eac5a29cf3 --- /dev/null +++ b/libraries/Carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\MessageFormatter; + +use EDD\Vendor\Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface; +use EDD\Vendor\Symfony\Component\Translation\Formatter\MessageFormatterInterface; + +if (!class_exists(LazyMessageFormatter::class, false)) { + abstract class LazyMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface + { + abstract protected function transformLocale(?string $locale): ?string; + + public function format($message, $locale, array $parameters = []) + { + return $this->formatter->format( + $message, + $this->transformLocale($locale), + $parameters + ); + } + + public function choiceFormat($message, $number, $locale, array $parameters = []) + { + return $this->formatter->choiceFormat($message, $number, $locale, $parameters); + } + } +} diff --git a/libraries/Carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php b/libraries/Carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php new file mode 100644 index 00000000000..6ed26f08206 --- /dev/null +++ b/libraries/Carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +use PHPStan\BetterReflection\Reflection; +use ReflectionMethod; + +if (!class_exists(AbstractReflectionMacro::class, false)) { + abstract class AbstractReflectionMacro extends AbstractMacro + { + /** + * {@inheritdoc} + */ + public function getReflection(): ?ReflectionMethod + { + if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) { + return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction); + } + + return $this->reflectionFunction instanceof ReflectionMethod + ? $this->reflectionFunction + : null; + } + } +} diff --git a/libraries/Carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php b/libraries/Carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php new file mode 100644 index 00000000000..62c9e2e59a7 --- /dev/null +++ b/libraries/Carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +use PHPStan\BetterReflection\Reflection; +use ReflectionMethod; + +if (!class_exists(AbstractReflectionMacro::class, false)) { + abstract class AbstractReflectionMacro extends AbstractMacro + { + /** + * {@inheritdoc} + */ + public function getReflection(): ?Reflection\Adapter\ReflectionMethod + { + if ($this->reflectionFunction instanceof Reflection\Adapter\ReflectionMethod) { + return $this->reflectionFunction; + } + + if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) { + return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction); + } + + return $this->reflectionFunction instanceof ReflectionMethod + ? new Reflection\Adapter\ReflectionMethod( + Reflection\ReflectionMethod::createFromName( + $this->reflectionFunction->getDeclaringClass()->getName(), + $this->reflectionFunction->getName() + ) + ) + : null; + } + } +} diff --git a/libraries/Carbon/lazy/Carbon/PHPStan/MacroStrongType.php b/libraries/Carbon/lazy/Carbon/PHPStan/MacroStrongType.php new file mode 100644 index 00000000000..c17ee86e6ff --- /dev/null +++ b/libraries/Carbon/lazy/Carbon/PHPStan/MacroStrongType.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractReflectionMacro + { + /** + * {@inheritdoc} + */ + public function getFileName(): ?string + { + $file = $this->reflectionFunction->getFileName(); + + return (($file ? realpath($file) : null) ?: $file) ?: null; + } + + /** + * {@inheritdoc} + */ + public function getStartLine(): ?int + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + */ + public function getEndLine(): ?int + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/libraries/Carbon/lazy/Carbon/PHPStan/MacroWeakType.php b/libraries/Carbon/lazy/Carbon/PHPStan/MacroWeakType.php new file mode 100644 index 00000000000..8651f5b7e8a --- /dev/null +++ b/libraries/Carbon/lazy/Carbon/PHPStan/MacroWeakType.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractReflectionMacro + { + /** + * {@inheritdoc} + * + * @return string|false + */ + public function getFileName() + { + $file = $this->reflectionFunction->getFileName(); + + return (($file ? realpath($file) : null) ?: $file) ?: null; + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getStartLine() + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getEndLine() + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/libraries/Carbon/lazy/Carbon/TranslatorStrongType.php b/libraries/Carbon/lazy/Carbon/TranslatorStrongType.php new file mode 100644 index 00000000000..6a3b2f87b44 --- /dev/null +++ b/libraries/Carbon/lazy/Carbon/TranslatorStrongType.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Symfony\Component\Translation\MessageCatalogueInterface; + +if (!class_exists(LazyTranslator::class, false)) { + class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface + { + public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string + { + return $this->translate($id, $parameters, $domain, $locale); + } + + public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages') + { + $messages = $this->getPrivateProperty($catalogue, 'messages'); + + if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) { + return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id]; + } + + if (isset($messages[$domain][$id])) { + return $messages[$domain][$id]; + } + + $fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue'); + + if ($fallbackCatalogue !== null) { + return $this->getFromCatalogue($fallbackCatalogue, $id, $domain); + } + + return $id; + } + + private function getPrivateProperty($instance, string $field) + { + return (function (string $field) { + return $this->$field; + })->call($instance, $field); + } + } +} diff --git a/libraries/Carbon/lazy/Carbon/TranslatorWeakType.php b/libraries/Carbon/lazy/Carbon/TranslatorWeakType.php new file mode 100644 index 00000000000..11fc093ca82 --- /dev/null +++ b/libraries/Carbon/lazy/Carbon/TranslatorWeakType.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +if (!class_exists(LazyTranslator::class, false)) { + class LazyTranslator extends AbstractTranslator + { + /** + * Returns the translation. + * + * @param string|null $id + * @param array $parameters + * @param string|null $domain + * @param string|null $locale + * + * @return string + */ + public function trans($id, array $parameters = [], $domain = null, $locale = null) + { + return $this->translate($id, $parameters, $domain, $locale); + } + } +} diff --git a/libraries/Carbon/readme.md b/libraries/Carbon/readme.md new file mode 100644 index 00000000000..97ec8ce08d2 --- /dev/null +++ b/libraries/Carbon/readme.md @@ -0,0 +1,176 @@ +# Carbon + +[![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) +[![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) +[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://github.com/briannesbitt/Carbon/actions) +[![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master) +[![Tidelift](https://tidelift.com/badges/github/briannesbitt/Carbon)](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) + +An international PHP extension for DateTime. [https://carbon.nesbot.com](https://carbon.nesbot.com) + +```php +toDateTimeString()); +printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString() +$tomorrow = Carbon::now()->addDay(); +$lastWeek = Carbon::now()->subWeek(); +$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4); + +$officialDate = Carbon::now()->toRfc2822String(); + +$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; + +$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); + +$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT'); + +// Don't really want this to happen so mock now +Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1)); + +// comparisons are always done in UTC +if (Carbon::now()->gte($internetWillBlowUpOn)) { + die(); +} + +// Phew! Return to normal behaviour +Carbon::setTestNow(); + +if (Carbon::now()->isWeekend()) { + echo 'Party!'; +} +// Over 200 languages (and over 500 regional variants) supported: +echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago' +echo Carbon::now()->subMinutes(2)->locale('zh_CN')->diffForHumans(); // '2分钟前' +echo Carbon::parse('2019-07-23 14:51')->isoFormat('LLLL'); // 'Tuesday, July 23, 2019 2:51 PM' +echo Carbon::parse('2019-07-23 14:51')->locale('fr_FR')->isoFormat('LLLL'); // 'mardi 23 juillet 2019 14:51' + +// ... but also does 'from now', 'after' and 'before' +// rolling up to seconds, minutes, hours, days, months, years + +$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays(); +``` + +[Get supported nesbot/carbon with the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) + +## Installation + +### With Composer + +``` +$ composer require nesbot/carbon +``` + +```json +{ + "require": { + "nesbot/carbon": "^2.16" + } +} +``` + +```php + + +### Translators + +[Thanks to people helping us to translate Carbon in so many languages](https://carbon.nesbot.com/contribute/translators/) + +### Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. + + +Онлайн казино +CasinoHex Canada +Probukmacher +Casino-portugal.pt +Игровые автоматы +Slots City +inkedin +Онлайн казино України +OnlineCasinosSpelen +Best non Gamstop sites in the UK +Real Money Pokies +Non GamStop Bookies UK +Онлайн Казино Украины +SSSTwitter +Non-GamStop Bets UK +Chudovo +UK Casino Gap +NZ Casino Deps +NonStopCasino.org +Migliori Siti Non AAMS +UK NonGamStopCasinos +SnapTik +Proxidize +IG Downloader +Blastup +Organic Social Boost +AzuraCast +Triplebyte +GitHub Sponsors +Salesforce + + +[[Become a sponsor via OpenCollective](https://opencollective.com/Carbon#sponsor)] + + + + + + +[[Become a sponsor via GitHub](https://github.com/sponsors/kylekatarnls)] + +### Backers + +Thank you to all our backers! 🙏 + + + +[[Become a backer](https://opencollective.com/Carbon#backer)] + +## Carbon for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of ``Carbon`` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/libraries/Carbon/sponsors.php b/libraries/Carbon/sponsors.php new file mode 100644 index 00000000000..a9e9e2b1467 --- /dev/null +++ b/libraries/Carbon/sponsors.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Carbon\CarbonImmutable; + +require_once __DIR__.'/vendor/autoload.php'; + +function getMaxHistoryMonthsByAmount($amount): int +{ + if ($amount >= 50) { + return 6; + } + + if ($amount >= 20) { + return 4; + } + + return 2; +} + +function getHtmlAttribute($rawValue): string +{ + return str_replace( + ['​', "\r"], + '', + trim(htmlspecialchars((string) $rawValue), "  \n\r\t\v\0"), + ); +} + +function getOpenCollectiveSponsors(): string +{ + $customSponsorImages = [ + // For consistency and equity among sponsors, as of now, we kindly ask our sponsors + // to provide an image having a width/height ratio between 1/1 and 2/1. + // By default, we'll show the member picture from OpenCollective, and will resize it if bigger + // int(OpenCollective.MemberId) => ImageURL + ]; + + $members = json_decode(file_get_contents('https://opencollective.com/carbon/members/all.json'), true); + + $list = array_filter($members, static function ($member): bool { + return ($member['lastTransactionAmount'] > 3 || $member['isActive']) && + $member['role'] === 'BACKER' && + $member['type'] !== 'USER' && + ( + $member['totalAmountDonated'] > 100 || + $member['lastTransactionAt'] > CarbonImmutable::now() + ->subMonthsNoOverflow(getMaxHistoryMonthsByAmount($member['lastTransactionAmount'])) + ->format('Y-m-d h:i') || + $member['isActive'] && $member['lastTransactionAmount'] >= 30 + ); + }); + + $list = array_map(static function (array $member): array { + $createdAt = CarbonImmutable::parse($member['createdAt']); + $lastTransactionAt = CarbonImmutable::parse($member['lastTransactionAt']); + + if ($createdAt->format('d H:i:s.u') > $lastTransactionAt->format('d H:i:s.u')) { + $createdAt = $createdAt + ->setDay($lastTransactionAt->day) + ->modify($lastTransactionAt->format('H:i:s.u')); + } + + $monthlyContribution = (float) ($member['totalAmountDonated'] / ceil($createdAt->floatDiffInMonths())); + + if ( + $lastTransactionAt->isAfter('last month') && + $member['lastTransactionAmount'] > $monthlyContribution + ) { + $monthlyContribution = (float) $member['lastTransactionAmount']; + } + + $yearlyContribution = (float) ($member['totalAmountDonated'] / max(1, $createdAt->floatDiffInYears())); + $status = null; + + if ($monthlyContribution > 29) { + $status = 'sponsor'; + } elseif ($monthlyContribution > 4.5 || $yearlyContribution > 29) { + $status = 'backer'; + } elseif ($member['totalAmountDonated'] > 0) { + $status = 'helper'; + } + + return array_merge($member, [ + 'star' => ($monthlyContribution > 98 || $yearlyContribution > 500), + 'status' => $status, + 'monthlyContribution' => $monthlyContribution, + 'yearlyContribution' => $yearlyContribution, + ]); + }, $list); + + usort($list, static function (array $a, array $b): int { + return ($b['monthlyContribution'] <=> $a['monthlyContribution']) + ?: ($b['totalAmountDonated'] <=> $a['totalAmountDonated']); + }); + + return implode('', array_map(static function (array $member) use ($customSponsorImages): string { + $href = htmlspecialchars($member['website'] ?? $member['profile']); + $src = $customSponsorImages[$member['MemberId'] ?? ''] ?? $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png'); + [$x, $y] = @getimagesize($src) ?: [0, 0]; + $validImage = ($x && $y); + $src = $validImage ? htmlspecialchars($src) : 'https://opencollective.com/static/images/default-guest-logo.svg'; + $height = $member['status'] === 'sponsor' ? 64 : 42; + $width = min($height * 2, $validImage ? round($x * $height / $y) : $height); + $href .= (strpos($href, '?') === false ? '?' : '&').'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; + $title = getHtmlAttribute(($member['description'] ?? null) ?: $member['name']); + $alt = getHtmlAttribute($member['name']); + + return "\n".''. + ''.$alt.''. + ''; + }, $list))."\n"; +} + +file_put_contents('readme.md', preg_replace_callback( + '/()[\s\S]+()/', + static function (array $match): string { + return $match[1].getOpenCollectiveSponsors().$match[2]; + }, + file_get_contents('readme.md') +)); diff --git a/libraries/Carbon/src/Carbon/AbstractTranslator.php b/libraries/Carbon/src/Carbon/AbstractTranslator.php new file mode 100644 index 00000000000..7bc43fc5a05 --- /dev/null +++ b/libraries/Carbon/src/Carbon/AbstractTranslator.php @@ -0,0 +1,398 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Carbon\MessageFormatter\MessageFormatterMapper; +use Closure; +use ReflectionException; +use ReflectionFunction; +use EDD\Vendor\Symfony\Component\Translation; +use EDD\Vendor\Symfony\Component\Translation\Formatter\MessageFormatterInterface; +use EDD\Vendor\Symfony\Component\Translation\Loader\ArrayLoader; + +abstract class AbstractTranslator extends Translation\Translator +{ + /** + * Translator singletons for each language. + * + * @var array + */ + protected static $singletons = []; + + /** + * List of custom localized messages. + * + * @var array + */ + protected $messages = []; + + /** + * List of custom directories that contain translation files. + * + * @var string[] + */ + protected $directories = []; + + /** + * Set to true while constructing. + * + * @var bool + */ + protected $initializing = false; + + /** + * List of locales aliases. + * + * @var array + */ + protected $aliases = [ + 'me' => 'sr_Latn_ME', + 'scr' => 'sh', + ]; + + /** + * Return a singleton instance of Translator. + * + * @param string|null $locale optional initial locale ("en" - english by default) + * + * @return static + */ + public static function get($locale = null) + { + $locale = $locale ?: 'en'; + $key = static::class === Translator::class ? $locale : static::class.'|'.$locale; + + if (!isset(static::$singletons[$key])) { + static::$singletons[$key] = new static($locale); + } + + return static::$singletons[$key]; + } + + public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) + { + parent::setLocale($locale); + $this->initializing = true; + $this->directories = [__DIR__.'/Lang']; + $this->addLoader('array', new ArrayLoader()); + parent::__construct($locale, new MessageFormatterMapper($formatter), $cacheDir, $debug); + $this->initializing = false; + } + + /** + * Returns the list of directories translation files are searched in. + * + * @return array + */ + public function getDirectories(): array + { + return $this->directories; + } + + /** + * Set list of directories translation files are searched in. + * + * @param array $directories new directories list + * + * @return $this + */ + public function setDirectories(array $directories) + { + $this->directories = $directories; + + return $this; + } + + /** + * Add a directory to the list translation files are searched in. + * + * @param string $directory new directory + * + * @return $this + */ + public function addDirectory(string $directory) + { + $this->directories[] = $directory; + + return $this; + } + + /** + * Remove a directory from the list translation files are searched in. + * + * @param string $directory directory path + * + * @return $this + */ + public function removeDirectory(string $directory) + { + $search = rtrim(strtr($directory, '\\', '/'), '/'); + + return $this->setDirectories(array_filter($this->getDirectories(), function ($item) use ($search) { + return rtrim(strtr($item, '\\', '/'), '/') !== $search; + })); + } + + /** + * Reset messages of a locale (all locale if no locale passed). + * Remove custom messages and reload initial messages from matching + * file in Lang directory. + * + * @param string|null $locale + * + * @return bool + */ + public function resetMessages($locale = null) + { + if ($locale === null) { + $this->messages = []; + + return true; + } + + foreach ($this->getDirectories() as $directory) { + $data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale); + + if ($data !== false) { + $this->messages[$locale] = $data; + $this->addResource('array', $this->messages[$locale], $locale); + + return true; + } + } + + return false; + } + + /** + * Returns the list of files matching a given locale prefix (or all if empty). + * + * @param string $prefix prefix required to filter result + * + * @return array + */ + public function getLocalesFiles($prefix = '') + { + $files = []; + + foreach ($this->getDirectories() as $directory) { + $directory = rtrim($directory, '\\/'); + + foreach (glob("$directory/$prefix*.php") as $file) { + $files[] = $file; + } + } + + return array_unique($files); + } + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @param string $prefix prefix required to filter result + * + * @return array + */ + public function getAvailableLocales($prefix = '') + { + $locales = []; + foreach ($this->getLocalesFiles($prefix) as $file) { + $locales[] = substr($file, strrpos($file, '/') + 1, -4); + } + + return array_unique(array_merge($locales, array_keys($this->messages))); + } + + protected function translate(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string + { + if ($domain === null) { + $domain = 'messages'; + } + + $catalogue = $this->getCatalogue($locale); + $format = $this instanceof TranslatorStrongTypeInterface + ? $this->getFromCatalogue($catalogue, (string) $id, $domain) + : $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore + + if ($format instanceof Closure) { + // @codeCoverageIgnoreStart + try { + $count = (new ReflectionFunction($format))->getNumberOfRequiredParameters(); + } catch (ReflectionException $exception) { + $count = 0; + } + // @codeCoverageIgnoreEnd + + return $format( + ...array_values($parameters), + ...array_fill(0, max(0, $count - \count($parameters)), null) + ); + } + + return parent::trans($id, $parameters, $domain, $locale); + } + + /** + * Init messages language from matching file in Lang directory. + * + * @param string $locale + * + * @return bool + */ + protected function loadMessagesFromFile($locale) + { + return isset($this->messages[$locale]) || $this->resetMessages($locale); + } + + /** + * Set messages of a locale and take file first if present. + * + * @param string $locale + * @param array $messages + * + * @return $this + */ + public function setMessages($locale, $messages) + { + $this->loadMessagesFromFile($locale); + $this->addResource('array', $messages, $locale); + $this->messages[$locale] = array_merge( + $this->messages[$locale] ?? [], + $messages + ); + + return $this; + } + + /** + * Set messages of the current locale and take file first if present. + * + * @param array $messages + * + * @return $this + */ + public function setTranslations($messages) + { + return $this->setMessages($this->getLocale(), $messages); + } + + /** + * Get messages of a locale, if none given, return all the + * languages. + * + * @param string|null $locale + * + * @return array + */ + public function getMessages($locale = null) + { + return $locale === null ? $this->messages : $this->messages[$locale]; + } + + /** + * Set the current translator locale and indicate if the source locale file exists + * + * @param string $locale locale ex. en + * + * @return bool + */ + public function setLocale($locale) + { + $locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) { + // _2-letters or YUE is a region, _3+-letters is a variant + $upper = strtoupper($matches[1]); + + if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) < 3) { + return "_$upper"; + } + + return '_'.ucfirst($matches[1]); + }, strtolower($locale)); + + $previousLocale = $this->getLocale(); + + if ($previousLocale === $locale && isset($this->messages[$locale])) { + return true; + } + + unset(static::$singletons[$previousLocale]); + + if ($locale === 'auto') { + $completeLocale = setlocale(LC_TIME, '0'); + $locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale); + $locales = $this->getAvailableLocales($locale); + + $completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale); + + $getScore = function ($language) use ($completeLocaleChunks) { + return self::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); + }; + + usort($locales, function ($first, $second) use ($getScore) { + return $getScore($second) <=> $getScore($first); + }); + + $locale = $locales[0]; + } + + if (isset($this->aliases[$locale])) { + $locale = $this->aliases[$locale]; + } + + // If subtag (ex: en_CA) first load the macro (ex: en) to have a fallback + if (str_contains($locale, '_') && + $this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale)) + ) { + parent::setLocale($macroLocale); + } + + if (!$this->loadMessagesFromFile($locale) && !$this->initializing) { + return false; + } + + parent::setLocale($locale); + + return true; + } + + /** + * Show locale on var_dump(). + * + * @return array + */ + public function __debugInfo() + { + return [ + 'locale' => $this->getLocale(), + ]; + } + + private static function compareChunkLists($referenceChunks, $chunks) + { + $score = 0; + + foreach ($referenceChunks as $index => $chunk) { + if (!isset($chunks[$index])) { + $score++; + + continue; + } + + if (strtolower($chunks[$index]) === strtolower($chunk)) { + $score += 10; + } + } + + return $score; + } +} diff --git a/libraries/Carbon/src/Carbon/Carbon.php b/libraries/Carbon/src/Carbon/Carbon.php new file mode 100644 index 00000000000..e17f891b78c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Carbon.php @@ -0,0 +1,523 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Carbon\Traits\Date; +use EDD\Vendor\Carbon\Traits\DeprecatedProperties; +use DateTime; +use DateTimeInterface; +use DateTimeZone; + +/** + * A simple API extension for DateTime. + * + * @mixin DeprecatedProperties + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method $this years(int $value) Set current instance year to the given value. + * @method $this year(int $value) Set current instance year to the given value. + * @method $this setYears(int $value) Set current instance year to the given value. + * @method $this setYear(int $value) Set current instance year to the given value. + * @method $this months(int $value) Set current instance month to the given value. + * @method $this month(int $value) Set current instance month to the given value. + * @method $this setMonths(int $value) Set current instance month to the given value. + * @method $this setMonth(int $value) Set current instance month to the given value. + * @method $this days(int $value) Set current instance day to the given value. + * @method $this day(int $value) Set current instance day to the given value. + * @method $this setDays(int $value) Set current instance day to the given value. + * @method $this setDay(int $value) Set current instance day to the given value. + * @method $this hours(int $value) Set current instance hour to the given value. + * @method $this hour(int $value) Set current instance hour to the given value. + * @method $this setHours(int $value) Set current instance hour to the given value. + * @method $this setHour(int $value) Set current instance hour to the given value. + * @method $this minutes(int $value) Set current instance minute to the given value. + * @method $this minute(int $value) Set current instance minute to the given value. + * @method $this setMinutes(int $value) Set current instance minute to the given value. + * @method $this setMinute(int $value) Set current instance minute to the given value. + * @method $this seconds(int $value) Set current instance second to the given value. + * @method $this second(int $value) Set current instance second to the given value. + * @method $this setSeconds(int $value) Set current instance second to the given value. + * @method $this setSecond(int $value) Set current instance second to the given value. + * @method $this millis(int $value) Set current instance millisecond to the given value. + * @method $this milli(int $value) Set current instance millisecond to the given value. + * @method $this setMillis(int $value) Set current instance millisecond to the given value. + * @method $this setMilli(int $value) Set current instance millisecond to the given value. + * @method $this milliseconds(int $value) Set current instance millisecond to the given value. + * @method $this millisecond(int $value) Set current instance millisecond to the given value. + * @method $this setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method $this setMillisecond(int $value) Set current instance millisecond to the given value. + * @method $this micros(int $value) Set current instance microsecond to the given value. + * @method $this micro(int $value) Set current instance microsecond to the given value. + * @method $this setMicros(int $value) Set current instance microsecond to the given value. + * @method $this setMicro(int $value) Set current instance microsecond to the given value. + * @method $this microseconds(int $value) Set current instance microsecond to the given value. + * @method $this microsecond(int $value) Set current instance microsecond to the given value. + * @method $this setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method $this setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method $this addYear() Add one year to the instance (using date interval). + * @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method $this subYear() Sub one year to the instance (using date interval). + * @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method $this addMonth() Add one month to the instance (using date interval). + * @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method $this subMonth() Sub one month to the instance (using date interval). + * @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method $this addDay() Add one day to the instance (using date interval). + * @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method $this subDay() Sub one day to the instance (using date interval). + * @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method $this addHour() Add one hour to the instance (using date interval). + * @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method $this subHour() Sub one hour to the instance (using date interval). + * @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method $this addMinute() Add one minute to the instance (using date interval). + * @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method $this subMinute() Sub one minute to the instance (using date interval). + * @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method $this addSecond() Add one second to the instance (using date interval). + * @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method $this subSecond() Sub one second to the instance (using date interval). + * @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMilli() Add one millisecond to the instance (using date interval). + * @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMilli() Sub one millisecond to the instance (using date interval). + * @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMillisecond() Add one millisecond to the instance (using date interval). + * @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMillisecond() Sub one millisecond to the instance (using date interval). + * @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMicro() Add one microsecond to the instance (using date interval). + * @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMicro() Sub one microsecond to the instance (using date interval). + * @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMicrosecond() Add one microsecond to the instance (using date interval). + * @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method $this addMillennium() Add one millennium to the instance (using date interval). + * @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method $this subMillennium() Sub one millennium to the instance (using date interval). + * @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method $this addCentury() Add one century to the instance (using date interval). + * @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method $this subCentury() Sub one century to the instance (using date interval). + * @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method $this addDecade() Add one decade to the instance (using date interval). + * @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method $this subDecade() Sub one decade to the instance (using date interval). + * @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method $this addQuarter() Add one quarter to the instance (using date interval). + * @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method $this subQuarter() Sub one quarter to the instance (using date interval). + * @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method $this addWeek() Add one week to the instance (using date interval). + * @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method $this subWeek() Sub one week to the instance (using date interval). + * @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method $this addWeekday() Add one weekday to the instance (using date interval). + * @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method $this subWeekday() Sub one weekday to the instance (using date interval). + * @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMicro() Add one microsecond to the instance (using timestamp). + * @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMilli() Add one millisecond to the instance (using timestamp). + * @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealSecond() Add one second to the instance (using timestamp). + * @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each second or every X seconds if a factor is given. + * @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMinute() Add one minute to the instance (using timestamp). + * @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each minute or every X minutes if a factor is given. + * @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method $this addRealHour() Add one hour to the instance (using timestamp). + * @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method $this subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each hour or every X hours if a factor is given. + * @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method $this addRealDay() Add one day to the instance (using timestamp). + * @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method $this subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each day or every X days if a factor is given. + * @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method $this addRealWeek() Add one week to the instance (using timestamp). + * @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method $this subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each week or every X weeks if a factor is given. + * @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMonth() Add one month to the instance (using timestamp). + * @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each month or every X months if a factor is given. + * @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method $this addRealQuarter() Add one quarter to the instance (using timestamp). + * @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method $this subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each quarter or every X quarters if a factor is given. + * @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method $this addRealYear() Add one year to the instance (using timestamp). + * @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method $this subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each year or every X years if a factor is given. + * @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method $this addRealDecade() Add one decade to the instance (using timestamp). + * @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method $this subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each decade or every X decades if a factor is given. + * @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method $this addRealCentury() Add one century to the instance (using timestamp). + * @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method $this subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each century or every X centuries if a factor is given. + * @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMillennium() Add one millennium to the instance (using timestamp). + * @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millennium or every X millennia if a factor is given. + * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new EDD\Vendor\Carbon object according to the specified format. + * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php + * + * + */ +class Carbon extends DateTime implements CarbonInterface +{ + use Date; + + /** + * Returns true if the current class/instance is mutable. + * + * @return bool + */ + public static function isMutable() + { + return true; + } +} diff --git a/libraries/Carbon/src/Carbon/CarbonConverterInterface.php b/libraries/Carbon/src/Carbon/CarbonConverterInterface.php new file mode 100644 index 00000000000..901b0ba5cc1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/CarbonConverterInterface.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use DateTimeInterface; + +interface CarbonConverterInterface +{ + public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface; +} diff --git a/libraries/Carbon/src/Carbon/CarbonImmutable.php b/libraries/Carbon/src/Carbon/CarbonImmutable.php new file mode 100644 index 00000000000..4221517064f --- /dev/null +++ b/libraries/Carbon/src/Carbon/CarbonImmutable.php @@ -0,0 +1,582 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Carbon\Traits\Date; +use EDD\Vendor\Carbon\Traits\DeprecatedProperties; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; + +/** + * A simple API extension for DateTimeImmutable. + * + * @mixin DeprecatedProperties + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method CarbonImmutable years(int $value) Set current instance year to the given value. + * @method CarbonImmutable year(int $value) Set current instance year to the given value. + * @method CarbonImmutable setYears(int $value) Set current instance year to the given value. + * @method CarbonImmutable setYear(int $value) Set current instance year to the given value. + * @method CarbonImmutable months(int $value) Set current instance month to the given value. + * @method CarbonImmutable month(int $value) Set current instance month to the given value. + * @method CarbonImmutable setMonths(int $value) Set current instance month to the given value. + * @method CarbonImmutable setMonth(int $value) Set current instance month to the given value. + * @method CarbonImmutable days(int $value) Set current instance day to the given value. + * @method CarbonImmutable day(int $value) Set current instance day to the given value. + * @method CarbonImmutable setDays(int $value) Set current instance day to the given value. + * @method CarbonImmutable setDay(int $value) Set current instance day to the given value. + * @method CarbonImmutable hours(int $value) Set current instance hour to the given value. + * @method CarbonImmutable hour(int $value) Set current instance hour to the given value. + * @method CarbonImmutable setHours(int $value) Set current instance hour to the given value. + * @method CarbonImmutable setHour(int $value) Set current instance hour to the given value. + * @method CarbonImmutable minutes(int $value) Set current instance minute to the given value. + * @method CarbonImmutable minute(int $value) Set current instance minute to the given value. + * @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value. + * @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value. + * @method CarbonImmutable seconds(int $value) Set current instance second to the given value. + * @method CarbonImmutable second(int $value) Set current instance second to the given value. + * @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value. + * @method CarbonImmutable setSecond(int $value) Set current instance second to the given value. + * @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addYear() Add one year to the instance (using date interval). + * @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subYear() Sub one year to the instance (using date interval). + * @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMonth() Add one month to the instance (using date interval). + * @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMonth() Sub one month to the instance (using date interval). + * @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addDay() Add one day to the instance (using date interval). + * @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subDay() Sub one day to the instance (using date interval). + * @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addHour() Add one hour to the instance (using date interval). + * @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subHour() Sub one hour to the instance (using date interval). + * @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMinute() Add one minute to the instance (using date interval). + * @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval). + * @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addSecond() Add one second to the instance (using date interval). + * @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subSecond() Sub one second to the instance (using date interval). + * @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval). + * @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval). + * @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval). + * @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval). + * @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval). + * @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval). + * @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval). + * @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval). + * @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval). + * @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addCentury() Add one century to the instance (using date interval). + * @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subCentury() Sub one century to the instance (using date interval). + * @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addDecade() Add one decade to the instance (using date interval). + * @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval). + * @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval). + * @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval). + * @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addWeek() Add one week to the instance (using date interval). + * @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subWeek() Sub one week to the instance (using date interval). + * @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval). + * @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval). + * @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp). + * @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp). + * @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp). + * @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each second or every X seconds if a factor is given. + * @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp). + * @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each minute or every X minutes if a factor is given. + * @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp). + * @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each hour or every X hours if a factor is given. + * @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp). + * @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each day or every X days if a factor is given. + * @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp). + * @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each week or every X weeks if a factor is given. + * @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp). + * @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each month or every X months if a factor is given. + * @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp). + * @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each quarter or every X quarters if a factor is given. + * @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp). + * @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each year or every X years if a factor is given. + * @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp). + * @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each decade or every X decades if a factor is given. + * @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp). + * @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each century or every X centuries if a factor is given. + * @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp). + * @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millennium or every X millennia if a factor is given. + * @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format. + * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php + * + * + */ +class CarbonImmutable extends DateTimeImmutable implements CarbonInterface +{ + use Date { + __clone as dateTraitClone; + } + + public function __clone() + { + $this->dateTraitClone(); + $this->endOfTime = false; + $this->startOfTime = false; + } + + /** + * Create a very old date representing start of time. + * + * @return static + */ + public static function startOfTime(): self + { + $date = static::parse('0001-01-01')->years(self::getStartOfTimeYear()); + $date->startOfTime = true; + + return $date; + } + + /** + * Create a very far date representing end of time. + * + * @return static + */ + public static function endOfTime(): self + { + $date = static::parse('9999-12-31 23:59:59.999999')->years(self::getEndOfTimeYear()); + $date->endOfTime = true; + + return $date; + } + + /** + * @codeCoverageIgnore + */ + private static function getEndOfTimeYear(): int + { + if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { + return 145261681241552; + } + + // Remove if https://bugs.php.net/bug.php?id=81107 is fixed + if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { + return 1118290769066902787; + } + + return PHP_INT_MAX; + } + + /** + * @codeCoverageIgnore + */ + private static function getStartOfTimeYear(): int + { + if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { + return -135908816449551; + } + + // Remove if https://bugs.php.net/bug.php?id=81107 is fixed + if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { + return -1118290769066898816; + } + + return max(PHP_INT_MIN, -9223372036854773760); + } +} diff --git a/libraries/Carbon/src/Carbon/CarbonInterface.php b/libraries/Carbon/src/Carbon/CarbonInterface.php new file mode 100644 index 00000000000..f09e31e3844 --- /dev/null +++ b/libraries/Carbon/src/Carbon/CarbonInterface.php @@ -0,0 +1,5142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use BadMethodCallException; +use EDD\Vendor\Carbon\Exceptions\BadComparisonUnitException; +use EDD\Vendor\Carbon\Exceptions\ImmutableException; +use EDD\Vendor\Carbon\Exceptions\InvalidDateException; +use EDD\Vendor\Carbon\Exceptions\InvalidFormatException; +use EDD\Vendor\Carbon\Exceptions\UnknownGetterException; +use EDD\Vendor\Carbon\Exceptions\UnknownMethodException; +use EDD\Vendor\Carbon\Exceptions\UnknownSetterException; +use Closure; +use DateInterval; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use JsonSerializable; +use ReflectionException; +use ReturnTypeWillChange; +use EDD\Vendor\Symfony\Component\Translation\TranslatorInterface; +use Throwable; + +/** + * Common interface for EDD\Vendor\Carbon and CarbonImmutable. + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method CarbonInterface years(int $value) Set current instance year to the given value. + * @method CarbonInterface year(int $value) Set current instance year to the given value. + * @method CarbonInterface setYears(int $value) Set current instance year to the given value. + * @method CarbonInterface setYear(int $value) Set current instance year to the given value. + * @method CarbonInterface months(int $value) Set current instance month to the given value. + * @method CarbonInterface month(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. + * @method CarbonInterface days(int $value) Set current instance day to the given value. + * @method CarbonInterface day(int $value) Set current instance day to the given value. + * @method CarbonInterface setDays(int $value) Set current instance day to the given value. + * @method CarbonInterface setDay(int $value) Set current instance day to the given value. + * @method CarbonInterface hours(int $value) Set current instance hour to the given value. + * @method CarbonInterface hour(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. + * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface minute(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. + * @method CarbonInterface seconds(int $value) Set current instance second to the given value. + * @method CarbonInterface second(int $value) Set current instance second to the given value. + * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. + * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. + * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addYear() Add one year to the instance (using date interval). + * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subYear() Sub one year to the instance (using date interval). + * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMonth() Add one month to the instance (using date interval). + * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). + * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDay() Add one day to the instance (using date interval). + * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDay() Sub one day to the instance (using date interval). + * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addHour() Add one hour to the instance (using date interval). + * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). + * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). + * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). + * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addSecond() Add one second to the instance (using date interval). + * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). + * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). + * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). + * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addCentury() Add one century to the instance (using date interval). + * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). + * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). + * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). + * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). + * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). + * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeek() Add one week to the instance (using date interval). + * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). + * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). + * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). + * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). + * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each second or every X seconds if a factor is given. + * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). + * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each minute or every X minutes if a factor is given. + * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). + * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each hour or every X hours if a factor is given. + * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). + * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each day or every X days if a factor is given. + * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). + * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each week or every X weeks if a factor is given. + * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). + * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each month or every X months if a factor is given. + * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). + * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each quarter or every X quarters if a factor is given. + * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). + * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each year or every X years if a factor is given. + * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). + * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each decade or every X decades if a factor is given. + * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). + * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each century or every X centuries if a factor is given. + * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). + * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millennium or every X millennia if a factor is given. + * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * + * + */ +interface CarbonInterface extends DateTimeInterface, JsonSerializable +{ + /** + * Diff wording options(expressed in octal). + */ + public const NO_ZERO_DIFF = 01; + public const JUST_NOW = 02; + public const ONE_DAY_WORDS = 04; + public const TWO_DAY_WORDS = 010; + public const SEQUENTIAL_PARTS_ONLY = 020; + public const ROUND = 040; + public const FLOOR = 0100; + public const CEIL = 0200; + + /** + * Diff syntax options. + */ + public const DIFF_ABSOLUTE = 1; // backward compatibility with true + public const DIFF_RELATIVE_AUTO = 0; // backward compatibility with false + public const DIFF_RELATIVE_TO_NOW = 2; + public const DIFF_RELATIVE_TO_OTHER = 3; + + /** + * Translate string options. + */ + public const TRANSLATE_MONTHS = 1; + public const TRANSLATE_DAYS = 2; + public const TRANSLATE_UNITS = 4; + public const TRANSLATE_MERIDIEM = 8; + public const TRANSLATE_DIFF = 0x10; + public const TRANSLATE_ALL = self::TRANSLATE_MONTHS | self::TRANSLATE_DAYS | self::TRANSLATE_UNITS | self::TRANSLATE_MERIDIEM | self::TRANSLATE_DIFF; + + /** + * The day constants. + */ + public const SUNDAY = 0; + public const MONDAY = 1; + public const TUESDAY = 2; + public const WEDNESDAY = 3; + public const THURSDAY = 4; + public const FRIDAY = 5; + public const SATURDAY = 6; + + /** + * The month constants. + * These aren't used by EDD\Vendor\Carbon itself but exist for + * convenience sake alone. + */ + public const JANUARY = 1; + public const FEBRUARY = 2; + public const MARCH = 3; + public const APRIL = 4; + public const MAY = 5; + public const JUNE = 6; + public const JULY = 7; + public const AUGUST = 8; + public const SEPTEMBER = 9; + public const OCTOBER = 10; + public const NOVEMBER = 11; + public const DECEMBER = 12; + + /** + * Number of X in Y. + */ + public const YEARS_PER_MILLENNIUM = 1000; + public const YEARS_PER_CENTURY = 100; + public const YEARS_PER_DECADE = 10; + public const MONTHS_PER_YEAR = 12; + public const MONTHS_PER_QUARTER = 3; + public const QUARTERS_PER_YEAR = 4; + public const WEEKS_PER_YEAR = 52; + public const WEEKS_PER_MONTH = 4; + public const DAYS_PER_YEAR = 365; + public const DAYS_PER_WEEK = 7; + public const HOURS_PER_DAY = 24; + public const MINUTES_PER_HOUR = 60; + public const SECONDS_PER_MINUTE = 60; + public const MILLISECONDS_PER_SECOND = 1000; + public const MICROSECONDS_PER_MILLISECOND = 1000; + public const MICROSECONDS_PER_SECOND = 1000000; + + /** + * Special settings to get the start of week from current locale culture. + */ + public const WEEK_DAY_AUTO = 'auto'; + + /** + * RFC7231 DateTime format. + * + * @var string + */ + public const RFC7231_FORMAT = 'D, d M Y H:i:s \G\M\T'; + + /** + * Default format to use for __toString method when type juggling occurs. + * + * @var string + */ + public const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; + + /** + * Format for converting mocked time, includes microseconds. + * + * @var string + */ + public const MOCK_DATETIME_FORMAT = 'Y-m-d H:i:s.u'; + + /** + * Pattern detection for ->isoFormat and ::createFromIsoFormat. + * + * @var string + */ + public const ISO_FORMAT_REGEXP = '(O[YMDHhms]|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY?|g{1,5}|G{1,5}|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?)'; + + // + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable + * + * @return mixed + */ + public function __call($method, $parameters); + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws BadMethodCallException + * + * @return mixed + */ + public static function __callStatic($method, $parameters); + + /** + * Update constructedObjectId on cloned. + */ + public function __clone(); + + /** + * Create a new EDD\Vendor\Carbon instance. + * + * Please see the testing aids section (specifically static::setTestNow()) + * for more on the possibility of this constructor returning a test instance. + * + * @param DateTimeInterface|string|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + */ + public function __construct($time = null, $tz = null); + + /** + * Show truthy properties on var_dump(). + * + * @return array + */ + public function __debugInfo(); + + /** + * Get a part of the EDD\Vendor\Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function __get($name); + + /** + * Check if an attribute exists on the object + * + * @param string $name + * + * @return bool + */ + public function __isset($name); + + /** + * Set a part of the EDD\Vendor\Carbon object + * + * @param string $name + * @param string|int|DateTimeZone $value + * + * @throws UnknownSetterException|ReflectionException + * + * @return void + */ + public function __set($name, $value); + + /** + * The __set_state handler. + * + * @param string|array $dump + * + * @return static + */ + #[ReturnTypeWillChange] + public static function __set_state($dump); + + /** + * Returns the list of properties to dump on serialize() called on. + * + * Only used by PHP < 7.4. + * + * @return array + */ + public function __sleep(); + + /** + * Format the instance as a string using the set format + * + * @example + * ``` + * echo Carbon::now(); // EDD\Vendor\Carbon instances can be cast to string + * ``` + * + * @return string + */ + public function __toString(); + + /** + * Add given units or interval to the current instance. + * + * @example $date->add('hour', 3) + * @example $date->add(15, 'days') + * @example $date->add(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function add($unit, $value = 1, $overflow = null); + + /** + * Add seconds to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param string $unit + * @param int $value + * + * @return static + */ + public function addRealUnit($unit, $value = 1); + + /** + * Add given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function addUnit($unit, $value = 1, $overflow = null); + + /** + * Add any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to add to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function addUnitNoOverflow($valueUnit, $value, $overflowUnit); + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function ago($syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Modify the current instance to the average of a given instance (default now) and the current instance + * (second-precision). + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date + * + * @return static + */ + public function average($date = null); + + /** + * Clone the current instance if it's mutable. + * + * This method is convenient to ensure you don't mutate the initial object + * but avoid to make a useless copy of it if it's already immutable. + * + * @return static + */ + public function avoidMutation(); + + /** + * Determines if the instance is between two others. + * + * The third argument allow you to specify if bounds are included or not (true by default) + * but for when you including/excluding bounds may produce different results in your application, + * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function between($date1, $date2, $equal = true): bool; + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenExcluded($date1, $date2): bool; + + /** + * Determines if the instance is between two others, bounds included. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenIncluded($date1, $date2): bool; + + /** + * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, + * or a calendar date (e.g. "10/29/2017") otherwise. + * + * Language, date and time formats will change according to the current locale. + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|null $referenceTime + * @param array $formats + * + * @return string + */ + public function calendar($referenceTime = null, array $formats = []); + + /** + * Checks if the (date)time string is in a given format and valid to create a + * new instance. + * + * @example + * ``` + * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true + * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function canBeCreatedFromFormat($date, $format); + + /** + * Return the EDD\Vendor\Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param EDD\Vendor\Carbon|\EDD\Vendor\Carbon\CarbonPeriod|\EDD\Vendor\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date + * + * @return static + */ + public function carbonize($date = null); + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateTimeInterface + */ + public function cast(string $className); + + /** + * Ceil the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function ceil($precision = 1); + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function ceilUnit($unit, $precision = 1); + + /** + * Ceil the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function ceilWeek($weekStartsAt = null); + + /** + * Similar to native modify() method of DateTime but can handle more grammars. + * + * @example + * ``` + * echo Carbon::now()->change('next 2pm'); + * ``` + * + * @link https://php.net/manual/en/datetime.modify.php + * + * @param string $modifier + * + * @return static|false + */ + public function change($modifier); + + /** + * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. + * foreach ($date as $_) {} + * serializer($date) + * var_export($date) + * get_object_vars($date) + */ + public function cleanupDumpProperties(); + + /** + * @alias copy + * + * Get a copy of the instance. + * + * @return static + */ + public function clone(); + + /** + * Get the closest date from the instance (second-precision). + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function closest($date1, $date2); + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy(); + + /** + * Create a new EDD\Vendor\Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * @param DateTimeInterface|int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to now. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromDate($year = null, $month = null, $day = null, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + #[ReturnTypeWillChange] + public static function createFromFormat($format, $time, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz optional timezone + * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null); + + /** + * Create a EDD\Vendor\Carbon instance from a specific format and a string in a given language. + * + * @param string $format Datetime format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleFormat($format, $locale, $time, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from a specific ISO format and a string in a given language. + * + * @param string $format Datetime ISO format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from just a time. The date portion is set to today. + * + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from a time string. The date portion is set to today. + * + * @param string $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTimeString($time, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from a timestamp and set the timezone (use default one if not specified). + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestamp($timestamp, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestampMs($timestamp, $tz = null); + + /** + * Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampMsUTC($timestamp); + + /** + * Create a EDD\Vendor\Carbon instance from an timestamp keeping the timezone to UTC. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampUTC($timestamp); + + /** + * Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to midnight. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null); + + /** + * Create a new safe EDD\Vendor\Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidDateException + * + * @return static|false + */ + public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null); + + /** + * Create a new EDD\Vendor\Carbon instance from a specific date and time using strict validation. + * + * @see create() + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null); + + /** + * Get/set the day of year. + * + * @param int|null $value new value for day of year if using as setter. + * + * @return static|int + */ + public function dayOfYear($value = null); + + /** + * Get the difference as a CarbonInterval instance. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return CarbonInterval + */ + public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []); + + /** + * Get the difference by the given interval using a filter closure. + * + * @param CarbonInterval $ci An interval to traverse by + * @param Closure $callback + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true); + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @example + * ``` + * echo Carbon::tomorrow()->diffForHumans() . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; + * ``` + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, µs). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get the difference in days rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDays($date = null, $absolute = true); + + /** + * Get the difference in days using a filter closure rounded down. + * + * @param Closure $callback + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true); + + /** + * Get the difference in hours rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHours($date = null, $absolute = true); + + /** + * Get the difference in hours using a filter closure rounded down. + * + * @param Closure $callback + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true); + + /** + * Get the difference in microseconds. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMicroseconds($date = null, $absolute = true); + + /** + * Get the difference in milliseconds rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMilliseconds($date = null, $absolute = true); + + /** + * Get the difference in minutes rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMinutes($date = null, $absolute = true); + + /** + * Get the difference in months rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMonths($date = null, $absolute = true); + + /** + * Get the difference in quarters rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInQuarters($date = null, $absolute = true); + + /** + * Get the difference in hours rounded down using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealHours($date = null, $absolute = true); + + /** + * Get the difference in microseconds using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMicroseconds($date = null, $absolute = true); + + /** + * Get the difference in milliseconds rounded down using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMilliseconds($date = null, $absolute = true); + + /** + * Get the difference in minutes rounded down using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMinutes($date = null, $absolute = true); + + /** + * Get the difference in seconds using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealSeconds($date = null, $absolute = true); + + /** + * Get the difference in seconds rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInSeconds($date = null, $absolute = true); + + /** + * Get the difference in weekdays rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekdays($date = null, $absolute = true); + + /** + * Get the difference in weekend days using a filter rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekendDays($date = null, $absolute = true); + + /** + * Get the difference in weeks rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeeks($date = null, $absolute = true); + + /** + * Get the difference in years + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInYears($date = null, $absolute = true); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function disableHumanDiffOption($humanDiffOption); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function enableHumanDiffOption($humanDiffOption); + + /** + * Modify to end of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function endOf($unit, ...$params); + + /** + * Resets the date to end of the century and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); + * ``` + * + * @return static + */ + public function endOfCentury(); + + /** + * Resets the time to 23:59:59.999999 end of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); + * ``` + * + * @return static + */ + public function endOfDay(); + + /** + * Resets the date to end of the decade and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); + * ``` + * + * @return static + */ + public function endOfDecade(); + + /** + * Modify to end of current hour, minutes and seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); + * ``` + * + * @return static + */ + public function endOfHour(); + + /** + * Resets the date to end of the millennium and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); + * ``` + * + * @return static + */ + public function endOfMillennium(); + + /** + * Modify to end of current minute, seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); + * ``` + * + * @return static + */ + public function endOfMinute(); + + /** + * Resets the date to end of the month and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); + * ``` + * + * @return static + */ + public function endOfMonth(); + + /** + * Resets the date to end of the quarter and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); + * ``` + * + * @return static + */ + public function endOfQuarter(); + + /** + * Modify to end of current second, microseconds become 999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->endOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function endOfSecond(); + + /** + * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; + * ``` + * + * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week + * + * @return static + */ + public function endOfWeek($weekEndsAt = null); + + /** + * Resets the date to end of the year and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); + * ``` + * + * @return static + */ + public function endOfYear(); + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see equalTo() + * + * @return bool + */ + public function eq($date): bool; + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function equalTo($date): bool; + + /** + * Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * + * @param string $locale locale ex. en + * @param callable $func + * + * @return mixed + */ + public static function executeWithLocale($locale, $func); + + /** + * Get the farthest date from the instance (second-precision). + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function farthest($date1, $date2); + + /** + * Modify to the first occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * first day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function firstOfMonth($dayOfWeek = null); + + /** + * Modify to the first occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * first day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfQuarter($dayOfWeek = null); + + /** + * Modify to the first occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * first day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfYear($dayOfWeek = null); + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInDays($date = null, $absolute = true); + + /** + * Get the difference in hours as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInHours($date = null, $absolute = true); + + /** + * Get the difference in minutes as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMinutes($date = null, $absolute = true); + + /** + * Get the difference in months as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMonths($date = null, $absolute = true); + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealDays($date = null, $absolute = true); + + /** + * Get the difference in hours as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealHours($date = null, $absolute = true); + + /** + * Get the difference in minutes as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMinutes($date = null, $absolute = true); + + /** + * Get the difference in months as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMonths($date = null, $absolute = true); + + /** + * Get the difference in seconds as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealSeconds($date = null, $absolute = true); + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealWeeks($date = null, $absolute = true); + + /** + * Get the difference in year as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealYears($date = null, $absolute = true); + + /** + * Get the difference in seconds as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInSeconds($date = null, $absolute = true); + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInWeeks($date = null, $absolute = true); + + /** + * Get the difference in year as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInYears($date = null, $absolute = true); + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function floor($precision = 1); + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function floorUnit($unit, $precision = 1); + + /** + * Truncate the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function floorWeek($weekStartsAt = null); + + /** + * Format the instance with the current locale. You can set the current + * locale using setlocale() https://php.net/setlocale. + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat() instead. + * Deprecated since 2.55.0 + * + * @param string $format + * + * @return string + */ + public function formatLocalized($format); + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get the difference in a human readable format in the current locale from current + * instance to now. + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function fromNow($syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Create an instance from a serialized string. + * + * @param string $value + * + * @throws InvalidFormatException + * + * @return static + */ + public static function fromSerialized($value); + + /** + * Register a custom macro. + * + * @param object|callable $macro + * @param int $priority marco with higher priority is tried first + * + * @return void + */ + public static function genericMacro($macro, $priority = 0); + + /** + * Get a part of the EDD\Vendor\Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function get($name); + + /** + * Returns the alternative number for a given date property if available in the current locale. + * + * @param string $key date property + * + * @return string + */ + public function getAltNumber(string $key): string; + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @return array + */ + public static function getAvailableLocales(); + + /** + * Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * + * @return Language[] + */ + public static function getAvailableLocalesInfo(); + + /** + * Returns list of calendar formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getCalendarFormats($locale = null); + + /** + * Get the days of the week + * + * @return array + */ + public static function getDays(); + + /** + * Return the number of days since the start of the week (using the current locale or the first parameter + * if explicitly given). + * + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return int + */ + public function getDaysFromStartOfWeek(?int $weekStartsAt = null): int; + + /** + * Get the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @return string|null + */ + public static function getFallbackLocale(); + + /** + * List of replacements from date() format to isoFormat(). + * + * @return array + */ + public static function getFormatsToIsoReplacements(); + + /** + * Return default humanDiff() options (merged flags as integer). + * + * @return int + */ + public static function getHumanDiffOptions(); + + /** + * Returns list of locale formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getIsoFormats($locale = null); + + /** + * Returns list of locale units for ISO formatting. + * + * @return array + */ + public static function getIsoUnits(); + + /** + * {@inheritdoc} + * + * @return array + */ + #[ReturnTypeWillChange] + public static function getLastErrors(); + + /** + * Get the raw callable macro registered globally or locally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public function getLocalMacro($name); + + /** + * Get the translator of the current instance or the default if none set. + * + * @return \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + public function getLocalTranslator(); + + /** + * Get the current translator locale. + * + * @return string + */ + public static function getLocale(); + + /** + * Get the raw callable macro registered globally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public static function getMacro($name); + + /** + * get midday/noon hour + * + * @return int + */ + public static function getMidDayAt(); + + /** + * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). + * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first + * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something + * like "-12:00". + * + * @param string $separator string to place between hours and minutes (":" by default) + * + * @return string + */ + public function getOffsetString($separator = ':'); + + /** + * Returns a unit of the instance padded with 0 by default or any other string if specified. + * + * @param string $unit EDD\Vendor\Carbon unit name + * @param int $length Length of the output (2 by default) + * @param string $padString String to use for padding ("0" by default) + * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) + * + * @return string + */ + public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = 0); + + /** + * Returns a timestamp rounded with the given precision (6 by default). + * + * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) + * @example getPreciseTimestamp(6) 1532087464437474 + * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) + * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) + * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) + * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) + * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) + * @example getPreciseTimestamp(0) 1532087464 (second precision) + * @example getPreciseTimestamp(-1) 153208746 (10 second precision) + * @example getPreciseTimestamp(-2) 15320875 (100 second precision) + * + * @param int $precision + * + * @return float + */ + public function getPreciseTimestamp($precision = 6); + + /** + * Returns current local settings. + * + * @return array + */ + public function getSettings(); + + /** + * Get the EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * + * @return Closure|static the current instance used for testing + */ + public static function getTestNow(); + + /** + * Return a format from H:i to H:i:s.u according to given unit precision. + * + * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" + * + * @return string + */ + public static function getTimeFormatByPrecision($unitPrecision); + + /** + * Returns the timestamp with millisecond precision. + * + * @return int + */ + public function getTimestampMs(); + + /** + * Get the translation of the current week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "", "_short" or "_min" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null); + + /** + * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedMinDayName($context = null); + + /** + * Get the translation of the current month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "" or "_short" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null); + + /** + * Get the translation of the current short week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortDayName($context = null); + + /** + * Get the translation of the current short month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortMonthName($context = null); + + /** + * Returns raw translation message for a given key. + * + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use + * + * @return string + */ + public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null); + + /** + * Returns raw translation message for a given key. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator the translator to use + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * + * @return string + */ + public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null); + + /** + * Get the default translator instance in use. + * + * @return \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator(); + + /** + * Get the last day of week + * + * @return int + */ + public static function getWeekEndsAt(); + + /** + * Get the first day of week + * + * @return int + */ + public static function getWeekStartsAt(); + + /** + * Get weekend days + * + * @return array + */ + public static function getWeekendDays(); + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThan($date): bool; + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThanOrEqualTo($date): bool; + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function gt($date): bool; + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThanOrEqualTo() + * + * @return bool + */ + public function gte($date): bool; + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormat($date, $format); + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true + * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormatWithModifiers($date, $format): bool; + + /** + * Checks if macro is registered globally or locally. + * + * @param string $name + * + * @return bool + */ + public function hasLocalMacro($name); + + /** + * Return true if the current instance has its own translator. + * + * @return bool + */ + public function hasLocalTranslator(); + + /** + * Checks if macro is registered globally. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name); + + /** + * Determine if a time string will produce a relative date. + * + * @param string $time + * + * @return bool true if time match a relative date, false if absolute or invalid time string + */ + public static function hasRelativeKeywords($time); + + /** + * Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * + * @return bool true if there is a test instance, otherwise false + */ + public static function hasTestNow(); + + /** + * Create a EDD\Vendor\Carbon instance from a DateTime one. + * + * @param DateTimeInterface $date + * + * @return static + */ + public static function instance($date); + + /** + * Returns true if the current date matches the given string. + * + * @example + * ``` + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false + * ``` + * + * @param string $tester day name, month name, hour, date, etc. as string + * + * @return bool + */ + public function is(string $tester); + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function isAfter($date): bool; + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function isBefore($date): bool; + + /** + * Determines if the instance is between two others + * + * @example + * ``` + * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function isBetween($date1, $date2, $equal = true): bool; + + /** + * Check if its the birthday. Compares the date/month values of the two dates. + * + * @example + * ``` + * Carbon::now()->subYears(5)->isBirthday(); // true + * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @return bool + */ + public function isBirthday($date = null); + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::now()->isCurrentUnit('hour'); // true + * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false + * ``` + * + * @param string $unit The unit to test. + * + * @throws BadMethodCallException + * + * @return bool + */ + public function isCurrentUnit($unit); + + /** + * Checks if this day is a specific day of the week. + * + * @example + * ``` + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false + * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true + * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false + * ``` + * + * @param int $dayOfWeek + * + * @return bool + */ + public function isDayOfWeek($dayOfWeek); + + /** + * Check if the instance is end of day. + * + * @example + * ``` + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isEndOfDay($checkMicroseconds = false); + + /** + * Returns true if the date was created using CarbonImmutable::endOfTime() + * + * @return bool + */ + public function isEndOfTime(): bool; + + /** + * Determines if the instance is in the future, ie. greater (after) than now. + * + * @example + * ``` + * Carbon::now()->addHours(5)->isFuture(); // true + * Carbon::now()->subHours(5)->isFuture(); // false + * ``` + * + * @return bool + */ + public function isFuture(); + + /** + * Returns true if the current class/instance is immutable. + * + * @return bool + */ + public static function isImmutable(); + + /** + * Check if today is the last day of the Month + * + * @example + * ``` + * Carbon::parse('2019-02-28')->isLastOfMonth(); // true + * Carbon::parse('2019-03-28')->isLastOfMonth(); // false + * Carbon::parse('2019-03-30')->isLastOfMonth(); // false + * Carbon::parse('2019-03-31')->isLastOfMonth(); // true + * Carbon::parse('2019-04-30')->isLastOfMonth(); // true + * ``` + * + * @return bool + */ + public function isLastOfMonth(); + + /** + * Determines if the instance is a leap year. + * + * @example + * ``` + * Carbon::parse('2020-01-01')->isLeapYear(); // true + * Carbon::parse('2019-01-01')->isLeapYear(); // false + * ``` + * + * @return bool + */ + public function isLeapYear(); + + /** + * Determines if the instance is a long year (using ISO 8601 year). + * + * @example + * ``` + * Carbon::parse('2015-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-03')->isLongIsoYear(); // false + * Carbon::parse('2019-12-29')->isLongIsoYear(); // false + * Carbon::parse('2019-12-30')->isLongIsoYear(); // true + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongIsoYear(); + + /** + * Determines if the instance is a long year (using calendar year). + * + * ⚠️ This method completely ignores month and day to use the numeric year number, + * it's not correct if the exact date matters. For instance as `2019-12-30` is already + * in the first week of the 2020 year, if you want to know from this date if ISO week + * year 2020 is a long year, use `isLongIsoYear` instead. + * + * @example + * ``` + * Carbon::create(2015)->isLongYear(); // true + * Carbon::create(2016)->isLongYear(); // false + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongYear(); + + /** + * Check if the instance is midday. + * + * @example + * ``` + * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false + * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false + * ``` + * + * @return bool + */ + public function isMidday(); + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false + * ``` + * + * @return bool + */ + public function isMidnight(); + + /** + * Returns true if a property can be changed via setter. + * + * @param string $unit + * + * @return bool + */ + public static function isModifiableUnit($unit); + + /** + * Returns true if the current class/instance is mutable. + * + * @return bool + */ + public static function isMutable(); + + /** + * Determines if the instance is in the past, ie. less (before) than now. + * + * @example + * ``` + * Carbon::now()->subHours(5)->isPast(); // true + * Carbon::now()->addHours(5)->isPast(); // false + * ``` + * + * @return bool + */ + public function isPast(); + + /** + * Compares the formatted values of the two dates. + * + * @example + * ``` + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false + * ``` + * + * @param string $format date formats to compare. + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. + * + * @return bool + */ + public function isSameAs($format, $date = null); + + /** + * Checks if the passed in date is in the same month as the instance´s month. + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameMonth($date = null, $ofSameYear = true); + + /** + * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameQuarter($date = null, $ofSameYear = true); + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true + * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false + * ``` + * + * @param string $unit singular unit string + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. + * + * @throws BadComparisonUnitException + * + * @return bool + */ + public function isSameUnit($unit, $date = null); + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false + * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true + * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isStartOfDay($checkMicroseconds = false); + + /** + * Returns true if the date was created using CarbonImmutable::startOfTime() + * + * @return bool + */ + public function isStartOfTime(): bool; + + /** + * Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * + * @return bool + */ + public static function isStrictModeEnabled(); + + /** + * Determines if the instance is today. + * + * @example + * ``` + * Carbon::today()->isToday(); // true + * Carbon::tomorrow()->isToday(); // false + * ``` + * + * @return bool + */ + public function isToday(); + + /** + * Determines if the instance is tomorrow. + * + * @example + * ``` + * Carbon::tomorrow()->isTomorrow(); // true + * Carbon::yesterday()->isTomorrow(); // false + * ``` + * + * @return bool + */ + public function isTomorrow(); + + /** + * Determines if the instance is a weekday. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekday(); // false + * Carbon::parse('2019-07-15')->isWeekday(); // true + * ``` + * + * @return bool + */ + public function isWeekday(); + + /** + * Determines if the instance is a weekend day. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekend(); // true + * Carbon::parse('2019-07-15')->isWeekend(); // false + * ``` + * + * @return bool + */ + public function isWeekend(); + + /** + * Determines if the instance is yesterday. + * + * @example + * ``` + * Carbon::yesterday()->isYesterday(); // true + * Carbon::tomorrow()->isYesterday(); // false + * ``` + * + * @return bool + */ + public function isYesterday(); + + /** + * Format in the current language using ISO replacement patterns. + * + * @param string $format + * @param string|null $originalFormat provide context if a chunk has been passed alone + * + * @return string + */ + public function isoFormat(string $format, ?string $originalFormat = null): string; + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function isoWeekday($value = null); + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null); + + /** + * Prepare the object for JSON serialization. + * + * @return array|string + */ + #[ReturnTypeWillChange] + public function jsonSerialize(); + + /** + * Modify to the last occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * last day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function lastOfMonth($dayOfWeek = null); + + /** + * Modify to the last occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * last day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfQuarter($dayOfWeek = null); + + /** + * Modify to the last occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * last day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfYear($dayOfWeek = null); + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThan($date): bool; + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThanOrEqualTo($date): bool; + + /** + * Get/set the locale for the current instance. + * + * @param string|null $locale + * @param string ...$fallbackLocales + * + * @return $this|string + */ + public function locale(?string $locale = null, ...$fallbackLocales); + + /** + * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffOneDayWords($locale); + + /** + * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffSyntax($locale); + + /** + * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffTwoDayWords($locale); + + /** + * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasPeriodSyntax($locale); + + /** + * Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasShortUnits($locale); + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function lt($date): bool; + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThanOrEqualTo() + * + * @return bool + */ + public function lte($date): bool; + + /** + * Register a custom macro. + * + * @example + * ``` + * $userSettings = [ + * 'locale' => 'pt', + * 'timezone' => 'America/Sao_Paulo', + * ]; + * Carbon::macro('userFormat', function () use ($userSettings) { + * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); + * }); + * echo Carbon::yesterday()->hours(11)->userFormat(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro); + + /** + * Make a EDD\Vendor\Carbon instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed $var + * + * @throws InvalidFormatException + * + * @return static|null + */ + public static function make($var); + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function max($date = null); + + /** + * Create a EDD\Vendor\Carbon instance for the greatest supported date. + * + * @return static + */ + public static function maxValue(); + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see max() + * + * @return static + */ + public function maximum($date = null); + + /** + * Return the meridiem of the current time in the current locale. + * + * @param bool $isLower if true, returns lowercase variant if available in the current locale. + * + * @return string + */ + public function meridiem(bool $isLower = false): string; + + /** + * Modify to midday, default to self::$midDayAt + * + * @return static + */ + public function midDay(); + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function min($date = null); + + /** + * Create a EDD\Vendor\Carbon instance for the lowest supported date. + * + * @return static + */ + public static function minValue(); + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see min() + * + * @return static + */ + public function minimum($date = null); + + /** + * Mix another object into the class. + * + * @example + * ``` + * Carbon::mixin(new class { + * public function addMoon() { + * return function () { + * return $this->addDays(30); + * }; + * } + * public function subMoon() { + * return function () { + * return $this->subDays(30); + * }; + * } + * }); + * $fullMoon = Carbon::create('2018-12-22'); + * $nextFullMoon = $fullMoon->addMoon(); + * $blackMoon = Carbon::create('2019-01-06'); + * $previousBlackMoon = $blackMoon->subMoon(); + * echo "$nextFullMoon\n"; + * echo "$previousBlackMoon\n"; + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin); + + /** + * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. + * + * @see https://php.net/manual/en/datetime.modify.php + * + * @return static|false + */ + #[ReturnTypeWillChange] + public function modify($modify); + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($date): bool; + + /** + * Modify to the next occurrence of a given modifier such as a day of + * the week. If no modifier is provided, modify to the next occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static|false + */ + public function next($modifier = null); + + /** + * Go forward to the next weekday. + * + * @return static + */ + public function nextWeekday(); + + /** + * Go forward to the next weekend day. + * + * @return static + */ + public function nextWeekendDay(); + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function notEqualTo($date): bool; + + /** + * Get a EDD\Vendor\Carbon instance for the current date and time. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function now($tz = null); + + /** + * Returns a present instance in the same timezone. + * + * @return static + */ + public function nowWithSameTz(); + + /** + * Modify to the given occurrence of a given day of the week + * in the current month. If the calculated occurrence is outside the scope + * of the current month, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfMonth($nth, $dayOfWeek); + + /** + * Modify to the given occurrence of a given day of the week + * in the current quarter. If the calculated occurrence is outside the scope + * of the current quarter, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfQuarter($nth, $dayOfWeek); + + /** + * Modify to the given occurrence of a given day of the week + * in the current year. If the calculated occurrence is outside the scope + * of the current year, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfYear($nth, $dayOfWeek); + + /** + * Return a property with its ordinal. + * + * @param string $key + * @param string|null $period + * + * @return string + */ + public function ordinal(string $key, ?string $period = null): string; + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parse($time = null, $tz = null); + + /** + * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * + * @param string $time date/time string in the given language (may also contain English). + * @param string|null $locale if locale is null or not specified, current global locale will be + * used instead. + * @param DateTimeZone|string|null $tz optional timezone for the new instance. + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parseFromLocale($time, $locale = null, $tz = null); + + /** + * Returns standardized plural of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function pluralUnit(string $unit): string; + + /** + * Modify to the previous occurrence of a given modifier such as a day of + * the week. If no dayOfWeek is provided, modify to the previous occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static|false + */ + public function previous($modifier = null); + + /** + * Go backward to the previous weekday. + * + * @return static + */ + public function previousWeekday(); + + /** + * Go backward to the previous weekend day. + * + * @return static + */ + public function previousWeekendDay(); + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|EDD\Vendor\Carbon|CarbonImmutable|null $end period end date + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function range($end = null, $interval = null, $unit = null); + + /** + * Call native PHP DateTime/DateTimeImmutable add() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawAdd(DateInterval $interval); + + /** + * Create a EDD\Vendor\Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function rawCreateFromFormat($format, $time, $tz = null); + + /** + * @see https://php.net/manual/en/datetime.format.php + * + * @param string $format + * + * @return string + */ + public function rawFormat($format); + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function rawParse($time = null, $tz = null); + + /** + * Call native PHP DateTime/DateTimeImmutable sub() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawSub(DateInterval $interval); + + /** + * Remove all macros and generic macros. + */ + public static function resetMacros(); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetMonthsOverflow(); + + /** + * Reset the format used to the default when type juggling a EDD\Vendor\Carbon instance to a string + * + * @return void + */ + public static function resetToStringFormat(); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetYearsOverflow(); + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return CarbonInterface + */ + public function round($precision = 1, $function = 'round'); + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int $precision + * @param string $function + * + * @return CarbonInterface + */ + public function roundUnit($unit, $precision = 1, $function = 'round'); + + /** + * Round the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function roundWeek($weekStartsAt = null); + + /** + * The number of seconds since midnight. + * + * @return int + */ + public function secondsSinceMidnight(); + + /** + * The number of seconds until 23:59:59. + * + * @return int + */ + public function secondsUntilEndOfDay(); + + /** + * Return a serialized string of the instance. + * + * @return string + */ + public function serialize(); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform EDD\Vendor\Carbon object before the serialization. + * + * JSON serialize all EDD\Vendor\Carbon instances using the given callback. + * + * @param callable $callback + * + * @return void + */ + public static function serializeUsing($callback); + + /** + * Set a part of the EDD\Vendor\Carbon object + * + * @param string|array $name + * @param string|int|DateTimeZone $value + * + * @throws ImmutableException|UnknownSetterException + * + * @return $this + */ + public function set($name, $value = null); + + /** + * Set the date with gregorian year, month and day numbers. + * + * @see https://php.net/manual/en/datetime.setdate.php + * + * @param int $year + * @param int $month + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setDate($year, $month, $day); + + /** + * Set the year, month, and date for this instance to that of the passed instance. + * + * @param EDD\Vendor\Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setDateFrom($date = null); + + /** + * Set the date and time all together. + * + * @param int $year + * @param int $month + * @param int $day + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0); + + /** + * Set the date and time for this instance to that of the passed instance. + * + * @param EDD\Vendor\Carbon|DateTimeInterface $date + * + * @return static + */ + public function setDateTimeFrom($date = null); + + /** + * Set the day (keeping the current time) to the start of the week + the number of days passed as the first + * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. + * + * @param int $numberOfDays number of days to add after the start of the current week + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return static + */ + public function setDaysFromStartOfWeek(int $numberOfDays, ?int $weekStartsAt = null); + + /** + * Set the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @param string $locale + */ + public static function setFallbackLocale($locale); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOptions + */ + public static function setHumanDiffOptions($humanDiffOptions); + + /** + * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. + * + * @see https://php.net/manual/en/datetime.setisodate.php + * + * @param int $year + * @param int $week + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setISODate($year, $week, $day = 1); + + /** + * Set the translator for the current instance. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator + * + * @return $this + */ + public function setLocalTranslator(TranslatorInterface $translator); + + /** + * Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function setLocale($locale); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * + * Set midday/noon hour + * + * @param int $hour midday hour + * + * @return void + */ + public static function setMidDayAt($hour); + + /** + * Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock EDD\Vendor\Carbon instance + */ + public static function setTestNow($testNow = null); + + /** + * Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock EDD\Vendor\Carbon instance + */ + public static function setTestNowAndTimezone($testNow = null, $tz = null); + + /** + * Resets the current time of the DateTime object to a different time. + * + * @see https://php.net/manual/en/datetime.settime.php + * + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTime($hour, $minute, $second = 0, $microseconds = 0); + + /** + * Set the hour, minute, second and microseconds for this instance to that of the passed instance. + * + * @param EDD\Vendor\Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setTimeFrom($date = null); + + /** + * Set the time by time string. + * + * @param string $time + * + * @return static + */ + public function setTimeFromTimeString($time); + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimestamp($unixTimestamp); + + /** + * Set the instance's timezone from a string or object. + * + * @param DateTimeZone|string $value + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimezone($value); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let EDD\Vendor\Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump another string + * format. + * + * Set the default format used when type juggling a EDD\Vendor\Carbon instance to a string. + * + * @param string|Closure|null $format + * + * @return void + */ + public static function setToStringFormat($format); + + /** + * Set the default translator instance to use. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator + * + * @return void + */ + public static function setTranslator(TranslatorInterface $translator); + + /** + * Set specified unit to new given value. + * + * @param string $unit year, month, day, hour, minute, second or microsecond + * @param int $value new value for given unit + * + * @return static + */ + public function setUnit($unit, $value = null); + + /** + * Set any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value new value for the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function setUnitNoOverflow($valueUnit, $value, $overflowUnit); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * + * Set if UTF8 will be used for localized date/time. + * + * @param bool $utf8 + */ + public static function setUtf8($utf8); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * + * Set the last day of week + * + * @param int|string $day week end day (or 'auto' to get the day before the first day of week + * from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekEndsAt($day); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * + * Set the first day of week + * + * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekStartsAt($day); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * + * Set weekend days + * + * @param array $days + * + * @return void + */ + public static function setWeekendDays($days); + + /** + * Set specific options. + * - strictMode: true|false|null + * - monthOverflow: true|false|null + * - yearOverflow: true|false|null + * - humanDiffOptions: int|null + * - toStringFormat: string|Closure|null + * - toJsonFormat: string|Closure|null + * - locale: string|null + * - timezone: \DateTimeZone|string|int|null + * - macros: array|null + * - genericMacros: array|null + * + * @param array $settings + * + * @return $this|static + */ + public function settings(array $settings); + + /** + * Set the instance's timezone from a string or object and add/subtract the offset difference. + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function shiftTimezone($value); + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowMonths(); + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowYears(); + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + */ + public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Returns standardized singular of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function singularUnit(string $unit): string; + + /** + * Modify to start of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function startOf($unit, ...$params); + + /** + * Resets the date to the first day of the century and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); + * ``` + * + * @return static + */ + public function startOfCentury(); + + /** + * Resets the time to 00:00:00 start of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); + * ``` + * + * @return static + */ + public function startOfDay(); + + /** + * Resets the date to the first day of the decade and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); + * ``` + * + * @return static + */ + public function startOfDecade(); + + /** + * Modify to start of current hour, minutes and seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); + * ``` + * + * @return static + */ + public function startOfHour(); + + /** + * Resets the date to the first day of the millennium and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); + * ``` + * + * @return static + */ + public function startOfMillennium(); + + /** + * Modify to start of current minute, seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); + * ``` + * + * @return static + */ + public function startOfMinute(); + + /** + * Resets the date to the first day of the month and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); + * ``` + * + * @return static + */ + public function startOfMonth(); + + /** + * Resets the date to the first day of the quarter and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); + * ``` + * + * @return static + */ + public function startOfQuarter(); + + /** + * Modify to start of current second, microseconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function startOfSecond(); + + /** + * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; + * ``` + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return static + */ + public function startOfWeek($weekStartsAt = null); + + /** + * Resets the date to the first day of the year and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); + * ``` + * + * @return static + */ + public function startOfYear(); + + /** + * Subtract given units or interval to the current instance. + * + * @example $date->sub('hour', 3) + * @example $date->sub(15, 'days') + * @example $date->sub(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function sub($unit, $value = 1, $overflow = null); + + public function subRealUnit($unit, $value = 1); + + /** + * Subtract given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subUnit($unit, $value = 1, $overflow = null); + + /** + * Subtract any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to subtract to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function subUnitNoOverflow($valueUnit, $value, $overflowUnit); + + /** + * Subtract given units or interval to the current instance. + * + * @see sub() + * + * @param string|DateInterval $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subtract($unit, $value = 1, $overflow = null); + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @return string + */ + public function timespan($other = null, $timezone = null); + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + public function timestamp($unixTimestamp); + + /** + * @alias setTimezone + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function timezone($value); + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * When comparing a value in the past to default now: + * 1 hour from now + * 5 months from now + * + * When comparing a value in the future to default now: + * 1 hour ago + * 5 months ago + * + * When comparing a value in the past to another value: + * 1 hour after + * 5 months after + * + * When comparing a value in the future to another value: + * 1 hour before + * 5 months before + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get default array representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toArray()); + * ``` + * + * @return array + */ + public function toArray(); + + /** + * Format the instance as ATOM + * + * @example + * ``` + * echo Carbon::now()->toAtomString(); + * ``` + * + * @return string + */ + public function toAtomString(); + + /** + * Format the instance as COOKIE + * + * @example + * ``` + * echo Carbon::now()->toCookieString(); + * ``` + * + * @return string + */ + public function toCookieString(); + + /** + * @alias toDateTime + * + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDate()); + * ``` + * + * @return DateTime + */ + public function toDate(); + + /** + * Format the instance as date + * + * @example + * ``` + * echo Carbon::now()->toDateString(); + * ``` + * + * @return string + */ + public function toDateString(); + + /** + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTime()); + * ``` + * + * @return DateTime + */ + public function toDateTime(); + + /** + * Return native toDateTimeImmutable PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTimeImmutable()); + * ``` + * + * @return DateTimeImmutable + */ + public function toDateTimeImmutable(); + + /** + * Format the instance as date and time T-separated with no timezone + * + * @example + * ``` + * echo Carbon::now()->toDateTimeLocalString(); + * echo "\n"; + * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeLocalString($unitPrecision = 'second'); + + /** + * Format the instance as date and time + * + * @example + * ``` + * echo Carbon::now()->toDateTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeString($unitPrecision = 'second'); + + /** + * Format the instance with day, date and time + * + * @example + * ``` + * echo Carbon::now()->toDayDateTimeString(); + * ``` + * + * @return string + */ + public function toDayDateTimeString(); + + /** + * Format the instance as a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDateString(); + * ``` + * + * @return string + */ + public function toFormattedDateString(); + + /** + * Format the instance with the day, and a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDayDateString(); + * ``` + * + * @return string + */ + public function toFormattedDayDateString(): string; + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: + * 1977-04-22T01:00:00-05:00). + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toISOString() . "\n"; + * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; + * ``` + * + * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. + * + * @return null|string + */ + public function toISOString($keepOffset = false); + + /** + * Return a immutable copy of the instance. + * + * @return CarbonImmutable + */ + public function toImmutable(); + + /** + * Format the instance as ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601String(); + * ``` + * + * @return string + */ + public function toIso8601String(); + + /** + * Convert the instance to UTC and return as Zulu ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601ZuluString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toIso8601ZuluString($unitPrecision = 'second'); + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toJSON(); + * ``` + * + * @return null|string + */ + public function toJSON(); + + /** + * Return a mutable copy of the instance. + * + * @return EDD\Vendor\Carbon + */ + public function toMutable(); + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function toNow($syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get default object representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toObject()); + * ``` + * + * @return object + */ + public function toObject(); + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|EDD\Vendor\Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function toPeriod($end = null, $interval = null, $unit = null); + + /** + * Format the instance as RFC1036 + * + * @example + * ``` + * echo Carbon::now()->toRfc1036String(); + * ``` + * + * @return string + */ + public function toRfc1036String(); + + /** + * Format the instance as RFC1123 + * + * @example + * ``` + * echo Carbon::now()->toRfc1123String(); + * ``` + * + * @return string + */ + public function toRfc1123String(); + + /** + * Format the instance as RFC2822 + * + * @example + * ``` + * echo Carbon::now()->toRfc2822String(); + * ``` + * + * @return string + */ + public function toRfc2822String(); + + /** + * Format the instance as RFC3339 + * + * @param bool $extended + * + * @example + * ``` + * echo Carbon::now()->toRfc3339String() . "\n"; + * echo Carbon::now()->toRfc3339String(true) . "\n"; + * ``` + * + * @return string + */ + public function toRfc3339String($extended = false); + + /** + * Format the instance as RFC7231 + * + * @example + * ``` + * echo Carbon::now()->toRfc7231String(); + * ``` + * + * @return string + */ + public function toRfc7231String(); + + /** + * Format the instance as RFC822 + * + * @example + * ``` + * echo Carbon::now()->toRfc822String(); + * ``` + * + * @return string + */ + public function toRfc822String(); + + /** + * Format the instance as RFC850 + * + * @example + * ``` + * echo Carbon::now()->toRfc850String(); + * ``` + * + * @return string + */ + public function toRfc850String(); + + /** + * Format the instance as RSS + * + * @example + * ``` + * echo Carbon::now()->toRssString(); + * ``` + * + * @return string + */ + public function toRssString(); + + /** + * Returns english human readable complete date string. + * + * @example + * ``` + * echo Carbon::now()->toString(); + * ``` + * + * @return string + */ + public function toString(); + + /** + * Format the instance as time + * + * @example + * ``` + * echo Carbon::now()->toTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toTimeString($unitPrecision = 'second'); + + /** + * Format the instance as W3C + * + * @example + * ``` + * echo Carbon::now()->toW3cString(); + * ``` + * + * @return string + */ + public function toW3cString(); + + /** + * Create a EDD\Vendor\Carbon instance for today. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function today($tz = null); + + /** + * Create a EDD\Vendor\Carbon instance for tomorrow. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function tomorrow($tz = null); + + /** + * Translate using translation string or callback available. + * + * @param string $key + * @param array $parameters + * @param string|int|float|null $number + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface|null $translator + * @param bool $altNumbers + * + * @return string + */ + public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string; + + /** + * Returns the alternative number for a given integer if available in the current locale. + * + * @param int $number + * + * @return string + */ + public function translateNumber(int $number): string; + + /** + * Translate a time string from a locale to an other. + * + * @param string $timeString date/time/duration string to translate (may also contain English) + * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) + * @param string|null $to output locale of the result returned (`"en"` by default) + * @param int $mode specify what to translate with options: + * - self::TRANSLATE_ALL (default) + * - CarbonInterface::TRANSLATE_MONTHS + * - CarbonInterface::TRANSLATE_DAYS + * - CarbonInterface::TRANSLATE_UNITS + * - CarbonInterface::TRANSLATE_MERIDIEM + * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS + * + * @return string + */ + public static function translateTimeString($timeString, $from = null, $to = null, $mode = self::TRANSLATE_ALL); + + /** + * Translate a time string from the current locale (`$date->locale()`) to an other. + * + * @param string $timeString time string to translate + * @param string|null $to output locale of the result returned ("en" by default) + * + * @return string + */ + public function translateTimeStringTo($timeString, $to = null); + + /** + * Translate using translation string or callback available. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator + * @param string $key + * @param array $parameters + * @param null $number + * + * @return string + */ + public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string; + + /** + * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) + * but translate words whenever possible (months, day names, etc.) using the current locale. + * + * @param string $format + * + * @return string + */ + public function translatedFormat(string $format): string; + + /** + * Set the timezone or returns the timezone name if no arguments passed. + * + * @param DateTimeZone|string $value + * + * @return static|string + */ + public function tz($value = null); + + /** + * @alias getTimestamp + * + * Returns the UNIX timestamp for the current date. + * + * @return int + */ + public function unix(); + + /** + * @alias to + * + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if months should be calculated with overflow. + * + * @param bool $monthsOverflow + * + * @return void + */ + public static function useMonthsOverflow($monthsOverflow = true); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * Enable the strict mode (or disable with passing false). + * + * @param bool $strictModeEnabled + */ + public static function useStrictMode($strictModeEnabled = true); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if years should be calculated with overflow. + * + * @param bool $yearsOverflow + * + * @return void + */ + public static function useYearsOverflow($yearsOverflow = true); + + /** + * Set the instance's timezone to UTC. + * + * @return static + */ + public function utc(); + + /** + * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. + * + * @param int|null $minuteOffset + * + * @return int|static + */ + public function utcOffset(?int $minuteOffset = null); + + /** + * Returns the milliseconds timestamps used amongst other by Date javascript objects. + * + * @return float + */ + public function valueOf(); + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function week($week = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Get/set the weekday from 0 (Sunday) to 6 (Saturday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function weekday($value = null); + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function weeksInYear($dayOfWeek = null, $dayOfYear = null); + + /** + * Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * + * /!\ Use this method for unit tests only. + * + * @template T + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock EDD\Vendor\Carbon instance + * @param Closure(): T $callback + * + * @return T + */ + public static function withTestNow($testNow, $callback); + + /** + * Create a EDD\Vendor\Carbon instance for yesterday. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function yesterday($tz = null); + + // +} diff --git a/libraries/Carbon/src/Carbon/CarbonInterval.php b/libraries/Carbon/src/Carbon/CarbonInterval.php new file mode 100644 index 00000000000..be94d89e0ca --- /dev/null +++ b/libraries/Carbon/src/Carbon/CarbonInterval.php @@ -0,0 +1,3054 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Carbon\Exceptions\BadFluentConstructorException; +use EDD\Vendor\Carbon\Exceptions\BadFluentSetterException; +use EDD\Vendor\Carbon\Exceptions\InvalidCastException; +use EDD\Vendor\Carbon\Exceptions\InvalidIntervalException; +use EDD\Vendor\Carbon\Exceptions\OutOfRangeException; +use EDD\Vendor\Carbon\Exceptions\ParseErrorException; +use EDD\Vendor\Carbon\Exceptions\UnitNotConfiguredException; +use EDD\Vendor\Carbon\Exceptions\UnknownGetterException; +use EDD\Vendor\Carbon\Exceptions\UnknownSetterException; +use EDD\Vendor\Carbon\Exceptions\UnknownUnitException; +use EDD\Vendor\Carbon\Traits\IntervalRounding; +use EDD\Vendor\Carbon\Traits\IntervalStep; +use EDD\Vendor\Carbon\Traits\MagicParameter; +use EDD\Vendor\Carbon\Traits\Mixin; +use EDD\Vendor\Carbon\Traits\Options; +use EDD\Vendor\Carbon\Traits\ToStringFormat; +use Closure; +use DateInterval; +use DateMalformedIntervalStringException; +use DateTimeInterface; +use DateTimeZone; +use Exception; +use InvalidArgumentException; +use ReflectionException; +use ReturnTypeWillChange; +use RuntimeException; +use Throwable; + +/** + * A simple API extension for DateInterval. + * The implementation provides helpers to handle weeks but only days are saved. + * Weeks are calculated based on the total days of the current instance. + * + * @property int $years Total years of the current interval. + * @property int $months Total months of the current interval. + * @property int $weeks Total weeks of the current interval calculated from the days. + * @property int $dayz Total days of the current interval (weeks * 7 + days). + * @property int $hours Total hours of the current interval. + * @property int $minutes Total minutes of the current interval. + * @property int $seconds Total seconds of the current interval. + * @property int $microseconds Total microseconds of the current interval. + * @property int $milliseconds Total milliseconds of the current interval. + * @property int $microExcludeMilli Remaining microseconds without the milliseconds. + * @property int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7). + * @property int $daysExcludeWeeks alias of dayzExcludeWeeks + * @property-read float $totalYears Number of years equivalent to the interval. + * @property-read float $totalMonths Number of months equivalent to the interval. + * @property-read float $totalWeeks Number of weeks equivalent to the interval. + * @property-read float $totalDays Number of days equivalent to the interval. + * @property-read float $totalDayz Alias for totalDays. + * @property-read float $totalHours Number of hours equivalent to the interval. + * @property-read float $totalMinutes Number of minutes equivalent to the interval. + * @property-read float $totalSeconds Number of seconds equivalent to the interval. + * @property-read float $totalMilliseconds Number of milliseconds equivalent to the interval. + * @property-read float $totalMicroseconds Number of microseconds equivalent to the interval. + * @property-read string $locale locale of the current instance + * + * @method static CarbonInterval years($years = 1) Create instance specifying a number of years or modify the number of years if called on an instance. + * @method static CarbonInterval year($years = 1) Alias for years() + * @method static CarbonInterval months($months = 1) Create instance specifying a number of months or modify the number of months if called on an instance. + * @method static CarbonInterval month($months = 1) Alias for months() + * @method static CarbonInterval weeks($weeks = 1) Create instance specifying a number of weeks or modify the number of weeks if called on an instance. + * @method static CarbonInterval week($weeks = 1) Alias for weeks() + * @method static CarbonInterval days($days = 1) Create instance specifying a number of days or modify the number of days if called on an instance. + * @method static CarbonInterval dayz($days = 1) Alias for days() + * @method static CarbonInterval daysExcludeWeeks($days = 1) Create instance specifying a number of days or modify the number of days (keeping the current number of weeks) if called on an instance. + * @method static CarbonInterval dayzExcludeWeeks($days = 1) Alias for daysExcludeWeeks() + * @method static CarbonInterval day($days = 1) Alias for days() + * @method static CarbonInterval hours($hours = 1) Create instance specifying a number of hours or modify the number of hours if called on an instance. + * @method static CarbonInterval hour($hours = 1) Alias for hours() + * @method static CarbonInterval minutes($minutes = 1) Create instance specifying a number of minutes or modify the number of minutes if called on an instance. + * @method static CarbonInterval minute($minutes = 1) Alias for minutes() + * @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds or modify the number of seconds if called on an instance. + * @method static CarbonInterval second($seconds = 1) Alias for seconds() + * @method static CarbonInterval milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds or modify the number of milliseconds if called on an instance. + * @method static CarbonInterval millisecond($milliseconds = 1) Alias for milliseconds() + * @method static CarbonInterval microseconds($microseconds = 1) Create instance specifying a number of microseconds or modify the number of microseconds if called on an instance. + * @method static CarbonInterval microsecond($microseconds = 1) Alias for microseconds() + * @method $this addYears(int $years) Add given number of years to the current interval + * @method $this subYears(int $years) Subtract given number of years to the current interval + * @method $this addMonths(int $months) Add given number of months to the current interval + * @method $this subMonths(int $months) Subtract given number of months to the current interval + * @method $this addWeeks(int|float $weeks) Add given number of weeks to the current interval + * @method $this subWeeks(int|float $weeks) Subtract given number of weeks to the current interval + * @method $this addDays(int|float $days) Add given number of days to the current interval + * @method $this subDays(int|float $days) Subtract given number of days to the current interval + * @method $this addHours(int|float $hours) Add given number of hours to the current interval + * @method $this subHours(int|float $hours) Subtract given number of hours to the current interval + * @method $this addMinutes(int|float $minutes) Add given number of minutes to the current interval + * @method $this subMinutes(int|float $minutes) Subtract given number of minutes to the current interval + * @method $this addSeconds(int|float $seconds) Add given number of seconds to the current interval + * @method $this subSeconds(int|float $seconds) Subtract given number of seconds to the current interval + * @method $this addMilliseconds(int|float $milliseconds) Add given number of milliseconds to the current interval + * @method $this subMilliseconds(int|float $milliseconds) Subtract given number of milliseconds to the current interval + * @method $this addMicroseconds(int|float $microseconds) Add given number of microseconds to the current interval + * @method $this subMicroseconds(int|float $microseconds) Subtract given number of microseconds to the current interval + * @method $this roundYear(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this roundYears(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this floorYear(int|float $precision = 1) Truncate the current instance year with given precision. + * @method $this floorYears(int|float $precision = 1) Truncate the current instance year with given precision. + * @method $this ceilYear(int|float $precision = 1) Ceil the current instance year with given precision. + * @method $this ceilYears(int|float $precision = 1) Ceil the current instance year with given precision. + * @method $this roundMonth(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this roundMonths(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this floorMonth(int|float $precision = 1) Truncate the current instance month with given precision. + * @method $this floorMonths(int|float $precision = 1) Truncate the current instance month with given precision. + * @method $this ceilMonth(int|float $precision = 1) Ceil the current instance month with given precision. + * @method $this ceilMonths(int|float $precision = 1) Ceil the current instance month with given precision. + * @method $this roundWeek(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundWeeks(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorWeek(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorWeeks(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilWeek(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilWeeks(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundDay(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundDays(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorDay(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorDays(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilDay(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilDays(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundHour(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this roundHours(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this floorHour(int|float $precision = 1) Truncate the current instance hour with given precision. + * @method $this floorHours(int|float $precision = 1) Truncate the current instance hour with given precision. + * @method $this ceilHour(int|float $precision = 1) Ceil the current instance hour with given precision. + * @method $this ceilHours(int|float $precision = 1) Ceil the current instance hour with given precision. + * @method $this roundMinute(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this roundMinutes(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this floorMinute(int|float $precision = 1) Truncate the current instance minute with given precision. + * @method $this floorMinutes(int|float $precision = 1) Truncate the current instance minute with given precision. + * @method $this ceilMinute(int|float $precision = 1) Ceil the current instance minute with given precision. + * @method $this ceilMinutes(int|float $precision = 1) Ceil the current instance minute with given precision. + * @method $this roundSecond(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this roundSeconds(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this floorSecond(int|float $precision = 1) Truncate the current instance second with given precision. + * @method $this floorSeconds(int|float $precision = 1) Truncate the current instance second with given precision. + * @method $this ceilSecond(int|float $precision = 1) Ceil the current instance second with given precision. + * @method $this ceilSeconds(int|float $precision = 1) Ceil the current instance second with given precision. + * @method $this roundMillennium(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this roundMillennia(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this floorMillennium(int|float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this floorMillennia(int|float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this ceilMillennium(int|float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this ceilMillennia(int|float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this roundCentury(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this roundCenturies(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this floorCentury(int|float $precision = 1) Truncate the current instance century with given precision. + * @method $this floorCenturies(int|float $precision = 1) Truncate the current instance century with given precision. + * @method $this ceilCentury(int|float $precision = 1) Ceil the current instance century with given precision. + * @method $this ceilCenturies(int|float $precision = 1) Ceil the current instance century with given precision. + * @method $this roundDecade(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this roundDecades(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this floorDecade(int|float $precision = 1) Truncate the current instance decade with given precision. + * @method $this floorDecades(int|float $precision = 1) Truncate the current instance decade with given precision. + * @method $this ceilDecade(int|float $precision = 1) Ceil the current instance decade with given precision. + * @method $this ceilDecades(int|float $precision = 1) Ceil the current instance decade with given precision. + * @method $this roundQuarter(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this roundQuarters(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this floorQuarter(int|float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this floorQuarters(int|float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this ceilQuarter(int|float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this ceilQuarters(int|float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this roundMillisecond(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this roundMilliseconds(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this floorMillisecond(int|float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this floorMilliseconds(int|float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this ceilMillisecond(int|float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this ceilMilliseconds(int|float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this roundMicrosecond(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this roundMicroseconds(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this floorMicrosecond(int|float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this floorMicroseconds(int|float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this ceilMicrosecond(int|float $precision = 1) Ceil the current instance microsecond with given precision. + * @method $this ceilMicroseconds(int|float $precision = 1) Ceil the current instance microsecond with given precision. + */ +class CarbonInterval extends DateInterval implements CarbonConverterInterface +{ + use IntervalRounding; + use IntervalStep; + use MagicParameter; + use Mixin { + Mixin::mixin as baseMixin; + } + use Options; + use ToStringFormat; + + /** + * Interval spec period designators + */ + public const PERIOD_PREFIX = 'P'; + public const PERIOD_YEARS = 'Y'; + public const PERIOD_MONTHS = 'M'; + public const PERIOD_DAYS = 'D'; + public const PERIOD_TIME_PREFIX = 'T'; + public const PERIOD_HOURS = 'H'; + public const PERIOD_MINUTES = 'M'; + public const PERIOD_SECONDS = 'S'; + + /** + * A translator to ... er ... translate stuff + * + * @var \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + protected static $translator; + + /** + * @var array|null + */ + protected static $cascadeFactors; + + /** + * @var array + */ + protected static $formats = [ + 'y' => 'y', + 'Y' => 'y', + 'o' => 'y', + 'm' => 'm', + 'n' => 'm', + 'W' => 'weeks', + 'd' => 'd', + 'j' => 'd', + 'z' => 'd', + 'h' => 'h', + 'g' => 'h', + 'H' => 'h', + 'G' => 'h', + 'i' => 'i', + 's' => 's', + 'u' => 'micro', + 'v' => 'milli', + ]; + + /** + * @var array|null + */ + private static $flipCascadeFactors; + + /** + * @var bool + */ + private static $floatSettersEnabled = false; + + /** + * The registered macros. + * + * @var array + */ + protected static $macros = []; + + /** + * Timezone handler for settings() method. + * + * @var mixed + */ + protected $tzName; + + /** + * Set the instance's timezone from a string or object. + * + * @param \DateTimeZone|string $tzName + * + * @return static + */ + public function setTimezone($tzName) + { + $this->tzName = $tzName; + + return $this; + } + + /** + * @internal + * + * Set the instance's timezone from a string or object and add/subtract the offset difference. + * + * @param \DateTimeZone|string $tzName + * + * @return static + */ + public function shiftTimezone($tzName) + { + $this->tzName = $tzName; + + return $this; + } + + /** + * Mapping of units and factors for cascading. + * + * Should only be modified by changing the factors or referenced constants. + * + * @return array + */ + public static function getCascadeFactors() + { + return static::$cascadeFactors ?: static::getDefaultCascadeFactors(); + } + + protected static function getDefaultCascadeFactors(): array + { + return [ + 'milliseconds' => [Carbon::MICROSECONDS_PER_MILLISECOND, 'microseconds'], + 'seconds' => [Carbon::MILLISECONDS_PER_SECOND, 'milliseconds'], + 'minutes' => [Carbon::SECONDS_PER_MINUTE, 'seconds'], + 'hours' => [Carbon::MINUTES_PER_HOUR, 'minutes'], + 'dayz' => [Carbon::HOURS_PER_DAY, 'hours'], + 'weeks' => [Carbon::DAYS_PER_WEEK, 'dayz'], + 'months' => [Carbon::WEEKS_PER_MONTH, 'weeks'], + 'years' => [Carbon::MONTHS_PER_YEAR, 'months'], + ]; + } + + private static function standardizeUnit($unit) + { + $unit = rtrim($unit, 'sz').'s'; + + return $unit === 'days' ? 'dayz' : $unit; + } + + private static function getFlipCascadeFactors() + { + if (!self::$flipCascadeFactors) { + self::$flipCascadeFactors = []; + + foreach (static::getCascadeFactors() as $to => [$factor, $from]) { + self::$flipCascadeFactors[self::standardizeUnit($from)] = [self::standardizeUnit($to), $factor]; + } + } + + return self::$flipCascadeFactors; + } + + /** + * Set default cascading factors for ->cascade() method. + * + * @param array $cascadeFactors + */ + public static function setCascadeFactors(array $cascadeFactors) + { + self::$flipCascadeFactors = null; + static::$cascadeFactors = $cascadeFactors; + } + + /** + * This option allow you to opt-in for the EDD\Vendor\Carbon 3 behavior where float + * values will no longer be cast to integer (so truncated). + * + * ⚠️ This settings will be applied globally, which mean your whole application + * code including the third-party dependencies that also may use EDD\Vendor\Carbon will + * adopt the new behavior. + */ + public static function enableFloatSetters(bool $floatSettersEnabled = true): void + { + self::$floatSettersEnabled = $floatSettersEnabled; + } + + /////////////////////////////////////////////////////////////////// + //////////////////////////// CONSTRUCTORS ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Create a new CarbonInterval instance. + * + * @param Closure|DateInterval|string|int|null $years + * @param int|float|null $months + * @param int|float|null $weeks + * @param int|float|null $days + * @param int|float|null $hours + * @param int|float|null $minutes + * @param int|float|null $seconds + * @param int|float|null $microseconds + * + * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. + */ + public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) + { + if ($years instanceof Closure) { + $this->step = $years; + $years = null; + } + + if ($years instanceof DateInterval) { + parent::__construct(static::getDateIntervalSpec($years)); + $this->f = $years->f; + self::copyNegativeUnits($years, $this); + + return; + } + + $spec = $years; + $isStringSpec = (\is_string($spec) && !preg_match('/^[\d.]/', $spec)); + + if (!$isStringSpec || (float) $years) { + $spec = static::PERIOD_PREFIX; + + $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; + $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; + + $specDays = 0; + $specDays += $weeks > 0 ? $weeks * static::getDaysPerWeek() : 0; + $specDays += $days > 0 ? $days : 0; + + $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; + + if ($hours > 0 || $minutes > 0 || $seconds > 0) { + $spec .= static::PERIOD_TIME_PREFIX; + $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; + $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; + $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; + } + + if ($spec === static::PERIOD_PREFIX) { + // Allow the zero interval. + $spec .= '0'.static::PERIOD_YEARS; + } + } + + try { + parent::__construct($spec); + } catch (Throwable $exception) { + try { + parent::__construct('PT0S'); + + if ($isStringSpec) { + if (!preg_match('/^P + (?:(?[+-]?\d*(?:\.\d+)?)Y)? + (?:(?[+-]?\d*(?:\.\d+)?)M)? + (?:(?[+-]?\d*(?:\.\d+)?)W)? + (?:(?[+-]?\d*(?:\.\d+)?)D)? + (?:T + (?:(?[+-]?\d*(?:\.\d+)?)H)? + (?:(?[+-]?\d*(?:\.\d+)?)M)? + (?:(?[+-]?\d*(?:\.\d+)?)S)? + )? + $/x', $spec, $match)) { + throw new InvalidArgumentException("Invalid duration: $spec"); + } + + $years = (float) ($match['year'] ?? 0); + $this->assertSafeForInteger('year', $years); + $months = (float) ($match['month'] ?? 0); + $this->assertSafeForInteger('month', $months); + $weeks = (float) ($match['week'] ?? 0); + $this->assertSafeForInteger('week', $weeks); + $days = (float) ($match['day'] ?? 0); + $this->assertSafeForInteger('day', $days); + $hours = (float) ($match['hour'] ?? 0); + $this->assertSafeForInteger('hour', $hours); + $minutes = (float) ($match['minute'] ?? 0); + $this->assertSafeForInteger('minute', $minutes); + $seconds = (float) ($match['second'] ?? 0); + $this->assertSafeForInteger('second', $seconds); + } + + $totalDays = (($weeks * static::getDaysPerWeek()) + $days); + $this->assertSafeForInteger('days total (including weeks)', $totalDays); + + $this->y = (int) $years; + $this->m = (int) $months; + $this->d = (int) $totalDays; + $this->h = (int) $hours; + $this->i = (int) $minutes; + $this->s = (int) $seconds; + + if ( + ((float) $this->y) !== $years || + ((float) $this->m) !== $months || + ((float) $this->d) !== $totalDays || + ((float) $this->h) !== $hours || + ((float) $this->i) !== $minutes || + ((float) $this->s) !== $seconds + ) { + $this->add(static::fromString( + ($years - $this->y).' years '. + ($months - $this->m).' months '. + ($totalDays - $this->d).' days '. + ($hours - $this->h).' hours '. + ($minutes - $this->i).' minutes '. + ($seconds - $this->s).' seconds ' + )); + } + } catch (Throwable $secondException) { + throw $secondException instanceof OutOfRangeException ? $secondException : $exception; + } + } + + if ($microseconds !== null) { + $this->f = $microseconds / Carbon::MICROSECONDS_PER_SECOND; + } + } + + /** + * Returns the factor for a given source-to-target couple. + * + * @param string $source + * @param string $target + * + * @return int|float|null + */ + public static function getFactor($source, $target) + { + $source = self::standardizeUnit($source); + $target = self::standardizeUnit($target); + $factors = self::getFlipCascadeFactors(); + + if (isset($factors[$source])) { + [$to, $factor] = $factors[$source]; + + if ($to === $target) { + return $factor; + } + + return $factor * static::getFactor($to, $target); + } + + return null; + } + + /** + * Returns the factor for a given source-to-target couple if set, + * else try to find the appropriate constant as the factor, such as Carbon::DAYS_PER_WEEK. + * + * @param string $source + * @param string $target + * + * @return int|float|null + */ + public static function getFactorWithDefault($source, $target) + { + $factor = self::getFactor($source, $target); + + if ($factor) { + return $factor; + } + + static $defaults = [ + 'month' => ['year' => Carbon::MONTHS_PER_YEAR], + 'week' => ['month' => Carbon::WEEKS_PER_MONTH], + 'day' => ['week' => Carbon::DAYS_PER_WEEK], + 'hour' => ['day' => Carbon::HOURS_PER_DAY], + 'minute' => ['hour' => Carbon::MINUTES_PER_HOUR], + 'second' => ['minute' => Carbon::SECONDS_PER_MINUTE], + 'millisecond' => ['second' => Carbon::MILLISECONDS_PER_SECOND], + 'microsecond' => ['millisecond' => Carbon::MICROSECONDS_PER_MILLISECOND], + ]; + + return $defaults[$source][$target] ?? null; + } + + /** + * Returns current config for days per week. + * + * @return int|float + */ + public static function getDaysPerWeek() + { + return static::getFactor('dayz', 'weeks') ?: Carbon::DAYS_PER_WEEK; + } + + /** + * Returns current config for hours per day. + * + * @return int|float + */ + public static function getHoursPerDay() + { + return static::getFactor('hours', 'dayz') ?: Carbon::HOURS_PER_DAY; + } + + /** + * Returns current config for minutes per hour. + * + * @return int|float + */ + public static function getMinutesPerHour() + { + return static::getFactor('minutes', 'hours') ?: Carbon::MINUTES_PER_HOUR; + } + + /** + * Returns current config for seconds per minute. + * + * @return int|float + */ + public static function getSecondsPerMinute() + { + return static::getFactor('seconds', 'minutes') ?: Carbon::SECONDS_PER_MINUTE; + } + + /** + * Returns current config for microseconds per second. + * + * @return int|float + */ + public static function getMillisecondsPerSecond() + { + return static::getFactor('milliseconds', 'seconds') ?: Carbon::MILLISECONDS_PER_SECOND; + } + + /** + * Returns current config for microseconds per second. + * + * @return int|float + */ + public static function getMicrosecondsPerMillisecond() + { + return static::getFactor('microseconds', 'milliseconds') ?: Carbon::MICROSECONDS_PER_MILLISECOND; + } + + /** + * Create a new CarbonInterval instance from specific values. + * This is an alias for the constructor that allows better fluent + * syntax as it allows you to do CarbonInterval::create(1)->fn() rather than + * (new CarbonInterval(1))->fn(). + * + * @param int $years + * @param int $months + * @param int $weeks + * @param int $days + * @param int $hours + * @param int $minutes + * @param int $seconds + * @param int $microseconds + * + * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. + * + * @return static + */ + public static function create($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) + { + return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $microseconds); + } + + /** + * Parse a string into a new CarbonInterval object according to the specified format. + * + * @example + * ``` + * echo Carboninterval::createFromFormat('H:i', '1:30'); + * ``` + * + * @param string $format Format of the $interval input string + * @param string|null $interval Input string to convert into an interval + * + * @throws \EDD\Vendor\Carbon\Exceptions\ParseErrorException when the $interval cannot be parsed as an interval. + * + * @return static + */ + public static function createFromFormat(string $format, ?string $interval) + { + $instance = new static(0); + $length = mb_strlen($format); + + if (preg_match('/s([,.])([uv])$/', $format, $match)) { + $interval = explode($match[1], $interval); + $index = \count($interval) - 1; + $interval[$index] = str_pad($interval[$index], $match[2] === 'v' ? 3 : 6, '0'); + $interval = implode($match[1], $interval); + } + + $interval = $interval ?? ''; + + for ($index = 0; $index < $length; $index++) { + $expected = mb_substr($format, $index, 1); + $nextCharacter = mb_substr($interval, 0, 1); + $unit = static::$formats[$expected] ?? null; + + if ($unit) { + if (!preg_match('/^-?\d+/', $interval, $match)) { + throw new ParseErrorException('number', $nextCharacter); + } + + $interval = mb_substr($interval, mb_strlen($match[0])); + $instance->$unit += (int) ($match[0]); + + continue; + } + + if ($nextCharacter !== $expected) { + throw new ParseErrorException( + "'$expected'", + $nextCharacter, + 'Allowed substitutes for interval formats are '.implode(', ', array_keys(static::$formats))."\n". + 'See https://php.net/manual/en/function.date.php for their meaning' + ); + } + + $interval = mb_substr($interval, 1); + } + + if ($interval !== '') { + throw new ParseErrorException( + 'end of string', + $interval + ); + } + + return $instance; + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + $date = new static(0); + $date->copyProperties($this); + $date->step = $this->step; + + return $date; + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function clone() + { + return $this->copy(); + } + + /** + * Provide static helpers to create instances. Allows CarbonInterval::years(3). + * + * Note: This is done using the magic method to allow static and instance methods to + * have the same names. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @return static|null + */ + public static function __callStatic($method, $parameters) + { + try { + $interval = new static(0); + $localStrictModeEnabled = $interval->localStrictModeEnabled; + $interval->localStrictModeEnabled = true; + + $result = static::hasMacro($method) + ? static::bindMacroContext(null, function () use (&$method, &$parameters, &$interval) { + return $interval->callMacro($method, $parameters); + }) + : $interval->$method(...$parameters); + + $interval->localStrictModeEnabled = $localStrictModeEnabled; + + return $result; + } catch (BadFluentSetterException $exception) { + if (Carbon::isStrictModeEnabled()) { + throw new BadFluentConstructorException($method, 0, $exception); + } + + return null; + } + } + + /** + * Evaluate the PHP generated by var_export() and recreate the exported CarbonInterval instance. + * + * @param array $dump data as exported by var_export() + * + * @return static + */ + #[ReturnTypeWillChange] + public static function __set_state($dump) + { + /** @noinspection PhpVoidFunctionResultUsedInspection */ + /** @var DateInterval $dateInterval */ + $dateInterval = parent::__set_state($dump); + + return static::instance($dateInterval); + } + + /** + * Return the current context from inside a macro callee or a new one if static. + * + * @return static + */ + protected static function this() + { + return end(static::$macroContextStack) ?: new static(0); + } + + /** + * Creates a CarbonInterval from string. + * + * Format: + * + * Suffix | Unit | Example | DateInterval expression + * -------|---------|---------|------------------------ + * y | years | 1y | P1Y + * mo | months | 3mo | P3M + * w | weeks | 2w | P2W + * d | days | 28d | P28D + * h | hours | 4h | PT4H + * m | minutes | 12m | PT12M + * s | seconds | 59s | PT59S + * + * e. g. `1w 3d 4h 32m 23s` is converted to 10 days 4 hours 32 minutes and 23 seconds. + * + * Special cases: + * - An empty string will return a zero interval + * - Fractions are allowed for weeks, days, hours and minutes and will be converted + * and rounded to the next smaller value (caution: 0.5w = 4d) + * + * @param string $intervalDefinition + * + * @return static + */ + public static function fromString($intervalDefinition) + { + if (empty($intervalDefinition)) { + return new static(0); + } + + $years = 0; + $months = 0; + $weeks = 0; + $days = 0; + $hours = 0; + $minutes = 0; + $seconds = 0; + $milliseconds = 0; + $microseconds = 0; + + $pattern = '/(\d+(?:\.\d+)?)\h*([^\d\h]*)/i'; + preg_match_all($pattern, $intervalDefinition, $parts, PREG_SET_ORDER); + + while ([$part, $value, $unit] = array_shift($parts)) { + $intValue = (int) $value; + $fraction = (float) $value - $intValue; + + // Fix calculation precision + switch (round($fraction, 6)) { + case 1: + $fraction = 0; + $intValue++; + + break; + case 0: + $fraction = 0; + + break; + } + + switch ($unit === 'µs' ? 'µs' : strtolower($unit)) { + case 'millennia': + case 'millennium': + $years += $intValue * CarbonInterface::YEARS_PER_MILLENNIUM; + + break; + + case 'century': + case 'centuries': + $years += $intValue * CarbonInterface::YEARS_PER_CENTURY; + + break; + + case 'decade': + case 'decades': + $years += $intValue * CarbonInterface::YEARS_PER_DECADE; + + break; + + case 'year': + case 'years': + case 'y': + case 'yr': + case 'yrs': + $years += $intValue; + + break; + + case 'quarter': + case 'quarters': + $months += $intValue * CarbonInterface::MONTHS_PER_QUARTER; + + break; + + case 'month': + case 'months': + case 'mo': + case 'mos': + $months += $intValue; + + break; + + case 'week': + case 'weeks': + case 'w': + $weeks += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getDaysPerWeek(), 'd']; + } + + break; + + case 'day': + case 'days': + case 'd': + $days += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getHoursPerDay(), 'h']; + } + + break; + + case 'hour': + case 'hours': + case 'h': + $hours += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getMinutesPerHour(), 'm']; + } + + break; + + case 'minute': + case 'minutes': + case 'm': + $minutes += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getSecondsPerMinute(), 's']; + } + + break; + + case 'second': + case 'seconds': + case 's': + $seconds += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getMillisecondsPerSecond(), 'ms']; + } + + break; + + case 'millisecond': + case 'milliseconds': + case 'milli': + case 'ms': + $milliseconds += $intValue; + + if ($fraction) { + $microseconds += round($fraction * static::getMicrosecondsPerMillisecond()); + } + + break; + + case 'microsecond': + case 'microseconds': + case 'micro': + case 'µs': + $microseconds += $intValue; + + break; + + default: + throw new InvalidIntervalException( + sprintf('Invalid part %s in definition %s', $part, $intervalDefinition) + ); + } + } + + return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $milliseconds * Carbon::MICROSECONDS_PER_MILLISECOND + $microseconds); + } + + /** + * Creates a CarbonInterval from string using a different locale. + * + * @param string $interval interval string in the given language (may also contain English). + * @param string|null $locale if locale is null or not specified, current global locale will be used instead. + * + * @return static + */ + public static function parseFromLocale($interval, $locale = null) + { + return static::fromString(Carbon::translateTimeString($interval, $locale ?: static::getLocale(), 'en')); + } + + private static function castIntervalToClass(DateInterval $interval, string $className, array $skip = []) + { + $mainClass = DateInterval::class; + + if (!is_a($className, $mainClass, true)) { + throw new InvalidCastException("$className is not a sub-class of $mainClass."); + } + + $microseconds = $interval->f; + $instance = new $className(static::getDateIntervalSpec($interval, false, $skip)); + + if ($microseconds) { + $instance->f = $microseconds; + } + + if ($interval instanceof self && is_a($className, self::class, true)) { + self::copyStep($interval, $instance); + } + + self::copyNegativeUnits($interval, $instance); + + return $instance; + } + + private static function copyNegativeUnits(DateInterval $from, DateInterval $to): void + { + $to->invert = $from->invert; + + foreach (['y', 'm', 'd', 'h', 'i', 's'] as $unit) { + if ($from->$unit < 0) { + $to->$unit *= -1; + } + } + } + + private static function copyStep(self $from, self $to): void + { + $to->setStep($from->getStep()); + } + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateInterval + */ + public function cast(string $className) + { + return self::castIntervalToClass($this, $className); + } + + /** + * Create a CarbonInterval instance from a DateInterval one. Can not instance + * DateInterval objects created from DateTime::diff() as you can't externally + * set the $days field. + * + * @param DateInterval $interval + * @param bool $skipCopy set to true to return the passed object + * (without copying it) if it's already of the + * current class + * + * @return static + */ + public static function instance(DateInterval $interval, array $skip = [], bool $skipCopy = false) + { + if ($skipCopy && $interval instanceof static) { + return $interval; + } + + return self::castIntervalToClass($interval, static::class, $skip); + } + + /** + * Make a CarbonInterval instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be intervals (skip dates + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed|int|DateInterval|string|Closure|null $interval interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * @param bool $skipCopy set to true to return the passed object + * (without copying it) if it's already of the + * current class + * + * @return static|null + */ + public static function make($interval, $unit = null, bool $skipCopy = false) + { + if ($unit) { + $interval = "$interval ".Carbon::pluralUnit($unit); + } + + if ($interval instanceof DateInterval) { + return static::instance($interval, [], $skipCopy); + } + + if ($interval instanceof Closure) { + return new static($interval); + } + + if (!\is_string($interval)) { + return null; + } + + return static::makeFromString($interval); + } + + protected static function makeFromString(string $interval) + { + $interval = preg_replace('/\s+/', ' ', trim($interval)); + + if (preg_match('/^P[T\d]/', $interval)) { + return new static($interval); + } + + if (preg_match('/^(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+$/i', $interval)) { + return static::fromString($interval); + } + + // @codeCoverageIgnoreStart + try { + /** @var static $interval */ + $interval = static::createFromDateString($interval); + } catch (DateMalformedIntervalStringException $e) { + return null; + } + // @codeCoverageIgnoreEnd + + return !$interval || $interval->isEmpty() ? null : $interval; + } + + protected function resolveInterval($interval) + { + if (!($interval instanceof self)) { + return self::make($interval); + } + + return $interval; + } + + /** + * Sets up a DateInterval from the relative parts of the string. + * + * @param string $time + * + * @return static + * + * @link https://php.net/manual/en/dateinterval.createfromdatestring.php + */ + #[ReturnTypeWillChange] + public static function createFromDateString($time) + { + $interval = @parent::createFromDateString(strtr($time, [ + ',' => ' ', + ' and ' => ' ', + ])); + + if ($interval instanceof DateInterval) { + $interval = static::instance($interval); + } + + return $interval; + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// GETTERS AND SETTERS ///////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get a part of the CarbonInterval object. + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return int|float|string + */ + public function get($name) + { + if (str_starts_with($name, 'total')) { + return $this->total(substr($name, 5)); + } + + switch ($name) { + case 'years': + return $this->y; + + case 'months': + return $this->m; + + case 'dayz': + return $this->d; + + case 'hours': + return $this->h; + + case 'minutes': + return $this->i; + + case 'seconds': + return $this->s; + + case 'milli': + case 'milliseconds': + return (int) (round($this->f * Carbon::MICROSECONDS_PER_SECOND) / Carbon::MICROSECONDS_PER_MILLISECOND); + + case 'micro': + case 'microseconds': + return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND); + + case 'microExcludeMilli': + return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND) % Carbon::MICROSECONDS_PER_MILLISECOND; + + case 'weeks': + return (int) ($this->d / (int) static::getDaysPerWeek()); + + case 'daysExcludeWeeks': + case 'dayzExcludeWeeks': + return $this->d % (int) static::getDaysPerWeek(); + + case 'locale': + return $this->getTranslatorLocale(); + + default: + throw new UnknownGetterException($name); + } + } + + /** + * Get a part of the CarbonInterval object. + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return int|float|string + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * Set a part of the CarbonInterval object. + * + * @param string|array $name + * @param int $value + * + * @throws UnknownSetterException + * + * @return $this + */ + public function set($name, $value = null) + { + $properties = \is_array($name) ? $name : [$name => $value]; + + foreach ($properties as $key => $value) { + switch (Carbon::singularUnit(rtrim($key, 'z'))) { + case 'year': + $this->checkIntegerValue($key, $value); + $this->y = $value; + $this->handleDecimalPart('year', $value, $this->y); + + break; + + case 'month': + $this->checkIntegerValue($key, $value); + $this->m = $value; + $this->handleDecimalPart('month', $value, $this->m); + + break; + + case 'week': + $this->checkIntegerValue($key, $value); + $days = $value * (int) static::getDaysPerWeek(); + $this->assertSafeForInteger('days total (including weeks)', $days); + $this->d = $days; + $this->handleDecimalPart('day', $days, $this->d); + + break; + + case 'day': + $this->checkIntegerValue($key, $value); + $this->d = $value; + $this->handleDecimalPart('day', $value, $this->d); + + break; + + case 'daysexcludeweek': + case 'dayzexcludeweek': + $this->checkIntegerValue($key, $value); + $days = $this->weeks * (int) static::getDaysPerWeek() + $value; + $this->assertSafeForInteger('days total (including weeks)', $days); + $this->d = $days; + $this->handleDecimalPart('day', $days, $this->d); + + break; + + case 'hour': + $this->checkIntegerValue($key, $value); + $this->h = $value; + $this->handleDecimalPart('hour', $value, $this->h); + + break; + + case 'minute': + $this->checkIntegerValue($key, $value); + $this->i = $value; + $this->handleDecimalPart('minute', $value, $this->i); + + break; + + case 'second': + $this->checkIntegerValue($key, $value); + $this->s = $value; + $this->handleDecimalPart('second', $value, $this->s); + + break; + + case 'milli': + case 'millisecond': + $this->microseconds = $value * Carbon::MICROSECONDS_PER_MILLISECOND + $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND; + + break; + + case 'micro': + case 'microsecond': + $this->f = $value / Carbon::MICROSECONDS_PER_SECOND; + + break; + + default: + if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { + throw new UnknownSetterException($key); + } + + $this->$key = $value; + } + } + + return $this; + } + + /** + * Set a part of the CarbonInterval object. + * + * @param string $name + * @param int $value + * + * @throws UnknownSetterException + */ + public function __set($name, $value) + { + $this->set($name, $value); + } + + /** + * Allow setting of weeks and days to be cumulative. + * + * @param int $weeks Number of weeks to set + * @param int $days Number of days to set + * + * @return static + */ + public function weeksAndDays($weeks, $days) + { + $this->dayz = ($weeks * static::getDaysPerWeek()) + $days; + + return $this; + } + + /** + * Returns true if the interval is empty for each unit. + * + * @return bool + */ + public function isEmpty() + { + return $this->years === 0 && + $this->months === 0 && + $this->dayz === 0 && + !$this->days && + $this->hours === 0 && + $this->minutes === 0 && + $this->seconds === 0 && + $this->microseconds === 0; + } + + /** + * Register a custom macro. + * + * @example + * ``` + * CarbonInterval::macro('twice', function () { + * return $this->times(2); + * }); + * echo CarbonInterval::hours(2)->twice(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$macros[$name] = $macro; + } + + /** + * Register macros from a mixin object. + * + * @example + * ``` + * CarbonInterval::mixin(new class { + * public function daysToHours() { + * return function () { + * $this->hours += $this->days; + * $this->days = 0; + * + * return $this; + * }; + * } + * public function hoursToDays() { + * return function () { + * $this->days += $this->hours; + * $this->hours = 0; + * + * return $this; + * }; + * } + * }); + * echo CarbonInterval::hours(5)->hoursToDays() . "\n"; + * echo CarbonInterval::days(5)->daysToHours() . "\n"; + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + static::baseMixin($mixin); + } + + /** + * Check if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + + /** + * Call given macro. + * + * @param string $name + * @param array $parameters + * + * @return mixed + */ + protected function callMacro($name, $parameters) + { + $macro = static::$macros[$name]; + + if ($macro instanceof Closure) { + $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + } + + /** + * Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day(). + * + * Note: This is done using the magic method to allow static and instance methods to + * have the same names. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws BadFluentSetterException|Throwable + * + * @return static + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return static::bindMacroContext($this, function () use (&$method, &$parameters) { + return $this->callMacro($method, $parameters); + }); + } + + $roundedValue = $this->callRoundMethod($method, $parameters); + + if ($roundedValue !== null) { + return $roundedValue; + } + + if (preg_match('/^(?add|sub)(?[A-Z].*)$/', $method, $match)) { + $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($match['unit']), 0); + + return $this->{$match['method']}($value, $match['unit']); + } + + $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($method), 1); + + try { + $this->set($method, $value); + } catch (UnknownSetterException $exception) { + if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { + throw new BadFluentSetterException($method, 0, $exception); + } + } + + return $this; + } + + protected function getForHumansInitialVariables($syntax, $short) + { + if (\is_array($syntax)) { + return $syntax; + } + + if (\is_int($short)) { + return [ + 'parts' => $short, + 'short' => false, + ]; + } + + if (\is_bool($syntax)) { + return [ + 'short' => $syntax, + 'syntax' => CarbonInterface::DIFF_ABSOLUTE, + ]; + } + + return []; + } + + /** + * @param mixed $syntax + * @param mixed $short + * @param mixed $parts + * @param mixed $options + * + * @return array + */ + protected function getForHumansParameters($syntax = null, $short = false, $parts = -1, $options = null) + { + $optionalSpace = ' '; + $default = $this->getTranslationMessage('list.0') ?? $this->getTranslationMessage('list') ?? ' '; + $join = $default === '' ? '' : ' '; + $altNumbers = false; + $aUnit = false; + $minimumUnit = 's'; + $skip = []; + extract($this->getForHumansInitialVariables($syntax, $short)); + $skip = array_map('strtolower', array_filter((array) $skip, static function ($value) { + return \is_string($value) && $value !== ''; + })); + + if ($syntax === null) { + $syntax = CarbonInterface::DIFF_ABSOLUTE; + } + + if ($parts === -1) { + $parts = INF; + } + + if ($options === null) { + $options = static::getHumanDiffOptions(); + } + + if ($join === false) { + $join = ' '; + } elseif ($join === true) { + $join = [ + $default, + $this->getTranslationMessage('list.1') ?? $default, + ]; + } + + if ($altNumbers && $altNumbers !== true) { + $language = new Language($this->locale); + $altNumbers = \in_array($language->getCode(), (array) $altNumbers, true); + } + + if (\is_array($join)) { + [$default, $last] = $join; + + if ($default !== ' ') { + $optionalSpace = ''; + } + + $join = function ($list) use ($default, $last) { + if (\count($list) < 2) { + return implode('', $list); + } + + $end = array_pop($list); + + return implode($default, $list).$last.$end; + }; + } + + if (\is_string($join)) { + if ($join !== ' ') { + $optionalSpace = ''; + } + + $glue = $join; + $join = function ($list) use ($glue) { + return implode($glue, $list); + }; + } + + $interpolations = [ + ':optional-space' => $optionalSpace, + ]; + + return [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip]; + } + + protected static function getRoundingMethodFromOptions(int $options): ?string + { + if ($options & CarbonInterface::ROUND) { + return 'round'; + } + + if ($options & CarbonInterface::CEIL) { + return 'ceil'; + } + + if ($options & CarbonInterface::FLOOR) { + return 'floor'; + } + + return null; + } + + /** + * Returns interval values as an array where key are the unit names and values the counts. + * + * @return int[] + */ + public function toArray() + { + return [ + 'years' => $this->years, + 'months' => $this->months, + 'weeks' => $this->weeks, + 'days' => $this->daysExcludeWeeks, + 'hours' => $this->hours, + 'minutes' => $this->minutes, + 'seconds' => $this->seconds, + 'microseconds' => $this->microseconds, + ]; + } + + /** + * Returns interval non-zero values as an array where key are the unit names and values the counts. + * + * @return int[] + */ + public function getNonZeroValues() + { + return array_filter($this->toArray(), 'intval'); + } + + /** + * Returns interval values as an array where key are the unit names and values the counts + * from the biggest non-zero one the the smallest non-zero one. + * + * @return int[] + */ + public function getValuesSequence() + { + $nonZeroValues = $this->getNonZeroValues(); + + if ($nonZeroValues === []) { + return []; + } + + $keys = array_keys($nonZeroValues); + $firstKey = $keys[0]; + $lastKey = $keys[\count($keys) - 1]; + $values = []; + $record = false; + + foreach ($this->toArray() as $unit => $count) { + if ($unit === $firstKey) { + $record = true; + } + + if ($record) { + $values[$unit] = $count; + } + + if ($unit === $lastKey) { + $record = false; + } + } + + return $values; + } + + /** + * Get the current interval in a human readable format in the current locale. + * + * @example + * ``` + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans() . "\n"; + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 2]) . "\n"; + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 3, 'join' => true]) . "\n"; + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['short' => true]) . "\n"; + * echo CarbonInterval::fromString('1d 24h')->forHumans(['join' => ' or ']) . "\n"; + * echo CarbonInterval::fromString('1d 24h')->forHumans(['minimumUnit' => 'hour']) . "\n"; + * ``` + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, µs). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: -1: no limits) + * @param int $options human diff options + * + * @throws Exception + * + * @return string + */ + public function forHumans($syntax = null, $short = false, $parts = -1, $options = null) + { + [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip] = $this + ->getForHumansParameters($syntax, $short, $parts, $options); + + $interval = []; + + $syntax = (int) ($syntax ?? CarbonInterface::DIFF_ABSOLUTE); + $absolute = $syntax === CarbonInterface::DIFF_ABSOLUTE; + $relativeToNow = $syntax === CarbonInterface::DIFF_RELATIVE_TO_NOW; + $count = 1; + $unit = $short ? 's' : 'second'; + $isFuture = $this->invert === 1; + $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); + $declensionMode = null; + + /** @var \EDD\Vendor\Symfony\Component\Translation\Translator $translator */ + $translator = $this->getLocalTranslator(); + + $handleDeclensions = function ($unit, $count, $index = 0, $parts = 1) use ($interpolations, $transId, $translator, $altNumbers, $absolute, &$declensionMode) { + if (!$absolute) { + $declensionMode = $declensionMode ?? $this->translate($transId.'_mode'); + + if ($this->needsDeclension($declensionMode, $index, $parts)) { + // Some languages have special pluralization for past and future tense. + $key = $unit.'_'.$transId; + $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); + + if ($result !== $key) { + return $result; + } + } + } + + $result = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); + + if ($result !== $unit) { + return $result; + } + + return null; + }; + + $intervalValues = $this; + $method = static::getRoundingMethodFromOptions($options); + + if ($method) { + $previousCount = INF; + + while ( + \count($intervalValues->getNonZeroValues()) > $parts && + ($count = \count($keys = array_keys($intervalValues->getValuesSequence()))) > 1 + ) { + $index = min($count, $previousCount - 1) - 2; + + if ($index < 0) { + break; + } + + $intervalValues = $this->copy()->roundUnit( + $keys[$index], + 1, + $method + ); + $previousCount = $count; + } + } + + $diffIntervalArray = [ + ['value' => $intervalValues->years, 'unit' => 'year', 'unitShort' => 'y'], + ['value' => $intervalValues->months, 'unit' => 'month', 'unitShort' => 'm'], + ['value' => $intervalValues->weeks, 'unit' => 'week', 'unitShort' => 'w'], + ['value' => $intervalValues->daysExcludeWeeks, 'unit' => 'day', 'unitShort' => 'd'], + ['value' => $intervalValues->hours, 'unit' => 'hour', 'unitShort' => 'h'], + ['value' => $intervalValues->minutes, 'unit' => 'minute', 'unitShort' => 'min'], + ['value' => $intervalValues->seconds, 'unit' => 'second', 'unitShort' => 's'], + ['value' => $intervalValues->milliseconds, 'unit' => 'millisecond', 'unitShort' => 'ms'], + ['value' => $intervalValues->microExcludeMilli, 'unit' => 'microsecond', 'unitShort' => 'µs'], + ]; + + if (!empty($skip)) { + foreach ($diffIntervalArray as $index => &$unitData) { + $nextIndex = $index + 1; + + if ($unitData['value'] && + isset($diffIntervalArray[$nextIndex]) && + \count(array_intersect([$unitData['unit'], $unitData['unit'].'s', $unitData['unitShort']], $skip)) + ) { + $diffIntervalArray[$nextIndex]['value'] += $unitData['value'] * + self::getFactorWithDefault($diffIntervalArray[$nextIndex]['unit'], $unitData['unit']); + $unitData['value'] = 0; + } + } + } + + $transChoice = function ($short, $unitData, $index, $parts) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { + $count = $unitData['value']; + + if ($short) { + $result = $handleDeclensions($unitData['unitShort'], $count, $index, $parts); + + if ($result !== null) { + return $result; + } + } elseif ($aUnit) { + $result = $handleDeclensions('a_'.$unitData['unit'], $count, $index, $parts); + + if ($result !== null) { + return $result; + } + } + + if (!$absolute) { + return $handleDeclensions($unitData['unit'], $count, $index, $parts); + } + + return $this->translate($unitData['unit'], $interpolations, $count, $translator, $altNumbers); + }; + + $fallbackUnit = ['second', 's']; + + foreach ($diffIntervalArray as $diffIntervalData) { + if ($diffIntervalData['value'] > 0) { + $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; + $count = $diffIntervalData['value']; + $interval[] = [$short, $diffIntervalData]; + } elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && \count($interval) > 0) { + break; + } + + // break the loop after we get the required number of parts in array + if (\count($interval) >= $parts) { + break; + } + + // break the loop after we have reached the minimum unit + if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']], true)) { + $fallbackUnit = [$diffIntervalData['unit'], $diffIntervalData['unitShort']]; + + break; + } + } + + $actualParts = \count($interval); + + foreach ($interval as $index => &$item) { + $item = $transChoice($item[0], $item[1], $index, $actualParts); + } + + if (\count($interval) === 0) { + if ($relativeToNow && $options & CarbonInterface::JUST_NOW) { + $key = 'diff_now'; + $translation = $this->translate($key, $interpolations, null, $translator); + + if ($translation !== $key) { + return $translation; + } + } + + $count = $options & CarbonInterface::NO_ZERO_DIFF ? 1 : 0; + $unit = $fallbackUnit[$short ? 1 : 0]; + $interval[] = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); + } + + // join the interval parts by a space + $time = $join($interval); + + unset($diffIntervalArray, $interval); + + if ($absolute) { + return $time; + } + + $isFuture = $this->invert === 1; + + $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); + + if ($parts === 1) { + if ($relativeToNow && $unit === 'day') { + if ($count === 1 && $options & CarbonInterface::ONE_DAY_WORDS) { + $key = $isFuture ? 'diff_tomorrow' : 'diff_yesterday'; + $translation = $this->translate($key, $interpolations, null, $translator); + + if ($translation !== $key) { + return $translation; + } + } + + if ($count === 2 && $options & CarbonInterface::TWO_DAY_WORDS) { + $key = $isFuture ? 'diff_after_tomorrow' : 'diff_before_yesterday'; + $translation = $this->translate($key, $interpolations, null, $translator); + + if ($translation !== $key) { + return $translation; + } + } + } + + $aTime = $aUnit ? $handleDeclensions('a_'.$unit, $count) : null; + + $time = $aTime ?: $handleDeclensions($unit, $count) ?: $time; + } + + $time = [':time' => $time]; + + return $this->translate($transId, array_merge($time, $interpolations, $time), null, $translator); + } + + /** + * Format the instance as a string using the forHumans() function. + * + * @throws Exception + * + * @return string + */ + public function __toString() + { + $format = $this->localToStringFormat ?? static::$toStringFormat; + + if (!$format) { + return $this->forHumans(); + } + + if ($format instanceof Closure) { + return $format($this); + } + + return $this->format($format); + } + + /** + * Return native DateInterval PHP object matching the current instance. + * + * @example + * ``` + * var_dump(CarbonInterval::hours(2)->toDateInterval()); + * ``` + * + * @return DateInterval + */ + public function toDateInterval() + { + return self::castIntervalToClass($this, DateInterval::class); + } + + /** + * Convert the interval to a CarbonPeriod. + * + * @param DateTimeInterface|string|int ...$params Start date, [end date or recurrences] and optional settings. + * + * @return CarbonPeriod + */ + public function toPeriod(...$params) + { + if ($this->tzName) { + $tz = \is_string($this->tzName) ? new DateTimeZone($this->tzName) : $this->tzName; + + if ($tz instanceof DateTimeZone) { + array_unshift($params, $tz); + } + } + + return CarbonPeriod::create($this, ...$params); + } + + /** + * Invert the interval. + * + * @param bool|int $inverted if a parameter is passed, the passed value cast as 1 or 0 is used + * as the new value of the ->invert property. + * + * @return $this + */ + public function invert($inverted = null) + { + $this->invert = (\func_num_args() === 0 ? !$this->invert : $inverted) ? 1 : 0; + + return $this; + } + + protected function solveNegativeInterval() + { + if (!$this->isEmpty() && $this->years <= 0 && $this->months <= 0 && $this->dayz <= 0 && $this->hours <= 0 && $this->minutes <= 0 && $this->seconds <= 0 && $this->microseconds <= 0) { + $this->years *= -1; + $this->months *= -1; + $this->dayz *= -1; + $this->hours *= -1; + $this->minutes *= -1; + $this->seconds *= -1; + $this->microseconds *= -1; + $this->invert(); + } + + return $this; + } + + /** + * Add the passed interval to the current instance. + * + * @param string|DateInterval $unit + * @param int|float $value + * + * @return $this + */ + public function add($unit, $value = 1) + { + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + if (\is_string($unit) && !preg_match('/^\s*\d/', $unit)) { + $unit = "$value $unit"; + $value = 1; + } + + $interval = static::make($unit); + + if (!$interval) { + throw new InvalidIntervalException('This type of data cannot be added/subtracted.'); + } + + if ($value !== 1) { + $interval->times($value); + } + + $sign = ($this->invert === 1) !== ($interval->invert === 1) ? -1 : 1; + $this->years += $interval->y * $sign; + $this->months += $interval->m * $sign; + $this->dayz += ($interval->days === false ? $interval->d : $interval->days) * $sign; + $this->hours += $interval->h * $sign; + $this->minutes += $interval->i * $sign; + $this->seconds += $interval->s * $sign; + $this->microseconds += $interval->microseconds * $sign; + + $this->solveNegativeInterval(); + + return $this; + } + + /** + * Subtract the passed interval to the current instance. + * + * @param string|DateInterval $unit + * @param int|float $value + * + * @return $this + */ + public function sub($unit, $value = 1) + { + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + return $this->add($unit, -(float) $value); + } + + /** + * Subtract the passed interval to the current instance. + * + * @param string|DateInterval $unit + * @param int|float $value + * + * @return $this + */ + public function subtract($unit, $value = 1) + { + return $this->sub($unit, $value); + } + + /** + * Add given parameters to the current interval. + * + * @param int $years + * @param int $months + * @param int|float $weeks + * @param int|float $days + * @param int|float $hours + * @param int|float $minutes + * @param int|float $seconds + * @param int|float $microseconds + * + * @return $this + */ + public function plus( + $years = 0, + $months = 0, + $weeks = 0, + $days = 0, + $hours = 0, + $minutes = 0, + $seconds = 0, + $microseconds = 0 + ): self { + return $this->add(" + $years years $months months $weeks weeks $days days + $hours hours $minutes minutes $seconds seconds $microseconds microseconds + "); + } + + /** + * Add given parameters to the current interval. + * + * @param int $years + * @param int $months + * @param int|float $weeks + * @param int|float $days + * @param int|float $hours + * @param int|float $minutes + * @param int|float $seconds + * @param int|float $microseconds + * + * @return $this + */ + public function minus( + $years = 0, + $months = 0, + $weeks = 0, + $days = 0, + $hours = 0, + $minutes = 0, + $seconds = 0, + $microseconds = 0 + ): self { + return $this->sub(" + $years years $months months $weeks weeks $days days + $hours hours $minutes minutes $seconds seconds $microseconds microseconds + "); + } + + /** + * Multiply current instance given number of times. times() is naive, it multiplies each unit + * (so day can be greater than 31, hour can be greater than 23, etc.) and the result is rounded + * separately for each unit. + * + * Use times() when you want a fast and approximated calculation that does not cascade units. + * + * For a precise and cascaded calculation, + * + * @see multiply() + * + * @param float|int $factor + * + * @return $this + */ + public function times($factor) + { + if ($factor < 0) { + $this->invert = $this->invert ? 0 : 1; + $factor = -$factor; + } + + $this->years = (int) round($this->years * $factor); + $this->months = (int) round($this->months * $factor); + $this->dayz = (int) round($this->dayz * $factor); + $this->hours = (int) round($this->hours * $factor); + $this->minutes = (int) round($this->minutes * $factor); + $this->seconds = (int) round($this->seconds * $factor); + $this->microseconds = (int) round($this->microseconds * $factor); + + return $this; + } + + /** + * Divide current instance by a given divider. shares() is naive, it divides each unit separately + * and the result is rounded for each unit. So 5 hours and 20 minutes shared by 3 becomes 2 hours + * and 7 minutes. + * + * Use shares() when you want a fast and approximated calculation that does not cascade units. + * + * For a precise and cascaded calculation, + * + * @see divide() + * + * @param float|int $divider + * + * @return $this + */ + public function shares($divider) + { + return $this->times(1 / $divider); + } + + protected function copyProperties(self $interval, $ignoreSign = false) + { + $this->years = $interval->years; + $this->months = $interval->months; + $this->dayz = $interval->dayz; + $this->hours = $interval->hours; + $this->minutes = $interval->minutes; + $this->seconds = $interval->seconds; + $this->microseconds = $interval->microseconds; + + if (!$ignoreSign) { + $this->invert = $interval->invert; + } + + return $this; + } + + /** + * Multiply and cascade current instance by a given factor. + * + * @param float|int $factor + * + * @return $this + */ + public function multiply($factor) + { + if ($factor < 0) { + $this->invert = $this->invert ? 0 : 1; + $factor = -$factor; + } + + $yearPart = (int) floor($this->years * $factor); // Split calculation to prevent imprecision + + if ($yearPart) { + $this->years -= $yearPart / $factor; + } + + return $this->copyProperties( + static::create($yearPart) + ->microseconds(abs($this->totalMicroseconds) * $factor) + ->cascade(), + true + ); + } + + /** + * Divide and cascade current instance by a given divider. + * + * @param float|int $divider + * + * @return $this + */ + public function divide($divider) + { + return $this->multiply(1 / $divider); + } + + /** + * Get the interval_spec string of a date interval. + * + * @param DateInterval $interval + * + * @return string + */ + public static function getDateIntervalSpec(DateInterval $interval, bool $microseconds = false, array $skip = []) + { + $date = array_filter([ + static::PERIOD_YEARS => abs($interval->y), + static::PERIOD_MONTHS => abs($interval->m), + static::PERIOD_DAYS => abs($interval->d), + ]); + + if ( + $interval->days >= CarbonInterface::DAYS_PER_WEEK * CarbonInterface::WEEKS_PER_MONTH && + (!isset($date[static::PERIOD_YEARS]) || \count(array_intersect(['y', 'year', 'years'], $skip))) && + (!isset($date[static::PERIOD_MONTHS]) || \count(array_intersect(['m', 'month', 'months'], $skip))) + ) { + $date = [ + static::PERIOD_DAYS => abs($interval->days), + ]; + } + + $seconds = abs($interval->s); + if ($microseconds && $interval->f > 0) { + $seconds = sprintf('%d.%06d', $seconds, abs($interval->f) * 1000000); + } + + $time = array_filter([ + static::PERIOD_HOURS => abs($interval->h), + static::PERIOD_MINUTES => abs($interval->i), + static::PERIOD_SECONDS => $seconds, + ]); + + $specString = static::PERIOD_PREFIX; + + foreach ($date as $key => $value) { + $specString .= $value.$key; + } + + if (\count($time) > 0) { + $specString .= static::PERIOD_TIME_PREFIX; + foreach ($time as $key => $value) { + $specString .= $value.$key; + } + } + + return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString; + } + + /** + * Get the interval_spec string. + * + * @return string + */ + public function spec(bool $microseconds = false) + { + return static::getDateIntervalSpec($this, $microseconds); + } + + /** + * Comparing 2 date intervals. + * + * @param DateInterval $first + * @param DateInterval $second + * + * @return int + */ + public static function compareDateIntervals(DateInterval $first, DateInterval $second) + { + $current = Carbon::now(); + $passed = $current->avoidMutation()->add($second); + $current->add($first); + + if ($current < $passed) { + return -1; + } + if ($current > $passed) { + return 1; + } + + return 0; + } + + /** + * Comparing with passed interval. + * + * @param DateInterval $interval + * + * @return int + */ + public function compare(DateInterval $interval) + { + return static::compareDateIntervals($this, $interval); + } + + private function invertCascade(array $values) + { + return $this->set(array_map(function ($value) { + return -$value; + }, $values))->doCascade(true)->invert(); + } + + private function doCascade(bool $deep) + { + $originalData = $this->toArray(); + $originalData['milliseconds'] = (int) ($originalData['microseconds'] / static::getMicrosecondsPerMillisecond()); + $originalData['microseconds'] = $originalData['microseconds'] % static::getMicrosecondsPerMillisecond(); + $originalData['weeks'] = (int) ($this->d / static::getDaysPerWeek()); + $originalData['daysExcludeWeeks'] = fmod($this->d, static::getDaysPerWeek()); + unset($originalData['days']); + $newData = $originalData; + $previous = []; + + foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) { + foreach (['source', 'target'] as $key) { + if ($$key === 'dayz') { + $$key = 'daysExcludeWeeks'; + } + } + + $value = $newData[$source]; + $modulo = fmod($factor + fmod($value, $factor), $factor); + $newData[$source] = $modulo; + $newData[$target] += ($value - $modulo) / $factor; + + $decimalPart = fmod($newData[$source], 1); + + if ($decimalPart !== 0.0) { + $unit = $source; + + foreach ($previous as [$subUnit, $subFactor]) { + $newData[$unit] -= $decimalPart; + $newData[$subUnit] += $decimalPart * $subFactor; + $decimalPart = fmod($newData[$subUnit], 1); + + if ($decimalPart === 0.0) { + break; + } + + $unit = $subUnit; + } + } + + array_unshift($previous, [$source, $factor]); + } + + $positive = null; + + if (!$deep) { + foreach ($newData as $value) { + if ($value) { + if ($positive === null) { + $positive = ($value > 0); + + continue; + } + + if (($value > 0) !== $positive) { + return $this->invertCascade($originalData) + ->solveNegativeInterval(); + } + } + } + } + + return $this->set($newData) + ->solveNegativeInterval(); + } + + /** + * Convert overflowed values into bigger units. + * + * @return $this + */ + public function cascade() + { + return $this->doCascade(false); + } + + public function hasNegativeValues(): bool + { + foreach ($this->toArray() as $value) { + if ($value < 0) { + return true; + } + } + + return false; + } + + public function hasPositiveValues(): bool + { + foreach ($this->toArray() as $value) { + if ($value > 0) { + return true; + } + } + + return false; + } + + /** + * Get amount of given unit equivalent to the interval. + * + * @param string $unit + * + * @throws UnknownUnitException|UnitNotConfiguredException + * + * @return float + */ + public function total($unit) + { + $realUnit = $unit = strtolower($unit); + + if (\in_array($unit, ['days', 'weeks'])) { + $realUnit = 'dayz'; + } elseif (!\in_array($unit, ['microseconds', 'milliseconds', 'seconds', 'minutes', 'hours', 'dayz', 'months', 'years'])) { + throw new UnknownUnitException($unit); + } + + $result = 0; + $cumulativeFactor = 0; + $unitFound = false; + $factors = self::getFlipCascadeFactors(); + $daysPerWeek = (int) static::getDaysPerWeek(); + + $values = [ + 'years' => $this->years, + 'months' => $this->months, + 'weeks' => (int) ($this->d / $daysPerWeek), + 'dayz' => fmod($this->d, $daysPerWeek), + 'hours' => $this->hours, + 'minutes' => $this->minutes, + 'seconds' => $this->seconds, + 'milliseconds' => (int) ($this->microseconds / Carbon::MICROSECONDS_PER_MILLISECOND), + 'microseconds' => $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND, + ]; + + if (isset($factors['dayz']) && $factors['dayz'][0] !== 'weeks') { + $values['dayz'] += $values['weeks'] * $daysPerWeek; + $values['weeks'] = 0; + } + + foreach ($factors as $source => [$target, $factor]) { + if ($source === $realUnit) { + $unitFound = true; + $value = $values[$source]; + $result += $value; + $cumulativeFactor = 1; + } + + if ($factor === false) { + if ($unitFound) { + break; + } + + $result = 0; + $cumulativeFactor = 0; + + continue; + } + + if ($target === $realUnit) { + $unitFound = true; + } + + if ($cumulativeFactor) { + $cumulativeFactor *= $factor; + $result += $values[$target] * $cumulativeFactor; + + continue; + } + + $value = $values[$source]; + + $result = ($result + $value) / $factor; + } + + if (isset($target) && !$cumulativeFactor) { + $result += $values[$target]; + } + + if (!$unitFound) { + throw new UnitNotConfiguredException($unit); + } + + if ($this->invert) { + $result *= -1; + } + + if ($unit === 'weeks') { + $result /= $daysPerWeek; + } + + // Cast as int numbers with no decimal part + return fmod($result, 1) === 0.0 ? (int) $result : $result; + } + + /** + * Determines if the instance is equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see equalTo() + * + * @return bool + */ + public function eq($interval): bool + { + return $this->equalTo($interval); + } + + /** + * Determines if the instance is equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function equalTo($interval): bool + { + $interval = $this->resolveInterval($interval); + + return $interval !== null && $this->totalMicroseconds === $interval->totalMicroseconds; + } + + /** + * Determines if the instance is not equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($interval): bool + { + return $this->notEqualTo($interval); + } + + /** + * Determines if the instance is not equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function notEqualTo($interval): bool + { + return !$this->eq($interval); + } + + /** + * Determines if the instance is greater (longer) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see greaterThan() + * + * @return bool + */ + public function gt($interval): bool + { + return $this->greaterThan($interval); + } + + /** + * Determines if the instance is greater (longer) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function greaterThan($interval): bool + { + $interval = $this->resolveInterval($interval); + + return $interval === null || $this->totalMicroseconds > $interval->totalMicroseconds; + } + + /** + * Determines if the instance is greater (longer) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see greaterThanOrEqualTo() + * + * @return bool + */ + public function gte($interval): bool + { + return $this->greaterThanOrEqualTo($interval); + } + + /** + * Determines if the instance is greater (longer) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function greaterThanOrEqualTo($interval): bool + { + return $this->greaterThan($interval) || $this->equalTo($interval); + } + + /** + * Determines if the instance is less (shorter) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see lessThan() + * + * @return bool + */ + public function lt($interval): bool + { + return $this->lessThan($interval); + } + + /** + * Determines if the instance is less (shorter) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function lessThan($interval): bool + { + $interval = $this->resolveInterval($interval); + + return $interval !== null && $this->totalMicroseconds < $interval->totalMicroseconds; + } + + /** + * Determines if the instance is less (shorter) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see lessThanOrEqualTo() + * + * @return bool + */ + public function lte($interval): bool + { + return $this->lessThanOrEqualTo($interval); + } + + /** + * Determines if the instance is less (shorter) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function lessThanOrEqualTo($interval): bool + { + return $this->lessThan($interval) || $this->equalTo($interval); + } + + /** + * Determines if the instance is between two others. + * + * The third argument allow you to specify if bounds are included or not (true by default) + * but for when you including/excluding bounds may produce different results in your application, + * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. + * + * @example + * ``` + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2)); // true + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2), false); // false + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function between($interval1, $interval2, $equal = true): bool + { + return $equal + ? $this->greaterThanOrEqualTo($interval1) && $this->lessThanOrEqualTo($interval2) + : $this->greaterThan($interval1) && $this->lessThan($interval2); + } + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // true + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * + * @return bool + */ + public function betweenIncluded($interval1, $interval2): bool + { + return $this->between($interval1, $interval2, true); + } + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // false + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * + * @return bool + */ + public function betweenExcluded($interval1, $interval2): bool + { + return $this->between($interval1, $interval2, false); + } + + /** + * Determines if the instance is between two others + * + * @example + * ``` + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2)); // true + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2), false); // false + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function isBetween($interval1, $interval2, $equal = true): bool + { + return $this->between($interval1, $interval2, $equal); + } + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int|string|DateInterval|null $precision + * @param string $function + * + * @throws Exception + * + * @return $this + */ + public function roundUnit($unit, $precision = 1, $function = 'round') + { + if (static::getCascadeFactors() !== static::getDefaultCascadeFactors()) { + $value = $function($this->total($unit) / $precision) * $precision; + $inverted = $value < 0; + + return $this->copyProperties(self::fromString( + number_format(abs($value), 12, '.', '').' '.$unit + )->invert($inverted)->cascade()); + } + + $base = CarbonImmutable::parse('2000-01-01 00:00:00', 'UTC') + ->roundUnit($unit, $precision, $function); + $next = $base->add($this); + $inverted = $next < $base; + + if ($inverted) { + $next = $base->sub($this); + } + + $this->copyProperties( + $next + ->roundUnit($unit, $precision, $function) + ->diffAsCarbonInterval($base) + ); + + return $this->invert($inverted); + } + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function floorUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'floor'); + } + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function ceilUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'ceil'); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|DateInterval|null $precision + * @param string $function + * + * @throws Exception + * + * @return $this + */ + public function round($precision = 1, $function = 'round') + { + return $this->roundWith($precision, $function); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function floor($precision = 1) + { + return $this->round($precision, 'floor'); + } + + /** + * Ceil the current instance second with given precision if specified. + * + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function ceil($precision = 1) + { + return $this->round($precision, 'ceil'); + } + + private function needsDeclension(string $mode, int $index, int $parts): bool + { + switch ($mode) { + case 'last': + return $index === $parts - 1; + default: + return true; + } + } + + private function checkIntegerValue(string $name, $value) + { + if (\is_int($value)) { + return; + } + + $this->assertSafeForInteger($name, $value); + + if (\is_float($value) && (((float) (int) $value) === $value)) { + return; + } + + if (!self::$floatSettersEnabled) { + $type = \gettype($value); + @trigger_error( + "Since 2.70.0, it's deprecated to pass $type value for $name.\n". + "It's truncated when stored as an integer interval unit.\n". + "From 3.0.0, decimal part will no longer be truncated and will be cascaded to smaller units.\n". + "- To maintain the current behavior, use explicit cast: $name((int) \$value)\n". + "- To adopt the new behavior globally, call CarbonInterval::enableFloatSetters()\n", + \E_USER_DEPRECATED + ); + } + } + + /** + * Throw an exception if precision loss when storing the given value as an integer would be >= 1.0. + */ + private function assertSafeForInteger(string $name, $value) + { + if ($value && !\is_int($value) && ($value >= 0x7fffffffffffffff || $value <= -0x7fffffffffffffff)) { + throw new OutOfRangeException($name, -0x7fffffffffffffff, 0x7fffffffffffffff, $value); + } + } + + private function handleDecimalPart(string $unit, $value, $integerValue) + { + if (self::$floatSettersEnabled) { + $floatValue = (float) $value; + $base = (float) $integerValue; + + if ($floatValue === $base) { + return; + } + + $units = [ + 'y' => 'year', + 'm' => 'month', + 'd' => 'day', + 'h' => 'hour', + 'i' => 'minute', + 's' => 'second', + ]; + $upper = true; + + foreach ($units as $property => $name) { + if ($name === $unit) { + $upper = false; + + continue; + } + + if (!$upper && $this->$property !== 0) { + throw new RuntimeException( + "You cannot set $unit to a float value as $name would be overridden, ". + 'set it first to 0 explicitly if you really want to erase its value' + ); + } + } + + $this->add($unit, $floatValue - $base); + } + } +} diff --git a/libraries/Carbon/src/Carbon/CarbonPeriod.php b/libraries/Carbon/src/Carbon/CarbonPeriod.php new file mode 100644 index 00000000000..e753ce7a7be --- /dev/null +++ b/libraries/Carbon/src/Carbon/CarbonPeriod.php @@ -0,0 +1,2742 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Carbon\Exceptions\EndLessPeriodException; +use EDD\Vendor\Carbon\Exceptions\InvalidCastException; +use EDD\Vendor\Carbon\Exceptions\InvalidIntervalException; +use EDD\Vendor\Carbon\Exceptions\InvalidPeriodDateException; +use EDD\Vendor\Carbon\Exceptions\InvalidPeriodParameterException; +use EDD\Vendor\Carbon\Exceptions\NotACarbonClassException; +use EDD\Vendor\Carbon\Exceptions\NotAPeriodException; +use EDD\Vendor\Carbon\Exceptions\UnknownGetterException; +use EDD\Vendor\Carbon\Exceptions\UnknownMethodException; +use EDD\Vendor\Carbon\Exceptions\UnreachableException; +use EDD\Vendor\Carbon\Traits\IntervalRounding; +use EDD\Vendor\Carbon\Traits\Mixin; +use EDD\Vendor\Carbon\Traits\Options; +use EDD\Vendor\Carbon\Traits\ToStringFormat; +use Closure; +use Countable; +use DateInterval; +use DatePeriod; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use InvalidArgumentException; +use Iterator; +use JsonSerializable; +use ReflectionException; +use ReturnTypeWillChange; +use RuntimeException; + +/** + * Substitution of DatePeriod with some modifications and many more features. + * + * @property-read int|float $recurrences number of recurrences (if end not set). + * @property-read bool $include_start_date rather the start date is included in the iteration. + * @property-read bool $include_end_date rather the end date is included in the iteration (if recurrences not set). + * @property-read CarbonInterface $start Period start date. + * @property-read CarbonInterface $current Current date from the iteration. + * @property-read CarbonInterface $end Period end date. + * @property-read CarbonInterval $interval Underlying date interval instance. Always present, one day by default. + * + * @method static static start($date, $inclusive = null) Create instance specifying start date or modify the start date if called on an instance. + * @method static static since($date, $inclusive = null) Alias for start(). + * @method static static sinceNow($inclusive = null) Create instance with start date set to now or set the start date to now if called on an instance. + * @method static static end($date = null, $inclusive = null) Create instance specifying end date or modify the end date if called on an instance. + * @method static static until($date = null, $inclusive = null) Alias for end(). + * @method static static untilNow($inclusive = null) Create instance with end date set to now or set the end date to now if called on an instance. + * @method static static dates($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. + * @method static static between($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. + * @method static static recurrences($recurrences = null) Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance. + * @method static static times($recurrences = null) Alias for recurrences(). + * @method static static options($options = null) Create instance with options or modify the options if called on an instance. + * @method static static toggle($options, $state = null) Create instance with options toggled on or off, or toggle options if called on an instance. + * @method static static filter($callback, $name = null) Create instance with filter added to the stack or append a filter if called on an instance. + * @method static static push($callback, $name = null) Alias for filter(). + * @method static static prepend($callback, $name = null) Create instance with filter prepended to the stack or prepend a filter if called on an instance. + * @method static static filters(array $filters = []) Create instance with filters stack or replace the whole filters stack if called on an instance. + * @method static static interval($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static each($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static every($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static step($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static stepBy($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static invert() Create instance with inverted date interval or invert the interval if called on an instance. + * @method static static years($years = 1) Create instance specifying a number of years for date interval or replace the interval by the given a number of years if called on an instance. + * @method static static year($years = 1) Alias for years(). + * @method static static months($months = 1) Create instance specifying a number of months for date interval or replace the interval by the given a number of months if called on an instance. + * @method static static month($months = 1) Alias for months(). + * @method static static weeks($weeks = 1) Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks if called on an instance. + * @method static static week($weeks = 1) Alias for weeks(). + * @method static static days($days = 1) Create instance specifying a number of days for date interval or replace the interval by the given a number of days if called on an instance. + * @method static static dayz($days = 1) Alias for days(). + * @method static static day($days = 1) Alias for days(). + * @method static static hours($hours = 1) Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours if called on an instance. + * @method static static hour($hours = 1) Alias for hours(). + * @method static static minutes($minutes = 1) Create instance specifying a number of minutes for date interval or replace the interval by the given a number of minutes if called on an instance. + * @method static static minute($minutes = 1) Alias for minutes(). + * @method static static seconds($seconds = 1) Create instance specifying a number of seconds for date interval or replace the interval by the given a number of seconds if called on an instance. + * @method static static second($seconds = 1) Alias for seconds(). + * @method static static milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds for date interval or replace the interval by the given a number of milliseconds if called on an instance. + * @method static static millisecond($milliseconds = 1) Alias for milliseconds(). + * @method static static microseconds($microseconds = 1) Create instance specifying a number of microseconds for date interval or replace the interval by the given a number of microseconds if called on an instance. + * @method static static microsecond($microseconds = 1) Alias for microseconds(). + * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method $this roundWeek(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundWeeks(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorWeek(float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorWeeks(float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilWeek(float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilWeeks(float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class CarbonPeriod implements Iterator, Countable, JsonSerializable +{ + use IntervalRounding; + use Mixin { + Mixin::mixin as baseMixin; + } + use Options; + use ToStringFormat; + + /** + * Built-in filter for limit by recurrences. + * + * @var callable + */ + public const RECURRENCES_FILTER = [self::class, 'filterRecurrences']; + + /** + * Built-in filter for limit to an end. + * + * @var callable + */ + public const END_DATE_FILTER = [self::class, 'filterEndDate']; + + /** + * Special value which can be returned by filters to end iteration. Also a filter. + * + * @var callable + */ + public const END_ITERATION = [self::class, 'endIteration']; + + /** + * Exclude start date from iteration. + * + * @var int + */ + public const EXCLUDE_START_DATE = 1; + + /** + * Exclude end date from iteration. + * + * @var int + */ + public const EXCLUDE_END_DATE = 2; + + /** + * Yield CarbonImmutable instances. + * + * @var int + */ + public const IMMUTABLE = 4; + + /** + * Number of maximum attempts before giving up on finding next valid date. + * + * @var int + */ + public const NEXT_MAX_ATTEMPTS = 1000; + + /** + * Number of maximum attempts before giving up on finding end date. + * + * @var int + */ + public const END_MAX_ATTEMPTS = 10000; + + /** + * Default date class of iteration items. + * + * @var string + */ + protected const DEFAULT_DATE_CLASS = Carbon::class; + + /** + * The registered macros. + * + * @var array + */ + protected static $macros = []; + + /** + * Date class of iteration items. + * + * @var string + */ + protected $dateClass = Carbon::class; + + /** + * Underlying date interval instance. Always present, one day by default. + * + * @var CarbonInterval + */ + protected $dateInterval; + + /** + * True once __construct is finished. + * + * @var bool + */ + protected $constructed = false; + + /** + * Whether current date interval was set by default. + * + * @var bool + */ + protected $isDefaultInterval; + + /** + * The filters stack. + * + * @var array + */ + protected $filters = []; + + /** + * Period start date. Applied on rewind. Always present, now by default. + * + * @var CarbonInterface + */ + protected $startDate; + + /** + * Period end date. For inverted interval should be before the start date. Applied via a filter. + * + * @var CarbonInterface|null + */ + protected $endDate; + + /** + * Limit for number of recurrences. Applied via a filter. + * + * @var int|null + */ + protected $recurrences; + + /** + * Iteration options. + * + * @var int + */ + protected $options; + + /** + * Index of current date. Always sequential, even if some dates are skipped by filters. + * Equal to null only before the first iteration. + * + * @var int + */ + protected $key; + + /** + * Current date. May temporarily hold unaccepted value when looking for a next valid date. + * Equal to null only before the first iteration. + * + * @var CarbonInterface + */ + protected $current; + + /** + * Timezone of current date. Taken from the start date. + * + * @var \DateTimeZone|null + */ + protected $timezone; + + /** + * The cached validation result for current date. + * + * @var bool|string|null + */ + protected $validationResult; + + /** + * Timezone handler for settings() method. + * + * @var mixed + */ + protected $tzName; + + /** + * Make a CarbonPeriod instance from given variable if possible. + * + * @param mixed $var + * + * @return static|null + */ + public static function make($var) + { + try { + return static::instance($var); + } catch (NotAPeriodException $e) { + return static::create($var); + } + } + + /** + * Create a new instance from a DatePeriod or CarbonPeriod object. + * + * @param CarbonPeriod|DatePeriod $period + * + * @return static + */ + public static function instance($period) + { + if ($period instanceof static) { + return $period->copy(); + } + + if ($period instanceof self) { + return new static( + $period->getStartDate(), + $period->getEndDate() ?: $period->getRecurrences(), + $period->getDateInterval(), + $period->getOptions() + ); + } + + if ($period instanceof DatePeriod) { + return new static( + $period->start, + $period->end ?: ($period->recurrences - 1), + $period->interval, + $period->include_start_date ? 0 : static::EXCLUDE_START_DATE + ); + } + + $class = static::class; + $type = \gettype($period); + + throw new NotAPeriodException( + 'Argument 1 passed to '.$class.'::'.__METHOD__.'() '. + 'must be an instance of DatePeriod or '.$class.', '. + ($type === 'object' ? 'instance of '.\get_class($period) : $type).' given.' + ); + } + + /** + * Create a new instance. + * + * @return static + */ + public static function create(...$params) + { + return static::createFromArray($params); + } + + /** + * Create a new instance from an array of parameters. + * + * @param array $params + * + * @return static + */ + public static function createFromArray(array $params) + { + return new static(...$params); + } + + /** + * Create CarbonPeriod from ISO 8601 string. + * + * @param string $iso + * @param int|null $options + * + * @return static + */ + public static function createFromIso($iso, $options = null) + { + $params = static::parseIso8601($iso); + + $instance = static::createFromArray($params); + + if ($options !== null) { + $instance->setOptions($options); + } + + return $instance; + } + + /** + * Return whether given interval contains non zero value of any time unit. + * + * @param \DateInterval $interval + * + * @return bool + */ + protected static function intervalHasTime(DateInterval $interval) + { + return $interval->h || $interval->i || $interval->s || $interval->f; + } + + /** + * Return whether given variable is an ISO 8601 specification. + * + * Note: Check is very basic, as actual validation will be done later when parsing. + * We just want to ensure that variable is not any other type of a valid parameter. + * + * @param mixed $var + * + * @return bool + */ + protected static function isIso8601($var) + { + if (!\is_string($var)) { + return false; + } + + // Match slash but not within a timezone name. + $part = '[a-z]+(?:[_-][a-z]+)*'; + + preg_match("#\b$part/$part\b|(/)#i", $var, $match); + + return isset($match[1]); + } + + /** + * Parse given ISO 8601 string into an array of arguments. + * + * @SuppressWarnings(PHPMD.ElseExpression) + * + * @param string $iso + * + * @return array + */ + protected static function parseIso8601($iso) + { + $result = []; + + $interval = null; + $start = null; + $end = null; + $dateClass = static::DEFAULT_DATE_CLASS; + + foreach (explode('/', $iso) as $key => $part) { + if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) { + $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; + } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { + $interval = $part; + } elseif ($start === null && $parsed = $dateClass::make($part)) { + $start = $part; + } elseif ($end === null && $parsed = $dateClass::make(static::addMissingParts($start ?? '', $part))) { + $end = $part; + } else { + throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso."); + } + + $result[] = $parsed; + } + + return $result; + } + + /** + * Add missing parts of the target date from the source date. + * + * @param string $source + * @param string $target + * + * @return string + */ + protected static function addMissingParts($source, $target) + { + $pattern = '/'.preg_replace('/\d+/', '[0-9]+', preg_quote($target, '/')).'$/'; + + $result = preg_replace($pattern, $target, $source, 1, $count); + + return $count ? $result : $target; + } + + /** + * Register a custom macro. + * + * @example + * ``` + * CarbonPeriod::macro('middle', function () { + * return $this->getStartDate()->average($this->getEndDate()); + * }); + * echo CarbonPeriod::since('2011-05-12')->until('2011-06-03')->middle(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$macros[$name] = $macro; + } + + /** + * Register macros from a mixin object. + * + * @example + * ``` + * CarbonPeriod::mixin(new class { + * public function addDays() { + * return function ($count = 1) { + * return $this->setStartDate( + * $this->getStartDate()->addDays($count) + * )->setEndDate( + * $this->getEndDate()->addDays($count) + * ); + * }; + * } + * public function subDays() { + * return function ($count = 1) { + * return $this->setStartDate( + * $this->getStartDate()->subDays($count) + * )->setEndDate( + * $this->getEndDate()->subDays($count) + * ); + * }; + * } + * }); + * echo CarbonPeriod::create('2000-01-01', '2000-02-01')->addDays(5)->subDays(3); + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + static::baseMixin($mixin); + } + + /** + * Check if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + + /** + * Provide static proxy for instance aliases. + * + * @param string $method + * @param array $parameters + * + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + $date = new static(); + + if (static::hasMacro($method)) { + return static::bindMacroContext(null, function () use (&$method, &$parameters, &$date) { + return $date->callMacro($method, $parameters); + }); + } + + return $date->$method(...$parameters); + } + + /** + * CarbonPeriod constructor. + * + * @SuppressWarnings(PHPMD.ElseExpression) + * + * @throws InvalidArgumentException + */ + public function __construct(...$arguments) + { + if (is_a($this->dateClass, DateTimeImmutable::class, true)) { + $this->options = static::IMMUTABLE; + } + + // Parse and assign arguments one by one. First argument may be an ISO 8601 spec, + // which will be first parsed into parts and then processed the same way. + + $argumentsCount = \count($arguments); + + if ($argumentsCount && static::isIso8601($iso = $arguments[0])) { + array_splice($arguments, 0, 1, static::parseIso8601($iso)); + } + + if ($argumentsCount === 1) { + if ($arguments[0] instanceof DatePeriod) { + $arguments = [ + $arguments[0]->start, + $arguments[0]->end ?: ($arguments[0]->recurrences - 1), + $arguments[0]->interval, + $arguments[0]->include_start_date ? 0 : static::EXCLUDE_START_DATE, + ]; + } elseif ($arguments[0] instanceof self) { + $arguments = [ + $arguments[0]->getStartDate(), + $arguments[0]->getEndDate() ?: $arguments[0]->getRecurrences(), + $arguments[0]->getDateInterval(), + $arguments[0]->getOptions(), + ]; + } + } + + $optionsSet = false; + + foreach ($arguments as $argument) { + $parsedDate = null; + + if ($argument instanceof DateTimeZone) { + $this->setTimezone($argument); + } elseif ($this->dateInterval === null && + ( + (\is_string($argument) && preg_match( + '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T\d].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', + $argument + )) || + $argument instanceof DateInterval || + $argument instanceof Closure + ) && + $parsedInterval = @CarbonInterval::make($argument) + ) { + $this->setDateInterval($parsedInterval); + } elseif ($this->startDate === null && $parsedDate = $this->makeDateTime($argument)) { + $this->setStartDate($parsedDate); + } elseif ($this->endDate === null && ($parsedDate = $parsedDate ?? $this->makeDateTime($argument))) { + $this->setEndDate($parsedDate); + } elseif ($this->recurrences === null && $this->endDate === null && is_numeric($argument)) { + $this->setRecurrences($argument); + } elseif (!$optionsSet && (\is_int($argument) || $argument === null)) { + $optionsSet = true; + $this->setOptions(((int) $this->options) | ((int) $argument)); + } else { + throw new InvalidPeriodParameterException('Invalid constructor parameters.'); + } + } + + if ($this->startDate === null) { + $dateClass = $this->dateClass; + $this->setStartDate($dateClass::now()); + } + + if ($this->dateInterval === null) { + $this->setDateInterval(CarbonInterval::day()); + + $this->isDefaultInterval = true; + } + + if ($this->options === null) { + $this->setOptions(0); + } + + $this->constructed = true; + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + return clone $this; + } + + /** + * Prepare the instance to be set (self if mutable to be mutated, + * copy if immutable to generate a new instance). + * + * @return static + */ + protected function copyIfImmutable() + { + return $this; + } + + /** + * Get the getter for a property allowing both `DatePeriod` snakeCase and camelCase names. + * + * @param string $name + * + * @return callable|null + */ + protected function getGetter(string $name) + { + switch (strtolower(preg_replace('/[A-Z]/', '_$0', $name))) { + case 'start': + case 'start_date': + return [$this, 'getStartDate']; + case 'end': + case 'end_date': + return [$this, 'getEndDate']; + case 'interval': + case 'date_interval': + return [$this, 'getDateInterval']; + case 'recurrences': + return [$this, 'getRecurrences']; + case 'include_start_date': + return [$this, 'isStartIncluded']; + case 'include_end_date': + return [$this, 'isEndIncluded']; + case 'current': + return [$this, 'current']; + default: + return null; + } + } + + /** + * Get a property allowing both `DatePeriod` snakeCase and camelCase names. + * + * @param string $name + * + * @return bool|CarbonInterface|CarbonInterval|int|null + */ + public function get(string $name) + { + $getter = $this->getGetter($name); + + if ($getter) { + return $getter(); + } + + throw new UnknownGetterException($name); + } + + /** + * Get a property allowing both `DatePeriod` snakeCase and camelCase names. + * + * @param string $name + * + * @return bool|CarbonInterface|CarbonInterval|int|null + */ + public function __get(string $name) + { + return $this->get($name); + } + + /** + * Check if an attribute exists on the object + * + * @param string $name + * + * @return bool + */ + public function __isset(string $name): bool + { + return $this->getGetter($name) !== null; + } + + /** + * @alias copy + * + * Get a copy of the instance. + * + * @return static + */ + public function clone() + { + return clone $this; + } + + /** + * Set the iteration item class. + * + * @param string $dateClass + * + * @return static + */ + public function setDateClass(string $dateClass) + { + if (!is_a($dateClass, CarbonInterface::class, true)) { + throw new NotACarbonClassException($dateClass); + } + + $self = $this->copyIfImmutable(); + $self->dateClass = $dateClass; + + if (is_a($dateClass, Carbon::class, true)) { + $self->options = $self->options & ~static::IMMUTABLE; + } elseif (is_a($dateClass, CarbonImmutable::class, true)) { + $self->options = $self->options | static::IMMUTABLE; + } + + return $self; + } + + /** + * Returns iteration item date class. + * + * @return string + */ + public function getDateClass(): string + { + return $this->dateClass; + } + + /** + * Change the period date interval. + * + * @param DateInterval|string $interval + * + * @throws InvalidIntervalException + * + * @return static + */ + public function setDateInterval($interval) + { + if (!$interval = CarbonInterval::make($interval)) { + throw new InvalidIntervalException('Invalid interval.'); + } + + if ($interval->spec() === 'PT0S' && !$interval->f && !$interval->getStep()) { + throw new InvalidIntervalException('Empty interval is not accepted.'); + } + + $self = $this->copyIfImmutable(); + $self->dateInterval = $interval; + + $self->isDefaultInterval = false; + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Invert the period date interval. + * + * @return static + */ + public function invertDateInterval() + { + return $this->setDateInterval($this->dateInterval->invert()); + } + + /** + * Set start and end date. + * + * @param DateTime|DateTimeInterface|string $start + * @param DateTime|DateTimeInterface|string|null $end + * + * @return static + */ + public function setDates($start, $end) + { + return $this->setStartDate($start)->setEndDate($end); + } + + /** + * Change the period options. + * + * @param int|null $options + * + * @throws InvalidArgumentException + * + * @return static + */ + public function setOptions($options) + { + if (!\is_int($options) && $options !== null) { + throw new InvalidPeriodParameterException('Invalid options.'); + } + + $self = $this->copyIfImmutable(); + $self->options = $options ?: 0; + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Get the period options. + * + * @return int + */ + public function getOptions() + { + return $this->options; + } + + /** + * Toggle given options on or off. + * + * @param int $options + * @param bool|null $state + * + * @throws \InvalidArgumentException + * + * @return static + */ + public function toggleOptions($options, $state = null) + { + if ($state === null) { + $state = ($this->options & $options) !== $options; + } + + return $this->setOptions( + $state ? + $this->options | $options : + $this->options & ~$options + ); + } + + /** + * Toggle EXCLUDE_START_DATE option. + * + * @param bool $state + * + * @return static + */ + public function excludeStartDate($state = true) + { + return $this->toggleOptions(static::EXCLUDE_START_DATE, $state); + } + + /** + * Toggle EXCLUDE_END_DATE option. + * + * @param bool $state + * + * @return static + */ + public function excludeEndDate($state = true) + { + return $this->toggleOptions(static::EXCLUDE_END_DATE, $state); + } + + /** + * Get the underlying date interval. + * + * @return CarbonInterval + */ + public function getDateInterval() + { + return $this->dateInterval->copy(); + } + + /** + * Get start date of the period. + * + * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. + * + * @return CarbonInterface + */ + public function getStartDate(string $rounding = null) + { + $date = $this->startDate->avoidMutation(); + + return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; + } + + /** + * Get end date of the period. + * + * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. + * + * @return CarbonInterface|null + */ + public function getEndDate(string $rounding = null) + { + if (!$this->endDate) { + return null; + } + + $date = $this->endDate->avoidMutation(); + + return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; + } + + /** + * Get number of recurrences. + * + * @return int|float|null + */ + public function getRecurrences() + { + return $this->recurrences; + } + + /** + * Returns true if the start date should be excluded. + * + * @return bool + */ + public function isStartExcluded() + { + return ($this->options & static::EXCLUDE_START_DATE) !== 0; + } + + /** + * Returns true if the end date should be excluded. + * + * @return bool + */ + public function isEndExcluded() + { + return ($this->options & static::EXCLUDE_END_DATE) !== 0; + } + + /** + * Returns true if the start date should be included. + * + * @return bool + */ + public function isStartIncluded() + { + return !$this->isStartExcluded(); + } + + /** + * Returns true if the end date should be included. + * + * @return bool + */ + public function isEndIncluded() + { + return !$this->isEndExcluded(); + } + + /** + * Return the start if it's included by option, else return the start + 1 period interval. + * + * @return CarbonInterface + */ + public function getIncludedStartDate() + { + $start = $this->getStartDate(); + + if ($this->isStartExcluded()) { + return $start->add($this->getDateInterval()); + } + + return $start; + } + + /** + * Return the end if it's included by option, else return the end - 1 period interval. + * Warning: if the period has no fixed end, this method will iterate the period to calculate it. + * + * @return CarbonInterface + */ + public function getIncludedEndDate() + { + $end = $this->getEndDate(); + + if (!$end) { + return $this->calculateEnd(); + } + + if ($this->isEndExcluded()) { + return $end->sub($this->getDateInterval()); + } + + return $end; + } + + /** + * Add a filter to the stack. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param callable $callback + * @param string $name + * + * @return static + */ + public function addFilter($callback, $name = null) + { + $self = $this->copyIfImmutable(); + $tuple = $self->createFilterTuple(\func_get_args()); + + $self->filters[] = $tuple; + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Prepend a filter to the stack. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param callable $callback + * @param string $name + * + * @return static + */ + public function prependFilter($callback, $name = null) + { + $self = $this->copyIfImmutable(); + $tuple = $self->createFilterTuple(\func_get_args()); + + array_unshift($self->filters, $tuple); + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Remove a filter by instance or name. + * + * @param callable|string $filter + * + * @return static + */ + public function removeFilter($filter) + { + $self = $this->copyIfImmutable(); + $key = \is_callable($filter) ? 0 : 1; + + $self->filters = array_values(array_filter( + $this->filters, + function ($tuple) use ($key, $filter) { + return $tuple[$key] !== $filter; + } + )); + + $self->updateInternalState(); + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Return whether given instance or name is in the filter stack. + * + * @param callable|string $filter + * + * @return bool + */ + public function hasFilter($filter) + { + $key = \is_callable($filter) ? 0 : 1; + + foreach ($this->filters as $tuple) { + if ($tuple[$key] === $filter) { + return true; + } + } + + return false; + } + + /** + * Get filters stack. + * + * @return array + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Set filters stack. + * + * @param array $filters + * + * @return static + */ + public function setFilters(array $filters) + { + $self = $this->copyIfImmutable(); + $self->filters = $filters; + + $self->updateInternalState(); + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Reset filters stack. + * + * @return static + */ + public function resetFilters() + { + $self = $this->copyIfImmutable(); + $self->filters = []; + + if ($self->endDate !== null) { + $self->filters[] = [static::END_DATE_FILTER, null]; + } + + if ($self->recurrences !== null) { + $self->filters[] = [static::RECURRENCES_FILTER, null]; + } + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Add a recurrences filter (set maximum number of recurrences). + * + * @param int|float|null $recurrences + * + * @throws InvalidArgumentException + * + * @return static + */ + public function setRecurrences($recurrences) + { + if ((!is_numeric($recurrences) && $recurrences !== null) || $recurrences < 0) { + throw new InvalidPeriodParameterException('Invalid number of recurrences.'); + } + + if ($recurrences === null) { + return $this->removeFilter(static::RECURRENCES_FILTER); + } + + /** @var self $self */ + $self = $this->copyIfImmutable(); + $self->recurrences = $recurrences === INF ? INF : (int) $recurrences; + + if (!$self->hasFilter(static::RECURRENCES_FILTER)) { + return $self->addFilter(static::RECURRENCES_FILTER); + } + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Change the period start date. + * + * @param DateTime|DateTimeInterface|string $date + * @param bool|null $inclusive + * + * @throws InvalidPeriodDateException + * + * @return static + */ + public function setStartDate($date, $inclusive = null) + { + if (!$this->isInfiniteDate($date) && !($date = ([$this->dateClass, 'make'])($date))) { + throw new InvalidPeriodDateException('Invalid start date.'); + } + + $self = $this->copyIfImmutable(); + $self->startDate = $date; + + if ($inclusive !== null) { + $self = $self->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive); + } + + return $self; + } + + /** + * Change the period end date. + * + * @param DateTime|DateTimeInterface|string|null $date + * @param bool|null $inclusive + * + * @throws \InvalidArgumentException + * + * @return static + */ + public function setEndDate($date, $inclusive = null) + { + if ($date !== null && !$this->isInfiniteDate($date) && !$date = ([$this->dateClass, 'make'])($date)) { + throw new InvalidPeriodDateException('Invalid end date.'); + } + + if (!$date) { + return $this->removeFilter(static::END_DATE_FILTER); + } + + $self = $this->copyIfImmutable(); + $self->endDate = $date; + + if ($inclusive !== null) { + $self = $self->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive); + } + + if (!$self->hasFilter(static::END_DATE_FILTER)) { + return $self->addFilter(static::END_DATE_FILTER); + } + + $self->handleChangedParameters(); + + return $self; + } + + /** + * Check if the current position is valid. + * + * @return bool + */ + #[ReturnTypeWillChange] + public function valid() + { + return $this->validateCurrentDate() === true; + } + + /** + * Return the current key. + * + * @return int|null + */ + #[ReturnTypeWillChange] + public function key() + { + return $this->valid() + ? $this->key + : null; + } + + /** + * Return the current date. + * + * @return CarbonInterface|null + */ + #[ReturnTypeWillChange] + public function current() + { + return $this->valid() + ? $this->prepareForReturn($this->current) + : null; + } + + /** + * Move forward to the next date. + * + * @throws RuntimeException + * + * @return void + */ + #[ReturnTypeWillChange] + public function next() + { + if ($this->current === null) { + $this->rewind(); + } + + if ($this->validationResult !== static::END_ITERATION) { + $this->key++; + + $this->incrementCurrentDateUntilValid(); + } + } + + /** + * Rewind to the start date. + * + * Iterating over a date in the UTC timezone avoids bug during backward DST change. + * + * @see https://bugs.php.net/bug.php?id=72255 + * @see https://bugs.php.net/bug.php?id=74274 + * @see https://wiki.php.net/rfc/datetime_and_daylight_saving_time + * + * @throws RuntimeException + * + * @return void + */ + #[ReturnTypeWillChange] + public function rewind() + { + $this->key = 0; + $this->current = ([$this->dateClass, 'make'])($this->startDate); + $settings = $this->getSettings(); + + if ($this->hasLocalTranslator()) { + $settings['locale'] = $this->getTranslatorLocale(); + } + + $this->current->settings($settings); + $this->timezone = static::intervalHasTime($this->dateInterval) ? $this->current->getTimezone() : null; + + if ($this->timezone) { + $this->current = $this->current->utc(); + } + + $this->validationResult = null; + + if ($this->isStartExcluded() || $this->validateCurrentDate() === false) { + $this->incrementCurrentDateUntilValid(); + } + } + + /** + * Skip iterations and returns iteration state (false if ended, true if still valid). + * + * @param int $count steps number to skip (1 by default) + * + * @return bool + */ + public function skip($count = 1) + { + for ($i = $count; $this->valid() && $i > 0; $i--) { + $this->next(); + } + + return $this->valid(); + } + + /** + * Format the date period as ISO 8601. + * + * @return string + */ + public function toIso8601String() + { + $parts = []; + + if ($this->recurrences !== null) { + $parts[] = 'R'.$this->recurrences; + } + + $parts[] = $this->startDate->toIso8601String(); + + $parts[] = $this->dateInterval->spec(); + + if ($this->endDate !== null) { + $parts[] = $this->endDate->toIso8601String(); + } + + return implode('/', $parts); + } + + /** + * Convert the date period into a string. + * + * @return string + */ + public function toString() + { + $format = $this->localToStringFormat ?? static::$toStringFormat; + + if ($format instanceof Closure) { + return $format($this); + } + + $translator = ([$this->dateClass, 'getTranslator'])(); + + $parts = []; + + $format = $format ?? ( + !$this->startDate->isStartOfDay() || ($this->endDate && !$this->endDate->isStartOfDay()) + ? 'Y-m-d H:i:s' + : 'Y-m-d' + ); + + if ($this->recurrences !== null) { + $parts[] = $this->translate('period_recurrences', [], $this->recurrences, $translator); + } + + $parts[] = $this->translate('period_interval', [':interval' => $this->dateInterval->forHumans([ + 'join' => true, + ])], null, $translator); + + $parts[] = $this->translate('period_start_date', [':date' => $this->startDate->rawFormat($format)], null, $translator); + + if ($this->endDate !== null) { + $parts[] = $this->translate('period_end_date', [':date' => $this->endDate->rawFormat($format)], null, $translator); + } + + $result = implode(' ', $parts); + + return mb_strtoupper(mb_substr($result, 0, 1)).mb_substr($result, 1); + } + + /** + * Format the date period as ISO 8601. + * + * @return string + */ + public function spec() + { + return $this->toIso8601String(); + } + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DatePeriod + */ + public function cast(string $className) + { + if (!method_exists($className, 'instance')) { + if (is_a($className, DatePeriod::class, true)) { + return new $className( + $this->rawDate($this->getStartDate()), + $this->getDateInterval(), + $this->getEndDate() ? $this->rawDate($this->getIncludedEndDate()) : $this->getRecurrences(), + $this->isStartExcluded() ? DatePeriod::EXCLUDE_START_DATE : 0 + ); + } + + throw new InvalidCastException("$className has not the instance() method needed to cast the date."); + } + + return $className::instance($this); + } + + /** + * Return native DatePeriod PHP object matching the current instance. + * + * @example + * ``` + * var_dump(CarbonPeriod::create('2021-01-05', '2021-02-15')->toDatePeriod()); + * ``` + * + * @return DatePeriod + */ + public function toDatePeriod() + { + return $this->cast(DatePeriod::class); + } + + /** + * Return `true` if the period has no custom filter and is guaranteed to be endless. + * + * Note that we can't check if a period is endless as soon as it has custom filters + * because filters can emit `CarbonPeriod::END_ITERATION` to stop the iteration in + * a way we can't predict without actually iterating the period. + */ + public function isUnfilteredAndEndLess(): bool + { + foreach ($this->filters as $filter) { + switch ($filter) { + case [static::RECURRENCES_FILTER, null]: + if ($this->recurrences !== null && is_finite($this->recurrences)) { + return false; + } + + break; + + case [static::END_DATE_FILTER, null]: + if ($this->endDate !== null && !$this->endDate->isEndOfTime()) { + return false; + } + + break; + + default: + return false; + } + } + + return true; + } + + /** + * Convert the date period into an array without changing current iteration state. + * + * @return CarbonInterface[] + */ + public function toArray() + { + if ($this->isUnfilteredAndEndLess()) { + throw new EndLessPeriodException("Endless period can't be converted to array nor counted."); + } + + $state = [ + $this->key, + $this->current ? $this->current->avoidMutation() : null, + $this->validationResult, + ]; + + $result = iterator_to_array($this); + + [$this->key, $this->current, $this->validationResult] = $state; + + return $result; + } + + /** + * Count dates in the date period. + * + * @return int + */ + #[ReturnTypeWillChange] + public function count() + { + return \count($this->toArray()); + } + + /** + * Return the first date in the date period. + * + * @return CarbonInterface|null + */ + public function first() + { + if ($this->isUnfilteredAndEndLess()) { + foreach ($this as $date) { + $this->rewind(); + + return $date; + } + + return null; + } + + return ($this->toArray() ?: [])[0] ?? null; + } + + /** + * Return the last date in the date period. + * + * @return CarbonInterface|null + */ + public function last() + { + $array = $this->toArray(); + + return $array ? $array[\count($array) - 1] : null; + } + + /** + * Convert the date period into a string. + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Add aliases for setters. + * + * CarbonPeriod::days(3)->hours(5)->invert() + * ->sinceNow()->until('2010-01-10') + * ->filter(...) + * ->count() + * + * Note: We use magic method to let static and instance aliases with the same names. + * + * @param string $method + * @param array $parameters + * + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return static::bindMacroContext($this, function () use (&$method, &$parameters) { + return $this->callMacro($method, $parameters); + }); + } + + $roundedValue = $this->callRoundMethod($method, $parameters); + + if ($roundedValue !== null) { + return $roundedValue; + } + + switch ($method) { + case 'start': + case 'since': + self::setDefaultParameters($parameters, [ + [0, 'date', null], + ]); + + return $this->setStartDate(...$parameters); + + case 'sinceNow': + return $this->setStartDate(new Carbon(), ...$parameters); + + case 'end': + case 'until': + self::setDefaultParameters($parameters, [ + [0, 'date', null], + ]); + + return $this->setEndDate(...$parameters); + + case 'untilNow': + return $this->setEndDate(new Carbon(), ...$parameters); + + case 'dates': + case 'between': + self::setDefaultParameters($parameters, [ + [0, 'start', null], + [1, 'end', null], + ]); + + return $this->setDates(...$parameters); + + case 'recurrences': + case 'times': + self::setDefaultParameters($parameters, [ + [0, 'recurrences', null], + ]); + + return $this->setRecurrences(...$parameters); + + case 'options': + self::setDefaultParameters($parameters, [ + [0, 'options', null], + ]); + + return $this->setOptions(...$parameters); + + case 'toggle': + self::setDefaultParameters($parameters, [ + [0, 'options', null], + ]); + + return $this->toggleOptions(...$parameters); + + case 'filter': + case 'push': + return $this->addFilter(...$parameters); + + case 'prepend': + return $this->prependFilter(...$parameters); + + case 'filters': + self::setDefaultParameters($parameters, [ + [0, 'filters', []], + ]); + + return $this->setFilters(...$parameters); + + case 'interval': + case 'each': + case 'every': + case 'step': + case 'stepBy': + return $this->setDateInterval(...$parameters); + + case 'invert': + return $this->invertDateInterval(); + + case 'years': + case 'year': + case 'months': + case 'month': + case 'weeks': + case 'week': + case 'days': + case 'dayz': + case 'day': + case 'hours': + case 'hour': + case 'minutes': + case 'minute': + case 'seconds': + case 'second': + case 'milliseconds': + case 'millisecond': + case 'microseconds': + case 'microsecond': + return $this->setDateInterval(( + // Override default P1D when instantiating via fluent setters. + [$this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method] + )(...$parameters)); + } + + $dateClass = $this->dateClass; + + if ($this->localStrictModeEnabled ?? $dateClass::isStrictModeEnabled()) { + throw new UnknownMethodException($method); + } + + return $this; + } + + /** + * Set the instance's timezone from a string or object and apply it to start/end. + * + * @param \DateTimeZone|string $timezone + * + * @return static + */ + public function setTimezone($timezone) + { + $self = $this->copyIfImmutable(); + $self->tzName = $timezone; + $self->timezone = $timezone; + + if ($self->startDate) { + $self = $self->setStartDate($self->startDate->setTimezone($timezone)); + } + + if ($self->endDate) { + $self = $self->setEndDate($self->endDate->setTimezone($timezone)); + } + + return $self; + } + + /** + * Set the instance's timezone from a string or object and add/subtract the offset difference to start/end. + * + * @param \DateTimeZone|string $timezone + * + * @return static + */ + public function shiftTimezone($timezone) + { + $self = $this->copyIfImmutable(); + $self->tzName = $timezone; + $self->timezone = $timezone; + + if ($self->startDate) { + $self = $self->setStartDate($self->startDate->shiftTimezone($timezone)); + } + + if ($self->endDate) { + $self = $self->setEndDate($self->endDate->shiftTimezone($timezone)); + } + + return $self; + } + + /** + * Returns the end is set, else calculated from start an recurrences. + * + * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. + * + * @return CarbonInterface + */ + public function calculateEnd(string $rounding = null) + { + if ($end = $this->getEndDate($rounding)) { + return $end; + } + + if ($this->dateInterval->isEmpty()) { + return $this->getStartDate($rounding); + } + + $date = $this->getEndFromRecurrences() ?? $this->iterateUntilEnd(); + + if ($date && $rounding) { + $date = $date->avoidMutation()->round($this->getDateInterval(), $rounding); + } + + return $date; + } + + /** + * @return CarbonInterface|null + */ + private function getEndFromRecurrences() + { + if ($this->recurrences === null) { + throw new UnreachableException( + "Could not calculate period end without either explicit end or recurrences.\n". + "If you're looking for a forever-period, use ->setRecurrences(INF)." + ); + } + + if ($this->recurrences === INF) { + $start = $this->getStartDate(); + + return $start < $start->avoidMutation()->add($this->getDateInterval()) + ? CarbonImmutable::endOfTime() + : CarbonImmutable::startOfTime(); + } + + if ($this->filters === [[static::RECURRENCES_FILTER, null]]) { + return $this->getStartDate()->avoidMutation()->add( + $this->getDateInterval()->times( + $this->recurrences - ($this->isStartExcluded() ? 0 : 1) + ) + ); + } + + return null; + } + + /** + * @return CarbonInterface|null + */ + private function iterateUntilEnd() + { + $attempts = 0; + $date = null; + + foreach ($this as $date) { + if (++$attempts > static::END_MAX_ATTEMPTS) { + throw new UnreachableException( + 'Could not calculate period end after iterating '.static::END_MAX_ATTEMPTS.' times.' + ); + } + } + + return $date; + } + + /** + * Returns true if the current period overlaps the given one (if 1 parameter passed) + * or the period between 2 dates (if 2 parameters passed). + * + * @param CarbonPeriod|\DateTimeInterface|EDD\Vendor\Carbon|CarbonImmutable|string $rangeOrRangeStart + * @param \DateTimeInterface|EDD\Vendor\Carbon|CarbonImmutable|string|null $rangeEnd + * + * @return bool + */ + public function overlaps($rangeOrRangeStart, $rangeEnd = null) + { + $range = $rangeEnd ? static::create($rangeOrRangeStart, $rangeEnd) : $rangeOrRangeStart; + + if (!($range instanceof self)) { + $range = static::create($range); + } + + [$start, $end] = $this->orderCouple($this->getStartDate(), $this->calculateEnd()); + [$rangeStart, $rangeEnd] = $this->orderCouple($range->getStartDate(), $range->calculateEnd()); + + return $end > $rangeStart && $rangeEnd > $start; + } + + /** + * Execute a given function on each date of the period. + * + * @example + * ``` + * Carbon::create('2020-11-29')->daysUntil('2020-12-24')->forEach(function (EDD\Vendor\Carbon $date) { + * echo $date->diffInDays('2020-12-25')." days before Christmas!\n"; + * }); + * ``` + * + * @param callable $callback + */ + public function forEach(callable $callback) + { + foreach ($this as $date) { + $callback($date); + } + } + + /** + * Execute a given function on each date of the period and yield the result of this function. + * + * @example + * ``` + * $period = Carbon::create('2020-11-29')->daysUntil('2020-12-24'); + * echo implode("\n", iterator_to_array($period->map(function (EDD\Vendor\Carbon $date) { + * return $date->diffInDays('2020-12-25').' days before Christmas!'; + * }))); + * ``` + * + * @param callable $callback + * + * @return \Generator + */ + public function map(callable $callback) + { + foreach ($this as $date) { + yield $callback($date); + } + } + + /** + * Determines if the instance is equal to another. + * Warning: if options differ, instances will never be equal. + * + * @param mixed $period + * + * @see equalTo() + * + * @return bool + */ + public function eq($period): bool + { + return $this->equalTo($period); + } + + /** + * Determines if the instance is equal to another. + * Warning: if options differ, instances will never be equal. + * + * @param mixed $period + * + * @return bool + */ + public function equalTo($period): bool + { + if (!($period instanceof self)) { + $period = self::make($period); + } + + $end = $this->getEndDate(); + + return $period !== null + && $this->getDateInterval()->eq($period->getDateInterval()) + && $this->getStartDate()->eq($period->getStartDate()) + && ($end ? $end->eq($period->getEndDate()) : $this->getRecurrences() === $period->getRecurrences()) + && ($this->getOptions() & (~static::IMMUTABLE)) === ($period->getOptions() & (~static::IMMUTABLE)); + } + + /** + * Determines if the instance is not equal to another. + * Warning: if options differ, instances will never be equal. + * + * @param mixed $period + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($period): bool + { + return $this->notEqualTo($period); + } + + /** + * Determines if the instance is not equal to another. + * Warning: if options differ, instances will never be equal. + * + * @param mixed $period + * + * @return bool + */ + public function notEqualTo($period): bool + { + return !$this->eq($period); + } + + /** + * Determines if the start date is before an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsBefore($date = null): bool + { + return $this->getStartDate()->lessThan($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is before or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsBeforeOrAt($date = null): bool + { + return $this->getStartDate()->lessThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is after an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsAfter($date = null): bool + { + return $this->getStartDate()->greaterThan($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is after or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsAfterOrAt($date = null): bool + { + return $this->getStartDate()->greaterThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsAt($date = null): bool + { + return $this->getStartDate()->equalTo($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is before an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsBefore($date = null): bool + { + return $this->calculateEnd()->lessThan($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is before or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsBeforeOrAt($date = null): bool + { + return $this->calculateEnd()->lessThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is after an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsAfter($date = null): bool + { + return $this->calculateEnd()->greaterThan($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is after or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsAfterOrAt($date = null): bool + { + return $this->calculateEnd()->greaterThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsAt($date = null): bool + { + return $this->calculateEnd()->equalTo($this->resolveCarbon($date)); + } + + /** + * Return true if start date is now or later. + * (Rather start/end are included by options is ignored.) + * + * @return bool + */ + public function isStarted(): bool + { + return $this->startsBeforeOrAt(); + } + + /** + * Return true if end date is now or later. + * (Rather start/end are included by options is ignored.) + * + * @return bool + */ + public function isEnded(): bool + { + return $this->endsBeforeOrAt(); + } + + /** + * Return true if now is between start date (included) and end date (excluded). + * (Rather start/end are included by options is ignored.) + * + * @return bool + */ + public function isInProgress(): bool + { + return $this->isStarted() && !$this->isEnded(); + } + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return static + */ + public function roundUnit($unit, $precision = 1, $function = 'round') + { + $self = $this->copyIfImmutable(); + $self = $self->setStartDate($self->getStartDate()->roundUnit($unit, $precision, $function)); + + if ($self->endDate) { + $self = $self->setEndDate($self->getEndDate()->roundUnit($unit, $precision, $function)); + } + + return $self->setDateInterval($self->getDateInterval()->roundUnit($unit, $precision, $function)); + } + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|\DateInterval|null $precision + * + * @return static + */ + public function floorUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'floor'); + } + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|\DateInterval|null $precision + * + * @return static + */ + public function ceilUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'ceil'); + } + + /** + * Round the current instance second with given precision if specified (else period interval is used). + * + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return static + */ + public function round($precision = null, $function = 'round') + { + return $this->roundWith( + $precision ?? $this->getDateInterval()->setLocalTranslator(TranslatorImmutable::get('en'))->forHumans(), + $function + ); + } + + /** + * Round the current instance second with given precision if specified (else period interval is used). + * + * @param float|int|string|\DateInterval|null $precision + * + * @return static + */ + public function floor($precision = null) + { + return $this->round($precision, 'floor'); + } + + /** + * Ceil the current instance second with given precision if specified (else period interval is used). + * + * @param float|int|string|\DateInterval|null $precision + * + * @return static + */ + public function ceil($precision = null) + { + return $this->round($precision, 'ceil'); + } + + /** + * Specify data which should be serialized to JSON. + * + * @link https://php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return CarbonInterface[] + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Return true if the given date is between start and end. + * + * @param \EDD\Vendor\Carbon\Carbon|\EDD\Vendor\Carbon\CarbonPeriod|\EDD\Vendor\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date + * + * @return bool + */ + public function contains($date = null): bool + { + $startMethod = 'startsBefore'.($this->isStartIncluded() ? 'OrAt' : ''); + $endMethod = 'endsAfter'.($this->isEndIncluded() ? 'OrAt' : ''); + + return $this->$startMethod($date) && $this->$endMethod($date); + } + + /** + * Return true if the current period follows a given other period (with no overlap). + * For instance, [2019-08-01 -> 2019-08-12] follows [2019-07-29 -> 2019-07-31] + * Note than in this example, follows() would be false if 2019-08-01 or 2019-07-31 was excluded by options. + * + * @param \EDD\Vendor\Carbon\CarbonPeriod|\DatePeriod|string $period + * + * @return bool + */ + public function follows($period, ...$arguments): bool + { + $period = $this->resolveCarbonPeriod($period, ...$arguments); + + return $this->getIncludedStartDate()->equalTo($period->getIncludedEndDate()->add($period->getDateInterval())); + } + + /** + * Return true if the given other period follows the current one (with no overlap). + * For instance, [2019-07-29 -> 2019-07-31] is followed by [2019-08-01 -> 2019-08-12] + * Note than in this example, isFollowedBy() would be false if 2019-08-01 or 2019-07-31 was excluded by options. + * + * @param \EDD\Vendor\Carbon\CarbonPeriod|\DatePeriod|string $period + * + * @return bool + */ + public function isFollowedBy($period, ...$arguments): bool + { + $period = $this->resolveCarbonPeriod($period, ...$arguments); + + return $period->follows($this); + } + + /** + * Return true if the given period either follows or is followed by the current one. + * + * @see follows() + * @see isFollowedBy() + * + * @param \EDD\Vendor\Carbon\CarbonPeriod|\DatePeriod|string $period + * + * @return bool + */ + public function isConsecutiveWith($period, ...$arguments): bool + { + return $this->follows($period, ...$arguments) || $this->isFollowedBy($period, ...$arguments); + } + + /** + * Update properties after removing built-in filters. + * + * @return void + */ + protected function updateInternalState() + { + if (!$this->hasFilter(static::END_DATE_FILTER)) { + $this->endDate = null; + } + + if (!$this->hasFilter(static::RECURRENCES_FILTER)) { + $this->recurrences = null; + } + } + + /** + * Create a filter tuple from raw parameters. + * + * Will create an automatic filter callback for one of Carbon's is* methods. + * + * @param array $parameters + * + * @return array + */ + protected function createFilterTuple(array $parameters) + { + $method = array_shift($parameters); + + if (!$this->isCarbonPredicateMethod($method)) { + return [$method, array_shift($parameters)]; + } + + return [function ($date) use ($method, $parameters) { + return ([$date, $method])(...$parameters); + }, $method]; + } + + /** + * Return whether given callable is a string pointing to one of Carbon's is* methods + * and should be automatically converted to a filter callback. + * + * @param callable $callable + * + * @return bool + */ + protected function isCarbonPredicateMethod($callable) + { + return \is_string($callable) && str_starts_with($callable, 'is') && + (method_exists($this->dateClass, $callable) || ([$this->dateClass, 'hasMacro'])($callable)); + } + + /** + * Recurrences filter callback (limits number of recurrences). + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param \EDD\Vendor\Carbon\Carbon $current + * @param int $key + * + * @return bool|string + */ + protected function filterRecurrences($current, $key) + { + if ($key < $this->recurrences) { + return true; + } + + return static::END_ITERATION; + } + + /** + * End date filter callback. + * + * @param \EDD\Vendor\Carbon\Carbon $current + * + * @return bool|string + */ + protected function filterEndDate($current) + { + if (!$this->isEndExcluded() && $current == $this->endDate) { + return true; + } + + if ($this->dateInterval->invert ? $current > $this->endDate : $current < $this->endDate) { + return true; + } + + return static::END_ITERATION; + } + + /** + * End iteration filter callback. + * + * @return string + */ + protected function endIteration() + { + return static::END_ITERATION; + } + + /** + * Handle change of the parameters. + */ + protected function handleChangedParameters() + { + if (($this->getOptions() & static::IMMUTABLE) && $this->dateClass === Carbon::class) { + $this->dateClass = CarbonImmutable::class; + } elseif (!($this->getOptions() & static::IMMUTABLE) && $this->dateClass === CarbonImmutable::class) { + $this->dateClass = Carbon::class; + } + + $this->validationResult = null; + } + + /** + * Validate current date and stop iteration when necessary. + * + * Returns true when current date is valid, false if it is not, or static::END_ITERATION + * when iteration should be stopped. + * + * @return bool|string + */ + protected function validateCurrentDate() + { + if ($this->current === null) { + $this->rewind(); + } + + // Check after the first rewind to avoid repeating the initial validation. + return $this->validationResult ?? ($this->validationResult = $this->checkFilters()); + } + + /** + * Check whether current value and key pass all the filters. + * + * @return bool|string + */ + protected function checkFilters() + { + $current = $this->prepareForReturn($this->current); + + foreach ($this->filters as $tuple) { + $result = \call_user_func( + $tuple[0], + $current->avoidMutation(), + $this->key, + $this + ); + + if ($result === static::END_ITERATION) { + return static::END_ITERATION; + } + + if (!$result) { + return false; + } + } + + return true; + } + + /** + * Prepare given date to be returned to the external logic. + * + * @param CarbonInterface $date + * + * @return CarbonInterface + */ + protected function prepareForReturn(CarbonInterface $date) + { + $date = ([$this->dateClass, 'make'])($date); + + if ($this->timezone) { + $date = $date->setTimezone($this->timezone); + } + + return $date; + } + + /** + * Keep incrementing the current date until a valid date is found or the iteration is ended. + * + * @throws RuntimeException + * + * @return void + */ + protected function incrementCurrentDateUntilValid() + { + $attempts = 0; + + do { + $this->current = $this->current->add($this->dateInterval); + + $this->validationResult = null; + + if (++$attempts > static::NEXT_MAX_ATTEMPTS) { + throw new UnreachableException('Could not find next valid date.'); + } + } while ($this->validateCurrentDate() === false); + } + + /** + * Call given macro. + * + * @param string $name + * @param array $parameters + * + * @return mixed + */ + protected function callMacro($name, $parameters) + { + $macro = static::$macros[$name]; + + if ($macro instanceof Closure) { + $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + } + + /** + * Return the EDD\Vendor\Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param \EDD\Vendor\Carbon\Carbon|\EDD\Vendor\Carbon\CarbonPeriod|\EDD\Vendor\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date + * + * @return \EDD\Vendor\Carbon\CarbonInterface + */ + protected function resolveCarbon($date = null) + { + return $this->getStartDate()->nowWithSameTz()->carbonize($date); + } + + /** + * Resolve passed arguments or DatePeriod to a CarbonPeriod object. + * + * @param mixed $period + * @param mixed ...$arguments + * + * @return static + */ + protected function resolveCarbonPeriod($period, ...$arguments) + { + if ($period instanceof self) { + return $period; + } + + return $period instanceof DatePeriod + ? static::instance($period) + : static::create($period, ...$arguments); + } + + private function orderCouple($first, $second): array + { + return $first > $second ? [$second, $first] : [$first, $second]; + } + + private function makeDateTime($value): ?DateTimeInterface + { + if ($value instanceof DateTimeInterface) { + return $value; + } + + if (\is_string($value)) { + $value = trim($value); + + if (!preg_match('/^P[\dT]/', $value) && + !preg_match('/^R\d/', $value) && + preg_match('/[a-z\d]/i', $value) + ) { + $dateClass = $this->dateClass; + + return $dateClass::parse($value, $this->tzName); + } + } + + return null; + } + + private function isInfiniteDate($date): bool + { + return $date instanceof CarbonInterface && ($date->isEndOfTime() || $date->isStartOfTime()); + } + + private function rawDate($date): ?DateTimeInterface + { + if ($date === false || $date === null) { + return null; + } + + if ($date instanceof CarbonInterface) { + return $date->isMutable() + ? $date->toDateTime() + : $date->toDateTimeImmutable(); + } + + if (\in_array(\get_class($date), [DateTime::class, DateTimeImmutable::class], true)) { + return $date; + } + + $class = $date instanceof DateTime ? DateTime::class : DateTimeImmutable::class; + + return new $class($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); + } + + private static function setDefaultParameters(array &$parameters, array $defaults): void + { + foreach ($defaults as [$index, $name, $value]) { + if (!\array_key_exists($index, $parameters) && !\array_key_exists($name, $parameters)) { + $parameters[$index] = $value; + } + } + } +} diff --git a/libraries/Carbon/src/Carbon/CarbonPeriodImmutable.php b/libraries/Carbon/src/Carbon/CarbonPeriodImmutable.php new file mode 100644 index 00000000000..27d9d8790fd --- /dev/null +++ b/libraries/Carbon/src/Carbon/CarbonPeriodImmutable.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +class CarbonPeriodImmutable extends CarbonPeriod +{ + /** + * Default date class of iteration items. + * + * @var string + */ + protected const DEFAULT_DATE_CLASS = CarbonImmutable::class; + + /** + * Date class of iteration items. + * + * @var string + */ + protected $dateClass = CarbonImmutable::class; + + /** + * Prepare the instance to be set (self if mutable to be mutated, + * copy if immutable to generate a new instance). + * + * @return static + */ + protected function copyIfImmutable() + { + return $this->constructed ? clone $this : $this; + } +} diff --git a/libraries/Carbon/src/Carbon/CarbonTimeZone.php b/libraries/Carbon/src/Carbon/CarbonTimeZone.php new file mode 100644 index 00000000000..794cb74a45d --- /dev/null +++ b/libraries/Carbon/src/Carbon/CarbonTimeZone.php @@ -0,0 +1,320 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Carbon\Exceptions\InvalidCastException; +use EDD\Vendor\Carbon\Exceptions\InvalidTimeZoneException; +use DateTimeInterface; +use DateTimeZone; +use Throwable; + +class CarbonTimeZone extends DateTimeZone +{ + public function __construct($timezone = null) + { + parent::__construct(static::getDateTimeZoneNameFromMixed($timezone)); + } + + protected static function parseNumericTimezone($timezone) + { + if ($timezone <= -100 || $timezone >= 100) { + throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.'); + } + + return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00'; + } + + protected static function getDateTimeZoneNameFromMixed($timezone) + { + if ($timezone === null) { + return date_default_timezone_get(); + } + + if (\is_string($timezone)) { + $timezone = preg_replace('/^\s*([+-]\d+)(\d{2})\s*$/', '$1:$2', $timezone); + } + + if (is_numeric($timezone)) { + return static::parseNumericTimezone($timezone); + } + + return $timezone; + } + + protected static function getDateTimeZoneFromName(&$name) + { + return @timezone_open($name = (string) static::getDateTimeZoneNameFromMixed($name)); + } + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateTimeZone + */ + public function cast(string $className) + { + if (!method_exists($className, 'instance')) { + if (is_a($className, DateTimeZone::class, true)) { + return new $className($this->getName()); + } + + throw new InvalidCastException("$className has not the instance() method needed to cast the date."); + } + + return $className::instance($this); + } + + /** + * Create a CarbonTimeZone from mixed input. + * + * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. + * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. + * + * @throws InvalidTimeZoneException + * + * @return false|static + */ + public static function instance($object = null, $objectDump = null) + { + $tz = $object; + + if ($tz instanceof static) { + return $tz; + } + + if ($tz === null) { + return new static(); + } + + if (!$tz instanceof DateTimeZone) { + $tz = static::getDateTimeZoneFromName($object); + } + + if ($tz !== false) { + return new static($tz->getName()); + } + + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); + } + + return false; + } + + /** + * Returns abbreviated name of the current timezone according to DST setting. + * + * @param bool $dst + * + * @return string + */ + public function getAbbreviatedName($dst = false) + { + $name = $this->getName(); + + foreach ($this->listAbbreviations() as $abbreviation => $zones) { + foreach ($zones as $zone) { + if ($zone['timezone_id'] === $name && $zone['dst'] == $dst) { + return $abbreviation; + } + } + } + + return 'unknown'; + } + + /** + * @alias getAbbreviatedName + * + * Returns abbreviated name of the current timezone according to DST setting. + * + * @param bool $dst + * + * @return string + */ + public function getAbbr($dst = false) + { + return $this->getAbbreviatedName($dst); + } + + /** + * Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30"). + * + * @param DateTimeInterface|null $date + * + * @return string + */ + public function toOffsetName(DateTimeInterface $date = null) + { + return static::getOffsetNameFromMinuteOffset( + $this->getOffset($date ?: Carbon::now($this)) / 60 + ); + } + + /** + * Returns a new CarbonTimeZone object using the offset string instead of region string. + * + * @param DateTimeInterface|null $date + * + * @return CarbonTimeZone + */ + public function toOffsetTimeZone(DateTimeInterface $date = null) + { + return new static($this->toOffsetName($date)); + } + + /** + * Returns the first region string (such as "America/Toronto") that matches the current timezone or + * false if no match is found. + * + * @see timezone_name_from_abbr native PHP function. + * + * @param DateTimeInterface|null $date + * @param int $isDst + * + * @return string|false + */ + public function toRegionName(DateTimeInterface $date = null, $isDst = 1) + { + $name = $this->getName(); + $firstChar = substr($name, 0, 1); + + if ($firstChar !== '+' && $firstChar !== '-') { + return $name; + } + + $date = $date ?: Carbon::now($this); + + // Integer construction no longer supported since PHP 8 + // @codeCoverageIgnoreStart + try { + $offset = @$this->getOffset($date) ?: 0; + } catch (Throwable $e) { + $offset = 0; + } + // @codeCoverageIgnoreEnd + + $name = @timezone_name_from_abbr('', $offset, $isDst); + + if ($name) { + return $name; + } + + foreach (timezone_identifiers_list() as $timezone) { + if (Carbon::instance($date)->tz($timezone)->getOffset() === $offset) { + return $timezone; + } + } + + return false; + } + + /** + * Returns a new CarbonTimeZone object using the region string instead of offset string. + * + * @param DateTimeInterface|null $date + * + * @return CarbonTimeZone|false + */ + public function toRegionTimeZone(DateTimeInterface $date = null) + { + $tz = $this->toRegionName($date); + + if ($tz !== false) { + return new static($tz); + } + + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); + } + + return false; + } + + /** + * Cast to string (get timezone name). + * + * @return string + */ + public function __toString() + { + return $this->getName(); + } + + /** + * Return the type number: + * + * Type 1; A UTC offset, such as -0300 + * Type 2; A timezone abbreviation, such as GMT + * Type 3: A timezone identifier, such as Europe/London + */ + public function getType(): int + { + return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3; + } + + /** + * Create a CarbonTimeZone from mixed input. + * + * @param DateTimeZone|string|int|null $object + * + * @return false|static + */ + public static function create($object = null) + { + return static::instance($object); + } + + /** + * Create a CarbonTimeZone from int/float hour offset. + * + * @param float $hourOffset number of hour of the timezone shift (can be decimal). + * + * @return false|static + */ + public static function createFromHourOffset(float $hourOffset) + { + return static::createFromMinuteOffset($hourOffset * Carbon::MINUTES_PER_HOUR); + } + + /** + * Create a CarbonTimeZone from int/float minute offset. + * + * @param float $minuteOffset number of total minutes of the timezone shift. + * + * @return false|static + */ + public static function createFromMinuteOffset(float $minuteOffset) + { + return static::instance(static::getOffsetNameFromMinuteOffset($minuteOffset)); + } + + /** + * Convert a total minutes offset into a standardized timezone offset string. + * + * @param float $minutes number of total minutes of the timezone shift. + * + * @return string + */ + public static function getOffsetNameFromMinuteOffset(float $minutes): string + { + $minutes = round($minutes); + $unsignedMinutes = abs($minutes); + + return ($minutes < 0 ? '-' : '+'). + str_pad((string) floor($unsignedMinutes / 60), 2, '0', STR_PAD_LEFT). + ':'. + str_pad((string) ($unsignedMinutes % 60), 2, '0', STR_PAD_LEFT); + } +} diff --git a/libraries/Carbon/src/Carbon/Cli/Invoker.php b/libraries/Carbon/src/Carbon/Cli/Invoker.php new file mode 100644 index 00000000000..560610e36e8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Cli/Invoker.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Cli; + +class Invoker +{ + public const CLI_CLASS_NAME = 'EDD\Vendor\Carbon\\Cli'; + + protected function runWithCli(string $className, array $parameters): bool + { + $cli = new $className(); + + return $cli(...$parameters); + } + + public function __invoke(...$parameters): bool + { + if (class_exists(self::CLI_CLASS_NAME)) { + return $this->runWithCli(self::CLI_CLASS_NAME, $parameters); + } + + $function = (($parameters[1] ?? '') === 'install' ? ($parameters[2] ?? null) : null) ?: 'shell_exec'; + $function('composer require carbon-cli/carbon-cli --no-interaction'); + + echo 'Installation succeeded.'; + + return true; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/BadComparisonUnitException.php b/libraries/Carbon/src/Carbon/Exceptions/BadComparisonUnitException.php new file mode 100644 index 00000000000..ad9b8e7df61 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/BadComparisonUnitException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use Throwable; + +class BadComparisonUnitException extends UnitException +{ + /** + * The unit. + * + * @var string + */ + protected $unit; + + /** + * Constructor. + * + * @param string $unit + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + + parent::__construct("Bad comparison unit: '$unit'", $code, $previous); + } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/BadFluentConstructorException.php b/libraries/Carbon/src/Carbon/Exceptions/BadFluentConstructorException.php new file mode 100644 index 00000000000..b788587a3be --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/BadFluentConstructorException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use BadMethodCallException as BaseBadMethodCallException; +use Throwable; + +class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException +{ + /** + * The method. + * + * @var string + */ + protected $method; + + /** + * Constructor. + * + * @param string $method + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($method, $code = 0, Throwable $previous = null) + { + $this->method = $method; + + parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous); + } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/BadFluentSetterException.php b/libraries/Carbon/src/Carbon/Exceptions/BadFluentSetterException.php new file mode 100644 index 00000000000..31b40566952 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/BadFluentSetterException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use BadMethodCallException as BaseBadMethodCallException; +use Throwable; + +class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException +{ + /** + * The setter. + * + * @var string + */ + protected $setter; + + /** + * Constructor. + * + * @param string $setter + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($setter, $code = 0, Throwable $previous = null) + { + $this->setter = $setter; + + parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous); + } + + /** + * Get the setter. + * + * @return string + */ + public function getSetter(): string + { + return $this->setter; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/BadMethodCallException.php b/libraries/Carbon/src/Carbon/Exceptions/BadMethodCallException.php new file mode 100644 index 00000000000..f1e71c1abf2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/BadMethodCallException.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +interface BadMethodCallException extends Exception +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/EndLessPeriodException.php b/libraries/Carbon/src/Carbon/Exceptions/EndLessPeriodException.php new file mode 100644 index 00000000000..bd95db92a6f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/EndLessPeriodException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use RuntimeException as BaseRuntimeException; + +final class EndLessPeriodException extends BaseRuntimeException implements RuntimeException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/Exception.php b/libraries/Carbon/src/Carbon/Exceptions/Exception.php new file mode 100644 index 00000000000..6aa14683b55 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/Exception.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +interface Exception +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/ImmutableException.php b/libraries/Carbon/src/Carbon/Exceptions/ImmutableException.php new file mode 100644 index 00000000000..212c4ec1b3f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/ImmutableException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use RuntimeException as BaseRuntimeException; +use Throwable; + +class ImmutableException extends BaseRuntimeException implements RuntimeException +{ + /** + * The value. + * + * @var string + */ + protected $value; + + /** + * Constructor. + * + * @param string $value the immutable type/value + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($value, $code = 0, Throwable $previous = null) + { + $this->value = $value; + parent::__construct("$value is immutable.", $code, $previous); + } + + /** + * Get the value. + * + * @return string + */ + public function getValue(): string + { + return $this->value; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidArgumentException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidArgumentException.php new file mode 100644 index 00000000000..6f0c1715287 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidArgumentException.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +interface InvalidArgumentException extends Exception +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidCastException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidCastException.php new file mode 100644 index 00000000000..a9cff761da2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidCastException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidDateException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidDateException.php new file mode 100644 index 00000000000..fe9d873e0d4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidDateException.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The invalid field. + * + * @var string + */ + private $field; + + /** + * The invalid value. + * + * @var mixed + */ + private $value; + + /** + * Constructor. + * + * @param string $field + * @param mixed $value + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($field, $value, $code = 0, Throwable $previous = null) + { + $this->field = $field; + $this->value = $value; + parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous); + } + + /** + * Get the invalid field. + * + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Get the invalid value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidFormatException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidFormatException.php new file mode 100644 index 00000000000..27aa20116f0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidFormatException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidIntervalException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidIntervalException.php new file mode 100644 index 00000000000..6c95fbbce77 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidIntervalException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php new file mode 100644 index 00000000000..bf54afce295 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php new file mode 100644 index 00000000000..9e778f612f9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php new file mode 100644 index 00000000000..cb73e683993 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/InvalidTypeException.php b/libraries/Carbon/src/Carbon/Exceptions/InvalidTypeException.php new file mode 100644 index 00000000000..677bdbb023c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/InvalidTypeException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/NotACarbonClassException.php b/libraries/Carbon/src/Carbon/Exceptions/NotACarbonClassException.php new file mode 100644 index 00000000000..3710093e82c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/NotACarbonClassException.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use EDD\Vendor\Carbon\CarbonInterface; +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The className. + * + * @var string + */ + protected $className; + + /** + * Constructor. + * + * @param string $className + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($className, $code = 0, Throwable $previous = null) + { + $this->className = $className; + + parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous); + } + + /** + * Get the className. + * + * @return string + */ + public function getClassName(): string + { + return $this->className; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/NotAPeriodException.php b/libraries/Carbon/src/Carbon/Exceptions/NotAPeriodException.php new file mode 100644 index 00000000000..1489d46960d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/NotAPeriodException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/NotLocaleAwareException.php b/libraries/Carbon/src/Carbon/Exceptions/NotLocaleAwareException.php new file mode 100644 index 00000000000..1f093a4ba4f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/NotLocaleAwareException.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * Constructor. + * + * @param mixed $object + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($object, $code = 0, Throwable $previous = null) + { + $dump = \is_object($object) ? \get_class($object) : \gettype($object); + + parent::__construct("$dump does neither implements EDD\Vendor\Symfony\Contracts\Translation\LocaleAwareInterface nor getLocale() method.", $code, $previous); + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/OutOfRangeException.php b/libraries/Carbon/src/Carbon/Exceptions/OutOfRangeException.php new file mode 100644 index 00000000000..5fface5d558 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/OutOfRangeException.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +// This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0 +// use OutOfRangeException as BaseOutOfRangeException; + +class OutOfRangeException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The unit or name of the value. + * + * @var string + */ + private $unit; + + /** + * The range minimum. + * + * @var mixed + */ + private $min; + + /** + * The range maximum. + * + * @var mixed + */ + private $max; + + /** + * The invalid value. + * + * @var mixed + */ + private $value; + + /** + * Constructor. + * + * @param string $unit + * @param mixed $min + * @param mixed $max + * @param mixed $value + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + $this->min = $min; + $this->max = $max; + $this->value = $value; + + parent::__construct("$unit must be between $min and $max, $value given", $code, $previous); + } + + /** + * @return mixed + */ + public function getMax() + { + return $this->max; + } + + /** + * @return mixed + */ + public function getMin() + { + return $this->min; + } + + /** + * @return mixed + */ + public function getUnit() + { + return $this->unit; + } + + /** + * @return mixed + */ + public function getValue() + { + return $this->value; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/ParseErrorException.php b/libraries/Carbon/src/Carbon/Exceptions/ParseErrorException.php new file mode 100644 index 00000000000..12849339137 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/ParseErrorException.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The expected. + * + * @var string + */ + protected $expected; + + /** + * The actual. + * + * @var string + */ + protected $actual; + + /** + * The help message. + * + * @var string + */ + protected $help; + + /** + * Constructor. + * + * @param string $expected + * @param string $actual + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null) + { + $this->expected = $expected; + $this->actual = $actual; + $this->help = $help; + + $actual = $actual === '' ? 'data is missing' : "get '$actual'"; + + parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous); + } + + /** + * Get the expected. + * + * @return string + */ + public function getExpected(): string + { + return $this->expected; + } + + /** + * Get the actual. + * + * @return string + */ + public function getActual(): string + { + return $this->actual; + } + + /** + * Get the help message. + * + * @return string + */ + public function getHelp(): string + { + return $this->help; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/RuntimeException.php b/libraries/Carbon/src/Carbon/Exceptions/RuntimeException.php new file mode 100644 index 00000000000..744d5642515 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/RuntimeException.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +interface RuntimeException extends Exception +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/UnitException.php b/libraries/Carbon/src/Carbon/Exceptions/UnitException.php new file mode 100644 index 00000000000..3dcae6b14f6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/UnitException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php b/libraries/Carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php new file mode 100644 index 00000000000..074355c36b0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use Throwable; + +class UnitNotConfiguredException extends UnitException +{ + /** + * The unit. + * + * @var string + */ + protected $unit; + + /** + * Constructor. + * + * @param string $unit + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + + parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous); + } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/UnknownGetterException.php b/libraries/Carbon/src/Carbon/Exceptions/UnknownGetterException.php new file mode 100644 index 00000000000..d7fb87cecf8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/UnknownGetterException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The getter. + * + * @var string + */ + protected $getter; + + /** + * Constructor. + * + * @param string $getter getter name + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($getter, $code = 0, Throwable $previous = null) + { + $this->getter = $getter; + + parent::__construct("Unknown getter '$getter'", $code, $previous); + } + + /** + * Get the getter. + * + * @return string + */ + public function getGetter(): string + { + return $this->getter; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/UnknownMethodException.php b/libraries/Carbon/src/Carbon/Exceptions/UnknownMethodException.php new file mode 100644 index 00000000000..00fb02f5352 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/UnknownMethodException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use BadMethodCallException as BaseBadMethodCallException; +use Throwable; + +class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException +{ + /** + * The method. + * + * @var string + */ + protected $method; + + /** + * Constructor. + * + * @param string $method + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($method, $code = 0, Throwable $previous = null) + { + $this->method = $method; + + parent::__construct("Method $method does not exist.", $code, $previous); + } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/UnknownSetterException.php b/libraries/Carbon/src/Carbon/Exceptions/UnknownSetterException.php new file mode 100644 index 00000000000..84b34228fd1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/UnknownSetterException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException +{ + /** + * The setter. + * + * @var string + */ + protected $setter; + + /** + * Constructor. + * + * @param string $setter setter name + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($setter, $code = 0, Throwable $previous = null) + { + $this->setter = $setter; + + parent::__construct("Unknown setter '$setter'", $code, $previous); + } + + /** + * Get the setter. + * + * @return string + */ + public function getSetter(): string + { + return $this->setter; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/UnknownUnitException.php b/libraries/Carbon/src/Carbon/Exceptions/UnknownUnitException.php new file mode 100644 index 00000000000..47a5b0ba2e3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/UnknownUnitException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use Throwable; + +class UnknownUnitException extends UnitException +{ + /** + * The unit. + * + * @var string + */ + protected $unit; + + /** + * Constructor. + * + * @param string $unit + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + + parent::__construct("Unknown unit '$unit'.", $code, $previous); + } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } +} diff --git a/libraries/Carbon/src/Carbon/Exceptions/UnreachableException.php b/libraries/Carbon/src/Carbon/Exceptions/UnreachableException.php new file mode 100644 index 00000000000..9622b64d21e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Exceptions/UnreachableException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Exceptions; + +use RuntimeException as BaseRuntimeException; + +class UnreachableException extends BaseRuntimeException implements RuntimeException +{ + // +} diff --git a/libraries/Carbon/src/Carbon/Factory.php b/libraries/Carbon/src/Carbon/Factory.php new file mode 100644 index 00000000000..ec129518068 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Factory.php @@ -0,0 +1,326 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use Closure; +use DateTimeInterface; +use ReflectionMethod; + +/** + * A factory to generate EDD\Vendor\Carbon instances with common settings. + * + * + * + * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a + * new instance. + * @method EDD\Vendor\Carbon|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new EDD\Vendor\Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * @method EDD\Vendor\Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to now. + * @method EDD\Vendor\Carbon|false createFromFormat($format, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific format. + * @method EDD\Vendor\Carbon|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a EDD\Vendor\Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * @method EDD\Vendor\Carbon|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific format and a string in a given language. + * @method EDD\Vendor\Carbon|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific ISO format and a string in a given language. + * @method EDD\Vendor\Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a EDD\Vendor\Carbon instance from just a time. The date portion is set to today. + * @method EDD\Vendor\Carbon createFromTimeString($time, $tz = null) Create a EDD\Vendor\Carbon instance from a time string. The date portion is set to today. + * @method EDD\Vendor\Carbon createFromTimestamp($timestamp, $tz = null) Create a EDD\Vendor\Carbon instance from a timestamp and set the timezone (use default one if not specified). + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method EDD\Vendor\Carbon createFromTimestampMs($timestamp, $tz = null) Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method EDD\Vendor\Carbon createFromTimestampMsUTC($timestamp) Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method EDD\Vendor\Carbon createFromTimestampUTC($timestamp) Create a EDD\Vendor\Carbon instance from an timestamp keeping the timezone to UTC. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method EDD\Vendor\Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to midnight. + * @method EDD\Vendor\Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe EDD\Vendor\Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new EDD\Vendor\Carbon instance from a specific date and time using strict validation. + * @method EDD\Vendor\Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method EDD\Vendor\Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * @method EDD\Vendor\Carbon fromSerialized($value) Create an instance from a serialized string. + * @method void genericMacro($macro, $priority = 0) Register a custom macro. + * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * @method array getDays() Get the days of the week + * @method string|null getFallbackLocale() Get the fallback locale. + * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). + * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). + * @method array getIsoUnits() Returns list of locale units for ISO formatting. + * @method array getLastErrors() {@inheritdoc} + * @method string getLocale() Get the current translator locale. + * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. + * @method int getMidDayAt() get midday/noon hour + * @method Closure|EDD\Vendor\Carbon getTestNow() Get the EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. + * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. + * @method \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. + * @method int getWeekEndsAt() Get the last day of week + * @method int getWeekStartsAt() Get the first day of week + * @method array getWeekendDays() Get weekend days + * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasMacro($name) Checks if macro is registered globally. + * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. + * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * @method EDD\Vendor\Carbon instance($date) Create a EDD\Vendor\Carbon instance from a DateTime one. + * @method bool isImmutable() Returns true if the current class/instance is immutable. + * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. + * @method bool isMutable() Returns true if the current class/instance is mutable. + * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * @method void macro($name, $macro) Register a custom macro. + * @method EDD\Vendor\Carbon|null make($var) Make a EDD\Vendor\Carbon instance from given variable if possible. + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * @method EDD\Vendor\Carbon maxValue() Create a EDD\Vendor\Carbon instance for the greatest supported date. + * @method EDD\Vendor\Carbon minValue() Create a EDD\Vendor\Carbon instance for the lowest supported date. + * @method void mixin($mixin) Mix another object into the class. + * @method EDD\Vendor\Carbon now($tz = null) Get a EDD\Vendor\Carbon instance for the current date and time. + * @method EDD\Vendor\Carbon parse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method EDD\Vendor\Carbon parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). + * @method EDD\Vendor\Carbon|false rawCreateFromFormat($format, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific format. + * @method EDD\Vendor\Carbon rawParse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method EDD\Vendor\Carbon resetMacros() Remove all macros and generic macros. + * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void resetToStringFormat() Reset the format used to the default when type juggling a EDD\Vendor\Carbon instance to a string + * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform EDD\Vendor\Carbon object before the serialization. + * JSON serialize all EDD\Vendor\Carbon instances using the given callback. + * @method EDD\Vendor\Carbon setFallbackLocale($locale) Set the fallback locale. + * @method EDD\Vendor\Carbon setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * Set midday/noon hour + * @method EDD\Vendor\Carbon setTestNow($testNow = null) Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method EDD\Vendor\Carbon setTestNowAndTimezone($testNow = null, $tz = null) Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let EDD\Vendor\Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump another string + * format. + * Set the default format used when type juggling a EDD\Vendor\Carbon instance to a string. + * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. + * @method EDD\Vendor\Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * Set if UTF8 will be used for localized date/time. + * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * Set the last day of week + * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * Set the first day of week + * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * Set weekend days + * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). + * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). + * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). + * @method EDD\Vendor\Carbon today($tz = null) Create a EDD\Vendor\Carbon instance for today. + * @method EDD\Vendor\Carbon tomorrow($tz = null) Create a EDD\Vendor\Carbon instance for tomorrow. + * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. + * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. + * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method EDD\Vendor\Carbon useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * /!\ Use this method for unit tests only. + * @method EDD\Vendor\Carbon yesterday($tz = null) Create a EDD\Vendor\Carbon instance for yesterday. + * + * + */ +class Factory +{ + protected $className = Carbon::class; + + protected $settings = []; + + public function __construct(array $settings = [], ?string $className = null) + { + if ($className) { + $this->className = $className; + } + + $this->settings = $settings; + } + + public function getClassName() + { + return $this->className; + } + + public function setClassName(string $className) + { + $this->className = $className; + + return $this; + } + + public function className(string $className = null) + { + return $className === null ? $this->getClassName() : $this->setClassName($className); + } + + public function getSettings() + { + return $this->settings; + } + + public function setSettings(array $settings) + { + $this->settings = $settings; + + return $this; + } + + public function settings(array $settings = null) + { + return $settings === null ? $this->getSettings() : $this->setSettings($settings); + } + + public function mergeSettings(array $settings) + { + $this->settings = array_merge($this->settings, $settings); + + return $this; + } + + public function __call($name, $arguments) + { + $method = new ReflectionMethod($this->className, $name); + $settings = $this->settings; + + if ($settings && isset($settings['timezone'])) { + $tzParameters = array_filter($method->getParameters(), function ($parameter) { + return \in_array($parameter->getName(), ['tz', 'timezone'], true); + }); + + if (isset($arguments[0]) && \in_array($name, ['instance', 'make', 'create', 'parse'], true)) { + if ($arguments[0] instanceof DateTimeInterface) { + $settings['innerTimezone'] = $settings['timezone']; + } elseif (\is_string($arguments[0]) && date_parse($arguments[0])['is_localtime']) { + unset($settings['timezone'], $settings['innerTimezone']); + } + } elseif (\count($tzParameters)) { + array_splice($arguments, key($tzParameters), 0, [$settings['timezone']]); + unset($settings['timezone']); + } + } + + $result = $this->className::$name(...$arguments); + + return $result instanceof CarbonInterface && !empty($settings) + ? $result->settings($settings) + : $result; + } +} diff --git a/libraries/Carbon/src/Carbon/FactoryImmutable.php b/libraries/Carbon/src/Carbon/FactoryImmutable.php new file mode 100644 index 00000000000..bfd9ab4a790 --- /dev/null +++ b/libraries/Carbon/src/Carbon/FactoryImmutable.php @@ -0,0 +1,259 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use Closure; +use DateTimeImmutable; +use DateTimeZone; +use EDD\Vendor\Psr\Clock\ClockInterface; + +/** + * A factory to generate CarbonImmutable instances with common settings. + * + * + * + * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a + * new instance. + * @method CarbonImmutable|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new EDD\Vendor\Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * @method CarbonImmutable createFromDate($year = null, $month = null, $day = null, $tz = null) Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to now. + * @method CarbonImmutable|false createFromFormat($format, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific format. + * @method CarbonImmutable|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a EDD\Vendor\Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * @method CarbonImmutable|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific format and a string in a given language. + * @method CarbonImmutable|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific ISO format and a string in a given language. + * @method CarbonImmutable createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a EDD\Vendor\Carbon instance from just a time. The date portion is set to today. + * @method CarbonImmutable createFromTimeString($time, $tz = null) Create a EDD\Vendor\Carbon instance from a time string. The date portion is set to today. + * @method CarbonImmutable createFromTimestamp($timestamp, $tz = null) Create a EDD\Vendor\Carbon instance from a timestamp and set the timezone (use default one if not specified). + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampMs($timestamp, $tz = null) Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampMsUTC($timestamp) Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampUTC($timestamp) Create a EDD\Vendor\Carbon instance from an timestamp keeping the timezone to UTC. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to midnight. + * @method CarbonImmutable|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe EDD\Vendor\Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new EDD\Vendor\Carbon instance from a specific date and time using strict validation. + * @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * @method CarbonImmutable fromSerialized($value) Create an instance from a serialized string. + * @method void genericMacro($macro, $priority = 0) Register a custom macro. + * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * @method array getDays() Get the days of the week + * @method string|null getFallbackLocale() Get the fallback locale. + * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). + * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). + * @method array getIsoUnits() Returns list of locale units for ISO formatting. + * @method array getLastErrors() {@inheritdoc} + * @method string getLocale() Get the current translator locale. + * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. + * @method int getMidDayAt() get midday/noon hour + * @method Closure|CarbonImmutable getTestNow() Get the EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. + * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. + * @method \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. + * @method int getWeekEndsAt() Get the last day of week + * @method int getWeekStartsAt() Get the first day of week + * @method array getWeekendDays() Get weekend days + * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasMacro($name) Checks if macro is registered globally. + * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. + * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * @method CarbonImmutable instance($date) Create a EDD\Vendor\Carbon instance from a DateTime one. + * @method bool isImmutable() Returns true if the current class/instance is immutable. + * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. + * @method bool isMutable() Returns true if the current class/instance is mutable. + * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * @method void macro($name, $macro) Register a custom macro. + * @method CarbonImmutable|null make($var) Make a EDD\Vendor\Carbon instance from given variable if possible. + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * @method CarbonImmutable maxValue() Create a EDD\Vendor\Carbon instance for the greatest supported date. + * @method CarbonImmutable minValue() Create a EDD\Vendor\Carbon instance for the lowest supported date. + * @method void mixin($mixin) Mix another object into the class. + * @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method CarbonImmutable parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). + * @method CarbonImmutable|false rawCreateFromFormat($format, $time, $tz = null) Create a EDD\Vendor\Carbon instance from a specific format. + * @method CarbonImmutable rawParse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method CarbonImmutable resetMacros() Remove all macros and generic macros. + * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void resetToStringFormat() Reset the format used to the default when type juggling a EDD\Vendor\Carbon instance to a string + * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform EDD\Vendor\Carbon object before the serialization. + * JSON serialize all EDD\Vendor\Carbon instances using the given callback. + * @method CarbonImmutable setFallbackLocale($locale) Set the fallback locale. + * @method CarbonImmutable setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * Set midday/noon hour + * @method CarbonImmutable setTestNow($testNow = null) Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method CarbonImmutable setTestNowAndTimezone($testNow = null, $tz = null) Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let EDD\Vendor\Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump another string + * format. + * Set the default format used when type juggling a EDD\Vendor\Carbon instance to a string. + * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. + * @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * Set if UTF8 will be used for localized date/time. + * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * Set the last day of week + * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * Set the first day of week + * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * Set weekend days + * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). + * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). + * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). + * @method CarbonImmutable today($tz = null) Create a EDD\Vendor\Carbon instance for today. + * @method CarbonImmutable tomorrow($tz = null) Create a EDD\Vendor\Carbon instance for tomorrow. + * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. + * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. + * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method CarbonImmutable useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * /!\ Use this method for unit tests only. + * @method CarbonImmutable yesterday($tz = null) Create a EDD\Vendor\Carbon instance for yesterday. + * + * + */ +class FactoryImmutable extends Factory implements ClockInterface +{ + protected $className = CarbonImmutable::class; + + /** + * Get a EDD\Vendor\Carbon instance for the current date and time. + * + * @param DateTimeZone|string|int|null $tz + * + * @return CarbonImmutable + */ + public function now($tz = null): DateTimeImmutable + { + $className = $this->className; + + return new $className(null, $tz); + } +} diff --git a/libraries/Carbon/src/Carbon/Lang/aa.php b/libraries/Carbon/src/Carbon/Lang/aa.php new file mode 100644 index 00000000000..e03fe1b15c2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/aa.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/aa_DJ.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/aa_DJ.php b/libraries/Carbon/src/Carbon/Lang/aa_DJ.php new file mode 100644 index 00000000000..7166b5cccca --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/aa_DJ.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], + 'months_short' => ['qun', 'nah', 'cig', 'agd', 'cax', 'qas', 'qad', 'leq', 'way', 'dit', 'xim', 'kax'], + 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], + 'weekdays_short' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'], + 'weekdays_min' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['saaku', 'carra'], + + 'year' => ':count gaqambo', // less reliable + 'y' => ':count gaqambo', // less reliable + 'a_year' => ':count gaqambo', // less reliable + + 'month' => ':count àlsa', + 'm' => ':count àlsa', + 'a_month' => ':count àlsa', + + 'day' => ':count saaku', // less reliable + 'd' => ':count saaku', // less reliable + 'a_day' => ':count saaku', // less reliable + + 'hour' => ':count ayti', // less reliable + 'h' => ':count ayti', // less reliable + 'a_hour' => ':count ayti', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/aa_ER.php b/libraries/Carbon/src/Carbon/Lang/aa_ER.php new file mode 100644 index 00000000000..136b41b1716 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/aa_ER.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], + 'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], + 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], + 'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], + 'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['saaku', 'carra'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/aa_ER@saaho.php b/libraries/Carbon/src/Carbon/Lang/aa_ER@saaho.php new file mode 100644 index 00000000000..07ed9463614 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/aa_ER@saaho.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], + 'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], + 'weekdays' => ['Naba Sambat', 'Sani', 'Salus', 'Rabuq', 'Camus', 'Jumqata', 'Qunxa Sambat'], + 'weekdays_short' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'], + 'weekdays_min' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['saaku', 'carra'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/aa_ET.php b/libraries/Carbon/src/Carbon/Lang/aa_ET.php new file mode 100644 index 00000000000..d968f377942 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/aa_ET.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], + 'months_short' => ['Qun', 'Kud', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], + 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], + 'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], + 'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['saaku', 'carra'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/af.php b/libraries/Carbon/src/Carbon/Lang/af.php new file mode 100644 index 00000000000..71c6686f9d3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/af.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - JD Isaacks + * - Pierre du Plessis + */ +return [ + 'year' => ':count jaar', + 'a_year' => '\'n jaar|:count jaar', + 'y' => ':count j.', + 'month' => ':count maand|:count maande', + 'a_month' => '\'n maand|:count maande', + 'm' => ':count maa.', + 'week' => ':count week|:count weke', + 'a_week' => '\'n week|:count weke', + 'w' => ':count w.', + 'day' => ':count dag|:count dae', + 'a_day' => '\'n dag|:count dae', + 'd' => ':count d.', + 'hour' => ':count uur', + 'a_hour' => '\'n uur|:count uur', + 'h' => ':count u.', + 'minute' => ':count minuut|:count minute', + 'a_minute' => '\'n minuut|:count minute', + 'min' => ':count min.', + 'second' => ':count sekond|:count sekondes', + 'a_second' => '\'n paar sekondes|:count sekondes', + 's' => ':count s.', + 'ago' => ':time gelede', + 'from_now' => 'oor :time', + 'after' => ':time na', + 'before' => ':time voor', + 'diff_now' => 'Nou', + 'diff_today' => 'Vandag', + 'diff_today_regexp' => 'Vandag(?:\\s+om)?', + 'diff_yesterday' => 'Gister', + 'diff_yesterday_regexp' => 'Gister(?:\\s+om)?', + 'diff_tomorrow' => 'Môre', + 'diff_tomorrow_regexp' => 'Môre(?:\\s+om)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Vandag om] LT', + 'nextDay' => '[Môre om] LT', + 'nextWeek' => 'dddd [om] LT', + 'lastDay' => '[Gister om] LT', + 'lastWeek' => '[Laas] dddd [om] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); + }, + 'meridiem' => ['VM', 'NM'], + 'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'], + 'months_short' => ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], + 'weekdays_short' => ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'], + 'weekdays_min' => ['So', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' en '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/af_NA.php b/libraries/Carbon/src/Carbon/Lang/af_NA.php new file mode 100644 index 00000000000..887910098b0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/af_NA.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/af.php', [ + 'meridiem' => ['v', 'n'], + 'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], + 'weekdays_short' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'], + 'weekdays_min' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'], + 'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'], + 'months_short' => ['Jan.', 'Feb.', 'Mrt.', 'Apr.', 'Mei', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Des.'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'DD MMM YYYY', + 'LLL' => 'DD MMMM YYYY HH:mm', + 'LLLL' => 'dddd, DD MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/af_ZA.php b/libraries/Carbon/src/Carbon/Lang/af_ZA.php new file mode 100644 index 00000000000..b99b4cbc40c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/af_ZA.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/af.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/agq.php b/libraries/Carbon/src/Carbon/Lang/agq.php new file mode 100644 index 00000000000..28983c3b127 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/agq.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['a.g', 'a.k'], + 'weekdays' => ['tsuʔntsɨ', 'tsuʔukpà', 'tsuʔughɔe', 'tsuʔutɔ̀mlò', 'tsuʔumè', 'tsuʔughɨ̂m', 'tsuʔndzɨkɔʔɔ'], + 'weekdays_short' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'], + 'weekdays_min' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'], + 'months' => ['ndzɔ̀ŋɔ̀nùm', 'ndzɔ̀ŋɔ̀kƗ̀zùʔ', 'ndzɔ̀ŋɔ̀tƗ̀dʉ̀ghà', 'ndzɔ̀ŋɔ̀tǎafʉ̄ghā', 'ndzɔ̀ŋèsèe', 'ndzɔ̀ŋɔ̀nzùghò', 'ndzɔ̀ŋɔ̀dùmlo', 'ndzɔ̀ŋɔ̀kwîfɔ̀e', 'ndzɔ̀ŋɔ̀tƗ̀fʉ̀ghàdzughù', 'ndzɔ̀ŋɔ̀ghǔuwelɔ̀m', 'ndzɔ̀ŋɔ̀chwaʔàkaa wo', 'ndzɔ̀ŋèfwòo'], + 'months_short' => ['nùm', 'kɨz', 'tɨd', 'taa', 'see', 'nzu', 'dum', 'fɔe', 'dzu', 'lɔm', 'kaa', 'fwo'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/agr.php b/libraries/Carbon/src/Carbon/Lang/agr.php new file mode 100644 index 00000000000..1146bf89f71 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/agr.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/agr_PE.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/agr_PE.php b/libraries/Carbon/src/Carbon/Lang/agr_PE.php new file mode 100644 index 00000000000..7c6fa96e2a6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/agr_PE.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - somosazucar.org libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Petsatin', 'Kupitin', 'Uyaitin', 'Tayutin', 'Kegketin', 'Tegmatin', 'Kuntutin', 'Yagkujutin', 'Daiktatin', 'Ipamtatin', 'Shinutin', 'Sakamtin'], + 'months_short' => ['Pet', 'Kup', 'Uya', 'Tay', 'Keg', 'Teg', 'Kun', 'Yag', 'Dait', 'Ipam', 'Shin', 'Sak'], + 'weekdays' => ['Tuntuamtin', 'Achutin', 'Kugkuktin', 'Saketin', 'Shimpitin', 'Imaptin', 'Bataetin'], + 'weekdays_short' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'], + 'weekdays_min' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 7, + 'meridiem' => ['VM', 'NM'], + + 'year' => ':count yaya', // less reliable + 'y' => ':count yaya', // less reliable + 'a_year' => ':count yaya', // less reliable + + 'month' => ':count nantu', // less reliable + 'm' => ':count nantu', // less reliable + 'a_month' => ':count nantu', // less reliable + + 'day' => ':count nayaim', // less reliable + 'd' => ':count nayaim', // less reliable + 'a_day' => ':count nayaim', // less reliable + + 'hour' => ':count kuwiš', // less reliable + 'h' => ':count kuwiš', // less reliable + 'a_hour' => ':count kuwiš', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ak.php b/libraries/Carbon/src/Carbon/Lang/ak.php new file mode 100644 index 00000000000..cf50e544717 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ak.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ak_GH.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ak_GH.php b/libraries/Carbon/src/Carbon/Lang/ak_GH.php new file mode 100644 index 00000000000..f266d8a2a08 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ak_GH.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY/MM/DD', + ], + 'months' => ['Sanda-Ɔpɛpɔn', 'Kwakwar-Ɔgyefuo', 'Ebɔw-Ɔbenem', 'Ebɔbira-Oforisuo', 'Esusow Aketseaba-Kɔtɔnimba', 'Obirade-Ayɛwohomumu', 'Ayɛwoho-Kitawonsa', 'Difuu-Ɔsandaa', 'Fankwa-Ɛbɔ', 'Ɔbɛsɛ-Ahinime', 'Ɔberɛfɛw-Obubuo', 'Mumu-Ɔpɛnimba'], + 'months_short' => ['S-Ɔ', 'K-Ɔ', 'E-Ɔ', 'E-O', 'E-K', 'O-A', 'A-K', 'D-Ɔ', 'F-Ɛ', 'Ɔ-A', 'Ɔ-O', 'M-Ɔ'], + 'weekdays' => ['Kwesida', 'Dwowda', 'Benada', 'Wukuda', 'Yawda', 'Fida', 'Memeneda'], + 'weekdays_short' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'], + 'weekdays_min' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['AN', 'EW'], + + 'year' => ':count afe', + 'y' => ':count afe', + 'a_year' => ':count afe', + + 'month' => ':count bosume', + 'm' => ':count bosume', + 'a_month' => ':count bosume', + + 'day' => ':count ɛda', + 'd' => ':count ɛda', + 'a_day' => ':count ɛda', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/am.php b/libraries/Carbon/src/Carbon/Lang/am.php new file mode 100644 index 00000000000..4366b6a1f2d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/am.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/am_ET.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/am_ET.php b/libraries/Carbon/src/Carbon/Lang/am_ET.php new file mode 100644 index 00000000000..ec469b37018 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/am_ET.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕሪል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክቶበር', 'ኖቬምበር', 'ዲሴምበር'], + 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], + 'weekdays' => ['እሑድ', 'ሰኞ', 'ማክሰኞ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], + 'weekdays_short' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], + 'weekdays_min' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ጡዋት', 'ከሰዓት'], + + 'year' => ':count አመት', + 'y' => ':count አመት', + 'a_year' => ':count አመት', + + 'month' => ':count ወር', + 'm' => ':count ወር', + 'a_month' => ':count ወር', + + 'week' => ':count ሳምንት', + 'w' => ':count ሳምንት', + 'a_week' => ':count ሳምንት', + + 'day' => ':count ቀን', + 'd' => ':count ቀን', + 'a_day' => ':count ቀን', + + 'hour' => ':count ሰዓት', + 'h' => ':count ሰዓት', + 'a_hour' => ':count ሰዓት', + + 'minute' => ':count ደቂቃ', + 'min' => ':count ደቂቃ', + 'a_minute' => ':count ደቂቃ', + + 'second' => ':count ሴኮንድ', + 's' => ':count ሴኮንድ', + 'a_second' => ':count ሴኮንድ', + + 'ago' => 'ከ:time በፊት', + 'from_now' => 'በ:time ውስጥ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/an.php b/libraries/Carbon/src/Carbon/Lang/an.php new file mode 100644 index 00000000000..96b39526b89 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/an.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/an_ES.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/an_ES.php b/libraries/Carbon/src/Carbon/Lang/an_ES.php new file mode 100644 index 00000000000..871cefc06e9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/an_ES.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Softaragones Jordi Mallach Pérez, Juan Pablo Martínez bug-glibc-locales@gnu.org, softaragones@softaragones.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['chinero', 'febrero', 'marzo', 'abril', 'mayo', 'chunyo', 'chuliol', 'agosto', 'setiembre', 'octubre', 'noviembre', 'aviento'], + 'months_short' => ['chi', 'feb', 'mar', 'abr', 'may', 'chn', 'chl', 'ago', 'set', 'oct', 'nov', 'avi'], + 'weekdays' => ['domingo', 'luns', 'martes', 'mierques', 'chueves', 'viernes', 'sabado'], + 'weekdays_short' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'], + 'weekdays_min' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count año', + 'y' => ':count año', + 'a_year' => ':count año', + + 'month' => ':count mes', + 'm' => ':count mes', + 'a_month' => ':count mes', + + 'week' => ':count semana', + 'w' => ':count semana', + 'a_week' => ':count semana', + + 'day' => ':count día', + 'd' => ':count día', + 'a_day' => ':count día', + + 'hour' => ':count reloch', // less reliable + 'h' => ':count reloch', // less reliable + 'a_hour' => ':count reloch', // less reliable + + 'minute' => ':count minuto', + 'min' => ':count minuto', + 'a_minute' => ':count minuto', + + 'second' => ':count segundo', + 's' => ':count segundo', + 'a_second' => ':count segundo', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/anp.php b/libraries/Carbon/src/Carbon/Lang/anp.php new file mode 100644 index 00000000000..d41526ee51e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/anp.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/anp_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/anp_IN.php b/libraries/Carbon/src/Carbon/Lang/anp_IN.php new file mode 100644 index 00000000000..ab6f70462d6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/anp_IN.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bhashaghar@googlegroups.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर"'], + 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर'], + 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'बृहस्पतिवार', 'शुक्रवार', 'शनिवार'], + 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], + 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar.php b/libraries/Carbon/src/Carbon/Lang/ar.php new file mode 100644 index 00000000000..666ec17aa8a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Atef Ben Ali (atefBB) + * - Ibrahim AshShohail + * - MLTDev + * - Mohamed Sabil (mohamedsabil83) + * - Yazan Alnugnugh (yazan-alnugnugh) + */ +$months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', +]; + +return [ + 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'ago' => 'منذ :time', + 'from_now' => ':time من الآن', + 'after' => 'بعد :time', + 'before' => 'قبل :time', + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم عند الساعة] LT', + 'nextDay' => '[غدًا عند الساعة] LT', + 'nextWeek' => 'dddd [عند الساعة] LT', + 'lastDay' => '[أمس عند الساعة] LT', + 'lastWeek' => 'dddd [عند الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_AE.php b/libraries/Carbon/src/Carbon/Lang/ar_AE.php new file mode 100644 index 00000000000..7cc6dfa9c7f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_AE.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت '], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_BH.php b/libraries/Carbon/src/Carbon/Lang/ar_BH.php new file mode 100644 index 00000000000..a71a56cc642 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_BH.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_DJ.php b/libraries/Carbon/src/Carbon/Lang/ar_DJ.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_DJ.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_DZ.php b/libraries/Carbon/src/Carbon/Lang/ar_DZ.php new file mode 100644 index 00000000000..6e2a2bcacdb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_DZ.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Authors: + * - Josh Soref + * - Noureddine LOUAHEDJ + * - JD Isaacks + * - Atef Ben Ali (atefBB) + * - Mohamed Sabil (mohamedsabil83) + */ +$months = [ + 'جانفي', + 'فيفري', + 'مارس', + 'أفريل', + 'ماي', + 'جوان', + 'جويلية', + 'أوت', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', +]; + +return [ + 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'ago' => 'منذ :time', + 'from_now' => 'في :time', + 'after' => 'بعد :time', + 'before' => 'قبل :time', + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['أح', 'إث', 'ثلا', 'أر', 'خم', 'جم', 'سب'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 4, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم على الساعة] LT', + 'nextDay' => '[غدا على الساعة] LT', + 'nextWeek' => 'dddd [على الساعة] LT', + 'lastDay' => '[أمس على الساعة] LT', + 'lastWeek' => 'dddd [على الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_EG.php b/libraries/Carbon/src/Carbon/Lang/ar_EG.php new file mode 100644 index 00000000000..a71a56cc642 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_EG.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_EH.php b/libraries/Carbon/src/Carbon/Lang/ar_EH.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_EH.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_ER.php b/libraries/Carbon/src/Carbon/Lang/ar_ER.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_ER.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_IL.php b/libraries/Carbon/src/Carbon/Lang/ar_IL.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_IL.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_IN.php b/libraries/Carbon/src/Carbon/Lang/ar_IN.php new file mode 100644 index 00000000000..879f2188f34 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_IN.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_IQ.php b/libraries/Carbon/src/Carbon/Lang/ar_IQ.php new file mode 100644 index 00000000000..959b45105a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_IQ.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_JO.php b/libraries/Carbon/src/Carbon/Lang/ar_JO.php new file mode 100644 index 00000000000..959b45105a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_JO.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_KM.php b/libraries/Carbon/src/Carbon/Lang/ar_KM.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_KM.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_KW.php b/libraries/Carbon/src/Carbon/Lang/ar_KW.php new file mode 100644 index 00000000000..1fcf027061f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_KW.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Authors: + * - Josh Soref + * - Nusret Parlak + * - JD Isaacks + * - Atef Ben Ali (atefBB) + * - Mohamed Sabil (mohamedsabil83) + * - Abdullah-Alhariri + */ +$months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'ماي', + 'يونيو', + 'يوليوز', + 'غشت', + 'شتنبر', + 'أكتوبر', + 'نونبر', + 'دجنبر', +]; + +return [ + 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'ago' => 'منذ :time', + 'from_now' => 'في :time', + 'after' => 'بعد :time', + 'before' => 'قبل :time', + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم على الساعة] LT', + 'nextDay' => '[غدا على الساعة] LT', + 'nextWeek' => 'dddd [على الساعة] LT', + 'lastDay' => '[أمس على الساعة] LT', + 'lastWeek' => 'dddd [على الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], + 'weekend' => [5, 6], + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_LB.php b/libraries/Carbon/src/Carbon/Lang/ar_LB.php new file mode 100644 index 00000000000..686ed87308e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_LB.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_LY.php b/libraries/Carbon/src/Carbon/Lang/ar_LY.php new file mode 100644 index 00000000000..be259c710b9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_LY.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Atef Ben Ali (atefBB) + * - Ibrahim AshShohail + * - MLTDev + */ + +$months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', +]; + +return [ + 'year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']), + 'a_year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']), + 'month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']), + 'a_month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']), + 'week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']), + 'a_week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']), + 'day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']), + 'a_day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']), + 'hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']), + 'a_hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']), + 'minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']), + 'a_minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']), + 'second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']), + 'a_second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']), + 'ago' => 'منذ :time', + 'from_now' => ':time من الآن', + 'after' => 'بعد :time', + 'before' => 'قبل :time', + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['مرة', 'مرة', ':count مرتين', ':count مرات', ':count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم عند الساعة] LT', + 'nextDay' => '[غدًا عند الساعة] LT', + 'nextWeek' => 'dddd [عند الساعة] LT', + 'lastDay' => '[أمس عند الساعة] LT', + 'lastWeek' => 'dddd [عند الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_MA.php b/libraries/Carbon/src/Carbon/Lang/ar_MA.php new file mode 100644 index 00000000000..0de70db60d0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_MA.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Authors: + * - Josh Soref + * - JD Isaacks + * - Atef Ben Ali (atefBB) + * - Mohamed Sabil (mohamedsabil83) + */ +$months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'ماي', + 'يونيو', + 'يوليوز', + 'غشت', + 'شتنبر', + 'أكتوبر', + 'نونبر', + 'دجنبر', +]; + +return [ + 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'ago' => 'منذ :time', + 'from_now' => 'في :time', + 'after' => 'بعد :time', + 'before' => 'قبل :time', + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم على الساعة] LT', + 'nextDay' => '[غدا على الساعة] LT', + 'nextWeek' => 'dddd [على الساعة] LT', + 'lastDay' => '[أمس على الساعة] LT', + 'lastWeek' => 'dddd [على الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_MR.php b/libraries/Carbon/src/Carbon/Lang/ar_MR.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_MR.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_OM.php b/libraries/Carbon/src/Carbon/Lang/ar_OM.php new file mode 100644 index 00000000000..a71a56cc642 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_OM.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_PS.php b/libraries/Carbon/src/Carbon/Lang/ar_PS.php new file mode 100644 index 00000000000..70f83f25fe8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_PS.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_QA.php b/libraries/Carbon/src/Carbon/Lang/ar_QA.php new file mode 100644 index 00000000000..a71a56cc642 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_QA.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_SA.php b/libraries/Carbon/src/Carbon/Lang/ar_SA.php new file mode 100644 index 00000000000..d53ee08ef50 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_SA.php @@ -0,0 +1,94 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Authors: + * - Josh Soref + * - JD Isaacks + * - Atef Ben Ali (atefBB) + * - Mohamed Sabil (mohamedsabil83) + * - Abdullah-Alhariri + */ +$months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', +]; + +return [ + 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'ago' => 'منذ :time', + 'from_now' => 'في :time', + 'after' => 'بعد :time', + 'before' => 'قبل :time', + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم على الساعة] LT', + 'nextDay' => '[غدا على الساعة] LT', + 'nextWeek' => 'dddd [على الساعة] LT', + 'lastDay' => '[أمس على الساعة] LT', + 'lastWeek' => 'dddd [على الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], + 'weekend' => [5, 6], + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_SD.php b/libraries/Carbon/src/Carbon/Lang/ar_SD.php new file mode 100644 index 00000000000..a71a56cc642 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_SD.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_SO.php b/libraries/Carbon/src/Carbon/Lang/ar_SO.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_SO.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_SS.php b/libraries/Carbon/src/Carbon/Lang/ar_SS.php new file mode 100644 index 00000000000..319d435b0ce --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_SS.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_SY.php b/libraries/Carbon/src/Carbon/Lang/ar_SY.php new file mode 100644 index 00000000000..959b45105a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_SY.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_Shakl.php b/libraries/Carbon/src/Carbon/Lang/ar_Shakl.php new file mode 100644 index 00000000000..fbb677785a8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_Shakl.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Abdellah Chadidi + * - Atef Ben Ali (atefBB) + * - Mohamed Sabil (mohamedsabil83) + */ +// Same for long and short +$months = [ + // @TODO add shakl to months + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', +]; + +return [ + 'year' => implode('|', ['{0}:count سَنَة', '{1}سَنَة', '{2}سَنَتَيْن', ']2,11[:count سَنَوَات', ']10,Inf[:count سَنَة']), + 'a_year' => implode('|', ['{0}:count سَنَة', '{1}سَنَة', '{2}سَنَتَيْن', ']2,11[:count سَنَوَات', ']10,Inf[:count سَنَة']), + 'month' => implode('|', ['{0}:count شَهْرَ', '{1}شَهْرَ', '{2}شَهْرَيْن', ']2,11[:count أَشْهُر', ']10,Inf[:count شَهْرَ']), + 'a_month' => implode('|', ['{0}:count شَهْرَ', '{1}شَهْرَ', '{2}شَهْرَيْن', ']2,11[:count أَشْهُر', ']10,Inf[:count شَهْرَ']), + 'week' => implode('|', ['{0}:count أُسْبُوع', '{1}أُسْبُوع', '{2}أُسْبُوعَيْن', ']2,11[:count أَسَابِيع', ']10,Inf[:count أُسْبُوع']), + 'a_week' => implode('|', ['{0}:count أُسْبُوع', '{1}أُسْبُوع', '{2}أُسْبُوعَيْن', ']2,11[:count أَسَابِيع', ']10,Inf[:count أُسْبُوع']), + 'day' => implode('|', ['{0}:count يَوْم', '{1}يَوْم', '{2}يَوْمَيْن', ']2,11[:count أَيَّام', ']10,Inf[:count يَوْم']), + 'a_day' => implode('|', ['{0}:count يَوْم', '{1}يَوْم', '{2}يَوْمَيْن', ']2,11[:count أَيَّام', ']10,Inf[:count يَوْم']), + 'hour' => implode('|', ['{0}:count سَاعَة', '{1}سَاعَة', '{2}سَاعَتَيْن', ']2,11[:count سَاعَات', ']10,Inf[:count سَاعَة']), + 'a_hour' => implode('|', ['{0}:count سَاعَة', '{1}سَاعَة', '{2}سَاعَتَيْن', ']2,11[:count سَاعَات', ']10,Inf[:count سَاعَة']), + 'minute' => implode('|', ['{0}:count دَقِيقَة', '{1}دَقِيقَة', '{2}دَقِيقَتَيْن', ']2,11[:count دَقَائِق', ']10,Inf[:count دَقِيقَة']), + 'a_minute' => implode('|', ['{0}:count دَقِيقَة', '{1}دَقِيقَة', '{2}دَقِيقَتَيْن', ']2,11[:count دَقَائِق', ']10,Inf[:count دَقِيقَة']), + 'second' => implode('|', ['{0}:count ثَانِيَة', '{1}ثَانِيَة', '{2}ثَانِيَتَيْن', ']2,11[:count ثَوَان', ']10,Inf[:count ثَانِيَة']), + 'a_second' => implode('|', ['{0}:count ثَانِيَة', '{1}ثَانِيَة', '{2}ثَانِيَتَيْن', ']2,11[:count ثَوَان', ']10,Inf[:count ثَانِيَة']), + 'ago' => 'مُنْذُ :time', + 'from_now' => 'مِنَ الْآن :time', + 'after' => 'بَعْدَ :time', + 'before' => 'قَبْلَ :time', + + // @TODO add shakl to translations below + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم عند الساعة] LT', + 'nextDay' => '[غدًا عند الساعة] LT', + 'nextWeek' => 'dddd [عند الساعة] LT', + 'lastDay' => '[أمس عند الساعة] LT', + 'lastWeek' => 'dddd [عند الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_TD.php b/libraries/Carbon/src/Carbon/Lang/ar_TD.php new file mode 100644 index 00000000000..c68652f96e1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_TD.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ar.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ar_TN.php b/libraries/Carbon/src/Carbon/Lang/ar_TN.php new file mode 100644 index 00000000000..f79725a4a60 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_TN.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Authors: + * - JD Isaacks + * - Atef Ben Ali (atefBB) + * - Mohamed Sabil (mohamedsabil83) + */ +$months = [ + 'جانفي', + 'فيفري', + 'مارس', + 'أفريل', + 'ماي', + 'جوان', + 'جويلية', + 'أوت', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', +]; + +return [ + 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), + 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), + 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), + 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), + 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), + 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), + 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), + 'ago' => 'منذ :time', + 'from_now' => 'في :time', + 'after' => 'بعد :time', + 'before' => 'قبل :time', + 'diff_now' => 'الآن', + 'diff_today' => 'اليوم', + 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_yesterday' => 'أمس', + 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_tomorrow' => 'غداً', + 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', + 'diff_before_yesterday' => 'قبل الأمس', + 'diff_after_tomorrow' => 'بعد غد', + 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), + 'period_interval' => 'كل :interval', + 'period_start_date' => 'من :date', + 'period_end_date' => 'إلى :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اليوم على الساعة] LT', + 'nextDay' => '[غدا على الساعة] LT', + 'nextWeek' => 'dddd [على الساعة] LT', + 'lastDay' => '[أمس على الساعة] LT', + 'lastWeek' => 'dddd [على الساعة] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ص', 'م'], + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ar_YE.php b/libraries/Carbon/src/Carbon/Lang/ar_YE.php new file mode 100644 index 00000000000..54bd6f07237 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ar_YE.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri + */ +return array_replace_recursive(require __DIR__.'/ar.php', [ + 'formats' => [ + 'L' => 'DD MMM, YYYY', + ], + 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], + 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], + 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/as.php b/libraries/Carbon/src/Carbon/Lang/as.php new file mode 100644 index 00000000000..1292245cfc7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/as.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/as_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/as_IN.php b/libraries/Carbon/src/Carbon/Lang/as_IN.php new file mode 100644 index 00000000000..97912992b8c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/as_IN.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Amitakhya Phukan, Red Hat bug-glibc@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D-MM-YYYY', + ], + 'months' => ['জানুৱাৰী', 'ফেব্ৰুৱাৰী', 'মাৰ্চ', 'এপ্ৰিল', 'মে', 'জুন', 'জুলাই', 'আগষ্ট', 'ছেপ্তেম্বৰ', 'অক্টোবৰ', 'নৱেম্বৰ', 'ডিচেম্বৰ'], + 'months_short' => ['জানু', 'ফেব্ৰু', 'মাৰ্চ', 'এপ্ৰিল', 'মে', 'জুন', 'জুলাই', 'আগ', 'সেপ্ট', 'অক্টো', 'নভে', 'ডিসে'], + 'weekdays' => ['দেওবাৰ', 'সোমবাৰ', 'মঙ্গলবাৰ', 'বুধবাৰ', 'বৃহষ্পতিবাৰ', 'শুক্ৰবাৰ', 'শনিবাৰ'], + 'weekdays_short' => ['দেও', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহষ্পতি', 'শুক্ৰ', 'শনি'], + 'weekdays_min' => ['দেও', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহষ্পতি', 'শুক্ৰ', 'শনি'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['পূৰ্ব্বাহ্ন', 'অপৰাহ্ন'], + + 'year' => ':count বছৰ', + 'y' => ':count বছৰ', + 'a_year' => ':count বছৰ', + + 'month' => ':count মাহ', + 'm' => ':count মাহ', + 'a_month' => ':count মাহ', + + 'week' => ':count সপ্তাহ', + 'w' => ':count সপ্তাহ', + 'a_week' => ':count সপ্তাহ', + + 'day' => ':count বাৰ', + 'd' => ':count বাৰ', + 'a_day' => ':count বাৰ', + + 'hour' => ':count ঘণ্টা', + 'h' => ':count ঘণ্টা', + 'a_hour' => ':count ঘণ্টা', + + 'minute' => ':count মিনিট', + 'min' => ':count মিনিট', + 'a_minute' => ':count মিনিট', + + 'second' => ':count দ্বিতীয়', + 's' => ':count দ্বিতীয়', + 'a_second' => ':count দ্বিতীয়', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/asa.php b/libraries/Carbon/src/Carbon/Lang/asa.php new file mode 100644 index 00000000000..c5e13137162 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/asa.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['icheheavo', 'ichamthi'], + 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Ijm', 'Jmo'], + 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Ijm', 'Jmo'], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Dec'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ast.php b/libraries/Carbon/src/Carbon/Lang/ast.php new file mode 100644 index 00000000000..b9828c69017 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ast.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Jordi Mallach jordi@gnu.org + * - Adolfo Jayme-Barrientos (fitojb) + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['de xineru', 'de febreru', 'de marzu', 'd’abril', 'de mayu', 'de xunu', 'de xunetu', 'd’agostu', 'de setiembre', 'd’ochobre', 'de payares', 'd’avientu'], + 'months_short' => ['xin', 'feb', 'mar', 'abr', 'may', 'xun', 'xnt', 'ago', 'set', 'och', 'pay', 'avi'], + 'weekdays' => ['domingu', 'llunes', 'martes', 'miércoles', 'xueves', 'vienres', 'sábadu'], + 'weekdays_short' => ['dom', 'llu', 'mar', 'mié', 'xue', 'vie', 'sáb'], + 'weekdays_min' => ['dom', 'llu', 'mar', 'mié', 'xue', 'vie', 'sáb'], + + 'year' => ':count añu|:count años', + 'y' => ':count añu|:count años', + 'a_year' => 'un añu|:count años', + + 'month' => ':count mes', + 'm' => ':count mes', + 'a_month' => 'un mes|:count mes', + + 'week' => ':count selmana|:count selmanes', + 'w' => ':count selmana|:count selmanes', + 'a_week' => 'una selmana|:count selmanes', + + 'day' => ':count día|:count díes', + 'd' => ':count día|:count díes', + 'a_day' => 'un día|:count díes', + + 'hour' => ':count hora|:count hores', + 'h' => ':count hora|:count hores', + 'a_hour' => 'una hora|:count hores', + + 'minute' => ':count minutu|:count minutos', + 'min' => ':count minutu|:count minutos', + 'a_minute' => 'un minutu|:count minutos', + + 'second' => ':count segundu|:count segundos', + 's' => ':count segundu|:count segundos', + 'a_second' => 'un segundu|:count segundos', + + 'ago' => 'hai :time', + 'from_now' => 'en :time', + 'after' => ':time dempués', + 'before' => ':time enantes', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ast_ES.php b/libraries/Carbon/src/Carbon/Lang/ast_ES.php new file mode 100644 index 00000000000..f3e82c368f2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ast_ES.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ast.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ayc.php b/libraries/Carbon/src/Carbon/Lang/ayc.php new file mode 100644 index 00000000000..24988f55a38 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ayc.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ayc_PE.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ayc_PE.php b/libraries/Carbon/src/Carbon/Lang/ayc_PE.php new file mode 100644 index 00000000000..87d9c4db21e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ayc_PE.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - runasimipi.org libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['inïru', 'phiwriru', 'marsu', 'awrila', 'mayu', 'junyu', 'julyu', 'awustu', 'sitimri', 'uktuwri', 'nuwimri', 'risimri'], + 'months_short' => ['ini', 'phi', 'mar', 'awr', 'may', 'jun', 'jul', 'awu', 'sit', 'ukt', 'nuw', 'ris'], + 'weekdays' => ['tuminku', 'lunisa', 'martisa', 'mirkulisa', 'juywisa', 'wirnisa', 'sawäru'], + 'weekdays_short' => ['tum', 'lun', 'mar', 'mir', 'juy', 'wir', 'saw'], + 'weekdays_min' => ['tum', 'lun', 'mar', 'mir', 'juy', 'wir', 'saw'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['VM', 'NM'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/az.php b/libraries/Carbon/src/Carbon/Lang/az.php new file mode 100644 index 00000000000..1be5b1fcf1f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/az.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - Kunal Marwaha + * - François B + * - JD Isaacks + * - Orxan + * - Şəhriyar İmanov + * - Baran Şengül + */ +return [ + 'year' => ':count il', + 'a_year' => '{1}bir il|]1,Inf[:count il', + 'y' => ':count il', + 'month' => ':count ay', + 'a_month' => '{1}bir ay|]1,Inf[:count ay', + 'm' => ':count ay', + 'week' => ':count həftə', + 'a_week' => '{1}bir həftə|]1,Inf[:count həftə', + 'w' => ':count h.', + 'day' => ':count gün', + 'a_day' => '{1}bir gün|]1,Inf[:count gün', + 'd' => ':count g.', + 'hour' => ':count saat', + 'a_hour' => '{1}bir saat|]1,Inf[:count saat', + 'h' => ':count saat', + 'minute' => ':count d.', + 'a_minute' => '{1}bir dəqiqə|]1,Inf[:count dəqiqə', + 'min' => ':count dəqiqə', + 'second' => ':count san.', + 'a_second' => '{1}birneçə saniyə|]1,Inf[:count saniyə', + 's' => ':count saniyə', + 'ago' => ':time əvvəl', + 'from_now' => ':time sonra', + 'after' => ':time sonra', + 'before' => ':time əvvəl', + 'diff_now' => 'indi', + 'diff_today' => 'bugün', + 'diff_today_regexp' => 'bugün(?:\\s+saat)?', + 'diff_yesterday' => 'dünən', + 'diff_tomorrow' => 'sabah', + 'diff_tomorrow_regexp' => 'sabah(?:\\s+saat)?', + 'diff_before_yesterday' => 'srağagün', + 'diff_after_tomorrow' => 'birisi gün', + 'period_recurrences' => ':count dəfədən bir', + 'period_interval' => 'hər :interval', + 'period_start_date' => ':date tarixindən başlayaraq', + 'period_end_date' => ':date tarixinədək', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[bugün saat] LT', + 'nextDay' => '[sabah saat] LT', + 'nextWeek' => '[gələn həftə] dddd [saat] LT', + 'lastDay' => '[dünən] LT', + 'lastWeek' => '[keçən həftə] dddd [saat] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + if ($number === 0) { // special case for zero + return "$number-ıncı"; + } + + static $suffixes = [ + 1 => '-inci', + 5 => '-inci', + 8 => '-inci', + 70 => '-inci', + 80 => '-inci', + 2 => '-nci', + 7 => '-nci', + 20 => '-nci', + 50 => '-nci', + 3 => '-üncü', + 4 => '-üncü', + 100 => '-üncü', + 6 => '-ncı', + 9 => '-uncu', + 10 => '-uncu', + 30 => '-uncu', + 60 => '-ıncı', + 90 => '-ıncı', + ]; + + $lastDigit = $number % 10; + + return $number.($suffixes[$lastDigit] ?? $suffixes[$number % 100 - $lastDigit] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); + }, + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'gecə'; + } + if ($hour < 12) { + return 'səhər'; + } + if ($hour < 17) { + return 'gündüz'; + } + + return 'axşam'; + }, + 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], + 'months_short' => ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'], + 'months_standalone' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr'], + 'weekdays' => ['bazar', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], + 'weekdays_short' => ['baz', 'bze', 'çax', 'çər', 'cax', 'cüm', 'şən'], + 'weekdays_min' => ['bz', 'be', 'ça', 'çə', 'ca', 'cü', 'şə'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' və '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/az_AZ.php b/libraries/Carbon/src/Carbon/Lang/az_AZ.php new file mode 100644 index 00000000000..f9fb4e05099 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/az_AZ.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Pablo Saratxaga pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/az.php', [ + 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], + 'weekdays' => ['bazar günü', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], + 'weekdays_short' => ['baz', 'ber', 'çax', 'çər', 'cax', 'cüm', 'şnb'], + 'weekdays_min' => ['baz', 'ber', 'çax', 'çər', 'cax', 'cüm', 'şnb'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/az_Cyrl.php b/libraries/Carbon/src/Carbon/Lang/az_Cyrl.php new file mode 100644 index 00000000000..ae908e11afe --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/az_Cyrl.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/az.php', [ + 'weekdays' => ['базар', 'базар ертәси', 'чәршәнбә ахшамы', 'чәршәнбә', 'ҹүмә ахшамы', 'ҹүмә', 'шәнбә'], + 'weekdays_short' => ['Б.', 'Б.Е.', 'Ч.А.', 'Ч.', 'Ҹ.А.', 'Ҹ.', 'Ш.'], + 'weekdays_min' => ['Б.', 'Б.Е.', 'Ч.А.', 'Ч.', 'Ҹ.А.', 'Ҹ.', 'Ш.'], + 'months' => ['јанвар', 'феврал', 'март', 'апрел', 'май', 'ијун', 'ијул', 'август', 'сентјабр', 'октјабр', 'нојабр', 'декабр'], + 'months_short' => ['јан', 'фев', 'мар', 'апр', 'май', 'ијн', 'ијл', 'авг', 'сен', 'окт', 'ној', 'дек'], + 'months_standalone' => ['Јанвар', 'Феврал', 'Март', 'Апрел', 'Май', 'Ијун', 'Ијул', 'Август', 'Сентјабр', 'Октјабр', 'Нојабр', 'Декабр'], + 'meridiem' => ['а', 'п'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/az_IR.php b/libraries/Carbon/src/Carbon/Lang/az_IR.php new file mode 100644 index 00000000000..9248e752f73 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/az_IR.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Mousa Moradi mousamk@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'OY/OM/OD', + ], + 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مئی', 'ژوئن', 'جولای', 'آقۇست', 'سپتامبر', 'اوْکتوْبر', 'نوْوامبر', 'دسامبر'], + 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مئی', 'ژوئن', 'جولای', 'آقۇست', 'سپتامبر', 'اوْکتوْبر', 'نوْوامبر', 'دسامبر'], + 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], + 'weekdays_short' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], + 'weekdays_min' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], + 'first_day_of_week' => 6, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰۴', '۰۵', '۰۶', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱۴', '۱۵', '۱۶', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲۴', '۲۵', '۲۶', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳۴', '۳۵', '۳۶', '۳۷', '۳۸', '۳۹', '۴۰', '۴۱', '۴۲', '۴۳', '۴۴', '۴۵', '۴۶', '۴۷', '۴۸', '۴۹', '۵۰', '۵۱', '۵۲', '۵۳', '۵۴', '۵۵', '۵۶', '۵۷', '۵۸', '۵۹', '۶۰', '۶۱', '۶۲', '۶۳', '۶۴', '۶۵', '۶۶', '۶۷', '۶۸', '۶۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷۴', '۷۵', '۷۶', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸۴', '۸۵', '۸۶', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹۴', '۹۵', '۹۶', '۹۷', '۹۸', '۹۹'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/az_Latn.php b/libraries/Carbon/src/Carbon/Lang/az_Latn.php new file mode 100644 index 00000000000..ace539b84b7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/az_Latn.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/az.php', [ + 'meridiem' => ['a', 'p'], + 'weekdays' => ['bazar', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], + 'weekdays_short' => ['B.', 'B.E.', 'Ç.A.', 'Ç.', 'C.A.', 'C.', 'Ş.'], + 'weekdays_min' => ['B.', 'B.E.', 'Ç.A.', 'Ç.', 'C.A.', 'C.', 'Ş.'], + 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], + 'months_short' => ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'], + 'months_standalone' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'D MMMM YYYY, dddd HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bas.php b/libraries/Carbon/src/Carbon/Lang/bas.php new file mode 100644 index 00000000000..0516cfa3398 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bas.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['I bikɛ̂glà', 'I ɓugajɔp'], + 'weekdays' => ['ŋgwà nɔ̂y', 'ŋgwà njaŋgumba', 'ŋgwà ûm', 'ŋgwà ŋgê', 'ŋgwà mbɔk', 'ŋgwà kɔɔ', 'ŋgwà jôn'], + 'weekdays_short' => ['nɔy', 'nja', 'uum', 'ŋge', 'mbɔ', 'kɔɔ', 'jon'], + 'weekdays_min' => ['nɔy', 'nja', 'uum', 'ŋge', 'mbɔ', 'kɔɔ', 'jon'], + 'months' => ['Kɔndɔŋ', 'Màcɛ̂l', 'Màtùmb', 'Màtop', 'M̀puyɛ', 'Hìlòndɛ̀', 'Njèbà', 'Hìkaŋ', 'Dìpɔ̀s', 'Bìòôm', 'Màyɛsèp', 'Lìbuy li ńyèe'], + 'months_short' => ['kɔn', 'mac', 'mat', 'mto', 'mpu', 'hil', 'nje', 'hik', 'dip', 'bio', 'may', 'liɓ'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'second' => ':count móndî', // less reliable + 's' => ':count móndî', // less reliable + 'a_second' => ':count móndî', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/be.php b/libraries/Carbon/src/Carbon/Lang/be.php new file mode 100644 index 00000000000..1a91b0111d7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/be.php @@ -0,0 +1,172 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + }, 'be'); +} +// @codeCoverageIgnoreEnd + +/* + * Authors: + * - Josh Soref + * - SobakaSlava + * - François B + * - Serhan Apaydın + * - JD Isaacks + * - AbadonnaAbbys + * - Siomkin Alexander + */ +return [ + 'year' => ':count год|:count гады|:count гадоў', + 'a_year' => '{1}год|:count год|:count гады|:count гадоў', + 'y' => ':count год|:count гады|:count гадоў', + 'month' => ':count месяц|:count месяцы|:count месяцаў', + 'a_month' => '{1}месяц|:count месяц|:count месяцы|:count месяцаў', + 'm' => ':count месяц|:count месяцы|:count месяцаў', + 'week' => ':count тыдзень|:count тыдні|:count тыдняў', + 'a_week' => '{1}тыдзень|:count тыдзень|:count тыдні|:count тыдняў', + 'w' => ':count тыдзень|:count тыдні|:count тыдняў', + 'day' => ':count дзень|:count дні|:count дзён', + 'a_day' => '{1}дзень|:count дзень|:count дні|:count дзён', + 'd' => ':count дн', + 'hour' => ':count гадзіну|:count гадзіны|:count гадзін', + 'a_hour' => '{1}гадзіна|:count гадзіна|:count гадзіны|:count гадзін', + 'h' => ':count гадзіна|:count гадзіны|:count гадзін', + 'minute' => ':count хвіліна|:count хвіліны|:count хвілін', + 'a_minute' => '{1}хвіліна|:count хвіліна|:count хвіліны|:count хвілін', + 'min' => ':count хв', + 'second' => ':count секунда|:count секунды|:count секунд', + 'a_second' => '{1}некалькі секунд|:count секунда|:count секунды|:count секунд', + 's' => ':count сек', + + 'hour_ago' => ':count гадзіну|:count гадзіны|:count гадзін', + 'a_hour_ago' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', + 'h_ago' => ':count гадзіну|:count гадзіны|:count гадзін', + 'minute_ago' => ':count хвіліну|:count хвіліны|:count хвілін', + 'a_minute_ago' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', + 'min_ago' => ':count хвіліну|:count хвіліны|:count хвілін', + 'second_ago' => ':count секунду|:count секунды|:count секунд', + 'a_second_ago' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', + 's_ago' => ':count секунду|:count секунды|:count секунд', + + 'hour_from_now' => ':count гадзіну|:count гадзіны|:count гадзін', + 'a_hour_from_now' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', + 'h_from_now' => ':count гадзіну|:count гадзіны|:count гадзін', + 'minute_from_now' => ':count хвіліну|:count хвіліны|:count хвілін', + 'a_minute_from_now' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', + 'min_from_now' => ':count хвіліну|:count хвіліны|:count хвілін', + 'second_from_now' => ':count секунду|:count секунды|:count секунд', + 'a_second_from_now' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', + 's_from_now' => ':count секунду|:count секунды|:count секунд', + + 'hour_after' => ':count гадзіну|:count гадзіны|:count гадзін', + 'a_hour_after' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', + 'h_after' => ':count гадзіну|:count гадзіны|:count гадзін', + 'minute_after' => ':count хвіліну|:count хвіліны|:count хвілін', + 'a_minute_after' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', + 'min_after' => ':count хвіліну|:count хвіліны|:count хвілін', + 'second_after' => ':count секунду|:count секунды|:count секунд', + 'a_second_after' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', + 's_after' => ':count секунду|:count секунды|:count секунд', + + 'hour_before' => ':count гадзіну|:count гадзіны|:count гадзін', + 'a_hour_before' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', + 'h_before' => ':count гадзіну|:count гадзіны|:count гадзін', + 'minute_before' => ':count хвіліну|:count хвіліны|:count хвілін', + 'a_minute_before' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', + 'min_before' => ':count хвіліну|:count хвіліны|:count хвілін', + 'second_before' => ':count секунду|:count секунды|:count секунд', + 'a_second_before' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', + 's_before' => ':count секунду|:count секунды|:count секунд', + + 'ago' => ':time таму', + 'from_now' => 'праз :time', + 'after' => ':time пасля', + 'before' => ':time да', + 'diff_now' => 'цяпер', + 'diff_today' => 'Сёння', + 'diff_today_regexp' => 'Сёння(?:\\s+ў)?', + 'diff_yesterday' => 'учора', + 'diff_yesterday_regexp' => 'Учора(?:\\s+ў)?', + 'diff_tomorrow' => 'заўтра', + 'diff_tomorrow_regexp' => 'Заўтра(?:\\s+ў)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY г.', + 'LLL' => 'D MMMM YYYY г., HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY г., HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Сёння ў] LT', + 'nextDay' => '[Заўтра ў] LT', + 'nextWeek' => '[У] dddd [ў] LT', + 'lastDay' => '[Учора ў] LT', + 'lastWeek' => function (CarbonInterface $current) { + switch ($current->dayOfWeek) { + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + default: + return '[У мінулую] dddd [ў] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return ($number % 10 === 2 || $number % 10 === 3) && ($number % 100 !== 12 && $number % 100 !== 13) ? $number.'-і' : $number.'-ы'; + case 'D': + return $number.'-га'; + default: + return $number; + } + }, + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'ночы'; + } + if ($hour < 12) { + return 'раніцы'; + } + if ($hour < 17) { + return 'дня'; + } + + return 'вечара'; + }, + 'months' => ['студзеня', 'лютага', 'сакавіка', 'красавіка', 'траўня', 'чэрвеня', 'ліпеня', 'жніўня', 'верасня', 'кастрычніка', 'лістапада', 'снежня'], + 'months_standalone' => ['студзень', 'люты', 'сакавік', 'красавік', 'травень', 'чэрвень', 'ліпень', 'жнівень', 'верасень', 'кастрычнік', 'лістапад', 'снежань'], + 'months_short' => ['студ', 'лют', 'сак', 'крас', 'трав', 'чэрв', 'ліп', 'жнів', 'вер', 'каст', 'ліст', 'снеж'], + 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => ['нядзелю', 'панядзелак', 'аўторак', 'сераду', 'чацвер', 'пятніцу', 'суботу'], + 'weekdays_standalone' => ['нядзеля', 'панядзелак', 'аўторак', 'серада', 'чацвер', 'пятніца', 'субота'], + 'weekdays_short' => ['нд', 'пн', 'ат', 'ср', 'чц', 'пт', 'сб'], + 'weekdays_min' => ['нд', 'пн', 'ат', 'ср', 'чц', 'пт', 'сб'], + 'weekdays_regexp' => '/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' і '], + 'months_short_standalone' => ['сту', 'лют', 'сак', 'кра', 'май', 'чэр', 'ліп', 'жні', 'вер', 'кас', 'ліс', 'сне'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/be_BY.php b/libraries/Carbon/src/Carbon/Lang/be_BY.php new file mode 100644 index 00000000000..9bab0f66fb7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/be_BY.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/be.php', [ + 'months' => ['студзеня', 'лютага', 'сакавіка', 'красавіка', 'мая', 'чэрвеня', 'ліпеня', 'жніўня', 'верасня', 'кастрычніка', 'лістапада', 'снежня'], + 'months_short' => ['сту', 'лют', 'сак', 'кра', 'мая', 'чэр', 'ліп', 'жні', 'вер', 'кас', 'ліс', 'сне'], + 'weekdays' => ['Нядзеля', 'Панядзелак', 'Аўторак', 'Серада', 'Чацвер', 'Пятніца', 'Субота'], + 'weekdays_short' => ['Няд', 'Пан', 'Аўт', 'Срд', 'Чцв', 'Пят', 'Суб'], + 'weekdays_min' => ['Няд', 'Пан', 'Аўт', 'Срд', 'Чцв', 'Пят', 'Суб'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/be_BY@latin.php b/libraries/Carbon/src/Carbon/Lang/be_BY@latin.php new file mode 100644 index 00000000000..54035031f35 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/be_BY@latin.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['studzienia', 'lutaha', 'sakavika', 'krasavika', 'maja', 'červienia', 'lipienia', 'žniŭnia', 'vieraśnia', 'kastryčnika', 'listapada', 'śniežnia'], + 'months_short' => ['Stu', 'Lut', 'Sak', 'Kra', 'Maj', 'Čer', 'Lip', 'Žni', 'Vie', 'Kas', 'Lis', 'Śni'], + 'weekdays' => ['Niadziela', 'Paniadziełak', 'Aŭtorak', 'Sierada', 'Čaćvier', 'Piatnica', 'Subota'], + 'weekdays_short' => ['Nia', 'Pan', 'Aŭt', 'Sie', 'Čać', 'Pia', 'Sub'], + 'weekdays_min' => ['Nia', 'Pan', 'Aŭt', 'Sie', 'Čać', 'Pia', 'Sub'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bem.php b/libraries/Carbon/src/Carbon/Lang/bem.php new file mode 100644 index 00000000000..0cb551a2e37 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bem.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/bem_ZM.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/bem_ZM.php b/libraries/Carbon/src/Carbon/Lang/bem_ZM.php new file mode 100644 index 00000000000..11a59085ed3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bem_ZM.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - ANLoc Martin Benjamin locales@africanlocalization.net + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'MM/DD/YYYY', + ], + 'months' => ['Januari', 'Februari', 'Machi', 'Epreo', 'Mei', 'Juni', 'Julai', 'Ogasti', 'Septemba', 'Oktoba', 'Novemba', 'Disemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Epr', 'Mei', 'Jun', 'Jul', 'Oga', 'Sep', 'Okt', 'Nov', 'Dis'], + 'weekdays' => ['Pa Mulungu', 'Palichimo', 'Palichibuli', 'Palichitatu', 'Palichine', 'Palichisano', 'Pachibelushi'], + 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + 'weekdays_min' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['uluchelo', 'akasuba'], + + 'year' => 'myaka :count', + 'y' => 'myaka :count', + 'a_year' => 'myaka :count', + + 'month' => 'myeshi :count', + 'm' => 'myeshi :count', + 'a_month' => 'myeshi :count', + + 'week' => 'umulungu :count', + 'w' => 'umulungu :count', + 'a_week' => 'umulungu :count', + + 'day' => 'inshiku :count', + 'd' => 'inshiku :count', + 'a_day' => 'inshiku :count', + + 'hour' => 'awala :count', + 'h' => 'awala :count', + 'a_hour' => 'awala :count', + + 'minute' => 'miniti :count', + 'min' => 'miniti :count', + 'a_minute' => 'miniti :count', + + 'second' => 'sekondi :count', + 's' => 'sekondi :count', + 'a_second' => 'sekondi :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ber.php b/libraries/Carbon/src/Carbon/Lang/ber.php new file mode 100644 index 00000000000..c16083e2990 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ber.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ber_DZ.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ber_DZ.php b/libraries/Carbon/src/Carbon/Lang/ber_DZ.php new file mode 100644 index 00000000000..b604689f8d5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ber_DZ.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Pablo Saratxaga pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], + 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], + 'weekdays' => ['bazar günü', 'birinci gün', 'ikinci gün', 'üçüncü gün', 'dördüncü gün', 'beşinci gün', 'altıncı gün'], + 'weekdays_short' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], + 'weekdays_min' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ber_MA.php b/libraries/Carbon/src/Carbon/Lang/ber_MA.php new file mode 100644 index 00000000000..b604689f8d5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ber_MA.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Pablo Saratxaga pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], + 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], + 'weekdays' => ['bazar günü', 'birinci gün', 'ikinci gün', 'üçüncü gün', 'dördüncü gün', 'beşinci gün', 'altıncı gün'], + 'weekdays_short' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], + 'weekdays_min' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bez.php b/libraries/Carbon/src/Carbon/Lang/bez.php new file mode 100644 index 00000000000..322f7e928f4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bez.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['pamilau', 'pamunyi'], + 'weekdays' => ['pa mulungu', 'pa shahuviluha', 'pa hivili', 'pa hidatu', 'pa hitayi', 'pa hihanu', 'pa shahulembela'], + 'weekdays_short' => ['Mul', 'Vil', 'Hiv', 'Hid', 'Hit', 'Hih', 'Lem'], + 'weekdays_min' => ['Mul', 'Vil', 'Hiv', 'Hid', 'Hit', 'Hih', 'Lem'], + 'months' => ['pa mwedzi gwa hutala', 'pa mwedzi gwa wuvili', 'pa mwedzi gwa wudatu', 'pa mwedzi gwa wutai', 'pa mwedzi gwa wuhanu', 'pa mwedzi gwa sita', 'pa mwedzi gwa saba', 'pa mwedzi gwa nane', 'pa mwedzi gwa tisa', 'pa mwedzi gwa kumi', 'pa mwedzi gwa kumi na moja', 'pa mwedzi gwa kumi na mbili'], + 'months_short' => ['Hut', 'Vil', 'Dat', 'Tai', 'Han', 'Sit', 'Sab', 'Nan', 'Tis', 'Kum', 'Kmj', 'Kmb'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bg.php b/libraries/Carbon/src/Carbon/Lang/bg.php new file mode 100644 index 00000000000..3685b9a8ae8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bg.php @@ -0,0 +1,114 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - Serhan Apaydın + * - JD Isaacks + * - Glavić + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count година|:count години', + 'a_year' => 'година|:count години', + 'y' => ':count година|:count години', + 'month' => ':count месец|:count месеца', + 'a_month' => 'месец|:count месеца', + 'm' => ':count месец|:count месеца', + 'week' => ':count седмица|:count седмици', + 'a_week' => 'седмица|:count седмици', + 'w' => ':count седмица|:count седмици', + 'day' => ':count ден|:count дни', + 'a_day' => 'ден|:count дни', + 'd' => ':count ден|:count дни', + 'hour' => ':count час|:count часа', + 'a_hour' => 'час|:count часа', + 'h' => ':count час|:count часа', + 'minute' => ':count минута|:count минути', + 'a_minute' => 'минута|:count минути', + 'min' => ':count минута|:count минути', + 'second' => ':count секунда|:count секунди', + 'a_second' => 'няколко секунди|:count секунди', + 's' => ':count секунда|:count секунди', + 'ago' => 'преди :time', + 'from_now' => 'след :time', + 'after' => 'след :time', + 'before' => 'преди :time', + 'diff_now' => 'сега', + 'diff_today' => 'Днес', + 'diff_today_regexp' => 'Днес(?:\\s+в)?', + 'diff_yesterday' => 'вчера', + 'diff_yesterday_regexp' => 'Вчера(?:\\s+в)?', + 'diff_tomorrow' => 'утре', + 'diff_tomorrow_regexp' => 'Утре(?:\\s+в)?', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'D.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY H:mm', + 'LLLL' => 'dddd, D MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[Днес в] LT', + 'nextDay' => '[Утре в] LT', + 'nextWeek' => 'dddd [в] LT', + 'lastDay' => '[Вчера в] LT', + 'lastWeek' => function (CarbonInterface $current) { + switch ($current->dayOfWeek) { + case 0: + case 3: + case 6: + return '[В изминалата] dddd [в] LT'; + default: + return '[В изминалия] dddd [в] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + $lastDigit = $number % 10; + $last2Digits = $number % 100; + if ($number === 0) { + return "$number-ев"; + } + if ($last2Digits === 0) { + return "$number-ен"; + } + if ($last2Digits > 10 && $last2Digits < 20) { + return "$number-ти"; + } + if ($lastDigit === 1) { + return "$number-ви"; + } + if ($lastDigit === 2) { + return "$number-ри"; + } + if ($lastDigit === 7 || $lastDigit === 8) { + return "$number-ми"; + } + + return "$number-ти"; + }, + 'months' => ['януари', 'февруари', 'март', 'април', 'май', 'юни', 'юли', 'август', 'септември', 'октомври', 'ноември', 'декември'], + 'months_short' => ['яну', 'фев', 'мар', 'апр', 'май', 'юни', 'юли', 'авг', 'сеп', 'окт', 'ное', 'дек'], + 'weekdays' => ['неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота'], + 'weekdays_short' => ['нед', 'пон', 'вто', 'сря', 'чет', 'пет', 'съб'], + 'weekdays_min' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' и '], + 'meridiem' => ['преди обяд', 'следобед'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/bg_BG.php b/libraries/Carbon/src/Carbon/Lang/bg_BG.php new file mode 100644 index 00000000000..cb4ff6b8fea --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bg_BG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/bg.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/bhb.php b/libraries/Carbon/src/Carbon/Lang/bhb.php new file mode 100644 index 00000000000..e481b8f022e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bhb.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/bhb_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/bhb_IN.php b/libraries/Carbon/src/Carbon/Lang/bhb_IN.php new file mode 100644 index 00000000000..e00a1599d7c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bhb_IN.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Samsung Electronics Co., Ltd. alexey.merzlyakov@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + 'weekdays' => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + 'weekdays_min' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bho.php b/libraries/Carbon/src/Carbon/Lang/bho.php new file mode 100644 index 00000000000..fb691b16aa5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bho.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/bho_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/bho_IN.php b/libraries/Carbon/src/Carbon/Lang/bho_IN.php new file mode 100644 index 00000000000..e2de872f83f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bho_IN.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bhashaghar@googlegroups.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर"'], + 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर"'], + 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'], + 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], + 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], + + 'hour' => ':count मौसम', + 'h' => ':count मौसम', + 'a_hour' => ':count मौसम', + + 'minute' => ':count कला', + 'min' => ':count कला', + 'a_minute' => ':count कला', + + 'second' => ':count सोमार', + 's' => ':count सोमार', + 'a_second' => ':count सोमार', + + 'year' => ':count साल', + 'y' => ':count साल', + 'a_year' => ':count साल', + + 'month' => ':count महिना', + 'm' => ':count महिना', + 'a_month' => ':count महिना', + + 'week' => ':count सप्ताह', + 'w' => ':count सप्ताह', + 'a_week' => ':count सप्ताह', + + 'day' => ':count दिन', + 'd' => ':count दिन', + 'a_day' => ':count दिन', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bi.php b/libraries/Carbon/src/Carbon/Lang/bi.php new file mode 100644 index 00000000000..82633ba1c9f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bi.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/bi_VU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/bi_VU.php b/libraries/Carbon/src/Carbon/Lang/bi_VU.php new file mode 100644 index 00000000000..3d3b23a04f3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bi_VU.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com & maninder1.s@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'dddd DD MMM YYYY', + ], + 'months' => ['jenuware', 'febwari', 'maj', 'epril', 'mei', 'jun', 'julae', 'ogis', 'septemba', 'oktoba', 'novemba', 'disemba'], + 'months_short' => ['jen', 'feb', 'maj', 'epr', 'mei', 'jun', 'jul', 'ogi', 'sep', 'okt', 'nov', 'dis'], + 'weekdays' => ['sande', 'mande', 'maj', 'wota', 'fraede', 'sarede'], + 'weekdays_short' => ['san', 'man', 'maj', 'wot', 'fra', 'sar'], + 'weekdays_min' => ['san', 'man', 'maj', 'wot', 'fra', 'sar'], + + 'year' => ':count seven', // less reliable + 'y' => ':count seven', // less reliable + 'a_year' => ':count seven', // less reliable + + 'month' => ':count mi', // less reliable + 'm' => ':count mi', // less reliable + 'a_month' => ':count mi', // less reliable + + 'week' => ':count sarede', // less reliable + 'w' => ':count sarede', // less reliable + 'a_week' => ':count sarede', // less reliable + + 'day' => ':count betde', // less reliable + 'd' => ':count betde', // less reliable + 'a_day' => ':count betde', // less reliable + + 'hour' => ':count klok', // less reliable + 'h' => ':count klok', // less reliable + 'a_hour' => ':count klok', // less reliable + + 'minute' => ':count smol', // less reliable + 'min' => ':count smol', // less reliable + 'a_minute' => ':count smol', // less reliable + + 'second' => ':count tu', // less reliable + 's' => ':count tu', // less reliable + 'a_second' => ':count tu', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bm.php b/libraries/Carbon/src/Carbon/Lang/bm.php new file mode 100644 index 00000000000..9135ebe5c1e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bm.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Estelle Comment + */ +return [ + 'year' => 'san :count', + 'a_year' => '{1}san kelen|san :count', + 'y' => 'san :count', + 'month' => 'kalo :count', + 'a_month' => '{1}kalo kelen|kalo :count', + 'm' => 'k. :count', + 'week' => 'dɔgɔkun :count', + 'a_week' => 'dɔgɔkun kelen', + 'w' => 'd. :count', + 'day' => 'tile :count', + 'd' => 't. :count', + 'a_day' => '{1}tile kelen|tile :count', + 'hour' => 'lɛrɛ :count', + 'a_hour' => '{1}lɛrɛ kelen|lɛrɛ :count', + 'h' => 'l. :count', + 'minute' => 'miniti :count', + 'a_minute' => '{1}miniti kelen|miniti :count', + 'min' => 'm. :count', + 'second' => 'sekondi :count', + 'a_second' => '{1}sanga dama dama|sekondi :count', + 's' => 'sek. :count', + 'ago' => 'a bɛ :time bɔ', + 'from_now' => ':time kɔnɔ', + 'diff_today' => 'Bi', + 'diff_yesterday' => 'Kunu', + 'diff_yesterday_regexp' => 'Kunu(?:\\s+lɛrɛ)?', + 'diff_tomorrow' => 'Sini', + 'diff_tomorrow_regexp' => 'Sini(?:\\s+lɛrɛ)?', + 'diff_today_regexp' => 'Bi(?:\\s+lɛrɛ)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'MMMM [tile] D [san] YYYY', + 'LLL' => 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + 'LLLL' => 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Bi lɛrɛ] LT', + 'nextDay' => '[Sini lɛrɛ] LT', + 'nextWeek' => 'dddd [don lɛrɛ] LT', + 'lastDay' => '[Kunu lɛrɛ] LT', + 'lastWeek' => 'dddd [tɛmɛnen lɛrɛ] LT', + 'sameElse' => 'L', + ], + 'months' => ['Zanwuyekalo', 'Fewuruyekalo', 'Marisikalo', 'Awirilikalo', 'Mɛkalo', 'Zuwɛnkalo', 'Zuluyekalo', 'Utikalo', 'Sɛtanburukalo', 'ɔkutɔburukalo', 'Nowanburukalo', 'Desanburukalo'], + 'months_short' => ['Zan', 'Few', 'Mar', 'Awi', 'Mɛ', 'Zuw', 'Zul', 'Uti', 'Sɛt', 'ɔku', 'Now', 'Des'], + 'weekdays' => ['Kari', 'Ntɛnɛn', 'Tarata', 'Araba', 'Alamisa', 'Juma', 'Sibiri'], + 'weekdays_short' => ['Kar', 'Ntɛ', 'Tar', 'Ara', 'Ala', 'Jum', 'Sib'], + 'weekdays_min' => ['Ka', 'Nt', 'Ta', 'Ar', 'Al', 'Ju', 'Si'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' ni '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/bn.php b/libraries/Carbon/src/Carbon/Lang/bn.php new file mode 100644 index 00000000000..1157aab44c0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bn.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - Shakib Hossain + * - Raju + * - Aniruddha Adhikary + * - JD Isaacks + * - Saiful Islam + * - Faisal Islam + */ +return [ + 'year' => ':count বছর', + 'a_year' => 'এক বছর|:count বছর', + 'y' => '১ বছর|:count বছর', + 'month' => ':count মাস', + 'a_month' => 'এক মাস|:count মাস', + 'm' => '১ মাস|:count মাস', + 'week' => ':count সপ্তাহ', + 'a_week' => '১ সপ্তাহ|:count সপ্তাহ', + 'w' => '১ সপ্তাহ|:count সপ্তাহ', + 'day' => ':count দিন', + 'a_day' => 'এক দিন|:count দিন', + 'd' => '১ দিন|:count দিন', + 'hour' => ':count ঘন্টা', + 'a_hour' => 'এক ঘন্টা|:count ঘন্টা', + 'h' => '১ ঘন্টা|:count ঘন্টা', + 'minute' => ':count মিনিট', + 'a_minute' => 'এক মিনিট|:count মিনিট', + 'min' => '১ মিনিট|:count মিনিট', + 'second' => ':count সেকেন্ড', + 'a_second' => 'কয়েক সেকেন্ড|:count সেকেন্ড', + 's' => '১ সেকেন্ড|:count সেকেন্ড', + 'ago' => ':time আগে', + 'from_now' => ':time পরে', + 'after' => ':time পরে', + 'before' => ':time আগে', + 'diff_now' => 'এখন', + 'diff_today' => 'আজ', + 'diff_yesterday' => 'গতকাল', + 'diff_tomorrow' => 'আগামীকাল', + 'period_recurrences' => ':count বার|:count বার', + 'period_interval' => 'প্রতি :interval', + 'period_start_date' => ':date থেকে', + 'period_end_date' => ':date পর্যন্ত', + 'formats' => [ + 'LT' => 'A Oh:Om সময়', + 'LTS' => 'A Oh:Om:Os সময়', + 'L' => 'OD/OM/OY', + 'LL' => 'OD MMMM OY', + 'LLL' => 'OD MMMM OY, A Oh:Om সময়', + 'LLLL' => 'dddd, OD MMMM OY, A Oh:Om সময়', + ], + 'calendar' => [ + 'sameDay' => '[আজ] LT', + 'nextDay' => '[আগামীকাল] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[গতকাল] LT', + 'lastWeek' => '[গত] dddd, LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'রাত'; + } + if ($hour < 10) { + return 'সকাল'; + } + if ($hour < 17) { + return 'দুপুর'; + } + if ($hour < 20) { + return 'বিকাল'; + } + + return 'রাত'; + }, + 'months' => ['জানুয়ারী', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], + 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্র', 'মে', 'জুন', 'জুল', 'আগ', 'সেপ্ট', 'অক্টো', 'নভে', 'ডিসে'], + 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], + 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], + 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গ', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], + 'list' => [', ', ' এবং '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'weekdays_standalone' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহষ্পতিবার', 'শুক্রবার', 'শনিবার'], + 'weekdays_min_standalone' => ['রঃ', 'সোঃ', 'মঃ', 'বুঃ', 'বৃঃ', 'শুঃ', 'শনি'], + 'months_short_standalone' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], + 'alt_numbers' => ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/bn_BD.php b/libraries/Carbon/src/Carbon/Lang/bn_BD.php new file mode 100644 index 00000000000..360ddfdaaff --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bn_BD.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ankur Group, Taneem Ahmed, Jamil Ahmed + */ +return array_replace_recursive(require __DIR__.'/bn.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], + 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], + 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], + 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], + 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], + 'first_day_of_week' => 5, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bn_IN.php b/libraries/Carbon/src/Carbon/Lang/bn_IN.php new file mode 100644 index 00000000000..2d5e9b42d81 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bn_IN.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/bn.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], + 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], + 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], + 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], + 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bo.php b/libraries/Carbon/src/Carbon/Lang/bo.php new file mode 100644 index 00000000000..4a95970e5d3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bo.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - JD Isaacks + */ +return [ + 'year' => '{1}ལོ་གཅིག|]1,Inf[:count ལོ', + 'month' => '{1}ཟླ་བ་གཅིག|]1,Inf[:count ཟླ་བ', + 'week' => ':count བདུན་ཕྲག', + 'day' => '{1}ཉིན་གཅིག|]1,Inf[:count ཉིན་', + 'hour' => '{1}ཆུ་ཚོད་གཅིག|]1,Inf[:count ཆུ་ཚོད', + 'minute' => '{1}སྐར་མ་གཅིག|]1,Inf[:count སྐར་མ', + 'second' => '{1}ལམ་སང|]1,Inf[:count སྐར་ཆ།', + 'ago' => ':time སྔན་ལ', + 'from_now' => ':time ལ་', + 'diff_yesterday' => 'ཁ་སང', + 'diff_today' => 'དི་རིང', + 'diff_tomorrow' => 'སང་ཉིན', + 'formats' => [ + 'LT' => 'A h:mm', + 'LTS' => 'A h:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', + ], + 'calendar' => [ + 'sameDay' => '[དི་རིང] LT', + 'nextDay' => '[སང་ཉིན] LT', + 'nextWeek' => '[བདུན་ཕྲག་རྗེས་མ], LT', + 'lastDay' => '[ཁ་སང] LT', + 'lastWeek' => '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'མཚན་མོ'; + } + if ($hour < 10) { + return 'ཞོགས་ཀས'; + } + if ($hour < 17) { + return 'ཉིན་གུང'; + } + if ($hour < 20) { + return 'དགོང་དག'; + } + + return 'མཚན་མོ'; + }, + 'months' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], + 'months_short' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], + 'weekdays' => ['གཟའ་ཉི་མ་', 'གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་པ་', 'གཟའ་ཕུར་བུ', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་པ་'], + 'weekdays_short' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ', 'པ་སངས་', 'སྤེན་པ་'], + 'weekdays_min' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ', 'པ་སངས་', 'སྤེན་པ་'], + 'list' => [', ', ' ཨནད་ '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'months_standalone' => ['ཟླ་བ་དང་པོ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་པ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུན་པ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/bo_CN.php b/libraries/Carbon/src/Carbon/Lang/bo_CN.php new file mode 100644 index 00000000000..9dfaf882214 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bo_CN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/bo.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/bo_IN.php b/libraries/Carbon/src/Carbon/Lang/bo_IN.php new file mode 100644 index 00000000000..649e2f72214 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bo_IN.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/bo.php', [ + 'meridiem' => ['སྔ་དྲོ་', 'ཕྱི་དྲོ་'], + 'weekdays' => ['གཟའ་ཉི་མ་', 'གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་པ་', 'གཟའ་ཕུར་བུ་', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་པ་'], + 'weekdays_short' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ་', 'པ་སངས་', 'སྤེན་པ་'], + 'weekdays_min' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ་', 'པ་སངས་', 'སྤེན་པ་'], + 'months' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], + 'months_short' => ['ཟླ་༡', 'ཟླ་༢', 'ཟླ་༣', 'ཟླ་༤', 'ཟླ་༥', 'ཟླ་༦', 'ཟླ་༧', 'ཟླ་༨', 'ཟླ་༩', 'ཟླ་༡༠', 'ཟླ་༡༡', 'ཟླ་༡༢'], + 'months_standalone' => ['ཟླ་བ་དང་པོ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་པ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུན་པ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], + 'weekend' => [0, 0], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'YYYY-MM-DD', + 'LL' => 'YYYY ལོའི་MMMཚེས་D', + 'LLL' => 'སྤྱི་ལོ་YYYY MMMMའི་ཚེས་D h:mm a', + 'LLLL' => 'YYYY MMMMའི་ཚེས་D, dddd h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/br.php b/libraries/Carbon/src/Carbon/Lang/br.php new file mode 100644 index 00000000000..bb62795e79c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/br.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Serhan Apaydın + * - JD Isaacks + */ +return [ + 'year' => '{1}:count bloaz|{3,4,5,9}:count bloaz|[0,Inf[:count vloaz', + 'a_year' => '{1}ur bloaz|{3,4,5,9}:count bloaz|[0,Inf[:count vloaz', + 'month' => '{1}:count miz|{2}:count viz|[0,Inf[:count miz', + 'a_month' => '{1}ur miz|{2}:count viz|[0,Inf[:count miz', + 'week' => ':count sizhun', + 'a_week' => '{1}ur sizhun|:count sizhun', + 'day' => '{1}:count devezh|{2}:count zevezh|[0,Inf[:count devezh', + 'a_day' => '{1}un devezh|{2}:count zevezh|[0,Inf[:count devezh', + 'hour' => ':count eur', + 'a_hour' => '{1}un eur|:count eur', + 'minute' => '{1}:count vunutenn|{2}:count vunutenn|[0,Inf[:count munutenn', + 'a_minute' => '{1}ur vunutenn|{2}:count vunutenn|[0,Inf[:count munutenn', + 'second' => ':count eilenn', + 'a_second' => '{1}un nebeud segondennoù|[0,Inf[:count eilenn', + 'ago' => ':time \'zo', + 'from_now' => 'a-benn :time', + 'diff_now' => 'bremañ', + 'diff_today' => 'Hiziv', + 'diff_today_regexp' => 'Hiziv(?:\\s+da)?', + 'diff_yesterday' => 'decʼh', + 'diff_yesterday_regexp' => 'Dec\'h(?:\\s+da)?', + 'diff_tomorrow' => 'warcʼhoazh', + 'diff_tomorrow_regexp' => 'Warc\'hoazh(?:\\s+da)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D [a viz] MMMM YYYY', + 'LLL' => 'D [a viz] MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D [a viz] MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Hiziv da] LT', + 'nextDay' => '[Warc\'hoazh da] LT', + 'nextWeek' => 'dddd [da] LT', + 'lastDay' => '[Dec\'h da] LT', + 'lastWeek' => 'dddd [paset da] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + return $number.($number === 1 ? 'añ' : 'vet'); + }, + 'months' => ['Genver', 'C\'hwevrer', 'Meurzh', 'Ebrel', 'Mae', 'Mezheven', 'Gouere', 'Eost', 'Gwengolo', 'Here', 'Du', 'Kerzu'], + 'months_short' => ['Gen', 'C\'hwe', 'Meu', 'Ebr', 'Mae', 'Eve', 'Gou', 'Eos', 'Gwe', 'Her', 'Du', 'Ker'], + 'weekdays' => ['Sul', 'Lun', 'Meurzh', 'Merc\'her', 'Yaou', 'Gwener', 'Sadorn'], + 'weekdays_short' => ['Sul', 'Lun', 'Meu', 'Mer', 'Yao', 'Gwe', 'Sad'], + 'weekdays_min' => ['Su', 'Lu', 'Me', 'Mer', 'Ya', 'Gw', 'Sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' hag '], + 'meridiem' => ['A.M.', 'G.M.'], + + 'y' => ':count bl.', + 'd' => ':count d', + 'h' => ':count e', + 'min' => ':count min', + 's' => ':count s', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/br_FR.php b/libraries/Carbon/src/Carbon/Lang/br_FR.php new file mode 100644 index 00000000000..e0d9bd072e2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/br_FR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/br.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/brx.php b/libraries/Carbon/src/Carbon/Lang/brx.php new file mode 100644 index 00000000000..40873a42c33 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/brx.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/brx_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/brx_IN.php b/libraries/Carbon/src/Carbon/Lang/brx_IN.php new file mode 100644 index 00000000000..076fd105efc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/brx_IN.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat Pune bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'M/D/YY', + ], + 'months' => ['जानुवारी', 'फेब्रुवारी', 'मार्स', 'एफ्रिल', 'मे', 'जुन', 'जुलाइ', 'आगस्थ', 'सेबथेज्ब़र', 'अखथबर', 'नबेज्ब़र', 'दिसेज्ब़र'], + 'months_short' => ['जानुवारी', 'फेब्रुवारी', 'मार्स', 'एप्रिल', 'मे', 'जुन', 'जुलाइ', 'आगस्थ', 'सेबथेज्ब़र', 'अखथबर', 'नबेज्ब़र', 'दिसेज्ब़र'], + 'weekdays' => ['रबिबार', 'सोबार', 'मंगलबार', 'बुदबार', 'बिसथिबार', 'सुखुरबार', 'सुनिबार'], + 'weekdays_short' => ['रबि', 'सम', 'मंगल', 'बुद', 'बिसथि', 'सुखुर', 'सुनि'], + 'weekdays_min' => ['रबि', 'सम', 'मंगल', 'बुद', 'बिसथि', 'सुखुर', 'सुनि'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['फुं.', 'बेलासे.'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bs.php b/libraries/Carbon/src/Carbon/Lang/bs.php new file mode 100644 index 00000000000..6c636df9966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bs.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bokideckonja + * - Josh Soref + * - François B + * - shaishavgandhi05 + * - Serhan Apaydın + * - JD Isaacks + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count godina|:count godine|:count godina', + 'y' => ':count godina|:count godine|:count godina', + 'month' => ':count mjesec|:count mjeseca|:count mjeseci', + 'm' => ':count mjesec|:count mjeseca|:count mjeseci', + 'week' => ':count sedmice|:count sedmicu|:count sedmica', + 'w' => ':count sedmice|:count sedmicu|:count sedmica', + 'day' => ':count dan|:count dana|:count dana', + 'd' => ':count dan|:count dana|:count dana', + 'hour' => ':count sat|:count sata|:count sati', + 'h' => ':count sat|:count sata|:count sati', + 'minute' => ':count minut|:count minuta|:count minuta', + 'min' => ':count minut|:count minuta|:count minuta', + 'second' => ':count sekund|:count sekunda|:count sekundi', + 's' => ':count sekund|:count sekunda|:count sekundi', + 'ago' => 'prije :time', + 'from_now' => 'za :time', + 'after' => 'nakon :time', + 'before' => ':time ranije', + 'diff_now' => 'sada', + 'diff_today' => 'danas', + 'diff_today_regexp' => 'danas(?:\\s+u)?', + 'diff_yesterday' => 'jučer', + 'diff_yesterday_regexp' => 'jučer(?:\\s+u)?', + 'diff_tomorrow' => 'sutra', + 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY H:mm', + 'LLLL' => 'dddd, D. MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[danas u] LT', + 'nextDay' => '[sutra u] LT', + 'nextWeek' => function (CarbonInterface $current) { + switch ($current->dayOfWeek) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + default: + return '[u] dddd [u] LT'; + } + }, + 'lastDay' => '[jučer u] LT', + 'lastWeek' => function (CarbonInterface $current) { + switch ($current->dayOfWeek) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + default: + return '[prošli] dddd [u] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['januar', 'februar', 'mart', 'april', 'maj', 'juni', 'juli', 'august', 'septembar', 'oktobar', 'novembar', 'decembar'], + 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], + 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], + 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], + 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' i '], + 'meridiem' => ['prijepodne', 'popodne'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/bs_BA.php b/libraries/Carbon/src/Carbon/Lang/bs_BA.php new file mode 100644 index 00000000000..e398021c011 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bs_BA.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/bs.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/bs_Cyrl.php b/libraries/Carbon/src/Carbon/Lang/bs_Cyrl.php new file mode 100644 index 00000000000..ae14100793b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bs_Cyrl.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/bs.php', [ + 'meridiem' => ['пре подне', 'поподне'], + 'weekdays' => ['недјеља', 'понедјељак', 'уторак', 'сриједа', 'четвртак', 'петак', 'субота'], + 'weekdays_short' => ['нед', 'пон', 'уто', 'сри', 'чет', 'пет', 'суб'], + 'weekdays_min' => ['нед', 'пон', 'уто', 'сри', 'чет', 'пет', 'суб'], + 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јуни', 'јули', 'аугуст', 'септембар', 'октобар', 'новембар', 'децембар'], + 'months_short' => ['јан', 'феб', 'мар', 'апр', 'мај', 'јун', 'јул', 'ауг', 'сеп', 'окт', 'нов', 'дец'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D.M.YYYY.', + 'LL' => 'DD.MM.YYYY.', + 'LLL' => 'DD. MMMM YYYY. HH:mm', + 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/bs_Latn.php b/libraries/Carbon/src/Carbon/Lang/bs_Latn.php new file mode 100644 index 00000000000..d4ca993ee8b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/bs_Latn.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/bs.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/byn.php b/libraries/Carbon/src/Carbon/Lang/byn.php new file mode 100644 index 00000000000..a216df3f066 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/byn.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/byn_ER.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/byn_ER.php b/libraries/Carbon/src/Carbon/Lang/byn_ER.php new file mode 100644 index 00000000000..71cb5c8679a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/byn_ER.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ልደትሪ', 'ካብኽብቲ', 'ክብላ', 'ፋጅኺሪ', 'ክቢቅሪ', 'ምኪኤል ትጓ̅ኒሪ', 'ኰርኩ', 'ማርያም ትሪ', 'ያኸኒ መሳቅለሪ', 'መተሉ', 'ምኪኤል መሽወሪ', 'ተሕሳስሪ'], + 'months_short' => ['ልደት', 'ካብኽ', 'ክብላ', 'ፋጅኺ', 'ክቢቅ', 'ም/ት', 'ኰር', 'ማርያ', 'ያኸኒ', 'መተሉ', 'ም/ም', 'ተሕሳ'], + 'weekdays' => ['ሰንበር ቅዳዅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ ወሪ ለብዋ', 'ኣምድ', 'ኣርብ', 'ሰንበር ሽጓዅ'], + 'weekdays_short' => ['ሰ/ቅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ', 'ኣምድ', 'ኣርብ', 'ሰ/ሽ'], + 'weekdays_min' => ['ሰ/ቅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ', 'ኣምድ', 'ኣርብ', 'ሰ/ሽ'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ፋዱስ ጃብ', 'ፋዱስ ደምቢ'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ca.php b/libraries/Carbon/src/Carbon/Lang/ca.php new file mode 100644 index 00000000000..7da8f32fd2f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ca.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - mestremuten + * - François B + * - Marc Ordinas i Llopis + * - Pere Orga + * - JD Isaacks + * - Quentí + * - Víctor Díaz + * - Xavi + * - qcardona + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count any|:count anys', + 'a_year' => 'un any|:count anys', + 'y' => ':count any|:count anys', + 'month' => ':count mes|:count mesos', + 'a_month' => 'un mes|:count mesos', + 'm' => ':count mes|:count mesos', + 'week' => ':count setmana|:count setmanes', + 'a_week' => 'una setmana|:count setmanes', + 'w' => ':count setmana|:count setmanes', + 'day' => ':count dia|:count dies', + 'a_day' => 'un dia|:count dies', + 'd' => ':count d', + 'hour' => ':count hora|:count hores', + 'a_hour' => 'una hora|:count hores', + 'h' => ':count h', + 'minute' => ':count minut|:count minuts', + 'a_minute' => 'un minut|:count minuts', + 'min' => ':count min', + 'second' => ':count segon|:count segons', + 'a_second' => 'uns segons|:count segons', + 's' => ':count s', + 'ago' => 'fa :time', + 'from_now' => 'd\'aquí a :time', + 'after' => ':time després', + 'before' => ':time abans', + 'diff_now' => 'ara mateix', + 'diff_today' => 'avui', + 'diff_today_regexp' => 'avui(?:\\s+a)?(?:\\s+les)?', + 'diff_yesterday' => 'ahir', + 'diff_yesterday_regexp' => 'ahir(?:\\s+a)?(?:\\s+les)?', + 'diff_tomorrow' => 'demà', + 'diff_tomorrow_regexp' => 'demà(?:\\s+a)?(?:\\s+les)?', + 'diff_before_yesterday' => 'abans d\'ahir', + 'diff_after_tomorrow' => 'demà passat', + 'period_recurrences' => ':count cop|:count cops', + 'period_interval' => 'cada :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'fins a :date', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM [de] YYYY', + 'LLL' => 'D MMMM [de] YYYY [a les] H:mm', + 'LLLL' => 'dddd D MMMM [de] YYYY [a les] H:mm', + ], + 'calendar' => [ + 'sameDay' => function (CarbonInterface $current) { + return '[avui a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; + }, + 'nextDay' => function (CarbonInterface $current) { + return '[demà a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; + }, + 'nextWeek' => function (CarbonInterface $current) { + return 'dddd [a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; + }, + 'lastDay' => function (CarbonInterface $current) { + return '[ahir a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; + }, + 'lastWeek' => function (CarbonInterface $current) { + return '[el] dddd [passat a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; + }, + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + return $number.( + ($period === 'w' || $period === 'W') ? 'a' : ( + ($number === 1) ? 'r' : ( + ($number === 2) ? 'n' : ( + ($number === 3) ? 'r' : ( + ($number === 4) ? 't' : 'è' + ) + ) + ) + ) + ); + }, + 'months' => ['de gener', 'de febrer', 'de març', 'd\'abril', 'de maig', 'de juny', 'de juliol', 'd\'agost', 'de setembre', 'd\'octubre', 'de novembre', 'de desembre'], + 'months_standalone' => ['gener', 'febrer', 'març', 'abril', 'maig', 'juny', 'juliol', 'agost', 'setembre', 'octubre', 'novembre', 'desembre'], + 'months_short' => ['de gen.', 'de febr.', 'de març', 'd\'abr.', 'de maig', 'de juny', 'de jul.', 'd\'ag.', 'de set.', 'd\'oct.', 'de nov.', 'de des.'], + 'months_short_standalone' => ['gen.', 'febr.', 'març', 'abr.', 'maig', 'juny', 'jul.', 'ag.', 'set.', 'oct.', 'nov.', 'des.'], + 'months_regexp' => '/(D[oD]?[\s,]+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => ['diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte'], + 'weekdays_short' => ['dg.', 'dl.', 'dt.', 'dc.', 'dj.', 'dv.', 'ds.'], + 'weekdays_min' => ['dg', 'dl', 'dt', 'dc', 'dj', 'dv', 'ds'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' i '], + 'meridiem' => ['a. m.', 'p. m.'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ca_AD.php b/libraries/Carbon/src/Carbon/Lang/ca_AD.php new file mode 100644 index 00000000000..d2a28a72a57 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ca_AD.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ca.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ca_ES.php b/libraries/Carbon/src/Carbon/Lang/ca_ES.php new file mode 100644 index 00000000000..e2224307741 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ca_ES.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ca.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ca_ES_Valencia.php b/libraries/Carbon/src/Carbon/Lang/ca_ES_Valencia.php new file mode 100644 index 00000000000..5cd1ccdfd6c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ca_ES_Valencia.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'ca'); + }, 'ca_ES_Valencia'); +} +// @codeCoverageIgnoreEnd + +return array_replace_recursive(require __DIR__.'/ca.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ca_FR.php b/libraries/Carbon/src/Carbon/Lang/ca_FR.php new file mode 100644 index 00000000000..d2a28a72a57 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ca_FR.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ca.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ca_IT.php b/libraries/Carbon/src/Carbon/Lang/ca_IT.php new file mode 100644 index 00000000000..d2a28a72a57 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ca_IT.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ca.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ccp.php b/libraries/Carbon/src/Carbon/Lang/ccp.php new file mode 100644 index 00000000000..bf00401ac21 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ccp.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['𑄢𑄧𑄝𑄨𑄝𑄢𑄴', '𑄥𑄧𑄟𑄴𑄝𑄢𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴𑄝𑄢𑄴', '𑄝𑄪𑄖𑄴𑄝𑄢𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴𑄝𑄢𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴𑄝𑄢𑄴', '𑄥𑄧𑄚𑄨𑄝𑄢𑄴'], + 'weekdays_short' => ['𑄢𑄧𑄝𑄨', '𑄥𑄧𑄟𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴', '𑄝𑄪𑄖𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴', '𑄥𑄧𑄚𑄨'], + 'weekdays_min' => ['𑄢𑄧𑄝𑄨', '𑄥𑄧𑄟𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴', '𑄝𑄪𑄖𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴', '𑄥𑄧𑄚𑄨'], + 'months' => ['𑄎𑄚𑄪𑄠𑄢𑄨', '𑄜𑄬𑄛𑄴𑄝𑄳𑄢𑄪𑄠𑄢𑄨', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄬𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄧𑄢𑄴'], + 'months_short' => ['𑄎𑄚𑄪', '𑄜𑄬𑄛𑄴', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄮𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄢𑄴'], + 'months_short_standalone' => ['𑄎𑄚𑄪𑄠𑄢𑄨', '𑄜𑄬𑄛𑄴𑄝𑄳𑄢𑄪𑄠𑄢𑄨', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄮𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄧𑄢𑄴'], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM, YYYY h:mm a', + 'LLLL' => 'dddd, D MMMM, YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ccp_IN.php b/libraries/Carbon/src/Carbon/Lang/ccp_IN.php new file mode 100644 index 00000000000..6d8ab8b6608 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ccp_IN.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ccp.php', [ + 'weekend' => [0, 0], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ce.php b/libraries/Carbon/src/Carbon/Lang/ce.php new file mode 100644 index 00000000000..f91d103af77 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ce.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ce_RU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ce_RU.php b/libraries/Carbon/src/Carbon/Lang/ce_RU.php new file mode 100644 index 00000000000..3dd8a8722b6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ce_RU.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - ANCHR + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY.DD.MM', + ], + 'months' => ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'], + 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], + 'weekdays' => ['КӀиранан де', 'Оршотан де', 'Шинарин де', 'Кхаарин де', 'Еарин де', 'ПӀераскан де', 'Шот де'], + 'weekdays_short' => ['КӀ', 'Ор', 'Ши', 'Кх', 'Еа', 'ПӀ', 'Шо'], + 'weekdays_min' => ['КӀ', 'Ор', 'Ши', 'Кх', 'Еа', 'ПӀ', 'Шо'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => ':count шо', + 'y' => ':count шо', + 'a_year' => ':count шо', + + 'month' => ':count бутт', + 'm' => ':count бутт', + 'a_month' => ':count бутт', + + 'week' => ':count кӏира', + 'w' => ':count кӏира', + 'a_week' => ':count кӏира', + + 'day' => ':count де', + 'd' => ':count де', + 'a_day' => ':count де', + + 'hour' => ':count сахьт', + 'h' => ':count сахьт', + 'a_hour' => ':count сахьт', + + 'minute' => ':count минот', + 'min' => ':count минот', + 'a_minute' => ':count минот', + + 'second' => ':count секунд', + 's' => ':count секунд', + 'a_second' => ':count секунд', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/cgg.php b/libraries/Carbon/src/Carbon/Lang/cgg.php new file mode 100644 index 00000000000..264c2f1a1a1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cgg.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], + 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], + 'weekdays_min' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], + 'months' => ['Okwokubanza', 'Okwakabiri', 'Okwakashatu', 'Okwakana', 'Okwakataana', 'Okwamukaaga', 'Okwamushanju', 'Okwamunaana', 'Okwamwenda', 'Okwaikumi', 'Okwaikumi na kumwe', 'Okwaikumi na ibiri'], + 'months_short' => ['KBZ', 'KBR', 'KST', 'KKN', 'KTN', 'KMK', 'KMS', 'KMN', 'KMW', 'KKM', 'KNK', 'KNB'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'day' => ':count ruhanga', // less reliable + 'd' => ':count ruhanga', // less reliable + 'a_day' => ':count ruhanga', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/chr.php b/libraries/Carbon/src/Carbon/Lang/chr.php new file mode 100644 index 00000000000..3032e3779a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/chr.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/chr_US.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/chr_US.php b/libraries/Carbon/src/Carbon/Lang/chr_US.php new file mode 100644 index 00000000000..66c819933db --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/chr_US.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Cherokee Nation Joseph Erb josepherb7@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'MM/DD/YYYY', + ], + 'months' => ['ᎤᏃᎸᏔᏅ', 'ᎧᎦᎵ', 'ᎠᏅᏱ', 'ᎧᏬᏂ', 'ᎠᏂᏍᎬᏘ', 'ᏕᎭᎷᏱ', 'ᎫᏰᏉᏂ', 'ᎦᎶᏂ', 'ᏚᎵᏍᏗ', 'ᏚᏂᏅᏗ', 'ᏅᏓᏕᏆ', 'ᎥᏍᎩᏱ'], + 'months_short' => ['ᎤᏃ', 'ᎧᎦ', 'ᎠᏅ', 'ᎧᏬ', 'ᎠᏂ', 'ᏕᎭ', 'ᎫᏰ', 'ᎦᎶ', 'ᏚᎵ', 'ᏚᏂ', 'ᏅᏓ', 'ᎥᏍ'], + 'weekdays' => ['ᎤᎾᏙᏓᏆᏍᎬ', 'ᎤᎾᏙᏓᏉᏅᎯ', 'ᏔᎵᏁᎢᎦ', 'ᏦᎢᏁᎢᎦ', 'ᏅᎩᏁᎢᎦ', 'ᏧᎾᎩᎶᏍᏗ', 'ᎤᎾᏙᏓᏈᏕᎾ'], + 'weekdays_short' => ['ᏆᏍᎬ', 'ᏉᏅᎯ', 'ᏔᎵᏁ', 'ᏦᎢᏁ', 'ᏅᎩᏁ', 'ᏧᎾᎩ', 'ᏈᏕᎾ'], + 'weekdays_min' => ['ᏆᏍᎬ', 'ᏉᏅᎯ', 'ᏔᎵᏁ', 'ᏦᎢᏁ', 'ᏅᎩᏁ', 'ᏧᎾᎩ', 'ᏈᏕᎾ'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ᏌᎾᎴ', 'ᏒᎯᏱᎢᏗᏢ', 'ꮜꮎꮄ', 'ꮢꭿᏹꭲꮧꮲ'], + + 'second' => ':count ᏐᎢ', // less reliable + 's' => ':count ᏐᎢ', // less reliable + 'a_second' => ':count ᏐᎢ', // less reliable + + 'year' => ':count ᏑᏕᏘᏴᏓ', + 'y' => ':count ᏑᏕᏘᏴᏓ', + 'a_year' => ':count ᏑᏕᏘᏴᏓ', + + 'month' => ':count ᏏᏅᏙ', + 'm' => ':count ᏏᏅᏙ', + 'a_month' => ':count ᏏᏅᏙ', + + 'week' => ':count ᏑᎾᏙᏓᏆᏍᏗ', + 'w' => ':count ᏑᎾᏙᏓᏆᏍᏗ', + 'a_week' => ':count ᏑᎾᏙᏓᏆᏍᏗ', + + 'day' => ':count ᎢᎦ', + 'd' => ':count ᎢᎦ', + 'a_day' => ':count ᎢᎦ', + + 'hour' => ':count ᏑᏟᎶᏛ', + 'h' => ':count ᏑᏟᎶᏛ', + 'a_hour' => ':count ᏑᏟᎶᏛ', + + 'minute' => ':count ᎢᏯᏔᏬᏍᏔᏅ', + 'min' => ':count ᎢᏯᏔᏬᏍᏔᏅ', + 'a_minute' => ':count ᎢᏯᏔᏬᏍᏔᏅ', + + 'ago' => ':time ᏥᎨᏒ', + 'from_now' => 'ᎾᎿ :time', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ckb.php b/libraries/Carbon/src/Carbon/Lang/ckb.php new file mode 100644 index 00000000000..d448ac52f15 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ckb.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Swara Mohammed + */ +$months = [ + 'ڕێبەندان', + 'ڕەشەمە', + 'نەورۆز', + 'گوڵان', + 'جۆزەردان', + 'پوشپەڕ', + 'گەلاوێژ', + 'خەرمانان', + 'ڕەزبەر', + 'گەڵاڕێزان', + 'سەرماوەرز', + 'بەفرانبار', +]; + +return [ + 'year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), + 'a_year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), + 'month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), + 'a_month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), + 'week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), + 'a_week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), + 'day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), + 'a_day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), + 'hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), + 'a_hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), + 'minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), + 'a_minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), + 'second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), + 'a_second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), + 'ago' => 'پێش :time', + 'from_now' => ':time لە ئێستاوە', + 'after' => 'دوای :time', + 'before' => 'پێش :time', + 'diff_now' => 'ئێستا', + 'diff_today' => 'ئەمڕۆ', + 'diff_today_regexp' => 'ڕۆژ(?:\\s+لە)?(?:\\s+کاتژمێر)?', + 'diff_yesterday' => 'دوێنێ', + 'diff_yesterday_regexp' => 'دوێنێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', + 'diff_tomorrow' => 'سبەینێ', + 'diff_tomorrow_regexp' => 'سبەینێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', + 'diff_before_yesterday' => 'پێش دوێنێ', + 'diff_after_tomorrow' => 'دوای سبەینێ', + 'period_recurrences' => implode('|', ['{0}جار', '{1}جار', '{2}:count دووجار', ']2,11[:count جار', ']10,Inf[:count جار']), + 'period_interval' => 'هەموو :interval', + 'period_start_date' => 'لە :date', + 'period_end_date' => 'بۆ :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], + 'weekdays_short' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], + 'weekdays_min' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[ئەمڕۆ لە کاتژمێر] LT', + 'nextDay' => '[سبەینێ لە کاتژمێر] LT', + 'nextWeek' => 'dddd [لە کاتژمێر] LT', + 'lastDay' => '[دوێنێ لە کاتژمێر] LT', + 'lastWeek' => 'dddd [لە کاتژمێر] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['پ.ن', 'د.ن'], + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/cmn.php b/libraries/Carbon/src/Carbon/Lang/cmn.php new file mode 100644 index 00000000000..bc73425bb26 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cmn.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/cmn_TW.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/cmn_TW.php b/libraries/Carbon/src/Carbon/Lang/cmn_TW.php new file mode 100644 index 00000000000..ae4114aefa9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cmn_TW.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY年MM月DD號', + ], + 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], + 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], + 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'meridiem' => ['上午', '下午'], + + 'year' => ':count 年', + 'y' => ':count 年', + 'a_year' => ':count 年', + + 'month' => ':count 月', + 'm' => ':count 月', + 'a_month' => ':count 月', + + 'week' => ':count 周', + 'w' => ':count 周', + 'a_week' => ':count 周', + + 'day' => ':count 白天', + 'd' => ':count 白天', + 'a_day' => ':count 白天', + + 'hour' => ':count 小时', + 'h' => ':count 小时', + 'a_hour' => ':count 小时', + + 'minute' => ':count 分钟', + 'min' => ':count 分钟', + 'a_minute' => ':count 分钟', + + 'second' => ':count 秒', + 's' => ':count 秒', + 'a_second' => ':count 秒', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/crh.php b/libraries/Carbon/src/Carbon/Lang/crh.php new file mode 100644 index 00000000000..a71352d1c46 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/crh.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/crh_UA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/crh_UA.php b/libraries/Carbon/src/Carbon/Lang/crh_UA.php new file mode 100644 index 00000000000..4c80086f828 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/crh_UA.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Reşat SABIQ tilde.birlik@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'Mayıs', 'İyun', 'İyul', 'Avgust', 'Sentâbr', 'Oktâbr', 'Noyabr', 'Dekabr'], + 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], + 'weekdays' => ['Bazar', 'Bazarertesi', 'Salı', 'Çarşembe', 'Cumaaqşamı', 'Cuma', 'Cumaertesi'], + 'weekdays_short' => ['Baz', 'Ber', 'Sal', 'Çar', 'Caq', 'Cum', 'Cer'], + 'weekdays_min' => ['Baz', 'Ber', 'Sal', 'Çar', 'Caq', 'Cum', 'Cer'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ÜE', 'ÜS'], + + 'year' => ':count yıl', + 'y' => ':count yıl', + 'a_year' => ':count yıl', + + 'month' => ':count ay', + 'm' => ':count ay', + 'a_month' => ':count ay', + + 'week' => ':count afta', + 'w' => ':count afta', + 'a_week' => ':count afta', + + 'day' => ':count kün', + 'd' => ':count kün', + 'a_day' => ':count kün', + + 'hour' => ':count saat', + 'h' => ':count saat', + 'a_hour' => ':count saat', + + 'minute' => ':count daqqa', + 'min' => ':count daqqa', + 'a_minute' => ':count daqqa', + + 'second' => ':count ekinci', + 's' => ':count ekinci', + 'a_second' => ':count ekinci', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/cs.php b/libraries/Carbon/src/Carbon/Lang/cs.php new file mode 100644 index 00000000000..0c70577f164 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cs.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Jakub Tesinsky + * - Martin Suja + * - Nikos Timiopulos + * - Bohuslav Blín + * - Tsutomu Kuroda + * - tjku + * - Lukas Svoboda + * - Max Melentiev + * - Juanito Fatas + * - Akira Matsuda + * - Christopher Dell + * - Václav Pávek + * - CodeSkills + * - Tlapi + * - newman101 + * - Petr Kadlec + * - tommaskraus + * - Karel Sommer (calvera) + */ +$za = function ($time) { + return 'za '.strtr($time, [ + 'hodina' => 'hodinu', + 'minuta' => 'minutu', + 'sekunda' => 'sekundu', + ]); +}; + +$pred = function ($time) { + $time = strtr($time, [ + 'hodina' => 'hodinou', + 'minuta' => 'minutou', + 'sekunda' => 'sekundou', + ]); + $time = preg_replace('/hodiny?(?!\w)/', 'hodinami', $time); + $time = preg_replace('/minuty?(?!\w)/', 'minutami', $time); + $time = preg_replace('/sekundy?(?!\w)/', 'sekundami', $time); + + return "před $time"; +}; + +return [ + 'year' => ':count rok|:count roky|:count let', + 'y' => ':count rok|:count roky|:count let', + 'a_year' => 'rok|:count roky|:count let', + 'month' => ':count měsíc|:count měsíce|:count měsíců', + 'm' => ':count měs.', + 'a_month' => 'měsíc|:count měsíce|:count měsíců', + 'week' => ':count týden|:count týdny|:count týdnů', + 'w' => ':count týd.', + 'a_week' => 'týden|:count týdny|:count týdnů', + 'day' => ':count den|:count dny|:count dní', + 'd' => ':count den|:count dny|:count dní', + 'a_day' => 'den|:count dny|:count dní', + 'hour' => ':count hodina|:count hodiny|:count hodin', + 'h' => ':count hod.', + 'a_hour' => 'hodina|:count hodiny|:count hodin', + 'minute' => ':count minuta|:count minuty|:count minut', + 'min' => ':count min.', + 'a_minute' => 'minuta|:count minuty|:count minut', + 'second' => ':count sekunda|:count sekundy|:count sekund', + 's' => ':count sek.', + 'a_second' => 'pár sekund|:count sekundy|:count sekund', + + 'month_ago' => ':count měsícem|:count měsíci|:count měsíci', + 'a_month_ago' => 'měsícem|:count měsíci|:count měsíci', + 'day_ago' => ':count dnem|:count dny|:count dny', + 'a_day_ago' => 'dnem|:count dny|:count dny', + 'week_ago' => ':count týdnem|:count týdny|:count týdny', + 'a_week_ago' => 'týdnem|:count týdny|:count týdny', + 'year_ago' => ':count rokem|:count roky|:count lety', + 'y_ago' => ':count rok.|:count rok.|:count let.', + 'a_year_ago' => 'rokem|:count roky|:count lety', + + 'month_before' => ':count měsícem|:count měsíci|:count měsíci', + 'a_month_before' => 'měsícem|:count měsíci|:count měsíci', + 'day_before' => ':count dnem|:count dny|:count dny', + 'a_day_before' => 'dnem|:count dny|:count dny', + 'week_before' => ':count týdnem|:count týdny|:count týdny', + 'a_week_before' => 'týdnem|:count týdny|:count týdny', + 'year_before' => ':count rokem|:count roky|:count lety', + 'y_before' => ':count rok.|:count rok.|:count let.', + 'a_year_before' => 'rokem|:count roky|:count lety', + + 'ago' => $pred, + 'from_now' => $za, + 'before' => $pred, + 'after' => $za, + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'months' => ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'července', 'srpna', 'září', 'října', 'listopadu', 'prosince'], + 'months_standalone' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'], + 'months_short' => ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'], + 'weekdays' => ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], + 'weekdays_short' => ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'], + 'weekdays_min' => ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], + 'list' => [', ', ' a '], + 'diff_now' => 'nyní', + 'diff_yesterday' => 'včera', + 'diff_tomorrow' => 'zítra', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD. MM. YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY HH:mm', + 'LLLL' => 'dddd D. MMMM YYYY HH:mm', + ], + 'meridiem' => ['dopoledne', 'odpoledne'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/cs_CZ.php b/libraries/Carbon/src/Carbon/Lang/cs_CZ.php new file mode 100644 index 00000000000..40ebedfc41b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cs_CZ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/cs.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/csb.php b/libraries/Carbon/src/Carbon/Lang/csb.php new file mode 100644 index 00000000000..18d43cc8371 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/csb.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/csb_PL.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/csb_PL.php b/libraries/Carbon/src/Carbon/Lang/csb_PL.php new file mode 100644 index 00000000000..3297d8cd161 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/csb_PL.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - csb_PL locale Michal Ostrowski bug-glibc-locales@gnu.org + */ +return [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'MMMM DD, YYYY', + 'LLL' => 'DD MMM HH:mm', + 'LLLL' => 'MMMM DD, YYYY HH:mm', + ], + 'months' => ['stëcznika', 'gromicznika', 'strëmiannika', 'łżëkwiata', 'maja', 'czerwińca', 'lëpińca', 'zélnika', 'séwnika', 'rujana', 'lëstopadnika', 'gòdnika'], + 'months_short' => ['stë', 'gro', 'str', 'łżë', 'maj', 'cze', 'lëp', 'zél', 'séw', 'ruj', 'lës', 'gòd'], + 'weekdays' => ['niedzela', 'pòniedzôłk', 'wtórk', 'strzoda', 'czwiôrtk', 'piątk', 'sobòta'], + 'weekdays_short' => ['nie', 'pòn', 'wtó', 'str', 'czw', 'pią', 'sob'], + 'weekdays_min' => ['nie', 'pòn', 'wtó', 'str', 'czw', 'pią', 'sob'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' a téż '], + 'two_words_connector' => ' a téż ', + 'year' => ':count rok', + 'month' => ':count miesiąc', + 'week' => ':count tidzéń', + 'day' => ':count dzéń', + 'hour' => ':count gòdzëna', + 'minute' => ':count minuta', + 'second' => ':count sekunda', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/cu.php b/libraries/Carbon/src/Carbon/Lang/cu.php new file mode 100644 index 00000000000..ea7c31c9029 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cu.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], + 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'YYYY MMMM D, dddd HH:mm', + ], + + 'year' => ':count лѣто', + 'y' => ':count лѣто', + 'a_year' => ':count лѣто', + + 'month' => ':count мѣсѧць', + 'm' => ':count мѣсѧць', + 'a_month' => ':count мѣсѧць', + + 'week' => ':count сєдмица', + 'w' => ':count сєдмица', + 'a_week' => ':count сєдмица', + + 'day' => ':count дьнь', + 'd' => ':count дьнь', + 'a_day' => ':count дьнь', + + 'hour' => ':count година', + 'h' => ':count година', + 'a_hour' => ':count година', + + 'minute' => ':count малъ', // less reliable + 'min' => ':count малъ', // less reliable + 'a_minute' => ':count малъ', // less reliable + + 'second' => ':count въторъ', + 's' => ':count въторъ', + 'a_second' => ':count въторъ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/cv.php b/libraries/Carbon/src/Carbon/Lang/cv.php new file mode 100644 index 00000000000..3044371682b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cv.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - JD Isaacks + */ +return [ + 'year' => ':count ҫул', + 'a_year' => '{1}пӗр ҫул|:count ҫул', + 'month' => ':count уйӑх', + 'a_month' => '{1}пӗр уйӑх|:count уйӑх', + 'week' => ':count эрне', + 'a_week' => '{1}пӗр эрне|:count эрне', + 'day' => ':count кун', + 'a_day' => '{1}пӗр кун|:count кун', + 'hour' => ':count сехет', + 'a_hour' => '{1}пӗр сехет|:count сехет', + 'minute' => ':count минут', + 'a_minute' => '{1}пӗр минут|:count минут', + 'second' => ':count ҫеккунт', + 'a_second' => '{1}пӗр-ик ҫеккунт|:count ҫеккунт', + 'ago' => ':time каялла', + 'from_now' => function ($time) { + return $time.(preg_match('/сехет$/u', $time) ? 'рен' : (preg_match('/ҫул/u', $time) ? 'тан' : 'ран')); + }, + 'diff_yesterday' => 'Ӗнер', + 'diff_today' => 'Паян', + 'diff_tomorrow' => 'Ыран', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD-MM-YYYY', + 'LL' => 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + 'LLL' => 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + 'LLLL' => 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Паян] LT [сехетре]', + 'nextDay' => '[Ыран] LT [сехетре]', + 'nextWeek' => '[Ҫитес] dddd LT [сехетре]', + 'lastDay' => '[Ӗнер] LT [сехетре]', + 'lastWeek' => '[Иртнӗ] dddd LT [сехетре]', + 'sameElse' => 'L', + ], + 'ordinal' => ':number-мӗш', + 'months' => ['кӑрлач', 'нарӑс', 'пуш', 'ака', 'май', 'ҫӗртме', 'утӑ', 'ҫурла', 'авӑн', 'юпа', 'чӳк', 'раштав'], + 'months_short' => ['кӑр', 'нар', 'пуш', 'ака', 'май', 'ҫӗр', 'утӑ', 'ҫур', 'авн', 'юпа', 'чӳк', 'раш'], + 'weekdays' => ['вырсарникун', 'тунтикун', 'ытларикун', 'юнкун', 'кӗҫнерникун', 'эрнекун', 'шӑматкун'], + 'weekdays_short' => ['выр', 'тун', 'ытл', 'юн', 'кӗҫ', 'эрн', 'шӑм'], + 'weekdays_min' => ['вр', 'тн', 'ыт', 'юн', 'кҫ', 'эр', 'шм'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' тата '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/cv_RU.php b/libraries/Carbon/src/Carbon/Lang/cv_RU.php new file mode 100644 index 00000000000..6ef24cb8de8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cv_RU.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/cv.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/cy.php b/libraries/Carbon/src/Carbon/Lang/cy.php new file mode 100644 index 00000000000..d1da48cbf5b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cy.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - JD Isaacks + * - Daniel Monaghan + */ +return [ + 'year' => '{1}blwyddyn|]1,Inf[:count flynedd', + 'y' => ':countbl', + 'month' => '{1}mis|]1,Inf[:count mis', + 'm' => ':countmi', + 'week' => ':count wythnos', + 'w' => ':countw', + 'day' => '{1}diwrnod|]1,Inf[:count diwrnod', + 'd' => ':countd', + 'hour' => '{1}awr|]1,Inf[:count awr', + 'h' => ':counth', + 'minute' => '{1}munud|]1,Inf[:count munud', + 'min' => ':countm', + 'second' => '{1}ychydig eiliadau|]1,Inf[:count eiliad', + 's' => ':counts', + 'ago' => ':time yn ôl', + 'from_now' => 'mewn :time', + 'after' => ':time ar ôl', + 'before' => ':time o\'r blaen', + 'diff_now' => 'nawr', + 'diff_today' => 'Heddiw', + 'diff_today_regexp' => 'Heddiw(?:\\s+am)?', + 'diff_yesterday' => 'ddoe', + 'diff_yesterday_regexp' => 'Ddoe(?:\\s+am)?', + 'diff_tomorrow' => 'yfory', + 'diff_tomorrow_regexp' => 'Yfory(?:\\s+am)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Heddiw am] LT', + 'nextDay' => '[Yfory am] LT', + 'nextWeek' => 'dddd [am] LT', + 'lastDay' => '[Ddoe am] LT', + 'lastWeek' => 'dddd [diwethaf am] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + return $number.( + $number > 20 + ? (\in_array((int) $number, [40, 50, 60, 80, 100], true) ? 'fed' : 'ain') + : ([ + '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed + 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed', // 11eg to 20fed + ])[$number] ?? '' + ); + }, + 'months' => ['Ionawr', 'Chwefror', 'Mawrth', 'Ebrill', 'Mai', 'Mehefin', 'Gorffennaf', 'Awst', 'Medi', 'Hydref', 'Tachwedd', 'Rhagfyr'], + 'months_short' => ['Ion', 'Chwe', 'Maw', 'Ebr', 'Mai', 'Meh', 'Gor', 'Aws', 'Med', 'Hyd', 'Tach', 'Rhag'], + 'weekdays' => ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'], + 'weekdays_short' => ['Sul', 'Llun', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'], + 'weekdays_min' => ['Su', 'Ll', 'Ma', 'Me', 'Ia', 'Gw', 'Sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' a '], + 'meridiem' => ['yb', 'yh'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/cy_GB.php b/libraries/Carbon/src/Carbon/Lang/cy_GB.php new file mode 100644 index 00000000000..79a525f48fa --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/cy_GB.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/cy.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/da.php b/libraries/Carbon/src/Carbon/Lang/da.php new file mode 100644 index 00000000000..184bf41d89d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/da.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Rune Mønnike + * - François B + * - codenhagen + * - JD Isaacks + * - Jens Herlevsen + * - Ulrik McArdle (mcardle) + * - Frederik Sauer (FrittenKeeZ) + * - Janus Bahs Jacquet (kokoshneta) + */ +return [ + 'year' => ':count år|:count år', + 'a_year' => 'et år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count måned|:count måneder', + 'a_month' => 'en måned|:count måneder', + 'm' => ':count mdr.', + 'week' => ':count uge|:count uger', + 'a_week' => 'en uge|:count uger', + 'w' => ':count u.', + 'day' => ':count dag|:count dage', + 'a_day' => ':count dag|:count dage', + 'd' => ':count d.', + 'hour' => ':count time|:count timer', + 'a_hour' => 'en time|:count timer', + 'h' => ':count t.', + 'minute' => ':count minut|:count minutter', + 'a_minute' => 'et minut|:count minutter', + 'min' => ':count min.', + 'second' => ':count sekund|:count sekunder', + 'a_second' => 'få sekunder|:count sekunder', + 's' => ':count s.', + 'ago' => 'for :time siden', + 'from_now' => 'om :time', + 'after' => ':time efter', + 'before' => ':time før', + 'diff_now' => 'nu', + 'diff_today' => 'i dag', + 'diff_today_regexp' => 'i dag(?:\\s+kl.)?', + 'diff_yesterday' => 'i går', + 'diff_yesterday_regexp' => 'i går(?:\\s+kl.)?', + 'diff_tomorrow' => 'i morgen', + 'diff_tomorrow_regexp' => 'i morgen(?:\\s+kl.)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY HH:mm', + 'LLLL' => 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[i dag kl.] LT', + 'nextDay' => '[i morgen kl.] LT', + 'nextWeek' => 'på dddd [kl.] LT', + 'lastDay' => '[i går kl.] LT', + 'lastWeek' => '[i] dddd[s kl.] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'], + 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], + 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], + 'weekdays_short' => ['søn.', 'man.', 'tir.', 'ons.', 'tor.', 'fre.', 'lør.'], + 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' og '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/da_DK.php b/libraries/Carbon/src/Carbon/Lang/da_DK.php new file mode 100644 index 00000000000..610cd36d0db --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/da_DK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/da.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/da_GL.php b/libraries/Carbon/src/Carbon/Lang/da_GL.php new file mode 100644 index 00000000000..07c92d4ebac --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/da_GL.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/da.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + 'LL' => 'D. MMM YYYY', + 'LLL' => 'D. MMMM YYYY HH.mm', + 'LLLL' => 'dddd [den] D. MMMM YYYY HH.mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/dav.php b/libraries/Carbon/src/Carbon/Lang/dav.php new file mode 100644 index 00000000000..4b4a7548bbf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dav.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Luma lwa K', 'luma lwa p'], + 'weekdays' => ['Ituku ja jumwa', 'Kuramuka jimweri', 'Kuramuka kawi', 'Kuramuka kadadu', 'Kuramuka kana', 'Kuramuka kasanu', 'Kifula nguwo'], + 'weekdays_short' => ['Jum', 'Jim', 'Kaw', 'Kad', 'Kan', 'Kas', 'Ngu'], + 'weekdays_min' => ['Jum', 'Jim', 'Kaw', 'Kad', 'Kan', 'Kas', 'Ngu'], + 'months' => ['Mori ghwa imbiri', 'Mori ghwa kawi', 'Mori ghwa kadadu', 'Mori ghwa kana', 'Mori ghwa kasanu', 'Mori ghwa karandadu', 'Mori ghwa mfungade', 'Mori ghwa wunyanya', 'Mori ghwa ikenda', 'Mori ghwa ikumi', 'Mori ghwa ikumi na imweri', 'Mori ghwa ikumi na iwi'], + 'months_short' => ['Imb', 'Kaw', 'Kad', 'Kan', 'Kas', 'Kar', 'Mfu', 'Wun', 'Ike', 'Iku', 'Imw', 'Iwi'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/de.php b/libraries/Carbon/src/Carbon/Lang/de.php new file mode 100644 index 00000000000..d3ad01e03a8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Michael Hohl + * - sheriffmarley + * - dennisoderwald + * - Timo + * - Karag2006 + * - Pete Scopes (pdscopes) + */ +return [ + 'year' => ':count Jahr|:count Jahre', + 'a_year' => 'ein Jahr|:count Jahre', + 'y' => ':count J.', + 'month' => ':count Monat|:count Monate', + 'a_month' => 'ein Monat|:count Monate', + 'm' => ':count Mon.', + 'week' => ':count Woche|:count Wochen', + 'a_week' => 'eine Woche|:count Wochen', + 'w' => ':count Wo.', + 'day' => ':count Tag|:count Tage', + 'a_day' => 'ein Tag|:count Tage', + 'd' => ':count Tg.', + 'hour' => ':count Stunde|:count Stunden', + 'a_hour' => 'eine Stunde|:count Stunden', + 'h' => ':count Std.', + 'minute' => ':count Minute|:count Minuten', + 'a_minute' => 'eine Minute|:count Minuten', + 'min' => ':count Min.', + 'second' => ':count Sekunde|:count Sekunden', + 'a_second' => 'ein paar Sekunden|:count Sekunden', + 's' => ':count Sek.', + 'millisecond' => ':count Millisekunde|:count Millisekunden', + 'a_millisecond' => 'eine Millisekunde|:count Millisekunden', + 'ms' => ':countms', + 'microsecond' => ':count Mikrosekunde|:count Mikrosekunden', + 'a_microsecond' => 'eine Mikrosekunde|:count Mikrosekunden', + 'µs' => ':countµs', + 'ago' => 'vor :time', + 'from_now' => 'in :time', + 'after' => ':time später', + 'before' => ':time zuvor', + + 'year_from_now' => ':count Jahr|:count Jahren', + 'month_from_now' => ':count Monat|:count Monaten', + 'week_from_now' => ':count Woche|:count Wochen', + 'day_from_now' => ':count Tag|:count Tagen', + 'year_ago' => ':count Jahr|:count Jahren', + 'month_ago' => ':count Monat|:count Monaten', + 'week_ago' => ':count Woche|:count Wochen', + 'day_ago' => ':count Tag|:count Tagen', + 'a_year_from_now' => 'ein Jahr|:count Jahren', + 'a_month_from_now' => 'ein Monat|:count Monaten', + 'a_week_from_now' => 'eine Woche|:count Wochen', + 'a_day_from_now' => 'ein Tag|:count Tagen', + 'a_year_ago' => 'ein Jahr|:count Jahren', + 'a_month_ago' => 'ein Monat|:count Monaten', + 'a_week_ago' => 'eine Woche|:count Wochen', + 'a_day_ago' => 'ein Tag|:count Tagen', + + 'diff_now' => 'Gerade eben', + 'diff_today' => 'heute', + 'diff_today_regexp' => 'heute(?:\\s+um)?', + 'diff_yesterday' => 'Gestern', + 'diff_yesterday_regexp' => 'gestern(?:\\s+um)?', + 'diff_tomorrow' => 'Morgen', + 'diff_tomorrow_regexp' => 'morgen(?:\\s+um)?', + 'diff_before_yesterday' => 'Vorgestern', + 'diff_after_tomorrow' => 'Übermorgen', + + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D. MMMM YYYY HH:mm', + ], + + 'calendar' => [ + 'sameDay' => '[heute um] LT [Uhr]', + 'nextDay' => '[morgen um] LT [Uhr]', + 'nextWeek' => 'dddd [um] LT [Uhr]', + 'lastDay' => '[gestern um] LT [Uhr]', + 'lastWeek' => '[letzten] dddd [um] LT [Uhr]', + 'sameElse' => 'L', + ], + + 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], + 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], + 'weekdays' => ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'], + 'weekdays_short' => ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'], + 'weekdays_min' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], + 'ordinal' => ':number.', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' und '], + 'ordinal_words' => [ + 'of' => 'im', + 'first' => 'erster', + 'second' => 'zweiter', + 'third' => 'dritter', + 'fourth' => 'vierten', + 'fifth' => 'fünfter', + 'last' => 'letzten', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/de_AT.php b/libraries/Carbon/src/Carbon/Lang/de_AT.php new file mode 100644 index 00000000000..9e5b06c442f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de_AT.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - sheriffmarley + * - Timo + * - Michael Hohl + * - Namoshek + * - Bernhard Baumrock (BernhardBaumrock) + */ +return array_replace_recursive(require __DIR__.'/de.php', [ + 'months' => [ + 0 => 'Jänner', + ], + 'months_short' => [ + 0 => 'Jän', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/de_BE.php b/libraries/Carbon/src/Carbon/Lang/de_BE.php new file mode 100644 index 00000000000..d89fff17363 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de_BE.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/de.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/de_CH.php b/libraries/Carbon/src/Carbon/Lang/de_CH.php new file mode 100644 index 00000000000..2a979747338 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de_CH.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - sheriffmarley + * - Timo + * - Michael Hohl + */ +return array_replace_recursive(require __DIR__.'/de.php', [ + 'weekdays_short' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/de_DE.php b/libraries/Carbon/src/Carbon/Lang/de_DE.php new file mode 100644 index 00000000000..046f924dbbf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de_DE.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org + */ +return require __DIR__.'/de.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/de_IT.php b/libraries/Carbon/src/Carbon/Lang/de_IT.php new file mode 100644 index 00000000000..1d2cec9cad9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de_IT.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Matthias Dieter Wallno:fer libc-locales@sourceware.org + */ +return require __DIR__.'/de.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/de_LI.php b/libraries/Carbon/src/Carbon/Lang/de_LI.php new file mode 100644 index 00000000000..04279d84771 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de_LI.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/de.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/de_LU.php b/libraries/Carbon/src/Carbon/Lang/de_LU.php new file mode 100644 index 00000000000..d89fff17363 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/de_LU.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/de.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/dje.php b/libraries/Carbon/src/Carbon/Lang/dje.php new file mode 100644 index 00000000000..e89fc6fe7a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dje.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Subbaahi', 'Zaarikay b'], + 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamisi', 'Alzuma', 'Asibti'], + 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], + 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], + 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], + 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'year' => ':count hari', // less reliable + 'y' => ':count hari', // less reliable + 'a_year' => ':count hari', // less reliable + + 'week' => ':count alzuma', // less reliable + 'w' => ':count alzuma', // less reliable + 'a_week' => ':count alzuma', // less reliable + + 'second' => ':count atinni', // less reliable + 's' => ':count atinni', // less reliable + 'a_second' => ':count atinni', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/doi.php b/libraries/Carbon/src/Carbon/Lang/doi.php new file mode 100644 index 00000000000..f5ee23b9c5a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/doi.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/doi_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/doi_IN.php b/libraries/Carbon/src/Carbon/Lang/doi_IN.php new file mode 100644 index 00000000000..f31293c3607 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/doi_IN.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat Pune libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'एप्रैल', 'मेई', 'जून', 'जूलै', 'अगस्त', 'सितंबर', 'अक्तूबर', 'नवंबर', 'दिसंबर'], + 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'एप्रैल', 'मेई', 'जून', 'जूलै', 'अगस्त', 'सितंबर', 'अक्तूबर', 'नवंबर', 'दिसंबर'], + 'weekdays' => ['ऐतबार', 'सोमबार', 'मंगलबर', 'बुधबार', 'बीरबार', 'शुक्करबार', 'श्नीचरबार'], + 'weekdays_short' => ['ऐत', 'सोम', 'मंगल', 'बुध', 'बीर', 'शुक्कर', 'श्नीचर'], + 'weekdays_min' => ['ऐत', 'सोम', 'मंगल', 'बुध', 'बीर', 'शुक्कर', 'श्नीचर'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['सञं', 'सबेर'], + + 'second' => ':count सङार', // less reliable + 's' => ':count सङार', // less reliable + 'a_second' => ':count सङार', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/dsb.php b/libraries/Carbon/src/Carbon/Lang/dsb.php new file mode 100644 index 00000000000..395a1932c0f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dsb.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/dsb_DE.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/dsb_DE.php b/libraries/Carbon/src/Carbon/Lang/dsb_DE.php new file mode 100644 index 00000000000..cd057a84bc7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dsb_DE.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Information from Michael Wolf bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'DD. MMMM YYYY', + 'LLL' => 'DD. MMMM, HH:mm [góź.]', + 'LLLL' => 'dddd, DD. MMMM YYYY, HH:mm [góź.]', + ], + 'months' => ['januara', 'februara', 'měrca', 'apryla', 'maja', 'junija', 'julija', 'awgusta', 'septembra', 'oktobra', 'nowembra', 'decembra'], + 'months_short' => ['Jan', 'Feb', 'Měr', 'Apr', 'Maj', 'Jun', 'Jul', 'Awg', 'Sep', 'Okt', 'Now', 'Dec'], + 'weekdays' => ['Njeźela', 'Pónjeźele', 'Wałtora', 'Srjoda', 'Stwórtk', 'Pětk', 'Sobota'], + 'weekdays_short' => ['Nj', 'Pó', 'Wa', 'Sr', 'St', 'Pě', 'So'], + 'weekdays_min' => ['Nj', 'Pó', 'Wa', 'Sr', 'St', 'Pě', 'So'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count lěto', + 'y' => ':count lěto', + 'a_year' => ':count lěto', + + 'month' => ':count mjasec', + 'm' => ':count mjasec', + 'a_month' => ':count mjasec', + + 'week' => ':count tyźeń', + 'w' => ':count tyźeń', + 'a_week' => ':count tyźeń', + + 'day' => ':count źeń', + 'd' => ':count źeń', + 'a_day' => ':count źeń', + + 'hour' => ':count góźina', + 'h' => ':count góźina', + 'a_hour' => ':count góźina', + + 'minute' => ':count minuta', + 'min' => ':count minuta', + 'a_minute' => ':count minuta', + + 'second' => ':count drugi', + 's' => ':count drugi', + 'a_second' => ':count drugi', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/dua.php b/libraries/Carbon/src/Carbon/Lang/dua.php new file mode 100644 index 00000000000..1dca0d4a4c0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dua.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['idiɓa', 'ebyámu'], + 'weekdays' => ['éti', 'mɔ́sú', 'kwasú', 'mukɔ́sú', 'ŋgisú', 'ɗónɛsú', 'esaɓasú'], + 'weekdays_short' => ['ét', 'mɔ́s', 'kwa', 'muk', 'ŋgi', 'ɗón', 'esa'], + 'weekdays_min' => ['ét', 'mɔ́s', 'kwa', 'muk', 'ŋgi', 'ɗón', 'esa'], + 'months' => ['dimɔ́di', 'ŋgɔndɛ', 'sɔŋɛ', 'diɓáɓá', 'emiasele', 'esɔpɛsɔpɛ', 'madiɓɛ́díɓɛ́', 'diŋgindi', 'nyɛtɛki', 'mayésɛ́', 'tiníní', 'eláŋgɛ́'], + 'months_short' => ['di', 'ŋgɔn', 'sɔŋ', 'diɓ', 'emi', 'esɔ', 'mad', 'diŋ', 'nyɛt', 'may', 'tin', 'elá'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'year' => ':count ma mbu', // less reliable + 'y' => ':count ma mbu', // less reliable + 'a_year' => ':count ma mbu', // less reliable + + 'month' => ':count myo̱di', // less reliable + 'm' => ':count myo̱di', // less reliable + 'a_month' => ':count myo̱di', // less reliable + + 'week' => ':count woki', // less reliable + 'w' => ':count woki', // less reliable + 'a_week' => ':count woki', // less reliable + + 'day' => ':count buńa', // less reliable + 'd' => ':count buńa', // less reliable + 'a_day' => ':count buńa', // less reliable + + 'hour' => ':count ma awa', // less reliable + 'h' => ':count ma awa', // less reliable + 'a_hour' => ':count ma awa', // less reliable + + 'minute' => ':count minuti', // less reliable + 'min' => ':count minuti', // less reliable + 'a_minute' => ':count minuti', // less reliable + + 'second' => ':count maba', // less reliable + 's' => ':count maba', // less reliable + 'a_second' => ':count maba', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/dv.php b/libraries/Carbon/src/Carbon/Lang/dv.php new file mode 100644 index 00000000000..291b92f2ab8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dv.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +$months = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު', +]; + +$weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު', +]; + +/* + * Authors: + * - Josh Soref + * - Jawish Hameed + */ +return [ + 'year' => ':count '.'އަހަރު', + 'a_year' => '{1}'.'އަހަރެއް'.'|:count '.'އަހަރު', + 'month' => ':count '.'މަސް', + 'a_month' => '{1}'.'މަހެއް'.'|:count '.'މަސް', + 'week' => ':count '.'ހަފްތާ', + 'a_week' => '{1}'.'ސިކުންތުކޮޅެއް'.'|:count '.'ހަފްތާ', + 'day' => ':count '.'ދުވަސް', + 'a_day' => '{1}'.'ދުވަހެއް'.'|:count '.'ދުވަސް', + 'hour' => ':count '.'ގަޑިއިރު', + 'a_hour' => '{1}'.'ގަޑިއިރެއް'.'|:count '.'ގަޑިއިރު', + 'minute' => ':count '.'މިނިޓު', + 'a_minute' => '{1}'.'މިނިޓެއް'.'|:count '.'މިނިޓު', + 'second' => ':count '.'ސިކުންތު', + 'a_second' => '{1}'.'ސިކުންތުކޮޅެއް'.'|:count '.'ސިކުންތު', + 'ago' => 'ކުރިން :time', + 'from_now' => 'ތެރޭގައި :time', + 'after' => ':time ފަހުން', + 'before' => ':time ކުރި', + 'diff_yesterday' => 'އިއްޔެ', + 'diff_today' => 'މިއަދު', + 'diff_tomorrow' => 'މާދަމާ', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[މިއަދު] LT', + 'nextDay' => '[މާދަމާ] LT', + 'nextWeek' => 'dddd LT', + 'lastDay' => '[އިއްޔެ] LT', + 'lastWeek' => '[ފާއިތުވި] dddd LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['މކ', 'މފ'], + 'months' => $months, + 'months_short' => $months, + 'weekdays' => $weekdays, + 'weekdays_short' => $weekdays, + 'weekdays_min' => ['އާދި', 'ހޯމަ', 'އަން', 'ބުދަ', 'ބުރާ', 'ހުކު', 'ހޮނި'], + 'list' => [', ', ' އަދި '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/dv_MV.php b/libraries/Carbon/src/Carbon/Lang/dv_MV.php new file mode 100644 index 00000000000..835e807c7ec --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dv_MV.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ahmed Ali + */ + +$months = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު', +]; + +$weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު', +]; + +return [ + 'year' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', + 'y' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', + 'month' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', + 'm' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', + 'week' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', + 'w' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', + 'day' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', + 'd' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', + 'hour' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', + 'h' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', + 'minute' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', + 'min' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', + 'second' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', + 's' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', + 'ago' => ':time ކުރިން', + 'from_now' => ':time ފަހުން', + 'after' => ':time ފަހުން', + 'before' => ':time ކުރި', + 'diff_yesterday' => 'އިއްޔެ', + 'diff_today' => 'މިއަދު', + 'diff_tomorrow' => 'މާދަމާ', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[މިއަދު] LT', + 'nextDay' => '[މާދަމާ] LT', + 'nextWeek' => 'dddd LT', + 'lastDay' => '[އިއްޔެ] LT', + 'lastWeek' => '[ފާއިތުވި] dddd LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['މކ', 'މފ'], + 'months' => $months, + 'months_short' => $months, + 'weekdays' => $weekdays, + 'weekdays_short' => $weekdays, + 'weekdays_min' => ['އާދި', 'ހޯމަ', 'އަން', 'ބުދަ', 'ބުރާ', 'ހުކު', 'ހޮނި'], + 'list' => [', ', ' އަދި '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/dyo.php b/libraries/Carbon/src/Carbon/Lang/dyo.php new file mode 100644 index 00000000000..bd0cdf80c29 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dyo.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['Dimas', 'Teneŋ', 'Talata', 'Alarbay', 'Aramisay', 'Arjuma', 'Sibiti'], + 'weekdays_short' => ['Dim', 'Ten', 'Tal', 'Ala', 'Ara', 'Arj', 'Sib'], + 'weekdays_min' => ['Dim', 'Ten', 'Tal', 'Ala', 'Ara', 'Arj', 'Sib'], + 'months' => ['Sanvie', 'Fébirie', 'Mars', 'Aburil', 'Mee', 'Sueŋ', 'Súuyee', 'Ut', 'Settembar', 'Oktobar', 'Novembar', 'Disambar'], + 'months_short' => ['Sa', 'Fe', 'Ma', 'Ab', 'Me', 'Su', 'Sú', 'Ut', 'Se', 'Ok', 'No', 'De'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/dz.php b/libraries/Carbon/src/Carbon/Lang/dz.php new file mode 100644 index 00000000000..a68dc5fc73e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dz.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/dz_BT.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/dz_BT.php b/libraries/Carbon/src/Carbon/Lang/dz_BT.php new file mode 100644 index 00000000000..e5868d6eb7d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/dz_BT.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Sherubtse College bug-glibc@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'པསྱི་ལོYYཟལMMཚེསDD', + ], + 'months' => ['ཟླ་བ་དང་པ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་ཕ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུནཔ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], + 'months_short' => ['ཟླ་༡', 'ཟླ་༢', 'ཟླ་༣', 'ཟླ་༤', 'ཟླ་༥', 'ཟླ་༦', 'ཟླ་༧', 'ཟླ་༨', 'ཟླ་༩', 'ཟླ་༡༠', 'ཟླ་༡༡', 'ཟླ་༡༢'], + 'weekdays' => ['གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་ཕ་', 'གཟའ་པུར་བུ་', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་ཕ་', 'གཟའ་ཉི་མ་'], + 'weekdays_short' => ['ཟླ་', 'མིར་', 'ལྷག་', 'པུར་', 'སངས་', 'སྤེན་', 'ཉི་'], + 'weekdays_min' => ['ཟླ་', 'མིར་', 'ལྷག་', 'པུར་', 'སངས་', 'སྤེན་', 'ཉི་'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ངས་ཆ', 'ཕྱི་ཆ'], + + 'year' => ':count ཆརཔ', // less reliable + 'y' => ':count ཆརཔ', // less reliable + 'a_year' => ':count ཆརཔ', // less reliable + + 'month' => ':count ཟླ་བ', // less reliable + 'm' => ':count ཟླ་བ', // less reliable + 'a_month' => ':count ཟླ་བ', // less reliable + + 'day' => ':count ཉི', // less reliable + 'd' => ':count ཉི', // less reliable + 'a_day' => ':count ཉི', // less reliable + + 'second' => ':count ཆ', // less reliable + 's' => ':count ཆ', // less reliable + 'a_second' => ':count ཆ', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ebu.php b/libraries/Carbon/src/Carbon/Lang/ebu.php new file mode 100644 index 00000000000..6c59f4b6265 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ebu.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['KI', 'UT'], + 'weekdays' => ['Kiumia', 'Njumatatu', 'Njumaine', 'Njumatano', 'Aramithi', 'Njumaa', 'NJumamothii'], + 'weekdays_short' => ['Kma', 'Tat', 'Ine', 'Tan', 'Arm', 'Maa', 'NMM'], + 'weekdays_min' => ['Kma', 'Tat', 'Ine', 'Tan', 'Arm', 'Maa', 'NMM'], + 'months' => ['Mweri wa mbere', 'Mweri wa kaĩri', 'Mweri wa kathatũ', 'Mweri wa kana', 'Mweri wa gatano', 'Mweri wa gatantatũ', 'Mweri wa mũgwanja', 'Mweri wa kanana', 'Mweri wa kenda', 'Mweri wa ikũmi', 'Mweri wa ikũmi na ũmwe', 'Mweri wa ikũmi na Kaĩrĩ'], + 'months_short' => ['Mbe', 'Kai', 'Kat', 'Kan', 'Gat', 'Gan', 'Mug', 'Knn', 'Ken', 'Iku', 'Imw', 'Igi'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ee.php b/libraries/Carbon/src/Carbon/Lang/ee.php new file mode 100644 index 00000000000..3a64e8f939e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ee.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['ŋ', 'ɣ'], + 'weekdays' => ['kɔsiɖa', 'dzoɖa', 'blaɖa', 'kuɖa', 'yawoɖa', 'fiɖa', 'memleɖa'], + 'weekdays_short' => ['kɔs', 'dzo', 'bla', 'kuɖ', 'yaw', 'fiɖ', 'mem'], + 'weekdays_min' => ['kɔs', 'dzo', 'bla', 'kuɖ', 'yaw', 'fiɖ', 'mem'], + 'months' => ['dzove', 'dzodze', 'tedoxe', 'afɔfĩe', 'dama', 'masa', 'siamlɔm', 'deasiamime', 'anyɔnyɔ', 'kele', 'adeɛmekpɔxe', 'dzome'], + 'months_short' => ['dzv', 'dzd', 'ted', 'afɔ', 'dam', 'mas', 'sia', 'dea', 'any', 'kel', 'ade', 'dzm'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'a [ga] h:mm', + 'LTS' => 'a [ga] h:mm:ss', + 'L' => 'M/D/YYYY', + 'LL' => 'MMM D [lia], YYYY', + 'LLL' => 'a [ga] h:mm MMMM D [lia] YYYY', + 'LLLL' => 'a [ga] h:mm dddd, MMMM D [lia] YYYY', + ], + + 'year' => 'ƒe :count', + 'y' => 'ƒe :count', + 'a_year' => 'ƒe :count', + + 'month' => 'ɣleti :count', + 'm' => 'ɣleti :count', + 'a_month' => 'ɣleti :count', + + 'week' => 'kwasiɖa :count', + 'w' => 'kwasiɖa :count', + 'a_week' => 'kwasiɖa :count', + + 'day' => 'ŋkeke :count', + 'd' => 'ŋkeke :count', + 'a_day' => 'ŋkeke :count', + + 'hour' => 'gaƒoƒo :count', + 'h' => 'gaƒoƒo :count', + 'a_hour' => 'gaƒoƒo :count', + + 'minute' => 'miniti :count', // less reliable + 'min' => 'miniti :count', // less reliable + 'a_minute' => 'miniti :count', // less reliable + + 'second' => 'sɛkɛnd :count', // less reliable + 's' => 'sɛkɛnd :count', // less reliable + 'a_second' => 'sɛkɛnd :count', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ee_TG.php b/libraries/Carbon/src/Carbon/Lang/ee_TG.php new file mode 100644 index 00000000000..6cf30765c88 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ee_TG.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ee.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'LLL' => 'HH:mm MMMM D [lia] YYYY', + 'LLLL' => 'HH:mm dddd, MMMM D [lia] YYYY', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/el.php b/libraries/Carbon/src/Carbon/Lang/el.php new file mode 100644 index 00000000000..afb926a9e79 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/el.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Alessandro Di Felice + * - François B + * - Tim Fish + * - Gabriel Monteagudo + * - JD Isaacks + * - yiannisdesp + * - Ilias Kasmeridis (iliaskasm) + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count χρόνος|:count χρόνια', + 'a_year' => 'ένας χρόνος|:count χρόνια', + 'y' => ':count χρ.', + 'month' => ':count μήνας|:count μήνες', + 'a_month' => 'ένας μήνας|:count μήνες', + 'm' => ':count μήν.', + 'week' => ':count εβδομάδα|:count εβδομάδες', + 'a_week' => 'μια εβδομάδα|:count εβδομάδες', + 'w' => ':count εβδ.', + 'day' => ':count μέρα|:count μέρες', + 'a_day' => 'μία μέρα|:count μέρες', + 'd' => ':count μέρ.', + 'hour' => ':count ώρα|:count ώρες', + 'a_hour' => 'μία ώρα|:count ώρες', + 'h' => ':count ώρα|:count ώρες', + 'minute' => ':count λεπτό|:count λεπτά', + 'a_minute' => 'ένα λεπτό|:count λεπτά', + 'min' => ':count λεπ.', + 'second' => ':count δευτερόλεπτο|:count δευτερόλεπτα', + 'a_second' => 'λίγα δευτερόλεπτα|:count δευτερόλεπτα', + 's' => ':count δευ.', + 'ago' => 'πριν :time', + 'from_now' => 'σε :time', + 'after' => ':time μετά', + 'before' => ':time πριν', + 'diff_now' => 'τώρα', + 'diff_today' => 'Σήμερα', + 'diff_today_regexp' => 'Σήμερα(?:\\s+{})?', + 'diff_yesterday' => 'χθες', + 'diff_yesterday_regexp' => 'Χθες(?:\\s+{})?', + 'diff_tomorrow' => 'αύριο', + 'diff_tomorrow_regexp' => 'Αύριο(?:\\s+{})?', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm A', + 'LLLL' => 'dddd, D MMMM YYYY h:mm A', + ], + 'calendar' => [ + 'sameDay' => '[Σήμερα {}] LT', + 'nextDay' => '[Αύριο {}] LT', + 'nextWeek' => 'dddd [{}] LT', + 'lastDay' => '[Χθες {}] LT', + 'lastWeek' => function (CarbonInterface $current) { + switch ($current->dayOfWeek) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':numberη', + 'meridiem' => ['ΠΜ', 'ΜΜ', 'πμ', 'μμ'], + 'months' => ['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου'], + 'months_standalone' => ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'], + 'months_regexp' => '/(D[oD]?[\s,]+MMMM|L{2,4}|l{2,4})/', + 'months_short' => ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'], + 'weekdays' => ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'], + 'weekdays_short' => ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'], + 'weekdays_min' => ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σα'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' και '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/el_CY.php b/libraries/Carbon/src/Carbon/Lang/el_CY.php new file mode 100644 index 00000000000..7988c400ed0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/el_CY.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Greek Debian Translation Team bug-glibc@gnu.org + */ +return array_replace_recursive(require __DIR__.'/el.php', [ + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/el_GR.php b/libraries/Carbon/src/Carbon/Lang/el_GR.php new file mode 100644 index 00000000000..57e6ec5afd9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/el_GR.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/el.php', [ + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en.php b/libraries/Carbon/src/Carbon/Lang/en.php new file mode 100644 index 00000000000..b4691411737 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Milos Sakovic + * - Paul + * - Pete Scopes (pdscopes) + */ +return [ + /* + * {1}, {0} and ]1,Inf[ are not needed as it's the default for English pluralization. + * But as some languages are using en.php as a fallback, it's better to specify it + * explicitly so those languages also fallback to English pluralization when a unit + * is missing. + */ + 'year' => '{1}:count year|{0}:count years|]1,Inf[:count years', + 'a_year' => '{1}a year|{0}:count years|]1,Inf[:count years', + 'y' => '{1}:countyr|{0}:countyrs|]1,Inf[:countyrs', + 'month' => '{1}:count month|{0}:count months|]1,Inf[:count months', + 'a_month' => '{1}a month|{0}:count months|]1,Inf[:count months', + 'm' => '{1}:countmo|{0}:countmos|]1,Inf[:countmos', + 'week' => '{1}:count week|{0}:count weeks|]1,Inf[:count weeks', + 'a_week' => '{1}a week|{0}:count weeks|]1,Inf[:count weeks', + 'w' => ':countw', + 'day' => '{1}:count day|{0}:count days|]1,Inf[:count days', + 'a_day' => '{1}a day|{0}:count days|]1,Inf[:count days', + 'd' => ':countd', + 'hour' => '{1}:count hour|{0}:count hours|]1,Inf[:count hours', + 'a_hour' => '{1}an hour|{0}:count hours|]1,Inf[:count hours', + 'h' => ':counth', + 'minute' => '{1}:count minute|{0}:count minutes|]1,Inf[:count minutes', + 'a_minute' => '{1}a minute|{0}:count minutes|]1,Inf[:count minutes', + 'min' => ':countm', + 'second' => '{1}:count second|{0}:count seconds|]1,Inf[:count seconds', + 'a_second' => '{1}a few seconds|{0}:count seconds|]1,Inf[:count seconds', + 's' => ':counts', + 'millisecond' => '{1}:count millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds', + 'a_millisecond' => '{1}a millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds', + 'ms' => ':countms', + 'microsecond' => '{1}:count microsecond|{0}:count microseconds|]1,Inf[:count microseconds', + 'a_microsecond' => '{1}a microsecond|{0}:count microseconds|]1,Inf[:count microseconds', + 'µs' => ':countµs', + 'ago' => ':time ago', + 'from_now' => ':time from now', + 'after' => ':time after', + 'before' => ':time before', + 'diff_now' => 'just now', + 'diff_today' => 'today', + 'diff_yesterday' => 'yesterday', + 'diff_tomorrow' => 'tomorrow', + 'diff_before_yesterday' => 'before yesterday', + 'diff_after_tomorrow' => 'after tomorrow', + 'period_recurrences' => '{1}once|{0}:count times|]1,Inf[:count times', + 'period_interval' => 'every :interval', + 'period_start_date' => 'from :date', + 'period_end_date' => 'to :date', + 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + 'weekdays' => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + 'weekdays_min' => ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], + 'ordinal' => function ($number) { + $lastDigit = $number % 10; + + return $number.( + ((int) ($number % 100 / 10) === 1) ? 'th' : ( + ($lastDigit === 1) ? 'st' : ( + ($lastDigit === 2) ? 'nd' : ( + ($lastDigit === 3) ? 'rd' : 'th' + ) + ) + ) + ); + }, + 'list' => [', ', ' and '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/en_001.php b/libraries/Carbon/src/Carbon/Lang/en_001.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_001.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_150.php b/libraries/Carbon/src/Carbon/Lang/en_150.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_150.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_AG.php b/libraries/Carbon/src/Carbon/Lang/en_AG.php new file mode 100644 index 00000000000..166b17b1a4f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_AG.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_AI.php b/libraries/Carbon/src/Carbon/Lang/en_AI.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_AI.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_AS.php b/libraries/Carbon/src/Carbon/Lang/en_AS.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_AS.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_AT.php b/libraries/Carbon/src/Carbon/Lang/en_AT.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_AT.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_AU.php b/libraries/Carbon/src/Carbon/Lang/en_AU.php new file mode 100644 index 00000000000..bb69c4f001d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_AU.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kunal Marwaha + * - François B + * - Mayank Badola + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm A', + 'LLLL' => 'dddd, D MMMM YYYY h:mm A', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_BB.php b/libraries/Carbon/src/Carbon/Lang/en_BB.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_BB.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_BE.php b/libraries/Carbon/src/Carbon/Lang/en_BE.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_BE.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_BI.php b/libraries/Carbon/src/Carbon/Lang/en_BI.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_BI.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_BM.php b/libraries/Carbon/src/Carbon/Lang/en_BM.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_BM.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_BS.php b/libraries/Carbon/src/Carbon/Lang/en_BS.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_BS.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_BW.php b/libraries/Carbon/src/Carbon/Lang/en_BW.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_BW.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_BZ.php b/libraries/Carbon/src/Carbon/Lang/en_BZ.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_BZ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_CA.php b/libraries/Carbon/src/Carbon/Lang/en_CA.php new file mode 100644 index 00000000000..b8a7cb1a546 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_CA.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Zhan Tong Zhang + * - Mayank Badola + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'L' => 'YYYY-MM-DD', + 'LL' => 'MMMM D, YYYY', + 'LLL' => 'MMMM D, YYYY h:mm A', + 'LLLL' => 'dddd, MMMM D, YYYY h:mm A', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_CC.php b/libraries/Carbon/src/Carbon/Lang/en_CC.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_CC.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_CH.php b/libraries/Carbon/src/Carbon/Lang/en_CH.php new file mode 100644 index 00000000000..671f522d623 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_CH.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_CK.php b/libraries/Carbon/src/Carbon/Lang/en_CK.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_CK.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_CM.php b/libraries/Carbon/src/Carbon/Lang/en_CM.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_CM.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_CX.php b/libraries/Carbon/src/Carbon/Lang/en_CX.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_CX.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_CY.php b/libraries/Carbon/src/Carbon/Lang/en_CY.php new file mode 100644 index 00000000000..ed9b1f895d9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_CY.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - NehaGautam + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD-MM-YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_DE.php b/libraries/Carbon/src/Carbon/Lang/en_DE.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_DE.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_DG.php b/libraries/Carbon/src/Carbon/Lang/en_DG.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_DG.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_DK.php b/libraries/Carbon/src/Carbon/Lang/en_DK.php new file mode 100644 index 00000000000..ddb7a9d7362 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_DK.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Danish Standards Association bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_DM.php b/libraries/Carbon/src/Carbon/Lang/en_DM.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_DM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_ER.php b/libraries/Carbon/src/Carbon/Lang/en_ER.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_ER.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_FI.php b/libraries/Carbon/src/Carbon/Lang/en_FI.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_FI.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_FJ.php b/libraries/Carbon/src/Carbon/Lang/en_FJ.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_FJ.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_FK.php b/libraries/Carbon/src/Carbon/Lang/en_FK.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_FK.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_FM.php b/libraries/Carbon/src/Carbon/Lang/en_FM.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_FM.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_GB.php b/libraries/Carbon/src/Carbon/Lang/en_GB.php new file mode 100644 index 00000000000..2273bdcc284 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GB.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Mayank Badola + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_GD.php b/libraries/Carbon/src/Carbon/Lang/en_GD.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GD.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_GG.php b/libraries/Carbon/src/Carbon/Lang/en_GG.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GG.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_GH.php b/libraries/Carbon/src/Carbon/Lang/en_GH.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GH.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_GI.php b/libraries/Carbon/src/Carbon/Lang/en_GI.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GI.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_GM.php b/libraries/Carbon/src/Carbon/Lang/en_GM.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GM.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_GU.php b/libraries/Carbon/src/Carbon/Lang/en_GU.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GU.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_GY.php b/libraries/Carbon/src/Carbon/Lang/en_GY.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_GY.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_HK.php b/libraries/Carbon/src/Carbon/Lang/en_HK.php new file mode 100644 index 00000000000..6aba4ba83ce --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_HK.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_IE.php b/libraries/Carbon/src/Carbon/Lang/en_IE.php new file mode 100644 index 00000000000..6900750a53d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_IE.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Martin McWhorter + * - François B + * - Chris Cartlidge + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD-MM-YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_IL.php b/libraries/Carbon/src/Carbon/Lang/en_IL.php new file mode 100644 index 00000000000..c2466aa9932 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_IL.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Yoav Amit + * - François B + * - Mayank Badola + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_IM.php b/libraries/Carbon/src/Carbon/Lang/en_IM.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_IM.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_IN.php b/libraries/Carbon/src/Carbon/Lang/en_IN.php new file mode 100644 index 00000000000..a9f7f7c1052 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_IN.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YY', + 'LL' => 'MMMM DD, YYYY', + 'LLL' => 'DD MMM HH:mm', + 'LLLL' => 'MMMM DD, YYYY HH:mm', + ], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_IO.php b/libraries/Carbon/src/Carbon/Lang/en_IO.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_IO.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_ISO.php b/libraries/Carbon/src/Carbon/Lang/en_ISO.php new file mode 100644 index 00000000000..0b0b9d7fba1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_ISO.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'dddd, YYYY MMMM DD HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_JE.php b/libraries/Carbon/src/Carbon/Lang/en_JE.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_JE.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_JM.php b/libraries/Carbon/src/Carbon/Lang/en_JM.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_JM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_KE.php b/libraries/Carbon/src/Carbon/Lang/en_KE.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_KE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_KI.php b/libraries/Carbon/src/Carbon/Lang/en_KI.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_KI.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_KN.php b/libraries/Carbon/src/Carbon/Lang/en_KN.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_KN.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_KY.php b/libraries/Carbon/src/Carbon/Lang/en_KY.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_KY.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_LC.php b/libraries/Carbon/src/Carbon/Lang/en_LC.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_LC.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_LR.php b/libraries/Carbon/src/Carbon/Lang/en_LR.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_LR.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_LS.php b/libraries/Carbon/src/Carbon/Lang/en_LS.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_LS.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_MG.php b/libraries/Carbon/src/Carbon/Lang/en_MG.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MG.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_MH.php b/libraries/Carbon/src/Carbon/Lang/en_MH.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MH.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_MO.php b/libraries/Carbon/src/Carbon/Lang/en_MO.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_MP.php b/libraries/Carbon/src/Carbon/Lang/en_MP.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MP.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_MS.php b/libraries/Carbon/src/Carbon/Lang/en_MS.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MS.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_MT.php b/libraries/Carbon/src/Carbon/Lang/en_MT.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MT.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_MU.php b/libraries/Carbon/src/Carbon/Lang/en_MU.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MU.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_MW.php b/libraries/Carbon/src/Carbon/Lang/en_MW.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MW.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_MY.php b/libraries/Carbon/src/Carbon/Lang/en_MY.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_MY.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_NA.php b/libraries/Carbon/src/Carbon/Lang/en_NA.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_NA.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_NF.php b/libraries/Carbon/src/Carbon/Lang/en_NF.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_NF.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_NG.php b/libraries/Carbon/src/Carbon/Lang/en_NG.php new file mode 100644 index 00000000000..9c4ddf6acab --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_NG.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_NL.php b/libraries/Carbon/src/Carbon/Lang/en_NL.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_NL.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_NR.php b/libraries/Carbon/src/Carbon/Lang/en_NR.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_NR.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_NU.php b/libraries/Carbon/src/Carbon/Lang/en_NU.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_NU.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_NZ.php b/libraries/Carbon/src/Carbon/Lang/en_NZ.php new file mode 100644 index 00000000000..53e321e6b95 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_NZ.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Mayank Badola + * - Luke McGregor + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm A', + 'LLLL' => 'dddd, D MMMM YYYY h:mm A', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_PG.php b/libraries/Carbon/src/Carbon/Lang/en_PG.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_PG.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_PH.php b/libraries/Carbon/src/Carbon/Lang/en_PH.php new file mode 100644 index 00000000000..6aba4ba83ce --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_PH.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_PK.php b/libraries/Carbon/src/Carbon/Lang/en_PK.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_PK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_PN.php b/libraries/Carbon/src/Carbon/Lang/en_PN.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_PN.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_PR.php b/libraries/Carbon/src/Carbon/Lang/en_PR.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_PR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_PW.php b/libraries/Carbon/src/Carbon/Lang/en_PW.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_PW.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_RW.php b/libraries/Carbon/src/Carbon/Lang/en_RW.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_RW.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SB.php b/libraries/Carbon/src/Carbon/Lang/en_SB.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SB.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SC.php b/libraries/Carbon/src/Carbon/Lang/en_SC.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SC.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SD.php b/libraries/Carbon/src/Carbon/Lang/en_SD.php new file mode 100644 index 00000000000..4316e3c2da1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SD.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 6, + 'weekend' => [5, 6], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SE.php b/libraries/Carbon/src/Carbon/Lang/en_SE.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SE.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SG.php b/libraries/Carbon/src/Carbon/Lang/en_SG.php new file mode 100644 index 00000000000..0c54c0172f5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SG.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'from_now' => 'in :time', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SH.php b/libraries/Carbon/src/Carbon/Lang/en_SH.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SH.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SI.php b/libraries/Carbon/src/Carbon/Lang/en_SI.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SI.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SL.php b/libraries/Carbon/src/Carbon/Lang/en_SL.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SL.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SS.php b/libraries/Carbon/src/Carbon/Lang/en_SS.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SS.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SX.php b/libraries/Carbon/src/Carbon/Lang/en_SX.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SX.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_SZ.php b/libraries/Carbon/src/Carbon/Lang/en_SZ.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_SZ.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_TC.php b/libraries/Carbon/src/Carbon/Lang/en_TC.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_TC.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_TK.php b/libraries/Carbon/src/Carbon/Lang/en_TK.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_TK.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_TO.php b/libraries/Carbon/src/Carbon/Lang/en_TO.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_TO.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_TT.php b/libraries/Carbon/src/Carbon/Lang/en_TT.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_TT.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_TV.php b/libraries/Carbon/src/Carbon/Lang/en_TV.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_TV.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_TZ.php b/libraries/Carbon/src/Carbon/Lang/en_TZ.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_TZ.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_UG.php b/libraries/Carbon/src/Carbon/Lang/en_UG.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_UG.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_UM.php b/libraries/Carbon/src/Carbon/Lang/en_UM.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_UM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_US.php b/libraries/Carbon/src/Carbon/Lang/en_US.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_US.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_US_Posix.php b/libraries/Carbon/src/Carbon/Lang/en_US_Posix.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_US_Posix.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_VC.php b/libraries/Carbon/src/Carbon/Lang/en_VC.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_VC.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_VG.php b/libraries/Carbon/src/Carbon/Lang/en_VG.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_VG.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_VI.php b/libraries/Carbon/src/Carbon/Lang/en_VI.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_VI.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_VU.php b/libraries/Carbon/src/Carbon/Lang/en_VU.php new file mode 100644 index 00000000000..46563ce5529 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_VU.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_WS.php b/libraries/Carbon/src/Carbon/Lang/en_WS.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_WS.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/en_ZA.php b/libraries/Carbon/src/Carbon/Lang/en_ZA.php new file mode 100644 index 00000000000..67e8e647c66 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_ZA.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YY', + 'LL' => 'MMMM DD, YYYY', + 'LLL' => 'DD MMM HH:mm', + 'LLLL' => 'MMMM DD, YYYY HH:mm', + ], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_ZM.php b/libraries/Carbon/src/Carbon/Lang/en_ZM.php new file mode 100644 index 00000000000..c00566288d1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_ZM.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - ANLoc Martin Benjamin locales@africanlocalization.net + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/en_ZW.php b/libraries/Carbon/src/Carbon/Lang/en_ZW.php new file mode 100644 index 00000000000..6ea7739fc72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/en_ZW.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/en.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/eo.php b/libraries/Carbon/src/Carbon/Lang/eo.php new file mode 100644 index 00000000000..628dc6613b8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/eo.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - Mia Nordentoft + * - JD Isaacks + */ +return [ + 'year' => ':count jaro|:count jaroj', + 'a_year' => 'jaro|:count jaroj', + 'y' => ':count j.', + 'month' => ':count monato|:count monatoj', + 'a_month' => 'monato|:count monatoj', + 'm' => ':count mo.', + 'week' => ':count semajno|:count semajnoj', + 'a_week' => 'semajno|:count semajnoj', + 'w' => ':count sem.', + 'day' => ':count tago|:count tagoj', + 'a_day' => 'tago|:count tagoj', + 'd' => ':count t.', + 'hour' => ':count horo|:count horoj', + 'a_hour' => 'horo|:count horoj', + 'h' => ':count h.', + 'minute' => ':count minuto|:count minutoj', + 'a_minute' => 'minuto|:count minutoj', + 'min' => ':count min.', + 'second' => ':count sekundo|:count sekundoj', + 'a_second' => 'sekundoj|:count sekundoj', + 's' => ':count sek.', + 'ago' => 'antaŭ :time', + 'from_now' => 'post :time', + 'after' => ':time poste', + 'before' => ':time antaŭe', + 'diff_yesterday' => 'Hieraŭ', + 'diff_yesterday_regexp' => 'Hieraŭ(?:\\s+je)?', + 'diff_today' => 'Hodiaŭ', + 'diff_today_regexp' => 'Hodiaŭ(?:\\s+je)?', + 'diff_tomorrow' => 'Morgaŭ', + 'diff_tomorrow_regexp' => 'Morgaŭ(?:\\s+je)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'D[-a de] MMMM, YYYY', + 'LLL' => 'D[-a de] MMMM, YYYY HH:mm', + 'LLLL' => 'dddd, [la] D[-a de] MMMM, YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Hodiaŭ je] LT', + 'nextDay' => '[Morgaŭ je] LT', + 'nextWeek' => 'dddd [je] LT', + 'lastDay' => '[Hieraŭ je] LT', + 'lastWeek' => '[pasinta] dddd [je] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':numbera', + 'meridiem' => ['a.t.m.', 'p.t.m.'], + 'months' => ['januaro', 'februaro', 'marto', 'aprilo', 'majo', 'junio', 'julio', 'aŭgusto', 'septembro', 'oktobro', 'novembro', 'decembro'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aŭg', 'sep', 'okt', 'nov', 'dec'], + 'weekdays' => ['dimanĉo', 'lundo', 'mardo', 'merkredo', 'ĵaŭdo', 'vendredo', 'sabato'], + 'weekdays_short' => ['dim', 'lun', 'mard', 'merk', 'ĵaŭ', 'ven', 'sab'], + 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'ĵa', 've', 'sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' kaj '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/es.php b/libraries/Carbon/src/Carbon/Lang/es.php new file mode 100644 index 00000000000..35e8c7f3cb3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kunal Marwaha + * - kostas + * - François B + * - Tim Fish + * - Claire Coloma + * - Steven Heinrich + * - JD Isaacks + * - Raphael Amorim + * - Jorge Y. Castillo + * - Víctor Díaz + * - Diego + * - Sebastian Thierer + * - quinterocesar + * - Daniel Commesse Liévanos (danielcommesse) + * - Pete Scopes (pdscopes) + * - gam04 + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count año|:count años', + 'a_year' => 'un año|:count años', + 'y' => ':count año|:count años', + 'month' => ':count mes|:count meses', + 'a_month' => 'un mes|:count meses', + 'm' => ':count mes|:count meses', + 'week' => ':count semana|:count semanas', + 'a_week' => 'una semana|:count semanas', + 'w' => ':countsem', + 'day' => ':count día|:count días', + 'a_day' => 'un día|:count días', + 'd' => ':countd', + 'hour' => ':count hora|:count horas', + 'a_hour' => 'una hora|:count horas', + 'h' => ':counth', + 'minute' => ':count minuto|:count minutos', + 'a_minute' => 'un minuto|:count minutos', + 'min' => ':countm', + 'second' => ':count segundo|:count segundos', + 'a_second' => 'unos segundos|:count segundos', + 's' => ':counts', + 'millisecond' => ':count milisegundo|:count milisegundos', + 'a_millisecond' => 'un milisegundo|:count milisegundos', + 'ms' => ':countms', + 'microsecond' => ':count microsegundo|:count microsegundos', + 'a_microsecond' => 'un microsegundo|:count microsegundos', + 'µs' => ':countµs', + 'ago' => 'hace :time', + 'from_now' => 'en :time', + 'after' => ':time después', + 'before' => ':time antes', + 'diff_now' => 'ahora mismo', + 'diff_today' => 'hoy', + 'diff_today_regexp' => 'hoy(?:\\s+a)?(?:\\s+las)?', + 'diff_yesterday' => 'ayer', + 'diff_yesterday_regexp' => 'ayer(?:\\s+a)?(?:\\s+las)?', + 'diff_tomorrow' => 'mañana', + 'diff_tomorrow_regexp' => 'mañana(?:\\s+a)?(?:\\s+las)?', + 'diff_before_yesterday' => 'anteayer', + 'diff_after_tomorrow' => 'pasado mañana', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D [de] MMMM [de] YYYY', + 'LLL' => 'D [de] MMMM [de] YYYY H:mm', + 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => function (CarbonInterface $current) { + return '[hoy a la'.($current->hour !== 1 ? 's' : '').'] LT'; + }, + 'nextDay' => function (CarbonInterface $current) { + return '[mañana a la'.($current->hour !== 1 ? 's' : '').'] LT'; + }, + 'nextWeek' => function (CarbonInterface $current) { + return 'dddd [a la'.($current->hour !== 1 ? 's' : '').'] LT'; + }, + 'lastDay' => function (CarbonInterface $current) { + return '[ayer a la'.($current->hour !== 1 ? 's' : '').'] LT'; + }, + 'lastWeek' => function (CarbonInterface $current) { + return '[el] dddd [pasado a la'.($current->hour !== 1 ? 's' : '').'] LT'; + }, + 'sameElse' => 'L', + ], + 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], + 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], + 'mmm_suffix' => '.', + 'ordinal' => ':numberº', + 'weekdays' => ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'], + 'weekdays_short' => ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'], + 'weekdays_min' => ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sá'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' y '], + 'meridiem' => ['a. m.', 'p. m.'], + 'ordinal_words' => [ + 'of' => 'de', + 'first' => 'primer', + 'second' => 'segundo', + 'third' => 'tercer', + 'fourth' => 'cuarto', + 'fifth' => 'quinto', + 'last' => 'último', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/es_419.php b/libraries/Carbon/src/Carbon/Lang/es_419.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_419.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_AR.php b/libraries/Carbon/src/Carbon/Lang/es_AR.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_AR.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_BO.php b/libraries/Carbon/src/Carbon/Lang/es_BO.php new file mode 100644 index 00000000000..6ba07ad068f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_BO.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_BR.php b/libraries/Carbon/src/Carbon/Lang/es_BR.php new file mode 100644 index 00000000000..46322defbf1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_BR.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_BZ.php b/libraries/Carbon/src/Carbon/Lang/es_BZ.php new file mode 100644 index 00000000000..46322defbf1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_BZ.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_CL.php b/libraries/Carbon/src/Carbon/Lang/es_CL.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_CL.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_CO.php b/libraries/Carbon/src/Carbon/Lang/es_CO.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_CO.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_CR.php b/libraries/Carbon/src/Carbon/Lang/es_CR.php new file mode 100644 index 00000000000..16d9db74fcd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_CR.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_CU.php b/libraries/Carbon/src/Carbon/Lang/es_CU.php new file mode 100644 index 00000000000..57c1f414eb4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_CU.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_DO.php b/libraries/Carbon/src/Carbon/Lang/es_DO.php new file mode 100644 index 00000000000..35b3eba9089 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_DO.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - kostas + * - François B + * - Tim Fish + * - Chiel Robben + * - Claire Coloma + * - Steven Heinrich + * - JD Isaacks + * - Raphael Amorim + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'diff_before_yesterday' => 'anteayer', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'LLL' => 'D [de] MMMM [de] YYYY h:mm A', + 'LLLL' => 'dddd, D [de] MMMM [de] YYYY h:mm A', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_EA.php b/libraries/Carbon/src/Carbon/Lang/es_EA.php new file mode 100644 index 00000000000..57c1f414eb4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_EA.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_EC.php b/libraries/Carbon/src/Carbon/Lang/es_EC.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_EC.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_ES.php b/libraries/Carbon/src/Carbon/Lang/es_ES.php new file mode 100644 index 00000000000..fac7500e1f6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_ES.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return require __DIR__.'/es.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/es_GQ.php b/libraries/Carbon/src/Carbon/Lang/es_GQ.php new file mode 100644 index 00000000000..57c1f414eb4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_GQ.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_GT.php b/libraries/Carbon/src/Carbon/Lang/es_GT.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_GT.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_HN.php b/libraries/Carbon/src/Carbon/Lang/es_HN.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_HN.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_IC.php b/libraries/Carbon/src/Carbon/Lang/es_IC.php new file mode 100644 index 00000000000..57c1f414eb4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_IC.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_MX.php b/libraries/Carbon/src/Carbon/Lang/es_MX.php new file mode 100644 index 00000000000..0273ed49a67 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_MX.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'diff_before_yesterday' => 'antier', + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_NI.php b/libraries/Carbon/src/Carbon/Lang/es_NI.php new file mode 100644 index 00000000000..2808e07a0f8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_NI.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_PA.php b/libraries/Carbon/src/Carbon/Lang/es_PA.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_PA.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_PE.php b/libraries/Carbon/src/Carbon/Lang/es_PE.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_PE.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_PH.php b/libraries/Carbon/src/Carbon/Lang/es_PH.php new file mode 100644 index 00000000000..d5b20c1f5b7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_PH.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/M/yy', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D [de] MMMM [de] YYYY h:mm a', + 'LLLL' => 'dddd, D [de] MMMM [de] YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_PR.php b/libraries/Carbon/src/Carbon/Lang/es_PR.php new file mode 100644 index 00000000000..2808e07a0f8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_PR.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_PY.php b/libraries/Carbon/src/Carbon/Lang/es_PY.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_PY.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_SV.php b/libraries/Carbon/src/Carbon/Lang/es_SV.php new file mode 100644 index 00000000000..62416f42b06 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_SV.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], + 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_US.php b/libraries/Carbon/src/Carbon/Lang/es_US.php new file mode 100644 index 00000000000..879772d3c5e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_US.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kunal Marwaha + * - Josh Soref + * - Jørn Ølmheim + * - Craig Patik + * - bustta + * - François B + * - Tim Fish + * - Claire Coloma + * - Steven Heinrich + * - JD Isaacks + * - Raphael Amorim + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'diff_before_yesterday' => 'anteayer', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'L' => 'MM/DD/YYYY', + 'LL' => 'MMMM [de] D [de] YYYY', + 'LLL' => 'MMMM [de] D [de] YYYY h:mm A', + 'LLLL' => 'dddd, MMMM [de] D [de] YYYY h:mm A', + ], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_UY.php b/libraries/Carbon/src/Carbon/Lang/es_UY.php new file mode 100644 index 00000000000..b63bb14e1c6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_UY.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'setiembre', 'octubre', 'noviembre', 'diciembre'], + 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'set', 'oct', 'nov', 'dic'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/es_VE.php b/libraries/Carbon/src/Carbon/Lang/es_VE.php new file mode 100644 index 00000000000..5d7b29f0b09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/es_VE.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/es.php', [ + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/et.php b/libraries/Carbon/src/Carbon/Lang/et.php new file mode 100644 index 00000000000..96378e72160 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/et.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Andres Ivanov + * - Tsutomu Kuroda + * - tjku + * - Max Melentiev + * - Juanito Fatas + * - RM87 + * - Akira Matsuda + * - Christopher Dell + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Esko Lehtme + * - Mart Karu + * - Nicolás Hock Isaza + * - Kevin Valdek + * - Zahhar Kirillov + * - João Magalhães + * - Ingmar + * - Illimar Tambek + * - Mihkel + */ +return [ + 'year' => ':count aasta|:count aastat', + 'y' => ':count a', + 'month' => ':count kuu|:count kuud', + 'm' => ':count k', + 'week' => ':count nädal|:count nädalat', + 'w' => ':count näd', + 'day' => ':count päev|:count päeva', + 'd' => ':count p', + 'hour' => ':count tund|:count tundi', + 'h' => ':count t', + 'minute' => ':count minut|:count minutit', + 'min' => ':count min', + 'second' => ':count sekund|:count sekundit', + 's' => ':count s', + 'ago' => ':time tagasi', + 'from_now' => ':time pärast', + 'after' => ':time pärast', + 'before' => ':time enne', + 'year_from_now' => ':count aasta', + 'month_from_now' => ':count kuu', + 'week_from_now' => ':count nädala', + 'day_from_now' => ':count päeva', + 'hour_from_now' => ':count tunni', + 'minute_from_now' => ':count minuti', + 'second_from_now' => ':count sekundi', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'diff_now' => 'nüüd', + 'diff_today' => 'täna', + 'diff_yesterday' => 'eile', + 'diff_tomorrow' => 'homme', + 'diff_before_yesterday' => 'üleeile', + 'diff_after_tomorrow' => 'ülehomme', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D. MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[täna] LT', + 'nextDay' => '[homme] LT', + 'lastDay' => '[eile] LT', + 'nextWeek' => 'dddd LT', + 'lastWeek' => '[eelmine] dddd LT', + 'sameElse' => 'L', + ], + 'months' => ['jaanuar', 'veebruar', 'märts', 'aprill', 'mai', 'juuni', 'juuli', 'august', 'september', 'oktoober', 'november', 'detsember'], + 'months_short' => ['jaan', 'veebr', 'märts', 'apr', 'mai', 'juuni', 'juuli', 'aug', 'sept', 'okt', 'nov', 'dets'], + 'weekdays' => ['pühapäev', 'esmaspäev', 'teisipäev', 'kolmapäev', 'neljapäev', 'reede', 'laupäev'], + 'weekdays_short' => ['P', 'E', 'T', 'K', 'N', 'R', 'L'], + 'weekdays_min' => ['P', 'E', 'T', 'K', 'N', 'R', 'L'], + 'list' => [', ', ' ja '], + 'meridiem' => ['enne lõunat', 'pärast lõunat'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/et_EE.php b/libraries/Carbon/src/Carbon/Lang/et_EE.php new file mode 100644 index 00000000000..95fd33ef3ed --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/et_EE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/et.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/eu.php b/libraries/Carbon/src/Carbon/Lang/eu.php new file mode 100644 index 00000000000..b90ce977341 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/eu.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - JD Isaacks + */ +return [ + 'year' => 'urte bat|:count urte', + 'y' => 'Urte 1|:count urte', + 'month' => 'hilabete bat|:count hilabete', + 'm' => 'Hile 1|:count hile', + 'week' => 'Aste 1|:count aste', + 'w' => 'Aste 1|:count aste', + 'day' => 'egun bat|:count egun', + 'd' => 'Egun 1|:count egun', + 'hour' => 'ordu bat|:count ordu', + 'h' => 'Ordu 1|:count ordu', + 'minute' => 'minutu bat|:count minutu', + 'min' => 'Minutu 1|:count minutu', + 'second' => 'segundo batzuk|:count segundo', + 's' => 'Segundu 1|:count segundu', + 'ago' => 'duela :time', + 'from_now' => ':time barru', + 'after' => ':time geroago', + 'before' => ':time lehenago', + 'diff_now' => 'orain', + 'diff_today' => 'gaur', + 'diff_yesterday' => 'atzo', + 'diff_tomorrow' => 'bihar', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'YYYY[ko] MMMM[ren] D[a]', + 'LLL' => 'YYYY[ko] MMMM[ren] D[a] HH:mm', + 'LLLL' => 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[gaur] LT[etan]', + 'nextDay' => '[bihar] LT[etan]', + 'nextWeek' => 'dddd LT[etan]', + 'lastDay' => '[atzo] LT[etan]', + 'lastWeek' => '[aurreko] dddd LT[etan]', + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['urtarrila', 'otsaila', 'martxoa', 'apirila', 'maiatza', 'ekaina', 'uztaila', 'abuztua', 'iraila', 'urria', 'azaroa', 'abendua'], + 'months_short' => ['urt.', 'ots.', 'mar.', 'api.', 'mai.', 'eka.', 'uzt.', 'abu.', 'ira.', 'urr.', 'aza.', 'abe.'], + 'weekdays' => ['igandea', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata'], + 'weekdays_short' => ['ig.', 'al.', 'ar.', 'az.', 'og.', 'ol.', 'lr.'], + 'weekdays_min' => ['ig', 'al', 'ar', 'az', 'og', 'ol', 'lr'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' eta '], + 'meridiem' => ['g', 'a'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/eu_ES.php b/libraries/Carbon/src/Carbon/Lang/eu_ES.php new file mode 100644 index 00000000000..325353151d5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/eu_ES.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/eu.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ewo.php b/libraries/Carbon/src/Carbon/Lang/ewo.php new file mode 100644 index 00000000000..41422d35514 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ewo.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['kíkíríg', 'ngəgógəle'], + 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndi', 'sɔ́ndɔ məlú mə́bɛ̌', 'sɔ́ndɔ məlú mə́lɛ́', 'sɔ́ndɔ məlú mə́nyi', 'fúladé', 'séradé'], + 'weekdays_short' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'fúl', 'sér'], + 'weekdays_min' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'fúl', 'sér'], + 'months' => ['ngɔn osú', 'ngɔn bɛ̌', 'ngɔn lála', 'ngɔn nyina', 'ngɔn tána', 'ngɔn saməna', 'ngɔn zamgbála', 'ngɔn mwom', 'ngɔn ebulú', 'ngɔn awóm', 'ngɔn awóm ai dziá', 'ngɔn awóm ai bɛ̌'], + 'months_short' => ['ngo', 'ngb', 'ngl', 'ngn', 'ngt', 'ngs', 'ngz', 'ngm', 'nge', 'nga', 'ngad', 'ngab'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + // Too unreliable + /* + 'year' => ':count mbu', // less reliable + 'y' => ':count mbu', // less reliable + 'a_year' => ':count mbu', // less reliable + + 'month' => ':count ngòn', // less reliable + 'm' => ':count ngòn', // less reliable + 'a_month' => ':count ngòn', // less reliable + + 'week' => ':count mësë', // less reliable + 'w' => ':count mësë', // less reliable + 'a_week' => ':count mësë', // less reliable + + 'day' => ':count mësë', // less reliable + 'd' => ':count mësë', // less reliable + 'a_day' => ':count mësë', // less reliable + + 'hour' => ':count awola', // less reliable + 'h' => ':count awola', // less reliable + 'a_hour' => ':count awola', // less reliable + + 'minute' => ':count awola', // less reliable + 'min' => ':count awola', // less reliable + 'a_minute' => ':count awola', // less reliable + */ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fa.php b/libraries/Carbon/src/Carbon/Lang/fa.php new file mode 100644 index 00000000000..1934a62d5e6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fa.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - Nasser Ghiasi + * - JD Isaacks + * - Hossein Jabbari + * - nimamo + * - hafezdivandari + * - Hassan Pezeshk (hpez) + */ +return [ + 'year' => ':count سال', + 'a_year' => 'یک سال'.'|:count '.'سال', + 'y' => ':count سال', + 'month' => ':count ماه', + 'a_month' => 'یک ماه'.'|:count '.'ماه', + 'm' => ':count ماه', + 'week' => ':count هفته', + 'a_week' => 'یک هفته'.'|:count '.'هفته', + 'w' => ':count هفته', + 'day' => ':count روز', + 'a_day' => 'یک روز'.'|:count '.'روز', + 'd' => ':count روز', + 'hour' => ':count ساعت', + 'a_hour' => 'یک ساعت'.'|:count '.'ساعت', + 'h' => ':count ساعت', + 'minute' => ':count دقیقه', + 'a_minute' => 'یک دقیقه'.'|:count '.'دقیقه', + 'min' => ':count دقیقه', + 'second' => ':count ثانیه', + 's' => ':count ثانیه', + 'ago' => ':time پیش', + 'from_now' => ':time دیگر', + 'after' => ':time پس از', + 'before' => ':time پیش از', + 'diff_now' => 'اکنون', + 'diff_today' => 'امروز', + 'diff_today_regexp' => 'امروز(?:\\s+ساعت)?', + 'diff_yesterday' => 'دیروز', + 'diff_yesterday_regexp' => 'دیروز(?:\\s+ساعت)?', + 'diff_tomorrow' => 'فردا', + 'diff_tomorrow_regexp' => 'فردا(?:\\s+ساعت)?', + 'formats' => [ + 'LT' => 'OH:Om', + 'LTS' => 'OH:Om:Os', + 'L' => 'OD/OM/OY', + 'LL' => 'OD MMMM OY', + 'LLL' => 'OD MMMM OY OH:Om', + 'LLLL' => 'dddd, OD MMMM OY OH:Om', + ], + 'calendar' => [ + 'sameDay' => '[امروز ساعت] LT', + 'nextDay' => '[فردا ساعت] LT', + 'nextWeek' => 'dddd [ساعت] LT', + 'lastDay' => '[دیروز ساعت] LT', + 'lastWeek' => 'dddd [پیش] [ساعت] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':timeم', + 'meridiem' => ['قبل از ظهر', 'بعد از ظهر'], + 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], + 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], + 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], + 'weekdays_short' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], + 'weekdays_min' => ['ی', 'د', 'س', 'چ', 'پ', 'ج', 'ش'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'list' => ['، ', ' و '], + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰۴', '۰۵', '۰۶', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱۴', '۱۵', '۱۶', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲۴', '۲۵', '۲۶', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳۴', '۳۵', '۳۶', '۳۷', '۳۸', '۳۹', '۴۰', '۴۱', '۴۲', '۴۳', '۴۴', '۴۵', '۴۶', '۴۷', '۴۸', '۴۹', '۵۰', '۵۱', '۵۲', '۵۳', '۵۴', '۵۵', '۵۶', '۵۷', '۵۸', '۵۹', '۶۰', '۶۱', '۶۲', '۶۳', '۶۴', '۶۵', '۶۶', '۶۷', '۶۸', '۶۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷۴', '۷۵', '۷۶', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸۴', '۸۵', '۸۶', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹۴', '۹۵', '۹۶', '۹۷', '۹۸', '۹۹'], + 'months_short_standalone' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], + 'weekend' => [5, 5], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/fa_AF.php b/libraries/Carbon/src/Carbon/Lang/fa_AF.php new file mode 100644 index 00000000000..586f2c58ef6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fa_AF.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fa.php', [ + 'meridiem' => ['ق', 'ب'], + 'weekend' => [4, 5], + 'formats' => [ + 'L' => 'OY/OM/OD', + 'LL' => 'OD MMM OY', + 'LLL' => 'OD MMMM OY،‏ H:mm', + 'LLLL' => 'dddd OD MMMM OY،‏ H:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fa_IR.php b/libraries/Carbon/src/Carbon/Lang/fa_IR.php new file mode 100644 index 00000000000..ef3399fc7b0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fa_IR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fa.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ff.php b/libraries/Carbon/src/Carbon/Lang/ff.php new file mode 100644 index 00000000000..d5557dd24b3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ff.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'months' => ['siilo', 'colte', 'mbooy', 'seeɗto', 'duujal', 'korse', 'morso', 'juko', 'siilto', 'yarkomaa', 'jolal', 'bowte'], + 'months_short' => ['sii', 'col', 'mbo', 'see', 'duu', 'kor', 'mor', 'juk', 'slt', 'yar', 'jol', 'bow'], + 'weekdays' => ['dewo', 'aaɓnde', 'mawbaare', 'njeslaare', 'naasaande', 'mawnde', 'hoore-biir'], + 'weekdays_short' => ['dew', 'aaɓ', 'maw', 'nje', 'naa', 'mwd', 'hbi'], + 'weekdays_min' => ['dew', 'aaɓ', 'maw', 'nje', 'naa', 'mwd', 'hbi'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['subaka', 'kikiiɗe'], + + 'year' => ':count baret', // less reliable + 'y' => ':count baret', // less reliable + 'a_year' => ':count baret', // less reliable + + 'month' => ':count lewru', // less reliable + 'm' => ':count lewru', // less reliable + 'a_month' => ':count lewru', // less reliable + + 'week' => ':count naange', // less reliable + 'w' => ':count naange', // less reliable + 'a_week' => ':count naange', // less reliable + + 'day' => ':count dian', // less reliable + 'd' => ':count dian', // less reliable + 'a_day' => ':count dian', // less reliable + + 'hour' => ':count montor', // less reliable + 'h' => ':count montor', // less reliable + 'a_hour' => ':count montor', // less reliable + + 'minute' => ':count tokossuoum', // less reliable + 'min' => ':count tokossuoum', // less reliable + 'a_minute' => ':count tokossuoum', // less reliable + + 'second' => ':count tenen', // less reliable + 's' => ':count tenen', // less reliable + 'a_second' => ':count tenen', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ff_CM.php b/libraries/Carbon/src/Carbon/Lang/ff_CM.php new file mode 100644 index 00000000000..2a7a9a60fc5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ff_CM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ff.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ff_GN.php b/libraries/Carbon/src/Carbon/Lang/ff_GN.php new file mode 100644 index 00000000000..2a7a9a60fc5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ff_GN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ff.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ff_MR.php b/libraries/Carbon/src/Carbon/Lang/ff_MR.php new file mode 100644 index 00000000000..6bdcb58ac25 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ff_MR.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ff.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ff_SN.php b/libraries/Carbon/src/Carbon/Lang/ff_SN.php new file mode 100644 index 00000000000..786df55d7b3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ff_SN.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Pular-Fulfulde.org Ibrahima Sarr admin@pulaar-fulfulde.org + */ +return require __DIR__.'/ff.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fi.php b/libraries/Carbon/src/Carbon/Lang/fi.php new file mode 100644 index 00000000000..424de8bf918 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fi.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Janne Warén + * - digitalfrost + * - Tsutomu Kuroda + * - Roope Salmi + * - tjku + * - Max Melentiev + * - Sami Haahtinen + * - Teemu Leisti + * - Artem Ignatyev + * - Akira Matsuda + * - Christopher Dell + * - Enrique Vidal + * - Simone Carletti + * - Robert Bjarnason + * - Aaron Patterson + * - Nicolás Hock Isaza + * - Tom Hughes + * - Sven Fuchs + * - Petri Kivikangas + * - Nizar Jouini + * - Marko Seppae + * - Tomi Mynttinen (Pikseli) + * - Petteri (powergrip) + */ +return [ + 'year' => ':count vuosi|:count vuotta', + 'y' => ':count v', + 'month' => ':count kuukausi|:count kuukautta', + 'm' => ':count kk', + 'week' => ':count viikko|:count viikkoa', + 'w' => ':count vk', + 'day' => ':count päivä|:count päivää', + 'd' => ':count pv', + 'hour' => ':count tunti|:count tuntia', + 'h' => ':count t', + 'minute' => ':count minuutti|:count minuuttia', + 'min' => ':count min', + 'second' => ':count sekunti|:count sekuntia', + 'a_second' => 'muutama sekunti|:count sekuntia', + 's' => ':count s', + 'ago' => ':time sitten', + 'from_now' => ':time päästä', + 'year_from_now' => ':count vuoden', + 'month_from_now' => ':count kuukauden', + 'week_from_now' => ':count viikon', + 'day_from_now' => ':count päivän', + 'hour_from_now' => ':count tunnin', + 'minute_from_now' => ':count minuutin', + 'second_from_now' => ':count sekunnin', + 'after' => ':time sen jälkeen', + 'before' => ':time ennen', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' ja '], + 'diff_now' => 'nyt', + 'diff_yesterday' => 'eilen', + 'diff_tomorrow' => 'huomenna', + 'formats' => [ + 'LT' => 'HH.mm', + 'LTS' => 'HH.mm:ss', + 'L' => 'D.M.YYYY', + 'LL' => 'dddd D. MMMM[ta] YYYY', + 'll' => 'ddd D. MMM YYYY', + 'LLL' => 'D.MM. HH.mm', + 'LLLL' => 'D. MMMM[ta] YYYY HH.mm', + 'llll' => 'D. MMM YY HH.mm', + ], + 'weekdays' => ['sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai'], + 'weekdays_short' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'], + 'weekdays_min' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'], + 'months' => ['tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu'], + 'months_short' => ['tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu'], + 'meridiem' => ['aamupäivä', 'iltapäivä'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/fi_FI.php b/libraries/Carbon/src/Carbon/Lang/fi_FI.php new file mode 100644 index 00000000000..c38f118e387 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fi_FI.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fi.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fil.php b/libraries/Carbon/src/Carbon/Lang/fil.php new file mode 100644 index 00000000000..d1df366b96d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fil.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/fil_PH.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fil_PH.php b/libraries/Carbon/src/Carbon/Lang/fil_PH.php new file mode 100644 index 00000000000..a81703610cd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fil_PH.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Rene Torres Rene Torres, Pablo Saratxaga rgtorre@rocketmail.com, pablo@mandrakesoft.com + * - Jaycee Mariano (alohajaycee) + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'MM/DD/YY', + ], + 'months' => ['Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre'], + 'months_short' => ['Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis'], + 'weekdays' => ['Linggo', 'Lunes', 'Martes', 'Miyerkoles', 'Huwebes', 'Biyernes', 'Sabado'], + 'weekdays_short' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], + 'weekdays_min' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['N.U.', 'N.H.'], + + 'before' => ':time bago', + 'after' => ':time pagkatapos', + + 'year' => ':count taon', + 'y' => ':count taon', + 'a_year' => ':count taon', + + 'month' => ':count buwan', + 'm' => ':count buwan', + 'a_month' => ':count buwan', + + 'week' => ':count linggo', + 'w' => ':count linggo', + 'a_week' => ':count linggo', + + 'day' => ':count araw', + 'd' => ':count araw', + 'a_day' => ':count araw', + + 'hour' => ':count oras', + 'h' => ':count oras', + 'a_hour' => ':count oras', + + 'minute' => ':count minuto', + 'min' => ':count minuto', + 'a_minute' => ':count minuto', + + 'second' => ':count segundo', + 's' => ':count segundo', + 'a_second' => ':count segundo', + + 'ago' => ':time ang nakalipas', + 'from_now' => 'sa :time', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fo.php b/libraries/Carbon/src/Carbon/Lang/fo.php new file mode 100644 index 00000000000..76742415e94 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fo.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kristian Sakarisson + * - François B + * - JD Isaacks + * - Sverri Mohr Olsen + */ +return [ + 'year' => 'eitt ár|:count ár', + 'y' => ':count ár|:count ár', + 'month' => 'ein mánaði|:count mánaðir', + 'm' => ':count mánaður|:count mánaðir', + 'week' => ':count vika|:count vikur', + 'w' => ':count vika|:count vikur', + 'day' => 'ein dagur|:count dagar', + 'd' => ':count dag|:count dagar', + 'hour' => 'ein tími|:count tímar', + 'h' => ':count tími|:count tímar', + 'minute' => 'ein minutt|:count minuttir', + 'min' => ':count minutt|:count minuttir', + 'second' => 'fá sekund|:count sekundir', + 's' => ':count sekund|:count sekundir', + 'ago' => ':time síðani', + 'from_now' => 'um :time', + 'after' => ':time aftaná', + 'before' => ':time áðrenn', + 'diff_today' => 'Í', + 'diff_yesterday' => 'Í', + 'diff_yesterday_regexp' => 'Í(?:\\s+gjár)?(?:\\s+kl.)?', + 'diff_tomorrow' => 'Í', + 'diff_tomorrow_regexp' => 'Í(?:\\s+morgin)?(?:\\s+kl.)?', + 'diff_today_regexp' => 'Í(?:\\s+dag)?(?:\\s+kl.)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D. MMMM, YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Í dag kl.] LT', + 'nextDay' => '[Í morgin kl.] LT', + 'nextWeek' => 'dddd [kl.] LT', + 'lastDay' => '[Í gjár kl.] LT', + 'lastWeek' => '[síðstu] dddd [kl] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['januar', 'februar', 'mars', 'apríl', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], + 'weekdays' => ['sunnudagur', 'mánadagur', 'týsdagur', 'mikudagur', 'hósdagur', 'fríggjadagur', 'leygardagur'], + 'weekdays_short' => ['sun', 'mán', 'týs', 'mik', 'hós', 'frí', 'ley'], + 'weekdays_min' => ['su', 'má', 'tý', 'mi', 'hó', 'fr', 'le'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' og '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/fo_DK.php b/libraries/Carbon/src/Carbon/Lang/fo_DK.php new file mode 100644 index 00000000000..c6306e97f77 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fo_DK.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fo.php', [ + 'formats' => [ + 'L' => 'DD.MM.yy', + 'LL' => 'DD.MM.YYYY', + 'LLL' => 'D. MMMM YYYY, HH:mm', + 'LLLL' => 'dddd, D. MMMM YYYY, HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fo_FO.php b/libraries/Carbon/src/Carbon/Lang/fo_FO.php new file mode 100644 index 00000000000..fdd792f2dfb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fo_FO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fo.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr.php b/libraries/Carbon/src/Carbon/Lang/fr.php new file mode 100644 index 00000000000..3923ef32b92 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Dieter Sting + * - François B + * - Maxime VALY + * - JD Isaacks + * - Dieter Sting + * - François B + * - JD Isaacks + * - Sebastian Thierer + * - Fastfuel + * - Pete Scopes (pdscopes) + */ +return [ + 'year' => ':count an|:count ans', + 'a_year' => 'un an|:count ans', + 'y' => ':count an|:count ans', + 'month' => ':count mois|:count mois', + 'a_month' => 'un mois|:count mois', + 'm' => ':count mois', + 'week' => ':count semaine|:count semaines', + 'a_week' => 'une semaine|:count semaines', + 'w' => ':count sem.', + 'day' => ':count jour|:count jours', + 'a_day' => 'un jour|:count jours', + 'd' => ':count j', + 'hour' => ':count heure|:count heures', + 'a_hour' => 'une heure|:count heures', + 'h' => ':count h', + 'minute' => ':count minute|:count minutes', + 'a_minute' => 'une minute|:count minutes', + 'min' => ':count min', + 'second' => ':count seconde|:count secondes', + 'a_second' => 'quelques secondes|:count secondes', + 's' => ':count s', + 'millisecond' => ':count milliseconde|:count millisecondes', + 'a_millisecond' => 'une milliseconde|:count millisecondes', + 'ms' => ':countms', + 'microsecond' => ':count microseconde|:count microsecondes', + 'a_microsecond' => 'une microseconde|:count microsecondes', + 'µs' => ':countµs', + 'ago' => 'il y a :time', + 'from_now' => 'dans :time', + 'after' => ':time après', + 'before' => ':time avant', + 'diff_now' => "à l'instant", + 'diff_today' => "aujourd'hui", + 'diff_today_regexp' => "aujourd'hui(?:\s+à)?", + 'diff_yesterday' => 'hier', + 'diff_yesterday_regexp' => 'hier(?:\s+à)?', + 'diff_tomorrow' => 'demain', + 'diff_tomorrow_regexp' => 'demain(?:\s+à)?', + 'diff_before_yesterday' => 'avant-hier', + 'diff_after_tomorrow' => 'après-demain', + 'period_recurrences' => ':count fois', + 'period_interval' => 'tous les :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'à :date', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Aujourd’hui à] LT', + 'nextDay' => '[Demain à] LT', + 'nextWeek' => 'dddd [à] LT', + 'lastDay' => '[Hier à] LT', + 'lastWeek' => 'dddd [dernier à] LT', + 'sameElse' => 'L', + ], + 'months' => ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], + 'months_short' => ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'], + 'weekdays' => ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'], + 'weekdays_short' => ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'], + 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'], + 'ordinal' => function ($number, $period) { + switch ($period) { + // In French, only the first has to be ordinal, other number remains cardinal + // @link https://fr.wikihow.com/%C3%A9crire-la-date-en-fran%C3%A7ais + case 'D': + return $number.($number === 1 ? 'er' : ''); + + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return $number.($number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return $number.($number === 1 ? 're' : 'e'); + } + }, + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' et '], + 'ordinal_words' => [ + 'of' => 'de', + 'first' => 'premier', + 'second' => 'deuxième', + 'third' => 'troisième', + 'fourth' => 'quatrième', + 'fifth' => 'cinquième', + 'last' => 'dernier', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_BE.php b/libraries/Carbon/src/Carbon/Lang/fr_BE.php new file mode 100644 index 00000000000..9a953a83bbc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_BE.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'months_short' => ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_BF.php b/libraries/Carbon/src/Carbon/Lang/fr_BF.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_BF.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_BI.php b/libraries/Carbon/src/Carbon/Lang/fr_BI.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_BI.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_BJ.php b/libraries/Carbon/src/Carbon/Lang/fr_BJ.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_BJ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_BL.php b/libraries/Carbon/src/Carbon/Lang/fr_BL.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_BL.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_CA.php b/libraries/Carbon/src/Carbon/Lang/fr_CA.php new file mode 100644 index 00000000000..99d85d0591e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_CA.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Dieter Sting + * - François B + * - Maxime VALY + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_CD.php b/libraries/Carbon/src/Carbon/Lang/fr_CD.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_CD.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_CF.php b/libraries/Carbon/src/Carbon/Lang/fr_CF.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_CF.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_CG.php b/libraries/Carbon/src/Carbon/Lang/fr_CG.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_CG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_CH.php b/libraries/Carbon/src/Carbon/Lang/fr_CH.php new file mode 100644 index 00000000000..1838269c158 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_CH.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Dieter Sting + * - François B + * - Gaspard Bucher + * - Maxime VALY + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_CI.php b/libraries/Carbon/src/Carbon/Lang/fr_CI.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_CI.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_CM.php b/libraries/Carbon/src/Carbon/Lang/fr_CM.php new file mode 100644 index 00000000000..b201bd1a104 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_CM.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'meridiem' => ['mat.', 'soir'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_DJ.php b/libraries/Carbon/src/Carbon/Lang/fr_DJ.php new file mode 100644 index 00000000000..25d1b0a7378 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_DJ.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'first_day_of_week' => 6, + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_DZ.php b/libraries/Carbon/src/Carbon/Lang/fr_DZ.php new file mode 100644 index 00000000000..b8808cd151e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_DZ.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'first_day_of_week' => 6, + 'weekend' => [5, 6], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_FR.php b/libraries/Carbon/src/Carbon/Lang/fr_FR.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_FR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_GA.php b/libraries/Carbon/src/Carbon/Lang/fr_GA.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_GA.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_GF.php b/libraries/Carbon/src/Carbon/Lang/fr_GF.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_GF.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_GN.php b/libraries/Carbon/src/Carbon/Lang/fr_GN.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_GN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_GP.php b/libraries/Carbon/src/Carbon/Lang/fr_GP.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_GP.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_GQ.php b/libraries/Carbon/src/Carbon/Lang/fr_GQ.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_GQ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_HT.php b/libraries/Carbon/src/Carbon/Lang/fr_HT.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_HT.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_KM.php b/libraries/Carbon/src/Carbon/Lang/fr_KM.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_KM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_LU.php b/libraries/Carbon/src/Carbon/Lang/fr_LU.php new file mode 100644 index 00000000000..f054125855e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_LU.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months_short' => ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_MA.php b/libraries/Carbon/src/Carbon/Lang/fr_MA.php new file mode 100644 index 00000000000..9447d8f97dd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_MA.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'first_day_of_week' => 6, + 'weekend' => [5, 6], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_MC.php b/libraries/Carbon/src/Carbon/Lang/fr_MC.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_MC.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_MF.php b/libraries/Carbon/src/Carbon/Lang/fr_MF.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_MF.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_MG.php b/libraries/Carbon/src/Carbon/Lang/fr_MG.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_MG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_ML.php b/libraries/Carbon/src/Carbon/Lang/fr_ML.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_ML.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_MQ.php b/libraries/Carbon/src/Carbon/Lang/fr_MQ.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_MQ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_MR.php b/libraries/Carbon/src/Carbon/Lang/fr_MR.php new file mode 100644 index 00000000000..94466bc586f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_MR.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_MU.php b/libraries/Carbon/src/Carbon/Lang/fr_MU.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_MU.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_NC.php b/libraries/Carbon/src/Carbon/Lang/fr_NC.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_NC.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_NE.php b/libraries/Carbon/src/Carbon/Lang/fr_NE.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_NE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_PF.php b/libraries/Carbon/src/Carbon/Lang/fr_PF.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_PF.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_PM.php b/libraries/Carbon/src/Carbon/Lang/fr_PM.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_PM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_RE.php b/libraries/Carbon/src/Carbon/Lang/fr_RE.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_RE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_RW.php b/libraries/Carbon/src/Carbon/Lang/fr_RW.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_RW.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_SC.php b/libraries/Carbon/src/Carbon/Lang/fr_SC.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_SC.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_SN.php b/libraries/Carbon/src/Carbon/Lang/fr_SN.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_SN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_SY.php b/libraries/Carbon/src/Carbon/Lang/fr_SY.php new file mode 100644 index 00000000000..b8808cd151e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_SY.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'first_day_of_week' => 6, + 'weekend' => [5, 6], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_TD.php b/libraries/Carbon/src/Carbon/Lang/fr_TD.php new file mode 100644 index 00000000000..94466bc586f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_TD.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_TG.php b/libraries/Carbon/src/Carbon/Lang/fr_TG.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_TG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_TN.php b/libraries/Carbon/src/Carbon/Lang/fr_TN.php new file mode 100644 index 00000000000..340fe0ecd88 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_TN.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'weekend' => [5, 6], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_VU.php b/libraries/Carbon/src/Carbon/Lang/fr_VU.php new file mode 100644 index 00000000000..94466bc586f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_VU.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fr.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fr_WF.php b/libraries/Carbon/src/Carbon/Lang/fr_WF.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_WF.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fr_YT.php b/libraries/Carbon/src/Carbon/Lang/fr_YT.php new file mode 100644 index 00000000000..ea306f54966 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fr_YT.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/fr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fur.php b/libraries/Carbon/src/Carbon/Lang/fur.php new file mode 100644 index 00000000000..fec406dda55 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fur.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/fur_IT.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/fur_IT.php b/libraries/Carbon/src/Carbon/Lang/fur_IT.php new file mode 100644 index 00000000000..0fb2849d0e6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fur_IT.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Pablo Saratxaga pablo@mandrakesoft.com + */ +return [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD. MM. YY', + 'LL' => 'DD di MMMM dal YYYY', + 'LLL' => 'DD di MMM HH:mm', + 'LLLL' => 'DD di MMMM dal YYYY HH:mm', + ], + 'months' => ['zenâr', 'fevrâr', 'març', 'avrîl', 'mai', 'jugn', 'lui', 'avost', 'setembar', 'otubar', 'novembar', 'dicembar'], + 'months_short' => ['zen', 'fev', 'mar', 'avr', 'mai', 'jug', 'lui', 'avo', 'set', 'otu', 'nov', 'dic'], + 'weekdays' => ['domenie', 'lunis', 'martars', 'miercus', 'joibe', 'vinars', 'sabide'], + 'weekdays_short' => ['dom', 'lun', 'mar', 'mie', 'joi', 'vin', 'sab'], + 'weekdays_min' => ['dom', 'lun', 'mar', 'mie', 'joi', 'vin', 'sab'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'year' => ':count an', + 'month' => ':count mês', + 'week' => ':count setemane', + 'day' => ':count zornade', + 'hour' => ':count ore', + 'minute' => ':count minût', + 'second' => ':count secont', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/fy.php b/libraries/Carbon/src/Carbon/Lang/fy.php new file mode 100644 index 00000000000..1501b5f1cf1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fy.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Tim Fish + * - JD Isaacks + */ +return [ + 'year' => ':count jier|:count jierren', + 'a_year' => 'ien jier|:count jierren', + 'y' => ':count j', + 'month' => ':count moanne|:count moannen', + 'a_month' => 'ien moanne|:count moannen', + 'm' => ':count moa.', + 'week' => ':count wike|:count wiken', + 'a_week' => 'in wike|:count wiken', + 'a' => ':count w.', + 'day' => ':count dei|:count dagen', + 'a_day' => 'ien dei|:count dagen', + 'd' => ':count d.', + 'hour' => ':count oere|:count oeren', + 'a_hour' => 'ien oere|:count oeren', + 'h' => ':count o.', + 'minute' => ':count minút|:count minuten', + 'a_minute' => 'ien minút|:count minuten', + 'min' => ':count min.', + 'second' => ':count sekonde|:count sekonden', + 'a_second' => 'in pear sekonden|:count sekonden', + 's' => ':count s.', + 'ago' => ':time lyn', + 'from_now' => 'oer :time', + 'diff_yesterday' => 'juster', + 'diff_yesterday_regexp' => 'juster(?:\\s+om)?', + 'diff_today' => 'hjoed', + 'diff_today_regexp' => 'hjoed(?:\\s+om)?', + 'diff_tomorrow' => 'moarn', + 'diff_tomorrow_regexp' => 'moarn(?:\\s+om)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD-MM-YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[hjoed om] LT', + 'nextDay' => '[moarn om] LT', + 'nextWeek' => 'dddd [om] LT', + 'lastDay' => '[juster om] LT', + 'lastWeek' => '[ôfrûne] dddd [om] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); + }, + 'months' => ['jannewaris', 'febrewaris', 'maart', 'april', 'maaie', 'juny', 'july', 'augustus', 'septimber', 'oktober', 'novimber', 'desimber'], + 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], + 'mmm_suffix' => '.', + 'weekdays' => ['snein', 'moandei', 'tiisdei', 'woansdei', 'tongersdei', 'freed', 'sneon'], + 'weekdays_short' => ['si.', 'mo.', 'ti.', 'wo.', 'to.', 'fr.', 'so.'], + 'weekdays_min' => ['Si', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'So'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' en '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/fy_DE.php b/libraries/Carbon/src/Carbon/Lang/fy_DE.php new file mode 100644 index 00000000000..0e7c190775f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fy_DE.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandriva.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Jaunuwoa', 'Februwoa', 'Moaz', 'Aprell', 'Mai', 'Juni', 'Juli', 'August', 'Septamba', 'Oktoba', 'Nowamba', 'Dezamba'], + 'months_short' => ['Jan', 'Feb', 'Moz', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Now', 'Dez'], + 'weekdays' => ['Sinndag', 'Mondag', 'Dingsdag', 'Meddwäakj', 'Donnadag', 'Friedag', 'Sinnowend'], + 'weekdays_short' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], + 'weekdays_min' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/fy_NL.php b/libraries/Carbon/src/Carbon/Lang/fy_NL.php new file mode 100644 index 00000000000..c2e6c78db96 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/fy_NL.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/fy.php', [ + 'formats' => [ + 'L' => 'DD-MM-YY', + ], + 'months' => ['Jannewaris', 'Febrewaris', 'Maart', 'April', 'Maaie', 'Juny', 'July', 'Augustus', 'Septimber', 'Oktober', 'Novimber', 'Desimber'], + 'months_short' => ['Jan', 'Feb', 'Mrt', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['Snein', 'Moandei', 'Tiisdei', 'Woansdei', 'Tongersdei', 'Freed', 'Sneon'], + 'weekdays_short' => ['Sn', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'Sn'], + 'weekdays_min' => ['Sn', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'Sn'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ga.php b/libraries/Carbon/src/Carbon/Lang/ga.php new file mode 100644 index 00000000000..d2ba43ecd36 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ga.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Thanks to André Silva : https://github.com/askpt + */ + +return [ + 'year' => ':count bliain', + 'a_year' => '{1}bliain|:count bliain', + 'y' => ':countb', + 'month' => ':count mí', + 'a_month' => '{1}mí|:count mí', + 'm' => ':countm', + 'week' => ':count sheachtain', + 'a_week' => '{1}sheachtain|:count sheachtain', + 'w' => ':countsh', + 'day' => ':count lá', + 'a_day' => '{1}lá|:count lá', + 'd' => ':countl', + 'hour' => ':count uair an chloig', + 'a_hour' => '{1}uair an chloig|:count uair an chloig', + 'h' => ':countu', + 'minute' => ':count nóiméad', + 'a_minute' => '{1}nóiméad|:count nóiméad', + 'min' => ':countn', + 'second' => ':count soicind', + 'a_second' => '{1}cúpla soicind|:count soicind', + 's' => ':countso', + 'ago' => ':time ó shin', + 'from_now' => 'i :time', + 'after' => ':time tar éis', + 'before' => ':time roimh', + 'diff_now' => 'anois', + 'diff_today' => 'Inniu', + 'diff_today_regexp' => 'Inniu(?:\\s+ag)?', + 'diff_yesterday' => 'inné', + 'diff_yesterday_regexp' => 'Inné(?:\\s+aig)?', + 'diff_tomorrow' => 'amárach', + 'diff_tomorrow_regexp' => 'Amárach(?:\\s+ag)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Inniu ag] LT', + 'nextDay' => '[Amárach ag] LT', + 'nextWeek' => 'dddd [ag] LT', + 'lastDay' => '[Inné aig] LT', + 'lastWeek' => 'dddd [seo caite] [ag] LT', + 'sameElse' => 'L', + ], + 'months' => ['Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig'], + 'months_short' => ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll'], + 'weekdays' => ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn'], + 'weekdays_short' => ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat'], + 'weekdays_min' => ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa'], + 'ordinal' => function ($number) { + return $number.($number === 1 ? 'd' : ($number % 10 === 2 ? 'na' : 'mh')); + }, + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' agus '], + 'meridiem' => ['r.n.', 'i.n.'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ga_IE.php b/libraries/Carbon/src/Carbon/Lang/ga_IE.php new file mode 100644 index 00000000000..4c31d983120 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ga_IE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ga.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/gd.php b/libraries/Carbon/src/Carbon/Lang/gd.php new file mode 100644 index 00000000000..b4bd4dc2d54 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gd.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Jon Ashdown + */ +return [ + 'year' => ':count bliadhna', + 'a_year' => '{1}bliadhna|:count bliadhna', + 'y' => ':count b.', + 'month' => ':count mìosan', + 'a_month' => '{1}mìos|:count mìosan', + 'm' => ':count ms.', + 'week' => ':count seachdainean', + 'a_week' => '{1}seachdain|:count seachdainean', + 'w' => ':count s.', + 'day' => ':count latha', + 'a_day' => '{1}latha|:count latha', + 'd' => ':count l.', + 'hour' => ':count uairean', + 'a_hour' => '{1}uair|:count uairean', + 'h' => ':count u.', + 'minute' => ':count mionaidean', + 'a_minute' => '{1}mionaid|:count mionaidean', + 'min' => ':count md.', + 'second' => ':count diogan', + 'a_second' => '{1}beagan diogan|:count diogan', + 's' => ':count d.', + 'ago' => 'bho chionn :time', + 'from_now' => 'ann an :time', + 'diff_yesterday' => 'An-dè', + 'diff_yesterday_regexp' => 'An-dè(?:\\s+aig)?', + 'diff_today' => 'An-diugh', + 'diff_today_regexp' => 'An-diugh(?:\\s+aig)?', + 'diff_tomorrow' => 'A-màireach', + 'diff_tomorrow_regexp' => 'A-màireach(?:\\s+aig)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[An-diugh aig] LT', + 'nextDay' => '[A-màireach aig] LT', + 'nextWeek' => 'dddd [aig] LT', + 'lastDay' => '[An-dè aig] LT', + 'lastWeek' => 'dddd [seo chaidh] [aig] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + return $number.($number === 1 ? 'd' : ($number % 10 === 2 ? 'na' : 'mh')); + }, + 'months' => ['Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'], + 'months_short' => ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'], + 'weekdays' => ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'], + 'weekdays_short' => ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], + 'weekdays_min' => ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' agus '], + 'meridiem' => ['m', 'f'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/gd_GB.php b/libraries/Carbon/src/Carbon/Lang/gd_GB.php new file mode 100644 index 00000000000..afbbb4f01b5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gd_GB.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/gd.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/gez.php b/libraries/Carbon/src/Carbon/Lang/gez.php new file mode 100644 index 00000000000..c22a2957740 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gez.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/gez_ER.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/gez_ER.php b/libraries/Carbon/src/Carbon/Lang/gez_ER.php new file mode 100644 index 00000000000..6a9ad22f4e3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gez_ER.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ጠሐረ', 'ከተተ', 'መገበ', 'አኀዘ', 'ግንባት', 'ሠንየ', 'ሐመለ', 'ነሐሰ', 'ከረመ', 'ጠቀመ', 'ኀደረ', 'ኀሠሠ'], + 'months_short' => ['ጠሐረ', 'ከተተ', 'መገበ', 'አኀዘ', 'ግንባ', 'ሠንየ', 'ሐመለ', 'ነሐሰ', 'ከረመ', 'ጠቀመ', 'ኀደረ', 'ኀሠሠ'], + 'weekdays' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚት'], + 'weekdays_short' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], + 'weekdays_min' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ጽባሕ', 'ምሴት'], + + 'month' => ':count ወርሕ', // less reliable + 'm' => ':count ወርሕ', // less reliable + 'a_month' => ':count ወርሕ', // less reliable + + 'week' => ':count ሰብዑ', // less reliable + 'w' => ':count ሰብዑ', // less reliable + 'a_week' => ':count ሰብዑ', // less reliable + + 'hour' => ':count አንትሙ', // less reliable + 'h' => ':count አንትሙ', // less reliable + 'a_hour' => ':count አንትሙ', // less reliable + + 'minute' => ':count ንኡስ', // less reliable + 'min' => ':count ንኡስ', // less reliable + 'a_minute' => ':count ንኡስ', // less reliable + + 'year' => ':count ዓመት', + 'y' => ':count ዓመት', + 'a_year' => ':count ዓመት', + + 'day' => ':count ዕለት', + 'd' => ':count ዕለት', + 'a_day' => ':count ዕለት', + + 'second' => ':count ካልእ', + 's' => ':count ካልእ', + 'a_second' => ':count ካልእ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/gez_ET.php b/libraries/Carbon/src/Carbon/Lang/gez_ET.php new file mode 100644 index 00000000000..68a3174cc87 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gez_ET.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], + 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], + 'weekdays' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚት'], + 'weekdays_short' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], + 'weekdays_min' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ጽባሕ', 'ምሴት'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/gl.php b/libraries/Carbon/src/Carbon/Lang/gl.php new file mode 100644 index 00000000000..404818df31f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gl.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Fidel Pita + * - JD Isaacks + * - Diego Vilariño + * - Sebastian Thierer + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count ano|:count anos', + 'a_year' => 'un ano|:count anos', + 'y' => ':count a.', + 'month' => ':count mes|:count meses', + 'a_month' => 'un mes|:count meses', + 'm' => ':count mes.', + 'week' => ':count semana|:count semanas', + 'a_week' => 'unha semana|:count semanas', + 'w' => ':count sem.', + 'day' => ':count día|:count días', + 'a_day' => 'un día|:count días', + 'd' => ':count d.', + 'hour' => ':count hora|:count horas', + 'a_hour' => 'unha hora|:count horas', + 'h' => ':count h.', + 'minute' => ':count minuto|:count minutos', + 'a_minute' => 'un minuto|:count minutos', + 'min' => ':count min.', + 'second' => ':count segundo|:count segundos', + 'a_second' => 'uns segundos|:count segundos', + 's' => ':count seg.', + 'ago' => 'hai :time', + 'from_now' => function ($time) { + if (str_starts_with($time, 'un')) { + return "n$time"; + } + + return "en $time"; + }, + 'diff_now' => 'agora', + 'diff_today' => 'hoxe', + 'diff_today_regexp' => 'hoxe(?:\\s+ás)?', + 'diff_yesterday' => 'onte', + 'diff_yesterday_regexp' => 'onte(?:\\s+á)?', + 'diff_tomorrow' => 'mañá', + 'diff_tomorrow_regexp' => 'mañá(?:\\s+ás)?', + 'after' => ':time despois', + 'before' => ':time antes', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D [de] MMMM [de] YYYY', + 'LLL' => 'D [de] MMMM [de] YYYY H:mm', + 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => function (CarbonInterface $current) { + return '[hoxe '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; + }, + 'nextDay' => function (CarbonInterface $current) { + return '[mañá '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; + }, + 'nextWeek' => function (CarbonInterface $current) { + return 'dddd ['.($current->hour !== 1 ? 'ás' : 'á').'] LT'; + }, + 'lastDay' => function (CarbonInterface $current) { + return '[onte '.($current->hour !== 1 ? 'á' : 'a').'] LT'; + }, + 'lastWeek' => function (CarbonInterface $current) { + return '[o] dddd [pasado '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':numberº', + 'months' => ['xaneiro', 'febreiro', 'marzo', 'abril', 'maio', 'xuño', 'xullo', 'agosto', 'setembro', 'outubro', 'novembro', 'decembro'], + 'months_short' => ['xan.', 'feb.', 'mar.', 'abr.', 'mai.', 'xuñ.', 'xul.', 'ago.', 'set.', 'out.', 'nov.', 'dec.'], + 'weekdays' => ['domingo', 'luns', 'martes', 'mércores', 'xoves', 'venres', 'sábado'], + 'weekdays_short' => ['dom.', 'lun.', 'mar.', 'mér.', 'xov.', 'ven.', 'sáb.'], + 'weekdays_min' => ['do', 'lu', 'ma', 'mé', 'xo', 've', 'sá'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' e '], + 'meridiem' => ['a.m.', 'p.m.'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/gl_ES.php b/libraries/Carbon/src/Carbon/Lang/gl_ES.php new file mode 100644 index 00000000000..b4de944de6e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gl_ES.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/gl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/gom.php b/libraries/Carbon/src/Carbon/Lang/gom.php new file mode 100644 index 00000000000..81dae264506 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gom.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/gom_Latn.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/gom_Latn.php b/libraries/Carbon/src/Carbon/Lang/gom_Latn.php new file mode 100644 index 00000000000..1cc1378edb5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gom_Latn.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + 'year' => ':count voros|:count vorsam', + 'y' => ':countv', + 'month' => ':count mhoino|:count mhoine', + 'm' => ':countmh', + 'week' => ':count satolleacho|:count satolleache', + 'w' => ':countsa|:countsa', + 'day' => ':count dis', + 'd' => ':countd', + 'hour' => ':count hor|:count horam', + 'h' => ':counth', + 'minute' => ':count minute|:count mintam', + 'min' => ':countm', + 'second' => ':count second', + 's' => ':counts', + + 'diff_today' => 'Aiz', + 'diff_yesterday' => 'Kal', + 'diff_tomorrow' => 'Faleam', + 'formats' => [ + 'LT' => 'A h:mm [vazta]', + 'LTS' => 'A h:mm:ss [vazta]', + 'L' => 'DD-MM-YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY A h:mm [vazta]', + 'LLLL' => 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', + 'llll' => 'ddd, D MMM YYYY, A h:mm [vazta]', + ], + + 'calendar' => [ + 'sameDay' => '[Aiz] LT', + 'nextDay' => '[Faleam] LT', + 'nextWeek' => '[Ieta to] dddd[,] LT', + 'lastDay' => '[Kal] LT', + 'lastWeek' => '[Fatlo] dddd[,] LT', + 'sameElse' => 'L', + ], + + 'months' => ['Janer', 'Febrer', 'Mars', 'Abril', 'Mai', 'Jun', 'Julai', 'Agost', 'Setembr', 'Otubr', 'Novembr', 'Dezembr'], + 'months_short' => ['Jan.', 'Feb.', 'Mars', 'Abr.', 'Mai', 'Jun', 'Jul.', 'Ago.', 'Set.', 'Otu.', 'Nov.', 'Dez.'], + 'weekdays' => ['Aitar', 'Somar', 'Mongllar', 'Budvar', 'Brestar', 'Sukrar', 'Son\'var'], + 'weekdays_short' => ['Ait.', 'Som.', 'Mon.', 'Bud.', 'Bre.', 'Suk.', 'Son.'], + 'weekdays_min' => ['Ai', 'Sm', 'Mo', 'Bu', 'Br', 'Su', 'Sn'], + + 'ordinal' => function ($number, $period) { + return $number.($period === 'D' ? 'er' : ''); + }, + + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'rati'; + } + if ($hour < 12) { + return 'sokalli'; + } + if ($hour < 16) { + return 'donparam'; + } + if ($hour < 20) { + return 'sanje'; + } + + return 'rati'; + }, + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' ani '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/gsw.php b/libraries/Carbon/src/Carbon/Lang/gsw.php new file mode 100644 index 00000000000..aa9eea5a54f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gsw.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Christopher Dell + * - Akira Matsuda + * - Enrique Vidal + * - Simone Carletti + * - Henning Kiel + * - Aaron Patterson + * - Florian Hanke + */ +return [ + 'year' => ':count Johr', + 'month' => ':count Monet', + 'week' => ':count Woche', + 'day' => ':count Tag', + 'hour' => ':count Schtund', + 'minute' => ':count Minute', + 'second' => ':count Sekunde', + 'weekdays' => ['Sunntig', 'Mäntig', 'Ziischtig', 'Mittwuch', 'Dunschtig', 'Friitig', 'Samschtig'], + 'weekdays_short' => ['Su', 'Mä', 'Zi', 'Mi', 'Du', 'Fr', 'Sa'], + 'weekdays_min' => ['Su', 'Mä', 'Zi', 'Mi', 'Du', 'Fr', 'Sa'], + 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'September', 'Oktober', 'November', 'Dezember'], + 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], + 'meridiem' => ['am Vormittag', 'am Namittag'], + 'ordinal' => ':number.', + 'list' => [', ', ' und '], + 'diff_now' => 'now', + 'diff_yesterday' => 'geschter', + 'diff_tomorrow' => 'moorn', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'Do MMMM YYYY', + 'LLL' => 'Do MMMM, HH:mm [Uhr]', + 'LLLL' => 'dddd, Do MMMM YYYY, HH:mm [Uhr]', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/gsw_CH.php b/libraries/Carbon/src/Carbon/Lang/gsw_CH.php new file mode 100644 index 00000000000..5f50e8d45ed --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gsw_CH.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/gsw.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/gsw_FR.php b/libraries/Carbon/src/Carbon/Lang/gsw_FR.php new file mode 100644 index 00000000000..ea598186e04 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gsw_FR.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/gsw.php', [ + 'meridiem' => ['vorm.', 'nam.'], + 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'Septämber', 'Oktoober', 'Novämber', 'Dezämber'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LLL' => 'Do MMMM YYYY HH:mm', + 'LLLL' => 'dddd, Do MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/gsw_LI.php b/libraries/Carbon/src/Carbon/Lang/gsw_LI.php new file mode 100644 index 00000000000..ea598186e04 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gsw_LI.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/gsw.php', [ + 'meridiem' => ['vorm.', 'nam.'], + 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'Septämber', 'Oktoober', 'Novämber', 'Dezämber'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LLL' => 'Do MMMM YYYY HH:mm', + 'LLLL' => 'dddd, Do MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/gu.php b/libraries/Carbon/src/Carbon/Lang/gu.php new file mode 100644 index 00000000000..91c420330c8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gu.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - Kaushik Thanki + * - Josh Soref + */ +return [ + 'year' => 'એક વર્ષ|:count વર્ષ', + 'y' => ':countવર્ષ|:countવર્ષો', + 'month' => 'એક મહિનો|:count મહિના', + 'm' => ':countમહિનો|:countમહિના', + 'week' => ':count અઠવાડિયું|:count અઠવાડિયા', + 'w' => ':countઅઠ.|:countઅઠ.', + 'day' => 'એક દિવસ|:count દિવસ', + 'd' => ':countદિ.|:countદિ.', + 'hour' => 'એક કલાક|:count કલાક', + 'h' => ':countક.|:countક.', + 'minute' => 'એક મિનિટ|:count મિનિટ', + 'min' => ':countમિ.|:countમિ.', + 'second' => 'અમુક પળો|:count સેકંડ', + 's' => ':countસે.|:countસે.', + 'ago' => ':time પેહલા', + 'from_now' => ':time મા', + 'after' => ':time પછી', + 'before' => ':time પહેલા', + 'diff_now' => 'હમણાં', + 'diff_today' => 'આજ', + 'diff_yesterday' => 'ગઇકાલે', + 'diff_tomorrow' => 'કાલે', + 'formats' => [ + 'LT' => 'A h:mm વાગ્યે', + 'LTS' => 'A h:mm:ss વાગ્યે', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm વાગ્યે', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm વાગ્યે', + ], + 'calendar' => [ + 'sameDay' => '[આજ] LT', + 'nextDay' => '[કાલે] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[ગઇકાલે] LT', + 'lastWeek' => '[પાછલા] dddd, LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'રાત'; + } + if ($hour < 10) { + return 'સવાર'; + } + if ($hour < 17) { + return 'બપોર'; + } + if ($hour < 20) { + return 'સાંજ'; + } + + return 'રાત'; + }, + 'months' => ['જાન્યુઆરી', 'ફેબ્રુઆરી', 'માર્ચ', 'એપ્રિલ', 'મે', 'જૂન', 'જુલાઈ', 'ઑગસ્ટ', 'સપ્ટેમ્બર', 'ઑક્ટ્બર', 'નવેમ્બર', 'ડિસેમ્બર'], + 'months_short' => ['જાન્યુ.', 'ફેબ્રુ.', 'માર્ચ', 'એપ્રિ.', 'મે', 'જૂન', 'જુલા.', 'ઑગ.', 'સપ્ટે.', 'ઑક્ટ્.', 'નવે.', 'ડિસે.'], + 'weekdays' => ['રવિવાર', 'સોમવાર', 'મંગળવાર', 'બુધ્વાર', 'ગુરુવાર', 'શુક્રવાર', 'શનિવાર'], + 'weekdays_short' => ['રવિ', 'સોમ', 'મંગળ', 'બુધ્', 'ગુરુ', 'શુક્ર', 'શનિ'], + 'weekdays_min' => ['ર', 'સો', 'મં', 'બુ', 'ગુ', 'શુ', 'શ'], + 'list' => [', ', ' અને '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'weekend' => [0, 0], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/gu_IN.php b/libraries/Carbon/src/Carbon/Lang/gu_IN.php new file mode 100644 index 00000000000..21439bbab81 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gu_IN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/gu.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/guz.php b/libraries/Carbon/src/Carbon/Lang/guz.php new file mode 100644 index 00000000000..3d6e023608b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/guz.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Ma', 'Mo'], + 'weekdays' => ['Chumapiri', 'Chumatato', 'Chumaine', 'Chumatano', 'Aramisi', 'Ichuma', 'Esabato'], + 'weekdays_short' => ['Cpr', 'Ctt', 'Cmn', 'Cmt', 'Ars', 'Icm', 'Est'], + 'weekdays_min' => ['Cpr', 'Ctt', 'Cmn', 'Cmt', 'Ars', 'Icm', 'Est'], + 'months' => ['Chanuari', 'Feburari', 'Machi', 'Apiriri', 'Mei', 'Juni', 'Chulai', 'Agosti', 'Septemba', 'Okitoba', 'Nobemba', 'Disemba'], + 'months_short' => ['Can', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Cul', 'Agt', 'Sep', 'Okt', 'Nob', 'Dis'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'month' => ':count omotunyi', // less reliable + 'm' => ':count omotunyi', // less reliable + 'a_month' => ':count omotunyi', // less reliable + + 'week' => ':count isano naibere', // less reliable + 'w' => ':count isano naibere', // less reliable + 'a_week' => ':count isano naibere', // less reliable + + 'second' => ':count ibere', // less reliable + 's' => ':count ibere', // less reliable + 'a_second' => ':count ibere', // less reliable + + 'year' => ':count omwaka', + 'y' => ':count omwaka', + 'a_year' => ':count omwaka', + + 'day' => ':count rituko', + 'd' => ':count rituko', + 'a_day' => ':count rituko', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/gv.php b/libraries/Carbon/src/Carbon/Lang/gv.php new file mode 100644 index 00000000000..6a65417a40e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gv.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/gv_GB.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/gv_GB.php b/libraries/Carbon/src/Carbon/Lang/gv_GB.php new file mode 100644 index 00000000000..2380e59338a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/gv_GB.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Alastair McKinstry bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Jerrey-geuree', 'Toshiaght-arree', 'Mayrnt', 'Averil', 'Boaldyn', 'Mean-souree', 'Jerrey-souree', 'Luanistyn', 'Mean-fouyir', 'Jerrey-fouyir', 'Mee Houney', 'Mee ny Nollick'], + 'months_short' => ['J-guer', 'T-arree', 'Mayrnt', 'Avrril', 'Boaldyn', 'M-souree', 'J-souree', 'Luanistyn', 'M-fouyir', 'J-fouyir', 'M.Houney', 'M.Nollick'], + 'weekdays' => ['Jedoonee', 'Jelhein', 'Jemayrt', 'Jercean', 'Jerdein', 'Jeheiney', 'Jesarn'], + 'weekdays_short' => ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'], + 'weekdays_min' => ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count blein', + 'y' => ':count blein', + 'a_year' => ':count blein', + + 'month' => ':count mee', + 'm' => ':count mee', + 'a_month' => ':count mee', + + 'week' => ':count shiaghtin', + 'w' => ':count shiaghtin', + 'a_week' => ':count shiaghtin', + + 'day' => ':count laa', + 'd' => ':count laa', + 'a_day' => ':count laa', + + 'hour' => ':count oor', + 'h' => ':count oor', + 'a_hour' => ':count oor', + + 'minute' => ':count feer veg', + 'min' => ':count feer veg', + 'a_minute' => ':count feer veg', + + 'second' => ':count derrey', + 's' => ':count derrey', + 'a_second' => ':count derrey', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ha.php b/libraries/Carbon/src/Carbon/Lang/ha.php new file mode 100644 index 00000000000..03682873f17 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ha.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - pablo@mandriva.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM, YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM, YYYY HH:mm', + ], + 'months' => ['Janairu', 'Faburairu', 'Maris', 'Afirilu', 'Mayu', 'Yuni', 'Yuli', 'Agusta', 'Satumba', 'Oktoba', 'Nuwamba', 'Disamba'], + 'months_short' => ['Jan', 'Fab', 'Mar', 'Afi', 'May', 'Yun', 'Yul', 'Agu', 'Sat', 'Okt', 'Nuw', 'Dis'], + 'weekdays' => ['Lahadi', 'Litini', 'Talata', 'Laraba', 'Alhamis', 'Jumaʼa', 'Asabar'], + 'weekdays_short' => ['Lah', 'Lit', 'Tal', 'Lar', 'Alh', 'Jum', 'Asa'], + 'weekdays_min' => ['Lh', 'Li', 'Ta', 'Lr', 'Al', 'Ju', 'As'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => 'shekara :count', + 'y' => 'shekara :count', + 'a_year' => 'shekara :count', + + 'month' => ':count wátàa', + 'm' => ':count wátàa', + 'a_month' => ':count wátàa', + + 'week' => ':count mako', + 'w' => ':count mako', + 'a_week' => ':count mako', + + 'day' => ':count rana', + 'd' => ':count rana', + 'a_day' => ':count rana', + + 'hour' => ':count áwàa', + 'h' => ':count áwàa', + 'a_hour' => ':count áwàa', + + 'minute' => 'minti :count', + 'min' => 'minti :count', + 'a_minute' => 'minti :count', + + 'second' => ':count ná bíyú', + 's' => ':count ná bíyú', + 'a_second' => ':count ná bíyú', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ha_GH.php b/libraries/Carbon/src/Carbon/Lang/ha_GH.php new file mode 100644 index 00000000000..c8fd1820409 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ha_GH.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ha.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ha_NE.php b/libraries/Carbon/src/Carbon/Lang/ha_NE.php new file mode 100644 index 00000000000..c8fd1820409 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ha_NE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ha.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ha_NG.php b/libraries/Carbon/src/Carbon/Lang/ha_NG.php new file mode 100644 index 00000000000..c8fd1820409 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ha_NG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ha.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hak.php b/libraries/Carbon/src/Carbon/Lang/hak.php new file mode 100644 index 00000000000..c20f84c1d11 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hak.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/hak_TW.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hak_TW.php b/libraries/Carbon/src/Carbon/Lang/hak_TW.php new file mode 100644 index 00000000000..f1ec9de418b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hak_TW.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY年MM月DD日', + ], + 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], + 'weekdays' => ['禮拜日', '禮拜一', '禮拜二', '禮拜三', '禮拜四', '禮拜五', '禮拜六'], + 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['上晝', '下晝'], + + 'year' => ':count ngien11', + 'y' => ':count ngien11', + 'a_year' => ':count ngien11', + + 'month' => ':count ngie̍t', + 'm' => ':count ngie̍t', + 'a_month' => ':count ngie̍t', + + 'week' => ':count lî-pai', + 'w' => ':count lî-pai', + 'a_week' => ':count lî-pai', + + 'day' => ':count ngit', + 'd' => ':count ngit', + 'a_day' => ':count ngit', + + 'hour' => ':count sṳ̀', + 'h' => ':count sṳ̀', + 'a_hour' => ':count sṳ̀', + + 'minute' => ':count fûn', + 'min' => ':count fûn', + 'a_minute' => ':count fûn', + + 'second' => ':count miéu', + 's' => ':count miéu', + 'a_second' => ':count miéu', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/haw.php b/libraries/Carbon/src/Carbon/Lang/haw.php new file mode 100644 index 00000000000..0c5092c05e0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/haw.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'months' => ['Ianuali', 'Pepeluali', 'Malaki', 'ʻApelila', 'Mei', 'Iune', 'Iulai', 'ʻAukake', 'Kepakemapa', 'ʻOkakopa', 'Nowemapa', 'Kekemapa'], + 'months_short' => ['Ian.', 'Pep.', 'Mal.', 'ʻAp.', 'Mei', 'Iun.', 'Iul.', 'ʻAu.', 'Kep.', 'ʻOk.', 'Now.', 'Kek.'], + 'weekdays' => ['Lāpule', 'Poʻakahi', 'Poʻalua', 'Poʻakolu', 'Poʻahā', 'Poʻalima', 'Poʻaono'], + 'weekdays_short' => ['LP', 'P1', 'P2', 'P3', 'P4', 'P5', 'P6'], + 'weekdays_min' => ['S', 'M', 'T', 'W', 'T', 'F', 'S'], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd, D MMMM YYYY h:mm a', + ], + + 'year' => ':count makahiki', + 'y' => ':count makahiki', + 'a_year' => ':count makahiki', + + 'month' => ':count mahina', + 'm' => ':count mahina', + 'a_month' => ':count mahina', + + 'week' => ':count pule', + 'w' => ':count pule', + 'a_week' => ':count pule', + + 'day' => ':count lā', + 'd' => ':count lā', + 'a_day' => ':count lā', + + 'hour' => ':count hola', + 'h' => ':count hola', + 'a_hour' => ':count hola', + + 'minute' => ':count minuke', + 'min' => ':count minuke', + 'a_minute' => ':count minuke', + + 'second' => ':count lua', + 's' => ':count lua', + 'a_second' => ':count lua', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/he.php b/libraries/Carbon/src/Carbon/Lang/he.php new file mode 100644 index 00000000000..395187faf86 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/he.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Daniel Cohen Gindi + * - JD Isaacks + * - Itai Nathaniel + * - GabMic + * - Yaakov Dahan (yakidahan) + */ +return [ + 'year' => 'שנה|{2}שנתיים|:count שנים', + 'y' => 'שנה|:count שנ׳', + 'month' => 'חודש|{2}חודשיים|:count חודשים', + 'm' => 'חודש|:count חו׳', + 'week' => 'שבוע|{2}שבועיים|:count שבועות', + 'w' => 'שבוע|:count שב׳', + 'day' => 'יום|{2}יומיים|:count ימים', + 'd' => 'יום|:count ימ׳', + 'hour' => 'שעה|{2}שעתיים|:count שעות', + 'h' => 'שעה|:count שע׳', + 'minute' => 'דקה|{2}שתי דקות|:count דקות', + 'min' => 'דקה|:count דק׳', + 'second' => 'שנייה|:count שניות', + 'a_second' => 'כמה שניות|:count שניות', + 's' => 'שניה|:count שנ׳', + 'ago' => 'לפני :time', + 'from_now' => 'בעוד :time מעכשיו', + 'after' => 'אחרי :time', + 'before' => 'לפני :time', + 'diff_now' => 'עכשיו', + 'diff_today' => 'היום', + 'diff_today_regexp' => 'היום(?:\\s+ב־)?', + 'diff_yesterday' => 'אתמול', + 'diff_yesterday_regexp' => 'אתמול(?:\\s+ב־)?', + 'diff_tomorrow' => 'מחר', + 'diff_tomorrow_regexp' => 'מחר(?:\\s+ב־)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D [ב]MMMM YYYY', + 'LLL' => 'D [ב]MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D [ב]MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[היום ב־]LT', + 'nextDay' => '[מחר ב־]LT', + 'nextWeek' => 'dddd [בשעה] LT', + 'lastDay' => '[אתמול ב־]LT', + 'lastWeek' => '[ביום] dddd [האחרון בשעה] LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour, $minute, $isLower) { + if ($hour < 5) { + return 'לפנות בוקר'; + } + if ($hour < 10) { + return 'בבוקר'; + } + if ($hour < 12) { + return $isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } + if ($hour < 18) { + return $isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } + + return 'בערב'; + }, + 'months' => ['ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'], + 'months_short' => ['ינו׳', 'פבר׳', 'מרץ', 'אפר׳', 'מאי', 'יוני', 'יולי', 'אוג׳', 'ספט׳', 'אוק׳', 'נוב׳', 'דצמ׳'], + 'weekdays' => ['ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת'], + 'weekdays_short' => ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'], + 'weekdays_min' => ['א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש'], + 'list' => [', ', ' ו -'], + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/he_IL.php b/libraries/Carbon/src/Carbon/Lang/he_IL.php new file mode 100644 index 00000000000..11936b5f9c8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/he_IL.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/he.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hi.php b/libraries/Carbon/src/Carbon/Lang/hi.php new file mode 100644 index 00000000000..a4e6028e7fb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hi.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - abhimanyu003 + * - Josh Soref + * - JD Isaacks + */ +return [ + 'year' => 'एक वर्ष|:count वर्ष', + 'y' => '1 वर्ष|:count वर्षों', + 'month' => 'एक महीने|:count महीने', + 'm' => '1 माह|:count महीने', + 'week' => '1 सप्ताह|:count सप्ताह', + 'w' => '1 सप्ताह|:count सप्ताह', + 'day' => 'एक दिन|:count दिन', + 'd' => '1 दिन|:count दिनों', + 'hour' => 'एक घंटा|:count घंटे', + 'h' => '1 घंटा|:count घंटे', + 'minute' => 'एक मिनट|:count मिनट', + 'min' => '1 मिनट|:count मिनटों', + 'second' => 'कुछ ही क्षण|:count सेकंड', + 's' => '1 सेकंड|:count सेकंड', + 'ago' => ':time पहले', + 'from_now' => ':time में', + 'after' => ':time के बाद', + 'before' => ':time के पहले', + 'diff_now' => 'अब', + 'diff_today' => 'आज', + 'diff_yesterday' => 'कल', + 'diff_tomorrow' => 'कल', + 'formats' => [ + 'LT' => 'A h:mm बजे', + 'LTS' => 'A h:mm:ss बजे', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm बजे', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm बजे', + ], + 'calendar' => [ + 'sameDay' => '[आज] LT', + 'nextDay' => '[कल] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[कल] LT', + 'lastWeek' => '[पिछले] dddd, LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'रात'; + } + if ($hour < 10) { + return 'सुबह'; + } + if ($hour < 17) { + return 'दोपहर'; + } + if ($hour < 20) { + return 'शाम'; + } + + return 'रात'; + }, + 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'months_short' => ['जन.', 'फ़र.', 'मार्च', 'अप्रै.', 'मई', 'जून', 'जुल.', 'अग.', 'सित.', 'अक्टू.', 'नव.', 'दिस.'], + 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'], + 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरू', 'शुक्र', 'शनि'], + 'weekdays_min' => ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'], + 'list' => [', ', ' और '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'weekend' => [0, 0], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/hi_IN.php b/libraries/Carbon/src/Carbon/Lang/hi_IN.php new file mode 100644 index 00000000000..dbf1231904d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hi_IN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/hi.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hif.php b/libraries/Carbon/src/Carbon/Lang/hif.php new file mode 100644 index 00000000000..996f3b047a8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hif.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/hif_FJ.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hif_FJ.php b/libraries/Carbon/src/Carbon/Lang/hif_FJ.php new file mode 100644 index 00000000000..4caf52f2552 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hif_FJ.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'dddd DD MMM YYYY', + ], + 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + 'weekdays' => ['Ravivar', 'Somvar', 'Mangalvar', 'Budhvar', 'Guruvar', 'Shukravar', 'Shanivar'], + 'weekdays_short' => ['Ravi', 'Som', 'Mangal', 'Budh', 'Guru', 'Shukra', 'Shani'], + 'weekdays_min' => ['Ravi', 'Som', 'Mangal', 'Budh', 'Guru', 'Shukra', 'Shani'], + 'meridiem' => ['Purvahan', 'Aparaahna'], + + 'hour' => ':count minit', // less reliable + 'h' => ':count minit', // less reliable + 'a_hour' => ':count minit', // less reliable + + 'year' => ':count saal', + 'y' => ':count saal', + 'a_year' => ':count saal', + + 'month' => ':count Mahina', + 'm' => ':count Mahina', + 'a_month' => ':count Mahina', + + 'week' => ':count Hafta', + 'w' => ':count Hafta', + 'a_week' => ':count Hafta', + + 'day' => ':count Din', + 'd' => ':count Din', + 'a_day' => ':count Din', + + 'minute' => ':count Minit', + 'min' => ':count Minit', + 'a_minute' => ':count Minit', + + 'second' => ':count Second', + 's' => ':count Second', + 'a_second' => ':count Second', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/hne.php b/libraries/Carbon/src/Carbon/Lang/hne.php new file mode 100644 index 00000000000..4bced34f4a8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hne.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/hne_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hne_IN.php b/libraries/Carbon/src/Carbon/Lang/hne_IN.php new file mode 100644 index 00000000000..450d440d899 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hne_IN.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat, Pune bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अपरेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितमबर', 'अकटूबर', 'नवमबर', 'दिसमबर'], + 'months_short' => ['जन', 'फर', 'मार्च', 'अप', 'मई', 'जून', 'जुला', 'अग', 'सित', 'अकटू', 'नव', 'दिस'], + 'weekdays' => ['इतवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'बिरसपत', 'सुकरवार', 'सनिवार'], + 'weekdays_short' => ['इत', 'सोम', 'मंग', 'बुध', 'बिर', 'सुक', 'सनि'], + 'weekdays_min' => ['इत', 'सोम', 'मंग', 'बुध', 'बिर', 'सुक', 'सनि'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['बिहिनियाँ', 'मंझनियाँ'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/hr.php b/libraries/Carbon/src/Carbon/Lang/hr.php new file mode 100644 index 00000000000..d228c1d779e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hr.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - Tim Fish + * - shaishavgandhi05 + * - Serhan Apaydın + * - JD Isaacks + * - tomhorvat + * - Josh Soref + * - François B + * - shaishavgandhi05 + * - Serhan Apaydın + * - JD Isaacks + * - tomhorvat + * - Stjepan Majdak + * - Vanja Retkovac (vr00) + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count godinu|:count godine|:count godina', + 'y' => ':count god.|:count god.|:count god.', + 'month' => ':count mjesec|:count mjeseca|:count mjeseci', + 'm' => ':count mj.|:count mj.|:count mj.', + 'week' => ':count tjedan|:count tjedna|:count tjedana', + 'w' => ':count tj.|:count tj.|:count tj.', + 'day' => ':count dan|:count dana|:count dana', + 'd' => ':count d.|:count d.|:count d.', + 'hour' => ':count sat|:count sata|:count sati', + 'h' => ':count sat|:count sata|:count sati', + 'minute' => ':count minutu|:count minute|:count minuta', + 'min' => ':count min.|:count min.|:count min.', + 'second' => ':count sekundu|:count sekunde|:count sekundi', + 'a_second' => 'nekoliko sekundi|:count sekunde|:count sekundi', + 's' => ':count sek.|:count sek.|:count sek.', + 'ago' => 'prije :time', + 'from_now' => 'za :time', + 'after' => ':time poslije', + 'before' => ':time prije', + 'diff_now' => 'sad', + 'diff_today' => 'danas', + 'diff_today_regexp' => 'danas(?:\\s+u)?', + 'diff_yesterday' => 'jučer', + 'diff_yesterday_regexp' => 'jučer(?:\\s+u)?', + 'diff_tomorrow' => 'sutra', + 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', + 'diff_before_yesterday' => 'prekjučer', + 'diff_after_tomorrow' => 'prekosutra', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'D. M. YYYY.', + 'LL' => 'D. MMMM YYYY.', + 'LLL' => 'D. MMMM YYYY. H:mm', + 'LLLL' => 'dddd, D. MMMM YYYY. H:mm', + ], + 'calendar' => [ + 'sameDay' => '[danas u] LT', + 'nextDay' => '[sutra u] LT', + 'nextWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + default: + return '[u] dddd [u] LT'; + } + }, + 'lastDay' => '[jučer u] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + default: + return '[prošli] dddd [u] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['siječnja', 'veljače', 'ožujka', 'travnja', 'svibnja', 'lipnja', 'srpnja', 'kolovoza', 'rujna', 'listopada', 'studenoga', 'prosinca'], + 'months_standalone' => ['siječanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac'], + 'months_short' => ['sij.', 'velj.', 'ožu.', 'tra.', 'svi.', 'lip.', 'srp.', 'kol.', 'ruj.', 'lis.', 'stu.', 'pro.'], + 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => ['nedjelju', 'ponedjeljak', 'utorak', 'srijedu', 'četvrtak', 'petak', 'subotu'], + 'weekdays_standalone' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], + 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], + 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' i '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/hr_BA.php b/libraries/Carbon/src/Carbon/Lang/hr_BA.php new file mode 100644 index 00000000000..89c0c15579d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hr_BA.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - DarkoDevelop + */ +return array_replace_recursive(require __DIR__.'/hr.php', [ + 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], + 'weekdays_short' => ['ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub'], + 'weekdays_min' => ['ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub'], + 'months' => ['siječnja', 'veljače', 'ožujka', 'travnja', 'svibnja', 'lipnja', 'srpnja', 'kolovoza', 'rujna', 'listopada', 'studenoga', 'prosinca'], + 'months_short' => ['sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro'], + 'months_standalone' => ['siječanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D. M. yy.', + 'LL' => 'D. MMM YYYY.', + 'LLL' => 'D. MMMM YYYY. HH:mm', + 'LLLL' => 'dddd, D. MMMM YYYY. HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/hr_HR.php b/libraries/Carbon/src/Carbon/Lang/hr_HR.php new file mode 100644 index 00000000000..599b67de7f0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hr_HR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/hr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hsb.php b/libraries/Carbon/src/Carbon/Lang/hsb.php new file mode 100644 index 00000000000..6852dfa1eee --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hsb.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/hsb_DE.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hsb_DE.php b/libraries/Carbon/src/Carbon/Lang/hsb_DE.php new file mode 100644 index 00000000000..5333b1b9234 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hsb_DE.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Information from Michael Wolf Andrzej Krzysztofowicz ankry@mif.pg.gda.pl + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'DD. MMMM YYYY', + 'LLL' => 'DD. MMMM, HH:mm [hodź.]', + 'LLLL' => 'dddd, DD. MMMM YYYY, HH:mm [hodź.]', + ], + 'months' => ['januara', 'februara', 'měrca', 'apryla', 'meje', 'junija', 'julija', 'awgusta', 'septembra', 'oktobra', 'nowembra', 'decembra'], + 'months_short' => ['Jan', 'Feb', 'Měr', 'Apr', 'Mej', 'Jun', 'Jul', 'Awg', 'Sep', 'Okt', 'Now', 'Dec'], + 'weekdays' => ['Njedźela', 'Póndźela', 'Wutora', 'Srjeda', 'Štvórtk', 'Pjatk', 'Sobota'], + 'weekdays_short' => ['Nj', 'Pó', 'Wu', 'Sr', 'Št', 'Pj', 'So'], + 'weekdays_min' => ['Nj', 'Pó', 'Wu', 'Sr', 'Št', 'Pj', 'So'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count lěto', + 'y' => ':count lěto', + 'a_year' => ':count lěto', + + 'month' => ':count měsac', + 'm' => ':count měsac', + 'a_month' => ':count měsac', + + 'week' => ':count tydźeń', + 'w' => ':count tydźeń', + 'a_week' => ':count tydźeń', + + 'day' => ':count dźeń', + 'd' => ':count dźeń', + 'a_day' => ':count dźeń', + + 'hour' => ':count hodźina', + 'h' => ':count hodźina', + 'a_hour' => ':count hodźina', + + 'minute' => ':count chwila', + 'min' => ':count chwila', + 'a_minute' => ':count chwila', + + 'second' => ':count druhi', + 's' => ':count druhi', + 'a_second' => ':count druhi', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ht.php b/libraries/Carbon/src/Carbon/Lang/ht.php new file mode 100644 index 00000000000..9132c635b95 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ht.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ht_HT.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ht_HT.php b/libraries/Carbon/src/Carbon/Lang/ht_HT.php new file mode 100644 index 00000000000..01d282b8986 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ht_HT.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['janvye', 'fevriye', 'mas', 'avril', 'me', 'jen', 'jiyè', 'out', 'septanm', 'oktòb', 'novanm', 'desanm'], + 'months_short' => ['jan', 'fev', 'mas', 'avr', 'me', 'jen', 'jiy', 'out', 'sep', 'okt', 'nov', 'des'], + 'weekdays' => ['dimanch', 'lendi', 'madi', 'mèkredi', 'jedi', 'vandredi', 'samdi'], + 'weekdays_short' => ['dim', 'len', 'mad', 'mèk', 'jed', 'van', 'sam'], + 'weekdays_min' => ['dim', 'len', 'mad', 'mèk', 'jed', 'van', 'sam'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => ':count lane', + 'y' => ':count lane', + 'a_year' => ':count lane', + + 'month' => 'mwa :count', + 'm' => 'mwa :count', + 'a_month' => 'mwa :count', + + 'week' => 'semèn :count', + 'w' => 'semèn :count', + 'a_week' => 'semèn :count', + + 'day' => ':count jou', + 'd' => ':count jou', + 'a_day' => ':count jou', + + 'hour' => ':count lè', + 'h' => ':count lè', + 'a_hour' => ':count lè', + + 'minute' => ':count minit', + 'min' => ':count minit', + 'a_minute' => ':count minit', + + 'second' => ':count segonn', + 's' => ':count segonn', + 'a_second' => ':count segonn', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/hu.php b/libraries/Carbon/src/Carbon/Lang/hu.php new file mode 100644 index 00000000000..9bfc4dc8d4a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hu.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Adam Brunner + * - Brett Johnson + * - balping + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +$huWeekEndings = ['vasárnap', 'hétfőn', 'kedden', 'szerdán', 'csütörtökön', 'pénteken', 'szombaton']; + +return [ + 'year' => ':count év', + 'y' => ':count év', + 'month' => ':count hónap', + 'm' => ':count hónap', + 'week' => ':count hét', + 'w' => ':count hét', + 'day' => ':count nap', + 'd' => ':count nap', + 'hour' => ':count óra', + 'h' => ':count óra', + 'minute' => ':count perc', + 'min' => ':count perc', + 'second' => ':count másodperc', + 's' => ':count másodperc', + 'ago' => ':time', + 'from_now' => ':time múlva', + 'after' => ':time később', + 'before' => ':time korábban', + 'year_ago' => ':count éve', + 'y_ago' => ':count éve', + 'month_ago' => ':count hónapja', + 'm_ago' => ':count hónapja', + 'week_ago' => ':count hete', + 'w_ago' => ':count hete', + 'day_ago' => ':count napja', + 'd_ago' => ':count napja', + 'hour_ago' => ':count órája', + 'h_ago' => ':count órája', + 'minute_ago' => ':count perce', + 'min_ago' => ':count perce', + 'second_ago' => ':count másodperce', + 's_ago' => ':count másodperce', + 'year_after' => ':count évvel', + 'y_after' => ':count évvel', + 'month_after' => ':count hónappal', + 'm_after' => ':count hónappal', + 'week_after' => ':count héttel', + 'w_after' => ':count héttel', + 'day_after' => ':count nappal', + 'd_after' => ':count nappal', + 'hour_after' => ':count órával', + 'h_after' => ':count órával', + 'minute_after' => ':count perccel', + 'min_after' => ':count perccel', + 'second_after' => ':count másodperccel', + 's_after' => ':count másodperccel', + 'year_before' => ':count évvel', + 'y_before' => ':count évvel', + 'month_before' => ':count hónappal', + 'm_before' => ':count hónappal', + 'week_before' => ':count héttel', + 'w_before' => ':count héttel', + 'day_before' => ':count nappal', + 'd_before' => ':count nappal', + 'hour_before' => ':count órával', + 'h_before' => ':count órával', + 'minute_before' => ':count perccel', + 'min_before' => ':count perccel', + 'second_before' => ':count másodperccel', + 's_before' => ':count másodperccel', + 'months' => ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'], + 'months_short' => ['jan.', 'febr.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'], + 'weekdays' => ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'], + 'weekdays_short' => ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'], + 'weekdays_min' => ['v', 'h', 'k', 'sze', 'cs', 'p', 'sz'], + 'ordinal' => ':number.', + 'diff_now' => 'most', + 'diff_today' => 'ma', + 'diff_yesterday' => 'tegnap', + 'diff_tomorrow' => 'holnap', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'YYYY.MM.DD.', + 'LL' => 'YYYY. MMMM D.', + 'LLL' => 'YYYY. MMMM D. H:mm', + 'LLLL' => 'YYYY. MMMM D., dddd H:mm', + ], + 'calendar' => [ + 'sameDay' => '[ma] LT[-kor]', + 'nextDay' => '[holnap] LT[-kor]', + 'nextWeek' => function (CarbonInterface $date) use ($huWeekEndings) { + return '['.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; + }, + 'lastDay' => '[tegnap] LT[-kor]', + 'lastWeek' => function (CarbonInterface $date) use ($huWeekEndings) { + return '[múlt '.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; + }, + 'sameElse' => 'L', + ], + 'meridiem' => ['DE', 'DU'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' és '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/hu_HU.php b/libraries/Carbon/src/Carbon/Lang/hu_HU.php new file mode 100644 index 00000000000..ed8b885673f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hu_HU.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/hu.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/hy.php b/libraries/Carbon/src/Carbon/Lang/hy.php new file mode 100644 index 00000000000..a15593f65e4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hy.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - mhamlet + */ +return [ + 'year' => ':count տարի', + 'a_year' => 'տարի|:count տարի', + 'y' => ':countտ', + 'month' => ':count ամիս', + 'a_month' => 'ամիս|:count ամիս', + 'm' => ':countամ', + 'week' => ':count շաբաթ', + 'a_week' => 'շաբաթ|:count շաբաթ', + 'w' => ':countշ', + 'day' => ':count օր', + 'a_day' => 'օր|:count օր', + 'd' => ':countօր', + 'hour' => ':count ժամ', + 'a_hour' => 'ժամ|:count ժամ', + 'h' => ':countժ', + 'minute' => ':count րոպե', + 'a_minute' => 'րոպե|:count րոպե', + 'min' => ':countր', + 'second' => ':count վայրկյան', + 'a_second' => 'մի քանի վայրկյան|:count վայրկյան', + 's' => ':countվրկ', + 'ago' => ':time առաջ', + 'from_now' => ':timeից', + 'after' => ':time հետո', + 'before' => ':time առաջ', + 'diff_now' => 'հիմա', + 'diff_today' => 'այսօր', + 'diff_yesterday' => 'երեկ', + 'diff_tomorrow' => 'վաղը', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY թ.', + 'LLL' => 'D MMMM YYYY թ., HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY թ., HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[այսօր] LT', + 'nextDay' => '[վաղը] LT', + 'nextWeek' => 'dddd [օրը ժամը] LT', + 'lastDay' => '[երեկ] LT', + 'lastWeek' => '[անցած] dddd [օրը ժամը] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + return $number.($number === 1 ? '-ին' : '-րդ'); + default: + return $number; + } + }, + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'գիշերվա'; + } + if ($hour < 12) { + return 'առավոտվա'; + } + if ($hour < 17) { + return 'ցերեկվա'; + } + + return 'երեկոյան'; + }, + 'months' => ['հունվարի', 'փետրվարի', 'մարտի', 'ապրիլի', 'մայիսի', 'հունիսի', 'հուլիսի', 'օգոստոսի', 'սեպտեմբերի', 'հոկտեմբերի', 'նոյեմբերի', 'դեկտեմբերի'], + 'months_standalone' => ['հունվար', 'փետրվար', 'մարտ', 'ապրիլ', 'մայիս', 'հունիս', 'հուլիս', 'օգոստոս', 'սեպտեմբեր', 'հոկտեմբեր', 'նոյեմբեր', 'դեկտեմբեր'], + 'months_short' => ['հնվ', 'փտր', 'մրտ', 'ապր', 'մյս', 'հնս', 'հլս', 'օգս', 'սպտ', 'հկտ', 'նմբ', 'դկտ'], + 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => ['կիրակի', 'երկուշաբթի', 'երեքշաբթի', 'չորեքշաբթի', 'հինգշաբթի', 'ուրբաթ', 'շաբաթ'], + 'weekdays_short' => ['կրկ', 'երկ', 'երք', 'չրք', 'հնգ', 'ուրբ', 'շբթ'], + 'weekdays_min' => ['կրկ', 'երկ', 'երք', 'չրք', 'հնգ', 'ուրբ', 'շբթ'], + 'list' => [', ', ' եւ '], + 'first_day_of_week' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/hy_AM.php b/libraries/Carbon/src/Carbon/Lang/hy_AM.php new file mode 100644 index 00000000000..f406343f4c6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/hy_AM.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - Tim Fish + * - Serhan Apaydın + * - JD Isaacks + */ +return array_replace_recursive(require __DIR__.'/hy.php', [ + 'from_now' => ':time հետո', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/i18n.php b/libraries/Carbon/src/Carbon/Lang/i18n.php new file mode 100644 index 00000000000..cffffe8bd10 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/i18n.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], + 'months' => ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], + 'months_short' => ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], + 'weekdays' => ['1', '2', '3', '4', '5', '6', '7'], + 'weekdays_short' => ['1', '2', '3', '4', '5', '6', '7'], + 'weekdays_min' => ['1', '2', '3', '4', '5', '6', '7'], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ia.php b/libraries/Carbon/src/Carbon/Lang/ia.php new file mode 100644 index 00000000000..606e215aaed --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ia.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ia_FR.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ia_FR.php b/libraries/Carbon/src/Carbon/Lang/ia_FR.php new file mode 100644 index 00000000000..b1d61a5de7b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ia_FR.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Fedora Project Nik Kalach nikka@fedoraproject.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['januario', 'februario', 'martio', 'april', 'maio', 'junio', 'julio', 'augusto', 'septembre', 'octobre', 'novembre', 'decembre'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], + 'weekdays' => ['dominica', 'lunedi', 'martedi', 'mercuridi', 'jovedi', 'venerdi', 'sabbato'], + 'weekdays_short' => ['dom', 'lun', 'mar', 'mer', 'jov', 'ven', 'sab'], + 'weekdays_min' => ['dom', 'lun', 'mar', 'mer', 'jov', 'ven', 'sab'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => 'anno :count', + 'y' => 'anno :count', + 'a_year' => 'anno :count', + + 'month' => ':count mense', + 'm' => ':count mense', + 'a_month' => ':count mense', + + 'week' => ':count septimana', + 'w' => ':count septimana', + 'a_week' => ':count septimana', + + 'day' => ':count die', + 'd' => ':count die', + 'a_day' => ':count die', + + 'hour' => ':count hora', + 'h' => ':count hora', + 'a_hour' => ':count hora', + + 'minute' => ':count minuscule', + 'min' => ':count minuscule', + 'a_minute' => ':count minuscule', + + 'second' => ':count secunda', + 's' => ':count secunda', + 'a_second' => ':count secunda', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/id.php b/libraries/Carbon/src/Carbon/Lang/id.php new file mode 100644 index 00000000000..4f9b637ff1e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/id.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - du + * - JD Isaacks + * - Nafies Luthfi + * - Raymundus Jati Primanda (mundusjp) + * - diankur313 + * - a-wip0 + */ +return [ + 'year' => ':count tahun', + 'a_year' => '{1}setahun|]1,Inf[:count tahun', + 'y' => ':countthn', + 'month' => ':count bulan', + 'a_month' => '{1}sebulan|]1,Inf[:count bulan', + 'm' => ':countbln', + 'week' => ':count minggu', + 'a_week' => '{1}seminggu|]1,Inf[:count minggu', + 'w' => ':countmgg', + 'day' => ':count hari', + 'a_day' => '{1}sehari|]1,Inf[:count hari', + 'd' => ':counthr', + 'hour' => ':count jam', + 'a_hour' => '{1}sejam|]1,Inf[:count jam', + 'h' => ':countj', + 'minute' => ':count menit', + 'a_minute' => '{1}semenit|]1,Inf[:count menit', + 'min' => ':countmnt', + 'second' => ':count detik', + 'a_second' => '{1}beberapa detik|]1,Inf[:count detik', + 's' => ':countdt', + 'ago' => ':time yang lalu', + 'from_now' => ':time dari sekarang', + 'after' => ':time setelahnya', + 'before' => ':time sebelumnya', + 'diff_now' => 'sekarang', + 'diff_today' => 'Hari', + 'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?', + 'diff_yesterday' => 'kemarin', + 'diff_yesterday_regexp' => 'Kemarin(?:\\s+pukul)?', + 'diff_tomorrow' => 'besok', + 'diff_tomorrow_regexp' => 'Besok(?:\\s+pukul)?', + 'formats' => [ + 'LT' => 'HH.mm', + 'LTS' => 'HH.mm.ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY [pukul] HH.mm', + 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', + ], + 'calendar' => [ + 'sameDay' => '[Hari ini pukul] LT', + 'nextDay' => '[Besok pukul] LT', + 'nextWeek' => 'dddd [pukul] LT', + 'lastDay' => '[Kemarin pukul] LT', + 'lastWeek' => 'dddd [lalu pukul] LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 11) { + return 'pagi'; + } + if ($hour < 15) { + return 'siang'; + } + if ($hour < 19) { + return 'sore'; + } + + return 'malam'; + }, + 'months' => ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agt', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'], + 'weekdays_short' => ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'], + 'weekdays_min' => ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' dan '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/id_ID.php b/libraries/Carbon/src/Carbon/Lang/id_ID.php new file mode 100644 index 00000000000..10ad46326e5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/id_ID.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/id.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ig.php b/libraries/Carbon/src/Carbon/Lang/ig.php new file mode 100644 index 00000000000..5da6d8d2100 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ig.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ig_NG.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ig_NG.php b/libraries/Carbon/src/Carbon/Lang/ig_NG.php new file mode 100644 index 00000000000..f894d98d016 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ig_NG.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - pablo@mandriva.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Jenụwarị', 'Febrụwarị', 'Maachị', 'Eprel', 'Mee', 'Juun', 'Julaị', 'Ọgọọst', 'Septemba', 'Ọktoba', 'Novemba', 'Disemba'], + 'months_short' => ['Jen', 'Feb', 'Maa', 'Epr', 'Mee', 'Juu', 'Jul', 'Ọgọ', 'Sep', 'Ọkt', 'Nov', 'Dis'], + 'weekdays' => ['sọnde', 'mọnde', 'tuzde', 'wenzde', 'tọsde', 'fraịde', 'satọde'], + 'weekdays_short' => ['sọn', 'mọn', 'tuz', 'wen', 'tọs', 'fra', 'sat'], + 'weekdays_min' => ['sọn', 'mọn', 'tuz', 'wen', 'tọs', 'fra', 'sat'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => 'afo :count', + 'y' => 'afo :count', + 'a_year' => 'afo :count', + + 'month' => 'önwa :count', + 'm' => 'önwa :count', + 'a_month' => 'önwa :count', + + 'week' => 'izu :count', + 'w' => 'izu :count', + 'a_week' => 'izu :count', + + 'day' => 'ụbọchị :count', + 'd' => 'ụbọchị :count', + 'a_day' => 'ụbọchị :count', + + 'hour' => 'awa :count', + 'h' => 'awa :count', + 'a_hour' => 'awa :count', + + 'minute' => 'minit :count', + 'min' => 'minit :count', + 'a_minute' => 'minit :count', + + 'second' => 'sekọnd :count', + 's' => 'sekọnd :count', + 'a_second' => 'sekọnd :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ii.php b/libraries/Carbon/src/Carbon/Lang/ii.php new file mode 100644 index 00000000000..fb49d237586 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ii.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['ꎸꄑ', 'ꁯꋒ'], + 'weekdays' => ['ꑭꆏꑍ', 'ꆏꊂꋍ', 'ꆏꊂꑍ', 'ꆏꊂꌕ', 'ꆏꊂꇖ', 'ꆏꊂꉬ', 'ꆏꊂꃘ'], + 'weekdays_short' => ['ꑭꆏ', 'ꆏꋍ', 'ꆏꑍ', 'ꆏꌕ', 'ꆏꇖ', 'ꆏꉬ', 'ꆏꃘ'], + 'weekdays_min' => ['ꑭꆏ', 'ꆏꋍ', 'ꆏꑍ', 'ꆏꌕ', 'ꆏꇖ', 'ꆏꉬ', 'ꆏꃘ'], + 'months' => null, + 'months_short' => ['ꋍꆪ', 'ꑍꆪ', 'ꌕꆪ', 'ꇖꆪ', 'ꉬꆪ', 'ꃘꆪ', 'ꏃꆪ', 'ꉆꆪ', 'ꈬꆪ', 'ꊰꆪ', 'ꊰꊪꆪ', 'ꊰꑋꆪ'], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D h:mm a', + 'LLLL' => 'YYYY MMMM D, dddd h:mm a', + ], + + 'year' => ':count ꒉ', // less reliable + 'y' => ':count ꒉ', // less reliable + 'a_year' => ':count ꒉ', // less reliable + + 'month' => ':count ꆪ', + 'm' => ':count ꆪ', + 'a_month' => ':count ꆪ', + + 'week' => ':count ꏃ', // less reliable + 'w' => ':count ꏃ', // less reliable + 'a_week' => ':count ꏃ', // less reliable + + 'day' => ':count ꏜ', // less reliable + 'd' => ':count ꏜ', // less reliable + 'a_day' => ':count ꏜ', // less reliable + + 'hour' => ':count ꄮꈉ', + 'h' => ':count ꄮꈉ', + 'a_hour' => ':count ꄮꈉ', + + 'minute' => ':count ꀄꊭ', // less reliable + 'min' => ':count ꀄꊭ', // less reliable + 'a_minute' => ':count ꀄꊭ', // less reliable + + 'second' => ':count ꇅ', // less reliable + 's' => ':count ꇅ', // less reliable + 'a_second' => ':count ꇅ', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ik.php b/libraries/Carbon/src/Carbon/Lang/ik.php new file mode 100644 index 00000000000..b295970d240 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ik.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ik_CA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ik_CA.php b/libraries/Carbon/src/Carbon/Lang/ik_CA.php new file mode 100644 index 00000000000..5f4b2c44b16 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ik_CA.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - pablo@mandriva.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Siqiññaatchiaq', 'Siqiññaasrugruk', 'Paniqsiqsiivik', 'Qilġich Tatqiat', 'Suppivik', 'Iġñivik', 'Itchavik', 'Tiññivik', 'Amiġaiqsivik', 'Sikkuvik', 'Nippivik', 'Siqiñġiḷaq'], + 'months_short' => ['Sñt', 'Sñs', 'Pan', 'Qil', 'Sup', 'Iġñ', 'Itc', 'Tiñ', 'Ami', 'Sik', 'Nip', 'Siq'], + 'weekdays' => ['Minġuiqsioiq', 'Savałłiq', 'Ilaqtchiioiq', 'Qitchiioiq', 'Sisamiioiq', 'Tallimmiioiq', 'Maqinġuoiq'], + 'weekdays_short' => ['Min', 'Sav', 'Ila', 'Qit', 'Sis', 'Tal', 'Maq'], + 'weekdays_min' => ['Min', 'Sav', 'Ila', 'Qit', 'Sis', 'Tal', 'Maq'], + 'day_of_first_week_of_year' => 1, + + 'year' => ':count ukiuq', + 'y' => ':count ukiuq', + 'a_year' => ':count ukiuq', + + 'month' => ':count Tatqiat', + 'm' => ':count Tatqiat', + 'a_month' => ':count Tatqiat', + + 'week' => ':count tatqiat', // less reliable + 'w' => ':count tatqiat', // less reliable + 'a_week' => ':count tatqiat', // less reliable + + 'day' => ':count siqiñiq', // less reliable + 'd' => ':count siqiñiq', // less reliable + 'a_day' => ':count siqiñiq', // less reliable + + 'hour' => ':count Siḷa', // less reliable + 'h' => ':count Siḷa', // less reliable + 'a_hour' => ':count Siḷa', // less reliable + + 'second' => ':count iġñiq', // less reliable + 's' => ':count iġñiq', // less reliable + 'a_second' => ':count iġñiq', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/in.php b/libraries/Carbon/src/Carbon/Lang/in.php new file mode 100644 index 00000000000..10ad46326e5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/in.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/id.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/is.php b/libraries/Carbon/src/Carbon/Lang/is.php new file mode 100644 index 00000000000..15f2c8b7890 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/is.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kristján Ingi Geirsson + */ +return [ + 'year' => '1 ár|:count ár', + 'y' => '1 ár|:count ár', + 'month' => '1 mánuður|:count mánuðir', + 'm' => '1 mánuður|:count mánuðir', + 'week' => '1 vika|:count vikur', + 'w' => '1 vika|:count vikur', + 'day' => '1 dagur|:count dagar', + 'd' => '1 dagur|:count dagar', + 'hour' => '1 klukkutími|:count klukkutímar', + 'h' => '1 klukkutími|:count klukkutímar', + 'minute' => '1 mínúta|:count mínútur', + 'min' => '1 mínúta|:count mínútur', + 'second' => '1 sekúnda|:count sekúndur', + 's' => '1 sekúnda|:count sekúndur', + 'ago' => ':time síðan', + 'from_now' => ':time síðan', + 'after' => ':time eftir', + 'before' => ':time fyrir', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' og '], + 'meridiem' => ['fh', 'eh'], + 'diff_now' => 'núna', + 'diff_yesterday' => 'í gær', + 'diff_tomorrow' => 'á morgun', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM [kl.] HH:mm', + 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', + ], + 'weekdays' => ['sunnudaginn', 'mánudaginn', 'þriðjudaginn', 'miðvikudaginn', 'fimmtudaginn', 'föstudaginn', 'laugardaginn'], + 'weekdays_short' => ['sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau'], + 'weekdays_min' => ['sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau'], + 'months' => ['janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/is_IS.php b/libraries/Carbon/src/Carbon/Lang/is_IS.php new file mode 100644 index 00000000000..0a593d32aae --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/is_IS.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/is.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/it.php b/libraries/Carbon/src/Carbon/Lang/it.php new file mode 100644 index 00000000000..b3911faece5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/it.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ash + * - François B + * - Marco Perrando + * - Massimiliano Caniparoli + * - JD Isaacks + * - Andrea Martini + * - Francesco Marasco + * - Tizianoz93 + * - Davide Casiraghi (davide-casiraghi) + * - Pete Scopes (pdscopes) + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count anno|:count anni', + 'a_year' => 'un anno|:count anni', + 'y' => ':count anno|:count anni', + 'month' => ':count mese|:count mesi', + 'a_month' => 'un mese|:count mesi', + 'm' => ':count mese|:count mesi', + 'week' => ':count settimana|:count settimane', + 'a_week' => 'una settimana|:count settimane', + 'w' => ':count set.', + 'day' => ':count giorno|:count giorni', + 'a_day' => 'un giorno|:count giorni', + 'd' => ':count g|:count gg', + 'hour' => ':count ora|:count ore', + 'a_hour' => 'un\'ora|:count ore', + 'h' => ':count h', + 'minute' => ':count minuto|:count minuti', + 'a_minute' => 'un minuto|:count minuti', + 'min' => ':count min.', + 'second' => ':count secondo|:count secondi', + 'a_second' => 'alcuni secondi|:count secondi', + 's' => ':count sec.', + 'millisecond' => ':count millisecondo|:count millisecondi', + 'a_millisecond' => 'un millisecondo|:count millisecondi', + 'ms' => ':countms', + 'microsecond' => ':count microsecondo|:count microsecondi', + 'a_microsecond' => 'un microsecondo|:count microsecondi', + 'µs' => ':countµs', + 'ago' => ':time fa', + 'from_now' => function ($time) { + return (preg_match('/^\d.+$/', $time) ? 'tra' : 'in')." $time"; + }, + 'after' => ':time dopo', + 'before' => ':time prima', + 'diff_now' => 'proprio ora', + 'diff_today' => 'Oggi', + 'diff_today_regexp' => 'Oggi(?:\\s+alle)?', + 'diff_yesterday' => 'ieri', + 'diff_yesterday_regexp' => 'Ieri(?:\\s+alle)?', + 'diff_tomorrow' => 'domani', + 'diff_tomorrow_regexp' => 'Domani(?:\\s+alle)?', + 'diff_before_yesterday' => 'l\'altro ieri', + 'diff_after_tomorrow' => 'dopodomani', + 'period_interval' => 'ogni :interval', + 'period_start_date' => 'dal :date', + 'period_end_date' => 'al :date', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Oggi alle] LT', + 'nextDay' => '[Domani alle] LT', + 'nextWeek' => 'dddd [alle] LT', + 'lastDay' => '[Ieri alle] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':numberº', + 'months' => ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'], + 'months_short' => ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'], + 'weekdays' => ['domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato'], + 'weekdays_short' => ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'], + 'weekdays_min' => ['do', 'lu', 'ma', 'me', 'gi', 've', 'sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' e '], + 'ordinal_words' => [ + 'of' => 'di', + 'first' => 'primo', + 'second' => 'secondo', + 'third' => 'terzo', + 'fourth' => 'quarto', + 'fifth' => 'quinto', + 'last' => 'ultimo', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/it_CH.php b/libraries/Carbon/src/Carbon/Lang/it_CH.php new file mode 100644 index 00000000000..10cc82e64d4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/it_CH.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Propaganistas + */ +return array_replace_recursive(require __DIR__.'/it.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/it_IT.php b/libraries/Carbon/src/Carbon/Lang/it_IT.php new file mode 100644 index 00000000000..16af40a1ab3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/it_IT.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return require __DIR__.'/it.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/it_SM.php b/libraries/Carbon/src/Carbon/Lang/it_SM.php new file mode 100644 index 00000000000..82e738f84cc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/it_SM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/it.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/it_VA.php b/libraries/Carbon/src/Carbon/Lang/it_VA.php new file mode 100644 index 00000000000..82e738f84cc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/it_VA.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/it.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/iu.php b/libraries/Carbon/src/Carbon/Lang/iu.php new file mode 100644 index 00000000000..797ce5d3108 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/iu.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/iu_CA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/iu_CA.php b/libraries/Carbon/src/Carbon/Lang/iu_CA.php new file mode 100644 index 00000000000..4c71108b1e2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/iu_CA.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Pablo Saratxaga pablo@mandriva.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'MM/DD/YY', + ], + 'months' => ['ᔮᓄᐊᓕ', 'ᕕᕗᐊᓕ', 'ᒪᔅᓯ', 'ᐃᐳᓗ', 'ᒪᐃ', 'ᔪᓂ', 'ᔪᓚᐃ', 'ᐊᒋᓯ', 'ᓯᑎᕙ', 'ᐊᑦᑐᕙ', 'ᓄᕕᕙ', 'ᑎᓯᕝᕙ'], + 'months_short' => ['ᔮᓄ', 'ᕕᕗ', 'ᒪᔅ', 'ᐃᐳ', 'ᒪᐃ', 'ᔪᓂ', 'ᔪᓚ', 'ᐊᒋ', 'ᓯᑎ', 'ᐊᑦ', 'ᓄᕕ', 'ᑎᓯ'], + 'weekdays' => ['ᓈᑦᑎᖑᔭᕐᕕᒃ', 'ᓇᒡᒐᔾᔭᐅ', 'ᓇᒡᒐᔾᔭᐅᓕᖅᑭᑦ', 'ᐱᖓᓲᓕᖅᓯᐅᑦ', 'ᕿᑎᖅᑰᑦ', 'ᐅᓪᓗᕈᓘᑐᐃᓇᖅ', 'ᓯᕙᑖᕕᒃ'], + 'weekdays_short' => ['ᓈ', 'ᓇ', 'ᓕ', 'ᐱ', 'ᕿ', 'ᐅ', 'ᓯ'], + 'weekdays_min' => ['ᓈ', 'ᓇ', 'ᓕ', 'ᐱ', 'ᕿ', 'ᐅ', 'ᓯ'], + 'day_of_first_week_of_year' => 1, + + 'year' => ':count ᐅᑭᐅᖅ', + 'y' => ':count ᐅᑭᐅᖅ', + 'a_year' => ':count ᐅᑭᐅᖅ', + + 'month' => ':count qaammat', + 'm' => ':count qaammat', + 'a_month' => ':count qaammat', + + 'week' => ':count sapaatip akunnera', + 'w' => ':count sapaatip akunnera', + 'a_week' => ':count sapaatip akunnera', + + 'day' => ':count ulloq', + 'd' => ':count ulloq', + 'a_day' => ':count ulloq', + + 'hour' => ':count ikarraq', + 'h' => ':count ikarraq', + 'a_hour' => ':count ikarraq', + + 'minute' => ':count titiqqaralaaq', // less reliable + 'min' => ':count titiqqaralaaq', // less reliable + 'a_minute' => ':count titiqqaralaaq', // less reliable + + 'second' => ':count marluk', // less reliable + 's' => ':count marluk', // less reliable + 'a_second' => ':count marluk', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/iw.php b/libraries/Carbon/src/Carbon/Lang/iw.php new file mode 100644 index 00000000000..85b5eb57708 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/iw.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'months' => ['ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'], + 'months_short' => ['ינו׳', 'פבר׳', 'מרץ', 'אפר׳', 'מאי', 'יוני', 'יולי', 'אוג׳', 'ספט׳', 'אוק׳', 'נוב׳', 'דצמ׳'], + 'weekdays' => ['יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום שישי', 'יום שבת'], + 'weekdays_short' => ['יום א׳', 'יום ב׳', 'יום ג׳', 'יום ד׳', 'יום ה׳', 'יום ו׳', 'שבת'], + 'weekdays_min' => ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'], + 'meridiem' => ['לפנה״צ', 'אחה״צ'], + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'D.M.YYYY', + 'LL' => 'D בMMM YYYY', + 'LLL' => 'D בMMMM YYYY H:mm', + 'LLLL' => 'dddd, D בMMMM YYYY H:mm', + ], + + 'year' => ':count שנה', + 'y' => ':count שנה', + 'a_year' => ':count שנה', + + 'month' => ':count חודש', + 'm' => ':count חודש', + 'a_month' => ':count חודש', + + 'week' => ':count שבוע', + 'w' => ':count שבוע', + 'a_week' => ':count שבוע', + + 'day' => ':count יום', + 'd' => ':count יום', + 'a_day' => ':count יום', + + 'hour' => ':count שעה', + 'h' => ':count שעה', + 'a_hour' => ':count שעה', + + 'minute' => ':count דקה', + 'min' => ':count דקה', + 'a_minute' => ':count דקה', + + 'second' => ':count שניה', + 's' => ':count שניה', + 'a_second' => ':count שניה', + + 'ago' => 'לפני :time', + 'from_now' => 'בעוד :time', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ja.php b/libraries/Carbon/src/Carbon/Lang/ja.php new file mode 100644 index 00000000000..e8eaa57ce5a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ja.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Takuya Sawada + * - Atsushi Tanaka + * - François B + * - Jason Katz-Brown + * - Serhan Apaydın + * - XueWei + * - JD Isaacks + * - toyama satoshi + * - atakigawa + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count年', + 'y' => ':count年', + 'month' => ':countヶ月', + 'm' => ':countヶ月', + 'week' => ':count週間', + 'w' => ':count週間', + 'day' => ':count日', + 'd' => ':count日', + 'hour' => ':count時間', + 'h' => ':count時間', + 'minute' => ':count分', + 'min' => ':count分', + 'second' => ':count秒', + 'a_second' => '{1}数秒|]1,Inf[:count秒', + 's' => ':count秒', + 'ago' => ':time前', + 'from_now' => ':time後', + 'after' => ':time後', + 'before' => ':time前', + 'diff_now' => '今', + 'diff_today' => '今日', + 'diff_yesterday' => '昨日', + 'diff_tomorrow' => '明日', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY/MM/DD', + 'LL' => 'YYYY年M月D日', + 'LLL' => 'YYYY年M月D日 HH:mm', + 'LLLL' => 'YYYY年M月D日 dddd HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[今日] LT', + 'nextDay' => '[明日] LT', + 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { + if ($other->week !== $current->week) { + return '[来週]dddd LT'; + } + + return 'dddd LT'; + }, + 'lastDay' => '[昨日] LT', + 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { + if ($other->week !== $current->week) { + return '[先週]dddd LT'; + } + + return 'dddd LT'; + }, + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'd': + case 'D': + case 'DDD': + return $number.'日'; + default: + return $number; + } + }, + 'meridiem' => ['午前', '午後'], + 'months' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], + 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], + 'weekdays' => ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'], + 'weekdays_short' => ['日', '月', '火', '水', '木', '金', '土'], + 'weekdays_min' => ['日', '月', '火', '水', '木', '金', '土'], + 'list' => '、', + 'alt_numbers' => ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '二十', '二十一', '二十二', '二十三', '二十四', '二十五', '二十六', '二十七', '二十八', '二十九', '三十', '三十一', '三十二', '三十三', '三十四', '三十五', '三十六', '三十七', '三十八', '三十九', '四十', '四十一', '四十二', '四十三', '四十四', '四十五', '四十六', '四十七', '四十八', '四十九', '五十', '五十一', '五十二', '五十三', '五十四', '五十五', '五十六', '五十七', '五十八', '五十九', '六十', '六十一', '六十二', '六十三', '六十四', '六十五', '六十六', '六十七', '六十八', '六十九', '七十', '七十一', '七十二', '七十三', '七十四', '七十五', '七十六', '七十七', '七十八', '七十九', '八十', '八十一', '八十二', '八十三', '八十四', '八十五', '八十六', '八十七', '八十八', '八十九', '九十', '九十一', '九十二', '九十三', '九十四', '九十五', '九十六', '九十七', '九十八', '九十九'], + 'alt_numbers_pow' => [ + 10000 => '万', + 1000 => '千', + 100 => '百', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ja_JP.php b/libraries/Carbon/src/Carbon/Lang/ja_JP.php new file mode 100644 index 00000000000..6bfdb170863 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ja_JP.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ja.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/jgo.php b/libraries/Carbon/src/Carbon/Lang/jgo.php new file mode 100644 index 00000000000..73b22d685f8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/jgo.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/jmc.php b/libraries/Carbon/src/Carbon/Lang/jmc.php new file mode 100644 index 00000000000..f11ba53eaa9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/jmc.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['utuko', 'kyiukonyi'], + 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/jv.php b/libraries/Carbon/src/Carbon/Lang/jv.php new file mode 100644 index 00000000000..06f92619c57 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/jv.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - tgfjt + * - JD Isaacks + */ +return [ + 'year' => '{1}setaun|]1,Inf[:count taun', + 'month' => '{1}sewulan|]1,Inf[:count wulan', + 'week' => '{1}sakminggu|]1,Inf[:count minggu', + 'day' => '{1}sedinten|]1,Inf[:count dinten', + 'hour' => '{1}setunggal jam|]1,Inf[:count jam', + 'minute' => '{1}setunggal menit|]1,Inf[:count menit', + 'second' => '{1}sawetawis detik|]1,Inf[:count detik', + 'ago' => ':time ingkang kepengker', + 'from_now' => 'wonten ing :time', + 'diff_today' => 'Dinten', + 'diff_yesterday' => 'Kala', + 'diff_yesterday_regexp' => 'Kala(?:\\s+wingi)?(?:\\s+pukul)?', + 'diff_tomorrow' => 'Mbenjang', + 'diff_tomorrow_regexp' => 'Mbenjang(?:\\s+pukul)?', + 'diff_today_regexp' => 'Dinten(?:\\s+puniko)?(?:\\s+pukul)?', + 'formats' => [ + 'LT' => 'HH.mm', + 'LTS' => 'HH.mm.ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY [pukul] HH.mm', + 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', + ], + 'calendar' => [ + 'sameDay' => '[Dinten puniko pukul] LT', + 'nextDay' => '[Mbenjang pukul] LT', + 'nextWeek' => 'dddd [pukul] LT', + 'lastDay' => '[Kala wingi pukul] LT', + 'lastWeek' => 'dddd [kepengker pukul] LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 11) { + return 'enjing'; + } + if ($hour < 15) { + return 'siyang'; + } + if ($hour < 19) { + return 'sonten'; + } + + return 'ndalu'; + }, + 'months' => ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'Nopember', 'Desember'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sep', 'Okt', 'Nop', 'Des'], + 'weekdays' => ['Minggu', 'Senen', 'Seloso', 'Rebu', 'Kemis', 'Jemuwah', 'Septu'], + 'weekdays_short' => ['Min', 'Sen', 'Sel', 'Reb', 'Kem', 'Jem', 'Sep'], + 'weekdays_min' => ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sp'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' lan '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ka.php b/libraries/Carbon/src/Carbon/Lang/ka.php new file mode 100644 index 00000000000..2948361abdc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ka.php @@ -0,0 +1,204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Tornike Razmadze + * - François B + * - Lasha Dolidze + * - Tim Fish + * - JD Isaacks + * - Tornike Razmadze + * - François B + * - Lasha Dolidze + * - JD Isaacks + * - LONGMAN + * - Avtandil Kikabidze (akalongman) + * - Levan Velijanashvili (Stichoza) + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count წელი', + 'y' => ':count წელი', + 'a_year' => '{1}წელი|]1,Inf[:count წელი', + 'month' => ':count თვე', + 'm' => ':count თვე', + 'a_month' => '{1}თვე|]1,Inf[:count თვე', + 'week' => ':count კვირა', + 'w' => ':count კვირა', + 'a_week' => '{1}კვირა|]1,Inf[:count კვირა', + 'day' => ':count დღე', + 'd' => ':count დღე', + 'a_day' => '{1}დღე|]1,Inf[:count დღე', + 'hour' => ':count საათი', + 'h' => ':count საათი', + 'a_hour' => '{1}საათი|]1,Inf[:count საათი', + 'minute' => ':count წუთი', + 'min' => ':count წუთი', + 'a_minute' => '{1}წუთი|]1,Inf[:count წუთი', + 'second' => ':count წამი', + 's' => ':count წამი', + 'a_second' => '{1}რამდენიმე წამი|]1,Inf[:count წამი', + 'ago' => function ($time) { + $replacements = [ + // year + 'წელი' => 'წლის', + // month + 'თვე' => 'თვის', + // week + 'კვირა' => 'კვირის', + // day + 'დღე' => 'დღის', + // hour + 'საათი' => 'საათის', + // minute + 'წუთი' => 'წუთის', + // second + 'წამი' => 'წამის', + ]; + $time = strtr($time, array_flip($replacements)); + $time = strtr($time, $replacements); + + return "$time წინ"; + }, + 'from_now' => function ($time) { + $replacements = [ + // year + 'წელი' => 'წელიწადში', + // week + 'კვირა' => 'კვირაში', + // day + 'დღე' => 'დღეში', + // month + 'თვე' => 'თვეში', + // hour + 'საათი' => 'საათში', + // minute + 'წუთი' => 'წუთში', + // second + 'წამი' => 'წამში', + ]; + $time = strtr($time, array_flip($replacements)); + $time = strtr($time, $replacements); + + return $time; + }, + 'after' => function ($time) { + $replacements = [ + // year + 'წელი' => 'წლის', + // month + 'თვე' => 'თვის', + // week + 'კვირა' => 'კვირის', + // day + 'დღე' => 'დღის', + // hour + 'საათი' => 'საათის', + // minute + 'წუთი' => 'წუთის', + // second + 'წამი' => 'წამის', + ]; + $time = strtr($time, array_flip($replacements)); + $time = strtr($time, $replacements); + + return "$time შემდეგ"; + }, + 'before' => function ($time) { + $replacements = [ + // year + 'წელი' => 'წლით', + // month + 'თვე' => 'თვით', + // week + 'კვირა' => 'კვირით', + // day + 'დღე' => 'დღით', + // hour + 'საათი' => 'საათით', + // minute + 'წუთი' => 'წუთით', + // second + 'წამი' => 'წამით', + ]; + $time = strtr($time, array_flip($replacements)); + $time = strtr($time, $replacements); + + return "$time ადრე"; + }, + 'diff_now' => 'ახლა', + 'diff_today' => 'დღეს', + 'diff_yesterday' => 'გუშინ', + 'diff_tomorrow' => 'ხვალ', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[დღეს], LT[-ზე]', + 'nextDay' => '[ხვალ], LT[-ზე]', + 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { + return ($current->isSameWeek($other) ? '' : '[შემდეგ] ').'dddd, LT[-ზე]'; + }, + 'lastDay' => '[გუშინ], LT[-ზე]', + 'lastWeek' => '[წინა] dddd, LT-ზე', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + if ($number === 0) { + return $number; + } + if ($number === 1) { + return $number.'-ლი'; + } + if (($number < 20) || ($number <= 100 && ($number % 20 === 0)) || ($number % 100 === 0)) { + return 'მე-'.$number; + } + + return $number.'-ე'; + }, + 'months' => ['იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი'], + 'months_standalone' => ['იანვარს', 'თებერვალს', 'მარტს', 'აპრილს', 'მაისს', 'ივნისს', 'ივლისს', 'აგვისტოს', 'სექტემბერს', 'ოქტომბერს', 'ნოემბერს', 'დეკემბერს'], + 'months_short' => ['იან', 'თებ', 'მარ', 'აპრ', 'მაი', 'ივნ', 'ივლ', 'აგვ', 'სექ', 'ოქტ', 'ნოე', 'დეკ'], + 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => ['კვირას', 'ორშაბათს', 'სამშაბათს', 'ოთხშაბათს', 'ხუთშაბათს', 'პარასკევს', 'შაბათს'], + 'weekdays_standalone' => ['კვირა', 'ორშაბათი', 'სამშაბათი', 'ოთხშაბათი', 'ხუთშაბათი', 'პარასკევი', 'შაბათი'], + 'weekdays_short' => ['კვი', 'ორშ', 'სამ', 'ოთხ', 'ხუთ', 'პარ', 'შაბ'], + 'weekdays_min' => ['კვ', 'ორ', 'სა', 'ოთ', 'ხუ', 'პა', 'შა'], + 'weekdays_regexp' => '/^([^d].*|.*[^d])$/', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' და '], + 'meridiem' => function ($hour) { + if ($hour >= 4) { + if ($hour < 11) { + return 'დილის'; + } + + if ($hour < 16) { + return 'შუადღის'; + } + + if ($hour < 22) { + return 'საღამოს'; + } + } + + return 'ღამის'; + }, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ka_GE.php b/libraries/Carbon/src/Carbon/Lang/ka_GE.php new file mode 100644 index 00000000000..97540e5bdc9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ka_GE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ka.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kab.php b/libraries/Carbon/src/Carbon/Lang/kab.php new file mode 100644 index 00000000000..b09a0313254 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kab.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/kab_DZ.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kab_DZ.php b/libraries/Carbon/src/Carbon/Lang/kab_DZ.php new file mode 100644 index 00000000000..3227ada3a84 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kab_DZ.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - belkacem77@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Yennayer', 'Fuṛar', 'Meɣres', 'Yebrir', 'Mayyu', 'Yunyu', 'Yulyu', 'ɣuct', 'Ctembeṛ', 'Tubeṛ', 'Wambeṛ', 'Dujembeṛ'], + 'months_short' => ['Yen', 'Fur', 'Meɣ', 'Yeb', 'May', 'Yun', 'Yul', 'ɣuc', 'Cte', 'Tub', 'Wam', 'Duj'], + 'weekdays' => ['Acer', 'Arim', 'Aram', 'Ahad', 'Amhad', 'Sem', 'Sed'], + 'weekdays_short' => ['Ace', 'Ari', 'Ara', 'Aha', 'Amh', 'Sem', 'Sed'], + 'weekdays_min' => ['Ace', 'Ari', 'Ara', 'Aha', 'Amh', 'Sem', 'Sed'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['FT', 'MD'], + + 'year' => ':count n yiseggasen', + 'y' => ':count n yiseggasen', + 'a_year' => ':count n yiseggasen', + + 'month' => ':count n wayyuren', + 'm' => ':count n wayyuren', + 'a_month' => ':count n wayyuren', + + 'week' => ':count n ledwaṛ', // less reliable + 'w' => ':count n ledwaṛ', // less reliable + 'a_week' => ':count n ledwaṛ', // less reliable + + 'day' => ':count n wussan', + 'd' => ':count n wussan', + 'a_day' => ':count n wussan', + + 'hour' => ':count n tsaɛtin', + 'h' => ':count n tsaɛtin', + 'a_hour' => ':count n tsaɛtin', + + 'minute' => ':count n tedqiqin', + 'min' => ':count n tedqiqin', + 'a_minute' => ':count n tedqiqin', + + 'second' => ':count tasdidt', // less reliable + 's' => ':count tasdidt', // less reliable + 'a_second' => ':count tasdidt', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/kam.php b/libraries/Carbon/src/Carbon/Lang/kam.php new file mode 100644 index 00000000000..5a7a973f58d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kam.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Ĩyakwakya', 'Ĩyawĩoo'], + 'weekdays' => ['Wa kyumwa', 'Wa kwambĩlĩlya', 'Wa kelĩ', 'Wa katatũ', 'Wa kana', 'Wa katano', 'Wa thanthatũ'], + 'weekdays_short' => ['Wky', 'Wkw', 'Wkl', 'Wtũ', 'Wkn', 'Wtn', 'Wth'], + 'weekdays_min' => ['Wky', 'Wkw', 'Wkl', 'Wtũ', 'Wkn', 'Wtn', 'Wth'], + 'months' => ['Mwai wa mbee', 'Mwai wa kelĩ', 'Mwai wa katatũ', 'Mwai wa kana', 'Mwai wa katano', 'Mwai wa thanthatũ', 'Mwai wa muonza', 'Mwai wa nyaanya', 'Mwai wa kenda', 'Mwai wa ĩkumi', 'Mwai wa ĩkumi na ĩmwe', 'Mwai wa ĩkumi na ilĩ'], + 'months_short' => ['Mbe', 'Kel', 'Ktũ', 'Kan', 'Ktn', 'Tha', 'Moo', 'Nya', 'Knd', 'Ĩku', 'Ĩkm', 'Ĩkl'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + // Too unreliable + /* + 'year' => ':count mbua', // less reliable + 'y' => ':count mbua', // less reliable + 'a_year' => ':count mbua', // less reliable + + 'month' => ':count ndakitali', // less reliable + 'm' => ':count ndakitali', // less reliable + 'a_month' => ':count ndakitali', // less reliable + + 'day' => ':count wia', // less reliable + 'd' => ':count wia', // less reliable + 'a_day' => ':count wia', // less reliable + + 'hour' => ':count orasan', // less reliable + 'h' => ':count orasan', // less reliable + 'a_hour' => ':count orasan', // less reliable + + 'minute' => ':count orasan', // less reliable + 'min' => ':count orasan', // less reliable + 'a_minute' => ':count orasan', // less reliable + */ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/kde.php b/libraries/Carbon/src/Carbon/Lang/kde.php new file mode 100644 index 00000000000..78e3a4b1a7c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kde.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Muhi', 'Chilo'], + 'weekdays' => ['Liduva lyapili', 'Liduva lyatatu', 'Liduva lyanchechi', 'Liduva lyannyano', 'Liduva lyannyano na linji', 'Liduva lyannyano na mavili', 'Liduva litandi'], + 'weekdays_short' => ['Ll2', 'Ll3', 'Ll4', 'Ll5', 'Ll6', 'Ll7', 'Ll1'], + 'weekdays_min' => ['Ll2', 'Ll3', 'Ll4', 'Ll5', 'Ll6', 'Ll7', 'Ll1'], + 'months' => ['Mwedi Ntandi', 'Mwedi wa Pili', 'Mwedi wa Tatu', 'Mwedi wa Nchechi', 'Mwedi wa Nnyano', 'Mwedi wa Nnyano na Umo', 'Mwedi wa Nnyano na Mivili', 'Mwedi wa Nnyano na Mitatu', 'Mwedi wa Nnyano na Nchechi', 'Mwedi wa Nnyano na Nnyano', 'Mwedi wa Nnyano na Nnyano na U', 'Mwedi wa Nnyano na Nnyano na M'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/kea.php b/libraries/Carbon/src/Carbon/Lang/kea.php new file mode 100644 index 00000000000..d1b0d03e1c3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kea.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['a', 'p'], + 'weekdays' => ['dumingu', 'sigunda-fera', 'tersa-fera', 'kuarta-fera', 'kinta-fera', 'sesta-fera', 'sabadu'], + 'weekdays_short' => ['dum', 'sig', 'ter', 'kua', 'kin', 'ses', 'sab'], + 'weekdays_min' => ['du', 'si', 'te', 'ku', 'ki', 'se', 'sa'], + 'weekdays_standalone' => ['dumingu', 'sigunda-fera', 'tersa-fera', 'kuarta-fera', 'kinta-fera', 'sesta-fera', 'sábadu'], + 'months' => ['Janeru', 'Febreru', 'Marsu', 'Abril', 'Maiu', 'Junhu', 'Julhu', 'Agostu', 'Setenbru', 'Otubru', 'Nuvenbru', 'Dizenbru'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Otu', 'Nuv', 'Diz'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D [di] MMMM [di] YYYY HH:mm', + 'LLLL' => 'dddd, D [di] MMMM [di] YYYY HH:mm', + ], + + 'year' => ':count otunu', // less reliable + 'y' => ':count otunu', // less reliable + 'a_year' => ':count otunu', // less reliable + + 'week' => ':count día dumingu', // less reliable + 'w' => ':count día dumingu', // less reliable + 'a_week' => ':count día dumingu', // less reliable + + 'day' => ':count diâ', // less reliable + 'd' => ':count diâ', // less reliable + 'a_day' => ':count diâ', // less reliable + + 'minute' => ':count sugundu', // less reliable + 'min' => ':count sugundu', // less reliable + 'a_minute' => ':count sugundu', // less reliable + + 'second' => ':count dós', // less reliable + 's' => ':count dós', // less reliable + 'a_second' => ':count dós', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/khq.php b/libraries/Carbon/src/Carbon/Lang/khq.php new file mode 100644 index 00000000000..27b4a3c942c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/khq.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Adduha', 'Aluula'], + 'weekdays' => ['Alhadi', 'Atini', 'Atalata', 'Alarba', 'Alhamiisa', 'Aljuma', 'Assabdu'], + 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alj', 'Ass'], + 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alj', 'Ass'], + 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], + 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ki.php b/libraries/Carbon/src/Carbon/Lang/ki.php new file mode 100644 index 00000000000..a2993f9f5d9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ki.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Kiroko', 'Hwaĩ-inĩ'], + 'weekdays' => ['Kiumia', 'Njumatatũ', 'Njumaine', 'Njumatana', 'Aramithi', 'Njumaa', 'Njumamothi'], + 'weekdays_short' => ['KMA', 'NTT', 'NMN', 'NMT', 'ART', 'NMA', 'NMM'], + 'weekdays_min' => ['KMA', 'NTT', 'NMN', 'NMT', 'ART', 'NMA', 'NMM'], + 'months' => ['Njenuarĩ', 'Mwere wa kerĩ', 'Mwere wa gatatũ', 'Mwere wa kana', 'Mwere wa gatano', 'Mwere wa gatandatũ', 'Mwere wa mũgwanja', 'Mwere wa kanana', 'Mwere wa kenda', 'Mwere wa ikũmi', 'Mwere wa ikũmi na ũmwe', 'Ndithemba'], + 'months_short' => ['JEN', 'WKR', 'WGT', 'WKN', 'WTN', 'WTD', 'WMJ', 'WNN', 'WKD', 'WIK', 'WMW', 'DIT'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'year' => ':count mĩaka', // less reliable + 'y' => ':count mĩaka', // less reliable + 'a_year' => ':count mĩaka', // less reliable + + 'month' => ':count mweri', // less reliable + 'm' => ':count mweri', // less reliable + 'a_month' => ':count mweri', // less reliable + + 'week' => ':count kiumia', // less reliable + 'w' => ':count kiumia', // less reliable + 'a_week' => ':count kiumia', // less reliable + + 'day' => ':count mũthenya', // less reliable + 'd' => ':count mũthenya', // less reliable + 'a_day' => ':count mũthenya', // less reliable + + 'hour' => ':count thaa', // less reliable + 'h' => ':count thaa', // less reliable + 'a_hour' => ':count thaa', // less reliable + + 'minute' => ':count mundu', // less reliable + 'min' => ':count mundu', // less reliable + 'a_minute' => ':count mundu', // less reliable + + 'second' => ':count igego', // less reliable + 's' => ':count igego', // less reliable + 'a_second' => ':count igego', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/kk.php b/libraries/Carbon/src/Carbon/Lang/kk.php new file mode 100644 index 00000000000..a3da4305e1c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kk.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - Talat Uspanov + * - Нурлан Рахимжанов + * - Toleugazy Kali + */ +return [ + 'year' => ':count жыл', + 'a_year' => '{1}бір жыл|:count жыл', + 'y' => ':count ж.', + 'month' => ':count ай', + 'a_month' => '{1}бір ай|:count ай', + 'm' => ':count ай', + 'week' => ':count апта', + 'a_week' => '{1}бір апта', + 'w' => ':count ап.', + 'day' => ':count күн', + 'a_day' => '{1}бір күн|:count күн', + 'd' => ':count к.', + 'hour' => ':count сағат', + 'a_hour' => '{1}бір сағат|:count сағат', + 'h' => ':count са.', + 'minute' => ':count минут', + 'a_minute' => '{1}бір минут|:count минут', + 'min' => ':count м.', + 'second' => ':count секунд', + 'a_second' => '{1}бірнеше секунд|:count секунд', + 's' => ':count се.', + 'ago' => ':time бұрын', + 'from_now' => ':time ішінде', + 'after' => ':time кейін', + 'before' => ':time бұрын', + 'diff_now' => 'қазір', + 'diff_today' => 'Бүгін', + 'diff_today_regexp' => 'Бүгін(?:\\s+сағат)?', + 'diff_yesterday' => 'кеше', + 'diff_yesterday_regexp' => 'Кеше(?:\\s+сағат)?', + 'diff_tomorrow' => 'ертең', + 'diff_tomorrow_regexp' => 'Ертең(?:\\s+сағат)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Бүгін сағат] LT', + 'nextDay' => '[Ертең сағат] LT', + 'nextWeek' => 'dddd [сағат] LT', + 'lastDay' => '[Кеше сағат] LT', + 'lastWeek' => '[Өткен аптаның] dddd [сағат] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + static $suffixes = [ + 0 => '-ші', + 1 => '-ші', + 2 => '-ші', + 3 => '-ші', + 4 => '-ші', + 5 => '-ші', + 6 => '-шы', + 7 => '-ші', + 8 => '-ші', + 9 => '-шы', + 10 => '-шы', + 20 => '-шы', + 30 => '-шы', + 40 => '-шы', + 50 => '-ші', + 60 => '-шы', + 70 => '-ші', + 80 => '-ші', + 90 => '-шы', + 100 => '-ші', + ]; + + return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); + }, + 'months' => ['қаңтар', 'ақпан', 'наурыз', 'сәуір', 'мамыр', 'маусым', 'шілде', 'тамыз', 'қыркүйек', 'қазан', 'қараша', 'желтоқсан'], + 'months_short' => ['қаң', 'ақп', 'нау', 'сәу', 'мам', 'мау', 'шіл', 'там', 'қыр', 'қаз', 'қар', 'жел'], + 'weekdays' => ['жексенбі', 'дүйсенбі', 'сейсенбі', 'сәрсенбі', 'бейсенбі', 'жұма', 'сенбі'], + 'weekdays_short' => ['жек', 'дүй', 'сей', 'сәр', 'бей', 'жұм', 'сен'], + 'weekdays_min' => ['жк', 'дй', 'сй', 'ср', 'бй', 'жм', 'сн'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' және '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/kk_KZ.php b/libraries/Carbon/src/Carbon/Lang/kk_KZ.php new file mode 100644 index 00000000000..257ff904de3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kk_KZ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/kk.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kkj.php b/libraries/Carbon/src/Carbon/Lang/kkj.php new file mode 100644 index 00000000000..73b22d685f8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kkj.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/kl.php b/libraries/Carbon/src/Carbon/Lang/kl.php new file mode 100644 index 00000000000..63d87154fbe --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kl.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/kl_GL.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kl_GL.php b/libraries/Carbon/src/Carbon/Lang/kl_GL.php new file mode 100644 index 00000000000..e62fde5e441 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kl_GL.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Danish Standards Association bug-glibc-locales@gnu.org + * - John Eyðstein Johannesen (mashema) + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY HH:mm', + 'LLLL' => 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', + ], + 'months' => ['januaarip', 'februaarip', 'marsip', 'apriilip', 'maajip', 'juunip', 'juulip', 'aggustip', 'septembarip', 'oktobarip', 'novembarip', 'decembarip'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'weekdays' => ['sapaat', 'ataasinngorneq', 'marlunngorneq', 'pingasunngorneq', 'sisamanngorneq', 'tallimanngorneq', 'arfininngorneq'], + 'weekdays_short' => ['sap', 'ata', 'mar', 'pin', 'sis', 'tal', 'arf'], + 'weekdays_min' => ['sap', 'ata', 'mar', 'pin', 'sis', 'tal', 'arf'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => '{1}ukioq :count|{0}:count ukiut|]1,Inf[ukiut :count', + 'a_year' => '{1}ukioq|{0}:count ukiut|]1,Inf[ukiut :count', + 'y' => '{1}:countyr|{0}:countyrs|]1,Inf[:countyrs', + + 'month' => '{1}qaammat :count|{0}:count qaammatit|]1,Inf[qaammatit :count', + 'a_month' => '{1}qaammat|{0}:count qaammatit|]1,Inf[qaammatit :count', + 'm' => '{1}:countmo|{0}:countmos|]1,Inf[:countmos', + + 'week' => '{1}:count sap. ak.|{0}:count sap. ak.|]1,Inf[:count sap. ak.', + 'a_week' => '{1}a sap. ak.|{0}:count sap. ak.|]1,Inf[:count sap. ak.', + 'w' => ':countw', + + 'day' => '{1}:count ulloq|{0}:count ullut|]1,Inf[:count ullut', + 'a_day' => '{1}a ulloq|{0}:count ullut|]1,Inf[:count ullut', + 'd' => ':countd', + + 'hour' => '{1}:count tiimi|{0}:count tiimit|]1,Inf[:count tiimit', + 'a_hour' => '{1}tiimi|{0}:count tiimit|]1,Inf[:count tiimit', + 'h' => ':counth', + + 'minute' => '{1}:count minutsi|{0}:count minutsit|]1,Inf[:count minutsit', + 'a_minute' => '{1}a minutsi|{0}:count minutsit|]1,Inf[:count minutsit', + 'min' => ':countm', + + 'second' => '{1}:count sikunti|{0}:count sikuntit|]1,Inf[:count sikuntit', + 'a_second' => '{1}sikunti|{0}:count sikuntit|]1,Inf[:count sikuntit', + 's' => ':counts', + + 'ago' => ':time matuma siorna', + +]); diff --git a/libraries/Carbon/src/Carbon/Lang/kln.php b/libraries/Carbon/src/Carbon/Lang/kln.php new file mode 100644 index 00000000000..77132e5c939 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kln.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['krn', 'koosk'], + 'weekdays' => ['Kotisap', 'Kotaai', 'Koaeng’', 'Kosomok', 'Koang’wan', 'Komuut', 'Kolo'], + 'weekdays_short' => ['Kts', 'Kot', 'Koo', 'Kos', 'Koa', 'Kom', 'Kol'], + 'weekdays_min' => ['Kts', 'Kot', 'Koo', 'Kos', 'Koa', 'Kom', 'Kol'], + 'months' => ['Mulgul', 'Ng’atyaato', 'Kiptaamo', 'Iwootkuut', 'Mamuut', 'Paagi', 'Ng’eiyeet', 'Rooptui', 'Bureet', 'Epeeso', 'Kipsuunde ne taai', 'Kipsuunde nebo aeng’'], + 'months_short' => ['Mul', 'Ngat', 'Taa', 'Iwo', 'Mam', 'Paa', 'Nge', 'Roo', 'Bur', 'Epe', 'Kpt', 'Kpa'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'year' => ':count maghatiat', // less reliable + 'y' => ':count maghatiat', // less reliable + 'a_year' => ':count maghatiat', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/km.php b/libraries/Carbon/src/Carbon/Lang/km.php new file mode 100644 index 00000000000..854da208c63 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/km.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kruy Vanna + * - Sereysethy Touch + * - JD Isaacks + * - Sovichet Tep + */ +return [ + 'year' => '{1}មួយឆ្នាំ|]1,Inf[:count ឆ្នាំ', + 'y' => ':count ឆ្នាំ', + 'month' => '{1}មួយខែ|]1,Inf[:count ខែ', + 'm' => ':count ខែ', + 'week' => ':count សប្ដាហ៍', + 'w' => ':count សប្ដាហ៍', + 'day' => '{1}មួយថ្ងៃ|]1,Inf[:count ថ្ងៃ', + 'd' => ':count ថ្ងៃ', + 'hour' => '{1}មួយម៉ោង|]1,Inf[:count ម៉ោង', + 'h' => ':count ម៉ោង', + 'minute' => '{1}មួយនាទី|]1,Inf[:count នាទី', + 'min' => ':count នាទី', + 'second' => '{1}ប៉ុន្មានវិនាទី|]1,Inf[:count វិនាទី', + 's' => ':count វិនាទី', + 'ago' => ':timeមុន', + 'from_now' => ':timeទៀត', + 'after' => 'នៅ​ក្រោយ :time', + 'before' => 'នៅ​មុន :time', + 'diff_now' => 'ឥឡូវ', + 'diff_today' => 'ថ្ងៃនេះ', + 'diff_today_regexp' => 'ថ្ងៃនេះ(?:\\s+ម៉ោង)?', + 'diff_yesterday' => 'ម្សិលមិញ', + 'diff_yesterday_regexp' => 'ម្សិលមិញ(?:\\s+ម៉ោង)?', + 'diff_tomorrow' => 'ថ្ងៃ​ស្អែក', + 'diff_tomorrow_regexp' => 'ស្អែក(?:\\s+ម៉ោង)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[ថ្ងៃនេះ ម៉ោង] LT', + 'nextDay' => '[ស្អែក ម៉ោង] LT', + 'nextWeek' => 'dddd [ម៉ោង] LT', + 'lastDay' => '[ម្សិលមិញ ម៉ោង] LT', + 'lastWeek' => 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + 'sameElse' => 'L', + ], + 'ordinal' => 'ទី:number', + 'meridiem' => ['ព្រឹក', 'ល្ងាច'], + 'months' => ['មករា', 'កុម្ភៈ', 'មីនា', 'មេសា', 'ឧសភា', 'មិថុនា', 'កក្កដា', 'សីហា', 'កញ្ញា', 'តុលា', 'វិច្ឆិកា', 'ធ្នូ'], + 'months_short' => ['មករា', 'កុម្ភៈ', 'មីនា', 'មេសា', 'ឧសភា', 'មិថុនា', 'កក្កដា', 'សីហា', 'កញ្ញា', 'តុលា', 'វិច្ឆិកា', 'ធ្នូ'], + 'weekdays' => ['អាទិត្យ', 'ច័ន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'], + 'weekdays_short' => ['អា', 'ច', 'អ', 'ព', 'ព្រ', 'សុ', 'ស'], + 'weekdays_min' => ['អា', 'ច', 'អ', 'ព', 'ព្រ', 'សុ', 'ស'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', 'និង '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/km_KH.php b/libraries/Carbon/src/Carbon/Lang/km_KH.php new file mode 100644 index 00000000000..812d0711dbe --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/km_KH.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/km.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kn.php b/libraries/Carbon/src/Carbon/Lang/kn.php new file mode 100644 index 00000000000..2d6ea47dff5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kn.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - MOHAN M U + * - François B + * - rajeevnaikte + */ +return [ + 'year' => '{1}ಒಂದು ವರ್ಷ|]1,Inf[:count ವರ್ಷ', + 'month' => '{1}ಒಂದು ತಿಂಗಳು|]1,Inf[:count ತಿಂಗಳು', + 'week' => '{1}ಒಂದು ವಾರ|]1,Inf[:count ವಾರಗಳು', + 'day' => '{1}ಒಂದು ದಿನ|]1,Inf[:count ದಿನ', + 'hour' => '{1}ಒಂದು ಗಂಟೆ|]1,Inf[:count ಗಂಟೆ', + 'minute' => '{1}ಒಂದು ನಿಮಿಷ|]1,Inf[:count ನಿಮಿಷ', + 'second' => '{1}ಕೆಲವು ಕ್ಷಣಗಳು|]1,Inf[:count ಸೆಕೆಂಡುಗಳು', + 'ago' => ':time ಹಿಂದೆ', + 'from_now' => ':time ನಂತರ', + 'diff_now' => 'ಈಗ', + 'diff_today' => 'ಇಂದು', + 'diff_yesterday' => 'ನಿನ್ನೆ', + 'diff_tomorrow' => 'ನಾಳೆ', + 'formats' => [ + 'LT' => 'A h:mm', + 'LTS' => 'A h:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', + ], + 'calendar' => [ + 'sameDay' => '[ಇಂದು] LT', + 'nextDay' => '[ನಾಳೆ] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[ನಿನ್ನೆ] LT', + 'lastWeek' => '[ಕೊನೆಯ] dddd, LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':numberನೇ', + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'ರಾತ್ರಿ'; + } + if ($hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } + if ($hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } + if ($hour < 20) { + return 'ಸಂಜೆ'; + } + + return 'ರಾತ್ರಿ'; + }, + 'months' => ['ಜನವರಿ', 'ಫೆಬ್ರವರಿ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂಬರ್', 'ಅಕ್ಟೋಬರ್', 'ನವೆಂಬರ್', 'ಡಿಸೆಂಬರ್'], + 'months_short' => ['ಜನ', 'ಫೆಬ್ರ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂ', 'ಅಕ್ಟೋ', 'ನವೆಂ', 'ಡಿಸೆಂ'], + 'weekdays' => ['ಭಾನುವಾರ', 'ಸೋಮವಾರ', 'ಮಂಗಳವಾರ', 'ಬುಧವಾರ', 'ಗುರುವಾರ', 'ಶುಕ್ರವಾರ', 'ಶನಿವಾರ'], + 'weekdays_short' => ['ಭಾನು', 'ಸೋಮ', 'ಮಂಗಳ', 'ಬುಧ', 'ಗುರು', 'ಶುಕ್ರ', 'ಶನಿ'], + 'weekdays_min' => ['ಭಾ', 'ಸೋ', 'ಮಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], + 'list' => ', ', + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'weekend' => [0, 0], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/kn_IN.php b/libraries/Carbon/src/Carbon/Lang/kn_IN.php new file mode 100644 index 00000000000..add08d1502a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kn_IN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/kn.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ko.php b/libraries/Carbon/src/Carbon/Lang/ko.php new file mode 100644 index 00000000000..72e67ea74f7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ko.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kunal Marwaha + * - FourwingsY + * - François B + * - Jason Katz-Brown + * - Seokjun Kim + * - Junho Kim + * - JD Isaacks + * - Juwon Kim + */ +return [ + 'year' => ':count년', + 'a_year' => '{1}일년|]1,Inf[:count년', + 'y' => ':count년', + 'month' => ':count개월', + 'a_month' => '{1}한달|]1,Inf[:count개월', + 'm' => ':count개월', + 'week' => ':count주', + 'a_week' => '{1}일주일|]1,Inf[:count 주', + 'w' => ':count주일', + 'day' => ':count일', + 'a_day' => '{1}하루|]1,Inf[:count일', + 'd' => ':count일', + 'hour' => ':count시간', + 'a_hour' => '{1}한시간|]1,Inf[:count시간', + 'h' => ':count시간', + 'minute' => ':count분', + 'a_minute' => '{1}일분|]1,Inf[:count분', + 'min' => ':count분', + 'second' => ':count초', + 'a_second' => '{1}몇초|]1,Inf[:count초', + 's' => ':count초', + 'ago' => ':time 전', + 'from_now' => ':time 후', + 'after' => ':time 후', + 'before' => ':time 전', + 'diff_now' => '지금', + 'diff_today' => '오늘', + 'diff_yesterday' => '어제', + 'diff_tomorrow' => '내일', + 'formats' => [ + 'LT' => 'A h:mm', + 'LTS' => 'A h:mm:ss', + 'L' => 'YYYY.MM.DD.', + 'LL' => 'YYYY년 MMMM D일', + 'LLL' => 'YYYY년 MMMM D일 A h:mm', + 'LLLL' => 'YYYY년 MMMM D일 dddd A h:mm', + ], + 'calendar' => [ + 'sameDay' => '오늘 LT', + 'nextDay' => '내일 LT', + 'nextWeek' => 'dddd LT', + 'lastDay' => '어제 LT', + 'lastWeek' => '지난주 dddd LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'd': + case 'D': + case 'DDD': + return $number.'일'; + case 'M': + return $number.'월'; + case 'w': + case 'W': + return $number.'주'; + default: + return $number; + } + }, + 'meridiem' => ['오전', '오후'], + 'months' => ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], + 'months_short' => ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], + 'weekdays' => ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'], + 'weekdays_short' => ['일', '월', '화', '수', '목', '금', '토'], + 'weekdays_min' => ['일', '월', '화', '수', '목', '금', '토'], + 'list' => ' ', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ko_KP.php b/libraries/Carbon/src/Carbon/Lang/ko_KP.php new file mode 100644 index 00000000000..e956821de0c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ko_KP.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ko.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ko_KR.php b/libraries/Carbon/src/Carbon/Lang/ko_KR.php new file mode 100644 index 00000000000..88a8d8b399f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ko_KR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ko.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kok.php b/libraries/Carbon/src/Carbon/Lang/kok.php new file mode 100644 index 00000000000..11e9337c90e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kok.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/kok_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kok_IN.php b/libraries/Carbon/src/Carbon/Lang/kok_IN.php new file mode 100644 index 00000000000..216f31c50df --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kok_IN.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat, Pune bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D-M-YY', + ], + 'months' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ओगस्ट', 'सेप्टेंबर', 'ओक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], + 'months_short' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ओगस्ट', 'सेप्टेंबर', 'ओक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], + 'weekdays' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], + 'weekdays_short' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], + 'weekdays_min' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['म.पू.', 'म.नं.'], + + 'year' => ':count वैशाकु', // less reliable + 'y' => ':count वैशाकु', // less reliable + 'a_year' => ':count वैशाकु', // less reliable + + 'week' => ':count आदित्यवार', // less reliable + 'w' => ':count आदित्यवार', // less reliable + 'a_week' => ':count आदित्यवार', // less reliable + + 'minute' => ':count नोंद', // less reliable + 'min' => ':count नोंद', // less reliable + 'a_minute' => ':count नोंद', // less reliable + + 'second' => ':count तेंको', // less reliable + 's' => ':count तेंको', // less reliable + 'a_second' => ':count तेंको', // less reliable + + 'month' => ':count मैनो', + 'm' => ':count मैनो', + 'a_month' => ':count मैनो', + + 'day' => ':count दिवसु', + 'd' => ':count दिवसु', + 'a_day' => ':count दिवसु', + + 'hour' => ':count घंते', + 'h' => ':count घंते', + 'a_hour' => ':count घंते', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ks.php b/libraries/Carbon/src/Carbon/Lang/ks.php new file mode 100644 index 00000000000..573d8959854 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ks.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ks_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ks_IN.php b/libraries/Carbon/src/Carbon/Lang/ks_IN.php new file mode 100644 index 00000000000..3d6003cbe65 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ks_IN.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat, Pune bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'M/D/YY', + ], + 'months' => ['جنؤری', 'فرؤری', 'مارٕچ', 'اپریل', 'میٔ', 'جوٗن', 'جوٗلایی', 'اگست', 'ستمبر', 'اکتوٗبر', 'نومبر', 'دسمبر'], + 'months_short' => ['جنؤری', 'فرؤری', 'مارٕچ', 'اپریل', 'میٔ', 'جوٗن', 'جوٗلایی', 'اگست', 'ستمبر', 'اکتوٗبر', 'نومبر', 'دسمبر'], + 'weekdays' => ['آتهوار', 'ژءندروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], + 'weekdays_short' => ['آتهوار', 'ژءنتروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], + 'weekdays_min' => ['آتهوار', 'ژءنتروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['دوپھربرونھ', 'دوپھرپتھ'], + + 'year' => ':count آب', // less reliable + 'y' => ':count آب', // less reliable + 'a_year' => ':count آب', // less reliable + + 'month' => ':count रान्', // less reliable + 'm' => ':count रान्', // less reliable + 'a_month' => ':count रान्', // less reliable + + 'week' => ':count آتھٕوار', // less reliable + 'w' => ':count آتھٕوار', // less reliable + 'a_week' => ':count آتھٕوار', // less reliable + + 'hour' => ':count سۄن', // less reliable + 'h' => ':count سۄن', // less reliable + 'a_hour' => ':count سۄن', // less reliable + + 'minute' => ':count فَن', // less reliable + 'min' => ':count فَن', // less reliable + 'a_minute' => ':count فَن', // less reliable + + 'second' => ':count दोʼयुम', // less reliable + 's' => ':count दोʼयुम', // less reliable + 'a_second' => ':count दोʼयुम', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ks_IN@devanagari.php b/libraries/Carbon/src/Carbon/Lang/ks_IN@devanagari.php new file mode 100644 index 00000000000..4f5d6f9afc2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ks_IN@devanagari.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - ks-gnome-trans-commits@lists.code.indlinux.net + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'M/D/YY', + ], + 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'weekdays' => ['आथवार', 'चॅ़दुरवार', 'बोमवार', 'ब्वदवार', 'ब्रसवार', 'शोकुरवार', 'बटुवार'], + 'weekdays_short' => ['आथ ', 'चॅ़दुर', 'बोम', 'ब्वद', 'ब्रस', 'शोकुर', 'बटु'], + 'weekdays_min' => ['आथ ', 'चॅ़दुर', 'बोम', 'ब्वद', 'ब्रस', 'शोकुर', 'बटु'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ksb.php b/libraries/Carbon/src/Carbon/Lang/ksb.php new file mode 100644 index 00000000000..11dcb02203d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ksb.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['makeo', 'nyiaghuo'], + 'weekdays' => ['Jumaapii', 'Jumaatatu', 'Jumaane', 'Jumaatano', 'Alhamisi', 'Ijumaa', 'Jumaamosi'], + 'weekdays_short' => ['Jpi', 'Jtt', 'Jmn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'weekdays_min' => ['Jpi', 'Jtt', 'Jmn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'months' => ['Januali', 'Febluali', 'Machi', 'Aplili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ksf.php b/libraries/Carbon/src/Carbon/Lang/ksf.php new file mode 100644 index 00000000000..a5f63e7b41c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ksf.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['sárúwá', 'cɛɛ́nko'], + 'weekdays' => ['sɔ́ndǝ', 'lǝndí', 'maadí', 'mɛkrɛdí', 'jǝǝdí', 'júmbá', 'samdí'], + 'weekdays_short' => ['sɔ́n', 'lǝn', 'maa', 'mɛk', 'jǝǝ', 'júm', 'sam'], + 'weekdays_min' => ['sɔ́n', 'lǝn', 'maa', 'mɛk', 'jǝǝ', 'júm', 'sam'], + 'months' => ['ŋwíí a ntɔ́ntɔ', 'ŋwíí akǝ bɛ́ɛ', 'ŋwíí akǝ ráá', 'ŋwíí akǝ nin', 'ŋwíí akǝ táan', 'ŋwíí akǝ táafɔk', 'ŋwíí akǝ táabɛɛ', 'ŋwíí akǝ táaraa', 'ŋwíí akǝ táanin', 'ŋwíí akǝ ntɛk', 'ŋwíí akǝ ntɛk di bɔ́k', 'ŋwíí akǝ ntɛk di bɛ́ɛ'], + 'months_short' => ['ŋ1', 'ŋ2', 'ŋ3', 'ŋ4', 'ŋ5', 'ŋ6', 'ŋ7', 'ŋ8', 'ŋ9', 'ŋ10', 'ŋ11', 'ŋ12'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ksh.php b/libraries/Carbon/src/Carbon/Lang/ksh.php new file mode 100644 index 00000000000..551aa14611e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ksh.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['v.M.', 'n.M.'], + 'weekdays' => ['Sunndaach', 'Mohndaach', 'Dinnsdaach', 'Metwoch', 'Dunnersdaach', 'Friidaach', 'Samsdaach'], + 'weekdays_short' => ['Su.', 'Mo.', 'Di.', 'Me.', 'Du.', 'Fr.', 'Sa.'], + 'weekdays_min' => ['Su', 'Mo', 'Di', 'Me', 'Du', 'Fr', 'Sa'], + 'months' => ['Jannewa', 'Fäbrowa', 'Määz', 'Aprell', 'Mai', 'Juuni', 'Juuli', 'Oujoß', 'Septämber', 'Oktohber', 'Novämber', 'Dezämber'], + 'months_short' => ['Jan', 'Fäb', 'Mäz', 'Apr', 'Mai', 'Jun', 'Jul', 'Ouj', 'Säp', 'Okt', 'Nov', 'Dez'], + 'months_short_standalone' => ['Jan.', 'Fäb.', 'Mäz.', 'Apr.', 'Mai', 'Jun.', 'Jul.', 'Ouj.', 'Säp.', 'Okt.', 'Nov.', 'Dez.'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D. M. YYYY', + 'LL' => 'D. MMM. YYYY', + 'LLL' => 'D. MMMM YYYY HH:mm', + 'LLLL' => 'dddd, [dä] D. MMMM YYYY HH:mm', + ], + + 'year' => ':count Johr', + 'y' => ':count Johr', + 'a_year' => ':count Johr', + + 'month' => ':count Moohnd', + 'm' => ':count Moohnd', + 'a_month' => ':count Moohnd', + + 'week' => ':count woch', + 'w' => ':count woch', + 'a_week' => ':count woch', + + 'day' => ':count Daach', + 'd' => ':count Daach', + 'a_day' => ':count Daach', + + 'hour' => ':count Uhr', + 'h' => ':count Uhr', + 'a_hour' => ':count Uhr', + + 'minute' => ':count Menutt', + 'min' => ':count Menutt', + 'a_minute' => ':count Menutt', + + 'second' => ':count Sekůndt', + 's' => ':count Sekůndt', + 'a_second' => ':count Sekůndt', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ku.php b/libraries/Carbon/src/Carbon/Lang/ku.php new file mode 100644 index 00000000000..5468d0fc361 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ku.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Unicode, Inc. + */ + +return [ + 'ago' => 'berî :time', + 'from_now' => 'di :time de', + 'after' => ':time piştî', + 'before' => ':time berê', + 'year' => ':count sal', + 'year_ago' => ':count salê|:count salan', + 'year_from_now' => 'salekê|:count salan', + 'month' => ':count meh', + 'week' => ':count hefte', + 'day' => ':count roj', + 'hour' => ':count saet', + 'minute' => ':count deqîqe', + 'second' => ':count saniye', + 'months' => ['rêbendanê', 'reşemiyê', 'adarê', 'avrêlê', 'gulanê', 'pûşperê', 'tîrmehê', 'gelawêjê', 'rezberê', 'kewçêrê', 'sermawezê', 'berfanbarê'], + 'months_standalone' => ['rêbendan', 'reşemî', 'adar', 'avrêl', 'gulan', 'pûşper', 'tîrmeh', 'gelawêj', 'rezber', 'kewçêr', 'sermawez', 'berfanbar'], + 'months_short' => ['rêb', 'reş', 'ada', 'avr', 'gul', 'pûş', 'tîr', 'gel', 'rez', 'kew', 'ser', 'ber'], + 'weekdays' => ['yekşem', 'duşem', 'sêşem', 'çarşem', 'pêncşem', 'în', 'şemî'], + 'weekdays_short' => ['yş', 'dş', 'sş', 'çş', 'pş', 'în', 'ş'], + 'weekdays_min' => ['Y', 'D', 'S', 'Ç', 'P', 'Î', 'Ş'], + 'list' => [', ', ' û '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ku_TR.php b/libraries/Carbon/src/Carbon/Lang/ku_TR.php new file mode 100644 index 00000000000..10e6f76f0b8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ku_TR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ku.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kw.php b/libraries/Carbon/src/Carbon/Lang/kw.php new file mode 100644 index 00000000000..e83f501c0f1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kw.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/kw_GB.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/kw_GB.php b/libraries/Carbon/src/Carbon/Lang/kw_GB.php new file mode 100644 index 00000000000..20f66a7252c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/kw_GB.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Alastair McKinstry bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['mis Genver', 'mis Hwevrer', 'mis Meurth', 'mis Ebrel', 'mis Me', 'mis Metheven', 'mis Gortheren', 'mis Est', 'mis Gwynngala', 'mis Hedra', 'mis Du', 'mis Kevardhu'], + 'months_short' => ['Gen', 'Hwe', 'Meu', 'Ebr', 'Me', 'Met', 'Gor', 'Est', 'Gwn', 'Hed', 'Du', 'Kev'], + 'weekdays' => ['De Sul', 'De Lun', 'De Merth', 'De Merher', 'De Yow', 'De Gwener', 'De Sadorn'], + 'weekdays_short' => ['Sul', 'Lun', 'Mth', 'Mhr', 'Yow', 'Gwe', 'Sad'], + 'weekdays_min' => ['Sul', 'Lun', 'Mth', 'Mhr', 'Yow', 'Gwe', 'Sad'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count bledhen', + 'y' => ':count bledhen', + 'a_year' => ':count bledhen', + + 'month' => ':count mis', + 'm' => ':count mis', + 'a_month' => ':count mis', + + 'week' => ':count seythen', + 'w' => ':count seythen', + 'a_week' => ':count seythen', + + 'day' => ':count dydh', + 'd' => ':count dydh', + 'a_day' => ':count dydh', + + 'hour' => ':count eur', + 'h' => ':count eur', + 'a_hour' => ':count eur', + + 'minute' => ':count mynysen', + 'min' => ':count mynysen', + 'a_minute' => ':count mynysen', + + 'second' => ':count pryjwyth', + 's' => ':count pryjwyth', + 'a_second' => ':count pryjwyth', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ky.php b/libraries/Carbon/src/Carbon/Lang/ky.php new file mode 100644 index 00000000000..de18083094c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ky.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - acutexyz + * - Josh Soref + * - François B + * - Chyngyz Arystan uulu + * - Chyngyz + * - acutexyz + * - Josh Soref + * - François B + * - Chyngyz Arystan uulu + */ +return [ + 'year' => ':count жыл', + 'a_year' => '{1}бир жыл|:count жыл', + 'y' => ':count жыл', + 'month' => ':count ай', + 'a_month' => '{1}бир ай|:count ай', + 'm' => ':count ай', + 'week' => ':count апта', + 'a_week' => '{1}бир апта|:count апта', + 'w' => ':count апт.', + 'day' => ':count күн', + 'a_day' => '{1}бир күн|:count күн', + 'd' => ':count күн', + 'hour' => ':count саат', + 'a_hour' => '{1}бир саат|:count саат', + 'h' => ':count саат.', + 'minute' => ':count мүнөт', + 'a_minute' => '{1}бир мүнөт|:count мүнөт', + 'min' => ':count мүн.', + 'second' => ':count секунд', + 'a_second' => '{1}бирнече секунд|:count секунд', + 's' => ':count сек.', + 'ago' => ':time мурун', + 'from_now' => ':time ичинде', + 'diff_now' => 'азыр', + 'diff_today' => 'Бүгүн', + 'diff_today_regexp' => 'Бүгүн(?:\\s+саат)?', + 'diff_yesterday' => 'кечээ', + 'diff_yesterday_regexp' => 'Кече(?:\\s+саат)?', + 'diff_tomorrow' => 'эртең', + 'diff_tomorrow_regexp' => 'Эртең(?:\\s+саат)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Бүгүн саат] LT', + 'nextDay' => '[Эртең саат] LT', + 'nextWeek' => 'dddd [саат] LT', + 'lastDay' => '[Кече саат] LT', + 'lastWeek' => '[Өткен аптанын] dddd [күнү] [саат] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + static $suffixes = [ + 0 => '-чү', + 1 => '-чи', + 2 => '-чи', + 3 => '-чү', + 4 => '-чү', + 5 => '-чи', + 6 => '-чы', + 7 => '-чи', + 8 => '-чи', + 9 => '-чу', + 10 => '-чу', + 20 => '-чы', + 30 => '-чу', + 40 => '-чы', + 50 => '-чү', + 60 => '-чы', + 70 => '-чи', + 80 => '-чи', + 90 => '-чу', + 100 => '-чү', + ]; + + return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); + }, + 'months' => ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], + 'months_short' => ['янв', 'фев', 'март', 'апр', 'май', 'июнь', 'июль', 'авг', 'сен', 'окт', 'ноя', 'дек'], + 'weekdays' => ['Жекшемби', 'Дүйшөмбү', 'Шейшемби', 'Шаршемби', 'Бейшемби', 'Жума', 'Ишемби'], + 'weekdays_short' => ['Жек', 'Дүй', 'Шей', 'Шар', 'Бей', 'Жум', 'Ише'], + 'weekdays_min' => ['Жк', 'Дй', 'Шй', 'Шр', 'Бй', 'Жм', 'Иш'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => ' ', + 'meridiem' => ['таңкы', 'түштөн кийинки'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ky_KG.php b/libraries/Carbon/src/Carbon/Lang/ky_KG.php new file mode 100644 index 00000000000..c2f754a27f5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ky_KG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ky.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lag.php b/libraries/Carbon/src/Carbon/Lang/lag.php new file mode 100644 index 00000000000..fedf2e7bbea --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lag.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['TOO', 'MUU'], + 'weekdays' => ['Jumapíiri', 'Jumatátu', 'Jumaíne', 'Jumatáano', 'Alamíisi', 'Ijumáa', 'Jumamóosi'], + 'weekdays_short' => ['Píili', 'Táatu', 'Íne', 'Táano', 'Alh', 'Ijm', 'Móosi'], + 'weekdays_min' => ['Píili', 'Táatu', 'Íne', 'Táano', 'Alh', 'Ijm', 'Móosi'], + 'months' => ['Kʉfúngatɨ', 'Kʉnaanɨ', 'Kʉkeenda', 'Kwiikumi', 'Kwiinyambála', 'Kwiidwaata', 'Kʉmʉʉnchɨ', 'Kʉvɨɨrɨ', 'Kʉsaatʉ', 'Kwiinyi', 'Kʉsaano', 'Kʉsasatʉ'], + 'months_short' => ['Fúngatɨ', 'Naanɨ', 'Keenda', 'Ikúmi', 'Inyambala', 'Idwaata', 'Mʉʉnchɨ', 'Vɨɨrɨ', 'Saatʉ', 'Inyi', 'Saano', 'Sasatʉ'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/lb.php b/libraries/Carbon/src/Carbon/Lang/lb.php new file mode 100644 index 00000000000..cdc7126a4dd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lb.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Tsutomu Kuroda + * - dan-nl + * - Simon Lelorrain (slelorrain) + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count Joer', + 'y' => ':countJ', + 'month' => ':count Mount|:count Méint', + 'm' => ':countMo', + 'week' => ':count Woch|:count Wochen', + 'w' => ':countWo|:countWo', + 'day' => ':count Dag|:count Deeg', + 'd' => ':countD', + 'hour' => ':count Stonn|:count Stonnen', + 'h' => ':countSto', + 'minute' => ':count Minutt|:count Minutten', + 'min' => ':countM', + 'second' => ':count Sekonn|:count Sekonnen', + 's' => ':countSek', + + 'ago' => 'virun :time', + 'from_now' => 'an :time', + 'before' => ':time virdrun', + 'after' => ':time duerno', + + 'diff_today' => 'Haut', + 'diff_yesterday' => 'Gëschter', + 'diff_yesterday_regexp' => 'Gëschter(?:\\s+um)?', + 'diff_tomorrow' => 'Muer', + 'diff_tomorrow_regexp' => 'Muer(?:\\s+um)?', + 'diff_today_regexp' => 'Haut(?:\\s+um)?', + 'formats' => [ + 'LT' => 'H:mm [Auer]', + 'LTS' => 'H:mm:ss [Auer]', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY H:mm [Auer]', + 'LLLL' => 'dddd, D. MMMM YYYY H:mm [Auer]', + ], + + 'calendar' => [ + 'sameDay' => '[Haut um] LT', + 'nextDay' => '[Muer um] LT', + 'nextWeek' => 'dddd [um] LT', + 'lastDay' => '[Gëschter um] LT', + 'lastWeek' => function (CarbonInterface $date) { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch ($date->dayOfWeek) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + }, + 'sameElse' => 'L', + ], + + 'months' => ['Januar', 'Februar', 'Mäerz', 'Abrëll', 'Mee', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], + 'months_short' => ['Jan.', 'Febr.', 'Mrz.', 'Abr.', 'Mee', 'Jun.', 'Jul.', 'Aug.', 'Sept.', 'Okt.', 'Nov.', 'Dez.'], + 'weekdays' => ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'], + 'weekdays_short' => ['So.', 'Mé.', 'Dë.', 'Më.', 'Do.', 'Fr.', 'Sa.'], + 'weekdays_min' => ['So', 'Mé', 'Dë', 'Më', 'Do', 'Fr', 'Sa'], + 'ordinal' => ':number.', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' an '], + 'meridiem' => ['moies', 'mëttes'], + 'weekdays_short_standalone' => ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'], + 'months_short_standalone' => ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/lb_LU.php b/libraries/Carbon/src/Carbon/Lang/lb_LU.php new file mode 100644 index 00000000000..26f94202e49 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lb_LU.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/lb.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lg.php b/libraries/Carbon/src/Carbon/Lang/lg.php new file mode 100644 index 00000000000..9069da93884 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lg.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/lg_UG.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lg_UG.php b/libraries/Carbon/src/Carbon/Lang/lg_UG.php new file mode 100644 index 00000000000..e9410d957fe --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lg_UG.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Akademe ya Luganda Kizito Birabwa kompyuta@kizito.uklinux.net + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Janwaliyo', 'Febwaliyo', 'Marisi', 'Apuli', 'Maayi', 'Juuni', 'Julaayi', 'Agusito', 'Sebuttemba', 'Okitobba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apu', 'Maa', 'Juu', 'Jul', 'Agu', 'Seb', 'Oki', 'Nov', 'Des'], + 'weekdays' => ['Sabiiti', 'Balaza', 'Lwakubiri', 'Lwakusatu', 'Lwakuna', 'Lwakutaano', 'Lwamukaaga'], + 'weekdays_short' => ['Sab', 'Bal', 'Lw2', 'Lw3', 'Lw4', 'Lw5', 'Lw6'], + 'weekdays_min' => ['Sab', 'Bal', 'Lw2', 'Lw3', 'Lw4', 'Lw5', 'Lw6'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'month' => ':count njuba', // less reliable + 'm' => ':count njuba', // less reliable + 'a_month' => ':count njuba', // less reliable + + 'year' => ':count mwaaka', + 'y' => ':count mwaaka', + 'a_year' => ':count mwaaka', + + 'week' => ':count sabbiiti', + 'w' => ':count sabbiiti', + 'a_week' => ':count sabbiiti', + + 'day' => ':count lunaku', + 'd' => ':count lunaku', + 'a_day' => ':count lunaku', + + 'hour' => 'saawa :count', + 'h' => 'saawa :count', + 'a_hour' => 'saawa :count', + + 'minute' => 'ddakiika :count', + 'min' => 'ddakiika :count', + 'a_minute' => 'ddakiika :count', + + 'second' => ':count kyʼokubiri', + 's' => ':count kyʼokubiri', + 'a_second' => ':count kyʼokubiri', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/li.php b/libraries/Carbon/src/Carbon/Lang/li.php new file mode 100644 index 00000000000..9371329c874 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/li.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/li_NL.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/li_NL.php b/libraries/Carbon/src/Carbon/Lang/li_NL.php new file mode 100644 index 00000000000..49d508de035 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/li_NL.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandriva.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['jannewarie', 'fibberwarie', 'miert', 'eprèl', 'meij', 'junie', 'julie', 'augustus', 'september', 'oktober', 'november', 'desember'], + 'months_short' => ['jan', 'fib', 'mie', 'epr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], + 'weekdays' => ['zóndig', 'maondig', 'daensdig', 'goonsdig', 'dónderdig', 'vriedig', 'zaoterdig'], + 'weekdays_short' => ['zón', 'mao', 'dae', 'goo', 'dón', 'vri', 'zao'], + 'weekdays_min' => ['zón', 'mao', 'dae', 'goo', 'dón', 'vri', 'zao'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'minute' => ':count momênt', // less reliable + 'min' => ':count momênt', // less reliable + 'a_minute' => ':count momênt', // less reliable + + 'year' => ':count jaor', + 'y' => ':count jaor', + 'a_year' => ':count jaor', + + 'month' => ':count maond', + 'm' => ':count maond', + 'a_month' => ':count maond', + + 'week' => ':count waek', + 'w' => ':count waek', + 'a_week' => ':count waek', + + 'day' => ':count daag', + 'd' => ':count daag', + 'a_day' => ':count daag', + + 'hour' => ':count oer', + 'h' => ':count oer', + 'a_hour' => ':count oer', + + 'second' => ':count Secónd', + 's' => ':count Secónd', + 'a_second' => ':count Secónd', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/lij.php b/libraries/Carbon/src/Carbon/Lang/lij.php new file mode 100644 index 00000000000..2b051413ffd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lij.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/lij_IT.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lij_IT.php b/libraries/Carbon/src/Carbon/Lang/lij_IT.php new file mode 100644 index 00000000000..6717441ff8c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lij_IT.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Gastaldi alessio.gastaldi@libero.it + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['zenâ', 'fevrâ', 'marzo', 'avrî', 'mazzo', 'zûgno', 'lûggio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dixembre'], + 'months_short' => ['zen', 'fev', 'mar', 'arv', 'maz', 'zûg', 'lûg', 'ago', 'set', 'ött', 'nov', 'dix'], + 'weekdays' => ['domenega', 'lûnedì', 'martedì', 'mercUrdì', 'zêggia', 'venardì', 'sabbo'], + 'weekdays_short' => ['dom', 'lûn', 'mar', 'mer', 'zêu', 'ven', 'sab'], + 'weekdays_min' => ['dom', 'lûn', 'mar', 'mer', 'zêu', 'ven', 'sab'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count etæ', // less reliable + 'y' => ':count etæ', // less reliable + 'a_year' => ':count etæ', // less reliable + + 'month' => ':count meize', + 'm' => ':count meize', + 'a_month' => ':count meize', + + 'week' => ':count settemannha', + 'w' => ':count settemannha', + 'a_week' => ':count settemannha', + + 'day' => ':count giorno', + 'd' => ':count giorno', + 'a_day' => ':count giorno', + + 'hour' => ':count reléuio', // less reliable + 'h' => ':count reléuio', // less reliable + 'a_hour' => ':count reléuio', // less reliable + + 'minute' => ':count menûo', + 'min' => ':count menûo', + 'a_minute' => ':count menûo', + + 'second' => ':count segondo', + 's' => ':count segondo', + 'a_second' => ':count segondo', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/lkt.php b/libraries/Carbon/src/Carbon/Lang/lkt.php new file mode 100644 index 00000000000..c2dcabfb66d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lkt.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + + 'month' => ':count haŋwí', // less reliable + 'm' => ':count haŋwí', // less reliable + 'a_month' => ':count haŋwí', // less reliable + + 'week' => ':count šakówiŋ', // less reliable + 'w' => ':count šakówiŋ', // less reliable + 'a_week' => ':count šakówiŋ', // less reliable + + 'hour' => ':count maza škaŋškaŋ', // less reliable + 'h' => ':count maza škaŋškaŋ', // less reliable + 'a_hour' => ':count maza škaŋškaŋ', // less reliable + + 'minute' => ':count číkʼala', // less reliable + 'min' => ':count číkʼala', // less reliable + 'a_minute' => ':count číkʼala', // less reliable + + 'year' => ':count waníyetu', + 'y' => ':count waníyetu', + 'a_year' => ':count waníyetu', + + 'day' => ':count aŋpétu', + 'd' => ':count aŋpétu', + 'a_day' => ':count aŋpétu', + + 'second' => ':count icinuŋpa', + 's' => ':count icinuŋpa', + 'a_second' => ':count icinuŋpa', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ln.php b/libraries/Carbon/src/Carbon/Lang/ln.php new file mode 100644 index 00000000000..ff8e6325393 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ln.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ubuntu René Manassé GALEKWA renemanasse@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'months' => ['sánzá ya yambo', 'sánzá ya míbalé', 'sánzá ya mísáto', 'sánzá ya mínei', 'sánzá ya mítáno', 'sánzá ya motóbá', 'sánzá ya nsambo', 'sánzá ya mwambe', 'sánzá ya libwa', 'sánzá ya zómi', 'sánzá ya zómi na mɔ̌kɔ́', 'sánzá ya zómi na míbalé'], + 'months_short' => ['yan', 'fbl', 'msi', 'apl', 'mai', 'yun', 'yul', 'agt', 'stb', 'ɔtb', 'nvb', 'dsb'], + 'weekdays' => ['Lomíngo', 'Mosálá mɔ̌kɔ́', 'Misálá míbalé', 'Misálá mísáto', 'Misálá mínei', 'Misálá mítáno', 'Mpɔ́sɔ'], + 'weekdays_short' => ['m1.', 'm2.', 'm3.', 'm4.', 'm5.', 'm6.', 'm7.'], + 'weekdays_min' => ['m1.', 'm2.', 'm3.', 'm4.', 'm5.', 'm6.', 'm7.'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => 'mbula :count', + 'y' => 'mbula :count', + 'a_year' => 'mbula :count', + + 'month' => 'sánzá :count', + 'm' => 'sánzá :count', + 'a_month' => 'sánzá :count', + + 'week' => 'mpɔ́sɔ :count', + 'w' => 'mpɔ́sɔ :count', + 'a_week' => 'mpɔ́sɔ :count', + + 'day' => 'mokɔlɔ :count', + 'd' => 'mokɔlɔ :count', + 'a_day' => 'mokɔlɔ :count', + + 'hour' => 'ngonga :count', + 'h' => 'ngonga :count', + 'a_hour' => 'ngonga :count', + + 'minute' => 'miniti :count', + 'min' => 'miniti :count', + 'a_minute' => 'miniti :count', + + 'second' => 'segɔnde :count', + 's' => 'segɔnde :count', + 'a_second' => 'segɔnde :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ln_AO.php b/libraries/Carbon/src/Carbon/Lang/ln_AO.php new file mode 100644 index 00000000000..73949756359 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ln_AO.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ln.php', [ + 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], + 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], + 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], + 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ln_CD.php b/libraries/Carbon/src/Carbon/Lang/ln_CD.php new file mode 100644 index 00000000000..ccb3740c65a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ln_CD.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ubuntu René Manassé GALEKWA renemanasse@gmail.com + */ +return require __DIR__.'/ln.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ln_CF.php b/libraries/Carbon/src/Carbon/Lang/ln_CF.php new file mode 100644 index 00000000000..73949756359 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ln_CF.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ln.php', [ + 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], + 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], + 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], + 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ln_CG.php b/libraries/Carbon/src/Carbon/Lang/ln_CG.php new file mode 100644 index 00000000000..73949756359 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ln_CG.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ln.php', [ + 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], + 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], + 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], + 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/lo.php b/libraries/Carbon/src/Carbon/Lang/lo.php new file mode 100644 index 00000000000..451f84cf620 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lo.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - ryanhart2 + */ +return [ + 'year' => ':count ປີ', + 'y' => ':count ປີ', + 'month' => ':count ເດືອນ', + 'm' => ':count ດ. ', + 'week' => ':count ອາທິດ', + 'w' => ':count ອທ. ', + 'day' => ':count ມື້', + 'd' => ':count ມື້', + 'hour' => ':count ຊົ່ວໂມງ', + 'h' => ':count ຊມ. ', + 'minute' => ':count ນາທີ', + 'min' => ':count ນທ. ', + 'second' => '{1}ບໍ່ເທົ່າໃດວິນາທີ|]1,Inf[:count ວິນາທີ', + 's' => ':count ວິ. ', + 'ago' => ':timeຜ່ານມາ', + 'from_now' => 'ອີກ :time', + 'diff_now' => 'ຕອນນີ້', + 'diff_today' => 'ມື້ນີ້ເວລາ', + 'diff_yesterday' => 'ມື້ວານນີ້ເວລາ', + 'diff_tomorrow' => 'ມື້ອື່ນເວລາ', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'ວັນdddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[ມື້ນີ້ເວລາ] LT', + 'nextDay' => '[ມື້ອື່ນເວລາ] LT', + 'nextWeek' => '[ວັນ]dddd[ໜ້າເວລາ] LT', + 'lastDay' => '[ມື້ວານນີ້ເວລາ] LT', + 'lastWeek' => '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + 'sameElse' => 'L', + ], + 'ordinal' => 'ທີ່:number', + 'meridiem' => ['ຕອນເຊົ້າ', 'ຕອນແລງ'], + 'months' => ['ມັງກອນ', 'ກຸມພາ', 'ມີນາ', 'ເມສາ', 'ພຶດສະພາ', 'ມິຖຸນາ', 'ກໍລະກົດ', 'ສິງຫາ', 'ກັນຍາ', 'ຕຸລາ', 'ພະຈິກ', 'ທັນວາ'], + 'months_short' => ['ມັງກອນ', 'ກຸມພາ', 'ມີນາ', 'ເມສາ', 'ພຶດສະພາ', 'ມິຖຸນາ', 'ກໍລະກົດ', 'ສິງຫາ', 'ກັນຍາ', 'ຕຸລາ', 'ພະຈິກ', 'ທັນວາ'], + 'weekdays' => ['ອາທິດ', 'ຈັນ', 'ອັງຄານ', 'ພຸດ', 'ພະຫັດ', 'ສຸກ', 'ເສົາ'], + 'weekdays_short' => ['ທິດ', 'ຈັນ', 'ອັງຄານ', 'ພຸດ', 'ພະຫັດ', 'ສຸກ', 'ເສົາ'], + 'weekdays_min' => ['ທ', 'ຈ', 'ອຄ', 'ພ', 'ພຫ', 'ສກ', 'ສ'], + 'list' => [', ', 'ແລະ '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/lo_LA.php b/libraries/Carbon/src/Carbon/Lang/lo_LA.php new file mode 100644 index 00000000000..1ad6f046367 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lo_LA.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/lo.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lrc.php b/libraries/Carbon/src/Carbon/Lang/lrc.php new file mode 100644 index 00000000000..4e1dcb6f31b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lrc.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + + 'minute' => ':count هنر', // less reliable + 'min' => ':count هنر', // less reliable + 'a_minute' => ':count هنر', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/lrc_IQ.php b/libraries/Carbon/src/Carbon/Lang/lrc_IQ.php new file mode 100644 index 00000000000..02c1d2a2391 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lrc_IQ.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/lrc.php', [ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/lt.php b/libraries/Carbon/src/Carbon/Lang/lt.php new file mode 100644 index 00000000000..bf73db9f23a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lt.php @@ -0,0 +1,135 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Tsutomu Kuroda + * - tjku + * - valdas406 + * - Justas Palumickas + * - Max Melentiev + * - Andrius Janauskas + * - Juanito Fatas + * - Akira Matsuda + * - Christopher Dell + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Nicolás Hock Isaza + * - Laurynas Butkus + * - Sven Fuchs + * - Dominykas Tijūnaitis + * - Justinas Bolys + * - Ričardas + * - Kirill Chalkin + * - Rolandas + * - Justinas (Gamesh) + */ +return [ + 'year' => ':count metai|:count metai|:count metų', + 'y' => ':count m.', + 'month' => ':count mėnuo|:count mėnesiai|:count mėnesį', + 'm' => ':count mėn.', + 'week' => ':count savaitė|:count savaitės|:count savaitę', + 'w' => ':count sav.', + 'day' => ':count diena|:count dienos|:count dienų', + 'd' => ':count d.', + 'hour' => ':count valanda|:count valandos|:count valandų', + 'h' => ':count val.', + 'minute' => ':count minutė|:count minutės|:count minutę', + 'min' => ':count min.', + 'second' => ':count sekundė|:count sekundės|:count sekundžių', + 's' => ':count sek.', + + 'year_ago' => ':count metus|:count metus|:count metų', + 'month_ago' => ':count mėnesį|:count mėnesius|:count mėnesių', + 'week_ago' => ':count savaitę|:count savaites|:count savaičių', + 'day_ago' => ':count dieną|:count dienas|:count dienų', + 'hour_ago' => ':count valandą|:count valandas|:count valandų', + 'minute_ago' => ':count minutę|:count minutes|:count minučių', + 'second_ago' => ':count sekundę|:count sekundes|:count sekundžių', + + 'year_from_now' => ':count metų', + 'month_from_now' => ':count mėnesio|:count mėnesių|:count mėnesių', + 'week_from_now' => ':count savaitės|:count savaičių|:count savaičių', + 'day_from_now' => ':count dienos|:count dienų|:count dienų', + 'hour_from_now' => ':count valandos|:count valandų|:count valandų', + 'minute_from_now' => ':count minutės|:count minučių|:count minučių', + 'second_from_now' => ':count sekundės|:count sekundžių|:count sekundžių', + + 'year_after' => ':count metų', + 'month_after' => ':count mėnesio|:count mėnesių|:count mėnesių', + 'week_after' => ':count savaitės|:count savaičių|:count savaičių', + 'day_after' => ':count dienos|:count dienų|:count dienų', + 'hour_after' => ':count valandos|:count valandų|:count valandų', + 'minute_after' => ':count minutės|:count minučių|:count minučių', + 'second_after' => ':count sekundės|:count sekundžių|:count sekundžių', + + 'ago' => 'prieš :time', + 'from_now' => ':time nuo dabar', + 'after' => 'po :time', + 'before' => 'už :time', + + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'diff_now' => 'ką tik', + 'diff_today' => 'Šiandien', + 'diff_yesterday' => 'vakar', + 'diff_yesterday_regexp' => 'Vakar', + 'diff_tomorrow' => 'rytoj', + 'diff_tomorrow_regexp' => 'Rytoj', + 'diff_before_yesterday' => 'užvakar', + 'diff_after_tomorrow' => 'poryt', + + 'period_recurrences' => 'kartą|:count kartų', + 'period_interval' => 'kiekvieną :interval', + 'period_start_date' => 'nuo :date', + 'period_end_date' => 'iki :date', + + 'months' => ['sausio', 'vasario', 'kovo', 'balandžio', 'gegužės', 'birželio', 'liepos', 'rugpjūčio', 'rugsėjo', 'spalio', 'lapkričio', 'gruodžio'], + 'months_standalone' => ['sausis', 'vasaris', 'kovas', 'balandis', 'gegužė', 'birželis', 'liepa', 'rugpjūtis', 'rugsėjis', 'spalis', 'lapkritis', 'gruodis'], + 'months_regexp' => '/(L{2,4}|D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?)/', + 'months_short' => ['sau', 'vas', 'kov', 'bal', 'geg', 'bir', 'lie', 'rgp', 'rgs', 'spa', 'lap', 'gru'], + 'weekdays' => ['sekmadienį', 'pirmadienį', 'antradienį', 'trečiadienį', 'ketvirtadienį', 'penktadienį', 'šeštadienį'], + 'weekdays_standalone' => ['sekmadienis', 'pirmadienis', 'antradienis', 'trečiadienis', 'ketvirtadienis', 'penktadienis', 'šeštadienis'], + 'weekdays_short' => ['sek', 'pir', 'ant', 'tre', 'ket', 'pen', 'šeš'], + 'weekdays_min' => ['se', 'pi', 'an', 'tr', 'ke', 'pe', 'še'], + 'list' => [', ', ' ir '], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'MMMM DD, YYYY', + 'LLL' => 'DD MMM HH:mm', + 'LLLL' => 'MMMM DD, YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Šiandien] LT', + 'nextDay' => '[Rytoj] LT', + 'nextWeek' => 'dddd LT', + 'lastDay' => '[Vakar] LT', + 'lastWeek' => '[Paskutinį] dddd LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + switch ($number) { + case 0: + return '0-is'; + case 3: + return '3-ias'; + default: + return "$number-as"; + } + }, + 'meridiem' => ['priešpiet', 'popiet'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/lt_LT.php b/libraries/Carbon/src/Carbon/Lang/lt_LT.php new file mode 100644 index 00000000000..61091a63f73 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lt_LT.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/lt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lu.php b/libraries/Carbon/src/Carbon/Lang/lu.php new file mode 100644 index 00000000000..4d98d570126 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lu.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Dinda', 'Dilolo'], + 'weekdays' => ['Lumingu', 'Nkodya', 'Ndàayà', 'Ndangù', 'Njòwa', 'Ngòvya', 'Lubingu'], + 'weekdays_short' => ['Lum', 'Nko', 'Ndy', 'Ndg', 'Njw', 'Ngv', 'Lub'], + 'weekdays_min' => ['Lum', 'Nko', 'Ndy', 'Ndg', 'Njw', 'Ngv', 'Lub'], + 'months' => ['Ciongo', 'Lùishi', 'Lusòlo', 'Mùuyà', 'Lumùngùlù', 'Lufuimi', 'Kabàlàshìpù', 'Lùshìkà', 'Lutongolo', 'Lungùdi', 'Kaswèkèsè', 'Ciswà'], + 'months_short' => ['Cio', 'Lui', 'Lus', 'Muu', 'Lum', 'Luf', 'Kab', 'Lush', 'Lut', 'Lun', 'Kas', 'Cis'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/luo.php b/libraries/Carbon/src/Carbon/Lang/luo.php new file mode 100644 index 00000000000..03494206586 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/luo.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['OD', 'OT'], + 'weekdays' => ['Jumapil', 'Wuok Tich', 'Tich Ariyo', 'Tich Adek', 'Tich Ang’wen', 'Tich Abich', 'Ngeso'], + 'weekdays_short' => ['JMP', 'WUT', 'TAR', 'TAD', 'TAN', 'TAB', 'NGS'], + 'weekdays_min' => ['JMP', 'WUT', 'TAR', 'TAD', 'TAN', 'TAB', 'NGS'], + 'months' => ['Dwe mar Achiel', 'Dwe mar Ariyo', 'Dwe mar Adek', 'Dwe mar Ang’wen', 'Dwe mar Abich', 'Dwe mar Auchiel', 'Dwe mar Abiriyo', 'Dwe mar Aboro', 'Dwe mar Ochiko', 'Dwe mar Apar', 'Dwe mar gi achiel', 'Dwe mar Apar gi ariyo'], + 'months_short' => ['DAC', 'DAR', 'DAD', 'DAN', 'DAH', 'DAU', 'DAO', 'DAB', 'DOC', 'DAP', 'DGI', 'DAG'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'year' => 'higni :count', + 'y' => 'higni :count', + 'a_year' => ':higni :count', + + 'month' => 'dweche :count', + 'm' => 'dweche :count', + 'a_month' => 'dweche :count', + + 'week' => 'jumbe :count', + 'w' => 'jumbe :count', + 'a_week' => 'jumbe :count', + + 'day' => 'ndalo :count', + 'd' => 'ndalo :count', + 'a_day' => 'ndalo :count', + + 'hour' => 'seche :count', + 'h' => 'seche :count', + 'a_hour' => 'seche :count', + + 'minute' => 'dakika :count', + 'min' => 'dakika :count', + 'a_minute' => 'dakika :count', + + 'second' => 'nus dakika :count', + 's' => 'nus dakika :count', + 'a_second' => 'nus dakika :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/luy.php b/libraries/Carbon/src/Carbon/Lang/luy.php new file mode 100644 index 00000000000..3f323b6c1cb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/luy.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['Jumapiri', 'Jumatatu', 'Jumanne', 'Jumatano', 'Murwa wa Kanne', 'Murwa wa Katano', 'Jumamosi'], + 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], + 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + // Too unreliable + /* + 'year' => ':count liliino', // less reliable + 'y' => ':count liliino', // less reliable + 'a_year' => ':count liliino', // less reliable + + 'month' => ':count kumwesi', // less reliable + 'm' => ':count kumwesi', // less reliable + 'a_month' => ':count kumwesi', // less reliable + + 'week' => ':count olutambi', // less reliable + 'w' => ':count olutambi', // less reliable + 'a_week' => ':count olutambi', // less reliable + + 'day' => ':count luno', // less reliable + 'd' => ':count luno', // less reliable + 'a_day' => ':count luno', // less reliable + + 'hour' => ':count ekengele', // less reliable + 'h' => ':count ekengele', // less reliable + 'a_hour' => ':count ekengele', // less reliable + + 'minute' => ':count omundu', // less reliable + 'min' => ':count omundu', // less reliable + 'a_minute' => ':count omundu', // less reliable + + 'second' => ':count liliino', // less reliable + 's' => ':count liliino', // less reliable + 'a_second' => ':count liliino', // less reliable + */ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/lv.php b/libraries/Carbon/src/Carbon/Lang/lv.php new file mode 100644 index 00000000000..d2bc04516d6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lv.php @@ -0,0 +1,183 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +/** + * This file is part of the EDD\Vendor\Carbon package. + * + * (c) Brian Nesbitt + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - pirminis + * - Tsutomu Kuroda + * - tjku + * - Andris Zāģeris + * - Max Melentiev + * - Edgars Beigarts + * - Juanito Fatas + * - Vitauts Stočka + * - Akira Matsuda + * - Christopher Dell + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Kaspars Bankovskis + * - Nicolás Hock Isaza + * - Viesturs Kavacs (Kavacky) + * - zakse + * - Janis Eglitis (janiseglitis) + * - Guntars + * - Juris Sudmalis + */ +$daysOfWeek = ['svētdiena', 'pirmdiena', 'otrdiena', 'trešdiena', 'ceturtdiena', 'piektdiena', 'sestdiena']; +$daysOfWeekLocativum = ['svētdien', 'pirmdien', 'otrdien', 'trešdien', 'ceturtdien', 'piektdien', 'sestdien']; + +$transformDiff = function ($input) { + return strtr($input, [ + // Nominative => "pirms/pēc" Dative + 'gads' => 'gada', + 'gadi' => 'gadiem', + 'gadu' => 'gadiem', + 'mēnesis' => 'mēneša', + 'mēneši' => 'mēnešiem', + 'mēnešu' => 'mēnešiem', + 'nedēļa' => 'nedēļas', + 'nedēļas' => 'nedēļām', + 'nedēļu' => 'nedēļām', + 'diena' => 'dienas', + 'dienas' => 'dienām', + 'dienu' => 'dienām', + 'stunda' => 'stundas', + 'stundas' => 'stundām', + 'stundu' => 'stundām', + 'minūte' => 'minūtes', + 'minūtes' => 'minūtēm', + 'minūšu' => 'minūtēm', + 'sekunde' => 'sekundes', + 'sekundes' => 'sekundēm', + 'sekunžu' => 'sekundēm', + ]); +}; + +return [ + 'ago' => function ($time) use ($transformDiff) { + return 'pirms '.$transformDiff($time); + }, + 'from_now' => function ($time) use ($transformDiff) { + return 'pēc '.$transformDiff($time); + }, + + 'year' => '0 gadu|:count gads|:count gadi', + 'y' => ':count g.', + 'a_year' => '{1}gads|0 gadu|:count gads|:count gadi', + 'month' => '0 mēnešu|:count mēnesis|:count mēneši', + 'm' => ':count mēn.', + 'a_month' => '{1}mēnesis|0 mēnešu|:count mēnesis|:count mēneši', + 'week' => '0 nedēļu|:count nedēļa|:count nedēļas', + 'w' => ':count ned.', + 'a_week' => '{1}nedēļa|0 nedēļu|:count nedēļa|:count nedēļas', + 'day' => '0 dienu|:count diena|:count dienas', + 'd' => ':count d.', + 'a_day' => '{1}diena|0 dienu|:count diena|:count dienas', + 'hour' => '0 stundu|:count stunda|:count stundas', + 'h' => ':count st.', + 'a_hour' => '{1}stunda|0 stundu|:count stunda|:count stundas', + 'minute' => '0 minūšu|:count minūte|:count minūtes', + 'min' => ':count min.', + 'a_minute' => '{1}minūte|0 minūšu|:count minūte|:count minūtes', + 'second' => '0 sekunžu|:count sekunde|:count sekundes', + 's' => ':count sek.', + 'a_second' => '{1}sekunde|0 sekunžu|:count sekunde|:count sekundes', + + 'after' => ':time vēlāk', + 'year_after' => '0 gadus|:count gadu|:count gadus', + 'a_year_after' => '{1}gadu|0 gadus|:count gadu|:count gadus', + 'month_after' => '0 mēnešus|:count mēnesi|:count mēnešus', + 'a_month_after' => '{1}mēnesi|0 mēnešus|:count mēnesi|:count mēnešus', + 'week_after' => '0 nedēļas|:count nedēļu|:count nedēļas', + 'a_week_after' => '{1}nedēļu|0 nedēļas|:count nedēļu|:count nedēļas', + 'day_after' => '0 dienas|:count dienu|:count dienas', + 'a_day_after' => '{1}dienu|0 dienas|:count dienu|:count dienas', + 'hour_after' => '0 stundas|:count stundu|:count stundas', + 'a_hour_after' => '{1}stundu|0 stundas|:count stundu|:count stundas', + 'minute_after' => '0 minūtes|:count minūti|:count minūtes', + 'a_minute_after' => '{1}minūti|0 minūtes|:count minūti|:count minūtes', + 'second_after' => '0 sekundes|:count sekundi|:count sekundes', + 'a_second_after' => '{1}sekundi|0 sekundes|:count sekundi|:count sekundes', + + 'before' => ':time agrāk', + 'year_before' => '0 gadus|:count gadu|:count gadus', + 'a_year_before' => '{1}gadu|0 gadus|:count gadu|:count gadus', + 'month_before' => '0 mēnešus|:count mēnesi|:count mēnešus', + 'a_month_before' => '{1}mēnesi|0 mēnešus|:count mēnesi|:count mēnešus', + 'week_before' => '0 nedēļas|:count nedēļu|:count nedēļas', + 'a_week_before' => '{1}nedēļu|0 nedēļas|:count nedēļu|:count nedēļas', + 'day_before' => '0 dienas|:count dienu|:count dienas', + 'a_day_before' => '{1}dienu|0 dienas|:count dienu|:count dienas', + 'hour_before' => '0 stundas|:count stundu|:count stundas', + 'a_hour_before' => '{1}stundu|0 stundas|:count stundu|:count stundas', + 'minute_before' => '0 minūtes|:count minūti|:count minūtes', + 'a_minute_before' => '{1}minūti|0 minūtes|:count minūti|:count minūtes', + 'second_before' => '0 sekundes|:count sekundi|:count sekundes', + 'a_second_before' => '{1}sekundi|0 sekundes|:count sekundi|:count sekundes', + + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' un '], + + 'diff_now' => 'tagad', + 'diff_today' => 'šodien', + 'diff_yesterday' => 'vakar', + 'diff_before_yesterday' => 'aizvakar', + 'diff_tomorrow' => 'rīt', + 'diff_after_tomorrow' => 'parīt', + + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY.', + 'LL' => 'YYYY. [gada] D. MMMM', + 'LLL' => 'DD.MM.YYYY., HH:mm', + 'LLLL' => 'YYYY. [gada] D. MMMM, HH:mm', + ], + + 'calendar' => [ + 'sameDay' => '[šodien] [plkst.] LT', + 'nextDay' => '[rīt] [plkst.] LT', + 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) use ($daysOfWeekLocativum) { + if ($current->week !== $other->week) { + return '[nākošo] ['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; + } + + return '['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; + }, + 'lastDay' => '[vakar] [plkst.] LT', + 'lastWeek' => function (CarbonInterface $current) use ($daysOfWeekLocativum) { + return '[pagājušo] ['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; + }, + 'sameElse' => 'L', + ], + + 'weekdays' => $daysOfWeek, + 'weekdays_short' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], + 'weekdays_min' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], + 'months' => ['janvāris', 'februāris', 'marts', 'aprīlis', 'maijs', 'jūnijs', 'jūlijs', 'augusts', 'septembris', 'oktobris', 'novembris', 'decembris'], + 'months_standalone' => ['janvārī', 'februārī', 'martā', 'aprīlī', 'maijā', 'jūnijā', 'jūlijā', 'augustā', 'septembrī', 'oktobrī', 'novembrī', 'decembrī'], + 'months_short' => ['janv.', 'febr.', 'martā', 'apr.', 'maijā', 'jūn.', 'jūl.', 'aug.', 'sept.', 'okt.', 'nov.', 'dec.'], + 'meridiem' => ['priekšpusdiena', 'pēcpusdiena'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/lv_LV.php b/libraries/Carbon/src/Carbon/Lang/lv_LV.php new file mode 100644 index 00000000000..ae7d9e9a7de --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lv_LV.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/lv.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lzh.php b/libraries/Carbon/src/Carbon/Lang/lzh.php new file mode 100644 index 00000000000..a68ffdc2e41 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lzh.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/lzh_TW.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/lzh_TW.php b/libraries/Carbon/src/Carbon/Lang/lzh_TW.php new file mode 100644 index 00000000000..27eeebb8cf4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/lzh_TW.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'OY[年]MMMMOD[日]', + ], + 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'months_short' => [' 一 ', ' 二 ', ' 三 ', ' 四 ', ' 五 ', ' 六 ', ' 七 ', ' 八 ', ' 九 ', ' 十 ', '十一', '十二'], + 'weekdays' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'], + 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '廿', '廿一', '廿二', '廿三', '廿四', '廿五', '廿六', '廿七', '廿八', '廿九', '卅', '卅一'], + 'meridiem' => ['朝', '暮'], + + 'year' => ':count 夏', // less reliable + 'y' => ':count 夏', // less reliable + 'a_year' => ':count 夏', // less reliable + + 'month' => ':count 月', // less reliable + 'm' => ':count 月', // less reliable + 'a_month' => ':count 月', // less reliable + + 'hour' => ':count 氧', // less reliable + 'h' => ':count 氧', // less reliable + 'a_hour' => ':count 氧', // less reliable + + 'minute' => ':count 點', // less reliable + 'min' => ':count 點', // less reliable + 'a_minute' => ':count 點', // less reliable + + 'second' => ':count 楚', // less reliable + 's' => ':count 楚', // less reliable + 'a_second' => ':count 楚', // less reliable + + 'week' => ':count 星期', + 'w' => ':count 星期', + 'a_week' => ':count 星期', + + 'day' => ':count 日(曆法)', + 'd' => ':count 日(曆法)', + 'a_day' => ':count 日(曆法)', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mag.php b/libraries/Carbon/src/Carbon/Lang/mag.php new file mode 100644 index 00000000000..6f5a9b0e5c3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mag.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/mag_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mag_IN.php b/libraries/Carbon/src/Carbon/Lang/mag_IN.php new file mode 100644 index 00000000000..b05f5156306 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mag_IN.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bhashaghar@googlegroups.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'weekdays' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], + 'weekdays_short' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], + 'weekdays_min' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mai.php b/libraries/Carbon/src/Carbon/Lang/mai.php new file mode 100644 index 00000000000..52d403159ee --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mai.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/mai_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mai_IN.php b/libraries/Carbon/src/Carbon/Lang/mai_IN.php new file mode 100644 index 00000000000..9a670c425eb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mai_IN.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Maithili Computing Research Center, Pune, India rajeshkajha@yahoo.com,akhilesh.k@samusng.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['बैसाख', 'जेठ', 'अषाढ़', 'सावोन', 'भादो', 'आसिन', 'कातिक', 'अगहन', 'पूस', 'माघ', 'फागुन', 'चैति'], + 'months_short' => ['बैसाख', 'जेठ', 'अषाढ़', 'सावोन', 'भादो', 'आसिन', 'कातिक', 'अगहन', 'पूस', 'माघ', 'फागुन', 'चैति'], + 'weekdays' => ['रविदिन', 'सोमदिन', 'मंगलदिन', 'बुधदिन', 'बृहस्पतीदिन', 'शुक्रदिन', 'शनीदिन'], + 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पती', 'शुक्र', 'शनी'], + 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पती', 'शुक्र', 'शनी'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], + + 'year' => ':count ऋतु', // less reliable + 'y' => ':count ऋतु', // less reliable + 'a_year' => ':count ऋतु', // less reliable + + 'month' => ':count महिना', + 'm' => ':count महिना', + 'a_month' => ':count महिना', + + 'week' => ':count श्रेणी:क्यालेन्डर', // less reliable + 'w' => ':count श्रेणी:क्यालेन्डर', // less reliable + 'a_week' => ':count श्रेणी:क्यालेन्डर', // less reliable + + 'day' => ':count दिन', + 'd' => ':count दिन', + 'a_day' => ':count दिन', + + 'hour' => ':count घण्टा', + 'h' => ':count घण्टा', + 'a_hour' => ':count घण्टा', + + 'minute' => ':count समय', // less reliable + 'min' => ':count समय', // less reliable + 'a_minute' => ':count समय', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mas.php b/libraries/Carbon/src/Carbon/Lang/mas.php new file mode 100644 index 00000000000..77d54a2fa24 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mas.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Ɛnkakɛnyá', 'Ɛndámâ'], + 'weekdays' => ['Jumapílí', 'Jumatátu', 'Jumane', 'Jumatánɔ', 'Alaámisi', 'Jumáa', 'Jumamósi'], + 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'months' => ['Oladalʉ́', 'Arát', 'Ɔɛnɨ́ɔɨŋɔk', 'Olodoyíóríê inkókúâ', 'Oloilépūnyīē inkókúâ', 'Kújúɔrɔk', 'Mórusásin', 'Ɔlɔ́ɨ́bɔ́rárɛ', 'Kúshîn', 'Olgísan', 'Pʉshʉ́ka', 'Ntʉ́ŋʉ́s'], + 'months_short' => ['Dal', 'Ará', 'Ɔɛn', 'Doy', 'Lép', 'Rok', 'Sás', 'Bɔ́r', 'Kús', 'Gís', 'Shʉ́', 'Ntʉ́'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'year' => ':count olameyu', // less reliable + 'y' => ':count olameyu', // less reliable + 'a_year' => ':count olameyu', // less reliable + + 'week' => ':count engolongeare orwiki', // less reliable + 'w' => ':count engolongeare orwiki', // less reliable + 'a_week' => ':count engolongeare orwiki', // less reliable + + 'hour' => ':count esahabu', // less reliable + 'h' => ':count esahabu', // less reliable + 'a_hour' => ':count esahabu', // less reliable + + 'second' => ':count are', // less reliable + 's' => ':count are', // less reliable + 'a_second' => ':count are', // less reliable + + 'month' => ':count olapa', + 'm' => ':count olapa', + 'a_month' => ':count olapa', + + 'day' => ':count enkolongʼ', + 'd' => ':count enkolongʼ', + 'a_day' => ':count enkolongʼ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mas_TZ.php b/libraries/Carbon/src/Carbon/Lang/mas_TZ.php new file mode 100644 index 00000000000..b2a98eade15 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mas_TZ.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/mas.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mer.php b/libraries/Carbon/src/Carbon/Lang/mer.php new file mode 100644 index 00000000000..35b936b5391 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mer.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['RŨ', 'ŨG'], + 'weekdays' => ['Kiumia', 'Muramuko', 'Wairi', 'Wethatu', 'Wena', 'Wetano', 'Jumamosi'], + 'weekdays_short' => ['KIU', 'MRA', 'WAI', 'WET', 'WEN', 'WTN', 'JUM'], + 'weekdays_min' => ['KIU', 'MRA', 'WAI', 'WET', 'WEN', 'WTN', 'JUM'], + 'months' => ['Januarĩ', 'Feburuarĩ', 'Machi', 'Ĩpurũ', 'Mĩĩ', 'Njuni', 'Njuraĩ', 'Agasti', 'Septemba', 'Oktũba', 'Novemba', 'Dicemba'], + 'months_short' => ['JAN', 'FEB', 'MAC', 'ĨPU', 'MĨĨ', 'NJU', 'NJR', 'AGA', 'SPT', 'OKT', 'NOV', 'DEC'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'year' => ':count murume', // less reliable + 'y' => ':count murume', // less reliable + 'a_year' => ':count murume', // less reliable + + 'month' => ':count muchaara', // less reliable + 'm' => ':count muchaara', // less reliable + 'a_month' => ':count muchaara', // less reliable + + 'minute' => ':count monto', // less reliable + 'min' => ':count monto', // less reliable + 'a_minute' => ':count monto', // less reliable + + 'second' => ':count gikeno', // less reliable + 's' => ':count gikeno', // less reliable + 'a_second' => ':count gikeno', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mfe.php b/libraries/Carbon/src/Carbon/Lang/mfe.php new file mode 100644 index 00000000000..1ae1603c9d7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mfe.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/mfe_MU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mfe_MU.php b/libraries/Carbon/src/Carbon/Lang/mfe_MU.php new file mode 100644 index 00000000000..47e004f62fb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mfe_MU.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['zanvie', 'fevriye', 'mars', 'avril', 'me', 'zin', 'zilye', 'out', 'septam', 'oktob', 'novam', 'desam'], + 'months_short' => ['zan', 'fev', 'mar', 'avr', 'me', 'zin', 'zil', 'out', 'sep', 'okt', 'nov', 'des'], + 'weekdays' => ['dimans', 'lindi', 'mardi', 'merkredi', 'zedi', 'vandredi', 'samdi'], + 'weekdays_short' => ['dim', 'lin', 'mar', 'mer', 'ze', 'van', 'sam'], + 'weekdays_min' => ['dim', 'lin', 'mar', 'mer', 'ze', 'van', 'sam'], + + 'year' => ':count banané', + 'y' => ':count banané', + 'a_year' => ':count banané', + + 'month' => ':count mwa', + 'm' => ':count mwa', + 'a_month' => ':count mwa', + + 'week' => ':count sémenn', + 'w' => ':count sémenn', + 'a_week' => ':count sémenn', + + 'day' => ':count zour', + 'd' => ':count zour', + 'a_day' => ':count zour', + + 'hour' => ':count -er-tan', + 'h' => ':count -er-tan', + 'a_hour' => ':count -er-tan', + + 'minute' => ':count minitt', + 'min' => ':count minitt', + 'a_minute' => ':count minitt', + + 'second' => ':count déziém', + 's' => ':count déziém', + 'a_second' => ':count déziém', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mg.php b/libraries/Carbon/src/Carbon/Lang/mg.php new file mode 100644 index 00000000000..1be0766d320 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mg.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/mg_MG.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mg_MG.php b/libraries/Carbon/src/Carbon/Lang/mg_MG.php new file mode 100644 index 00000000000..e26d8019f31 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mg_MG.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - The Debian Project modified by GNU//Linux Malagasy Rado Ramarotafika,Do-Risika RAFIEFERANTSIARONJY rado@linuxmg.org,dourix@free.fr + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Janoary', 'Febroary', 'Martsa', 'Aprily', 'Mey', 'Jona', 'Jolay', 'Aogositra', 'Septambra', 'Oktobra', 'Novambra', 'Desambra'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mey', 'Jon', 'Jol', 'Aog', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['alahady', 'alatsinainy', 'talata', 'alarobia', 'alakamisy', 'zoma', 'sabotsy'], + 'weekdays_short' => ['lhd', 'lts', 'tlt', 'lrb', 'lkm', 'zom', 'sab'], + 'weekdays_min' => ['lhd', 'lts', 'tlt', 'lrb', 'lkm', 'zom', 'sab'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'minute' => ':count minitra', // less reliable + 'min' => ':count minitra', // less reliable + 'a_minute' => ':count minitra', // less reliable + + 'year' => ':count taona', + 'y' => ':count taona', + 'a_year' => ':count taona', + + 'month' => ':count volana', + 'm' => ':count volana', + 'a_month' => ':count volana', + + 'week' => ':count herinandro', + 'w' => ':count herinandro', + 'a_week' => ':count herinandro', + + 'day' => ':count andro', + 'd' => ':count andro', + 'a_day' => ':count andro', + + 'hour' => ':count ora', + 'h' => ':count ora', + 'a_hour' => ':count ora', + + 'second' => ':count segondra', + 's' => ':count segondra', + 'a_second' => ':count segondra', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mgh.php b/libraries/Carbon/src/Carbon/Lang/mgh.php new file mode 100644 index 00000000000..2b56b6f8e67 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mgh.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['wichishu', 'mchochil’l'], + 'weekdays' => ['Sabato', 'Jumatatu', 'Jumanne', 'Jumatano', 'Arahamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['Sab', 'Jtt', 'Jnn', 'Jtn', 'Ara', 'Iju', 'Jmo'], + 'weekdays_min' => ['Sab', 'Jtt', 'Jnn', 'Jtn', 'Ara', 'Iju', 'Jmo'], + 'months' => ['Mweri wo kwanza', 'Mweri wo unayeli', 'Mweri wo uneraru', 'Mweri wo unecheshe', 'Mweri wo unethanu', 'Mweri wo thanu na mocha', 'Mweri wo saba', 'Mweri wo nane', 'Mweri wo tisa', 'Mweri wo kumi', 'Mweri wo kumi na moja', 'Mweri wo kumi na yel’li'], + 'months_short' => ['Kwa', 'Una', 'Rar', 'Che', 'Tha', 'Moc', 'Sab', 'Nan', 'Tis', 'Kum', 'Moj', 'Yel'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mgo.php b/libraries/Carbon/src/Carbon/Lang/mgo.php new file mode 100644 index 00000000000..adb1dd5fa92 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mgo.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], + 'weekdays_short' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], + 'weekdays_min' => ['1', '2', '3', '4', '5', '6', '7'], + 'months' => ['iməg mbegtug', 'imeg àbùbì', 'imeg mbəŋchubi', 'iməg ngwə̀t', 'iməg fog', 'iməg ichiibɔd', 'iməg àdùmbə̀ŋ', 'iməg ichika', 'iməg kud', 'iməg tèsiʼe', 'iməg zò', 'iməg krizmed'], + 'months_short' => ['mbegtug', 'imeg àbùbì', 'imeg mbəŋchubi', 'iməg ngwə̀t', 'iməg fog', 'iməg ichiibɔd', 'iməg àdùmbə̀ŋ', 'iməg ichika', 'iməg kud', 'iməg tèsiʼe', 'iməg zò', 'iməg krizmed'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'dddd, YYYY MMMM DD HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mhr.php b/libraries/Carbon/src/Carbon/Lang/mhr.php new file mode 100644 index 00000000000..8cc8e31b20f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mhr.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/mhr_RU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mhr_RU.php b/libraries/Carbon/src/Carbon/Lang/mhr_RU.php new file mode 100644 index 00000000000..9c758516d2e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mhr_RU.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - PeshSajSoft Ltd. Vyacheslav Kileev slavakileev@yandex.ru + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY.MM.DD', + ], + 'months' => ['Шорыкйол', 'Пургыж', 'Ӱярня', 'Вӱдшор', 'Ага', 'Пеледыш', 'Сӱрем', 'Сорла', 'Идым', 'Шыжа', 'Кылме', 'Теле'], + 'months_short' => ['Шрк', 'Пгж', 'Ӱрн', 'Вшр', 'Ага', 'Пдш', 'Срм', 'Срл', 'Идм', 'Шыж', 'Клм', 'Тел'], + 'weekdays' => ['Рушарня', 'Шочмо', 'Кушкыжмо', 'Вӱргече', 'Изарня', 'Кугарня', 'Шуматкече'], + 'weekdays_short' => ['Ршр', 'Шчм', 'Кжм', 'Вгч', 'Изр', 'Кгр', 'Шмт'], + 'weekdays_min' => ['Ршр', 'Шчм', 'Кжм', 'Вгч', 'Изр', 'Кгр', 'Шмт'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => ':count идалык', + 'y' => ':count идалык', + 'a_year' => ':count идалык', + + 'month' => ':count Тылзе', + 'm' => ':count Тылзе', + 'a_month' => ':count Тылзе', + + 'week' => ':count арня', + 'w' => ':count арня', + 'a_week' => ':count арня', + + 'day' => ':count кече', + 'd' => ':count кече', + 'a_day' => ':count кече', + + 'hour' => ':count час', + 'h' => ':count час', + 'a_hour' => ':count час', + + 'minute' => ':count минут', + 'min' => ':count минут', + 'a_minute' => ':count минут', + + 'second' => ':count кокымшан', + 's' => ':count кокымшан', + 'a_second' => ':count кокымшан', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mi.php b/libraries/Carbon/src/Carbon/Lang/mi.php new file mode 100644 index 00000000000..2bfe94e0b65 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mi.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - John Corrigan + * - François B + */ +return [ + 'year' => ':count tau', + 'a_year' => '{1}he tau|:count tau', + 'month' => ':count marama', + 'a_month' => '{1}he marama|:count marama', + 'week' => ':count wiki', + 'a_week' => '{1}he wiki|:count wiki', + 'day' => ':count ra', + 'a_day' => '{1}he ra|:count ra', + 'hour' => ':count haora', + 'a_hour' => '{1}te haora|:count haora', + 'minute' => ':count meneti', + 'a_minute' => '{1}he meneti|:count meneti', + 'second' => ':count hēkona', + 'a_second' => '{1}te hēkona ruarua|:count hēkona', + 'ago' => ':time i mua', + 'from_now' => 'i roto i :time', + 'diff_yesterday' => 'inanahi', + 'diff_yesterday_regexp' => 'inanahi(?:\\s+i)?', + 'diff_today' => 'i teie', + 'diff_today_regexp' => 'i teie(?:\\s+mahana,)?(?:\\s+i)?', + 'diff_tomorrow' => 'apopo', + 'diff_tomorrow_regexp' => 'apopo(?:\\s+i)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY [i] HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY [i] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[i teie mahana, i] LT', + 'nextDay' => '[apopo i] LT', + 'nextWeek' => 'dddd [i] LT', + 'lastDay' => '[inanahi i] LT', + 'lastWeek' => 'dddd [whakamutunga i] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':numberº', + 'months' => ['Kohi-tāte', 'Hui-tanguru', 'Poutū-te-rangi', 'Paenga-whāwhā', 'Haratua', 'Pipiri', 'Hōngoingoi', 'Here-turi-kōkā', 'Mahuru', 'Whiringa-ā-nuku', 'Whiringa-ā-rangi', 'Hakihea'], + 'months_short' => ['Kohi', 'Hui', 'Pou', 'Pae', 'Hara', 'Pipi', 'Hōngoi', 'Here', 'Mahu', 'Whi-nu', 'Whi-ra', 'Haki'], + 'weekdays' => ['Rātapu', 'Mane', 'Tūrei', 'Wenerei', 'Tāite', 'Paraire', 'Hātarei'], + 'weekdays_short' => ['Ta', 'Ma', 'Tū', 'We', 'Tāi', 'Pa', 'Hā'], + 'weekdays_min' => ['Ta', 'Ma', 'Tū', 'We', 'Tāi', 'Pa', 'Hā'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' me te '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/mi_NZ.php b/libraries/Carbon/src/Carbon/Lang/mi_NZ.php new file mode 100644 index 00000000000..2d760223e2c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mi_NZ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/mi.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/miq.php b/libraries/Carbon/src/Carbon/Lang/miq.php new file mode 100644 index 00000000000..8b626dd642c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/miq.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/miq_NI.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/miq_NI.php b/libraries/Carbon/src/Carbon/Lang/miq_NI.php new file mode 100644 index 00000000000..82c47ba2d51 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/miq_NI.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['siakwa kati', 'kuswa kati', 'kakamuk kati', 'lî wainhka kati', 'lih mairin kati', 'lî kati', 'pastara kati', 'sikla kati', 'wîs kati', 'waupasa kati', 'yahbra kati', 'trisu kati'], + 'months_short' => ['siakwa kati', 'kuswa kati', 'kakamuk kati', 'lî wainhka kati', 'lih mairin kati', 'lî kati', 'pastara kati', 'sikla kati', 'wîs kati', 'waupasa kati', 'yahbra kati', 'trisu kati'], + 'weekdays' => ['sandi', 'mundi', 'tiusdi', 'wensde', 'tausde', 'praidi', 'satadi'], + 'weekdays_short' => ['san', 'mun', 'tius', 'wens', 'taus', 'prai', 'sat'], + 'weekdays_min' => ['san', 'mun', 'tius', 'wens', 'taus', 'prai', 'sat'], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 7, + 'meridiem' => ['VM', 'NM'], + + 'month' => ':count kati', // less reliable + 'm' => ':count kati', // less reliable + 'a_month' => ':count kati', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mjw.php b/libraries/Carbon/src/Carbon/Lang/mjw.php new file mode 100644 index 00000000000..52344193d31 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mjw.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/mjw_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mjw_IN.php b/libraries/Carbon/src/Carbon/Lang/mjw_IN.php new file mode 100644 index 00000000000..8ea76f5ad3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mjw_IN.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Jor Teron bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['Arkoi', 'Thangthang', 'There', 'Jangmi', 'Aru', 'Vosik', 'Jakhong', 'Paipai', 'Chiti', 'Phere', 'Phaikuni', 'Matijong'], + 'months_short' => ['Ark', 'Thang', 'The', 'Jang', 'Aru', 'Vos', 'Jak', 'Pai', 'Chi', 'Phe', 'Phai', 'Mati'], + 'weekdays' => ['Bhomkuru', 'Urmi', 'Durmi', 'Thelang', 'Theman', 'Bhomta', 'Bhomti'], + 'weekdays_short' => ['Bhom', 'Ur', 'Dur', 'Tkel', 'Tkem', 'Bhta', 'Bhti'], + 'weekdays_min' => ['Bhom', 'Ur', 'Dur', 'Tkel', 'Tkem', 'Bhta', 'Bhti'], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mk.php b/libraries/Carbon/src/Carbon/Lang/mk.php new file mode 100644 index 00000000000..a66f3163a0e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mk.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Sashko Todorov + * - Josh Soref + * - François B + * - Serhan Apaydın + * - Borislav Mickov + * - JD Isaacks + * - Tomi Atanasoski + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count година|:count години', + 'a_year' => 'година|:count години', + 'y' => ':count год.', + 'month' => ':count месец|:count месеци', + 'a_month' => 'месец|:count месеци', + 'm' => ':count месец|:count месеци', + 'week' => ':count седмица|:count седмици', + 'a_week' => 'седмица|:count седмици', + 'w' => ':count седмица|:count седмици', + 'day' => ':count ден|:count дена', + 'a_day' => 'ден|:count дена', + 'd' => ':count ден|:count дена', + 'hour' => ':count час|:count часа', + 'a_hour' => 'час|:count часа', + 'h' => ':count час|:count часа', + 'minute' => ':count минута|:count минути', + 'a_minute' => 'минута|:count минути', + 'min' => ':count мин.', + 'second' => ':count секунда|:count секунди', + 'a_second' => 'неколку секунди|:count секунди', + 's' => ':count сек.', + 'ago' => 'пред :time', + 'from_now' => 'после :time', + 'after' => 'по :time', + 'before' => 'пред :time', + 'diff_now' => 'сега', + 'diff_today' => 'Денес', + 'diff_today_regexp' => 'Денес(?:\\s+во)?', + 'diff_yesterday' => 'вчера', + 'diff_yesterday_regexp' => 'Вчера(?:\\s+во)?', + 'diff_tomorrow' => 'утре', + 'diff_tomorrow_regexp' => 'Утре(?:\\s+во)?', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'D.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY H:mm', + 'LLLL' => 'dddd, D MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[Денес во] LT', + 'nextDay' => '[Утре во] LT', + 'nextWeek' => '[Во] dddd [во] LT', + 'lastDay' => '[Вчера во] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + default: + return '[Изминатиот] dddd [во] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + $lastDigit = $number % 10; + $last2Digits = $number % 100; + if ($number === 0) { + return $number.'-ев'; + } + if ($last2Digits === 0) { + return $number.'-ен'; + } + if ($last2Digits > 10 && $last2Digits < 20) { + return $number.'-ти'; + } + if ($lastDigit === 1) { + return $number.'-ви'; + } + if ($lastDigit === 2) { + return $number.'-ри'; + } + if ($lastDigit === 7 || $lastDigit === 8) { + return $number.'-ми'; + } + + return $number.'-ти'; + }, + 'months' => ['јануари', 'февруари', 'март', 'април', 'мај', 'јуни', 'јули', 'август', 'септември', 'октомври', 'ноември', 'декември'], + 'months_short' => ['јан', 'фев', 'мар', 'апр', 'мај', 'јун', 'јул', 'авг', 'сеп', 'окт', 'ное', 'дек'], + 'weekdays' => ['недела', 'понеделник', 'вторник', 'среда', 'четврток', 'петок', 'сабота'], + 'weekdays_short' => ['нед', 'пон', 'вто', 'сре', 'чет', 'пет', 'саб'], + 'weekdays_min' => ['нe', 'пo', 'вт', 'ср', 'че', 'пе', 'сa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' и '], + 'meridiem' => ['АМ', 'ПМ'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/mk_MK.php b/libraries/Carbon/src/Carbon/Lang/mk_MK.php new file mode 100644 index 00000000000..74454fe23c4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mk_MK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/mk.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ml.php b/libraries/Carbon/src/Carbon/Lang/ml.php new file mode 100644 index 00000000000..edbaa83c43b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ml.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - JD Isaacks + */ +return [ + 'year' => ':count വർഷം', + 'a_year' => 'ഒരു വർഷം|:count വർഷം', + 'month' => ':count മാസം', + 'a_month' => 'ഒരു മാസം|:count മാസം', + 'week' => ':count ആഴ്ച', + 'a_week' => 'ഒരാഴ്ച|:count ആഴ്ച', + 'day' => ':count ദിവസം', + 'a_day' => 'ഒരു ദിവസം|:count ദിവസം', + 'hour' => ':count മണിക്കൂർ', + 'a_hour' => 'ഒരു മണിക്കൂർ|:count മണിക്കൂർ', + 'minute' => ':count മിനിറ്റ്', + 'a_minute' => 'ഒരു മിനിറ്റ്|:count മിനിറ്റ്', + 'second' => ':count സെക്കൻഡ്', + 'a_second' => 'അൽപ നിമിഷങ്ങൾ|:count സെക്കൻഡ്', + 'ago' => ':time മുൻപ്', + 'from_now' => ':time കഴിഞ്ഞ്', + 'diff_now' => 'ഇപ്പോൾ', + 'diff_today' => 'ഇന്ന്', + 'diff_yesterday' => 'ഇന്നലെ', + 'diff_tomorrow' => 'നാളെ', + 'formats' => [ + 'LT' => 'A h:mm -നു', + 'LTS' => 'A h:mm:ss -നു', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm -നു', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm -നു', + ], + 'calendar' => [ + 'sameDay' => '[ഇന്ന്] LT', + 'nextDay' => '[നാളെ] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[ഇന്നലെ] LT', + 'lastWeek' => '[കഴിഞ്ഞ] dddd, LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'രാത്രി'; + } + if ($hour < 12) { + return 'രാവിലെ'; + } + if ($hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } + if ($hour < 20) { + return 'വൈകുന്നേരം'; + } + + return 'രാത്രി'; + }, + 'months' => ['ജനുവരി', 'ഫെബ്രുവരി', 'മാർച്ച്', 'ഏപ്രിൽ', 'മേയ്', 'ജൂൺ', 'ജൂലൈ', 'ഓഗസ്റ്റ്', 'സെപ്റ്റംബർ', 'ഒക്ടോബർ', 'നവംബർ', 'ഡിസംബർ'], + 'months_short' => ['ജനു.', 'ഫെബ്രു.', 'മാർ.', 'ഏപ്രി.', 'മേയ്', 'ജൂൺ', 'ജൂലൈ.', 'ഓഗ.', 'സെപ്റ്റ.', 'ഒക്ടോ.', 'നവം.', 'ഡിസം.'], + 'weekdays' => ['ഞായറാഴ്ച', 'തിങ്കളാഴ്ച', 'ചൊവ്വാഴ്ച', 'ബുധനാഴ്ച', 'വ്യാഴാഴ്ച', 'വെള്ളിയാഴ്ച', 'ശനിയാഴ്ച'], + 'weekdays_short' => ['ഞായർ', 'തിങ്കൾ', 'ചൊവ്വ', 'ബുധൻ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], + 'weekdays_min' => ['ഞാ', 'തി', 'ചൊ', 'ബു', 'വ്യാ', 'വെ', 'ശ'], + 'list' => ', ', + 'weekend' => [0, 0], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ml_IN.php b/libraries/Carbon/src/Carbon/Lang/ml_IN.php new file mode 100644 index 00000000000..e93c73b9052 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ml_IN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ml.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mn.php b/libraries/Carbon/src/Carbon/Lang/mn.php new file mode 100644 index 00000000000..4012400c1c7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mn.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Tsutomu Kuroda + * - tjku + * - Max Melentiev + * - Zolzaya Erdenebaatar + * - Tom Hughes + * - Akira Matsuda + * - Christopher Dell + * - Michael Kessler + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Nicolás Hock Isaza + * - Ochirkhuyag + * - Batmandakh + * - lucifer-crybaby + */ +return [ + 'year' => ':count жил', + 'y' => ':count жил', + 'month' => ':count сар', + 'm' => ':count сар', + 'week' => ':count долоо хоног', + 'w' => ':count долоо хоног', + 'day' => ':count өдөр', + 'd' => ':count өдөр', + 'hour' => ':count цаг', + 'h' => ':countц', + 'minute' => ':count минут', + 'min' => ':countм', + 'second' => ':count секунд', + 's' => ':countс', + + 'ago_mode' => 'last', + 'ago' => ':time өмнө', + 'year_ago' => ':count жилийн', + 'y_ago' => ':count жилийн', + 'month_ago' => ':count сарын', + 'm_ago' => ':count сарын', + 'day_ago' => ':count хоногийн', + 'd_ago' => ':count хоногийн', + 'week_ago' => ':count долоо хоногийн', + 'w_ago' => ':count долоо хоногийн', + 'hour_ago' => ':count цагийн', + 'minute_ago' => ':count минутын', + 'second_ago' => ':count секундын', + + 'from_now_mode' => 'last', + 'from_now' => 'одоогоос :time', + 'year_from_now' => ':count жилийн дараа', + 'y_from_now' => ':count жилийн дараа', + 'month_from_now' => ':count сарын дараа', + 'm_from_now' => ':count сарын дараа', + 'day_from_now' => ':count хоногийн дараа', + 'd_from_now' => ':count хоногийн дараа', + 'hour_from_now' => ':count цагийн дараа', + 'minute_from_now' => ':count минутын дараа', + 'second_from_now' => ':count секундын дараа', + + 'after_mode' => 'last', + 'after' => ':time дараа', + 'year_after' => ':count жилийн', + 'y_after' => ':count жилийн', + 'month_after' => ':count сарын', + 'm_after' => ':count сарын', + 'day_after' => ':count хоногийн', + 'd_after' => ':count хоногийн', + 'hour_after' => ':count цагийн', + 'minute_after' => ':count минутын', + 'second_after' => ':count секундын', + + 'before_mode' => 'last', + 'before' => ':time өмнө', + 'year_before' => ':count жилийн', + 'y_before' => ':count жилийн', + 'month_before' => ':count сарын', + 'm_before' => ':count сарын', + 'day_before' => ':count хоногийн', + 'd_before' => ':count хоногийн', + 'hour_before' => ':count цагийн', + 'minute_before' => ':count минутын', + 'second_before' => ':count секундын', + + 'list' => ', ', + 'diff_now' => 'одоо', + 'diff_yesterday' => 'өчигдөр', + 'diff_tomorrow' => 'маргааш', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'YYYY MMMM DD', + 'LLL' => 'YY-MM-DD, HH:mm', + 'LLLL' => 'YYYY MMMM DD, HH:mm', + ], + 'weekdays' => ['Ням', 'Даваа', 'Мягмар', 'Лхагва', 'Пүрэв', 'Баасан', 'Бямба'], + 'weekdays_short' => ['Ня', 'Да', 'Мя', 'Лх', 'Пү', 'Ба', 'Бя'], + 'weekdays_min' => ['Ня', 'Да', 'Мя', 'Лх', 'Пү', 'Ба', 'Бя'], + 'months' => ['1 сар', '2 сар', '3 сар', '4 сар', '5 сар', '6 сар', '7 сар', '8 сар', '9 сар', '10 сар', '11 сар', '12 сар'], + 'months_short' => ['1 сар', '2 сар', '3 сар', '4 сар', '5 сар', '6 сар', '7 сар', '8 сар', '9 сар', '10 сар', '11 сар', '12 сар'], + 'meridiem' => ['өглөө', 'орой'], + 'first_day_of_week' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/mn_MN.php b/libraries/Carbon/src/Carbon/Lang/mn_MN.php new file mode 100644 index 00000000000..19683aa60a2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mn_MN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/mn.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mni.php b/libraries/Carbon/src/Carbon/Lang/mni.php new file mode 100644 index 00000000000..10e6cf4fa78 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mni.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/mni_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mni_IN.php b/libraries/Carbon/src/Carbon/Lang/mni_IN.php new file mode 100644 index 00000000000..a21c1181bf2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mni_IN.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat Pune libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['জানুৱারি', 'ফেব্রুৱারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগষ্ট', 'সেপ্তেম্বর', 'ওক্তোবর', 'নবেম্বর', 'ডিসেম্বর'], + 'months_short' => ['জান', 'ফেব', 'মার', 'এপ্রি', 'মে', 'জুন', 'জুল', 'আগ', 'সেপ', 'ওক্ত', 'নবে', 'ডিস'], + 'weekdays' => ['নোংমাইজিং', 'নিংথৌকাবা', 'লৈবাকপোকপা', 'য়ুমশকৈশা', 'শগোলশেন', 'ইরাই', 'থাংজ'], + 'weekdays_short' => ['নোং', 'নিং', 'লৈবাক', 'য়ুম', 'শগোল', 'ইরা', 'থাং'], + 'weekdays_min' => ['নোং', 'নিং', 'লৈবাক', 'য়ুম', 'শগোল', 'ইরা', 'থাং'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['এ.ম.', 'প.ম.'], + + 'year' => ':count ইসিং', // less reliable + 'y' => ':count ইসিং', // less reliable + 'a_year' => ':count ইসিং', // less reliable + + 'second' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable + 's' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable + 'a_second' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mo.php b/libraries/Carbon/src/Carbon/Lang/mo.php new file mode 100644 index 00000000000..4198a5d9fa4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mo.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ro.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mr.php b/libraries/Carbon/src/Carbon/Lang/mr.php new file mode 100644 index 00000000000..3c0cbfc10f0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mr.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Vikram-enyota + */ +return [ + 'year' => ':count वर्ष', + 'y' => ':count वर्ष', + 'month' => ':count महिना|:count महिने', + 'm' => ':count महिना|:count महिने', + 'week' => ':count आठवडा|:count आठवडे', + 'w' => ':count आठवडा|:count आठवडे', + 'day' => ':count दिवस', + 'd' => ':count दिवस', + 'hour' => ':count तास', + 'h' => ':count तास', + 'minute' => ':count मिनिटे', + 'min' => ':count मिनिटे', + 'second' => ':count सेकंद', + 's' => ':count सेकंद', + + 'ago' => ':timeपूर्वी', + 'from_now' => ':timeमध्ये', + 'before' => ':timeपूर्वी', + 'after' => ':timeनंतर', + + 'diff_now' => 'आत्ता', + 'diff_today' => 'आज', + 'diff_yesterday' => 'काल', + 'diff_tomorrow' => 'उद्या', + + 'formats' => [ + 'LT' => 'A h:mm वाजता', + 'LTS' => 'A h:mm:ss वाजता', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm वाजता', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm वाजता', + ], + + 'calendar' => [ + 'sameDay' => '[आज] LT', + 'nextDay' => '[उद्या] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[काल] LT', + 'lastWeek' => '[मागील] dddd, LT', + 'sameElse' => 'L', + ], + + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'रात्री'; + } + if ($hour < 10) { + return 'सकाळी'; + } + if ($hour < 17) { + return 'दुपारी'; + } + if ($hour < 20) { + return 'सायंकाळी'; + } + + return 'रात्री'; + }, + + 'months' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ऑगस्ट', 'सप्टेंबर', 'ऑक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], + 'months_short' => ['जाने.', 'फेब्रु.', 'मार्च.', 'एप्रि.', 'मे.', 'जून.', 'जुलै.', 'ऑग.', 'सप्टें.', 'ऑक्टो.', 'नोव्हें.', 'डिसें.'], + 'weekdays' => ['रविवार', 'सोमवार', 'मंगळवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'], + 'weekdays_short' => ['रवि', 'सोम', 'मंगळ', 'बुध', 'गुरू', 'शुक्र', 'शनि'], + 'weekdays_min' => ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'], + 'list' => [', ', ' आणि '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'weekend' => [0, 0], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/mr_IN.php b/libraries/Carbon/src/Carbon/Lang/mr_IN.php new file mode 100644 index 00000000000..fd98c5f83fb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mr_IN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/mr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ms.php b/libraries/Carbon/src/Carbon/Lang/ms.php new file mode 100644 index 00000000000..37c53619a86 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ms.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - Azri Jamil + * - JD Isaacks + * - Josh Soref + * - Azri Jamil + * - Hariadi Hinta + * - Ashraf Kamarudin + */ +return [ + 'year' => ':count tahun', + 'a_year' => '{1}setahun|]1,Inf[:count tahun', + 'y' => ':count tahun', + 'month' => ':count bulan', + 'a_month' => '{1}sebulan|]1,Inf[:count bulan', + 'm' => ':count bulan', + 'week' => ':count minggu', + 'a_week' => '{1}seminggu|]1,Inf[:count minggu', + 'w' => ':count minggu', + 'day' => ':count hari', + 'a_day' => '{1}sehari|]1,Inf[:count hari', + 'd' => ':count hari', + 'hour' => ':count jam', + 'a_hour' => '{1}sejam|]1,Inf[:count jam', + 'h' => ':count jam', + 'minute' => ':count minit', + 'a_minute' => '{1}seminit|]1,Inf[:count minit', + 'min' => ':count minit', + 'second' => ':count saat', + 'a_second' => '{1}beberapa saat|]1,Inf[:count saat', + 'millisecond' => ':count milisaat', + 'a_millisecond' => '{1}semilisaat|]1,Inf[:count milliseconds', + 'microsecond' => ':count mikrodetik', + 'a_microsecond' => '{1}semikrodetik|]1,Inf[:count mikrodetik', + 's' => ':count saat', + 'ago' => ':time yang lepas', + 'from_now' => ':time dari sekarang', + 'after' => ':time kemudian', + 'before' => ':time sebelum', + 'diff_now' => 'sekarang', + 'diff_today' => 'Hari', + 'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?', + 'diff_yesterday' => 'semalam', + 'diff_yesterday_regexp' => 'Semalam(?:\\s+pukul)?', + 'diff_tomorrow' => 'esok', + 'diff_tomorrow_regexp' => 'Esok(?:\\s+pukul)?', + 'diff_before_yesterday' => 'kelmarin', + 'diff_after_tomorrow' => 'lusa', + 'formats' => [ + 'LT' => 'HH.mm', + 'LTS' => 'HH.mm.ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY [pukul] HH.mm', + 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', + ], + 'calendar' => [ + 'sameDay' => '[Hari ini pukul] LT', + 'nextDay' => '[Esok pukul] LT', + 'nextWeek' => 'dddd [pukul] LT', + 'lastDay' => '[Kelmarin pukul] LT', + 'lastWeek' => 'dddd [lepas pukul] LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 1) { + return 'tengah malam'; + } + + if ($hour < 12) { + return 'pagi'; + } + + if ($hour < 13) { + return 'tengah hari'; + } + + if ($hour < 19) { + return 'petang'; + } + + return 'malam'; + }, + 'months' => ['Januari', 'Februari', 'Mac', 'April', 'Mei', 'Jun', 'Julai', 'Ogos', 'September', 'Oktober', 'November', 'Disember'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ogs', 'Sep', 'Okt', 'Nov', 'Dis'], + 'weekdays' => ['Ahad', 'Isnin', 'Selasa', 'Rabu', 'Khamis', 'Jumaat', 'Sabtu'], + 'weekdays_short' => ['Ahd', 'Isn', 'Sel', 'Rab', 'Kha', 'Jum', 'Sab'], + 'weekdays_min' => ['Ah', 'Is', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' dan '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ms_BN.php b/libraries/Carbon/src/Carbon/Lang/ms_BN.php new file mode 100644 index 00000000000..7bcac3c6327 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ms_BN.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ms.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/MM/yy', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY, h:mm a', + 'LLLL' => 'dd MMMM YYYY, h:mm a', + ], + 'meridiem' => ['a', 'p'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ms_MY.php b/libraries/Carbon/src/Carbon/Lang/ms_MY.php new file mode 100644 index 00000000000..a71cdffc369 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ms_MY.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - Azri Jamil + * - JD Isaacks + */ +return require __DIR__.'/ms.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ms_SG.php b/libraries/Carbon/src/Carbon/Lang/ms_SG.php new file mode 100644 index 00000000000..66976c2f0aa --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ms_SG.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ms.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/MM/yy', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY, h:mm a', + 'LLLL' => 'dddd, D MMMM YYYY, h:mm a', + ], + 'meridiem' => ['a', 'p'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/mt.php b/libraries/Carbon/src/Carbon/Lang/mt.php new file mode 100644 index 00000000000..b92eeb75906 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mt.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Alessandro Maruccia + */ +return [ + 'year' => 'sena|:count sni|:count sni|:count sni', + 'y' => 'sa sena|:count snin|:count snin|:count snin', + 'month' => 'xahar|:count xhur|:count xhur|:count xhur', + 'm' => ':count xahar|:count xhur|:count xhur|:count xhur', + 'week' => 'gimgħa|:count ġimgħat|:count ġimgħat|:count ġimgħat', + 'w' => 'ġimgħa|:count ġimgħat|:count ġimgħat|:count ġimgħat', + 'day' => 'ġurnata|:count ġranet|:count ġranet|:count ġranet', + 'd' => 'ġurnata|:count ġranet|:count ġranet|:count ġranet', + 'hour' => 'siegħa|:count siegħat|:count siegħat|:count siegħat', + 'h' => 'siegħa|:count sigħat|:count sigħat|:count sigħat', + 'minute' => 'minuta|:count minuti|:count minuti|:count minuti', + 'min' => 'min.|:count min.|:count min.|:count min.', + 'second' => 'ftit sekondi|:count sekondi|:count sekondi|:count sekondi', + 's' => 'sek.|:count sek.|:count sek.|:count sek.', + 'ago' => ':time ilu', + 'from_now' => 'f’ :time', + 'diff_now' => 'issa', + 'diff_today' => 'Illum', + 'diff_today_regexp' => 'Illum(?:\\s+fil-)?', + 'diff_yesterday' => 'lbieraħ', + 'diff_yesterday_regexp' => 'Il-bieraħ(?:\\s+fil-)?', + 'diff_tomorrow' => 'għada', + 'diff_tomorrow_regexp' => 'Għada(?:\\s+fil-)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Illum fil-]LT', + 'nextDay' => '[Għada fil-]LT', + 'nextWeek' => 'dddd [fil-]LT', + 'lastDay' => '[Il-bieraħ fil-]LT', + 'lastWeek' => 'dddd [li għadda] [fil-]LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':numberº', + 'months' => ['Jannar', 'Frar', 'Marzu', 'April', 'Mejju', 'Ġunju', 'Lulju', 'Awwissu', 'Settembru', 'Ottubru', 'Novembru', 'Diċembru'], + 'months_short' => ['Jan', 'Fra', 'Mar', 'Apr', 'Mej', 'Ġun', 'Lul', 'Aww', 'Set', 'Ott', 'Nov', 'Diċ'], + 'weekdays' => ['Il-Ħadd', 'It-Tnejn', 'It-Tlieta', 'L-Erbgħa', 'Il-Ħamis', 'Il-Ġimgħa', 'Is-Sibt'], + 'weekdays_short' => ['Ħad', 'Tne', 'Tli', 'Erb', 'Ħam', 'Ġim', 'Sib'], + 'weekdays_min' => ['Ħa', 'Tn', 'Tl', 'Er', 'Ħa', 'Ġi', 'Si'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' u '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/mt_MT.php b/libraries/Carbon/src/Carbon/Lang/mt_MT.php new file mode 100644 index 00000000000..ed14cd83ecb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mt_MT.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/mt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mua.php b/libraries/Carbon/src/Carbon/Lang/mua.php new file mode 100644 index 00000000000..27d64147b75 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mua.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['comme', 'lilli'], + 'weekdays' => ['Com’yakke', 'Comlaaɗii', 'Comzyiiɗii', 'Comkolle', 'Comkaldǝɓlii', 'Comgaisuu', 'Comzyeɓsuu'], + 'weekdays_short' => ['Cya', 'Cla', 'Czi', 'Cko', 'Cka', 'Cga', 'Cze'], + 'weekdays_min' => ['Cya', 'Cla', 'Czi', 'Cko', 'Cka', 'Cga', 'Cze'], + 'months' => ['Fĩi Loo', 'Cokcwaklaŋne', 'Cokcwaklii', 'Fĩi Marfoo', 'Madǝǝuutǝbijaŋ', 'Mamǝŋgwãafahbii', 'Mamǝŋgwãalii', 'Madǝmbii', 'Fĩi Dǝɓlii', 'Fĩi Mundaŋ', 'Fĩi Gwahlle', 'Fĩi Yuru'], + 'months_short' => ['FLO', 'CLA', 'CKI', 'FMF', 'MAD', 'MBI', 'MLI', 'MAM', 'FDE', 'FMU', 'FGW', 'FYU'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/my.php b/libraries/Carbon/src/Carbon/Lang/my.php new file mode 100644 index 00000000000..f6bcea1705d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/my.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - JD Isaacks + * - Nay Lin Aung + */ +return [ + 'year' => '{1}တစ်နှစ်|]1,Inf[:count နှစ်', + 'y' => ':count နှစ်', + 'month' => '{1}တစ်လ|]1,Inf[:count လ', + 'm' => ':count လ', + 'week' => ':count ပတ်', + 'w' => ':count ပတ်', + 'day' => '{1}တစ်ရက်|]1,Inf[:count ရက်', + 'd' => ':count ရက်', + 'hour' => '{1}တစ်နာရီ|]1,Inf[:count နာရီ', + 'h' => ':count နာရီ', + 'minute' => '{1}တစ်မိနစ်|]1,Inf[:count မိနစ်', + 'min' => ':count မိနစ်', + 'second' => '{1}စက္ကန်.အနည်းငယ်|]1,Inf[:count စက္ကန့်', + 's' => ':count စက္ကန့်', + 'ago' => 'လွန်ခဲ့သော :time က', + 'from_now' => 'လာမည့် :time မှာ', + 'after' => ':time ကြာပြီးနောက်', + 'before' => ':time မတိုင်ခင်', + 'diff_now' => 'အခုလေးတင်', + 'diff_today' => 'ယနေ.', + 'diff_yesterday' => 'မနေ့က', + 'diff_yesterday_regexp' => 'မနေ.က', + 'diff_tomorrow' => 'မနက်ဖြန်', + 'diff_before_yesterday' => 'တမြန်နေ့က', + 'diff_after_tomorrow' => 'တဘက်ခါ', + 'period_recurrences' => ':count ကြိမ်', + 'formats' => [ + 'LT' => 'Oh:Om A', + 'LTS' => 'Oh:Om:Os A', + 'L' => 'OD/OM/OY', + 'LL' => 'OD MMMM OY', + 'LLL' => 'OD MMMM OY Oh:Om A', + 'LLLL' => 'dddd OD MMMM OY Oh:Om A', + ], + 'calendar' => [ + 'sameDay' => '[ယနေ.] LT [မှာ]', + 'nextDay' => '[မနက်ဖြန်] LT [မှာ]', + 'nextWeek' => 'dddd LT [မှာ]', + 'lastDay' => '[မနေ.က] LT [မှာ]', + 'lastWeek' => '[ပြီးခဲ့သော] dddd LT [မှာ]', + 'sameElse' => 'L', + ], + 'months' => ['ဇန်နဝါရီ', 'ဖေဖော်ဝါရီ', 'မတ်', 'ဧပြီ', 'မေ', 'ဇွန်', 'ဇူလိုင်', 'သြဂုတ်', 'စက်တင်ဘာ', 'အောက်တိုဘာ', 'နိုဝင်ဘာ', 'ဒီဇင်ဘာ'], + 'months_short' => ['ဇန်', 'ဖေ', 'မတ်', 'ပြီ', 'မေ', 'ဇွန်', 'လိုင်', 'သြ', 'စက်', 'အောက်', 'နို', 'ဒီ'], + 'weekdays' => ['တနင်္ဂနွေ', 'တနင်္လာ', 'အင်္ဂါ', 'ဗုဒ္ဓဟူး', 'ကြာသပတေး', 'သောကြာ', 'စနေ'], + 'weekdays_short' => ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'], + 'weekdays_min' => ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'alt_numbers' => ['၀၀', '၀၁', '၀၂', '၀၃', '၀၄', '၀၅', '၀၆', '၀၇', '၀၈', '၀၉', '၁၀', '၁၁', '၁၂', '၁၃', '၁၄', '၁၅', '၁၆', '၁၇', '၁၈', '၁၉', '၂၀', '၂၁', '၂၂', '၂၃', '၂၄', '၂၅', '၂၆', '၂၇', '၂၈', '၂၉', '၃၀', '၃၁', '၃၂', '၃၃', '၃၄', '၃၅', '၃၆', '၃၇', '၃၈', '၃၉', '၄၀', '၄၁', '၄၂', '၄၃', '၄၄', '၄၅', '၄၆', '၄၇', '၄၈', '၄၉', '၅၀', '၅၁', '၅၂', '၅၃', '၅၄', '၅၅', '၅၆', '၅၇', '၅၈', '၅၉', '၆၀', '၆၁', '၆၂', '၆၃', '၆၄', '၆၅', '၆၆', '၆၇', '၆၈', '၆၉', '၇၀', '၇၁', '၇၂', '၇၃', '၇၄', '၇၅', '၇၆', '၇၇', '၇၈', '၇၉', '၈၀', '၈၁', '၈၂', '၈၃', '၈၄', '၈၅', '၈၆', '၈၇', '၈၈', '၈၉', '၉၀', '၉၁', '၉၂', '၉၃', '၉၄', '၉၅', '၉၆', '၉၇', '၉၈', '၉၉'], + 'meridiem' => ['နံနက်', 'ညနေ'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/my_MM.php b/libraries/Carbon/src/Carbon/Lang/my_MM.php new file mode 100644 index 00000000000..859678a9cfe --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/my_MM.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/my.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/mzn.php b/libraries/Carbon/src/Carbon/Lang/mzn.php new file mode 100644 index 00000000000..65c7fc2bbbd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/mzn.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fa.php', [ + 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], + 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], + 'first_day_of_week' => 6, + 'weekend' => [5, 5], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'YYYY MMMM D, dddd HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nan.php b/libraries/Carbon/src/Carbon/Lang/nan.php new file mode 100644 index 00000000000..e9ae867f780 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nan.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/nan_TW.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nan_TW.php b/libraries/Carbon/src/Carbon/Lang/nan_TW.php new file mode 100644 index 00000000000..978db077140 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nan_TW.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY年MM月DD日', + ], + 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], + 'weekdays' => ['禮拜日', '禮拜一', '禮拜二', '禮拜三', '禮拜四', '禮拜五', '禮拜六'], + 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['頂晡', '下晡'], + + 'year' => ':count 年', + 'y' => ':count 年', + 'a_year' => ':count 年', + + 'month' => ':count goe̍h', + 'm' => ':count goe̍h', + 'a_month' => ':count goe̍h', + + 'week' => ':count lé-pài', + 'w' => ':count lé-pài', + 'a_week' => ':count lé-pài', + + 'day' => ':count 日', + 'd' => ':count 日', + 'a_day' => ':count 日', + + 'hour' => ':count tiám-cheng', + 'h' => ':count tiám-cheng', + 'a_hour' => ':count tiám-cheng', + + 'minute' => ':count Hun-cheng', + 'min' => ':count Hun-cheng', + 'a_minute' => ':count Hun-cheng', + + 'second' => ':count Bió', + 's' => ':count Bió', + 'a_second' => ':count Bió', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nan_TW@latin.php b/libraries/Carbon/src/Carbon/Lang/nan_TW@latin.php new file mode 100644 index 00000000000..4376111f1f1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nan_TW@latin.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Arne Goetje arne@canonical.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], + 'months' => ['1goe̍h', '2goe̍h', '3goe̍h', '4goe̍h', '5goe̍h', '6goe̍h', '7goe̍h', '8goe̍h', '9goe̍h', '10goe̍h', '11goe̍h', '12goe̍h'], + 'months_short' => ['1g', '2g', '3g', '4g', '5g', '6g', '7g', '8g', '9g', '10g', '11g', '12g'], + 'weekdays' => ['lé-pài-ji̍t', 'pài-it', 'pài-jī', 'pài-saⁿ', 'pài-sì', 'pài-gō͘', 'pài-la̍k'], + 'weekdays_short' => ['lp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6'], + 'weekdays_min' => ['lp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['téng-po͘', 'ē-po͘'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/naq.php b/libraries/Carbon/src/Carbon/Lang/naq.php new file mode 100644 index 00000000000..7040f5dad93 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/naq.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['ǁgoagas', 'ǃuias'], + 'weekdays' => ['Sontaxtsees', 'Mantaxtsees', 'Denstaxtsees', 'Wunstaxtsees', 'Dondertaxtsees', 'Fraitaxtsees', 'Satertaxtsees'], + 'weekdays_short' => ['Son', 'Ma', 'De', 'Wu', 'Do', 'Fr', 'Sat'], + 'weekdays_min' => ['Son', 'Ma', 'De', 'Wu', 'Do', 'Fr', 'Sat'], + 'months' => ['ǃKhanni', 'ǃKhanǀgôab', 'ǀKhuuǁkhâb', 'ǃHôaǂkhaib', 'ǃKhaitsâb', 'Gamaǀaeb', 'ǂKhoesaob', 'Aoǁkhuumûǁkhâb', 'Taraǀkhuumûǁkhâb', 'ǂNûǁnâiseb', 'ǀHooǂgaeb', 'Hôasoreǁkhâb'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd, D MMMM YYYY h:mm a', + ], + + 'year' => ':count kurigu', + 'y' => ':count kurigu', + 'a_year' => ':count kurigu', + + 'month' => ':count ǁaub', // less reliable + 'm' => ':count ǁaub', // less reliable + 'a_month' => ':count ǁaub', // less reliable + + 'week' => ':count hû', // less reliable + 'w' => ':count hû', // less reliable + 'a_week' => ':count hû', // less reliable + + 'day' => ':count ǀhobas', // less reliable + 'd' => ':count ǀhobas', // less reliable + 'a_day' => ':count ǀhobas', // less reliable + + 'hour' => ':count ǂgaes', // less reliable + 'h' => ':count ǂgaes', // less reliable + 'a_hour' => ':count ǂgaes', // less reliable + + 'minute' => ':count minutga', // less reliable + 'min' => ':count minutga', // less reliable + 'a_minute' => ':count minutga', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nb.php b/libraries/Carbon/src/Carbon/Lang/nb.php new file mode 100644 index 00000000000..2dc79b7dfe1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nb.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Alexander Tømmerås + * - Sigurd Gartmann + * - JD Isaacks + */ +return [ + 'year' => ':count år|:count år', + 'a_year' => 'ett år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count måned|:count måneder', + 'a_month' => 'en måned|:count måneder', + 'm' => ':count md.', + 'week' => ':count uke|:count uker', + 'a_week' => 'en uke|:count uker', + 'w' => ':count u.', + 'day' => ':count dag|:count dager', + 'a_day' => 'en dag|:count dager', + 'd' => ':count d.', + 'hour' => ':count time|:count timer', + 'a_hour' => 'en time|:count timer', + 'h' => ':count t', + 'minute' => ':count minutt|:count minutter', + 'a_minute' => 'ett minutt|:count minutter', + 'min' => ':count min', + 'second' => ':count sekund|:count sekunder', + 'a_second' => 'noen sekunder|:count sekunder', + 's' => ':count sek', + 'ago' => ':time siden', + 'from_now' => 'om :time', + 'after' => ':time etter', + 'before' => ':time før', + 'diff_now' => 'akkurat nå', + 'diff_today' => 'i dag', + 'diff_today_regexp' => 'i dag(?:\\s+kl.)?', + 'diff_yesterday' => 'i går', + 'diff_yesterday_regexp' => 'i går(?:\\s+kl.)?', + 'diff_tomorrow' => 'i morgen', + 'diff_tomorrow_regexp' => 'i morgen(?:\\s+kl.)?', + 'diff_before_yesterday' => 'i forgårs', + 'diff_after_tomorrow' => 'i overmorgen', + 'period_recurrences' => 'en gang|:count ganger', + 'period_interval' => 'hver :interval', + 'period_start_date' => 'fra :date', + 'period_end_date' => 'til :date', + 'months' => ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], + 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], + 'weekdays_short' => ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], + 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], + 'ordinal' => ':number.', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY [kl.] HH:mm', + 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[i dag kl.] LT', + 'nextDay' => '[i morgen kl.] LT', + 'nextWeek' => 'dddd [kl.] LT', + 'lastDay' => '[i går kl.] LT', + 'lastWeek' => '[forrige] dddd [kl.] LT', + 'sameElse' => 'L', + ], + 'list' => [', ', ' og '], + 'meridiem' => ['a.m.', 'p.m.'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/nb_NO.php b/libraries/Carbon/src/Carbon/Lang/nb_NO.php new file mode 100644 index 00000000000..0d8ae4388e7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nb_NO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/nb.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nb_SJ.php b/libraries/Carbon/src/Carbon/Lang/nb_SJ.php new file mode 100644 index 00000000000..121bb21a89f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nb_SJ.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/nb.php', [ + 'formats' => [ + 'LL' => 'D. MMM YYYY', + 'LLL' => 'D. MMMM YYYY, HH:mm', + 'LLLL' => 'dddd D. MMMM YYYY, HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nd.php b/libraries/Carbon/src/Carbon/Lang/nd.php new file mode 100644 index 00000000000..a0d067be5ae --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nd.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['Sonto', 'Mvulo', 'Sibili', 'Sithathu', 'Sine', 'Sihlanu', 'Mgqibelo'], + 'weekdays_short' => ['Son', 'Mvu', 'Sib', 'Sit', 'Sin', 'Sih', 'Mgq'], + 'weekdays_min' => ['Son', 'Mvu', 'Sib', 'Sit', 'Sin', 'Sih', 'Mgq'], + 'months' => ['Zibandlela', 'Nhlolanja', 'Mbimbitho', 'Mabasa', 'Nkwenkwezi', 'Nhlangula', 'Ntulikazi', 'Ncwabakazi', 'Mpandula', 'Mfumfu', 'Lwezi', 'Mpalakazi'], + 'months_short' => ['Zib', 'Nhlo', 'Mbi', 'Mab', 'Nkw', 'Nhla', 'Ntu', 'Ncw', 'Mpan', 'Mfu', 'Lwe', 'Mpal'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + + 'year' => 'okweminyaka engu-:count', // less reliable + 'y' => 'okweminyaka engu-:count', // less reliable + 'a_year' => 'okweminyaka engu-:count', // less reliable + + 'month' => 'inyanga ezingu-:count', + 'm' => 'inyanga ezingu-:count', + 'a_month' => 'inyanga ezingu-:count', + + 'week' => 'amaviki angu-:count', + 'w' => 'amaviki angu-:count', + 'a_week' => 'amaviki angu-:count', + + 'day' => 'kwamalanga angu-:count', + 'd' => 'kwamalanga angu-:count', + 'a_day' => 'kwamalanga angu-:count', + + 'hour' => 'amahola angu-:count', + 'h' => 'amahola angu-:count', + 'a_hour' => 'amahola angu-:count', + + 'minute' => 'imizuzu engu-:count', + 'min' => 'imizuzu engu-:count', + 'a_minute' => 'imizuzu engu-:count', + + 'second' => 'imizuzwana engu-:count', + 's' => 'imizuzwana engu-:count', + 'a_second' => 'imizuzwana engu-:count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nds.php b/libraries/Carbon/src/Carbon/Lang/nds.php new file mode 100644 index 00000000000..ccdc5beb40f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nds.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/nds_DE.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nds_DE.php b/libraries/Carbon/src/Carbon/Lang/nds_DE.php new file mode 100644 index 00000000000..a79ce7e5f51 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nds_DE.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Jannuaar', 'Feberwaar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], + 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], + 'weekdays' => ['Sünndag', 'Maandag', 'Dingsdag', 'Middeweek', 'Dunnersdag', 'Freedag', 'Sünnavend'], + 'weekdays_short' => ['Sdag', 'Maan', 'Ding', 'Midd', 'Dunn', 'Free', 'Svd.'], + 'weekdays_min' => ['Sd', 'Ma', 'Di', 'Mi', 'Du', 'Fr', 'Sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count Johr', + 'y' => ':countJ', + 'a_year' => '{1}een Johr|:count Johr', + + 'month' => ':count Maand', + 'm' => ':countM', + 'a_month' => '{1}een Maand|:count Maand', + + 'week' => ':count Week|:count Weken', + 'w' => ':countW', + 'a_week' => '{1}een Week|:count Week|:count Weken', + + 'day' => ':count Dag|:count Daag', + 'd' => ':countD', + 'a_day' => '{1}een Dag|:count Dag|:count Daag', + + 'hour' => ':count Stünn|:count Stünnen', + 'h' => ':countSt', + 'a_hour' => '{1}een Stünn|:count Stünn|:count Stünnen', + + 'minute' => ':count Minuut|:count Minuten', + 'min' => ':countm', + 'a_minute' => '{1}een Minuut|:count Minuut|:count Minuten', + + 'second' => ':count Sekunn|:count Sekunnen', + 's' => ':counts', + 'a_second' => 'en poor Sekunnen|:count Sekunn|:count Sekunnen', + + 'ago' => 'vör :time', + 'from_now' => 'in :time', + 'before' => ':time vörher', + 'after' => ':time later', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nds_NL.php b/libraries/Carbon/src/Carbon/Lang/nds_NL.php new file mode 100644 index 00000000000..904879caf9d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nds_NL.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Jaunuwoa', 'Februwoa', 'Moaz', 'Aprell', 'Mai', 'Juni', 'Juli', 'August', 'Septamba', 'Oktoba', 'Nowamba', 'Dezamba'], + 'months_short' => ['Jan', 'Feb', 'Moz', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Now', 'Dez'], + 'weekdays' => ['Sinndag', 'Mondag', 'Dingsdag', 'Meddwäakj', 'Donnadag', 'Friedag', 'Sinnowend'], + 'weekdays_short' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], + 'weekdays_min' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ne.php b/libraries/Carbon/src/Carbon/Lang/ne.php new file mode 100644 index 00000000000..bcb045ca595 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ne.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - nootanghimire + * - Josh Soref + * - Nj Subedi + * - JD Isaacks + */ +return [ + 'year' => 'एक बर्ष|:count बर्ष', + 'y' => ':count वर्ष', + 'month' => 'एक महिना|:count महिना', + 'm' => ':count महिना', + 'week' => ':count हप्ता', + 'w' => ':count हप्ता', + 'day' => 'एक दिन|:count दिन', + 'd' => ':count दिन', + 'hour' => 'एक घण्टा|:count घण्टा', + 'h' => ':count घण्टा', + 'minute' => 'एक मिनेट|:count मिनेट', + 'min' => ':count मिनेट', + 'second' => 'केही क्षण|:count सेकेण्ड', + 's' => ':count सेकेण्ड', + 'ago' => ':time अगाडि', + 'from_now' => ':timeमा', + 'after' => ':time पछि', + 'before' => ':time अघि', + 'diff_now' => 'अहिले', + 'diff_today' => 'आज', + 'diff_yesterday' => 'हिजो', + 'diff_tomorrow' => 'भोलि', + 'formats' => [ + 'LT' => 'Aको h:mm बजे', + 'LTS' => 'Aको h:mm:ss बजे', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, Aको h:mm बजे', + 'LLLL' => 'dddd, D MMMM YYYY, Aको h:mm बजे', + ], + 'calendar' => [ + 'sameDay' => '[आज] LT', + 'nextDay' => '[भोलि] LT', + 'nextWeek' => '[आउँदो] dddd[,] LT', + 'lastDay' => '[हिजो] LT', + 'lastWeek' => '[गएको] dddd[,] LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 3) { + return 'राति'; + } + if ($hour < 12) { + return 'बिहान'; + } + if ($hour < 16) { + return 'दिउँसो'; + } + if ($hour < 20) { + return 'साँझ'; + } + + return 'राति'; + }, + 'months' => ['जनवरी', 'फेब्रुवरी', 'मार्च', 'अप्रिल', 'मई', 'जुन', 'जुलाई', 'अगष्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], + 'months_short' => ['जन.', 'फेब्रु.', 'मार्च', 'अप्रि.', 'मई', 'जुन', 'जुलाई.', 'अग.', 'सेप्ट.', 'अक्टो.', 'नोभे.', 'डिसे.'], + 'weekdays' => ['आइतबार', 'सोमबार', 'मङ्गलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'], + 'weekdays_short' => ['आइत.', 'सोम.', 'मङ्गल.', 'बुध.', 'बिहि.', 'शुक्र.', 'शनि.'], + 'weekdays_min' => ['आ.', 'सो.', 'मं.', 'बु.', 'बि.', 'शु.', 'श.'], + 'list' => [', ', ' र '], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ne_IN.php b/libraries/Carbon/src/Carbon/Lang/ne_IN.php new file mode 100644 index 00000000000..a036efd712b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ne_IN.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ne.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'yy/M/d', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D, h:mm a', + 'LLLL' => 'YYYY MMMM D, dddd, h:mm a', + ], + 'months' => ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], + 'months_short' => ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], + 'weekend' => [0, 0], + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ne_NP.php b/libraries/Carbon/src/Carbon/Lang/ne_NP.php new file mode 100644 index 00000000000..13e3db0e0e0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ne_NP.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ne.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nhn.php b/libraries/Carbon/src/Carbon/Lang/nhn.php new file mode 100644 index 00000000000..ba037cc5581 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nhn.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/nhn_MX.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nhn_MX.php b/libraries/Carbon/src/Carbon/Lang/nhn_MX.php new file mode 100644 index 00000000000..38476cbcd55 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nhn_MX.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], + 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], + 'weekdays' => ['teoilhuitl', 'ceilhuitl', 'omeilhuitl', 'yeilhuitl', 'nahuilhuitl', 'macuililhuitl', 'chicuaceilhuitl'], + 'weekdays_short' => ['teo', 'cei', 'ome', 'yei', 'nau', 'mac', 'chi'], + 'weekdays_min' => ['teo', 'cei', 'ome', 'yei', 'nau', 'mac', 'chi'], + 'day_of_first_week_of_year' => 1, + + 'month' => ':count metztli', // less reliable + 'm' => ':count metztli', // less reliable + 'a_month' => ':count metztli', // less reliable + + 'week' => ':count tonalli', // less reliable + 'w' => ':count tonalli', // less reliable + 'a_week' => ':count tonalli', // less reliable + + 'day' => ':count tonatih', // less reliable + 'd' => ':count tonatih', // less reliable + 'a_day' => ':count tonatih', // less reliable + + 'minute' => ':count toltecayotl', // less reliable + 'min' => ':count toltecayotl', // less reliable + 'a_minute' => ':count toltecayotl', // less reliable + + 'second' => ':count ome', // less reliable + 's' => ':count ome', // less reliable + 'a_second' => ':count ome', // less reliable + + 'year' => ':count xihuitl', + 'y' => ':count xihuitl', + 'a_year' => ':count xihuitl', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/niu.php b/libraries/Carbon/src/Carbon/Lang/niu.php new file mode 100644 index 00000000000..6ebaa64987d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/niu.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/niu_NU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/niu_NU.php b/libraries/Carbon/src/Carbon/Lang/niu_NU.php new file mode 100644 index 00000000000..e44740d35ed --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/niu_NU.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RockET Systems Emani Fakaotimanava-Lui emani@niue.nu + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Ianuali', 'Fepuali', 'Masi', 'Apelila', 'Me', 'Iuni', 'Iulai', 'Aokuso', 'Sepetema', 'Oketopa', 'Novema', 'Tesemo'], + 'months_short' => ['Ian', 'Fep', 'Mas', 'Ape', 'Me', 'Iun', 'Iul', 'Aok', 'Sep', 'Oke', 'Nov', 'Tes'], + 'weekdays' => ['Aho Tapu', 'Aho Gofua', 'Aho Ua', 'Aho Lotu', 'Aho Tuloto', 'Aho Falaile', 'Aho Faiumu'], + 'weekdays_short' => ['Tapu', 'Gofua', 'Ua', 'Lotu', 'Tuloto', 'Falaile', 'Faiumu'], + 'weekdays_min' => ['Tapu', 'Gofua', 'Ua', 'Lotu', 'Tuloto', 'Falaile', 'Faiumu'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => ':count tau', + 'y' => ':count tau', + 'a_year' => ':count tau', + + 'month' => ':count mahina', + 'm' => ':count mahina', + 'a_month' => ':count mahina', + + 'week' => ':count faahi tapu', + 'w' => ':count faahi tapu', + 'a_week' => ':count faahi tapu', + + 'day' => ':count aho', + 'd' => ':count aho', + 'a_day' => ':count aho', + + 'hour' => ':count e tulā', + 'h' => ':count e tulā', + 'a_hour' => ':count e tulā', + + 'minute' => ':count minuti', + 'min' => ':count minuti', + 'a_minute' => ':count minuti', + + 'second' => ':count sekone', + 's' => ':count sekone', + 'a_second' => ':count sekone', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nl.php b/libraries/Carbon/src/Carbon/Lang/nl.php new file mode 100644 index 00000000000..1367bcff620 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Roy + * - Stephan + * - François B + * - Tim Fish + * - Kevin Huang + * - Jacob Middag + * - JD Isaacks + * - Roy + * - Stephan + * - François B + * - Tim Fish + * - Jacob Middag + * - JD Isaacks + * - Propaganistas + * - MegaXLR + * - adriaanzon + * - MonkeyPhysics + * - JeroenG + * - RikSomers + * - proclame + * - Rik de Groot (hwdegroot) + */ +return [ + 'year' => ':count jaar|:count jaar', + 'a_year' => 'een jaar|:count jaar', + 'y' => ':countj', + 'month' => ':count maand|:count maanden', + 'a_month' => 'een maand|:count maanden', + 'm' => ':countmnd', + 'week' => ':count week|:count weken', + 'a_week' => 'een week|:count weken', + 'w' => ':countw', + 'day' => ':count dag|:count dagen', + 'a_day' => 'een dag|:count dagen', + 'd' => ':countd', + 'hour' => ':count uur|:count uur', + 'a_hour' => 'een uur|:count uur', + 'h' => ':countu', + 'minute' => ':count minuut|:count minuten', + 'a_minute' => 'een minuut|:count minuten', + 'min' => ':countmin', + 'second' => ':count seconde|:count seconden', + 'a_second' => 'een paar seconden|:count seconden', + 's' => ':counts', + 'ago' => ':time geleden', + 'from_now' => 'over :time', + 'after' => ':time later', + 'before' => ':time eerder', + 'diff_now' => 'nu', + 'diff_today' => 'vandaag', + 'diff_today_regexp' => 'vandaag(?:\\s+om)?', + 'diff_yesterday' => 'gisteren', + 'diff_yesterday_regexp' => 'gisteren(?:\\s+om)?', + 'diff_tomorrow' => 'morgen', + 'diff_tomorrow_regexp' => 'morgen(?:\\s+om)?', + 'diff_after_tomorrow' => 'overmorgen', + 'diff_before_yesterday' => 'eergisteren', + 'period_recurrences' => ':count keer', + 'period_interval' => function (string $interval = '') { + /** @var string $output */ + $output = preg_replace('/^(een|één|1)\s+/u', '', $interval); + + if (preg_match('/^(een|één|1)( jaar|j| uur|u)/u', $interval)) { + return "elk $output"; + } + + return "elke $output"; + }, + 'period_start_date' => 'van :date', + 'period_end_date' => 'tot :date', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD-MM-YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[vandaag om] LT', + 'nextDay' => '[morgen om] LT', + 'nextWeek' => 'dddd [om] LT', + 'lastDay' => '[gisteren om] LT', + 'lastWeek' => '[afgelopen] dddd [om] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); + }, + 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], + 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'mmm_suffix' => '.', + 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], + 'weekdays_short' => ['zo.', 'ma.', 'di.', 'wo.', 'do.', 'vr.', 'za.'], + 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' en '], + 'meridiem' => ['\'s ochtends', '\'s middags'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/nl_AW.php b/libraries/Carbon/src/Carbon/Lang/nl_AW.php new file mode 100644 index 00000000000..6988fdc4ec1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl_AW.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/nl.php', [ + 'formats' => [ + 'L' => 'DD-MM-YY', + ], + 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], + 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], + 'weekdays_short' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nl_BE.php b/libraries/Carbon/src/Carbon/Lang/nl_BE.php new file mode 100644 index 00000000000..c2763464bf6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl_BE.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Roy + * - Stephan + * - François B + * - Tim Fish + * - Kevin Huang + * - Jacob Middag + * - JD Isaacks + * - Propaganistas + */ +return array_replace_recursive(require __DIR__.'/nl.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nl_BQ.php b/libraries/Carbon/src/Carbon/Lang/nl_BQ.php new file mode 100644 index 00000000000..dd4268aed06 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl_BQ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/nl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nl_CW.php b/libraries/Carbon/src/Carbon/Lang/nl_CW.php new file mode 100644 index 00000000000..dd4268aed06 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl_CW.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/nl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nl_NL.php b/libraries/Carbon/src/Carbon/Lang/nl_NL.php new file mode 100644 index 00000000000..536c874ea3f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl_NL.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/nl.php', [ + 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], + 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], + 'weekdays_short' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nl_SR.php b/libraries/Carbon/src/Carbon/Lang/nl_SR.php new file mode 100644 index 00000000000..dd4268aed06 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl_SR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/nl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nl_SX.php b/libraries/Carbon/src/Carbon/Lang/nl_SX.php new file mode 100644 index 00000000000..dd4268aed06 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nl_SX.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/nl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nmg.php b/libraries/Carbon/src/Carbon/Lang/nmg.php new file mode 100644 index 00000000000..6beb9387a61 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nmg.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['maná', 'kugú'], + 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndɔ', 'sɔ́ndɔ mafú mába', 'sɔ́ndɔ mafú málal', 'sɔ́ndɔ mafú mána', 'mabágá má sukul', 'sásadi'], + 'weekdays_short' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'mbs', 'sas'], + 'weekdays_min' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'mbs', 'sas'], + 'months' => ['ngwɛn matáhra', 'ngwɛn ńmba', 'ngwɛn ńlal', 'ngwɛn ńna', 'ngwɛn ńtan', 'ngwɛn ńtuó', 'ngwɛn hɛmbuɛrí', 'ngwɛn lɔmbi', 'ngwɛn rɛbvuâ', 'ngwɛn wum', 'ngwɛn wum navǔr', 'krísimin'], + 'months_short' => ['ng1', 'ng2', 'ng3', 'ng4', 'ng5', 'ng6', 'ng7', 'ng8', 'ng9', 'ng10', 'ng11', 'kris'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nn.php b/libraries/Carbon/src/Carbon/Lang/nn.php new file mode 100644 index 00000000000..cd2c386c8bf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nn.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Alexander Tømmerås + * - Øystein + * - JD Isaacks + * - Gaute Hvoslef Kvalnes (gaute) + */ +return [ + 'year' => ':count år', + 'a_year' => 'eit år|:count år', + 'y' => ':count år', + 'month' => ':count månad|:count månader', + 'a_month' => 'ein månad|:count månader', + 'm' => ':count md', + 'week' => ':count veke|:count veker', + 'a_week' => 'ei veke|:count veker', + 'w' => ':countv', + 'day' => ':count dag|:count dagar', + 'a_day' => 'ein dag|:count dagar', + 'd' => ':countd', + 'hour' => ':count time|:count timar', + 'a_hour' => 'ein time|:count timar', + 'h' => ':countt', + 'minute' => ':count minutt', + 'a_minute' => 'eit minutt|:count minutt', + 'min' => ':countm', + 'second' => ':count sekund', + 'a_second' => 'nokre sekund|:count sekund', + 's' => ':counts', + 'ago' => ':time sidan', + 'from_now' => 'om :time', + 'after' => ':time etter', + 'before' => ':time før', + 'diff_today' => 'I dag', + 'diff_yesterday' => 'I går', + 'diff_yesterday_regexp' => 'I går(?:\\s+klokka)?', + 'diff_tomorrow' => 'I morgon', + 'diff_tomorrow_regexp' => 'I morgon(?:\\s+klokka)?', + 'diff_today_regexp' => 'I dag(?:\\s+klokka)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY [kl.] H:mm', + 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[I dag klokka] LT', + 'nextDay' => '[I morgon klokka] LT', + 'nextWeek' => 'dddd [klokka] LT', + 'lastDay' => '[I går klokka] LT', + 'lastWeek' => '[Føregåande] dddd [klokka] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], + 'weekdays' => ['sundag', 'måndag', 'tysdag', 'onsdag', 'torsdag', 'fredag', 'laurdag'], + 'weekdays_short' => ['sun', 'mån', 'tys', 'ons', 'tor', 'fre', 'lau'], + 'weekdays_min' => ['su', 'må', 'ty', 'on', 'to', 'fr', 'la'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' og '], + 'meridiem' => ['f.m.', 'e.m.'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/nn_NO.php b/libraries/Carbon/src/Carbon/Lang/nn_NO.php new file mode 100644 index 00000000000..dd00a0e55ab --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nn_NO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/nn.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nnh.php b/libraries/Carbon/src/Carbon/Lang/nnh.php new file mode 100644 index 00000000000..d283ed952e5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nnh.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['mbaʼámbaʼ', 'ncwònzém'], + 'weekdays' => null, + 'weekdays_short' => ['lyɛʼɛ́ sẅíŋtè', 'mvfò lyɛ̌ʼ', 'mbɔ́ɔntè mvfò lyɛ̌ʼ', 'tsètsɛ̀ɛ lyɛ̌ʼ', 'mbɔ́ɔntè tsetsɛ̀ɛ lyɛ̌ʼ', 'mvfò màga lyɛ̌ʼ', 'màga lyɛ̌ʼ'], + 'weekdays_min' => null, + 'months' => null, + 'months_short' => ['saŋ tsetsɛ̀ɛ lùm', 'saŋ kàg ngwóŋ', 'saŋ lepyè shúm', 'saŋ cÿó', 'saŋ tsɛ̀ɛ cÿó', 'saŋ njÿoláʼ', 'saŋ tyɛ̀b tyɛ̀b mbʉ̀ŋ', 'saŋ mbʉ̀ŋ', 'saŋ ngwɔ̀ʼ mbÿɛ', 'saŋ tàŋa tsetsáʼ', 'saŋ mejwoŋó', 'saŋ lùm'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/yy', + 'LL' => 'D MMM, YYYY', + 'LLL' => '[lyɛ]̌ʼ d [na] MMMM, YYYY HH:mm', + 'LLLL' => 'dddd , [lyɛ]̌ʼ d [na] MMMM, YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/no.php b/libraries/Carbon/src/Carbon/Lang/no.php new file mode 100644 index 00000000000..c06ed07d080 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/no.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Daniel S. Billing + * - Paul + * - Jimmie Johansson + * - Jens Herlevsen + */ +return array_replace_recursive(require __DIR__.'/nb.php', [ + 'formats' => [ + 'LLL' => 'D. MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D. MMMM YYYY [kl.] HH:mm', + ], + 'calendar' => [ + 'nextWeek' => 'på dddd [kl.] LT', + 'lastWeek' => '[i] dddd[s kl.] LT', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nr.php b/libraries/Carbon/src/Carbon/Lang/nr.php new file mode 100644 index 00000000000..b37dee54d05 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nr.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/nr_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nr_ZA.php b/libraries/Carbon/src/Carbon/Lang/nr_ZA.php new file mode 100644 index 00000000000..28d154a3b06 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nr_ZA.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Janabari', 'uFeberbari', 'uMatjhi', 'u-Apreli', 'Meyi', 'Juni', 'Julayi', 'Arhostosi', 'Septemba', 'Oktoba', 'Usinyikhaba', 'Disemba'], + 'months_short' => ['Jan', 'Feb', 'Mat', 'Apr', 'Mey', 'Jun', 'Jul', 'Arh', 'Sep', 'Okt', 'Usi', 'Dis'], + 'weekdays' => ['uSonto', 'uMvulo', 'uLesibili', 'lesithathu', 'uLesine', 'ngoLesihlanu', 'umGqibelo'], + 'weekdays_short' => ['Son', 'Mvu', 'Bil', 'Tha', 'Ne', 'Hla', 'Gqi'], + 'weekdays_min' => ['Son', 'Mvu', 'Bil', 'Tha', 'Ne', 'Hla', 'Gqi'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nso.php b/libraries/Carbon/src/Carbon/Lang/nso.php new file mode 100644 index 00000000000..c9315b5ca70 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nso.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/nso_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/nso_ZA.php b/libraries/Carbon/src/Carbon/Lang/nso_ZA.php new file mode 100644 index 00000000000..8157c58f33d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nso_ZA.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Janaware', 'Febereware', 'Matšhe', 'Aprele', 'Mei', 'June', 'Julae', 'Agostose', 'Setemere', 'Oktobere', 'Nofemere', 'Disemere'], + 'months_short' => ['Jan', 'Feb', 'Mat', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Set', 'Okt', 'Nof', 'Dis'], + 'weekdays' => ['LaMorena', 'Mošupologo', 'Labobedi', 'Laboraro', 'Labone', 'Labohlano', 'Mokibelo'], + 'weekdays_short' => ['Son', 'Moš', 'Bed', 'Rar', 'Ne', 'Hla', 'Mok'], + 'weekdays_min' => ['Son', 'Moš', 'Bed', 'Rar', 'Ne', 'Hla', 'Mok'], + 'day_of_first_week_of_year' => 1, + + 'year' => ':count ngwaga', + 'y' => ':count ngwaga', + 'a_year' => ':count ngwaga', + + 'month' => ':count Kgwedi', + 'm' => ':count Kgwedi', + 'a_month' => ':count Kgwedi', + + 'week' => ':count Beke', + 'w' => ':count Beke', + 'a_week' => ':count Beke', + + 'day' => ':count Letšatši', + 'd' => ':count Letšatši', + 'a_day' => ':count Letšatši', + + 'hour' => ':count Iri', + 'h' => ':count Iri', + 'a_hour' => ':count Iri', + + 'minute' => ':count Motsotso', + 'min' => ':count Motsotso', + 'a_minute' => ':count Motsotso', + + 'second' => ':count motsotswana', + 's' => ':count motsotswana', + 'a_second' => ':count motsotswana', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nus.php b/libraries/Carbon/src/Carbon/Lang/nus.php new file mode 100644 index 00000000000..f4ba3322b35 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nus.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['RW', 'TŊ'], + 'weekdays' => ['Cäŋ kuɔth', 'Jiec la̱t', 'Rɛw lätni', 'Diɔ̱k lätni', 'Ŋuaan lätni', 'Dhieec lätni', 'Bäkɛl lätni'], + 'weekdays_short' => ['Cäŋ', 'Jiec', 'Rɛw', 'Diɔ̱k', 'Ŋuaan', 'Dhieec', 'Bäkɛl'], + 'weekdays_min' => ['Cäŋ', 'Jiec', 'Rɛw', 'Diɔ̱k', 'Ŋuaan', 'Dhieec', 'Bäkɛl'], + 'months' => ['Tiop thar pɛt', 'Pɛt', 'Duɔ̱ɔ̱ŋ', 'Guak', 'Duät', 'Kornyoot', 'Pay yie̱tni', 'Tho̱o̱r', 'Tɛɛr', 'Laath', 'Kur', 'Tio̱p in di̱i̱t'], + 'months_short' => ['Tiop', 'Pɛt', 'Duɔ̱ɔ̱', 'Guak', 'Duä', 'Kor', 'Pay', 'Thoo', 'Tɛɛ', 'Laa', 'Kur', 'Tid'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd D MMMM YYYY h:mm a', + ], + + 'year' => ':count jiök', // less reliable + 'y' => ':count jiök', // less reliable + 'a_year' => ':count jiök', // less reliable + + 'month' => ':count pay', // less reliable + 'm' => ':count pay', // less reliable + 'a_month' => ':count pay', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/nyn.php b/libraries/Carbon/src/Carbon/Lang/nyn.php new file mode 100644 index 00000000000..25a2080fd63 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/nyn.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], + 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], + 'weekdays_min' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], + 'months' => ['Okwokubanza', 'Okwakabiri', 'Okwakashatu', 'Okwakana', 'Okwakataana', 'Okwamukaaga', 'Okwamushanju', 'Okwamunaana', 'Okwamwenda', 'Okwaikumi', 'Okwaikumi na kumwe', 'Okwaikumi na ibiri'], + 'months_short' => ['KBZ', 'KBR', 'KST', 'KKN', 'KTN', 'KMK', 'KMS', 'KMN', 'KMW', 'KKM', 'KNK', 'KNB'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/oc.php b/libraries/Carbon/src/Carbon/Lang/oc.php new file mode 100644 index 00000000000..99bde204bb7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/oc.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Quentí + */ +// @codeCoverageIgnoreStart +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { + PluralizationRules::set(static function ($number) { + return $number == 1 ? 0 : 1; + }, 'oc'); +} +// @codeCoverageIgnoreEnd + +return [ + 'year' => ':count an|:count ans', + 'a_year' => 'un an|:count ans', + 'y' => ':count an|:count ans', + 'month' => ':count mes|:count meses', + 'a_month' => 'un mes|:count meses', + 'm' => ':count mes|:count meses', + 'week' => ':count setmana|:count setmanas', + 'a_week' => 'una setmana|:count setmanas', + 'w' => ':count setmana|:count setmanas', + 'day' => ':count jorn|:count jorns', + 'a_day' => 'un jorn|:count jorns', + 'd' => ':count jorn|:count jorns', + 'hour' => ':count ora|:count oras', + 'a_hour' => 'una ora|:count oras', + 'h' => ':count ora|:count oras', + 'minute' => ':count minuta|:count minutas', + 'a_minute' => 'una minuta|:count minutas', + 'min' => ':count minuta|:count minutas', + 'second' => ':count segonda|:count segondas', + 'a_second' => 'una segonda|:count segondas', + 's' => ':count segonda|:count segondas', + 'ago' => 'fa :time', + 'from_now' => 'd\'aquí :time', + 'after' => ':time aprèp', + 'before' => ':time abans', + 'diff_now' => 'ara meteis', + 'diff_today' => 'Uèi', + 'diff_today_regexp' => 'Uèi(?:\\s+a)?', + 'diff_yesterday' => 'ièr', + 'diff_yesterday_regexp' => 'Ièr(?:\\s+a)?', + 'diff_tomorrow' => 'deman', + 'diff_tomorrow_regexp' => 'Deman(?:\\s+a)?', + 'diff_before_yesterday' => 'ièr delà', + 'diff_after_tomorrow' => 'deman passat', + 'period_recurrences' => ':count còp|:count còps', + 'period_interval' => 'cada :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'fins a :date', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM [de] YYYY', + 'LLL' => 'D MMMM [de] YYYY [a] H:mm', + 'LLLL' => 'dddd D MMMM [de] YYYY [a] H:mm', + ], + 'calendar' => [ + 'sameDay' => '[Uèi a] LT', + 'nextDay' => '[Deman a] LT', + 'nextWeek' => 'dddd [a] LT', + 'lastDay' => '[Ièr a] LT', + 'lastWeek' => 'dddd [passat a] LT', + 'sameElse' => 'L', + ], + 'months' => ['de genièr', 'de febrièr', 'de març', 'd\'abrial', 'de mai', 'de junh', 'de julhet', 'd\'agost', 'de setembre', 'd’octòbre', 'de novembre', 'de decembre'], + 'months_standalone' => ['genièr', 'febrièr', 'març', 'abrial', 'mai', 'junh', 'julh', 'agost', 'setembre', 'octòbre', 'novembre', 'decembre'], + 'months_short' => ['gen.', 'feb.', 'març', 'abr.', 'mai', 'junh', 'julh', 'ago.', 'sep.', 'oct.', 'nov.', 'dec.'], + 'weekdays' => ['dimenge', 'diluns', 'dimars', 'dimècres', 'dijòus', 'divendres', 'dissabte'], + 'weekdays_short' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'], + 'weekdays_min' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'], + 'ordinal' => function ($number, string $period = '') { + $ordinal = [1 => 'èr', 2 => 'nd'][(int) $number] ?? 'en'; + + // feminine for year, week, hour, minute, second + if (preg_match('/^[yYwWhHgGis]$/', $period)) { + $ordinal .= 'a'; + } + + return $number.$ordinal; + }, + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' e '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/oc_FR.php b/libraries/Carbon/src/Carbon/Lang/oc_FR.php new file mode 100644 index 00000000000..8e2cc9a58d2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/oc_FR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/oc.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/om.php b/libraries/Carbon/src/Carbon/Lang/om.php new file mode 100644 index 00000000000..3cabe5e38c3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/om.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation & Sagalee Oromoo Publishing Co. Inc. locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'dd-MMM-YYYY', + 'LLL' => 'dd MMMM YYYY HH:mm', + 'LLLL' => 'dddd, MMMM D, YYYY HH:mm', + ], + 'months' => ['Amajjii', 'Guraandhala', 'Bitooteessa', 'Elba', 'Caamsa', 'Waxabajjii', 'Adooleessa', 'Hagayya', 'Fuulbana', 'Onkololeessa', 'Sadaasa', 'Muddee'], + 'months_short' => ['Ama', 'Gur', 'Bit', 'Elb', 'Cam', 'Wax', 'Ado', 'Hag', 'Ful', 'Onk', 'Sad', 'Mud'], + 'weekdays' => ['Dilbata', 'Wiixata', 'Qibxata', 'Roobii', 'Kamiisa', 'Jimaata', 'Sanbata'], + 'weekdays_short' => ['Dil', 'Wix', 'Qib', 'Rob', 'Kam', 'Jim', 'San'], + 'weekdays_min' => ['Dil', 'Wix', 'Qib', 'Rob', 'Kam', 'Jim', 'San'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['WD', 'WB'], + + 'year' => 'wggoota :count', + 'y' => 'wggoota :count', + 'a_year' => 'wggoota :count', + + 'month' => 'ji’a :count', + 'm' => 'ji’a :count', + 'a_month' => 'ji’a :count', + + 'week' => 'torban :count', + 'w' => 'torban :count', + 'a_week' => 'torban :count', + + 'day' => 'guyyaa :count', + 'd' => 'guyyaa :count', + 'a_day' => 'guyyaa :count', + + 'hour' => 'saʼaatii :count', + 'h' => 'saʼaatii :count', + 'a_hour' => 'saʼaatii :count', + + 'minute' => 'daqiiqaa :count', + 'min' => 'daqiiqaa :count', + 'a_minute' => 'daqiiqaa :count', + + 'second' => 'sekoondii :count', + 's' => 'sekoondii :count', + 'a_second' => 'sekoondii :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/om_ET.php b/libraries/Carbon/src/Carbon/Lang/om_ET.php new file mode 100644 index 00000000000..c19acb405d8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/om_ET.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/om.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/om_KE.php b/libraries/Carbon/src/Carbon/Lang/om_KE.php new file mode 100644 index 00000000000..ac0bcf49eb0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/om_KE.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/om.php', [ + 'day_of_first_week_of_year' => 0, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/or.php b/libraries/Carbon/src/Carbon/Lang/or.php new file mode 100644 index 00000000000..4bd08c017ac --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/or.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/or_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/or_IN.php b/libraries/Carbon/src/Carbon/Lang/or_IN.php new file mode 100644 index 00000000000..f634cfb6c31 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/or_IN.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM AP Linux Technology Center, Yamato Software Laboratory bug-glibc@gnu.org + */ +return [ + 'diff_now' => 'ବର୍ତ୍ତମାନ', + 'diff_yesterday' => 'ଗତକାଲି', + 'diff_tomorrow' => 'ଆସନ୍ତାକାଲି', + 'formats' => [ + 'LT' => 'Oh:Om A', + 'LTS' => 'Oh:Om:Os A', + 'L' => 'OD-OM-OY', + 'LL' => 'OD MMMM OY', + 'LLL' => 'OD MMMM OY Oh:Om A', + 'LLLL' => 'dddd OD MMMM OY Oh:Om A', + ], + 'months' => ['ଜାନୁଆରୀ', 'ଫେବୃଆରୀ', 'ମାର୍ଚ୍ଚ', 'ଅପ୍ରେଲ', 'ମଇ', 'ଜୁନ', 'ଜୁଲାଇ', 'ଅଗଷ୍ଟ', 'ସେପ୍ଟେମ୍ବର', 'ଅକ୍ଟୋବର', 'ନଭେମ୍ବର', 'ଡିସେମ୍ବର'], + 'months_short' => ['ଜାନୁଆରୀ', 'ଫେବୃଆରୀ', 'ମାର୍ଚ୍ଚ', 'ଅପ୍ରେଲ', 'ମଇ', 'ଜୁନ', 'ଜୁଲାଇ', 'ଅଗଷ୍ଟ', 'ସେପ୍ଟେମ୍ବର', 'ଅକ୍ଟୋବର', 'ନଭେମ୍ବର', 'ଡିସେମ୍ବର'], + 'weekdays' => ['ରବିବାର', 'ସୋମବାର', 'ମଙ୍ଗଳବାର', 'ବୁଧବାର', 'ଗୁରୁବାର', 'ଶୁକ୍ରବାର', 'ଶନିବାର'], + 'weekdays_short' => ['ରବି', 'ସୋମ', 'ମଙ୍ଗଳ', 'ବୁଧ', 'ଗୁରୁ', 'ଶୁକ୍ର', 'ଶନି'], + 'weekdays_min' => ['ରବି', 'ସୋମ', 'ମଙ୍ଗଳ', 'ବୁଧ', 'ଗୁରୁ', 'ଶୁକ୍ର', 'ଶନି'], + 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['୦', '୧', '୨', '୩', '୪', '୫', '୬', '୭', '୮', '୯', '୧୦', '୧୧', '୧୨', '୧୩', '୧୪', '୧୫', '୧୬', '୧୭', '୧୮', '୧୯', '୨୦', '୨୧', '୨୨', '୨୩', '୨୪', '୨୫', '୨୬', '୨୭', '୨୮', '୨୯', '୩୦', '୩୧', '୩୨', '୩୩', '୩୪', '୩୫', '୩୬', '୩୭', '୩୮', '୩୯', '୪୦', '୪୧', '୪୨', '୪୩', '୪୪', '୪୫', '୪୬', '୪୭', '୪୮', '୪୯', '୫୦', '୫୧', '୫୨', '୫୩', '୫୪', '୫୫', '୫୬', '୫୭', '୫୮', '୫୯', '୬୦', '୬୧', '୬୨', '୬୩', '୬୪', '୬୫', '୬୬', '୬୭', '୬୮', '୬୯', '୭୦', '୭୧', '୭୨', '୭୩', '୭୪', '୭୫', '୭୬', '୭୭', '୭୮', '୭୯', '୮୦', '୮୧', '୮୨', '୮୩', '୮୪', '୮୫', '୮୬', '୮୭', '୮୮', '୮୯', '୯୦', '୯୧', '୯୨', '୯୩', '୯୪', '୯୫', '୯୬', '୯୭', '୯୮', '୯୯'], + 'year' => ':count ବର୍ଷ', + 'y' => ':count ବ.', + 'month' => ':count ମାସ', + 'm' => ':count ମା.', + 'week' => ':count ସପ୍ତାହ', + 'w' => ':count ସପ୍ତା.', + 'day' => ':count ଦିନ', + 'd' => ':count ଦିନ', + 'hour' => ':count ଘଣ୍ତ', + 'h' => ':count ଘ.', + 'minute' => ':count ମିନଟ', + 'min' => ':count ମି.', + 'second' => ':count ସେକଣ୍ଢ', + 's' => ':count ସେ.', + 'ago' => ':time ପୂର୍ବେ', + 'from_now' => ':timeରେ', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/os.php b/libraries/Carbon/src/Carbon/Lang/os.php new file mode 100644 index 00000000000..9907f63fc7b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/os.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/os_RU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/os_RU.php b/libraries/Carbon/src/Carbon/Lang/os_RU.php new file mode 100644 index 00000000000..aa63edb3715 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/os_RU.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['январы', 'февралы', 'мартъийы', 'апрелы', 'майы', 'июны', 'июлы', 'августы', 'сентябры', 'октябры', 'ноябры', 'декабры'], + 'months_short' => ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], + 'weekdays' => ['Хуыцаубон', 'Къуырисæр', 'Дыццæг', 'Æртыццæг', 'Цыппæрæм', 'Майрæмбон', 'Сабат'], + 'weekdays_short' => ['Хцб', 'Крс', 'Дцг', 'Æрт', 'Цпр', 'Мрб', 'Сбт'], + 'weekdays_min' => ['Хцб', 'Крс', 'Дцг', 'Æрт', 'Цпр', 'Мрб', 'Сбт'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'minute' => ':count гыццыл', // less reliable + 'min' => ':count гыццыл', // less reliable + 'a_minute' => ':count гыццыл', // less reliable + + 'second' => ':count æндæр', // less reliable + 's' => ':count æндæр', // less reliable + 'a_second' => ':count æндæр', // less reliable + + 'year' => ':count аз', + 'y' => ':count аз', + 'a_year' => ':count аз', + + 'month' => ':count мӕй', + 'm' => ':count мӕй', + 'a_month' => ':count мӕй', + + 'week' => ':count къуыри', + 'w' => ':count къуыри', + 'a_week' => ':count къуыри', + + 'day' => ':count бон', + 'd' => ':count бон', + 'a_day' => ':count бон', + + 'hour' => ':count сахат', + 'h' => ':count сахат', + 'a_hour' => ':count сахат', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pa.php b/libraries/Carbon/src/Carbon/Lang/pa.php new file mode 100644 index 00000000000..9dfd9b41655 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pa.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Tsutomu Kuroda + * - Punjab + */ +return [ + 'year' => 'ਇੱਕ ਸਾਲ|:count ਸਾਲ', + 'month' => 'ਇੱਕ ਮਹੀਨਾ|:count ਮਹੀਨੇ', + 'week' => 'ਹਫਤਾ|:count ਹਫ਼ਤੇ', + 'day' => 'ਇੱਕ ਦਿਨ|:count ਦਿਨ', + 'hour' => 'ਇੱਕ ਘੰਟਾ|:count ਘੰਟੇ', + 'minute' => 'ਇਕ ਮਿੰਟ|:count ਮਿੰਟ', + 'second' => 'ਕੁਝ ਸਕਿੰਟ|:count ਸਕਿੰਟ', + 'ago' => ':time ਪਹਿਲਾਂ', + 'from_now' => ':time ਵਿੱਚ', + 'before' => ':time ਤੋਂ ਪਹਿਲਾਂ', + 'after' => ':time ਤੋਂ ਬਾਅਦ', + 'diff_now' => 'ਹੁਣ', + 'diff_today' => 'ਅਜ', + 'diff_yesterday' => 'ਕਲ', + 'diff_tomorrow' => 'ਕਲ', + 'formats' => [ + 'LT' => 'A h:mm ਵਜੇ', + 'LTS' => 'A h:mm:ss ਵਜੇ', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm ਵਜੇ', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm ਵਜੇ', + ], + 'calendar' => [ + 'sameDay' => '[ਅਜ] LT', + 'nextDay' => '[ਕਲ] LT', + 'nextWeek' => '[ਅਗਲਾ] dddd, LT', + 'lastDay' => '[ਕਲ] LT', + 'lastWeek' => '[ਪਿਛਲੇ] dddd, LT', + 'sameElse' => 'L', + ], + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'ਰਾਤ'; + } + if ($hour < 10) { + return 'ਸਵੇਰ'; + } + if ($hour < 17) { + return 'ਦੁਪਹਿਰ'; + } + if ($hour < 20) { + return 'ਸ਼ਾਮ'; + } + + return 'ਰਾਤ'; + }, + 'months' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], + 'months_short' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], + 'weekdays' => ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨੀਚਰਵਾਰ'], + 'weekdays_short' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'], + 'weekdays_min' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' ਅਤੇ '], + 'weekend' => [0, 0], + 'alt_numbers' => ['੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/pa_Arab.php b/libraries/Carbon/src/Carbon/Lang/pa_Arab.php new file mode 100644 index 00000000000..54d4c7b4d4e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pa_Arab.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ur.php', [ + 'weekdays' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], + 'weekdays_short' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], + 'weekdays_min' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], + 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئ', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئ', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd, DD MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pa_Guru.php b/libraries/Carbon/src/Carbon/Lang/pa_Guru.php new file mode 100644 index 00000000000..fc771f5dcb3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pa_Guru.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/pa.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D/M/yy', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY, h:mm a', + 'LLLL' => 'dddd, D MMMM YYYY, h:mm a', + ], + 'months' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], + 'months_short' => ['ਜਨ', 'ਫ਼ਰ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾ', 'ਅਗ', 'ਸਤੰ', 'ਅਕਤੂ', 'ਨਵੰ', 'ਦਸੰ'], + 'weekdays' => ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁੱਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨਿੱਚਰਵਾਰ'], + 'weekdays_short' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁੱਧ', 'ਵੀਰ', 'ਸ਼ੁੱਕਰ', 'ਸ਼ਨਿੱਚਰ'], + 'weekdays_min' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗ', 'ਬੁੱਧ', 'ਵੀਰ', 'ਸ਼ੁੱਕ', 'ਸ਼ਨਿੱ'], + 'weekend' => [0, 0], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pa_IN.php b/libraries/Carbon/src/Carbon/Lang/pa_IN.php new file mode 100644 index 00000000000..fe84a04f716 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pa_IN.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Guo Xiang Tan + * - Josh Soref + * - Ash + * - harpreetkhalsagtbit + */ +return require __DIR__.'/pa.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pa_PK.php b/libraries/Carbon/src/Carbon/Lang/pa_PK.php new file mode 100644 index 00000000000..e5c8abdfe3e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pa_PK.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['جنوري', 'فروري', 'مارچ', 'اپريل', 'مٓی', 'جون', 'جولاي', 'اگست', 'ستمبر', 'اكتوبر', 'نومبر', 'دسمبر'], + 'months_short' => ['جنوري', 'فروري', 'مارچ', 'اپريل', 'مٓی', 'جون', 'جولاي', 'اگست', 'ستمبر', 'اكتوبر', 'نومبر', 'دسمبر'], + 'weekdays' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], + 'weekdays_short' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], + 'weekdays_min' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ص', 'ش'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pap.php b/libraries/Carbon/src/Carbon/Lang/pap.php new file mode 100644 index 00000000000..5a28460d0cd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pap.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return [ + 'formats' => [ + 'LT' => 'HH.mm', + 'LTS' => 'HH.mm:ss', + 'L' => 'DD-MM-YY', + 'LL' => 'MMMM [di] DD, YYYY', + 'LLL' => 'DD MMM HH.mm', + 'LLLL' => 'MMMM DD, YYYY HH.mm', + ], + 'months' => ['yanüari', 'febrüari', 'mart', 'aprel', 'mei', 'yüni', 'yüli', 'ougùstùs', 'sèptèmber', 'oktober', 'novèmber', 'desèmber'], + 'months_short' => ['yan', 'feb', 'mar', 'apr', 'mei', 'yün', 'yül', 'oug', 'sèp', 'okt', 'nov', 'des'], + 'weekdays' => ['djadomingo', 'djaluna', 'djamars', 'djawebs', 'djarason', 'djabierne', 'djasabra'], + 'weekdays_short' => ['do', 'lu', 'ma', 'we', 'ra', 'bi', 'sa'], + 'weekdays_min' => ['do', 'lu', 'ma', 'we', 'ra', 'bi', 'sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'year' => ':count aña', + 'month' => ':count luna', + 'week' => ':count siman', + 'day' => ':count dia', + 'hour' => ':count ora', + 'minute' => ':count minüt', + 'second' => ':count sekònde', + 'list' => [', ', ' i '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/pap_AW.php b/libraries/Carbon/src/Carbon/Lang/pap_AW.php new file mode 100644 index 00000000000..154519be4a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pap_AW.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - information from native speaker Pablo Saratxaga pablo@mandrakesoft.com + */ +return require __DIR__.'/pap.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pap_CW.php b/libraries/Carbon/src/Carbon/Lang/pap_CW.php new file mode 100644 index 00000000000..154519be4a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pap_CW.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - information from native speaker Pablo Saratxaga pablo@mandrakesoft.com + */ +return require __DIR__.'/pap.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pl.php b/libraries/Carbon/src/Carbon/Lang/pl.php new file mode 100644 index 00000000000..efa6b8233fd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pl.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Wacław Jacek + * - François B + * - Tim Fish + * - Serhan Apaydın + * - Massimiliano Caniparoli + * - JD Isaacks + * - Jakub Szwacz + * - Jan + * - Paul + * - damlys + * - Marek (marast78) + * - Peter (UnrulyNatives) + * - Qrzysio + * - Jan (aso824) + * - diverpl + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count rok|:count lata|:count lat', + 'a_year' => 'rok|:count lata|:count lat', + 'y' => ':count r|:count l|:count l', + 'month' => ':count miesiąc|:count miesiące|:count miesięcy', + 'a_month' => 'miesiąc|:count miesiące|:count miesięcy', + 'm' => ':count mies.', + 'week' => ':count tydzień|:count tygodnie|:count tygodni', + 'a_week' => 'tydzień|:count tygodnie|:count tygodni', + 'w' => ':count tyg.', + 'day' => ':count dzień|:count dni|:count dni', + 'a_day' => 'dzień|:count dni|:count dni', + 'd' => ':count d', + 'hour' => ':count godzina|:count godziny|:count godzin', + 'a_hour' => 'godzina|:count godziny|:count godzin', + 'h' => ':count godz.', + 'minute' => ':count minuta|:count minuty|:count minut', + 'a_minute' => 'minuta|:count minuty|:count minut', + 'min' => ':count min', + 'second' => ':count sekunda|:count sekundy|:count sekund', + 'a_second' => '{1}kilka sekund|:count sekunda|:count sekundy|:count sekund', + 's' => ':count sek.', + 'ago' => ':time temu', + 'from_now' => static function ($time) { + return 'za '.strtr($time, [ + 'godzina' => 'godzinę', + 'minuta' => 'minutę', + 'sekunda' => 'sekundę', + ]); + }, + 'after' => ':time po', + 'before' => ':time przed', + 'diff_now' => 'teraz', + 'diff_today' => 'Dziś', + 'diff_today_regexp' => 'Dziś(?:\\s+o)?', + 'diff_yesterday' => 'wczoraj', + 'diff_yesterday_regexp' => 'Wczoraj(?:\\s+o)?', + 'diff_tomorrow' => 'jutro', + 'diff_tomorrow_regexp' => 'Jutro(?:\\s+o)?', + 'diff_before_yesterday' => 'przedwczoraj', + 'diff_after_tomorrow' => 'pojutrze', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Dziś o] LT', + 'nextDay' => '[Jutro o] LT', + 'nextWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[W niedzielę o] LT'; + case 2: + return '[We wtorek o] LT'; + case 3: + return '[W środę o] LT'; + case 6: + return '[W sobotę o] LT'; + default: + return '[W] dddd [o] LT'; + } + }, + 'lastDay' => '[Wczoraj o] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia'], + 'months_standalone' => ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'], + 'months_short' => ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'], + 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'], + 'weekdays_short' => ['ndz', 'pon', 'wt', 'śr', 'czw', 'pt', 'sob'], + 'weekdays_min' => ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' i '], + 'meridiem' => ['przed południem', 'po południu'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/pl_PL.php b/libraries/Carbon/src/Carbon/Lang/pl_PL.php new file mode 100644 index 00000000000..c12bfd2193a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pl_PL.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/prg.php b/libraries/Carbon/src/Carbon/Lang/prg.php new file mode 100644 index 00000000000..b9b4300499c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/prg.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], + 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'YYYY MMMM D, dddd HH:mm', + ], + + 'year' => ':count meta', + 'y' => ':count meta', + 'a_year' => ':count meta', + + 'month' => ':count mēniks', // less reliable + 'm' => ':count mēniks', // less reliable + 'a_month' => ':count mēniks', // less reliable + + 'week' => ':count sawaītin', // less reliable + 'w' => ':count sawaītin', // less reliable + 'a_week' => ':count sawaītin', // less reliable + + 'day' => ':count di', + 'd' => ':count di', + 'a_day' => ':count di', + + 'hour' => ':count bruktēt', // less reliable + 'h' => ':count bruktēt', // less reliable + 'a_hour' => ':count bruktēt', // less reliable + + 'minute' => ':count līkuts', // less reliable + 'min' => ':count līkuts', // less reliable + 'a_minute' => ':count līkuts', // less reliable + + 'second' => ':count kitan', // less reliable + 's' => ':count kitan', // less reliable + 'a_second' => ':count kitan', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ps.php b/libraries/Carbon/src/Carbon/Lang/ps.php new file mode 100644 index 00000000000..6a805d97c94 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ps.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Muhammad Nasir Rahimi + * - Nassim Nasibullah (spinzar) + */ +return [ + 'year' => ':count کال|:count کاله', + 'y' => ':countکال|:countکاله', + 'month' => ':count مياشت|:count مياشتي', + 'm' => ':countمياشت|:countمياشتي', + 'week' => ':count اونۍ|:count اونۍ', + 'w' => ':countاونۍ|:countاونۍ', + 'day' => ':count ورځ|:count ورځي', + 'd' => ':countورځ|:countورځي', + 'hour' => ':count ساعت|:count ساعته', + 'h' => ':countساعت|:countساعته', + 'minute' => ':count دقيقه|:count دقيقې', + 'min' => ':countدقيقه|:countدقيقې', + 'second' => ':count ثانيه|:count ثانيې', + 's' => ':countثانيه|:countثانيې', + 'ago' => ':time دمخه', + 'from_now' => ':time له اوس څخه', + 'after' => ':time وروسته', + 'before' => ':time دمخه', + 'list' => ['، ', ' او '], + 'meridiem' => ['غ.م.', 'غ.و.'], + 'weekdays' => ['اتوار', 'ګل', 'نهه', 'شورو', 'زيارت', 'جمعه', 'خالي'], + 'weekdays_short' => ['ا', 'ګ', 'ن', 'ش', 'ز', 'ج', 'خ'], + 'weekdays_min' => ['ا', 'ګ', 'ن', 'ش', 'ز', 'ج', 'خ'], + 'months' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سېپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'months_short' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سېپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'months_standalone' => ['جنوري', 'فېبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'months_short_standalone' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'first_day_of_week' => 6, + 'weekend' => [4, 5], + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'YYYY/M/d', + 'LL' => 'YYYY MMM D', + 'LLL' => 'د YYYY د MMMM D H:mm', + 'LLLL' => 'dddd د YYYY د MMMM D H:mm', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ps_AF.php b/libraries/Carbon/src/Carbon/Lang/ps_AF.php new file mode 100644 index 00000000000..456d7416925 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ps_AF.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ps.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt.php b/libraries/Carbon/src/Carbon/Lang/pt.php new file mode 100644 index 00000000000..f0624d4721b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Cassiano Montanari + * - Matt Pope + * - François B + * - Prodis + * - JD Isaacks + * - Raphael Amorim + * - João Magalhães + * - victortobias + * - Paulo Freitas + * - Sebastian Thierer + * - Claudson Martins (claudsonm) + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count ano|:count anos', + 'a_year' => 'um ano|:count anos', + 'y' => ':counta', + 'month' => ':count mês|:count meses', + 'a_month' => 'um mês|:count meses', + 'm' => ':countm', + 'week' => ':count semana|:count semanas', + 'a_week' => 'uma semana|:count semanas', + 'w' => ':countsem', + 'day' => ':count dia|:count dias', + 'a_day' => 'um dia|:count dias', + 'd' => ':countd', + 'hour' => ':count hora|:count horas', + 'a_hour' => 'uma hora|:count horas', + 'h' => ':counth', + 'minute' => ':count minuto|:count minutos', + 'a_minute' => 'um minuto|:count minutos', + 'min' => ':countmin', + 'second' => ':count segundo|:count segundos', + 'a_second' => 'alguns segundos|:count segundos', + 's' => ':counts', + 'millisecond' => ':count milissegundo|:count milissegundos', + 'a_millisecond' => 'um milissegundo|:count milissegundos', + 'ms' => ':countms', + 'microsecond' => ':count microssegundo|:count microssegundos', + 'a_microsecond' => 'um microssegundo|:count microssegundos', + 'µs' => ':countµs', + 'ago' => 'há :time', + 'from_now' => 'em :time', + 'after' => ':time depois', + 'before' => ':time antes', + 'diff_now' => 'agora', + 'diff_today' => 'Hoje', + 'diff_today_regexp' => 'Hoje(?:\\s+às)?', + 'diff_yesterday' => 'ontem', + 'diff_yesterday_regexp' => 'Ontem(?:\\s+às)?', + 'diff_tomorrow' => 'amanhã', + 'diff_tomorrow_regexp' => 'Amanhã(?:\\s+às)?', + 'diff_before_yesterday' => 'anteontem', + 'diff_after_tomorrow' => 'depois de amanhã', + 'period_recurrences' => 'uma vez|:count vezes', + 'period_interval' => 'cada :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'até :date', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D [de] MMMM [de] YYYY', + 'LLL' => 'D [de] MMMM [de] YYYY HH:mm', + 'LLLL' => 'dddd, D [de] MMMM [de] YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Hoje às] LT', + 'nextDay' => '[Amanhã às] LT', + 'nextWeek' => 'dddd [às] LT', + 'lastDay' => '[Ontem às] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + case 6: + return '[Último] dddd [às] LT'; + default: + return '[Última] dddd [às] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':numberº', + 'months' => ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'], + 'months_short' => ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'], + 'weekdays' => ['domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado'], + 'weekdays_short' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], + 'weekdays_min' => ['Do', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sá'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' e '], + 'ordinal_words' => [ + 'of' => 'de', + 'first' => 'primeira', + 'second' => 'segunda', + 'third' => 'terceira', + 'fourth' => 'quarta', + 'fifth' => 'quinta', + 'last' => 'última', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_AO.php b/libraries/Carbon/src/Carbon/Lang/pt_AO.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_AO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_BR.php b/libraries/Carbon/src/Carbon/Lang/pt_BR.php new file mode 100644 index 00000000000..eeccee8fb1d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_BR.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Cassiano Montanari + * - Eduardo Dalla Vecchia + * - David Rodrigues + * - Matt Pope + * - François B + * - Prodis + * - Marlon Maxwel + * - JD Isaacks + * - Raphael Amorim + * - Rafael Raupp + * - felipeleite1 + * - swalker + * - Lucas Macedo + * - Paulo Freitas + * - Sebastian Thierer + */ +return array_replace_recursive(require __DIR__.'/pt.php', [ + 'period_recurrences' => 'uma|:count vez', + 'period_interval' => 'toda :interval', + 'formats' => [ + 'LLL' => 'D [de] MMMM [de] YYYY [às] HH:mm', + 'LLLL' => 'dddd, D [de] MMMM [de] YYYY [às] HH:mm', + ], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pt_CH.php b/libraries/Carbon/src/Carbon/Lang/pt_CH.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_CH.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_CV.php b/libraries/Carbon/src/Carbon/Lang/pt_CV.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_CV.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_GQ.php b/libraries/Carbon/src/Carbon/Lang/pt_GQ.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_GQ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_GW.php b/libraries/Carbon/src/Carbon/Lang/pt_GW.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_GW.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_LU.php b/libraries/Carbon/src/Carbon/Lang/pt_LU.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_LU.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_MO.php b/libraries/Carbon/src/Carbon/Lang/pt_MO.php new file mode 100644 index 00000000000..e24db30ac06 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_MO.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/pt.php', [ + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'LLL' => 'D [de] MMMM [de] YYYY, h:mm a', + 'LLLL' => 'dddd, D [de] MMMM [de] YYYY, h:mm a', + ], + 'first_day_of_week' => 0, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pt_MZ.php b/libraries/Carbon/src/Carbon/Lang/pt_MZ.php new file mode 100644 index 00000000000..8963e80f68b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_MZ.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/pt.php', [ + 'first_day_of_week' => 0, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pt_PT.php b/libraries/Carbon/src/Carbon/Lang/pt_PT.php new file mode 100644 index 00000000000..ff7b9cf44ec --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_PT.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RAP bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/pt.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'], + 'months_short' => ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'], + 'weekdays' => ['domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado'], + 'weekdays_short' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], + 'weekdays_min' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/pt_ST.php b/libraries/Carbon/src/Carbon/Lang/pt_ST.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_ST.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/pt_TL.php b/libraries/Carbon/src/Carbon/Lang/pt_TL.php new file mode 100644 index 00000000000..4027d896f3a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/pt_TL.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/pt.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/qu.php b/libraries/Carbon/src/Carbon/Lang/qu.php new file mode 100644 index 00000000000..6cf77c72f09 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/qu.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/es_UY.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM, YYYY HH:mm', + ], + 'first_day_of_week' => 0, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/qu_BO.php b/libraries/Carbon/src/Carbon/Lang/qu_BO.php new file mode 100644 index 00000000000..09b4dce4728 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/qu_BO.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/qu.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/qu_EC.php b/libraries/Carbon/src/Carbon/Lang/qu_EC.php new file mode 100644 index 00000000000..09b4dce4728 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/qu_EC.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/qu.php', [ + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/quz.php b/libraries/Carbon/src/Carbon/Lang/quz.php new file mode 100644 index 00000000000..baedc42a650 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/quz.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/quz_PE.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/quz_PE.php b/libraries/Carbon/src/Carbon/Lang/quz_PE.php new file mode 100644 index 00000000000..2aba9397395 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/quz_PE.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['iniru', 'phiwriru', 'marsu', 'awril', 'mayu', 'huniyu', 'huliyu', 'agustu', 'siptiyimri', 'uktuwri', 'nuwiyimri', 'tisiyimri'], + 'months_short' => ['ini', 'phi', 'mar', 'awr', 'may', 'hun', 'hul', 'agu', 'sip', 'ukt', 'nuw', 'tis'], + 'weekdays' => ['tuminku', 'lunis', 'martis', 'miyirkulis', 'juywis', 'wiyirnis', 'sawatu'], + 'weekdays_short' => ['tum', 'lun', 'mar', 'miy', 'juy', 'wiy', 'saw'], + 'weekdays_min' => ['tum', 'lun', 'mar', 'miy', 'juy', 'wiy', 'saw'], + 'day_of_first_week_of_year' => 1, + + 'minute' => ':count uchuy', // less reliable + 'min' => ':count uchuy', // less reliable + 'a_minute' => ':count uchuy', // less reliable + + 'year' => ':count wata', + 'y' => ':count wata', + 'a_year' => ':count wata', + + 'month' => ':count killa', + 'm' => ':count killa', + 'a_month' => ':count killa', + + 'week' => ':count simana', + 'w' => ':count simana', + 'a_week' => ':count simana', + + 'day' => ':count pʼunchaw', + 'd' => ':count pʼunchaw', + 'a_day' => ':count pʼunchaw', + + 'hour' => ':count ura', + 'h' => ':count ura', + 'a_hour' => ':count ura', + + 'second' => ':count iskay ñiqin', + 's' => ':count iskay ñiqin', + 'a_second' => ':count iskay ñiqin', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/raj.php b/libraries/Carbon/src/Carbon/Lang/raj.php new file mode 100644 index 00000000000..0d1aac0c09f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/raj.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/raj_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/raj_IN.php b/libraries/Carbon/src/Carbon/Lang/raj_IN.php new file mode 100644 index 00000000000..99f909079e2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/raj_IN.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - meghrajsuthar03@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर'], + 'months_short' => ['जन', 'फर', 'मार्च', 'अप्रै', 'मई', 'जून', 'जुल', 'अग', 'सित', 'अक्टू', 'नव', 'दिस'], + 'weekdays' => ['रविवार', 'सोमवार', 'मंगल्लवार', 'बुधवार', 'बृहस्पतिवार', 'शुक्रवार', 'शनिवार'], + 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], + 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], + + 'year' => ':count आंहू', // less reliable + 'y' => ':count आंहू', // less reliable + 'a_year' => ':count आंहू', // less reliable + + 'month' => ':count सूरज', // less reliable + 'm' => ':count सूरज', // less reliable + 'a_month' => ':count सूरज', // less reliable + + 'week' => ':count निवाज', // less reliable + 'w' => ':count निवाज', // less reliable + 'a_week' => ':count निवाज', // less reliable + + 'day' => ':count अेक', // less reliable + 'd' => ':count अेक', // less reliable + 'a_day' => ':count अेक', // less reliable + + 'hour' => ':count दुनियांण', // less reliable + 'h' => ':count दुनियांण', // less reliable + 'a_hour' => ':count दुनियांण', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/rm.php b/libraries/Carbon/src/Carbon/Lang/rm.php new file mode 100644 index 00000000000..68b10049b59 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/rm.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - tjku + * - Max Melentiev + * - Juanito Fatas + * - Tsutomu Kuroda + * - Akira Matsuda + * - Christopher Dell + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Nicolás Hock Isaza + * - sebastian de castelberg + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'Do MMMM YYYY', + 'LLL' => 'Do MMMM, HH:mm [Uhr]', + 'LLLL' => 'dddd, Do MMMM YYYY, HH:mm [Uhr]', + ], + 'year' => ':count onn|:count onns', + 'month' => ':count mais', + 'week' => ':count emna|:count emnas', + 'day' => ':count di|:count dis', + 'hour' => ':count oura|:count ouras', + 'minute' => ':count minuta|:count minutas', + 'second' => ':count secunda|:count secundas', + 'weekdays' => ['dumengia', 'glindesdi', 'mardi', 'mesemna', 'gievgia', 'venderdi', 'sonda'], + 'weekdays_short' => ['du', 'gli', 'ma', 'me', 'gie', 've', 'so'], + 'weekdays_min' => ['du', 'gli', 'ma', 'me', 'gie', 've', 'so'], + 'months' => ['schaner', 'favrer', 'mars', 'avrigl', 'matg', 'zercladur', 'fanadur', 'avust', 'settember', 'october', 'november', 'december'], + 'months_short' => ['schan', 'favr', 'mars', 'avr', 'matg', 'zercl', 'fan', 'avust', 'sett', 'oct', 'nov', 'dec'], + 'meridiem' => ['avantmezdi', 'suentermezdi'], + 'list' => [', ', ' e '], + 'first_day_of_week' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/rn.php b/libraries/Carbon/src/Carbon/Lang/rn.php new file mode 100644 index 00000000000..a715ff69ffd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/rn.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Z.MU.', 'Z.MW.'], + 'weekdays' => ['Ku w’indwi', 'Ku wa mbere', 'Ku wa kabiri', 'Ku wa gatatu', 'Ku wa kane', 'Ku wa gatanu', 'Ku wa gatandatu'], + 'weekdays_short' => ['cu.', 'mbe.', 'kab.', 'gtu.', 'kan.', 'gnu.', 'gnd.'], + 'weekdays_min' => ['cu.', 'mbe.', 'kab.', 'gtu.', 'kan.', 'gnu.', 'gnd.'], + 'months' => ['Nzero', 'Ruhuhuma', 'Ntwarante', 'Ndamukiza', 'Rusama', 'Ruheshi', 'Mukakaro', 'Nyandagaro', 'Nyakanga', 'Gitugutu', 'Munyonyo', 'Kigarama'], + 'months_short' => ['Mut.', 'Gas.', 'Wer.', 'Mat.', 'Gic.', 'Kam.', 'Nya.', 'Kan.', 'Nze.', 'Ukw.', 'Ugu.', 'Uku.'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'year' => 'imyaka :count', + 'y' => 'imyaka :count', + 'a_year' => 'imyaka :count', + + 'month' => 'amezi :count', + 'm' => 'amezi :count', + 'a_month' => 'amezi :count', + + 'week' => 'indwi :count', + 'w' => 'indwi :count', + 'a_week' => 'indwi :count', + + 'day' => 'imisi :count', + 'd' => 'imisi :count', + 'a_day' => 'imisi :count', + + 'hour' => 'amasaha :count', + 'h' => 'amasaha :count', + 'a_hour' => 'amasaha :count', + + 'minute' => 'iminuta :count', + 'min' => 'iminuta :count', + 'a_minute' => 'iminuta :count', + + 'second' => 'inguvu :count', // less reliable + 's' => 'inguvu :count', // less reliable + 'a_second' => 'inguvu :count', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ro.php b/libraries/Carbon/src/Carbon/Lang/ro.php new file mode 100644 index 00000000000..9844837ebde --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ro.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - JD Isaacks + * - Cătălin Georgescu + * - Valentin Ivaşcu (oriceon) + */ +return [ + 'year' => ':count an|:count ani|:count ani', + 'a_year' => 'un an|:count ani|:count ani', + 'y' => ':count a.', + 'month' => ':count lună|:count luni|:count luni', + 'a_month' => 'o lună|:count luni|:count luni', + 'm' => ':count l.', + 'week' => ':count săptămână|:count săptămâni|:count săptămâni', + 'a_week' => 'o săptămână|:count săptămâni|:count săptămâni', + 'w' => ':count săp.', + 'day' => ':count zi|:count zile|:count zile', + 'a_day' => 'o zi|:count zile|:count zile', + 'd' => ':count z.', + 'hour' => ':count oră|:count ore|:count ore', + 'a_hour' => 'o oră|:count ore|:count ore', + 'h' => ':count o.', + 'minute' => ':count minut|:count minute|:count minute', + 'a_minute' => 'un minut|:count minute|:count minute', + 'min' => ':count m.', + 'second' => ':count secundă|:count secunde|:count secunde', + 'a_second' => 'câteva secunde|:count secunde|:count secunde', + 's' => ':count sec.', + 'ago' => ':time în urmă', + 'from_now' => 'peste :time', + 'after' => 'peste :time', + 'before' => 'acum :time', + 'diff_now' => 'acum', + 'diff_today' => 'azi', + 'diff_today_regexp' => 'azi(?:\\s+la)?', + 'diff_yesterday' => 'ieri', + 'diff_yesterday_regexp' => 'ieri(?:\\s+la)?', + 'diff_tomorrow' => 'mâine', + 'diff_tomorrow_regexp' => 'mâine(?:\\s+la)?', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY H:mm', + 'LLLL' => 'dddd, D MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[azi la] LT', + 'nextDay' => '[mâine la] LT', + 'nextWeek' => 'dddd [la] LT', + 'lastDay' => '[ieri la] LT', + 'lastWeek' => '[fosta] dddd [la] LT', + 'sameElse' => 'L', + ], + 'months' => ['ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'], + 'months_short' => ['ian.', 'feb.', 'mar.', 'apr.', 'mai', 'iun.', 'iul.', 'aug.', 'sept.', 'oct.', 'nov.', 'dec.'], + 'weekdays' => ['duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă'], + 'weekdays_short' => ['dum', 'lun', 'mar', 'mie', 'joi', 'vin', 'sâm'], + 'weekdays_min' => ['du', 'lu', 'ma', 'mi', 'jo', 'vi', 'sâ'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' și '], + 'meridiem' => ['a.m.', 'p.m.'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ro_MD.php b/libraries/Carbon/src/Carbon/Lang/ro_MD.php new file mode 100644 index 00000000000..3c2a9547b37 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ro_MD.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ro.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY, HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ro_RO.php b/libraries/Carbon/src/Carbon/Lang/ro_RO.php new file mode 100644 index 00000000000..4198a5d9fa4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ro_RO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ro.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/rof.php b/libraries/Carbon/src/Carbon/Lang/rof.php new file mode 100644 index 00000000000..5a87141f76e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/rof.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['kang’ama', 'kingoto'], + 'weekdays' => ['Ijumapili', 'Ijumatatu', 'Ijumanne', 'Ijumatano', 'Alhamisi', 'Ijumaa', 'Ijumamosi'], + 'weekdays_short' => ['Ijp', 'Ijt', 'Ijn', 'Ijtn', 'Alh', 'Iju', 'Ijm'], + 'weekdays_min' => ['Ijp', 'Ijt', 'Ijn', 'Ijtn', 'Alh', 'Iju', 'Ijm'], + 'months' => ['Mweri wa kwanza', 'Mweri wa kaili', 'Mweri wa katatu', 'Mweri wa kaana', 'Mweri wa tanu', 'Mweri wa sita', 'Mweri wa saba', 'Mweri wa nane', 'Mweri wa tisa', 'Mweri wa ikumi', 'Mweri wa ikumi na moja', 'Mweri wa ikumi na mbili'], + 'months_short' => ['M1', 'M2', 'M3', 'M4', 'M5', 'M6', 'M7', 'M8', 'M9', 'M10', 'M11', 'M12'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ru.php b/libraries/Carbon/src/Carbon/Lang/ru.php new file mode 100644 index 00000000000..507e43be57f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ru.php @@ -0,0 +1,191 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Bari Badamshin + * - Jørn Ølmheim + * - François B + * - Tim Fish + * - Коренберг Марк (imac) + * - Serhan Apaydın + * - RomeroMsk + * - vsn4ik + * - JD Isaacks + * - Bari Badamshin + * - Jørn Ølmheim + * - François B + * - Коренберг Марк (imac) + * - Serhan Apaydın + * - RomeroMsk + * - vsn4ik + * - JD Isaacks + * - Fellzo + * - andrey-helldar + * - Pavel Skripkin (psxx) + * - AlexWalkerson + * - Vladislav UnsealedOne + * - dima-bzz + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +$transformDiff = function ($input) { + return strtr($input, [ + 'неделя' => 'неделю', + 'секунда' => 'секунду', + 'минута' => 'минуту', + ]); +}; + +return [ + 'year' => ':count год|:count года|:count лет', + 'y' => ':count г.|:count г.|:count л.', + 'a_year' => '{1}год|:count год|:count года|:count лет', + 'month' => ':count месяц|:count месяца|:count месяцев', + 'm' => ':count мес.', + 'a_month' => '{1}месяц|:count месяц|:count месяца|:count месяцев', + 'week' => ':count неделя|:count недели|:count недель', + 'w' => ':count нед.', + 'a_week' => '{1}неделя|:count неделю|:count недели|:count недель', + 'day' => ':count день|:count дня|:count дней', + 'd' => ':count д.', + 'a_day' => '{1}день|:count день|:count дня|:count дней', + 'hour' => ':count час|:count часа|:count часов', + 'h' => ':count ч.', + 'a_hour' => '{1}час|:count час|:count часа|:count часов', + 'minute' => ':count минута|:count минуты|:count минут', + 'min' => ':count мин.', + 'a_minute' => '{1}минута|:count минута|:count минуты|:count минут', + 'second' => ':count секунда|:count секунды|:count секунд', + 's' => ':count сек.', + 'a_second' => '{1}несколько секунд|:count секунду|:count секунды|:count секунд', + 'ago' => function ($time) use ($transformDiff) { + return $transformDiff($time).' назад'; + }, + 'from_now' => function ($time) use ($transformDiff) { + return 'через '.$transformDiff($time); + }, + 'after' => function ($time) use ($transformDiff) { + return $transformDiff($time).' после'; + }, + 'before' => function ($time) use ($transformDiff) { + return $transformDiff($time).' до'; + }, + 'diff_now' => 'только что', + 'diff_today' => 'Сегодня,', + 'diff_today_regexp' => 'Сегодня,?(?:\\s+в)?', + 'diff_yesterday' => 'вчера', + 'diff_yesterday_regexp' => 'Вчера,?(?:\\s+в)?', + 'diff_tomorrow' => 'завтра', + 'diff_tomorrow_regexp' => 'Завтра,?(?:\\s+в)?', + 'diff_before_yesterday' => 'позавчера', + 'diff_after_tomorrow' => 'послезавтра', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY г.', + 'LLL' => 'D MMMM YYYY г., H:mm', + 'LLLL' => 'dddd, D MMMM YYYY г., H:mm', + ], + 'calendar' => [ + 'sameDay' => '[Сегодня, в] LT', + 'nextDay' => '[Завтра, в] LT', + 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { + if ($current->week !== $other->week) { + switch ($current->dayOfWeek) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } + + if ($current->dayOfWeek === 2) { + return '[Во] dddd, [в] LT'; + } + + return '[В] dddd, [в] LT'; + }, + 'lastDay' => '[Вчера, в] LT', + 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { + if ($current->week !== $other->week) { + switch ($current->dayOfWeek) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } + + if ($current->dayOfWeek === 2) { + return '[Во] dddd, [в] LT'; + } + + return '[В] dddd, [в] LT'; + }, + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'M': + case 'd': + case 'DDD': + return $number.'-й'; + case 'D': + return $number.'-го'; + case 'w': + case 'W': + return $number.'-я'; + default: + return $number; + } + }, + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'ночи'; + } + if ($hour < 12) { + return 'утра'; + } + if ($hour < 17) { + return 'дня'; + } + + return 'вечера'; + }, + 'months' => ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], + 'months_standalone' => ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], + 'months_short' => ['янв', 'фев', 'мар', 'апр', 'мая', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], + 'months_short_standalone' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], + 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => ['воскресенье', 'понедельник', 'вторник', 'среду', 'четверг', 'пятницу', 'субботу'], + 'weekdays_standalone' => ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], + 'weekdays_short' => ['вск', 'пнд', 'втр', 'срд', 'чтв', 'птн', 'сбт'], + 'weekdays_min' => ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], + 'weekdays_regexp' => '/\[\s*(В|в)\s*((?:прошлую|следующую|эту)\s*)?\]\s*dddd/', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' и '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ru_BY.php b/libraries/Carbon/src/Carbon/Lang/ru_BY.php new file mode 100644 index 00000000000..f23ca22596b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ru_BY.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ru.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ru_KG.php b/libraries/Carbon/src/Carbon/Lang/ru_KG.php new file mode 100644 index 00000000000..f23ca22596b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ru_KG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ru.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ru_KZ.php b/libraries/Carbon/src/Carbon/Lang/ru_KZ.php new file mode 100644 index 00000000000..f23ca22596b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ru_KZ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ru.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ru_MD.php b/libraries/Carbon/src/Carbon/Lang/ru_MD.php new file mode 100644 index 00000000000..f23ca22596b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ru_MD.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ru.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ru_RU.php b/libraries/Carbon/src/Carbon/Lang/ru_RU.php new file mode 100644 index 00000000000..f23ca22596b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ru_RU.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ru.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ru_UA.php b/libraries/Carbon/src/Carbon/Lang/ru_UA.php new file mode 100644 index 00000000000..bbc6adad012 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ru_UA.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - RFC 2319 bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/ru.php', [ + 'weekdays' => ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], + 'weekdays_short' => ['вск', 'пнд', 'вто', 'срд', 'чтв', 'птн', 'суб'], + 'weekdays_min' => ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'су'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/rw.php b/libraries/Carbon/src/Carbon/Lang/rw.php new file mode 100644 index 00000000000..e55840ebbf9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/rw.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/rw_RW.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/rw_RW.php b/libraries/Carbon/src/Carbon/Lang/rw_RW.php new file mode 100644 index 00000000000..0bbab384efa --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/rw_RW.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Rwanda Steve Murphy murf@e-tools.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Mutarama', 'Gashyantare', 'Werurwe', 'Mata', 'Gicuransi', 'Kamena', 'Nyakanga', 'Kanama', 'Nzeli', 'Ukwakira', 'Ugushyingo', 'Ukuboza'], + 'months_short' => ['Mut', 'Gas', 'Wer', 'Mat', 'Gic', 'Kam', 'Nya', 'Kan', 'Nze', 'Ukw', 'Ugu', 'Uku'], + 'weekdays' => ['Ku cyumweru', 'Kuwa mbere', 'Kuwa kabiri', 'Kuwa gatatu', 'Kuwa kane', 'Kuwa gatanu', 'Kuwa gatandatu'], + 'weekdays_short' => ['Mwe', 'Mbe', 'Kab', 'Gtu', 'Kan', 'Gnu', 'Gnd'], + 'weekdays_min' => ['Mwe', 'Mbe', 'Kab', 'Gtu', 'Kan', 'Gnu', 'Gnd'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'second' => ':count vuna', // less reliable + 's' => ':count vuna', // less reliable + 'a_second' => ':count vuna', // less reliable + + 'year' => 'aka :count', + 'y' => 'aka :count', + 'a_year' => 'aka :count', + + 'month' => 'ezi :count', + 'm' => 'ezi :count', + 'a_month' => 'ezi :count', + + 'week' => ':count icyumweru', + 'w' => ':count icyumweru', + 'a_week' => ':count icyumweru', + + 'day' => ':count nsi', + 'd' => ':count nsi', + 'a_day' => ':count nsi', + + 'hour' => 'saha :count', + 'h' => 'saha :count', + 'a_hour' => 'saha :count', + + 'minute' => ':count -nzinya', + 'min' => ':count -nzinya', + 'a_minute' => ':count -nzinya', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/rwk.php b/libraries/Carbon/src/Carbon/Lang/rwk.php new file mode 100644 index 00000000000..f11ba53eaa9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/rwk.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['utuko', 'kyiukonyi'], + 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sa.php b/libraries/Carbon/src/Carbon/Lang/sa.php new file mode 100644 index 00000000000..444356ef2fc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sa.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/sa_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sa_IN.php b/libraries/Carbon/src/Carbon/Lang/sa_IN.php new file mode 100644 index 00000000000..cf63052768e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sa_IN.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - The Debian project Christian Perrier bubulle@debian.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D-MM-YY', + ], + 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'weekdays' => ['रविवासर:', 'सोमवासर:', 'मंगलवासर:', 'बुधवासर:', 'बृहस्पतिवासरः', 'शुक्रवासर', 'शनिवासर:'], + 'weekdays_short' => ['रविः', 'सोम:', 'मंगल:', 'बुध:', 'बृहस्पतिः', 'शुक्र', 'शनि:'], + 'weekdays_min' => ['रविः', 'सोम:', 'मंगल:', 'बुध:', 'बृहस्पतिः', 'शुक्र', 'शनि:'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], + + 'minute' => ':count होरा', // less reliable + 'min' => ':count होरा', // less reliable + 'a_minute' => ':count होरा', // less reliable + + 'year' => ':count वर्ष', + 'y' => ':count वर्ष', + 'a_year' => ':count वर्ष', + + 'month' => ':count मास', + 'm' => ':count मास', + 'a_month' => ':count मास', + + 'week' => ':count सप्ताहः saptahaĥ', + 'w' => ':count सप्ताहः saptahaĥ', + 'a_week' => ':count सप्ताहः saptahaĥ', + + 'day' => ':count दिन', + 'd' => ':count दिन', + 'a_day' => ':count दिन', + + 'hour' => ':count घण्टा', + 'h' => ':count घण्टा', + 'a_hour' => ':count घण्टा', + + 'second' => ':count द्वितीयः', + 's' => ':count द्वितीयः', + 'a_second' => ':count द्वितीयः', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sah.php b/libraries/Carbon/src/Carbon/Lang/sah.php new file mode 100644 index 00000000000..614c18c1075 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sah.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/sah_RU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sah_RU.php b/libraries/Carbon/src/Carbon/Lang/sah_RU.php new file mode 100644 index 00000000000..81ea65e8531 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sah_RU.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Valery Timiriliyev Valery Timiriliyev timiriliyev@gmail.com + */ +return array_replace_recursive(require __DIR__.'/ru.php', [ + 'formats' => [ + 'L' => 'YYYY.MM.DD', + ], + 'months' => ['тохсунньу', 'олунньу', 'кулун тутар', 'муус устар', 'ыам ыйын', 'бэс ыйын', 'от ыйын', 'атырдьах ыйын', 'балаҕан ыйын', 'алтынньы', 'сэтинньи', 'ахсынньы'], + 'months_short' => ['тохс', 'олун', 'кул', 'муус', 'ыам', 'бэс', 'от', 'атыр', 'бал', 'алт', 'сэт', 'ахс'], + 'weekdays' => ['баскыһыанньа', 'бэнидиэнньик', 'оптуорунньук', 'сэрэдэ', 'чэппиэр', 'бээтинсэ', 'субуота'], + 'weekdays_short' => ['бс', 'бн', 'оп', 'ср', 'чп', 'бт', 'сб'], + 'weekdays_min' => ['бс', 'бн', 'оп', 'ср', 'чп', 'бт', 'сб'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/saq.php b/libraries/Carbon/src/Carbon/Lang/saq.php new file mode 100644 index 00000000000..aa09134c997 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/saq.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Tesiran', 'Teipa'], + 'weekdays' => ['Mderot ee are', 'Mderot ee kuni', 'Mderot ee ong’wan', 'Mderot ee inet', 'Mderot ee ile', 'Mderot ee sapa', 'Mderot ee kwe'], + 'weekdays_short' => ['Are', 'Kun', 'Ong', 'Ine', 'Ile', 'Sap', 'Kwe'], + 'weekdays_min' => ['Are', 'Kun', 'Ong', 'Ine', 'Ile', 'Sap', 'Kwe'], + 'months' => ['Lapa le obo', 'Lapa le waare', 'Lapa le okuni', 'Lapa le ong’wan', 'Lapa le imet', 'Lapa le ile', 'Lapa le sapa', 'Lapa le isiet', 'Lapa le saal', 'Lapa le tomon', 'Lapa le tomon obo', 'Lapa le tomon waare'], + 'months_short' => ['Obo', 'Waa', 'Oku', 'Ong', 'Ime', 'Ile', 'Sap', 'Isi', 'Saa', 'Tom', 'Tob', 'Tow'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sat.php b/libraries/Carbon/src/Carbon/Lang/sat.php new file mode 100644 index 00000000000..72d82b877bb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sat.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/sat_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sat_IN.php b/libraries/Carbon/src/Carbon/Lang/sat_IN.php new file mode 100644 index 00000000000..e72843da407 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sat_IN.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat Pune libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रेल', 'मई', 'जुन', 'जुलाई', 'अगस्त', 'सितम्बर', 'अखथबर', 'नवम्बर', 'दिसम्बर'], + 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रेल', 'मई', 'जुन', 'जुलाई', 'अगस्त', 'सितम्बर', 'अखथबर', 'नवम्बर', 'दिसम्बर'], + 'weekdays' => ['सिंगेमाँहाँ', 'ओतेमाँहाँ', 'बालेमाँहाँ', 'सागुनमाँहाँ', 'सारदीमाँहाँ', 'जारुममाँहाँ', 'ञुहुममाँहाँ'], + 'weekdays_short' => ['सिंगे', 'ओते', 'बाले', 'सागुन', 'सारदी', 'जारुम', 'ञुहुम'], + 'weekdays_min' => ['सिंगे', 'ओते', 'बाले', 'सागुन', 'सारदी', 'जारुम', 'ञुहुम'], + 'day_of_first_week_of_year' => 1, + + 'month' => ':count ńindạ cando', // less reliable + 'm' => ':count ńindạ cando', // less reliable + 'a_month' => ':count ńindạ cando', // less reliable + + 'week' => ':count mãhã', // less reliable + 'w' => ':count mãhã', // less reliable + 'a_week' => ':count mãhã', // less reliable + + 'hour' => ':count ᱥᱳᱱᱚ', // less reliable + 'h' => ':count ᱥᱳᱱᱚ', // less reliable + 'a_hour' => ':count ᱥᱳᱱᱚ', // less reliable + + 'minute' => ':count ᱯᱤᱞᱪᱩ', // less reliable + 'min' => ':count ᱯᱤᱞᱪᱩ', // less reliable + 'a_minute' => ':count ᱯᱤᱞᱪᱩ', // less reliable + + 'second' => ':count ar', // less reliable + 's' => ':count ar', // less reliable + 'a_second' => ':count ar', // less reliable + + 'year' => ':count ne̲s', + 'y' => ':count ne̲s', + 'a_year' => ':count ne̲s', + + 'day' => ':count ᱫᱤᱱ', + 'd' => ':count ᱫᱤᱱ', + 'a_day' => ':count ᱫᱤᱱ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sbp.php b/libraries/Carbon/src/Carbon/Lang/sbp.php new file mode 100644 index 00000000000..1707fec37ad --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sbp.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Lwamilawu', 'Pashamihe'], + 'weekdays' => ['Mulungu', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alahamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['Mul', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'weekdays_min' => ['Mul', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'months' => ['Mupalangulwa', 'Mwitope', 'Mushende', 'Munyi', 'Mushende Magali', 'Mujimbi', 'Mushipepo', 'Mupuguto', 'Munyense', 'Mokhu', 'Musongandembwe', 'Muhaano'], + 'months_short' => ['Mup', 'Mwi', 'Msh', 'Mun', 'Mag', 'Muj', 'Msp', 'Mpg', 'Mye', 'Mok', 'Mus', 'Muh'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sc.php b/libraries/Carbon/src/Carbon/Lang/sc.php new file mode 100644 index 00000000000..d6630b12907 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sc.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/sc_IT.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sc_IT.php b/libraries/Carbon/src/Carbon/Lang/sc_IT.php new file mode 100644 index 00000000000..b9c689c9da2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sc_IT.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Sardinian Translators Team Massimeddu Cireddu massimeddu@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD. MM. YY', + ], + 'months' => ['Ghennàrgiu', 'Freàrgiu', 'Martzu', 'Abrile', 'Maju', 'Làmpadas', 'Argiolas//Trìulas', 'Austu', 'Cabudanni', 'Santugaine//Ladàmine', 'Onniasantu//Santandria', 'Nadale//Idas'], + 'months_short' => ['Ghe', 'Fre', 'Mar', 'Abr', 'Maj', 'Làm', 'Arg', 'Aus', 'Cab', 'Lad', 'Onn', 'Nad'], + 'weekdays' => ['Domìnigu', 'Lunis', 'Martis', 'Mèrcuris', 'Giòbia', 'Chenàbura', 'Sàbadu'], + 'weekdays_short' => ['Dom', 'Lun', 'Mar', 'Mèr', 'Giò', 'Che', 'Sàb'], + 'weekdays_min' => ['Dom', 'Lun', 'Mar', 'Mèr', 'Giò', 'Che', 'Sàb'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'minute' => ':count mementu', // less reliable + 'min' => ':count mementu', // less reliable + 'a_minute' => ':count mementu', // less reliable + + 'year' => ':count annu', + 'y' => ':count annu', + 'a_year' => ':count annu', + + 'month' => ':count mese', + 'm' => ':count mese', + 'a_month' => ':count mese', + + 'week' => ':count chida', + 'w' => ':count chida', + 'a_week' => ':count chida', + + 'day' => ':count dí', + 'd' => ':count dí', + 'a_day' => ':count dí', + + 'hour' => ':count ora', + 'h' => ':count ora', + 'a_hour' => ':count ora', + + 'second' => ':count secundu', + 's' => ':count secundu', + 'a_second' => ':count secundu', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sd.php b/libraries/Carbon/src/Carbon/Lang/sd.php new file mode 100644 index 00000000000..70d15023c7e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sd.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +$months = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر', +]; + +$weekdays = [ + 'آچر', + 'سومر', + 'اڱارو', + 'اربع', + 'خميس', + 'جمع', + 'ڇنڇر', +]; + +/* + * Authors: + * - Narain Sagar + * - Sawood Alam + * - Narain Sagar + */ +return [ + 'year' => '{1}'.'هڪ سال'.'|:count '.'سال', + 'month' => '{1}'.'هڪ مهينو'.'|:count '.'مهينا', + 'week' => '{1}'.'ھڪ ھفتو'.'|:count '.'هفتا', + 'day' => '{1}'.'هڪ ڏينهن'.'|:count '.'ڏينهن', + 'hour' => '{1}'.'هڪ ڪلاڪ'.'|:count '.'ڪلاڪ', + 'minute' => '{1}'.'هڪ منٽ'.'|:count '.'منٽ', + 'second' => '{1}'.'چند سيڪنڊ'.'|:count '.'سيڪنڊ', + 'ago' => ':time اڳ', + 'from_now' => ':time پوء', + 'diff_yesterday' => 'ڪالهه', + 'diff_today' => 'اڄ', + 'diff_tomorrow' => 'سڀاڻي', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd، D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[اڄ] LT', + 'nextDay' => '[سڀاڻي] LT', + 'nextWeek' => 'dddd [اڳين هفتي تي] LT', + 'lastDay' => '[ڪالهه] LT', + 'lastWeek' => '[گزريل هفتي] dddd [تي] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['صبح', 'شام'], + 'months' => $months, + 'months_short' => $months, + 'weekdays' => $weekdays, + 'weekdays_short' => $weekdays, + 'weekdays_min' => $weekdays, + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => ['، ', ' ۽ '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sd_IN.php b/libraries/Carbon/src/Carbon/Lang/sd_IN.php new file mode 100644 index 00000000000..5efa5e07f1f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sd_IN.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat, Pune bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/sd.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['جنوري', 'فبروري', 'مارچ', 'اپريل', 'مي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽيمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'], + 'months_short' => ['جنوري', 'فبروري', 'مارچ', 'اپريل', 'مي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽيمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'], + 'weekdays' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], + 'weekdays_short' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], + 'weekdays_min' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sd_IN@devanagari.php b/libraries/Carbon/src/Carbon/Lang/sd_IN@devanagari.php new file mode 100644 index 00000000000..86c59983cb7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sd_IN@devanagari.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat, Pune bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/sd.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['जनवरी', 'फबरवरी', 'मार्चि', 'अप्रेल', 'मे', 'जूनि', 'जूलाइ', 'आगस्टु', 'सेप्टेंबरू', 'आक्टूबरू', 'नवंबरू', 'ॾिसंबरू'], + 'months_short' => ['जनवरी', 'फबरवरी', 'मार्चि', 'अप्रेल', 'मे', 'जूनि', 'जूलाइ', 'आगस्टु', 'सेप्टेंबरू', 'आक्टूबरू', 'नवंबरू', 'ॾिसंबरू'], + 'weekdays' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], + 'weekdays_short' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], + 'weekdays_min' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['म.पू.', 'म.नं.'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/se.php b/libraries/Carbon/src/Carbon/Lang/se.php new file mode 100644 index 00000000000..7266600d62b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/se.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Karamell + */ +return [ + 'year' => '{1}:count jahki|:count jagit', + 'a_year' => '{1}okta jahki|:count jagit', + 'y' => ':count j.', + 'month' => '{1}:count mánnu|:count mánut', + 'a_month' => '{1}okta mánnu|:count mánut', + 'm' => ':count mán.', + 'week' => '{1}:count vahkku|:count vahkku', + 'a_week' => '{1}okta vahkku|:count vahkku', + 'w' => ':count v.', + 'day' => '{1}:count beaivi|:count beaivvit', + 'a_day' => '{1}okta beaivi|:count beaivvit', + 'd' => ':count b.', + 'hour' => '{1}:count diimmu|:count diimmut', + 'a_hour' => '{1}okta diimmu|:count diimmut', + 'h' => ':count d.', + 'minute' => '{1}:count minuhta|:count minuhtat', + 'a_minute' => '{1}okta minuhta|:count minuhtat', + 'min' => ':count min.', + 'second' => '{1}:count sekunddat|:count sekunddat', + 'a_second' => '{1}moadde sekunddat|:count sekunddat', + 's' => ':count s.', + 'ago' => 'maŋit :time', + 'from_now' => ':time geažes', + 'diff_yesterday' => 'ikte', + 'diff_yesterday_regexp' => 'ikte(?:\\s+ti)?', + 'diff_today' => 'otne', + 'diff_today_regexp' => 'otne(?:\\s+ti)?', + 'diff_tomorrow' => 'ihttin', + 'diff_tomorrow_regexp' => 'ihttin(?:\\s+ti)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'MMMM D. [b.] YYYY', + 'LLL' => 'MMMM D. [b.] YYYY [ti.] HH:mm', + 'LLLL' => 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[otne ti] LT', + 'nextDay' => '[ihttin ti] LT', + 'nextWeek' => 'dddd [ti] LT', + 'lastDay' => '[ikte ti] LT', + 'lastWeek' => '[ovddit] dddd [ti] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['ođđajagemánnu', 'guovvamánnu', 'njukčamánnu', 'cuoŋománnu', 'miessemánnu', 'geassemánnu', 'suoidnemánnu', 'borgemánnu', 'čakčamánnu', 'golggotmánnu', 'skábmamánnu', 'juovlamánnu'], + 'months_short' => ['ođđj', 'guov', 'njuk', 'cuo', 'mies', 'geas', 'suoi', 'borg', 'čakč', 'golg', 'skáb', 'juov'], + 'weekdays' => ['sotnabeaivi', 'vuossárga', 'maŋŋebárga', 'gaskavahkku', 'duorastat', 'bearjadat', 'lávvardat'], + 'weekdays_short' => ['sotn', 'vuos', 'maŋ', 'gask', 'duor', 'bear', 'láv'], + 'weekdays_min' => ['s', 'v', 'm', 'g', 'd', 'b', 'L'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' ja '], + 'meridiem' => ['i.b.', 'e.b.'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/se_FI.php b/libraries/Carbon/src/Carbon/Lang/se_FI.php new file mode 100644 index 00000000000..fc5bb87cf8e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/se_FI.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/se.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'months' => ['ođđajagemánnu', 'guovvamánnu', 'njukčamánnu', 'cuoŋománnu', 'miessemánnu', 'geassemánnu', 'suoidnemánnu', 'borgemánnu', 'čakčamánnu', 'golggotmánnu', 'skábmamánnu', 'juovlamánnu'], + 'months_short' => ['ođđj', 'guov', 'njuk', 'cuoŋ', 'mies', 'geas', 'suoi', 'borg', 'čakč', 'golg', 'skáb', 'juov'], + 'weekdays' => ['sotnabeaivi', 'mánnodat', 'disdat', 'gaskavahkku', 'duorastat', 'bearjadat', 'lávvordat'], + 'weekdays_short' => ['so', 'má', 'di', 'ga', 'du', 'be', 'lá'], + 'weekdays_min' => ['so', 'má', 'di', 'ga', 'du', 'be', 'lá'], + 'meridiem' => ['i', 'e'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/se_NO.php b/libraries/Carbon/src/Carbon/Lang/se_NO.php new file mode 100644 index 00000000000..8045721da0d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/se_NO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/se.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/se_SE.php b/libraries/Carbon/src/Carbon/Lang/se_SE.php new file mode 100644 index 00000000000..8045721da0d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/se_SE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/se.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/seh.php b/libraries/Carbon/src/Carbon/Lang/seh.php new file mode 100644 index 00000000000..0846272e4c0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/seh.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['Dimingu', 'Chiposi', 'Chipiri', 'Chitatu', 'Chinai', 'Chishanu', 'Sabudu'], + 'weekdays_short' => ['Dim', 'Pos', 'Pir', 'Tat', 'Nai', 'Sha', 'Sab'], + 'weekdays_min' => ['Dim', 'Pos', 'Pir', 'Tat', 'Nai', 'Sha', 'Sab'], + 'months' => ['Janeiro', 'Fevreiro', 'Marco', 'Abril', 'Maio', 'Junho', 'Julho', 'Augusto', 'Setembro', 'Otubro', 'Novembro', 'Decembro'], + 'months_short' => ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Aug', 'Set', 'Otu', 'Nov', 'Dec'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'd [de] MMM [de] YYYY', + 'LLL' => 'd [de] MMMM [de] YYYY HH:mm', + 'LLLL' => 'dddd, d [de] MMMM [de] YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ses.php b/libraries/Carbon/src/Carbon/Lang/ses.php new file mode 100644 index 00000000000..1dbee5122e3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ses.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Adduha', 'Aluula'], + 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamiisa', 'Alzuma', 'Asibti'], + 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], + 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], + 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], + 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'month' => ':count alaada', // less reliable + 'm' => ':count alaada', // less reliable + 'a_month' => ':count alaada', // less reliable + + 'hour' => ':count ɲaajin', // less reliable + 'h' => ':count ɲaajin', // less reliable + 'a_hour' => ':count ɲaajin', // less reliable + + 'minute' => ':count zarbu', // less reliable + 'min' => ':count zarbu', // less reliable + 'a_minute' => ':count zarbu', // less reliable + + 'year' => ':count jiiri', + 'y' => ':count jiiri', + 'a_year' => ':count jiiri', + + 'week' => ':count jirbiiyye', + 'w' => ':count jirbiiyye', + 'a_week' => ':count jirbiiyye', + + 'day' => ':count zaari', + 'd' => ':count zaari', + 'a_day' => ':count zaari', + + 'second' => ':count ihinkante', + 's' => ':count ihinkante', + 'a_second' => ':count ihinkante', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sg.php b/libraries/Carbon/src/Carbon/Lang/sg.php new file mode 100644 index 00000000000..c56fd58d7d2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sg.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['ND', 'LK'], + 'weekdays' => ['Bikua-ôko', 'Bïkua-ûse', 'Bïkua-ptâ', 'Bïkua-usïö', 'Bïkua-okü', 'Lâpôsö', 'Lâyenga'], + 'weekdays_short' => ['Bk1', 'Bk2', 'Bk3', 'Bk4', 'Bk5', 'Lâp', 'Lây'], + 'weekdays_min' => ['Bk1', 'Bk2', 'Bk3', 'Bk4', 'Bk5', 'Lâp', 'Lây'], + 'months' => ['Nyenye', 'Fulundïgi', 'Mbängü', 'Ngubùe', 'Bêläwü', 'Föndo', 'Lengua', 'Kükürü', 'Mvuka', 'Ngberere', 'Nabändüru', 'Kakauka'], + 'months_short' => ['Nye', 'Ful', 'Mbä', 'Ngu', 'Bêl', 'Fön', 'Len', 'Kük', 'Mvu', 'Ngb', 'Nab', 'Kak'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'year' => ':count dā', // less reliable + 'y' => ':count dā', // less reliable + 'a_year' => ':count dā', // less reliable + + 'week' => ':count bïkua-okü', // less reliable + 'w' => ':count bïkua-okü', // less reliable + 'a_week' => ':count bïkua-okü', // less reliable + + 'day' => ':count ziggawâ', // less reliable + 'd' => ':count ziggawâ', // less reliable + 'a_day' => ':count ziggawâ', // less reliable + + 'hour' => ':count yângâködörö', // less reliable + 'h' => ':count yângâködörö', // less reliable + 'a_hour' => ':count yângâködörö', // less reliable + + 'second' => ':count bïkua-ôko', // less reliable + 's' => ':count bïkua-ôko', // less reliable + 'a_second' => ':count bïkua-ôko', // less reliable + + 'month' => ':count Nze tî ngu', + 'm' => ':count Nze tî ngu', + 'a_month' => ':count Nze tî ngu', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sgs.php b/libraries/Carbon/src/Carbon/Lang/sgs.php new file mode 100644 index 00000000000..21de1dd2552 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sgs.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/sgs_LT.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sgs_LT.php b/libraries/Carbon/src/Carbon/Lang/sgs_LT.php new file mode 100644 index 00000000000..3c30b450cf8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sgs_LT.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Arnas Udovičius bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY.MM.DD', + ], + 'months' => ['sausė', 'vasarė', 'kuova', 'balondė', 'gegožės', 'bėrželė', 'lëpas', 'rogpjūtė', 'siejės', 'spalė', 'lapkrėstė', 'grůdė'], + 'months_short' => ['Sau', 'Vas', 'Kuo', 'Bal', 'Geg', 'Bėr', 'Lëp', 'Rgp', 'Sie', 'Spa', 'Lap', 'Grd'], + 'weekdays' => ['nedielės dëna', 'panedielis', 'oterninks', 'sereda', 'četvergs', 'petnīčė', 'sobata'], + 'weekdays_short' => ['Nd', 'Pn', 'Ot', 'Sr', 'Čt', 'Pt', 'Sb'], + 'weekdays_min' => ['Nd', 'Pn', 'Ot', 'Sr', 'Čt', 'Pt', 'Sb'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'minute' => ':count mažos', // less reliable + 'min' => ':count mažos', // less reliable + 'a_minute' => ':count mažos', // less reliable + + 'year' => ':count metā', + 'y' => ':count metā', + 'a_year' => ':count metā', + + 'month' => ':count mienou', + 'm' => ':count mienou', + 'a_month' => ':count mienou', + + 'week' => ':count nedielė', + 'w' => ':count nedielė', + 'a_week' => ':count nedielė', + + 'day' => ':count dīna', + 'd' => ':count dīna', + 'a_day' => ':count dīna', + + 'hour' => ':count adīna', + 'h' => ':count adīna', + 'a_hour' => ':count adīna', + + 'second' => ':count Sekondė', + 's' => ':count Sekondė', + 'a_second' => ':count Sekondė', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sh.php b/libraries/Carbon/src/Carbon/Lang/sh.php new file mode 100644 index 00000000000..e3672a444af --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sh.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +// @codeCoverageIgnoreStart +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { + PluralizationRules::set(static function ($number) { + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + }, 'sh'); +} +// @codeCoverageIgnoreEnd + +/* + * Authors: + * - Томица Кораћ + * - Enrique Vidal + * - Christopher Dell + * - dmilisic + * - danijel + * - Miroslav Matkovic (mikki021) + */ +return [ + 'diff_now' => 'sada', + 'diff_yesterday' => 'juče', + 'diff_tomorrow' => 'sutra', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'MMMM D, YYYY', + 'LLL' => 'DD MMM HH:mm', + 'LLLL' => 'MMMM DD, YYYY HH:mm', + ], + 'year' => ':count godina|:count godine|:count godina', + 'y' => ':count g.', + 'month' => ':count mesec|:count meseca|:count meseci', + 'm' => ':count m.', + 'week' => ':count nedelja|:count nedelje|:count nedelja', + 'w' => ':count n.', + 'day' => ':count dan|:count dana|:count dana', + 'd' => ':count d.', + 'hour' => ':count sat|:count sata|:count sati', + 'h' => ':count č.', + 'minute' => ':count minut|:count minuta|:count minuta', + 'min' => ':count min.', + 'second' => ':count sekund|:count sekunde|:count sekundi', + 's' => ':count s.', + 'ago' => 'pre :time', + 'from_now' => 'za :time', + 'after' => 'nakon :time', + 'before' => ':time raniјe', + 'weekdays' => ['Nedelja', 'Ponedeljak', 'Utorak', 'Sreda', 'Četvrtak', 'Petak', 'Subota'], + 'weekdays_short' => ['Ned', 'Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub'], + 'weekdays_min' => ['Ned', 'Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub'], + 'months' => ['Januar', 'Februar', 'Mart', 'April', 'Maj', 'Jun', 'Jul', 'Avgust', 'Septembar', 'Oktobar', 'Novembar', 'Decembar'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'], + 'list' => [', ', ' i '], + 'meridiem' => ['pre podne', 'po podne'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/shi.php b/libraries/Carbon/src/Carbon/Lang/shi.php new file mode 100644 index 00000000000..a6e8d0b1d38 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/shi.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['ⵜⵉⴼⴰⵡⵜ', 'ⵜⴰⴷⴳⴳⵯⴰⵜ'], + 'weekdays' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵕⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], + 'weekdays_short' => ['ⴰⵙⴰ', 'ⴰⵢⵏ', 'ⴰⵙⵉ', 'ⴰⴽⵕ', 'ⴰⴽⵡ', 'ⴰⵙⵉⵎ', 'ⴰⵙⵉⴹ'], + 'weekdays_min' => ['ⴰⵙⴰ', 'ⴰⵢⵏ', 'ⴰⵙⵉ', 'ⴰⴽⵕ', 'ⴰⴽⵡ', 'ⴰⵙⵉⵎ', 'ⴰⵙⵉⴹ'], + 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵜⵓⴱⵔ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⴰⵏⴱⵉⵔ'], + 'months_short' => ['ⵉⵏⵏ', 'ⴱⵕⴰ', 'ⵎⴰⵕ', 'ⵉⴱⵔ', 'ⵎⴰⵢ', 'ⵢⵓⵏ', 'ⵢⵓⵍ', 'ⵖⵓⵛ', 'ⵛⵓⵜ', 'ⴽⵜⵓ', 'ⵏⵓⵡ', 'ⴷⵓⵊ'], + 'first_day_of_week' => 6, + 'weekend' => [5, 6], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'year' => ':count aseggwas', + 'y' => ':count aseggwas', + 'a_year' => ':count aseggwas', + + 'month' => ':count ayyur', + 'm' => ':count ayyur', + 'a_month' => ':count ayyur', + + 'week' => ':count imalass', + 'w' => ':count imalass', + 'a_week' => ':count imalass', + + 'day' => ':count ass', + 'd' => ':count ass', + 'a_day' => ':count ass', + + 'hour' => ':count urɣ', // less reliable + 'h' => ':count urɣ', // less reliable + 'a_hour' => ':count urɣ', // less reliable + + 'minute' => ':count ⴰⵎⵥⵉ', // less reliable + 'min' => ':count ⴰⵎⵥⵉ', // less reliable + 'a_minute' => ':count ⴰⵎⵥⵉ', // less reliable + + 'second' => ':count sin', // less reliable + 's' => ':count sin', // less reliable + 'a_second' => ':count sin', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/shi_Latn.php b/libraries/Carbon/src/Carbon/Lang/shi_Latn.php new file mode 100644 index 00000000000..d6c40a3d2a4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/shi_Latn.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/shi.php', [ + 'meridiem' => ['tifawt', 'tadggʷat'], + 'weekdays' => ['asamas', 'aynas', 'asinas', 'akṛas', 'akwas', 'asimwas', 'asiḍyas'], + 'weekdays_short' => ['asa', 'ayn', 'asi', 'akṛ', 'akw', 'asim', 'asiḍ'], + 'weekdays_min' => ['asa', 'ayn', 'asi', 'akṛ', 'akw', 'asim', 'asiḍ'], + 'months' => ['innayr', 'bṛayṛ', 'maṛṣ', 'ibrir', 'mayyu', 'yunyu', 'yulyuz', 'ɣuct', 'cutanbir', 'ktubr', 'nuwanbir', 'dujanbir'], + 'months_short' => ['inn', 'bṛa', 'maṛ', 'ibr', 'may', 'yun', 'yul', 'ɣuc', 'cut', 'ktu', 'nuw', 'duj'], + 'first_day_of_week' => 6, + 'weekend' => [5, 6], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + + 'minute' => ':count agur', // less reliable + 'min' => ':count agur', // less reliable + 'a_minute' => ':count agur', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/shi_Tfng.php b/libraries/Carbon/src/Carbon/Lang/shi_Tfng.php new file mode 100644 index 00000000000..781730b5a00 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/shi_Tfng.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/shi.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/shn.php b/libraries/Carbon/src/Carbon/Lang/shn.php new file mode 100644 index 00000000000..7628cd7c25a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/shn.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/shn_MM.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/shn_MM.php b/libraries/Carbon/src/Carbon/Lang/shn_MM.php new file mode 100644 index 00000000000..2da2d8f95a2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/shn_MM.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - ubuntu Myanmar LoCo Team https://ubuntu-mm.net Bone Pyae Sone bone.burma@mail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'OY MMM OD dddd', + ], + 'months' => ['လိူၼ်ၵမ်', 'လိူၼ်သၢမ်', 'လိူၼ်သီ', 'လိူၼ်ႁႃႈ', 'လိူၼ်ႁူၵ်း', 'လိူၼ်ၸဵတ်း', 'လိူၼ်ပႅတ်ႇ', 'လိူၼ်ၵဝ်ႈ', 'လိူၼ်သိပ်း', 'လိူၼ်သိပ်းဢိတ်း', 'လိူၼ်သိပ်းဢိတ်းသွင်', 'လိူၼ်ၸဵင်'], + 'months_short' => ['လိူၼ်ၵမ်', 'လိူၼ်သၢမ်', 'လိူၼ်သီ', 'လိူၼ်ႁႃႈ', 'လိူၼ်ႁူၵ်း', 'လိူၼ်ၸဵတ်း', 'လိူၼ်ပႅတ်ႇ', 'လိူၼ်ၵဝ်ႈ', 'လိူၼ်သိပ်း', 'လိူၼ်သိပ်းဢိတ်း', 'လိူၼ်သိပ်းဢိတ်းသွင်', 'လိူၼ်ၸဵင်'], + 'weekdays' => ['ဝၼ်းဢႃးတိတ်ႉ', 'ဝၼ်းၸၼ်', 'ဝၼ်း​ဢၢင်း​ၵၢၼ်း', 'ဝၼ်းပူတ်ႉ', 'ဝၼ်းၽတ်း', 'ဝၼ်းသုၵ်း', 'ဝၼ်းသဝ်'], + 'weekdays_short' => ['တိတ့်', 'ၸၼ်', 'ၵၢၼ်း', 'ပုတ့်', 'ၽတ်း', 'သုၵ်း', 'သဝ်'], + 'weekdays_min' => ['တိတ့်', 'ၸၼ်', 'ၵၢၼ်း', 'ပုတ့်', 'ၽတ်း', 'သုၵ်း', 'သဝ်'], + 'alt_numbers' => ['႐႐', '႐႑', '႐႒', '႐႓', '႐႔', '႐႕', '႐႖', '႐႗', '႐႘', '႐႙', '႑႐', '႑႑', '႑႒', '႑႓', '႑႔', '႑႕', '႑႖', '႑႗', '႑႘', '႑႙', '႒႐', '႒႑', '႒႒', '႒႓', '႒႔', '႒႕', '႒႖', '႒႗', '႒႘', '႒႙', '႓႐', '႓႑', '႓႒', '႓႓', '႓႔', '႓႕', '႓႖', '႓႗', '႓႘', '႓႙', '႔႐', '႔႑', '႔႒', '႔႓', '႔႔', '႔႕', '႔႖', '႔႗', '႔႘', '႔႙', '႕႐', '႕႑', '႕႒', '႕႓', '႕႔', '႕႕', '႕႖', '႕႗', '႕႘', '႕႙', '႖႐', '႖႑', '႖႒', '႖႓', '႖႔', '႖႕', '႖႖', '႖႗', '႖႘', '႖႙', '႗႐', '႗႑', '႗႒', '႗႓', '႗႔', '႗႕', '႗႖', '႗႗', '႗႘', '႗႙', '႘႐', '႘႑', '႘႒', '႘႓', '႘႔', '႘႕', '႘႖', '႘႗', '႘႘', '႘႙', '႙႐', '႙႑', '႙႒', '႙႓', '႙႔', '႙႕', '႙႖', '႙႗', '႙႘', '႙႙'], + 'meridiem' => ['ၵၢင်ၼႂ်', 'တၢမ်းၶမ်ႈ'], + + 'month' => ':count လိူၼ်', // less reliable + 'm' => ':count လိူၼ်', // less reliable + 'a_month' => ':count လိူၼ်', // less reliable + + 'week' => ':count ဝၼ်း', // less reliable + 'w' => ':count ဝၼ်း', // less reliable + 'a_week' => ':count ဝၼ်း', // less reliable + + 'hour' => ':count ຕີ', // less reliable + 'h' => ':count ຕີ', // less reliable + 'a_hour' => ':count ຕີ', // less reliable + + 'minute' => ':count ເດັກ', // less reliable + 'min' => ':count ເດັກ', // less reliable + 'a_minute' => ':count ເດັກ', // less reliable + + 'second' => ':count ဢိုၼ်ႇ', // less reliable + 's' => ':count ဢိုၼ်ႇ', // less reliable + 'a_second' => ':count ဢိုၼ်ႇ', // less reliable + + 'year' => ':count ပီ', + 'y' => ':count ပီ', + 'a_year' => ':count ပီ', + + 'day' => ':count ກາງວັນ', + 'd' => ':count ກາງວັນ', + 'a_day' => ':count ກາງວັນ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/shs.php b/libraries/Carbon/src/Carbon/Lang/shs.php new file mode 100644 index 00000000000..6500a5cce43 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/shs.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/shs_CA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/shs_CA.php b/libraries/Carbon/src/Carbon/Lang/shs_CA.php new file mode 100644 index 00000000000..4850338a944 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/shs_CA.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Neskie Manuel bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Pellkwet̓min', 'Pelctsipwen̓ten', 'Pellsqépts', 'Peslléwten', 'Pell7ell7é7llqten', 'Pelltspéntsk', 'Pelltqwelq̓wél̓t', 'Pellct̓éxel̓cten', 'Pesqelqlélten', 'Pesllwélsten', 'Pellc7ell7é7llcwten̓', 'Pelltetétq̓em'], + 'months_short' => ['Kwe', 'Tsi', 'Sqe', 'Éwt', 'Ell', 'Tsp', 'Tqw', 'Ct̓é', 'Qel', 'Wél', 'U7l', 'Tet'], + 'weekdays' => ['Sxetspesq̓t', 'Spetkesq̓t', 'Selesq̓t', 'Skellesq̓t', 'Smesesq̓t', 'Stselkstesq̓t', 'Stqmekstesq̓t'], + 'weekdays_short' => ['Sxe', 'Spe', 'Sel', 'Ske', 'Sme', 'Sts', 'Stq'], + 'weekdays_min' => ['Sxe', 'Spe', 'Sel', 'Ske', 'Sme', 'Sts', 'Stq'], + 'day_of_first_week_of_year' => 1, + + 'year' => ':count sqlélten', // less reliable + 'y' => ':count sqlélten', // less reliable + 'a_year' => ':count sqlélten', // less reliable + + 'month' => ':count swewll', // less reliable + 'm' => ':count swewll', // less reliable + 'a_month' => ':count swewll', // less reliable + + 'hour' => ':count seqwlút', // less reliable + 'h' => ':count seqwlút', // less reliable + 'a_hour' => ':count seqwlút', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/si.php b/libraries/Carbon/src/Carbon/Lang/si.php new file mode 100644 index 00000000000..505403d368a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/si.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Serhan Apaydın + * - JD Isaacks + * - Malinda Weerasinghe (MalindaWMD) + */ +return [ + 'year' => '{1}වසර 1|වසර :count', + 'a_year' => '{1}වසරක්|වසර :count', + 'month' => '{1}මාස 1|මාස :count', + 'a_month' => '{1}මාසය|මාස :count', + 'week' => '{1}සති 1|සති :count', + 'a_week' => '{1}සතියක්|සති :count', + 'day' => '{1}දින 1|දින :count', + 'a_day' => '{1}දිනක්|දින :count', + 'hour' => '{1}පැය 1|පැය :count', + 'a_hour' => '{1}පැයක්|පැය :count', + 'minute' => '{1}මිනිත්තු 1|මිනිත්තු :count', + 'a_minute' => '{1}මිනිත්තුවක්|මිනිත්තු :count', + 'second' => '{1}තත්පර 1|තත්පර :count', + 'a_second' => '{1}තත්පර කිහිපයකට|තත්පර :count', + 'ago' => ':time කට පෙර', + 'from_now' => function ($time) { + if (preg_match('/දින \d/u', $time)) { + return $time.' න්'; + } + + return $time.' කින්'; + }, + 'before' => ':time කට පෙර', + 'after' => function ($time) { + if (preg_match('/දින \d/u', $time)) { + return $time.' න්'; + } + + return $time.' කින්'; + }, + 'diff_now' => 'දැන්', + 'diff_today' => 'අද', + 'diff_yesterday' => 'ඊයේ', + 'diff_tomorrow' => 'හෙට', + 'formats' => [ + 'LT' => 'a h:mm', + 'LTS' => 'a h:mm:ss', + 'L' => 'YYYY/MM/DD', + 'LL' => 'YYYY MMMM D', + 'LLL' => 'YYYY MMMM D, a h:mm', + 'LLLL' => 'YYYY MMMM D [වැනි] dddd, a h:mm:ss', + ], + 'calendar' => [ + 'sameDay' => '[අද] LT[ට]', + 'nextDay' => '[හෙට] LT[ට]', + 'nextWeek' => 'dddd LT[ට]', + 'lastDay' => '[ඊයේ] LT[ට]', + 'lastWeek' => '[පසුගිය] dddd LT[ට]', + 'sameElse' => 'L', + ], + 'ordinal' => ':number වැනි', + 'meridiem' => ['පෙර වරු', 'පස් වරු', 'පෙ.ව.', 'ප.ව.'], + 'months' => ['ජනවාරි', 'පෙබරවාරි', 'මාර්තු', 'අප්‍රේල්', 'මැයි', 'ජූනි', 'ජූලි', 'අගෝස්තු', 'සැප්තැම්බර්', 'ඔක්තෝබර්', 'නොවැම්බර්', 'දෙසැම්බර්'], + 'months_short' => ['ජන', 'පෙබ', 'මාර්', 'අප්', 'මැයි', 'ජූනි', 'ජූලි', 'අගෝ', 'සැප්', 'ඔක්', 'නොවැ', 'දෙසැ'], + 'weekdays' => ['ඉරිදා', 'සඳුදා', 'අඟහරුවාදා', 'බදාදා', 'බ්‍රහස්පතින්දා', 'සිකුරාදා', 'සෙනසුරාදා'], + 'weekdays_short' => ['ඉරි', 'සඳු', 'අඟ', 'බදා', 'බ්‍රහ', 'සිකු', 'සෙන'], + 'weekdays_min' => ['ඉ', 'ස', 'අ', 'බ', 'බ්‍ර', 'සි', 'සෙ'], + 'first_day_of_week' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/si_LK.php b/libraries/Carbon/src/Carbon/Lang/si_LK.php new file mode 100644 index 00000000000..eb0395de2b1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/si_LK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/si.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sid.php b/libraries/Carbon/src/Carbon/Lang/sid.php new file mode 100644 index 00000000000..b9db4e99dc8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sid.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/sid_ET.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sid_ET.php b/libraries/Carbon/src/Carbon/Lang/sid_ET.php new file mode 100644 index 00000000000..620190f8bb4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sid_ET.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + 'weekdays' => ['Sambata', 'Sanyo', 'Maakisanyo', 'Roowe', 'Hamuse', 'Arbe', 'Qidaame'], + 'weekdays_short' => ['Sam', 'San', 'Mak', 'Row', 'Ham', 'Arb', 'Qid'], + 'weekdays_min' => ['Sam', 'San', 'Mak', 'Row', 'Ham', 'Arb', 'Qid'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['soodo', 'hawwaro'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sk.php b/libraries/Carbon/src/Carbon/Lang/sk.php new file mode 100644 index 00000000000..f5b51040287 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sk.php @@ -0,0 +1,155 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Martin Suja + * - Tsutomu Kuroda + * - tjku + * - Max Melentiev + * - Juanito Fatas + * - Ivan Stana + * - Akira Matsuda + * - Christopher Dell + * - James McKinney + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Jozef Fulop + * - Nicolás Hock Isaza + * - Tom Hughes + * - Simon Hürlimann (CyT) + * - jofi + * - Jakub ADAMEC + * - Marek Adamický + * - AlterwebStudio + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +$fromNow = function ($time) { + return 'o '.strtr($time, [ + 'hodina' => 'hodinu', + 'minúta' => 'minútu', + 'sekunda' => 'sekundu', + ]); +}; + +$ago = function ($time) { + $replacements = [ + '/\bhodina\b/' => 'hodinou', + '/\bminúta\b/' => 'minútou', + '/\bsekunda\b/' => 'sekundou', + '/\bdeň\b/u' => 'dňom', + '/\btýždeň\b/u' => 'týždňom', + '/\bmesiac\b/' => 'mesiacom', + '/\brok\b/' => 'rokom', + ]; + + $replacementsPlural = [ + '/\bhodiny\b/' => 'hodinami', + '/\bminúty\b/' => 'minútami', + '/\bsekundy\b/' => 'sekundami', + '/\bdni\b/' => 'dňami', + '/\btýždne\b/' => 'týždňami', + '/\bmesiace\b/' => 'mesiacmi', + '/\broky\b/' => 'rokmi', + ]; + + foreach ($replacements + $replacementsPlural as $pattern => $replacement) { + $time = preg_replace($pattern, $replacement, $time); + } + + return "pred $time"; +}; + +return [ + 'year' => ':count rok|:count roky|:count rokov', + 'a_year' => 'rok|:count roky|:count rokov', + 'y' => ':count r', + 'month' => ':count mesiac|:count mesiace|:count mesiacov', + 'a_month' => 'mesiac|:count mesiace|:count mesiacov', + 'm' => ':count m', + 'week' => ':count týždeň|:count týždne|:count týždňov', + 'a_week' => 'týždeň|:count týždne|:count týždňov', + 'w' => ':count t', + 'day' => ':count deň|:count dni|:count dní', + 'a_day' => 'deň|:count dni|:count dní', + 'd' => ':count d', + 'hour' => ':count hodina|:count hodiny|:count hodín', + 'a_hour' => 'hodina|:count hodiny|:count hodín', + 'h' => ':count h', + 'minute' => ':count minúta|:count minúty|:count minút', + 'a_minute' => 'minúta|:count minúty|:count minút', + 'min' => ':count min', + 'second' => ':count sekunda|:count sekundy|:count sekúnd', + 'a_second' => 'sekunda|:count sekundy|:count sekúnd', + 's' => ':count s', + 'millisecond' => ':count milisekunda|:count milisekundy|:count milisekúnd', + 'a_millisecond' => 'milisekunda|:count milisekundy|:count milisekúnd', + 'ms' => ':count ms', + 'microsecond' => ':count mikrosekunda|:count mikrosekundy|:count mikrosekúnd', + 'a_microsecond' => 'mikrosekunda|:count mikrosekundy|:count mikrosekúnd', + 'µs' => ':count µs', + + 'ago' => $ago, + 'from_now' => $fromNow, + 'before' => ':time pred', + 'after' => ':time po', + + 'hour_after' => ':count hodinu|:count hodiny|:count hodín', + 'minute_after' => ':count minútu|:count minúty|:count minút', + 'second_after' => ':count sekundu|:count sekundy|:count sekúnd', + + 'hour_before' => ':count hodinu|:count hodiny|:count hodín', + 'minute_before' => ':count minútu|:count minúty|:count minút', + 'second_before' => ':count sekundu|:count sekundy|:count sekúnd', + + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' a '], + 'diff_now' => 'teraz', + 'diff_yesterday' => 'včera', + 'diff_tomorrow' => 'zajtra', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'DD. MMMM YYYY', + 'LLL' => 'D. M. HH:mm', + 'LLLL' => 'dddd D. MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[dnes o] LT', + 'nextDay' => '[zajtra o] LT', + 'lastDay' => '[včera o] LT', + 'nextWeek' => 'dddd [o] LT', + 'lastWeek' => static function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 1: + case 2: + case 4: + case 5: + return '[minulý] dddd [o] LT'; //pondelok/utorok/štvrtok/piatok + default: + return '[minulá] dddd [o] LT'; + } + }, + 'sameElse' => 'L', + ], + 'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'], + 'weekdays_short' => ['ned', 'pon', 'uto', 'str', 'štv', 'pia', 'sob'], + 'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], + 'months' => ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'meridiem' => ['dopoludnia', 'popoludní'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sk_SK.php b/libraries/Carbon/src/Carbon/Lang/sk_SK.php new file mode 100644 index 00000000000..f520cbdd486 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sk_SK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sk.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sl.php b/libraries/Carbon/src/Carbon/Lang/sl.php new file mode 100644 index 00000000000..7eff0b7bb10 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sl.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Tsutomu Kuroda + * - tjku + * - Max Melentiev + * - Juanito Fatas + * - Akira Matsuda + * - Christopher Dell + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Nicolás Hock Isaza + * - Miha Rebernik + * - Gal Jakič (morpheus7CS) + * - Glavić + * - Anže Časar + * - Lovro Tramšek (Lovro1107) + * - burut13 + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count leto|:count leti|:count leta|:count let', + 'y' => ':count leto|:count leti|:count leta|:count let', + 'month' => ':count mesec|:count meseca|:count mesece|:count mesecev', + 'm' => ':count mes.', + 'week' => ':count teden|:count tedna|:count tedne|:count tednov', + 'w' => ':count ted.', + 'day' => ':count dan|:count dni|:count dni|:count dni', + 'd' => ':count dan|:count dni|:count dni|:count dni', + 'hour' => ':count ura|:count uri|:count ure|:count ur', + 'h' => ':count h', + 'minute' => ':count minuta|:count minuti|:count minute|:count minut', + 'min' => ':count min.', + 'second' => ':count sekunda|:count sekundi|:count sekunde|:count sekund', + 'a_second' => '{1}nekaj sekund|:count sekunda|:count sekundi|:count sekunde|:count sekund', + 's' => ':count s', + + 'year_ago' => ':count letom|:count letoma|:count leti|:count leti', + 'y_ago' => ':count letom|:count letoma|:count leti|:count leti', + 'month_ago' => ':count mesecem|:count mesecema|:count meseci|:count meseci', + 'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni', + 'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', + 'd_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', + 'hour_ago' => ':count uro|:count urama|:count urami|:count urami', + 'minute_ago' => ':count minuto|:count minutama|:count minutami|:count minutami', + 'second_ago' => ':count sekundo|:count sekundama|:count sekundami|:count sekundami', + + 'day_from_now' => ':count dan|:count dneva|:count dni|:count dni', + 'd_from_now' => ':count dan|:count dneva|:count dni|:count dni', + 'hour_from_now' => ':count uro|:count uri|:count ure|:count ur', + 'minute_from_now' => ':count minuto|:count minuti|:count minute|:count minut', + 'second_from_now' => ':count sekundo|:count sekundi|:count sekunde|:count sekund', + + 'ago' => 'pred :time', + 'from_now' => 'čez :time', + 'after' => ':time kasneje', + 'before' => ':time prej', + + 'diff_now' => 'ravnokar', + 'diff_today' => 'danes', + 'diff_today_regexp' => 'danes(?:\\s+ob)?', + 'diff_yesterday' => 'včeraj', + 'diff_yesterday_regexp' => 'včeraj(?:\\s+ob)?', + 'diff_tomorrow' => 'jutri', + 'diff_tomorrow_regexp' => 'jutri(?:\\s+ob)?', + 'diff_before_yesterday' => 'predvčerajšnjim', + 'diff_after_tomorrow' => 'pojutrišnjem', + + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'period_start_date' => 'od :date', + 'period_end_date' => 'do :date', + + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY H:mm', + 'LLLL' => 'dddd, D. MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[danes ob] LT', + 'nextDay' => '[jutri ob] LT', + 'nextWeek' => 'dddd [ob] LT', + 'lastDay' => '[včeraj ob] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[preteklo] [nedeljo] [ob] LT'; + case 1: + return '[pretekli] [ponedeljek] [ob] LT'; + case 2: + return '[pretekli] [torek] [ob] LT'; + case 3: + return '[preteklo] [sredo] [ob] LT'; + case 4: + return '[pretekli] [četrtek] [ob] LT'; + case 5: + return '[pretekli] [petek] [ob] LT'; + case 6: + return '[preteklo] [soboto] [ob] LT'; + } + }, + 'sameElse' => 'L', + ], + 'months' => ['januar', 'februar', 'marec', 'april', 'maj', 'junij', 'julij', 'avgust', 'september', 'oktober', 'november', 'december'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec'], + 'weekdays' => ['nedelja', 'ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota'], + 'weekdays_short' => ['ned', 'pon', 'tor', 'sre', 'čet', 'pet', 'sob'], + 'weekdays_min' => ['ne', 'po', 'to', 'sr', 'če', 'pe', 'so'], + 'list' => [', ', ' in '], + 'meridiem' => ['dopoldan', 'popoldan'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sl_SI.php b/libraries/Carbon/src/Carbon/Lang/sl_SI.php new file mode 100644 index 00000000000..aad7ab61d15 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sl_SI.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sm.php b/libraries/Carbon/src/Carbon/Lang/sm.php new file mode 100644 index 00000000000..814c1ff6658 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sm.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/sm_WS.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sm_WS.php b/libraries/Carbon/src/Carbon/Lang/sm_WS.php new file mode 100644 index 00000000000..d80a2d508a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sm_WS.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Ianuari', 'Fepuari', 'Mati', 'Aperila', 'Me', 'Iuni', 'Iulai', 'Auguso', 'Setema', 'Oketopa', 'Novema', 'Tesema'], + 'months_short' => ['Ian', 'Fep', 'Mat', 'Ape', 'Me', 'Iun', 'Iul', 'Aug', 'Set', 'Oke', 'Nov', 'Tes'], + 'weekdays' => ['Aso Sa', 'Aso Gafua', 'Aso Lua', 'Aso Lulu', 'Aso Tofi', 'Aso Farail', 'Aso To\'ana\'i'], + 'weekdays_short' => ['Aso Sa', 'Aso Gaf', 'Aso Lua', 'Aso Lul', 'Aso Tof', 'Aso Far', 'Aso To\''], + 'weekdays_min' => ['Aso Sa', 'Aso Gaf', 'Aso Lua', 'Aso Lul', 'Aso Tof', 'Aso Far', 'Aso To\''], + + 'hour' => ':count uati', // less reliable + 'h' => ':count uati', // less reliable + 'a_hour' => ':count uati', // less reliable + + 'minute' => ':count itiiti', // less reliable + 'min' => ':count itiiti', // less reliable + 'a_minute' => ':count itiiti', // less reliable + + 'second' => ':count lua', // less reliable + 's' => ':count lua', // less reliable + 'a_second' => ':count lua', // less reliable + + 'year' => ':count tausaga', + 'y' => ':count tausaga', + 'a_year' => ':count tausaga', + + 'month' => ':count māsina', + 'm' => ':count māsina', + 'a_month' => ':count māsina', + + 'week' => ':count vaiaso', + 'w' => ':count vaiaso', + 'a_week' => ':count vaiaso', + + 'day' => ':count aso', + 'd' => ':count aso', + 'a_day' => ':count aso', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/smn.php b/libraries/Carbon/src/Carbon/Lang/smn.php new file mode 100644 index 00000000000..71a4bbdfb8a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/smn.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['ip.', 'ep.'], + 'weekdays' => ['pasepeeivi', 'vuossaargâ', 'majebaargâ', 'koskoho', 'tuorâstuv', 'vástuppeeivi', 'lávurduv'], + 'weekdays_short' => ['pas', 'vuo', 'maj', 'kos', 'tuo', 'vás', 'láv'], + 'weekdays_min' => ['pa', 'vu', 'ma', 'ko', 'tu', 'vá', 'lá'], + 'weekdays_standalone' => ['pasepeivi', 'vuossargâ', 'majebargâ', 'koskokko', 'tuorâstâh', 'vástuppeivi', 'lávurdâh'], + 'months' => ['uđđâivemáánu', 'kuovâmáánu', 'njuhčâmáánu', 'cuáŋuimáánu', 'vyesimáánu', 'kesimáánu', 'syeinimáánu', 'porgemáánu', 'čohčâmáánu', 'roovvâdmáánu', 'skammâmáánu', 'juovlâmáánu'], + 'months_short' => ['uđiv', 'kuovâ', 'njuhčâ', 'cuáŋui', 'vyesi', 'kesi', 'syeini', 'porge', 'čohčâ', 'roovvâd', 'skammâ', 'juovlâ'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'H.mm', + 'LTS' => 'H.mm.ss', + 'L' => 'D.M.YYYY', + 'LL' => 'MMM D. YYYY', + 'LLL' => 'MMMM D. YYYY H.mm', + 'LLLL' => 'dddd, MMMM D. YYYY H.mm', + ], + + 'hour' => ':count äigi', // less reliable + 'h' => ':count äigi', // less reliable + 'a_hour' => ':count äigi', // less reliable + + 'year' => ':count ihe', + 'y' => ':count ihe', + 'a_year' => ':count ihe', + + 'month' => ':count mánuppaje', + 'm' => ':count mánuppaje', + 'a_month' => ':count mánuppaje', + + 'week' => ':count okko', + 'w' => ':count okko', + 'a_week' => ':count okko', + + 'day' => ':count peivi', + 'd' => ':count peivi', + 'a_day' => ':count peivi', + + 'minute' => ':count miinut', + 'min' => ':count miinut', + 'a_minute' => ':count miinut', + + 'second' => ':count nubbe', + 's' => ':count nubbe', + 'a_second' => ':count nubbe', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sn.php b/libraries/Carbon/src/Carbon/Lang/sn.php new file mode 100644 index 00000000000..d9eca1bc252 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sn.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['a', 'p'], + 'weekdays' => ['Svondo', 'Muvhuro', 'Chipiri', 'Chitatu', 'China', 'Chishanu', 'Mugovera'], + 'weekdays_short' => ['Svo', 'Muv', 'Chp', 'Cht', 'Chn', 'Chs', 'Mug'], + 'weekdays_min' => ['Sv', 'Mu', 'Cp', 'Ct', 'Cn', 'Cs', 'Mg'], + 'months' => ['Ndira', 'Kukadzi', 'Kurume', 'Kubvumbi', 'Chivabvu', 'Chikumi', 'Chikunguru', 'Nyamavhuvhu', 'Gunyana', 'Gumiguru', 'Mbudzi', 'Zvita'], + 'months_short' => ['Ndi', 'Kuk', 'Kur', 'Kub', 'Chv', 'Chk', 'Chg', 'Nya', 'Gun', 'Gum', 'Mbu', 'Zvi'], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'YYYY MMMM D, dddd HH:mm', + ], + + 'year' => 'makore :count', + 'y' => 'makore :count', + 'a_year' => 'makore :count', + + 'month' => 'mwedzi :count', + 'm' => 'mwedzi :count', + 'a_month' => 'mwedzi :count', + + 'week' => 'vhiki :count', + 'w' => 'vhiki :count', + 'a_week' => 'vhiki :count', + + 'day' => 'mazuva :count', + 'd' => 'mazuva :count', + 'a_day' => 'mazuva :count', + + 'hour' => 'maawa :count', + 'h' => 'maawa :count', + 'a_hour' => 'maawa :count', + + 'minute' => 'minitsi :count', + 'min' => 'minitsi :count', + 'a_minute' => 'minitsi :count', + + 'second' => 'sekonzi :count', + 's' => 'sekonzi :count', + 'a_second' => 'sekonzi :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/so.php b/libraries/Carbon/src/Carbon/Lang/so.php new file mode 100644 index 00000000000..1bdaaefbac6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/so.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Author: + * - Abdifatah Abdilahi(@abdifatahz) + */ +return [ + 'year' => ':count sanad|:count sanadood', + 'a_year' => 'sanad|:count sanadood', + 'y' => '{1}:countsn|{0}:countsns|]1,Inf[:countsn', + 'month' => ':count bil|:count bilood', + 'a_month' => 'bil|:count bilood', + 'm' => ':countbil', + 'week' => ':count isbuuc', + 'a_week' => 'isbuuc|:count isbuuc', + 'w' => ':countis', + 'day' => ':count maalin|:count maalmood', + 'a_day' => 'maalin|:count maalmood', + 'd' => ':countml', + 'hour' => ':count saac', + 'a_hour' => 'saacad|:count saac', + 'h' => ':countsc', + 'minute' => ':count daqiiqo', + 'a_minute' => 'daqiiqo|:count daqiiqo', + 'min' => ':countdq', + 'second' => ':count ilbidhiqsi', + 'a_second' => 'xooga ilbidhiqsiyo|:count ilbidhiqsi', + 's' => ':countil', + 'ago' => ':time kahor', + 'from_now' => ':time gudahood', + 'after' => ':time kedib', + 'before' => ':time kahor', + 'diff_now' => 'hada', + 'diff_today' => 'maanta', + 'diff_today_regexp' => 'maanta(?:\s+markay\s+(?:tahay|ahayd))?', + 'diff_yesterday' => 'shalayto', + 'diff_yesterday_regexp' => 'shalayto(?:\s+markay\s+ahayd)?', + 'diff_tomorrow' => 'beri', + 'diff_tomorrow_regexp' => 'beri(?:\s+markay\s+tahay)?', + 'diff_before_yesterday' => 'doraato', + 'diff_after_tomorrow' => 'saadanbe', + 'period_recurrences' => 'mar|:count jeer', + 'period_interval' => ':interval kasta', + 'period_start_date' => 'laga bilaabo :date', + 'period_end_date' => 'ilaa :date', + 'months' => ['Janaayo', 'Febraayo', 'Abriil', 'Maajo', 'Juun', 'Luuliyo', 'Agoosto', 'Sebteembar', 'Oktoobar', 'Nofeembar', 'Diseembar'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Abr', 'Mjo', 'Jun', 'Lyo', 'Agt', 'Seb', 'Okt', 'Nof', 'Dis'], + 'weekdays' => ['Axad', 'Isniin', 'Talaada', 'Arbaca', 'Khamiis', 'Jimce', 'Sabti'], + 'weekdays_short' => ['Axd', 'Isn', 'Tal', 'Arb', 'Kha', 'Jim', 'Sbt'], + 'weekdays_min' => ['Ax', 'Is', 'Ta', 'Ar', 'Kh', 'Ji', 'Sa'], + 'list' => [', ', ' and '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'calendar' => [ + 'sameDay' => '[Maanta markay tahay] LT', + 'nextDay' => '[Beri markay tahay] LT', + 'nextWeek' => 'dddd [markay tahay] LT', + 'lastDay' => '[Shalay markay ahayd] LT', + 'lastWeek' => '[Hore] dddd [Markay ahayd] LT', + 'sameElse' => 'L', + ], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/so_DJ.php b/libraries/Carbon/src/Carbon/Lang/so_DJ.php new file mode 100644 index 00000000000..fdcd137e94c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/so_DJ.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/so.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/so_ET.php b/libraries/Carbon/src/Carbon/Lang/so_ET.php new file mode 100644 index 00000000000..605132d583f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/so_ET.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return require __DIR__.'/so.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/so_KE.php b/libraries/Carbon/src/Carbon/Lang/so_KE.php new file mode 100644 index 00000000000..605132d583f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/so_KE.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return require __DIR__.'/so.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/so_SO.php b/libraries/Carbon/src/Carbon/Lang/so_SO.php new file mode 100644 index 00000000000..605132d583f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/so_SO.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return require __DIR__.'/so.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sq.php b/libraries/Carbon/src/Carbon/Lang/sq.php new file mode 100644 index 00000000000..7368ee4edda --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sq.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - JD Isaacks + * - Fadion Dashi + */ +return [ + 'year' => ':count vit|:count vjet', + 'a_year' => 'një vit|:count vite', + 'y' => ':count v.', + 'month' => ':count muaj', + 'a_month' => 'një muaj|:count muaj', + 'm' => ':count muaj', + 'week' => ':count javë', + 'a_week' => ':count javë|:count javë', + 'w' => ':count j.', + 'day' => ':count ditë', + 'a_day' => 'një ditë|:count ditë', + 'd' => ':count d.', + 'hour' => ':count orë', + 'a_hour' => 'një orë|:count orë', + 'h' => ':count o.', + 'minute' => ':count minutë|:count minuta', + 'a_minute' => 'një minutë|:count minuta', + 'min' => ':count min.', + 'second' => ':count sekondë|:count sekonda', + 'a_second' => 'disa sekonda|:count sekonda', + 's' => ':count s.', + 'ago' => ':time më parë', + 'from_now' => 'në :time', + 'after' => ':time pas', + 'before' => ':time para', + 'diff_now' => 'tani', + 'diff_today' => 'Sot', + 'diff_today_regexp' => 'Sot(?:\\s+në)?', + 'diff_yesterday' => 'dje', + 'diff_yesterday_regexp' => 'Dje(?:\\s+në)?', + 'diff_tomorrow' => 'nesër', + 'diff_tomorrow_regexp' => 'Nesër(?:\\s+në)?', + 'diff_before_yesterday' => 'pardje', + 'diff_after_tomorrow' => 'pasnesër', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Sot në] LT', + 'nextDay' => '[Nesër në] LT', + 'nextWeek' => 'dddd [në] LT', + 'lastDay' => '[Dje në] LT', + 'lastWeek' => 'dddd [e kaluar në] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'meridiem' => ['PD', 'MD'], + 'months' => ['janar', 'shkurt', 'mars', 'prill', 'maj', 'qershor', 'korrik', 'gusht', 'shtator', 'tetor', 'nëntor', 'dhjetor'], + 'months_short' => ['jan', 'shk', 'mar', 'pri', 'maj', 'qer', 'kor', 'gus', 'sht', 'tet', 'nën', 'dhj'], + 'weekdays' => ['e diel', 'e hënë', 'e martë', 'e mërkurë', 'e enjte', 'e premte', 'e shtunë'], + 'weekdays_short' => ['die', 'hën', 'mar', 'mër', 'enj', 'pre', 'sht'], + 'weekdays_min' => ['d', 'h', 'ma', 'më', 'e', 'p', 'sh'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' dhe '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sq_AL.php b/libraries/Carbon/src/Carbon/Lang/sq_AL.php new file mode 100644 index 00000000000..faa920b09a7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sq_AL.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sq.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sq_MK.php b/libraries/Carbon/src/Carbon/Lang/sq_MK.php new file mode 100644 index 00000000000..968536cdaa5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sq_MK.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/sq.php', [ + 'formats' => [ + 'L' => 'D.M.YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY, HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sq_XK.php b/libraries/Carbon/src/Carbon/Lang/sq_XK.php new file mode 100644 index 00000000000..968536cdaa5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sq_XK.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/sq.php', [ + 'formats' => [ + 'L' => 'D.M.YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY, HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sr.php b/libraries/Carbon/src/Carbon/Lang/sr.php new file mode 100644 index 00000000000..3a3aae2ee41 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - shaishavgandhi05 + * - Serhan Apaydın + * - JD Isaacks + * - Glavić + * - Milos Sakovic + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count godina|:count godine|:count godina', + 'y' => ':count g.', + 'month' => ':count mesec|:count meseca|:count meseci', + 'm' => ':count mj.', + 'week' => ':count nedelja|:count nedelje|:count nedelja', + 'w' => ':count ned.', + 'day' => ':count dan|:count dana|:count dana', + 'd' => ':count d.', + 'hour' => ':count sat|:count sata|:count sati', + 'h' => ':count č.', + 'minute' => ':count minut|:count minuta|:count minuta', + 'min' => ':count min.', + 'second' => ':count sekundu|:count sekunde|:count sekundi', + 's' => ':count sek.', + 'ago' => 'pre :time', + 'from_now' => 'za :time', + 'after' => 'nakon :time', + 'before' => 'pre :time', + + 'year_from_now' => ':count godinu|:count godine|:count godina', + 'year_ago' => ':count godinu|:count godine|:count godina', + 'week_from_now' => ':count nedelju|:count nedelje|:count nedelja', + 'week_ago' => ':count nedelju|:count nedelje|:count nedelja', + + 'diff_now' => 'upravo sada', + 'diff_today' => 'danas', + 'diff_today_regexp' => 'danas(?:\\s+u)?', + 'diff_yesterday' => 'juče', + 'diff_yesterday_regexp' => 'juče(?:\\s+u)?', + 'diff_tomorrow' => 'sutra', + 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', + 'diff_before_yesterday' => 'prekjuče', + 'diff_after_tomorrow' => 'preksutra', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY H:mm', + 'LLLL' => 'dddd, D. MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[danas u] LT', + 'nextDay' => '[sutra u] LT', + 'nextWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[u nedelju u] LT'; + case 3: + return '[u sredu u] LT'; + case 6: + return '[u subotu u] LT'; + default: + return '[u] dddd [u] LT'; + } + }, + 'lastDay' => '[juče u] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[prošle nedelje u] LT'; + case 1: + return '[prošlog ponedeljka u] LT'; + case 2: + return '[prošlog utorka u] LT'; + case 3: + return '[prošle srede u] LT'; + case 4: + return '[prošlog četvrtka u] LT'; + case 5: + return '[prošlog petka u] LT'; + default: + return '[prošle subote u] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'], + 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'], + 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], + 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sre.', 'čet.', 'pet.', 'sub.'], + 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' i '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Cyrl.php b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl.php new file mode 100644 index 00000000000..a3f2a346648 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - shaishavgandhi05 + * - Serhan Apaydın + * - JD Isaacks + * - Glavić + * - Nikola Zeravcic + * - Milos Sakovic + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +return [ + 'year' => ':count година|:count године|:count година', + 'y' => ':count г.', + 'month' => ':count месец|:count месеца|:count месеци', + 'm' => ':count м.', + 'week' => ':count недеља|:count недеље|:count недеља', + 'w' => ':count нед.', + 'day' => ':count дан|:count дана|:count дана', + 'd' => ':count д.', + 'hour' => ':count сат|:count сата|:count сати', + 'h' => ':count ч.', + 'minute' => ':count минут|:count минута|:count минута', + 'min' => ':count мин.', + 'second' => ':count секунд|:count секунде|:count секунди', + 's' => ':count сек.', + 'ago' => 'пре :time', + 'from_now' => 'за :time', + 'after' => ':time након', + 'before' => ':time пре', + 'year_from_now' => ':count годину|:count године|:count година', + 'year_ago' => ':count годину|:count године|:count година', + 'week_from_now' => ':count недељу|:count недеље|:count недеља', + 'week_ago' => ':count недељу|:count недеље|:count недеља', + 'diff_now' => 'управо сада', + 'diff_today' => 'данас', + 'diff_today_regexp' => 'данас(?:\\s+у)?', + 'diff_yesterday' => 'јуче', + 'diff_yesterday_regexp' => 'јуче(?:\\s+у)?', + 'diff_tomorrow' => 'сутра', + 'diff_tomorrow_regexp' => 'сутра(?:\\s+у)?', + 'diff_before_yesterday' => 'прекјуче', + 'diff_after_tomorrow' => 'прекосутра', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY H:mm', + 'LLLL' => 'dddd, D. MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[данас у] LT', + 'nextDay' => '[сутра у] LT', + 'nextWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[у недељу у] LT'; + case 3: + return '[у среду у] LT'; + case 6: + return '[у суботу у] LT'; + default: + return '[у] dddd [у] LT'; + } + }, + 'lastDay' => '[јуче у] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[прошле недеље у] LT'; + case 1: + return '[прошлог понедељка у] LT'; + case 2: + return '[прошлог уторка у] LT'; + case 3: + return '[прошле среде у] LT'; + case 4: + return '[прошлог четвртка у] LT'; + case 5: + return '[прошлог петка у] LT'; + default: + return '[прошле суботе у] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'], + 'months_short' => ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'], + 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], + 'weekdays_short' => ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'], + 'weekdays_min' => ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' и '], + 'meridiem' => ['АМ', 'ПМ'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_BA.php b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_BA.php new file mode 100644 index 00000000000..8f67b8b501b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_BA.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Cyrl_BA'); +} +// @codeCoverageIgnoreEnd + +return array_replace_recursive(require __DIR__.'/sr_Cyrl.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D.M.yy.', + 'LL' => 'DD.MM.YYYY.', + 'LLL' => 'DD. MMMM YYYY. HH:mm', + 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', + ], + 'weekdays' => ['недјеља', 'понедељак', 'уторак', 'сриједа', 'четвртак', 'петак', 'субота'], + 'weekdays_short' => ['нед.', 'пон.', 'ут.', 'ср.', 'чет.', 'пет.', 'суб.'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_ME.php b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_ME.php new file mode 100644 index 00000000000..f84a4f7b7a3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_ME.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Glavić + * - Milos Sakovic + */ + +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Cyrl_ME'); +} +// @codeCoverageIgnoreEnd + +return [ + 'year' => ':count година|:count године|:count година', + 'y' => ':count г.', + 'month' => ':count мјесец|:count мјесеца|:count мјесеци', + 'm' => ':count мј.', + 'week' => ':count недјеља|:count недјеље|:count недјеља', + 'w' => ':count нед.', + 'day' => ':count дан|:count дана|:count дана', + 'd' => ':count д.', + 'hour' => ':count сат|:count сата|:count сати', + 'h' => ':count ч.', + 'minute' => ':count минут|:count минута|:count минута', + 'min' => ':count мин.', + 'second' => ':count секунд|:count секунде|:count секунди', + 's' => ':count сек.', + 'ago' => 'прије :time', + 'from_now' => 'за :time', + 'after' => ':time након', + 'before' => ':time прије', + + 'year_from_now' => ':count годину|:count године|:count година', + 'year_ago' => ':count годину|:count године|:count година', + + 'week_from_now' => ':count недјељу|:count недјеље|:count недјеља', + 'week_ago' => ':count недјељу|:count недјеље|:count недјеља', + + 'diff_now' => 'управо сада', + 'diff_today' => 'данас', + 'diff_today_regexp' => 'данас(?:\\s+у)?', + 'diff_yesterday' => 'јуче', + 'diff_yesterday_regexp' => 'јуче(?:\\s+у)?', + 'diff_tomorrow' => 'сутра', + 'diff_tomorrow_regexp' => 'сутра(?:\\s+у)?', + 'diff_before_yesterday' => 'прекјуче', + 'diff_after_tomorrow' => 'прекосјутра', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM YYYY', + 'LLL' => 'D. MMMM YYYY H:mm', + 'LLLL' => 'dddd, D. MMMM YYYY H:mm', + ], + 'calendar' => [ + 'sameDay' => '[данас у] LT', + 'nextDay' => '[сутра у] LT', + 'nextWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[у недељу у] LT'; + case 3: + return '[у среду у] LT'; + case 6: + return '[у суботу у] LT'; + default: + return '[у] dddd [у] LT'; + } + }, + 'lastDay' => '[јуче у] LT', + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[прошле недеље у] LT'; + case 1: + return '[прошлог понедељка у] LT'; + case 2: + return '[прошлог уторка у] LT'; + case 3: + return '[прошле среде у] LT'; + case 4: + return '[прошлог четвртка у] LT'; + case 5: + return '[прошлог петка у] LT'; + default: + return '[прошле суботе у] LT'; + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'], + 'months_short' => ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'], + 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], + 'weekdays_short' => ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'], + 'weekdays_min' => ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' и '], + 'meridiem' => ['АМ', 'ПМ'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_XK.php b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_XK.php new file mode 100644 index 00000000000..2080206882c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Cyrl_XK.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Cyrl_XK'); +} +// @codeCoverageIgnoreEnd + +return array_replace_recursive(require __DIR__.'/sr_Cyrl_BA.php', [ + 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Latn.php b/libraries/Carbon/src/Carbon/Lang/sr_Latn.php new file mode 100644 index 00000000000..0f3cf1a2066 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Latn.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Latn_BA.php b/libraries/Carbon/src/Carbon/Lang/sr_Latn_BA.php new file mode 100644 index 00000000000..650a142acae --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Latn_BA.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Latn_BA'); +} +// @codeCoverageIgnoreEnd + +return array_replace_recursive(require __DIR__.'/sr_Latn.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D.M.yy.', + 'LL' => 'DD.MM.YYYY.', + 'LLL' => 'DD. MMMM YYYY. HH:mm', + 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', + ], + 'weekdays' => ['nedjelja', 'ponedeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], + 'weekdays_short' => ['ned.', 'pon.', 'ut.', 'sr.', 'čet.', 'pet.', 'sub.'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Latn_ME.php b/libraries/Carbon/src/Carbon/Lang/sr_Latn_ME.php new file mode 100644 index 00000000000..4b6205afd65 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Latn_ME.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Glavić + * - Milos Sakovic + */ + +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Latn_ME'); +} +// @codeCoverageIgnoreEnd + +return array_replace_recursive(require __DIR__.'/sr.php', [ + 'month' => ':count mjesec|:count mjeseca|:count mjeseci', + 'week' => ':count nedjelja|:count nedjelje|:count nedjelja', + 'second' => ':count sekund|:count sekunde|:count sekundi', + 'ago' => 'prije :time', + 'from_now' => 'za :time', + 'after' => ':time nakon', + 'before' => ':time prije', + 'week_from_now' => ':count nedjelju|:count nedjelje|:count nedjelja', + 'week_ago' => ':count nedjelju|:count nedjelje|:count nedjelja', + 'second_ago' => ':count sekund|:count sekunde|:count sekundi', + 'diff_tomorrow' => 'sjutra', + 'calendar' => [ + 'nextDay' => '[sjutra u] LT', + 'nextWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[u nedjelju u] LT'; + case 3: + return '[u srijedu u] LT'; + case 6: + return '[u subotu u] LT'; + default: + return '[u] dddd [u] LT'; + } + }, + 'lastWeek' => function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 0: + return '[prošle nedjelje u] LT'; + case 1: + return '[prošle nedjelje u] LT'; + case 2: + return '[prošlog utorka u] LT'; + case 3: + return '[prošle srijede u] LT'; + case 4: + return '[prošlog četvrtka u] LT'; + case 5: + return '[prošlog petka u] LT'; + default: + return '[prošle subote u] LT'; + } + }, + ], + 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], + 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sr_Latn_XK.php b/libraries/Carbon/src/Carbon/Lang/sr_Latn_XK.php new file mode 100644 index 00000000000..683e1b1f4e5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_Latn_XK.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Latn_XK'); +} +// @codeCoverageIgnoreEnd + +return array_replace_recursive(require __DIR__.'/sr_Latn_BA.php', [ + 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sr_ME.php b/libraries/Carbon/src/Carbon/Lang/sr_ME.php new file mode 100644 index 00000000000..cb9b2d4fb6b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_ME.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sr_Latn_ME.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sr_RS.php b/libraries/Carbon/src/Carbon/Lang/sr_RS.php new file mode 100644 index 00000000000..4326d397a72 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_RS.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - sr_YU, sr_CS locale Danilo Segan bug-glibc-locales@gnu.org + */ +return require __DIR__.'/sr_Cyrl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sr_RS@latin.php b/libraries/Carbon/src/Carbon/Lang/sr_RS@latin.php new file mode 100644 index 00000000000..0f3cf1a2066 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sr_RS@latin.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ss.php b/libraries/Carbon/src/Carbon/Lang/ss.php new file mode 100644 index 00000000000..1d316ad1c0c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ss.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Nicolai Davies + */ +return [ + 'year' => '{1}umnyaka|:count iminyaka', + 'month' => '{1}inyanga|:count tinyanga', + 'week' => '{1}:count liviki|:count emaviki', + 'day' => '{1}lilanga|:count emalanga', + 'hour' => '{1}lihora|:count emahora', + 'minute' => '{1}umzuzu|:count emizuzu', + 'second' => '{1}emizuzwana lomcane|:count mzuzwana', + 'ago' => 'wenteka nga :time', + 'from_now' => 'nga :time', + 'diff_yesterday' => 'Itolo', + 'diff_yesterday_regexp' => 'Itolo(?:\\s+nga)?', + 'diff_today' => 'Namuhla', + 'diff_today_regexp' => 'Namuhla(?:\\s+nga)?', + 'diff_tomorrow' => 'Kusasa', + 'diff_tomorrow_regexp' => 'Kusasa(?:\\s+nga)?', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm A', + 'LLLL' => 'dddd, D MMMM YYYY h:mm A', + ], + 'calendar' => [ + 'sameDay' => '[Namuhla nga] LT', + 'nextDay' => '[Kusasa nga] LT', + 'nextWeek' => 'dddd [nga] LT', + 'lastDay' => '[Itolo nga] LT', + 'lastWeek' => 'dddd [leliphelile] [nga] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + $lastDigit = $number % 10; + + return $number.( + ((int) ($number % 100 / 10) === 1) ? 'e' : ( + ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' + ) + ); + }, + 'meridiem' => function ($hour) { + if ($hour < 11) { + return 'ekuseni'; + } + if ($hour < 15) { + return 'emini'; + } + if ($hour < 19) { + return 'entsambama'; + } + + return 'ebusuku'; + }, + 'months' => ['Bhimbidvwane', 'Indlovana', 'Indlov\'lenkhulu', 'Mabasa', 'Inkhwekhweti', 'Inhlaba', 'Kholwane', 'Ingci', 'Inyoni', 'Imphala', 'Lweti', 'Ingongoni'], + 'months_short' => ['Bhi', 'Ina', 'Inu', 'Mab', 'Ink', 'Inh', 'Kho', 'Igc', 'Iny', 'Imp', 'Lwe', 'Igo'], + 'weekdays' => ['Lisontfo', 'Umsombuluko', 'Lesibili', 'Lesitsatfu', 'Lesine', 'Lesihlanu', 'Umgcibelo'], + 'weekdays_short' => ['Lis', 'Umb', 'Lsb', 'Les', 'Lsi', 'Lsh', 'Umg'], + 'weekdays_min' => ['Li', 'Us', 'Lb', 'Lt', 'Ls', 'Lh', 'Ug'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ss_ZA.php b/libraries/Carbon/src/Carbon/Lang/ss_ZA.php new file mode 100644 index 00000000000..686f409f9cf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ss_ZA.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/ss.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/st.php b/libraries/Carbon/src/Carbon/Lang/st.php new file mode 100644 index 00000000000..5067bf31735 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/st.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/st_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/st_ZA.php b/libraries/Carbon/src/Carbon/Lang/st_ZA.php new file mode 100644 index 00000000000..7821998b1af --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/st_ZA.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Pherekgong', 'Hlakola', 'Tlhakubele', 'Mmese', 'Motsheanong', 'Phupjane', 'Phupu', 'Phato', 'Leotse', 'Mphalane', 'Pudungwana', 'Tshitwe'], + 'months_short' => ['Phe', 'Hla', 'TlH', 'Mme', 'Mot', 'Jan', 'Upu', 'Pha', 'Leo', 'Mph', 'Pud', 'Tsh'], + 'weekdays' => ['Sontaha', 'Mantaha', 'Labobedi', 'Laboraro', 'Labone', 'Labohlano', 'Moqebelo'], + 'weekdays_short' => ['Son', 'Mma', 'Bed', 'Rar', 'Ne', 'Hla', 'Moq'], + 'weekdays_min' => ['Son', 'Mma', 'Bed', 'Rar', 'Ne', 'Hla', 'Moq'], + 'day_of_first_week_of_year' => 1, + + 'week' => ':count Sontaha', // less reliable + 'w' => ':count Sontaha', // less reliable + 'a_week' => ':count Sontaha', // less reliable + + 'day' => ':count letsatsi', // less reliable + 'd' => ':count letsatsi', // less reliable + 'a_day' => ':count letsatsi', // less reliable + + 'hour' => ':count sešupanako', // less reliable + 'h' => ':count sešupanako', // less reliable + 'a_hour' => ':count sešupanako', // less reliable + + 'minute' => ':count menyane', // less reliable + 'min' => ':count menyane', // less reliable + 'a_minute' => ':count menyane', // less reliable + + 'second' => ':count thusa', // less reliable + 's' => ':count thusa', // less reliable + 'a_second' => ':count thusa', // less reliable + + 'year' => ':count selemo', + 'y' => ':count selemo', + 'a_year' => ':count selemo', + + 'month' => ':count kgwedi', + 'm' => ':count kgwedi', + 'a_month' => ':count kgwedi', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sv.php b/libraries/Carbon/src/Carbon/Lang/sv.php new file mode 100644 index 00000000000..0ef254358af --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sv.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Kristoffer Snabb + * - JD Isaacks + * - Jens Herlevsen + * - Nightpine + * - Anders Nygren (litemerafrukt) + */ +return [ + 'year' => ':count år', + 'a_year' => 'ett år|:count år', + 'y' => ':count år', + 'month' => ':count månad|:count månader', + 'a_month' => 'en månad|:count månader', + 'm' => ':count mån', + 'week' => ':count vecka|:count veckor', + 'a_week' => 'en vecka|:count veckor', + 'w' => ':count v', + 'day' => ':count dag|:count dagar', + 'a_day' => 'en dag|:count dagar', + 'd' => ':count dgr', + 'hour' => ':count timme|:count timmar', + 'a_hour' => 'en timme|:count timmar', + 'h' => ':count tim', + 'minute' => ':count minut|:count minuter', + 'a_minute' => 'en minut|:count minuter', + 'min' => ':count min', + 'second' => ':count sekund|:count sekunder', + 'a_second' => 'några sekunder|:count sekunder', + 's' => ':count s', + 'ago' => 'för :time sedan', + 'from_now' => 'om :time', + 'after' => ':time efter', + 'before' => ':time före', + 'diff_now' => 'nu', + 'diff_today' => 'I dag', + 'diff_yesterday' => 'i går', + 'diff_yesterday_regexp' => 'I går', + 'diff_tomorrow' => 'i morgon', + 'diff_tomorrow_regexp' => 'I morgon', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY [kl.] HH:mm', + 'LLLL' => 'dddd D MMMM YYYY [kl.] HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[I dag] LT', + 'nextDay' => '[I morgon] LT', + 'nextWeek' => '[På] dddd LT', + 'lastDay' => '[I går] LT', + 'lastWeek' => '[I] dddd[s] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + $lastDigit = $number % 10; + + return $number.( + ((int) ($number % 100 / 10) === 1) ? 'e' : ( + ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' + ) + ); + }, + 'months' => ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'], + 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'weekdays' => ['söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag'], + 'weekdays_short' => ['sön', 'mån', 'tis', 'ons', 'tors', 'fre', 'lör'], + 'weekdays_min' => ['sö', 'må', 'ti', 'on', 'to', 'fr', 'lö'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' och '], + 'meridiem' => ['fm', 'em'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sv_AX.php b/libraries/Carbon/src/Carbon/Lang/sv_AX.php new file mode 100644 index 00000000000..6a7092d5ec6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sv_AX.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/sv.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-dd', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sv_FI.php b/libraries/Carbon/src/Carbon/Lang/sv_FI.php new file mode 100644 index 00000000000..5a0484f96af --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sv_FI.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sv.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sv_SE.php b/libraries/Carbon/src/Carbon/Lang/sv_SE.php new file mode 100644 index 00000000000..5a0484f96af --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sv_SE.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/sv.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/sw.php b/libraries/Carbon/src/Carbon/Lang/sw.php new file mode 100644 index 00000000000..2068c4a03b5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sw.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - leyluj + * - Josh Soref + * - ryanhart2 + */ +return [ + 'year' => 'mwaka :count|miaka :count', + 'a_year' => 'mwaka mmoja|miaka :count', + 'y' => 'mwaka :count|miaka :count', + 'month' => 'mwezi :count|miezi :count', + 'a_month' => 'mwezi mmoja|miezi :count', + 'm' => 'mwezi :count|miezi :count', + 'week' => 'wiki :count', + 'a_week' => 'wiki mmoja|wiki :count', + 'w' => 'w. :count', + 'day' => 'siku :count', + 'a_day' => 'siku moja|masiku :count', + 'd' => 'si. :count', + 'hour' => 'saa :count|masaa :count', + 'a_hour' => 'saa limoja|masaa :count', + 'h' => 'saa :count|masaa :count', + 'minute' => 'dakika :count', + 'a_minute' => 'dakika moja|dakika :count', + 'min' => 'd. :count', + 'second' => 'sekunde :count', + 'a_second' => 'hivi punde|sekunde :count', + 's' => 'se. :count', + 'ago' => 'tokea :time', + 'from_now' => ':time baadaye', + 'after' => ':time baada', + 'before' => ':time kabla', + 'diff_now' => 'sasa hivi', + 'diff_today' => 'leo', + 'diff_today_regexp' => 'leo(?:\\s+saa)?', + 'diff_yesterday' => 'jana', + 'diff_tomorrow' => 'kesho', + 'diff_tomorrow_regexp' => 'kesho(?:\\s+saa)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[leo saa] LT', + 'nextDay' => '[kesho saa] LT', + 'nextWeek' => '[wiki ijayo] dddd [saat] LT', + 'lastDay' => '[jana] LT', + 'lastWeek' => '[wiki iliyopita] dddd [saat] LT', + 'sameElse' => 'L', + ], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['Jpl', 'Jtat', 'Jnne', 'Jtan', 'Alh', 'Ijm', 'Jmos'], + 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' na '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/sw_CD.php b/libraries/Carbon/src/Carbon/Lang/sw_CD.php new file mode 100644 index 00000000000..0b1ef5a236d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sw_CD.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/sw.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sw_KE.php b/libraries/Carbon/src/Carbon/Lang/sw_KE.php new file mode 100644 index 00000000000..22e64cc2d63 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sw_KE.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kamusi Project Martin Benjamin locales@kamusi.org + */ +return array_replace_recursive(require __DIR__.'/sw.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], + 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['asubuhi', 'alasiri'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sw_TZ.php b/libraries/Carbon/src/Carbon/Lang/sw_TZ.php new file mode 100644 index 00000000000..f20156ddf0d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sw_TZ.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kamusi Project Martin Benjamin locales@kamusi.org + */ +return array_replace_recursive(require __DIR__.'/sw.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], + 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['asubuhi', 'alasiri'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/sw_UG.php b/libraries/Carbon/src/Carbon/Lang/sw_UG.php new file mode 100644 index 00000000000..0b1ef5a236d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/sw_UG.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/sw.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/szl.php b/libraries/Carbon/src/Carbon/Lang/szl.php new file mode 100644 index 00000000000..27df3ce0f8a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/szl.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/szl_PL.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/szl_PL.php b/libraries/Carbon/src/Carbon/Lang/szl_PL.php new file mode 100644 index 00000000000..b2f2e1b5ae0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/szl_PL.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - szl_PL locale Przemyslaw Buczkowski libc-alpha@sourceware.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['styczyń', 'luty', 'merc', 'kwjeciyń', 'moj', 'czyrwjyń', 'lipjyń', 'siyrpjyń', 'wrzesiyń', 'październik', 'listopad', 'grudziyń'], + 'months_short' => ['sty', 'lut', 'mer', 'kwj', 'moj', 'czy', 'lip', 'siy', 'wrz', 'paź', 'lis', 'gru'], + 'weekdays' => ['niydziela', 'pyńdziŏek', 'wtŏrek', 'strzŏda', 'sztwortek', 'pjōntek', 'sobŏta'], + 'weekdays_short' => ['niy', 'pyń', 'wtŏ', 'str', 'szt', 'pjō', 'sob'], + 'weekdays_min' => ['niy', 'pyń', 'wtŏ', 'str', 'szt', 'pjō', 'sob'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count rok', + 'y' => ':count rok', + 'a_year' => ':count rok', + + 'month' => ':count mjeśůnc', + 'm' => ':count mjeśůnc', + 'a_month' => ':count mjeśůnc', + + 'week' => ':count tydźyń', + 'w' => ':count tydźyń', + 'a_week' => ':count tydźyń', + + 'day' => ':count dźyń', + 'd' => ':count dźyń', + 'a_day' => ':count dźyń', + + 'hour' => ':count godzina', + 'h' => ':count godzina', + 'a_hour' => ':count godzina', + + 'minute' => ':count minuta', + 'min' => ':count minuta', + 'a_minute' => ':count minuta', + + 'second' => ':count sekůnda', + 's' => ':count sekůnda', + 'a_second' => ':count sekůnda', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ta.php b/libraries/Carbon/src/Carbon/Lang/ta.php new file mode 100644 index 00000000000..c9507a66538 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ta.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - François B + * - JD Isaacks + * - Satheez + */ +return [ + 'year' => ':count வருடம்|:count ஆண்டுகள்', + 'a_year' => 'ஒரு வருடம்|:count ஆண்டுகள்', + 'y' => ':count வருட.|:count ஆண்.', + 'month' => ':count மாதம்|:count மாதங்கள்', + 'a_month' => 'ஒரு மாதம்|:count மாதங்கள்', + 'm' => ':count மாத.', + 'week' => ':count வாரம்|:count வாரங்கள்', + 'a_week' => 'ஒரு வாரம்|:count வாரங்கள்', + 'w' => ':count வார.', + 'day' => ':count நாள்|:count நாட்கள்', + 'a_day' => 'ஒரு நாள்|:count நாட்கள்', + 'd' => ':count நாள்|:count நாட்.', + 'hour' => ':count மணி நேரம்|:count மணி நேரம்', + 'a_hour' => 'ஒரு மணி நேரம்|:count மணி நேரம்', + 'h' => ':count மணி.', + 'minute' => ':count நிமிடம்|:count நிமிடங்கள்', + 'a_minute' => 'ஒரு நிமிடம்|:count நிமிடங்கள்', + 'min' => ':count நிமி.', + 'second' => ':count சில விநாடிகள்|:count விநாடிகள்', + 'a_second' => 'ஒரு சில விநாடிகள்|:count விநாடிகள்', + 's' => ':count விநா.', + 'ago' => ':time முன்', + 'from_now' => ':time இல்', + 'before' => ':time முன்', + 'after' => ':time பின்', + 'diff_now' => 'இப்போது', + 'diff_today' => 'இன்று', + 'diff_yesterday' => 'நேற்று', + 'diff_tomorrow' => 'நாளை', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[இன்று] LT', + 'nextDay' => '[நாளை] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[நேற்று] LT', + 'lastWeek' => '[கடந்த வாரம்] dddd, LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':numberவது', + 'meridiem' => function ($hour) { + if ($hour < 2) { + return ' யாமம்'; + } + if ($hour < 6) { + return ' வைகறை'; + } + if ($hour < 10) { + return ' காலை'; + } + if ($hour < 14) { + return ' நண்பகல்'; + } + if ($hour < 18) { + return ' எற்பாடு'; + } + if ($hour < 22) { + return ' மாலை'; + } + + return ' யாமம்'; + }, + 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டெம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], + 'months_short' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டெம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], + 'weekdays' => ['ஞாயிற்றுக்கிழமை', 'திங்கட்கிழமை', 'செவ்வாய்கிழமை', 'புதன்கிழமை', 'வியாழக்கிழமை', 'வெள்ளிக்கிழமை', 'சனிக்கிழமை'], + 'weekdays_short' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], + 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' மற்றும் '], + 'weekend' => [0, 0], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ta_IN.php b/libraries/Carbon/src/Carbon/Lang/ta_IN.php new file mode 100644 index 00000000000..f3f1d34f3af --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ta_IN.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/ta.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], + 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], + 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], + 'weekdays_short' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], + 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['காலை', 'மாலை'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ta_LK.php b/libraries/Carbon/src/Carbon/Lang/ta_LK.php new file mode 100644 index 00000000000..bb621fac340 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ta_LK.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - J.Yogaraj 94-777-315206 yogaraj.ubuntu@gmail.com + */ +return array_replace_recursive(require __DIR__.'/ta.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], + 'months_short' => ['ஜன', 'பிப்', 'மார்', 'ஏப்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக', 'செப்', 'அக்', 'நவ', 'டிச'], + 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], + 'weekdays_short' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], + 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['காலை', 'மாலை'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ta_MY.php b/libraries/Carbon/src/Carbon/Lang/ta_MY.php new file mode 100644 index 00000000000..a4b14035ebf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ta_MY.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ta.php', [ + 'formats' => [ + 'LT' => 'a h:mm', + 'LTS' => 'a h:mm:ss', + 'L' => 'D/M/yy', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM, YYYY, a h:mm', + 'LLLL' => 'dddd, D MMMM, YYYY, a h:mm', + ], + 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], + 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], + 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], + 'weekdays_short' => ['ஞாயி.', 'திங்.', 'செவ்.', 'புத.', 'வியா.', 'வெள்.', 'சனி'], + 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], + 'first_day_of_week' => 1, + 'meridiem' => ['மு.ப', 'பி.ப'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ta_SG.php b/libraries/Carbon/src/Carbon/Lang/ta_SG.php new file mode 100644 index 00000000000..5c32ded92b0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ta_SG.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ta.php', [ + 'formats' => [ + 'LT' => 'a h:mm', + 'LTS' => 'a h:mm:ss', + 'L' => 'D/M/yy', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM, YYYY, a h:mm', + 'LLLL' => 'dddd, D MMMM, YYYY, a h:mm', + ], + 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], + 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], + 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], + 'weekdays_short' => ['ஞாயி.', 'திங்.', 'செவ்.', 'புத.', 'வியா.', 'வெள்.', 'சனி'], + 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], + 'meridiem' => ['மு.ப', 'பி.ப'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tcy.php b/libraries/Carbon/src/Carbon/Lang/tcy.php new file mode 100644 index 00000000000..8fb240008c7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tcy.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/tcy_IN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/tcy_IN.php b/libraries/Carbon/src/Carbon/Lang/tcy_IN.php new file mode 100644 index 00000000000..016d5a5bb18 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tcy_IN.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IndLinux.org, Samsung Electronics Co., Ltd. alexey.merzlyakov@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['ಜನವರಿ', 'ಫೆಬ್ರುವರಿ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್‌‌', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂಬರ್‌', 'ಅಕ್ಟೋಬರ್', 'ನವೆಂಬರ್', 'ಡಿಸೆಂಬರ್'], + 'months_short' => ['ಜ', 'ಫೆ', 'ಮಾ', 'ಏ', 'ಮೇ', 'ಜೂ', 'ಜು', 'ಆ', 'ಸೆ', 'ಅ', 'ನ', 'ಡಿ'], + 'weekdays' => ['ಐಥಾರ', 'ಸೋಮಾರ', 'ಅಂಗರೆ', 'ಬುಧಾರ', 'ಗುರುವಾರ', 'ಶುಕ್ರರ', 'ಶನಿವಾರ'], + 'weekdays_short' => ['ಐ', 'ಸೋ', 'ಅಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], + 'weekdays_min' => ['ಐ', 'ಸೋ', 'ಅಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ಕಾಂಡೆ', 'ಬಯ್ಯ'], + + 'year' => ':count ನೀರ್', // less reliable + 'y' => ':count ನೀರ್', // less reliable + 'a_year' => ':count ನೀರ್', // less reliable + + 'month' => ':count ಮೀನ್', // less reliable + 'm' => ':count ಮೀನ್', // less reliable + 'a_month' => ':count ಮೀನ್', // less reliable + + 'day' => ':count ಸುಗ್ಗಿ', // less reliable + 'd' => ':count ಸುಗ್ಗಿ', // less reliable + 'a_day' => ':count ಸುಗ್ಗಿ', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/te.php b/libraries/Carbon/src/Carbon/Lang/te.php new file mode 100644 index 00000000000..d7eec50d5ad --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/te.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kunal Marwaha + * - Josh Soref + * - François B + * - kc + */ +return [ + 'year' => ':count సంవత్సరం|:count సంవత్సరాలు', + 'a_year' => 'ఒక సంవత్సరం|:count సంవత్సరాలు', + 'y' => ':count సం.', + 'month' => ':count నెల|:count నెలలు', + 'a_month' => 'ఒక నెల|:count నెలలు', + 'm' => ':count నెల|:count నెల.', + 'week' => ':count వారం|:count వారాలు', + 'a_week' => 'ఒక వారం|:count వారాలు', + 'w' => ':count వార.|:count వారా.', + 'day' => ':count రోజు|:count రోజులు', + 'a_day' => 'ఒక రోజు|:count రోజులు', + 'd' => ':count రోజు|:count రోజు.', + 'hour' => ':count గంట|:count గంటలు', + 'a_hour' => 'ఒక గంట|:count గంటలు', + 'h' => ':count గం.', + 'minute' => ':count నిమిషం|:count నిమిషాలు', + 'a_minute' => 'ఒక నిమిషం|:count నిమిషాలు', + 'min' => ':count నిమి.', + 'second' => ':count సెకను|:count సెకన్లు', + 'a_second' => 'కొన్ని క్షణాలు|:count సెకన్లు', + 's' => ':count సెక.', + 'ago' => ':time క్రితం', + 'from_now' => ':time లో', + 'diff_now' => 'ప్రస్తుతం', + 'diff_today' => 'నేడు', + 'diff_yesterday' => 'నిన్న', + 'diff_tomorrow' => 'రేపు', + 'formats' => [ + 'LT' => 'A h:mm', + 'LTS' => 'A h:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, A h:mm', + 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', + ], + 'calendar' => [ + 'sameDay' => '[నేడు] LT', + 'nextDay' => '[రేపు] LT', + 'nextWeek' => 'dddd, LT', + 'lastDay' => '[నిన్న] LT', + 'lastWeek' => '[గత] dddd, LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':numberవ', + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'రాత్రి'; + } + if ($hour < 10) { + return 'ఉదయం'; + } + if ($hour < 17) { + return 'మధ్యాహ్నం'; + } + if ($hour < 20) { + return 'సాయంత్రం'; + } + + return ' రాత్రి'; + }, + 'months' => ['జనవరి', 'ఫిబ్రవరి', 'మార్చి', 'ఏప్రిల్', 'మే', 'జూన్', 'జూలై', 'ఆగస్టు', 'సెప్టెంబర్', 'అక్టోబర్', 'నవంబర్', 'డిసెంబర్'], + 'months_short' => ['జన.', 'ఫిబ్ర.', 'మార్చి', 'ఏప్రి.', 'మే', 'జూన్', 'జూలై', 'ఆగ.', 'సెప్.', 'అక్టో.', 'నవ.', 'డిసె.'], + 'weekdays' => ['ఆదివారం', 'సోమవారం', 'మంగళవారం', 'బుధవారం', 'గురువారం', 'శుక్రవారం', 'శనివారం'], + 'weekdays_short' => ['ఆది', 'సోమ', 'మంగళ', 'బుధ', 'గురు', 'శుక్ర', 'శని'], + 'weekdays_min' => ['ఆ', 'సో', 'మం', 'బు', 'గు', 'శు', 'శ'], + 'list' => ', ', + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'weekend' => [0, 0], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/te_IN.php b/libraries/Carbon/src/Carbon/Lang/te_IN.php new file mode 100644 index 00000000000..20b771f78d0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/te_IN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/te.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/teo.php b/libraries/Carbon/src/Carbon/Lang/teo.php new file mode 100644 index 00000000000..77d4415afa5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/teo.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ta.php', [ + 'meridiem' => ['Taparachu', 'Ebongi'], + 'weekdays' => ['Nakaejuma', 'Nakaebarasa', 'Nakaare', 'Nakauni', 'Nakaung’on', 'Nakakany', 'Nakasabiti'], + 'weekdays_short' => ['Jum', 'Bar', 'Aar', 'Uni', 'Ung', 'Kan', 'Sab'], + 'weekdays_min' => ['Jum', 'Bar', 'Aar', 'Uni', 'Ung', 'Kan', 'Sab'], + 'months' => ['Orara', 'Omuk', 'Okwamg’', 'Odung’el', 'Omaruk', 'Omodok’king’ol', 'Ojola', 'Opedel', 'Osokosokoma', 'Otibar', 'Olabor', 'Opoo'], + 'months_short' => ['Rar', 'Muk', 'Kwa', 'Dun', 'Mar', 'Mod', 'Jol', 'Ped', 'Sok', 'Tib', 'Lab', 'Poo'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/teo_KE.php b/libraries/Carbon/src/Carbon/Lang/teo_KE.php new file mode 100644 index 00000000000..4bb1311570e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/teo_KE.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/teo.php', [ + 'first_day_of_week' => 0, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tet.php b/libraries/Carbon/src/Carbon/Lang/tet.php new file mode 100644 index 00000000000..2ff0991160b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tet.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Joshua Brooks + * - François B + */ +return [ + 'year' => 'tinan :count', + 'a_year' => '{1}tinan ida|tinan :count', + 'month' => 'fulan :count', + 'a_month' => '{1}fulan ida|fulan :count', + 'week' => 'semana :count', + 'a_week' => '{1}semana ida|semana :count', + 'day' => 'loron :count', + 'a_day' => '{1}loron ida|loron :count', + 'hour' => 'oras :count', + 'a_hour' => '{1}oras ida|oras :count', + 'minute' => 'minutu :count', + 'a_minute' => '{1}minutu ida|minutu :count', + 'second' => 'segundu :count', + 'a_second' => '{1}segundu balun|segundu :count', + 'ago' => ':time liuba', + 'from_now' => 'iha :time', + 'diff_yesterday' => 'Horiseik', + 'diff_yesterday_regexp' => 'Horiseik(?:\\s+iha)?', + 'diff_today' => 'Ohin', + 'diff_today_regexp' => 'Ohin(?:\\s+iha)?', + 'diff_tomorrow' => 'Aban', + 'diff_tomorrow_regexp' => 'Aban(?:\\s+iha)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Ohin iha] LT', + 'nextDay' => '[Aban iha] LT', + 'nextWeek' => 'dddd [iha] LT', + 'lastDay' => '[Horiseik iha] LT', + 'lastWeek' => 'dddd [semana kotuk] [iha] LT', + 'sameElse' => 'L', + ], + 'ordinal' => ':numberº', + 'months' => ['Janeiru', 'Fevereiru', 'Marsu', 'Abril', 'Maiu', 'Juñu', 'Jullu', 'Agustu', 'Setembru', 'Outubru', 'Novembru', 'Dezembru'], + 'months_short' => ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'], + 'weekdays' => ['Domingu', 'Segunda', 'Tersa', 'Kuarta', 'Kinta', 'Sesta', 'Sabadu'], + 'weekdays_short' => ['Dom', 'Seg', 'Ters', 'Kua', 'Kint', 'Sest', 'Sab'], + 'weekdays_min' => ['Do', 'Seg', 'Te', 'Ku', 'Ki', 'Ses', 'Sa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tg.php b/libraries/Carbon/src/Carbon/Lang/tg.php new file mode 100644 index 00000000000..dfa986a0774 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tg.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Orif N. Jr + */ +return [ + 'year' => '{1}як сол|:count сол', + 'month' => '{1}як моҳ|:count моҳ', + 'week' => '{1}як ҳафта|:count ҳафта', + 'day' => '{1}як рӯз|:count рӯз', + 'hour' => '{1}як соат|:count соат', + 'minute' => '{1}як дақиқа|:count дақиқа', + 'second' => '{1}якчанд сония|:count сония', + 'ago' => ':time пеш', + 'from_now' => 'баъди :time', + 'diff_today' => 'Имрӯз', + 'diff_yesterday' => 'Дирӯз', + 'diff_yesterday_regexp' => 'Дирӯз(?:\\s+соати)?', + 'diff_tomorrow' => 'Пагоҳ', + 'diff_tomorrow_regexp' => 'Пагоҳ(?:\\s+соати)?', + 'diff_today_regexp' => 'Имрӯз(?:\\s+соати)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Имрӯз соати] LT', + 'nextDay' => '[Пагоҳ соати] LT', + 'nextWeek' => 'dddd[и] [ҳафтаи оянда соати] LT', + 'lastDay' => '[Дирӯз соати] LT', + 'lastWeek' => 'dddd[и] [ҳафтаи гузашта соати] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number) { + if ($number === 0) { // special case for zero + return "$number-ıncı"; + } + + static $suffixes = [ + 0 => '-ум', + 1 => '-ум', + 2 => '-юм', + 3 => '-юм', + 4 => '-ум', + 5 => '-ум', + 6 => '-ум', + 7 => '-ум', + 8 => '-ум', + 9 => '-ум', + 10 => '-ум', + 12 => '-ум', + 13 => '-ум', + 20 => '-ум', + 30 => '-юм', + 40 => '-ум', + 50 => '-ум', + 60 => '-ум', + 70 => '-ум', + 80 => '-ум', + 90 => '-ум', + 100 => '-ум', + ]; + + return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); + }, + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'шаб'; + } + if ($hour < 11) { + return 'субҳ'; + } + if ($hour < 16) { + return 'рӯз'; + } + if ($hour < 19) { + return 'бегоҳ'; + } + + return 'шаб'; + }, + 'months' => ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'], + 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], + 'weekdays' => ['якшанбе', 'душанбе', 'сешанбе', 'чоршанбе', 'панҷшанбе', 'ҷумъа', 'шанбе'], + 'weekdays_short' => ['яшб', 'дшб', 'сшб', 'чшб', 'пшб', 'ҷум', 'шнб'], + 'weekdays_min' => ['яш', 'дш', 'сш', 'чш', 'пш', 'ҷм', 'шб'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' ва '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tg_TJ.php b/libraries/Carbon/src/Carbon/Lang/tg_TJ.php new file mode 100644 index 00000000000..164f9acaad6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tg_TJ.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/tg.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/th.php b/libraries/Carbon/src/Carbon/Lang/th.php new file mode 100644 index 00000000000..f83d8037663 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/th.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Nate Whittaker + * - John MacAslan + * - Chanintorn Asavavichairoj + * - JD Isaacks + * - ROKAISAKKON + * - RO'KAISAKKON + * - Andreas Möller + * - nithisa + */ +return [ + 'year' => ':count ปี', + 'y' => ':count ปี', + 'month' => ':count เดือน', + 'm' => ':count เดือน', + 'week' => ':count สัปดาห์', + 'w' => ':count สัปดาห์', + 'day' => ':count วัน', + 'd' => ':count วัน', + 'hour' => ':count ชั่วโมง', + 'h' => ':count ชั่วโมง', + 'minute' => ':count นาที', + 'min' => ':count นาที', + 'second' => ':count วินาที', + 'a_second' => '{1}ไม่กี่วินาที|]1,Inf[:count วินาที', + 's' => ':count วินาที', + 'ago' => ':timeที่แล้ว', + 'from_now' => 'อีก :time', + 'after' => ':timeหลังจากนี้', + 'before' => ':timeก่อน', + 'diff_now' => 'ขณะนี้', + 'diff_today' => 'วันนี้', + 'diff_today_regexp' => 'วันนี้(?:\\s+เวลา)?', + 'diff_yesterday' => 'เมื่อวาน', + 'diff_yesterday_regexp' => 'เมื่อวานนี้(?:\\s+เวลา)?', + 'diff_tomorrow' => 'พรุ่งนี้', + 'diff_tomorrow_regexp' => 'พรุ่งนี้(?:\\s+เวลา)?', + 'formats' => [ + 'LT' => 'H:mm', + 'LTS' => 'H:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY เวลา H:mm', + 'LLLL' => 'วันddddที่ D MMMM YYYY เวลา H:mm', + ], + 'calendar' => [ + 'sameDay' => '[วันนี้ เวลา] LT', + 'nextDay' => '[พรุ่งนี้ เวลา] LT', + 'nextWeek' => 'dddd[หน้า เวลา] LT', + 'lastDay' => '[เมื่อวานนี้ เวลา] LT', + 'lastWeek' => '[วัน]dddd[ที่แล้ว เวลา] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ก่อนเที่ยง', 'หลังเที่ยง'], + 'months' => ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'], + 'months_short' => ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'], + 'weekdays' => ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'], + 'weekdays_short' => ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัส', 'ศุกร์', 'เสาร์'], + 'weekdays_min' => ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'], + 'list' => [', ', ' และ '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/th_TH.php b/libraries/Carbon/src/Carbon/Lang/th_TH.php new file mode 100644 index 00000000000..0a7e20ec1da --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/th_TH.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/th.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/the.php b/libraries/Carbon/src/Carbon/Lang/the.php new file mode 100644 index 00000000000..5ca5a413502 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/the.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/the_NP.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/the_NP.php b/libraries/Carbon/src/Carbon/Lang/the_NP.php new file mode 100644 index 00000000000..5f6af069554 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/the_NP.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Chitwanix OS Development info@chitwanix.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'dddd DD MMM YYYY', + ], + 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], + 'weekdays' => ['आइतबार', 'सोमबार', 'मंगलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'], + 'weekdays_short' => ['आइत', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि'], + 'weekdays_min' => ['आइत', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ti.php b/libraries/Carbon/src/Carbon/Lang/ti.php new file mode 100644 index 00000000000..b34a632e22b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ti.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ti_ER.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ti_ER.php b/libraries/Carbon/src/Carbon/Lang/ti_ER.php new file mode 100644 index 00000000000..43ad14cc15f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ti_ER.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ጥሪ', 'ለካቲት', 'መጋቢት', 'ሚያዝያ', 'ግንቦት', 'ሰነ', 'ሓምለ', 'ነሓሰ', 'መስከረም', 'ጥቅምቲ', 'ሕዳር', 'ታሕሳስ'], + 'months_short' => ['ጥሪ ', 'ለካቲ', 'መጋቢ', 'ሚያዝ', 'ግንቦ', 'ሰነ ', 'ሓምለ', 'ነሓሰ', 'መስከ', 'ጥቅም', 'ሕዳር', 'ታሕሳ'], + 'weekdays' => ['ሰንበት', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], + 'weekdays_short' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], + 'weekdays_min' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ንጉሆ ሰዓተ', 'ድሕር ሰዓት'], + + 'year' => ':count ዓመት', + 'y' => ':count ዓመት', + 'a_year' => ':count ዓመት', + + 'month' => 'ወርሒ :count', + 'm' => 'ወርሒ :count', + 'a_month' => 'ወርሒ :count', + + 'week' => ':count ሰሙን', + 'w' => ':count ሰሙን', + 'a_week' => ':count ሰሙን', + + 'day' => ':count መዓልቲ', + 'd' => ':count መዓልቲ', + 'a_day' => ':count መዓልቲ', + + 'hour' => ':count ሰዓት', + 'h' => ':count ሰዓት', + 'a_hour' => ':count ሰዓት', + + 'minute' => ':count ደቒቕ', + 'min' => ':count ደቒቕ', + 'a_minute' => ':count ደቒቕ', + + 'second' => ':count ሰከንድ', + 's' => ':count ሰከንድ', + 'a_second' => ':count ሰከንድ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ti_ET.php b/libraries/Carbon/src/Carbon/Lang/ti_ET.php new file mode 100644 index 00000000000..48dc881da0d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ti_ET.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], + 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], + 'weekdays' => ['ሰንበት', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], + 'weekdays_short' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], + 'weekdays_min' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ንጉሆ ሰዓተ', 'ድሕር ሰዓት'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tig.php b/libraries/Carbon/src/Carbon/Lang/tig.php new file mode 100644 index 00000000000..6cca400cd31 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tig.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/tig_ER.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/tig_ER.php b/libraries/Carbon/src/Carbon/Lang/tig_ER.php new file mode 100644 index 00000000000..94c3733fbe2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tig_ER.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ጥሪ', 'ለካቲት', 'መጋቢት', 'ሚያዝያ', 'ግንቦት', 'ሰነ', 'ሓምለ', 'ነሓሰ', 'መስከረም', 'ጥቅምቲ', 'ሕዳር', 'ታሕሳስ'], + 'months_short' => ['ጥሪ ', 'ለካቲ', 'መጋቢ', 'ሚያዝ', 'ግንቦ', 'ሰነ ', 'ሓምለ', 'ነሓሰ', 'መስከ', 'ጥቅም', 'ሕዳር', 'ታሕሳ'], + 'weekdays' => ['ሰንበት ዓባይ', 'ሰኖ', 'ታላሸኖ', 'ኣረርባዓ', 'ከሚሽ', 'ጅምዓት', 'ሰንበት ንኢሽ'], + 'weekdays_short' => ['ሰ//ዓ', 'ሰኖ ', 'ታላሸ', 'ኣረር', 'ከሚሽ', 'ጅምዓ', 'ሰ//ን'], + 'weekdays_min' => ['ሰ//ዓ', 'ሰኖ ', 'ታላሸ', 'ኣረር', 'ከሚሽ', 'ጅምዓ', 'ሰ//ን'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ቀደም ሰር ምዕል', 'ሓቆ ሰር ምዕል'], + + 'year' => ':count ማይ', // less reliable + 'y' => ':count ማይ', // less reliable + 'a_year' => ':count ማይ', // less reliable + + 'month' => ':count ሸምሽ', // less reliable + 'm' => ':count ሸምሽ', // less reliable + 'a_month' => ':count ሸምሽ', // less reliable + + 'week' => ':count ሰቡዕ', // less reliable + 'w' => ':count ሰቡዕ', // less reliable + 'a_week' => ':count ሰቡዕ', // less reliable + + 'day' => ':count ዎሮ', // less reliable + 'd' => ':count ዎሮ', // less reliable + 'a_day' => ':count ዎሮ', // less reliable + + 'hour' => ':count ሰዓት', // less reliable + 'h' => ':count ሰዓት', // less reliable + 'a_hour' => ':count ሰዓት', // less reliable + + 'minute' => ':count ካልኣይት', // less reliable + 'min' => ':count ካልኣይት', // less reliable + 'a_minute' => ':count ካልኣይት', // less reliable + + 'second' => ':count ካልኣይ', + 's' => ':count ካልኣይ', + 'a_second' => ':count ካልኣይ', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tk.php b/libraries/Carbon/src/Carbon/Lang/tk.php new file mode 100644 index 00000000000..63bfc99ccdb --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tk.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/tk_TM.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/tk_TM.php b/libraries/Carbon/src/Carbon/Lang/tk_TM.php new file mode 100644 index 00000000000..3bc481543cd --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tk_TM.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Authors: + * - Ghorban M. Tavakoly Pablo Saratxaga & Ghorban M. Tavakoly pablo@walon.org & gmt314@yahoo.com + * - SuperManPHP + * - Maksat Meredow (isadma) + */ +$transformDiff = function ($input) { + return strtr($input, [ + 'sekunt' => 'sekunt', + 'hepde' => 'hepde', + ]); +}; + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Ýanwar', 'Fewral', 'Mart', 'Aprel', 'Maý', 'Iýun', 'Iýul', 'Awgust', 'Sentýabr', 'Oktýabr', 'Noýabr', 'Dekabr'], + 'months_short' => ['Ýan', 'Few', 'Mar', 'Apr', 'Maý', 'Iýn', 'Iýl', 'Awg', 'Sen', 'Okt', 'Noý', 'Dek'], + 'weekdays' => ['Duşenbe', 'Sişenbe', 'Çarşenbe', 'Penşenbe', 'Anna', 'Şenbe', 'Ýekşenbe'], + 'weekdays_short' => ['Duş', 'Siş', 'Çar', 'Pen', 'Ann', 'Şen', 'Ýek'], + 'weekdays_min' => ['Du', 'Si', 'Ça', 'Pe', 'An', 'Şe', 'Ýe'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + + 'year' => ':count ýyl', + 'y' => ':count ýyl', + 'a_year' => ':count ýyl', + + 'month' => ':count aý', + 'm' => ':count aý', + 'a_month' => ':count aý', + + 'week' => ':count hepde', + 'w' => ':count hepde', + 'a_week' => ':count hepde', + + 'day' => ':count gün', + 'd' => ':count gün', + 'a_day' => ':count gün', + + 'hour' => ':count sagat', + 'h' => ':count sagat', + 'a_hour' => ':count sagat', + + 'minute' => ':count minut', + 'min' => ':count minut', + 'a_minute' => ':count minut', + + 'second' => ':count sekunt', + 's' => ':count sekunt', + 'a_second' => ':count sekunt', + + 'ago' => function ($time) use ($transformDiff) { + return $transformDiff($time).' ozal'; + }, + 'from_now' => function ($time) use ($transformDiff) { + return $transformDiff($time).' soňra'; + }, + 'after' => function ($time) use ($transformDiff) { + return $transformDiff($time).' soň'; + }, + 'before' => function ($time) use ($transformDiff) { + return $transformDiff($time).' öň'; + }, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tl.php b/libraries/Carbon/src/Carbon/Lang/tl.php new file mode 100644 index 00000000000..951d64cb0dc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tl.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + 'year' => ':count taon', + 'a_year' => '{1}isang taon|:count taon', + 'month' => ':count buwan', + 'a_month' => '{1}isang buwan|:count buwan', + 'week' => ':count linggo', + 'a_week' => '{1}isang linggo|:count linggo', + 'day' => ':count araw', + 'a_day' => '{1}isang araw|:count araw', + 'hour' => ':count oras', + 'a_hour' => '{1}isang oras|:count oras', + 'minute' => ':count minuto', + 'a_minute' => '{1}isang minuto|:count minuto', + 'min' => ':count min.', + 'second' => ':count segundo', + 'a_second' => '{1}ilang segundo|:count segundo', + 's' => ':count seg.', + 'ago' => ':time ang nakalipas', + 'from_now' => 'sa loob ng :time', + 'diff_now' => 'ngayon', + 'diff_today' => 'ngayong', + 'diff_today_regexp' => 'ngayong(?:\\s+araw)?', + 'diff_yesterday' => 'kahapon', + 'diff_tomorrow' => 'bukas', + 'diff_tomorrow_regexp' => 'Bukas(?:\\s+ng)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'MM/D/YYYY', + 'LL' => 'MMMM D, YYYY', + 'LLL' => 'MMMM D, YYYY HH:mm', + 'LLLL' => 'dddd, MMMM DD, YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => 'LT [ngayong araw]', + 'nextDay' => '[Bukas ng] LT', + 'nextWeek' => 'LT [sa susunod na] dddd', + 'lastDay' => 'LT [kahapon]', + 'lastWeek' => 'LT [noong nakaraang] dddd', + 'sameElse' => 'L', + ], + 'months' => ['Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre'], + 'months_short' => ['Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis'], + 'weekdays' => ['Linggo', 'Lunes', 'Martes', 'Miyerkules', 'Huwebes', 'Biyernes', 'Sabado'], + 'weekdays_short' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], + 'weekdays_min' => ['Li', 'Lu', 'Ma', 'Mi', 'Hu', 'Bi', 'Sab'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' at '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tl_PH.php b/libraries/Carbon/src/Carbon/Lang/tl_PH.php new file mode 100644 index 00000000000..3f5024a8349 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tl_PH.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Ian De La Cruz + * - JD Isaacks + */ +return require __DIR__.'/tl.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/tlh.php b/libraries/Carbon/src/Carbon/Lang/tlh.php new file mode 100644 index 00000000000..6051e31aadf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tlh.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Serhan Apaydın + * - Dominika + */ +return [ + 'year' => '{1}wa’ DIS|:count DIS', + 'month' => '{1}wa’ jar|:count jar', + 'week' => '{1}wa’ hogh|:count hogh', + 'day' => '{1}wa’ jaj|:count jaj', + 'hour' => '{1}wa’ rep|:count rep', + 'minute' => '{1}wa’ tup|:count tup', + 'second' => '{1}puS lup|:count lup', + 'ago' => function ($time) { + $output = strtr($time, [ + 'jaj' => 'Hu’', + 'jar' => 'wen', + 'DIS' => 'ben', + ]); + + return $output === $time ? "$time ret" : $output; + }, + 'from_now' => function ($time) { + $output = strtr($time, [ + 'jaj' => 'leS', + 'jar' => 'waQ', + 'DIS' => 'nem', + ]); + + return $output === $time ? "$time pIq" : $output; + }, + 'diff_yesterday' => 'wa’Hu’', + 'diff_today' => 'DaHjaj', + 'diff_tomorrow' => 'wa’leS', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[DaHjaj] LT', + 'nextDay' => '[wa’leS] LT', + 'nextWeek' => 'LLL', + 'lastDay' => '[wa’Hu’] LT', + 'lastWeek' => 'LLL', + 'sameElse' => 'L', + ], + 'ordinal' => ':number.', + 'months' => ['tera’ jar wa’', 'tera’ jar cha’', 'tera’ jar wej', 'tera’ jar loS', 'tera’ jar vagh', 'tera’ jar jav', 'tera’ jar Soch', 'tera’ jar chorgh', 'tera’ jar Hut', 'tera’ jar wa’maH', 'tera’ jar wa’maH wa’', 'tera’ jar wa’maH cha’'], + 'months_short' => ['jar wa’', 'jar cha’', 'jar wej', 'jar loS', 'jar vagh', 'jar jav', 'jar Soch', 'jar chorgh', 'jar Hut', 'jar wa’maH', 'jar wa’maH wa’', 'jar wa’maH cha’'], + 'weekdays' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], + 'weekdays_short' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], + 'weekdays_min' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' ’ej '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tn.php b/libraries/Carbon/src/Carbon/Lang/tn.php new file mode 100644 index 00000000000..0b764226a64 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tn.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/tn_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/tn_ZA.php b/libraries/Carbon/src/Carbon/Lang/tn_ZA.php new file mode 100644 index 00000000000..46ada8555c7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tn_ZA.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Ferikgong', 'Tlhakole', 'Mopitlwe', 'Moranang', 'Motsheganong', 'Seetebosigo', 'Phukwi', 'Phatwe', 'Lwetse', 'Diphalane', 'Ngwanatsele', 'Sedimonthole'], + 'months_short' => ['Fer', 'Tlh', 'Mop', 'Mor', 'Mot', 'See', 'Phu', 'Pha', 'Lwe', 'Dip', 'Ngw', 'Sed'], + 'weekdays' => ['laTshipi', 'Mosupologo', 'Labobedi', 'Laboraro', 'Labone', 'Labotlhano', 'Lamatlhatso'], + 'weekdays_short' => ['Tsh', 'Mos', 'Bed', 'Rar', 'Ne', 'Tlh', 'Mat'], + 'weekdays_min' => ['Tsh', 'Mos', 'Bed', 'Rar', 'Ne', 'Tlh', 'Mat'], + 'day_of_first_week_of_year' => 1, + + 'year' => 'dingwaga di le :count', + 'y' => 'dingwaga di le :count', + 'a_year' => 'dingwaga di le :count', + + 'month' => 'dikgwedi di le :count', + 'm' => 'dikgwedi di le :count', + 'a_month' => 'dikgwedi di le :count', + + 'week' => 'dibeke di le :count', + 'w' => 'dibeke di le :count', + 'a_week' => 'dibeke di le :count', + + 'day' => 'malatsi :count', + 'd' => 'malatsi :count', + 'a_day' => 'malatsi :count', + + 'hour' => 'diura di le :count', + 'h' => 'diura di le :count', + 'a_hour' => 'diura di le :count', + + 'minute' => 'metsotso e le :count', + 'min' => 'metsotso e le :count', + 'a_minute' => 'metsotso e le :count', + + 'second' => 'metsotswana e le :count', + 's' => 'metsotswana e le :count', + 'a_second' => 'metsotswana e le :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/to.php b/libraries/Carbon/src/Carbon/Lang/to.php new file mode 100644 index 00000000000..02cb4faed66 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/to.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/to_TO.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/to_TO.php b/libraries/Carbon/src/Carbon/Lang/to_TO.php new file mode 100644 index 00000000000..35ff90addc0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/to_TO.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - International Components for Unicode akhilesh.k@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'dddd DD MMM YYYY', + ], + 'months' => ['Sānuali', 'Fēpueli', 'Maʻasi', 'ʻEpeleli', 'Mē', 'Sune', 'Siulai', 'ʻAokosi', 'Sepitema', 'ʻOkatopa', 'Nōvema', 'Tīsema'], + 'months_short' => ['Sān', 'Fēp', 'Maʻa', 'ʻEpe', 'Mē', 'Sun', 'Siu', 'ʻAok', 'Sep', 'ʻOka', 'Nōv', 'Tīs'], + 'weekdays' => ['Sāpate', 'Mōnite', 'Tūsite', 'Pulelulu', 'Tuʻapulelulu', 'Falaite', 'Tokonaki'], + 'weekdays_short' => ['Sāp', 'Mōn', 'Tūs', 'Pul', 'Tuʻa', 'Fal', 'Tok'], + 'weekdays_min' => ['Sāp', 'Mōn', 'Tūs', 'Pul', 'Tuʻa', 'Fal', 'Tok'], + 'meridiem' => ['hengihengi', 'efiafi'], + + 'year' => ':count fitu', // less reliable + 'y' => ':count fitu', // less reliable + 'a_year' => ':count fitu', // less reliable + + 'month' => ':count mahina', // less reliable + 'm' => ':count mahina', // less reliable + 'a_month' => ':count mahina', // less reliable + + 'week' => ':count Sapate', // less reliable + 'w' => ':count Sapate', // less reliable + 'a_week' => ':count Sapate', // less reliable + + 'day' => ':count ʻaho', // less reliable + 'd' => ':count ʻaho', // less reliable + 'a_day' => ':count ʻaho', // less reliable + + 'hour' => ':count houa', + 'h' => ':count houa', + 'a_hour' => ':count houa', + + 'minute' => ':count miniti', + 'min' => ':count miniti', + 'a_minute' => ':count miniti', + + 'second' => ':count sekoni', + 's' => ':count sekoni', + 'a_second' => ':count sekoni', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tpi.php b/libraries/Carbon/src/Carbon/Lang/tpi.php new file mode 100644 index 00000000000..4ddec3ab85d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tpi.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/tpi_PG.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/tpi_PG.php b/libraries/Carbon/src/Carbon/Lang/tpi_PG.php new file mode 100644 index 00000000000..689c4609376 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tpi_PG.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Janueri', 'Februeri', 'Mas', 'Epril', 'Me', 'Jun', 'Julai', 'Ogas', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mas', 'Epr', 'Me', 'Jun', 'Jul', 'Oga', 'Sep', 'Okt', 'Nov', 'Des'], + 'weekdays' => ['Sande', 'Mande', 'Tunde', 'Trinde', 'Fonde', 'Fraide', 'Sarere'], + 'weekdays_short' => ['San', 'Man', 'Tun', 'Tri', 'Fon', 'Fra', 'Sar'], + 'weekdays_min' => ['San', 'Man', 'Tun', 'Tri', 'Fon', 'Fra', 'Sar'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['biknait', 'apinun'], + + 'year' => 'yia :count', + 'y' => 'yia :count', + 'a_year' => 'yia :count', + + 'month' => ':count mun', + 'm' => ':count mun', + 'a_month' => ':count mun', + + 'week' => ':count wik', + 'w' => ':count wik', + 'a_week' => ':count wik', + + 'day' => ':count de', + 'd' => ':count de', + 'a_day' => ':count de', + + 'hour' => ':count aua', + 'h' => ':count aua', + 'a_hour' => ':count aua', + + 'minute' => ':count minit', + 'min' => ':count minit', + 'a_minute' => ':count minit', + + 'second' => ':count namba tu', + 's' => ':count namba tu', + 'a_second' => ':count namba tu', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tr.php b/libraries/Carbon/src/Carbon/Lang/tr.php new file mode 100644 index 00000000000..02f33f19e22 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tr.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - Alan Agius + * - Erhan Gundogan + * - François B + * - JD Isaacks + * - Murat Yüksel + * - Baran Şengül + * - Selami (selamialtin) + * - TeomanBey + */ +return [ + 'year' => ':count yıl', + 'a_year' => '{1}bir yıl|]1,Inf[:count yıl', + 'y' => ':county', + 'month' => ':count ay', + 'a_month' => '{1}bir ay|]1,Inf[:count ay', + 'm' => ':countay', + 'week' => ':count hafta', + 'a_week' => '{1}bir hafta|]1,Inf[:count hafta', + 'w' => ':counth', + 'day' => ':count gün', + 'a_day' => '{1}bir gün|]1,Inf[:count gün', + 'd' => ':countg', + 'hour' => ':count saat', + 'a_hour' => '{1}bir saat|]1,Inf[:count saat', + 'h' => ':countsa', + 'minute' => ':count dakika', + 'a_minute' => '{1}bir dakika|]1,Inf[:count dakika', + 'min' => ':countdk', + 'second' => ':count saniye', + 'a_second' => '{1}birkaç saniye|]1,Inf[:count saniye', + 's' => ':countsn', + 'ago' => ':time önce', + 'from_now' => ':time sonra', + 'after' => ':time sonra', + 'before' => ':time önce', + 'diff_now' => 'şimdi', + 'diff_today' => 'bugün', + 'diff_today_regexp' => 'bugün(?:\\s+saat)?', + 'diff_yesterday' => 'dün', + 'diff_tomorrow' => 'yarın', + 'diff_tomorrow_regexp' => 'yarın(?:\\s+saat)?', + 'diff_before_yesterday' => 'evvelsi gün', + 'diff_after_tomorrow' => 'öbür gün', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[bugün saat] LT', + 'nextDay' => '[yarın saat] LT', + 'nextWeek' => '[gelecek] dddd [saat] LT', + 'lastDay' => '[dün] LT', + 'lastWeek' => '[geçen] dddd [saat] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return $number; + default: + if ($number === 0) { // special case for zero + return "$number'ıncı"; + } + + static $suffixes = [ + 1 => '\'inci', + 5 => '\'inci', + 8 => '\'inci', + 70 => '\'inci', + 80 => '\'inci', + 2 => '\'nci', + 7 => '\'nci', + 20 => '\'nci', + 50 => '\'nci', + 3 => '\'üncü', + 4 => '\'üncü', + 100 => '\'üncü', + 6 => '\'ncı', + 9 => '\'uncu', + 10 => '\'uncu', + 30 => '\'uncu', + 60 => '\'ıncı', + 90 => '\'ıncı', + ]; + + $lastDigit = $number % 10; + + return $number.($suffixes[$lastDigit] ?? $suffixes[$number % 100 - $lastDigit] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); + } + }, + 'meridiem' => ['ÖÖ', 'ÖS', 'öö', 'ös'], + 'months' => ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'], + 'months_short' => ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'], + 'weekdays' => ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'], + 'weekdays_short' => ['Paz', 'Pts', 'Sal', 'Çar', 'Per', 'Cum', 'Cts'], + 'weekdays_min' => ['Pz', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' ve '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tr_CY.php b/libraries/Carbon/src/Carbon/Lang/tr_CY.php new file mode 100644 index 00000000000..1536c23816b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tr_CY.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/tr.php', [ + 'weekdays_short' => ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'], + 'weekdays_min' => ['Pa', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'], + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'D.MM.YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'D MMMM YYYY dddd h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tr_TR.php b/libraries/Carbon/src/Carbon/Lang/tr_TR.php new file mode 100644 index 00000000000..ca503ad1816 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tr_TR.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/tr.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ts.php b/libraries/Carbon/src/Carbon/Lang/ts.php new file mode 100644 index 00000000000..271d67f1195 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ts.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ts_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ts_ZA.php b/libraries/Carbon/src/Carbon/Lang/ts_ZA.php new file mode 100644 index 00000000000..7635551e582 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ts_ZA.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Sunguti', 'Nyenyenyani', 'Nyenyankulu', 'Dzivamisoko', 'Mudyaxihi', 'Khotavuxika', 'Mawuwani', 'Mhawuri', 'Ndzhati', 'Nhlangula', 'Hukuri', 'N\'wendzamhala'], + 'months_short' => ['Sun', 'Yan', 'Kul', 'Dzi', 'Mud', 'Kho', 'Maw', 'Mha', 'Ndz', 'Nhl', 'Huk', 'N\'w'], + 'weekdays' => ['Sonto', 'Musumbhunuku', 'Ravumbirhi', 'Ravunharhu', 'Ravumune', 'Ravuntlhanu', 'Mugqivela'], + 'weekdays_short' => ['Son', 'Mus', 'Bir', 'Har', 'Ne', 'Tlh', 'Mug'], + 'weekdays_min' => ['Son', 'Mus', 'Bir', 'Har', 'Ne', 'Tlh', 'Mug'], + 'day_of_first_week_of_year' => 1, + + 'year' => 'malembe ya :count', + 'y' => 'malembe ya :count', + 'a_year' => 'malembe ya :count', + + 'month' => 'tin’hweti ta :count', + 'm' => 'tin’hweti ta :count', + 'a_month' => 'tin’hweti ta :count', + + 'week' => 'mavhiki ya :count', + 'w' => 'mavhiki ya :count', + 'a_week' => 'mavhiki ya :count', + + 'day' => 'masiku :count', + 'd' => 'masiku :count', + 'a_day' => 'masiku :count', + + 'hour' => 'tiawara ta :count', + 'h' => 'tiawara ta :count', + 'a_hour' => 'tiawara ta :count', + + 'minute' => 'timinete ta :count', + 'min' => 'timinete ta :count', + 'a_minute' => 'timinete ta :count', + + 'second' => 'tisekoni ta :count', + 's' => 'tisekoni ta :count', + 'a_second' => 'tisekoni ta :count', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tt.php b/libraries/Carbon/src/Carbon/Lang/tt.php new file mode 100644 index 00000000000..b332748771c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tt.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/tt_RU.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/tt_RU.php b/libraries/Carbon/src/Carbon/Lang/tt_RU.php new file mode 100644 index 00000000000..c684dc4a05a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tt_RU.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Rinat Norkin Pablo Saratxaga, Rinat Norkin pablo@mandrakesoft.com, rinat@taif.ru + */ +return [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'DD MMM, HH:mm', + 'LLLL' => 'DD MMMM YYYY, HH:mm', + ], + 'months' => ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], + 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], + 'weekdays' => ['якшәмбе', 'дышәмбе', 'сишәмбе', 'чәршәәмбе', 'пәнҗешмбе', 'җомга', 'шимбә'], + 'weekdays_short' => ['якш', 'дыш', 'сиш', 'чәрш', 'пәнҗ', 'җом', 'шим'], + 'weekdays_min' => ['якш', 'дыш', 'сиш', 'чәрш', 'пәнҗ', 'җом', 'шим'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'year' => ':count ел', + 'month' => ':count ай', + 'week' => ':count атна', + 'day' => ':count көн', + 'hour' => ':count сәгать', + 'minute' => ':count минут', + 'second' => ':count секунд', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tt_RU@iqtelif.php b/libraries/Carbon/src/Carbon/Lang/tt_RU@iqtelif.php new file mode 100644 index 00000000000..b1494447d28 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tt_RU@iqtelif.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Reshat Sabiq tatar.iqtelif.i18n@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD.MM.YYYY', + ], + 'months' => ['Ğınwar', 'Fiwral\'', 'Mart', 'April', 'May', 'Yün', 'Yül', 'Awgust', 'Sintebír', 'Üktebír', 'Noyebír', 'Dikebír'], + 'months_short' => ['Ğın', 'Fiw', 'Mar', 'Apr', 'May', 'Yün', 'Yül', 'Awg', 'Sin', 'Ükt', 'Noy', 'Dik'], + 'weekdays' => ['Yekşembí', 'Düşembí', 'Sişembí', 'Çerşembí', 'Pencíşembí', 'Comğa', 'Şimbe'], + 'weekdays_short' => ['Yek', 'Düş', 'Siş', 'Çer', 'Pen', 'Com', 'Şim'], + 'weekdays_min' => ['Yek', 'Düş', 'Siş', 'Çer', 'Pen', 'Com', 'Şim'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ÖA', 'ÖS'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/twq.php b/libraries/Carbon/src/Carbon/Lang/twq.php new file mode 100644 index 00000000000..bcea22687af --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/twq.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/ses.php', [ + 'meridiem' => ['Subbaahi', 'Zaarikay b'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/tzl.php b/libraries/Carbon/src/Carbon/Lang/tzl.php new file mode 100644 index 00000000000..7487b902107 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tzl.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + 'year' => '[0,1]:count ar|:count ars', + 'y' => '[0,1]:count ar|:count ars', + 'month' => '[0,1]:count mes|:count mesen', + 'm' => '[0,1]:count mes|:count mesen', + 'week' => '[0,1]:count seifetziua|:count seifetziuas', + 'w' => '[0,1]:count seifetziua|:count seifetziuas', + 'day' => '[0,1]:count ziua|:count ziuas', + 'd' => '[0,1]:count ziua|:count ziuas', + 'hour' => '[0,1]:count þora|:count þoras', + 'h' => '[0,1]:count þora|:count þoras', + 'minute' => '[0,1]:count míut|:count míuts', + 'min' => '[0,1]:count míut|:count míuts', + 'second' => ':count secunds', + 's' => ':count secunds', + + 'ago' => 'ja :time', + 'from_now' => 'osprei :time', + + 'diff_yesterday' => 'ieiri', + 'diff_yesterday_regexp' => 'ieiri(?:\\s+à)?', + 'diff_today' => 'oxhi', + 'diff_today_regexp' => 'oxhi(?:\\s+à)?', + 'diff_tomorrow' => 'demà', + 'diff_tomorrow_regexp' => 'demà(?:\\s+à)?', + + 'formats' => [ + 'LT' => 'HH.mm', + 'LTS' => 'HH.mm.ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D. MMMM [dallas] YYYY', + 'LLL' => 'D. MMMM [dallas] YYYY HH.mm', + 'LLLL' => 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', + ], + + 'calendar' => [ + 'sameDay' => '[oxhi à] LT', + 'nextDay' => '[demà à] LT', + 'nextWeek' => 'dddd [à] LT', + 'lastDay' => '[ieiri à] LT', + 'lastWeek' => '[sür el] dddd [lasteu à] LT', + 'sameElse' => 'L', + ], + + 'meridiem' => ["D'A", "D'O"], + 'months' => ['Januar', 'Fevraglh', 'Març', 'Avrïu', 'Mai', 'Gün', 'Julia', 'Guscht', 'Setemvar', 'Listopäts', 'Noemvar', 'Zecemvar'], + 'months_short' => ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Gün', 'Jul', 'Gus', 'Set', 'Lis', 'Noe', 'Zec'], + 'weekdays' => ['Súladi', 'Lúneçi', 'Maitzi', 'Márcuri', 'Xhúadi', 'Viénerçi', 'Sáturi'], + 'weekdays_short' => ['Súl', 'Lún', 'Mai', 'Már', 'Xhú', 'Vié', 'Sát'], + 'weekdays_min' => ['Sú', 'Lú', 'Ma', 'Má', 'Xh', 'Vi', 'Sá'], + 'ordinal' => ':number.', + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tzm.php b/libraries/Carbon/src/Carbon/Lang/tzm.php new file mode 100644 index 00000000000..1444d549753 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tzm.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - JD Isaacks + */ +return [ + 'year' => '{1}ⴰⵙⴳⴰⵙ|:count ⵉⵙⴳⴰⵙⵏ', + 'month' => '{1}ⴰⵢoⵓⵔ|:count ⵉⵢⵢⵉⵔⵏ', + 'week' => ':count ⵉⵎⴰⵍⴰⵙⵙ', + 'day' => '{1}ⴰⵙⵙ|:count oⵙⵙⴰⵏ', + 'hour' => '{1}ⵙⴰⵄⴰ|:count ⵜⴰⵙⵙⴰⵄⵉⵏ', + 'minute' => '{1}ⵎⵉⵏⵓⴺ|:count ⵎⵉⵏⵓⴺ', + 'second' => '{1}ⵉⵎⵉⴽ|:count ⵉⵎⵉⴽ', + 'ago' => 'ⵢⴰⵏ :time', + 'from_now' => 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ :time', + 'diff_today' => 'ⴰⵙⴷⵅ', + 'diff_yesterday' => 'ⴰⵚⴰⵏⵜ', + 'diff_yesterday_regexp' => 'ⴰⵚⴰⵏⵜ(?:\\s+ⴴ)?', + 'diff_tomorrow' => 'ⴰⵙⴽⴰ', + 'diff_tomorrow_regexp' => 'ⴰⵙⴽⴰ(?:\\s+ⴴ)?', + 'diff_today_regexp' => 'ⴰⵙⴷⵅ(?:\\s+ⴴ)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[ⴰⵙⴷⵅ ⴴ] LT', + 'nextDay' => '[ⴰⵙⴽⴰ ⴴ] LT', + 'nextWeek' => 'dddd [ⴴ] LT', + 'lastDay' => '[ⴰⵚⴰⵏⵜ ⴴ] LT', + 'lastWeek' => 'dddd [ⴴ] LT', + 'sameElse' => 'L', + ], + 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⵏⴱⵉⵔ'], + 'months_short' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⵏⴱⵉⵔ'], + 'weekdays' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], + 'weekdays_short' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], + 'weekdays_min' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'weekend' => [5, 6], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/tzm_Latn.php b/libraries/Carbon/src/Carbon/Lang/tzm_Latn.php new file mode 100644 index 00000000000..0dea96cded2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/tzm_Latn.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - JD Isaacks + */ +return [ + 'year' => '{1}:count asgas|:count isgasn', + 'a_year' => 'asgas|:count isgasn', + 'month' => '{1}:count ayowr|:count iyyirn', + 'a_month' => 'ayowr|:count iyyirn', + 'week' => ':count imalass', + 'a_week' => ':imalass', + 'day' => '{1}:count ass|:count ossan', + 'a_day' => 'ass|:count ossan', + 'hour' => '{1}:count saɛa|:count tassaɛin', + 'a_hour' => '{1}saɛa|:count tassaɛin', + 'minute' => ':count minuḍ', + 'a_minute' => '{1}minuḍ|:count minuḍ', + 'second' => ':count imik', + 'a_second' => '{1}imik|:count imik', + 'ago' => 'yan :time', + 'from_now' => 'dadkh s yan :time', + 'diff_yesterday' => 'assant', + 'diff_yesterday_regexp' => 'assant(?:\\s+g)?', + 'diff_today' => 'asdkh', + 'diff_today_regexp' => 'asdkh(?:\\s+g)?', + 'diff_tomorrow' => 'aska', + 'diff_tomorrow_regexp' => 'aska(?:\\s+g)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[asdkh g] LT', + 'nextDay' => '[aska g] LT', + 'nextWeek' => 'dddd [g] LT', + 'lastDay' => '[assant g] LT', + 'lastWeek' => 'dddd [g] LT', + 'sameElse' => 'L', + ], + 'months' => ['innayr', 'brˤayrˤ', 'marˤsˤ', 'ibrir', 'mayyw', 'ywnyw', 'ywlywz', 'ɣwšt', 'šwtanbir', 'ktˤwbrˤ', 'nwwanbir', 'dwjnbir'], + 'months_short' => ['innayr', 'brˤayrˤ', 'marˤsˤ', 'ibrir', 'mayyw', 'ywnyw', 'ywlywz', 'ɣwšt', 'šwtanbir', 'ktˤwbrˤ', 'nwwanbir', 'dwjnbir'], + 'weekdays' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], + 'weekdays_short' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], + 'weekdays_min' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], + 'meridiem' => ['Zdat azal', 'Ḍeffir aza'], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ug.php b/libraries/Carbon/src/Carbon/Lang/ug.php new file mode 100644 index 00000000000..6d58f7fc383 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ug.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Philippe Vaucher + * - Tsutomu Kuroda + * - yasinn + */ +return [ + 'year' => '{1}'.'بىر يىل'.'|:count '.'يىل', + 'month' => '{1}'.'بىر ئاي'.'|:count '.'ئاي', + 'week' => '{1}'.'بىر ھەپتە'.'|:count '.'ھەپتە', + 'day' => '{1}'.'بىر كۈن'.'|:count '.'كۈن', + 'hour' => '{1}'.'بىر سائەت'.'|:count '.'سائەت', + 'minute' => '{1}'.'بىر مىنۇت'.'|:count '.'مىنۇت', + 'second' => '{1}'.'نەچچە سېكونت'.'|:count '.'سېكونت', + 'ago' => ':time بۇرۇن', + 'from_now' => ':time كېيىن', + 'diff_today' => 'بۈگۈن', + 'diff_yesterday' => 'تۆنۈگۈن', + 'diff_tomorrow' => 'ئەتە', + 'diff_tomorrow_regexp' => 'ئەتە(?:\\s+سائەت)?', + 'diff_today_regexp' => 'بۈگۈن(?:\\s+سائەت)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-DD', + 'LL' => 'YYYY-يىلىM-ئاينىڭD-كۈنى', + 'LLL' => 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + 'LLLL' => 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[بۈگۈن سائەت] LT', + 'nextDay' => '[ئەتە سائەت] LT', + 'nextWeek' => '[كېلەركى] dddd [سائەت] LT', + 'lastDay' => '[تۆنۈگۈن] LT', + 'lastWeek' => '[ئالدىنقى] dddd [سائەت] LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'd': + case 'D': + case 'DDD': + return $number.'-كۈنى'; + case 'w': + case 'W': + return $number.'-ھەپتە'; + default: + return $number; + } + }, + 'meridiem' => function ($hour, $minute) { + $time = $hour * 100 + $minute; + if ($time < 600) { + return 'يېرىم كېچە'; + } + if ($time < 900) { + return 'سەھەر'; + } + if ($time < 1130) { + return 'چۈشتىن بۇرۇن'; + } + if ($time < 1230) { + return 'چۈش'; + } + if ($time < 1800) { + return 'چۈشتىن كېيىن'; + } + + return 'كەچ'; + }, + 'months' => ['يانۋار', 'فېۋرال', 'مارت', 'ئاپرېل', 'ماي', 'ئىيۇن', 'ئىيۇل', 'ئاۋغۇست', 'سېنتەبىر', 'ئۆكتەبىر', 'نويابىر', 'دېكابىر'], + 'months_short' => ['يانۋار', 'فېۋرال', 'مارت', 'ئاپرېل', 'ماي', 'ئىيۇن', 'ئىيۇل', 'ئاۋغۇست', 'سېنتەبىر', 'ئۆكتەبىر', 'نويابىر', 'دېكابىر'], + 'weekdays' => ['يەكشەنبە', 'دۈشەنبە', 'سەيشەنبە', 'چارشەنبە', 'پەيشەنبە', 'جۈمە', 'شەنبە'], + 'weekdays_short' => ['يە', 'دۈ', 'سە', 'چا', 'پە', 'جۈ', 'شە'], + 'weekdays_min' => ['يە', 'دۈ', 'سە', 'چا', 'پە', 'جۈ', 'شە'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' ۋە '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ug_CN.php b/libraries/Carbon/src/Carbon/Lang/ug_CN.php new file mode 100644 index 00000000000..51108dd2d02 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ug_CN.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Kunal Marwaha + * - Alim Boyaq + */ +return require __DIR__.'/ug.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/uk.php b/libraries/Carbon/src/Carbon/Lang/uk.php new file mode 100644 index 00000000000..748e2950173 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uk.php @@ -0,0 +1,212 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use EDD\Vendor\Carbon\CarbonInterface; + +$processHoursFunction = function (CarbonInterface $date, string $format) { + return $format.'о'.($date->hour === 11 ? 'б' : '').'] LT'; +}; + +/* + * Authors: + * - Kunal Marwaha + * - Josh Soref + * - François B + * - Tim Fish + * - Serhan Apaydın + * - Max Mykhailenko + * - JD Isaacks + * - Max Kovpak + * - AucT + * - Philippe Vaucher + * - Ilya Shaplyko + * - Vadym Ievsieiev + * - Denys Kurets + * - Igor Kasyanchuk + * - Tsutomu Kuroda + * - tjku + * - Max Melentiev + * - Oleh + * - epaminond + * - Juanito Fatas + * - Vitalii Khustochka + * - Akira Matsuda + * - Christopher Dell + * - Enrique Vidal + * - Simone Carletti + * - Aaron Patterson + * - Andriy Tyurnikov + * - Nicolás Hock Isaza + * - Iwakura Taro + * - Andrii Ponomarov + * - alecrabbit + * - vystepanenko + * - AlexWalkerson + * - Andre Havryliuk (Andrend) + * - Max Datsenko (datsenko-md) + */ +return [ + 'year' => ':count рік|:count роки|:count років', + 'y' => ':countр|:countрр|:countрр', + 'a_year' => '{1}рік|:count рік|:count роки|:count років', + 'month' => ':count місяць|:count місяці|:count місяців', + 'm' => ':countм', + 'a_month' => '{1}місяць|:count місяць|:count місяці|:count місяців', + 'week' => ':count тиждень|:count тижні|:count тижнів', + 'w' => ':countт', + 'a_week' => '{1}тиждень|:count тиждень|:count тижні|:count тижнів', + 'day' => ':count день|:count дні|:count днів', + 'd' => ':countд', + 'a_day' => '{1}день|:count день|:count дні|:count днів', + 'hour' => ':count година|:count години|:count годин', + 'h' => ':countг', + 'a_hour' => '{1}година|:count година|:count години|:count годин', + 'minute' => ':count хвилина|:count хвилини|:count хвилин', + 'min' => ':countхв', + 'a_minute' => '{1}хвилина|:count хвилина|:count хвилини|:count хвилин', + 'second' => ':count секунда|:count секунди|:count секунд', + 's' => ':countсек', + 'a_second' => '{1}декілька секунд|:count секунда|:count секунди|:count секунд', + + 'hour_ago' => ':count годину|:count години|:count годин', + 'a_hour_ago' => '{1}годину|:count годину|:count години|:count годин', + 'minute_ago' => ':count хвилину|:count хвилини|:count хвилин', + 'a_minute_ago' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', + 'second_ago' => ':count секунду|:count секунди|:count секунд', + 'a_second_ago' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', + + 'hour_from_now' => ':count годину|:count години|:count годин', + 'a_hour_from_now' => '{1}годину|:count годину|:count години|:count годин', + 'minute_from_now' => ':count хвилину|:count хвилини|:count хвилин', + 'a_minute_from_now' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', + 'second_from_now' => ':count секунду|:count секунди|:count секунд', + 'a_second_from_now' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', + + 'hour_after' => ':count годину|:count години|:count годин', + 'a_hour_after' => '{1}годину|:count годину|:count години|:count годин', + 'minute_after' => ':count хвилину|:count хвилини|:count хвилин', + 'a_minute_after' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', + 'second_after' => ':count секунду|:count секунди|:count секунд', + 'a_second_after' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', + + 'hour_before' => ':count годину|:count години|:count годин', + 'a_hour_before' => '{1}годину|:count годину|:count години|:count годин', + 'minute_before' => ':count хвилину|:count хвилини|:count хвилин', + 'a_minute_before' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', + 'second_before' => ':count секунду|:count секунди|:count секунд', + 'a_second_before' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', + + 'ago' => ':time тому', + 'from_now' => 'за :time', + 'after' => ':time після', + 'before' => ':time до', + 'diff_now' => 'щойно', + 'diff_today' => 'Сьогодні', + 'diff_today_regexp' => 'Сьогодні(?:\\s+о)?', + 'diff_yesterday' => 'вчора', + 'diff_yesterday_regexp' => 'Вчора(?:\\s+о)?', + 'diff_tomorrow' => 'завтра', + 'diff_tomorrow_regexp' => 'Завтра(?:\\s+о)?', + 'diff_before_yesterday' => 'позавчора', + 'diff_after_tomorrow' => 'післязавтра', + 'period_recurrences' => 'один раз|:count рази|:count разів', + 'period_interval' => 'кожні :interval', + 'period_start_date' => 'з :date', + 'period_end_date' => 'до :date', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY, HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', + ], + 'calendar' => [ + 'sameDay' => function (CarbonInterface $date) use ($processHoursFunction) { + return $processHoursFunction($date, '[Сьогодні '); + }, + 'nextDay' => function (CarbonInterface $date) use ($processHoursFunction) { + return $processHoursFunction($date, '[Завтра '); + }, + 'nextWeek' => function (CarbonInterface $date) use ($processHoursFunction) { + return $processHoursFunction($date, '[У] dddd ['); + }, + 'lastDay' => function (CarbonInterface $date) use ($processHoursFunction) { + return $processHoursFunction($date, '[Вчора '); + }, + 'lastWeek' => function (CarbonInterface $date) use ($processHoursFunction) { + switch ($date->dayOfWeek) { + case 0: + case 3: + case 5: + case 6: + return $processHoursFunction($date, '[Минулої] dddd ['); + default: + return $processHoursFunction($date, '[Минулого] dddd ['); + } + }, + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return $number.'-й'; + case 'D': + return $number.'-го'; + default: + return $number; + } + }, + 'meridiem' => function ($hour) { + if ($hour < 4) { + return 'ночі'; + } + if ($hour < 12) { + return 'ранку'; + } + if ($hour < 17) { + return 'дня'; + } + + return 'вечора'; + }, + 'months' => ['січня', 'лютого', 'березня', 'квітня', 'травня', 'червня', 'липня', 'серпня', 'вересня', 'жовтня', 'листопада', 'грудня'], + 'months_standalone' => ['січень', 'лютий', 'березень', 'квітень', 'травень', 'червень', 'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень'], + 'months_short' => ['січ', 'лют', 'бер', 'кві', 'тра', 'чер', 'лип', 'сер', 'вер', 'жов', 'лис', 'гру'], + 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', + 'weekdays' => function (CarbonInterface $date, $format, $index) { + static $words = [ + 'nominative' => ['неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п’ятниця', 'субота'], + 'accusative' => ['неділю', 'понеділок', 'вівторок', 'середу', 'четвер', 'п’ятницю', 'суботу'], + 'genitive' => ['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи'], + ]; + + $format = $format ?? ''; + $nounCase = preg_match('/(\[(В|в|У|у)\])\s+dddd/u', $format) + ? 'accusative' + : ( + preg_match('/\[?(?:минулої|наступної)?\s*\]\s+dddd/u', $format) + ? 'genitive' + : 'nominative' + ); + + return $words[$nounCase][$index] ?? null; + }, + 'weekdays_short' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], + 'weekdays_min' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' i '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/uk_UA.php b/libraries/Carbon/src/Carbon/Lang/uk_UA.php new file mode 100644 index 00000000000..ab69f14c772 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uk_UA.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/uk.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/unm.php b/libraries/Carbon/src/Carbon/Lang/unm.php new file mode 100644 index 00000000000..fcbddafe37d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/unm.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/unm_US.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/unm_US.php b/libraries/Carbon/src/Carbon/Lang/unm_US.php new file mode 100644 index 00000000000..9984691aeb8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/unm_US.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['enikwsi', 'chkwali', 'xamokhwite', 'kwetayoxe', 'tainipen', 'kichinipen', 'lainipen', 'winaminke', 'kichitahkok', 'puksit', 'wini', 'muxkotae'], + 'months_short' => ['eni', 'chk', 'xam', 'kwe', 'tai', 'nip', 'lai', 'win', 'tah', 'puk', 'kun', 'mux'], + 'weekdays' => ['kentuwei', 'manteke', 'tusteke', 'lelai', 'tasteke', 'pelaiteke', 'sateteke'], + 'weekdays_short' => ['ken', 'man', 'tus', 'lel', 'tas', 'pel', 'sat'], + 'weekdays_min' => ['ken', 'man', 'tus', 'lel', 'tas', 'pel', 'sat'], + 'day_of_first_week_of_year' => 1, + + // Too unreliable + /* + 'year' => ':count kaxtëne', + 'y' => ':count kaxtëne', + 'a_year' => ':count kaxtëne', + + 'month' => ':count piskewëni kishux', // less reliable + 'm' => ':count piskewëni kishux', // less reliable + 'a_month' => ':count piskewëni kishux', // less reliable + + 'week' => ':count kishku', // less reliable + 'w' => ':count kishku', // less reliable + 'a_week' => ':count kishku', // less reliable + + 'day' => ':count kishku', + 'd' => ':count kishku', + 'a_day' => ':count kishku', + + 'hour' => ':count xkuk', // less reliable + 'h' => ':count xkuk', // less reliable + 'a_hour' => ':count xkuk', // less reliable + + 'minute' => ':count txituwàk', // less reliable + 'min' => ':count txituwàk', // less reliable + 'a_minute' => ':count txituwàk', // less reliable + + 'second' => ':count nisha', // less reliable + 's' => ':count nisha', // less reliable + 'a_second' => ':count nisha', // less reliable + */ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ur.php b/libraries/Carbon/src/Carbon/Lang/ur.php new file mode 100644 index 00000000000..688f61ba758 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ur.php @@ -0,0 +1,94 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +$months = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر', +]; + +$weekdays = [ + 'اتوار', + 'پیر', + 'منگل', + 'بدھ', + 'جمعرات', + 'جمعہ', + 'ہفتہ', +]; + +/* + * Authors: + * - Sawood Alam + * - Mehshan + * - Philippe Vaucher + * - Tsutomu Kuroda + * - tjku + * - Zaid Akram + * - Max Melentiev + * - hafezdivandari + * - Hossein Jabbari + * - nimamo + */ +return [ + 'year' => 'ایک سال|:count سال', + 'month' => 'ایک ماہ|:count ماہ', + 'week' => ':count ہفتے', + 'day' => 'ایک دن|:count دن', + 'hour' => 'ایک گھنٹہ|:count گھنٹے', + 'minute' => 'ایک منٹ|:count منٹ', + 'second' => 'چند سیکنڈ|:count سیکنڈ', + 'ago' => ':time قبل', + 'from_now' => ':time بعد', + 'after' => ':time بعد', + 'before' => ':time پہلے', + 'diff_now' => 'اب', + 'diff_today' => 'آج', + 'diff_today_regexp' => 'آج(?:\\s+بوقت)?', + 'diff_yesterday' => 'گزشتہ کل', + 'diff_yesterday_regexp' => 'گذشتہ(?:\\s+روز)?(?:\\s+بوقت)?', + 'diff_tomorrow' => 'آئندہ کل', + 'diff_tomorrow_regexp' => 'کل(?:\\s+بوقت)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd، D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[آج بوقت] LT', + 'nextDay' => '[کل بوقت] LT', + 'nextWeek' => 'dddd [بوقت] LT', + 'lastDay' => '[گذشتہ روز بوقت] LT', + 'lastWeek' => '[گذشتہ] dddd [بوقت] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['صبح', 'شام'], + 'months' => $months, + 'months_short' => $months, + 'weekdays' => $weekdays, + 'weekdays_short' => $weekdays, + 'weekdays_min' => $weekdays, + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => ['، ', ' اور '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/ur_IN.php b/libraries/Carbon/src/Carbon/Lang/ur_IN.php new file mode 100644 index 00000000000..91084df7684 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ur_IN.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Red Hat, Pune bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/ur.php', [ + 'formats' => [ + 'L' => 'D/M/YY', + ], + 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'weekdays' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], + 'weekdays_short' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], + 'weekdays_min' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/ur_PK.php b/libraries/Carbon/src/Carbon/Lang/ur_PK.php new file mode 100644 index 00000000000..4cc18283902 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ur_PK.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/ur.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'weekdays' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], + 'weekdays_short' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], + 'weekdays_min' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ص', 'ش'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/uz.php b/libraries/Carbon/src/Carbon/Lang/uz.php new file mode 100644 index 00000000000..6cb93bb97bf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uz.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Dmitriy Shabanov + * - JD Isaacks + * - Inoyatulloh + * - Jamshid + * - aarkhipov + * - Philippe Vaucher + * - felixthemagnificent + * - Tsutomu Kuroda + * - tjku + * - Max Melentiev + * - Juanito Fatas + * - Alisher Ulugbekov + * - Ergashev Adizbek + */ +return [ + 'year' => ':count йил', + 'a_year' => '{1}бир йил|:count йил', + 'y' => ':count й', + 'month' => ':count ой', + 'a_month' => '{1}бир ой|:count ой', + 'm' => ':count о', + 'week' => ':count ҳафта', + 'a_week' => '{1}бир ҳафта|:count ҳафта', + 'w' => ':count ҳ', + 'day' => ':count кун', + 'a_day' => '{1}бир кун|:count кун', + 'd' => ':count к', + 'hour' => ':count соат', + 'a_hour' => '{1}бир соат|:count соат', + 'h' => ':count с', + 'minute' => ':count дақиқа', + 'a_minute' => '{1}бир дақиқа|:count дақиқа', + 'min' => ':count д', + 'second' => ':count сония', + 'a_second' => '{1}сония|:count сония', + 's' => ':count с', + 'ago' => ':time аввал', + 'from_now' => 'Якин :time ичида', + 'after' => ':timeдан кейин', + 'before' => ':time олдин', + 'diff_now' => 'ҳозир', + 'diff_today' => 'Бугун', + 'diff_today_regexp' => 'Бугун(?:\\s+соат)?', + 'diff_yesterday' => 'Кеча', + 'diff_yesterday_regexp' => 'Кеча(?:\\s+соат)?', + 'diff_tomorrow' => 'Эртага', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'D MMMM YYYY, dddd HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Бугун соат] LT [да]', + 'nextDay' => '[Эртага] LT [да]', + 'nextWeek' => 'dddd [куни соат] LT [да]', + 'lastDay' => '[Кеча соат] LT [да]', + 'lastWeek' => '[Утган] dddd [куни соат] LT [да]', + 'sameElse' => 'L', + ], + 'months' => ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'], + 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], + 'weekdays' => ['якшанба', 'душанба', 'сешанба', 'чоршанба', 'пайшанба', 'жума', 'шанба'], + 'weekdays_short' => ['якш', 'душ', 'сеш', 'чор', 'пай', 'жум', 'шан'], + 'weekdays_min' => ['як', 'ду', 'се', 'чо', 'па', 'жу', 'ша'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['эрталаб', 'кечаси'], + 'list' => [', ', ' ва '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/uz_Arab.php b/libraries/Carbon/src/Carbon/Lang/uz_Arab.php new file mode 100644 index 00000000000..84575491c92 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uz_Arab.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/fa.php', [ + 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], + 'weekdays_short' => ['ی.', 'د.', 'س.', 'چ.', 'پ.', 'ج.', 'ش.'], + 'weekdays_min' => ['ی.', 'د.', 'س.', 'چ.', 'پ.', 'ج.', 'ش.'], + 'months' => ['جنوری', 'فبروری', 'مارچ', 'اپریل', 'می', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], + 'months_short' => ['جنو', 'فبر', 'مار', 'اپر', 'می', 'جون', 'جول', 'اگس', 'سپت', 'اکت', 'نوم', 'دسم'], + 'first_day_of_week' => 6, + 'weekend' => [4, 5], + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'YYYY MMMM D, dddd HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/uz_Cyrl.php b/libraries/Carbon/src/Carbon/Lang/uz_Cyrl.php new file mode 100644 index 00000000000..18d8c223d68 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uz_Cyrl.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/uz.php', [ + 'formats' => [ + 'L' => 'DD/MM/yy', + 'LL' => 'D MMM, YYYY', + 'LLL' => 'D MMMM, YYYY HH:mm', + 'LLLL' => 'dddd, DD MMMM, YYYY HH:mm', + ], + 'meridiem' => ['ТО', 'ТК'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/uz_Latn.php b/libraries/Carbon/src/Carbon/Lang/uz_Latn.php new file mode 100644 index 00000000000..0f1db8a1734 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uz_Latn.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Josh Soref + * - Rasulbek + * - Ilyosjon Kamoldinov (ilyosjon09) + */ +return [ + 'year' => ':count yil', + 'a_year' => '{1}bir yil|:count yil', + 'y' => ':count y', + 'month' => ':count oy', + 'a_month' => '{1}bir oy|:count oy', + 'm' => ':count o', + 'week' => ':count hafta', + 'a_week' => '{1}bir hafta|:count hafta', + 'w' => ':count h', + 'day' => ':count kun', + 'a_day' => '{1}bir kun|:count kun', + 'd' => ':count k', + 'hour' => ':count soat', + 'a_hour' => '{1}bir soat|:count soat', + 'h' => ':count soat', + 'minute' => ':count daqiqa', + 'a_minute' => '{1}bir daqiqa|:count daqiqa', + 'min' => ':count d', + 'second' => ':count soniya', + 'a_second' => '{1}soniya|:count soniya', + 's' => ':count son.', + 'ago' => ':time avval', + 'from_now' => 'Yaqin :time ichida', + 'after' => ':timedan keyin', + 'before' => ':time oldin', + 'diff_yesterday' => 'Kecha', + 'diff_yesterday_regexp' => 'Kecha(?:\\s+soat)?', + 'diff_today' => 'Bugun', + 'diff_today_regexp' => 'Bugun(?:\\s+soat)?', + 'diff_tomorrow' => 'Ertaga', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'D MMMM YYYY, dddd HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Bugun soat] LT [da]', + 'nextDay' => '[Ertaga] LT [da]', + 'nextWeek' => 'dddd [kuni soat] LT [da]', + 'lastDay' => '[Kecha soat] LT [da]', + 'lastWeek' => '[O\'tgan] dddd [kuni soat] LT [da]', + 'sameElse' => 'L', + ], + 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Avgust', 'Sentabr', 'Oktabr', 'Noyabr', 'Dekabr'], + 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'Iyun', 'Iyul', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], + 'weekdays' => ['Yakshanba', 'Dushanba', 'Seshanba', 'Chorshanba', 'Payshanba', 'Juma', 'Shanba'], + 'weekdays_short' => ['Yak', 'Dush', 'Sesh', 'Chor', 'Pay', 'Jum', 'Shan'], + 'weekdays_min' => ['Ya', 'Du', 'Se', 'Cho', 'Pa', 'Ju', 'Sha'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' va '], + 'meridiem' => ['TO', 'TK'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/uz_UZ.php b/libraries/Carbon/src/Carbon/Lang/uz_UZ.php new file mode 100644 index 00000000000..d1b1ce009e5 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uz_UZ.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Bobir Ismailov Bobir Ismailov, Pablo Saratxaga, Mashrab Kuvatov bobir_is@yahoo.com, pablo@mandrakesoft.com, kmashrab@uni-bremen.de + */ +return array_replace_recursive(require __DIR__.'/uz_Latn.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Avgust', 'Sentabr', 'Oktabr', 'Noyabr', 'Dekabr'], + 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'Iyn', 'Iyl', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], + 'weekdays' => ['Yakshanba', 'Dushanba', 'Seshanba', 'Chorshanba', 'Payshanba', 'Juma', 'Shanba'], + 'weekdays_short' => ['Yak', 'Du', 'Se', 'Cho', 'Pay', 'Ju', 'Sha'], + 'weekdays_min' => ['Yak', 'Du', 'Se', 'Cho', 'Pay', 'Ju', 'Sha'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/uz_UZ@cyrillic.php b/libraries/Carbon/src/Carbon/Lang/uz_UZ@cyrillic.php new file mode 100644 index 00000000000..d6c8c723d6e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/uz_UZ@cyrillic.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Mashrab Kuvatov Mashrab Kuvatov, Pablo Saratxaga kmashrab@uni-bremen.de, pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/uz.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['Январ', 'Феврал', 'Март', 'Апрел', 'Май', 'Июн', 'Июл', 'Август', 'Сентябр', 'Октябр', 'Ноябр', 'Декабр'], + 'months_short' => ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], + 'weekdays' => ['Якшанба', 'Душанба', 'Сешанба', 'Чоршанба', 'Пайшанба', 'Жума', 'Шанба'], + 'weekdays_short' => ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'], + 'weekdays_min' => ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/vai.php b/libraries/Carbon/src/Carbon/Lang/vai.php new file mode 100644 index 00000000000..a53a398d19a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/vai.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], + 'weekdays_short' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], + 'weekdays_min' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], + 'months' => ['ꖨꖕ ꕪꕴ ꔞꔀꕮꕊ', 'ꕒꕡꖝꖕ', 'ꕾꖺ', 'ꖢꖕ', 'ꖑꕱ', 'ꖱꘋ', 'ꖱꕞꔤ', 'ꗛꔕ', 'ꕢꕌ', 'ꕭꖃ', 'ꔞꘋꕔꕿ ꕸꖃꗏ', 'ꖨꖕ ꕪꕴ ꗏꖺꕮꕊ'], + 'months_short' => ['ꖨꖕꔞ', 'ꕒꕡ', 'ꕾꖺ', 'ꖢꖕ', 'ꖑꕱ', 'ꖱꘋ', 'ꖱꕞ', 'ꗛꔕ', 'ꕢꕌ', 'ꕭꖃ', 'ꔞꘋ', 'ꖨꖕꗏ'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd, D MMMM YYYY h:mm a', + ], + + 'year' => ':count ꕀ', // less reliable + 'y' => ':count ꕀ', // less reliable + 'a_year' => ':count ꕀ', // less reliable + + 'second' => ':count ꗱꕞꕯꕊ', // less reliable + 's' => ':count ꗱꕞꕯꕊ', // less reliable + 'a_second' => ':count ꗱꕞꕯꕊ', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/vai_Latn.php b/libraries/Carbon/src/Carbon/Lang/vai_Latn.php new file mode 100644 index 00000000000..c1206a3aada --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/vai_Latn.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'weekdays' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], + 'weekdays_short' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], + 'weekdays_min' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], + 'months' => ['luukao kemã', 'ɓandaɓu', 'vɔɔ', 'fulu', 'goo', '6', '7', 'kɔnde', 'saah', 'galo', 'kenpkato ɓololɔ', 'luukao lɔma'], + 'months_short' => ['luukao kemã', 'ɓandaɓu', 'vɔɔ', 'fulu', 'goo', '6', '7', 'kɔnde', 'saah', 'galo', 'kenpkato ɓololɔ', 'luukao lɔma'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'h:mm a', + 'LTS' => 'h:mm:ss a', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm a', + 'LLLL' => 'dddd, D MMMM YYYY h:mm a', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/vai_Vaii.php b/libraries/Carbon/src/Carbon/Lang/vai_Vaii.php new file mode 100644 index 00000000000..3afe9641133 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/vai_Vaii.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/vai.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ve.php b/libraries/Carbon/src/Carbon/Lang/ve.php new file mode 100644 index 00000000000..8d3e5912c70 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ve.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/ve_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/ve_ZA.php b/libraries/Carbon/src/Carbon/Lang/ve_ZA.php new file mode 100644 index 00000000000..9a2725fdec9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/ve_ZA.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Phando', 'Luhuhi', 'Ṱhafamuhwe', 'Lambamai', 'Shundunthule', 'Fulwi', 'Fulwana', 'Ṱhangule', 'Khubvumedzi', 'Tshimedzi', 'Ḽara', 'Nyendavhusiku'], + 'months_short' => ['Pha', 'Luh', 'Fam', 'Lam', 'Shu', 'Lwi', 'Lwa', 'Ngu', 'Khu', 'Tsh', 'Ḽar', 'Nye'], + 'weekdays' => ['Swondaha', 'Musumbuluwo', 'Ḽavhuvhili', 'Ḽavhuraru', 'Ḽavhuṋa', 'Ḽavhuṱanu', 'Mugivhela'], + 'weekdays_short' => ['Swo', 'Mus', 'Vhi', 'Rar', 'ṋa', 'Ṱan', 'Mug'], + 'weekdays_min' => ['Swo', 'Mus', 'Vhi', 'Rar', 'ṋa', 'Ṱan', 'Mug'], + 'day_of_first_week_of_year' => 1, + + // Too unreliable + /* + 'day' => ':count vhege', // less reliable + 'd' => ':count vhege', // less reliable + 'a_day' => ':count vhege', // less reliable + + 'hour' => ':count watshi', // less reliable + 'h' => ':count watshi', // less reliable + 'a_hour' => ':count watshi', // less reliable + + 'minute' => ':count watshi', // less reliable + 'min' => ':count watshi', // less reliable + 'a_minute' => ':count watshi', // less reliable + + 'second' => ':count Mu', // less reliable + 's' => ':count Mu', // less reliable + 'a_second' => ':count Mu', // less reliable + + 'week' => ':count vhege', + 'w' => ':count vhege', + 'a_week' => ':count vhege', + */ +]); diff --git a/libraries/Carbon/src/Carbon/Lang/vi.php b/libraries/Carbon/src/Carbon/Lang/vi.php new file mode 100644 index 00000000000..77246b40f51 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/vi.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Andre Polykanine A.K.A. Menelion Elensúlë + * - JD Isaacks + */ +return [ + 'year' => ':count năm', + 'a_year' => '{1}một năm|]1, Inf[:count năm', + 'y' => ':count năm', + 'month' => ':count tháng', + 'a_month' => '{1}một tháng|]1, Inf[:count tháng', + 'm' => ':count tháng', + 'week' => ':count tuần', + 'a_week' => '{1}một tuần|]1, Inf[:count tuần', + 'w' => ':count tuần', + 'day' => ':count ngày', + 'a_day' => '{1}một ngày|]1, Inf[:count ngày', + 'd' => ':count ngày', + 'hour' => ':count giờ', + 'a_hour' => '{1}một giờ|]1, Inf[:count giờ', + 'h' => ':count giờ', + 'minute' => ':count phút', + 'a_minute' => '{1}một phút|]1, Inf[:count phút', + 'min' => ':count phút', + 'second' => ':count giây', + 'a_second' => '{1}vài giây|]1, Inf[:count giây', + 's' => ':count giây', + 'ago' => ':time trước', + 'from_now' => ':time tới', + 'after' => ':time sau', + 'before' => ':time trước', + 'diff_now' => 'bây giờ', + 'diff_today' => 'Hôm', + 'diff_today_regexp' => 'Hôm(?:\\s+nay)?(?:\\s+lúc)?', + 'diff_yesterday' => 'Hôm qua', + 'diff_yesterday_regexp' => 'Hôm(?:\\s+qua)?(?:\\s+lúc)?', + 'diff_tomorrow' => 'Ngày mai', + 'diff_tomorrow_regexp' => 'Ngày(?:\\s+mai)?(?:\\s+lúc)?', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM [năm] YYYY', + 'LLL' => 'D MMMM [năm] YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM [năm] YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[Hôm nay lúc] LT', + 'nextDay' => '[Ngày mai lúc] LT', + 'nextWeek' => 'dddd [tuần tới lúc] LT', + 'lastDay' => '[Hôm qua lúc] LT', + 'lastWeek' => 'dddd [tuần trước lúc] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['SA', 'CH'], + 'months' => ['tháng 1', 'tháng 2', 'tháng 3', 'tháng 4', 'tháng 5', 'tháng 6', 'tháng 7', 'tháng 8', 'tháng 9', 'tháng 10', 'tháng 11', 'tháng 12'], + 'months_short' => ['Th01', 'Th02', 'Th03', 'Th04', 'Th05', 'Th06', 'Th07', 'Th08', 'Th09', 'Th10', 'Th11', 'Th12'], + 'weekdays' => ['chủ nhật', 'thứ hai', 'thứ ba', 'thứ tư', 'thứ năm', 'thứ sáu', 'thứ bảy'], + 'weekdays_short' => ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], + 'weekdays_min' => ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => [', ', ' và '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/vi_VN.php b/libraries/Carbon/src/Carbon/Lang/vi_VN.php new file mode 100644 index 00000000000..b4e90f48b28 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/vi_VN.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/vi.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/vo.php b/libraries/Carbon/src/Carbon/Lang/vo.php new file mode 100644 index 00000000000..111ffb834d1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/vo.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], + 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY-MM-dd', + 'LL' => 'YYYY MMM D', + 'LLL' => 'YYYY MMMM D HH:mm', + 'LLLL' => 'YYYY MMMM D, dddd HH:mm', + ], + + 'year' => ':count yel', + 'y' => ':count yel', + 'a_year' => ':count yel', + + 'month' => ':count mul', + 'm' => ':count mul', + 'a_month' => ':count mul', + + 'week' => ':count vig', + 'w' => ':count vig', + 'a_week' => ':count vig', + + 'day' => ':count del', + 'd' => ':count del', + 'a_day' => ':count del', + + 'hour' => ':count düp', + 'h' => ':count düp', + 'a_hour' => ':count düp', + + 'minute' => ':count minut', + 'min' => ':count minut', + 'a_minute' => ':count minut', + + 'second' => ':count sekun', + 's' => ':count sekun', + 'a_second' => ':count sekun', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/vun.php b/libraries/Carbon/src/Carbon/Lang/vun.php new file mode 100644 index 00000000000..f11ba53eaa9 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/vun.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['utuko', 'kyiukonyi'], + 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], + 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], + 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/wa.php b/libraries/Carbon/src/Carbon/Lang/wa.php new file mode 100644 index 00000000000..d982a0dad35 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wa.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/wa_BE.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/wa_BE.php b/libraries/Carbon/src/Carbon/Lang/wa_BE.php new file mode 100644 index 00000000000..e6c103a1c31 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wa_BE.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Djan SACRE Pablo Saratxaga pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['di djanvî', 'di fevrî', 'di måss', 'd’ avri', 'di may', 'di djun', 'di djulete', 'd’ awousse', 'di setimbe', 'd’ octôbe', 'di nôvimbe', 'di decimbe'], + 'months_short' => ['dja', 'fev', 'mås', 'avr', 'may', 'djn', 'djl', 'awo', 'set', 'oct', 'nôv', 'dec'], + 'weekdays' => ['dimegne', 'londi', 'mårdi', 'mierkidi', 'djudi', 'vénrdi', 'semdi'], + 'weekdays_short' => ['dim', 'lon', 'mår', 'mie', 'dju', 'vén', 'sem'], + 'weekdays_min' => ['dim', 'lon', 'mår', 'mie', 'dju', 'vén', 'sem'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'year' => ':count anêye', + 'y' => ':count anêye', + 'a_year' => ':count anêye', + + 'month' => ':count meûs', + 'm' => ':count meûs', + 'a_month' => ':count meûs', + + 'week' => ':count samwinne', + 'w' => ':count samwinne', + 'a_week' => ':count samwinne', + + 'day' => ':count djoû', + 'd' => ':count djoû', + 'a_day' => ':count djoû', + + 'hour' => ':count eure', + 'h' => ':count eure', + 'a_hour' => ':count eure', + + 'minute' => ':count munute', + 'min' => ':count munute', + 'a_minute' => ':count munute', + + 'second' => ':count Sigonde', + 's' => ':count Sigonde', + 'a_second' => ':count Sigonde', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/wae.php b/libraries/Carbon/src/Carbon/Lang/wae.php new file mode 100644 index 00000000000..d25cd99430f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wae.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/wae_CH.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/wae_CH.php b/libraries/Carbon/src/Carbon/Lang/wae_CH.php new file mode 100644 index 00000000000..ece5c04444b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wae_CH.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Walser Translation Team ml@translate-wae.ch + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], + 'months' => ['Jenner', 'Hornig', 'Märze', 'Abrille', 'Meije', 'Bráčet', 'Heiwet', 'Öigšte', 'Herbštmánet', 'Wímánet', 'Wintermánet', 'Chrištmánet'], + 'months_short' => ['Jen', 'Hor', 'Mär', 'Abr', 'Mei', 'Brá', 'Hei', 'Öig', 'Her', 'Wím', 'Win', 'Chr'], + 'weekdays' => ['Suntag', 'Mäntag', 'Zischtag', 'Mittwuch', 'Frontag', 'Fritag', 'Samschtag'], + 'weekdays_short' => ['Sun', 'Män', 'Zis', 'Mit', 'Fro', 'Fri', 'Sam'], + 'weekdays_min' => ['Sun', 'Män', 'Zis', 'Mit', 'Fro', 'Fri', 'Sam'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + + 'month' => ':count Maano', // less reliable + 'm' => ':count Maano', // less reliable + 'a_month' => ':count Maano', // less reliable +]); diff --git a/libraries/Carbon/src/Carbon/Lang/wal.php b/libraries/Carbon/src/Carbon/Lang/wal.php new file mode 100644 index 00000000000..e30f3ca3082 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wal.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/wal_ET.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/wal_ET.php b/libraries/Carbon/src/Carbon/Lang/wal_ET.php new file mode 100644 index 00000000000..f0146db3727 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wal_ET.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Ge'ez Frontier Foundation locales@geez.org + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], + 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], + 'weekdays' => ['ወጋ', 'ሳይኖ', 'ማቆሳኛ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ'], + 'weekdays_short' => ['ወጋ ', 'ሳይኖ', 'ማቆሳ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ '], + 'weekdays_min' => ['ወጋ ', 'ሳይኖ', 'ማቆሳ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ '], + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['ማለዶ', 'ቃማ'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/wo.php b/libraries/Carbon/src/Carbon/Lang/wo.php new file mode 100644 index 00000000000..d7725256256 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wo.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/wo_SN.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/wo_SN.php b/libraries/Carbon/src/Carbon/Lang/wo_SN.php new file mode 100644 index 00000000000..b15ce3ab94f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/wo_SN.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - The Debian Project Christian Perrier bubulle@debian.org + */ +return [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'MMMM DD, YYYY', + 'LLL' => 'DD MMM HH:mm', + 'LLLL' => 'MMMM DD, YYYY HH:mm', + ], + 'months' => ['sanwiy\'e', 'feebriy\'e', 'mars', 'awril', 'me', 'suwen', 'sulet', 'uut', 'septaambar', 'oktoobar', 'nowaambar', 'desaambar'], + 'months_short' => ['san', 'fee', 'mar', 'awr', 'me ', 'suw', 'sul', 'uut', 'sep', 'okt', 'now', 'des'], + 'weekdays' => ['dib\'eer', 'altine', 'talaata', 'allarba', 'alxames', 'ajjuma', 'gaawu'], + 'weekdays_short' => ['dib', 'alt', 'tal', 'all', 'alx', 'ajj', 'gaa'], + 'weekdays_min' => ['dib', 'alt', 'tal', 'all', 'alx', 'ajj', 'gaa'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'year' => ':count at', + 'month' => ':count wèr', + 'week' => ':count ayubés', + 'day' => ':count bés', + 'hour' => ':count waxtu', + 'minute' => ':count simili', + 'second' => ':count saa', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/xh.php b/libraries/Carbon/src/Carbon/Lang/xh.php new file mode 100644 index 00000000000..dd9ce6bf42a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/xh.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/xh_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/xh_ZA.php b/libraries/Carbon/src/Carbon/Lang/xh_ZA.php new file mode 100644 index 00000000000..4755632d8e6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/xh_ZA.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['eyoMqungu', 'eyoMdumba', 'eyoKwindla', 'uTshazimpuzi', 'uCanzibe', 'eyeSilimela', 'eyeKhala', 'eyeThupa', 'eyoMsintsi', 'eyeDwarha', 'eyeNkanga', 'eyoMnga'], + 'months_short' => ['Mqu', 'Mdu', 'Kwi', 'Tsh', 'Can', 'Sil', 'Kha', 'Thu', 'Msi', 'Dwa', 'Nka', 'Mng'], + 'weekdays' => ['iCawa', 'uMvulo', 'lwesiBini', 'lwesiThathu', 'ulweSine', 'lwesiHlanu', 'uMgqibelo'], + 'weekdays_short' => ['Caw', 'Mvu', 'Bin', 'Tha', 'Sin', 'Hla', 'Mgq'], + 'weekdays_min' => ['Caw', 'Mvu', 'Bin', 'Tha', 'Sin', 'Hla', 'Mgq'], + 'day_of_first_week_of_year' => 1, + + 'year' => ':count ihlobo', // less reliable + 'y' => ':count ihlobo', // less reliable + 'a_year' => ':count ihlobo', // less reliable + + 'hour' => ':count iwotshi', // less reliable + 'h' => ':count iwotshi', // less reliable + 'a_hour' => ':count iwotshi', // less reliable + + 'minute' => ':count ingqalelo', // less reliable + 'min' => ':count ingqalelo', // less reliable + 'a_minute' => ':count ingqalelo', // less reliable + + 'second' => ':count nceda', // less reliable + 's' => ':count nceda', // less reliable + 'a_second' => ':count nceda', // less reliable + + 'month' => ':count inyanga', + 'm' => ':count inyanga', + 'a_month' => ':count inyanga', + + 'week' => ':count veki', + 'w' => ':count veki', + 'a_week' => ':count veki', + + 'day' => ':count imini', + 'd' => ':count imini', + 'a_day' => ':count imini', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/xog.php b/libraries/Carbon/src/Carbon/Lang/xog.php new file mode 100644 index 00000000000..9e65ee9db5f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/xog.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['Munkyo', 'Eigulo'], + 'weekdays' => ['Sabiiti', 'Balaza', 'Owokubili', 'Owokusatu', 'Olokuna', 'Olokutaanu', 'Olomukaaga'], + 'weekdays_short' => ['Sabi', 'Bala', 'Kubi', 'Kusa', 'Kuna', 'Kuta', 'Muka'], + 'weekdays_min' => ['Sabi', 'Bala', 'Kubi', 'Kusa', 'Kuna', 'Kuta', 'Muka'], + 'months' => ['Janwaliyo', 'Febwaliyo', 'Marisi', 'Apuli', 'Maayi', 'Juuni', 'Julaayi', 'Agusito', 'Sebuttemba', 'Okitobba', 'Novemba', 'Desemba'], + 'months_short' => ['Jan', 'Feb', 'Mar', 'Apu', 'Maa', 'Juu', 'Jul', 'Agu', 'Seb', 'Oki', 'Nov', 'Des'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/yav.php b/libraries/Carbon/src/Carbon/Lang/yav.php new file mode 100644 index 00000000000..d800a464a48 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yav.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/en.php', [ + 'meridiem' => ['kiɛmɛ́ɛm', 'kisɛ́ndɛ'], + 'weekdays' => ['sɔ́ndiɛ', 'móndie', 'muányáŋmóndie', 'metúkpíápɛ', 'kúpélimetúkpiapɛ', 'feléte', 'séselé'], + 'weekdays_short' => ['sd', 'md', 'mw', 'et', 'kl', 'fl', 'ss'], + 'weekdays_min' => ['sd', 'md', 'mw', 'et', 'kl', 'fl', 'ss'], + 'months' => ['pikítíkítie, oólí ú kutúan', 'siɛyɛ́, oóli ú kándíɛ', 'ɔnsúmbɔl, oóli ú kátátúɛ', 'mesiŋ, oóli ú kénie', 'ensil, oóli ú kátánuɛ', 'ɔsɔn', 'efute', 'pisuyú', 'imɛŋ i puɔs', 'imɛŋ i putúk,oóli ú kátíɛ', 'makandikɛ', 'pilɔndɔ́'], + 'months_short' => ['o.1', 'o.2', 'o.3', 'o.4', 'o.5', 'o.6', 'o.7', 'o.8', 'o.9', 'o.10', 'o.11', 'o.12'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/yi.php b/libraries/Carbon/src/Carbon/Lang/yi.php new file mode 100644 index 00000000000..2295f36a670 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yi.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/yi_US.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/yi_US.php b/libraries/Carbon/src/Carbon/Lang/yi_US.php new file mode 100644 index 00000000000..f82ab14939e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yi_US.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - http://www.uyip.org/ Pablo Saratxaga pablo@mandrakesoft.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['יאַנואַר', 'פֿעברואַר', 'מערץ', 'אַפּריל', 'מיי', 'יוני', 'יולי', 'אויגוסט', 'סעפּטעמבער', 'אקטאבער', 'נאוועמבער', 'דעצעמבער'], + 'months_short' => ['יאַנ', 'פֿעב', 'מאַר', 'אַפּר', 'מײַ ', 'יונ', 'יול', 'אױג', 'סעפּ', 'אָקט', 'נאָװ', 'דעצ'], + 'weekdays' => ['זונטיק', 'מאָנטיק', 'דינסטיק', 'מיטװאָך', 'דאָנערשטיק', 'פֿרײַטיק', 'שבת'], + 'weekdays_short' => ['זונ\'', 'מאָנ\'', 'דינ\'', 'מיט\'', 'דאָנ\'', 'פֿרײַ\'', 'שבת'], + 'weekdays_min' => ['זונ\'', 'מאָנ\'', 'דינ\'', 'מיט\'', 'דאָנ\'', 'פֿרײַ\'', 'שבת'], + 'day_of_first_week_of_year' => 1, + + 'year' => ':count יאר', + 'y' => ':count יאר', + 'a_year' => ':count יאר', + + 'month' => ':count חודש', + 'm' => ':count חודש', + 'a_month' => ':count חודש', + + 'week' => ':count וואָך', + 'w' => ':count וואָך', + 'a_week' => ':count וואָך', + + 'day' => ':count טאָג', + 'd' => ':count טאָג', + 'a_day' => ':count טאָג', + + 'hour' => ':count שעה', + 'h' => ':count שעה', + 'a_hour' => ':count שעה', + + 'minute' => ':count מינוט', + 'min' => ':count מינוט', + 'a_minute' => ':count מינוט', + + 'second' => ':count סעקונדע', + 's' => ':count סעקונדע', + 'a_second' => ':count סעקונדע', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/yo.php b/libraries/Carbon/src/Carbon/Lang/yo.php new file mode 100644 index 00000000000..83e674d69bf --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yo.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - François B + * - Atolagbe Abisoye + */ +return [ + 'year' => 'ọdún :count', + 'a_year' => '{1}ọdún kan|ọdún :count', + 'month' => 'osù :count', + 'a_month' => '{1}osù kan|osù :count', + 'week' => 'ọsẹ :count', + 'a_week' => '{1}ọsẹ kan|ọsẹ :count', + 'day' => 'ọjọ́ :count', + 'a_day' => '{1}ọjọ́ kan|ọjọ́ :count', + 'hour' => 'wákati :count', + 'a_hour' => '{1}wákati kan|wákati :count', + 'minute' => 'ìsẹjú :count', + 'a_minute' => '{1}ìsẹjú kan|ìsẹjú :count', + 'second' => 'iaayá :count', + 'a_second' => '{1}ìsẹjú aayá die|aayá :count', + 'ago' => ':time kọjá', + 'from_now' => 'ní :time', + 'diff_yesterday' => 'Àna', + 'diff_yesterday_regexp' => 'Àna(?:\\s+ni)?', + 'diff_today' => 'Ònì', + 'diff_today_regexp' => 'Ònì(?:\\s+ni)?', + 'diff_tomorrow' => 'Ọ̀la', + 'diff_tomorrow_regexp' => 'Ọ̀la(?:\\s+ni)?', + 'formats' => [ + 'LT' => 'h:mm A', + 'LTS' => 'h:mm:ss A', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY h:mm A', + 'LLLL' => 'dddd, D MMMM YYYY h:mm A', + ], + 'calendar' => [ + 'sameDay' => '[Ònì ni] LT', + 'nextDay' => '[Ọ̀la ni] LT', + 'nextWeek' => 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', + 'lastDay' => '[Àna ni] LT', + 'lastWeek' => 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + 'sameElse' => 'L', + ], + 'ordinal' => 'ọjọ́ :number', + 'months' => ['Sẹ́rẹ́', 'Èrèlè', 'Ẹrẹ̀nà', 'Ìgbé', 'Èbibi', 'Òkùdu', 'Agẹmo', 'Ògún', 'Owewe', 'Ọ̀wàrà', 'Bélú', 'Ọ̀pẹ̀̀'], + 'months_short' => ['Sẹ́r', 'Èrl', 'Ẹrn', 'Ìgb', 'Èbi', 'Òkù', 'Agẹ', 'Ògú', 'Owe', 'Ọ̀wà', 'Bél', 'Ọ̀pẹ̀̀'], + 'weekdays' => ['Àìkú', 'Ajé', 'Ìsẹ́gun', 'Ọjọ́rú', 'Ọjọ́bọ', 'Ẹtì', 'Àbámẹ́ta'], + 'weekdays_short' => ['Àìk', 'Ajé', 'Ìsẹ́', 'Ọjr', 'Ọjb', 'Ẹtì', 'Àbá'], + 'weekdays_min' => ['Àì', 'Aj', 'Ìs', 'Ọr', 'Ọb', 'Ẹt', 'Àb'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'meridiem' => ['Àárọ̀', 'Ọ̀sán'], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/yo_BJ.php b/libraries/Carbon/src/Carbon/Lang/yo_BJ.php new file mode 100644 index 00000000000..2d689bc30db --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yo_BJ.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array_replace_recursive(require __DIR__.'/yo.php', [ + 'meridiem' => ['Àárɔ̀', 'Ɔ̀sán'], + 'weekdays' => ['Ɔjɔ́ Àìkú', 'Ɔjɔ́ Ajé', 'Ɔjɔ́ Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɔjɔ́ Ɛtì', 'Ɔjɔ́ Àbámɛ́ta'], + 'weekdays_short' => ['Àìkú', 'Ajé', 'Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɛtì', 'Àbámɛ́ta'], + 'weekdays_min' => ['Àìkú', 'Ajé', 'Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɛtì', 'Àbámɛ́ta'], + 'months' => ['Oshù Shɛ́rɛ́', 'Oshù Èrèlè', 'Oshù Ɛrɛ̀nà', 'Oshù Ìgbé', 'Oshù Ɛ̀bibi', 'Oshù Òkúdu', 'Oshù Agɛmɔ', 'Oshù Ògún', 'Oshù Owewe', 'Oshù Ɔ̀wàrà', 'Oshù Bélú', 'Oshù Ɔ̀pɛ̀'], + 'months_short' => ['Shɛ́rɛ́', 'Èrèlè', 'Ɛrɛ̀nà', 'Ìgbé', 'Ɛ̀bibi', 'Òkúdu', 'Agɛmɔ', 'Ògún', 'Owewe', 'Ɔ̀wàrà', 'Bélú', 'Ɔ̀pɛ̀'], + 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd, D MMMM YYYY HH:mm', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/yo_NG.php b/libraries/Carbon/src/Carbon/Lang/yo_NG.php new file mode 100644 index 00000000000..bbe1a93df3c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yo_NG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/yo.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/yue.php b/libraries/Carbon/src/Carbon/Lang/yue.php new file mode 100644 index 00000000000..a5df81c14a8 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yue.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/yue_HK.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/yue_HK.php b/libraries/Carbon/src/Carbon/Lang/yue_HK.php new file mode 100644 index 00000000000..6e47e4c54ec --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yue_HK.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/zh_HK.php', [ + 'formats' => [ + 'L' => 'YYYY年MM月DD日 dddd', + ], + 'months' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], + 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], + 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], + 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'first_day_of_week' => 0, + 'day_of_first_week_of_year' => 1, + 'meridiem' => ['上午', '下午'], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/yue_Hans.php b/libraries/Carbon/src/Carbon/Lang/yue_Hans.php new file mode 100644 index 00000000000..c15bd8fea5f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yue_Hans.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hans.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/yue_Hant.php b/libraries/Carbon/src/Carbon/Lang/yue_Hant.php new file mode 100644 index 00000000000..c9fb9df4da6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yue_Hant.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hant.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/yuw.php b/libraries/Carbon/src/Carbon/Lang/yuw.php new file mode 100644 index 00000000000..f854de90977 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yuw.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/yuw_PG.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/yuw_PG.php b/libraries/Carbon/src/Carbon/Lang/yuw_PG.php new file mode 100644 index 00000000000..69a600a91aa --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/yuw_PG.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Information from native speakers Hannah Sarvasy nungon.localization@gmail.com + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YY', + ], + 'months' => ['jenuari', 'febuari', 'mas', 'epril', 'mei', 'jun', 'julai', 'ögus', 'septemba', 'öktoba', 'nöwemba', 'diksemba'], + 'months_short' => ['jen', 'feb', 'mas', 'epr', 'mei', 'jun', 'jul', 'ögu', 'sep', 'ökt', 'nöw', 'dis'], + 'weekdays' => ['sönda', 'mönda', 'sinda', 'mitiwö', 'sogipbono', 'nenggo', 'söndanggie'], + 'weekdays_short' => ['sön', 'mön', 'sin', 'mit', 'soi', 'nen', 'sab'], + 'weekdays_min' => ['sön', 'mön', 'sin', 'mit', 'soi', 'nen', 'sab'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/zgh.php b/libraries/Carbon/src/Carbon/Lang/zgh.php new file mode 100644 index 00000000000..25543cc0c9f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zgh.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - BAKTETE Miloud + */ +return [ + 'year' => ':count ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', + 'a_year' => 'ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', + 'y' => ':count ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', + 'month' => ':count ⵡⴰⵢⵢⵓⵔ|:count ⴰⵢⵢⵓⵔⵏ', + 'a_month' => 'ⵉⴷⵊ ⵡⴰⵢⵢⵓⵔ|:count ⴰⵢⵢⵓⵔⵏ', + 'm' => ':count ⴰⵢⵢⵓⵔⵏ', + 'week' => ':count ⵉⵎⴰⵍⴰⵙⵙ|:count ⵉⵎⴰⵍⴰⵙⵙⵏ', + 'a_week' => 'ⵉⵛⵜ ⵉⵎⴰⵍⴰⵙⵙ|:count ⵉⵎⴰⵍⴰⵙⵙⵏ', + 'w' => ':count ⵉⵎⴰⵍⴰⵙⵙ.', + 'day' => ':count ⵡⴰⵙⵙ|:count ⵓⵙⵙⴰⵏ', + 'a_day' => 'ⵉⴷⵊ ⵡⴰⵙⵙ|:count ⵓⵙⵙⴰⵏ', + 'd' => ':count ⵓ', + 'hour' => ':count ⵜⵙⵔⴰⴳⵜ|:count ⵜⵉⵙⵔⴰⴳⵉⵏ', + 'a_hour' => 'ⵉⵛⵜ ⵜⵙⵔⴰⴳⵜ|:count ⵜⵉⵙⵔⴰⴳⵉⵏ', + 'h' => ':count ⵜ', + 'minute' => ':count ⵜⵓⵙⴷⵉⴷⵜ|:count ⵜⵓⵙⴷⵉⴷⵉⵏ', + 'a_minute' => 'ⵉⵛⵜ ⵜⵓⵙⴷⵉⴷⵜ|:count ⵜⵓⵙⴷⵉⴷⵉⵏ', + 'min' => ':count ⵜⵓⵙ', + 'second' => ':count ⵜⵙⵉⵏⵜ|:count ⵜⵉⵙⵉⵏⴰ', + 'a_second' => 'ⴽⵔⴰ ⵜⵉⵙⵉⵏⴰ|:count ⵜⵉⵙⵉⵏⴰ', + 's' => ':count ⵜ', + 'ago' => 'ⵣⴳ :time', + 'from_now' => 'ⴷⴳ :time', + 'after' => ':time ⴰⵡⴰⵔ', + 'before' => ':time ⴷⴰⵜ', + 'diff_now' => 'ⴰⴷⵡⴰⵍⵉ', + 'diff_today' => 'ⴰⵙⵙ', + 'diff_today_regexp' => 'ⴰⵙⵙ(?:\\s+ⴰ/ⴰⴷ)?(?:\\s+ⴳ)?', + 'diff_yesterday' => 'ⴰⵙⵙⵏⵏⴰⵟ', + 'diff_yesterday_regexp' => 'ⴰⵙⵙⵏⵏⴰⵟ(?:\\s+ⴳ)?', + 'diff_tomorrow' => 'ⴰⵙⴽⴽⴰ', + 'diff_tomorrow_regexp' => 'ⴰⵙⴽⴽⴰ(?:\\s+ⴳ)?', + 'diff_before_yesterday' => 'ⴼⵔ ⵉⴹⵏⵏⴰⵟ', + 'diff_after_tomorrow' => 'ⵏⴰⴼ ⵓⵙⴽⴽⴰ', + 'period_recurrences' => ':count ⵜⵉⴽⴽⴰⵍ', + 'period_interval' => 'ⴽⵓ :interval', + 'period_start_date' => 'ⴳ :date', + 'period_end_date' => 'ⵉ :date', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD/MM/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[ⴰⵙⵙ ⴰ/ⴰⴷ ⴳ] LT', + 'nextDay' => '[ⴰⵙⴽⴽⴰ ⴳ] LT', + 'nextWeek' => 'dddd [ⴳ] LT', + 'lastDay' => '[ⴰⵙⵙⵏⵏⴰⵟ ⴳ] LT', + 'lastWeek' => 'dddd [ⴰⵎⴳⴳⴰⵔⵓ ⴳ] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['ⵜⵉⴼⴰⵡⵜ', 'ⵜⴰⴷⴳⴳⵯⴰⵜ'], + 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⴰⵏⴱⵉⵔ'], + 'months_short' => ['ⵉⵏⵏ', 'ⴱⵕⴰ', 'ⵎⴰⵕ', 'ⵉⴱⵔ', 'ⵎⴰⵢ', 'ⵢⵓⵏ', 'ⵢⵓⵍ', 'ⵖⵓⵛ', 'ⵛⵓⵜ', 'ⴽⵟⵓ', 'ⵏⵓⵡ', 'ⴷⵓⵊ'], + 'weekdays' => ['ⵓⵙⴰⵎⴰⵙ', 'ⵡⴰⵢⵏⴰⵙ', 'ⵓⵙⵉⵏⴰⵙ', 'ⵡⴰⴽⵕⴰⵙ', 'ⵓⴽⵡⴰⵙ', 'ⵓⵙⵉⵎⵡⴰⵙ', 'ⵓⵙⵉⴹⵢⴰⵙ'], + 'weekdays_short' => ['ⵓⵙⴰ', 'ⵡⴰⵢ', 'ⵓⵙⵉ', 'ⵡⴰⴽ', 'ⵓⴽⵡ', 'ⵓⵙⵉⵎ', 'ⵓⵙⵉⴹ'], + 'weekdays_min' => ['ⵓⵙⴰ', 'ⵡⴰⵢ', 'ⵓⵙⵉ', 'ⵡⴰⴽ', 'ⵓⴽⵡ', 'ⵓⵙⵉⵎ', 'ⵓⵙⵉⴹ'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 1, + 'list' => [', ', ' ⴷ '], +]; diff --git a/libraries/Carbon/src/Carbon/Lang/zh.php b/libraries/Carbon/src/Carbon/Lang/zh.php new file mode 100644 index 00000000000..e2392448cb2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - xuri + * - sycuato + * - bokideckonja + * - Luo Ning + * - William Yang (williamyang233) + */ +return array_merge(require __DIR__.'/zh_Hans.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY/MM/DD', + 'LL' => 'YYYY年M月D日', + 'LLL' => 'YYYY年M月D日 A h点mm分', + 'LLLL' => 'YYYY年M月D日dddd A h点mm分', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/zh_CN.php b/libraries/Carbon/src/Carbon/Lang/zh_CN.php new file mode 100644 index 00000000000..21589d4bdec --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_CN.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - monkeycon + * - François B + * - Jason Katz-Brown + * - Serhan Apaydın + * - Matt Johnson + * - JD Isaacks + * - Zeno Zeng + * - Chris Hemp + * - shankesgk2 + */ +return array_merge(require __DIR__.'/zh.php', [ + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY/MM/DD', + 'LL' => 'YYYY年M月D日', + 'LLL' => 'YYYY年M月D日Ah点mm分', + 'LLLL' => 'YYYY年M月D日ddddAh点mm分', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/zh_HK.php b/libraries/Carbon/src/Carbon/Lang/zh_HK.php new file mode 100644 index 00000000000..efb6d63f4ab --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_HK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hant_HK.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hans.php b/libraries/Carbon/src/Carbon/Lang/zh_Hans.php new file mode 100644 index 00000000000..22cb8926fcc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hans.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - monkeycon + * - François B + * - Jason Katz-Brown + * - Konstantin Konev + * - Chris Lam + * - Serhan Apaydın + * - Gary Lo + * - JD Isaacks + * - Chris Hemp + * - shankesgk2 + * - Daniel Cheung (danvim) + */ +return [ + 'year' => ':count:optional-space年', + 'y' => ':count:optional-space年', + 'month' => ':count:optional-space个月', + 'm' => ':count:optional-space个月', + 'week' => ':count:optional-space周', + 'w' => ':count:optional-space周', + 'day' => ':count:optional-space天', + 'd' => ':count:optional-space天', + 'hour' => ':count:optional-space小时', + 'h' => ':count:optional-space小时', + 'minute' => ':count:optional-space分钟', + 'min' => ':count:optional-space分钟', + 'second' => ':count:optional-space秒', + 'a_second' => '{1}几秒|]1,Inf[:count:optional-space秒', + 's' => ':count:optional-space秒', + 'ago' => ':time前', + 'from_now' => ':time后', + 'after' => ':time后', + 'before' => ':time前', + 'diff_now' => '现在', + 'diff_today' => '今天', + 'diff_yesterday' => '昨天', + 'diff_tomorrow' => '明天', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY/MM/DD', + 'LL' => 'YYYY年M月D日', + 'LLL' => 'YYYY年M月D日 HH:mm', + 'LLLL' => 'YYYY年M月D日dddd HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[今天]LT', + 'nextDay' => '[明天]LT', + 'nextWeek' => '[下]ddddLT', + 'lastDay' => '[昨天]LT', + 'lastWeek' => '[上]ddddLT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'd': + case 'D': + case 'DDD': + return $number.'日'; + case 'M': + return $number.'月'; + case 'w': + case 'W': + return $number.'周'; + default: + return $number; + } + }, + 'meridiem' => function ($hour, $minute) { + $time = $hour * 100 + $minute; + if ($time < 600) { + return '凌晨'; + } + if ($time < 900) { + return '早上'; + } + if ($time < 1130) { + return '上午'; + } + if ($time < 1230) { + return '中午'; + } + if ($time < 1800) { + return '下午'; + } + + return '晚上'; + }, + 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], + 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], + 'weekdays_short' => ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => '', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hans_HK.php b/libraries/Carbon/src/Carbon/Lang/zh_Hans_HK.php new file mode 100644 index 00000000000..c15bd8fea5f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hans_HK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hans.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hans_MO.php b/libraries/Carbon/src/Carbon/Lang/zh_Hans_MO.php new file mode 100644 index 00000000000..c15bd8fea5f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hans_MO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hans.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hans_SG.php b/libraries/Carbon/src/Carbon/Lang/zh_Hans_SG.php new file mode 100644 index 00000000000..c15bd8fea5f --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hans_SG.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hans.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hant.php b/libraries/Carbon/src/Carbon/Lang/zh_Hant.php new file mode 100644 index 00000000000..7ebe20bc0b2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hant.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Adam + * - monkeycon + * - François B + * - Jason Katz-Brown + * - Chris Lam + * - Serhan Apaydın + * - Gary Lo + * - JD Isaacks + * - Chris Hemp + * - Eddie + * - KID + * - shankesgk2 + * - Daniel Cheung (danvim) + */ +return [ + 'year' => ':count:optional-space年', + 'y' => ':count:optional-space年', + 'month' => ':count:optional-space個月', + 'm' => ':count:optional-space月', + 'week' => ':count:optional-space週', + 'w' => ':count:optional-space週', + 'day' => ':count:optional-space天', + 'd' => ':count:optional-space天', + 'hour' => ':count:optional-space小時', + 'h' => ':count:optional-space小時', + 'minute' => ':count:optional-space分鐘', + 'min' => ':count:optional-space分鐘', + 'second' => ':count:optional-space秒', + 'a_second' => '{1}幾秒|]1,Inf[:count:optional-space秒', + 's' => ':count:optional-space秒', + 'ago' => ':time前', + 'from_now' => ':time後', + 'after' => ':time後', + 'before' => ':time前', + 'diff_now' => '現在', + 'diff_today' => '今天', + 'diff_yesterday' => '昨天', + 'diff_tomorrow' => '明天', + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'YYYY/MM/DD', + 'LL' => 'YYYY年M月D日', + 'LLL' => 'YYYY年M月D日 HH:mm', + 'LLLL' => 'YYYY年M月D日dddd HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[今天] LT', + 'nextDay' => '[明天] LT', + 'nextWeek' => '[下]dddd LT', + 'lastDay' => '[昨天] LT', + 'lastWeek' => '[上]dddd LT', + 'sameElse' => 'L', + ], + 'ordinal' => function ($number, $period) { + switch ($period) { + case 'd': + case 'D': + case 'DDD': + return $number.'日'; + case 'M': + return $number.'月'; + case 'w': + case 'W': + return $number.'周'; + default: + return $number; + } + }, + 'meridiem' => function ($hour, $minute) { + $time = $hour * 100 + $minute; + if ($time < 600) { + return '凌晨'; + } + if ($time < 900) { + return '早上'; + } + if ($time < 1130) { + return '上午'; + } + if ($time < 1230) { + return '中午'; + } + if ($time < 1800) { + return '下午'; + } + + return '晚上'; + }, + 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], + 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], + 'weekdays_short' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'first_day_of_week' => 1, + 'day_of_first_week_of_year' => 4, + 'list' => '', +]; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hant_HK.php b/libraries/Carbon/src/Carbon/Lang/zh_Hant_HK.php new file mode 100644 index 00000000000..c9fb9df4da6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hant_HK.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hant.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hant_MO.php b/libraries/Carbon/src/Carbon/Lang/zh_Hant_MO.php new file mode 100644 index 00000000000..c9fb9df4da6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hant_MO.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hant.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_Hant_TW.php b/libraries/Carbon/src/Carbon/Lang/zh_Hant_TW.php new file mode 100644 index 00000000000..c9fb9df4da6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_Hant_TW.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hant.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_MO.php b/libraries/Carbon/src/Carbon/Lang/zh_MO.php new file mode 100644 index 00000000000..61ad0b9a05c --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_MO.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - tarunvelli + * - Eddie + * - KID + * - shankesgk2 + */ +return array_replace_recursive(require __DIR__.'/zh_Hant.php', [ + 'after' => ':time后', +]); diff --git a/libraries/Carbon/src/Carbon/Lang/zh_SG.php b/libraries/Carbon/src/Carbon/Lang/zh_SG.php new file mode 100644 index 00000000000..a69c23a3b56 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_SG.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/zh.php', [ + 'formats' => [ + 'L' => 'YYYY年MM月DD日', + ], + 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'months_short' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], + 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], + 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], + 'day_of_first_week_of_year' => 1, +]); diff --git a/libraries/Carbon/src/Carbon/Lang/zh_TW.php b/libraries/Carbon/src/Carbon/Lang/zh_TW.php new file mode 100644 index 00000000000..b7cf6478a53 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_TW.php @@ -0,0 +1,12 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return require __DIR__.'/zh_Hant_TW.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zh_YUE.php b/libraries/Carbon/src/Carbon/Lang/zh_YUE.php new file mode 100644 index 00000000000..18d58cc003e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zh_YUE.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + */ +return array_replace_recursive(require __DIR__.'/zh.php', [ + 'formats' => [ + 'L' => 'YYYY-MM-DD', + ], +]); diff --git a/libraries/Carbon/src/Carbon/Lang/zu.php b/libraries/Carbon/src/Carbon/Lang/zu.php new file mode 100644 index 00000000000..164629c7b2a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zu.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Unknown default region, use the first alphabetically. + */ +return require __DIR__.'/zu_ZA.php'; diff --git a/libraries/Carbon/src/Carbon/Lang/zu_ZA.php b/libraries/Carbon/src/Carbon/Lang/zu_ZA.php new file mode 100644 index 00000000000..ed4d44729c0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Lang/zu_ZA.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za + */ +return array_replace_recursive(require __DIR__.'/en.php', [ + 'formats' => [ + 'L' => 'DD/MM/YYYY', + ], + 'months' => ['Januwari', 'Februwari', 'Mashi', 'Ephreli', 'Meyi', 'Juni', 'Julayi', 'Agasti', 'Septhemba', 'Okthoba', 'Novemba', 'Disemba'], + 'months_short' => ['Jan', 'Feb', 'Mas', 'Eph', 'Mey', 'Jun', 'Jul', 'Aga', 'Sep', 'Okt', 'Nov', 'Dis'], + 'weekdays' => ['iSonto', 'uMsombuluko', 'uLwesibili', 'uLwesithathu', 'uLwesine', 'uLwesihlanu', 'uMgqibelo'], + 'weekdays_short' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'], + 'weekdays_min' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'], + 'day_of_first_week_of_year' => 1, + + 'year' => 'kweminyaka engu-:count', + 'y' => 'kweminyaka engu-:count', + 'a_year' => 'kweminyaka engu-:count', + + 'month' => 'izinyanga ezingu-:count', + 'm' => 'izinyanga ezingu-:count', + 'a_month' => 'izinyanga ezingu-:count', + + 'week' => 'lwamasonto angu-:count', + 'w' => 'lwamasonto angu-:count', + 'a_week' => 'lwamasonto angu-:count', + + 'day' => 'ezingaba ngu-:count', + 'd' => 'ezingaba ngu-:count', + 'a_day' => 'ezingaba ngu-:count', + + 'hour' => 'amahora angu-:count', + 'h' => 'amahora angu-:count', + 'a_hour' => 'amahora angu-:count', + + 'minute' => 'ngemizuzu engu-:count', + 'min' => 'ngemizuzu engu-:count', + 'a_minute' => 'ngemizuzu engu-:count', + + 'second' => 'imizuzwana engu-:count', + 's' => 'imizuzwana engu-:count', + 'a_second' => 'imizuzwana engu-:count', +]); diff --git a/libraries/Carbon/src/Carbon/Language.php b/libraries/Carbon/src/Carbon/Language.php new file mode 100644 index 00000000000..e959f73a657 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Language.php @@ -0,0 +1,342 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use JsonSerializable; +use ReturnTypeWillChange; + +class Language implements JsonSerializable +{ + /** + * @var array + */ + protected static $languagesNames; + + /** + * @var array + */ + protected static $regionsNames; + + /** + * @var string + */ + protected $id; + + /** + * @var string + */ + protected $code; + + /** + * @var string|null + */ + protected $variant; + + /** + * @var string|null + */ + protected $region; + + /** + * @var array + */ + protected $names; + + /** + * @var string + */ + protected $isoName; + + /** + * @var string + */ + protected $nativeName; + + public function __construct(string $id) + { + $this->id = str_replace('-', '_', $id); + $parts = explode('_', $this->id); + $this->code = $parts[0]; + + if (isset($parts[1])) { + if (!preg_match('/^[A-Z]+$/', $parts[1])) { + $this->variant = $parts[1]; + $parts[1] = $parts[2] ?? null; + } + if ($parts[1]) { + $this->region = $parts[1]; + } + } + } + + /** + * Get the list of the known languages. + * + * @return array + */ + public static function all() + { + if (!static::$languagesNames) { + static::$languagesNames = require __DIR__.'/List/languages.php'; + } + + return static::$languagesNames; + } + + /** + * Get the list of the known regions. + * + * @return array + */ + public static function regions() + { + if (!static::$regionsNames) { + static::$regionsNames = require __DIR__.'/List/regions.php'; + } + + return static::$regionsNames; + } + + /** + * Get both isoName and nativeName as an array. + * + * @return array + */ + public function getNames(): array + { + if (!$this->names) { + $this->names = static::all()[$this->code] ?? [ + 'isoName' => $this->code, + 'nativeName' => $this->code, + ]; + } + + return $this->names; + } + + /** + * Returns the original locale ID. + * + * @return string + */ + public function getId(): string + { + return $this->id; + } + + /** + * Returns the code of the locale "en"/"fr". + * + * @return string + */ + public function getCode(): string + { + return $this->code; + } + + /** + * Returns the variant code such as cyrl/latn. + * + * @return string|null + */ + public function getVariant(): ?string + { + return $this->variant; + } + + /** + * Returns the variant such as Cyrillic/Latin. + * + * @return string|null + */ + public function getVariantName(): ?string + { + if ($this->variant === 'Latn') { + return 'Latin'; + } + + if ($this->variant === 'Cyrl') { + return 'Cyrillic'; + } + + return $this->variant; + } + + /** + * Returns the region part of the locale. + * + * @return string|null + */ + public function getRegion(): ?string + { + return $this->region; + } + + /** + * Returns the region name for the current language. + * + * @return string|null + */ + public function getRegionName(): ?string + { + return $this->region ? (static::regions()[$this->region] ?? $this->region) : null; + } + + /** + * Returns the long ISO language name. + * + * @return string + */ + public function getFullIsoName(): string + { + if (!$this->isoName) { + $this->isoName = $this->getNames()['isoName']; + } + + return $this->isoName; + } + + /** + * Set the ISO language name. + * + * @param string $isoName + */ + public function setIsoName(string $isoName): self + { + $this->isoName = $isoName; + + return $this; + } + + /** + * Return the full name of the language in this language. + * + * @return string + */ + public function getFullNativeName(): string + { + if (!$this->nativeName) { + $this->nativeName = $this->getNames()['nativeName']; + } + + return $this->nativeName; + } + + /** + * Set the name of the language in this language. + * + * @param string $nativeName + */ + public function setNativeName(string $nativeName): self + { + $this->nativeName = $nativeName; + + return $this; + } + + /** + * Returns the short ISO language name. + * + * @return string + */ + public function getIsoName(): string + { + $name = $this->getFullIsoName(); + + return trim(strstr($name, ',', true) ?: $name); + } + + /** + * Get the short name of the language in this language. + * + * @return string + */ + public function getNativeName(): string + { + $name = $this->getFullNativeName(); + + return trim(strstr($name, ',', true) ?: $name); + } + + /** + * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getIsoDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getNativeDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getFullIsoDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getFullIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getFullNativeDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getFullNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Returns the original locale ID. + * + * @return string + */ + public function __toString() + { + return $this->getId(); + } + + /** + * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->getIsoDescription(); + } +} diff --git a/libraries/Carbon/src/Carbon/Laravel/ServiceProvider.php b/libraries/Carbon/src/Carbon/Laravel/ServiceProvider.php new file mode 100644 index 00000000000..0287ac8254a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Laravel/ServiceProvider.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Laravel; + +use EDD\Vendor\Carbon\Carbon; +use EDD\Vendor\Carbon\CarbonImmutable; +use EDD\Vendor\Carbon\CarbonInterval; +use EDD\Vendor\Carbon\CarbonPeriod; +use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; +use Illuminate\Events\Dispatcher; +use Illuminate\Events\EventDispatcher; +use Illuminate\Support\Carbon as IlluminateCarbon; +use Illuminate\Support\Facades\Date; +use Throwable; + +class ServiceProvider extends \Illuminate\Support\ServiceProvider +{ + /** @var callable|null */ + protected $appGetter = null; + + /** @var callable|null */ + protected $localeGetter = null; + + public function setAppGetter(?callable $appGetter): void + { + $this->appGetter = $appGetter; + } + + public function setLocaleGetter(?callable $localeGetter): void + { + $this->localeGetter = $localeGetter; + } + + public function boot() + { + $this->updateLocale(); + + if (!$this->app->bound('events')) { + return; + } + + $service = $this; + $events = $this->app['events']; + + if ($this->isEventDispatcher($events)) { + $events->listen(class_exists('Illuminate\Foundation\Events\LocaleUpdated') ? 'Illuminate\Foundation\Events\LocaleUpdated' : 'locale.changed', function () use ($service) { + $service->updateLocale(); + }); + } + } + + public function updateLocale() + { + $locale = $this->getLocale(); + + if ($locale === null) { + return; + } + + Carbon::setLocale($locale); + CarbonImmutable::setLocale($locale); + CarbonPeriod::setLocale($locale); + CarbonInterval::setLocale($locale); + + if (class_exists(IlluminateCarbon::class)) { + IlluminateCarbon::setLocale($locale); + } + + if (class_exists(Date::class)) { + try { + $root = Date::getFacadeRoot(); + $root->setLocale($locale); + } catch (Throwable $e) { + // Non EDD\Vendor\Carbon class in use in Date facade + } + } + } + + public function register() + { + // Needed for Laravel < 5.3 compatibility + } + + protected function getLocale() + { + if ($this->localeGetter) { + return ($this->localeGetter)(); + } + + $app = $this->getApp(); + $app = $app && method_exists($app, 'getLocale') + ? $app + : $this->getGlobalApp('translator'); + + return $app ? $app->getLocale() : null; + } + + protected function getApp() + { + if ($this->appGetter) { + return ($this->appGetter)(); + } + + return $this->app ?? $this->getGlobalApp(); + } + + protected function getGlobalApp(...$args) + { + return \function_exists('app') ? \app(...$args) : null; + } + + protected function isEventDispatcher($instance) + { + return $instance instanceof EventDispatcher + || $instance instanceof Dispatcher + || $instance instanceof DispatcherContract; + } +} diff --git a/libraries/Carbon/src/Carbon/List/languages.php b/libraries/Carbon/src/Carbon/List/languages.php new file mode 100644 index 00000000000..7a0ab057707 --- /dev/null +++ b/libraries/Carbon/src/Carbon/List/languages.php @@ -0,0 +1,1239 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + /* + * ISO 639-2 + */ + 'ab' => [ + 'isoName' => 'Abkhazian', + 'nativeName' => 'аҧсуа бызшәа, аҧсшәа', + ], + 'aa' => [ + 'isoName' => 'Afar', + 'nativeName' => 'Afaraf', + ], + 'af' => [ + 'isoName' => 'Afrikaans', + 'nativeName' => 'Afrikaans', + ], + 'ak' => [ + 'isoName' => 'Akan', + 'nativeName' => 'Akan', + ], + 'sq' => [ + 'isoName' => 'Albanian', + 'nativeName' => 'Shqip', + ], + 'am' => [ + 'isoName' => 'Amharic', + 'nativeName' => 'አማርኛ', + ], + 'ar' => [ + 'isoName' => 'Arabic', + 'nativeName' => 'العربية', + ], + 'an' => [ + 'isoName' => 'Aragonese', + 'nativeName' => 'aragonés', + ], + 'hy' => [ + 'isoName' => 'Armenian', + 'nativeName' => 'Հայերեն', + ], + 'as' => [ + 'isoName' => 'Assamese', + 'nativeName' => 'অসমীয়া', + ], + 'av' => [ + 'isoName' => 'Avaric', + 'nativeName' => 'авар мацӀ, магӀарул мацӀ', + ], + 'ae' => [ + 'isoName' => 'Avestan', + 'nativeName' => 'avesta', + ], + 'ay' => [ + 'isoName' => 'Aymara', + 'nativeName' => 'aymar aru', + ], + 'az' => [ + 'isoName' => 'Azerbaijani', + 'nativeName' => 'azərbaycan dili', + ], + 'bm' => [ + 'isoName' => 'Bambara', + 'nativeName' => 'bamanankan', + ], + 'ba' => [ + 'isoName' => 'Bashkir', + 'nativeName' => 'башҡорт теле', + ], + 'eu' => [ + 'isoName' => 'Basque', + 'nativeName' => 'euskara, euskera', + ], + 'be' => [ + 'isoName' => 'Belarusian', + 'nativeName' => 'беларуская мова', + ], + 'bn' => [ + 'isoName' => 'Bengali', + 'nativeName' => 'বাংলা', + ], + 'bh' => [ + 'isoName' => 'Bihari languages', + 'nativeName' => 'भोजपुरी', + ], + 'bi' => [ + 'isoName' => 'Bislama', + 'nativeName' => 'Bislama', + ], + 'bs' => [ + 'isoName' => 'Bosnian', + 'nativeName' => 'bosanski jezik', + ], + 'br' => [ + 'isoName' => 'Breton', + 'nativeName' => 'brezhoneg', + ], + 'bg' => [ + 'isoName' => 'Bulgarian', + 'nativeName' => 'български език', + ], + 'my' => [ + 'isoName' => 'Burmese', + 'nativeName' => 'ဗမာစာ', + ], + 'ca' => [ + 'isoName' => 'Catalan, Valencian', + 'nativeName' => 'català, valencià', + ], + 'ch' => [ + 'isoName' => 'Chamorro', + 'nativeName' => 'Chamoru', + ], + 'ce' => [ + 'isoName' => 'Chechen', + 'nativeName' => 'нохчийн мотт', + ], + 'ny' => [ + 'isoName' => 'Chichewa, Chewa, Nyanja', + 'nativeName' => 'chiCheŵa, chinyanja', + ], + 'zh' => [ + 'isoName' => 'Chinese', + 'nativeName' => '中文 (Zhōngwén), 汉语, 漢語', + ], + 'cv' => [ + 'isoName' => 'Chuvash', + 'nativeName' => 'чӑваш чӗлхи', + ], + 'kw' => [ + 'isoName' => 'Cornish', + 'nativeName' => 'Kernewek', + ], + 'co' => [ + 'isoName' => 'Corsican', + 'nativeName' => 'corsu, lingua corsa', + ], + 'cr' => [ + 'isoName' => 'Cree', + 'nativeName' => 'ᓀᐦᐃᔭᐍᐏᐣ', + ], + 'hr' => [ + 'isoName' => 'Croatian', + 'nativeName' => 'hrvatski jezik', + ], + 'cs' => [ + 'isoName' => 'Czech', + 'nativeName' => 'čeština, český jazyk', + ], + 'da' => [ + 'isoName' => 'Danish', + 'nativeName' => 'dansk', + ], + 'dv' => [ + 'isoName' => 'Divehi, Dhivehi, Maldivian', + 'nativeName' => 'ދިވެހި', + ], + 'nl' => [ + 'isoName' => 'Dutch, Flemish', + 'nativeName' => 'Nederlands, Vlaams', + ], + 'dz' => [ + 'isoName' => 'Dzongkha', + 'nativeName' => 'རྫོང་ཁ', + ], + 'en' => [ + 'isoName' => 'English', + 'nativeName' => 'English', + ], + 'eo' => [ + 'isoName' => 'Esperanto', + 'nativeName' => 'Esperanto', + ], + 'et' => [ + 'isoName' => 'Estonian', + 'nativeName' => 'eesti, eesti keel', + ], + 'ee' => [ + 'isoName' => 'Ewe', + 'nativeName' => 'Eʋegbe', + ], + 'fo' => [ + 'isoName' => 'Faroese', + 'nativeName' => 'føroyskt', + ], + 'fj' => [ + 'isoName' => 'Fijian', + 'nativeName' => 'vosa Vakaviti', + ], + 'fi' => [ + 'isoName' => 'Finnish', + 'nativeName' => 'suomi, suomen kieli', + ], + 'fr' => [ + 'isoName' => 'French', + 'nativeName' => 'français', + ], + 'ff' => [ + 'isoName' => 'Fulah', + 'nativeName' => 'Fulfulde, Pulaar, Pular', + ], + 'gl' => [ + 'isoName' => 'Galician', + 'nativeName' => 'Galego', + ], + 'ka' => [ + 'isoName' => 'Georgian', + 'nativeName' => 'ქართული', + ], + 'de' => [ + 'isoName' => 'German', + 'nativeName' => 'Deutsch', + ], + 'el' => [ + 'isoName' => 'Greek (modern)', + 'nativeName' => 'ελληνικά', + ], + 'gn' => [ + 'isoName' => 'Guaraní', + 'nativeName' => 'Avañe\'ẽ', + ], + 'gu' => [ + 'isoName' => 'Gujarati', + 'nativeName' => 'ગુજરાતી', + ], + 'ht' => [ + 'isoName' => 'Haitian, Haitian Creole', + 'nativeName' => 'Kreyòl ayisyen', + ], + 'ha' => [ + 'isoName' => 'Hausa', + 'nativeName' => '(Hausa) هَوُسَ', + ], + 'he' => [ + 'isoName' => 'Hebrew (modern)', + 'nativeName' => 'עברית', + ], + 'hz' => [ + 'isoName' => 'Herero', + 'nativeName' => 'Otjiherero', + ], + 'hi' => [ + 'isoName' => 'Hindi', + 'nativeName' => 'हिन्दी, हिंदी', + ], + 'ho' => [ + 'isoName' => 'Hiri Motu', + 'nativeName' => 'Hiri Motu', + ], + 'hu' => [ + 'isoName' => 'Hungarian', + 'nativeName' => 'magyar', + ], + 'ia' => [ + 'isoName' => 'Interlingua', + 'nativeName' => 'Interlingua', + ], + 'id' => [ + 'isoName' => 'Indonesian', + 'nativeName' => 'Bahasa Indonesia', + ], + 'ie' => [ + 'isoName' => 'Interlingue', + 'nativeName' => 'Originally called Occidental; then Interlingue after WWII', + ], + 'ga' => [ + 'isoName' => 'Irish', + 'nativeName' => 'Gaeilge', + ], + 'ig' => [ + 'isoName' => 'Igbo', + 'nativeName' => 'Asụsụ Igbo', + ], + 'ik' => [ + 'isoName' => 'Inupiaq', + 'nativeName' => 'Iñupiaq, Iñupiatun', + ], + 'io' => [ + 'isoName' => 'Ido', + 'nativeName' => 'Ido', + ], + 'is' => [ + 'isoName' => 'Icelandic', + 'nativeName' => 'Íslenska', + ], + 'it' => [ + 'isoName' => 'Italian', + 'nativeName' => 'Italiano', + ], + 'iu' => [ + 'isoName' => 'Inuktitut', + 'nativeName' => 'ᐃᓄᒃᑎᑐᑦ', + ], + 'ja' => [ + 'isoName' => 'Japanese', + 'nativeName' => '日本語 (にほんご)', + ], + 'jv' => [ + 'isoName' => 'Javanese', + 'nativeName' => 'ꦧꦱꦗꦮ, Basa Jawa', + ], + 'kl' => [ + 'isoName' => 'Kalaallisut, Greenlandic', + 'nativeName' => 'kalaallisut, kalaallit oqaasii', + ], + 'kn' => [ + 'isoName' => 'Kannada', + 'nativeName' => 'ಕನ್ನಡ', + ], + 'kr' => [ + 'isoName' => 'Kanuri', + 'nativeName' => 'Kanuri', + ], + 'ks' => [ + 'isoName' => 'Kashmiri', + 'nativeName' => 'कश्मीरी, كشميري‎', + ], + 'kk' => [ + 'isoName' => 'Kazakh', + 'nativeName' => 'қазақ тілі', + ], + 'km' => [ + 'isoName' => 'Central Khmer', + 'nativeName' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ', + ], + 'ki' => [ + 'isoName' => 'Kikuyu, Gikuyu', + 'nativeName' => 'Gĩkũyũ', + ], + 'rw' => [ + 'isoName' => 'Kinyarwanda', + 'nativeName' => 'Ikinyarwanda', + ], + 'ky' => [ + 'isoName' => 'Kirghiz, Kyrgyz', + 'nativeName' => 'Кыргызча, Кыргыз тили', + ], + 'kv' => [ + 'isoName' => 'Komi', + 'nativeName' => 'коми кыв', + ], + 'kg' => [ + 'isoName' => 'Kongo', + 'nativeName' => 'Kikongo', + ], + 'ko' => [ + 'isoName' => 'Korean', + 'nativeName' => '한국어', + ], + 'ku' => [ + 'isoName' => 'Kurdish', + 'nativeName' => 'Kurdî, کوردی‎', + ], + 'kj' => [ + 'isoName' => 'Kuanyama, Kwanyama', + 'nativeName' => 'Kuanyama', + ], + 'la' => [ + 'isoName' => 'Latin', + 'nativeName' => 'latine, lingua latina', + ], + 'lb' => [ + 'isoName' => 'Luxembourgish, Letzeburgesch', + 'nativeName' => 'Lëtzebuergesch', + ], + 'lg' => [ + 'isoName' => 'Ganda', + 'nativeName' => 'Luganda', + ], + 'li' => [ + 'isoName' => 'Limburgan, Limburger, Limburgish', + 'nativeName' => 'Limburgs', + ], + 'ln' => [ + 'isoName' => 'Lingala', + 'nativeName' => 'Lingála', + ], + 'lo' => [ + 'isoName' => 'Lao', + 'nativeName' => 'ພາສາລາວ', + ], + 'lt' => [ + 'isoName' => 'Lithuanian', + 'nativeName' => 'lietuvių kalba', + ], + 'lu' => [ + 'isoName' => 'Luba-Katanga', + 'nativeName' => 'Kiluba', + ], + 'lv' => [ + 'isoName' => 'Latvian', + 'nativeName' => 'latviešu valoda', + ], + 'gv' => [ + 'isoName' => 'Manx', + 'nativeName' => 'Gaelg, Gailck', + ], + 'mk' => [ + 'isoName' => 'Macedonian', + 'nativeName' => 'македонски јазик', + ], + 'mg' => [ + 'isoName' => 'Malagasy', + 'nativeName' => 'fiteny malagasy', + ], + 'ms' => [ + 'isoName' => 'Malay', + 'nativeName' => 'Bahasa Melayu, بهاس ملايو‎', + ], + 'ml' => [ + 'isoName' => 'Malayalam', + 'nativeName' => 'മലയാളം', + ], + 'mt' => [ + 'isoName' => 'Maltese', + 'nativeName' => 'Malti', + ], + 'mi' => [ + 'isoName' => 'Maori', + 'nativeName' => 'te reo Māori', + ], + 'mr' => [ + 'isoName' => 'Marathi', + 'nativeName' => 'मराठी', + ], + 'mh' => [ + 'isoName' => 'Marshallese', + 'nativeName' => 'Kajin M̧ajeļ', + ], + 'mn' => [ + 'isoName' => 'Mongolian', + 'nativeName' => 'Монгол хэл', + ], + 'na' => [ + 'isoName' => 'Nauru', + 'nativeName' => 'Dorerin Naoero', + ], + 'nv' => [ + 'isoName' => 'Navajo, Navaho', + 'nativeName' => 'Diné bizaad', + ], + 'nd' => [ + 'isoName' => 'North Ndebele', + 'nativeName' => 'isiNdebele', + ], + 'ne' => [ + 'isoName' => 'Nepali', + 'nativeName' => 'नेपाली', + ], + 'ng' => [ + 'isoName' => 'Ndonga', + 'nativeName' => 'Owambo', + ], + 'nb' => [ + 'isoName' => 'Norwegian Bokmål', + 'nativeName' => 'Norsk Bokmål', + ], + 'nn' => [ + 'isoName' => 'Norwegian Nynorsk', + 'nativeName' => 'Norsk Nynorsk', + ], + 'no' => [ + 'isoName' => 'Norwegian', + 'nativeName' => 'Norsk', + ], + 'ii' => [ + 'isoName' => 'Sichuan Yi, Nuosu', + 'nativeName' => 'ꆈꌠ꒿ Nuosuhxop', + ], + 'nr' => [ + 'isoName' => 'South Ndebele', + 'nativeName' => 'isiNdebele', + ], + 'oc' => [ + 'isoName' => 'Occitan', + 'nativeName' => 'occitan, lenga d\'òc', + ], + 'oj' => [ + 'isoName' => 'Ojibwa', + 'nativeName' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', + ], + 'cu' => [ + 'isoName' => 'Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian', + 'nativeName' => 'ѩзыкъ словѣньскъ', + ], + 'om' => [ + 'isoName' => 'Oromo', + 'nativeName' => 'Afaan Oromoo', + ], + 'or' => [ + 'isoName' => 'Oriya', + 'nativeName' => 'ଓଡ଼ିଆ', + ], + 'os' => [ + 'isoName' => 'Ossetian, Ossetic', + 'nativeName' => 'ирон æвзаг', + ], + 'pa' => [ + 'isoName' => 'Panjabi, Punjabi', + 'nativeName' => 'ਪੰਜਾਬੀ', + ], + 'pi' => [ + 'isoName' => 'Pali', + 'nativeName' => 'पाऴि', + ], + 'fa' => [ + 'isoName' => 'Persian', + 'nativeName' => 'فارسی', + ], + 'pl' => [ + 'isoName' => 'Polish', + 'nativeName' => 'język polski, polszczyzna', + ], + 'ps' => [ + 'isoName' => 'Pashto, Pushto', + 'nativeName' => 'پښتو', + ], + 'pt' => [ + 'isoName' => 'Portuguese', + 'nativeName' => 'Português', + ], + 'qu' => [ + 'isoName' => 'Quechua', + 'nativeName' => 'Runa Simi, Kichwa', + ], + 'rm' => [ + 'isoName' => 'Romansh', + 'nativeName' => 'Rumantsch Grischun', + ], + 'rn' => [ + 'isoName' => 'Rundi', + 'nativeName' => 'Ikirundi', + ], + 'ro' => [ + 'isoName' => 'Romanian, Moldavian, Moldovan', + 'nativeName' => 'Română', + ], + 'ru' => [ + 'isoName' => 'Russian', + 'nativeName' => 'русский', + ], + 'sa' => [ + 'isoName' => 'Sanskrit', + 'nativeName' => 'संस्कृतम्', + ], + 'sc' => [ + 'isoName' => 'Sardinian', + 'nativeName' => 'sardu', + ], + 'sd' => [ + 'isoName' => 'Sindhi', + 'nativeName' => 'सिन्धी, سنڌي، سندھی‎', + ], + 'se' => [ + 'isoName' => 'Northern Sami', + 'nativeName' => 'Davvisámegiella', + ], + 'sm' => [ + 'isoName' => 'Samoan', + 'nativeName' => 'gagana fa\'a Samoa', + ], + 'sg' => [ + 'isoName' => 'Sango', + 'nativeName' => 'yângâ tî sängö', + ], + 'sr' => [ + 'isoName' => 'Serbian', + 'nativeName' => 'српски језик', + ], + 'gd' => [ + 'isoName' => 'Gaelic, Scottish Gaelic', + 'nativeName' => 'Gàidhlig', + ], + 'sn' => [ + 'isoName' => 'Shona', + 'nativeName' => 'chiShona', + ], + 'si' => [ + 'isoName' => 'Sinhala, Sinhalese', + 'nativeName' => 'සිංහල', + ], + 'sk' => [ + 'isoName' => 'Slovak', + 'nativeName' => 'Slovenčina, Slovenský Jazyk', + ], + 'sl' => [ + 'isoName' => 'Slovene', + 'nativeName' => 'Slovenski Jezik, Slovenščina', + ], + 'so' => [ + 'isoName' => 'Somali', + 'nativeName' => 'Soomaaliga, af Soomaali', + ], + 'st' => [ + 'isoName' => 'Southern Sotho', + 'nativeName' => 'Sesotho', + ], + 'es' => [ + 'isoName' => 'Spanish, Castilian', + 'nativeName' => 'Español', + ], + 'su' => [ + 'isoName' => 'Sundanese', + 'nativeName' => 'Basa Sunda', + ], + 'sw' => [ + 'isoName' => 'Swahili', + 'nativeName' => 'Kiswahili', + ], + 'ss' => [ + 'isoName' => 'Swati', + 'nativeName' => 'SiSwati', + ], + 'sv' => [ + 'isoName' => 'Swedish', + 'nativeName' => 'Svenska', + ], + 'ta' => [ + 'isoName' => 'Tamil', + 'nativeName' => 'தமிழ்', + ], + 'te' => [ + 'isoName' => 'Telugu', + 'nativeName' => 'తెలుగు', + ], + 'tg' => [ + 'isoName' => 'Tajik', + 'nativeName' => 'тоҷикӣ, toçikī, تاجیکی‎', + ], + 'th' => [ + 'isoName' => 'Thai', + 'nativeName' => 'ไทย', + ], + 'ti' => [ + 'isoName' => 'Tigrinya', + 'nativeName' => 'ትግርኛ', + ], + 'bo' => [ + 'isoName' => 'Tibetan', + 'nativeName' => 'བོད་ཡིག', + ], + 'tk' => [ + 'isoName' => 'Turkmen', + 'nativeName' => 'Türkmen, Түркмен', + ], + 'tl' => [ + 'isoName' => 'Tagalog', + 'nativeName' => 'Wikang Tagalog', + ], + 'tn' => [ + 'isoName' => 'Tswana', + 'nativeName' => 'Setswana', + ], + 'to' => [ + 'isoName' => 'Tongan (Tonga Islands)', + 'nativeName' => 'Faka Tonga', + ], + 'tr' => [ + 'isoName' => 'Turkish', + 'nativeName' => 'Türkçe', + ], + 'ts' => [ + 'isoName' => 'Tsonga', + 'nativeName' => 'Xitsonga', + ], + 'tt' => [ + 'isoName' => 'Tatar', + 'nativeName' => 'татар теле, tatar tele', + ], + 'tw' => [ + 'isoName' => 'Twi', + 'nativeName' => 'Twi', + ], + 'ty' => [ + 'isoName' => 'Tahitian', + 'nativeName' => 'Reo Tahiti', + ], + 'ug' => [ + 'isoName' => 'Uighur, Uyghur', + 'nativeName' => 'Uyƣurqə, ‫ئۇيغۇرچ', + ], + 'uk' => [ + 'isoName' => 'Ukrainian', + 'nativeName' => 'Українська', + ], + 'ur' => [ + 'isoName' => 'Urdu', + 'nativeName' => 'اردو', + ], + 'uz' => [ + 'isoName' => 'Uzbek', + 'nativeName' => 'Oʻzbek, Ўзбек, أۇزبېك‎', + ], + 've' => [ + 'isoName' => 'Venda', + 'nativeName' => 'Tshivenḓa', + ], + 'vi' => [ + 'isoName' => 'Vietnamese', + 'nativeName' => 'Tiếng Việt', + ], + 'vo' => [ + 'isoName' => 'Volapük', + 'nativeName' => 'Volapük', + ], + 'wa' => [ + 'isoName' => 'Walloon', + 'nativeName' => 'Walon', + ], + 'cy' => [ + 'isoName' => 'Welsh', + 'nativeName' => 'Cymraeg', + ], + 'wo' => [ + 'isoName' => 'Wolof', + 'nativeName' => 'Wollof', + ], + 'fy' => [ + 'isoName' => 'Western Frisian', + 'nativeName' => 'Frysk', + ], + 'xh' => [ + 'isoName' => 'Xhosa', + 'nativeName' => 'isiXhosa', + ], + 'yi' => [ + 'isoName' => 'Yiddish', + 'nativeName' => 'ייִדיש', + ], + 'yo' => [ + 'isoName' => 'Yoruba', + 'nativeName' => 'Yorùbá', + ], + 'za' => [ + 'isoName' => 'Zhuang, Chuang', + 'nativeName' => 'Saɯ cueŋƅ, Saw cuengh', + ], + 'zu' => [ + 'isoName' => 'Zulu', + 'nativeName' => 'isiZulu', + ], + /* + * Add ISO 639-3 languages available in EDD\Vendor\Carbon + */ + 'agq' => [ + 'isoName' => 'Aghem', + 'nativeName' => 'Aghem', + ], + 'agr' => [ + 'isoName' => 'Aguaruna', + 'nativeName' => 'Aguaruna', + ], + 'anp' => [ + 'isoName' => 'Angika', + 'nativeName' => 'Angika', + ], + 'asa' => [ + 'isoName' => 'Asu', + 'nativeName' => 'Asu', + ], + 'ast' => [ + 'isoName' => 'Asturian', + 'nativeName' => 'Asturian', + ], + 'ayc' => [ + 'isoName' => 'Southern Aymara', + 'nativeName' => 'Southern Aymara', + ], + 'bas' => [ + 'isoName' => 'Basaa', + 'nativeName' => 'Basaa', + ], + 'bem' => [ + 'isoName' => 'Bemba', + 'nativeName' => 'Bemba', + ], + 'bez' => [ + 'isoName' => 'Bena', + 'nativeName' => 'Bena', + ], + 'bhb' => [ + 'isoName' => 'Bhili', + 'nativeName' => 'Bhili', + ], + 'bho' => [ + 'isoName' => 'Bhojpuri', + 'nativeName' => 'Bhojpuri', + ], + 'brx' => [ + 'isoName' => 'Bodo', + 'nativeName' => 'Bodo', + ], + 'byn' => [ + 'isoName' => 'Bilin', + 'nativeName' => 'Bilin', + ], + 'ccp' => [ + 'isoName' => 'Chakma', + 'nativeName' => 'Chakma', + ], + 'cgg' => [ + 'isoName' => 'Chiga', + 'nativeName' => 'Chiga', + ], + 'chr' => [ + 'isoName' => 'Cherokee', + 'nativeName' => 'Cherokee', + ], + 'cmn' => [ + 'isoName' => 'Chinese', + 'nativeName' => 'Chinese', + ], + 'crh' => [ + 'isoName' => 'Crimean Turkish', + 'nativeName' => 'Crimean Turkish', + ], + 'csb' => [ + 'isoName' => 'Kashubian', + 'nativeName' => 'Kashubian', + ], + 'dav' => [ + 'isoName' => 'Taita', + 'nativeName' => 'Taita', + ], + 'dje' => [ + 'isoName' => 'Zarma', + 'nativeName' => 'Zarma', + ], + 'doi' => [ + 'isoName' => 'Dogri (macrolanguage)', + 'nativeName' => 'Dogri (macrolanguage)', + ], + 'dsb' => [ + 'isoName' => 'Lower Sorbian', + 'nativeName' => 'Lower Sorbian', + ], + 'dua' => [ + 'isoName' => 'Duala', + 'nativeName' => 'Duala', + ], + 'dyo' => [ + 'isoName' => 'Jola-Fonyi', + 'nativeName' => 'Jola-Fonyi', + ], + 'ebu' => [ + 'isoName' => 'Embu', + 'nativeName' => 'Embu', + ], + 'ewo' => [ + 'isoName' => 'Ewondo', + 'nativeName' => 'Ewondo', + ], + 'fil' => [ + 'isoName' => 'Filipino', + 'nativeName' => 'Filipino', + ], + 'fur' => [ + 'isoName' => 'Friulian', + 'nativeName' => 'Friulian', + ], + 'gez' => [ + 'isoName' => 'Geez', + 'nativeName' => 'Geez', + ], + 'gom' => [ + 'isoName' => 'Konkani, Goan', + 'nativeName' => 'ಕೊಂಕಣಿ', + ], + 'gsw' => [ + 'isoName' => 'Swiss German', + 'nativeName' => 'Swiss German', + ], + 'guz' => [ + 'isoName' => 'Gusii', + 'nativeName' => 'Gusii', + ], + 'hak' => [ + 'isoName' => 'Hakka Chinese', + 'nativeName' => 'Hakka Chinese', + ], + 'haw' => [ + 'isoName' => 'Hawaiian', + 'nativeName' => 'Hawaiian', + ], + 'hif' => [ + 'isoName' => 'Fiji Hindi', + 'nativeName' => 'Fiji Hindi', + ], + 'hne' => [ + 'isoName' => 'Chhattisgarhi', + 'nativeName' => 'Chhattisgarhi', + ], + 'hsb' => [ + 'isoName' => 'Upper Sorbian', + 'nativeName' => 'Upper Sorbian', + ], + 'jgo' => [ + 'isoName' => 'Ngomba', + 'nativeName' => 'Ngomba', + ], + 'jmc' => [ + 'isoName' => 'Machame', + 'nativeName' => 'Machame', + ], + 'kab' => [ + 'isoName' => 'Kabyle', + 'nativeName' => 'Kabyle', + ], + 'kam' => [ + 'isoName' => 'Kamba', + 'nativeName' => 'Kamba', + ], + 'kde' => [ + 'isoName' => 'Makonde', + 'nativeName' => 'Makonde', + ], + 'kea' => [ + 'isoName' => 'Kabuverdianu', + 'nativeName' => 'Kabuverdianu', + ], + 'khq' => [ + 'isoName' => 'Koyra Chiini', + 'nativeName' => 'Koyra Chiini', + ], + 'kkj' => [ + 'isoName' => 'Kako', + 'nativeName' => 'Kako', + ], + 'kln' => [ + 'isoName' => 'Kalenjin', + 'nativeName' => 'Kalenjin', + ], + 'kok' => [ + 'isoName' => 'Konkani', + 'nativeName' => 'Konkani', + ], + 'ksb' => [ + 'isoName' => 'Shambala', + 'nativeName' => 'Shambala', + ], + 'ksf' => [ + 'isoName' => 'Bafia', + 'nativeName' => 'Bafia', + ], + 'ksh' => [ + 'isoName' => 'Colognian', + 'nativeName' => 'Colognian', + ], + 'lag' => [ + 'isoName' => 'Langi', + 'nativeName' => 'Langi', + ], + 'lij' => [ + 'isoName' => 'Ligurian', + 'nativeName' => 'Ligurian', + ], + 'lkt' => [ + 'isoName' => 'Lakota', + 'nativeName' => 'Lakota', + ], + 'lrc' => [ + 'isoName' => 'Northern Luri', + 'nativeName' => 'Northern Luri', + ], + 'luo' => [ + 'isoName' => 'Luo', + 'nativeName' => 'Luo', + ], + 'luy' => [ + 'isoName' => 'Luyia', + 'nativeName' => 'Luyia', + ], + 'lzh' => [ + 'isoName' => 'Literary Chinese', + 'nativeName' => 'Literary Chinese', + ], + 'mag' => [ + 'isoName' => 'Magahi', + 'nativeName' => 'Magahi', + ], + 'mai' => [ + 'isoName' => 'Maithili', + 'nativeName' => 'Maithili', + ], + 'mas' => [ + 'isoName' => 'Masai', + 'nativeName' => 'Masai', + ], + 'mer' => [ + 'isoName' => 'Meru', + 'nativeName' => 'Meru', + ], + 'mfe' => [ + 'isoName' => 'Morisyen', + 'nativeName' => 'Morisyen', + ], + 'mgh' => [ + 'isoName' => 'Makhuwa-Meetto', + 'nativeName' => 'Makhuwa-Meetto', + ], + 'mgo' => [ + 'isoName' => 'Metaʼ', + 'nativeName' => 'Metaʼ', + ], + 'mhr' => [ + 'isoName' => 'Eastern Mari', + 'nativeName' => 'Eastern Mari', + ], + 'miq' => [ + 'isoName' => 'Mískito', + 'nativeName' => 'Mískito', + ], + 'mjw' => [ + 'isoName' => 'Karbi', + 'nativeName' => 'Karbi', + ], + 'mni' => [ + 'isoName' => 'Manipuri', + 'nativeName' => 'Manipuri', + ], + 'mua' => [ + 'isoName' => 'Mundang', + 'nativeName' => 'Mundang', + ], + 'mzn' => [ + 'isoName' => 'Mazanderani', + 'nativeName' => 'Mazanderani', + ], + 'nan' => [ + 'isoName' => 'Min Nan Chinese', + 'nativeName' => 'Min Nan Chinese', + ], + 'naq' => [ + 'isoName' => 'Nama', + 'nativeName' => 'Nama', + ], + 'nds' => [ + 'isoName' => 'Low German', + 'nativeName' => 'Low German', + ], + 'nhn' => [ + 'isoName' => 'Central Nahuatl', + 'nativeName' => 'Central Nahuatl', + ], + 'niu' => [ + 'isoName' => 'Niuean', + 'nativeName' => 'Niuean', + ], + 'nmg' => [ + 'isoName' => 'Kwasio', + 'nativeName' => 'Kwasio', + ], + 'nnh' => [ + 'isoName' => 'Ngiemboon', + 'nativeName' => 'Ngiemboon', + ], + 'nso' => [ + 'isoName' => 'Northern Sotho', + 'nativeName' => 'Northern Sotho', + ], + 'nus' => [ + 'isoName' => 'Nuer', + 'nativeName' => 'Nuer', + ], + 'nyn' => [ + 'isoName' => 'Nyankole', + 'nativeName' => 'Nyankole', + ], + 'pap' => [ + 'isoName' => 'Papiamento', + 'nativeName' => 'Papiamento', + ], + 'prg' => [ + 'isoName' => 'Prussian', + 'nativeName' => 'Prussian', + ], + 'quz' => [ + 'isoName' => 'Cusco Quechua', + 'nativeName' => 'Cusco Quechua', + ], + 'raj' => [ + 'isoName' => 'Rajasthani', + 'nativeName' => 'Rajasthani', + ], + 'rof' => [ + 'isoName' => 'Rombo', + 'nativeName' => 'Rombo', + ], + 'rwk' => [ + 'isoName' => 'Rwa', + 'nativeName' => 'Rwa', + ], + 'sah' => [ + 'isoName' => 'Sakha', + 'nativeName' => 'Sakha', + ], + 'saq' => [ + 'isoName' => 'Samburu', + 'nativeName' => 'Samburu', + ], + 'sat' => [ + 'isoName' => 'Santali', + 'nativeName' => 'Santali', + ], + 'sbp' => [ + 'isoName' => 'Sangu', + 'nativeName' => 'Sangu', + ], + 'scr' => [ + 'isoName' => 'Serbo Croatian', + 'nativeName' => 'Serbo Croatian', + ], + 'seh' => [ + 'isoName' => 'Sena', + 'nativeName' => 'Sena', + ], + 'ses' => [ + 'isoName' => 'Koyraboro Senni', + 'nativeName' => 'Koyraboro Senni', + ], + 'sgs' => [ + 'isoName' => 'Samogitian', + 'nativeName' => 'Samogitian', + ], + 'shi' => [ + 'isoName' => 'Tachelhit', + 'nativeName' => 'Tachelhit', + ], + 'shn' => [ + 'isoName' => 'Shan', + 'nativeName' => 'Shan', + ], + 'shs' => [ + 'isoName' => 'Shuswap', + 'nativeName' => 'Shuswap', + ], + 'sid' => [ + 'isoName' => 'Sidamo', + 'nativeName' => 'Sidamo', + ], + 'smn' => [ + 'isoName' => 'Inari Sami', + 'nativeName' => 'Inari Sami', + ], + 'szl' => [ + 'isoName' => 'Silesian', + 'nativeName' => 'Silesian', + ], + 'tcy' => [ + 'isoName' => 'Tulu', + 'nativeName' => 'Tulu', + ], + 'teo' => [ + 'isoName' => 'Teso', + 'nativeName' => 'Teso', + ], + 'tet' => [ + 'isoName' => 'Tetum', + 'nativeName' => 'Tetum', + ], + 'the' => [ + 'isoName' => 'Chitwania Tharu', + 'nativeName' => 'Chitwania Tharu', + ], + 'tig' => [ + 'isoName' => 'Tigre', + 'nativeName' => 'Tigre', + ], + 'tlh' => [ + 'isoName' => 'Klingon', + 'nativeName' => 'tlhIngan Hol', + ], + 'tpi' => [ + 'isoName' => 'Tok Pisin', + 'nativeName' => 'Tok Pisin', + ], + 'twq' => [ + 'isoName' => 'Tasawaq', + 'nativeName' => 'Tasawaq', + ], + 'tzl' => [ + 'isoName' => 'Talossan', + 'nativeName' => 'Talossan', + ], + 'tzm' => [ + 'isoName' => 'Tamazight, Central Atlas', + 'nativeName' => 'ⵜⵎⴰⵣⵉⵖⵜ', + ], + 'unm' => [ + 'isoName' => 'Unami', + 'nativeName' => 'Unami', + ], + 'vai' => [ + 'isoName' => 'Vai', + 'nativeName' => 'Vai', + ], + 'vun' => [ + 'isoName' => 'Vunjo', + 'nativeName' => 'Vunjo', + ], + 'wae' => [ + 'isoName' => 'Walser', + 'nativeName' => 'Walser', + ], + 'wal' => [ + 'isoName' => 'Wolaytta', + 'nativeName' => 'Wolaytta', + ], + 'xog' => [ + 'isoName' => 'Soga', + 'nativeName' => 'Soga', + ], + 'yav' => [ + 'isoName' => 'Yangben', + 'nativeName' => 'Yangben', + ], + 'yue' => [ + 'isoName' => 'Cantonese', + 'nativeName' => 'Cantonese', + ], + 'yuw' => [ + 'isoName' => 'Yau (Morobe Province)', + 'nativeName' => 'Yau (Morobe Province)', + ], + 'zgh' => [ + 'isoName' => 'Standard Moroccan Tamazight', + 'nativeName' => 'Standard Moroccan Tamazight', + ], +]; diff --git a/libraries/Carbon/src/Carbon/List/regions.php b/libraries/Carbon/src/Carbon/List/regions.php new file mode 100644 index 00000000000..8f7f4dc7d0d --- /dev/null +++ b/libraries/Carbon/src/Carbon/List/regions.php @@ -0,0 +1,265 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * ISO 3166-2 + */ +return [ + 'AD' => 'Andorra', + 'AE' => 'United Arab Emirates', + 'AF' => 'Afghanistan', + 'AG' => 'Antigua and Barbuda', + 'AI' => 'Anguilla', + 'AL' => 'Albania', + 'AM' => 'Armenia', + 'AO' => 'Angola', + 'AQ' => 'Antarctica', + 'AR' => 'Argentina', + 'AS' => 'American Samoa', + 'AT' => 'Austria', + 'AU' => 'Australia', + 'AW' => 'Aruba', + 'AX' => 'Åland Islands', + 'AZ' => 'Azerbaijan', + 'BA' => 'Bosnia and Herzegovina', + 'BB' => 'Barbados', + 'BD' => 'Bangladesh', + 'BE' => 'Belgium', + 'BF' => 'Burkina Faso', + 'BG' => 'Bulgaria', + 'BH' => 'Bahrain', + 'BI' => 'Burundi', + 'BJ' => 'Benin', + 'BL' => 'Saint Barthélemy', + 'BM' => 'Bermuda', + 'BN' => 'Brunei Darussalam', + 'BO' => 'Bolivia (Plurinational State of)', + 'BQ' => 'Bonaire, Sint Eustatius and Saba', + 'BR' => 'Brazil', + 'BS' => 'Bahamas', + 'BT' => 'Bhutan', + 'BV' => 'Bouvet Island', + 'BW' => 'Botswana', + 'BY' => 'Belarus', + 'BZ' => 'Belize', + 'CA' => 'Canada', + 'CC' => 'Cocos (Keeling) Islands', + 'CD' => 'Congo, Democratic Republic of the', + 'CF' => 'Central African Republic', + 'CG' => 'Congo', + 'CH' => 'Switzerland', + 'CI' => 'Côte d\'Ivoire', + 'CK' => 'Cook Islands', + 'CL' => 'Chile', + 'CM' => 'Cameroon', + 'CN' => 'China', + 'CO' => 'Colombia', + 'CR' => 'Costa Rica', + 'CU' => 'Cuba', + 'CV' => 'Cabo Verde', + 'CW' => 'Curaçao', + 'CX' => 'Christmas Island', + 'CY' => 'Cyprus', + 'CZ' => 'Czechia', + 'DE' => 'Germany', + 'DJ' => 'Djibouti', + 'DK' => 'Denmark', + 'DM' => 'Dominica', + 'DO' => 'Dominican Republic', + 'DZ' => 'Algeria', + 'EC' => 'Ecuador', + 'EE' => 'Estonia', + 'EG' => 'Egypt', + 'EH' => 'Western Sahara', + 'ER' => 'Eritrea', + 'ES' => 'Spain', + 'ET' => 'Ethiopia', + 'FI' => 'Finland', + 'FJ' => 'Fiji', + 'FK' => 'Falkland Islands (Malvinas)', + 'FM' => 'Micronesia (Federated States of)', + 'FO' => 'Faroe Islands', + 'FR' => 'France', + 'GA' => 'Gabon', + 'GB' => 'United Kingdom of Great Britain and Northern Ireland', + 'GD' => 'Grenada', + 'GE' => 'Georgia', + 'GF' => 'French Guiana', + 'GG' => 'Guernsey', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GL' => 'Greenland', + 'GM' => 'Gambia', + 'GN' => 'Guinea', + 'GP' => 'Guadeloupe', + 'GQ' => 'Equatorial Guinea', + 'GR' => 'Greece', + 'GS' => 'South Georgia and the South Sandwich Islands', + 'GT' => 'Guatemala', + 'GU' => 'Guam', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HK' => 'Hong Kong', + 'HM' => 'Heard Island and McDonald Islands', + 'HN' => 'Honduras', + 'HR' => 'Croatia', + 'HT' => 'Haiti', + 'HU' => 'Hungary', + 'ID' => 'Indonesia', + 'IE' => 'Ireland', + 'IL' => 'Israel', + 'IM' => 'Isle of Man', + 'IN' => 'India', + 'IO' => 'British Indian Ocean Territory', + 'IQ' => 'Iraq', + 'IR' => 'Iran (Islamic Republic of)', + 'IS' => 'Iceland', + 'IT' => 'Italy', + 'JE' => 'Jersey', + 'JM' => 'Jamaica', + 'JO' => 'Jordan', + 'JP' => 'Japan', + 'KE' => 'Kenya', + 'KG' => 'Kyrgyzstan', + 'KH' => 'Cambodia', + 'KI' => 'Kiribati', + 'KM' => 'Comoros', + 'KN' => 'Saint Kitts and Nevis', + 'KP' => 'Korea (Democratic People\'s Republic of)', + 'KR' => 'Korea, Republic of', + 'KW' => 'Kuwait', + 'KY' => 'Cayman Islands', + 'KZ' => 'Kazakhstan', + 'LA' => 'Lao People\'s Democratic Republic', + 'LB' => 'Lebanon', + 'LC' => 'Saint Lucia', + 'LI' => 'Liechtenstein', + 'LK' => 'Sri Lanka', + 'LR' => 'Liberia', + 'LS' => 'Lesotho', + 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', + 'LV' => 'Latvia', + 'LY' => 'Libya', + 'MA' => 'Morocco', + 'MC' => 'Monaco', + 'MD' => 'Moldova, Republic of', + 'ME' => 'Montenegro', + 'MF' => 'Saint Martin (French part)', + 'MG' => 'Madagascar', + 'MH' => 'Marshall Islands', + 'MK' => 'Macedonia, the former Yugoslav Republic of', + 'ML' => 'Mali', + 'MM' => 'Myanmar', + 'MN' => 'Mongolia', + 'MO' => 'Macao', + 'MP' => 'Northern Mariana Islands', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MS' => 'Montserrat', + 'MT' => 'Malta', + 'MU' => 'Mauritius', + 'MV' => 'Maldives', + 'MW' => 'Malawi', + 'MX' => 'Mexico', + 'MY' => 'Malaysia', + 'MZ' => 'Mozambique', + 'NA' => 'Namibia', + 'NC' => 'New Caledonia', + 'NE' => 'Niger', + 'NF' => 'Norfolk Island', + 'NG' => 'Nigeria', + 'NI' => 'Nicaragua', + 'NL' => 'Netherlands', + 'NO' => 'Norway', + 'NP' => 'Nepal', + 'NR' => 'Nauru', + 'NU' => 'Niue', + 'NZ' => 'New Zealand', + 'OM' => 'Oman', + 'PA' => 'Panama', + 'PE' => 'Peru', + 'PF' => 'French Polynesia', + 'PG' => 'Papua New Guinea', + 'PH' => 'Philippines', + 'PK' => 'Pakistan', + 'PL' => 'Poland', + 'PM' => 'Saint Pierre and Miquelon', + 'PN' => 'Pitcairn', + 'PR' => 'Puerto Rico', + 'PS' => 'Palestine, State of', + 'PT' => 'Portugal', + 'PW' => 'Palau', + 'PY' => 'Paraguay', + 'QA' => 'Qatar', + 'RE' => 'Réunion', + 'RO' => 'Romania', + 'RS' => 'Serbia', + 'RU' => 'Russian Federation', + 'RW' => 'Rwanda', + 'SA' => 'Saudi Arabia', + 'SB' => 'Solomon Islands', + 'SC' => 'Seychelles', + 'SD' => 'Sudan', + 'SE' => 'Sweden', + 'SG' => 'Singapore', + 'SH' => 'Saint Helena, Ascension and Tristan da Cunha', + 'SI' => 'Slovenia', + 'SJ' => 'Svalbard and Jan Mayen', + 'SK' => 'Slovakia', + 'SL' => 'Sierra Leone', + 'SM' => 'San Marino', + 'SN' => 'Senegal', + 'SO' => 'Somalia', + 'SR' => 'Suriname', + 'SS' => 'South Sudan', + 'ST' => 'Sao Tome and Principe', + 'SV' => 'El Salvador', + 'SX' => 'Sint Maarten (Dutch part)', + 'SY' => 'Syrian Arab Republic', + 'SZ' => 'Eswatini', + 'TC' => 'Turks and Caicos Islands', + 'TD' => 'Chad', + 'TF' => 'French Southern Territories', + 'TG' => 'Togo', + 'TH' => 'Thailand', + 'TJ' => 'Tajikistan', + 'TK' => 'Tokelau', + 'TL' => 'Timor-Leste', + 'TM' => 'Turkmenistan', + 'TN' => 'Tunisia', + 'TO' => 'Tonga', + 'TR' => 'Turkey', + 'TT' => 'Trinidad and Tobago', + 'TV' => 'Tuvalu', + 'TW' => 'Taiwan, Province of China', + 'TZ' => 'Tanzania, United Republic of', + 'UA' => 'Ukraine', + 'UG' => 'Uganda', + 'UM' => 'United States Minor Outlying Islands', + 'US' => 'United States of America', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VA' => 'Holy See', + 'VC' => 'Saint Vincent and the Grenadines', + 'VE' => 'Venezuela (Bolivarian Republic of)', + 'VG' => 'Virgin Islands (British)', + 'VI' => 'Virgin Islands (U.S.)', + 'VN' => 'Viet Nam', + 'VU' => 'Vanuatu', + 'WF' => 'Wallis and Futuna', + 'WS' => 'Samoa', + 'YE' => 'Yemen', + 'YT' => 'Mayotte', + 'ZA' => 'South Africa', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', +]; diff --git a/libraries/Carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php b/libraries/Carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php new file mode 100644 index 00000000000..b11214b258a --- /dev/null +++ b/libraries/Carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\MessageFormatter; + +use ReflectionMethod; +use EDD\Vendor\Symfony\Component\Translation\Formatter\MessageFormatter; +use EDD\Vendor\Symfony\Component\Translation\Formatter\MessageFormatterInterface; + +// @codeCoverageIgnoreStart +$transMethod = new ReflectionMethod(MessageFormatterInterface::class, 'format'); + +require $transMethod->getParameters()[0]->hasType() + ? __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php' + : __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php'; +// @codeCoverageIgnoreEnd + +final class MessageFormatterMapper extends LazyMessageFormatter +{ + /** + * Wrapped formatter. + * + * @var MessageFormatterInterface + */ + protected $formatter; + + public function __construct(?MessageFormatterInterface $formatter = null) + { + $this->formatter = $formatter ?? new MessageFormatter(); + } + + protected function transformLocale(?string $locale): ?string + { + return $locale ? preg_replace('/[_@][A-Za-z][a-z]{2,}/', '', $locale) : $locale; + } +} diff --git a/libraries/Carbon/src/Carbon/PHPStan/AbstractMacro.php b/libraries/Carbon/src/Carbon/PHPStan/AbstractMacro.php new file mode 100644 index 00000000000..a2ef1a8ead2 --- /dev/null +++ b/libraries/Carbon/src/Carbon/PHPStan/AbstractMacro.php @@ -0,0 +1,286 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +use Closure; +use InvalidArgumentException; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as AdapterReflectionParameter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType as AdapterReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; +use PHPStan\Reflection\Php\BuiltinMethodReflection; +use PHPStan\TrinaryLogic; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; +use ReflectionParameter; +use ReflectionType; +use stdClass; +use Throwable; + +abstract class AbstractMacro implements BuiltinMethodReflection +{ + /** + * The reflection function/method. + * + * @var ReflectionFunction|ReflectionMethod + */ + protected $reflectionFunction; + + /** + * The class name. + * + * @var class-string + */ + private $className; + + /** + * The method name. + * + * @var string + */ + private $methodName; + + /** + * The parameters. + * + * @var ReflectionParameter[] + */ + private $parameters; + + /** + * The is static. + * + * @var bool + */ + private $static = false; + + /** + * Macro constructor. + * + * @param class-string $className + * @param string $methodName + * @param callable $macro + */ + public function __construct(string $className, string $methodName, $macro) + { + $this->className = $className; + $this->methodName = $methodName; + $rawReflectionFunction = \is_array($macro) + ? new ReflectionMethod($macro[0], $macro[1]) + : new ReflectionFunction($macro); + $this->reflectionFunction = self::hasModernParser() + ? $this->getReflectionFunction($macro) + : $rawReflectionFunction; // @codeCoverageIgnore + $this->parameters = array_map( + function ($parameter) { + if ($parameter instanceof BetterReflectionParameter) { + return new AdapterReflectionParameter($parameter); + } + + return $parameter; // @codeCoverageIgnore + }, + $this->reflectionFunction->getParameters() + ); + + if ($rawReflectionFunction->isClosure()) { + try { + $closure = $rawReflectionFunction->getClosure(); + $boundClosure = Closure::bind($closure, new stdClass()); + $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); + } catch (Throwable $e) { + $this->static = true; + } + } + } + + private function getReflectionFunction($spec) + { + if (\is_array($spec) && \count($spec) === 2 && \is_string($spec[1])) { + \assert($spec[1] !== ''); + + if (\is_object($spec[0])) { + return BetterReflectionClass::createFromInstance($spec[0]) + ->getMethod($spec[1]); + } + + return BetterReflectionClass::createFromName($spec[0]) + ->getMethod($spec[1]); + } + + if (\is_string($spec)) { + return BetterReflectionFunction::createFromName($spec); + } + + if ($spec instanceof Closure) { + return BetterReflectionFunction::createFromClosure($spec); + } + + throw new InvalidArgumentException('Could not create reflection from the spec given'); // @codeCoverageIgnore + } + + /** + * {@inheritdoc} + */ + public function getDeclaringClass(): ReflectionClass + { + return new ReflectionClass($this->className); + } + + /** + * {@inheritdoc} + */ + public function isPrivate(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isPublic(): bool + { + return true; + } + + /** + * {@inheritdoc} + */ + public function isFinal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isInternal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isAbstract(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isStatic(): bool + { + return $this->static; + } + + /** + * {@inheritdoc} + */ + public function getDocComment(): ?string + { + return $this->reflectionFunction->getDocComment() ?: null; + } + + /** + * {@inheritdoc} + */ + public function getName(): string + { + return $this->methodName; + } + + /** + * {@inheritdoc} + */ + public function getParameters(): array + { + return $this->parameters; + } + + /** + * {@inheritdoc} + */ + public function getReturnType(): ?ReflectionType + { + $type = $this->reflectionFunction->getReturnType(); + + if ($type instanceof ReflectionType) { + return $type; // @codeCoverageIgnore + } + + return self::adaptType($type); + } + + /** + * {@inheritdoc} + */ + public function isDeprecated(): TrinaryLogic + { + return TrinaryLogic::createFromBoolean( + $this->reflectionFunction->isDeprecated() || + preg_match('/@deprecated/i', $this->getDocComment() ?: '') + ); + } + + /** + * {@inheritdoc} + */ + public function isVariadic(): bool + { + return $this->reflectionFunction->isVariadic(); + } + + /** + * {@inheritdoc} + */ + public function getPrototype(): BuiltinMethodReflection + { + return $this; + } + + public function getTentativeReturnType(): ?ReflectionType + { + return null; + } + + public function returnsByReference(): TrinaryLogic + { + return TrinaryLogic::createNo(); + } + + private static function adaptType($type) + { + $method = method_exists(AdapterReflectionType::class, 'fromTypeOrNull') + ? 'fromTypeOrNull' + : 'fromReturnTypeOrNull'; // @codeCoverageIgnore + + return AdapterReflectionType::$method($type); + } + + private static function hasModernParser(): bool + { + static $modernParser = null; + + if ($modernParser !== null) { + return $modernParser; + } + + $modernParser = method_exists(AdapterReflectionType::class, 'fromTypeOrNull'); + + return $modernParser; + } +} diff --git a/libraries/Carbon/src/Carbon/PHPStan/Macro.php b/libraries/Carbon/src/Carbon/PHPStan/Macro.php new file mode 100644 index 00000000000..22d0c34960e --- /dev/null +++ b/libraries/Carbon/src/Carbon/PHPStan/Macro.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +use PHPStan\BetterReflection\Reflection\Adapter; +use PHPStan\Reflection\Php\BuiltinMethodReflection; +use ReflectionMethod; + +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection'); + +require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class + ? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php'; + +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName'); + +require $method->hasReturnType() + ? __DIR__.'/../../../lazy/Carbon/PHPStan/MacroStrongType.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/MacroWeakType.php'; + +final class Macro extends LazyMacro +{ +} diff --git a/libraries/Carbon/src/Carbon/PHPStan/MacroExtension.php b/libraries/Carbon/src/Carbon/PHPStan/MacroExtension.php new file mode 100644 index 00000000000..7cc22d95b65 --- /dev/null +++ b/libraries/Carbon/src/Carbon/PHPStan/MacroExtension.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +use PHPStan\Reflection\Assertions; +use PHPStan\Reflection\ClassReflection; +use PHPStan\Reflection\MethodReflection; +use PHPStan\Reflection\MethodsClassReflectionExtension; +use PHPStan\Reflection\Php\PhpMethodReflectionFactory; +use PHPStan\Reflection\ReflectionProvider; +use PHPStan\Type\TypehintHelper; + +/** + * Class MacroExtension. + * + * @codeCoverageIgnore Pure PHPStan wrapper. + */ +final class MacroExtension implements MethodsClassReflectionExtension +{ + /** + * @var PhpMethodReflectionFactory + */ + protected $methodReflectionFactory; + + /** + * @var MacroScanner + */ + protected $scanner; + + /** + * Extension constructor. + * + * @param PhpMethodReflectionFactory $methodReflectionFactory + * @param ReflectionProvider $reflectionProvider + */ + public function __construct( + PhpMethodReflectionFactory $methodReflectionFactory, + ReflectionProvider $reflectionProvider + ) { + $this->scanner = new MacroScanner($reflectionProvider); + $this->methodReflectionFactory = $methodReflectionFactory; + } + + /** + * {@inheritdoc} + */ + public function hasMethod(ClassReflection $classReflection, string $methodName): bool + { + return $this->scanner->hasMethod($classReflection->getName(), $methodName); + } + + /** + * {@inheritdoc} + */ + public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection + { + $builtinMacro = $this->scanner->getMethod($classReflection->getName(), $methodName); + $supportAssertions = class_exists(Assertions::class); + + return $this->methodReflectionFactory->create( + $classReflection, + null, + $builtinMacro, + $classReflection->getActiveTemplateTypeMap(), + [], + TypehintHelper::decideTypeFromReflection($builtinMacro->getReturnType()), + null, + null, + $builtinMacro->isDeprecated()->yes(), + $builtinMacro->isInternal(), + $builtinMacro->isFinal(), + $supportAssertions ? null : $builtinMacro->getDocComment(), + $supportAssertions ? Assertions::createEmpty() : null, + null, + $builtinMacro->getDocComment(), + [] + ); + } +} diff --git a/libraries/Carbon/src/Carbon/PHPStan/MacroScanner.php b/libraries/Carbon/src/Carbon/PHPStan/MacroScanner.php new file mode 100644 index 00000000000..a01450ffa17 --- /dev/null +++ b/libraries/Carbon/src/Carbon/PHPStan/MacroScanner.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\PHPStan; + +use EDD\Vendor\Carbon\CarbonInterface; +use PHPStan\Reflection\ReflectionProvider; +use ReflectionClass; +use ReflectionException; + +final class MacroScanner +{ + /** + * @var \PHPStan\Reflection\ReflectionProvider + */ + private $reflectionProvider; + + /** + * MacroScanner constructor. + * + * @param \PHPStan\Reflection\ReflectionProvider $reflectionProvider + */ + public function __construct(ReflectionProvider $reflectionProvider) + { + $this->reflectionProvider = $reflectionProvider; + } + + /** + * Return true if the given pair class-method is a EDD\Vendor\Carbon macro. + * + * @param class-string $className + * @param string $methodName + * + * @return bool + */ + public function hasMethod(string $className, string $methodName): bool + { + $classReflection = $this->reflectionProvider->getClass($className); + + if ( + $classReflection->getName() !== CarbonInterface::class && + !$classReflection->isSubclassOf(CarbonInterface::class) + ) { + return false; + } + + return \is_callable([$className, 'hasMacro']) && + $className::hasMacro($methodName); + } + + /** + * Return the Macro for a given pair class-method. + * + * @param class-string $className + * @param string $methodName + * + * @throws ReflectionException + * + * @return Macro + */ + public function getMethod(string $className, string $methodName): Macro + { + $reflectionClass = new ReflectionClass($className); + $property = $reflectionClass->getProperty('globalMacros'); + + $property->setAccessible(true); + $macro = $property->getValue()[$methodName]; + + return new Macro( + $className, + $methodName, + $macro + ); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Boundaries.php b/libraries/Carbon/src/Carbon/Traits/Boundaries.php new file mode 100644 index 00000000000..842d0d6a376 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Boundaries.php @@ -0,0 +1,443 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Exceptions\UnknownUnitException; + +/** + * Trait Boundaries. + * + * startOf, endOf and derived method for each unit. + * + * Depends on the following properties: + * + * @property int $year + * @property int $month + * @property int $daysInMonth + * @property int $quarter + * + * Depends on the following methods: + * + * @method $this setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) + * @method $this setDate(int $year, int $month, int $day) + * @method $this addMonths(int $value = 1) + */ +trait Boundaries +{ + /** + * Resets the time to 00:00:00 start of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); + * ``` + * + * @return static + */ + public function startOfDay() + { + return $this->setTime(0, 0, 0, 0); + } + + /** + * Resets the time to 23:59:59.999999 end of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); + * ``` + * + * @return static + */ + public function endOfDay() + { + return $this->setTime(static::HOURS_PER_DAY - 1, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Resets the date to the first day of the month and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); + * ``` + * + * @return static + */ + public function startOfMonth() + { + return $this->setDate($this->year, $this->month, 1)->startOfDay(); + } + + /** + * Resets the date to end of the month and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); + * ``` + * + * @return static + */ + public function endOfMonth() + { + return $this->setDate($this->year, $this->month, $this->daysInMonth)->endOfDay(); + } + + /** + * Resets the date to the first day of the quarter and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); + * ``` + * + * @return static + */ + public function startOfQuarter() + { + $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1; + + return $this->setDate($this->year, $month, 1)->startOfDay(); + } + + /** + * Resets the date to end of the quarter and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); + * ``` + * + * @return static + */ + public function endOfQuarter() + { + return $this->startOfQuarter()->addMonths(static::MONTHS_PER_QUARTER - 1)->endOfMonth(); + } + + /** + * Resets the date to the first day of the year and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); + * ``` + * + * @return static + */ + public function startOfYear() + { + return $this->setDate($this->year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the year and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); + * ``` + * + * @return static + */ + public function endOfYear() + { + return $this->setDate($this->year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of the decade and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); + * ``` + * + * @return static + */ + public function startOfDecade() + { + $year = $this->year - $this->year % static::YEARS_PER_DECADE; + + return $this->setDate($year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the decade and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); + * ``` + * + * @return static + */ + public function endOfDecade() + { + $year = $this->year - $this->year % static::YEARS_PER_DECADE + static::YEARS_PER_DECADE - 1; + + return $this->setDate($year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of the century and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); + * ``` + * + * @return static + */ + public function startOfCentury() + { + $year = $this->year - ($this->year - 1) % static::YEARS_PER_CENTURY; + + return $this->setDate($year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the century and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); + * ``` + * + * @return static + */ + public function endOfCentury() + { + $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY; + + return $this->setDate($year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of the millennium and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); + * ``` + * + * @return static + */ + public function startOfMillennium() + { + $year = $this->year - ($this->year - 1) % static::YEARS_PER_MILLENNIUM; + + return $this->setDate($year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the millennium and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); + * ``` + * + * @return static + */ + public function endOfMillennium() + { + $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_MILLENNIUM + static::YEARS_PER_MILLENNIUM; + + return $this->setDate($year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; + * ``` + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return static + */ + public function startOfWeek($weekStartsAt = null) + { + return $this->subDays((7 + $this->dayOfWeek - ($weekStartsAt ?? $this->firstWeekDay)) % 7)->startOfDay(); + } + + /** + * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; + * ``` + * + * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week + * + * @return static + */ + public function endOfWeek($weekEndsAt = null) + { + return $this->addDays((7 - $this->dayOfWeek + ($weekEndsAt ?? $this->lastWeekDay)) % 7)->endOfDay(); + } + + /** + * Modify to start of current hour, minutes and seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); + * ``` + * + * @return static + */ + public function startOfHour() + { + return $this->setTime($this->hour, 0, 0, 0); + } + + /** + * Modify to end of current hour, minutes and seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); + * ``` + * + * @return static + */ + public function endOfHour() + { + return $this->setTime($this->hour, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Modify to start of current minute, seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); + * ``` + * + * @return static + */ + public function startOfMinute() + { + return $this->setTime($this->hour, $this->minute, 0, 0); + } + + /** + * Modify to end of current minute, seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); + * ``` + * + * @return static + */ + public function endOfMinute() + { + return $this->setTime($this->hour, $this->minute, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Modify to start of current second, microseconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function startOfSecond() + { + return $this->setTime($this->hour, $this->minute, $this->second, 0); + } + + /** + * Modify to end of current second, microseconds become 999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->endOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function endOfSecond() + { + return $this->setTime($this->hour, $this->minute, $this->second, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Modify to start of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function startOf($unit, ...$params) + { + $ucfUnit = ucfirst(static::singularUnit($unit)); + $method = "startOf$ucfUnit"; + if (!method_exists($this, $method)) { + throw new UnknownUnitException($unit); + } + + return $this->$method(...$params); + } + + /** + * Modify to end of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function endOf($unit, ...$params) + { + $ucfUnit = ucfirst(static::singularUnit($unit)); + $method = "endOf$ucfUnit"; + if (!method_exists($this, $method)) { + throw new UnknownUnitException($unit); + } + + return $this->$method(...$params); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Cast.php b/libraries/Carbon/src/Carbon/Traits/Cast.php new file mode 100644 index 00000000000..c52a4da852b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Cast.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Exceptions\InvalidCastException; +use DateTimeInterface; + +/** + * Trait Cast. + * + * Utils to cast into an other class. + */ +trait Cast +{ + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateTimeInterface + */ + public function cast(string $className) + { + if (!method_exists($className, 'instance')) { + if (is_a($className, DateTimeInterface::class, true)) { + return new $className($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); + } + + throw new InvalidCastException("$className has not the instance() method needed to cast the date."); + } + + return $className::instance($this); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Comparison.php b/libraries/Carbon/src/Carbon/Traits/Comparison.php new file mode 100644 index 00000000000..ed33dbc270d --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Comparison.php @@ -0,0 +1,1129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use BadMethodCallException; +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\Exceptions\BadComparisonUnitException; +use InvalidArgumentException; + +/** + * Trait Comparison. + * + * Comparison utils and testers. All the following methods return booleans. + * nowWithSameTz + * + * Depends on the following methods: + * + * @method static resolveCarbon($date) + * @method static copy() + * @method static nowWithSameTz() + * @method static static yesterday($timezone = null) + * @method static static tomorrow($timezone = null) + */ +trait Comparison +{ + /** @var bool */ + protected $endOfTime = false; + + /** @var bool */ + protected $startOfTime = false; + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see equalTo() + * + * @return bool + */ + public function eq($date): bool + { + return $this->equalTo($date); + } + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function equalTo($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this == $this->resolveCarbon($date); + } + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($date): bool + { + return $this->notEqualTo($date); + } + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function notEqualTo($date): bool + { + return !$this->equalTo($date); + } + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function gt($date): bool + { + return $this->greaterThan($date); + } + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThan($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this > $this->resolveCarbon($date); + } + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function isAfter($date): bool + { + return $this->greaterThan($date); + } + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThanOrEqualTo() + * + * @return bool + */ + public function gte($date): bool + { + return $this->greaterThanOrEqualTo($date); + } + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThanOrEqualTo($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this >= $this->resolveCarbon($date); + } + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function lt($date): bool + { + return $this->lessThan($date); + } + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThan($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this < $this->resolveCarbon($date); + } + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function isBefore($date): bool + { + return $this->lessThan($date); + } + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThanOrEqualTo() + * + * @return bool + */ + public function lte($date): bool + { + return $this->lessThanOrEqualTo($date); + } + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThanOrEqualTo($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this <= $this->resolveCarbon($date); + } + + /** + * Determines if the instance is between two others. + * + * The third argument allow you to specify if bounds are included or not (true by default) + * but for when you including/excluding bounds may produce different results in your application, + * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function between($date1, $date2, $equal = true): bool + { + $date1 = $this->resolveCarbon($date1); + $date2 = $this->resolveCarbon($date2); + + if ($date1->greaterThan($date2)) { + [$date1, $date2] = [$date2, $date1]; + } + + if ($equal) { + return $this >= $date1 && $this <= $date2; + } + + return $this > $date1 && $this < $date2; + } + + /** + * Determines if the instance is between two others, bounds included. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenIncluded($date1, $date2): bool + { + return $this->between($date1, $date2, true); + } + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenExcluded($date1, $date2): bool + { + return $this->between($date1, $date2, false); + } + + /** + * Determines if the instance is between two others + * + * @example + * ``` + * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function isBetween($date1, $date2, $equal = true): bool + { + return $this->between($date1, $date2, $equal); + } + + /** + * Determines if the instance is a weekday. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekday(); // false + * Carbon::parse('2019-07-15')->isWeekday(); // true + * ``` + * + * @return bool + */ + public function isWeekday() + { + return !$this->isWeekend(); + } + + /** + * Determines if the instance is a weekend day. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekend(); // true + * Carbon::parse('2019-07-15')->isWeekend(); // false + * ``` + * + * @return bool + */ + public function isWeekend() + { + return \in_array($this->dayOfWeek, static::$weekendDays, true); + } + + /** + * Determines if the instance is yesterday. + * + * @example + * ``` + * Carbon::yesterday()->isYesterday(); // true + * Carbon::tomorrow()->isYesterday(); // false + * ``` + * + * @return bool + */ + public function isYesterday() + { + return $this->toDateString() === static::yesterday($this->getTimezone())->toDateString(); + } + + /** + * Determines if the instance is today. + * + * @example + * ``` + * Carbon::today()->isToday(); // true + * Carbon::tomorrow()->isToday(); // false + * ``` + * + * @return bool + */ + public function isToday() + { + return $this->toDateString() === $this->nowWithSameTz()->toDateString(); + } + + /** + * Determines if the instance is tomorrow. + * + * @example + * ``` + * Carbon::tomorrow()->isTomorrow(); // true + * Carbon::yesterday()->isTomorrow(); // false + * ``` + * + * @return bool + */ + public function isTomorrow() + { + return $this->toDateString() === static::tomorrow($this->getTimezone())->toDateString(); + } + + /** + * Determines if the instance is in the future, ie. greater (after) than now. + * + * @example + * ``` + * Carbon::now()->addHours(5)->isFuture(); // true + * Carbon::now()->subHours(5)->isFuture(); // false + * ``` + * + * @return bool + */ + public function isFuture() + { + return $this->greaterThan($this->nowWithSameTz()); + } + + /** + * Determines if the instance is in the past, ie. less (before) than now. + * + * @example + * ``` + * Carbon::now()->subHours(5)->isPast(); // true + * Carbon::now()->addHours(5)->isPast(); // false + * ``` + * + * @return bool + */ + public function isPast() + { + return $this->lessThan($this->nowWithSameTz()); + } + + /** + * Determines if the instance is a leap year. + * + * @example + * ``` + * Carbon::parse('2020-01-01')->isLeapYear(); // true + * Carbon::parse('2019-01-01')->isLeapYear(); // false + * ``` + * + * @return bool + */ + public function isLeapYear() + { + return $this->rawFormat('L') === '1'; + } + + /** + * Determines if the instance is a long year (using calendar year). + * + * ⚠️ This method completely ignores month and day to use the numeric year number, + * it's not correct if the exact date matters. For instance as `2019-12-30` is already + * in the first week of the 2020 year, if you want to know from this date if ISO week + * year 2020 is a long year, use `isLongIsoYear` instead. + * + * @example + * ``` + * Carbon::create(2015)->isLongYear(); // true + * Carbon::create(2016)->isLongYear(); // false + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongYear() + { + return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; + } + + /** + * Determines if the instance is a long year (using ISO 8601 year). + * + * @example + * ``` + * Carbon::parse('2015-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-03')->isLongIsoYear(); // false + * Carbon::parse('2019-12-29')->isLongIsoYear(); // false + * Carbon::parse('2019-12-30')->isLongIsoYear(); // true + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongIsoYear() + { + return static::create($this->isoWeekYear, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; + } + + /** + * Compares the formatted values of the two dates. + * + * @example + * ``` + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false + * ``` + * + * @param string $format date formats to compare. + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. + * + * @return bool + */ + public function isSameAs($format, $date = null) + { + return $this->rawFormat($format) === $this->resolveCarbon($date)->rawFormat($format); + } + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true + * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false + * ``` + * + * @param string $unit singular unit string + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. + * + * @throws BadComparisonUnitException + * + * @return bool + */ + public function isSameUnit($unit, $date = null) + { + $units = [ + // @call isSameUnit + 'year' => 'Y', + // @call isSameUnit + 'week' => 'o-W', + // @call isSameUnit + 'day' => 'Y-m-d', + // @call isSameUnit + 'hour' => 'Y-m-d H', + // @call isSameUnit + 'minute' => 'Y-m-d H:i', + // @call isSameUnit + 'second' => 'Y-m-d H:i:s', + // @call isSameUnit + 'micro' => 'Y-m-d H:i:s.u', + // @call isSameUnit + 'microsecond' => 'Y-m-d H:i:s.u', + ]; + + if (isset($units[$unit])) { + return $this->isSameAs($units[$unit], $date); + } + + if (isset($this->$unit)) { + return $this->resolveCarbon($date)->$unit === $this->$unit; + } + + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new BadComparisonUnitException($unit); + } + + return false; + } + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::now()->isCurrentUnit('hour'); // true + * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false + * ``` + * + * @param string $unit The unit to test. + * + * @throws BadMethodCallException + * + * @return bool + */ + public function isCurrentUnit($unit) + { + return $this->{'isSame'.ucfirst($unit)}(); + } + + /** + * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameQuarter($date = null, $ofSameYear = true) + { + $date = $this->resolveCarbon($date); + + return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); + } + + /** + * Checks if the passed in date is in the same month as the instance´s month. + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameMonth($date = null, $ofSameYear = true) + { + return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); + } + + /** + * Checks if this day is a specific day of the week. + * + * @example + * ``` + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false + * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true + * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false + * ``` + * + * @param int $dayOfWeek + * + * @return bool + */ + public function isDayOfWeek($dayOfWeek) + { + if (\is_string($dayOfWeek) && \defined($constant = static::class.'::'.strtoupper($dayOfWeek))) { + $dayOfWeek = \constant($constant); + } + + return $this->dayOfWeek === $dayOfWeek; + } + + /** + * Check if its the birthday. Compares the date/month values of the two dates. + * + * @example + * ``` + * Carbon::now()->subYears(5)->isBirthday(); // true + * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false + * ``` + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @return bool + */ + public function isBirthday($date = null) + { + return $this->isSameAs('md', $date); + } + + /** + * Check if today is the last day of the Month + * + * @example + * ``` + * Carbon::parse('2019-02-28')->isLastOfMonth(); // true + * Carbon::parse('2019-03-28')->isLastOfMonth(); // false + * Carbon::parse('2019-03-30')->isLastOfMonth(); // false + * Carbon::parse('2019-03-31')->isLastOfMonth(); // true + * Carbon::parse('2019-04-30')->isLastOfMonth(); // true + * ``` + * + * @return bool + */ + public function isLastOfMonth() + { + return $this->day === $this->daysInMonth; + } + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false + * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true + * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isStartOfDay($checkMicroseconds = false) + { + /* @var CarbonInterface $this */ + return $checkMicroseconds + ? $this->rawFormat('H:i:s.u') === '00:00:00.000000' + : $this->rawFormat('H:i:s') === '00:00:00'; + } + + /** + * Check if the instance is end of day. + * + * @example + * ``` + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isEndOfDay($checkMicroseconds = false) + { + /* @var CarbonInterface $this */ + return $checkMicroseconds + ? $this->rawFormat('H:i:s.u') === '23:59:59.999999' + : $this->rawFormat('H:i:s') === '23:59:59'; + } + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false + * ``` + * + * @return bool + */ + public function isMidnight() + { + return $this->isStartOfDay(); + } + + /** + * Check if the instance is midday. + * + * @example + * ``` + * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false + * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false + * ``` + * + * @return bool + */ + public function isMidday() + { + /* @var CarbonInterface $this */ + return $this->rawFormat('G:i:s') === static::$midDayAt.':00:00'; + } + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormat($date, $format) + { + // createFromFormat() is known to handle edge cases silently. + // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. + // To ensure we're really testing against our desired format, perform an additional regex validation. + + return self::matchFormatPattern((string) $date, preg_quote((string) $format, '/'), static::$regexFormats); + } + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true + * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormatWithModifiers($date, $format): bool + { + return self::matchFormatPattern((string) $date, (string) $format, array_merge(static::$regexFormats, static::$regexFormatModifiers)); + } + + /** + * Checks if the (date)time string is in a given format and valid to create a + * new instance. + * + * @example + * ``` + * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true + * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function canBeCreatedFromFormat($date, $format) + { + try { + // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string + // doesn't match the format in any way. + if (!static::rawCreateFromFormat($format, $date)) { + return false; + } + } catch (InvalidArgumentException $e) { + return false; + } + + return static::hasFormatWithModifiers($date, $format); + } + + /** + * Returns true if the current date matches the given string. + * + * @example + * ``` + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false + * ``` + * + * @param string $tester day name, month name, hour, date, etc. as string + * + * @return bool + */ + public function is(string $tester) + { + $tester = trim($tester); + + if (preg_match('/^\d+$/', $tester)) { + return $this->year === (int) $tester; + } + + if (preg_match('/^(?:Jan|January|Feb|February|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|September|Oct|October|Nov|November|Dec|December)$/i', $tester)) { + return $this->isSameMonth(static::parse($tester), false); + } + + if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) { + return $this->isSameMonth(static::parse($tester)); + } + + if (preg_match('/^\d{1,2}-\d{1,2}$/', $tester)) { + return $this->isSameDay(static::parse($this->year.'-'.$tester)); + } + + $modifier = preg_replace('/(\d)h$/i', '$1:00', $tester); + + /* @var CarbonInterface $max */ + $median = static::parse('5555-06-15 12:30:30.555555')->modify($modifier); + $current = $this->avoidMutation(); + /* @var CarbonInterface $other */ + $other = $this->avoidMutation()->modify($modifier); + + if ($current->eq($other)) { + return true; + } + + if (preg_match('/\d:\d{1,2}:\d{1,2}$/', $tester)) { + return $current->startOfSecond()->eq($other); + } + + if (preg_match('/\d:\d{1,2}$/', $tester)) { + return $current->startOfMinute()->eq($other); + } + + if (preg_match('/\d(?:h|am|pm)$/', $tester)) { + return $current->startOfHour()->eq($other); + } + + if (preg_match( + '/^(?:january|february|march|april|may|june|july|august|september|october|november|december)(?:\s+\d+)?$/i', + $tester + )) { + return $current->startOfMonth()->eq($other->startOfMonth()); + } + + $units = [ + 'month' => [1, 'year'], + 'day' => [1, 'month'], + 'hour' => [0, 'day'], + 'minute' => [0, 'hour'], + 'second' => [0, 'minute'], + 'microsecond' => [0, 'second'], + ]; + + foreach ($units as $unit => [$minimum, $startUnit]) { + if ($minimum === $median->$unit) { + $current = $current->startOf($startUnit); + + break; + } + } + + return $current->eq($other); + } + + /** + * Checks if the (date)time string is in a given format with + * given list of pattern replacements. + * + * @example + * ``` + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * @param array $replacements + * + * @return bool + */ + private static function matchFormatPattern(string $date, string $format, array $replacements): bool + { + // Preg quote, but remove escaped backslashes since we'll deal with escaped characters in the format string. + $regex = str_replace('\\\\', '\\', $format); + // Replace not-escaped letters + $regex = preg_replace_callback( + '/(?startOfTime ?? false; + } + + /** + * Returns true if the date was created using CarbonImmutable::endOfTime() + * + * @return bool + */ + public function isEndOfTime(): bool + { + return $this->endOfTime ?? false; + } + + private function discourageNull($value): void + { + if ($value === null) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); + } + } + + private function discourageBoolean($value): void + { + if (\is_bool($value)) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); + } + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Converter.php b/libraries/Carbon/src/Carbon/Traits/Converter.php new file mode 100644 index 00000000000..45383116184 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Converter.php @@ -0,0 +1,639 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Carbon; +use EDD\Vendor\Carbon\CarbonImmutable; +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\CarbonInterval; +use EDD\Vendor\Carbon\CarbonPeriod; +use EDD\Vendor\Carbon\CarbonPeriodImmutable; +use EDD\Vendor\Carbon\Exceptions\UnitException; +use Closure; +use DateTime; +use DateTimeImmutable; +use ReturnTypeWillChange; + +/** + * Trait Converter. + * + * Change date into different string formats and types and + * handle the string cast. + * + * Depends on the following methods: + * + * @method static copy() + */ +trait Converter +{ + use ToStringFormat; + + /** + * Returns the formatted date string on success or FALSE on failure. + * + * @see https://php.net/manual/en/datetime.format.php + * + * @param string $format + * + * @return string + */ + #[ReturnTypeWillChange] + public function format($format) + { + $function = $this->localFormatFunction ?: static::$formatFunction; + + if (!$function) { + return $this->rawFormat($format); + } + + if (\is_string($function) && method_exists($this, $function)) { + $function = [$this, $function]; + } + + return $function(...\func_get_args()); + } + + /** + * @see https://php.net/manual/en/datetime.format.php + * + * @param string $format + * + * @return string + */ + public function rawFormat($format) + { + return parent::format($format); + } + + /** + * Format the instance as a string using the set format + * + * @example + * ``` + * echo Carbon::now(); // EDD\Vendor\Carbon instances can be cast to string + * ``` + * + * @return string + */ + public function __toString() + { + $format = $this->localToStringFormat ?? static::$toStringFormat; + + return $format instanceof Closure + ? $format($this) + : $this->rawFormat($format ?: ( + \defined('static::DEFAULT_TO_STRING_FORMAT') + ? static::DEFAULT_TO_STRING_FORMAT + : CarbonInterface::DEFAULT_TO_STRING_FORMAT + )); + } + + /** + * Format the instance as date + * + * @example + * ``` + * echo Carbon::now()->toDateString(); + * ``` + * + * @return string + */ + public function toDateString() + { + return $this->rawFormat('Y-m-d'); + } + + /** + * Format the instance as a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDateString(); + * ``` + * + * @return string + */ + public function toFormattedDateString() + { + return $this->rawFormat('M j, Y'); + } + + /** + * Format the instance with the day, and a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDayDateString(); + * ``` + * + * @return string + */ + public function toFormattedDayDateString(): string + { + return $this->rawFormat('D, M j, Y'); + } + + /** + * Format the instance as time + * + * @example + * ``` + * echo Carbon::now()->toTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toTimeString($unitPrecision = 'second') + { + return $this->rawFormat(static::getTimeFormatByPrecision($unitPrecision)); + } + + /** + * Format the instance as date and time + * + * @example + * ``` + * echo Carbon::now()->toDateTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeString($unitPrecision = 'second') + { + return $this->rawFormat('Y-m-d '.static::getTimeFormatByPrecision($unitPrecision)); + } + + /** + * Return a format from H:i to H:i:s.u according to given unit precision. + * + * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" + * + * @return string + */ + public static function getTimeFormatByPrecision($unitPrecision) + { + switch (static::singularUnit($unitPrecision)) { + case 'minute': + return 'H:i'; + case 'second': + return 'H:i:s'; + case 'm': + case 'millisecond': + return 'H:i:s.v'; + case 'µ': + case 'microsecond': + return 'H:i:s.u'; + } + + throw new UnitException('Precision unit expected among: minute, second, millisecond and microsecond.'); + } + + /** + * Format the instance as date and time T-separated with no timezone + * + * @example + * ``` + * echo Carbon::now()->toDateTimeLocalString(); + * echo "\n"; + * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeLocalString($unitPrecision = 'second') + { + return $this->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision)); + } + + /** + * Format the instance with day, date and time + * + * @example + * ``` + * echo Carbon::now()->toDayDateTimeString(); + * ``` + * + * @return string + */ + public function toDayDateTimeString() + { + return $this->rawFormat('D, M j, Y g:i A'); + } + + /** + * Format the instance as ATOM + * + * @example + * ``` + * echo Carbon::now()->toAtomString(); + * ``` + * + * @return string + */ + public function toAtomString() + { + return $this->rawFormat(DateTime::ATOM); + } + + /** + * Format the instance as COOKIE + * + * @example + * ``` + * echo Carbon::now()->toCookieString(); + * ``` + * + * @return string + */ + public function toCookieString() + { + return $this->rawFormat(DateTime::COOKIE); + } + + /** + * Format the instance as ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601String(); + * ``` + * + * @return string + */ + public function toIso8601String() + { + return $this->toAtomString(); + } + + /** + * Format the instance as RFC822 + * + * @example + * ``` + * echo Carbon::now()->toRfc822String(); + * ``` + * + * @return string + */ + public function toRfc822String() + { + return $this->rawFormat(DateTime::RFC822); + } + + /** + * Convert the instance to UTC and return as Zulu ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601ZuluString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toIso8601ZuluString($unitPrecision = 'second') + { + return $this->avoidMutation() + ->utc() + ->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision).'\Z'); + } + + /** + * Format the instance as RFC850 + * + * @example + * ``` + * echo Carbon::now()->toRfc850String(); + * ``` + * + * @return string + */ + public function toRfc850String() + { + return $this->rawFormat(DateTime::RFC850); + } + + /** + * Format the instance as RFC1036 + * + * @example + * ``` + * echo Carbon::now()->toRfc1036String(); + * ``` + * + * @return string + */ + public function toRfc1036String() + { + return $this->rawFormat(DateTime::RFC1036); + } + + /** + * Format the instance as RFC1123 + * + * @example + * ``` + * echo Carbon::now()->toRfc1123String(); + * ``` + * + * @return string + */ + public function toRfc1123String() + { + return $this->rawFormat(DateTime::RFC1123); + } + + /** + * Format the instance as RFC2822 + * + * @example + * ``` + * echo Carbon::now()->toRfc2822String(); + * ``` + * + * @return string + */ + public function toRfc2822String() + { + return $this->rawFormat(DateTime::RFC2822); + } + + /** + * Format the instance as RFC3339 + * + * @param bool $extended + * + * @example + * ``` + * echo Carbon::now()->toRfc3339String() . "\n"; + * echo Carbon::now()->toRfc3339String(true) . "\n"; + * ``` + * + * @return string + */ + public function toRfc3339String($extended = false) + { + $format = DateTime::RFC3339; + if ($extended) { + $format = DateTime::RFC3339_EXTENDED; + } + + return $this->rawFormat($format); + } + + /** + * Format the instance as RSS + * + * @example + * ``` + * echo Carbon::now()->toRssString(); + * ``` + * + * @return string + */ + public function toRssString() + { + return $this->rawFormat(DateTime::RSS); + } + + /** + * Format the instance as W3C + * + * @example + * ``` + * echo Carbon::now()->toW3cString(); + * ``` + * + * @return string + */ + public function toW3cString() + { + return $this->rawFormat(DateTime::W3C); + } + + /** + * Format the instance as RFC7231 + * + * @example + * ``` + * echo Carbon::now()->toRfc7231String(); + * ``` + * + * @return string + */ + public function toRfc7231String() + { + return $this->avoidMutation() + ->setTimezone('GMT') + ->rawFormat(\defined('static::RFC7231_FORMAT') ? static::RFC7231_FORMAT : CarbonInterface::RFC7231_FORMAT); + } + + /** + * Get default array representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toArray()); + * ``` + * + * @return array + */ + public function toArray() + { + return [ + 'year' => $this->year, + 'month' => $this->month, + 'day' => $this->day, + 'dayOfWeek' => $this->dayOfWeek, + 'dayOfYear' => $this->dayOfYear, + 'hour' => $this->hour, + 'minute' => $this->minute, + 'second' => $this->second, + 'micro' => $this->micro, + 'timestamp' => $this->timestamp, + 'formatted' => $this->rawFormat(\defined('static::DEFAULT_TO_STRING_FORMAT') ? static::DEFAULT_TO_STRING_FORMAT : CarbonInterface::DEFAULT_TO_STRING_FORMAT), + 'timezone' => $this->timezone, + ]; + } + + /** + * Get default object representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toObject()); + * ``` + * + * @return object + */ + public function toObject() + { + return (object) $this->toArray(); + } + + /** + * Returns english human readable complete date string. + * + * @example + * ``` + * echo Carbon::now()->toString(); + * ``` + * + * @return string + */ + public function toString() + { + return $this->avoidMutation()->locale('en')->isoFormat('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: + * 1977-04-22T01:00:00-05:00). + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toISOString() . "\n"; + * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; + * ``` + * + * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. + * + * @return null|string + */ + public function toISOString($keepOffset = false) + { + if (!$this->isValid()) { + return null; + } + + $yearFormat = $this->year < 0 || $this->year > 9999 ? 'YYYYYY' : 'YYYY'; + $tzFormat = $keepOffset ? 'Z' : '[Z]'; + $date = $keepOffset ? $this : $this->avoidMutation()->utc(); + + return $date->isoFormat("$yearFormat-MM-DD[T]HH:mm:ss.SSSSSS$tzFormat"); + } + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toJSON(); + * ``` + * + * @return null|string + */ + public function toJSON() + { + return $this->toISOString(); + } + + /** + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTime()); + * ``` + * + * @return DateTime + */ + public function toDateTime() + { + return new DateTime($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); + } + + /** + * Return native toDateTimeImmutable PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTimeImmutable()); + * ``` + * + * @return DateTimeImmutable + */ + public function toDateTimeImmutable() + { + return new DateTimeImmutable($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); + } + + /** + * @alias toDateTime + * + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDate()); + * ``` + * + * @return DateTime + */ + public function toDate() + { + return $this->toDateTime(); + } + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|EDD\Vendor\Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function toPeriod($end = null, $interval = null, $unit = null) + { + if ($unit) { + $interval = CarbonInterval::make("$interval ".static::pluralUnit($unit)); + } + + $period = ($this->isMutable() ? new CarbonPeriod() : new CarbonPeriodImmutable()) + ->setDateClass(static::class) + ->setStartDate($this); + + if ($interval) { + $period = $period->setDateInterval($interval); + } + + if (\is_int($end) || (\is_string($end) && ctype_digit($end))) { + $period = $period->setRecurrences($end); + } elseif ($end) { + $period = $period->setEndDate($end); + } + + return $period; + } + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|EDD\Vendor\Carbon|CarbonImmutable|null $end period end date + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function range($end = null, $interval = null, $unit = null) + { + return $this->toPeriod($end, $interval, $unit); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Creator.php b/libraries/Carbon/src/Carbon/Traits/Creator.php new file mode 100644 index 00000000000..cc0237d7364 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Creator.php @@ -0,0 +1,977 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Carbon; +use EDD\Vendor\Carbon\CarbonImmutable; +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\Exceptions\InvalidDateException; +use EDD\Vendor\Carbon\Exceptions\InvalidFormatException; +use EDD\Vendor\Carbon\Exceptions\OutOfRangeException; +use EDD\Vendor\Carbon\Translator; +use Closure; +use DateMalformedStringException; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use Exception; +use ReturnTypeWillChange; + +/** + * Trait Creator. + * + * Static creators. + * + * Depends on the following methods: + * + * @method static EDD\Vendor\Carbon|CarbonImmutable getTestNow() + */ +trait Creator +{ + use ObjectInitialisation; + + /** + * The errors that can occur. + * + * @var array + */ + protected static $lastErrors; + + /** + * Create a new EDD\Vendor\Carbon instance. + * + * Please see the testing aids section (specifically static::setTestNow()) + * for more on the possibility of this constructor returning a test instance. + * + * @param DateTimeInterface|string|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + */ + public function __construct($time = null, $tz = null) + { + if ($time instanceof DateTimeInterface) { + $time = $this->constructTimezoneFromDateTime($time, $tz)->format('Y-m-d H:i:s.u'); + } + + if (is_numeric($time) && (!\is_string($time) || !preg_match('/^\d{1,14}$/', $time))) { + $time = static::createFromTimestampUTC($time)->format('Y-m-d\TH:i:s.uP'); + } + + // If the class has a test now set and we are trying to create a now() + // instance then override as required + $isNow = empty($time) || $time === 'now'; + + if (method_exists(static::class, 'hasTestNow') && + method_exists(static::class, 'getTestNow') && + static::hasTestNow() && + ($isNow || static::hasRelativeKeywords($time)) + ) { + static::mockConstructorParameters($time, $tz); + } + + // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 + if (!str_contains((string) .1, '.')) { + $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore + setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore + } + + try { + parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null); + } catch (Exception $exception) { + throw new InvalidFormatException($exception->getMessage(), 0, $exception); + } + + $this->constructedObjectId = spl_object_hash($this); + + if (isset($locale)) { + setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore + } + + self::setLastErrors(parent::getLastErrors()); + } + + /** + * Get timezone from a datetime instance. + * + * @param DateTimeInterface $date + * @param DateTimeZone|string|null $tz + * + * @return DateTimeInterface + */ + private function constructTimezoneFromDateTime(DateTimeInterface $date, &$tz) + { + if ($tz !== null) { + $safeTz = static::safeCreateDateTimeZone($tz); + + if ($safeTz) { + return ($date instanceof DateTimeImmutable ? $date : clone $date)->setTimezone($safeTz); + } + + return $date; + } + + $tz = $date->getTimezone(); + + return $date; + } + + /** + * Update constructedObjectId on cloned. + */ + public function __clone() + { + $this->constructedObjectId = spl_object_hash($this); + } + + /** + * Create a EDD\Vendor\Carbon instance from a DateTime one. + * + * @param DateTimeInterface $date + * + * @return static + */ + public static function instance($date) + { + if ($date instanceof static) { + return clone $date; + } + + static::expectDateTime($date); + + $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); + + if ($date instanceof CarbonInterface) { + $settings = $date->getSettings(); + + if (!$date->hasLocalTranslator()) { + unset($settings['locale']); + } + + $instance->settings($settings); + } + + return $instance; + } + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function rawParse($time = null, $tz = null) + { + if ($time instanceof DateTimeInterface) { + return static::instance($time); + } + + try { + return new static($time, $tz); + } catch (Exception $exception) { + // @codeCoverageIgnoreStart + try { + $date = @static::now($tz)->change($time); + } catch (DateMalformedStringException $ignoredException) { + $date = null; + } + // @codeCoverageIgnoreEnd + + if (!$date) { + throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception); + } + + return $date; + } + } + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parse($time = null, $tz = null) + { + $function = static::$parseFunction; + + if (!$function) { + return static::rawParse($time, $tz); + } + + if (\is_string($function) && method_exists(static::class, $function)) { + $function = [static::class, $function]; + } + + return $function(...\func_get_args()); + } + + /** + * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * + * @param string $time date/time string in the given language (may also contain English). + * @param string|null $locale if locale is null or not specified, current global locale will be + * used instead. + * @param DateTimeZone|string|null $tz optional timezone for the new instance. + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parseFromLocale($time, $locale = null, $tz = null) + { + return static::rawParse(static::translateTimeString($time, $locale, 'en'), $tz); + } + + /** + * Get a EDD\Vendor\Carbon instance for the current date and time. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function now($tz = null) + { + return new static(null, $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance for today. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function today($tz = null) + { + return static::rawParse('today', $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance for tomorrow. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function tomorrow($tz = null) + { + return static::rawParse('tomorrow', $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance for yesterday. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function yesterday($tz = null) + { + return static::rawParse('yesterday', $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance for the greatest supported date. + * + * @return static + */ + public static function maxValue() + { + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore + } + + // 64 bit + return static::create(9999, 12, 31, 23, 59, 59); + } + + /** + * Create a EDD\Vendor\Carbon instance for the lowest supported date. + * + * @return static + */ + public static function minValue() + { + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore + } + + // 64 bit + return static::create(1, 1, 1, 0, 0, 0); + } + + private static function assertBetween($unit, $value, $min, $max) + { + if (static::isStrictModeEnabled() && ($value < $min || $value > $max)) { + throw new OutOfRangeException($unit, $min, $max, $value); + } + } + + private static function createNowInstance($tz) + { + if (!static::hasTestNow()) { + return static::now($tz); + } + + $now = static::getTestNow(); + + if ($now instanceof Closure) { + return $now(static::now($tz)); + } + + return $now->avoidMutation()->tz($tz); + } + + /** + * Create a new EDD\Vendor\Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * @param DateTimeInterface|int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) + { + if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { + return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); + } + + $defaults = null; + $getDefault = function ($unit) use ($tz, &$defaults) { + if ($defaults === null) { + $now = self::createNowInstance($tz); + + $defaults = array_combine([ + 'year', + 'month', + 'day', + 'hour', + 'minute', + 'second', + ], explode('-', $now->rawFormat('Y-n-j-G-i-s.u'))); + } + + return $defaults[$unit]; + }; + + $year = $year ?? $getDefault('year'); + $month = $month ?? $getDefault('month'); + $day = $day ?? $getDefault('day'); + $hour = $hour ?? $getDefault('hour'); + $minute = $minute ?? $getDefault('minute'); + $second = (float) ($second ?? $getDefault('second')); + + self::assertBetween('month', $month, 0, 99); + self::assertBetween('day', $day, 0, 99); + self::assertBetween('hour', $hour, 0, 99); + self::assertBetween('minute', $minute, 0, 99); + self::assertBetween('second', $second, 0, 99); + + $fixYear = null; + + if ($year < 0) { + $fixYear = $year; + $year = 0; + } elseif ($year > 9999) { + $fixYear = $year - 9999; + $year = 9999; + } + + $second = ($second < 10 ? '0' : '').number_format($second, 6); + $instance = static::rawCreateFromFormat('!Y-n-j G:i:s.u', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); + + if ($fixYear !== null) { + $instance = $instance->addYears($fixYear); + } + + return $instance; + } + + /** + * Create a new safe EDD\Vendor\Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidDateException + * + * @return static|false + */ + public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) + { + $fields = static::getRangesByUnit(); + + foreach ($fields as $field => $range) { + if ($$field !== null && (!\is_int($$field) || $$field < $range[0] || $$field > $range[1])) { + if (static::isStrictModeEnabled()) { + throw new InvalidDateException($field, $$field); + } + + return false; + } + } + + $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); + + foreach (array_reverse($fields) as $field => $range) { + if ($$field !== null && (!\is_int($$field) || $$field !== $instance->$field)) { + if (static::isStrictModeEnabled()) { + throw new InvalidDateException($field, $$field); + } + + return false; + } + } + + return $instance; + } + + /** + * Create a new EDD\Vendor\Carbon instance from a specific date and time using strict validation. + * + * @see create() + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self + { + $initialStrictMode = static::isStrictModeEnabled(); + static::useStrictMode(true); + + try { + $date = static::create($year, $month, $day, $hour, $minute, $second, $tz); + } finally { + static::useStrictMode($initialStrictMode); + } + + return $date; + } + + /** + * Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to now. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromDate($year = null, $month = null, $day = null, $tz = null) + { + return static::create($year, $month, $day, null, null, null, $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance from just a date. The time portion is set to midnight. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) + { + return static::create($year, $month, $day, 0, 0, 0, $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance from just a time. The date portion is set to today. + * + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) + { + return static::create(null, null, null, $hour, $minute, $second, $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance from a time string. The date portion is set to today. + * + * @param string $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTimeString($time, $tz = null) + { + return static::today($tz)->setTimeFromTimeString($time); + } + + /** + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $originalTz + * + * @return DateTimeInterface|false + */ + private static function createFromFormatAndTimezone($format, $time, $originalTz) + { + // Work-around for https://bugs.php.net/bug.php?id=75577 + // @codeCoverageIgnoreStart + if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { + $format = str_replace('.v', '.u', $format); + } + // @codeCoverageIgnoreEnd + + if ($originalTz === null) { + return parent::createFromFormat($format, (string) $time); + } + + $tz = \is_int($originalTz) + ? @timezone_name_from_abbr('', (int) ($originalTz * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE), 1) + : $originalTz; + + $tz = static::safeCreateDateTimeZone($tz, $originalTz); + + if ($tz === false) { + return false; + } + + return parent::createFromFormat($format, (string) $time, $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function rawCreateFromFormat($format, $time, $tz = null) + { + // Work-around for https://bugs.php.net/bug.php?id=80141 + $format = preg_replace('/(?getTimezone(); + } + + $mock = $mock->copy(); + + // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. + if (!preg_match("/{$nonEscaped}[!|]/", $format)) { + if (preg_match('/[HhGgisvuB]/', $format)) { + $mock = $mock->setTime(0, 0); + } + + $format = static::MOCK_DATETIME_FORMAT.' '.$format; + $time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time; + } + + // Regenerate date from the modified format to base result on the mocked instance instead of now. + $date = self::createFromFormatAndTimezone($format, $time, $tz); + } + + if ($date instanceof DateTimeInterface) { + $instance = static::instance($date); + $instance::setLastErrors($lastErrors); + + return $instance; + } + + if (static::isStrictModeEnabled()) { + throw new InvalidFormatException(implode(PHP_EOL, $lastErrors['errors'])); + } + + return false; + } + + /** + * Create a EDD\Vendor\Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + #[ReturnTypeWillChange] + public static function createFromFormat($format, $time, $tz = null) + { + $function = static::$createFromFormatFunction; + + if (!$function) { + return static::rawCreateFromFormat($format, $time, $tz); + } + + if (\is_string($function) && method_exists(static::class, $function)) { + $function = [static::class, $function]; + } + + return $function(...\func_get_args()); + } + + /** + * Create a EDD\Vendor\Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz optional timezone + * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) + { + $format = preg_replace_callback('/(? static::getTranslationMessageWith($translator, 'formats.LT', $locale, 'h:mm A'), + 'LTS' => static::getTranslationMessageWith($translator, 'formats.LTS', $locale, 'h:mm:ss A'), + 'L' => static::getTranslationMessageWith($translator, 'formats.L', $locale, 'MM/DD/YYYY'), + 'LL' => static::getTranslationMessageWith($translator, 'formats.LL', $locale, 'MMMM D, YYYY'), + 'LLL' => static::getTranslationMessageWith($translator, 'formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), + 'LLLL' => static::getTranslationMessageWith($translator, 'formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), + ]; + } + + return $formats[$code] ?? preg_replace_callback( + '/MMMM|MM|DD|dddd/', + function ($code) { + return mb_substr($code[0], 1); + }, + $formats[strtoupper($code)] ?? '' + ); + }, $format); + + $format = preg_replace_callback('/(? 'd', + 'OM' => 'M', + 'OY' => 'Y', + 'OH' => 'G', + 'Oh' => 'g', + 'Om' => 'i', + 'Os' => 's', + 'D' => 'd', + 'DD' => 'd', + 'Do' => 'd', + 'd' => '!', + 'dd' => '!', + 'ddd' => 'D', + 'dddd' => 'D', + 'DDD' => 'z', + 'DDDD' => 'z', + 'DDDo' => 'z', + 'e' => '!', + 'E' => '!', + 'H' => 'G', + 'HH' => 'H', + 'h' => 'g', + 'hh' => 'h', + 'k' => 'G', + 'kk' => 'G', + 'hmm' => 'gi', + 'hmmss' => 'gis', + 'Hmm' => 'Gi', + 'Hmmss' => 'Gis', + 'm' => 'i', + 'mm' => 'i', + 'a' => 'a', + 'A' => 'a', + 's' => 's', + 'ss' => 's', + 'S' => '*', + 'SS' => '*', + 'SSS' => '*', + 'SSSS' => '*', + 'SSSSS' => '*', + 'SSSSSS' => 'u', + 'SSSSSSS' => 'u*', + 'SSSSSSSS' => 'u*', + 'SSSSSSSSS' => 'u*', + 'M' => 'm', + 'MM' => 'm', + 'MMM' => 'M', + 'MMMM' => 'M', + 'Mo' => 'm', + 'Q' => '!', + 'Qo' => '!', + 'G' => '!', + 'GG' => '!', + 'GGG' => '!', + 'GGGG' => '!', + 'GGGGG' => '!', + 'g' => '!', + 'gg' => '!', + 'ggg' => '!', + 'gggg' => '!', + 'ggggg' => '!', + 'W' => '!', + 'WW' => '!', + 'Wo' => '!', + 'w' => '!', + 'ww' => '!', + 'wo' => '!', + 'x' => 'U???', + 'X' => 'U', + 'Y' => 'Y', + 'YY' => 'y', + 'YYYY' => 'Y', + 'YYYYY' => 'Y', + 'YYYYYY' => 'Y', + 'z' => 'e', + 'zz' => 'e', + 'Z' => 'e', + 'ZZ' => 'e', + ]; + } + + $format = $replacements[$code] ?? '?'; + + if ($format === '!') { + throw new InvalidFormatException("Format $code not supported for creation."); + } + + return $format; + }, $format); + + return static::rawCreateFromFormat($format, $time, $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance from a specific format and a string in a given language. + * + * @param string $format Datetime format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleFormat($format, $locale, $time, $tz = null) + { + $format = preg_replace_callback( + '/(?:\\\\[a-zA-Z]|[bfkqCEJKQRV]){2,}/', + static function (array $match) use ($locale): string { + $word = str_replace('\\', '', $match[0]); + $translatedWord = static::translateTimeString($word, $locale, 'en'); + + return $word === $translatedWord + ? $match[0] + : preg_replace('/[a-zA-Z]/', '\\\\$0', $translatedWord); + }, + $format + ); + + return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz); + } + + /** + * Create a EDD\Vendor\Carbon instance from a specific ISO format and a string in a given language. + * + * @param string $format Datetime ISO format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null) + { + $time = static::translateTimeString($time, $locale, 'en', CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS | CarbonInterface::TRANSLATE_MERIDIEM); + + return static::createFromIsoFormat($format, $time, $tz, $locale); + } + + /** + * Make a EDD\Vendor\Carbon instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed $var + * + * @throws InvalidFormatException + * + * @return static|null + */ + public static function make($var) + { + if ($var instanceof DateTimeInterface) { + return static::instance($var); + } + + $date = null; + + if (\is_string($var)) { + $var = trim($var); + + if (!preg_match('/^P[\dT]/', $var) && + !preg_match('/^R\d/', $var) && + preg_match('/[a-z\d]/i', $var) + ) { + $date = static::parse($var); + } + } + + return $date; + } + + /** + * Set last errors. + * + * @param array|bool $lastErrors + * + * @return void + */ + private static function setLastErrors($lastErrors) + { + if (\is_array($lastErrors) || $lastErrors === false) { + static::$lastErrors = \is_array($lastErrors) ? $lastErrors : [ + 'warning_count' => 0, + 'warnings' => [], + 'error_count' => 0, + 'errors' => [], + ]; + } + } + + /** + * {@inheritdoc} + * + * @return array + */ + #[ReturnTypeWillChange] + public static function getLastErrors() + { + return static::$lastErrors; + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Date.php b/libraries/Carbon/src/Carbon/Traits/Date.php new file mode 100644 index 00000000000..d893f27b4d6 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Date.php @@ -0,0 +1,2747 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use BadMethodCallException; +use EDD\Vendor\Carbon\Carbon; +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\CarbonPeriod; +use EDD\Vendor\Carbon\CarbonTimeZone; +use EDD\Vendor\Carbon\Exceptions\BadComparisonUnitException; +use EDD\Vendor\Carbon\Exceptions\ImmutableException; +use EDD\Vendor\Carbon\Exceptions\InvalidTimeZoneException; +use EDD\Vendor\Carbon\Exceptions\InvalidTypeException; +use EDD\Vendor\Carbon\Exceptions\UnknownGetterException; +use EDD\Vendor\Carbon\Exceptions\UnknownMethodException; +use EDD\Vendor\Carbon\Exceptions\UnknownSetterException; +use EDD\Vendor\Carbon\Exceptions\UnknownUnitException; +use Closure; +use DateInterval; +use DatePeriod; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use InvalidArgumentException; +use ReflectionException; +use ReturnTypeWillChange; +use Throwable; + +/** + * A simple API extension for DateTime. + * + * @mixin DeprecatedProperties + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(EDD\Vendor\Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method CarbonInterface years(int $value) Set current instance year to the given value. + * @method CarbonInterface year(int $value) Set current instance year to the given value. + * @method CarbonInterface setYears(int $value) Set current instance year to the given value. + * @method CarbonInterface setYear(int $value) Set current instance year to the given value. + * @method CarbonInterface months(int $value) Set current instance month to the given value. + * @method CarbonInterface month(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. + * @method CarbonInterface days(int $value) Set current instance day to the given value. + * @method CarbonInterface day(int $value) Set current instance day to the given value. + * @method CarbonInterface setDays(int $value) Set current instance day to the given value. + * @method CarbonInterface setDay(int $value) Set current instance day to the given value. + * @method CarbonInterface hours(int $value) Set current instance hour to the given value. + * @method CarbonInterface hour(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. + * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface minute(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. + * @method CarbonInterface seconds(int $value) Set current instance second to the given value. + * @method CarbonInterface second(int $value) Set current instance second to the given value. + * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. + * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. + * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addYear() Add one year to the instance (using date interval). + * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subYear() Sub one year to the instance (using date interval). + * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMonth() Add one month to the instance (using date interval). + * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). + * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDay() Add one day to the instance (using date interval). + * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDay() Sub one day to the instance (using date interval). + * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addHour() Add one hour to the instance (using date interval). + * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). + * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). + * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). + * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addSecond() Add one second to the instance (using date interval). + * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). + * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). + * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). + * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addCentury() Add one century to the instance (using date interval). + * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). + * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). + * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). + * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). + * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). + * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeek() Add one week to the instance (using date interval). + * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). + * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). + * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). + * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). + * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each second or every X seconds if a factor is given. + * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). + * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each minute or every X minutes if a factor is given. + * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). + * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each hour or every X hours if a factor is given. + * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). + * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each day or every X days if a factor is given. + * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). + * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each week or every X weeks if a factor is given. + * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). + * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each month or every X months if a factor is given. + * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). + * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each quarter or every X quarters if a factor is given. + * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). + * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each year or every X years if a factor is given. + * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). + * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each decade or every X decades if a factor is given. + * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). + * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each century or every X centuries if a factor is given. + * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). + * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or EDD\Vendor\Carbon instance) for each millennium or every X millennia if a factor is given. + * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * + * + */ +trait Date +{ + use Boundaries; + use Comparison; + use Converter; + use Creator; + use Difference; + use Macro; + use MagicParameter; + use Modifiers; + use Mutability; + use ObjectInitialisation; + use Options; + use Rounding; + use Serialization; + use Test; + use Timestamp; + use Units; + use Week; + + /** + * Names of days of the week. + * + * @var array + */ + protected static $days = [ + // @call isDayOfWeek + CarbonInterface::SUNDAY => 'Sunday', + // @call isDayOfWeek + CarbonInterface::MONDAY => 'Monday', + // @call isDayOfWeek + CarbonInterface::TUESDAY => 'Tuesday', + // @call isDayOfWeek + CarbonInterface::WEDNESDAY => 'Wednesday', + // @call isDayOfWeek + CarbonInterface::THURSDAY => 'Thursday', + // @call isDayOfWeek + CarbonInterface::FRIDAY => 'Friday', + // @call isDayOfWeek + CarbonInterface::SATURDAY => 'Saturday', + ]; + + /** + * Will UTF8 encoding be used to print localized date/time ? + * + * @var bool + */ + protected static $utf8 = false; + + /** + * List of unit and magic methods associated as doc-comments. + * + * @var array + */ + protected static $units = [ + // @call setUnit + // @call addUnit + 'year', + // @call setUnit + // @call addUnit + 'month', + // @call setUnit + // @call addUnit + 'day', + // @call setUnit + // @call addUnit + 'hour', + // @call setUnit + // @call addUnit + 'minute', + // @call setUnit + // @call addUnit + 'second', + // @call setUnit + // @call addUnit + 'milli', + // @call setUnit + // @call addUnit + 'millisecond', + // @call setUnit + // @call addUnit + 'micro', + // @call setUnit + // @call addUnit + 'microsecond', + ]; + + /** + * Creates a DateTimeZone from a string, DateTimeZone or integer offset. + * + * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. + * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. + * + * @throws InvalidTimeZoneException + * + * @return CarbonTimeZone|false + */ + protected static function safeCreateDateTimeZone($object, $objectDump = null) + { + return CarbonTimeZone::instance($object, $objectDump); + } + + /** + * Get the TimeZone associated with the EDD\Vendor\Carbon instance (as CarbonTimeZone). + * + * @return CarbonTimeZone + * + * @link https://php.net/manual/en/datetime.gettimezone.php + */ + #[ReturnTypeWillChange] + public function getTimezone() + { + return CarbonTimeZone::instance(parent::getTimezone()); + } + + /** + * List of minimum and maximums for each unit. + * + * @param int $daysInMonth + * + * @return array + */ + protected static function getRangesByUnit(int $daysInMonth = 31): array + { + return [ + // @call roundUnit + 'year' => [1, 9999], + // @call roundUnit + 'month' => [1, static::MONTHS_PER_YEAR], + // @call roundUnit + 'day' => [1, $daysInMonth], + // @call roundUnit + 'hour' => [0, static::HOURS_PER_DAY - 1], + // @call roundUnit + 'minute' => [0, static::MINUTES_PER_HOUR - 1], + // @call roundUnit + 'second' => [0, static::SECONDS_PER_MINUTE - 1], + ]; + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + return clone $this; + } + + /** + * @alias copy + * + * Get a copy of the instance. + * + * @return static + */ + public function clone() + { + return clone $this; + } + + /** + * Clone the current instance if it's mutable. + * + * This method is convenient to ensure you don't mutate the initial object + * but avoid to make a useless copy of it if it's already immutable. + * + * @return static + */ + public function avoidMutation(): self + { + if ($this instanceof DateTimeImmutable) { + return $this; + } + + return clone $this; + } + + /** + * Returns a present instance in the same timezone. + * + * @return static + */ + public function nowWithSameTz() + { + return static::now($this->getTimezone()); + } + + /** + * Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface. + * + * @param mixed $date + * @param string|array $other + * + * @throws InvalidTypeException + */ + protected static function expectDateTime($date, $other = []) + { + $message = 'Expected '; + foreach ((array) $other as $expect) { + $message .= "$expect, "; + } + + if (!$date instanceof DateTime && !$date instanceof DateTimeInterface) { + throw new InvalidTypeException( + $message.'DateTime or DateTimeInterface, '. + (\is_object($date) ? \get_class($date) : \gettype($date)).' given' + ); + } + } + + /** + * Return the EDD\Vendor\Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param EDD\Vendor\Carbon|DateTimeInterface|string|null $date + * + * @return static + */ + protected function resolveCarbon($date = null) + { + if (!$date) { + return $this->nowWithSameTz(); + } + + if (\is_string($date)) { + return static::parse($date, $this->getTimezone()); + } + + static::expectDateTime($date, ['null', 'string']); + + return $date instanceof self ? $date : static::instance($date); + } + + /** + * Return the EDD\Vendor\Carbon instance passed through, a now instance in UTC + * if null given or parse the input if string given (using current timezone + * then switching to UTC). + * + * @param EDD\Vendor\Carbon|DateTimeInterface|string|null $date + * + * @return static + */ + protected function resolveUTC($date = null): self + { + if (!$date) { + return static::now('UTC'); + } + + if (\is_string($date)) { + return static::parse($date, $this->getTimezone())->utc(); + } + + static::expectDateTime($date, ['null', 'string']); + + return $date instanceof self ? $date : static::instance($date)->utc(); + } + + /** + * Return the EDD\Vendor\Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param EDD\Vendor\Carbon|\EDD\Vendor\Carbon\CarbonPeriod|\EDD\Vendor\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date + * + * @return static + */ + public function carbonize($date = null) + { + if ($date instanceof DateInterval) { + return $this->avoidMutation()->add($date); + } + + if ($date instanceof DatePeriod || $date instanceof CarbonPeriod) { + $date = $date->getStartDate(); + } + + return $this->resolveCarbon($date); + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// GETTERS AND SETTERS ///////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get a part of the EDD\Vendor\Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * Get a part of the EDD\Vendor\Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function get($name) + { + static $formats = [ + // @property int + 'year' => 'Y', + // @property int + 'yearIso' => 'o', + // @property int + // @call isSameUnit + 'month' => 'n', + // @property int + 'day' => 'j', + // @property int + 'hour' => 'G', + // @property int + 'minute' => 'i', + // @property int + 'second' => 's', + // @property int + 'micro' => 'u', + // @property int + 'microsecond' => 'u', + // @property-read int 0 (for Sunday) through 6 (for Saturday) + 'dayOfWeek' => 'w', + // @property-read int 1 (for Monday) through 7 (for Sunday) + 'dayOfWeekIso' => 'N', + // @property-read int ISO-8601 week number of year, weeks starting on Monday + 'weekOfYear' => 'W', + // @property-read int number of days in the given month + 'daysInMonth' => 't', + // @property int|float|string seconds since the Unix Epoch + 'timestamp' => 'U', + // @property-read string "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + 'latinMeridiem' => 'a', + // @property-read string "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + 'latinUpperMeridiem' => 'A', + // @property string the day of week in English + 'englishDayOfWeek' => 'l', + // @property string the abbreviated day of week in English + 'shortEnglishDayOfWeek' => 'D', + // @property string the month in English + 'englishMonth' => 'F', + // @property string the abbreviated month in English + 'shortEnglishMonth' => 'M', + // @property string the day of week in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('MMM') instead. + // since: 2.55.0 + 'localeDayOfWeek' => '%A', + // @property string the abbreviated day of week in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('dddd') instead. + // since: 2.55.0 + 'shortLocaleDayOfWeek' => '%a', + // @property string the month in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('ddd') instead. + // since: 2.55.0 + 'localeMonth' => '%B', + // @property string the abbreviated month in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('MMMM') instead. + // since: 2.55.0 + 'shortLocaleMonth' => '%b', + // @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + 'timezoneAbbreviatedName' => 'T', + // @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + 'tzAbbrName' => 'T', + ]; + + switch (true) { + case isset($formats[$name]): + $format = $formats[$name]; + $method = str_starts_with($format, '%') ? 'formatLocalized' : 'rawFormat'; + $value = $this->$method($format); + + return is_numeric($value) ? (int) $value : $value; + + // @property-read string long name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + case $name === 'dayName': + return $this->getTranslatedDayName(); + // @property-read string short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + case $name === 'shortDayName': + return $this->getTranslatedShortDayName(); + // @property-read string very short name of weekday translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + case $name === 'minDayName': + return $this->getTranslatedMinDayName(); + // @property-read string long name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + case $name === 'monthName': + return $this->getTranslatedMonthName(); + // @property-read string short name of month translated according to EDD\Vendor\Carbon locale, in english if no translation available for current language + case $name === 'shortMonthName': + return $this->getTranslatedShortMonthName(); + // @property-read string lowercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + case $name === 'meridiem': + return $this->meridiem(true); + // @property-read string uppercase meridiem mark translated according to EDD\Vendor\Carbon locale, in latin if no translation available for current language + case $name === 'upperMeridiem': + return $this->meridiem(); + // @property-read int current hour from 1 to 24 + case $name === 'noZeroHour': + return $this->hour ?: 24; + // @property int + case $name === 'milliseconds': + // @property int + case $name === 'millisecond': + // @property int + case $name === 'milli': + return (int) floor(((int) $this->rawFormat('u')) / 1000); + + // @property int 1 through 53 + case $name === 'week': + return (int) $this->week(); + + // @property int 1 through 53 + case $name === 'isoWeek': + return (int) $this->isoWeek(); + + // @property int year according to week format + case $name === 'weekYear': + return (int) $this->weekYear(); + + // @property int year according to ISO week format + case $name === 'isoWeekYear': + return (int) $this->isoWeekYear(); + + // @property-read int 51 through 53 + case $name === 'weeksInYear': + return $this->weeksInYear(); + + // @property-read int 51 through 53 + case $name === 'isoWeeksInYear': + return $this->isoWeeksInYear(); + + // @property-read int 1 through 5 + case $name === 'weekOfMonth': + return (int) ceil($this->day / static::DAYS_PER_WEEK); + + // @property-read int 1 through 5 + case $name === 'weekNumberInMonth': + return (int) ceil(($this->day + $this->avoidMutation()->startOfMonth()->dayOfWeekIso - 1) / static::DAYS_PER_WEEK); + + // @property-read int 0 through 6 + case $name === 'firstWeekDay': + return $this->localTranslator ? ($this->getTranslationMessage('first_day_of_week') ?? 0) : static::getWeekStartsAt(); + + // @property-read int 0 through 6 + case $name === 'lastWeekDay': + return $this->localTranslator ? (($this->getTranslationMessage('first_day_of_week') ?? 0) + static::DAYS_PER_WEEK - 1) % static::DAYS_PER_WEEK : static::getWeekEndsAt(); + + // @property int 1 through 366 + case $name === 'dayOfYear': + return 1 + (int) ($this->rawFormat('z')); + + // @property-read int 365 or 366 + case $name === 'daysInYear': + return $this->isLeapYear() ? 366 : 365; + + // @property int does a diffInYears() with default parameters + case $name === 'age': + return $this->diffInYears(); + + // @property-read int the quarter of this instance, 1 - 4 + // @call isSameUnit + case $name === 'quarter': + return (int) ceil($this->month / static::MONTHS_PER_QUARTER); + + // @property-read int the decade of this instance + // @call isSameUnit + case $name === 'decade': + return (int) ceil($this->year / static::YEARS_PER_DECADE); + + // @property-read int the century of this instance + // @call isSameUnit + case $name === 'century': + $factor = 1; + $year = $this->year; + if ($year < 0) { + $year = -$year; + $factor = -1; + } + + return (int) ($factor * ceil($year / static::YEARS_PER_CENTURY)); + + // @property-read int the millennium of this instance + // @call isSameUnit + case $name === 'millennium': + $factor = 1; + $year = $this->year; + if ($year < 0) { + $year = -$year; + $factor = -1; + } + + return (int) ($factor * ceil($year / static::YEARS_PER_MILLENNIUM)); + + // @property int the timezone offset in seconds from UTC + case $name === 'offset': + return $this->getOffset(); + + // @property int the timezone offset in minutes from UTC + case $name === 'offsetMinutes': + return $this->getOffset() / static::SECONDS_PER_MINUTE; + + // @property int the timezone offset in hours from UTC + case $name === 'offsetHours': + return $this->getOffset() / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR; + + // @property-read bool daylight savings time indicator, true if DST, false otherwise + case $name === 'dst': + return $this->rawFormat('I') === '1'; + + // @property-read bool checks if the timezone is local, true if local, false otherwise + case $name === 'local': + return $this->getOffset() === $this->avoidMutation()->setTimezone(date_default_timezone_get())->getOffset(); + + // @property-read bool checks if the timezone is UTC, true if UTC, false otherwise + case $name === 'utc': + return $this->getOffset() === 0; + + // @property CarbonTimeZone $timezone the current timezone + // @property CarbonTimeZone $tz alias of $timezone + case $name === 'timezone' || $name === 'tz': + return CarbonTimeZone::instance($this->getTimezone()); + + // @property-read string $timezoneName the current timezone name + // @property-read string $tzName alias of $timezoneName + case $name === 'timezoneName' || $name === 'tzName': + return $this->getTimezone()->getName(); + + // @property-read string locale of the current instance + case $name === 'locale': + return $this->getTranslatorLocale(); + + default: + $macro = $this->getLocalMacro('get'.ucfirst($name)); + + if ($macro) { + return $this->executeCallableWithContext($macro); + } + + throw new UnknownGetterException($name); + } + } + + /** + * Check if an attribute exists on the object + * + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + try { + $this->__get($name); + } catch (UnknownGetterException | ReflectionException $e) { + return false; + } + + return true; + } + + /** + * Set a part of the EDD\Vendor\Carbon object + * + * @param string $name + * @param string|int|DateTimeZone $value + * + * @throws UnknownSetterException|ReflectionException + * + * @return void + */ + public function __set($name, $value) + { + if ($this->constructedObjectId === spl_object_hash($this)) { + $this->set($name, $value); + + return; + } + + $this->$name = $value; + } + + /** + * Set a part of the EDD\Vendor\Carbon object + * + * @param string|array $name + * @param string|int|DateTimeZone $value + * + * @throws ImmutableException|UnknownSetterException + * + * @return $this + */ + public function set($name, $value = null) + { + if ($this->isImmutable()) { + throw new ImmutableException(sprintf('%s class', static::class)); + } + + if (\is_array($name)) { + foreach ($name as $key => $value) { + $this->set($key, $value); + } + + return $this; + } + + switch ($name) { + case 'milliseconds': + case 'millisecond': + case 'milli': + case 'microseconds': + case 'microsecond': + case 'micro': + if (str_starts_with($name, 'milli')) { + $value *= 1000; + } + + while ($value < 0) { + $this->subSecond(); + $value += static::MICROSECONDS_PER_SECOND; + } + + while ($value >= static::MICROSECONDS_PER_SECOND) { + $this->addSecond(); + $value -= static::MICROSECONDS_PER_SECOND; + } + + $this->modify($this->rawFormat('H:i:s.').str_pad((string) round($value), 6, '0', STR_PAD_LEFT)); + + break; + + case 'year': + case 'month': + case 'day': + case 'hour': + case 'minute': + case 'second': + [$year, $month, $day, $hour, $minute, $second] = array_map('intval', explode('-', $this->rawFormat('Y-n-j-G-i-s'))); + $$name = $value; + $this->setDateTime($year, $month, $day, $hour, $minute, $second); + + break; + + case 'week': + $this->week($value); + + break; + + case 'isoWeek': + $this->isoWeek($value); + + break; + + case 'weekYear': + $this->weekYear($value); + + break; + + case 'isoWeekYear': + $this->isoWeekYear($value); + + break; + + case 'dayOfYear': + $this->addDays($value - $this->dayOfYear); + + break; + + case 'timestamp': + $this->setTimestamp($value); + + break; + + case 'offset': + $this->setTimezone(static::safeCreateDateTimeZone($value / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR)); + + break; + + case 'offsetMinutes': + $this->setTimezone(static::safeCreateDateTimeZone($value / static::MINUTES_PER_HOUR)); + + break; + + case 'offsetHours': + $this->setTimezone(static::safeCreateDateTimeZone($value)); + + break; + + case 'timezone': + case 'tz': + $this->setTimezone($value); + + break; + + default: + $macro = $this->getLocalMacro('set'.ucfirst($name)); + + if ($macro) { + $this->executeCallableWithContext($macro, $value); + + break; + } + + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new UnknownSetterException($name); + } + + $this->$name = $value; + } + + return $this; + } + + protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue) + { + $key = $baseKey.$keySuffix; + $standaloneKey = "{$key}_standalone"; + $baseTranslation = $this->getTranslationMessage($key); + + if ($baseTranslation instanceof Closure) { + return $baseTranslation($this, $context, $subKey) ?: $defaultValue; + } + + if ( + $this->getTranslationMessage("$standaloneKey.$subKey") && + (!$context || (($regExp = $this->getTranslationMessage("{$baseKey}_regexp")) && !preg_match($regExp, $context))) + ) { + $key = $standaloneKey; + } + + return $this->getTranslationMessage("$key.$subKey", null, $defaultValue); + } + + /** + * Get the translation of the current week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "", "_short" or "_min" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null) + { + return $this->getTranslatedFormByRegExp('weekdays', $keySuffix, $context, $this->dayOfWeek, $defaultValue ?: $this->englishDayOfWeek); + } + + /** + * Get the translation of the current short week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortDayName($context = null) + { + return $this->getTranslatedDayName($context, '_short', $this->shortEnglishDayOfWeek); + } + + /** + * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedMinDayName($context = null) + { + return $this->getTranslatedDayName($context, '_min', $this->shortEnglishDayOfWeek); + } + + /** + * Get the translation of the current month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "" or "_short" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null) + { + return $this->getTranslatedFormByRegExp('months', $keySuffix, $context, $this->month - 1, $defaultValue ?: $this->englishMonth); + } + + /** + * Get the translation of the current short month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortMonthName($context = null) + { + return $this->getTranslatedMonthName($context, '_short', $this->shortEnglishMonth); + } + + /** + * Get/set the day of year. + * + * @param int|null $value new value for day of year if using as setter. + * + * @return static|int + */ + public function dayOfYear($value = null) + { + $dayOfYear = $this->dayOfYear; + + return $value === null ? $dayOfYear : $this->addDays($value - $dayOfYear); + } + + /** + * Get/set the weekday from 0 (Sunday) to 6 (Saturday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function weekday($value = null) + { + if ($value === null) { + return $this->dayOfWeek; + } + + $firstDay = (int) ($this->getTranslationMessage('first_day_of_week') ?? 0); + $dayOfWeek = ($this->dayOfWeek + 7 - $firstDay) % 7; + + return $this->addDays((($value + 7 - $firstDay) % 7) - $dayOfWeek); + } + + /** + * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function isoWeekday($value = null) + { + $dayOfWeekIso = $this->dayOfWeekIso; + + return $value === null ? $dayOfWeekIso : $this->addDays($value - $dayOfWeekIso); + } + + /** + * Return the number of days since the start of the week (using the current locale or the first parameter + * if explicitly given). + * + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return int + */ + public function getDaysFromStartOfWeek(int $weekStartsAt = null): int + { + $firstDay = (int) ($weekStartsAt ?? $this->getTranslationMessage('first_day_of_week') ?? 0); + + return ($this->dayOfWeek + 7 - $firstDay) % 7; + } + + /** + * Set the day (keeping the current time) to the start of the week + the number of days passed as the first + * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. + * + * @param int $numberOfDays number of days to add after the start of the current week + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return static + */ + public function setDaysFromStartOfWeek(int $numberOfDays, int $weekStartsAt = null) + { + return $this->addDays($numberOfDays - $this->getDaysFromStartOfWeek($weekStartsAt)); + } + + /** + * Set any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value new value for the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function setUnitNoOverflow($valueUnit, $value, $overflowUnit) + { + try { + $original = $this->avoidMutation(); + /** @var static $date */ + $date = $this->$valueUnit($value); + $end = $original->avoidMutation()->endOf($overflowUnit); + $start = $original->avoidMutation()->startOf($overflowUnit); + if ($date < $start) { + $date = $date->setDateTimeFrom($start); + } elseif ($date > $end) { + $date = $date->setDateTimeFrom($end); + } + + return $date; + } catch (BadMethodCallException | ReflectionException $exception) { + throw new UnknownUnitException($valueUnit, 0, $exception); + } + } + + /** + * Add any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to add to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function addUnitNoOverflow($valueUnit, $value, $overflowUnit) + { + return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit + $value, $overflowUnit); + } + + /** + * Subtract any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to subtract to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function subUnitNoOverflow($valueUnit, $value, $overflowUnit) + { + return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit - $value, $overflowUnit); + } + + /** + * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. + * + * @param int|null $minuteOffset + * + * @return int|static + */ + public function utcOffset(int $minuteOffset = null) + { + if (\func_num_args() < 1) { + return $this->offsetMinutes; + } + + return $this->setTimezone(CarbonTimeZone::createFromMinuteOffset($minuteOffset)); + } + + /** + * Set the date with gregorian year, month and day numbers. + * + * @see https://php.net/manual/en/datetime.setdate.php + * + * @param int $year + * @param int $month + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setDate($year, $month, $day) + { + return parent::setDate((int) $year, (int) $month, (int) $day); + } + + /** + * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. + * + * @see https://php.net/manual/en/datetime.setisodate.php + * + * @param int $year + * @param int $week + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setISODate($year, $week, $day = 1) + { + return parent::setISODate((int) $year, (int) $week, (int) $day); + } + + /** + * Set the date and time all together. + * + * @param int $year + * @param int $month + * @param int $day + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0) + { + return $this->setDate($year, $month, $day)->setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); + } + + /** + * Resets the current time of the DateTime object to a different time. + * + * @see https://php.net/manual/en/datetime.settime.php + * + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTime($hour, $minute, $second = 0, $microseconds = 0) + { + return parent::setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); + } + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimestamp($unixTimestamp) + { + [$timestamp, $microseconds] = self::getIntegerAndDecimalParts($unixTimestamp); + + return parent::setTimestamp((int) $timestamp)->setMicroseconds((int) $microseconds); + } + + /** + * Set the time by time string. + * + * @param string $time + * + * @return static + */ + public function setTimeFromTimeString($time) + { + if (!str_contains($time, ':')) { + $time .= ':0'; + } + + return $this->modify($time); + } + + /** + * @alias setTimezone + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function timezone($value) + { + return $this->setTimezone($value); + } + + /** + * Set the timezone or returns the timezone name if no arguments passed. + * + * @param DateTimeZone|string $value + * + * @return static|string + */ + public function tz($value = null) + { + if (\func_num_args() < 1) { + return $this->tzName; + } + + return $this->setTimezone($value); + } + + /** + * Set the instance's timezone from a string or object. + * + * @param DateTimeZone|string $value + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimezone($value) + { + $tz = static::safeCreateDateTimeZone($value); + + if ($tz === false && !self::isStrictModeEnabled()) { + $tz = new CarbonTimeZone(); + } + + return parent::setTimezone($tz); + } + + /** + * Set the instance's timezone from a string or object and add/subtract the offset difference. + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function shiftTimezone($value) + { + $dateTimeString = $this->format('Y-m-d H:i:s.u'); + + return $this + ->setTimezone($value) + ->modify($dateTimeString); + } + + /** + * Set the instance's timezone to UTC. + * + * @return static + */ + public function utc() + { + return $this->setTimezone('UTC'); + } + + /** + * Set the year, month, and date for this instance to that of the passed instance. + * + * @param EDD\Vendor\Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setDateFrom($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->setDate($date->year, $date->month, $date->day); + } + + /** + * Set the hour, minute, second and microseconds for this instance to that of the passed instance. + * + * @param EDD\Vendor\Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setTimeFrom($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->setTime($date->hour, $date->minute, $date->second, $date->microsecond); + } + + /** + * Set the date and time for this instance to that of the passed instance. + * + * @param EDD\Vendor\Carbon|DateTimeInterface $date + * + * @return static + */ + public function setDateTimeFrom($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->modify($date->rawFormat('Y-m-d H:i:s.u')); + } + + /** + * Get the days of the week + * + * @return array + */ + public static function getDays() + { + return static::$days; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// WEEK SPECIAL DAYS ///////////////////////// + /////////////////////////////////////////////////////////////////// + + private static function getFirstDayOfWeek(): int + { + return (int) static::getTranslationMessageWith( + static::getTranslator(), + 'first_day_of_week' + ); + } + + /** + * Get the first day of week + * + * @return int + */ + public static function getWeekStartsAt() + { + if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { + return self::getFirstDayOfWeek(); + } + + return static::$weekStartsAt; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * + * Set the first day of week + * + * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekStartsAt($day) + { + static::$weekStartsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); + } + + /** + * Get the last day of week + * + * @return int + */ + public static function getWeekEndsAt() + { + if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { + return (int) (static::DAYS_PER_WEEK - 1 + self::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; + } + + return static::$weekEndsAt; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * + * Set the last day of week + * + * @param int|string $day week end day (or 'auto' to get the day before the first day of week + * from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekEndsAt($day) + { + static::$weekEndsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); + } + + /** + * Get weekend days + * + * @return array + */ + public static function getWeekendDays() + { + return static::$weekendDays; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * + * Set weekend days + * + * @param array $days + * + * @return void + */ + public static function setWeekendDays($days) + { + static::$weekendDays = $days; + } + + /** + * Determine if a time string will produce a relative date. + * + * @param string $time + * + * @return bool true if time match a relative date, false if absolute or invalid time string + */ + public static function hasRelativeKeywords($time) + { + if (!$time || strtotime($time) === false) { + return false; + } + + $date1 = new DateTime('2000-01-01T00:00:00Z'); + $date1->modify($time); + $date2 = new DateTime('2001-12-25T00:00:00Z'); + $date2->modify($time); + + return $date1 != $date2; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// STRING FORMATTING ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * + * Set if UTF8 will be used for localized date/time. + * + * @param bool $utf8 + */ + public static function setUtf8($utf8) + { + static::$utf8 = $utf8; + } + + /** + * Format the instance with the current locale. You can set the current + * locale using setlocale() https://php.net/setlocale. + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat() instead. + * Deprecated since 2.55.0 + * + * @param string $format + * + * @return string + */ + public function formatLocalized($format) + { + // Check for Windows to find and replace the %e modifier correctly. + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $format = preg_replace('#(?toDateTimeString()); + $formatted = ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) + ? strftime($format, $time) + : @strftime($format, $time); + + return static::$utf8 + ? ( + \function_exists('mb_convert_encoding') + ? mb_convert_encoding($formatted, 'UTF-8', mb_list_encodings()) + : utf8_encode($formatted) + ) + : $formatted; + } + + /** + * Returns list of locale formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getIsoFormats($locale = null) + { + return [ + 'LT' => $this->getTranslationMessage('formats.LT', $locale, 'h:mm A'), + 'LTS' => $this->getTranslationMessage('formats.LTS', $locale, 'h:mm:ss A'), + 'L' => $this->getTranslationMessage('formats.L', $locale, 'MM/DD/YYYY'), + 'LL' => $this->getTranslationMessage('formats.LL', $locale, 'MMMM D, YYYY'), + 'LLL' => $this->getTranslationMessage('formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), + 'LLLL' => $this->getTranslationMessage('formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), + 'l' => $this->getTranslationMessage('formats.l', $locale), + 'll' => $this->getTranslationMessage('formats.ll', $locale), + 'lll' => $this->getTranslationMessage('formats.lll', $locale), + 'llll' => $this->getTranslationMessage('formats.llll', $locale), + ]; + } + + /** + * Returns list of calendar formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getCalendarFormats($locale = null) + { + return [ + 'sameDay' => $this->getTranslationMessage('calendar.sameDay', $locale, '[Today at] LT'), + 'nextDay' => $this->getTranslationMessage('calendar.nextDay', $locale, '[Tomorrow at] LT'), + 'nextWeek' => $this->getTranslationMessage('calendar.nextWeek', $locale, 'dddd [at] LT'), + 'lastDay' => $this->getTranslationMessage('calendar.lastDay', $locale, '[Yesterday at] LT'), + 'lastWeek' => $this->getTranslationMessage('calendar.lastWeek', $locale, '[Last] dddd [at] LT'), + 'sameElse' => $this->getTranslationMessage('calendar.sameElse', $locale, 'L'), + ]; + } + + /** + * Returns list of locale units for ISO formatting. + * + * @return array + */ + public static function getIsoUnits() + { + static $units = null; + + if ($units === null) { + $units = [ + 'OD' => ['getAltNumber', ['day']], + 'OM' => ['getAltNumber', ['month']], + 'OY' => ['getAltNumber', ['year']], + 'OH' => ['getAltNumber', ['hour']], + 'Oh' => ['getAltNumber', ['h']], + 'Om' => ['getAltNumber', ['minute']], + 'Os' => ['getAltNumber', ['second']], + 'D' => 'day', + 'DD' => ['rawFormat', ['d']], + 'Do' => ['ordinal', ['day', 'D']], + 'd' => 'dayOfWeek', + 'dd' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedMinDayName($originalFormat); + }, + 'ddd' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedShortDayName($originalFormat); + }, + 'dddd' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedDayName($originalFormat); + }, + 'DDD' => 'dayOfYear', + 'DDDD' => ['getPaddedUnit', ['dayOfYear', 3]], + 'DDDo' => ['ordinal', ['dayOfYear', 'DDD']], + 'e' => ['weekday', []], + 'E' => 'dayOfWeekIso', + 'H' => ['rawFormat', ['G']], + 'HH' => ['rawFormat', ['H']], + 'h' => ['rawFormat', ['g']], + 'hh' => ['rawFormat', ['h']], + 'k' => 'noZeroHour', + 'kk' => ['getPaddedUnit', ['noZeroHour']], + 'hmm' => ['rawFormat', ['gi']], + 'hmmss' => ['rawFormat', ['gis']], + 'Hmm' => ['rawFormat', ['Gi']], + 'Hmmss' => ['rawFormat', ['Gis']], + 'm' => 'minute', + 'mm' => ['rawFormat', ['i']], + 'a' => 'meridiem', + 'A' => 'upperMeridiem', + 's' => 'second', + 'ss' => ['getPaddedUnit', ['second']], + 'S' => function (CarbonInterface $date) { + return (string) floor($date->micro / 100000); + }, + 'SS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 10000), 2, '0', STR_PAD_LEFT); + }, + 'SSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 1000), 3, '0', STR_PAD_LEFT); + }, + 'SSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 100), 4, '0', STR_PAD_LEFT); + }, + 'SSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 10), 5, '0', STR_PAD_LEFT); + }, + 'SSSSSS' => ['getPaddedUnit', ['micro', 6]], + 'SSSSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro * 10), 7, '0', STR_PAD_LEFT); + }, + 'SSSSSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro * 100), 8, '0', STR_PAD_LEFT); + }, + 'SSSSSSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro * 1000), 9, '0', STR_PAD_LEFT); + }, + 'M' => 'month', + 'MM' => ['rawFormat', ['m']], + 'MMM' => function (CarbonInterface $date, $originalFormat = null) { + $month = $date->getTranslatedShortMonthName($originalFormat); + $suffix = $date->getTranslationMessage('mmm_suffix'); + if ($suffix && $month !== $date->monthName) { + $month .= $suffix; + } + + return $month; + }, + 'MMMM' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedMonthName($originalFormat); + }, + 'Mo' => ['ordinal', ['month', 'M']], + 'Q' => 'quarter', + 'Qo' => ['ordinal', ['quarter', 'M']], + 'G' => 'isoWeekYear', + 'GG' => ['getPaddedUnit', ['isoWeekYear']], + 'GGG' => ['getPaddedUnit', ['isoWeekYear', 3]], + 'GGGG' => ['getPaddedUnit', ['isoWeekYear', 4]], + 'GGGGG' => ['getPaddedUnit', ['isoWeekYear', 5]], + 'g' => 'weekYear', + 'gg' => ['getPaddedUnit', ['weekYear']], + 'ggg' => ['getPaddedUnit', ['weekYear', 3]], + 'gggg' => ['getPaddedUnit', ['weekYear', 4]], + 'ggggg' => ['getPaddedUnit', ['weekYear', 5]], + 'W' => 'isoWeek', + 'WW' => ['getPaddedUnit', ['isoWeek']], + 'Wo' => ['ordinal', ['isoWeek', 'W']], + 'w' => 'week', + 'ww' => ['getPaddedUnit', ['week']], + 'wo' => ['ordinal', ['week', 'w']], + 'x' => ['valueOf', []], + 'X' => 'timestamp', + 'Y' => 'year', + 'YY' => ['rawFormat', ['y']], + 'YYYY' => ['getPaddedUnit', ['year', 4]], + 'YYYYY' => ['getPaddedUnit', ['year', 5]], + 'YYYYYY' => function (CarbonInterface $date) { + return ($date->year < 0 ? '' : '+').$date->getPaddedUnit('year', 6); + }, + 'z' => ['rawFormat', ['T']], + 'zz' => 'tzName', + 'Z' => ['getOffsetString', []], + 'ZZ' => ['getOffsetString', ['']], + ]; + } + + return $units; + } + + /** + * Returns a unit of the instance padded with 0 by default or any other string if specified. + * + * @param string $unit EDD\Vendor\Carbon unit name + * @param int $length Length of the output (2 by default) + * @param string $padString String to use for padding ("0" by default) + * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) + * + * @return string + */ + public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = STR_PAD_LEFT) + { + return ($this->$unit < 0 ? '-' : '').str_pad((string) abs($this->$unit), $length, $padString, $padType); + } + + /** + * Return a property with its ordinal. + * + * @param string $key + * @param string|null $period + * + * @return string + */ + public function ordinal(string $key, ?string $period = null): string + { + $number = $this->$key; + $result = $this->translate('ordinal', [ + ':number' => $number, + ':period' => (string) $period, + ]); + + return (string) ($result === 'ordinal' ? $number : $result); + } + + /** + * Return the meridiem of the current time in the current locale. + * + * @param bool $isLower if true, returns lowercase variant if available in the current locale. + * + * @return string + */ + public function meridiem(bool $isLower = false): string + { + $hour = $this->hour; + $index = $hour < 12 ? 0 : 1; + + if ($isLower) { + $key = 'meridiem.'.($index + 2); + $result = $this->translate($key); + + if ($result !== $key) { + return $result; + } + } + + $key = "meridiem.$index"; + $result = $this->translate($key); + if ($result === $key) { + $result = $this->translate('meridiem', [ + ':hour' => $this->hour, + ':minute' => $this->minute, + ':isLower' => $isLower, + ]); + + if ($result === 'meridiem') { + return $isLower ? $this->latinMeridiem : $this->latinUpperMeridiem; + } + } elseif ($isLower) { + $result = mb_strtolower($result); + } + + return $result; + } + + /** + * Returns the alternative number for a given date property if available in the current locale. + * + * @param string $key date property + * + * @return string + */ + public function getAltNumber(string $key): string + { + return $this->translateNumber(\strlen($key) > 1 ? $this->$key : $this->rawFormat('h')); + } + + /** + * Format in the current language using ISO replacement patterns. + * + * @param string $format + * @param string|null $originalFormat provide context if a chunk has been passed alone + * + * @return string + */ + public function isoFormat(string $format, ?string $originalFormat = null): string + { + $result = ''; + $length = mb_strlen($format); + $originalFormat = $originalFormat ?: $format; + $inEscaped = false; + $formats = null; + $units = null; + + for ($i = 0; $i < $length; $i++) { + $char = mb_substr($format, $i, 1); + + if ($char === '\\') { + $result .= mb_substr($format, ++$i, 1); + + continue; + } + + if ($char === '[' && !$inEscaped) { + $inEscaped = true; + + continue; + } + + if ($char === ']' && $inEscaped) { + $inEscaped = false; + + continue; + } + + if ($inEscaped) { + $result .= $char; + + continue; + } + + $input = mb_substr($format, $i); + + if (preg_match('/^(LTS|LT|l{1,4}|L{1,4})/', $input, $match)) { + if ($formats === null) { + $formats = $this->getIsoFormats(); + } + + $code = $match[0]; + $sequence = $formats[$code] ?? preg_replace_callback( + '/MMMM|MM|DD|dddd/', + function ($code) { + return mb_substr($code[0], 1); + }, + $formats[strtoupper($code)] ?? '' + ); + $rest = mb_substr($format, $i + mb_strlen($code)); + $format = mb_substr($format, 0, $i).$sequence.$rest; + $length = mb_strlen($format); + $input = $sequence.$rest; + } + + if (preg_match('/^'.CarbonInterface::ISO_FORMAT_REGEXP.'/', $input, $match)) { + $code = $match[0]; + + if ($units === null) { + $units = static::getIsoUnits(); + } + + $sequence = $units[$code] ?? ''; + + if ($sequence instanceof Closure) { + $sequence = $sequence($this, $originalFormat); + } elseif (\is_array($sequence)) { + try { + $sequence = $this->{$sequence[0]}(...$sequence[1]); + } catch (ReflectionException | InvalidArgumentException | BadMethodCallException $e) { + $sequence = ''; + } + } elseif (\is_string($sequence)) { + $sequence = $this->$sequence ?? $code; + } + + $format = mb_substr($format, 0, $i).$sequence.mb_substr($format, $i + mb_strlen($code)); + $i += mb_strlen((string) $sequence) - 1; + $length = mb_strlen($format); + $char = $sequence; + } + + $result .= $char; + } + + return $result; + } + + /** + * List of replacements from date() format to isoFormat(). + * + * @return array + */ + public static function getFormatsToIsoReplacements() + { + static $replacements = null; + + if ($replacements === null) { + $replacements = [ + 'd' => true, + 'D' => 'ddd', + 'j' => true, + 'l' => 'dddd', + 'N' => true, + 'S' => function ($date) { + $day = $date->rawFormat('j'); + + return str_replace((string) $day, '', $date->isoFormat('Do')); + }, + 'w' => true, + 'z' => true, + 'W' => true, + 'F' => 'MMMM', + 'm' => true, + 'M' => 'MMM', + 'n' => true, + 't' => true, + 'L' => true, + 'o' => true, + 'Y' => true, + 'y' => true, + 'a' => 'a', + 'A' => 'A', + 'B' => true, + 'g' => true, + 'G' => true, + 'h' => true, + 'H' => true, + 'i' => true, + 's' => true, + 'u' => true, + 'v' => true, + 'E' => true, + 'I' => true, + 'O' => true, + 'P' => true, + 'Z' => true, + 'c' => true, + 'r' => true, + 'U' => true, + 'T' => true, + ]; + } + + return $replacements; + } + + /** + * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) + * but translate words whenever possible (months, day names, etc.) using the current locale. + * + * @param string $format + * + * @return string + */ + public function translatedFormat(string $format): string + { + $replacements = static::getFormatsToIsoReplacements(); + $context = ''; + $isoFormat = ''; + $length = mb_strlen($format); + + for ($i = 0; $i < $length; $i++) { + $char = mb_substr($format, $i, 1); + + if ($char === '\\') { + $replacement = mb_substr($format, $i, 2); + $isoFormat .= $replacement; + $i++; + + continue; + } + + if (!isset($replacements[$char])) { + $replacement = preg_match('/^[A-Za-z]$/', $char) ? "\\$char" : $char; + $isoFormat .= $replacement; + $context .= $replacement; + + continue; + } + + $replacement = $replacements[$char]; + + if ($replacement === true) { + static $contextReplacements = null; + + if ($contextReplacements === null) { + $contextReplacements = [ + 'm' => 'MM', + 'd' => 'DD', + 't' => 'D', + 'j' => 'D', + 'N' => 'e', + 'w' => 'e', + 'n' => 'M', + 'o' => 'YYYY', + 'Y' => 'YYYY', + 'y' => 'YY', + 'g' => 'h', + 'G' => 'H', + 'h' => 'hh', + 'H' => 'HH', + 'i' => 'mm', + 's' => 'ss', + ]; + } + + $isoFormat .= '['.$this->rawFormat($char).']'; + $context .= $contextReplacements[$char] ?? ' '; + + continue; + } + + if ($replacement instanceof Closure) { + $replacement = '['.$replacement($this).']'; + $isoFormat .= $replacement; + $context .= $replacement; + + continue; + } + + $isoFormat .= $replacement; + $context .= $replacement; + } + + return $this->isoFormat($isoFormat, $context); + } + + /** + * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). + * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first + * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something + * like "-12:00". + * + * @param string $separator string to place between hours and minutes (":" by default) + * + * @return string + */ + public function getOffsetString($separator = ':') + { + $second = $this->getOffset(); + $symbol = $second < 0 ? '-' : '+'; + $minute = abs($second) / static::SECONDS_PER_MINUTE; + $hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); + $minute = str_pad((string) (((int) $minute) % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); + + return "$symbol$hour$separator$minute"; + } + + protected static function executeStaticCallable($macro, ...$parameters) + { + return static::bindMacroContext(null, function () use (&$macro, &$parameters) { + if ($macro instanceof Closure) { + $boundMacro = @Closure::bind($macro, null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + }); + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws BadMethodCallException + * + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + if (!static::hasMacro($method)) { + foreach (static::getGenericMacros() as $callback) { + try { + return static::executeStaticCallable($callback, $method, ...$parameters); + } catch (BadMethodCallException $exception) { + continue; + } + } + if (static::isStrictModeEnabled()) { + throw new UnknownMethodException(sprintf('%s::%s', static::class, $method)); + } + + return null; + } + + return static::executeStaticCallable(static::$globalMacros[$method], ...$parameters); + } + + /** + * Set specified unit to new given value. + * + * @param string $unit year, month, day, hour, minute, second or microsecond + * @param int $value new value for given unit + * + * @return static + */ + public function setUnit($unit, $value = null) + { + $unit = static::singularUnit($unit); + $dateUnits = ['year', 'month', 'day']; + if (\in_array($unit, $dateUnits)) { + return $this->setDate(...array_map(function ($name) use ($unit, $value) { + return (int) ($name === $unit ? $value : $this->$name); + }, $dateUnits)); + } + + $units = ['hour', 'minute', 'second', 'micro']; + if ($unit === 'millisecond' || $unit === 'milli') { + $value *= 1000; + $unit = 'micro'; + } elseif ($unit === 'microsecond') { + $unit = 'micro'; + } + + return $this->setTime(...array_map(function ($name) use ($unit, $value) { + return (int) ($name === $unit ? $value : $this->$name); + }, $units)); + } + + /** + * Returns standardized singular of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function singularUnit(string $unit): string + { + $unit = rtrim(mb_strtolower($unit), 's'); + + if ($unit === 'centurie') { + return 'century'; + } + + if ($unit === 'millennia') { + return 'millennium'; + } + + return $unit; + } + + /** + * Returns standardized plural of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function pluralUnit(string $unit): string + { + $unit = rtrim(strtolower($unit), 's'); + + if ($unit === 'century') { + return 'centuries'; + } + + if ($unit === 'millennium' || $unit === 'millennia') { + return 'millennia'; + } + + return "{$unit}s"; + } + + protected function executeCallable($macro, ...$parameters) + { + if ($macro instanceof Closure) { + $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + } + + protected function executeCallableWithContext($macro, ...$parameters) + { + return static::bindMacroContext($this, function () use (&$macro, &$parameters) { + return $this->executeCallable($macro, ...$parameters); + }); + } + + protected static function getGenericMacros() + { + foreach (static::$globalGenericMacros as $list) { + foreach ($list as $macro) { + yield $macro; + } + } + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable + * + * @return mixed + */ + public function __call($method, $parameters) + { + $diffSizes = [ + // @mode diffForHumans + 'short' => true, + // @mode diffForHumans + 'long' => false, + ]; + $diffSyntaxModes = [ + // @call diffForHumans + 'Absolute' => CarbonInterface::DIFF_ABSOLUTE, + // @call diffForHumans + 'Relative' => CarbonInterface::DIFF_RELATIVE_AUTO, + // @call diffForHumans + 'RelativeToNow' => CarbonInterface::DIFF_RELATIVE_TO_NOW, + // @call diffForHumans + 'RelativeToOther' => CarbonInterface::DIFF_RELATIVE_TO_OTHER, + ]; + $sizePattern = implode('|', array_keys($diffSizes)); + $syntaxPattern = implode('|', array_keys($diffSyntaxModes)); + + if (preg_match("/^(?$sizePattern)(?$syntaxPattern)DiffForHumans$/", $method, $match)) { + $dates = array_filter($parameters, function ($parameter) { + return $parameter instanceof DateTimeInterface; + }); + $other = null; + + if (\count($dates)) { + $key = key($dates); + $other = current($dates); + array_splice($parameters, $key, 1); + } + + return $this->diffForHumans($other, $diffSyntaxModes[$match['syntax']], $diffSizes[$match['size']], ...$parameters); + } + + $roundedValue = $this->callRoundMethod($method, $parameters); + + if ($roundedValue !== null) { + return $roundedValue; + } + + $unit = rtrim($method, 's'); + + if (str_starts_with($unit, 'is')) { + $word = substr($unit, 2); + + if (\in_array($word, static::$days, true)) { + return $this->isDayOfWeek($word); + } + + switch ($word) { + // @call is Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + case 'Utc': + case 'UTC': + return $this->utc; + // @call is Check if the current instance has non-UTC timezone. + case 'Local': + return $this->local; + // @call is Check if the current instance is a valid date. + case 'Valid': + return $this->year !== 0; + // @call is Check if the current instance is in a daylight saving time. + case 'DST': + return $this->dst; + } + } + + $action = substr($unit, 0, 3); + $overflow = null; + + if ($action === 'set') { + $unit = strtolower(substr($unit, 3)); + } + + if (\in_array($unit, static::$units, true)) { + return $this->setUnit($unit, ...$parameters); + } + + if ($action === 'add' || $action === 'sub') { + $unit = substr($unit, 3); + + if (str_starts_with($unit, 'Real')) { + $unit = static::singularUnit(substr($unit, 4)); + + return $this->{"{$action}RealUnit"}($unit, ...$parameters); + } + + if (preg_match('/^(Month|Quarter|Year|Decade|Century|Centurie|Millennium|Millennia)s?(No|With|Without|WithNo)Overflow$/', $unit, $match)) { + $unit = $match[1]; + $overflow = $match[2] === 'With'; + } + + $unit = static::singularUnit($unit); + } + + if (static::isModifiableUnit($unit)) { + return $this->{"{$action}Unit"}($unit, $this->getMagicParameter($parameters, 0, 'value', 1), $overflow); + } + + $sixFirstLetters = substr($unit, 0, 6); + $factor = -1; + + if ($sixFirstLetters === 'isLast') { + $sixFirstLetters = 'isNext'; + $factor = 1; + } + + if ($sixFirstLetters === 'isNext') { + $lowerUnit = strtolower(substr($unit, 6)); + + if (static::isModifiableUnit($lowerUnit)) { + return $this->copy()->addUnit($lowerUnit, $factor, false)->isSameUnit($lowerUnit, ...$parameters); + } + } + + if ($sixFirstLetters === 'isSame') { + try { + return $this->isSameUnit(strtolower(substr($unit, 6)), ...$parameters); + } catch (BadComparisonUnitException $exception) { + // Try next + } + } + + if (str_starts_with($unit, 'isCurrent')) { + try { + return $this->isCurrentUnit(strtolower(substr($unit, 9))); + } catch (BadComparisonUnitException | BadMethodCallException $exception) { + // Try next + } + } + + if (str_ends_with($method, 'Until')) { + try { + $unit = static::singularUnit(substr($method, 0, -5)); + + return $this->range( + $this->getMagicParameter($parameters, 0, 'endDate', $this), + $this->getMagicParameter($parameters, 1, 'factor', 1), + $unit + ); + } catch (InvalidArgumentException $exception) { + // Try macros + } + } + + return static::bindMacroContext($this, function () use (&$method, &$parameters) { + $macro = $this->getLocalMacro($method); + + if (!$macro) { + foreach ([$this->localGenericMacros ?: [], static::getGenericMacros()] as $list) { + foreach ($list as $callback) { + try { + return $this->executeCallable($callback, $method, ...$parameters); + } catch (BadMethodCallException $exception) { + continue; + } + } + } + + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new UnknownMethodException($method); + } + + return null; + } + + return $this->executeCallable($macro, ...$parameters); + }); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/DeprecatedProperties.php b/libraries/Carbon/src/Carbon/Traits/DeprecatedProperties.php new file mode 100644 index 00000000000..fc72e4463b7 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/DeprecatedProperties.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +trait DeprecatedProperties +{ + /** + * the day of week in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('MMM') instead. + * Deprecated since 2.55.0 + */ + public $localeDayOfWeek; + + /** + * the abbreviated day of week in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('dddd') instead. + * Deprecated since 2.55.0 + */ + public $shortLocaleDayOfWeek; + + /** + * the month in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('ddd') instead. + * Deprecated since 2.55.0 + */ + public $localeMonth; + + /** + * the abbreviated month in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('MMMM') instead. + * Deprecated since 2.55.0 + */ + public $shortLocaleMonth; +} diff --git a/libraries/Carbon/src/Carbon/Traits/Difference.php b/libraries/Carbon/src/Carbon/Traits/Difference.php new file mode 100644 index 00000000000..4d5be121276 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Difference.php @@ -0,0 +1,1182 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Carbon; +use EDD\Vendor\Carbon\CarbonImmutable; +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\CarbonInterval; +use EDD\Vendor\Carbon\CarbonPeriod; +use EDD\Vendor\Carbon\Translator; +use Closure; +use DateInterval; +use DateTimeInterface; +use ReturnTypeWillChange; + +/** + * Trait Difference. + * + * Depends on the following methods: + * + * @method bool lessThan($date) + * @method static copy() + * @method static resolveCarbon($date = null) + * @method static Translator translator() + */ +trait Difference +{ + /** + * @codeCoverageIgnore + * + * @param CarbonInterval $diff + */ + protected static function fixNegativeMicroseconds(CarbonInterval $diff) + { + if ($diff->s !== 0 || $diff->i !== 0 || $diff->h !== 0 || $diff->d !== 0 || $diff->m !== 0 || $diff->y !== 0) { + $diff->f = (round($diff->f * 1000000) + 1000000) / 1000000; + $diff->s--; + + if ($diff->s < 0) { + $diff->s += 60; + $diff->i--; + + if ($diff->i < 0) { + $diff->i += 60; + $diff->h--; + + if ($diff->h < 0) { + $diff->h += 24; + $diff->d--; + + if ($diff->d < 0) { + $diff->d += 30; + $diff->m--; + + if ($diff->m < 0) { + $diff->m += 12; + $diff->y--; + } + } + } + } + } + + return; + } + + $diff->f *= -1; + $diff->invert(); + } + + /** + * @param DateInterval $diff + * @param bool $absolute + * + * @return CarbonInterval + */ + protected static function fixDiffInterval(DateInterval $diff, $absolute, array $skip = []) + { + $diff = CarbonInterval::instance($diff, $skip); + + // Work-around for https://bugs.php.net/bug.php?id=77145 + // @codeCoverageIgnoreStart + if ($diff->f > 0 && $diff->y === -1 && $diff->m === 11 && $diff->d >= 27 && $diff->h === 23 && $diff->i === 59 && $diff->s === 59) { + $diff->y = 0; + $diff->m = 0; + $diff->d = 0; + $diff->h = 0; + $diff->i = 0; + $diff->s = 0; + $diff->f = (1000000 - round($diff->f * 1000000)) / 1000000; + $diff->invert(); + } elseif ($diff->f < 0) { + static::fixNegativeMicroseconds($diff); + } + // @codeCoverageIgnoreEnd + + if ($absolute && $diff->invert) { + $diff->invert(); + } + + return $diff; + } + + /** + * Get the difference as a DateInterval instance. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return DateInterval + */ + #[ReturnTypeWillChange] + public function diff($date = null, $absolute = false) + { + $other = $this->resolveCarbon($date); + + // Work-around for https://bugs.php.net/bug.php?id=81458 + // It was initially introduced for https://bugs.php.net/bug.php?id=80998 + // The very specific case of 80998 was fixed in PHP 8.1beta3, but it introduced 81458 + // So we still need to keep this for now + // @codeCoverageIgnoreStart + if (version_compare(PHP_VERSION, '8.1.0-dev', '>=') && $other->tz !== $this->tz) { + $other = $other->avoidMutation()->tz($this->tz); + } + // @codeCoverageIgnoreEnd + + return parent::diff($other, (bool) $absolute); + } + + /** + * Get the difference as a CarbonInterval instance. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return CarbonInterval + */ + public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []) + { + return static::fixDiffInterval($this->diff($this->resolveCarbon($date), $absolute), $absolute, $skip); + } + + /** + * Get the difference in years + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInYears($date = null, $absolute = true) + { + return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%y'); + } + + /** + * Get the difference in quarters rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInQuarters($date = null, $absolute = true) + { + return (int) ($this->diffInMonths($date, $absolute) / static::MONTHS_PER_QUARTER); + } + + /** + * Get the difference in months rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMonths($date = null, $absolute = true) + { + $date = $this->resolveCarbon($date)->avoidMutation()->tz($this->tz); + + [$yearStart, $monthStart, $dayStart] = explode('-', $this->format('Y-m-dHisu')); + [$yearEnd, $monthEnd, $dayEnd] = explode('-', $date->format('Y-m-dHisu')); + + $diff = (((int) $yearEnd) - ((int) $yearStart)) * static::MONTHS_PER_YEAR + + ((int) $monthEnd) - ((int) $monthStart); + + if ($diff > 0) { + $diff -= ($dayStart > $dayEnd ? 1 : 0); + } elseif ($diff < 0) { + $diff += ($dayStart < $dayEnd ? 1 : 0); + } + + return $absolute ? abs($diff) : $diff; + } + + /** + * Get the difference in weeks rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeeks($date = null, $absolute = true) + { + return (int) ($this->diffInDays($date, $absolute) / static::DAYS_PER_WEEK); + } + + /** + * Get the difference in days rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDays($date = null, $absolute = true) + { + return $this->getIntervalDayDiff($this->diff($this->resolveCarbon($date), $absolute)); + } + + /** + * Get the difference in days using a filter closure rounded down. + * + * @param Closure $callback + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true) + { + return $this->diffFiltered(CarbonInterval::day(), $callback, $date, $absolute); + } + + /** + * Get the difference in hours using a filter closure rounded down. + * + * @param Closure $callback + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true) + { + return $this->diffFiltered(CarbonInterval::hour(), $callback, $date, $absolute); + } + + /** + * Get the difference by the given interval using a filter closure. + * + * @param CarbonInterval $ci An interval to traverse by + * @param Closure $callback + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $inverse = false; + + if ($end < $start) { + $start = $end; + $end = $this; + $inverse = true; + } + + $options = CarbonPeriod::EXCLUDE_END_DATE | ($this->isMutable() ? 0 : CarbonPeriod::IMMUTABLE); + $diff = $ci->toPeriod($start, $end, $options)->filter($callback)->count(); + + return $inverse && !$absolute ? -$diff : $diff; + } + + /** + * Get the difference in weekdays rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekdays($date = null, $absolute = true) + { + return $this->diffInDaysFiltered(static function (CarbonInterface $date) { + return $date->isWeekday(); + }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); + } + + /** + * Get the difference in weekend days using a filter rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekendDays($date = null, $absolute = true) + { + return $this->diffInDaysFiltered(static function (CarbonInterface $date) { + return $date->isWeekend(); + }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); + } + + /** + * Get the difference in hours rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHours($date = null, $absolute = true) + { + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + } + + /** + * Get the difference in hours rounded down using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealHours($date = null, $absolute = true) + { + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + } + + /** + * Get the difference in minutes rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMinutes($date = null, $absolute = true) + { + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); + } + + /** + * Get the difference in minutes rounded down using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMinutes($date = null, $absolute = true) + { + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); + } + + /** + * Get the difference in seconds rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInSeconds($date = null, $absolute = true) + { + $diff = $this->diff($date); + + if ($diff->days === 0) { + $diff = static::fixDiffInterval($diff, $absolute); + } + + $value = (((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + + $diff->h) * static::MINUTES_PER_HOUR + + $diff->i) * static::SECONDS_PER_MINUTE + + $diff->s; + + return $absolute || !$diff->invert ? $value : -$value; + } + + /** + * Get the difference in microseconds. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMicroseconds($date = null, $absolute = true) + { + $diff = $this->diff($date); + $value = (int) round(((((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + + $diff->h) * static::MINUTES_PER_HOUR + + $diff->i) * static::SECONDS_PER_MINUTE + + ($diff->f + $diff->s)) * static::MICROSECONDS_PER_SECOND); + + return $absolute || !$diff->invert ? $value : -$value; + } + + /** + * Get the difference in milliseconds rounded down. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMilliseconds($date = null, $absolute = true) + { + return (int) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); + } + + /** + * Get the difference in seconds using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealSeconds($date = null, $absolute = true) + { + /** @var CarbonInterface $date */ + $date = $this->resolveCarbon($date); + $value = $date->getTimestamp() - $this->getTimestamp(); + + return $absolute ? abs($value) : $value; + } + + /** + * Get the difference in microseconds using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMicroseconds($date = null, $absolute = true) + { + /** @var CarbonInterface $date */ + $date = $this->resolveCarbon($date); + $value = ($date->timestamp - $this->timestamp) * static::MICROSECONDS_PER_SECOND + + $date->micro - $this->micro; + + return $absolute ? abs($value) : $value; + } + + /** + * Get the difference in milliseconds rounded down using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMilliseconds($date = null, $absolute = true) + { + return (int) ($this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); + } + + /** + * Get the difference in seconds as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInSeconds($date = null, $absolute = true) + { + return (float) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND); + } + + /** + * Get the difference in minutes as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMinutes($date = null, $absolute = true) + { + return $this->floatDiffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; + } + + /** + * Get the difference in hours as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInHours($date = null, $absolute = true) + { + return $this->floatDiffInMinutes($date, $absolute) / static::MINUTES_PER_HOUR; + } + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInDays($date = null, $absolute = true) + { + $hoursDiff = $this->floatDiffInHours($date, $absolute); + $interval = $this->diff($date, $absolute); + + if ($interval->y === 0 && $interval->m === 0 && $interval->d === 0) { + return $hoursDiff / static::HOURS_PER_DAY; + } + + $daysDiff = $this->getIntervalDayDiff($interval); + + return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; + } + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInWeeks($date = null, $absolute = true) + { + return $this->floatDiffInDays($date, $absolute) / static::DAYS_PER_WEEK; + } + + /** + * Get the difference in months as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMonths($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $monthsDiff = $start->diffInMonths($end); + /** @var EDD\Vendor\Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); + + if ($floorEnd >= $end) { + return $sign * $monthsDiff; + } + + /** @var EDD\Vendor\Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ + $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); + + if ($startOfMonthAfterFloorEnd > $end) { + return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInMonth); + } + + return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInDays($end) / $end->daysInMonth); + } + + /** + * Get the difference in year as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInYears($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $yearsDiff = $start->diffInYears($end); + /** @var EDD\Vendor\Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addYears($yearsDiff); + + if ($floorEnd >= $end) { + return $sign * $yearsDiff; + } + + /** @var EDD\Vendor\Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ + $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); + + if ($startOfYearAfterFloorEnd > $end) { + return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInYear); + } + + return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInDays($end) / $end->daysInYear); + } + + /** + * Get the difference in seconds as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealSeconds($date = null, $absolute = true) + { + return $this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND; + } + + /** + * Get the difference in minutes as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMinutes($date = null, $absolute = true) + { + return $this->floatDiffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; + } + + /** + * Get the difference in hours as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealHours($date = null, $absolute = true) + { + return $this->floatDiffInRealMinutes($date, $absolute) / static::MINUTES_PER_HOUR; + } + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealDays($date = null, $absolute = true) + { + $date = $this->resolveUTC($date); + $utc = $this->avoidMutation()->utc(); + $hoursDiff = $utc->floatDiffInRealHours($date, $absolute); + + return ($hoursDiff < 0 ? -1 : 1) * $utc->diffInDays($date) + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; + } + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealWeeks($date = null, $absolute = true) + { + return $this->floatDiffInRealDays($date, $absolute) / static::DAYS_PER_WEEK; + } + + /** + * Get the difference in months as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMonths($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $monthsDiff = $start->diffInMonths($end); + /** @var EDD\Vendor\Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); + + if ($floorEnd >= $end) { + return $sign * $monthsDiff; + } + + /** @var EDD\Vendor\Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ + $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); + + if ($startOfMonthAfterFloorEnd > $end) { + return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInMonth); + } + + return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInMonth); + } + + /** + * Get the difference in year as float (microsecond-precision) using timestamps. + * + * @param \EDD\Vendor\Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealYears($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $yearsDiff = $start->diffInYears($end); + /** @var EDD\Vendor\Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addYears($yearsDiff); + + if ($floorEnd >= $end) { + return $sign * $yearsDiff; + } + + /** @var EDD\Vendor\Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ + $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); + + if ($startOfYearAfterFloorEnd > $end) { + return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInYear); + } + + return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInYear); + } + + /** + * The number of seconds since midnight. + * + * @return int + */ + public function secondsSinceMidnight() + { + return $this->diffInSeconds($this->avoidMutation()->startOfDay()); + } + + /** + * The number of seconds until 23:59:59. + * + * @return int + */ + public function secondsUntilEndOfDay() + { + return $this->diffInSeconds($this->avoidMutation()->endOfDay()); + } + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @example + * ``` + * echo Carbon::tomorrow()->diffForHumans() . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; + * ``` + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, µs). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + /* @var CarbonInterface $this */ + if (\is_array($other)) { + $other['syntax'] = \array_key_exists('syntax', $other) ? $other['syntax'] : $syntax; + $syntax = $other; + $other = $syntax['other'] ?? null; + } + + $intSyntax = &$syntax; + if (\is_array($syntax)) { + $syntax['syntax'] = $syntax['syntax'] ?? null; + $intSyntax = &$syntax['syntax']; + } + $intSyntax = (int) ($intSyntax ?? static::DIFF_RELATIVE_AUTO); + $intSyntax = $intSyntax === static::DIFF_RELATIVE_AUTO && $other === null ? static::DIFF_RELATIVE_TO_NOW : $intSyntax; + + $parts = min(7, max(1, (int) $parts)); + $skip = \is_array($syntax) ? ($syntax['skip'] ?? []) : []; + + return $this->diffAsCarbonInterval($other, false, (array) $skip) + ->setLocalTranslator($this->getLocalTranslator()) + ->forHumans($syntax, (bool) $short, $parts, $options ?? $this->localHumanDiffOptions ?? static::getHumanDiffOptions()); + } + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->diffForHumans($other, $syntax, $short, $parts, $options); + } + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + */ + public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->diffForHumans($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * When comparing a value in the past to default now: + * 1 hour from now + * 5 months from now + * + * When comparing a value in the future to default now: + * 1 hour ago + * 5 months ago + * + * When comparing a value in the past to another value: + * 1 hour after + * 5 months after + * + * When comparing a value in the future to another value: + * 1 hour before + * 5 months before + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + if (!$syntax && !$other) { + $syntax = CarbonInterface::DIFF_RELATIVE_TO_NOW; + } + + return $this->resolveCarbon($other)->diffForHumans($this, $syntax, $short, $parts, $options); + } + + /** + * @alias to + * + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->to($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from current + * instance to now. + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function fromNow($syntax = null, $short = false, $parts = 1, $options = null) + { + $other = null; + + if ($syntax instanceof DateTimeInterface) { + [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); + } + + return $this->from($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function toNow($syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->to(null, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function ago($syntax = null, $short = false, $parts = 1, $options = null) + { + $other = null; + + if ($syntax instanceof DateTimeInterface) { + [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); + } + + return $this->from($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @return string + */ + public function timespan($other = null, $timezone = null) + { + if (!$other instanceof DateTimeInterface) { + $other = static::parse($other, $timezone); + } + + return $this->diffForHumans($other, [ + 'join' => ', ', + 'syntax' => CarbonInterface::DIFF_ABSOLUTE, + 'options' => CarbonInterface::NO_ZERO_DIFF, + 'parts' => -1, + ]); + } + + /** + * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, + * or a calendar date (e.g. "10/29/2017") otherwise. + * + * Language, date and time formats will change according to the current locale. + * + * @param EDD\Vendor\Carbon|\DateTimeInterface|string|null $referenceTime + * @param array $formats + * + * @return string + */ + public function calendar($referenceTime = null, array $formats = []) + { + /** @var CarbonInterface $current */ + $current = $this->avoidMutation()->startOfDay(); + /** @var CarbonInterface $other */ + $other = $this->resolveCarbon($referenceTime)->avoidMutation()->setTimezone($this->getTimezone())->startOfDay(); + $diff = $other->diffInDays($current, false); + $format = $diff < -6 ? 'sameElse' : ( + $diff < -1 ? 'lastWeek' : ( + $diff < 0 ? 'lastDay' : ( + $diff < 1 ? 'sameDay' : ( + $diff < 2 ? 'nextDay' : ( + $diff < 7 ? 'nextWeek' : 'sameElse' + ) + ) + ) + ) + ); + $format = array_merge($this->getCalendarFormats(), $formats)[$format]; + if ($format instanceof Closure) { + $format = $format($current, $other) ?? ''; + } + + return $this->isoFormat((string) $format); + } + + private function getIntervalDayDiff(DateInterval $interval): int + { + $daysDiff = (int) $interval->format('%a'); + $sign = $interval->format('%r') === '-' ? -1 : 1; + + if (\is_int($interval->days) && + $interval->y === 0 && + $interval->m === 0 && + version_compare(PHP_VERSION, '8.1.0-dev', '<') && + abs($interval->d - $daysDiff) === 1 + ) { + $daysDiff = abs($interval->d); // @codeCoverageIgnore + } + + return $daysDiff * $sign; + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/IntervalRounding.php b/libraries/Carbon/src/Carbon/Traits/IntervalRounding.php new file mode 100644 index 00000000000..aa564a38db3 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/IntervalRounding.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonInterval; +use EDD\Vendor\Carbon\Exceptions\InvalidIntervalException; +use DateInterval; + +/** + * Trait to call rounding methods to interval or the interval of a period. + */ +trait IntervalRounding +{ + protected function callRoundMethod(string $method, array $parameters) + { + $action = substr($method, 0, 4); + + if ($action !== 'ceil') { + $action = substr($method, 0, 5); + } + + if (\in_array($action, ['round', 'floor', 'ceil'])) { + return $this->{$action.'Unit'}(substr($method, \strlen($action)), ...$parameters); + } + + return null; + } + + protected function roundWith($precision, $function) + { + $unit = 'second'; + + if ($precision instanceof DateInterval) { + $precision = (string) CarbonInterval::instance($precision, [], true); + } + + if (\is_string($precision) && preg_match('/^\s*(?\d+)?\s*(?\w+)(?\W.*)?$/', $precision, $match)) { + if (trim($match['other'] ?? '') !== '') { + throw new InvalidIntervalException('Rounding is only possible with single unit intervals.'); + } + + $precision = (int) ($match['precision'] ?: 1); + $unit = $match['unit']; + } + + return $this->roundUnit($unit, $precision, $function); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/IntervalStep.php b/libraries/Carbon/src/Carbon/Traits/IntervalStep.php new file mode 100644 index 00000000000..1783f510fcc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/IntervalStep.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Carbon; +use EDD\Vendor\Carbon\CarbonImmutable; +use EDD\Vendor\Carbon\CarbonInterface; +use Closure; +use DateTimeImmutable; +use DateTimeInterface; + +trait IntervalStep +{ + /** + * Step to apply instead of a fixed interval to get the new date. + * + * @var Closure|null + */ + protected $step; + + /** + * Get the dynamic step in use. + * + * @return Closure + */ + public function getStep(): ?Closure + { + return $this->step; + } + + /** + * Set a step to apply instead of a fixed interval to get the new date. + * + * Or pass null to switch to fixed interval. + * + * @param Closure|null $step + */ + public function setStep(?Closure $step): void + { + $this->step = $step; + } + + /** + * Take a date and apply either the step if set, or the current interval else. + * + * The interval/step is applied negatively (typically subtraction instead of addition) if $negated is true. + * + * @param DateTimeInterface $dateTime + * @param bool $negated + * + * @return CarbonInterface + */ + public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface + { + /** @var CarbonInterface $carbonDate */ + $carbonDate = $dateTime instanceof CarbonInterface ? $dateTime : $this->resolveCarbon($dateTime); + + if ($this->step) { + return $carbonDate->setDateTimeFrom(($this->step)($carbonDate->avoidMutation(), $negated)); + } + + if ($negated) { + return $carbonDate->rawSub($this); + } + + return $carbonDate->rawAdd($this); + } + + /** + * Convert DateTimeImmutable instance to CarbonImmutable instance and DateTime instance to EDD\Vendor\Carbon instance. + * + * @param DateTimeInterface $dateTime + * + * @return EDD\Vendor\Carbon|CarbonImmutable + */ + private function resolveCarbon(DateTimeInterface $dateTime) + { + if ($dateTime instanceof DateTimeImmutable) { + return CarbonImmutable::instance($dateTime); + } + + return Carbon::instance($dateTime); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Localization.php b/libraries/Carbon/src/Carbon/Traits/Localization.php new file mode 100644 index 00000000000..a44a32975c0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Localization.php @@ -0,0 +1,840 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\Exceptions\InvalidTypeException; +use EDD\Vendor\Carbon\Exceptions\NotLocaleAwareException; +use EDD\Vendor\Carbon\Language; +use EDD\Vendor\Carbon\Translator; +use EDD\Vendor\Carbon\TranslatorStrongTypeInterface; +use Closure; +use EDD\Vendor\Symfony\Component\Translation\TranslatorBagInterface; +use EDD\Vendor\Symfony\Component\Translation\TranslatorInterface; +use EDD\Vendor\Symfony\Contracts\Translation\LocaleAwareInterface; +use EDD\Vendor\Symfony\Contracts\Translation\TranslatorInterface as ContractsTranslatorInterface; + +// @codeCoverageIgnoreStart +if (interface_exists('Symfony\\Contracts\\Translation\\TranslatorInterface') && + !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') +) { + class_alias( + 'Symfony\\Contracts\\Translation\\TranslatorInterface', + 'Symfony\\Component\\Translation\\TranslatorInterface' + ); +} +// @codeCoverageIgnoreEnd + +/** + * Trait Localization. + * + * Embed default and locale translators and translation base methods. + */ +trait Localization +{ + /** + * Default translator. + * + * @var \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + protected static $translator; + + /** + * Specific translator of the current instance. + * + * @var \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + protected $localTranslator; + + /** + * Options for diffForHumans(). + * + * @var int + */ + protected static $humanDiffOptions = CarbonInterface::NO_ZERO_DIFF; + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOptions + */ + public static function setHumanDiffOptions($humanDiffOptions) + { + static::$humanDiffOptions = $humanDiffOptions; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function enableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function disableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; + } + + /** + * Return default humanDiff() options (merged flags as integer). + * + * @return int + */ + public static function getHumanDiffOptions() + { + return static::$humanDiffOptions; + } + + /** + * Get the default translator instance in use. + * + * @return \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator() + { + return static::translator(); + } + + /** + * Set the default translator instance to use. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator + * + * @return void + */ + public static function setTranslator(TranslatorInterface $translator) + { + static::$translator = $translator; + } + + /** + * Return true if the current instance has its own translator. + * + * @return bool + */ + public function hasLocalTranslator() + { + return isset($this->localTranslator); + } + + /** + * Get the translator of the current instance or the default if none set. + * + * @return \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + public function getLocalTranslator() + { + return $this->localTranslator ?: static::translator(); + } + + /** + * Set the translator for the current instance. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator + * + * @return $this + */ + public function setLocalTranslator(TranslatorInterface $translator) + { + $this->localTranslator = $translator; + + return $this; + } + + /** + * Returns raw translation message for a given key. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator the translator to use + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * + * @return string + */ + public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) + { + if (!($translator instanceof TranslatorBagInterface && $translator instanceof TranslatorInterface)) { + throw new InvalidTypeException( + 'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'. '. + (\is_object($translator) ? \get_class($translator) : \gettype($translator)).' has been given.' + ); + } + + if (!$locale && $translator instanceof LocaleAwareInterface) { + $locale = $translator->getLocale(); + } + + $result = self::getFromCatalogue($translator, $translator->getCatalogue($locale), $key); + + return $result === $key ? $default : $result; + } + + /** + * Returns raw translation message for a given key. + * + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use + * + * @return string + */ + public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) + { + return static::getTranslationMessageWith($translator ?: $this->getLocalTranslator(), $key, $locale, $default); + } + + /** + * Translate using translation string or callback available. + * + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface $translator + * @param string $key + * @param array $parameters + * @param null $number + * + * @return string + */ + public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string + { + $message = static::getTranslationMessageWith($translator, $key, null, $key); + if ($message instanceof Closure) { + return (string) $message(...array_values($parameters)); + } + + if ($number !== null) { + $parameters['%count%'] = $number; + } + if (isset($parameters['%count%'])) { + $parameters[':count'] = $parameters['%count%']; + } + + // @codeCoverageIgnoreStart + $choice = $translator instanceof ContractsTranslatorInterface + ? $translator->trans($key, $parameters) + : $translator->transChoice($key, $number, $parameters); + // @codeCoverageIgnoreEnd + + return (string) $choice; + } + + /** + * Translate using translation string or callback available. + * + * @param string $key + * @param array $parameters + * @param string|int|float|null $number + * @param \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface|null $translator + * @param bool $altNumbers + * + * @return string + */ + public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string + { + $translation = static::translateWith($translator ?: $this->getLocalTranslator(), $key, $parameters, $number); + + if ($number !== null && $altNumbers) { + return str_replace($number, $this->translateNumber($number), $translation); + } + + return $translation; + } + + /** + * Returns the alternative number for a given integer if available in the current locale. + * + * @param int $number + * + * @return string + */ + public function translateNumber(int $number): string + { + $translateKey = "alt_numbers.$number"; + $symbol = $this->translate($translateKey); + + if ($symbol !== $translateKey) { + return $symbol; + } + + if ($number > 99 && $this->translate('alt_numbers.99') !== 'alt_numbers.99') { + $start = ''; + foreach ([10000, 1000, 100] as $exp) { + $key = "alt_numbers_pow.$exp"; + if ($number >= $exp && $number < $exp * 10 && ($pow = $this->translate($key)) !== $key) { + $unit = floor($number / $exp); + $number -= $unit * $exp; + $start .= ($unit > 1 ? $this->translate("alt_numbers.$unit") : '').$pow; + } + } + $result = ''; + while ($number) { + $chunk = $number % 100; + $result = $this->translate("alt_numbers.$chunk").$result; + $number = floor($number / 100); + } + + return "$start$result"; + } + + if ($number > 9 && $this->translate('alt_numbers.9') !== 'alt_numbers.9') { + $result = ''; + while ($number) { + $chunk = $number % 10; + $result = $this->translate("alt_numbers.$chunk").$result; + $number = floor($number / 10); + } + + return $result; + } + + return (string) $number; + } + + /** + * Translate a time string from a locale to an other. + * + * @param string $timeString date/time/duration string to translate (may also contain English) + * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) + * @param string|null $to output locale of the result returned (`"en"` by default) + * @param int $mode specify what to translate with options: + * - CarbonInterface::TRANSLATE_ALL (default) + * - CarbonInterface::TRANSLATE_MONTHS + * - CarbonInterface::TRANSLATE_DAYS + * - CarbonInterface::TRANSLATE_UNITS + * - CarbonInterface::TRANSLATE_MERIDIEM + * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS + * + * @return string + */ + public static function translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) + { + // Fallback source and destination locales + $from = $from ?: static::getLocale(); + $to = $to ?: 'en'; + + if ($from === $to) { + return $timeString; + } + + // Standardize apostrophe + $timeString = strtr($timeString, ['’' => "'"]); + + $fromTranslations = []; + $toTranslations = []; + + foreach (['from', 'to'] as $key) { + $language = $$key; + $translator = Translator::get($language); + $translations = $translator->getMessages(); + + if (!isset($translations[$language])) { + return $timeString; + } + + $translationKey = $key.'Translations'; + $messages = $translations[$language]; + $months = $messages['months'] ?? []; + $weekdays = $messages['weekdays'] ?? []; + $meridiem = $messages['meridiem'] ?? ['AM', 'PM']; + + if (isset($messages['ordinal_words'])) { + $timeString = self::replaceOrdinalWords( + $timeString, + $key === 'from' ? array_flip($messages['ordinal_words']) : $messages['ordinal_words'] + ); + } + + if ($key === 'from') { + foreach (['months', 'weekdays'] as $variable) { + $list = $messages[$variable.'_standalone'] ?? null; + + if ($list) { + foreach ($$variable as $index => &$name) { + $name .= '|'.$messages[$variable.'_standalone'][$index]; + } + } + } + } + + $$translationKey = array_merge( + $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($months, 12, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($messages['months_short'] ?? [], 12, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($weekdays, 7, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($messages['weekdays_short'] ?? [], 7, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_DIFF ? static::translateWordsByKeys([ + 'diff_now', + 'diff_today', + 'diff_yesterday', + 'diff_tomorrow', + 'diff_before_yesterday', + 'diff_after_tomorrow', + ], $messages, $key) : [], + $mode & CarbonInterface::TRANSLATE_UNITS ? static::translateWordsByKeys([ + 'year', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + ], $messages, $key) : [], + $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function ($hour) use ($meridiem) { + if (\is_array($meridiem)) { + return $meridiem[$hour < 12 ? 0 : 1]; + } + + return $meridiem($hour, 0, false); + }, range(0, 23)) : [] + ); + } + + return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function ($match) use ($fromTranslations, $toTranslations) { + [$chunk] = $match; + + foreach ($fromTranslations as $index => $word) { + if (preg_match("/^$word\$/iu", $chunk)) { + return $toTranslations[$index] ?? ''; + } + } + + return $chunk; // @codeCoverageIgnore + }, " $timeString "), 1, -1); + } + + /** + * Translate a time string from the current locale (`$date->locale()`) to an other. + * + * @param string $timeString time string to translate + * @param string|null $to output locale of the result returned ("en" by default) + * + * @return string + */ + public function translateTimeStringTo($timeString, $to = null) + { + return static::translateTimeString($timeString, $this->getTranslatorLocale(), $to); + } + + /** + * Get/set the locale for the current instance. + * + * @param string|null $locale + * @param string ...$fallbackLocales + * + * @return $this|string + */ + public function locale(string $locale = null, ...$fallbackLocales) + { + if ($locale === null) { + return $this->getTranslatorLocale(); + } + + if (!$this->localTranslator || $this->getTranslatorLocale($this->localTranslator) !== $locale) { + $translator = Translator::get($locale); + + if (!empty($fallbackLocales)) { + $translator->setFallbackLocales($fallbackLocales); + + foreach ($fallbackLocales as $fallbackLocale) { + $messages = Translator::get($fallbackLocale)->getMessages(); + + if (isset($messages[$fallbackLocale])) { + $translator->setMessages($fallbackLocale, $messages[$fallbackLocale]); + } + } + } + + $this->localTranslator = $translator; + } + + return $this; + } + + /** + * Get the current translator locale. + * + * @return string + */ + public static function getLocale() + { + return static::getLocaleAwareTranslator()->getLocale(); + } + + /** + * Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function setLocale($locale) + { + return static::getLocaleAwareTranslator()->setLocale($locale) !== false; + } + + /** + * Set the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @param string $locale + */ + public static function setFallbackLocale($locale) + { + $translator = static::getTranslator(); + + if (method_exists($translator, 'setFallbackLocales')) { + $translator->setFallbackLocales([$locale]); + + if ($translator instanceof Translator) { + $preferredLocale = $translator->getLocale(); + $translator->setMessages($preferredLocale, array_replace_recursive( + $translator->getMessages()[$locale] ?? [], + Translator::get($locale)->getMessages()[$locale] ?? [], + $translator->getMessages($preferredLocale) + )); + } + } + } + + /** + * Get the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @return string|null + */ + public static function getFallbackLocale() + { + $translator = static::getTranslator(); + + if (method_exists($translator, 'getFallbackLocales')) { + return $translator->getFallbackLocales()[0] ?? null; + } + + return null; + } + + /** + * Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * + * @param string $locale locale ex. en + * @param callable $func + * + * @return mixed + */ + public static function executeWithLocale($locale, $func) + { + $currentLocale = static::getLocale(); + $result = $func(static::setLocale($locale) ? static::getLocale() : false, static::translator()); + static::setLocale($currentLocale); + + return $result; + } + + /** + * Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasShortUnits($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( + ($y = static::translateWith($translator, 'd')) !== 'd' && + $y !== static::translateWith($translator, 'day') + ) || ( + ($y = static::translateWith($translator, 'h')) !== 'h' && + $y !== static::translateWith($translator, 'hour') + ); + }); + } + + /** + * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffSyntax($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + if (!$newLocale) { + return false; + } + + foreach (['ago', 'from_now', 'before', 'after'] as $key) { + if ($translator instanceof TranslatorBagInterface && + self::getFromCatalogue($translator, $translator->getCatalogue($newLocale), $key) instanceof Closure + ) { + continue; + } + + if ($translator->trans($key) === $key) { + return false; + } + } + + return true; + }); + } + + /** + * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffOneDayWords($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('diff_now') !== 'diff_now' && + $translator->trans('diff_yesterday') !== 'diff_yesterday' && + $translator->trans('diff_tomorrow') !== 'diff_tomorrow'; + }); + } + + /** + * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffTwoDayWords($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && + $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; + }); + } + + /** + * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasPeriodSyntax($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('period_recurrences') !== 'period_recurrences' && + $translator->trans('period_interval') !== 'period_interval' && + $translator->trans('period_start_date') !== 'period_start_date' && + $translator->trans('period_end_date') !== 'period_end_date'; + }); + } + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @return array + */ + public static function getAvailableLocales() + { + $translator = static::getLocaleAwareTranslator(); + + return $translator instanceof Translator + ? $translator->getAvailableLocales() + : [$translator->getLocale()]; + } + + /** + * Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * + * @return Language[] + */ + public static function getAvailableLocalesInfo() + { + $languages = []; + foreach (static::getAvailableLocales() as $id) { + $languages[$id] = new Language($id); + } + + return $languages; + } + + /** + * Initialize the default translator instance if necessary. + * + * @return \EDD\Vendor\Symfony\Component\Translation\TranslatorInterface + */ + protected static function translator() + { + if (static::$translator === null) { + static::$translator = Translator::get(); + } + + return static::$translator; + } + + /** + * Get the locale of a given translator. + * + * If null or omitted, current local translator is used. + * If no local translator is in use, current global translator is used. + * + * @param null $translator + * + * @return string|null + */ + protected function getTranslatorLocale($translator = null): ?string + { + if (\func_num_args() === 0) { + $translator = $this->getLocalTranslator(); + } + + $translator = static::getLocaleAwareTranslator($translator); + + return $translator ? $translator->getLocale() : null; + } + + /** + * Throw an error if passed object is not LocaleAwareInterface. + * + * @param LocaleAwareInterface|null $translator + * + * @return LocaleAwareInterface|null + */ + protected static function getLocaleAwareTranslator($translator = null) + { + if (\func_num_args() === 0) { + $translator = static::translator(); + } + + if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { + throw new NotLocaleAwareException($translator); // @codeCoverageIgnore + } + + return $translator; + } + + /** + * @param mixed $translator + * @param \EDD\Vendor\Symfony\Component\Translation\MessageCatalogueInterface $catalogue + * + * @return mixed + */ + private static function getFromCatalogue($translator, $catalogue, string $id, string $domain = 'messages') + { + return $translator instanceof TranslatorStrongTypeInterface + ? $translator->getFromCatalogue($catalogue, $id, $domain) // @codeCoverageIgnore + : $catalogue->get($id, $domain); + } + + /** + * Return the word cleaned from its translation codes. + * + * @param string $word + * + * @return string + */ + private static function cleanWordFromTranslationString($word) + { + $word = str_replace([':count', '%count', ':time'], '', $word); + $word = strtr($word, ['’' => "'"]); + $word = preg_replace('/({\d+(,(\d+|Inf))?}|[\[\]]\d+(,(\d+|Inf))?[\[\]])/', '', $word); + + return trim($word); + } + + /** + * Translate a list of words. + * + * @param string[] $keys keys to translate. + * @param string[] $messages messages bag handling translations. + * @param string $key 'to' (to get the translation) or 'from' (to get the detection RegExp pattern). + * + * @return string[] + */ + private static function translateWordsByKeys($keys, $messages, $key): array + { + return array_map(function ($wordKey) use ($messages, $key) { + $message = $key === 'from' && isset($messages[$wordKey.'_regexp']) + ? $messages[$wordKey.'_regexp'] + : ($messages[$wordKey] ?? null); + + if (!$message) { + return '>>DO NOT REPLACE<<'; + } + + $parts = explode('|', $message); + + return $key === 'to' + ? self::cleanWordFromTranslationString(end($parts)) + : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; + }, $keys); + } + + /** + * Get an array of translations based on the current date. + * + * @param callable $translation + * @param int $length + * @param string $timeString + * + * @return string[] + */ + private static function getTranslationArray($translation, $length, $timeString): array + { + $filler = '>>DO NOT REPLACE<<'; + + if (\is_array($translation)) { + return array_pad($translation, $length, $filler); + } + + $list = []; + $date = static::now(); + + for ($i = 0; $i < $length; $i++) { + $list[] = $translation($date, $timeString, $i) ?? $filler; + } + + return $list; + } + + private static function replaceOrdinalWords(string $timeString, array $ordinalWords): string + { + return preg_replace_callback('/(? + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +/** + * Trait Macros. + * + * Allows users to register macros within the EDD\Vendor\Carbon class. + */ +trait Macro +{ + use Mixin; + + /** + * The registered macros. + * + * @var array + */ + protected static $globalMacros = []; + + /** + * The registered generic macros. + * + * @var array + */ + protected static $globalGenericMacros = []; + + /** + * Register a custom macro. + * + * @example + * ``` + * $userSettings = [ + * 'locale' => 'pt', + * 'timezone' => 'America/Sao_Paulo', + * ]; + * Carbon::macro('userFormat', function () use ($userSettings) { + * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); + * }); + * echo Carbon::yesterday()->hours(11)->userFormat(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$globalMacros[$name] = $macro; + } + + /** + * Remove all macros and generic macros. + */ + public static function resetMacros() + { + static::$globalMacros = []; + static::$globalGenericMacros = []; + } + + /** + * Register a custom macro. + * + * @param object|callable $macro + * @param int $priority marco with higher priority is tried first + * + * @return void + */ + public static function genericMacro($macro, $priority = 0) + { + if (!isset(static::$globalGenericMacros[$priority])) { + static::$globalGenericMacros[$priority] = []; + krsort(static::$globalGenericMacros, SORT_NUMERIC); + } + + static::$globalGenericMacros[$priority][] = $macro; + } + + /** + * Checks if macro is registered globally. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$globalMacros[$name]); + } + + /** + * Get the raw callable macro registered globally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public static function getMacro($name) + { + return static::$globalMacros[$name] ?? null; + } + + /** + * Checks if macro is registered globally or locally. + * + * @param string $name + * + * @return bool + */ + public function hasLocalMacro($name) + { + return ($this->localMacros && isset($this->localMacros[$name])) || static::hasMacro($name); + } + + /** + * Get the raw callable macro registered globally or locally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public function getLocalMacro($name) + { + return ($this->localMacros ?? [])[$name] ?? static::getMacro($name); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/MagicParameter.php b/libraries/Carbon/src/Carbon/Traits/MagicParameter.php new file mode 100644 index 00000000000..ccde1e34244 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/MagicParameter.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +/** + * Trait MagicParameter. + * + * Allows to retrieve parameter in magic calls by index or name. + */ +trait MagicParameter +{ + private function getMagicParameter(array $parameters, int $index, string $key, $default) + { + if (\array_key_exists($index, $parameters)) { + return $parameters[$index]; + } + + if (\array_key_exists($key, $parameters)) { + return $parameters[$key]; + } + + return $default; + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Mixin.php b/libraries/Carbon/src/Carbon/Traits/Mixin.php new file mode 100644 index 00000000000..e5dc273e8ee --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Mixin.php @@ -0,0 +1,226 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\CarbonInterval; +use EDD\Vendor\Carbon\CarbonPeriod; +use Closure; +use Generator; +use ReflectionClass; +use ReflectionException; +use ReflectionMethod; +use Throwable; + +/** + * Trait Mixin. + * + * Allows mixing in entire classes with multiple macros. + */ +trait Mixin +{ + /** + * Stack of macro instance contexts. + * + * @var array + */ + protected static $macroContextStack = []; + + /** + * Mix another object into the class. + * + * @example + * ``` + * Carbon::mixin(new class { + * public function addMoon() { + * return function () { + * return $this->addDays(30); + * }; + * } + * public function subMoon() { + * return function () { + * return $this->subDays(30); + * }; + * } + * }); + * $fullMoon = Carbon::create('2018-12-22'); + * $nextFullMoon = $fullMoon->addMoon(); + * $blackMoon = Carbon::create('2019-01-06'); + * $previousBlackMoon = $blackMoon->subMoon(); + * echo "$nextFullMoon\n"; + * echo "$previousBlackMoon\n"; + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + \is_string($mixin) && trait_exists($mixin) + ? self::loadMixinTrait($mixin) + : self::loadMixinClass($mixin); + } + + /** + * @param object|string $mixin + * + * @throws ReflectionException + */ + private static function loadMixinClass($mixin) + { + $methods = (new ReflectionClass($mixin))->getMethods( + ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED + ); + + foreach ($methods as $method) { + if ($method->isConstructor() || $method->isDestructor()) { + continue; + } + + $method->setAccessible(true); + + static::macro($method->name, $method->invoke($mixin)); + } + } + + /** + * @param string $trait + */ + private static function loadMixinTrait($trait) + { + $context = eval(self::getAnonymousClassCodeForTrait($trait)); + $className = \get_class($context); + $baseClass = static::class; + + foreach (self::getMixableMethods($context) as $name) { + $closureBase = Closure::fromCallable([$context, $name]); + + static::macro($name, function (...$parameters) use ($closureBase, $className, $baseClass) { + $downContext = isset($this) ? ($this) : new $baseClass(); + $context = isset($this) ? $this->cast($className) : new $className(); + + try { + // @ is required to handle error if not converted into exceptions + $closure = @$closureBase->bindTo($context); + } catch (Throwable $throwable) { // @codeCoverageIgnore + $closure = $closureBase; // @codeCoverageIgnore + } + + // in case of errors not converted into exceptions + $closure = $closure ?: $closureBase; + + $result = $closure(...$parameters); + + if (!($result instanceof $className)) { + return $result; + } + + if ($downContext instanceof CarbonInterface && $result instanceof CarbonInterface) { + if ($context !== $result) { + $downContext = $downContext->copy(); + } + + return $downContext + ->setTimezone($result->getTimezone()) + ->modify($result->format('Y-m-d H:i:s.u')) + ->settings($result->getSettings()); + } + + if ($downContext instanceof CarbonInterval && $result instanceof CarbonInterval) { + if ($context !== $result) { + $downContext = $downContext->copy(); + } + + $downContext->copyProperties($result); + self::copyStep($downContext, $result); + self::copyNegativeUnits($downContext, $result); + + return $downContext->settings($result->getSettings()); + } + + if ($downContext instanceof CarbonPeriod && $result instanceof CarbonPeriod) { + if ($context !== $result) { + $downContext = $downContext->copy(); + } + + return $downContext + ->setDates($result->getStartDate(), $result->getEndDate()) + ->setRecurrences($result->getRecurrences()) + ->setOptions($result->getOptions()) + ->settings($result->getSettings()); + } + + return $result; + }); + } + } + + private static function getAnonymousClassCodeForTrait(string $trait) + { + return 'return new class() extends '.static::class.' {use '.$trait.';};'; + } + + private static function getMixableMethods(self $context): Generator + { + foreach (get_class_methods($context) as $name) { + if (method_exists(static::class, $name)) { + continue; + } + + yield $name; + } + } + + /** + * Stack a EDD\Vendor\Carbon context from inside calls of self::this() and execute a given action. + * + * @param static|null $context + * @param callable $callable + * + * @throws Throwable + * + * @return mixed + */ + protected static function bindMacroContext($context, callable $callable) + { + static::$macroContextStack[] = $context; + + try { + return $callable(); + } finally { + array_pop(static::$macroContextStack); + } + } + + /** + * Return the current context from inside a macro callee or a null if static. + * + * @return static|null + */ + protected static function context() + { + return end(static::$macroContextStack) ?: null; + } + + /** + * Return the current context from inside a macro callee or a new one if static. + * + * @return static + */ + protected static function this() + { + return end(static::$macroContextStack) ?: new static(); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Modifiers.php b/libraries/Carbon/src/Carbon/Traits/Modifiers.php new file mode 100644 index 00000000000..23cd5a88c28 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Modifiers.php @@ -0,0 +1,472 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonInterface; +use ReturnTypeWillChange; + +/** + * Trait Modifiers. + * + * Returns dates relative to current date using modifier short-hand. + */ +trait Modifiers +{ + /** + * Midday/noon hour. + * + * @var int + */ + protected static $midDayAt = 12; + + /** + * get midday/noon hour + * + * @return int + */ + public static function getMidDayAt() + { + return static::$midDayAt; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * + * Set midday/noon hour + * + * @param int $hour midday hour + * + * @return void + */ + public static function setMidDayAt($hour) + { + static::$midDayAt = $hour; + } + + /** + * Modify to midday, default to self::$midDayAt + * + * @return static + */ + public function midDay() + { + return $this->setTime(static::$midDayAt, 0, 0, 0); + } + + /** + * Modify to the next occurrence of a given modifier such as a day of + * the week. If no modifier is provided, modify to the next occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static|false + */ + public function next($modifier = null) + { + if ($modifier === null) { + $modifier = $this->dayOfWeek; + } + + return $this->change( + 'next '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) + ); + } + + /** + * Go forward or backward to the next week- or weekend-day. + * + * @param bool $weekday + * @param bool $forward + * + * @return static + */ + private function nextOrPreviousDay($weekday = true, $forward = true) + { + /** @var CarbonInterface $date */ + $date = $this; + $step = $forward ? 1 : -1; + + do { + $date = $date->addDays($step); + } while ($weekday ? $date->isWeekend() : $date->isWeekday()); + + return $date; + } + + /** + * Go forward to the next weekday. + * + * @return static + */ + public function nextWeekday() + { + return $this->nextOrPreviousDay(); + } + + /** + * Go backward to the previous weekday. + * + * @return static + */ + public function previousWeekday() + { + return $this->nextOrPreviousDay(true, false); + } + + /** + * Go forward to the next weekend day. + * + * @return static + */ + public function nextWeekendDay() + { + return $this->nextOrPreviousDay(false); + } + + /** + * Go backward to the previous weekend day. + * + * @return static + */ + public function previousWeekendDay() + { + return $this->nextOrPreviousDay(false, false); + } + + /** + * Modify to the previous occurrence of a given modifier such as a day of + * the week. If no dayOfWeek is provided, modify to the previous occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static|false + */ + public function previous($modifier = null) + { + if ($modifier === null) { + $modifier = $this->dayOfWeek; + } + + return $this->change( + 'last '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) + ); + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * first day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function firstOfMonth($dayOfWeek = null) + { + $date = $this->startOfDay(); + + if ($dayOfWeek === null) { + return $date->day(1); + } + + return $date->modify('first '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * last day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function lastOfMonth($dayOfWeek = null) + { + $date = $this->startOfDay(); + + if ($dayOfWeek === null) { + return $date->day($date->daysInMonth); + } + + return $date->modify('last '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current month. If the calculated occurrence is outside the scope + * of the current month, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfMonth($nth, $dayOfWeek) + { + $date = $this->avoidMutation()->firstOfMonth(); + $check = $date->rawFormat('Y-m'); + $date = $date->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return $date->rawFormat('Y-m') === $check ? $this->modify((string) $date) : false; + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * first day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfQuarter($dayOfWeek = null) + { + return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER - 2, 1)->firstOfMonth($dayOfWeek); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * last day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfQuarter($dayOfWeek = null) + { + return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER, 1)->lastOfMonth($dayOfWeek); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current quarter. If the calculated occurrence is outside the scope + * of the current quarter, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfQuarter($nth, $dayOfWeek) + { + $date = $this->avoidMutation()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); + $lastMonth = $date->month; + $year = $date->year; + $date = $date->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return ($lastMonth < $date->month || $year !== $date->year) ? false : $this->modify((string) $date); + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * first day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfYear($dayOfWeek = null) + { + return $this->month(1)->firstOfMonth($dayOfWeek); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * last day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfYear($dayOfWeek = null) + { + return $this->month(static::MONTHS_PER_YEAR)->lastOfMonth($dayOfWeek); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current year. If the calculated occurrence is outside the scope + * of the current year, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfYear($nth, $dayOfWeek) + { + $date = $this->avoidMutation()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return $this->year === $date->year ? $this->modify((string) $date) : false; + } + + /** + * Modify the current instance to the average of a given instance (default now) and the current instance + * (second-precision). + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|null $date + * + * @return static + */ + public function average($date = null) + { + return $this->addRealMicroseconds((int) ($this->diffInRealMicroseconds($this->resolveCarbon($date), false) / 2)); + } + + /** + * Get the closest date from the instance (second-precision). + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function closest($date1, $date2) + { + return $this->diffInRealMicroseconds($date1) < $this->diffInRealMicroseconds($date2) ? $date1 : $date2; + } + + /** + * Get the farthest date from the instance (second-precision). + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function farthest($date1, $date2) + { + return $this->diffInRealMicroseconds($date1) > $this->diffInRealMicroseconds($date2) ? $date1 : $date2; + } + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function min($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->lt($date) ? $this : $date; + } + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see min() + * + * @return static + */ + public function minimum($date = null) + { + return $this->min($date); + } + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function max($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->gt($date) ? $this : $date; + } + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \EDD\Vendor\Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see max() + * + * @return static + */ + public function maximum($date = null) + { + return $this->max($date); + } + + /** + * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. + * + * @see https://php.net/manual/en/datetime.modify.php + * + * @return static|false + */ + #[ReturnTypeWillChange] + public function modify($modify) + { + return parent::modify((string) $modify); + } + + /** + * Similar to native modify() method of DateTime but can handle more grammars. + * + * @example + * ``` + * echo Carbon::now()->change('next 2pm'); + * ``` + * + * @link https://php.net/manual/en/datetime.modify.php + * + * @param string $modifier + * + * @return static|false + */ + public function change($modifier) + { + return $this->modify(preg_replace_callback('/^(next|previous|last)\s+(\d{1,2}(h|am|pm|:\d{1,2}(:\d{1,2})?))$/i', function ($match) { + $match[2] = str_replace('h', ':00', $match[2]); + $test = $this->avoidMutation()->modify($match[2]); + $method = $match[1] === 'next' ? 'lt' : 'gt'; + $match[1] = $test->$method($this) ? $match[1].' day' : 'today'; + + return $match[1].' '.$match[2]; + }, strtr(trim($modifier), [ + ' at ' => ' ', + 'just now' => 'now', + 'after tomorrow' => 'tomorrow +1 day', + 'before yesterday' => 'yesterday -1 day', + ]))); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Mutability.php b/libraries/Carbon/src/Carbon/Traits/Mutability.php new file mode 100644 index 00000000000..973f0a3cb97 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Mutability.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Carbon; +use EDD\Vendor\Carbon\CarbonImmutable; + +/** + * Trait Mutability. + * + * Utils to know if the current object is mutable or immutable and convert it. + */ +trait Mutability +{ + use Cast; + + /** + * Returns true if the current class/instance is mutable. + * + * @return bool + */ + public static function isMutable() + { + return false; + } + + /** + * Returns true if the current class/instance is immutable. + * + * @return bool + */ + public static function isImmutable() + { + return !static::isMutable(); + } + + /** + * Return a mutable copy of the instance. + * + * @return EDD\Vendor\Carbon + */ + public function toMutable() + { + /** @var EDD\Vendor\Carbon $date */ + $date = $this->cast(Carbon::class); + + return $date; + } + + /** + * Return a immutable copy of the instance. + * + * @return CarbonImmutable + */ + public function toImmutable() + { + /** @var CarbonImmutable $date */ + $date = $this->cast(CarbonImmutable::class); + + return $date; + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/ObjectInitialisation.php b/libraries/Carbon/src/Carbon/Traits/ObjectInitialisation.php new file mode 100644 index 00000000000..2a9aed1fe16 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/ObjectInitialisation.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +trait ObjectInitialisation +{ + /** + * True when parent::__construct has been called. + * + * @var string + */ + protected $constructedObjectId; +} diff --git a/libraries/Carbon/src/Carbon/Traits/Options.php b/libraries/Carbon/src/Carbon/Traits/Options.php new file mode 100644 index 00000000000..2d12ef52dc0 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Options.php @@ -0,0 +1,471 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonInterface; +use DateTimeInterface; +use Throwable; + +/** + * Trait Options. + * + * Embed base methods to change settings of EDD\Vendor\Carbon classes. + * + * Depends on the following methods: + * + * @method static shiftTimezone($timezone) Set the timezone + */ +trait Options +{ + use Localization; + + /** + * Customizable PHP_INT_SIZE override. + * + * @var int + */ + public static $PHPIntSize = PHP_INT_SIZE; + + /** + * First day of week. + * + * @var int|string + */ + protected static $weekStartsAt = CarbonInterface::MONDAY; + + /** + * Last day of week. + * + * @var int|string + */ + protected static $weekEndsAt = CarbonInterface::SUNDAY; + + /** + * Days of weekend. + * + * @var array + */ + protected static $weekendDays = [ + CarbonInterface::SATURDAY, + CarbonInterface::SUNDAY, + ]; + + /** + * Format regex patterns. + * + * @var array + */ + protected static $regexFormats = [ + 'd' => '(3[01]|[12][0-9]|0[1-9])', + 'D' => '(Sun|Mon|Tue|Wed|Thu|Fri|Sat)', + 'j' => '([123][0-9]|[1-9])', + 'l' => '([a-zA-Z]{2,})', + 'N' => '([1-7])', + 'S' => '(st|nd|rd|th)', + 'w' => '([0-6])', + 'z' => '(36[0-5]|3[0-5][0-9]|[12][0-9]{2}|[1-9]?[0-9])', + 'W' => '(5[012]|[1-4][0-9]|0?[1-9])', + 'F' => '([a-zA-Z]{2,})', + 'm' => '(1[012]|0[1-9])', + 'M' => '([a-zA-Z]{3})', + 'n' => '(1[012]|[1-9])', + 't' => '(2[89]|3[01])', + 'L' => '(0|1)', + 'o' => '([1-9][0-9]{0,4})', + 'Y' => '([1-9]?[0-9]{4})', + 'y' => '([0-9]{2})', + 'a' => '(am|pm)', + 'A' => '(AM|PM)', + 'B' => '([0-9]{3})', + 'g' => '(1[012]|[1-9])', + 'G' => '(2[0-3]|1?[0-9])', + 'h' => '(1[012]|0[1-9])', + 'H' => '(2[0-3]|[01][0-9])', + 'i' => '([0-5][0-9])', + 's' => '([0-5][0-9])', + 'u' => '([0-9]{1,6})', + 'v' => '([0-9]{1,3})', + 'e' => '([a-zA-Z]{1,5})|([a-zA-Z]*\\/[a-zA-Z]*)', + 'I' => '(0|1)', + 'O' => '([+-](1[0123]|0[0-9])[0134][05])', + 'P' => '([+-](1[0123]|0[0-9]):[0134][05])', + 'p' => '(Z|[+-](1[0123]|0[0-9]):[0134][05])', + 'T' => '([a-zA-Z]{1,5})', + 'Z' => '(-?[1-5]?[0-9]{1,4})', + 'U' => '([0-9]*)', + + // The formats below are combinations of the above formats. + 'c' => '(([1-9]?[0-9]{4})-(1[012]|0[1-9])-(3[01]|[12][0-9]|0[1-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])[+-](1[012]|0[0-9]):([0134][05]))', // Y-m-dTH:i:sP + 'r' => '(([a-zA-Z]{3}), ([123][0-9]|0[1-9]) ([a-zA-Z]{3}) ([1-9]?[0-9]{4}) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9]) [+-](1[012]|0[0-9])([0134][05]))', // D, d M Y H:i:s O + ]; + + /** + * Format modifiers (such as available in createFromFormat) regex patterns. + * + * @var array + */ + protected static $regexFormatModifiers = [ + '*' => '.+', + ' ' => '[ ]', + '#' => '[;:\\/.,()-]', + '?' => '([^a]|[a])', + '!' => '', + '|' => '', + '+' => '', + ]; + + /** + * Indicates if months should be calculated with overflow. + * Global setting. + * + * @var bool + */ + protected static $monthsOverflow = true; + + /** + * Indicates if years should be calculated with overflow. + * Global setting. + * + * @var bool + */ + protected static $yearsOverflow = true; + + /** + * Indicates if the strict mode is in use. + * Global setting. + * + * @var bool + */ + protected static $strictModeEnabled = true; + + /** + * Function to call instead of format. + * + * @var string|callable|null + */ + protected static $formatFunction; + + /** + * Function to call instead of createFromFormat. + * + * @var string|callable|null + */ + protected static $createFromFormatFunction; + + /** + * Function to call instead of parse. + * + * @var string|callable|null + */ + protected static $parseFunction; + + /** + * Indicates if months should be calculated with overflow. + * Specific setting. + * + * @var bool|null + */ + protected $localMonthsOverflow; + + /** + * Indicates if years should be calculated with overflow. + * Specific setting. + * + * @var bool|null + */ + protected $localYearsOverflow; + + /** + * Indicates if the strict mode is in use. + * Specific setting. + * + * @var bool|null + */ + protected $localStrictModeEnabled; + + /** + * Options for diffForHumans and forHumans methods. + * + * @var bool|null + */ + protected $localHumanDiffOptions; + + /** + * Format to use on string cast. + * + * @var string|null + */ + protected $localToStringFormat; + + /** + * Format to use on JSON serialization. + * + * @var string|null + */ + protected $localSerializer; + + /** + * Instance-specific macros. + * + * @var array|null + */ + protected $localMacros; + + /** + * Instance-specific generic macros. + * + * @var array|null + */ + protected $localGenericMacros; + + /** + * Function to call instead of format. + * + * @var string|callable|null + */ + protected $localFormatFunction; + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * Enable the strict mode (or disable with passing false). + * + * @param bool $strictModeEnabled + */ + public static function useStrictMode($strictModeEnabled = true) + { + static::$strictModeEnabled = $strictModeEnabled; + } + + /** + * Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * + * @return bool + */ + public static function isStrictModeEnabled() + { + return static::$strictModeEnabled; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if months should be calculated with overflow. + * + * @param bool $monthsOverflow + * + * @return void + */ + public static function useMonthsOverflow($monthsOverflow = true) + { + static::$monthsOverflow = $monthsOverflow; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetMonthsOverflow() + { + static::$monthsOverflow = true; + } + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowMonths() + { + return static::$monthsOverflow; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if years should be calculated with overflow. + * + * @param bool $yearsOverflow + * + * @return void + */ + public static function useYearsOverflow($yearsOverflow = true) + { + static::$yearsOverflow = $yearsOverflow; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetYearsOverflow() + { + static::$yearsOverflow = true; + } + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowYears() + { + return static::$yearsOverflow; + } + + /** + * Set specific options. + * - strictMode: true|false|null + * - monthOverflow: true|false|null + * - yearOverflow: true|false|null + * - humanDiffOptions: int|null + * - toStringFormat: string|Closure|null + * - toJsonFormat: string|Closure|null + * - locale: string|null + * - timezone: \DateTimeZone|string|int|null + * - macros: array|null + * - genericMacros: array|null + * + * @param array $settings + * + * @return $this|static + */ + public function settings(array $settings) + { + $this->localStrictModeEnabled = $settings['strictMode'] ?? null; + $this->localMonthsOverflow = $settings['monthOverflow'] ?? null; + $this->localYearsOverflow = $settings['yearOverflow'] ?? null; + $this->localHumanDiffOptions = $settings['humanDiffOptions'] ?? null; + $this->localToStringFormat = $settings['toStringFormat'] ?? null; + $this->localSerializer = $settings['toJsonFormat'] ?? null; + $this->localMacros = $settings['macros'] ?? null; + $this->localGenericMacros = $settings['genericMacros'] ?? null; + $this->localFormatFunction = $settings['formatFunction'] ?? null; + + if (isset($settings['locale'])) { + $locales = $settings['locale']; + + if (!\is_array($locales)) { + $locales = [$locales]; + } + + $this->locale(...$locales); + } + + if (isset($settings['innerTimezone'])) { + return $this->setTimezone($settings['innerTimezone']); + } + + if (isset($settings['timezone'])) { + return $this->shiftTimezone($settings['timezone']); + } + + return $this; + } + + /** + * Returns current local settings. + * + * @return array + */ + public function getSettings() + { + $settings = []; + $map = [ + 'localStrictModeEnabled' => 'strictMode', + 'localMonthsOverflow' => 'monthOverflow', + 'localYearsOverflow' => 'yearOverflow', + 'localHumanDiffOptions' => 'humanDiffOptions', + 'localToStringFormat' => 'toStringFormat', + 'localSerializer' => 'toJsonFormat', + 'localMacros' => 'macros', + 'localGenericMacros' => 'genericMacros', + 'locale' => 'locale', + 'tzName' => 'timezone', + 'localFormatFunction' => 'formatFunction', + ]; + + foreach ($map as $property => $key) { + $value = $this->$property ?? null; + + if ($value !== null && ($key !== 'locale' || $value !== 'en' || $this->localTranslator)) { + $settings[$key] = $value; + } + } + + return $settings; + } + + /** + * Show truthy properties on var_dump(). + * + * @return array + */ + public function __debugInfo() + { + $infos = array_filter(get_object_vars($this), static function ($var) { + return $var; + }); + + foreach (['dumpProperties', 'constructedObjectId', 'constructed'] as $property) { + if (isset($infos[$property])) { + unset($infos[$property]); + } + } + + $this->addExtraDebugInfos($infos); + + return $infos; + } + + protected function addExtraDebugInfos(&$infos): void + { + if ($this instanceof DateTimeInterface) { + try { + if (!isset($infos['date'])) { + $infos['date'] = $this->format(CarbonInterface::MOCK_DATETIME_FORMAT); + } + + if (!isset($infos['timezone'])) { + $infos['timezone'] = $this->tzName; + } + } catch (Throwable $exception) { + // noop + } + } + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Rounding.php b/libraries/Carbon/src/Carbon/Traits/Rounding.php new file mode 100644 index 00000000000..a34fcd7dbb4 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Rounding.php @@ -0,0 +1,254 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\Exceptions\UnknownUnitException; + +/** + * Trait Rounding. + * + * Round, ceil, floor units. + * + * Depends on the following methods: + * + * @method static copy() + * @method static startOfWeek(int $weekStartsAt = null) + */ +trait Rounding +{ + use IntervalRounding; + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int $precision + * @param string $function + * + * @return CarbonInterface + */ + public function roundUnit($unit, $precision = 1, $function = 'round') + { + $metaUnits = [ + // @call roundUnit + 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], + // @call roundUnit + 'century' => [static::YEARS_PER_CENTURY, 'year'], + // @call roundUnit + 'decade' => [static::YEARS_PER_DECADE, 'year'], + // @call roundUnit + 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], + // @call roundUnit + 'millisecond' => [1000, 'microsecond'], + ]; + $normalizedUnit = static::singularUnit($unit); + $ranges = array_merge(static::getRangesByUnit($this->daysInMonth), [ + // @call roundUnit + 'microsecond' => [0, 999999], + ]); + $factor = 1; + + if ($normalizedUnit === 'week') { + $normalizedUnit = 'day'; + $precision *= static::DAYS_PER_WEEK; + } + + if (isset($metaUnits[$normalizedUnit])) { + [$factor, $normalizedUnit] = $metaUnits[$normalizedUnit]; + } + + $precision *= $factor; + + if (!isset($ranges[$normalizedUnit])) { + throw new UnknownUnitException($unit); + } + + $found = false; + $fraction = 0; + $arguments = null; + $initialValue = null; + $factor = $this->year < 0 ? -1 : 1; + $changes = []; + $minimumInc = null; + + foreach ($ranges as $unit => [$minimum, $maximum]) { + if ($normalizedUnit === $unit) { + $arguments = [$this->$unit, $minimum]; + $initialValue = $this->$unit; + $fraction = $precision - floor($precision); + $found = true; + + continue; + } + + if ($found) { + $delta = $maximum + 1 - $minimum; + $factor /= $delta; + $fraction *= $delta; + $inc = ($this->$unit - $minimum) * $factor; + + if ($inc !== 0.0) { + $minimumInc = $minimumInc ?? ($arguments[0] / pow(2, 52)); + + // If value is still the same when adding a non-zero increment/decrement, + // it means precision got lost in the addition + if (abs($inc) < $minimumInc) { + $inc = $minimumInc * ($inc < 0 ? -1 : 1); + } + + // If greater than $precision, assume precision loss caused an overflow + if ($function !== 'floor' || abs($arguments[0] + $inc - $initialValue) >= $precision) { + $arguments[0] += $inc; + } + } + + $changes[$unit] = round( + $minimum + ($fraction ? $fraction * $function(($this->$unit - $minimum) / $fraction) : 0) + ); + + // Cannot use modulo as it lose double precision + while ($changes[$unit] >= $delta) { + $changes[$unit] -= $delta; + } + + $fraction -= floor($fraction); + } + } + + [$value, $minimum] = $arguments; + $normalizedValue = floor($function(($value - $minimum) / $precision) * $precision + $minimum); + + /** @var CarbonInterface $result */ + $result = $this; + + foreach ($changes as $unit => $value) { + $result = $result->$unit($value); + } + + return $result->$normalizedUnit($normalizedValue); + } + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function floorUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'floor'); + } + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function ceilUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'ceil'); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return CarbonInterface + */ + public function round($precision = 1, $function = 'round') + { + return $this->roundWith($precision, $function); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function floor($precision = 1) + { + return $this->round($precision, 'floor'); + } + + /** + * Ceil the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function ceil($precision = 1) + { + return $this->round($precision, 'ceil'); + } + + /** + * Round the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function roundWeek($weekStartsAt = null) + { + return $this->closest( + $this->avoidMutation()->floorWeek($weekStartsAt), + $this->avoidMutation()->ceilWeek($weekStartsAt) + ); + } + + /** + * Truncate the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function floorWeek($weekStartsAt = null) + { + return $this->startOfWeek($weekStartsAt); + } + + /** + * Ceil the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function ceilWeek($weekStartsAt = null) + { + if ($this->isMutable()) { + $startOfWeek = $this->avoidMutation()->startOfWeek($weekStartsAt); + + return $startOfWeek != $this ? + $this->startOfWeek($weekStartsAt)->addWeek() : + $this; + } + + $startOfWeek = $this->startOfWeek($weekStartsAt); + + return $startOfWeek != $this ? + $startOfWeek->addWeek() : + $this->avoidMutation(); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Serialization.php b/libraries/Carbon/src/Carbon/Traits/Serialization.php new file mode 100644 index 00000000000..d8e5076411a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Serialization.php @@ -0,0 +1,326 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\Exceptions\InvalidFormatException; +use ReturnTypeWillChange; +use Throwable; + +/** + * Trait Serialization. + * + * Serialization and JSON stuff. + * + * Depends on the following properties: + * + * @property int $year + * @property int $month + * @property int $daysInMonth + * @property int $quarter + * + * Depends on the following methods: + * + * @method string|static locale(string $locale = null, string ...$fallbackLocales) + * @method string toJSON() + */ +trait Serialization +{ + use ObjectInitialisation; + + /** + * The custom EDD\Vendor\Carbon JSON serializer. + * + * @var callable|null + */ + protected static $serializer; + + /** + * List of key to use for dump/serialization. + * + * @var string[] + */ + protected $dumpProperties = ['date', 'timezone_type', 'timezone']; + + /** + * Locale to dump comes here before serialization. + * + * @var string|null + */ + protected $dumpLocale; + + /** + * Embed date properties to dump in a dedicated variables so it won't overlap native + * DateTime ones. + * + * @var array|null + */ + protected $dumpDateProperties; + + /** + * Return a serialized string of the instance. + * + * @return string + */ + public function serialize() + { + return serialize($this); + } + + /** + * Create an instance from a serialized string. + * + * @param string $value + * + * @throws InvalidFormatException + * + * @return static + */ + public static function fromSerialized($value) + { + $instance = @unserialize((string) $value); + + if (!$instance instanceof static) { + throw new InvalidFormatException("Invalid serialized value: $value"); + } + + return $instance; + } + + /** + * The __set_state handler. + * + * @param string|array $dump + * + * @return static + */ + #[ReturnTypeWillChange] + public static function __set_state($dump) + { + if (\is_string($dump)) { + return static::parse($dump); + } + + /** @var \DateTimeInterface $date */ + $date = get_parent_class(static::class) && method_exists(parent::class, '__set_state') + ? parent::__set_state((array) $dump) + : (object) $dump; + + return static::instance($date); + } + + /** + * Returns the list of properties to dump on serialize() called on. + * + * Only used by PHP < 7.4. + * + * @return array + */ + public function __sleep() + { + $properties = $this->getSleepProperties(); + + if ($this->localTranslator ?? null) { + $properties[] = 'dumpLocale'; + $this->dumpLocale = $this->locale ?? null; + } + + return $properties; + } + + /** + * Returns the values to dump on serialize() called on. + * + * Only used by PHP >= 7.4. + * + * @return array + */ + public function __serialize(): array + { + // @codeCoverageIgnoreStart + if (isset($this->timezone_type, $this->timezone, $this->date)) { + return [ + 'date' => $this->date ?? null, + 'timezone_type' => $this->timezone_type, + 'timezone' => $this->timezone ?? null, + ]; + } + // @codeCoverageIgnoreEnd + + $timezone = $this->getTimezone(); + $export = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone_type' => $timezone->getType(), + 'timezone' => $timezone->getName(), + ]; + + // @codeCoverageIgnoreStart + if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { + $export['dumpDateProperties'] = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone' => serialize($this->timezone ?? null), + ]; + } + // @codeCoverageIgnoreEnd + + if ($this->localTranslator ?? null) { + $export['dumpLocale'] = $this->locale ?? null; + } + + return $export; + } + + /** + * Set locale if specified on unserialize() called. + * + * Only used by PHP < 7.4. + * + * @return void + */ + #[ReturnTypeWillChange] + public function __wakeup() + { + if (parent::class && method_exists(parent::class, '__wakeup')) { + // @codeCoverageIgnoreStart + try { + parent::__wakeup(); + } catch (Throwable $exception) { + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; + parent::__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } + } + // @codeCoverageIgnoreEnd + } + + $this->constructedObjectId = spl_object_hash($this); + + if (isset($this->dumpLocale)) { + $this->locale($this->dumpLocale); + $this->dumpLocale = null; + } + + $this->cleanupDumpProperties(); + } + + /** + * Set locale if specified on unserialize() called. + * + * Only used by PHP >= 7.4. + * + * @return void + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + try { + $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); + } catch (Throwable $exception) { + if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { + throw $exception; + } + + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; + $this->__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } + } + // @codeCoverageIgnoreEnd + + if (isset($data['dumpLocale'])) { + $this->locale($data['dumpLocale']); + } + } + + /** + * Prepare the object for JSON serialization. + * + * @return array|string + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + $serializer = $this->localSerializer ?? static::$serializer; + + if ($serializer) { + return \is_string($serializer) + ? $this->rawFormat($serializer) + : $serializer($this); + } + + return $this->toJSON(); + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform EDD\Vendor\Carbon object before the serialization. + * + * JSON serialize all EDD\Vendor\Carbon instances using the given callback. + * + * @param callable $callback + * + * @return void + */ + public static function serializeUsing($callback) + { + static::$serializer = $callback; + } + + /** + * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. + * foreach ($date as $_) {} + * serializer($date) + * var_export($date) + * get_object_vars($date) + */ + public function cleanupDumpProperties() + { + // @codeCoverageIgnoreStart + if (PHP_VERSION < 8.2) { + foreach ($this->dumpProperties as $property) { + if (isset($this->$property)) { + unset($this->$property); + } + } + } + // @codeCoverageIgnoreEnd + + return $this; + } + + private function getSleepProperties(): array + { + $properties = $this->dumpProperties; + + // @codeCoverageIgnoreStart + if (!\extension_loaded('msgpack')) { + return $properties; + } + + if (isset($this->constructedObjectId)) { + $this->dumpDateProperties = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone' => serialize($this->timezone ?? null), + ]; + + $properties[] = 'dumpDateProperties'; + } + + return $properties; + // @codeCoverageIgnoreEnd + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Test.php b/libraries/Carbon/src/Carbon/Traits/Test.php new file mode 100644 index 00000000000..2ba014d486e --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Test.php @@ -0,0 +1,228 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\CarbonTimeZone; +use Closure; +use DateTimeImmutable; +use DateTimeInterface; +use InvalidArgumentException; +use Throwable; + +trait Test +{ + /////////////////////////////////////////////////////////////////// + ///////////////////////// TESTING AIDS //////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * A test EDD\Vendor\Carbon instance to be returned when now instances are created. + * + * @var Closure|static|null + */ + protected static $testNow; + + /** + * The timezone to resto to when clearing the time mock. + * + * @var string|null + */ + protected static $testDefaultTimezone; + + /** + * Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock EDD\Vendor\Carbon instance + */ + public static function setTestNow($testNow = null) + { + static::$testNow = $testNow instanceof self || $testNow instanceof Closure + ? $testNow + : static::make($testNow); + } + + /** + * Set a EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock EDD\Vendor\Carbon instance + */ + public static function setTestNowAndTimezone($testNow = null, $tz = null) + { + if ($testNow) { + self::$testDefaultTimezone = self::$testDefaultTimezone ?? date_default_timezone_get(); + } + + $useDateInstanceTimezone = $testNow instanceof DateTimeInterface; + + if ($useDateInstanceTimezone) { + self::setDefaultTimezone($testNow->getTimezone()->getName(), $testNow); + } + + static::setTestNow($testNow); + + if (!$useDateInstanceTimezone) { + $now = static::getMockedTestNow(\func_num_args() === 1 ? null : $tz); + $tzName = $now ? $now->tzName : null; + self::setDefaultTimezone($tzName ?? self::$testDefaultTimezone ?? 'UTC', $now); + } + + if (!$testNow) { + self::$testDefaultTimezone = null; + } + } + + /** + * Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * + * /!\ Use this method for unit tests only. + * + * @template T + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock EDD\Vendor\Carbon instance + * @param Closure(): T $callback + * + * @return T + */ + public static function withTestNow($testNow, $callback) + { + static::setTestNow($testNow); + + try { + $result = $callback(); + } finally { + static::setTestNow(); + } + + return $result; + } + + /** + * Get the EDD\Vendor\Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * + * @return Closure|static the current instance used for testing + */ + public static function getTestNow() + { + return static::$testNow; + } + + /** + * Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * + * @return bool true if there is a test instance, otherwise false + */ + public static function hasTestNow() + { + return static::getTestNow() !== null; + } + + /** + * Get the mocked date passed in setTestNow() and if it's a Closure, execute it. + * + * @param string|\DateTimeZone $tz + * + * @return \EDD\Vendor\Carbon\CarbonImmutable|\EDD\Vendor\Carbon\Carbon|null + */ + protected static function getMockedTestNow($tz) + { + $testNow = static::getTestNow(); + + if ($testNow instanceof Closure) { + $realNow = new DateTimeImmutable('now'); + $testNow = $testNow(static::parse( + $realNow->format('Y-m-d H:i:s.u'), + $tz ?: $realNow->getTimezone() + )); + } + /* @var \EDD\Vendor\Carbon\CarbonImmutable|\EDD\Vendor\Carbon\Carbon|null $testNow */ + + return $testNow instanceof CarbonInterface + ? $testNow->avoidMutation()->tz($tz) + : $testNow; + } + + protected static function mockConstructorParameters(&$time, $tz) + { + /** @var \EDD\Vendor\Carbon\CarbonImmutable|\EDD\Vendor\Carbon\Carbon $testInstance */ + $testInstance = clone static::getMockedTestNow($tz); + + if (static::hasRelativeKeywords($time)) { + $testInstance = $testInstance->modify($time); + } + + $time = $testInstance instanceof self + ? $testInstance->rawFormat(static::MOCK_DATETIME_FORMAT) + : $testInstance->format(static::MOCK_DATETIME_FORMAT); + } + + private static function setDefaultTimezone($timezone, DateTimeInterface $date = null) + { + $previous = null; + $success = false; + + try { + $success = date_default_timezone_set($timezone); + } catch (Throwable $exception) { + $previous = $exception; + } + + if (!$success) { + $suggestion = @CarbonTimeZone::create($timezone)->toRegionName($date); + + throw new InvalidArgumentException( + "Timezone ID '$timezone' is invalid". + ($suggestion && $suggestion !== $timezone ? ", did you mean '$suggestion'?" : '.')."\n". + "It must be one of the IDs from DateTimeZone::listIdentifiers(),\n". + 'For the record, hours/minutes offset are relevant only for a particular moment, '. + 'but not as a default timezone.', + 0, + $previous + ); + } + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Timestamp.php b/libraries/Carbon/src/Carbon/Traits/Timestamp.php new file mode 100644 index 00000000000..da1a84e0da1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Timestamp.php @@ -0,0 +1,198 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +/** + * Trait Timestamp. + */ +trait Timestamp +{ + /** + * Create a EDD\Vendor\Carbon instance from a timestamp and set the timezone (use default one if not specified). + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestamp($timestamp, $tz = null) + { + return static::createFromTimestampUTC($timestamp)->setTimezone($tz); + } + + /** + * Create a EDD\Vendor\Carbon instance from an timestamp keeping the timezone to UTC. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampUTC($timestamp) + { + [$integer, $decimal] = self::getIntegerAndDecimalParts($timestamp); + $delta = floor($decimal / static::MICROSECONDS_PER_SECOND); + $integer += $delta; + $decimal -= $delta * static::MICROSECONDS_PER_SECOND; + $decimal = str_pad((string) $decimal, 6, '0', STR_PAD_LEFT); + + return static::rawCreateFromFormat('U u', "$integer $decimal"); + } + + /** + * Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampMsUTC($timestamp) + { + [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); + $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; + $milliseconds = abs($milliseconds); + $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); + $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); + $delta = floor($microseconds / static::MICROSECONDS_PER_SECOND); + $seconds += $delta; + $microseconds -= $delta * static::MICROSECONDS_PER_SECOND; + $microseconds = str_pad($microseconds, 6, '0', STR_PAD_LEFT); + + return static::rawCreateFromFormat('U u', "$seconds $microseconds"); + } + + /** + * Create a EDD\Vendor\Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestampMs($timestamp, $tz = null) + { + return static::createFromTimestampMsUTC($timestamp) + ->setTimezone($tz); + } + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + public function timestamp($unixTimestamp) + { + return $this->setTimestamp($unixTimestamp); + } + + /** + * Returns a timestamp rounded with the given precision (6 by default). + * + * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) + * @example getPreciseTimestamp(6) 1532087464437474 + * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) + * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) + * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) + * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) + * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) + * @example getPreciseTimestamp(0) 1532087464 (second precision) + * @example getPreciseTimestamp(-1) 153208746 (10 second precision) + * @example getPreciseTimestamp(-2) 15320875 (100 second precision) + * + * @param int $precision + * + * @return float + */ + public function getPreciseTimestamp($precision = 6) + { + return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); + } + + /** + * Returns the milliseconds timestamps used amongst other by Date javascript objects. + * + * @return float + */ + public function valueOf() + { + return $this->getPreciseTimestamp(3); + } + + /** + * Returns the timestamp with millisecond precision. + * + * @return int + */ + public function getTimestampMs() + { + return (int) $this->getPreciseTimestamp(3); + } + + /** + * @alias getTimestamp + * + * Returns the UNIX timestamp for the current date. + * + * @return int + */ + public function unix() + { + return $this->getTimestamp(); + } + + /** + * Return an array with integer part digits and decimals digits split from one or more positive numbers + * (such as timestamps) as string with the given number of decimals (6 by default). + * + * By splitting integer and decimal, this method obtain a better precision than + * number_format when the input is a string. + * + * @param float|int|string $numbers one or more numbers + * @param int $decimals number of decimals precision (6 by default) + * + * @return array 0-index is integer part, 1-index is decimal part digits + */ + private static function getIntegerAndDecimalParts($numbers, $decimals = 6) + { + if (\is_int($numbers) || \is_float($numbers)) { + $numbers = number_format($numbers, $decimals, '.', ''); + } + + $sign = str_starts_with($numbers, '-') ? -1 : 1; + $integer = 0; + $decimal = 0; + + foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { + [$integerPart, $decimalPart] = explode('.', "$chunk."); + + $integer += (int) $integerPart; + $decimal += (float) ("0.$decimalPart"); + } + + $overflow = floor($decimal); + $integer += $overflow; + $decimal -= $overflow; + + return [$sign * $integer, $decimal === 0.0 ? 0.0 : $sign * round($decimal * pow(10, $decimals))]; + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/ToStringFormat.php b/libraries/Carbon/src/Carbon/Traits/ToStringFormat.php new file mode 100644 index 00000000000..47edfc0394a --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/ToStringFormat.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use Closure; + +/** + * Trait ToStringFormat. + * + * Handle global format customization for string cast of the object. + */ +trait ToStringFormat +{ + /** + * Format to use for __toString method when type juggling occurs. + * + * @var string|Closure|null + */ + protected static $toStringFormat; + + /** + * Reset the format used to the default when type juggling a EDD\Vendor\Carbon instance to a string + * + * @return void + */ + public static function resetToStringFormat() + { + static::setToStringFormat(null); + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let EDD\Vendor\Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump another string + * format. + * + * Set the default format used when type juggling a EDD\Vendor\Carbon instance to a string. + * + * @param string|Closure|null $format + * + * @return void + */ + public static function setToStringFormat($format) + { + static::$toStringFormat = $format; + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Units.php b/libraries/Carbon/src/Carbon/Traits/Units.php new file mode 100644 index 00000000000..61719f092b1 --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Units.php @@ -0,0 +1,412 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +use EDD\Vendor\Carbon\CarbonConverterInterface; +use EDD\Vendor\Carbon\CarbonInterface; +use EDD\Vendor\Carbon\CarbonInterval; +use EDD\Vendor\Carbon\Exceptions\UnitException; +use Closure; +use DateInterval; +use DateMalformedStringException; +use ReturnTypeWillChange; + +/** + * Trait Units. + * + * Add, subtract and set units. + */ +trait Units +{ + /** + * Add seconds to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param string $unit + * @param int $value + * + * @return static + */ + public function addRealUnit($unit, $value = 1) + { + switch ($unit) { + // @call addRealUnit + case 'micro': + + // @call addRealUnit + case 'microsecond': + /* @var CarbonInterface $this */ + $diff = $this->microsecond + $value; + $time = $this->getTimestamp(); + $seconds = (int) floor($diff / static::MICROSECONDS_PER_SECOND); + $time += $seconds; + $diff -= $seconds * static::MICROSECONDS_PER_SECOND; + $microtime = str_pad((string) $diff, 6, '0', STR_PAD_LEFT); + $tz = $this->tz; + + return $this->tz('UTC')->modify("@$time.$microtime")->tz($tz); + + // @call addRealUnit + case 'milli': + // @call addRealUnit + case 'millisecond': + return $this->addRealUnit('microsecond', $value * static::MICROSECONDS_PER_MILLISECOND); + + // @call addRealUnit + case 'second': + break; + + // @call addRealUnit + case 'minute': + $value *= static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'hour': + $value *= static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'day': + $value *= static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'week': + $value *= static::DAYS_PER_WEEK * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'month': + $value *= 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'quarter': + $value *= static::MONTHS_PER_QUARTER * 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'year': + $value *= 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'decade': + $value *= static::YEARS_PER_DECADE * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'century': + $value *= static::YEARS_PER_CENTURY * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'millennium': + $value *= static::YEARS_PER_MILLENNIUM * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + default: + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new UnitException("Invalid unit for real timestamp add/sub: '$unit'"); + } + + return $this; + } + + /* @var CarbonInterface $this */ + return $this->setTimestamp((int) ($this->getTimestamp() + $value)); + } + + public function subRealUnit($unit, $value = 1) + { + return $this->addRealUnit($unit, -$value); + } + + /** + * Returns true if a property can be changed via setter. + * + * @param string $unit + * + * @return bool + */ + public static function isModifiableUnit($unit) + { + static $modifiableUnits = [ + // @call addUnit + 'millennium', + // @call addUnit + 'century', + // @call addUnit + 'decade', + // @call addUnit + 'quarter', + // @call addUnit + 'week', + // @call addUnit + 'weekday', + ]; + + return \in_array($unit, $modifiableUnits, true) || \in_array($unit, static::$units, true); + } + + /** + * Call native PHP DateTime/DateTimeImmutable add() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawAdd(DateInterval $interval) + { + return parent::add($interval); + } + + /** + * Add given units or interval to the current instance. + * + * @example $date->add('hour', 3) + * @example $date->add(15, 'days') + * @example $date->add(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function add($unit, $value = 1, $overflow = null) + { + if (\is_string($unit) && \func_num_args() === 1) { + $unit = CarbonInterval::make($unit, [], true); + } + + if ($unit instanceof CarbonConverterInterface) { + return $this->resolveCarbon($unit->convertDate($this, false)); + } + + if ($unit instanceof Closure) { + return $this->resolveCarbon($unit($this, false)); + } + + if ($unit instanceof DateInterval) { + return parent::add($unit); + } + + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + return $this->addUnit($unit, $value, $overflow); + } + + /** + * Add given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function addUnit($unit, $value = 1, $overflow = null) + { + $originalArgs = \func_get_args(); + + $date = $this; + + if (!is_numeric($value) || !(float) $value) { + return $date->isMutable() ? $date : $date->avoidMutation(); + } + + $unit = self::singularUnit($unit); + $metaUnits = [ + 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], + 'century' => [static::YEARS_PER_CENTURY, 'year'], + 'decade' => [static::YEARS_PER_DECADE, 'year'], + 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], + ]; + + if (isset($metaUnits[$unit])) { + [$factor, $unit] = $metaUnits[$unit]; + $value *= $factor; + } + + if ($unit === 'weekday') { + $weekendDays = static::getWeekendDays(); + + if ($weekendDays !== [static::SATURDAY, static::SUNDAY]) { + $absoluteValue = abs($value); + $sign = $value / max(1, $absoluteValue); + $weekDaysCount = 7 - min(6, \count(array_unique($weekendDays))); + $weeks = floor($absoluteValue / $weekDaysCount); + + for ($diff = $absoluteValue % $weekDaysCount; $diff; $diff--) { + /** @var static $date */ + $date = $date->addDays($sign); + + while (\in_array($date->dayOfWeek, $weekendDays, true)) { + $date = $date->addDays($sign); + } + } + + $value = $weeks * $sign; + $unit = 'week'; + } + + $timeString = $date->toTimeString(); + } elseif ($canOverflow = (\in_array($unit, [ + 'month', + 'year', + ]) && ($overflow === false || ( + $overflow === null && + ($ucUnit = ucfirst($unit).'s') && + !($this->{'local'.$ucUnit.'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}()) + )))) { + $day = $date->day; + } + + $value = (int) $value; + + if ($unit === 'milli' || $unit === 'millisecond') { + $unit = 'microsecond'; + $value *= static::MICROSECONDS_PER_MILLISECOND; + } + + // Work-around for bug https://bugs.php.net/bug.php?id=75642 + if ($unit === 'micro' || $unit === 'microsecond') { + $microseconds = $this->micro + $value; + $second = (int) floor($microseconds / static::MICROSECONDS_PER_SECOND); + $microseconds %= static::MICROSECONDS_PER_SECOND; + if ($microseconds < 0) { + $microseconds += static::MICROSECONDS_PER_SECOND; + } + $date = $date->microseconds($microseconds); + $unit = 'second'; + $value = $second; + } + + try { + $date = $date->modify("$value $unit"); + + if (isset($timeString)) { + $date = $date->setTimeFromTimeString($timeString); + } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { + $date = $date->modify('last day of previous month'); + } + } catch (DateMalformedStringException $ignoredException) { // @codeCoverageIgnore + $date = null; // @codeCoverageIgnore + } + + if (!$date) { + throw new UnitException('Unable to add unit '.var_export($originalArgs, true)); + } + + return $date; + } + + /** + * Subtract given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subUnit($unit, $value = 1, $overflow = null) + { + return $this->addUnit($unit, -$value, $overflow); + } + + /** + * Call native PHP DateTime/DateTimeImmutable sub() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawSub(DateInterval $interval) + { + return parent::sub($interval); + } + + /** + * Subtract given units or interval to the current instance. + * + * @example $date->sub('hour', 3) + * @example $date->sub(15, 'days') + * @example $date->sub(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function sub($unit, $value = 1, $overflow = null) + { + if (\is_string($unit) && \func_num_args() === 1) { + $unit = CarbonInterval::make($unit, [], true); + } + + if ($unit instanceof CarbonConverterInterface) { + return $this->resolveCarbon($unit->convertDate($this, true)); + } + + if ($unit instanceof Closure) { + return $this->resolveCarbon($unit($this, true)); + } + + if ($unit instanceof DateInterval) { + return parent::sub($unit); + } + + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + return $this->addUnit($unit, -(float) $value, $overflow); + } + + /** + * Subtract given units or interval to the current instance. + * + * @see sub() + * + * @param string|DateInterval $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subtract($unit, $value = 1, $overflow = null) + { + if (\is_string($unit) && \func_num_args() === 1) { + $unit = CarbonInterval::make($unit, [], true); + } + + return $this->sub($unit, $value, $overflow); + } +} diff --git a/libraries/Carbon/src/Carbon/Traits/Week.php b/libraries/Carbon/src/Carbon/Traits/Week.php new file mode 100644 index 00000000000..4e768b3a1cc --- /dev/null +++ b/libraries/Carbon/src/Carbon/Traits/Week.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon\Traits; + +/** + * Trait Week. + * + * week and ISO week number, year and count in year. + * + * Depends on the following properties: + * + * @property int $daysInYear + * @property int $dayOfWeek + * @property int $dayOfYear + * @property int $year + * + * Depends on the following methods: + * + * @method static addWeeks(int $weeks = 1) + * @method static copy() + * @method static dayOfYear(int $dayOfYear) + * @method string getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) + * @method static next(int|string $day = null) + * @method static startOfWeek(int $day = 1) + * @method static subWeeks(int $weeks = 1) + * @method static year(int $year = null) + */ +trait Week +{ + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null) + { + return $this->weekYear( + $year, + $dayOfWeek ?? 1, + $dayOfYear ?? 4 + ); + } + + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null) + { + $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; + $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; + + if ($year !== null) { + $year = (int) round($year); + + if ($this->weekYear(null, $dayOfWeek, $dayOfYear) === $year) { + return $this->avoidMutation(); + } + + $week = $this->week(null, $dayOfWeek, $dayOfYear); + $day = $this->dayOfWeek; + $date = $this->year($year); + switch ($date->weekYear(null, $dayOfWeek, $dayOfYear) - $year) { + case 1: + $date = $date->subWeeks(26); + + break; + case -1: + $date = $date->addWeeks(26); + + break; + } + + $date = $date->addWeeks($week - $date->week(null, $dayOfWeek, $dayOfYear))->startOfWeek($dayOfWeek); + + if ($date->dayOfWeek === $day) { + return $date; + } + + return $date->next($day); + } + + $year = $this->year; + $day = $this->dayOfYear; + $date = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + + if ($date->year === $year && $day < $date->dayOfYear) { + return $year - 1; + } + + $date = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + + if ($date->year === $year && $day >= $date->dayOfYear) { + return $year + 1; + } + + return $year; + } + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null) + { + return $this->weeksInYear( + $dayOfWeek ?? 1, + $dayOfYear ?? 4 + ); + } + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function weeksInYear($dayOfWeek = null, $dayOfYear = null) + { + $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; + $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; + $year = $this->year; + $start = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + $startDay = $start->dayOfYear; + if ($start->year !== $year) { + $startDay -= $start->daysInYear; + } + $end = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + $endDay = $end->dayOfYear; + if ($end->year !== $year) { + $endDay += $this->daysInYear; + } + + return (int) round(($endDay - $startDay) / 7); + } + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function week($week = null, $dayOfWeek = null, $dayOfYear = null) + { + $date = $this; + $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; + $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; + + if ($week !== null) { + return $date->addWeeks(round($week) - $this->week(null, $dayOfWeek, $dayOfYear)); + } + + $start = $date->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + $end = $date->avoidMutation()->startOfWeek($dayOfWeek); + if ($start > $end) { + $start = $start->subWeeks(26)->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + } + $week = (int) ($start->diffInDays($end) / 7 + 1); + + return $week > $end->weeksInYear($dayOfWeek, $dayOfYear) ? 1 : $week; + } + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null) + { + return $this->week( + $week, + $dayOfWeek ?? 1, + $dayOfYear ?? 4 + ); + } +} diff --git a/libraries/Carbon/src/Carbon/Translator.php b/libraries/Carbon/src/Carbon/Translator.php new file mode 100644 index 00000000000..98f3e11218b --- /dev/null +++ b/libraries/Carbon/src/Carbon/Translator.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use ReflectionMethod; +use EDD\Vendor\Symfony\Component\Translation; +use EDD\Vendor\Symfony\Contracts\Translation\TranslatorInterface; + +$transMethod = new ReflectionMethod( + class_exists(TranslatorInterface::class) + ? TranslatorInterface::class + : Translation\Translator::class, + 'trans' +); + +require $transMethod->hasReturnType() + ? __DIR__.'/../../lazy/Carbon/TranslatorStrongType.php' + : __DIR__.'/../../lazy/Carbon/TranslatorWeakType.php'; + +class Translator extends LazyTranslator +{ + // Proxy dynamically loaded LazyTranslator in a static way +} diff --git a/libraries/Carbon/src/Carbon/TranslatorImmutable.php b/libraries/Carbon/src/Carbon/TranslatorImmutable.php new file mode 100644 index 00000000000..1c070b5ee79 --- /dev/null +++ b/libraries/Carbon/src/Carbon/TranslatorImmutable.php @@ -0,0 +1,99 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Carbon\Exceptions\ImmutableException; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use EDD\Vendor\Symfony\Component\Translation\Formatter\MessageFormatterInterface; + +class TranslatorImmutable extends Translator +{ + /** @var bool */ + private $constructed = false; + + public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) + { + parent::__construct($locale, $formatter, $cacheDir, $debug); + $this->constructed = true; + } + + /** + * @codeCoverageIgnore + */ + public function setDirectories(array $directories) + { + $this->disallowMutation(__METHOD__); + + return parent::setDirectories($directories); + } + + public function setLocale($locale) + { + $this->disallowMutation(__METHOD__); + + return parent::setLocale($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setMessages($locale, $messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setMessages($locale, $messages); + } + + /** + * @codeCoverageIgnore + */ + public function setTranslations($messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setTranslations($messages); + } + + /** + * @codeCoverageIgnore + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory): void + { + $this->disallowMutation(__METHOD__); + + parent::setConfigCacheFactory($configCacheFactory); + } + + public function resetMessages($locale = null) + { + $this->disallowMutation(__METHOD__); + + return parent::resetMessages($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setFallbackLocales(array $locales) + { + $this->disallowMutation(__METHOD__); + + parent::setFallbackLocales($locales); + } + + private function disallowMutation($method) + { + if ($this->constructed) { + throw new ImmutableException($method.' not allowed on '.static::class); + } + } +} diff --git a/libraries/Carbon/src/Carbon/TranslatorStrongTypeInterface.php b/libraries/Carbon/src/Carbon/TranslatorStrongTypeInterface.php new file mode 100644 index 00000000000..2a3960bd205 --- /dev/null +++ b/libraries/Carbon/src/Carbon/TranslatorStrongTypeInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace EDD\Vendor\Carbon; + +use EDD\Vendor\Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Mark translator using strong type from symfony/translation >= 6. + */ +interface TranslatorStrongTypeInterface +{ + public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages'); +} diff --git a/libraries/Psr/Clock/ClockInterface.php b/libraries/Psr/Clock/ClockInterface.php new file mode 100644 index 00000000000..b1203b12eba --- /dev/null +++ b/libraries/Psr/Clock/ClockInterface.php @@ -0,0 +1,13 @@ + `ErrorObject` where appropriate +* [#837](https://github.com/stripe/stripe-php/pull/837) Autogen diff +* [#854](https://github.com/stripe/stripe-php/pull/854) Upgrade PHPStan and fix settings +* [#850](https://github.com/stripe/stripe-php/pull/850) Yet more PHPDoc updates + +## 7.22.0 - 2020-01-31 +* [#849](https://github.com/stripe/stripe-php/pull/849) Add new constants for `type` on `TaxId` +* [#843](https://github.com/stripe/stripe-php/pull/843) Even more PHPDoc fixes +* [#841](https://github.com/stripe/stripe-php/pull/841) More PHPDoc fixes + +## 7.21.1 - 2020-01-29 +* [#840](https://github.com/stripe/stripe-php/pull/840) Update phpdocs across multiple resources. + +## 7.21.0 - 2020-01-28 +* [#839](https://github.com/stripe/stripe-php/pull/839) Add support for `TYPE_ES_CIF` on `TaxId` + +## 7.20.0 - 2020-01-23 +* [#836](https://github.com/stripe/stripe-php/pull/836) Add new type values for `TaxId` + +## 7.19.1 - 2020-01-14 +* [#831](https://github.com/stripe/stripe-php/pull/831) Fix incorrect `UnexpectedValueException` instantiation + +## 7.19.0 - 2020-01-14 +* [#830](https://github.com/stripe/stripe-php/pull/830) Add support for `CreditNoteLineItem` + +## 7.18.0 - 2020-01-13 +* [#829](https://github.com/stripe/stripe-php/pull/829) Don't call php_uname function if disabled by php.ini + +## 7.17.0 - 2020-01-08 +* [#821](https://github.com/stripe/stripe-php/pull/821) Improve PHPDoc types for `ApiErrorException.get/setJsonBody()` methods + +## 7.16.0 - 2020-01-06 +* [#826](https://github.com/stripe/stripe-php/pull/826) Rename remaining `$options` to `$opts` +* [#825](https://github.com/stripe/stripe-php/pull/825) Update PHPDoc + +## 7.15.0 - 2020-01-06 +* [#824](https://github.com/stripe/stripe-php/pull/824) Add constant `TYPE_SG_UEN` to `TaxId` + +## 7.14.2 - 2019-12-04 +* [#816](https://github.com/stripe/stripe-php/pull/816) Disable autoloader when checking for `Throwable` + +## 7.14.1 - 2019-11-26 +* [#812](https://github.com/stripe/stripe-php/pull/812) Fix invalid PHPdoc on `Subscription` + +## 7.14.0 - 2019-11-26 +* [#811](https://github.com/stripe/stripe-php/pull/811) Add support for `CreditNote` preview. + +## 7.13.0 - 2019-11-19 +* [#808](https://github.com/stripe/stripe-php/pull/808) Add support for listing lines on an Invoice directly via `Invoice::allLines()` + +## 7.12.0 - 2019-11-08 + +- [#805](https://github.com/stripe/stripe-php/pull/805) Add Source::allSourceTransactions and SubscriptionItem::allUsageRecordSummaries +- [#798](https://github.com/stripe/stripe-php/pull/798) The argument of `array_key_exists` cannot be `null` +- [#803](https://github.com/stripe/stripe-php/pull/803) Removed unwanted got + +## 7.11.0 - 2019-11-06 + +- [#797](https://github.com/stripe/stripe-php/pull/797) Add support for reverse pagination + +## 7.10.0 - 2019-11-05 + +- [#795](https://github.com/stripe/stripe-php/pull/795) Add support for `Mandate` + +## 7.9.0 - 2019-11-05 + +- [#794](https://github.com/stripe/stripe-php/pull/794) Add PHPDoc to `ApiResponse` +- [#792](https://github.com/stripe/stripe-php/pull/792) Use single quotes for `OBJECT_NAME` constants + +## 7.8.0 - 2019-11-05 + +- [#790](https://github.com/stripe/stripe-php/pull/790) Mark nullable fields in PHPDoc +- [#788](https://github.com/stripe/stripe-php/pull/788) Early codegen fixes +- [#787](https://github.com/stripe/stripe-php/pull/787) Use PHPStan in Travis CI + +## 7.7.1 - 2019-10-25 + +- [#781](https://github.com/stripe/stripe-php/pull/781) Fix telemetry header +- [#780](https://github.com/stripe/stripe-php/pull/780) Contributor Convenant + +## 7.7.0 - 2019-10-23 + +- [#776](https://github.com/stripe/stripe-php/pull/776) Add `CAPABILITY_TRANSFERS` to `Account` +- [#778](https://github.com/stripe/stripe-php/pull/778) Add support for `TYPE_MX_RFC` type on `TaxId` + +## 7.6.0 - 2019-10-22 + +- [#770](https://github.com/stripe/stripe-php/pull/770) Add missing constants for Customer's `TaxId` + +## 7.5.0 - 2019-10-18 + +- [#768](https://github.com/stripe/stripe-php/pull/768) Redact API key in `RequestOptions` debug info + +## 7.4.0 - 2019-10-15 + +- [#764](https://github.com/stripe/stripe-php/pull/764) Add support for HTTP request monitoring callback + +## 7.3.1 - 2019-10-07 + +- [#755](https://github.com/stripe/stripe-php/pull/755) Respect Stripe-Should-Retry and Retry-After headers + +## 7.3.0 - 2019-10-02 + +- [#752](https://github.com/stripe/stripe-php/pull/752) Add `payment_intent.canceled` and `setup_intent.canceled` events +- [#749](https://github.com/stripe/stripe-php/pull/749) Call `toArray()` on objects only + +## 7.2.2 - 2019-09-24 + +- [#746](https://github.com/stripe/stripe-php/pull/746) Add missing decline codes + +## 7.2.1 - 2019-09-23 + +- [#744](https://github.com/stripe/stripe-php/pull/744) Added new PHPDoc + +## 7.2.0 - 2019-09-17 + +- [#738](https://github.com/stripe/stripe-php/pull/738) Added missing constants for `SetupIntent` events + +## 7.1.1 - 2019-09-16 + +- [#737](https://github.com/stripe/stripe-php/pull/737) Added new PHPDoc + +## 7.1.0 - 2019-09-13 + +- [#736](https://github.com/stripe/stripe-php/pull/736) Make `CaseInsensitiveArray` countable and traversable + +## 7.0.2 - 2019-09-06 + +- [#729](https://github.com/stripe/stripe-php/pull/729) Fix usage of `SignatureVerificationException` in PHPDoc blocks + +## 7.0.1 - 2019-09-05 + +- [#728](https://github.com/stripe/stripe-php/pull/728) Clean up Collection + +## 7.0.0 - 2019-09-03 + +Major version release. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v7) contains a detailed list of backwards-incompatible changes with upgrade instructions. + +Pull requests included in this release (cf. [#552](https://github.com/stripe/stripe-php/pull/552)) (⚠️ = breaking changes): + +- ⚠️ Drop support for PHP 5.4 ([#551](https://github.com/stripe/stripe-php/pull/551)) +- ⚠️ Drop support for PHP 5.5 ([#554](https://github.com/stripe/stripe-php/pull/554)) +- Bump dependencies ([#553](https://github.com/stripe/stripe-php/pull/553)) +- Remove `CURLFile` check ([#555](https://github.com/stripe/stripe-php/pull/555)) +- Update constant definitions for PHP >= 5.6 ([#556](https://github.com/stripe/stripe-php/pull/556)) +- ⚠️ Remove `FileUpload` alias ([#557](https://github.com/stripe/stripe-php/pull/557)) +- Remove `curl_reset` check ([#570](https://github.com/stripe/stripe-php/pull/570)) +- Use `\Stripe\::class` constant instead of strings ([#643](https://github.com/stripe/stripe-php/pull/643)) +- Use `array_column` to flatten params ([#686](https://github.com/stripe/stripe-php/pull/686)) +- ⚠️ Remove deprecated methods ([#692](https://github.com/stripe/stripe-php/pull/692)) +- ⚠️ Remove `IssuerFraudRecord` ([#696](https://github.com/stripe/stripe-php/pull/696)) +- Update constructors of Stripe exception classes ([#559](https://github.com/stripe/stripe-php/pull/559)) +- Fix remaining TODOs ([#700](https://github.com/stripe/stripe-php/pull/700)) +- Use yield for autopagination ([#703](https://github.com/stripe/stripe-php/pull/703)) +- ⚠️ Rename fake magic methods and rewrite array conversion ([#704](https://github.com/stripe/stripe-php/pull/704)) +- Add `ErrorObject` to Stripe exceptions ([#705](https://github.com/stripe/stripe-php/pull/705)) +- Start using PHP CS Fixer ([#706](https://github.com/stripe/stripe-php/pull/706)) +- Update error messages for nested resource operations ([#708](https://github.com/stripe/stripe-php/pull/708)) +- Upgrade retry logic ([#707](https://github.com/stripe/stripe-php/pull/707)) +- ⚠️ `Collection` improvements / fixes ([#715](https://github.com/stripe/stripe-php/pull/715)) +- ⚠️ Modernize exceptions ([#709](https://github.com/stripe/stripe-php/pull/709)) +- Add constants for error codes ([#716](https://github.com/stripe/stripe-php/pull/716)) +- Update certificate bundle ([#717](https://github.com/stripe/stripe-php/pull/717)) +- Retry requests on a 429 that's a lock timeout ([#718](https://github.com/stripe/stripe-php/pull/718)) +- Fix `toArray()` calls ([#719](https://github.com/stripe/stripe-php/pull/719)) +- Couple of fixes for PHP 7.4 ([#725](https://github.com/stripe/stripe-php/pull/725)) + +## 6.43.1 - 2019-08-29 + +- [#722](https://github.com/stripe/stripe-php/pull/722) Make `LoggerInterface::error` compatible with its PSR-3 counterpart +- [#714](https://github.com/stripe/stripe-php/pull/714) Add `pending_setup_intent` property in `Subscription` +- [#713](https://github.com/stripe/stripe-php/pull/713) Add typehint to `ApiResponse` +- [#712](https://github.com/stripe/stripe-php/pull/712) Fix comment +- [#701](https://github.com/stripe/stripe-php/pull/701) Start testing PHP 7.3 + +## 6.43.0 - 2019-08-09 + +- [#694](https://github.com/stripe/stripe-php/pull/694) Add `SubscriptionItem::createUsageRecord` method + +## 6.42.0 - 2019-08-09 + +- [#688](https://github.com/stripe/stripe-php/pull/688) Remove `SubscriptionScheduleRevision` + - Note that this is technically a breaking change, however we've chosen to release it as a minor version in light of the fact that this resource and its API methods were virtually unused. + +## 6.41.0 - 2019-07-31 + +- [#683](https://github.com/stripe/stripe-php/pull/683) Move the List Balance History API to `/v1/balance_transactions` + +## 6.40.0 - 2019-06-27 + +- [#675](https://github.com/stripe/stripe-php/pull/675) Add support for `SetupIntent` resource and APIs + +## 6.39.2 - 2019-06-26 + +- [#676](https://github.com/stripe/stripe-php/pull/676) Fix exception message in `CustomerBalanceTransaction::update()` + +## 6.39.1 - 2019-06-25 + +- [#674](https://github.com/stripe/stripe-php/pull/674) Add new constants for `collection_method` on `Invoice` + +## 6.39.0 - 2019-06-24 + +- [#673](https://github.com/stripe/stripe-php/pull/673) Enable request latency telemetry by default + +## 6.38.0 - 2019-06-17 + +- [#649](https://github.com/stripe/stripe-php/pull/649) Add support for `CustomerBalanceTransaction` resource and APIs + +## 6.37.2 - 2019-06-17 + +- [#671](https://github.com/stripe/stripe-php/pull/671) Add new PHPDoc +- [#672](https://github.com/stripe/stripe-php/pull/672) Add constants for `submit_type` on Checkout `Session` + +## 6.37.1 - 2019-06-14 + +- [#670](https://github.com/stripe/stripe-php/pull/670) Add new PHPDoc + +## 6.37.0 - 2019-05-23 + +- [#663](https://github.com/stripe/stripe-php/pull/663) Add support for `radar.early_fraud_warning` resource + +## 6.36.0 - 2019-05-22 + +- [#661](https://github.com/stripe/stripe-php/pull/661) Add constants for new TaxId types +- [#662](https://github.com/stripe/stripe-php/pull/662) Add constants for BalanceTransaction types + +## 6.35.2 - 2019-05-20 + +- [#655](https://github.com/stripe/stripe-php/pull/655) Add constants for payment intent statuses +- [#659](https://github.com/stripe/stripe-php/pull/659) Fix PHPDoc for various nested Account actions +- [#660](https://github.com/stripe/stripe-php/pull/660) Fix various PHPDoc + +## 6.35.1 - 2019-05-20 + +- [#658](https://github.com/stripe/stripe-php/pull/658) Use absolute value when checking timestamp tolerance + +## 6.35.0 - 2019-05-14 + +- [#651](https://github.com/stripe/stripe-php/pull/651) Add support for the Capability resource and APIs + +## 6.34.6 - 2019-05-13 + +- [#654](https://github.com/stripe/stripe-php/pull/654) Fix typo in definition of `Event::PAYMENT_METHOD_ATTACHED` constant + +## 6.34.5 - 2019-05-06 + +- [#647](https://github.com/stripe/stripe-php/pull/647) Set the return type to static for more operations + +## 6.34.4 - 2019-05-06 + +- [#650](https://github.com/stripe/stripe-php/pull/650) Add missing constants for Event types + +## 6.34.3 - 2019-05-01 + +- [#644](https://github.com/stripe/stripe-php/pull/644) Update return type to `static` to improve static analysis +- [#645](https://github.com/stripe/stripe-php/pull/645) Fix constant for `payment_intent.payment_failed` + +## 6.34.2 - 2019-04-26 + +- [#642](https://github.com/stripe/stripe-php/pull/642) Fix an issue where existing idempotency keys would be overwritten when using automatic retries + +## 6.34.1 - 2019-04-25 + +- [#640](https://github.com/stripe/stripe-php/pull/640) Add missing phpdocs + +## 6.34.0 - 2019-04-24 + +- [#626](https://github.com/stripe/stripe-php/pull/626) Add support for the `TaxRate` resource and APIs +- [#639](https://github.com/stripe/stripe-php/pull/639) Fix multiple phpdoc issues + +## 6.33.0 - 2019-04-22 + +- [#630](https://github.com/stripe/stripe-php/pull/630) Add support for the `TaxId` resource and APIs + +## 6.32.1 - 2019-04-19 + +- [#636](https://github.com/stripe/stripe-php/pull/636) Correct type of `$personId` in PHPDoc + +## 6.32.0 - 2019-04-18 + +- [#621](https://github.com/stripe/stripe-php/pull/621) Add support for `CreditNote` + +## 6.31.5 - 2019-04-12 + +- [#628](https://github.com/stripe/stripe-php/pull/628) Add constants for `person.*` event types +- [#628](https://github.com/stripe/stripe-php/pull/628) Add missing constants for `Account` and `Person` + +## 6.31.4 - 2019-04-05 + +- [#624](https://github.com/stripe/stripe-php/pull/624) Fix encoding of nested parameters in multipart requests + +## 6.31.3 - 2019-04-02 + +- [#623](https://github.com/stripe/stripe-php/pull/623) Only use HTTP/2 with curl >= 7.60.0 + +## 6.31.2 - 2019-03-25 + +- [#619](https://github.com/stripe/stripe-php/pull/619) Fix PHPDoc return types for list methods for nested resources + +## 6.31.1 - 2019-03-22 + +- [#612](https://github.com/stripe/stripe-php/pull/612) Add a lot of constants +- [#614](https://github.com/stripe/stripe-php/pull/614) Add missing subscription status constants + +## 6.31.0 - 2019-03-18 + +- [#600](https://github.com/stripe/stripe-php/pull/600) Add support for the `PaymentMethod` resource and APIs +- [#606](https://github.com/stripe/stripe-php/pull/606) Add support for retrieving a Checkout `Session` +- [#611](https://github.com/stripe/stripe-php/pull/611) Add support for deleting a Terminal `Location` and `Reader` + +## 6.30.5 - 2019-03-11 + +- [#607](https://github.com/stripe/stripe-php/pull/607) Correctly handle case where a metadata key is called `metadata` + +## 6.30.4 - 2019-02-27 + +- [#602](https://github.com/stripe/stripe-php/pull/602) Add `subscription_schedule` to `Subscription` for PHPDoc. + +## 6.30.3 - 2019-02-26 + +- [#603](https://github.com/stripe/stripe-php/pull/603) Improve PHPDoc on the `Source` object to cover all types of Sources currently supported. + +## 6.30.2 - 2019-02-25 + +- [#601](https://github.com/stripe/stripe-php/pull/601) Fix PHPDoc across multiple resources and add support for new events. + +## 6.30.1 - 2019-02-16 + +- [#599](https://github.com/stripe/stripe-php/pull/599) Fix PHPDoc for `SubscriptionSchedule` and `SubscriptionScheduleRevision` + +## 6.30.0 - 2019-02-12 + +- [#590](https://github.com/stripe/stripe-php/pull/590) Add support for `SubscriptionSchedule` and `SubscriptionScheduleRevision` + +## 6.29.3 - 2019-01-31 + +- [#592](https://github.com/stripe/stripe-php/pull/592) Some more PHPDoc fixes + +## 6.29.2 - 2019-01-31 + +- [#591](https://github.com/stripe/stripe-php/pull/591) Fix PHPDoc for nested resources + +## 6.29.1 - 2019-01-25 + +- [#566](https://github.com/stripe/stripe-php/pull/566) Fix dangling message contents +- [#586](https://github.com/stripe/stripe-php/pull/586) Don't overwrite `CURLOPT_HTTP_VERSION` option + +## 6.29.0 - 2019-01-23 + +- [#579](https://github.com/stripe/stripe-php/pull/579) Rename `CheckoutSession` to `Session` and move it under the `Checkout` namespace. This is a breaking change, but we've reached out to affected merchants and all new merchants would use the new approach. + +## 6.28.1 - 2019-01-21 + +- [#580](https://github.com/stripe/stripe-php/pull/580) Properly serialize `individual` on `Account` objects + +## 6.28.0 - 2019-01-03 + +- [#576](https://github.com/stripe/stripe-php/pull/576) Add support for iterating directly over `Collection` instances + +## 6.27.0 - 2018-12-21 + +- [#571](https://github.com/stripe/stripe-php/pull/571) Add support for the `CheckoutSession` resource + +## 6.26.0 - 2018-12-11 + +- [#568](https://github.com/stripe/stripe-php/pull/568) Enable persistent connections + +## 6.25.0 - 2018-12-10 + +- [#567](https://github.com/stripe/stripe-php/pull/567) Add support for account links + +## 6.24.0 - 2018-11-28 + +- [#562](https://github.com/stripe/stripe-php/pull/562) Add support for the Review resource +- [#564](https://github.com/stripe/stripe-php/pull/564) Add event name constants for subscription schedule aborted/expiring + +## 6.23.0 - 2018-11-27 + +- [#542](https://github.com/stripe/stripe-php/pull/542) Add support for `ValueList` and `ValueListItem` for Radar + +## 6.22.1 - 2018-11-20 + +- [#561](https://github.com/stripe/stripe-php/pull/561) Add cast and some docs to telemetry introduced in 6.22.0/549 + +## 6.22.0 - 2018-11-15 + +- [#549](https://github.com/stripe/stripe-php/pull/549) Add support for client telemetry + +## 6.21.1 - 2018-11-12 + +- [#548](https://github.com/stripe/stripe-php/pull/548) Don't mutate `Exception` class properties from `OAuthBase` error + +## 6.21.0 - 2018-11-08 + +- [#537](https://github.com/stripe/stripe-php/pull/537) Add new API endpoints for the `Invoice` resource. + +## 6.20.1 - 2018-11-07 + +- [#546](https://github.com/stripe/stripe-php/pull/546) Drop files from the Composer package that aren't needed in the release + +## 6.20.0 - 2018-10-30 + +- [#536](https://github.com/stripe/stripe-php/pull/536) Add support for the `Person` resource +- [#541](https://github.com/stripe/stripe-php/pull/541) Add support for the `WebhookEndpoint` resource + +## 6.19.5 - 2018-10-17 + +- [#539](https://github.com/stripe/stripe-php/pull/539) Fix methods on `\Stripe\PaymentIntent` to properly pass arguments to the API. + +## 6.19.4 - 2018-10-11 + +- [#534](https://github.com/stripe/stripe-php/pull/534) Fix PSR-4 autoloading for `\Stripe\FileUpload` class alias + +## 6.19.3 - 2018-10-09 + +- [#530](https://github.com/stripe/stripe-php/pull/530) Add constants for `flow` (`FLOW_*`), `status` (`STATUS_*`) and `usage` (`USAGE_*`) on `\Stripe\Source` + +## 6.19.2 - 2018-10-08 + +- [#531](https://github.com/stripe/stripe-php/pull/531) Store HTTP response headers in case-insensitive array + +## 6.19.1 - 2018-09-25 + +- [#526](https://github.com/stripe/stripe-php/pull/526) Ignore null values in request parameters + +## 6.19.0 - 2018-09-24 + +- [#523](https://github.com/stripe/stripe-php/pull/523) Add support for Stripe Terminal + +## 6.18.0 - 2018-09-24 + +- [#520](https://github.com/stripe/stripe-php/pull/520) Rename `\Stripe\FileUpload` to `\Stripe\File` + +## 6.17.2 - 2018-09-18 + +- [#522](https://github.com/stripe/stripe-php/pull/522) Fix warning when adding a new additional owner to an existing array + +## 6.17.1 - 2018-09-14 + +- [#517](https://github.com/stripe/stripe-php/pull/517) Integer-index encode all sequential arrays + +## 6.17.0 - 2018-09-05 + +- [#514](https://github.com/stripe/stripe-php/pull/514) Add support for reporting resources + +## 6.16.0 - 2018-08-23 + +- [#509](https://github.com/stripe/stripe-php/pull/509) Add support for usage record summaries + +## 6.15.0 - 2018-08-03 + +- [#504](https://github.com/stripe/stripe-php/pull/504) Add cancel support for topups + +## 6.14.0 - 2018-08-02 + +- [#505](https://github.com/stripe/stripe-php/pull/505) Add support for file links + +## 6.13.0 - 2018-07-31 + +- [#502](https://github.com/stripe/stripe-php/pull/502) Add `isDeleted()` method to `\Stripe\StripeObject` + +## 6.12.0 - 2018-07-28 + +- [#501](https://github.com/stripe/stripe-php/pull/501) Add support for scheduled query runs (`\Stripe\Sigma\ScheduledQueryRun`) for Sigma + +## 6.11.0 - 2018-07-26 + +- [#500](https://github.com/stripe/stripe-php/pull/500) Add support for Stripe Issuing + +## 6.10.4 - 2018-07-19 + +- [#498](https://github.com/stripe/stripe-php/pull/498) Internal improvements to the `\Stripe\ApiResource.classUrl()` method + +## 6.10.3 - 2018-07-16 + +- [#497](https://github.com/stripe/stripe-php/pull/497) Use HTTP/2 only for HTTPS requests + +## 6.10.2 - 2018-07-11 + +- [#494](https://github.com/stripe/stripe-php/pull/494) Enable HTTP/2 support + +## 6.10.1 - 2018-07-10 + +- [#493](https://github.com/stripe/stripe-php/pull/493) Add PHPDoc for `auto_advance` on `\Stripe\Invoice` + +## 6.10.0 - 2018-06-28 + +- [#488](https://github.com/stripe/stripe-php/pull/488) Add support for `$appPartnerId` to `Stripe::setAppInfo()` + +## 6.9.0 - 2018-06-28 + +- [#487](https://github.com/stripe/stripe-php/pull/487) Add support for payment intents + +## 6.8.2 - 2018-06-24 + +- [#486](https://github.com/stripe/stripe-php/pull/486) Make `Account.deauthorize()` return the `StripeObject` from the API + +## 6.8.1 - 2018-06-13 + +- [#472](https://github.com/stripe/stripe-php/pull/472) Added phpDoc for `ApiRequestor` and others, especially regarding thrown errors + +## 6.8.0 - 2018-06-13 + +- [#481](https://github.com/stripe/stripe-php/pull/481) Add new `\Stripe\Discount` and `\Stripe\OrderItem` classes, add more PHPDoc describing object attributes + +## 6.7.4 - 2018-05-29 + +- [#480](https://github.com/stripe/stripe-php/pull/480) PHPDoc changes for API version 2018-05-21 and the addition of the new `CHARGE_EXPIRED` event type + +## 6.7.3 - 2018-05-28 + +- [#479](https://github.com/stripe/stripe-php/pull/479) Fix unnecessary traits on `\Stripe\InvoiceLineItem` + +## 6.7.2 - 2018-05-28 + +- [#471](https://github.com/stripe/stripe-php/pull/471) Add `OBJECT_NAME` constant to all API resource classes, add `\Stripe\InvoiceLineItem` class + +## 6.7.1 - 2018-05-13 + +- [#468](https://github.com/stripe/stripe-php/pull/468) Update fields in PHP docs for accuracy + +## 6.7.0 - 2018-05-09 + +- [#466](https://github.com/stripe/stripe-php/pull/466) Add support for issuer fraud records + +## 6.6.0 - 2018-04-11 + +- [#460](https://github.com/stripe/stripe-php/pull/460) Add support for flexible billing primitives + +## 6.5.0 - 2018-04-05 + +- [#461](https://github.com/stripe/stripe-php/pull/461) Don't zero keys on non-`metadata` subobjects + +## 6.4.2 - 2018-03-17 + +- [#458](https://github.com/stripe/stripe-php/pull/458) Add PHPDoc for `account` on `\Stripe\Event` + +## 6.4.1 - 2018-03-02 + +- [#455](https://github.com/stripe/stripe-php/pull/455) Fix namespaces in PHPDoc +- [#456](https://github.com/stripe/stripe-php/pull/456) Fix namespaces for some exceptions + +## 6.4.0 - 2018-02-28 + +- [#453](https://github.com/stripe/stripe-php/pull/453) Add constants for `reason` (`REASON_*`) and `status` (`STATUS_*`) on `\Stripe\Dispute` + +## 6.3.2 - 2018-02-27 + +- [#452](https://github.com/stripe/stripe-php/pull/452) Add PHPDoc for `amount_paid` and `amount_remaining` on `\Stripe\Invoice` + +## 6.3.1 - 2018-02-26 + +- [#443](https://github.com/stripe/stripe-php/pull/443) Add event types as constants to `\Stripe\Event` class + +## 6.3.0 - 2018-02-23 + +- [#450](https://github.com/stripe/stripe-php/pull/450) Add support for `code` attribute on all Stripe exceptions + +## 6.2.0 - 2018-02-21 + +- [#440](https://github.com/stripe/stripe-php/pull/440) Add support for topups +- [#442](https://github.com/stripe/stripe-php/pull/442) Fix PHPDoc for `\Stripe\Error\SignatureVerification` + +## 6.1.0 - 2018-02-12 + +- [#435](https://github.com/stripe/stripe-php/pull/435) Fix header persistence on `Collection` objects +- [#436](https://github.com/stripe/stripe-php/pull/436) Introduce new `Idempotency` error class + +## 6.0.0 - 2018-02-07 + +Major version release. List of backwards incompatible changes to watch out for: + +- The minimum PHP version is now 5.4.0. If you're using PHP 5.3 or older, consider upgrading to a more recent version. + +* `\Stripe\AttachedObject` no longer exists. Attributes that used to be instances of `\Stripe\AttachedObject` (such as `metadata`) are now instances of `\Stripe\StripeObject`. + +- Attributes that used to be PHP arrays (such as `legal_entity->additional_owners` on `\Stripe\Account` instances) are now instances of `\Stripe\StripeObject`, except when they are empty. `\Stripe\StripeObject` has array semantics so this should not be an issue unless you are actively checking types. + +* `\Stripe\Collection` now derives from `\Stripe\StripeObject` rather than from `\Stripe\ApiResource`. + +Pull requests included in this release: + +- [#410](https://github.com/stripe/stripe-php/pull/410) Drop support for PHP 5.3 +- [#411](https://github.com/stripe/stripe-php/pull/411) Use traits for common API operations +- [#414](https://github.com/stripe/stripe-php/pull/414) Use short array syntax +- [#404](https://github.com/stripe/stripe-php/pull/404) Fix serialization logic +- [#417](https://github.com/stripe/stripe-php/pull/417) Remove `ExternalAccount` class +- [#418](https://github.com/stripe/stripe-php/pull/418) Increase test coverage +- [#421](https://github.com/stripe/stripe-php/pull/421) Update CA bundle and add script for future updates +- [#422](https://github.com/stripe/stripe-php/pull/422) Use vendored CA bundle for all requests +- [#428](https://github.com/stripe/stripe-php/pull/428) Support for automatic request retries + +## 5.9.2 - 2018-02-07 + +- [#431](https://github.com/stripe/stripe-php/pull/431) Update PHPDoc @property tags for latest API version + +## 5.9.1 - 2018-02-06 + +- [#427](https://github.com/stripe/stripe-php/pull/427) Add and update PHPDoc @property tags on all API resources + +## 5.9.0 - 2018-01-17 + +- [#421](https://github.com/stripe/stripe-php/pull/421) Updated bundled CA certificates +- [#423](https://github.com/stripe/stripe-php/pull/423) Escape unsanitized input in OAuth example + +## 5.8.0 - 2017-12-20 + +- [#403](https://github.com/stripe/stripe-php/pull/403) Add `__debugInfo()` magic method to `StripeObject` + +## 5.7.0 - 2017-11-28 + +- [#390](https://github.com/stripe/stripe-php/pull/390) Remove some unsupported API methods +- [#391](https://github.com/stripe/stripe-php/pull/391) Alphabetize the list of API resources in `Util::convertToStripeObject()` and add missing resources +- [#393](https://github.com/stripe/stripe-php/pull/393) Fix expiry date update for card sources + +## 5.6.0 - 2017-10-31 + +- [#386](https://github.com/stripe/stripe-php/pull/386) Support for exchange rates APIs + +## 5.5.1 - 2017-10-30 + +- [#387](https://github.com/stripe/stripe-php/pull/387) Allow `personal_address_kana` and `personal_address_kanji` to be updated on an account + +## 5.5.0 - 2017-10-27 + +- [#385](https://github.com/stripe/stripe-php/pull/385) Support for listing source transactions + +## 5.4.0 - 2017-10-24 + +- [#383](https://github.com/stripe/stripe-php/pull/383) Add static methods to manipulate resources from parent + - `Account` gains methods for external accounts and login links (e.g. `createExternalAccount`, `createLoginLink`) + - `ApplicationFee` gains methods for refunds + - `Customer` gains methods for sources + - `Transfer` gains methods for reversals + +## 5.3.0 - 2017-10-11 + +- [#378](https://github.com/stripe/stripe-php/pull/378) Rename source `delete` to `detach` (and deprecate the former) + +## 5.2.3 - 2017-09-27 + +- Add PHPDoc for `Card` + +## 5.2.2 - 2017-09-20 + +- Fix deserialization mapping of `FileUpload` objects + +## 5.2.1 - 2017-09-14 + +- Serialized `shipping` nested attribute + +## 5.2.0 - 2017-08-29 + +- Add support for `InvalidClient` OAuth error + +## 5.1.3 - 2017-08-14 + +- Allow `address_kana` and `address_kanji` to be updated for custom accounts + +## 5.1.2 - 2017-08-01 + +- Fix documented return type of `autoPagingIterator()` (was missing namespace) + +## 5.1.1 - 2017-07-03 + +- Fix order returns to use the right URL `/v1/order_returns` + +## 5.1.0 - 2017-06-30 + +- Add support for OAuth + +## 5.0.0 - 2017-06-27 + +- `pay` on invoice now takes params as well as opts + +## 4.13.0 - 2017-06-19 + +- Add support for ephemeral keys + +## 4.12.0 - 2017-06-05 + +- Clients can implement `getUserAgentInfo()` to add additional user agent information + +## 4.11.0 - 2017-06-05 + +- Implement `Countable` for `AttachedObject` (`metadata` and `additional_owners`) + +## 4.10.0 - 2017-05-25 + +- Add support for login links + +## 4.9.1 - 2017-05-10 + +- Fix docs to include arrays on `$id` parameter for retrieve methods + +## 4.9.0 - 2017-04-28 + +- Support for checking webhook signatures + +## 4.8.1 - 2017-04-24 + +- Allow nested field `payout_schedule` to be updated + +## 4.8.0 - 2017-04-20 + +- Add `\Stripe\Stripe::setLogger()` to support an external PSR-3 compatible logger + +## 4.7.0 - 2017-04-10 + +- Add support for payouts and recipient transfers + +## 4.6.0 - 2017-04-06 + +- Please see 4.7.0 instead (no-op release) + +## 4.5.1 - 2017-03-22 + +- Remove hard dependency on cURL + +## 4.5.0 - 2017-03-20 + +- Support for detaching sources from customers + +## 4.4.2 - 2017-02-27 + +- Correct handling of `owner` parameter when updating sources + +## 4.4.1 - 2017-02-24 + +- Correct the error check on a bad JSON decoding + +## 4.4.0 - 2017-01-18 + +- Add support for updating sources + +## 4.3.0 - 2016-11-30 + +- Add support for verifying sources + +## 4.2.0 - 2016-11-21 + +- Add retrieve method for 3-D Secure resources + +## 4.1.1 - 2016-10-21 + +- Add docblock with model properties for `Plan` + +## 4.1.0 - 2016-10-18 + +- Support for 403 status codes (permission denied) + +## 4.0.1 - 2016-10-17 + +- Fix transfer reversal materialization +- Fixes for some property definitions in docblocks + +## 4.0.0 - 2016-09-28 + +- Support for subscription items +- Drop attempt to force TLS 1.2: please note that this could be breaking if you're using old OS distributions or packages and upgraded recently (so please make sure to test your integration!) + +## 3.23.0 - 2016-09-15 + +- Add support for Apple Pay domains + +## 3.22.0 - 2016-09-13 + +- Add `Stripe::setAppInfo` to allow plugins to register user agent information + +## 3.21.0 - 2016-08-25 + +- Add `Source` model for generic payment sources + +## 3.20.0 - 2016-08-08 + +- Add `getDeclineCode` to card errors + +## 3.19.0 - 2016-07-29 + +- Opt requests directly into TLS 1.2 where OpenSSL >= 1.0.1 (see #277 for context) + +## 3.18.0 - 2016-07-28 + +- Add new `STATUS_` constants for subscriptions + +## 3.17.1 - 2016-07-28 + +- Fix auto-paging iterator so that it plays nicely with `iterator_to_array` + +## 3.17.0 - 2016-07-14 + +- Add field annotations to model classes for better editor hinting + +## 3.16.0 - 2016-07-12 + +- Add `ThreeDSecure` model for 3-D secure payments + +## 3.15.0 - 2016-06-29 + +- Add static `update` method to all resources that can be changed. + +## 3.14.3 - 2016-06-20 + +- Make sure that cURL never sends `Expects: 100-continue`, even on large request bodies + +## 3.14.2 - 2016-06-03 + +- Add `inventory` under `SKU` to list of keys that have nested data and can be updated + +## 3.14.1 - 2016-05-27 + +- Fix some inconsistencies in PHPDoc + +## 3.14.0 - 2016-05-25 + +- Add support for returning Relay orders + +## 3.13.0 - 2016-05-04 + +- Add `list`, `create`, `update`, `retrieve`, and `delete` methods to the Subscription class + +## 3.12.1 - 2016-04-07 + +- Additional check on value arrays for some extra safety + +## 3.12.0 - 2016-03-31 + +- Fix bug `refreshFrom` on `StripeObject` would not take an `$opts` array +- Fix bug where `$opts` not passed to parent `save` method in `Account` +- Fix bug where non-existent variable was referenced in `reverse` in `Transfer` +- Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1 + +## 3.11.0 - 2016-03-22 + +- Allow `CurlClient` to be initialized with default `CURLOPT_*` options + +## 3.10.1 - 2016-03-22 + +- Fix bug where request params and options were ignored in `ApplicationFee`'s `refund.` + +## 3.10.0 - 2016-03-15 + +- Add `reject` on `Account` to support the new API feature + +## 3.9.2 - 2016-03-04 + +- Fix error when an object's metadata is set more than once + +## 3.9.1 - 2016-02-24 + +- Fix encoding behavior of nested arrays for requests (see #227) + +## 3.9.0 - 2016-02-09 + +- Add automatic pagination mechanism with `autoPagingIterator()` +- Allow global account ID to be set with `Stripe::setAccountId()` + +## 3.8.0 - 2016-02-08 + +- Add `CountrySpec` model for looking up country payment information + +## 3.7.1 - 2016-02-01 + +- Update bundled CA certs + +## 3.7.0 - 2016-01-27 + +- Support deleting Relay products and SKUs + +## 3.6.0 - 2016-01-05 + +- Allow configuration of HTTP client timeouts + +## 3.5.0 - 2015-12-01 + +- Add a verification routine for external accounts + +## 3.4.0 - 2015-09-14 + +- Products, SKUs, and Orders -- https://stripe.com/relay + +## 3.3.0 - 2015-09-11 + +- Add support for 429 Rate Limit response + +## 3.2.0 - 2015-08-17 + +- Add refund listing and retrieval without an associated charge + +## 3.1.0 - 2015-08-03 + +- Add dispute listing and retrieval +- Add support for manage account deletion + +## 3.0.0 - 2015-07-28 + +- Rename `\Stripe\Object` to `\Stripe\StripeObject` (PHP 7 compatibility) +- Rename `getCode` and `getParam` in exceptions to `getStripeCode` and `getStripeParam` +- Add support for calling `json_encode` on Stripe objects in PHP 5.4+ +- Start supporting/testing PHP 7 + +## 2.3.0 - 2015-07-06 + +- Add request ID to all Stripe exceptions + +## 2.2.0 - 2015-06-01 + +- Add support for Alipay accounts as sources +- Add support for bank accounts as sources (private beta) +- Add support for bank accounts and cards as external_accounts on Account objects + +## 2.1.4 - 2015-05-13 + +- Fix CA certificate file path (thanks @lphilps & @matthewarkin) + +## 2.1.3 - 2015-05-12 + +- Fix to account updating to permit `tos_acceptance` and `personal_address` to be set properly +- Fix to Transfer reversal creation (thanks @neatness!) +- Network requests are now done through a swappable class for easier mocking + +## 2.1.2 - 2015-04-10 + +- Remove SSL cert revokation checking (all pre-Heartbleed certs have expired) +- Bug fixes to account updating + +## 2.1.1 - 2015-02-27 + +- Support transfer reversals + +## 2.1.0 - 2015-02-19 + +- Support new API version (2015-02-18) +- Added Bitcoin Receiever update and delete actions +- Edited tests to prefer "source" over "card" as per new API version + +## 2.0.1 - 2015-02-16 + +- Fix to fetching endpoints that use a non-default baseUrl (`FileUpload`) + +## 2.0.0 - 2015-02-14 + +- Bumped minimum version to 5.3.3 +- Switched to Stripe namespace instead of Stripe\_ class name prefiexes (thanks @chadicus!) +- Switched tests to PHPUnit (thanks @chadicus!) +- Switched style guide to PSR2 (thanks @chadicus!) +- Added \$opts hash to the end of most methods: this permits passing 'idempotency_key', 'stripe_account', or 'stripe_version'. The last 2 will persist across multiple object loads. +- Added support for retrieving Account by ID + +## 1.18.0 - 2015-01-21 + +- Support making bitcoin charges through BitcoinReceiver source object + +## 1.17.5 - 2014-12-23 + +- Adding support for creating file uploads. + +## 1.17.4 - 2014-12-15 + +- Saving objects fetched with a custom key now works (thanks @JustinHook & @jpasilan) +- Added methods for reporting charges as safe or fraudulent and for specifying the reason for refunds + +## 1.17.3 - 2014-11-06 + +- Better handling of HHVM support for SSL certificate blacklist checking. + +## 1.17.2 - 2014-09-23 + +- Coupons now are backed by a `Stripe_Coupon` instead of `Stripe_Object`, and support updating metadata +- Running operations (`create`, `retrieve`, `all`) on upcoming invoice items now works + +## 1.17.1 - 2014-07-31 + +- Requests now send Content-Type header + +## 1.17.0 - 2014-07-29 + +- Application Fee refunds now a list instead of array +- HHVM now works +- Small bug fixes (thanks @bencromwell & @fastest963) +- `__toString` now returns the name of the object in addition to its JSON representation + +## 1.16.0 - 2014-06-17 + +- Add metadata for refunds and disputes + +## 1.15.0 - 2014-05-28 + +- Support canceling transfers + +## 1.14.1 - 2014-05-21 + +- Support cards for recipients. + +## 1.13.1 - 2014-05-15 + +- Fix bug in account resource where `id` wasn't in the result + +## 1.13.0 - 2014-04-10 + +- Add support for certificate blacklisting +- Update ca bundle +- Drop support for HHVM (Temporarily) + +## 1.12.0 - 2014-04-01 + +- Add Stripe_RateLimitError for catching rate limit errors. +- Update to Zend coding style (thanks, @jpiasetz) + +## 1.11.0 - 2014-01-29 + +- Add support for multiple subscriptions per customer + +## 1.10.1 - 2013-12-02 + +- Add new ApplicationFee + +## 1.9.1 - 2013-11-08 + +- Fix a bug where a null nestable object causes warnings to fire. + +## 1.9.0 - 2013-10-16 + +- Add support for metadata API. + +## 1.8.4 - 2013-09-18 + +- Add support for closing disputes. + +## 1.8.3 - 2013-08-13 + +- Add new Balance and BalanceTransaction + +## 1.8.2 - 2013-08-12 + +- Add support for unsetting attributes by updating to NULL. Setting properties to a blank string is now an error. + +## 1.8.1 - 2013-07-12 + +- Add support for multiple cards API (Stripe API version 2013-07-12: https://stripe.com/docs/upgrades#2013-07-05) + +## 1.8.0 - 2013-04-11 + +- Allow Transfers to be creatable +- Add new Recipient resource + +## 1.7.15 - 2013-02-21 + +- Add 'id' to the list of permanent object attributes + +## 1.7.14 - 2013-02-20 + +- Don't re-encode strings that are already encoded in UTF-8. If you were previously using plan or coupon objects with UTF-8 IDs, they may have been treated as ISO-8859-1 (Latin-1) and encoded to UTF-8 a 2nd time. You may now need to pass the IDs to utf8_encode before passing them to Stripe_Plan::retrieve or Stripe_Coupon::retrieve. +- Ensure that all input is encoded in UTF-8 before submitting it to Stripe's servers. (github issue #27) + +## 1.7.13 - 2013-02-01 + +- Add support for passing options when retrieving Stripe objects e.g., Stripe_Charge::retrieve(array("id"=>"foo", "expand" => array("customer"))); Stripe_Charge::retrieve("foo") will continue to work + +## 1.7.12 - 2013-01-15 + +- Add support for setting a Stripe API version override + +## 1.7.11 - 2012-12-30 + +- Version bump to cleanup constants and such (fix issue #26) + +## 1.7.10 - 2012-11-08 + +- Add support for updating charge disputes. +- Fix bug preventing retrieval of null attributes + +## 1.7.9 - 2012-11-08 + +- Fix usage under autoloaders such as the one generated by composer (fix issue #22) + +## 1.7.8 - 2012-10-30 + +- Add support for creating invoices. +- Add support for new invoice lines return format +- Add support for new list objects + +## 1.7.7 - 2012-09-14 + +- Get all of the various version numbers in the repo in sync (no other changes) + +## 1.7.6 - 2012-08-31 + +- Add update and pay methods to Invoice resource + +## 1.7.5 - 2012-08-23 + +- Change internal function names so that Stripe_SingletonApiRequest is E_STRICT-clean (github issue #16) + +## 1.7.4 - 2012-08-21 + +- Bugfix so that Stripe objects (e.g. Customer, Charge objects) used in API calls are transparently converted to their object IDs + +## 1.7.3 - 2012-08-15 + +- Add new Account resource + +## 1.7.2 - 2012-06-26 + +- Make clearer that you should be including lib/Stripe.php, not test/Stripe.php (github issue #14) + +## 1.7.1 - 2012-05-24 + +- Add missing argument to Stripe_InvalidRequestError constructor in Stripe_ApiResource::instanceUrl. Fixes a warning when Stripe_ApiResource::instanceUrl is called on a resource with no ID (fix issue #12) + +## 1.7.0 - 2012-05-17 + +- Support Composer and Packagist (github issue #9) +- Add new deleteDiscount method to Stripe_Customer +- Add new Transfer resource +- Switch from using HTTP Basic auth to Bearer auth. (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward) +- Numerous test suite improvements diff --git a/libraries/Stripe/CODE_OF_CONDUCT.md b/libraries/Stripe/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..349f5a0bfd7 --- /dev/null +++ b/libraries/Stripe/CODE_OF_CONDUCT.md @@ -0,0 +1,77 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at conduct@stripe.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq + diff --git a/libraries/Stripe/LICENSE b/libraries/Stripe/LICENSE new file mode 100644 index 00000000000..847c705ad35 --- /dev/null +++ b/libraries/Stripe/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010-2019 Stripe, Inc. (https://stripe.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/libraries/Stripe/Makefile b/libraries/Stripe/Makefile new file mode 100644 index 00000000000..8867338753f --- /dev/null +++ b/libraries/Stripe/Makefile @@ -0,0 +1,39 @@ +export PHPDOCUMENTOR_VERSION := v3.0.0 + +vendor: composer.json + composer install + +vendor/bin/phpdoc: vendor + curl -sfL https://github.com/phpDocumentor/phpDocumentor/releases/download/$(PHPDOCUMENTOR_VERSION)/phpDocumentor.phar -o vendor/bin/phpdoc + chmod +x vendor/bin/phpdoc + +test: vendor + vendor/bin/phpunit +.PHONY: test + +fmt: vendor + vendor/bin/php-cs-fixer fix -v --using-cache=no . +.PHONY: fmt + +fmtcheck: vendor + vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no . +.PHONY: fmtcheck + +phpdoc: vendor/bin/phpdoc + vendor/bin/phpdoc + +phpstan: vendor + php -d memory_limit=512M vendor/bin/phpstan analyse lib tests +.PHONY: phpstan + +phpstan-baseline: vendor/bin/phpstan + php -d memory_limit=512M vendor/bin/phpstan analyse lib tests --generate-baseline +.PHONY: phpstan-baseline + +update-version: + @echo "$(VERSION)" > VERSION + @perl -pi -e 's|VERSION = '\''[.\d]+'\''|VERSION = '\''$(VERSION)'\''|' lib/Stripe.php +.PHONY: update-version + +codegen-format: fmt +.PHONY: codegen-format diff --git a/libraries/Stripe/README.md b/libraries/Stripe/README.md new file mode 100644 index 00000000000..e9d25ad9fee --- /dev/null +++ b/libraries/Stripe/README.md @@ -0,0 +1,270 @@ +# Stripe PHP bindings + +[![Build Status](https://travis-ci.org/stripe/stripe-php.svg?branch=master)](https://travis-ci.org/stripe/stripe-php) +[![Latest Stable Version](https://poser.pugx.org/stripe/stripe-php/v/stable.svg)](https://packagist.org/packages/stripe/stripe-php) +[![Total Downloads](https://poser.pugx.org/stripe/stripe-php/downloads.svg)](https://packagist.org/packages/stripe/stripe-php) +[![License](https://poser.pugx.org/stripe/stripe-php/license.svg)](https://packagist.org/packages/stripe/stripe-php) + +The Stripe PHP library provides convenient access to the Stripe API from +applications written in the PHP language. It includes a pre-defined set of +classes for API resources that initialize themselves dynamically from API +responses which makes it compatible with a wide range of versions of the Stripe +API. + +## Requirements + +PHP 5.6.0 and later. + +## Composer + +You can install the bindings via [Composer](http://getcomposer.org/). Run the following command: + +```bash +composer require stripe/stripe-php +``` + +To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading): + +```php +require_once('vendor/autoload.php'); +``` + +## Manual Installation + +If you do not wish to use Composer, you can download the [latest release](https://github.com/stripe/stripe-php/releases). Then, to use the bindings, include the `init.php` file. + +```php +require_once('/path/to/stripe-php/init.php'); +``` + +## Dependencies + +The bindings require the following extensions in order to work properly: + +- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer +- [`json`](https://secure.php.net/manual/en/book.json.php) +- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String) + +If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available. + +## Getting Started + +Simple usage looks like: + +```php +$stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); +$customer = $stripe->customers->create([ + 'description' => 'example customer', + 'email' => 'email@example.com', + 'payment_method' => 'pm_card_visa', +]); +echo $customer; +``` + +### Client/service patterns vs legacy patterns + +You can continue to use the legacy integration patterns used prior to version [7.33.0](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#7330---2020-05-14). Review the [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-to-StripeClient-and-services-in-7.33.0) for the backwards-compatible client/services pattern changes. + +## Documentation + +See the [PHP API docs](https://stripe.com/docs/api/?lang=php#intro). + +See [video demonstrations][youtube-playlist] covering how to use the library. + +## Legacy Version Support + +### PHP 5.4 & 5.5 + +If you are using PHP 5.4 or 5.5, you should consider upgrading your environment as those versions have been past end of life since September 2015 and July 2016 respectively. +Otherwise, you can still use Stripe by downloading stripe-php v6.43.1 ([zip](https://github.com/stripe/stripe-php/archive/v6.43.1.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/6.43.1.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will work but might not support recent features we added since the version was released and upgrading PHP is the best course of action. + +### PHP 5.3 + +If you are using PHP 5.3, you should upgrade your environment as this version has been past end of life since August 2014. +Otherwise, you can download v5.9.2 ([zip](https://github.com/stripe/stripe-php/archive/v5.9.2.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/v5.9.2.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will continue to work with new versions of the Stripe API for all common uses. + +## Custom Request Timeouts + +_NOTE:_ We do not recommend decreasing the timeout for non-read-only calls (e.g. charge creation), since even if you locally timeout, the request on Stripe's side can still complete. If you are decreasing timeouts on these calls, make sure to use [idempotency tokens](https://stripe.com/docs/api/?lang=php#idempotent_requests) to avoid executing the same transaction twice as a result of timeout retry logic. + +To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient. + +```php +// set up your tweaked Curl client +$curl = new \Stripe\HttpClient\CurlClient(); +$curl->setTimeout(10); // default is \Stripe\HttpClient\CurlClient::DEFAULT_TIMEOUT +$curl->setConnectTimeout(5); // default is \Stripe\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT + +echo $curl->getTimeout(); // 10 +echo $curl->getConnectTimeout(); // 5 + +// tell Stripe to use the tweaked client +\Stripe\ApiRequestor::setHttpClient($curl); + +// use the Stripe API client as you normally would +``` + +## Custom cURL Options (e.g. proxies) + +Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here. + +```php +// set up your tweaked Curl client +$curl = new \Stripe\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']); +// tell Stripe to use the tweaked client +\Stripe\ApiRequestor::setHttpClient($curl); +``` + +Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent. + +### Configuring a Logger + +The library does minimal logging, but it can be configured +with a [`PSR-3` compatible logger][psr3] so that messages +end up there instead of `error_log`: + +```php +\Stripe\Stripe::setLogger($logger); +``` + +### Accessing response data + +You can access the data from the last API response on any object via `getLastResponse()`. + +```php +$customer = $stripe->customers->create([ + 'description' => 'example customer', +]); +echo $customer->getLastResponse()->headers['Request-Id']; +``` + +### SSL / TLS compatibility issues + +Stripe's API now requires that [all connections use TLS 1.2](https://stripe.com/blog/upgrading-tls). Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default. In this case, you'd get an `invalid_request_error` with the following error message: "Stripe no longer supports API requests made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at [https://stripe.com/blog/upgrading-tls](https://stripe.com/blog/upgrading-tls).". + +The recommended course of action is to [upgrade your cURL and OpenSSL packages](https://support.stripe.com/questions/how-do-i-upgrade-my-stripe-integration-from-tls-1-0-to-tls-1-2#php) so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`: + +```php +$curl = new \Stripe\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]); +\Stripe\ApiRequestor::setHttpClient($curl); +``` + +### Per-request Configuration + +For apps that need to use multiple keys during the lifetime of a process, like +one that uses [Stripe Connect][connect], it's also possible to set a +per-request key and/or account: + +```php +$customers = $stripe->customers->all([],[ + 'api_key' => 'sk_test_...', + 'stripe_account' => 'acct_...' +]); + +$stripe->customers->retrieve('cus_123456789', [], [ + 'api_key' => 'sk_test_...', + 'stripe_account' => 'acct_...' +]); +``` + +### Configuring CA Bundles + +By default, the library will use its own internal bundle of known CA +certificates, but it's possible to configure your own: + +```php +\Stripe\Stripe::setCABundlePath("path/to/ca/bundle"); +``` + +### Configuring Automatic Retries + +The library can be configured to automatically retry requests that fail due to +an intermittent network problem: + +```php +\Stripe\Stripe::setMaxNetworkRetries(2); +``` + +[Idempotency keys][idempotency-keys] are added to requests to guarantee that +retries are safe. + +### Request latency telemetry + +By default, the library sends request latency telemetry to Stripe. These +numbers help Stripe improve the overall latency of its API for all users. + +You can disable this behavior if you prefer: + +```php +\Stripe\Stripe::setEnableTelemetry(false); +``` + +## Development + +Get [Composer][composer]. For example, on Mac OS: + +```bash +brew install composer +``` + +Install dependencies: + +```bash +composer install +``` + +The test suite depends on [stripe-mock], so make sure to fetch and run it from a +background terminal ([stripe-mock's README][stripe-mock] also contains +instructions for installing via Homebrew and other methods): + +```bash +go get -u github.com/stripe/stripe-mock +stripe-mock +``` + +Install dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite: + +```bash +./vendor/bin/phpunit +``` + +Or to run an individual test file: + +```bash +./vendor/bin/phpunit tests/Stripe/UtilTest.php +``` + +Update bundled CA certificates from the [Mozilla cURL release][curl]: + +```bash +./update_certs.php +``` + +The library uses [PHP CS Fixer][php-cs-fixer] for code formatting. Code must be formatted before PRs are submitted, otherwise CI will fail. Run the formatter with: + +```bash +./vendor/bin/php-cs-fixer fix -v . +``` + +## Attention plugin developers + +Are you writing a plugin that integrates Stripe and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example: + +```php +\Stripe\Stripe::setAppInfo("MyAwesomePlugin", "1.2.34", "https://myawesomeplugin.info"); +``` + +The method should be called once, before any request is sent to the API. The second and third parameters are optional. + +### SSL / TLS configuration option + +See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to ensure that your plugin can be used on all systems, you should add a configuration option to let your users choose between different values for `CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`. + +[composer]: https://getcomposer.org/ +[connect]: https://stripe.com/connect +[curl]: http://curl.haxx.se/docs/caextract.html +[idempotency-keys]: https://stripe.com/docs/api/?lang=php#idempotent_requests +[php-cs-fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer +[psr3]: http://www.php-fig.org/psr/psr-3/ +[stripe-mock]: https://github.com/stripe/stripe-mock +[youtube-playlist]: https://www.youtube.com/playlist?list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE diff --git a/libraries/Stripe/VERSION b/libraries/Stripe/VERSION new file mode 100644 index 00000000000..5a14c98b152 --- /dev/null +++ b/libraries/Stripe/VERSION @@ -0,0 +1 @@ +7.128.0 diff --git a/libraries/Stripe/build.php b/libraries/Stripe/build.php new file mode 100644 index 00000000000..e0193ca7623 --- /dev/null +++ b/libraries/Stripe/build.php @@ -0,0 +1,25 @@ +#!/usr/bin/env php +=5.6.0", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^9.0", + "squizlabs/php_codesniffer": "^3.3", + "friendsofphp/php-cs-fixer": "3.5.0", + "phpstan/phpstan": "^1.2" + }, + "autoload": { + "psr-4": { + "Stripe\\": "lib/" + } + }, + "autoload-dev": { + "psr-4": { + "Stripe\\": [ + "tests/", + "tests/Stripe/" + ] + } + }, + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + } +} diff --git a/libraries/Stripe/data/ca-certificates.crt b/libraries/Stripe/data/ca-certificates.crt new file mode 100644 index 00000000000..65be2181db5 --- /dev/null +++ b/libraries/Stripe/data/ca-certificates.crt @@ -0,0 +1,3476 @@ +## +## Bundle of CA Root Certificates +## +## Certificate data from Mozilla as of: Wed Aug 28 03:12:10 2019 GMT +## +## This is a bundle of X.509 certificates of public Certificate Authorities +## (CA). These were automatically extracted from Mozilla's root certificates +## file (certdata.txt). This file can be found in the mozilla source tree: +## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt +## +## It contains the certificates in PEM format and therefore +## can be directly used with curl / libcurl / php_curl, or with +## an Apache+mod_ssl webserver for SSL client authentication. +## Just configure this file as the SSLCACertificateFile. +## +## Conversion done with mk-ca-bundle.pl version 1.27. +## SHA256: fffa309937c3be940649293f749b8207fabc6eb224e50e4bb3f2c5e44e0d6a6b +## + + +GlobalSign Root CA +================== +-----BEGIN CERTIFICATE----- +MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx +GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds +b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV +BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD +VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa +DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc +THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb +Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP +c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX +gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF +AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj +Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG +j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH +hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC +X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== +-----END CERTIFICATE----- + +GlobalSign Root CA - R2 +======================= +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6 +ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp +s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN +S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL +TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C +ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E +FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i +YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN +BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp +9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu +01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7 +9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 +TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy +dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1 +EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc +cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw +EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj +055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA +ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f +j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC +/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 +xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa +t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== +-----END CERTIFICATE----- + +Entrust.net Premium 2048 Secure Server CA +========================================= +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u +ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp +bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV +BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx +NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 +d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl +MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u +ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL +Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr +hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW +nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi +VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ +KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy +T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf +zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT +J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e +nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= +-----END CERTIFICATE----- + +Baltimore CyberTrust Root +========================= +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE +ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li +ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC +SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs +dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME +uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB +UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C +G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 +XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr +l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI +VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB +BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh +cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 +hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa +Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H +RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +AddTrust External Root +====================== +-----BEGIN CERTIFICATE----- +MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD +VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw +NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU +cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg +Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821 ++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw +Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo +aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy +2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7 +7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P +BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL +VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk +VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB +IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl +j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 +6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355 +e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u +G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= +-----END CERTIFICATE----- + +Entrust Root Certification Authority +==================================== +-----BEGIN CERTIFICATE----- +MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw +b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG +A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 +MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu +MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu +Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v +dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz +A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww +Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 +j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN +rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 +MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH +hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA +A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM +Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa +v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS +W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 +tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 +-----END CERTIFICATE----- + +GeoTrust Global CA +================== +-----BEGIN CERTIFICATE----- +MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK +Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw +MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j +LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo +BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet +8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc +T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU +vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk +DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q +zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 +d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2 +mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p +XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm +Mw== +-----END CERTIFICATE----- + +GeoTrust Universal CA +===================== +-----BEGIN CERTIFICATE----- +MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 +MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu +Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t +JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e +RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs +7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d +8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V +qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga +Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB +Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu +KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08 +ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0 +XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB +hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc +aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2 +qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL +oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK +xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF +KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2 +DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK +xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU +p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI +P/rmMuGNG2+k5o7Y+SlIis5z/iw= +-----END CERTIFICATE----- + +GeoTrust Universal CA 2 +======================= +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0 +MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg +SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0 +DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17 +j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q +JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a +QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2 +WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP +20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn +ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC +SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG +8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2 ++/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E +BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z +dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ +4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+ +mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq +A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg +Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP +pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d +FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp +gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm +X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS +-----END CERTIFICATE----- + +Comodo AAA Services root +======================== +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw +MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl +c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV +BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG +C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs +i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW +Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH +Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK +Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f +BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl +cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz +LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm +7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z +8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C +12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +QuoVadis Root CA +================ +-----BEGIN CERTIFICATE----- +MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE +ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 +eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz +MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp +cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD +EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk +J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL +F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL +YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen +AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w +PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y +ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7 +MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj +YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs +ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh +Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW +Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu +BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw +FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6 +tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo +fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul +LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x +gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi +5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi +5nrQNiOKSnQ2+Q== +-----END CERTIFICATE----- + +QuoVadis Root CA 2 +================== +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx +ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 +XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk +lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB +lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy +lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt +66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn +wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh +D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy +BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie +J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud +DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU +a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT +ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv +Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3 +UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm +VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK ++JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW +IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 +WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X +f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II +4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 +VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u +-----END CERTIFICATE----- + +QuoVadis Root CA 3 +================== +-----BEGIN CERTIFICATE----- +MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx +OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg +DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij +KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K +DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv +BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp +p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 +nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX +MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM +Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz +uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT +BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj +YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 +aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB +BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD +VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4 +ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE +AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV +qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s +hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z +POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 +Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp +8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC +bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu +g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p +vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr +qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= +-----END CERTIFICATE----- + +Security Communication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw +8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM +DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX +5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd +DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 +JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g +0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a +mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ +s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ +6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi +FL39vmwLAw== +-----END CERTIFICATE----- + +Sonera Class 2 Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG +U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw +NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh +IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3 +/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT +dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG +f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P +tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH +nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT +XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt +0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI +cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph +Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx +EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH +llpwrN9M +-----END CERTIFICATE----- + +XRamp Global CA Root +==================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE +BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj +dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx +HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg +U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu +IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx +foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE +zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs +AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry +xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap +oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC +AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc +/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt +qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n +nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz +8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw= +-----END CERTIFICATE----- + +Go Daddy Class 2 CA +=================== +-----BEGIN CERTIFICATE----- +MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY +VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG +A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g +RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD +ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv +2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 +qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j +YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY +vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O +BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o +atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu +MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG +A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim +PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt +I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI +Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b +vZ8= +-----END CERTIFICATE----- + +Starfield Class 2 CA +==================== +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc +U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo +MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG +A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG +SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY +bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ +JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm +epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN +F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF +MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f +hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo +bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs +afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM +PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD +KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 +QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- + +Taiwan GRCA +=========== +-----BEGIN CERTIFICATE----- +MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG +EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X +DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv +dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN +w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 +BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O +1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO +htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov +J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7 +Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t +B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB +O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8 +lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV +HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2 +09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ +TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj +Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2 +Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU +D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz +DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk +Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk +7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ +CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy ++fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS +-----END CERTIFICATE----- + +DigiCert Assured ID Root CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx +MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO +9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy +UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW +/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy +oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf +GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF +66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq +hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc +EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn +SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i +8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe ++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== +-----END CERTIFICATE----- + +DigiCert Global Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw +MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn +TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 +BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H +4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y +7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB +o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm +8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF +BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr +EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt +tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 +UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- + +DigiCert High Assurance EV Root CA +================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw +KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw +MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ +MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu +Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t +Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS +OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 +MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ +NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe +h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB +Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY +JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ +V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp +myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK +mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K +-----END CERTIFICATE----- + +Certplus Class 2 Primary CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE +BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN +OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy +dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR +5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ +Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO +YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e +e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME +CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ +YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t +L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD +P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R +TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+ +7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW +//1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7 +l7+ijrRU +-----END CERTIFICATE----- + +DST Root CA X3 +============== +-----BEGIN CERTIFICATE----- +MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK +ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X +DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1 +cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT +rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9 +UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy +xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d +utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ +MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug +dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE +GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw +RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS +fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ +-----END CERTIFICATE----- + +SwissSign Gold CA - G2 +====================== +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw +EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN +MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp +c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq +t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C +jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg +vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF +ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR +AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend +jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO +peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR +7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi +GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64 +OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov +L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm +5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr +44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf +Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m +Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp +mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk +vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf +KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br +NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj +viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ +-----END CERTIFICATE----- + +SwissSign Silver CA - G2 +======================== +-----BEGIN CERTIFICATE----- +MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT +BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X +DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 +aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 +N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm ++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH +6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu +MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h +qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 +FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs +ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc +celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X +CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB +tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 +cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P +4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F +kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L +3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx +/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa +DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP +e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu +WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ +DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub +DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG +EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ +cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN +b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9 +nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge +RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt +tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI +hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K +Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN +NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa +Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG +1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= +-----END CERTIFICATE----- + +thawte Primary Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3 +MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg +SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv +KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT +FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs +oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ +1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc +q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K +aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p +afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF +AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE +uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX +xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89 +jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH +z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G5 +============================================================ +-----BEGIN CERTIFICATE----- +MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB +yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln +biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh +dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt +YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz +j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD +Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/ +Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r +fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/ +BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv +Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy +aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG +SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+ +X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE +KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC +Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE +ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq +-----END CERTIFICATE----- + +SecureTrust CA +============== +-----BEGIN CERTIFICATE----- +MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy +dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe +BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX +OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t +DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH +GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b +01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH +ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj +aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu +SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf +mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ +nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR +3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= +-----END CERTIFICATE----- + +Secure Global CA +================ +-----BEGIN CERTIFICATE----- +MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH +bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg +MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg +Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx +YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ +bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g +8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV +HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi +0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn +oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA +MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ +OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn +CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 +3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc +f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW +-----END CERTIFICATE----- + +COMODO Certification Authority +============================== +-----BEGIN CERTIFICATE----- +MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb +MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD +T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH ++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww +xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV +4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA +1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI +rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k +b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC +AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP +OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ +RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc +IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN ++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== +-----END CERTIFICATE----- + +Network Solutions Certificate Authority +======================================= +-----BEGIN CERTIFICATE----- +MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG +EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr +IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx +MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu +MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx +jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT +aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT +crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc +/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB +AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv +bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA +A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q +4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ +GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv +wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD +ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey +-----END CERTIFICATE----- + +COMODO ECC Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix +GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR +Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X +4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni +wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG +FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA +U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GA CA +=============================== +-----BEGIN CERTIFICATE----- +MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE +BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG +A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH +bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD +VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw +IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 +IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 +Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg +Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD +d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ +/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R +LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm +MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 ++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa +hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY +okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= +-----END CERTIFICATE----- + +Certigna +======== +-----BEGIN CERTIFICATE----- +MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw +EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3 +MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI +Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q +XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH +GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p +ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg +DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf +Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ +tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ +BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J +SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA +hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ +ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu +PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY +1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw +WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== +-----END CERTIFICATE----- + +Deutsche Telekom Root CA 2 +========================== +-----BEGIN CERTIFICATE----- +MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT +RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG +A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5 +MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G +A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS +b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5 +bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI +KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY +AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK +Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV +jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV +HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr +E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy +zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8 +rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G +dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU +Cm26OWMohpLzGITY+9HPBVZkVw== +-----END CERTIFICATE----- + +Cybertrust Global Root +====================== +-----BEGIN CERTIFICATE----- +MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li +ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4 +MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD +ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA ++Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW +0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL +AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin +89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT +8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2 +MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G +A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO +lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi +5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2 +hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T +X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW +WL1WMRJOEcgh4LMRkWXbtKaIOM5V +-----END CERTIFICATE----- + +ePKI Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG +EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg +Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx +MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq +MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs +IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi +lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv +qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX +12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O +WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ +ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao +lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/ +vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi +Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi +MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH +ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 +1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq +KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV +xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP +NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r +GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE +xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx +gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy +sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD +BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= +-----END CERTIFICATE----- + +certSIGN ROOT CA +================ +-----BEGIN CERTIFICATE----- +MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD +VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa +Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE +CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I +JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH +rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 +ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD +0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943 +AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B +Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB +AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8 +SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0 +x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt +vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz +TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G3 +============================================= +-----BEGIN CERTIFICATE----- +MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE +BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0 +IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz +NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo +YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT +LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j +K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE +c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C +IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu +dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr +2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9 +cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE +Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD +AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s +t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt +-----END CERTIFICATE----- + +thawte Primary Root CA - G2 +=========================== +-----BEGIN CERTIFICATE----- +MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC +VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu +IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg +Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV +MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG +b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt +IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS +LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 +8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU +mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN +G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K +rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== +-----END CERTIFICATE----- + +thawte Primary Root CA - G3 +=========================== +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w +ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh +d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD +VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG +A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At +P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC ++BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY +7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW +vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ +KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK +A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu +t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC +8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm +er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G2 +============================================= +-----BEGIN CERTIFICATE----- +MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC +VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu +Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1 +OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg +MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl +b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG +BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc +KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+ +EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m +ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2 +npaqBA+K +-----END CERTIFICATE----- + +VeriSign Universal Root Certification Authority +=============================================== +-----BEGIN CERTIFICATE----- +MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj +1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP +MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72 +9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I +AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR +tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G +CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O +a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud +DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3 +Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx +Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx +P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P +wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 +mJO37M2CYfE45k+XmCpajQ== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G4 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC +VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 +b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz +ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL +MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU +cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo +b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 +Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz +rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw +HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u +Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD +A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx +AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== +-----END CERTIFICATE----- + +NetLock Arany (Class Gold) Főtanúsítvány +======================================== +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G +A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 +dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB +cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx +MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO +ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv +biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 +c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu +0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw +/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk +H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw +fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 +neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW +qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta +YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC +bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna +NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu +dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G2 +================================== +-----BEGIN CERTIFICATE----- +MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ +5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn +vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj +CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil +e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR +OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI +CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65 +48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi +trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737 +qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB +AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC +ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV +HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA +A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz ++51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj +f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN +kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk +CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF +URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb +CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h +oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV +IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm +66+KAQ== +-----END CERTIFICATE----- + +Hongkong Post Root CA 1 +======================= +-----BEGIN CERTIFICATE----- +MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT +DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx +NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n +IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 +ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr +auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh +qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY +V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV +HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i +h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio +l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei +IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps +T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT +c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== +-----END CERTIFICATE----- + +SecureSign RootCA11 +=================== +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi +SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS +b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw +KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 +cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL +TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO +wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq +g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP +O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA +bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX +t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh +OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r +bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ +Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 +y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 +lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER +MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv +c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o +dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE +BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt +U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA +fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG +0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA +pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm +1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC +AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf +QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE +FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o +lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX +I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 +tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 +yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi +LXpUq3DDfSJlgnCW +-----END CERTIFICATE----- + +GlobalSign Root CA - R3 +======================= +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt +iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ +0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 +rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl +OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 +xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 +lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 +EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E +bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 +YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r +kpeDMdmztcpHWD9f +-----END CERTIFICATE----- + +Autoridad de Certificacion Firmaprofesional CIF A62634068 +========================================================= +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA +BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 +MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw +QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB +NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD +Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P +B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY +7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH +ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI +plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX +MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX +LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK +bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU +vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud +EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH +DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp +cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA +bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx +ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx +51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk +R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP +T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f +Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl +osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR +crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR +saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD +KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi +6Et8Vcad+qMUu2WFbm5PEn4KPJ2V +-----END CERTIFICATE----- + +Izenpe.com +========== +-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG +EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz +MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu +QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ +03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK +ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU ++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC +PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT +OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK +F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK +0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+ +0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB +leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID +AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+ +SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG +NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx +MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l +Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga +kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q +hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs +g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 +aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 +nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC +ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo +Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z +WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== +-----END CERTIFICATE----- + +Chambers of Commerce Root - 2008 +================================ +-----BEGIN CERTIFICATE----- +MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy +Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl +ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF +EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl +cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA +XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj +h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/ +ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk +NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g +D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331 +lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ +0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj +ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2 +EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI +G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ +BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh +bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh +bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC +CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH +AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1 +wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH +3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU +RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6 +M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1 +YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF +9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK +zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG +nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg +OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ +-----END CERTIFICATE----- + +Global Chambersign Root - 2008 +============================== +-----BEGIN CERTIFICATE----- +MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx +NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg +Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ +QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD +aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf +VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf +XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0 +ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB +/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA +TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M +H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe +Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF +HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh +wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB +AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT +BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE +BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm +aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm +aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp +1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0 +dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG +/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6 +ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s +dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg +9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH +foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du +qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr +P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq +c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z +09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B +-----END CERTIFICATE----- + +Go Daddy Root Certificate Authority - G2 +======================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu +MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 +MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 +b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G +A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq +9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD ++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd +fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl +NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 +BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac +vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r +5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV +N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 +-----END CERTIFICATE----- + +Starfield Root Certificate Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 +eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw +DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg +VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB +dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv +W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs +bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk +N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf +ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU +JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol +TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx +4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw +F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K +pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ +c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 +-----END CERTIFICATE----- + +Starfield Services Root Certificate Authority - G2 +================================================== +-----BEGIN CERTIFICATE----- +MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl +IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV +BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT +dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg +Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 +h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa +hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP +LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB +rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG +SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP +E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy +xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd +iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza +YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 +-----END CERTIFICATE----- + +AffirmTrust Commercial +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw +MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb +DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV +C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 +BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww +MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV +HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG +hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi +qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv +0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh +sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= +-----END CERTIFICATE----- + +AffirmTrust Networking +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw +MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE +Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI +dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 +/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb +h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV +HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu +UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 +12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 +WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 +/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= +-----END CERTIFICATE----- + +AffirmTrust Premium +=================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy +OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy +dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn +BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV +5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs ++7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd +GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R +p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI +S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04 +6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5 +/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo ++Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv +MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg +Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC +6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S +L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK ++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV +BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg +IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 +g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb +zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== +-----END CERTIFICATE----- + +AffirmTrust Premium ECC +======================= +-----BEGIN CERTIFICATE----- +MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV +BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx +MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U +cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ +N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW +BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK +BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X +57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM +eQ== +-----END CERTIFICATE----- + +Certum Trusted Network CA +========================= +-----BEGIN CERTIFICATE----- +MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK +ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy +MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU +ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC +l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J +J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 +fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 +cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB +Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw +DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj +jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 +mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj +Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI +03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= +-----END CERTIFICATE----- + +TWCA Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ +VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG +EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB +IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx +QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC +oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP +4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r +y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB +BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG +9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC +mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW +QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY +T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny +Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== +-----END CERTIFICATE----- + +Security Communication RootCA2 +============================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC +SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy +aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ ++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R +3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV +spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K +EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8 +QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB +CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj +u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk +3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q +tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 +mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 +-----END CERTIFICATE----- + +EC-ACC +====== +-----BEGIN CERTIFICATE----- +MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE +BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w +ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD +VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE +CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT +BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 +MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt +SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl +Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh +cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK +w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT +ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 +HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a +E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw +0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD +VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 +Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l +dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ +lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa +Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe +l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 +E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D +5EI= +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2011 +======================================================= +-----BEGIN CERTIFICATE----- +MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT +O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y +aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT +AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo +IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI +1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa +71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u +8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH +3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/ +MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8 +MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu +b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt +XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8 +TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD +/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N +7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4 +-----END CERTIFICATE----- + +Actalis Authentication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM +BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE +AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky +MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz +IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 +IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ +wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa +by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6 +zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f +YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2 +oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l +EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7 +hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8 +EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5 +jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY +iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt +ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI +WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0 +JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx +K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+ +Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC +4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo +2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz +lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem +OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 +vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== +-----END CERTIFICATE----- + +Trustis FPS Root CA +=================== +-----BEGIN CERTIFICATE----- +MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG +EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290 +IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV +BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ +RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk +H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa +cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt +o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA +AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd +BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c +GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC +yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P +8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV +l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl +iB6XzCGcKQENZetX2fNXlrtIzYE= +-----END CERTIFICATE----- + +Buypass Class 2 Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X +DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 +eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1 +g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn +9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b +/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU +CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff +awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI +zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn +Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX +Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs +M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s +A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI +osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S +aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd +DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD +LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 +oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC +wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS +CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN +rJgWVqA= +-----END CERTIFICATE----- + +Buypass Class 3 Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X +DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 +eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH +sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR +5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh +7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ +ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH +2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV +/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ +RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA +Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq +j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV +cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G +uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG +Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8 +ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2 +KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz +6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug +UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe +eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi +Cp/HuZc= +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 3 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx +MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz +dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD +ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK +9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU +NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF +iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W +0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr +AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb +fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT +ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h +P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml +e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== +-----END CERTIFICATE----- + +EE Certification Centre Root CA +=============================== +-----BEGIN CERTIFICATE----- +MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG +EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy +dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw +MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB +UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy +ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB +DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM +TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2 +rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw +93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN +P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ +MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF +BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj +xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM +lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u +uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU +3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM +dcGWxZ0= +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe +Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE +LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD +ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA +BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv +KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z +p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC +AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ +4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y +eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw +MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G +PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw +OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm +2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 +o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV +dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph +X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 EV 2009 +================================= +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS +egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh +zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T +7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 +sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 +11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv +cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v +ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El +MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp +b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh +c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+ +PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 +nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX +ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA +NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv +w9y4AyHqnxbxLFS1 +-----END CERTIFICATE----- + +CA Disig Root R2 +================ +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw +EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp +ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx +EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp +c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC +w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia +xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7 +A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S +GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV +g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa +5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE +koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A +Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i +Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u +Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM +tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV +sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je +dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 +1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx +mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 +utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 +sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg +UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV +7+ZtsH8tZ/3zbBt1RqPlShfppNcL +-----END CERTIFICATE----- + +ACCVRAIZ1 +========= +-----BEGIN CERTIFICATE----- +MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB +SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 +MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH +UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM +jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0 +RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD +aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ +0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG +WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7 +8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR +5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J +9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK +Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw +Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu +Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 +VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM +Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA +QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh +AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA +YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj +AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA +IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk +aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0 +dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2 +MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI +hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E +R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN +YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49 +nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ +TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3 +sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h +I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg +Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd +3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p +EfbRD0tVNEYqi4Y7 +-----END CERTIFICATE----- + +TWCA Global Root CA +=================== +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT +CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD +QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK +EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg +Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C +nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV +r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR +Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV +tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W +KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99 +sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p +yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn +kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI +zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g +cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn +LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M +8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg +/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg +lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP +A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m +i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8 +EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3 +zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0= +-----END CERTIFICATE----- + +TeliaSonera Root CA v1 +====================== +-----BEGIN CERTIFICATE----- +MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE +CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4 +MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW +VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+ +6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA +3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k +B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn +Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH +oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3 +F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ +oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7 +gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc +TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB +AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW +DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm +zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx +0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW +pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV +G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc +c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT +JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 +qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 +Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems +WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= +-----END CERTIFICATE----- + +E-Tugra Certification Authority +=============================== +-----BEGIN CERTIFICATE----- +MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w +DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls +ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN +ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw +NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx +QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl +cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD +DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd +hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K +CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g +ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ +BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0 +E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz +rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq +jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn +rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 +dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB +/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG +MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK +kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO +XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 +VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo +a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc +dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV +KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT +Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 +8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G +C7TbO6Orb1wdtn7os4I07QZcJA== +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 2 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx +MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz +dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD +ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ +SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F +vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970 +2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV +WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy +YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4 +r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf +vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR +3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN +9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== +-----END CERTIFICATE----- + +Atos TrustedRoot 2011 +===================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU +cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 +MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG +A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV +hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr +54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ +DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 +HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR +z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R +l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ +bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB +CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h +k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh +TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 +61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G +3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed +-----END CERTIFICATE----- + +QuoVadis Root CA 1 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE +PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm +PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6 +Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN +ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l +g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV +7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX +9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f +iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg +t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI +hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC +MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3 +GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct +Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP ++V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh +3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa +wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6 +O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 +FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV +hMJKzRwuJIczYOXD +-----END CERTIFICATE----- + +QuoVadis Root CA 2 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh +ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY +NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t +oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o +MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l +V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo +L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ +sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD +6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh +lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI +hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K +pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 +x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz +dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X +U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw +mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD +zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN +JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr +O3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + +QuoVadis Root CA 3 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286 +IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL +Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe +6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3 +I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U +VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7 +5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi +Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM +dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt +rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI +hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px +KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS +t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ +TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du +DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib +Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD +hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX +0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW +dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 +PpxxVJkES/1Y+Zj0 +-----END CERTIFICATE----- + +DigiCert Assured ID Root G2 +=========================== +-----BEGIN CERTIFICATE----- +MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw +MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH +35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq +bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw +VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP +YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn +lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO +w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv +0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz +d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW +hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M +jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo +IhNzbM8m9Yop5w== +-----END CERTIFICATE----- + +DigiCert Assured ID Root G3 +=========================== +-----BEGIN CERTIFICATE----- +MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD +VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ +BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb +RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs +KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF +UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy +YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy +1vUhZscv6pZjamVFkpUBtA== +-----END CERTIFICATE----- + +DigiCert Global Root G2 +======================= +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx +MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ +kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO +3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV +BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM +UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB +o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu +5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr +F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U +WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH +QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/ +iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl +MrY= +-----END CERTIFICATE----- + +DigiCert Global Root G3 +======================= +-----BEGIN CERTIFICATE----- +MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD +VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw +MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k +aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C +AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O +YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp +Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y +3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 +VOKa5Vt8sycX +-----END CERTIFICATE----- + +DigiCert Trusted Root G4 +======================== +-----BEGIN CERTIFICATE----- +MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw +HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G +CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp +pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o +k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa +vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY +QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6 +MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm +mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7 +f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH +dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8 +oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD +ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY +ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr +yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy +7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah +ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN +5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb +/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa +5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK +G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP +82Z+ +-----END CERTIFICATE----- + +COMODO RSA Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn +dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ +FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ +5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG +x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX +2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL +OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3 +sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C +GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5 +WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E +FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w +DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt +rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+ +nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg +tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW +sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp +pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA +zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq +ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 +7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I +LaZRfyHBNVOFBkpdn627G190 +-----END CERTIFICATE----- + +USERTrust RSA Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz +0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j +Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn +RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O ++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq +/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE +Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM +lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8 +yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+ +eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd +BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW +FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ +7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ +Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM +8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi +FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi +yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c +J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw +sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx +Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 +-----END CERTIFICATE----- + +USERTrust ECC Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 +0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez +nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV +HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB +HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu +9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R4 +=========================== +-----BEGIN CERTIFICATE----- +MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl +OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P +AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV +MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF +JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R5 +=========================== +-----BEGIN CERTIFICATE----- +MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 +SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS +h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx +uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 +yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G3 +================================== +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y +olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t +x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy +EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K +Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur +mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5 +1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp +07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo +FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE +41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB +AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu +yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD +U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq +KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1 +v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA +8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b +8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r +mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq +1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI +JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV +tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk= +-----END CERTIFICATE----- + +Staat der Nederlanden EV Root CA +================================ +-----BEGIN CERTIFICATE----- +MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M +MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl +cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk +SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW +O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r +0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 +Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV +XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr +08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV +0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd +74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx +fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa +ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI +eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu +c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq +5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN +b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN +f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi +5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4 +WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK +DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy +eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== +-----END CERTIFICATE----- + +IdenTrust Commercial Root CA 1 +============================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS +b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES +MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB +IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld +hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ +mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi +1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C +XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl +3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy +NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV +WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg +xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix +uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI +hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH +6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg +ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt +ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV +YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX +feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro +kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe +2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz +Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R +cGzM7vRX+Bi6hG6H +-----END CERTIFICATE----- + +IdenTrust Public Sector Root CA 1 +================================= +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv +ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV +UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS +b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy +P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6 +Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI +rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf +qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS +mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn +ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh +LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v +iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL +4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B +Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw +DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj +t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A +mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt +GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt +m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx +NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 +Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI +ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC +ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ +3Wl9af0AVqW3rLatt8o+Ae+c +-----END CERTIFICATE----- + +Entrust Root Certification Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy +bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug +b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw +HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT +DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx +OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s +eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP +/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz +HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU +s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y +TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx +AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6 +0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z +iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ +Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi +nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ +vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO +e4pIb4tF9g== +-----END CERTIFICATE----- + +Entrust Root Certification Authority - EC1 +========================================== +-----BEGIN CERTIFICATE----- +MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx +FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn +YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl +ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw +FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs +LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg +dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt +IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy +AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef +9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h +vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 +kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G +-----END CERTIFICATE----- + +CFCA EV ROOT +============ +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE +CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB +IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw +MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD +DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV +BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD +7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN +uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW +ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 +xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f +py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K +gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol +hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ +tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf +BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB +/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB +ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q +ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua +4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG +E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX +BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn +aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy +PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX +kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C +ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GB CA +=============================== +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG +EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl +ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw +MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD +VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds +b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX +scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP +rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk +9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o +Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg +GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI +hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD +dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0 +VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui +HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic +Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= +-----END CERTIFICATE----- + +SZAFIR ROOT CA2 +=============== +-----BEGIN CERTIFICATE----- +MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG +A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV +BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ +BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD +VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q +qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK +DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE +2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ +ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi +ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P +AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC +AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5 +O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67 +oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul +4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6 ++/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw== +-----END CERTIFICATE----- + +Certum Trusted Network CA 2 +=========================== +-----BEGIN CERTIFICATE----- +MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE +BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1 +bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y +ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ +TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB +IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9 +7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o +CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b +Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p +uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130 +GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ +9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB +Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye +hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM +BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI +hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW +Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA +L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo +clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM +pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb +w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo +J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm +ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX +is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7 +zAYspsbiDrW5viSP +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2015 +======================================================= +-----BEGIN CERTIFICATE----- +MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT +BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0 +aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl +YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx +MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg +QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV +BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw +MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv +bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh +iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+ +6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd +FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr +i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F +GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2 +fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu +iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc +Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI +hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+ +D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM +d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y +d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn +82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb +davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F +Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt +J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa +JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q +p/UsQu0yrbYhnr68 +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions ECC RootCA 2015 +=========================================================== +-----BEGIN CERTIFICATE----- +MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0 +aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u +cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj +aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw +MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj +IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD +VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290 +Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP +dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK +Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA +GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn +dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR +-----END CERTIFICATE----- + +ISRG Root X1 +============ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE +BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD +EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG +EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT +DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r +Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1 +3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K +b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN +Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ +4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf +1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu +hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH +usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r +OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G +A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY +9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL +ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV +0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt +hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw +TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx +e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA +JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD +YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n +JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ +m+kXQ99b21/+jh5Xos1AnX5iItreGCc= +-----END CERTIFICATE----- + +AC RAIZ FNMT-RCM +================ +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT +AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw +MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD +TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf +qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr +btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL +j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou +08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw +WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT +tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ +47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC +ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa +i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o +dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD +nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s +D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ +j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT +Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW ++YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7 +Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d +8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm +5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG +rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM= +-----END CERTIFICATE----- + +Amazon Root CA 1 +================ +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1 +MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH +FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ +gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t +dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce +VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 +DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM +CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy +8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa +2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 +xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- + +Amazon Root CA 2 +================ +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 +MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4 +kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp +N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9 +AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd +fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx +kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS +btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0 +Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN +c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+ +3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw +DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA +A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY ++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE +YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW +xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ +gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW +aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV +Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 +KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi +JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= +-----END CERTIFICATE----- + +Amazon Root CA 3 +================ +-----BEGIN CERTIFICATE----- +MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB +f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr +Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 +rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc +eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== +-----END CERTIFICATE----- + +Amazon Root CA 4 +================ +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN +/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri +83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA +MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 +AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- + +LuxTrust Global Root 2 +====================== +-----BEGIN CERTIFICATE----- +MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG +A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh +bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEW +MBQGA1UECgwNTHV4VHJ1c3QgUy5BLjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCC +AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wm +Kb3FibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTemhfY7RBi2 +xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1EMShduxq3sVs35a0VkBC +wGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsnXpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm +1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkm +FRseTJIpgp7VkoGSQXAZ96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niF +wpN6cj5mj5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4gDEa/ +a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+8kPREd8vZS9kzl8U +ubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2jX5t/Lax5Gw5CMZdjpPuKadUiDTSQ +MC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmHhFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB +/zBCBgNVHSAEOzA5MDcGByuBKwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5 +Lmx1eHRydXN0Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT ++Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQELBQADggIBAGoZ +FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN +H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW +7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu +ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA +VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR +TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt +/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc +7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I +iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr +-----END CERTIFICATE----- + +TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 +============================================= +-----BEGIN CERTIFICATE----- +MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT +D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr +IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g +TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp +ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD +VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt +c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth +bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11 +IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8 +6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc +wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0 +3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9 +WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU +ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ +KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh +AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc +lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R +e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j +q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= +-----END CERTIFICATE----- + +GDCA TrustAUTH R5 ROOT +====================== +-----BEGIN CERTIFICATE----- +MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw +BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD +DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow +YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ +IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs +AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p +OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr +pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ +9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ +xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM +R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ +D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 +oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx +9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg +p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 +H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 +6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd ++PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ +HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD +F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ +8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv +/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT +aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== +-----END CERTIFICATE----- + +TrustCor RootCert CA-1 +====================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx +MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu +YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe +VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy +dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq +jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 +pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 +JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h +gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw +/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j +BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 +mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf +ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C +qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P +3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= +-----END CERTIFICATE----- + +TrustCor RootCert CA-2 +====================== +-----BEGIN CERTIFICATE----- +MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w +DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT +eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 +eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy +MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h +bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U +cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 +IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb +ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk +RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 +oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb +XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 +/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q +jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP +eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg +rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh +8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU +2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h +Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp +kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv +2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 +S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw +PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv +DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU +RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE +xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX +RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ +-----END CERTIFICATE----- + +TrustCor ECA-1 +============== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw +N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 +MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y +IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR +MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 +xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc +p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ +fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj +YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL +f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF +AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u +/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F +hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs +J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC +jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== +-----END CERTIFICATE----- + +SSL.com Root Certification Authority RSA +======================================== +-----BEGIN CERTIFICATE----- +MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM +BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x +MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw +MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM +LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C +Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 +P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge +oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp +k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z +fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ +gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 +UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 +1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s +bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV +HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr +dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf +ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl +u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq +erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj +MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ +vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI +Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y +wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI +WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= +-----END CERTIFICATE----- + +SSL.com Root Certification Authority ECC +======================================== +-----BEGIN CERTIFICATE----- +MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv +BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy +MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO +BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv +bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ +8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR +hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT +jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW +e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z +5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority RSA R2 +============================================== +-----BEGIN CERTIFICATE----- +MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w +DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u +MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy +MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI +DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD +VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh +hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w +cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO +Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ +B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh +CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim +9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto +RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm +JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 ++qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV +HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp +qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 +++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx +Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G +guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz +OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 +CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq +lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR +rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 +hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX +9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority ECC +=========================================== +-----BEGIN CERTIFICATE----- +MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy +BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw +MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM +LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy +3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O +BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe +5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ +N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm +m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== +-----END CERTIFICATE----- + +GlobalSign Root CA - R6 +======================= +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX +R2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds +b2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i +YWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs +U2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss +grRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE +3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF +vuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM +PKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+ +azayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O +WgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy +CLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP +0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN +b7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV +HSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN +nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0 +lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY +BzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym +Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr +3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1 +0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T +uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK +oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t +JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GC CA +=============================== +-----BEGIN CERTIFICATE----- +MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD +SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo +MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa +Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL +ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh +bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr +VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab +NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E +AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk +AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 +-----END CERTIFICATE----- + +GTS Root R1 +=========== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx +9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r +aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW +r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM +LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly +4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr +06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92 +wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om +3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu +JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM +BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 +d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv +fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm +ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b +gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq +4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr +tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo +pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0 +sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql +CFF1pkgl +-----END CERTIFICATE----- + +GTS Root R2 +=========== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk +k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo +7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI +m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm +dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu +ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz +cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW +Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl +aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy +5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM +BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT +vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ ++YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw +c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da +WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r +n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu +Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ +7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs +gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld +o/DUhgkC +-----END CERTIFICATE----- + +GTS Root R3 +=========== +-----BEGIN CERTIFICATE----- +MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU +Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP +0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0 +glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa +KaqW04MjyaR7YbPMAuhd +-----END CERTIFICATE----- + +GTS Root R4 +=========== +-----BEGIN CERTIFICATE----- +MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa +6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV +2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI +N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x +zPKwTdb+mciUqXWi4w== +-----END CERTIFICATE----- + +UCA Global G2 Root +================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x +NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU +cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT +oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV +8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS +h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o +LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/ +R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe +KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa +4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc +OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97 +8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O +BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo +5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 +1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A +Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9 +yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX +c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo +jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk +bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x +ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn +RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A== +-----END CERTIFICATE----- + +UCA Extended Validation Root +============================ +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u +IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G +A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs +iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF +Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu +eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR +59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH +0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR +el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv +B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth +WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS +NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS +3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL +BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR +ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM +aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4 +dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb ++7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW +F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi +GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc +GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi +djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr +dhh2n1ax +-----END CERTIFICATE----- + +Certigna Root CA +================ +-----BEGIN CERTIFICATE----- +MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE +BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ +MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda +MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz +MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX +stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz +KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8 +JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16 +XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq +4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej +wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ +lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI +jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/ +/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw +HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of +1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy +dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h +LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl +cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt +OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP +TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq +7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3 +4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd +8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS +6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY +tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS +aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde +E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= +-----END CERTIFICATE----- + +emSign Root CA - G1 +=================== +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET +MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl +ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx +ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk +aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN +LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1 +cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW +DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ +6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH +hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2 +vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q +NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q ++Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih +U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx +iN66zB+Afko= +-----END CERTIFICATE----- + +emSign ECC Root CA - G3 +======================= +-----BEGIN CERTIFICATE----- +MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG +A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg +MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4 +MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11 +ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g +RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc +58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr +MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D +CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7 +jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj +-----END CERTIFICATE----- + +emSign Root CA - C1 +=================== +-----BEGIN CERTIFICATE----- +MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx +EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp +Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE +BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD +ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up +ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/ +Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX +OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V +I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms +lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+ +XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD +ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp +/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1 +NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9 +wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ +BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI= +-----END CERTIFICATE----- + +emSign ECC Root CA - C3 +======================= +-----BEGIN CERTIFICATE----- +MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG +A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF +Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE +BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD +ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd +6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9 +SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA +B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA +MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU +ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ== +-----END CERTIFICATE----- + +Hongkong Post Root CA 3 +======================= +-----BEGIN CERTIFICATE----- +MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG +A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK +Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2 +MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv +bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX +SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz +iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf +jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim +5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe +sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj +0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/ +JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u +y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h ++bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG +xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID +AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e +i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN +AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw +W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld +y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov ++BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc +eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw +9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7 +nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY +hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB +60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq +dBb9HxEGmpv0 +-----END CERTIFICATE----- diff --git a/libraries/Stripe/init.php b/libraries/Stripe/init.php new file mode 100644 index 00000000000..5c5cfd1b773 --- /dev/null +++ b/libraries/Stripe/init.php @@ -0,0 +1,274 @@ +create and manage Express or + * Custom accounts. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\EDD\Vendor\Stripe\StripeObject $business_profile Business information about the account. + * @property null|string $business_type The business type. + * @property \EDD\Vendor\Stripe\StripeObject $capabilities + * @property bool $charges_enabled Whether the account can create live charges. + * @property \EDD\Vendor\Stripe\StripeObject $company + * @property \EDD\Vendor\Stripe\StripeObject $controller + * @property string $country The account's country. + * @property int $created Time at which the account was connected. Measured in seconds since the Unix epoch. + * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that EDD\Vendor\Stripe supports in the account's country. + * @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. + * @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account + * @property \EDD\Vendor\Stripe\StripeObject $future_requirements + * @property \EDD\Vendor\Stripe\Person $individual

    This is an object representing a person associated with a EDD\Vendor\Stripe account.

    A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.

    Related guide: Handling Identity Verification with the API.

    + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property bool $payouts_enabled Whether EDD\Vendor\Stripe can send payouts to this account. + * @property \EDD\Vendor\Stripe\StripeObject $requirements + * @property null|\EDD\Vendor\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe. + * @property \EDD\Vendor\Stripe\StripeObject $tos_acceptance + * @property string $type The EDD\Vendor\Stripe account type. Can be standard, express, or custom. + */ +class Account extends ApiResource +{ + const OBJECT_NAME = 'account'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\NestedResource; + use ApiOperations\Update; + + const BUSINESS_TYPE_COMPANY = 'company'; + const BUSINESS_TYPE_GOVERNMENT_ENTITY = 'government_entity'; + const BUSINESS_TYPE_INDIVIDUAL = 'individual'; + const BUSINESS_TYPE_NON_PROFIT = 'non_profit'; + + const CAPABILITY_CARD_PAYMENTS = 'card_payments'; + const CAPABILITY_LEGACY_PAYMENTS = 'legacy_payments'; + const CAPABILITY_PLATFORM_PAYMENTS = 'platform_payments'; + const CAPABILITY_TRANSFERS = 'transfers'; + + const CAPABILITY_STATUS_ACTIVE = 'active'; + const CAPABILITY_STATUS_INACTIVE = 'inactive'; + const CAPABILITY_STATUS_PENDING = 'pending'; + + const TYPE_CUSTOM = 'custom'; + const TYPE_EXPRESS = 'express'; + const TYPE_STANDARD = 'standard'; + + use ApiOperations\Retrieve { + retrieve as protected _retrieve; + } + + public static function getSavedNestedResources() + { + static $savedNestedResources = null; + if (null === $savedNestedResources) { + $savedNestedResources = new Util\Set([ + 'external_account', + 'bank_account', + ]); + } + + return $savedNestedResources; + } + + public function instanceUrl() + { + if (null === $this['id']) { + return '/v1/account'; + } + + return parent::instanceUrl(); + } + + public function serializeParameters($force = false) + { + $update = parent::serializeParameters($force); + if (isset($this->_values['legal_entity'])) { + $entity = $this['legal_entity']; + if (isset($entity->_values['additional_owners'])) { + $owners = $entity['additional_owners']; + $entityUpdate = isset($update['legal_entity']) ? $update['legal_entity'] : []; + $entityUpdate['additional_owners'] = $this->serializeAdditionalOwners($entity, $owners); + $update['legal_entity'] = $entityUpdate; + } + } + if (isset($this->_values['individual'])) { + $individual = $this['individual']; + if (($individual instanceof Person) && !isset($update['individual'])) { + $update['individual'] = $individual->serializeParameters($force); + } + } + + return $update; + } + + private function serializeAdditionalOwners($legalEntity, $additionalOwners) + { + if (isset($legalEntity->_originalValues['additional_owners'])) { + $originalValue = $legalEntity->_originalValues['additional_owners']; + } else { + $originalValue = []; + } + if (($originalValue) && (\count($originalValue) > \count($additionalOwners))) { + throw new Exception\InvalidArgumentException( + 'You cannot delete an item from an array, you must instead set a new array' + ); + } + + $updateArr = []; + foreach ($additionalOwners as $i => $v) { + $update = ($v instanceof StripeObject) ? $v->serializeParameters() : $v; + + if ([] !== $update) { + if (!$originalValue + || !\array_key_exists($i, $originalValue) + || ($update !== $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) { + $updateArr[$i] = $update; + } + } + } + + return $updateArr; + } + + /** + * @param null|array|string $id the ID of the account to retrieve, or an + * options array containing an `id` key + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Account + */ + public static function retrieve($id = null, $opts = null) + { + if (!$opts && \is_string($id) && 'sk_' === \substr($id, 0, 3)) { + $opts = $id; + $id = null; + } + + return self::_retrieve($id, $opts); + } + + /** + * @param null|array $clientId + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject object containing the response from the API + */ + public function deauthorize($clientId = null, $opts = null) + { + $params = [ + 'client_id' => $clientId, + 'stripe_user_id' => $this->id, + ]; + + return OAuth::deauthorize($params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Person> the list of persons + */ + public function persons($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/persons'; + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = Util\Util::convertToStripeObject($response, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Account the rejected account + */ + public function reject($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/reject'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /* + * Capabilities methods + * We can not add the capabilities() method today as the Account object already has a + * capabilities property which is a hash and not the sub-list of capabilities. + */ + + const PATH_CAPABILITIES = '/capabilities'; + + /** + * @param string $id the ID of the account on which to retrieve the capabilities + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Capability> the list of capabilities + */ + public static function allCapabilities($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_CAPABILITIES, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the capability belongs + * @param string $capabilityId the ID of the capability to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Capability + */ + public static function retrieveCapability($id, $capabilityId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the capability belongs + * @param string $capabilityId the ID of the capability to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Capability + */ + public static function updateCapability($id, $capabilityId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); + } + const PATH_EXTERNAL_ACCOUNTS = '/external_accounts'; + + /** + * @param string $id the ID of the account on which to retrieve the external accounts + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card> the list of external accounts (BankAccount or Card) + */ + public static function allExternalAccounts($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); + } + + /** + * @param string $id the ID of the account on which to create the external account + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public static function createExternalAccount($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the external account belongs + * @param string $externalAccountId the ID of the external account to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the external account belongs + * @param string $externalAccountId the ID of the external account to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public static function retrieveExternalAccount($id, $externalAccountId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the external account belongs + * @param string $externalAccountId the ID of the external account to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); + } + const PATH_LOGIN_LINKS = '/login_links'; + + /** + * @param string $id the ID of the account on which to create the login link + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\LoginLink + */ + public static function createLoginLink($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts); + } + const PATH_PERSONS = '/persons'; + + /** + * @param string $id the ID of the account on which to retrieve the persons + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Person> the list of persons + */ + public static function allPersons($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_PERSONS, $params, $opts); + } + + /** + * @param string $id the ID of the account on which to create the person + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public static function createPerson($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_PERSONS, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the person belongs + * @param string $personId the ID of the person to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public static function deletePerson($id, $personId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the person belongs + * @param string $personId the ID of the person to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public static function retrievePerson($id, $personId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the person belongs + * @param string $personId the ID of the person to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public static function updatePerson($id, $personId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/AccountLink.php b/libraries/Stripe/lib/AccountLink.php new file mode 100644 index 00000000000..cdb6a98a582 --- /dev/null +++ b/libraries/Stripe/lib/AccountLink.php @@ -0,0 +1,26 @@ +Connect + * Onboarding. + * + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property int $expires_at The timestamp at which this account link will expire. + * @property string $url The URL for the account link. + */ +class AccountLink extends ApiResource +{ + const OBJECT_NAME = 'account_link'; + + use ApiOperations\Create; +} diff --git a/libraries/Stripe/lib/AlipayAccount.php b/libraries/Stripe/lib/AlipayAccount.php new file mode 100644 index 00000000000..7b22822b35b --- /dev/null +++ b/libraries/Stripe/lib/AlipayAccount.php @@ -0,0 +1,75 @@ +json, $opts); + if (!($obj instanceof \EDD\Vendor\Stripe\Collection)) { + throw new \EDD\Vendor\Stripe\Exception\UnexpectedValueException( + 'Expected type ' . \EDD\Vendor\Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.' + ); + } + $obj->setLastResponse($response); + $obj->setFilters($params); + + return $obj; + } +} diff --git a/libraries/Stripe/lib/ApiOperations/Create.php b/libraries/Stripe/lib/ApiOperations/Create.php new file mode 100644 index 00000000000..661588f0d0f --- /dev/null +++ b/libraries/Stripe/lib/ApiOperations/Create.php @@ -0,0 +1,31 @@ +json, $opts); + $obj->setLastResponse($response); + + return $obj; + } +} diff --git a/libraries/Stripe/lib/ApiOperations/Delete.php b/libraries/Stripe/lib/ApiOperations/Delete.php new file mode 100644 index 00000000000..b37e840cd72 --- /dev/null +++ b/libraries/Stripe/lib/ApiOperations/Delete.php @@ -0,0 +1,30 @@ +instanceUrl(); + list($response, $opts) = $this->_request('delete', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/ApiOperations/NestedResource.php b/libraries/Stripe/lib/ApiOperations/NestedResource.php new file mode 100644 index 00000000000..f325096b39e --- /dev/null +++ b/libraries/Stripe/lib/ApiOperations/NestedResource.php @@ -0,0 +1,135 @@ +json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param string $id + * @param string $nestedPath + * @param null|string $nestedId + * + * @return string + */ + protected static function _nestedResourceUrl($id, $nestedPath, $nestedId = null) + { + $url = static::resourceUrl($id) . $nestedPath; + if (null !== $nestedId) { + $url .= "/{$nestedId}"; + } + + return $url; + } + + /** + * @param string $id + * @param string $nestedPath + * @param null|array $params + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject + */ + protected static function _createNestedResource($id, $nestedPath, $params = null, $options = null) + { + $url = static::_nestedResourceUrl($id, $nestedPath); + + return self::_nestedResourceOperation('post', $url, $params, $options); + } + + /** + * @param string $id + * @param string $nestedPath + * @param null|string $nestedId + * @param null|array $params + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject + */ + protected static function _retrieveNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null) + { + $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId); + + return self::_nestedResourceOperation('get', $url, $params, $options); + } + + /** + * @param string $id + * @param string $nestedPath + * @param null|string $nestedId + * @param null|array $params + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject + */ + protected static function _updateNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null) + { + $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId); + + return self::_nestedResourceOperation('post', $url, $params, $options); + } + + /** + * @param string $id + * @param string $nestedPath + * @param null|string $nestedId + * @param null|array $params + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject + */ + protected static function _deleteNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null) + { + $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId); + + return self::_nestedResourceOperation('delete', $url, $params, $options); + } + + /** + * @param string $id + * @param string $nestedPath + * @param null|array $params + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject + */ + protected static function _allNestedResources($id, $nestedPath, $params = null, $options = null) + { + $url = static::_nestedResourceUrl($id, $nestedPath); + + return self::_nestedResourceOperation('get', $url, $params, $options); + } +} diff --git a/libraries/Stripe/lib/ApiOperations/Request.php b/libraries/Stripe/lib/ApiOperations/Request.php new file mode 100644 index 00000000000..82bc7ac1b38 --- /dev/null +++ b/libraries/Stripe/lib/ApiOperations/Request.php @@ -0,0 +1,100 @@ + 100, " + . "'currency' => 'usd', 'source' => 'tok_1234'])\")"; + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException($message); + } + } + + /** + * @param string $method HTTP method ('get', 'post', etc.) + * @param string $url URL for the request + * @param array $params list of parameters for the request + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return array tuple containing (the JSON response, $options) + */ + protected function _request($method, $url, $params = [], $options = null) + { + $opts = $this->_opts->merge($options); + list($resp, $options) = static::_staticRequest($method, $url, $params, $opts); + $this->setLastResponse($resp); + + return [$resp->json, $options]; + } + + /** + * @param string $method HTTP method ('get', 'post', etc.) + * @param string $url URL for the request + * @param callable $readBodyChunk function that will receive chunks of data from a successful request body + * @param array $params list of parameters for the request + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + */ + protected function _requestStream($method, $url, $readBodyChunk, $params = [], $options = null) + { + $opts = $this->_opts->merge($options); + static::_staticStreamingRequest($method, $url, $readBodyChunk, $params, $opts); + } + + /** + * @param string $method HTTP method ('get', 'post', etc.) + * @param string $url URL for the request + * @param array $params list of parameters for the request + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return array tuple containing (the JSON response, $options) + */ + protected static function _staticRequest($method, $url, $params, $options) + { + $opts = \EDD\Vendor\Stripe\Util\RequestOptions::parse($options); + $baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl(); + $requestor = new \EDD\Vendor\Stripe\ApiRequestor($opts->apiKey, $baseUrl); + list($response, $opts->apiKey) = $requestor->request($method, $url, $params, $opts->headers); + $opts->discardNonPersistentHeaders(); + + return [$response, $opts]; + } + + /** + * @param string $method HTTP method ('get', 'post', etc.) + * @param string $url URL for the request + * @param callable $readBodyChunk function that will receive chunks of data from a successful request body + * @param array $params list of parameters for the request + * @param null|array|string $options + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + */ + protected static function _staticStreamingRequest($method, $url, $readBodyChunk, $params, $options) + { + $opts = \EDD\Vendor\Stripe\Util\RequestOptions::parse($options); + $baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl(); + $requestor = new \EDD\Vendor\Stripe\ApiRequestor($opts->apiKey, $baseUrl); + $requestor->requestStream($method, $url, $readBodyChunk, $params, $opts->headers); + } +} diff --git a/libraries/Stripe/lib/ApiOperations/Retrieve.php b/libraries/Stripe/lib/ApiOperations/Retrieve.php new file mode 100644 index 00000000000..2482063b8d8 --- /dev/null +++ b/libraries/Stripe/lib/ApiOperations/Retrieve.php @@ -0,0 +1,30 @@ +refresh(); + + return $instance; + } +} diff --git a/libraries/Stripe/lib/ApiOperations/Search.php b/libraries/Stripe/lib/ApiOperations/Search.php new file mode 100644 index 00000000000..0bd5c5dd65e --- /dev/null +++ b/libraries/Stripe/lib/ApiOperations/Search.php @@ -0,0 +1,37 @@ +json, $opts); + if (!($obj instanceof \EDD\Vendor\Stripe\SearchResult)) { + throw new \EDD\Vendor\Stripe\Exception\UnexpectedValueException( + 'Expected type ' . \EDD\Vendor\Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.' + ); + } + $obj->setLastResponse($response); + $obj->setFilters($params); + + return $obj; + } +} diff --git a/libraries/Stripe/lib/ApiOperations/Update.php b/libraries/Stripe/lib/ApiOperations/Update.php new file mode 100644 index 00000000000..f2f9543a8b9 --- /dev/null +++ b/libraries/Stripe/lib/ApiOperations/Update.php @@ -0,0 +1,52 @@ +json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return static the saved resource + */ + public function save($opts = null) + { + $params = $this->serializeParameters(); + if (\count($params) > 0) { + $url = $this->instanceUrl(); + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + } + + return $this; + } +} diff --git a/libraries/Stripe/lib/ApiRequestor.php b/libraries/Stripe/lib/ApiRequestor.php new file mode 100644 index 00000000000..ede48f129c2 --- /dev/null +++ b/libraries/Stripe/lib/ApiRequestor.php @@ -0,0 +1,619 @@ +_apiKey = $apiKey; + if (!$apiBase) { + $apiBase = Stripe::$apiBase; + } + $this->_apiBase = $apiBase; + } + + /** + * Creates a telemetry json blob for use in 'X-Stripe-Client-Telemetry' headers. + * + * @static + * + * @param RequestTelemetry $requestTelemetry + * + * @return string + */ + private static function _telemetryJson($requestTelemetry) + { + $payload = [ + 'last_request_metrics' => [ + 'request_id' => $requestTelemetry->requestId, + 'request_duration_ms' => $requestTelemetry->requestDuration, + ], + ]; + + $result = \json_encode($payload); + if (false !== $result) { + return $result; + } + Stripe::getLogger()->error('Serializing telemetry payload failed!'); + + return '{}'; + } + + /** + * @static + * + * @param ApiResource|array|bool|mixed $d + * + * @return ApiResource|array|mixed|string + */ + private static function _encodeObjects($d) + { + if ($d instanceof ApiResource) { + return Util\Util::utf8($d->id); + } + if (true === $d) { + return 'true'; + } + if (false === $d) { + return 'false'; + } + if (\is_array($d)) { + $res = []; + foreach ($d as $k => $v) { + $res[$k] = self::_encodeObjects($v); + } + + return $res; + } + + return Util\Util::utf8($d); + } + + /** + * @param string $method + * @param string $url + * @param null|array $params + * @param null|array $headers + * + * @throws Exception\ApiErrorException + * + * @return array tuple containing (ApiReponse, API key) + */ + public function request($method, $url, $params = null, $headers = null) + { + $params = $params ?: []; + $headers = $headers ?: []; + list($rbody, $rcode, $rheaders, $myApiKey) = + $this->_requestRaw($method, $url, $params, $headers); + $json = $this->_interpretResponse($rbody, $rcode, $rheaders); + $resp = new ApiResponse($rbody, $rcode, $rheaders, $json); + + return [$resp, $myApiKey]; + } + + /** + * @param string $method + * @param string $url + * @param callable $readBodyChunkCallable + * @param null|array $params + * @param null|array $headers + * + * @throws Exception\ApiErrorException + */ + public function requestStream($method, $url, $readBodyChunkCallable, $params = null, $headers = null) + { + $params = $params ?: []; + $headers = $headers ?: []; + list($rbody, $rcode, $rheaders, $myApiKey) = + $this->_requestRawStreaming($method, $url, $params, $headers, $readBodyChunkCallable); + if ($rcode >= 300) { + $this->_interpretResponse($rbody, $rcode, $rheaders); + } + } + + /** + * @param string $rbody a JSON string + * @param int $rcode + * @param array $rheaders + * @param array $resp + * + * @throws Exception\UnexpectedValueException + * @throws Exception\ApiErrorException + */ + public function handleErrorResponse($rbody, $rcode, $rheaders, $resp) + { + if (!\is_array($resp) || !isset($resp['error'])) { + $msg = "Invalid response object from API: {$rbody} " + . "(HTTP response code was {$rcode})"; + + throw new Exception\UnexpectedValueException($msg); + } + + $errorData = $resp['error']; + + $error = null; + if (\is_string($errorData)) { + $error = self::_specificOAuthError($rbody, $rcode, $rheaders, $resp, $errorData); + } + if (!$error) { + $error = self::_specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData); + } + + throw $error; + } + + /** + * @static + * + * @param string $rbody + * @param int $rcode + * @param array $rheaders + * @param array $resp + * @param array $errorData + * + * @return Exception\ApiErrorException + */ + private static function _specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData) + { + $msg = isset($errorData['message']) ? $errorData['message'] : null; + $param = isset($errorData['param']) ? $errorData['param'] : null; + $code = isset($errorData['code']) ? $errorData['code'] : null; + $type = isset($errorData['type']) ? $errorData['type'] : null; + $declineCode = isset($errorData['decline_code']) ? $errorData['decline_code'] : null; + + switch ($rcode) { + case 400: + // 'rate_limit' code is deprecated, but left here for backwards compatibility + // for API versions earlier than 2015-09-08 + if ('rate_limit' === $code) { + return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param); + } + if ('idempotency_error' === $type) { + return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); + } + + // no break + case 404: + return Exception\InvalidRequestException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param); + + case 401: + return Exception\AuthenticationException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); + + case 402: + return Exception\CardException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $declineCode, $param); + + case 403: + return Exception\PermissionException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); + + case 429: + return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param); + + default: + return Exception\UnknownApiErrorException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); + } + } + + /** + * @static + * + * @param bool|string $rbody + * @param int $rcode + * @param array $rheaders + * @param array $resp + * @param string $errorCode + * + * @return Exception\OAuth\OAuthErrorException + */ + private static function _specificOAuthError($rbody, $rcode, $rheaders, $resp, $errorCode) + { + $description = isset($resp['error_description']) ? $resp['error_description'] : $errorCode; + + switch ($errorCode) { + case 'invalid_client': + return Exception\OAuth\InvalidClientException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'invalid_grant': + return Exception\OAuth\InvalidGrantException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'invalid_request': + return Exception\OAuth\InvalidRequestException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'invalid_scope': + return Exception\OAuth\InvalidScopeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'unsupported_grant_type': + return Exception\OAuth\UnsupportedGrantTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'unsupported_response_type': + return Exception\OAuth\UnsupportedResponseTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + default: + return Exception\OAuth\UnknownOAuthErrorException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + } + } + + /** + * @static + * + * @param null|array $appInfo + * + * @return null|string + */ + private static function _formatAppInfo($appInfo) + { + if (null !== $appInfo) { + $string = $appInfo['name']; + if (null !== $appInfo['version']) { + $string .= '/' . $appInfo['version']; + } + if (null !== $appInfo['url']) { + $string .= ' (' . $appInfo['url'] . ')'; + } + + return $string; + } + + return null; + } + + /** + * @static + * + * @param string $disabledFunctionsOutput - String value of the 'disable_function' setting, as output by \ini_get('disable_functions') + * @param string $functionName - Name of the function we are interesting in seeing whether or not it is disabled + * @param mixed $disableFunctionsOutput + * + * @return bool + */ + private static function _isDisabled($disableFunctionsOutput, $functionName) + { + $disabledFunctions = \explode(',', $disableFunctionsOutput); + foreach ($disabledFunctions as $disabledFunction) { + if (\trim($disabledFunction) === $functionName) { + return true; + } + } + + return false; + } + + /** + * @static + * + * @param string $apiKey + * @param null $clientInfo + * + * @return array + */ + private static function _defaultHeaders($apiKey, $clientInfo = null) + { + $uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION; + + $langVersion = \PHP_VERSION; + $uname_disabled = static::_isDisabled(\ini_get('disable_functions'), 'php_uname'); + $uname = $uname_disabled ? '(disabled)' : \php_uname(); + + $appInfo = Stripe::getAppInfo(); + $ua = [ + 'bindings_version' => Stripe::VERSION, + 'lang' => 'php', + 'lang_version' => $langVersion, + 'publisher' => 'stripe', + 'uname' => $uname, + ]; + if ($clientInfo) { + $ua = \array_merge($clientInfo, $ua); + } + if (null !== $appInfo) { + $uaString .= ' ' . self::_formatAppInfo($appInfo); + $ua['application'] = $appInfo; + } + + return [ + 'X-Stripe-Client-User-Agent' => \json_encode($ua), + 'User-Agent' => $uaString, + 'Authorization' => 'Bearer ' . $apiKey, + ]; + } + + private function _prepareRequest($method, $url, $params, $headers) + { + $myApiKey = $this->_apiKey; + if (!$myApiKey) { + $myApiKey = Stripe::$apiKey; + } + + if (!$myApiKey) { + $msg = 'No API key provided. (HINT: set your API key using ' + . '"Stripe::setApiKey()". You can generate API keys from ' + . 'the EDD\Vendor\Stripe web interface. See https://stripe.com/api for ' + . 'details, or email support@stripe.com if you have any questions.'; + + throw new Exception\AuthenticationException($msg); + } + + // Clients can supply arbitrary additional keys to be included in the + // X-Stripe-Client-User-Agent header via the optional getUserAgentInfo() + // method + $clientUAInfo = null; + if (\method_exists($this->httpClient(), 'getUserAgentInfo')) { + $clientUAInfo = $this->httpClient()->getUserAgentInfo(); + } + + if ($params && \is_array($params)) { + $optionKeysInParams = \array_filter( + static::$OPTIONS_KEYS, + function ($key) use ($params) { + return \array_key_exists($key, $params); + } + ); + if (\count($optionKeysInParams) > 0) { + $message = \sprintf('Options found in $params: %s. Options should ' + . 'be passed in their own array after $params. (HINT: pass an ' + . 'empty array to $params if you do not have any.)', \implode(', ', $optionKeysInParams)); + \trigger_error($message, \E_USER_WARNING); + } + } + + $absUrl = $this->_apiBase . $url; + $params = self::_encodeObjects($params); + $defaultHeaders = $this->_defaultHeaders($myApiKey, $clientUAInfo); + if (Stripe::$apiVersion) { + $defaultHeaders['Stripe-Version'] = Stripe::$apiVersion; + } + + if (Stripe::$accountId) { + $defaultHeaders['Stripe-Account'] = Stripe::$accountId; + } + + if (Stripe::$enableTelemetry && null !== self::$requestTelemetry) { + $defaultHeaders['X-Stripe-Client-Telemetry'] = self::_telemetryJson(self::$requestTelemetry); + } + + $hasFile = false; + foreach ($params as $k => $v) { + if (\is_resource($v)) { + $hasFile = true; + $params[$k] = self::_processResourceParam($v); + } elseif ($v instanceof \CURLFile) { + $hasFile = true; + } + } + + if ($hasFile) { + $defaultHeaders['Content-Type'] = 'multipart/form-data'; + } else { + $defaultHeaders['Content-Type'] = 'application/x-www-form-urlencoded'; + } + + $combinedHeaders = \array_merge($defaultHeaders, $headers); + $rawHeaders = []; + + foreach ($combinedHeaders as $header => $value) { + $rawHeaders[] = $header . ': ' . $value; + } + + return [$absUrl, $rawHeaders, $params, $hasFile, $myApiKey]; + } + + /** + * @param string $method + * @param string $url + * @param array $params + * @param array $headers + * + * @throws Exception\AuthenticationException + * @throws Exception\ApiConnectionException + * + * @return array + */ + private function _requestRaw($method, $url, $params, $headers) + { + list($absUrl, $rawHeaders, $params, $hasFile, $myApiKey) = $this->_prepareRequest($method, $url, $params, $headers); + + $requestStartMs = Util\Util::currentTimeMillis(); + + list($rbody, $rcode, $rheaders) = $this->httpClient()->request( + $method, + $absUrl, + $rawHeaders, + $params, + $hasFile + ); + + if (isset($rheaders['request-id']) + && \is_string($rheaders['request-id']) + && '' !== $rheaders['request-id']) { + self::$requestTelemetry = new RequestTelemetry( + $rheaders['request-id'], + Util\Util::currentTimeMillis() - $requestStartMs + ); + } + + return [$rbody, $rcode, $rheaders, $myApiKey]; + } + + /** + * @param string $method + * @param string $url + * @param array $params + * @param array $headers + * @param callable $readBodyChunk + * @param mixed $readBodyChunkCallable + * + * @throws Exception\AuthenticationException + * @throws Exception\ApiConnectionException + * + * @return array + */ + private function _requestRawStreaming($method, $url, $params, $headers, $readBodyChunkCallable) + { + list($absUrl, $rawHeaders, $params, $hasFile, $myApiKey) = $this->_prepareRequest($method, $url, $params, $headers); + + $requestStartMs = Util\Util::currentTimeMillis(); + + list($rbody, $rcode, $rheaders) = $this->streamingHttpClient()->requestStream( + $method, + $absUrl, + $rawHeaders, + $params, + $hasFile, + $readBodyChunkCallable + ); + + if (isset($rheaders['request-id']) + && \is_string($rheaders['request-id']) + && '' !== $rheaders['request-id']) { + self::$requestTelemetry = new RequestTelemetry( + $rheaders['request-id'], + Util\Util::currentTimeMillis() - $requestStartMs + ); + } + + return [$rbody, $rcode, $rheaders, $myApiKey]; + } + + /** + * @param resource $resource + * + * @throws Exception\InvalidArgumentException + * + * @return \CURLFile|string + */ + private function _processResourceParam($resource) + { + if ('stream' !== \get_resource_type($resource)) { + throw new Exception\InvalidArgumentException( + 'Attempted to upload a resource that is not a stream' + ); + } + + $metaData = \stream_get_meta_data($resource); + if ('plainfile' !== $metaData['wrapper_type']) { + throw new Exception\InvalidArgumentException( + 'Only plainfile resource streams are supported' + ); + } + + // We don't have the filename or mimetype, but the API doesn't care + return new \CURLFile($metaData['uri']); + } + + /** + * @param string $rbody + * @param int $rcode + * @param array $rheaders + * + * @throws Exception\UnexpectedValueException + * @throws Exception\ApiErrorException + * + * @return array + */ + private function _interpretResponse($rbody, $rcode, $rheaders) + { + $resp = \json_decode($rbody, true); + $jsonError = \json_last_error(); + if (null === $resp && \JSON_ERROR_NONE !== $jsonError) { + $msg = "Invalid response body from API: {$rbody} " + . "(HTTP response code was {$rcode}, json_last_error() was {$jsonError})"; + + throw new Exception\UnexpectedValueException($msg, $rcode); + } + + if ($rcode < 200 || $rcode >= 300) { + $this->handleErrorResponse($rbody, $rcode, $rheaders, $resp); + } + + return $resp; + } + + /** + * @static + * + * @param HttpClient\ClientInterface $client + */ + public static function setHttpClient($client) + { + self::$_httpClient = $client; + } + + /** + * @static + * + * @param HttpClient\StreamingClientInterface $client + */ + public static function setStreamingHttpClient($client) + { + self::$_streamingHttpClient = $client; + } + + /** + * @static + * + * Resets any stateful telemetry data + */ + public static function resetTelemetry() + { + self::$requestTelemetry = null; + } + + /** + * @return HttpClient\ClientInterface + */ + private function httpClient() + { + if (!self::$_httpClient) { + self::$_httpClient = HttpClient\CurlClient::instance(); + } + + return self::$_httpClient; + } + + /** + * @return HttpClient\StreamingClientInterface + */ + private function streamingHttpClient() + { + if (!self::$_streamingHttpClient) { + self::$_streamingHttpClient = HttpClient\CurlClient::instance(); + } + + return self::$_streamingHttpClient; + } +} diff --git a/libraries/Stripe/lib/ApiResource.php b/libraries/Stripe/lib/ApiResource.php new file mode 100644 index 00000000000..364d51cf184 --- /dev/null +++ b/libraries/Stripe/lib/ApiResource.php @@ -0,0 +1,122 @@ +{$k}; + if ((static::getSavedNestedResources()->includes($k)) + && ($v instanceof ApiResource)) { + $v->saveWithParent = true; + } + } + + /** + * @throws Exception\ApiErrorException + * + * @return ApiResource the refreshed resource + */ + public function refresh() + { + $requestor = new ApiRequestor($this->_opts->apiKey, static::baseUrl()); + $url = $this->instanceUrl(); + + list($response, $this->_opts->apiKey) = $requestor->request( + 'get', + $url, + $this->_retrieveOptions, + $this->_opts->headers + ); + $this->setLastResponse($response); + $this->refreshFrom($response->json, $this->_opts); + + return $this; + } + + /** + * @return string the base URL for the given class + */ + public static function baseUrl() + { + return Stripe::$apiBase; + } + + /** + * @return string the endpoint URL for the given class + */ + public static function classUrl() + { + // Replace dots with slashes for namespaced resources, e.g. if the object's name is + // "foo.bar", then its URL will be "/v1/foo/bars". + + /** @phpstan-ignore-next-line */ + $base = \str_replace('.', '/', static::OBJECT_NAME); + + return "/v1/{$base}s"; + } + + /** + * @param null|string $id the ID of the resource + * + * @throws Exception\UnexpectedValueException if $id is null + * + * @return string the instance endpoint URL for the given class + */ + public static function resourceUrl($id) + { + if (null === $id) { + $class = static::class; + $message = 'Could not determine which URL to request: ' + . "{$class} instance has invalid ID: {$id}"; + + throw new Exception\UnexpectedValueException($message); + } + $id = Util\Util::utf8($id); + $base = static::classUrl(); + $extn = \urlencode($id); + + return "{$base}/{$extn}"; + } + + /** + * @return string the full API URL for this API resource + */ + public function instanceUrl() + { + return static::resourceUrl($this['id']); + } +} diff --git a/libraries/Stripe/lib/ApiResponse.php b/libraries/Stripe/lib/ApiResponse.php new file mode 100644 index 00000000000..fa4defacadb --- /dev/null +++ b/libraries/Stripe/lib/ApiResponse.php @@ -0,0 +1,45 @@ +body = $body; + $this->code = $code; + $this->headers = $headers; + $this->json = $json; + } +} diff --git a/libraries/Stripe/lib/ApplePayDomain.php b/libraries/Stripe/lib/ApplePayDomain.php new file mode 100644 index 00000000000..3a3aa70c8ef --- /dev/null +++ b/libraries/Stripe/lib/ApplePayDomain.php @@ -0,0 +1,31 @@ +true
    if the object exists in live mode or the value false if the object exists in test mode. + */ +class ApplePayDomain extends ApiResource +{ + const OBJECT_NAME = 'apple_pay_domain'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + + /** + * @return string The class URL for this resource. It needs to be special + * cased because it doesn't fit into the standard resource pattern. + */ + public static function classUrl() + { + return '/v1/apple_pay/domains'; + } +} diff --git a/libraries/Stripe/lib/ApplicationFee.php b/libraries/Stripe/lib/ApplicationFee.php new file mode 100644 index 00000000000..99217daba66 --- /dev/null +++ b/libraries/Stripe/lib/ApplicationFee.php @@ -0,0 +1,90 @@ +ISO currency code, in lowercase. Must be a supported currency. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string|\EDD\Vendor\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter. + * @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\StripeObject> $refunds A list of refunds that have been applied to the fee. + */ +class ApplicationFee extends ApiResource +{ + const OBJECT_NAME = 'application_fee'; + + use ApiOperations\All; + use ApiOperations\NestedResource; + use ApiOperations\Retrieve; + + const PATH_REFUNDS = '/refunds'; + + /** + * @param string $id the ID of the application fee on which to retrieve the fee refunds + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\ApplicationFeeRefund> the list of fee refunds + */ + public static function allRefunds($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts); + } + + /** + * @param string $id the ID of the application fee on which to create the fee refund + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplicationFeeRefund + */ + public static function createRefund($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_REFUNDS, $params, $opts); + } + + /** + * @param string $id the ID of the application fee to which the fee refund belongs + * @param string $refundId the ID of the fee refund to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplicationFeeRefund + */ + public static function retrieveRefund($id, $refundId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts); + } + + /** + * @param string $id the ID of the application fee to which the fee refund belongs + * @param string $refundId the ID of the fee refund to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplicationFeeRefund + */ + public static function updateRefund($id, $refundId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/ApplicationFeeRefund.php b/libraries/Stripe/lib/ApplicationFeeRefund.php new file mode 100644 index 00000000000..39204c27283 --- /dev/null +++ b/libraries/Stripe/lib/ApplicationFeeRefund.php @@ -0,0 +1,66 @@ +Application Fee Refund
    objects allow you to refund an application + * fee that has previously been created but not yet refunded. Funds will be + * refunded to the EDD\Vendor\Stripe account from which the fee was originally collected. + * + * Related guide: Refunding + * Application Fees. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount, in %s. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string|\EDD\Vendor\Stripe\ApplicationFee $fee ID of the application fee that was refunded. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ +class ApplicationFeeRefund extends ApiResource +{ + const OBJECT_NAME = 'fee_refund'; + + use ApiOperations\Update { + save as protected _save; + } + + /** + * @return string the API URL for this EDD\Vendor\Stripe refund + */ + public function instanceUrl() + { + $id = $this['id']; + $fee = $this['fee']; + if (!$id) { + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", + null + ); + } + $id = Util\Util::utf8($id); + $fee = Util\Util::utf8($fee); + + $base = ApplicationFee::classUrl(); + $feeExtn = \urlencode($fee); + $extn = \urlencode($id); + + return "{$base}/{$feeExtn}/refunds/{$extn}"; + } + + /** + * @param null|array|string $opts + * + * @return ApplicationFeeRefund the saved refund + */ + public function save($opts = null) + { + return $this->_save($opts); + } +} diff --git a/libraries/Stripe/lib/Balance.php b/libraries/Stripe/lib/Balance.php new file mode 100644 index 00000000000..0ec4262306b --- /dev/null +++ b/libraries/Stripe/lib/Balance.php @@ -0,0 +1,45 @@ +transactions + * that contributed to the balance (charges, payouts, and so forth). + * + * The available and pending amounts for each currency are broken down further by + * payment source types. + * + * Related guide: Understanding Connect + * Account Balances. + * + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by EDD\Vendor\Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types property. + * @property \EDD\Vendor\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types property. + * @property \EDD\Vendor\Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts. + * @property \EDD\Vendor\Stripe\StripeObject $issuing + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the source_types property. + */ +class Balance extends SingletonApiResource +{ + const OBJECT_NAME = 'balance'; + + /** + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Balance + */ + public static function retrieve($opts = null) + { + return self::_singletonRetrieve($opts); + } +} diff --git a/libraries/Stripe/lib/BalanceTransaction.php b/libraries/Stripe/lib/BalanceTransaction.php new file mode 100644 index 00000000000..1a4e09ada05 --- /dev/null +++ b/libraries/Stripe/lib/BalanceTransaction.php @@ -0,0 +1,71 @@ +Balance + * Transaction Types. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Gross amount of the transaction, in %s. + * @property int $available_on The date the transaction's net funds will become available in the EDD\Vendor\Stripe balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the amount in currency A, times exchange_rate, would be the amount in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's amount would be 1000 and currency would be eur. Suppose this was converted into 12.34 USD in your EDD\Vendor\Stripe account. Then the BalanceTransaction's amount would be 1234, currency would be usd, and exchange_rate would be 1.234. + * @property int $fee Fees (in %s) paid for this transaction. + * @property \EDD\Vendor\Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction. + * @property int $net Net amount of the transaction, in %s. + * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. + * @property null|string|\EDD\Vendor\Stripe\StripeObject $source The EDD\Vendor\Stripe object to which this transaction is related. + * @property string $status If the transaction's net funds are available in the EDD\Vendor\Stripe balance yet. Either available or pending. + * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead. + */ +class BalanceTransaction extends ApiResource +{ + const OBJECT_NAME = 'balance_transaction'; + + use ApiOperations\All; + use ApiOperations\Retrieve; + + const TYPE_ADJUSTMENT = 'adjustment'; + const TYPE_ADVANCE = 'advance'; + const TYPE_ADVANCE_FUNDING = 'advance_funding'; + const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment'; + const TYPE_APPLICATION_FEE = 'application_fee'; + const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund'; + const TYPE_CHARGE = 'charge'; + const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer'; + const TYPE_CONTRIBUTION = 'contribution'; + const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold'; + const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release'; + const TYPE_ISSUING_DISPUTE = 'issuing_dispute'; + const TYPE_ISSUING_TRANSACTION = 'issuing_transaction'; + const TYPE_PAYMENT = 'payment'; + const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund'; + const TYPE_PAYMENT_REFUND = 'payment_refund'; + const TYPE_PAYOUT = 'payout'; + const TYPE_PAYOUT_CANCEL = 'payout_cancel'; + const TYPE_PAYOUT_FAILURE = 'payout_failure'; + const TYPE_REFUND = 'refund'; + const TYPE_REFUND_FAILURE = 'refund_failure'; + const TYPE_RESERVE_TRANSACTION = 'reserve_transaction'; + const TYPE_RESERVED_FUNDS = 'reserved_funds'; + const TYPE_STRIPE_FEE = 'stripe_fee'; + const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee'; + const TYPE_TAX_FEE = 'tax_fee'; + const TYPE_TOPUP = 'topup'; + const TYPE_TOPUP_REVERSAL = 'topup_reversal'; + const TYPE_TRANSFER = 'transfer'; + const TYPE_TRANSFER_CANCEL = 'transfer_cancel'; + const TYPE_TRANSFER_FAILURE = 'transfer_failure'; + const TYPE_TRANSFER_REFUND = 'transfer_refund'; +} diff --git a/libraries/Stripe/lib/BankAccount.php b/libraries/Stripe/lib/BankAccount.php new file mode 100644 index 00000000000..19984ad7de8 --- /dev/null +++ b/libraries/Stripe/lib/BankAccount.php @@ -0,0 +1,133 @@ +Customer
    objects. + * + * On the other hand External Accounts are + * transfer destinations on Account objects for Custom accounts. They + * can be bank accounts or debit cards as well, and are documented in the links + * above. + * + * Related guide: Bank Debits and + * Transfers. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\EDD\Vendor\Stripe\Account $account The ID of the account that the bank account is associated with. + * @property null|string $account_holder_name The name of the person or business that owns the bank account. + * @property null|string $account_holder_type The type of entity that holds the account. This can be either individual or company. + * @property null|string $account_type The bank account type. This can only be checking or savings in most countries. In Japan, this can only be futsu or toza. + * @property null|string[] $available_payout_methods A set of available payout methods for this bank account. Only values from this set should be passed as the method when creating a payout. + * @property null|string $bank_name Name of the bank associated with the routing number (e.g., WELLS FARGO). + * @property string $country Two-letter ISO code representing the country the bank account is located in. + * @property string $currency Three-letter ISO code for the currency paid out to the bank account. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The ID of the customer that the bank account is associated with. + * @property null|bool $default_for_currency Whether this bank account is the default external account for its currency. + * @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + * @property string $last4 The last four digits of the bank account number. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $routing_number The routing transit number for the bank account. + * @property string $status

    For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If EDD\Vendor\Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.

    For external accounts, possible values are new and errored. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.

    + */ +class BankAccount extends ApiResource +{ + const OBJECT_NAME = 'bank_account'; + + use ApiOperations\Delete; + use ApiOperations\Update; + + /** + * Possible string representations of the bank verification status. + * + * @see https://stripe.com/docs/api/external_account_bank_accounts/object#account_bank_account_object-status + */ + const STATUS_NEW = 'new'; + const STATUS_VALIDATED = 'validated'; + const STATUS_VERIFIED = 'verified'; + const STATUS_VERIFICATION_FAILED = 'verification_failed'; + const STATUS_ERRORED = 'errored'; + + /** + * @return string The instance URL for this resource. It needs to be special + * cased because it doesn't fit into the standard resource pattern. + */ + public function instanceUrl() + { + if ($this['customer']) { + $base = Customer::classUrl(); + $parent = $this['customer']; + $path = 'sources'; + } elseif ($this['account']) { + $base = Account::classUrl(); + $parent = $this['account']; + $path = 'external_accounts'; + } else { + $msg = 'Bank accounts cannot be accessed without a customer ID or account ID.'; + + throw new Exception\UnexpectedValueException($msg, null); + } + $parentExtn = \urlencode(Util\Util::utf8($parent)); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$parentExtn}/{$path}/{$extn}"; + } + + /** + * @param array|string $_id + * @param null|array|string $_opts + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function retrieve($_id, $_opts = null) + { + $msg = 'Bank accounts cannot be retrieved without a customer ID or ' . + 'an account ID. Retrieve a bank account using ' . + "`Customer::retrieveSource('customer_id', " . + "'bank_account_id')` or `Account::retrieveExternalAccount(" . + "'account_id', 'bank_account_id')`."; + + throw new Exception\BadMethodCallException($msg); + } + + /** + * @param string $_id + * @param null|array $_params + * @param null|array|string $_options + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function update($_id, $_params = null, $_options = null) + { + $msg = 'Bank accounts cannot be updated without a customer ID or an ' . + 'account ID. Update a bank account using ' . + "`Customer::updateSource('customer_id', 'bank_account_id', " . + '$updateParams)` or `Account::updateExternalAccount(' . + "'account_id', 'bank_account_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return BankAccount the verified bank account + */ + public function verify($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/verify'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/BaseStripeClient.php b/libraries/Stripe/lib/BaseStripeClient.php new file mode 100644 index 00000000000..7a5fee0bc07 --- /dev/null +++ b/libraries/Stripe/lib/BaseStripeClient.php @@ -0,0 +1,312 @@ + */ + private $config; + + /** @var \EDD\Vendor\Stripe\Util\RequestOptions */ + private $defaultOpts; + + /** + * Initializes a new instance of the {@link BaseStripeClient} class. + * + * The constructor takes a single argument. The argument can be a string, in which case it + * should be the API key. It can also be an array with various configuration settings. + * + * Configuration settings include the following options: + * + * - api_key (null|string): the EDD\Vendor\Stripe API key, to be used in regular API requests. + * - client_id (null|string): the EDD\Vendor\Stripe client ID, to be used in OAuth requests. + * - stripe_account (null|string): a EDD\Vendor\Stripe account ID. If set, all requests sent by the client + * will automatically use the {@code Stripe-Account} header with that account ID. + * - stripe_version (null|string): a EDD\Vendor\Stripe API verion. If set, all requests sent by the client + * will include the {@code Stripe-Version} header with that API version. + * + * The following configuration settings are also available, though setting these should rarely be necessary + * (only useful if you want to send requests to a mock server like stripe-mock): + * + * - api_base (string): the base URL for regular API requests. Defaults to + * {@link DEFAULT_API_BASE}. + * - connect_base (string): the base URL for OAuth requests. Defaults to + * {@link DEFAULT_CONNECT_BASE}. + * - files_base (string): the base URL for file creation requests. Defaults to + * {@link DEFAULT_FILES_BASE}. + * + * @param array|string $config the API key as a string, or an array containing + * the client configuration settings + */ + public function __construct($config = []) + { + if (\is_string($config)) { + $config = ['api_key' => $config]; + } elseif (!\is_array($config)) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('$config must be a string or an array'); + } + + $config = \array_merge($this->getDefaultConfig(), $config); + $this->validateConfig($config); + + $this->config = $config; + + $this->defaultOpts = \EDD\Vendor\Stripe\Util\RequestOptions::parse([ + 'stripe_account' => $config['stripe_account'], + 'stripe_version' => $config['stripe_version'], + ]); + } + + /** + * Gets the API key used by the client to send requests. + * + * @return null|string the API key used by the client to send requests + */ + public function getApiKey() + { + return $this->config['api_key']; + } + + /** + * Gets the client ID used by the client in OAuth requests. + * + * @return null|string the client ID used by the client in OAuth requests + */ + public function getClientId() + { + return $this->config['client_id']; + } + + /** + * Gets the base URL for Stripe's API. + * + * @return string the base URL for Stripe's API + */ + public function getApiBase() + { + return $this->config['api_base']; + } + + /** + * Gets the base URL for Stripe's OAuth API. + * + * @return string the base URL for Stripe's OAuth API + */ + public function getConnectBase() + { + return $this->config['connect_base']; + } + + /** + * Gets the base URL for Stripe's Files API. + * + * @return string the base URL for Stripe's Files API + */ + public function getFilesBase() + { + return $this->config['files_base']; + } + + /** + * Sends a request to Stripe's API. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param array $params the parameters of the request + * @param array|\EDD\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @return \EDD\Vendor\Stripe\StripeObject the object returned by Stripe's API + */ + public function request($method, $path, $params, $opts) + { + $opts = $this->defaultOpts->merge($opts, true); + $baseUrl = $opts->apiBase ?: $this->getApiBase(); + $requestor = new \EDD\Vendor\Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl); + list($response, $opts->apiKey) = $requestor->request($method, $path, $params, $opts->headers); + $opts->discardNonPersistentHeaders(); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * Sends a request to Stripe's API, passing chunks of the streamed response + * into a user-provided $readBodyChunkCallable callback. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param callable $readBodyChunkCallable a function that will be called + * @param array $params the parameters of the request + * @param array|\EDD\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request + * with chunks of bytes from the body if the request is successful + */ + public function requestStream($method, $path, $readBodyChunkCallable, $params, $opts) + { + $opts = $this->defaultOpts->merge($opts, true); + $baseUrl = $opts->apiBase ?: $this->getApiBase(); + $requestor = new \EDD\Vendor\Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl); + list($response, $opts->apiKey) = $requestor->requestStream($method, $path, $readBodyChunkCallable, $params, $opts->headers); + } + + /** + * Sends a request to Stripe's API. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param array $params the parameters of the request + * @param array|\EDD\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @return \EDD\Vendor\Stripe\Collection of ApiResources + */ + public function requestCollection($method, $path, $params, $opts) + { + $obj = $this->request($method, $path, $params, $opts); + if (!($obj instanceof \EDD\Vendor\Stripe\Collection)) { + $received_class = \get_class($obj); + $msg = "Expected to receive `EDD\Vendor\Stripe\\Collection` object from EDD\Vendor\Stripe API. Instead received `{$received_class}`."; + + throw new \EDD\Vendor\Stripe\Exception\UnexpectedValueException($msg); + } + $obj->setFilters($params); + + return $obj; + } + + /** + * Sends a request to Stripe's API. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param array $params the parameters of the request + * @param array|\EDD\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @return \EDD\Vendor\Stripe\SearchResult of ApiResources + */ + public function requestSearchResult($method, $path, $params, $opts) + { + $obj = $this->request($method, $path, $params, $opts); + if (!($obj instanceof \EDD\Vendor\Stripe\SearchResult)) { + $received_class = \get_class($obj); + $msg = "Expected to receive `EDD\Vendor\Stripe\\SearchResult` object from EDD\Vendor\Stripe API. Instead received `{$received_class}`."; + + throw new \EDD\Vendor\Stripe\Exception\UnexpectedValueException($msg); + } + $obj->setFilters($params); + + return $obj; + } + + /** + * @param \EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\AuthenticationException + * + * @return string + */ + private function apiKeyForRequest($opts) + { + $apiKey = $opts->apiKey ?: $this->getApiKey(); + + if (null === $apiKey) { + $msg = 'No API key provided. Set your API key when constructing the ' + . 'StripeClient instance, or provide it on a per-request basis ' + . 'using the `api_key` key in the $opts argument.'; + + throw new \EDD\Vendor\Stripe\Exception\AuthenticationException($msg); + } + + return $apiKey; + } + + /** + * TODO: replace this with a private constant when we drop support for PHP < 5. + * + * @return array + */ + private function getDefaultConfig() + { + return [ + 'api_key' => null, + 'client_id' => null, + 'stripe_account' => null, + 'stripe_version' => null, + 'api_base' => self::DEFAULT_API_BASE, + 'connect_base' => self::DEFAULT_CONNECT_BASE, + 'files_base' => self::DEFAULT_FILES_BASE, + ]; + } + + /** + * @param array $config + * + * @throws \EDD\Vendor\Stripe\Exception\InvalidArgumentException + */ + private function validateConfig($config) + { + // api_key + if (null !== $config['api_key'] && !\is_string($config['api_key'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('api_key must be null or a string'); + } + + if (null !== $config['api_key'] && ('' === $config['api_key'])) { + $msg = 'api_key cannot be the empty string'; + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException($msg); + } + + if (null !== $config['api_key'] && (\preg_match('/\s/', $config['api_key']))) { + $msg = 'api_key cannot contain whitespace'; + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException($msg); + } + + // client_id + if (null !== $config['client_id'] && !\is_string($config['client_id'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('client_id must be null or a string'); + } + + // stripe_account + if (null !== $config['stripe_account'] && !\is_string($config['stripe_account'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('stripe_account must be null or a string'); + } + + // stripe_version + if (null !== $config['stripe_version'] && !\is_string($config['stripe_version'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('stripe_version must be null or a string'); + } + + // api_base + if (!\is_string($config['api_base'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('api_base must be a string'); + } + + // connect_base + if (!\is_string($config['connect_base'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('connect_base must be a string'); + } + + // files_base + if (!\is_string($config['files_base'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('files_base must be a string'); + } + + // check absence of extra keys + $extraConfigKeys = \array_diff(\array_keys($config), \array_keys($this->getDefaultConfig())); + if (!empty($extraConfigKeys)) { + // Wrap in single quote to more easily catch trailing spaces errors + $invalidKeys = "'" . \implode("', '", $extraConfigKeys) . "'"; + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('Found unknown key(s) in configuration array: ' . $invalidKeys); + } + } +} diff --git a/libraries/Stripe/lib/BaseStripeClientInterface.php b/libraries/Stripe/lib/BaseStripeClientInterface.php new file mode 100644 index 00000000000..b76974d128e --- /dev/null +++ b/libraries/Stripe/lib/BaseStripeClientInterface.php @@ -0,0 +1,44 @@ +overriden when creating the session. + * @property \EDD\Vendor\Stripe\StripeObject $features + * @property bool $is_default Whether the configuration is the default. If true, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ +class Configuration extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'billing_portal.configuration'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/BillingPortal/Session.php b/libraries/Stripe/lib/BillingPortal/Session.php new file mode 100644 index 00000000000..bac03ca122f --- /dev/null +++ b/libraries/Stripe/lib/BillingPortal/Session.php @@ -0,0 +1,41 @@ +integration + * guide. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string|\EDD\Vendor\Stripe\BillingPortal\Configuration $configuration The configuration used by this session, describing the features available. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $customer The ID of the customer for this session. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used. + * @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account's branding settings, which the portal displays. + * @property string $return_url The URL to redirect customers to when they click on the portal's link to return to your website. + * @property string $url The short-lived URL of the session that gives customers access to the customer portal. + */ +class Session extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'billing_portal.session'; + + use \EDD\Vendor\Stripe\ApiOperations\Create; +} diff --git a/libraries/Stripe/lib/BitcoinReceiver.php b/libraries/Stripe/lib/BitcoinReceiver.php new file mode 100644 index 00000000000..df7c34f8dab --- /dev/null +++ b/libraries/Stripe/lib/BitcoinReceiver.php @@ -0,0 +1,71 @@ +currency that you are collecting as payment. + * @property int $amount_received The amount of currency to which bitcoin_amount_received has been converted. + * @property int $bitcoin_amount The amount of bitcoin that the customer should send to fill the receiver. The bitcoin_amount is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. + * @property int $bitcoin_amount_received The amount of bitcoin that has been sent by the customer to this receiver. + * @property string $bitcoin_uri This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO code for the currency to which the bitcoin will be converted. + * @property null|string $customer The customer ID of the bitcoin receiver. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string $email The customer's email address, set by the API call that creates the receiver. + * @property bool $filled This flag is initially false and updates to true when the customer sends the bitcoin_amount to this receiver. + * @property string $inbound_address A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $payment The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. + * @property null|string $refund_address The refund address of this bitcoin receiver. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\BitcoinTransaction> $transactions A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. + * @property bool $uncaptured_funds This receiver contains uncaptured funds that can be used for a payment or refunded. + * @property null|bool $used_for_payment Indicate if this source is used for payment. + */ +class BitcoinReceiver extends ApiResource +{ + const OBJECT_NAME = 'bitcoin_receiver'; + + use ApiOperations\All; + use ApiOperations\Retrieve; + + /** + * @return string The class URL for this resource. It needs to be special + * cased because it doesn't fit into the standard resource pattern. + */ + public static function classUrl() + { + return '/v1/bitcoin/receivers'; + } + + /** + * @return string The instance URL for this resource. It needs to be special + * cased because it doesn't fit into the standard resource pattern. + */ + public function instanceUrl() + { + if ($this['customer']) { + $base = Customer::classUrl(); + $parent = $this['customer']; + $path = 'sources'; + $parentExtn = \urlencode(Util\Util::utf8($parent)); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$parentExtn}/{$path}/{$extn}"; + } + + $base = BitcoinReceiver::classUrl(); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$extn}"; + } +} diff --git a/libraries/Stripe/lib/BitcoinTransaction.php b/libraries/Stripe/lib/BitcoinTransaction.php new file mode 100644 index 00000000000..7d843e3bf69 --- /dev/null +++ b/libraries/Stripe/lib/BitcoinTransaction.php @@ -0,0 +1,19 @@ +currency that the transaction was converted to in real-time. + * @property int $bitcoin_amount The amount of bitcoin contained in the transaction. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO code for the currency to which this transaction was converted. + * @property string $receiver The receiver to which this transaction was sent. + */ +class BitcoinTransaction extends ApiResource +{ + const OBJECT_NAME = 'bitcoin_transaction'; +} diff --git a/libraries/Stripe/lib/Capability.php b/libraries/Stripe/lib/Capability.php new file mode 100644 index 00000000000..1e063cfdf78 --- /dev/null +++ b/libraries/Stripe/lib/Capability.php @@ -0,0 +1,88 @@ +Account + * capabilities. + * + * @property string $id The identifier for the capability. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string|\EDD\Vendor\Stripe\Account $account The account for which the capability enables functionality. + * @property \EDD\Vendor\Stripe\StripeObject $future_requirements + * @property bool $requested Whether the capability has been requested. + * @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch. + * @property \EDD\Vendor\Stripe\StripeObject $requirements + * @property string $status The status of the capability. Can be active, inactive, pending, or unrequested. + */ +class Capability extends ApiResource +{ + const OBJECT_NAME = 'capability'; + + use ApiOperations\Update; + + const STATUS_ACTIVE = 'active'; + const STATUS_INACTIVE = 'inactive'; + const STATUS_PENDING = 'pending'; + const STATUS_UNREQUESTED = 'unrequested'; + + /** + * @return string the API URL for this EDD\Vendor\Stripe account reversal + */ + public function instanceUrl() + { + $id = $this['id']; + $account = $this['account']; + if (!$id) { + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", + null + ); + } + $id = Util\Util::utf8($id); + $account = Util\Util::utf8($account); + + $base = Account::classUrl(); + $accountExtn = \urlencode($account); + $extn = \urlencode($id); + + return "{$base}/{$accountExtn}/capabilities/{$extn}"; + } + + /** + * @param array|string $_id + * @param null|array|string $_opts + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function retrieve($_id, $_opts = null) + { + $msg = 'Capabilities cannot be retrieved without an account ID. ' . + 'Retrieve a capability using `Account::retrieveCapability(' . + "'account_id', 'capability_id')`."; + + throw new Exception\BadMethodCallException($msg); + } + + /** + * @param string $_id + * @param null|array $_params + * @param null|array|string $_options + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function update($_id, $_params = null, $_options = null) + { + $msg = 'Capabilities cannot be updated without an account ID. ' . + 'Update a capability using `Account::updateCapability(' . + "'account_id', 'capability_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); + } +} diff --git a/libraries/Stripe/lib/Card.php b/libraries/Stripe/lib/Card.php new file mode 100644 index 00000000000..b2ce021774e --- /dev/null +++ b/libraries/Stripe/lib/Card.php @@ -0,0 +1,143 @@ +Card Payments + * with Sources. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\EDD\Vendor\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. + * @property null|string $address_city City/District/Suburb/Town/Village. + * @property null|string $address_country Billing address country, if provided when creating card. + * @property null|string $address_line1 Address line 1 (Street address/PO Box/Company name). + * @property null|string $address_line1_check If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked. + * @property null|string $address_line2 Address line 2 (Apartment/Suite/Unit/Building). + * @property null|string $address_state State/County/Province/Region. + * @property null|string $address_zip ZIP or postal code. + * @property null|string $address_zip_check If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked. + * @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the method when creating a payout. + * @property string $brand Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown. + * @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + * @property null|string $currency Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + * @property null|string $cvc_check If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge. + * @property null|bool $default_for_currency Whether this card is the default external account for its currency. + * @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number. + * @property int $exp_month Two-digit number representing the card's expiration month. + * @property int $exp_year Four-digit number representing the card's expiration year. + * @property null|string $fingerprint

    Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.

    Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.

    + * @property string $funding Card funding type. Can be credit, debit, prepaid, or unknown. + * @property string $last4 The last four digits of the card. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $name Cardholder name. + * @property null|string|\EDD\Vendor\Stripe\Recipient $recipient The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. + * @property null|string $status For external accounts, possible values are new and errored. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated. + * @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be android_pay (includes Google Pay), apple_pay, masterpass, visa_checkout, or null. + */ +class Card extends ApiResource +{ + const OBJECT_NAME = 'card'; + + use ApiOperations\Delete; + use ApiOperations\Update; + + /** + * Possible string representations of the CVC check status. + * + * @see https://stripe.com/docs/api/cards/object#card_object-cvc_check + */ + const CVC_CHECK_FAIL = 'fail'; + const CVC_CHECK_PASS = 'pass'; + const CVC_CHECK_UNAVAILABLE = 'unavailable'; + const CVC_CHECK_UNCHECKED = 'unchecked'; + + /** + * Possible string representations of the funding of the card. + * + * @see https://stripe.com/docs/api/cards/object#card_object-funding + */ + const FUNDING_CREDIT = 'credit'; + const FUNDING_DEBIT = 'debit'; + const FUNDING_PREPAID = 'prepaid'; + const FUNDING_UNKNOWN = 'unknown'; + + /** + * Possible string representations of the tokenization method when using Apple Pay or Google Pay. + * + * @see https://stripe.com/docs/api/cards/object#card_object-tokenization_method + */ + const TOKENIZATION_METHOD_APPLE_PAY = 'apple_pay'; + const TOKENIZATION_METHOD_GOOGLE_PAY = 'google_pay'; + + /** + * @return string The instance URL for this resource. It needs to be special + * cased because cards are nested resources that may belong to different + * top-level resources. + */ + public function instanceUrl() + { + if ($this['customer']) { + $base = Customer::classUrl(); + $parent = $this['customer']; + $path = 'sources'; + } elseif ($this['account']) { + $base = Account::classUrl(); + $parent = $this['account']; + $path = 'external_accounts'; + } elseif ($this['recipient']) { + $base = Recipient::classUrl(); + $parent = $this['recipient']; + $path = 'cards'; + } else { + $msg = 'Cards cannot be accessed without a customer ID, account ID or recipient ID.'; + + throw new Exception\UnexpectedValueException($msg); + } + $parentExtn = \urlencode(Util\Util::utf8($parent)); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$parentExtn}/{$path}/{$extn}"; + } + + /** + * @param array|string $_id + * @param null|array|string $_opts + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function retrieve($_id, $_opts = null) + { + $msg = 'Cards cannot be retrieved without a customer ID or an ' . + 'account ID. Retrieve a card using ' . + "`Customer::retrieveSource('customer_id', 'card_id')` or " . + "`Account::retrieveExternalAccount('account_id', 'card_id')`."; + + throw new Exception\BadMethodCallException($msg); + } + + /** + * @param string $_id + * @param null|array $_params + * @param null|array|string $_options + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function update($_id, $_params = null, $_options = null) + { + $msg = 'Cards cannot be updated without a customer ID or an ' . + 'account ID. Update a card using ' . + "`Customer::updateSource('customer_id', 'card_id', " . + '$updateParams)` or `Account::updateExternalAccount(' . + "'account_id', 'card_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); + } +} diff --git a/libraries/Stripe/lib/CashBalance.php b/libraries/Stripe/lib/CashBalance.php new file mode 100644 index 00000000000..dcd320f47c0 --- /dev/null +++ b/libraries/Stripe/lib/CashBalance.php @@ -0,0 +1,66 @@ +Cash balance represents real funds. Customers can add + * funds to their cash balance by sending a bank transfer. These funds can be used + * for payment and can eventually be paid out to your bank account. + * + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\EDD\Vendor\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. + * @property string $customer The ID of the customer whose cash balance this object represents. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $settings + */ +class CashBalance extends ApiResource +{ + const OBJECT_NAME = 'cash_balance'; + + /** + * @return string the API URL for this balance transaction + */ + public function instanceUrl() + { + $customer = $this['customer']; + $customer = Util\Util::utf8($customer); + + $base = Customer::classUrl(); + $customerExtn = \urlencode($customer); + + return "{$base}/{$customerExtn}/cash_balance"; + } + + /** + * @param array|string $_id + * @param null|array|string $_opts + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function retrieve($_id, $_opts = null) + { + $msg = 'Customer Cash Balance cannot be retrieved without a ' . + 'customer ID. Retrieve a Customer Cash Balance using ' . + "`Customer::retrieveCashBalance('customer_id')`."; + + throw new Exception\BadMethodCallException($msg); + } + + /** + * @param string $_id + * @param null|array $_params + * @param null|array|string $_options + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function update($_id, $_params = null, $_options = null) + { + $msg = 'Customer Cash Balance cannot be updated without a ' . + 'customer ID. Retrieve a Customer Cash Balance using ' . + "`Customer::updateCashBalance('customer_id')`."; + + throw new Exception\BadMethodCallException($msg); + } +} diff --git a/libraries/Stripe/lib/Charge.php b/libraries/Stripe/lib/Charge.php new file mode 100644 index 00000000000..bdd9b9c993d --- /dev/null +++ b/libraries/Stripe/lib/Charge.php @@ -0,0 +1,163 @@ +Charge object. You + * can retrieve and refund individual charges as well as list all charges. Charges + * are identified by a unique, random ID. + * + * Related guide: Accept a + * payment with the Charges API. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + * @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). + * @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). + * @property null|string|\EDD\Vendor\Stripe\StripeObject $application ID of the Connect application that created the charge. + * @property null|string|\EDD\Vendor\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. See the Connect documentation for details. + * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. See the Connect documentation for details. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + * @property \EDD\Vendor\Stripe\StripeObject $billing_details + * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. + * @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer ID of the customer this charge is for if one exists. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\EDD\Vendor\Stripe\Account $destination ID of an existing, connected EDD\Vendor\Stripe account to transfer funds to if transfer_data was specified in the charge request. + * @property null|string|\EDD\Vendor\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed. + * @property bool $disputed Whether the charge has been disputed. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $failure_balance_transaction ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + * @property null|string $failure_code Error code explaining reason for charge failure if available (see the errors section for a list of codes). + * @property null|string $failure_message Message to user further explaining reason for charge failure if available. + * @property null|\EDD\Vendor\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge. + * @property null|string|\EDD\Vendor\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\EDD\Vendor\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details. + * @property null|string|\EDD\Vendor\Stripe\Order $order ID of the order this charge is for if one exists. + * @property null|\EDD\Vendor\Stripe\StripeObject $outcome Details about whether the payment was accepted, and why. See understanding declines for details. + * @property bool $paid true if the charge succeeded, or was successfully authorized for later capture. + * @property null|string|\EDD\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists. + * @property null|string $payment_method ID of the payment method used in this charge. + * @property null|\EDD\Vendor\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction. + * @property null|string $receipt_email This is the email address that the receipt for this charge was sent to. + * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent. + * @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + * @property bool $refunded Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Refund> $refunds A list of refunds that have been applied to the charge. + * @property null|string|\EDD\Vendor\Stripe\Review $review ID of the review associated with this charge if one exists. + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping Shipping information for the charge. + * @property null|\EDD\Vendor\Stripe\Account|\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to payment_method or payment_method_details instead. + * @property null|string|\EDD\Vendor\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another EDD\Vendor\Stripe account. See the Connect documentation for details. + * @property null|string $statement_descriptor For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. + * @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * @property string $status The status of the payment is either succeeded, pending, or failed. + * @property string|\EDD\Vendor\Stripe\Transfer $transfer ID of the transfer to the destination account (only applicable if the charge was created using the destination parameter). + * @property null|\EDD\Vendor\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details. + * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details. + */ +class Charge extends ApiResource +{ + const OBJECT_NAME = 'charge'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Search; + use ApiOperations\Update; + + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; + const STATUS_SUCCEEDED = 'succeeded'; + + /** + * Possible string representations of decline codes. + * These strings are applicable to the decline_code property of the \EDD\Vendor\Stripe\Exception\CardException exception. + * + * @see https://stripe.com/docs/declines/codes + */ + const DECLINED_AUTHENTICATION_REQUIRED = 'authentication_required'; + const DECLINED_APPROVE_WITH_ID = 'approve_with_id'; + const DECLINED_CALL_ISSUER = 'call_issuer'; + const DECLINED_CARD_NOT_SUPPORTED = 'card_not_supported'; + const DECLINED_CARD_VELOCITY_EXCEEDED = 'card_velocity_exceeded'; + const DECLINED_CURRENCY_NOT_SUPPORTED = 'currency_not_supported'; + const DECLINED_DO_NOT_HONOR = 'do_not_honor'; + const DECLINED_DO_NOT_TRY_AGAIN = 'do_not_try_again'; + const DECLINED_DUPLICATED_TRANSACTION = 'duplicate_transaction'; + const DECLINED_EXPIRED_CARD = 'expired_card'; + const DECLINED_FRAUDULENT = 'fraudulent'; + const DECLINED_GENERIC_DECLINE = 'generic_decline'; + const DECLINED_INCORRECT_NUMBER = 'incorrect_number'; + const DECLINED_INCORRECT_CVC = 'incorrect_cvc'; + const DECLINED_INCORRECT_PIN = 'incorrect_pin'; + const DECLINED_INCORRECT_ZIP = 'incorrect_zip'; + const DECLINED_INSUFFICIENT_FUNDS = 'insufficient_funds'; + const DECLINED_INVALID_ACCOUNT = 'invalid_account'; + const DECLINED_INVALID_AMOUNT = 'invalid_amount'; + const DECLINED_INVALID_CVC = 'invalid_cvc'; + const DECLINED_INVALID_EXPIRY_YEAR = 'invalid_expiry_year'; + const DECLINED_INVALID_NUMBER = 'invalid_number'; + const DECLINED_INVALID_PIN = 'invalid_pin'; + const DECLINED_ISSUER_NOT_AVAILABLE = 'issuer_not_available'; + const DECLINED_LOST_CARD = 'lost_card'; + const DECLINED_MERCHANT_BLACKLIST = 'merchant_blacklist'; + const DECLINED_NEW_ACCOUNT_INFORMATION_AVAILABLE = 'new_account_information_available'; + const DECLINED_NO_ACTION_TAKEN = 'no_action_taken'; + const DECLINED_NOT_PERMITTED = 'not_permitted'; + const DECLINED_OFFLINE_PIN_REQUIRED = 'offline_pin_required'; + const DECLINED_ONLINE_OR_OFFLINE_PIN_REQUIRED = 'online_or_offline_pin_required'; + const DECLINED_PICKUP_CARD = 'pickup_card'; + const DECLINED_PIN_TRY_EXCEEDED = 'pin_try_exceeded'; + const DECLINED_PROCESSING_ERROR = 'processing_error'; + const DECLINED_REENTER_TRANSACTION = 'reenter_transaction'; + const DECLINED_RESTRICTED_CARD = 'restricted_card'; + const DECLINED_REVOCATION_OF_ALL_AUTHORIZATIONS = 'revocation_of_all_authorizations'; + const DECLINED_REVOCATION_OF_AUTHORIZATION = 'revocation_of_authorization'; + const DECLINED_SECURITY_VIOLATION = 'security_violation'; + const DECLINED_SERVICE_NOT_ALLOWED = 'service_not_allowed'; + const DECLINED_STOLEN_CARD = 'stolen_card'; + const DECLINED_STOP_PAYMENT_ORDER = 'stop_payment_order'; + const DECLINED_TESTMODE_DECLINE = 'testmode_decline'; + const DECLINED_TRANSACTION_NOT_ALLOWED = 'transaction_not_allowed'; + const DECLINED_TRY_AGAIN_LATER = 'try_again_later'; + const DECLINED_WITHDRAWAL_COUNT_LIMIT_EXCEEDED = 'withdrawal_count_limit_exceeded'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Charge the captured charge + */ + public function capture($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/capture'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult the charge search results + */ + public static function search($params = null, $opts = null) + { + $url = '/v1/charges/search'; + + return self::_searchResource($url, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Checkout/Session.php b/libraries/Stripe/lib/Checkout/Session.php new file mode 100644 index 00000000000..c49e5297d36 --- /dev/null +++ b/libraries/Stripe/lib/Checkout/Session.php @@ -0,0 +1,133 @@ +Checkout or Payment Links. We + * recommend creating a new Session each time your customer attempts to pay. + * + * Once payment is successful, the Checkout Session will contain a reference to the + * Customer, and either the + * successful PaymentIntent or an + * active Subscription. + * + * You can create a Checkout Session on your server and pass its ID to the client + * to begin Checkout. + * + * Related guide: Checkout + * Server Quickstart. + * + * @property string $id Unique identifier for the object. Used to pass to redirectToCheckout in Stripe.js. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\EDD\Vendor\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires. + * @property null|bool $allow_promotion_codes Enables user redeemable promotion codes. + * @property null|int $amount_subtotal Total of all items before discounts or taxes are applied. + * @property null|int $amount_total Total of all items after discounts and taxes are applied. + * @property \EDD\Vendor\Stripe\StripeObject $automatic_tax + * @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address. + * @property string $cancel_url The URL the customer will be directed to if they decide to cancel payment and return to your website. + * @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems. + * @property null|\EDD\Vendor\Stripe\StripeObject $consent Results of consent_collection for this session. + * @property null|\EDD\Vendor\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers. + * @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in payment or subscription mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. + * @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + * @property null|\EDD\Vendor\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in payment or subscription mode. + * @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute. + * @property int $expires_at The timestamp at which the Checkout Session will expire. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\LineItem> $line_items The line items purchased by the customer. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $mode The mode of the Checkout Session. + * @property null|string|\EDD\Vendor\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in payment mode. + * @property null|string|\EDD\Vendor\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session. + * @property null|\EDD\Vendor\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + * @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. + * @property string $payment_status The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order. + * @property \EDD\Vendor\Stripe\StripeObject $phone_number_collection + * @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow. + * @property null|string|\EDD\Vendor\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping Shipping information for this Checkout Session. + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer. + * @property \EDD\Vendor\Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session. + * @property null|string|\EDD\Vendor\Stripe\ShippingRate $shipping_rate The ID of the ShippingRate for Checkout Sessions in payment mode. + * @property null|string $status The status of the Checkout Session, one of open, complete, or expired. + * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode, but not Checkout Sessions in subscription or setup mode. + * @property null|string|\EDD\Vendor\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription mode. + * @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful. + * @property \EDD\Vendor\Stripe\StripeObject $tax_id_collection + * @property null|\EDD\Vendor\Stripe\StripeObject $total_details Tax and discount details for the computed total amount. + * @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. + */ +class Session extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'checkout.session'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\NestedResource; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + + const BILLING_ADDRESS_COLLECTION_AUTO = 'auto'; + const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required'; + + const CUSTOMER_CREATION_ALWAYS = 'always'; + const CUSTOMER_CREATION_IF_REQUIRED = 'if_required'; + + const MODE_PAYMENT = 'payment'; + const MODE_SETUP = 'setup'; + const MODE_SUBSCRIPTION = 'subscription'; + + const PAYMENT_STATUS_NO_PAYMENT_REQUIRED = 'no_payment_required'; + const PAYMENT_STATUS_PAID = 'paid'; + const PAYMENT_STATUS_UNPAID = 'unpaid'; + + const STATUS_COMPLETE = 'complete'; + const STATUS_EXPIRED = 'expired'; + const STATUS_OPEN = 'open'; + + const SUBMIT_TYPE_AUTO = 'auto'; + const SUBMIT_TYPE_BOOK = 'book'; + const SUBMIT_TYPE_DONATE = 'donate'; + const SUBMIT_TYPE_PAY = 'pay'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Checkout\Session the expired session + */ + public function expire($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/expire'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + const PATH_LINE_ITEMS = '/line_items'; + + /** + * @param string $id the ID of the session on which to retrieve the items + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\LineItem> the list of items + */ + public static function allLineItems($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_LINE_ITEMS, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Collection.php b/libraries/Stripe/lib/Collection.php new file mode 100644 index 00000000000..3d0d32c909f --- /dev/null +++ b/libraries/Stripe/lib/Collection.php @@ -0,0 +1,312 @@ + + * + * @property string $object + * @property string $url + * @property bool $has_more + * @property TStripeObject[] $data + */ +class Collection extends StripeObject implements \Countable, \IteratorAggregate +{ + const OBJECT_NAME = 'list'; + + use ApiOperations\Request; + + /** @var array */ + protected $filters = []; + + /** + * @return string the base URL for the given class + */ + public static function baseUrl() + { + return Stripe::$apiBase; + } + + /** + * Returns the filters. + * + * @return array the filters + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Sets the filters, removing paging options. + * + * @param array $filters the filters + */ + public function setFilters($filters) + { + $this->filters = $filters; + } + + #[\ReturnTypeWillChange] + public function offsetGet($k) + { + if (\is_string($k)) { + return parent::offsetGet($k); + } + $msg = "You tried to access the {$k} index, but Collection " . + 'types only support string keys. (HINT: List calls ' . + 'return an object with a `data` (which is the data ' . + "array). You likely want to call ->data[{$k}])"; + + throw new Exception\InvalidArgumentException($msg); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws Exception\ApiErrorException + * + * @return Collection + */ + public function all($params = null, $opts = null) + { + self::_validateParams($params); + list($url, $params) = $this->extractPathAndUpdateParams($params); + + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = Util\Util::convertToStripeObject($response, $opts); + if (!($obj instanceof \EDD\Vendor\Stripe\Collection)) { + throw new \EDD\Vendor\Stripe\Exception\UnexpectedValueException( + 'Expected type ' . \EDD\Vendor\Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.' + ); + } + $obj->setFilters($params); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws Exception\ApiErrorException + * + * @return TStripeObject + */ + public function create($params = null, $opts = null) + { + self::_validateParams($params); + list($url, $params) = $this->extractPathAndUpdateParams($params); + + list($response, $opts) = $this->_request('post', $url, $params, $opts); + + return Util\Util::convertToStripeObject($response, $opts); + } + + /** + * @param string $id + * @param null|array $params + * @param null|array|string $opts + * + * @throws Exception\ApiErrorException + * + * @return TStripeObject + */ + public function retrieve($id, $params = null, $opts = null) + { + self::_validateParams($params); + list($url, $params) = $this->extractPathAndUpdateParams($params); + + $id = Util\Util::utf8($id); + $extn = \urlencode($id); + list($response, $opts) = $this->_request( + 'get', + "{$url}/{$extn}", + $params, + $opts + ); + + return Util\Util::convertToStripeObject($response, $opts); + } + + /** + * @return int the number of objects in the current page + */ + #[\ReturnTypeWillChange] + public function count() + { + return \count($this->data); + } + + /** + * @return \ArrayIterator an iterator that can be used to iterate + * across objects in the current page + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return new \ArrayIterator($this->data); + } + + /** + * @return \ArrayIterator an iterator that can be used to iterate + * backwards across objects in the current page + */ + public function getReverseIterator() + { + return new \ArrayIterator(\array_reverse($this->data)); + } + + /** + * @return \Generator|TStripeObject[] A generator that can be used to + * iterate across all objects across all pages. As page boundaries are + * encountered, the next page will be fetched automatically for + * continued iteration. + */ + public function autoPagingIterator() + { + $page = $this; + + while (true) { + $filters = $this->filters ?: []; + if (\array_key_exists('ending_before', $filters) + && !\array_key_exists('starting_after', $filters)) { + foreach ($page->getReverseIterator() as $item) { + yield $item; + } + $page = $page->previousPage(); + } else { + foreach ($page as $item) { + yield $item; + } + $page = $page->nextPage(); + } + + if ($page->isEmpty()) { + break; + } + } + } + + /** + * Returns an empty collection. This is returned from {@see nextPage()} + * when we know that there isn't a next page in order to replicate the + * behavior of the API when it attempts to return a page beyond the last. + * + * @param null|array|string $opts + * + * @return Collection + */ + public static function emptyCollection($opts = null) + { + return Collection::constructFrom(['data' => []], $opts); + } + + /** + * Returns true if the page object contains no element. + * + * @return bool + */ + public function isEmpty() + { + return empty($this->data); + } + + /** + * Fetches the next page in the resource list (if there is one). + * + * This method will try to respect the limit of the current page. If none + * was given, the default limit will be fetched again. + * + * @param null|array $params + * @param null|array|string $opts + * + * @return Collection + */ + public function nextPage($params = null, $opts = null) + { + if (!$this->has_more) { + return static::emptyCollection($opts); + } + + $lastId = \end($this->data)->id; + + $params = \array_merge( + $this->filters ?: [], + ['starting_after' => $lastId], + $params ?: [] + ); + + return $this->all($params, $opts); + } + + /** + * Fetches the previous page in the resource list (if there is one). + * + * This method will try to respect the limit of the current page. If none + * was given, the default limit will be fetched again. + * + * @param null|array $params + * @param null|array|string $opts + * + * @return Collection + */ + public function previousPage($params = null, $opts = null) + { + if (!$this->has_more) { + return static::emptyCollection($opts); + } + + $firstId = $this->data[0]->id; + + $params = \array_merge( + $this->filters ?: [], + ['ending_before' => $firstId], + $params ?: [] + ); + + return $this->all($params, $opts); + } + + /** + * Gets the first item from the current page. Returns `null` if the current page is empty. + * + * @return null|TStripeObject + */ + public function first() + { + return \count($this->data) > 0 ? $this->data[0] : null; + } + + /** + * Gets the last item from the current page. Returns `null` if the current page is empty. + * + * @return null|TStripeObject + */ + public function last() + { + return \count($this->data) > 0 ? $this->data[\count($this->data) - 1] : null; + } + + private function extractPathAndUpdateParams($params) + { + $url = \parse_url($this->url); + if (!isset($url['path'])) { + throw new Exception\UnexpectedValueException("Could not parse list url into parts: {$url}"); + } + + if (isset($url['query'])) { + // If the URL contains a query param, parse it out into $params so they + // don't interact weirdly with each other. + $query = []; + \parse_str($url['query'], $query); + $params = \array_merge($params ?: [], $query); + } + + return [$url['path'], $params]; + } +} diff --git a/libraries/Stripe/lib/CountrySpec.php b/libraries/Stripe/lib/CountrySpec.php new file mode 100644 index 00000000000..2120d53357b --- /dev/null +++ b/libraries/Stripe/lib/CountrySpec.php @@ -0,0 +1,30 @@ +an online guide. + * + * @property string $id Unique identifier for the object. Represented as the ISO country code for this country. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $default_currency The default currency for this country. This applies to both payment methods and bank accounts. + * @property \EDD\Vendor\Stripe\StripeObject $supported_bank_account_currencies Currencies that can be accepted in the specific country (for transfers). + * @property string[] $supported_payment_currencies Currencies that can be accepted in the specified country (for payments). + * @property string[] $supported_payment_methods Payment methods available in the specified country. You may need to enable some payment methods (e.g., ACH) on your account before they appear in this list. The stripe payment method refers to charging through your platform. + * @property string[] $supported_transfer_countries Countries that can accept transfers from the specified country. + * @property \EDD\Vendor\Stripe\StripeObject $verification_fields + */ +class CountrySpec extends ApiResource +{ + const OBJECT_NAME = 'country_spec'; + + use ApiOperations\All; + use ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/Coupon.php b/libraries/Stripe/lib/Coupon.php new file mode 100644 index 00000000000..b6b1f169c7e --- /dev/null +++ b/libraries/Stripe/lib/Coupon.php @@ -0,0 +1,41 @@ +invoices or orders. + * Coupons do not work with conventional one-off charges. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|int $amount_off Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer. + * @property \EDD\Vendor\Stripe\StripeObject $applies_to + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $currency If amount_off has been set, the three-letter ISO code for the currency of the amount to take off. + * @property string $duration One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount. + * @property null|int $duration_in_months If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts. + * @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. + * @property null|int $redeem_by Date after which the coupon can no longer be redeemed. + * @property int $times_redeemed Number of times this coupon has been applied to a customer. + * @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer. + */ +class Coupon extends ApiResource +{ + const OBJECT_NAME = 'coupon'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/CreditNote.php b/libraries/Stripe/lib/CreditNote.php new file mode 100644 index 00000000000..ecd476dfc77 --- /dev/null +++ b/libraries/Stripe/lib/CreditNote.php @@ -0,0 +1,111 @@ +Credit Notes. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The integer amount in %s representing the total amount of the credit note, including tax. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string|\EDD\Vendor\Stripe\Customer $customer ID of the customer. + * @property null|string|\EDD\Vendor\Stripe\CustomerBalanceTransaction $customer_balance_transaction Customer balance transaction related to this credit note. + * @property int $discount_amount The integer amount in %s representing the total amount of discount that was credited. + * @property \EDD\Vendor\Stripe\StripeObject[] $discount_amounts The aggregate amounts calculated per discount for all line items. + * @property string|\EDD\Vendor\Stripe\Invoice $invoice ID of the invoice. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\CreditNoteLineItem> $lines Line items that make up the credit note + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $memo Customer-facing text that appears on the credit note PDF. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + * @property null|int $out_of_band_amount Amount that was credited outside of Stripe. + * @property string $pdf The link to download the PDF of the credit note. + * @property null|string $reason Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory + * @property null|string|\EDD\Vendor\Stripe\Refund $refund Refund related to this credit note. + * @property string $status Status of this credit note, one of issued or void. Learn more about voiding credit notes. + * @property int $subtotal The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. + * @property \EDD\Vendor\Stripe\StripeObject[] $tax_amounts The aggregate amounts calculated per tax rate for all line items. + * @property int $total The integer amount in %s representing the total amount of the credit note, including tax and all discount. + * @property string $type Type of this credit note, one of pre_payment or post_payment. A pre_payment credit note means it was issued when the invoice was open. A post_payment credit note means it was issued when the invoice was paid. + * @property null|int $voided_at The time that the credit note was voided. + */ +class CreditNote extends ApiResource +{ + const OBJECT_NAME = 'credit_note'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\NestedResource; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const REASON_DUPLICATE = 'duplicate'; + const REASON_FRAUDULENT = 'fraudulent'; + const REASON_ORDER_CHANGE = 'order_change'; + const REASON_PRODUCT_UNSATISFACTORY = 'product_unsatisfactory'; + + const STATUS_ISSUED = 'issued'; + const STATUS_VOID = 'void'; + + const TYPE_POST_PAYMENT = 'post_payment'; + const TYPE_PRE_PAYMENT = 'pre_payment'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CreditNote the previewed credit note + */ + public static function preview($params = null, $opts = null) + { + $url = static::classUrl() . '/preview'; + list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CreditNote the voided credit note + */ + public function voidCreditNote($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/void'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + const PATH_LINES = '/lines'; + + /** + * @param string $id the ID of the credit note on which to retrieve the credit note line items + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\CreditNoteLineItem> the list of credit note line items + */ + public static function allLines($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_LINES, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/CreditNoteLineItem.php b/libraries/Stripe/lib/CreditNoteLineItem.php new file mode 100644 index 00000000000..0647729e83c --- /dev/null +++ b/libraries/Stripe/lib/CreditNoteLineItem.php @@ -0,0 +1,26 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|int $quantity The number of units of product being credited. + * @property \EDD\Vendor\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item + * @property \EDD\Vendor\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item. + * @property string $type The type of the credit note line item, one of invoice_line_item or custom_line_item. When the type is invoice_line_item there is an additional invoice_line_item property on the resource the value of which is the id of the credited line item on the invoice. + * @property null|int $unit_amount The cost of each unit of product being credited. + * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places. + */ +class CreditNoteLineItem extends ApiResource +{ + const OBJECT_NAME = 'credit_note_line_item'; +} diff --git a/libraries/Stripe/lib/Customer.php b/libraries/Stripe/lib/Customer.php new file mode 100644 index 00000000000..fc98e9049b3 --- /dev/null +++ b/libraries/Stripe/lib/Customer.php @@ -0,0 +1,343 @@ +Save a card during + * payment. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\EDD\Vendor\Stripe\StripeObject $address The customer's address. + * @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. + * @property null|\EDD\Vendor\Stripe\CashBalance $cash_balance The current funds being held by EDD\Vendor\Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $currency Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes. + * @property null|string|\EDD\Vendor\Stripe\Account|\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source $default_source

    ID of the default payment source for the customer.

    If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method field instead.

    + * @property null|bool $delinquent

    When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice isn't paid by its due date.

    If an invoice is marked uncollectible by dunning, delinquent doesn't get reset to false.

    + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|\EDD\Vendor\Stripe\Discount $discount Describes the current discount active on the customer, if there is one. + * @property null|string $email The customer's email address. + * @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers. + * @property \EDD\Vendor\Stripe\StripeObject $invoice_settings + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $name The customer's full name or business name. + * @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001. + * @property null|string $phone The customer's phone number. + * @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference. + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Account|\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source> $sources The customer's payment sources, if any. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any. + * @property \EDD\Vendor\Stripe\StripeObject $tax + * @property null|string $tax_exempt Describes the customer's tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text "Reverse charge". + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TaxId> $tax_ids The customer's tax IDs. + * @property null|string|\EDD\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to. + */ +class Customer extends ApiResource +{ + const OBJECT_NAME = 'customer'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\NestedResource; + use ApiOperations\Retrieve; + use ApiOperations\Search; + use ApiOperations\Update; + + const TAX_EXEMPT_EXEMPT = 'exempt'; + const TAX_EXEMPT_NONE = 'none'; + const TAX_EXEMPT_REVERSE = 'reverse'; + + public static function getSavedNestedResources() + { + static $savedNestedResources = null; + if (null === $savedNestedResources) { + $savedNestedResources = new Util\Set([ + 'source', + ]); + } + + return $savedNestedResources; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @return \EDD\Vendor\Stripe\Customer the updated customer + */ + public function deleteDiscount($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/discount'; + list($response, $opts) = $this->_request('delete', $url, $params, $opts); + $this->refreshFrom(['discount' => null], $opts, true); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * @param mixed $id + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Customer> list of PaymentMethods + */ + public static function allPaymentMethods($id, $params = null, $opts = null) + { + $url = static::resourceUrl($id) . '/payment_methods'; + list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult the customer search results + */ + public static function search($params = null, $opts = null) + { + $url = '/v1/customers/search'; + + return self::_searchResource($url, $params, $opts); + } + + const PATH_CASH_BALANCE = '/cash_balance'; + + /** + * @param string $id the ID of the customer to which the cash balance belongs + * @param null|array $params + * @param null|array|string $opts + * @param mixed $cashBalanceId + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\cash_balance + */ + public static function retrieveCashBalance($id, $cashBalanceId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the cash balance belongs + * @param null|array $params + * @param null|array|string $opts + * @param mixed $cashBalanceId + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\cash_balance + */ + public static function updateCashBalance($id, $cashBalanceId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts); + } + const PATH_BALANCE_TRANSACTIONS = '/balance_transactions'; + + /** + * @param string $id the ID of the customer on which to retrieve the customer balance transactions + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\CustomerBalanceTransaction> the list of customer balance transactions + */ + public static function allBalanceTransactions($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_BALANCE_TRANSACTIONS, $params, $opts); + } + + /** + * @param string $id the ID of the customer on which to create the customer balance transaction + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CustomerBalanceTransaction + */ + public static function createBalanceTransaction($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the customer balance transaction belongs + * @param string $balanceTransactionId the ID of the customer balance transaction to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CustomerBalanceTransaction + */ + public static function retrieveBalanceTransaction($id, $balanceTransactionId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $balanceTransactionId, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the customer balance transaction belongs + * @param string $balanceTransactionId the ID of the customer balance transaction to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CustomerBalanceTransaction + */ + public static function updateBalanceTransaction($id, $balanceTransactionId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $balanceTransactionId, $params, $opts); + } + const PATH_SOURCES = '/sources'; + + /** + * @param string $id the ID of the customer on which to retrieve the payment sources + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source> the list of payment sources (AlipayAccount, BankAccount, BitcoinReceiver, Card or Source) + */ + public static function allSources($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_SOURCES, $params, $opts); + } + + /** + * @param string $id the ID of the customer on which to create the payment source + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public static function createSource($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_SOURCES, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the payment source belongs + * @param string $sourceId the ID of the payment source to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public static function deleteSource($id, $sourceId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the payment source belongs + * @param string $sourceId the ID of the payment source to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public static function retrieveSource($id, $sourceId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the payment source belongs + * @param string $sourceId the ID of the payment source to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public static function updateSource($id, $sourceId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); + } + const PATH_TAX_IDS = '/tax_ids'; + + /** + * @param string $id the ID of the customer on which to retrieve the tax ids + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TaxId> the list of tax ids + */ + public static function allTaxIds($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_TAX_IDS, $params, $opts); + } + + /** + * @param string $id the ID of the customer on which to create the tax id + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxId + */ + public static function createTaxId($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_TAX_IDS, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the tax id belongs + * @param string $taxIdId the ID of the tax id to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxId + */ + public static function deleteTaxId($id, $taxIdId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the tax id belongs + * @param string $taxIdId the ID of the tax id to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxId + */ + public static function retrieveTaxId($id, $taxIdId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/CustomerBalanceTransaction.php b/libraries/Stripe/lib/CustomerBalanceTransaction.php new file mode 100644 index 00000000000..e80ea6afda3 --- /dev/null +++ b/libraries/Stripe/lib/CustomerBalanceTransaction.php @@ -0,0 +1,103 @@ +balance + * value, which denotes a debit or credit that's automatically applied to their + * next invoice upon finalization. You may modify the value directly by using the + * update customer API, + * or by creating a Customer Balance Transaction, which increments or decrements + * the customer's balance by the specified amount. + * + * Related guide: Customer Balance to + * learn more. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\EDD\Vendor\Stripe\CreditNote $credit_note The ID of the credit note (if any) related to the transaction. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string|\EDD\Vendor\Stripe\Customer $customer The ID of the customer the transaction belongs to. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property int $ending_balance The customer's balance after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + * @property null|string|\EDD\Vendor\Stripe\Invoice $invoice The ID of the invoice (if any) related to the transaction. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $type Transaction type: adjustment, applied_to_invoice, credit_note, initial, invoice_too_large, invoice_too_small, unspent_receiver_credit, or unapplied_from_invoice. See the Customer Balance page to learn more about transaction types. + */ +class CustomerBalanceTransaction extends ApiResource +{ + const OBJECT_NAME = 'customer_balance_transaction'; + + const TYPE_ADJUSTMENT = 'adjustment'; + const TYPE_APPLIED_TO_INVOICE = 'applied_to_invoice'; + const TYPE_CREDIT_NOTE = 'credit_note'; + const TYPE_INITIAL = 'initial'; + const TYPE_INVOICE_TOO_LARGE = 'invoice_too_large'; + const TYPE_INVOICE_TOO_SMALL = 'invoice_too_small'; + const TYPE_UNSPENT_RECEIVER_CREDIT = 'unspent_receiver_credit'; + + const TYPE_ADJUSTEMENT = 'adjustment'; + + /** + * @return string the API URL for this balance transaction + */ + public function instanceUrl() + { + $id = $this['id']; + $customer = $this['customer']; + if (!$id) { + throw new Exception\UnexpectedValueException( + "Could not determine which URL to request: class instance has invalid ID: {$id}", + null + ); + } + $id = Util\Util::utf8($id); + $customer = Util\Util::utf8($customer); + + $base = Customer::classUrl(); + $customerExtn = \urlencode($customer); + $extn = \urlencode($id); + + return "{$base}/{$customerExtn}/balance_transactions/{$extn}"; + } + + /** + * @param array|string $_id + * @param null|array|string $_opts + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function retrieve($_id, $_opts = null) + { + $msg = 'Customer Balance Transactions cannot be retrieved without a ' . + 'customer ID. Retrieve a Customer Balance Transaction using ' . + "`Customer::retrieveBalanceTransaction('customer_id', " . + "'balance_transaction_id')`."; + + throw new Exception\BadMethodCallException($msg); + } + + /** + * @param string $_id + * @param null|array $_params + * @param null|array|string $_options + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function update($_id, $_params = null, $_options = null) + { + $msg = 'Customer Balance Transactions cannot be updated without a ' . + 'customer ID. Update a Customer Balance Transaction using ' . + "`Customer::updateBalanceTransaction('customer_id', " . + "'balance_transaction_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); + } +} diff --git a/libraries/Stripe/lib/Discount.php b/libraries/Stripe/lib/Discount.php new file mode 100644 index 00000000000..23930d63cce --- /dev/null +++ b/libraries/Stripe/lib/Discount.php @@ -0,0 +1,23 @@ +Disputes and Fraud + * documentation. + * + * Related guide: Disputes and + * Fraud. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). + * @property \EDD\Vendor\Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your EDD\Vendor\Stripe account as a result of this dispute. + * @property string|\EDD\Vendor\Stripe\Charge $charge ID of the charge that was disputed. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property \EDD\Vendor\Stripe\StripeObject $evidence + * @property \EDD\Vendor\Stripe\StripeObject $evidence_details + * @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your EDD\Vendor\Stripe account as a result of this dispute. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $network_reason_code Network-dependent reason code for the dispute. + * @property null|string|\EDD\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed. + * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Read more about dispute reasons. + * @property string $status Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, charge_refunded, won, or lost. + */ +class Dispute extends ApiResource +{ + const OBJECT_NAME = 'dispute'; + + use ApiOperations\All; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process'; + const REASON_CHECK_RETURNED = 'check_returned'; + const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed'; + const REASON_CUSTOMER_INITIATED = 'customer_initiated'; + const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; + const REASON_DUPLICATE = 'duplicate'; + const REASON_FRAUDULENT = 'fraudulent'; + const REASON_GENERAL = 'general'; + const REASON_INCORRECT_ACCOUNT_DETAILS = 'incorrect_account_details'; + const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds'; + const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received'; + const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable'; + const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled'; + const REASON_UNRECOGNIZED = 'unrecognized'; + + const STATUS_CHARGE_REFUNDED = 'charge_refunded'; + const STATUS_LOST = 'lost'; + const STATUS_NEEDS_RESPONSE = 'needs_response'; + const STATUS_UNDER_REVIEW = 'under_review'; + const STATUS_WARNING_CLOSED = 'warning_closed'; + const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response'; + const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review'; + const STATUS_WON = 'won'; + + /** + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Dispute the closed dispute + */ + // TODO: add $params to standardize signature + public function close($opts = null) + { + $url = $this->instanceUrl() . '/close'; + list($response, $opts) = $this->_request('post', $url, null, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/EphemeralKey.php b/libraries/Stripe/lib/EphemeralKey.php new file mode 100644 index 00000000000..e7272fe20ef --- /dev/null +++ b/libraries/Stripe/lib/EphemeralKey.php @@ -0,0 +1,43 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property string $secret The key's secret. You can use this value to make authorized requests to the EDD\Vendor\Stripe API. + * @property array $associated_objects + */ +class EphemeralKey extends ApiResource +{ + const OBJECT_NAME = 'ephemeral_key'; + + use ApiOperations\Create { + create as protected _create; + } + + use ApiOperations\Delete; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\InvalidArgumentException if stripe_version is missing + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\EphemeralKey the created key + */ + public static function create($params = null, $opts = null) + { + if (!$opts || !isset($opts['stripe_version'])) { + throw new Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key'); + } + + return self::_create($params, $opts); + } +} diff --git a/libraries/Stripe/lib/ErrorObject.php b/libraries/Stripe/lib/ErrorObject.php new file mode 100644 index 00000000000..36ffa4d99d7 --- /dev/null +++ b/libraries/Stripe/lib/ErrorObject.php @@ -0,0 +1,162 @@ + null, + 'code' => null, + 'decline_code' => null, + 'doc_url' => null, + 'message' => null, + 'param' => null, + 'payment_intent' => null, + 'payment_method' => null, + 'setup_intent' => null, + 'source' => null, + 'type' => null, + ], $values); + parent::refreshFrom($values, $opts, $partial); + } +} diff --git a/libraries/Stripe/lib/Event.php b/libraries/Stripe/lib/Event.php new file mode 100644 index 00000000000..a77b491ee06 --- /dev/null +++ b/libraries/Stripe/lib/Event.php @@ -0,0 +1,255 @@ +Event object. For example, when a charge succeeds, we create a + * charge.succeeded event; and when an invoice payment attempt fails, + * we create an invoice.payment_failed event. Note that many API + * requests may cause multiple events to be created. For example, if you create a + * new subscription for a customer, you will receive both a + * customer.subscription.created event and a + * charge.succeeded event. + * + * Events occur when the state of another API resource changes. The state of that + * resource at the time of the change is embedded in the event's data field. For + * example, a charge.succeeded event will contain a charge, and an + * invoice.payment_failed event will contain an invoice. + * + * As with other API resources, you can use endpoints to retrieve an individual event or a list of events from the API. + * We also have a separate webhooks system for sending the + * Event objects directly to an endpoint on your server. Webhooks are + * managed in your account + * settings, and our Using + * Webhooks guide will help you get set up. + * + * When using Connect, you can also + * receive notifications of events that occur in connected accounts. For these + * events, there will be an additional account attribute in the + * received Event object. + * + * NOTE: Right now, access to events through the Retrieve Event API is + * guaranteed only for 30 days. + * + * This class includes constants for the possible string representations of + * event types. See https://stripe.com/docs/api#event_types for more details. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $account The connected account that originated the event. + * @property null|string $api_version The EDD\Vendor\Stripe API version used to render data. Note: This property is populated only for events on or after October 31, 2014. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property \EDD\Vendor\Stripe\StripeObject $data + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. + * @property null|\EDD\Vendor\Stripe\StripeObject $request Information on the API request that instigated the event. + * @property string $type Description of the event (e.g., invoice.created or charge.refunded). + */ +class Event extends ApiResource +{ + const OBJECT_NAME = 'event'; + + use ApiOperations\All; + use ApiOperations\Retrieve; + + const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized'; + const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized'; + const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created'; + const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted'; + const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated'; + const ACCOUNT_UPDATED = 'account.updated'; + const APPLICATION_FEE_CREATED = 'application_fee.created'; + const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; + const APPLICATION_FEE_REFUNDED = 'application_fee.refunded'; + const BALANCE_AVAILABLE = 'balance.available'; + const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created'; + const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated'; + const CAPABILITY_UPDATED = 'capability.updated'; + const CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available'; + const CHARGE_CAPTURED = 'charge.captured'; + const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed'; + const CHARGE_DISPUTE_CREATED = 'charge.dispute.created'; + const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated'; + const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn'; + const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated'; + const CHARGE_EXPIRED = 'charge.expired'; + const CHARGE_FAILED = 'charge.failed'; + const CHARGE_PENDING = 'charge.pending'; + const CHARGE_REFUND_UPDATED = 'charge.refund.updated'; + const CHARGE_REFUNDED = 'charge.refunded'; + const CHARGE_SUCCEEDED = 'charge.succeeded'; + const CHARGE_UPDATED = 'charge.updated'; + const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed'; + const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded'; + const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed'; + const CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired'; + const COUPON_CREATED = 'coupon.created'; + const COUPON_DELETED = 'coupon.deleted'; + const COUPON_UPDATED = 'coupon.updated'; + const CREDIT_NOTE_CREATED = 'credit_note.created'; + const CREDIT_NOTE_UPDATED = 'credit_note.updated'; + const CREDIT_NOTE_VOIDED = 'credit_note.voided'; + const CUSTOMER_CREATED = 'customer.created'; + const CUSTOMER_DELETED = 'customer.deleted'; + const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created'; + const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted'; + const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated'; + const CUSTOMER_SOURCE_CREATED = 'customer.source.created'; + const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted'; + const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring'; + const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated'; + const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created'; + const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted'; + const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied'; + const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired'; + const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end'; + const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated'; + const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created'; + const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted'; + const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated'; + const CUSTOMER_UPDATED = 'customer.updated'; + const FILE_CREATED = 'file.created'; + const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled'; + const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created'; + const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing'; + const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted'; + const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input'; + const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified'; + const INVOICE_CREATED = 'invoice.created'; + const INVOICE_DELETED = 'invoice.deleted'; + const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; + const INVOICE_FINALIZED = 'invoice.finalized'; + const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; + const INVOICE_PAID = 'invoice.paid'; + const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; + const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; + const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded'; + const INVOICE_SENT = 'invoice.sent'; + const INVOICE_UPCOMING = 'invoice.upcoming'; + const INVOICE_UPDATED = 'invoice.updated'; + const INVOICE_VOIDED = 'invoice.voided'; + const INVOICEITEM_CREATED = 'invoiceitem.created'; + const INVOICEITEM_DELETED = 'invoiceitem.deleted'; + const INVOICEITEM_UPDATED = 'invoiceitem.updated'; + const ISSUER_FRAUD_RECORD_CREATED = 'issuer_fraud_record.created'; + const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; + const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; + const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; + const ISSUING_CARD_CREATED = 'issuing_card.created'; + const ISSUING_CARD_UPDATED = 'issuing_card.updated'; + const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created'; + const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated'; + const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; + const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; + const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; + const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; + const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; + const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created'; + const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated'; + const MANDATE_UPDATED = 'mandate.updated'; + const ORDER_CREATED = 'order.created'; + const ORDER_PAYMENT_FAILED = 'order.payment_failed'; + const ORDER_PAYMENT_SUCCEEDED = 'order.payment_succeeded'; + const ORDER_UPDATED = 'order.updated'; + const ORDER_RETURN_CREATED = 'order_return.created'; + const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated'; + const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled'; + const PAYMENT_INTENT_CREATED = 'payment_intent.created'; + const PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded'; + const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed'; + const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing'; + const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action'; + const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded'; + const PAYMENT_LINK_CREATED = 'payment_link.created'; + const PAYMENT_LINK_UPDATED = 'payment_link.updated'; + const PAYMENT_METHOD_ATTACHED = 'payment_method.attached'; + const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated'; + const PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED = 'payment_method.card_automatically_updated'; + const PAYMENT_METHOD_DETACHED = 'payment_method.detached'; + const PAYMENT_METHOD_UPDATED = 'payment_method.updated'; + const PAYOUT_CANCELED = 'payout.canceled'; + const PAYOUT_CREATED = 'payout.created'; + const PAYOUT_FAILED = 'payout.failed'; + const PAYOUT_PAID = 'payout.paid'; + const PAYOUT_UPDATED = 'payout.updated'; + const PERSON_CREATED = 'person.created'; + const PERSON_DELETED = 'person.deleted'; + const PERSON_UPDATED = 'person.updated'; + const PING = 'ping'; + const PLAN_CREATED = 'plan.created'; + const PLAN_DELETED = 'plan.deleted'; + const PLAN_UPDATED = 'plan.updated'; + const PRICE_CREATED = 'price.created'; + const PRICE_DELETED = 'price.deleted'; + const PRICE_UPDATED = 'price.updated'; + const PRODUCT_CREATED = 'product.created'; + const PRODUCT_DELETED = 'product.deleted'; + const PRODUCT_UPDATED = 'product.updated'; + const PROMOTION_CODE_CREATED = 'promotion_code.created'; + const PROMOTION_CODE_DELETED = 'promotion_code.deleted'; + const PROMOTION_CODE_UPDATED = 'promotion_code.updated'; + const QUOTE_ACCEPTED = 'quote.accepted'; + const QUOTE_CANCELED = 'quote.canceled'; + const QUOTE_CREATED = 'quote.created'; + const QUOTE_FINALIZED = 'quote.finalized'; + const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created'; + const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated'; + const RECIPIENT_CREATED = 'recipient.created'; + const RECIPIENT_DELETED = 'recipient.deleted'; + const RECIPIENT_UPDATED = 'recipient.updated'; + const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed'; + const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded'; + const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated'; + const REVIEW_CLOSED = 'review.closed'; + const REVIEW_OPENED = 'review.opened'; + const SETUP_INTENT_CANCELED = 'setup_intent.canceled'; + const SETUP_INTENT_CREATED = 'setup_intent.created'; + const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action'; + const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed'; + const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded'; + const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created'; + const SKU_CREATED = 'sku.created'; + const SKU_DELETED = 'sku.deleted'; + const SKU_UPDATED = 'sku.updated'; + const SOURCE_CANCELED = 'source.canceled'; + const SOURCE_CHARGEABLE = 'source.chargeable'; + const SOURCE_FAILED = 'source.failed'; + const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification'; + const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required'; + const SOURCE_TRANSACTION_CREATED = 'source.transaction.created'; + const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated'; + const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted'; + const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled'; + const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed'; + const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created'; + const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring'; + const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released'; + const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated'; + const TAX_RATE_CREATED = 'tax_rate.created'; + const TAX_RATE_UPDATED = 'tax_rate.updated'; + const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed'; + const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded'; + const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing'; + const TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created'; + const TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted'; + const TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure'; + const TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready'; + const TOPUP_CANCELED = 'topup.canceled'; + const TOPUP_CREATED = 'topup.created'; + const TOPUP_FAILED = 'topup.failed'; + const TOPUP_REVERSED = 'topup.reversed'; + const TOPUP_SUCCEEDED = 'topup.succeeded'; + const TRANSFER_CREATED = 'transfer.created'; + const TRANSFER_FAILED = 'transfer.failed'; + const TRANSFER_PAID = 'transfer.paid'; + const TRANSFER_REVERSED = 'transfer.reversed'; + const TRANSFER_UPDATED = 'transfer.updated'; +} diff --git a/libraries/Stripe/lib/Exception/ApiConnectionException.php b/libraries/Stripe/lib/Exception/ApiConnectionException.php new file mode 100644 index 00000000000..9bdfe02cd8c --- /dev/null +++ b/libraries/Stripe/lib/Exception/ApiConnectionException.php @@ -0,0 +1,12 @@ +setHttpStatus($httpStatus); + $instance->setHttpBody($httpBody); + $instance->setJsonBody($jsonBody); + $instance->setHttpHeaders($httpHeaders); + $instance->setStripeCode($stripeCode); + + $instance->setRequestId(null); + if ($httpHeaders && isset($httpHeaders['Request-Id'])) { + $instance->setRequestId($httpHeaders['Request-Id']); + } + + $instance->setError($instance->constructErrorObject()); + + return $instance; + } + + /** + * Gets the EDD\Vendor\Stripe error object. + * + * @return null|\EDD\Vendor\Stripe\ErrorObject + */ + public function getError() + { + return $this->error; + } + + /** + * Sets the EDD\Vendor\Stripe error object. + * + * @param null|\EDD\Vendor\Stripe\ErrorObject $error + */ + public function setError($error) + { + $this->error = $error; + } + + /** + * Gets the HTTP body as a string. + * + * @return null|string + */ + public function getHttpBody() + { + return $this->httpBody; + } + + /** + * Sets the HTTP body as a string. + * + * @param null|string $httpBody + */ + public function setHttpBody($httpBody) + { + $this->httpBody = $httpBody; + } + + /** + * Gets the HTTP headers array. + * + * @return null|array|\EDD\Vendor\Stripe\Util\CaseInsensitiveArray + */ + public function getHttpHeaders() + { + return $this->httpHeaders; + } + + /** + * Sets the HTTP headers array. + * + * @param null|array|\EDD\Vendor\Stripe\Util\CaseInsensitiveArray $httpHeaders + */ + public function setHttpHeaders($httpHeaders) + { + $this->httpHeaders = $httpHeaders; + } + + /** + * Gets the HTTP status code. + * + * @return null|int + */ + public function getHttpStatus() + { + return $this->httpStatus; + } + + /** + * Sets the HTTP status code. + * + * @param null|int $httpStatus + */ + public function setHttpStatus($httpStatus) + { + $this->httpStatus = $httpStatus; + } + + /** + * Gets the JSON deserialized body. + * + * @return null|array + */ + public function getJsonBody() + { + return $this->jsonBody; + } + + /** + * Sets the JSON deserialized body. + * + * @param null|array $jsonBody + */ + public function setJsonBody($jsonBody) + { + $this->jsonBody = $jsonBody; + } + + /** + * Gets the EDD\Vendor\Stripe request ID. + * + * @return null|string + */ + public function getRequestId() + { + return $this->requestId; + } + + /** + * Sets the EDD\Vendor\Stripe request ID. + * + * @param null|string $requestId + */ + public function setRequestId($requestId) + { + $this->requestId = $requestId; + } + + /** + * Gets the EDD\Vendor\Stripe error code. + * + * Cf. the `CODE_*` constants on {@see \EDD\Vendor\Stripe\ErrorObject} for possible + * values. + * + * @return null|string + */ + public function getStripeCode() + { + return $this->stripeCode; + } + + /** + * Sets the EDD\Vendor\Stripe error code. + * + * @param null|string $stripeCode + */ + public function setStripeCode($stripeCode) + { + $this->stripeCode = $stripeCode; + } + + /** + * Returns the string representation of the exception. + * + * @return string + */ + public function __toString() + { + $statusStr = (null === $this->getHttpStatus()) ? '' : "(Status {$this->getHttpStatus()}) "; + $idStr = (null === $this->getRequestId()) ? '' : "(Request {$this->getRequestId()}) "; + + return "{$statusStr}{$idStr}{$this->getMessage()}"; + } + + protected function constructErrorObject() + { + if (null === $this->jsonBody || !\array_key_exists('error', $this->jsonBody)) { + return null; + } + + return \EDD\Vendor\Stripe\ErrorObject::constructFrom($this->jsonBody['error']); + } +} diff --git a/libraries/Stripe/lib/Exception/AuthenticationException.php b/libraries/Stripe/lib/Exception/AuthenticationException.php new file mode 100644 index 00000000000..055d17b3bb5 --- /dev/null +++ b/libraries/Stripe/lib/Exception/AuthenticationException.php @@ -0,0 +1,11 @@ +setDeclineCode($declineCode); + $instance->setStripeParam($stripeParam); + + return $instance; + } + + /** + * Gets the decline code. + * + * @return null|string + */ + public function getDeclineCode() + { + return $this->declineCode; + } + + /** + * Sets the decline code. + * + * @param null|string $declineCode + */ + public function setDeclineCode($declineCode) + { + $this->declineCode = $declineCode; + } + + /** + * Gets the parameter related to the error. + * + * @return null|string + */ + public function getStripeParam() + { + return $this->stripeParam; + } + + /** + * Sets the parameter related to the error. + * + * @param null|string $stripeParam + */ + public function setStripeParam($stripeParam) + { + $this->stripeParam = $stripeParam; + } +} diff --git a/libraries/Stripe/lib/Exception/ExceptionInterface.php b/libraries/Stripe/lib/Exception/ExceptionInterface.php new file mode 100644 index 00000000000..51526cab2da --- /dev/null +++ b/libraries/Stripe/lib/Exception/ExceptionInterface.php @@ -0,0 +1,22 @@ +setStripeParam($stripeParam); + + return $instance; + } + + /** + * Gets the parameter related to the error. + * + * @return null|string + */ + public function getStripeParam() + { + return $this->stripeParam; + } + + /** + * Sets the parameter related to the error. + * + * @param null|string $stripeParam + */ + public function setStripeParam($stripeParam) + { + $this->stripeParam = $stripeParam; + } +} diff --git a/libraries/Stripe/lib/Exception/OAuth/ExceptionInterface.php b/libraries/Stripe/lib/Exception/OAuth/ExceptionInterface.php new file mode 100644 index 00000000000..170ef9f3321 --- /dev/null +++ b/libraries/Stripe/lib/Exception/OAuth/ExceptionInterface.php @@ -0,0 +1,10 @@ +jsonBody) { + return null; + } + + return \EDD\Vendor\Stripe\OAuthErrorObject::constructFrom($this->jsonBody); + } +} diff --git a/libraries/Stripe/lib/Exception/OAuth/UnknownOAuthErrorException.php b/libraries/Stripe/lib/Exception/OAuth/UnknownOAuthErrorException.php new file mode 100644 index 00000000000..65659d73721 --- /dev/null +++ b/libraries/Stripe/lib/Exception/OAuth/UnknownOAuthErrorException.php @@ -0,0 +1,12 @@ +setHttpBody($httpBody); + $instance->setSigHeader($sigHeader); + + return $instance; + } + + /** + * Gets the HTTP body as a string. + * + * @return null|string + */ + public function getHttpBody() + { + return $this->httpBody; + } + + /** + * Sets the HTTP body as a string. + * + * @param null|string $httpBody + */ + public function setHttpBody($httpBody) + { + $this->httpBody = $httpBody; + } + + /** + * Gets the `Stripe-Signature` HTTP header. + * + * @return null|string + */ + public function getSigHeader() + { + return $this->sigHeader; + } + + /** + * Sets the `Stripe-Signature` HTTP header. + * + * @param null|string $sigHeader + */ + public function setSigHeader($sigHeader) + { + $this->sigHeader = $sigHeader; + } +} diff --git a/libraries/Stripe/lib/Exception/UnexpectedValueException.php b/libraries/Stripe/lib/Exception/UnexpectedValueException.php new file mode 100644 index 00000000000..bb03ba13ed8 --- /dev/null +++ b/libraries/Stripe/lib/Exception/UnexpectedValueException.php @@ -0,0 +1,7 @@ +Exchange Rate objects allow you to determine the rates that EDD\Vendor\Stripe + * is currently using to convert from one currency to another. Since this number is + * variable throughout the day, there are various reasons why you might want to + * know the current rate (for example, to dynamically price an item for a user with + * a default payment in a foreign currency). + * + * If you want a guarantee that the charge is made with a certain exchange rate you + * expect is current, you can pass in exchange_rate to charges + * endpoints. If the value is no longer up to date, the charge won't go through. + * Please refer to our Exchange + * Rates API guide for more details. + * + * @property string $id Unique identifier for the object. Represented as the three-letter ISO currency code in lowercase. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\StripeObject $rates Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + */ +class ExchangeRate extends ApiResource +{ + const OBJECT_NAME = 'exchange_rate'; + + use ApiOperations\All; + use ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/File.php b/libraries/Stripe/lib/File.php new file mode 100644 index 00000000000..2d18b9f59fc --- /dev/null +++ b/libraries/Stripe/lib/File.php @@ -0,0 +1,87 @@ +create file request (for + * example, when uploading dispute evidence) or it may have been created by EDD\Vendor\Stripe + * (for example, the results of a Sigma scheduled + * query). + * + * Related guide: File Upload + * Guide. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds. + * @property null|string $filename A filename for the file, suitable for saving to a filesystem. + * @property null|\EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\FileLink> $links A list of file links that point at this file. + * @property string $purpose The purpose of the uploaded file. + * @property int $size The size in bytes of the file object. + * @property null|string $title A user friendly title for the document. + * @property null|string $type The type of the file returned (e.g., csv, pdf, jpg, or png). + * @property null|string $url The URL from which the file can be downloaded using your live secret API key. + */ +class File extends ApiResource +{ + const OBJECT_NAME = 'file'; + + use ApiOperations\All; + use ApiOperations\Retrieve; + + const PURPOSE_ACCOUNT_REQUIREMENT = 'account_requirement'; + const PURPOSE_ADDITIONAL_VERIFICATION = 'additional_verification'; + const PURPOSE_BUSINESS_ICON = 'business_icon'; + const PURPOSE_BUSINESS_LOGO = 'business_logo'; + const PURPOSE_CUSTOMER_SIGNATURE = 'customer_signature'; + const PURPOSE_DISPUTE_EVIDENCE = 'dispute_evidence'; + const PURPOSE_DOCUMENT_PROVIDER_IDENTITY_DOCUMENT = 'document_provider_identity_document'; + const PURPOSE_FINANCE_REPORT_RUN = 'finance_report_run'; + const PURPOSE_IDENTITY_DOCUMENT = 'identity_document'; + const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable'; + const PURPOSE_PCI_DOCUMENT = 'pci_document'; + const PURPOSE_SELFIE = 'selfie'; + const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query'; + const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload'; + + // This resource can have two different object names. In latter API + // versions, only `file` is used, but since stripe-php may be used with + // any API version, we need to support deserializing the older + // `file_upload` object into the same class. + const OBJECT_NAME_ALT = 'file_upload'; + + use ApiOperations\Create { + create as protected _create; + } + + public static function classUrl() + { + return '/v1/files'; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\File the created file + */ + public static function create($params = null, $opts = null) + { + $opts = \EDD\Vendor\Stripe\Util\RequestOptions::parse($opts); + if (null === $opts->apiBase) { + $opts->apiBase = Stripe::$apiUploadBase; + } + // Manually flatten params, otherwise curl's multipart encoder will + // choke on nested arrays. + $flatParams = \array_column(\EDD\Vendor\Stripe\Util\Util::flattenParams($params), 1, 0); + + return static::_create($flatParams, $opts); + } +} diff --git a/libraries/Stripe/lib/FileLink.php b/libraries/Stripe/lib/FileLink.php new file mode 100644 index 00000000000..715266321a8 --- /dev/null +++ b/libraries/Stripe/lib/FileLink.php @@ -0,0 +1,30 @@ +File object with non-EDD\Vendor\Stripe users, you + * can create a FileLink. FileLinks contain a URL that + * can be used to retrieve the contents of the file without authentication. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property bool $expired Whether this link is already expired. + * @property null|int $expires_at Time at which the link expires. + * @property string|\EDD\Vendor\Stripe\File $file The file object this link points to. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $url The publicly accessible URL to download the file. + */ +class FileLink extends ApiResource +{ + const OBJECT_NAME = 'file_link'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/FinancialConnections/Account.php b/libraries/Stripe/lib/FinancialConnections/Account.php new file mode 100644 index 00000000000..efd1ac151d5 --- /dev/null +++ b/libraries/Stripe/lib/FinancialConnections/Account.php @@ -0,0 +1,84 @@ +subcategory. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $display_name A human-readable name that has been assigned to this account, either by the account holder or by the institution. + * @property string $institution_name The name of the institution that holds this account. + * @property null|string $last4 The last 4 digits of the account number. If present, this will be 4 numeric characters. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string|\EDD\Vendor\Stripe\FinancialConnections\AccountOwnership $ownership The most recent information about the account's owners. + * @property null|\EDD\Vendor\Stripe\StripeObject $ownership_refresh The state of the most recent attempt to refresh the account owners. + * @property null|string[] $permissions The list of permissions granted by this account. + * @property string $status The status of the link to the account. + * @property string $subcategory

    If category is cash, one of:

    - checking - savings - other

    If category is credit, one of:

    - mortgage - line_of_credit - credit_card - other

    If category is investment or other, this will be other.

    + * @property string[] $supported_payment_method_types The PaymentMethod type(s) that can be created from this account. + */ +class Account extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'financial_connections.account'; + + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + + const CATEGORY_CASH = 'cash'; + const CATEGORY_CREDIT = 'credit'; + const CATEGORY_INVESTMENT = 'investment'; + const CATEGORY_OTHER = 'other'; + + const STATUS_ACTIVE = 'active'; + const STATUS_DISCONNECTED = 'disconnected'; + const STATUS_INACTIVE = 'inactive'; + + const SUBCATEGORY_CHECKING = 'checking'; + const SUBCATEGORY_CREDIT_CARD = 'credit_card'; + const SUBCATEGORY_LINE_OF_CREDIT = 'line_of_credit'; + const SUBCATEGORY_MORTGAGE = 'mortgage'; + const SUBCATEGORY_OTHER = 'other'; + const SUBCATEGORY_SAVINGS = 'savings'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FinancialConnections\Account the disconnected account + */ + public function disconnect($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/disconnect'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FinancialConnections\Account the refreshed account + */ + public function refresh($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/refresh'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/FinancialConnections/AccountOwner.php b/libraries/Stripe/lib/FinancialConnections/AccountOwner.php new file mode 100644 index 00000000000..3725bec053a --- /dev/null +++ b/libraries/Stripe/lib/FinancialConnections/AccountOwner.php @@ -0,0 +1,20 @@ + $owners A paginated list of owners for this account. + */ +class AccountOwnership extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'financial_connections.account_ownership'; +} diff --git a/libraries/Stripe/lib/FinancialConnections/Session.php b/libraries/Stripe/lib/FinancialConnections/Session.php new file mode 100644 index 00000000000..72453de2f4d --- /dev/null +++ b/libraries/Stripe/lib/FinancialConnections/Session.php @@ -0,0 +1,27 @@ + $accounts The accounts that were collected as part of this Session. + * @property string $client_secret A value that will be passed to the client to launch the authentication flow. + * @property \EDD\Vendor\Stripe\StripeObject $filters + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property string[] $permissions Permissions requested for accounts collected during this session. + * @property string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + */ +class Session extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'financial_connections.session'; + + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/FundingInstructions.php b/libraries/Stripe/lib/FundingInstructions.php new file mode 100644 index 00000000000..fb2b4214ca3 --- /dev/null +++ b/libraries/Stripe/lib/FundingInstructions.php @@ -0,0 +1,28 @@ +balance + * that is automatically applied to future invoices and payments using the + * customer_balance payment method. Customers can fund this balance by + * initiating a bank transfer to any account in the + * financial_addresses field. Related guide: Customer + * Balance - Funding Instructions to learn more. + * + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\StripeObject $bank_transfer + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string $funding_type The funding_type of the returned instructions + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + */ +class FundingInstructions extends ApiResource +{ + const OBJECT_NAME = 'funding_instructions'; + + const FUNDING_TYPE_BANK_TRANSFER = 'bank_transfer'; +} diff --git a/libraries/Stripe/lib/HttpClient/ClientInterface.php b/libraries/Stripe/lib/HttpClient/ClientInterface.php new file mode 100644 index 00000000000..3d0b4531b5c --- /dev/null +++ b/libraries/Stripe/lib/HttpClient/ClientInterface.php @@ -0,0 +1,22 @@ +defaultOptions = $defaultOptions; + $this->randomGenerator = $randomGenerator ?: new Util\RandomGenerator(); + $this->initUserAgentInfo(); + + $this->enableHttp2 = $this->canSafelyUseHttp2(); + } + + public function __destruct() + { + $this->closeCurlHandle(); + } + + public function initUserAgentInfo() + { + $curlVersion = \curl_version(); + $this->userAgentInfo = [ + 'httplib' => 'curl ' . $curlVersion['version'], + 'ssllib' => $curlVersion['ssl_version'], + ]; + } + + public function getDefaultOptions() + { + return $this->defaultOptions; + } + + public function getUserAgentInfo() + { + return $this->userAgentInfo; + } + + /** + * @return bool + */ + public function getEnablePersistentConnections() + { + return $this->enablePersistentConnections; + } + + /** + * @param bool $enable + */ + public function setEnablePersistentConnections($enable) + { + $this->enablePersistentConnections = $enable; + } + + /** + * @return bool + */ + public function getEnableHttp2() + { + return $this->enableHttp2; + } + + /** + * @param bool $enable + */ + public function setEnableHttp2($enable) + { + $this->enableHttp2 = $enable; + } + + /** + * @return null|callable + */ + public function getRequestStatusCallback() + { + return $this->requestStatusCallback; + } + + /** + * Sets a callback that is called after each request. The callback will + * receive the following parameters: + *
      + *
    1. string $rbody The response body
    2. + *
    3. integer $rcode The response status code
    4. + *
    5. \EDD\Vendor\Stripe\Util\CaseInsensitiveArray $rheaders The response headers
    6. + *
    7. integer $errno The curl error number
    8. + *
    9. string|null $message The curl error message
    10. + *
    11. boolean $shouldRetry Whether the request will be retried
    12. + *
    13. integer $numRetries The number of the retry attempt
    14. + *
    . + * + * @param null|callable $requestStatusCallback + */ + public function setRequestStatusCallback($requestStatusCallback) + { + $this->requestStatusCallback = $requestStatusCallback; + } + + // USER DEFINED TIMEOUTS + + const DEFAULT_TIMEOUT = 80; + const DEFAULT_CONNECT_TIMEOUT = 30; + + private $timeout = self::DEFAULT_TIMEOUT; + private $connectTimeout = self::DEFAULT_CONNECT_TIMEOUT; + + public function setTimeout($seconds) + { + $this->timeout = (int) \max($seconds, 0); + + return $this; + } + + public function setConnectTimeout($seconds) + { + $this->connectTimeout = (int) \max($seconds, 0); + + return $this; + } + + public function getTimeout() + { + return $this->timeout; + } + + public function getConnectTimeout() + { + return $this->connectTimeout; + } + + // END OF USER DEFINED TIMEOUTS + + private function constructRequest($method, $absUrl, $headers, $params, $hasFile) + { + $method = \strtolower($method); + + $opts = []; + if (\is_callable($this->defaultOptions)) { // call defaultOptions callback, set options to return value + $opts = \call_user_func_array($this->defaultOptions, \func_get_args()); + if (!\is_array($opts)) { + throw new Exception\UnexpectedValueException('Non-array value returned by defaultOptions CurlClient callback'); + } + } elseif (\is_array($this->defaultOptions)) { // set default curlopts from array + $opts = $this->defaultOptions; + } + + $params = Util\Util::objectsToIds($params); + + if ('get' === $method) { + if ($hasFile) { + throw new Exception\UnexpectedValueException( + 'Issuing a GET request with a file parameter' + ); + } + $opts[\CURLOPT_HTTPGET] = 1; + if (\count($params) > 0) { + $encoded = Util\Util::encodeParameters($params); + $absUrl = "{$absUrl}?{$encoded}"; + } + } elseif ('post' === $method) { + $opts[\CURLOPT_POST] = 1; + $opts[\CURLOPT_POSTFIELDS] = $hasFile ? $params : Util\Util::encodeParameters($params); + } elseif ('delete' === $method) { + $opts[\CURLOPT_CUSTOMREQUEST] = 'DELETE'; + if (\count($params) > 0) { + $encoded = Util\Util::encodeParameters($params); + $absUrl = "{$absUrl}?{$encoded}"; + } + } else { + throw new Exception\UnexpectedValueException("Unrecognized method {$method}"); + } + + // It is only safe to retry network failures on POST requests if we + // add an Idempotency-Key header + if (('post' === $method) && (Stripe::$maxNetworkRetries > 0)) { + if (!$this->hasHeader($headers, 'Idempotency-Key')) { + $headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid(); + } + } + + // By default for large request body sizes (> 1024 bytes), cURL will + // send a request without a body and with a `Expect: 100-continue` + // header, which gives the server a chance to respond with an error + // status code in cases where one can be determined right away (say + // on an authentication problem for example), and saves the "large" + // request body from being ever sent. + // + // Unfortunately, the bindings don't currently correctly handle the + // success case (in which the server sends back a 100 CONTINUE), so + // we'll error under that condition. To compensate for that problem + // for the time being, override cURL's behavior by simply always + // sending an empty `Expect:` header. + $headers[] = 'Expect: '; + + $absUrl = Util\Util::utf8($absUrl); + $opts[\CURLOPT_URL] = $absUrl; + $opts[\CURLOPT_RETURNTRANSFER] = true; + $opts[\CURLOPT_CONNECTTIMEOUT] = $this->connectTimeout; + $opts[\CURLOPT_TIMEOUT] = $this->timeout; + $opts[\CURLOPT_HTTPHEADER] = $headers; + $opts[\CURLOPT_CAINFO] = Stripe::getCABundlePath(); + if (!Stripe::getVerifySslCerts()) { + $opts[\CURLOPT_SSL_VERIFYPEER] = false; + } + + if (!isset($opts[\CURLOPT_HTTP_VERSION]) && $this->getEnableHttp2()) { + // For HTTPS requests, enable HTTP/2, if supported + $opts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2TLS; + } + + // If the user didn't explicitly specify a CURLOPT_IPRESOLVE option, we + // force IPv4 resolving as Stripe's API servers are only accessible over + // IPv4 (see. https://github.com/stripe/stripe-php/issues/1045). + // We let users specify a custom option in case they need to say proxy + // through an IPv6 proxy. + if (!isset($opts[\CURLOPT_IPRESOLVE])) { + $opts[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; + } + + return [$opts, $absUrl]; + } + + public function request($method, $absUrl, $headers, $params, $hasFile) + { + list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile); + + list($rbody, $rcode, $rheaders) = $this->executeRequestWithRetries($opts, $absUrl); + + return [$rbody, $rcode, $rheaders]; + } + + public function requestStream($method, $absUrl, $headers, $params, $hasFile, $readBodyChunk) + { + list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile); + + $opts[\CURLOPT_RETURNTRANSFER] = false; + list($rbody, $rcode, $rheaders) = $this->executeStreamingRequestWithRetries($opts, $absUrl, $readBodyChunk); + + return [$rbody, $rcode, $rheaders]; + } + + /** + * Curl permits sending \CURLOPT_HEADERFUNCTION, which is called with lines + * from the header and \CURLOPT_WRITEFUNCTION, which is called with bytes + * from the body. You usually want to handle the body differently depending + * on what was in the header. + * + * This function makes it easier to specify different callbacks depending + * on the contents of the heeder. After the header has been completely read + * and the body begins to stream, it will call $determineWriteCallback with + * the array of headers. $determineWriteCallback should, based on the + * headers it receives, return a "writeCallback" that describes what to do + * with the incoming HTTP response body. + * + * @param array $opts + * @param callable $determineWriteCallback + * + * @return array + */ + private function useHeadersToDetermineWriteCallback($opts, $determineWriteCallback) + { + $rheaders = new Util\CaseInsensitiveArray(); + $headerCallback = function ($curl, $header_line) use (&$rheaders) { + return self::parseLineIntoHeaderArray($header_line, $rheaders); + }; + + $writeCallback = null; + $writeCallbackWrapper = function ($curl, $data) use (&$writeCallback, &$rheaders, &$determineWriteCallback) { + if (null === $writeCallback) { + $writeCallback = \call_user_func_array($determineWriteCallback, [$rheaders]); + } + + return \call_user_func_array($writeCallback, [$curl, $data]); + }; + + return [$headerCallback, $writeCallbackWrapper]; + } + + private static function parseLineIntoHeaderArray($line, &$headers) + { + if (false === \strpos($line, ':')) { + return \strlen($line); + } + list($key, $value) = \explode(':', \trim($line), 2); + $headers[\trim($key)] = \trim($value); + + return \strlen($line); + } + + /** + * Like `executeRequestWithRetries` except: + * 1. Does not buffer the body of a successful (status code < 300) + * response into memory -- instead, calls the caller-provided + * $readBodyChunk with each chunk of incoming data. + * 2. Does not retry if a network error occurs while streaming the + * body of a successful response. + * + * @param array $opts cURL options + * @param string $absUrl + * @param callable $readBodyChunk + * + * @return array + */ + public function executeStreamingRequestWithRetries($opts, $absUrl, $readBodyChunk) + { + /** @var bool */ + $shouldRetry = false; + /** @var int */ + $numRetries = 0; + + // Will contain the bytes of the body of the last request + // if it was not successful and should not be retries + /** @var null|string */ + $rbody = null; + + // Status code of the last request + /** @var null|bool */ + $rcode = null; + + // Array of headers from the last request + /** @var null|array */ + $lastRHeaders = null; + + $errno = null; + $message = null; + + $determineWriteCallback = function ($rheaders) use ( + &$readBodyChunk, + &$shouldRetry, + &$rbody, + &$numRetries, + &$rcode, + &$lastRHeaders, + &$errno + ) { + $lastRHeaders = $rheaders; + $errno = \curl_errno($this->curlHandle); + + $rcode = \curl_getinfo($this->curlHandle, \CURLINFO_HTTP_CODE); + + // Send the bytes from the body of a successful request to the caller-provided $readBodyChunk. + if ($rcode < 300) { + $rbody = null; + + return function ($curl, $data) use (&$readBodyChunk) { + // Don't expose the $curl handle to the user, and don't require them to + // return the length of $data. + \call_user_func_array($readBodyChunk, [$data]); + + return \strlen($data); + }; + } + + $shouldRetry = $this->shouldRetry($errno, $rcode, $rheaders, $numRetries); + + // Discard the body from an unsuccessful request that should be retried. + if ($shouldRetry) { + return function ($curl, $data) { + return \strlen($data); + }; + } else { + // Otherwise, buffer the body into $rbody. It will need to be parsed to determine + // which exception to throw to the user. + $rbody = ''; + + return function ($curl, $data) use (&$rbody) { + $rbody .= $data; + + return \strlen($data); + }; + } + }; + + while (true) { + list($headerCallback, $writeCallback) = $this->useHeadersToDetermineWriteCallback($opts, $determineWriteCallback); + $opts[\CURLOPT_HEADERFUNCTION] = $headerCallback; + $opts[\CURLOPT_WRITEFUNCTION] = $writeCallback; + + $shouldRetry = false; + $rbody = null; + $this->resetCurlHandle(); + \curl_setopt_array($this->curlHandle, $opts); + $result = \curl_exec($this->curlHandle); + $errno = \curl_errno($this->curlHandle); + if (0 !== $errno) { + $message = \curl_error($this->curlHandle); + } + if (!$this->getEnablePersistentConnections()) { + $this->closeCurlHandle(); + } + + if (\is_callable($this->getRequestStatusCallback())) { + \call_user_func_array( + $this->getRequestStatusCallback(), + [$rbody, $rcode, $lastRHeaders, $errno, $message, $shouldRetry, $numRetries] + ); + } + + if ($shouldRetry) { + ++$numRetries; + $sleepSeconds = $this->sleepTime($numRetries, $lastRHeaders); + \usleep((int) ($sleepSeconds * 1000000)); + } else { + break; + } + } + + if (0 !== $errno) { + $this->handleCurlError($absUrl, $errno, $message, $numRetries); + } + + return [$rbody, $rcode, $lastRHeaders]; + } + + /** + * @param array $opts cURL options + * @param string $absUrl + */ + public function executeRequestWithRetries($opts, $absUrl) + { + $numRetries = 0; + + while (true) { + $rcode = 0; + $errno = 0; + $message = null; + + // Create a callback to capture HTTP headers for the response + $rheaders = new Util\CaseInsensitiveArray(); + $headerCallback = function ($curl, $header_line) use (&$rheaders) { + return CurlClient::parseLineIntoHeaderArray($header_line, $rheaders); + }; + $opts[\CURLOPT_HEADERFUNCTION] = $headerCallback; + + $this->resetCurlHandle(); + \curl_setopt_array($this->curlHandle, $opts); + $rbody = \curl_exec($this->curlHandle); + + if (false === $rbody) { + $errno = \curl_errno($this->curlHandle); + $message = \curl_error($this->curlHandle); + } else { + $rcode = \curl_getinfo($this->curlHandle, \CURLINFO_HTTP_CODE); + } + if (!$this->getEnablePersistentConnections()) { + $this->closeCurlHandle(); + } + + $shouldRetry = $this->shouldRetry($errno, $rcode, $rheaders, $numRetries); + + if (\is_callable($this->getRequestStatusCallback())) { + \call_user_func_array( + $this->getRequestStatusCallback(), + [$rbody, $rcode, $rheaders, $errno, $message, $shouldRetry, $numRetries] + ); + } + + if ($shouldRetry) { + ++$numRetries; + $sleepSeconds = $this->sleepTime($numRetries, $rheaders); + \usleep((int) ($sleepSeconds * 1000000)); + } else { + break; + } + } + + if (false === $rbody) { + $this->handleCurlError($absUrl, $errno, $message, $numRetries); + } + + return [$rbody, $rcode, $rheaders]; + } + + /** + * @param string $url + * @param int $errno + * @param string $message + * @param int $numRetries + * + * @throws Exception\ApiConnectionException + */ + private function handleCurlError($url, $errno, $message, $numRetries) + { + switch ($errno) { + case \CURLE_COULDNT_CONNECT: + case \CURLE_COULDNT_RESOLVE_HOST: + case \CURLE_OPERATION_TIMEOUTED: + $msg = "Could not connect to EDD\Vendor\Stripe ({$url}). Please check your " + . 'internet connection and try again. If this problem persists, ' + . "you should check Stripe's service status at " + . 'https://twitter.com/stripestatus, or'; + + break; + + case \CURLE_SSL_CACERT: + case \CURLE_SSL_PEER_CERTIFICATE: + $msg = "Could not verify Stripe's SSL certificate. Please make sure " + . 'that your network is not intercepting certificates. ' + . "(Try going to {$url} in your browser.) " + . 'If this problem persists,'; + + break; + + default: + $msg = 'Unexpected error communicating with Stripe. ' + . 'If this problem persists,'; + } + $msg .= ' let us know at support@stripe.com.'; + + $msg .= "\n\n(Network error [errno {$errno}]: {$message})"; + + if ($numRetries > 0) { + $msg .= "\n\nRequest was retried {$numRetries} times."; + } + + throw new Exception\ApiConnectionException($msg); + } + + /** + * Checks if an error is a problem that we should retry on. This includes both + * socket errors that may represent an intermittent problem and some special + * HTTP statuses. + * + * @param int $errno + * @param int $rcode + * @param array|\EDD\Vendor\Stripe\Util\CaseInsensitiveArray $rheaders + * @param int $numRetries + * + * @return bool + */ + private function shouldRetry($errno, $rcode, $rheaders, $numRetries) + { + if ($numRetries >= Stripe::getMaxNetworkRetries()) { + return false; + } + + // Retry on timeout-related problems (either on open or read). + if (\CURLE_OPERATION_TIMEOUTED === $errno) { + return true; + } + + // Destination refused the connection, the connection was reset, or a + // variety of other connection failures. This could occur from a single + // saturated server, so retry in case it's intermittent. + if (\CURLE_COULDNT_CONNECT === $errno) { + return true; + } + + // The API may ask us not to retry (eg; if doing so would be a no-op) + // or advise us to retry (eg; in cases of lock timeouts); we defer to that. + if (isset($rheaders['stripe-should-retry'])) { + if ('false' === $rheaders['stripe-should-retry']) { + return false; + } + if ('true' === $rheaders['stripe-should-retry']) { + return true; + } + } + + // 409 Conflict + if (409 === $rcode) { + return true; + } + + // Retry on 500, 503, and other internal errors. + // + // Note that we expect the stripe-should-retry header to be false + // in most cases when a 500 is returned, since our idempotency framework + // would typically replay it anyway. + if ($rcode >= 500) { + return true; + } + + return false; + } + + /** + * Provides the number of seconds to wait before retrying a request. + * + * @param int $numRetries + * @param array|\EDD\Vendor\Stripe\Util\CaseInsensitiveArray $rheaders + * + * @return int + */ + private function sleepTime($numRetries, $rheaders) + { + // Apply exponential backoff with $initialNetworkRetryDelay on the + // number of $numRetries so far as inputs. Do not allow the number to exceed + // $maxNetworkRetryDelay. + $sleepSeconds = \min( + Stripe::getInitialNetworkRetryDelay() * 1.0 * 2 ** ($numRetries - 1), + Stripe::getMaxNetworkRetryDelay() + ); + + // Apply some jitter by randomizing the value in the range of + // ($sleepSeconds / 2) to ($sleepSeconds). + $sleepSeconds *= 0.5 * (1 + $this->randomGenerator->randFloat()); + + // But never sleep less than the base sleep seconds. + $sleepSeconds = \max(Stripe::getInitialNetworkRetryDelay(), $sleepSeconds); + + // And never sleep less than the time the API asks us to wait, assuming it's a reasonable ask. + $retryAfter = isset($rheaders['retry-after']) ? (float) ($rheaders['retry-after']) : 0.0; + if (\floor($retryAfter) === $retryAfter && $retryAfter <= Stripe::getMaxRetryAfter()) { + $sleepSeconds = \max($sleepSeconds, $retryAfter); + } + + return $sleepSeconds; + } + + /** + * Initializes the curl handle. If already initialized, the handle is closed first. + */ + private function initCurlHandle() + { + $this->closeCurlHandle(); + $this->curlHandle = \curl_init(); + } + + /** + * Closes the curl handle if initialized. Do nothing if already closed. + */ + private function closeCurlHandle() + { + if (null !== $this->curlHandle) { + \curl_close($this->curlHandle); + $this->curlHandle = null; + } + } + + /** + * Resets the curl handle. If the handle is not already initialized, or if persistent + * connections are disabled, the handle is reinitialized instead. + */ + private function resetCurlHandle() + { + if (null !== $this->curlHandle && $this->getEnablePersistentConnections()) { + \curl_reset($this->curlHandle); + } else { + $this->initCurlHandle(); + } + } + + /** + * Indicates whether it is safe to use HTTP/2 or not. + * + * @return bool + */ + private function canSafelyUseHttp2() + { + // Versions of curl older than 7.60.0 don't respect GOAWAY frames + // (cf. https://github.com/curl/curl/issues/2416), which EDD\Vendor\Stripe use. + $curlVersion = \curl_version()['version']; + + return \version_compare($curlVersion, '7.60.0') >= 0; + } + + /** + * Checks if a list of headers contains a specific header name. + * + * @param string[] $headers + * @param string $name + * + * @return bool + */ + private function hasHeader($headers, $name) + { + foreach ($headers as $header) { + if (0 === \strncasecmp($header, "{$name}: ", \strlen($name) + 2)) { + return true; + } + } + + return false; + } +} diff --git a/libraries/Stripe/lib/HttpClient/StreamingClientInterface.php b/libraries/Stripe/lib/HttpClient/StreamingClientInterface.php new file mode 100644 index 00000000000..bfd8a6e436c --- /dev/null +++ b/libraries/Stripe/lib/HttpClient/StreamingClientInterface.php @@ -0,0 +1,23 @@ +type and options parameters used. You can find the + * result of each verification check performed in the appropriate sub-resource: + * document, id_number, selfie. + * + * Each VerificationReport contains a copy of any data collected by the user as + * well as reference IDs which can be used to access collected images through the + * FileUpload API. To configure and + * create VerificationReports, use the VerificationSession + * API. + * + * Related guides: Accessing + * verification results. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property \EDD\Vendor\Stripe\StripeObject $document Result from a document check + * @property \EDD\Vendor\Stripe\StripeObject $id_number Result from an id_number check + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $options + * @property \EDD\Vendor\Stripe\StripeObject $selfie Result from a selfie check + * @property string $type Type of report. + * @property null|string $verification_session ID of the VerificationSession that created this report. + */ +class VerificationReport extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'identity.verification_report'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + + const TYPE_DOCUMENT = 'document'; + const TYPE_ID_NUMBER = 'id_number'; +} diff --git a/libraries/Stripe/lib/Identity/VerificationSession.php b/libraries/Stripe/lib/Identity/VerificationSession.php new file mode 100644 index 00000000000..9af5adb0e23 --- /dev/null +++ b/libraries/Stripe/lib/Identity/VerificationSession.php @@ -0,0 +1,88 @@ +verification check to perform. + * Only create one VerificationSession for each verification in your system. + * + * A VerificationSession transitions through multiple statuses throughout its + * lifetime as it progresses through the verification flow. The VerificationSession + * contains the user’s verified data after verification checks are complete. + * + * Related guide: The Verification + * Sessions API + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $client_secret The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|\EDD\Vendor\Stripe\StripeObject $last_error If present, this property tells you the last error encountered when processing the verification. + * @property null|string|\EDD\Vendor\Stripe\Identity\VerificationReport $last_verification_report ID of the most recent VerificationReport. Learn more about accessing detailed verification results. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\StripeObject $options + * @property null|\EDD\Vendor\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + * @property string $status Status of this VerificationSession. Learn more about the lifecycle of sessions. + * @property string $type The type of verification check to be performed. + * @property null|string $url The short-lived URL that you use to redirect a user to EDD\Vendor\Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe. + * @property null|\EDD\Vendor\Stripe\StripeObject $verified_outputs The user’s verified data. + */ +class VerificationSession extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'identity.verification_session'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; + + const STATUS_CANCELED = 'canceled'; + const STATUS_PROCESSING = 'processing'; + const STATUS_REQUIRES_INPUT = 'requires_input'; + const STATUS_VERIFIED = 'verified'; + + const TYPE_DOCUMENT = 'document'; + const TYPE_ID_NUMBER = 'id_number'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationSession the canceled verification session + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationSession the redacted verification session + */ + public function redact($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/redact'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/Invoice.php b/libraries/Stripe/lib/Invoice.php new file mode 100644 index 00000000000..2f551628a83 --- /dev/null +++ b/libraries/Stripe/lib/Invoice.php @@ -0,0 +1,283 @@ +invoice + * items, and proration adjustments that may be caused by subscription + * upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, EDD\Vendor\Stripe + * automatically finalizes your invoice and attempts payment. Note that finalizing + * the invoice, when + * automatic, does not happen immediately as the invoice is created. EDD\Vendor\Stripe + * waits until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, EDD\Vendor\Stripe waits one hour after creation + * to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on + * your email + * settings, EDD\Vendor\Stripe will email the invoice to your customer and await payment. + * These emails can contain a link to a hosted page to pay the invoice. + * + * EDD\Vendor\Stripe applies any customer credit on the account before determining the amount + * due for the invoice (i.e., the amount that will be actually charged). If the + * amount due for the invoice is less than Stripe's minimum allowed + * charge per currency, the invoice is automatically marked paid, and we add + * the amount due to the customer's credit balance which is applied to the next + * invoice. + * + * More details on the customer's credit balance are here. + * + * Related guide: Send + * Invoices to Customers. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice. + * @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice. + * @property null|(string|\EDD\Vendor\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + * @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due. + * @property int $amount_paid The amount, in %s, that was paid. + * @property int $amount_remaining The amount remaining, in %s, that is due. + * @property null|string|\EDD\Vendor\Stripe\StripeObject $application ID of the Connect Application that created the invoice. + * @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's EDD\Vendor\Stripe account when the invoice is paid. + * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. + * @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users. + * @property bool $auto_advance Controls whether EDD\Vendor\Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action. + * @property \EDD\Vendor\Stripe\StripeObject $automatic_tax + * @property null|string $billing_reason Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached. + * @property null|string|\EDD\Vendor\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any. + * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, EDD\Vendor\Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, EDD\Vendor\Stripe will email this invoice to the customer with payment instructions. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|\EDD\Vendor\Stripe\StripeObject[] $custom_fields Custom fields displayed on the invoice. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The ID of the customer who will be billed. + * @property null|\EDD\Vendor\Stripe\StripeObject $customer_address The customer's address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_email The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_name The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_phone The customer's phone number. Until the invoice is finalized, this field will equal customer.phone. Once the invoice is finalized, this field will no longer be updated. + * @property null|\EDD\Vendor\Stripe\StripeObject $customer_shipping The customer's shipping information. Until the invoice is finalized, this field will equal customer.shipping. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_tax_exempt The customer's tax exempt status. Until the invoice is finalized, this field will equal customer.tax_exempt. Once the invoice is finalized, this field will no longer be updated. + * @property null|\EDD\Vendor\Stripe\StripeObject[] $customer_tax_ids The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as customer.tax_ids. Once the invoice is finalized, this field will no longer be updated. + * @property null|string|\EDD\Vendor\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + * @property null|string|\EDD\Vendor\Stripe\Account|\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source $default_source ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + * @property \EDD\Vendor\Stripe\TaxRate[] $default_tax_rates The tax rates applied to this invoice, if any. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + * @property null|\EDD\Vendor\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + * @property null|(string|\EDD\Vendor\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount. + * @property null|int $due_date The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically. + * @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + * @property null|string $footer Footer displayed on the invoice. + * @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + * @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + * @property null|\EDD\Vendor\Stripe\ErrorObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be null for invoices where collection_method=send_invoice. + * @property null|string $number A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + * @property null|string|\EDD\Vendor\Stripe\Account $on_behalf_of The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the Invoices with Connect documentation for details. + * @property bool $paid Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + * @property bool $paid_out_of_band Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + * @property null|string|\EDD\Vendor\Stripe\PaymentIntent $payment_intent The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + * @property \EDD\Vendor\Stripe\StripeObject $payment_settings + * @property int $period_end End of the usage period during which invoice items were added to this invoice. + * @property int $period_start Start of the usage period during which invoice items were added to this invoice. + * @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice. + * @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice. + * @property null|string|\EDD\Vendor\Stripe\Quote $quote The quote this invoice was generated from. + * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice. + * @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. + * @property null|string $statement_descriptor Extra information about an invoice for the customer's credit card statement. + * @property null|string $status The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more + * @property \EDD\Vendor\Stripe\StripeObject $status_transitions + * @property null|string|\EDD\Vendor\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any. + * @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + * @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + * @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + * @property null|string|\EDD\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to. + * @property \EDD\Vendor\Stripe\StripeObject $threshold_reason + * @property int $total Total after discounts and taxes. + * @property null|\EDD\Vendor\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items. + * @property \EDD\Vendor\Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items. + * @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + */ +class Invoice extends ApiResource +{ + const OBJECT_NAME = 'invoice'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Search; + use ApiOperations\Update; + + const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const BILLING_SEND_INVOICE = 'send_invoice'; + + const BILLING_REASON_MANUAL = 'manual'; + const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept'; + const BILLING_REASON_SUBSCRIPTION = 'subscription'; + const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create'; + const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle'; + const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold'; + const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update'; + const BILLING_REASON_UPCOMING = 'upcoming'; + + const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; + + const STATUS_DELETED = 'deleted'; + const STATUS_DRAFT = 'draft'; + const STATUS_OPEN = 'open'; + const STATUS_PAID = 'paid'; + const STATUS_UNCOLLECTIBLE = 'uncollectible'; + const STATUS_VOID = 'void'; + + use ApiOperations\NestedResource; + + const PATH_LINES = '/lines'; + + /** + * @param string $id the ID of the invoice on which to retrieve the lines + * @param null|array $params + * @param null|array|string $opts + * + * @throws StripeExceptionApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\InvoiceLineItem> the list of lines (InvoiceLineItem) + */ + public static function allLines($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_LINES, $params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice the finalized invoice + */ + public function finalizeInvoice($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/finalize'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice the uncollectible invoice + */ + public function markUncollectible($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/mark_uncollectible'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice the paid invoice + */ + public function pay($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/pay'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice the sent invoice + */ + public function sendInvoice($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/send'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice the upcoming invoice + */ + public static function upcoming($params = null, $opts = null) + { + $url = static::classUrl() . '/upcoming'; + list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice the voided invoice + */ + public function voidInvoice($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/void'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult the invoice search results + */ + public static function search($params = null, $opts = null) + { + $url = '/v1/invoices/search'; + + return self::_searchResource($url, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/InvoiceItem.php b/libraries/Stripe/lib/InvoiceItem.php new file mode 100644 index 00000000000..98ac74d119c --- /dev/null +++ b/libraries/Stripe/lib/InvoiceItem.php @@ -0,0 +1,50 @@ +Subscription + * Invoices. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount (in the currency specified) of the invoice item. This should always be equal to unit_amount * quantity. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string|\EDD\Vendor\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed. + * @property int $date Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations. + * @property null|(string|\EDD\Vendor\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount. + * @property null|string|\EDD\Vendor\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs to. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\StripeObject $period + * @property null|\EDD\Vendor\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for. + * @property null|\EDD\Vendor\Stripe\Price $price The price of the invoice item. + * @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + * @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + * @property null|string|\EDD\Vendor\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any. + * @property string $subscription_item The subscription item that this invoice item has been created for, if any. + * @property null|\EDD\Vendor\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item. + * @property null|string|\EDD\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to. + * @property null|int $unit_amount Unit amount (in the currency specified) of the invoice item. + * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places. + */ +class InvoiceItem extends ApiResource +{ + const OBJECT_NAME = 'invoiceitem'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/InvoiceLineItem.php b/libraries/Stripe/lib/InvoiceLineItem.php new file mode 100644 index 00000000000..a055416490f --- /dev/null +++ b/libraries/Stripe/lib/InvoiceLineItem.php @@ -0,0 +1,34 @@ +ISO currency code, in lowercase. Must be a supported currency. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|\EDD\Vendor\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item. + * @property bool $discountable If true, discounts will apply to this line item. Always false for prorations. + * @property null|(string|\EDD\Vendor\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount. + * @property string $invoice_item The ID of the invoice item associated with this line item if any. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created. + * @property \EDD\Vendor\Stripe\StripeObject $period + * @property null|\EDD\Vendor\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration. + * @property null|\EDD\Vendor\Stripe\Price $price The price of the line item. + * @property bool $proration Whether this is a proration. + * @property null|\EDD\Vendor\Stripe\StripeObject $proration_details Additional details for proration line items + * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration. + * @property null|string $subscription The subscription that the invoice item pertains to, if any. + * @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. + * @property \EDD\Vendor\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item + * @property \EDD\Vendor\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item. + * @property string $type A string identifying the type of the source of this line item, either an invoiceitem or a subscription. + */ +class InvoiceLineItem extends ApiResource +{ + const OBJECT_NAME = 'line_item'; +} diff --git a/libraries/Stripe/lib/Issuing/Authorization.php b/libraries/Stripe/lib/Issuing/Authorization.php new file mode 100644 index 00000000000..d1db360b417 --- /dev/null +++ b/libraries/Stripe/lib/Issuing/Authorization.php @@ -0,0 +1,81 @@ +issued card is used to + * make a purchase, an Issuing Authorization object is created. Authorizations + * must be approved for the purchase to be completed successfully. + * + * Related guide: Issued Card + * Authorizations. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the smallest currency unit. + * @property null|\EDD\Vendor\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit. + * @property bool $approved Whether the authorization has been approved. + * @property string $authorization_method How the card details were provided. + * @property \EDD\Vendor\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization. + * @property \EDD\Vendor\Stripe\Issuing\Card $card You can create physical or virtual cards that are issued to cardholders. + * @property null|string|\EDD\Vendor\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit. + * @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property \EDD\Vendor\Stripe\StripeObject $merchant_data + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\EDD\Vendor\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook. + * @property \EDD\Vendor\Stripe\StripeObject[] $request_history History of every time pending_request was approved/denied, either by you directly or by EDD\Vendor\Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. + * @property string $status The current status of the authorization in its lifecycle. + * @property \EDD\Vendor\Stripe\Issuing\Transaction[] $transactions List of transactions associated with this authorization. + * @property \EDD\Vendor\Stripe\StripeObject $verification_data + * @property null|string $wallet The digital wallet used for this authorization. One of apple_pay, google_pay, or samsung_pay. + */ +class Authorization extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.authorization'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Authorization the approved authorization + */ + public function approve($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/approve'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Authorization the declined authorization + */ + public function decline($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/decline'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/Issuing/Card.php b/libraries/Stripe/lib/Issuing/Card.php new file mode 100644 index 00000000000..e4887cb9721 --- /dev/null +++ b/libraries/Stripe/lib/Issuing/Card.php @@ -0,0 +1,60 @@ +create physical or + * virtual cards that are issued to cardholders. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $brand The brand of the card. + * @property null|string $cancellation_reason The reason why the card was canceled. + * @property \EDD\Vendor\Stripe\Issuing\Cardholder $cardholder

    An Issuing Cardholder object represents an individual or business entity who is issued cards.

    Related guide: How to create a Cardholder

    + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint. + * @property int $exp_month The expiration month of the card. + * @property int $exp_year The expiration year of the card. + * @property string $last4 The last 4 digits of the card number. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint. + * @property null|string|\EDD\Vendor\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any. + * @property null|string|\EDD\Vendor\Stripe\Issuing\Card $replacement_for The card this card replaces, if any. + * @property null|string $replacement_reason The reason why the previous card needed to be replaced. + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping Where and how the card will be shipped. + * @property \EDD\Vendor\Stripe\StripeObject $spending_controls + * @property string $status Whether authorizations can be approved on this card. + * @property string $type The type of the card. + * @property null|\EDD\Vendor\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay). + */ +class Card extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.card'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\CardDetails the card details associated with that issuing card + */ + public function details($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/details'; + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response, $opts); + $obj->setLastResponse($response); + + return $obj; + } +} diff --git a/libraries/Stripe/lib/Issuing/CardDetails.php b/libraries/Stripe/lib/Issuing/CardDetails.php new file mode 100644 index 00000000000..6eaa61ecb44 --- /dev/null +++ b/libraries/Stripe/lib/Issuing/CardDetails.php @@ -0,0 +1,19 @@ +Cardholder object represents an individual or business + * entity who is issued cards. + * + * Related guide: How to create a + * Cardholder + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\StripeObject $billing + * @property null|\EDD\Vendor\Stripe\StripeObject $company Additional information about a company cardholder. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $email The cardholder's email address. + * @property null|\EDD\Vendor\Stripe\StripeObject $individual Additional information about an individual cardholder. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $name The cardholder's name. This will be printed on cards issued to them. + * @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the 3D Secure documentation for more details. + * @property \EDD\Vendor\Stripe\StripeObject $requirements + * @property null|\EDD\Vendor\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our documentation for more details. + * @property string $status Specifies whether to permit authorizations on this cardholder's cards. + * @property string $type One of individual or company. + */ +class Cardholder extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.cardholder'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/Issuing/Dispute.php b/libraries/Stripe/lib/Issuing/Dispute.php new file mode 100644 index 00000000000..f050891bb77 --- /dev/null +++ b/libraries/Stripe/lib/Issuing/Dispute.php @@ -0,0 +1,53 @@ +card issuer, you can dispute + * transactions that the cardholder does not recognize, suspects to be fraudulent, + * or has other issues with. + * + * Related guide: Disputing + * Transactions + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Disputed amount. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + * @property null|\EDD\Vendor\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency The currency the transaction was made in. + * @property \EDD\Vendor\Stripe\StripeObject $evidence + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $status Current status of the dispute. + * @property string|\EDD\Vendor\Stripe\Issuing\Transaction $transaction The transaction being disputed. + */ +class Dispute extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.dispute'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Dispute the submited dispute + */ + public function submit($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/submit'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/Issuing/Transaction.php b/libraries/Stripe/lib/Issuing/Transaction.php new file mode 100644 index 00000000000..522f0c731cb --- /dev/null +++ b/libraries/Stripe/lib/Issuing/Transaction.php @@ -0,0 +1,44 @@ +issued card that + * results in funds entering or leaving your EDD\Vendor\Stripe account, such as a completed + * purchase or refund, is represented by an Issuing Transaction + * object. + * + * Related guide: Issued Card + * Transactions. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit. + * @property null|\EDD\Vendor\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit. + * @property null|string|\EDD\Vendor\Stripe\Issuing\Authorization $authorization The Authorization object that led to this transaction. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction associated with this transaction. + * @property string|\EDD\Vendor\Stripe\Issuing\Card $card The card used to make this transaction. + * @property null|string|\EDD\Vendor\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\EDD\Vendor\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $merchant_amount The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency. + * @property string $merchant_currency The currency with which the merchant is taking payment. + * @property \EDD\Vendor\Stripe\StripeObject $merchant_data + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\EDD\Vendor\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant. + * @property string $type The nature of the transaction. + * @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay. + */ +class Transaction extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.transaction'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/LineItem.php b/libraries/Stripe/lib/LineItem.php new file mode 100644 index 00000000000..545456b063e --- /dev/null +++ b/libraries/Stripe/lib/LineItem.php @@ -0,0 +1,26 @@ +ISO currency code, in lowercase. Must be a supported currency. + * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + * @property \EDD\Vendor\Stripe\StripeObject[] $discounts The discounts applied to the line item. + * @property null|\EDD\Vendor\Stripe\Price $price The price used to generate the line item. + * @property null|int $quantity The quantity of products being purchased. + * @property \EDD\Vendor\Stripe\StripeObject[] $taxes The taxes applied to the line item. + */ +class LineItem extends ApiResource +{ + const OBJECT_NAME = 'item'; + + use ApiOperations\All; +} diff --git a/libraries/Stripe/lib/LoginLink.php b/libraries/Stripe/lib/LoginLink.php new file mode 100644 index 00000000000..09b95a58beb --- /dev/null +++ b/libraries/Stripe/lib/LoginLink.php @@ -0,0 +1,15 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $multi_use + * @property string|\EDD\Vendor\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate. + * @property \EDD\Vendor\Stripe\StripeObject $payment_method_details + * @property \EDD\Vendor\Stripe\StripeObject $single_use + * @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment. + * @property string $type The type of the mandate. + */ +class Mandate extends ApiResource +{ + const OBJECT_NAME = 'mandate'; + + use ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/OAuth.php b/libraries/Stripe/lib/OAuth.php new file mode 100644 index 00000000000..b545c250363 --- /dev/null +++ b/libraries/Stripe/lib/OAuth.php @@ -0,0 +1,101 @@ +request( + 'post', + '/oauth/token', + $params, + null + ); + + return Util\Util::convertToStripeObject($response->json, $opts); + } + + /** + * Disconnects an account from your platform. + * + * @param null|array $params + * @param null|array $opts + * + * @throws \EDD\Vendor\Stripe\Exception\OAuth\OAuthErrorException if the request fails + * + * @return StripeObject object containing the response from the API + */ + public static function deauthorize($params = null, $opts = null) + { + $params = $params ?: []; + $base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase; + $requestor = new ApiRequestor(null, $base); + $params['client_id'] = self::_getClientId($params); + list($response, $apiKey) = $requestor->request( + 'post', + '/oauth/deauthorize', + $params, + null + ); + + return Util\Util::convertToStripeObject($response->json, $opts); + } + + private static function _getClientId($params = null) + { + $clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null; + if (null === $clientId) { + $clientId = Stripe::getClientId(); + } + if (null === $clientId) { + $msg = 'No client_id provided. (HINT: set your client_id using ' + . '"Stripe::setClientId()". You can find your client_ids ' + . 'in your EDD\Vendor\Stripe dashboard at ' + . 'https://dashboard.stripe.com/account/applications/settings, ' + . 'after registering your account as a platform. See ' + . 'https://stripe.com/docs/connect/standard-accounts for details, ' + . 'or email support@stripe.com if you have any questions.'; + + throw new Exception\AuthenticationException($msg); + } + + return $clientId; + } +} diff --git a/libraries/Stripe/lib/OAuthErrorObject.php b/libraries/Stripe/lib/OAuthErrorObject.php new file mode 100644 index 00000000000..d3a42f9a6ae --- /dev/null +++ b/libraries/Stripe/lib/OAuthErrorObject.php @@ -0,0 +1,31 @@ + null, + 'error_description' => null, + ], $values); + parent::refreshFrom($values, $opts, $partial); + } +} diff --git a/libraries/Stripe/lib/Order.php b/libraries/Stripe/lib/Order.php new file mode 100644 index 00000000000..7fd34f6d5b4 --- /dev/null +++ b/libraries/Stripe/lib/Order.php @@ -0,0 +1,81 @@ +products. You can + * create, retrieve, and pay individual orders, as well as list all orders. Orders + * are identified by a unique, random ID. + * + * Related guide: Tax, Shipping, + * and Inventory. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + * @property null|int $amount_returned The total amount that was returned to the customer. + * @property null|string $application ID of the Connect Application that created the order. + * @property null|int $application_fee A fee in cents that will be applied to the order and transferred to the application owner’s EDD\Vendor\Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. + * @property null|string|\EDD\Vendor\Stripe\Charge $charge The ID of the payment used to pay for the order. Present if the order status is paid, fulfilled, or refunded. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The customer used for the order. + * @property null|string $email The email address of the customer placing the order. + * @property string $external_coupon_code External coupon code to load for this order. + * @property \EDD\Vendor\Stripe\OrderItem[] $items List of items constituting the order. An order can have up to 25 items. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\OrderReturn> $returns A list of returns that have taken place for this order. + * @property null|string $selected_shipping_method The shipping method that is currently selected for this order, if any. If present, it is equal to one of the ids of shipping methods in the shipping_methods array. At order creation time, if there are multiple shipping methods, EDD\Vendor\Stripe will automatically selected the first method. + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping The shipping address for the order. Present if the order is for goods to be shipped. + * @property null|\EDD\Vendor\Stripe\StripeObject[] $shipping_methods A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. + * @property string $status Current order status. One of created, paid, canceled, fulfilled, or returned. More details in the Orders Guide. + * @property null|\EDD\Vendor\Stripe\StripeObject $status_transitions The timestamps at which the order status was updated. + * @property null|int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @property string $upstream_id The user's order ID if it is different from the EDD\Vendor\Stripe order ID. + */ +class Order extends ApiResource +{ + const OBJECT_NAME = 'order'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\OrderReturn the newly created return + */ + public function returnOrder($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/returns'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + + return Util\Util::convertToStripeObject($response, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Order the paid order + */ + public function pay($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/pay'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/OrderItem.php b/libraries/Stripe/lib/OrderItem.php new file mode 100644 index 00000000000..b775359946d --- /dev/null +++ b/libraries/Stripe/lib/OrderItem.php @@ -0,0 +1,19 @@ +order items. Returns always + * belong to an order, and may optionally contain a refund. + * + * Related guide: Handling + * Returns. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property \EDD\Vendor\Stripe\OrderItem[] $items The items included in this order return. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string|\EDD\Vendor\Stripe\Order $order The order that this return includes items from. + * @property null|string|\EDD\Vendor\Stripe\Refund $refund The ID of the refund issued for this return. + */ +class OrderReturn extends ApiResource +{ + const OBJECT_NAME = 'order_return'; + + use ApiOperations\All; + use ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/PaymentIntent.php b/libraries/Stripe/lib/PaymentIntent.php new file mode 100644 index 00000000000..7a6b1d8a405 --- /dev/null +++ b/libraries/Stripe/lib/PaymentIntent.php @@ -0,0 +1,195 @@ +multiple + * statuses throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: Payment Intents API. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + * @property int $amount_capturable Amount that can be captured from this PaymentIntent. + * @property \EDD\Vendor\Stripe\StripeObject $amount_details + * @property int $amount_received Amount that was collected by this PaymentIntent. + * @property null|string|\EDD\Vendor\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent. + * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's EDD\Vendor\Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts. + * @property null|\EDD\Vendor\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the EDD\Vendor\Stripe Dashboard + * @property null|int $canceled_at Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + * @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by EDD\Vendor\Stripe internally (failed_invoice, void_invoice, or automatic). + * @property string $capture_method Controls when the funds will be captured from the customer's account. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Charge> $charges Charges that were created by this PaymentIntent, if any. + * @property null|string $client_secret

    The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.

    The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

    Refer to our docs to accept a payment and learn about how client_secret should be handled.

    + * @property string $confirmation_method + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer

    ID of the Customer this PaymentIntent belongs to, if one exists.

    Payment methods attached to other Customers cannot be used with this PaymentIntent.

    If present in combination with setup_future_usage, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.

    + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\EDD\Vendor\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists. + * @property null|\EDD\Vendor\Stripe\ErrorObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the documentation. + * @property null|\EDD\Vendor\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + * @property null|string|\EDD\Vendor\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details. + * @property null|string|\EDD\Vendor\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent. + * @property null|\EDD\Vendor\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent. + * @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + * @property null|\EDD\Vendor\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment. + * @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings. + * @property null|string|\EDD\Vendor\Stripe\Review $review ID of the review associated with this PaymentIntent, if any. + * @property null|string $setup_future_usage

    Indicates that you intend to make future payments with this PaymentIntent's payment method.

    Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.

    When processing card payments, EDD\Vendor\Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.

    + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping Shipping information for this PaymentIntent. + * @property null|string|\EDD\Vendor\Stripe\Account|\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. + * @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. + * @property null|string $statement_descriptor_suffix Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * @property string $status Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status. + * @property null|\EDD\Vendor\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details. + * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details. + */ +class PaymentIntent extends ApiResource +{ + const OBJECT_NAME = 'payment_intent'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Search; + use ApiOperations\Update; + + const STATUS_CANCELED = 'canceled'; + const STATUS_PROCESSING = 'processing'; + const STATUS_REQUIRES_ACTION = 'requires_action'; + const STATUS_REQUIRES_CAPTURE = 'requires_capture'; + const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation'; + const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method'; + const STATUS_SUCCEEDED = 'succeeded'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent the applied payment intent + */ + public function applyCustomerBalance($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/apply_customer_balance'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent the canceled payment intent + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent the captured payment intent + */ + public function capture($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/capture'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent the confirmed payment intent + */ + public function confirm($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/confirm'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent the incremented payment intent + */ + public function incrementAuthorization($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/increment_authorization'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent the verified payment intent + */ + public function verifyMicrodeposits($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/verify_microdeposits'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult the payment intent search results + */ + public static function search($params = null, $opts = null) + { + $url = '/v1/payment_intents/search'; + + return self::_searchResource($url, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/PaymentLink.php b/libraries/Stripe/lib/PaymentLink.php new file mode 100644 index 00000000000..234a73160ff --- /dev/null +++ b/libraries/Stripe/lib/PaymentLink.php @@ -0,0 +1,70 @@ +checkout session to + * render the payment page. You can use checkout + * session events to track payments through payment links. + * + * Related guide: Payment Links API + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the payment link's url is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated. + * @property \EDD\Vendor\Stripe\StripeObject $after_completion + * @property bool $allow_promotion_codes Whether user redeemable promotion codes are enabled. + * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's EDD\Vendor\Stripe account. + * @property null|float $application_fee_percent This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's EDD\Vendor\Stripe account. + * @property \EDD\Vendor\Stripe\StripeObject $automatic_tax + * @property string $billing_address_collection Configuration for collecting the customer's billing address. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\LineItem> $line_items The line items representing what is being sold. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\EDD\Vendor\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details. + * @property null|string[] $payment_method_types The list of payment method types that customers can use. When null, EDD\Vendor\Stripe will dynamically show relevant payment methods you've enabled in your payment method settings. + * @property \EDD\Vendor\Stripe\StripeObject $phone_number_collection + * @property null|\EDD\Vendor\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address. + * @property null|\EDD\Vendor\Stripe\StripeObject $subscription_data When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use subscription_data. + * @property null|\EDD\Vendor\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + * @property string $url The public URL that can be shared with customers. + */ +class PaymentLink extends ApiResource +{ + const OBJECT_NAME = 'payment_link'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const BILLING_ADDRESS_COLLECTION_AUTO = 'auto'; + const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required'; + + /** + * @param null|array $params + * @param null|array|string $opts + * @param mixed $id + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\PaymentLink> list of LineItems + */ + public static function allLineItems($id, $params = null, $opts = null) + { + $url = static::resourceUrl($id) . '/line_items'; + list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } +} diff --git a/libraries/Stripe/lib/PaymentMethod.php b/libraries/Stripe/lib/PaymentMethod.php new file mode 100644 index 00000000000..ce061fef2d3 --- /dev/null +++ b/libraries/Stripe/lib/PaymentMethod.php @@ -0,0 +1,95 @@ +PaymentIntents to + * collect payments or save them to Customer objects to store instrument details + * for future payments. + * + * Related guides: Payment Methods and + * More Payment + * Scenarios. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\StripeObject $acss_debit + * @property \EDD\Vendor\Stripe\StripeObject $afterpay_clearpay + * @property \EDD\Vendor\Stripe\StripeObject $alipay + * @property \EDD\Vendor\Stripe\StripeObject $au_becs_debit + * @property \EDD\Vendor\Stripe\StripeObject $bacs_debit + * @property \EDD\Vendor\Stripe\StripeObject $bancontact + * @property \EDD\Vendor\Stripe\StripeObject $billing_details + * @property \EDD\Vendor\Stripe\StripeObject $boleto + * @property \EDD\Vendor\Stripe\StripeObject $card + * @property \EDD\Vendor\Stripe\StripeObject $card_present + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + * @property \EDD\Vendor\Stripe\StripeObject $customer_balance + * @property \EDD\Vendor\Stripe\StripeObject $eps + * @property \EDD\Vendor\Stripe\StripeObject $fpx + * @property \EDD\Vendor\Stripe\StripeObject $giropay + * @property \EDD\Vendor\Stripe\StripeObject $grabpay + * @property \EDD\Vendor\Stripe\StripeObject $ideal + * @property \EDD\Vendor\Stripe\StripeObject $interac_present + * @property \EDD\Vendor\Stripe\StripeObject $klarna + * @property \EDD\Vendor\Stripe\StripeObject $konbini + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\StripeObject $oxxo + * @property \EDD\Vendor\Stripe\StripeObject $p24 + * @property \EDD\Vendor\Stripe\StripeObject $paynow + * @property \EDD\Vendor\Stripe\StripeObject $sepa_debit + * @property \EDD\Vendor\Stripe\StripeObject $sofort + * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @property \EDD\Vendor\Stripe\StripeObject $us_bank_account + * @property \EDD\Vendor\Stripe\StripeObject $wechat_pay + */ +class PaymentMethod extends ApiResource +{ + const OBJECT_NAME = 'payment_method'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentMethod the attached payment method + */ + public function attach($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/attach'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentMethod the detached payment method + */ + public function detach($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/detach'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/Payout.php b/libraries/Stripe/lib/Payout.php new file mode 100644 index 00000000000..1bd91a11c7c --- /dev/null +++ b/libraries/Stripe/lib/Payout.php @@ -0,0 +1,108 @@ +Payout object is created when you receive funds from Stripe, or + * when you initiate a payout to either a bank account or debit card of a connected EDD\Vendor\Stripe account. You + * can retrieve individual payouts, as well as list all payouts. Payouts are made + * on varying schedules, + * depending on your country and industry. + * + * Related guide: Receiving Payouts. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount (in %s) to be transferred to your bank account or debit card. + * @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. + * @property bool $automatic Returns true if the payout was created by an automated payout schedule, and false if it was requested manually. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card $destination ID of the bank account or card the payout was sent to. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. + * @property null|string $failure_code Error code explaining reason for payout failure if available. See Types of payout failures for a list of failure codes. + * @property null|string $failure_message Message to user further explaining reason for payout failure if available. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $method The method used to send this payout, which can be standard or instant. instant is only supported for payouts to debit cards. (See Instant payouts for marketplaces for more information.) + * @property null|string|\EDD\Vendor\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout. + * @property null|string|\EDD\Vendor\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout. + * @property string $source_type The source balance this payout came from. One of card, fpx, or bank_account. + * @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement. + * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it is submitted to the bank, when it becomes in_transit. The status then changes to paid if the transaction goes through, or to failed or canceled (within 5 business days). Some failed payouts may initially show as paid but then change to failed. + * @property string $type Can be bank_account or card. + */ +class Payout extends ApiResource +{ + const OBJECT_NAME = 'payout'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const FAILURE_ACCOUNT_CLOSED = 'account_closed'; + const FAILURE_ACCOUNT_FROZEN = 'account_frozen'; + const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted'; + const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed'; + const FAILURE_COULD_NOT_PROCESS = 'could_not_process'; + const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; + const FAILURE_DECLINED = 'declined'; + const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name'; + const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds'; + const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number'; + const FAILURE_INVALID_CURRENCY = 'invalid_currency'; + const FAILURE_NO_ACCOUNT = 'no_account'; + const FAILURE_UNSUPPORTED_CARD = 'unsupported_card'; + + const METHOD_INSTANT = 'instant'; + const METHOD_STANDARD = 'standard'; + + const STATUS_CANCELED = 'canceled'; + const STATUS_FAILED = 'failed'; + const STATUS_IN_TRANSIT = 'in_transit'; + const STATUS_PAID = 'paid'; + const STATUS_PENDING = 'pending'; + + const TYPE_BANK_ACCOUNT = 'bank_account'; + const TYPE_CARD = 'card'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Payout the canceled payout + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Payout the reversed payout + */ + public function reverse($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/reverse'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/Person.php b/libraries/Stripe/lib/Person.php new file mode 100644 index 00000000000..3557c59cfa8 --- /dev/null +++ b/libraries/Stripe/lib/Person.php @@ -0,0 +1,123 @@ +Standard onboarding + * or Express onboarding + * documentation for information about platform pre-filling and account + * onboarding steps. + * + * Related guide: Handling + * Identity Verification with the API. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $account The account the person is associated with. + * @property \EDD\Vendor\Stripe\StripeObject $address + * @property null|\EDD\Vendor\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only). + * @property null|\EDD\Vendor\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only). + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property \EDD\Vendor\Stripe\StripeObject $dob + * @property null|string $email The person's email address. + * @property null|string $first_name The person's first name. + * @property null|string $first_name_kana The Kana variation of the person's first name (Japan only). + * @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only). + * @property string[] $full_name_aliases A list of alternate names or aliases that the person is known by. + * @property null|\EDD\Vendor\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when. + * @property null|string $gender The person's gender (International regulations require either "male" or "female"). + * @property bool $id_number_provided Whether the person's id_number was provided. + * @property null|string $last_name The person's last name. + * @property null|string $last_name_kana The Kana variation of the person's last name (Japan only). + * @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only). + * @property null|string $maiden_name The person's maiden name. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $nationality The country where the person is a national. + * @property null|string $phone The person's phone number. + * @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + * @property \EDD\Vendor\Stripe\StripeObject $registered_address + * @property \EDD\Vendor\Stripe\StripeObject $relationship + * @property null|\EDD\Vendor\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when. + * @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only). + * @property \EDD\Vendor\Stripe\StripeObject $verification + */ +class Person extends ApiResource +{ + const OBJECT_NAME = 'person'; + + use ApiOperations\Delete; + use ApiOperations\Update; + + const GENDER_FEMALE = 'female'; + const GENDER_MALE = 'male'; + + const POLITICAL_EXPOSURE_EXISTING = 'existing'; + const POLITICAL_EXPOSURE_NONE = 'none'; + + const VERIFICATION_STATUS_PENDING = 'pending'; + const VERIFICATION_STATUS_UNVERIFIED = 'unverified'; + const VERIFICATION_STATUS_VERIFIED = 'verified'; + + /** + * @return string the API URL for this EDD\Vendor\Stripe account reversal + */ + public function instanceUrl() + { + $id = $this['id']; + $account = $this['account']; + if (!$id) { + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", + null + ); + } + $id = Util\Util::utf8($id); + $account = Util\Util::utf8($account); + + $base = Account::classUrl(); + $accountExtn = \urlencode($account); + $extn = \urlencode($id); + + return "{$base}/{$accountExtn}/persons/{$extn}"; + } + + /** + * @param array|string $_id + * @param null|array|string $_opts + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function retrieve($_id, $_opts = null) + { + $msg = 'Persons cannot be retrieved without an account ID. Retrieve ' . + "a person using `Account::retrievePerson('account_id', " . + "'person_id')`."; + + throw new Exception\BadMethodCallException($msg); + } + + /** + * @param string $_id + * @param null|array $_params + * @param null|array|string $_options + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function update($_id, $_params = null, $_options = null) + { + $msg = 'Persons cannot be updated without an account ID. Update ' . + "a person using `Account::updatePerson('account_id', " . + "'person_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); + } +} diff --git a/libraries/Stripe/lib/Plan.php b/libraries/Stripe/lib/Plan.php new file mode 100644 index 00000000000..bb4a235206b --- /dev/null +++ b/libraries/Stripe/lib/Plan.php @@ -0,0 +1,57 @@ +Prices API. It replaces the Plans + * API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases + * of products. Products help + * you track inventory or provisioning, and plans help you track pricing. Different + * physical goods or levels of service should be represented by products, and + * pricing options should be represented by plans. This approach lets you change + * prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for + * $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: Set up + * a subscription and more about products and prices. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the plan can be used for new purchases. + * @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of usage_type=metered. Allowed values are sum for summing up all usage during a period, last_during_period for using the last usage record reported within a period, last_ever for using the last usage record ever (across period bounds) or max which uses the usage record with the maximum reported usage during a period. Defaults to sum. + * @property null|int $amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit. + * @property null|string $amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit. + * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in amount) will be charged per unit in quantity (for plans with usage_type=licensed), or per unit of total usage (for plans with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string $interval The frequency at which a subscription is billed. One of day, week, month or year. + * @property int $interval_count The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $nickname A brief description of the plan, hidden from customers. + * @property null|string|\EDD\Vendor\Stripe\Product $product The product whose pricing this plan determines. + * @property \EDD\Vendor\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. + * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows. + * @property null|\EDD\Vendor\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers. + * @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using trial_from_plan=true. + * @property string $usage_type Configures how the quantity per period should be determined. Can be either metered or licensed. licensed automatically bills the quantity set when adding it to a subscription. metered aggregates the total usage based on usage records. Defaults to licensed. + */ +class Plan extends ApiResource +{ + const OBJECT_NAME = 'plan'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/Price.php b/libraries/Stripe/lib/Price.php new file mode 100644 index 00000000000..123e4f9d133 --- /dev/null +++ b/libraries/Stripe/lib/Price.php @@ -0,0 +1,83 @@ +Products help you track + * inventory or provisioning, and prices help you track payment terms. Different + * physical goods or levels of service should be represented by products, and + * pricing options should be represented by prices. This approach lets you change + * prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices + * for $10/month, $100/year, and €9 once. + * + * Related guides: Set up + * a subscription, create an invoice, + * and more about products and prices. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the price can be used for new purchases. + * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $nickname A brief description of the price, hidden from customers. + * @property string|\EDD\Vendor\Stripe\Product $product The ID of the product this price is associated with. + * @property null|\EDD\Vendor\Stripe\StripeObject $recurring The recurring components of a price such as interval and usage_type. + * @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. + * @property \EDD\Vendor\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. + * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows. + * @property null|\EDD\Vendor\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers. + * @property string $type One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + * @property null|int $unit_amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit. + * @property null|string $unit_amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit. + */ +class Price extends ApiResource +{ + const OBJECT_NAME = 'price'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Search; + use ApiOperations\Update; + + const BILLING_SCHEME_PER_UNIT = 'per_unit'; + const BILLING_SCHEME_TIERED = 'tiered'; + + const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive'; + const TAX_BEHAVIOR_INCLUSIVE = 'inclusive'; + const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified'; + + const TIERS_MODE_GRADUATED = 'graduated'; + const TIERS_MODE_VOLUME = 'volume'; + + const TYPE_ONE_TIME = 'one_time'; + const TYPE_RECURRING = 'recurring'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult the price search results + */ + public static function search($params = null, $opts = null) + { + $url = '/v1/prices/search'; + + return self::_searchResource($url, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Product.php b/libraries/Stripe/lib/Product.php new file mode 100644 index 00000000000..8a00123031d --- /dev/null +++ b/libraries/Stripe/lib/Product.php @@ -0,0 +1,73 @@ +Prices to + * configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: Set up + * a subscription, share a Payment + * Link, accept + * payments with Checkout, and more about Products and Prices + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the product is currently available for purchase. + * @property null|string[] $attributes A list of up to 5 attributes that each SKU can provide values for (e.g., ["color", "size"]). + * @property null|string $caption A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good. + * @property null|string|\EDD\Vendor\Stripe\Price $default_price The ID of the Price object that is the default price for this product. + * @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + * @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $name The product's name, meant to be displayable to the customer. + * @property null|\EDD\Vendor\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes. + * @property null|bool $shippable Whether this product is shipped (i.e., physical goods). + * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. + * @property null|string|\EDD\Vendor\Stripe\TaxCode $tax_code A tax code ID. + * @property string $type The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans. + * @property null|string $unit_label A label that represents units of this product in EDD\Vendor\Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. + * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @property null|string $url A URL of a publicly-accessible webpage for this product. + */ +class Product extends ApiResource +{ + const OBJECT_NAME = 'product'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Search; + use ApiOperations\Update; + + const TYPE_GOOD = 'good'; + const TYPE_SERVICE = 'service'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult the product search results + */ + public static function search($params = null, $opts = null) + { + $url = '/v1/products/search'; + + return self::_searchResource($url, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/PromotionCode.php b/libraries/Stripe/lib/PromotionCode.php new file mode 100644 index 00000000000..27dbb15ba11 --- /dev/null +++ b/libraries/Stripe/lib/PromotionCode.php @@ -0,0 +1,33 @@ +invoices or orders. Coupons do not work with conventional one-off charges. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The customer that this promotion code can be used by. + * @property null|int $expires_at Date at which the promotion code can no longer be redeemed. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\StripeObject $restrictions + * @property int $times_redeemed Number of times this promotion code has been used. + */ +class PromotionCode extends ApiResource +{ + const OBJECT_NAME = 'promotion_code'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/Quote.php b/libraries/Stripe/lib/Quote.php new file mode 100644 index 00000000000..4a51bcbef70 --- /dev/null +++ b/libraries/Stripe/lib/Quote.php @@ -0,0 +1,171 @@ +charge_automatically, or send_invoice. When charging automatically, EDD\Vendor\Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, EDD\Vendor\Stripe will email your customer an invoice with payment instructions. Defaults to charge_automatically. + * @property \EDD\Vendor\Stripe\StripeObject $computed + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + * @property (string|\EDD\Vendor\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote. + * @property null|string $description A description that will be displayed on the quote PDF. + * @property (string|\EDD\Vendor\Stripe\Discount)[] $discounts The discounts applied to this quote. + * @property int $expires_at The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch. + * @property null|string $footer A footer that will be displayed on the quote PDF. + * @property null|\EDD\Vendor\Stripe\StripeObject $from_quote Details of the quote that was cloned. See the cloning documentation for more details. + * @property null|string $header A header that will be displayed on the quote PDF. + * @property null|string|\EDD\Vendor\Stripe\Invoice $invoice The invoice that was created from this quote. + * @property null|\EDD\Vendor\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\LineItem> $line_items A list of items the customer is being quoted for. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $number A unique number that identifies this particular quote. This number is assigned once the quote is finalized. + * @property null|string|\EDD\Vendor\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details. + * @property string $status The status of the quote. + * @property \EDD\Vendor\Stripe\StripeObject $status_transitions + * @property null|string|\EDD\Vendor\Stripe\Subscription $subscription The subscription that was created or updated from this quote. + * @property \EDD\Vendor\Stripe\StripeObject $subscription_data + * @property null|string|\EDD\Vendor\Stripe\SubscriptionSchedule $subscription_schedule The subscription schedule that was created or updated from this quote. + * @property null|string|\EDD\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this quote belongs to. + * @property \EDD\Vendor\Stripe\StripeObject $total_details + * @property null|\EDD\Vendor\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + */ +class Quote extends ApiResource +{ + const OBJECT_NAME = 'quote'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; + + const STATUS_ACCEPTED = 'accepted'; + const STATUS_CANCELED = 'canceled'; + const STATUS_DRAFT = 'draft'; + const STATUS_OPEN = 'open'; + + /** + * @param callable $readBodyChunkCallable + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + */ + public function pdf($readBodyChunkCallable, $params = null, $opts = null) + { + $opts = \EDD\Vendor\Stripe\Util\RequestOptions::parse($opts); + if (null === $opts->apiBase) { + $opts->apiBase = Stripe::$apiUploadBase; + } + + $url = $this->instanceUrl() . '/pdf'; + $this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote the accepted quote + */ + public function accept($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/accept'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote the canceled quote + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote the finalized quote + */ + public function finalizeQuote($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/finalize'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * @param mixed $id + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Quote> list of LineItems + */ + public static function allComputedUpfrontLineItems($id, $params = null, $opts = null) + { + $url = static::resourceUrl($id) . '/computed_upfront_line_items'; + list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * @param mixed $id + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Quote> list of LineItems + */ + public static function allLineItems($id, $params = null, $opts = null) + { + $url = static::resourceUrl($id) . '/line_items'; + list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } +} diff --git a/libraries/Stripe/lib/Radar/EarlyFraudWarning.php b/libraries/Stripe/lib/Radar/EarlyFraudWarning.php new file mode 100644 index 00000000000..a9b28eb546d --- /dev/null +++ b/libraries/Stripe/lib/Radar/EarlyFraudWarning.php @@ -0,0 +1,38 @@ +Early + * Fraud Warnings. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $actionable An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + * @property string|\EDD\Vendor\Stripe\Charge $charge ID of the charge this early fraud warning is for, optionally expanded. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $fraud_type The type of fraud labelled by the issuer. One of card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc, unauthorized_use_of_card. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property string|\EDD\Vendor\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded. + */ +class EarlyFraudWarning extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'radar.early_fraud_warning'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + + const FRAUD_TYPE_CARD_NEVER_RECEIVED = 'card_never_received'; + const FRAUD_TYPE_FRAUDULENT_CARD_APPLICATION = 'fraudulent_card_application'; + const FRAUD_TYPE_MADE_WITH_COUNTERFEIT_CARD = 'made_with_counterfeit_card'; + const FRAUD_TYPE_MADE_WITH_LOST_CARD = 'made_with_lost_card'; + const FRAUD_TYPE_MADE_WITH_STOLEN_CARD = 'made_with_stolen_card'; + const FRAUD_TYPE_MISC = 'misc'; + const FRAUD_TYPE_UNAUTHORIZED_USE_OF_CARD = 'unauthorized_use_of_card'; +} diff --git a/libraries/Stripe/lib/Radar/ValueList.php b/libraries/Stripe/lib/Radar/ValueList.php new file mode 100644 index 00000000000..28c2454ef97 --- /dev/null +++ b/libraries/Stripe/lib/Radar/ValueList.php @@ -0,0 +1,35 @@ +Default EDD\Vendor\Stripe + * Lists. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $alias The name of the value list for use in rules. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $created_by The name or email address of the user who created this value list. + * @property string $item_type The type of items in the value list. One of card_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Radar\ValueListItem> $list_items List of items contained within this value list. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $name The name of the value list. + */ +class ValueList extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'radar.value_list'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Delete; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/Radar/ValueListItem.php b/libraries/Stripe/lib/Radar/ValueListItem.php new file mode 100644 index 00000000000..f3c479270e2 --- /dev/null +++ b/libraries/Stripe/lib/Radar/ValueListItem.php @@ -0,0 +1,31 @@ +Managing List + * Items. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $created_by The name or email address of the user who added this item to the value list. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property string $value The value of the item. + * @property string $value_list The identifier of the value list this item belongs to. + */ +class ValueListItem extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'radar.value_list_item'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Delete; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/Recipient.php b/libraries/Stripe/lib/Recipient.php new file mode 100644 index 00000000000..49ef21f55f9 --- /dev/null +++ b/libraries/Stripe/lib/Recipient.php @@ -0,0 +1,44 @@ +Recipient objects, you can transfer money from your EDD\Vendor\Stripe + * account to a third-party bank account or debit card. The API allows you to + * create, delete, and update your recipients. You can retrieve individual + * recipients as well as a list of all your recipients. + * + * Recipient objects have been deprecated in favor of Connect, specifically Connect's much + * more powerful Account objects. + * EDD\Vendor\Stripe accounts that don't already use recipients can no longer begin doing so. + * Please use Account objects instead. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\EDD\Vendor\Stripe\BankAccount $active_account Hash describing the current account on the recipient, if there is one. + * @property null|\EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Card> $cards + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\EDD\Vendor\Stripe\Card $default_card The default card to use for creating transfers to this recipient. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string $email + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\EDD\Vendor\Stripe\Account $migrated_to The ID of the Custom account this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. + * @property null|string $name Full, legal name of the recipient. + * @property string|\EDD\Vendor\Stripe\Account $rolled_back_from + * @property string $type Type of the recipient, one of individual or corporation. + * @property bool $verified Whether the recipient has been verified. This field is non-standard, and maybe removed in the future + */ +class Recipient extends ApiResource +{ + const OBJECT_NAME = 'recipient'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/RecipientTransfer.php b/libraries/Stripe/lib/RecipientTransfer.php new file mode 100644 index 00000000000..7623383d650 --- /dev/null +++ b/libraries/Stripe/lib/RecipientTransfer.php @@ -0,0 +1,36 @@ +Refund objects allow you to refund a charge that has previously + * been created but not yet refunded. Funds will be refunded to the credit or debit + * card that was originally charged. + * + * Related guide: Refunds. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount, in %s. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. + * @property null|string|\EDD\Vendor\Stripe\Charge $charge ID of the charge that was refunded. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) + * @property string|\EDD\Vendor\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + * @property string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card, expired_or_canceled_card, or unknown. + * @property string $instructions_email Email to which refund instructions, if required, are sent to. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\StripeObject $next_action + * @property null|string|\EDD\Vendor\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded. + * @property null|string $reason Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by EDD\Vendor\Stripe internally (expired_uncaptured_charge). + * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund. + * @property null|string|\EDD\Vendor\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that is associated with the refund. Only present if the charge came from another EDD\Vendor\Stripe account. See the Connect documentation for details. + * @property null|string $status Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, succeeded, failed, or canceled. Refer to our refunds documentation for more details. + * @property null|string|\EDD\Vendor\Stripe\TransferReversal $transfer_reversal If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. + */ +class Refund extends ApiResource +{ + const OBJECT_NAME = 'refund'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const FAILURE_REASON_EXPIRED_OR_CANCELED_CARD = 'expired_or_canceled_card'; + const FAILURE_REASON_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card'; + const FAILURE_REASON_UNKNOWN = 'unknown'; + + const REASON_DUPLICATE = 'duplicate'; + const REASON_EXPIRED_UNCAPTURED_CHARGE = 'expired_uncaptured_charge'; + const REASON_FRAUDULENT = 'fraudulent'; + const REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer'; + + const STATUS_CANCELED = 'canceled'; + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; + const STATUS_SUCCEEDED = 'succeeded'; + + /** + * @deprecated use FAILURE_REASON_EXPIRED_OR_CANCELED_CARD instead + */ + const FAILURE_REASON = 'expired_or_canceled_card'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Refund the canceled refund + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/Reporting/ReportRun.php b/libraries/Stripe/lib/Reporting/ReportRun.php new file mode 100644 index 00000000000..b37889f8f5b --- /dev/null +++ b/libraries/Stripe/lib/Reporting/ReportRun.php @@ -0,0 +1,37 @@ +API Access to + * Reports. + * + * Note that certain report types can only be run based on your live-mode data (not + * test-mode data), and will error when queried without a live-mode API key. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $error If something should go wrong during the run, a message about the failure (populated when status=failed). + * @property bool $livemode true if the report is run on live mode data and false if it is run on test mode data. + * @property \EDD\Vendor\Stripe\StripeObject $parameters + * @property string $report_type The ID of the report type to run, such as "balance.summary.1". + * @property null|\EDD\Vendor\Stripe\File $result The file object representing the result of the report run (populated when status=succeeded). + * @property string $status Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. Rarely, we may encounter an error, at which point this will be set to failed and the error field will be populated. + * @property null|int $succeeded_at Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch. + */ +class ReportRun extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'reporting.report_run'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/Reporting/ReportType.php b/libraries/Stripe/lib/Reporting/ReportType.php new file mode 100644 index 00000000000..290b21ae3b7 --- /dev/null +++ b/libraries/Stripe/lib/Reporting/ReportType.php @@ -0,0 +1,35 @@ +API Access to Reports + * documentation for those Report Type IDs, along with required and optional + * parameters. + * + * Note that certain report types can only be run based on your live-mode data (not + * test-mode data), and will error when queried without a live-mode API key. + * + * @property string $id The ID of the Report Type, such as balance.summary.1. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $data_available_end Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + * @property int $data_available_start Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + * @property null|string[] $default_columns List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the columns parameter, this will be null.) + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property string $name Human-readable name of the Report Type + * @property int $updated When this Report Type was latest updated. Measured in seconds since the Unix epoch. + * @property int $version Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + */ +class ReportType extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'reporting.report_type'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/RequestTelemetry.php b/libraries/Stripe/lib/RequestTelemetry.php new file mode 100644 index 00000000000..999fb0dc938 --- /dev/null +++ b/libraries/Stripe/lib/RequestTelemetry.php @@ -0,0 +1,26 @@ +requestId = $requestId; + $this->requestDuration = $requestDuration; + } +} diff --git a/libraries/Stripe/lib/Review.php b/libraries/Stripe/lib/Review.php new file mode 100644 index 00000000000..5b930b4fbf5 --- /dev/null +++ b/libraries/Stripe/lib/Review.php @@ -0,0 +1,66 @@ +Radar and reviewing payments here. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $billing_zip The ZIP or postal code of the card used, if applicable. + * @property null|string|\EDD\Vendor\Stripe\Charge $charge The charge associated with this review. + * @property null|string $closed_reason The reason the review was closed, or null if it has not yet been closed. One of approved, refunded, refunded_as_fraud, disputed, or redacted. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $ip_address The IP address where the payment originated. + * @property null|\EDD\Vendor\Stripe\StripeObject $ip_address_location Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property bool $open If true, the review needs action. + * @property string $opened_reason The reason the review was opened. One of rule or manual. + * @property string|\EDD\Vendor\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists. + * @property string $reason The reason the review is currently open or closed. One of rule, manual, approved, refunded, refunded_as_fraud, disputed, or redacted. + * @property null|\EDD\Vendor\Stripe\StripeObject $session Information related to the browsing session of the user who initiated the payment. + */ +class Review extends ApiResource +{ + const OBJECT_NAME = 'review'; + + use ApiOperations\All; + use ApiOperations\Retrieve; + + /** + * Possible string representations of the current, the opening or the closure reason of the review. + * Not all of these enumeration apply to all of the ´reason´ fields. Please consult the Review object to + * determine where these are apply. + * + * @see https://stripe.com/docs/api/radar/reviews/object + */ + const REASON_APPROVED = 'approved'; + const REASON_DISPUTED = 'disputed'; + const REASON_MANUAL = 'manual'; + const REASON_REFUNDED = 'refunded'; + const REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud'; + const REASON_RULE = 'rule'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Review the approved review + */ + public function approve($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/approve'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/SKU.php b/libraries/Stripe/lib/SKU.php new file mode 100644 index 00000000000..af26dfb2b16 --- /dev/null +++ b/libraries/Stripe/lib/SKU.php @@ -0,0 +1,41 @@ +stock keeping units. + * SKUs describe specific product variations, taking into account any combination + * of: attributes, currency, and cost. For example, a product may be a T-shirt, + * whereas a specific SKU represents the size: large, color: + * red version of that shirt. + * + * Can also be used to manage inventory. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the SKU is available for purchase. + * @property \EDD\Vendor\Stripe\StripeObject $attributes A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are ["size", "gender"], a valid SKU has the following dictionary of attributes: {"size": "Medium", "gender": "Unisex"}. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string $image The URL of an image for this SKU, meant to be displayable to the customer. + * @property \EDD\Vendor\Stripe\StripeObject $inventory + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\EDD\Vendor\Stripe\StripeObject $package_dimensions The dimensions of this SKU for shipping purposes. + * @property int $price The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). + * @property string|\EDD\Vendor\Stripe\Product $product The ID of the product this SKU is associated with. The product must be currently active. + * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ +class SKU extends ApiResource +{ + const OBJECT_NAME = 'sku'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/SearchResult.php b/libraries/Stripe/lib/SearchResult.php new file mode 100644 index 00000000000..a7e4a84d99f --- /dev/null +++ b/libraries/Stripe/lib/SearchResult.php @@ -0,0 +1,234 @@ +Collection in that they both wrap + * around a list of objects and provide pagination. However the + * SearchResult object paginates by relying on a + * next_page token included in the response rather than using + * object IDs and a starting_before/ending_after + * parameter. Thus, SearchResult only supports forwards pagination. + * + * The {@see $total_count} property is only available when + * the `expand` parameter contains `total_count`. + * + * @template TStripeObject of StripeObject + * @template-implements \IteratorAggregate + * + * @property string $object + * @property string $url + * @property string $next_page + * @property int $total_count + * @property bool $has_more + * @property TStripeObject[] $data + */ +class SearchResult extends StripeObject implements \Countable, \IteratorAggregate +{ + const OBJECT_NAME = 'search_result'; + + use ApiOperations\Request; + + /** @var array */ + protected $filters = []; + + /** + * @return string the base URL for the given class + */ + public static function baseUrl() + { + return Stripe::$apiBase; + } + + /** + * Returns the filters. + * + * @return array the filters + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Sets the filters, removing paging options. + * + * @param array $filters the filters + */ + public function setFilters($filters) + { + $this->filters = $filters; + } + + #[\ReturnTypeWillChange] + public function offsetGet($k) + { + if (\is_string($k)) { + return parent::offsetGet($k); + } + $msg = "You tried to access the {$k} index, but SearchResult " . + 'types only support string keys. (HINT: Search calls ' . + 'return an object with a `data` (which is the data ' . + "array). You likely want to call ->data[{$k}])"; + + throw new Exception\InvalidArgumentException($msg); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws Exception\ApiErrorException + * + * @return SearchResult + */ + public function all($params = null, $opts = null) + { + self::_validateParams($params); + list($url, $params) = $this->extractPathAndUpdateParams($params); + + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = Util\Util::convertToStripeObject($response, $opts); + if (!($obj instanceof \EDD\Vendor\Stripe\SearchResult)) { + throw new \EDD\Vendor\Stripe\Exception\UnexpectedValueException( + 'Expected type ' . \EDD\Vendor\Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.' + ); + } + $obj->setFilters($params); + + return $obj; + } + + /** + * @return int the number of objects in the current page + */ + #[\ReturnTypeWillChange] + public function count() + { + return \count($this->data); + } + + /** + * @return \ArrayIterator an iterator that can be used to iterate + * across objects in the current page + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return new \ArrayIterator($this->data); + } + + /** + * @return \Generator|TStripeObject[] A generator that can be used to + * iterate across all objects across all pages. As page boundaries are + * encountered, the next page will be fetched automatically for + * continued iteration. + */ + public function autoPagingIterator() + { + $page = $this; + + while (true) { + foreach ($page as $item) { + yield $item; + } + $page = $page->nextPage(); + + if ($page->isEmpty()) { + break; + } + } + } + + /** + * Returns an empty set of search results. This is returned from + * {@see nextPage()} when we know that there isn't a next page in order to + * replicate the behavior of the API when it attempts to return a page + * beyond the last. + * + * @param null|array|string $opts + * + * @return SearchResult + */ + public static function emptySearchResult($opts = null) + { + return SearchResult::constructFrom(['data' => []], $opts); + } + + /** + * Returns true if the page object contains no element. + * + * @return bool + */ + public function isEmpty() + { + return empty($this->data); + } + + /** + * Fetches the next page in the resource list (if there is one). + * + * This method will try to respect the limit of the current page. If none + * was given, the default limit will be fetched again. + * + * @param null|array $params + * @param null|array|string $opts + * + * @return SearchResult + */ + public function nextPage($params = null, $opts = null) + { + if (!$this->has_more) { + return static::emptySearchResult($opts); + } + + $params = \array_merge( + $this->filters ?: [], + ['page' => $this->next_page], + $params ?: [] + ); + + return $this->all($params, $opts); + } + + /** + * Gets the first item from the current page. Returns `null` if the current page is empty. + * + * @return null|TStripeObject + */ + public function first() + { + return \count($this->data) > 0 ? $this->data[0] : null; + } + + /** + * Gets the last item from the current page. Returns `null` if the current page is empty. + * + * @return null|TStripeObject + */ + public function last() + { + return \count($this->data) > 0 ? $this->data[\count($this->data) - 1] : null; + } + + private function extractPathAndUpdateParams($params) + { + $url = \parse_url($this->url); + + if (!isset($url['path'])) { + throw new Exception\UnexpectedValueException("Could not parse list url into parts: {$url}"); + } + + if (isset($url['query'])) { + // If the URL contains a query param, parse it out into $params so they + // don't interact weirdly with each other. + $query = []; + \parse_str($url['query'], $query); + $params = \array_merge($params ?: [], $query); + } + + return [$url['path'], $params]; + } +} diff --git a/libraries/Stripe/lib/Service/AbstractService.php b/libraries/Stripe/lib/Service/AbstractService.php new file mode 100644 index 00000000000..e6c245daafe --- /dev/null +++ b/libraries/Stripe/lib/Service/AbstractService.php @@ -0,0 +1,105 @@ +client = $client; + $this->streamingClient = $client; + } + + /** + * Gets the client used by this service to send requests. + * + * @return \EDD\Vendor\Stripe\StripeClientInterface + */ + public function getClient() + { + return $this->client; + } + + /** + * Gets the client used by this service to send requests. + * + * @return \EDD\Vendor\Stripe\StripeStreamingClientInterface + */ + public function getStreamingClient() + { + return $this->streamingClient; + } + + /** + * Translate null values to empty strings. For service methods, + * we interpret null as a request to unset the field, which + * corresponds to sending an empty string for the field to the + * API. + * + * @param null|array $params + */ + private static function formatParams($params) + { + if (null === $params) { + return null; + } + \array_walk_recursive($params, function (&$value, $key) { + if (null === $value) { + $value = ''; + } + }); + + return $params; + } + + protected function request($method, $path, $params, $opts) + { + return $this->getClient()->request($method, $path, static::formatParams($params), $opts); + } + + protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts) + { + return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, static::formatParams($params), $opts); + } + + protected function requestCollection($method, $path, $params, $opts) + { + return $this->getClient()->requestCollection($method, $path, static::formatParams($params), $opts); + } + + protected function requestSearchResult($method, $path, $params, $opts) + { + return $this->getClient()->requestSearchResult($method, $path, static::formatParams($params), $opts); + } + + protected function buildPath($basePath, ...$ids) + { + foreach ($ids as $id) { + if (null === $id || '' === \trim($id)) { + $msg = 'The resource ID cannot be null or whitespace.'; + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException($msg); + } + } + + return \sprintf($basePath, ...\array_map('\urlencode', $ids)); + } +} diff --git a/libraries/Stripe/lib/Service/AbstractServiceFactory.php b/libraries/Stripe/lib/Service/AbstractServiceFactory.php new file mode 100644 index 00000000000..5b7c58dab20 --- /dev/null +++ b/libraries/Stripe/lib/Service/AbstractServiceFactory.php @@ -0,0 +1,59 @@ + */ + private $services; + + /** + * @param \EDD\Vendor\Stripe\StripeClientInterface $client + */ + public function __construct($client) + { + $this->client = $client; + $this->services = []; + } + + /** + * @param string $name + * + * @return null|string + */ + abstract protected function getServiceClass($name); + + /** + * @param string $name + * + * @return null|AbstractService|AbstractServiceFactory + */ + public function __get($name) + { + $serviceClass = $this->getServiceClass($name); + if (null !== $serviceClass) { + if (!\array_key_exists($name, $this->services)) { + $this->services[$name] = new $serviceClass($this->client); + } + + return $this->services[$name]; + } + + \trigger_error('Undefined property: ' . static::class . '::$' . $name); + + return null; + } +} diff --git a/libraries/Stripe/lib/Service/AccountLinkService.php b/libraries/Stripe/lib/Service/AccountLinkService.php new file mode 100644 index 00000000000..cb3c1853777 --- /dev/null +++ b/libraries/Stripe/lib/Service/AccountLinkService.php @@ -0,0 +1,25 @@ +request('post', '/v1/account_links', $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/AccountService.php b/libraries/Stripe/lib/Service/AccountService.php new file mode 100644 index 00000000000..d508cf8862f --- /dev/null +++ b/libraries/Stripe/lib/Service/AccountService.php @@ -0,0 +1,382 @@ +Connect. If you’re not a platform, the list is empty. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Account> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/accounts', $params, $opts); + } + + /** + * Returns a list of capabilities associated with the account. The capabilities are + * returned sorted by creation date, with the most recent capability appearing + * first. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Capability> + */ + public function allCapabilities($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/capabilities', $parentId), $params, $opts); + } + + /** + * List external accounts for an account. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card> + */ + public function allExternalAccounts($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts); + } + + /** + * Returns a list of people associated with the account’s legal entity. The people + * are returned sorted by creation date, with the most recent people appearing + * first. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Person> + */ + public function allPersons($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts); + } + + /** + * With Connect, you can create EDD\Vendor\Stripe accounts for + * your users. To do this, you’ll first need to register your + * platform. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Account + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/accounts', $params, $opts); + } + + /** + * Create an external account for a given account. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public function createExternalAccount($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts); + } + + /** + * Creates a single-use login link for an Express account to access their EDD\Vendor\Stripe + * dashboard. + * + * You may only create login links for Express accounts connected to your + * platform. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\LoginLink + */ + public function createLoginLink($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/login_links', $parentId), $params, $opts); + } + + /** + * Creates a new person. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public function createPerson($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts); + } + + /** + * With Connect, you can delete accounts you manage. + * + * Accounts created using test-mode keys can be deleted at any time. Standard + * accounts created using live-mode keys cannot be deleted. Custom or Express + * accounts created using live-mode keys can only be deleted once all balances are + * zero. + * + * If you want to delete your own account, use the account information tab in your + * account settings instead. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Account + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); + } + + /** + * Delete a specified external account for a given account. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public function deleteExternalAccount($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); + } + + /** + * Deletes an existing person’s relationship to the account’s legal entity. Any + * person with a relationship for an account can be deleted through the API, except + * if the person is the account_opener. If your integration is using + * the executive parameter, you cannot delete the only verified + * executive on file. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public function deletePerson($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + } + + /** + * With Connect, you may flag accounts as suspicious. + * + * Test-mode Custom and Express accounts can be rejected at any time. Accounts + * created using live-mode keys may only be rejected once all balances are zero. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Account + */ + public function reject($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/reject', $id), $params, $opts); + } + + /** + * Retrieves information about the specified Account Capability. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Capability + */ + public function retrieveCapability($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieve a specified external account for a given account. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public function retrieveExternalAccount($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves an existing person. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public function retrievePerson($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. + * Most parameters can be changed only for Custom accounts. (These are marked + * Custom Only below.) Parameters marked Custom and + * Express are not supported for Standard accounts. + * + * To update your own account, use the Dashboard. Refer to our Connect documentation to learn more + * about updating accounts. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Account + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); + } + + /** + * Updates an existing Account Capability. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Capability + */ + public function updateCapability($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates the metadata, account holder name, account holder type of a bank account + * belonging to a Custom account, and + * optionally sets it as the default for its currency. Other bank account details + * are not editable by design. + * + * You can re-enable a disabled bank account by performing an update call without + * providing any arguments or changes. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\Card + */ + public function updateExternalAccount($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates an existing person. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Person + */ + public function updatePerson($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves the details of an account. + * + * @param null|string $id + * @param null|array $params + * @param null|array|StripeUtilRequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Account + */ + public function retrieve($id = null, $params = null, $opts = null) + { + if (null === $id) { + return $this->request('get', '/v1/account', $params, $opts); + } + + return $this->request('get', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/ApplePayDomainService.php b/libraries/Stripe/lib/Service/ApplePayDomainService.php new file mode 100644 index 00000000000..47a15dec28f --- /dev/null +++ b/libraries/Stripe/lib/Service/ApplePayDomainService.php @@ -0,0 +1,70 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/apple_pay/domains', $params, $opts); + } + + /** + * Create an apple pay domain. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplePayDomain + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/apple_pay/domains', $params, $opts); + } + + /** + * Delete an apple pay domain. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplePayDomain + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts); + } + + /** + * Retrieve an apple pay domain. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplePayDomain + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/ApplicationFeeService.php b/libraries/Stripe/lib/Service/ApplicationFeeService.php new file mode 100644 index 00000000000..23d4e62e5b0 --- /dev/null +++ b/libraries/Stripe/lib/Service/ApplicationFeeService.php @@ -0,0 +1,125 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/application_fees', $params, $opts); + } + + /** + * You can see a list of the refunds belonging to a specific application fee. Note + * that the 10 most recent refunds are always available by default on the + * application fee object. If you need more than those 10, you can use this API + * method and the limit and starting_after parameters to + * page through additional refunds. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\ApplicationFeeRefund> + */ + public function allRefunds($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts); + } + + /** + * Refunds an application fee that has previously been collected but not yet + * refunded. Funds will be refunded to the EDD\Vendor\Stripe account from which the fee was + * originally collected. + * + * You can optionally refund only part of an application fee. You can do so + * multiple times, until the entire fee has been refunded. + * + * Once entirely refunded, an application fee can’t be refunded again. This method + * will raise an error when called on an already-refunded application fee, or when + * trying to refund more money than is left on an application fee. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplicationFeeRefund + */ + public function createRefund($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts); + } + + /** + * Retrieves the details of an application fee that your account has collected. The + * same information is returned when refunding the application fee. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplicationFee + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/application_fees/%s', $id), $params, $opts); + } + + /** + * By default, you can see the 10 most recent refunds stored directly on the + * application fee object, but you can also retrieve details about a specific + * refund stored on the application fee. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplicationFeeRefund + */ + public function retrieveRefund($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates the specified application fee refund by setting the values of the + * parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata as an argument. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ApplicationFeeRefund + */ + public function updateRefund($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/BalanceService.php b/libraries/Stripe/lib/Service/BalanceService.php new file mode 100644 index 00000000000..256fcbb2169 --- /dev/null +++ b/libraries/Stripe/lib/Service/BalanceService.php @@ -0,0 +1,26 @@ +Accounting + * for negative balances. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Balance + */ + public function retrieve($params = null, $opts = null) + { + return $this->request('get', '/v1/balance', $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/BalanceTransactionService.php b/libraries/Stripe/lib/Service/BalanceTransactionService.php new file mode 100644 index 00000000000..e2f4be99507 --- /dev/null +++ b/libraries/Stripe/lib/Service/BalanceTransactionService.php @@ -0,0 +1,47 @@ +/v1/balance/history. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\BalanceTransaction> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/balance_transactions', $params, $opts); + } + + /** + * Retrieves the balance transaction with the given ID. + * + * Note that this endpoint previously used the path + * /v1/balance/history/:id. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BalanceTransaction + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/balance_transactions/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/BillingPortal/BillingPortalServiceFactory.php b/libraries/Stripe/lib/Service/BillingPortal/BillingPortalServiceFactory.php new file mode 100644 index 00000000000..35910d57f43 --- /dev/null +++ b/libraries/Stripe/lib/Service/BillingPortal/BillingPortalServiceFactory.php @@ -0,0 +1,27 @@ + + */ + private static $classMap = [ + 'configurations' => ConfigurationService::class, + 'sessions' => SessionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/BillingPortal/ConfigurationService.php b/libraries/Stripe/lib/Service/BillingPortal/ConfigurationService.php new file mode 100644 index 00000000000..eff8c6b30b3 --- /dev/null +++ b/libraries/Stripe/lib/Service/BillingPortal/ConfigurationService.php @@ -0,0 +1,73 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/billing_portal/configurations', $params, $opts); + } + + /** + * Creates a configuration that describes the functionality and behavior of a + * PortalSession. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BillingPortal\Configuration + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/billing_portal/configurations', $params, $opts); + } + + /** + * Retrieves a configuration that describes the functionality of the customer + * portal. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BillingPortal\Configuration + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/billing_portal/configurations/%s', $id), $params, $opts); + } + + /** + * Updates a configuration that describes the functionality of the customer portal. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\BillingPortal\Configuration + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/billing_portal/configurations/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/BillingPortal/SessionService.php b/libraries/Stripe/lib/Service/BillingPortal/SessionService.php new file mode 100644 index 00000000000..2819ab39682 --- /dev/null +++ b/libraries/Stripe/lib/Service/BillingPortal/SessionService.php @@ -0,0 +1,23 @@ +request('post', '/v1/billing_portal/sessions', $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/ChargeService.php b/libraries/Stripe/lib/Service/ChargeService.php new file mode 100644 index 00000000000..0f983d0a5a7 --- /dev/null +++ b/libraries/Stripe/lib/Service/ChargeService.php @@ -0,0 +1,122 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/charges', $params, $opts); + } + + /** + * Capture the payment of an existing, uncaptured, charge. This is the second half + * of the two-step payment flow, where first you created a + * charge with the capture option set to false. + * + * Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured + * by that point in time, they will be marked as refunded and will no longer be + * capturable. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Charge + */ + public function capture($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/charges/%s/capture', $id), $params, $opts); + } + + /** + * To charge a credit card or other payment source, you create a + * Charge object. If your API key is in test mode, the supplied + * payment source (e.g., card) won’t actually be charged, although everything else + * will occur as if in live mode. (EDD\Vendor\Stripe assumes that the charge would have + * completed successfully). + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Charge + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/charges', $params, $opts); + } + + /** + * Retrieves the details of a charge that has previously been created. Supply the + * unique charge ID that was returned from your previous request, and EDD\Vendor\Stripe will + * return the corresponding charge information. The same information is returned + * when creating or refunding the charge. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Charge + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/charges/%s', $id), $params, $opts); + } + + /** + * Search for charges you’ve previously created using Stripe’s Search Query Language. Don’t use + * search in read-after-write flows where strict consistency is necessary. Under + * normal operating conditions, data is searchable in less than a minute. + * Occasionally, propagation of new or updated data can be up to an hour behind + * during outages. Search functionality is not available to merchants in India. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult<\EDD\Vendor\Stripe\Charge> + */ + public function search($params = null, $opts = null) + { + return $this->requestSearchResult('get', '/v1/charges/search', $params, $opts); + } + + /** + * Updates the specified charge by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Charge + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/charges/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Checkout/CheckoutServiceFactory.php b/libraries/Stripe/lib/Service/Checkout/CheckoutServiceFactory.php new file mode 100644 index 00000000000..e885efb26ca --- /dev/null +++ b/libraries/Stripe/lib/Service/Checkout/CheckoutServiceFactory.php @@ -0,0 +1,25 @@ + + */ + private static $classMap = [ + 'sessions' => SessionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/Checkout/SessionService.php b/libraries/Stripe/lib/Service/Checkout/SessionService.php new file mode 100644 index 00000000000..57e7f12330e --- /dev/null +++ b/libraries/Stripe/lib/Service/Checkout/SessionService.php @@ -0,0 +1,92 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/checkout/sessions', $params, $opts); + } + + /** + * When retrieving a Checkout Session, there is an includable + * line_items property containing the first handful of those + * items. There is also a URL where you can retrieve the full (paginated) list of + * line items. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\LineItem> + */ + public function allLineItems($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/checkout/sessions/%s/line_items', $parentId), $params, $opts); + } + + /** + * Creates a Session object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Checkout\Session + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/checkout/sessions', $params, $opts); + } + + /** + * A Session can be expired when it is in one of these statuses: open. + * + * After it expires, a customer can’t complete a Session and customers loading the + * Session see a message saying the Session is expired. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Checkout\Session + */ + public function expire($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/checkout/sessions/%s/expire', $id), $params, $opts); + } + + /** + * Retrieves a Session object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Checkout\Session + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/CoreServiceFactory.php b/libraries/Stripe/lib/Service/CoreServiceFactory.php new file mode 100644 index 00000000000..bcd7c110cc1 --- /dev/null +++ b/libraries/Stripe/lib/Service/CoreServiceFactory.php @@ -0,0 +1,139 @@ + + */ + private static $classMap = [ + 'accountLinks' => AccountLinkService::class, + 'accounts' => AccountService::class, + 'applePayDomains' => ApplePayDomainService::class, + 'applicationFees' => ApplicationFeeService::class, + 'balance' => BalanceService::class, + 'balanceTransactions' => BalanceTransactionService::class, + 'billingPortal' => BillingPortal\BillingPortalServiceFactory::class, + 'charges' => ChargeService::class, + 'checkout' => Checkout\CheckoutServiceFactory::class, + 'countrySpecs' => CountrySpecService::class, + 'coupons' => CouponService::class, + 'creditNotes' => CreditNoteService::class, + 'customers' => CustomerService::class, + 'disputes' => DisputeService::class, + 'ephemeralKeys' => EphemeralKeyService::class, + 'events' => EventService::class, + 'exchangeRates' => ExchangeRateService::class, + 'fileLinks' => FileLinkService::class, + 'files' => FileService::class, + 'financialConnections' => FinancialConnections\FinancialConnectionsServiceFactory::class, + 'identity' => Identity\IdentityServiceFactory::class, + 'invoiceItems' => InvoiceItemService::class, + 'invoices' => InvoiceService::class, + 'issuing' => Issuing\IssuingServiceFactory::class, + 'mandates' => MandateService::class, + 'oauth' => OAuthService::class, + 'orderReturns' => OrderReturnService::class, + 'orders' => OrderService::class, + 'paymentIntents' => PaymentIntentService::class, + 'paymentLinks' => PaymentLinkService::class, + 'paymentMethods' => PaymentMethodService::class, + 'payouts' => PayoutService::class, + 'plans' => PlanService::class, + 'prices' => PriceService::class, + 'products' => ProductService::class, + 'promotionCodes' => PromotionCodeService::class, + 'quotes' => QuoteService::class, + 'radar' => Radar\RadarServiceFactory::class, + 'refunds' => RefundService::class, + 'reporting' => Reporting\ReportingServiceFactory::class, + 'reviews' => ReviewService::class, + 'setupAttempts' => SetupAttemptService::class, + 'setupIntents' => SetupIntentService::class, + 'shippingRates' => ShippingRateService::class, + 'sigma' => Sigma\SigmaServiceFactory::class, + 'skus' => SkuService::class, + 'sources' => SourceService::class, + 'subscriptionItems' => SubscriptionItemService::class, + 'subscriptions' => SubscriptionService::class, + 'subscriptionSchedules' => SubscriptionScheduleService::class, + 'taxCodes' => TaxCodeService::class, + 'taxRates' => TaxRateService::class, + 'terminal' => Terminal\TerminalServiceFactory::class, + 'testHelpers' => TestHelpers\TestHelpersServiceFactory::class, + 'tokens' => TokenService::class, + 'topups' => TopupService::class, + 'transfers' => TransferService::class, + 'webhookEndpoints' => WebhookEndpointService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/CountrySpecService.php b/libraries/Stripe/lib/Service/CountrySpecService.php new file mode 100644 index 00000000000..197183f5e70 --- /dev/null +++ b/libraries/Stripe/lib/Service/CountrySpecService.php @@ -0,0 +1,39 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/country_specs', $params, $opts); + } + + /** + * Returns a Country Spec for a given Country code. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CountrySpec + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/country_specs/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/CouponService.php b/libraries/Stripe/lib/Service/CouponService.php new file mode 100644 index 00000000000..b15d1a7e907 --- /dev/null +++ b/libraries/Stripe/lib/Service/CouponService.php @@ -0,0 +1,104 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/coupons', $params, $opts); + } + + /** + * You can create coupons easily via the coupon management page of the + * EDD\Vendor\Stripe dashboard. Coupon creation is also accessible via the API if you need to + * create coupons on the fly. + * + * A coupon has either a percent_off or an amount_off and + * currency. If you set an amount_off, that amount will + * be subtracted from any invoice’s subtotal. For example, an invoice with a + * subtotal of 100 will have a final total of + * 0 if a coupon with an amount_off of + * 200 is applied to it and an invoice with a subtotal of + * 300 will have a final total of 100 if + * a coupon with an amount_off of 200 is applied to + * it. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Coupon + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/coupons', $params, $opts); + } + + /** + * You can delete coupons via the coupon management page of the + * EDD\Vendor\Stripe dashboard. However, deleting a coupon does not affect any customers who + * have already applied the coupon; it means that new customers can’t redeem the + * coupon. You can also delete coupons via the API. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Coupon + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); + } + + /** + * Retrieves the coupon with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Coupon + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); + } + + /** + * Updates the metadata of a coupon. Other coupon details (currency, duration, + * amount_off) are, by design, not editable. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Coupon + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/CreditNoteService.php b/libraries/Stripe/lib/Service/CreditNoteService.php new file mode 100644 index 00000000000..941c0d732b0 --- /dev/null +++ b/libraries/Stripe/lib/Service/CreditNoteService.php @@ -0,0 +1,156 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/credit_notes', $params, $opts); + } + + /** + * When retrieving a credit note, you’ll get a lines property + * containing the the first handful of those items. There is also a URL where you + * can retrieve the full (paginated) list of line items. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\CreditNoteLineItem> + */ + public function allLines($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/credit_notes/%s/lines', $parentId), $params, $opts); + } + + /** + * Issue a credit note to adjust the amount of a finalized invoice. For a + * status=open invoice, a credit note reduces its + * amount_due. For a status=paid invoice, a credit note + * does not affect its amount_due. Instead, it can result in any + * combination of the following:. + * + *
    • Refund: create a new refund (using refund_amount) or link + * an existing refund (using refund).
    • Customer balance + * credit: credit the customer’s balance (using credit_amount) which + * will be automatically applied to their next invoice when it’s finalized.
    • + *
    • Outside of EDD\Vendor\Stripe credit: record the amount that is or will be credited + * outside of EDD\Vendor\Stripe (using out_of_band_amount).
    + * + * For post-payment credit notes the sum of the refund, credit and outside of + * EDD\Vendor\Stripe amounts must equal the credit note total. + * + * You may issue multiple credit notes for an invoice. Each credit note will + * increment the invoice’s pre_payment_credit_notes_amount or + * post_payment_credit_notes_amount depending on its + * status at the time of credit note creation. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CreditNote + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/credit_notes', $params, $opts); + } + + /** + * Get a preview of a credit note without creating it. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CreditNote + */ + public function preview($params = null, $opts = null) + { + return $this->request('get', '/v1/credit_notes/preview', $params, $opts); + } + + /** + * When retrieving a credit note preview, you’ll get a lines + * property containing the first handful of those items. This URL you can retrieve + * the full (paginated) list of line items. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\CreditNote> + */ + public function previewLines($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/credit_notes/preview/lines', $params, $opts); + } + + /** + * Retrieves the credit note object with the given identifier. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CreditNote + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); + } + + /** + * Updates an existing credit note. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CreditNote + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); + } + + /** + * Marks a credit note as void. Learn more about voiding credit notes. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CreditNote + */ + public function voidCreditNote($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/credit_notes/%s/void', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/CustomerService.php b/libraries/Stripe/lib/Service/CustomerService.php new file mode 100644 index 00000000000..4b9fef21424 --- /dev/null +++ b/libraries/Stripe/lib/Service/CustomerService.php @@ -0,0 +1,440 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/customers', $params, $opts); + } + + /** + * Returns a list of transactions that updated the customer’s balances. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\CustomerBalanceTransaction> + */ + public function allBalanceTransactions($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts); + } + + /** + * Returns a list of PaymentMethods for a given Customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Customer> + */ + public function allPaymentMethods($id, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/payment_methods', $id), $params, $opts); + } + + /** + * List sources for a specified customer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source> + */ + public function allSources($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts); + } + + /** + * Returns a list of tax IDs for a customer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TaxId> + */ + public function allTaxIds($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts); + } + + /** + * Creates a new customer object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Customer + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/customers', $params, $opts); + } + + /** + * Creates an immutable transaction that updates the customer’s credit balance. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CustomerBalanceTransaction + */ + public function createBalanceTransaction($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts); + } + + /** + * Retrieve funding instructions for a customer cash balance. If funding + * instructions do not yet exist for the customer, new funding instructions will be + * created. If funding instructions have already been created for a given customer, + * the same funding instructions will be retrieved. In other words, we will return + * the same funding instructions each time. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Customer + */ + public function createFundingInstructions($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/funding_instructions', $id), $params, $opts); + } + + /** + * When you create a new credit card, you must specify a customer or recipient on + * which to create it. + * + * If the card’s owner has no default card, then the new card will become the + * default. However, if the owner already has a default, then it will not change. + * To change the default, you should update the + * customer to have a new default_source. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public function createSource($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts); + } + + /** + * Creates a new TaxID object for a customer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxId + */ + public function createTaxId($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts); + } + + /** + * Permanently deletes a customer. It cannot be undone. Also immediately cancels + * any active subscriptions on the customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Customer + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s', $id), $params, $opts); + } + + /** + * Removes the currently applied discount on a customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Customer + */ + public function deleteDiscount($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/discount', $id), $params, $opts); + } + + /** + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public function deleteSource($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * Deletes an existing TaxID object. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxId + */ + public function deleteTaxId($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves a Customer object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Customer + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s', $id), $params, $opts); + } + + /** + * Retrieves a specific customer balance transaction that updated the customer’s balances. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CustomerBalanceTransaction + */ + public function retrieveBalanceTransaction($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves a customer’s cash balance. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\cash_balance + */ + public function retrieveCashBalance($parentId, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts); + } + + /** + * Retrieve a specified source for a given customer. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public function retrieveSource($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves the TaxID object with the given identifier. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxId + */ + public function retrieveTaxId($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts); + } + + /** + * Search for customers you’ve previously created using Stripe’s Search Query Language. Don’t use + * search in read-after-write flows where strict consistency is necessary. Under + * normal operating conditions, data is searchable in less than a minute. + * Occasionally, propagation of new or updated data can be up to an hour behind + * during outages. Search functionality is not available to merchants in India. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult<\EDD\Vendor\Stripe\Customer> + */ + public function search($params = null, $opts = null) + { + return $this->requestSearchResult('get', '/v1/customers/search', $params, $opts); + } + + /** + * Updates the specified customer by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged. For example, if you pass the + * source parameter, that becomes the customer’s active source + * (e.g., a card) to be used for all charges in the future. When you update a + * customer to a new valid card source by passing the source + * parameter: for each of the customer’s current subscriptions, if the subscription + * bills automatically and is in the past_due state, then the latest + * open invoice for the subscription with automatic collection enabled will be + * retried. This retry will not count as an automatic retry, and will not affect + * the next regularly scheduled payment for the invoice. Changing the + * default_source for a customer will not trigger this behavior. + * + * This request accepts mostly the same arguments as the customer creation call. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Customer + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s', $id), $params, $opts); + } + + /** + * Most credit balance transaction fields are immutable, but you may update its + * description and metadata. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\CustomerBalanceTransaction + */ + public function updateBalanceTransaction($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates a customer’s cash balance. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\cash_balance + */ + public function updateCashBalance($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts); + } + + /** + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public function updateSource($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source + */ + public function verifySource($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s/verify', $parentId, $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/DisputeService.php b/libraries/Stripe/lib/Service/DisputeService.php new file mode 100644 index 00000000000..eccd3df4fab --- /dev/null +++ b/libraries/Stripe/lib/Service/DisputeService.php @@ -0,0 +1,83 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/disputes', $params, $opts); + } + + /** + * Closing the dispute for a charge indicates that you do not have any evidence to + * submit and are essentially dismissing the dispute, acknowledging it as lost. + * + * The status of the dispute will change from needs_response to + * lost. Closing a dispute is irreversible. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Dispute + */ + public function close($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/disputes/%s/close', $id), $params, $opts); + } + + /** + * Retrieves the dispute with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Dispute + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/disputes/%s', $id), $params, $opts); + } + + /** + * When you get a dispute, contacting your customer is always the best first step. + * If that doesn’t work, you can submit evidence to help us resolve the dispute in + * your favor. You can do this in your dashboard, but if you prefer, + * you can use the API to submit evidence programmatically. + * + * Depending on your dispute type, different evidence fields will give you a better + * chance of winning your dispute. To figure out which evidence fields to provide, + * see our guide to dispute types. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Dispute + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/disputes/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/EphemeralKeyService.php b/libraries/Stripe/lib/Service/EphemeralKeyService.php new file mode 100644 index 00000000000..925dd70271f --- /dev/null +++ b/libraries/Stripe/lib/Service/EphemeralKeyService.php @@ -0,0 +1,43 @@ +request('delete', $this->buildPath('/v1/ephemeral_keys/%s', $id), $params, $opts); + } + + /** + * Creates a short-lived API key for a given resource. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\EphemeralKey + */ + public function create($params = null, $opts = null) + { + if (!$opts || !isset($opts['stripe_version'])) { + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key'); + } + + return $this->request('post', '/v1/ephemeral_keys', $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/EventService.php b/libraries/Stripe/lib/Service/EventService.php new file mode 100644 index 00000000000..3a933d89c64 --- /dev/null +++ b/libraries/Stripe/lib/Service/EventService.php @@ -0,0 +1,44 @@ +event object api_version + * attribute (not according to your current EDD\Vendor\Stripe API version or + * Stripe-Version header). + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Event> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/events', $params, $opts); + } + + /** + * Retrieves the details of an event. Supply the unique identifier of the event, + * which you might have received in a webhook. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Event + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/events/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/ExchangeRateService.php b/libraries/Stripe/lib/Service/ExchangeRateService.php new file mode 100644 index 00000000000..d7c9d9894e1 --- /dev/null +++ b/libraries/Stripe/lib/Service/ExchangeRateService.php @@ -0,0 +1,41 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/exchange_rates', $params, $opts); + } + + /** + * Retrieves the exchange rates from the given currency to every supported + * currency. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ExchangeRate + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/exchange_rates/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/FileLinkService.php b/libraries/Stripe/lib/Service/FileLinkService.php new file mode 100644 index 00000000000..5325fe1e0b6 --- /dev/null +++ b/libraries/Stripe/lib/Service/FileLinkService.php @@ -0,0 +1,70 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/file_links', $params, $opts); + } + + /** + * Creates a new file link object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FileLink + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/file_links', $params, $opts); + } + + /** + * Retrieves the file link with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FileLink + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/file_links/%s', $id), $params, $opts); + } + + /** + * Updates an existing file link object. Expired links can no longer be updated. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FileLink + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/file_links/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/FileService.php b/libraries/Stripe/lib/Service/FileService.php new file mode 100644 index 00000000000..3b53a15f575 --- /dev/null +++ b/libraries/Stripe/lib/Service/FileService.php @@ -0,0 +1,66 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/files', $params, $opts); + } + + /** + * Retrieves the details of an existing file object. Supply the unique file ID from + * a file, and EDD\Vendor\Stripe will return the corresponding file object. To access file + * contents, see the File Upload + * Guide. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\File + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/files/%s', $id), $params, $opts); + } + + /** + * Create a file. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @return \EDD\Vendor\Stripe\File + */ + public function create($params = null, $opts = null) + { + $opts = \EDD\Vendor\Stripe\Util\RequestOptions::parse($opts); + if (!isset($opts->apiBase)) { + $opts->apiBase = $this->getClient()->getFilesBase(); + } + + // Manually flatten params, otherwise curl's multipart encoder will + // choke on nested null|arrays. + $flatParams = \array_column(\EDD\Vendor\Stripe\Util\Util::flattenParams($params), 1, 0); + + return $this->request('post', '/v1/files', $flatParams, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/FinancialConnections/AccountService.php b/libraries/Stripe/lib/Service/FinancialConnections/AccountService.php new file mode 100644 index 00000000000..8b354a8f88c --- /dev/null +++ b/libraries/Stripe/lib/Service/FinancialConnections/AccountService.php @@ -0,0 +1,58 @@ +Account. You will + * no longer be able to access data associated with the account (e.g. balances, + * transactions). + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FinancialConnections\Account + */ + public function disconnect($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/disconnect', $id), $params, $opts); + } + + /** + * Refreshes the data associated with a Financial Connections Account. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FinancialConnections\Account + */ + public function refresh($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/refresh', $id), $params, $opts); + } + + /** + * Retrieves the details of an Financial Connections Account. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FinancialConnections\Account + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/financial_connections/accounts/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php b/libraries/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php new file mode 100644 index 00000000000..59f40aa029a --- /dev/null +++ b/libraries/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php @@ -0,0 +1,27 @@ + + */ + private static $classMap = [ + 'accounts' => AccountService::class, + 'sessions' => SessionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/FinancialConnections/SessionService.php b/libraries/Stripe/lib/Service/FinancialConnections/SessionService.php new file mode 100644 index 00000000000..ce6262fa12c --- /dev/null +++ b/libraries/Stripe/lib/Service/FinancialConnections/SessionService.php @@ -0,0 +1,41 @@ +Session. The session’s client_secret can be used to + * launch the flow using Stripe.js. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FinancialConnections\Session + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/financial_connections/sessions', $params, $opts); + } + + /** + * Retrieves the details of a Financial Connections Session. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\FinancialConnections\Session + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/financial_connections/sessions/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Identity/IdentityServiceFactory.php b/libraries/Stripe/lib/Service/Identity/IdentityServiceFactory.php new file mode 100644 index 00000000000..b21cae0f4bd --- /dev/null +++ b/libraries/Stripe/lib/Service/Identity/IdentityServiceFactory.php @@ -0,0 +1,27 @@ + + */ + private static $classMap = [ + 'verificationReports' => VerificationReportService::class, + 'verificationSessions' => VerificationSessionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/Identity/VerificationReportService.php b/libraries/Stripe/lib/Service/Identity/VerificationReportService.php new file mode 100644 index 00000000000..ca2a843e6b4 --- /dev/null +++ b/libraries/Stripe/lib/Service/Identity/VerificationReportService.php @@ -0,0 +1,39 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/identity/verification_reports', $params, $opts); + } + + /** + * Retrieves an existing VerificationReport. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationReport + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/identity/verification_reports/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Identity/VerificationSessionService.php b/libraries/Stripe/lib/Service/Identity/VerificationSessionService.php new file mode 100644 index 00000000000..d6eeac4883f --- /dev/null +++ b/libraries/Stripe/lib/Service/Identity/VerificationSessionService.php @@ -0,0 +1,146 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/identity/verification_sessions', $params, $opts); + } + + /** + * A VerificationSession object can be canceled when it is in + * requires_input status. + * + * Once canceled, future submission attempts are disabled. This cannot be undone. + * Learn more. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationSession + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s/cancel', $id), $params, $opts); + } + + /** + * Creates a VerificationSession object. + * + * After the VerificationSession is created, display a verification modal using the + * session client_secret or send your users to the session’s + * url. + * + * If your API key is in test mode, verification checks won’t actually process, + * though everything else will occur as if in live mode. + * + * Related guide: Verify your + * users’ identity documents. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationSession + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/identity/verification_sessions', $params, $opts); + } + + /** + * Redact a VerificationSession to remove all collected information from Stripe. + * This will redact the VerificationSession and all objects related to it, + * including VerificationReports, Events, request logs, etc. + * + * A VerificationSession object can be redacted when it is in + * requires_input or verified status. Redacting a + * VerificationSession in requires_action state will automatically + * cancel it. + * + * The redaction process may take up to four days. When the redaction process is in + * progress, the VerificationSession’s redaction.status field will be + * set to processing; when the process is finished, it will change to + * redacted and an identity.verification_session.redacted + * event will be emitted. + * + * Redaction is irreversible. Redacted objects are still accessible in the EDD\Vendor\Stripe + * API, but all the fields that contain personal data will be replaced by the + * string [redacted] or a similar placeholder. The + * metadata field will also be erased. Redacted objects cannot be + * updated or used for any purpose. + * + * Learn more. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationSession + */ + public function redact($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s/redact', $id), $params, $opts); + } + + /** + * Retrieves the details of a VerificationSession that was previously created. + * + * When the session status is requires_input, you can use this method + * to retrieve a valid client_secret or url to allow + * re-submission. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationSession + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/identity/verification_sessions/%s', $id), $params, $opts); + } + + /** + * Updates a VerificationSession object. + * + * When the session status is requires_input, you can use this method + * to update the verification check and options. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Identity\VerificationSession + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/InvoiceItemService.php b/libraries/Stripe/lib/Service/InvoiceItemService.php new file mode 100644 index 00000000000..2340021c117 --- /dev/null +++ b/libraries/Stripe/lib/Service/InvoiceItemService.php @@ -0,0 +1,93 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/invoiceitems', $params, $opts); + } + + /** + * Creates an item to be added to a draft invoice (up to 250 items per invoice). If + * no invoice is specified, the item will be on the next invoice created for the + * customer specified. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\InvoiceItem + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/invoiceitems', $params, $opts); + } + + /** + * Deletes an invoice item, removing it from an invoice. Deleting invoice items is + * only possible when they’re not attached to invoices, or if it’s attached to a + * draft invoice. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\InvoiceItem + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts); + } + + /** + * Retrieves the invoice item with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\InvoiceItem + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts); + } + + /** + * Updates the amount or description of an invoice item on an upcoming invoice. + * Updating an invoice item is only possible before the invoice it’s attached to is + * closed. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\InvoiceItem + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/InvoiceService.php b/libraries/Stripe/lib/Service/InvoiceService.php new file mode 100644 index 00000000000..42c6245943c --- /dev/null +++ b/libraries/Stripe/lib/Service/InvoiceService.php @@ -0,0 +1,292 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/invoices', $params, $opts); + } + + /** + * When retrieving an invoice, you’ll get a lines property + * containing the total count of line items and the first handful of those items. + * There is also a URL where you can retrieve the full (paginated) list of line + * items. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\LineItem> + */ + public function allLines($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/invoices/%s/lines', $parentId), $params, $opts); + } + + /** + * This endpoint creates a draft invoice for a given customer. The draft invoice + * created pulls in all pending invoice items on that customer, including + * prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to + * your customers. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/invoices', $params, $opts); + } + + /** + * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to + * delete invoices that are no longer in a draft state will fail; once an invoice + * has been finalized or if an invoice is for a subscription, it must be voided. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/invoices/%s', $id), $params, $opts); + } + + /** + * EDD\Vendor\Stripe automatically finalizes drafts before sending and attempting payment on + * invoices. However, if you’d like to finalize a draft invoice manually, you can + * do so using this method. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function finalizeInvoice($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/finalize', $id), $params, $opts); + } + + /** + * Marking an invoice as uncollectible is useful for keeping track of bad debts + * that can be written off for accounting purposes. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function markUncollectible($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/mark_uncollectible', $id), $params, $opts); + } + + /** + * EDD\Vendor\Stripe automatically creates and then attempts to collect payment on invoices + * for customers on subscriptions according to your subscriptions + * settings. However, if you’d like to attempt payment on an invoice out of the + * normal collection schedule or for some other reason, you can do so. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function pay($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/pay', $id), $params, $opts); + } + + /** + * Retrieves the invoice with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/invoices/%s', $id), $params, $opts); + } + + /** + * Search for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use + * search in read-after-write flows where strict consistency is necessary. Under + * normal operating conditions, data is searchable in less than a minute. + * Occasionally, propagation of new or updated data can be up to an hour behind + * during outages. Search functionality is not available to merchants in India. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult<\EDD\Vendor\Stripe\Invoice> + */ + public function search($params = null, $opts = null) + { + return $this->requestSearchResult('get', '/v1/invoices/search', $params, $opts); + } + + /** + * EDD\Vendor\Stripe will automatically send invoices to customers according to your subscriptions + * settings. However, if you’d like to manually send an invoice to your + * customer out of the normal schedule, you can do so. When sending invoices that + * have already been paid, there will be no reference to the payment in the email. + * + * Requests made in test-mode result in no emails being sent, despite sending an + * invoice.sent event. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function sendInvoice($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/send', $id), $params, $opts); + } + + /** + * At any time, you can preview the upcoming invoice for a customer. This will show + * you all the charges that are pending, including subscription renewal charges, + * invoice item charges, etc. It will also show you any discounts that are + * applicable to the invoice. + * + * Note that when you are viewing an upcoming invoice, you are simply viewing a + * preview – the invoice has not yet been created. As such, the upcoming invoice + * will not show up in invoice listing calls, and you cannot use the API to pay or + * edit the invoice. If you want to change the amount that your customer will be + * billed, you can add, remove, or update pending invoice items, or update the + * customer’s discount. + * + * You can preview the effects of updating a subscription, including a preview of + * what proration will take place. To ensure that the actual proration is + * calculated exactly the same as the previewed proration, you should pass a + * proration_date parameter when doing the actual subscription update. + * The value passed in should be the same as the + * subscription_proration_date returned on the upcoming invoice + * resource. The recommended way to get only the prorations being previewed is to + * consider only proration line items where period[start] is equal to + * the subscription_proration_date on the upcoming invoice resource. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function upcoming($params = null, $opts = null) + { + return $this->request('get', '/v1/invoices/upcoming', $params, $opts); + } + + /** + * When retrieving an upcoming invoice, you’ll get a lines + * property containing the total count of line items and the first handful of those + * items. There is also a URL where you can retrieve the full (paginated) list of + * line items. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Invoice> + */ + public function upcomingLines($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/invoices/upcoming/lines', $params, $opts); + } + + /** + * Draft invoices are fully editable. Once an invoice is finalized, monetary values, + * as well as collection_method, become uneditable. + * + * If you would like to stop the EDD\Vendor\Stripe Billing engine from automatically + * finalizing, reattempting payments on, sending reminders for, or automatically reconciling + * invoices, pass auto_advance=false. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s', $id), $params, $opts); + } + + /** + * Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is + * similar to deletion, however it only applies to + * finalized invoices and maintains a papertrail where the invoice can still be + * found. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Invoice + */ + public function voidInvoice($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/void', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Issuing/AuthorizationService.php b/libraries/Stripe/lib/Service/Issuing/AuthorizationService.php new file mode 100644 index 00000000000..1933a2c37cb --- /dev/null +++ b/libraries/Stripe/lib/Service/Issuing/AuthorizationService.php @@ -0,0 +1,97 @@ +Authorization objects. The objects are + * sorted in descending order by creation date, with the most recently created + * object appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Issuing\Authorization> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/authorizations', $params, $opts); + } + + /** + * Approves a pending Issuing Authorization object. This request + * should be made within the timeout window of the real-time + * authorization flow. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Authorization + */ + public function approve($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s/approve', $id), $params, $opts); + } + + /** + * Declines a pending Issuing Authorization object. This request + * should be made within the timeout window of the real time + * authorization flow. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Authorization + */ + public function decline($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s/decline', $id), $params, $opts); + } + + /** + * Retrieves an Issuing Authorization object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Authorization + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/authorizations/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing Authorization object by setting the + * values of the parameters passed. Any parameters not provided will be left + * unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Authorization + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Issuing/CardService.php b/libraries/Stripe/lib/Service/Issuing/CardService.php new file mode 100644 index 00000000000..fed7f3752ef --- /dev/null +++ b/libraries/Stripe/lib/Service/Issuing/CardService.php @@ -0,0 +1,73 @@ +Card objects. The objects are sorted in + * descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Issuing\Card> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/cards', $params, $opts); + } + + /** + * Creates an Issuing Card object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Card + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/issuing/cards', $params, $opts); + } + + /** + * Retrieves an Issuing Card object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Card + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/cards/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing Card object by setting the values of + * the parameters passed. Any parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Card + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/cards/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Issuing/CardholderService.php b/libraries/Stripe/lib/Service/Issuing/CardholderService.php new file mode 100644 index 00000000000..536c1677314 --- /dev/null +++ b/libraries/Stripe/lib/Service/Issuing/CardholderService.php @@ -0,0 +1,74 @@ +Cardholder objects. The objects are + * sorted in descending order by creation date, with the most recently created + * object appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Issuing\Cardholder> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/cardholders', $params, $opts); + } + + /** + * Creates a new Issuing Cardholder object that can be issued cards. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Cardholder + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/issuing/cardholders', $params, $opts); + } + + /** + * Retrieves an Issuing Cardholder object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Cardholder + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/cardholders/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing Cardholder object by setting the + * values of the parameters passed. Any parameters not provided will be left + * unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Cardholder + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/cardholders/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Issuing/DisputeService.php b/libraries/Stripe/lib/Service/Issuing/DisputeService.php new file mode 100644 index 00000000000..2edd7173c29 --- /dev/null +++ b/libraries/Stripe/lib/Service/Issuing/DisputeService.php @@ -0,0 +1,99 @@ +Dispute objects. The objects are sorted + * in descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Issuing\Dispute> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/disputes', $params, $opts); + } + + /** + * Creates an Issuing Dispute object. Individual pieces of evidence + * within the evidence object are optional at this point. EDD\Vendor\Stripe only + * validates that required evidence is present during submission. Refer to Dispute + * reasons and evidence for more details about evidence requirements. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Dispute + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/issuing/disputes', $params, $opts); + } + + /** + * Retrieves an Issuing Dispute object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Dispute + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/disputes/%s', $id), $params, $opts); + } + + /** + * Submits an Issuing Dispute to the card network. EDD\Vendor\Stripe validates + * that all evidence fields required for the dispute’s reason are present. For more + * details, see Dispute + * reasons and evidence. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Dispute + */ + public function submit($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/disputes/%s/submit', $id), $params, $opts); + } + + /** + * Updates the specified Issuing Dispute object by setting the values + * of the parameters passed. Any parameters not provided will be left unchanged. + * Properties on the evidence object can be unset by passing in an + * empty string. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Dispute + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/disputes/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Issuing/IssuingServiceFactory.php b/libraries/Stripe/lib/Service/Issuing/IssuingServiceFactory.php new file mode 100644 index 00000000000..509ebd69efe --- /dev/null +++ b/libraries/Stripe/lib/Service/Issuing/IssuingServiceFactory.php @@ -0,0 +1,33 @@ + + */ + private static $classMap = [ + 'authorizations' => AuthorizationService::class, + 'cardholders' => CardholderService::class, + 'cards' => CardService::class, + 'disputes' => DisputeService::class, + 'transactions' => TransactionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/Issuing/TransactionService.php b/libraries/Stripe/lib/Service/Issuing/TransactionService.php new file mode 100644 index 00000000000..4d423199fd0 --- /dev/null +++ b/libraries/Stripe/lib/Service/Issuing/TransactionService.php @@ -0,0 +1,59 @@ +Transaction objects. The objects are + * sorted in descending order by creation date, with the most recently created + * object appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Issuing\Transaction> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/transactions', $params, $opts); + } + + /** + * Retrieves an Issuing Transaction object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Transaction + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing Transaction object by setting the + * values of the parameters passed. Any parameters not provided will be left + * unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Issuing\Transaction + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/MandateService.php b/libraries/Stripe/lib/Service/MandateService.php new file mode 100644 index 00000000000..5bba323068b --- /dev/null +++ b/libraries/Stripe/lib/Service/MandateService.php @@ -0,0 +1,24 @@ +request('get', $this->buildPath('/v1/mandates/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/OAuthService.php b/libraries/Stripe/lib/Service/OAuthService.php new file mode 100644 index 00000000000..5e255fdff27 --- /dev/null +++ b/libraries/Stripe/lib/Service/OAuthService.php @@ -0,0 +1,150 @@ +_parseOpts($opts); + $opts->apiBase = $this->_getBase($opts); + + return $this->request($method, $path, $params, $opts); + } + + /** + * Generates a URL to Stripe's OAuth form. + * + * @param null|array $params + * @param null|array $opts + * + * @return string the URL to Stripe's OAuth form + */ + public function authorizeUrl($params = null, $opts = null) + { + $params = $params ?: []; + + $opts = $this->_parseOpts($opts); + $base = $this->_getBase($opts); + + $params['client_id'] = $this->_getClientId($params); + if (!\array_key_exists('response_type', $params)) { + $params['response_type'] = 'code'; + } + $query = \EDD\Vendor\Stripe\Util\Util::encodeParameters($params); + + return $base . '/oauth/authorize?' . $query; + } + + /** + * Use an authoriztion code to connect an account to your platform and + * fetch the user's credentials. + * + * @param null|array $params + * @param null|array $opts + * + * @throws \EDD\Vendor\Stripe\Exception\OAuth\OAuthErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject object containing the response from the API + */ + public function token($params = null, $opts = null) + { + $params = $params ?: []; + $params['client_secret'] = $this->_getClientSecret($params); + + return $this->requestConnect('post', '/oauth/token', $params, $opts); + } + + /** + * Disconnects an account from your platform. + * + * @param null|array $params + * @param null|array $opts + * + * @throws \EDD\Vendor\Stripe\Exception\OAuth\OAuthErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\StripeObject object containing the response from the API + */ + public function deauthorize($params = null, $opts = null) + { + $params = $params ?: []; + $params['client_id'] = $this->_getClientId($params); + + return $this->requestConnect('post', '/oauth/deauthorize', $params, $opts); + } + + private function _getClientId($params = null) + { + $clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null; + + if (null === $clientId) { + $clientId = $this->client->getClientId(); + } + if (null === $clientId) { + $msg = 'No client_id provided. (HINT: set your client_id using ' + . '`new \EDD\Vendor\Stripe\StripeClient([clientId => + ])`)". You can find your client_ids ' + . 'in your EDD\Vendor\Stripe dashboard at ' + . 'https://dashboard.stripe.com/account/applications/settings, ' + . 'after registering your account as a platform. See ' + . 'https://stripe.com/docs/connect/standard-accounts for details, ' + . 'or email support@stripe.com if you have any questions.'; + + throw new \EDD\Vendor\Stripe\Exception\AuthenticationException($msg); + } + + return $clientId; + } + + private function _getClientSecret($params = null) + { + if (\array_key_exists('client_secret', $params)) { + return $params['client_secret']; + } + + return $this->client->getApiKey(); + } + + /** + * @param array|\EDD\Vendor\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @throws \EDD\Vendor\Stripe\Exception\InvalidArgumentException + * + * @return \EDD\Vendor\Stripe\Util\RequestOptions + */ + private function _parseOpts($opts) + { + if (\is_array($opts)) { + if (\array_key_exists('connect_base', $opts)) { + // Throw an exception for the convenience of anybody migrating to + // \EDD\Vendor\Stripe\Service\OAuthService from \EDD\Vendor\Stripe\OAuth, where `connect_base` + // was the name of the parameter that behaves as `api_base` does here. + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException('Use `api_base`, not `connect_base`'); + } + } + + return \EDD\Vendor\Stripe\Util\RequestOptions::parse($opts); + } + + /** + * @param \EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @return string + */ + private function _getBase($opts) + { + return isset($opts->apiBase) ? + $opts->apiBase : + $this->client->getConnectBase(); + } +} diff --git a/libraries/Stripe/lib/Service/OrderReturnService.php b/libraries/Stripe/lib/Service/OrderReturnService.php new file mode 100644 index 00000000000..1f540bc7362 --- /dev/null +++ b/libraries/Stripe/lib/Service/OrderReturnService.php @@ -0,0 +1,42 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/order_returns', $params, $opts); + } + + /** + * Retrieves the details of an existing order return. Supply the unique order ID + * from either an order return creation request or the order return list, and + * EDD\Vendor\Stripe will return the corresponding order information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\OrderReturn + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/order_returns/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/OrderService.php b/libraries/Stripe/lib/Service/OrderService.php new file mode 100644 index 00000000000..9a1aae96ee1 --- /dev/null +++ b/libraries/Stripe/lib/Service/OrderService.php @@ -0,0 +1,109 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/orders', $params, $opts); + } + + /** + * Creates a new order object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Order + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/orders', $params, $opts); + } + + /** + * Pay an order by providing a source to create a payment. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Order + */ + public function pay($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/orders/%s/pay', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing order. Supply the unique order ID from + * either an order creation request or the order list, and EDD\Vendor\Stripe will return the + * corresponding order information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Order + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/orders/%s', $id), $params, $opts); + } + + /** + * Return all or part of an order. The order must have a status of + * paid or fulfilled before it can be returned. Once all + * items have been returned, the order will become canceled or + * returned depending on which status the order started in. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Order + */ + public function returnOrder($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/orders/%s/returns', $id), $params, $opts); + } + + /** + * Updates the specific order by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Order + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/orders/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/PaymentIntentService.php b/libraries/Stripe/lib/Service/PaymentIntentService.php new file mode 100644 index 00000000000..d38d82651af --- /dev/null +++ b/libraries/Stripe/lib/Service/PaymentIntentService.php @@ -0,0 +1,283 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payment_intents', $params, $opts); + } + + /** + * Manually reconcile the remaining amount for a customer_balance PaymentIntent. + * + * This can be used when the cash balance for a + * customer in manual reconciliation mode received funds. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function applyCustomerBalance($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/apply_customer_balance', $id), $params, $opts); + } + + /** + * A PaymentIntent object can be canceled when it is in one of these statuses: + * requires_payment_method, requires_capture, + * requires_confirmation, requires_action, or + * processing. + * + * Once canceled, no additional charges will be made by the PaymentIntent and any + * operations on the PaymentIntent will fail with an error. For PaymentIntents with + * status=’requires_capture’, the remaining + * amount_capturable will automatically be refunded. + * + * You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session + * instead + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/cancel', $id), $params, $opts); + } + + /** + * Capture the funds of an existing uncaptured PaymentIntent when its status is + * requires_capture. + * + * Uncaptured PaymentIntents will be canceled a set number of days after they are + * created (7 by default). + * + * Learn more about separate authorization + * and capture. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function capture($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/capture', $id), $params, $opts); + } + + /** + * Confirm that your customer intends to pay with current or provided payment + * method. Upon confirmation, the PaymentIntent will attempt to initiate a payment. + * + * If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the requires_action status and + * suggest additional actions via next_action. If payment fails, the + * PaymentIntent will transition to the requires_payment_method + * status. If payment succeeds, the PaymentIntent will transition to the + * succeeded status (or requires_capture, if + * capture_method is set to manual). + * + * If the confirmation_method is automatic, payment may + * be attempted using our client SDKs and + * the PaymentIntent’s client_secret. After + * next_actions are handled by the client, no additional confirmation + * is required to complete the payment. + * + * If the confirmation_method is manual, all payment + * attempts must be initiated using a secret key. If any actions are required for + * the payment, the PaymentIntent will return to the + * requires_confirmation state after those actions are completed. Your + * server needs to then explicitly re-confirm the PaymentIntent to initiate the + * next payment attempt. Read the expanded documentation to + * learn more about manual confirmation. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function confirm($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/confirm', $id), $params, $opts); + } + + /** + * Creates a PaymentIntent object. + * + * After the PaymentIntent is created, attach a payment method and confirm to continue the payment. + * You can read more about the different payment flows available via the Payment + * Intents API here. + * + * When confirm=true is used during creation, it is equivalent to + * creating and confirming the PaymentIntent in the same call. You may use any + * parameters available in the confirm + * API when confirm=true is supplied. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payment_intents', $params, $opts); + } + + /** + * Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and incremental_authorization_supported + * must be true. + * + * Incremental authorizations attempt to increase the authorized amount on your + * customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A single + * PaymentIntent can call this endpoint multiple times to further increase the + * authorized amount. + * + * If the incremental authorization succeeds, the PaymentIntent object is returned + * with the updated amount. + * If the incremental authorization fails, a card_declined error is returned, and + * no fields on the PaymentIntent or Charge are updated. The PaymentIntent object + * remains capturable for the previously authorized amount. + * + * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, + * including declines. Once captured, a PaymentIntent can no longer be incremented. + * + * Learn more about incremental + * authorizations. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function incrementAuthorization($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/increment_authorization', $id), $params, $opts); + } + + /** + * Retrieves the details of a PaymentIntent that has previously been created. + * + * Client-side retrieval using a publishable key is allowed when the + * client_secret is provided in the query string. + * + * When retrieved with a publishable key, only a subset of properties will be + * returned. Please refer to the payment + * intent object reference for more details. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts); + } + + /** + * Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. Don’t use + * search in read-after-write flows where strict consistency is necessary. Under + * normal operating conditions, data is searchable in less than a minute. + * Occasionally, propagation of new or updated data can be up to an hour behind + * during outages. Search functionality is not available to merchants in India. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult<\EDD\Vendor\Stripe\PaymentIntent> + */ + public function search($params = null, $opts = null) + { + return $this->requestSearchResult('get', '/v1/payment_intents/search', $params, $opts); + } + + /** + * Updates properties on a PaymentIntent object without confirming. + * + * Depending on which properties you update, you may need to confirm the + * PaymentIntent again. For example, updating the payment_method will + * always require you to confirm the PaymentIntent again. If you prefer to update + * and confirm at the same time, we recommend updating properties via the confirm API instead. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts); + } + + /** + * Verifies microdeposits on a PaymentIntent object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentIntent + */ + public function verifyMicrodeposits($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/verify_microdeposits', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/PaymentLinkService.php b/libraries/Stripe/lib/Service/PaymentLinkService.php new file mode 100644 index 00000000000..0820aee4960 --- /dev/null +++ b/libraries/Stripe/lib/Service/PaymentLinkService.php @@ -0,0 +1,89 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payment_links', $params, $opts); + } + + /** + * When retrieving a payment link, there is an includable + * line_items property containing the first handful of those + * items. There is also a URL where you can retrieve the full (paginated) list of + * line items. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\PaymentLink> + */ + public function allLineItems($id, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/payment_links/%s/line_items', $id), $params, $opts); + } + + /** + * Creates a payment link. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentLink + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payment_links', $params, $opts); + } + + /** + * Retrieve a payment link. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentLink + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts); + } + + /** + * Updates a payment link. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentLink + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/PaymentMethodService.php b/libraries/Stripe/lib/Service/PaymentMethodService.php new file mode 100644 index 00000000000..909fa247df1 --- /dev/null +++ b/libraries/Stripe/lib/Service/PaymentMethodService.php @@ -0,0 +1,130 @@ +List a Customer’s + * PaymentMethods. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\PaymentMethod> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payment_methods', $params, $opts); + } + + /** + * Attaches a PaymentMethod object to a Customer. + * + * To attach a new PaymentMethod to a customer for future payments, we recommend + * you use a SetupIntent or a PaymentIntent + * with setup_future_usage. + * These approaches will perform any necessary steps to ensure that the + * PaymentMethod can be used in a future payment. Using the + * /v1/payment_methods/:id/attach endpoint does not ensure that future + * payments can be made with the attached PaymentMethod. See Optimizing cards for future + * payments for more information about setting up future payments. + * + * To use this PaymentMethod as the default for invoice or subscription payments, + * set invoice_settings.default_payment_method, + * on the Customer to the PaymentMethod’s ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentMethod + */ + public function attach($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_methods/%s/attach', $id), $params, $opts); + } + + /** + * Creates a PaymentMethod object. Read the Stripe.js + * reference to learn how to create PaymentMethods via Stripe.js. + * + * Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a + * payment immediately or the SetupIntent API to collect payment + * method details ahead of a future payment. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentMethod + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payment_methods', $params, $opts); + } + + /** + * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is + * detached, it can no longer be used for a payment or re-attached to a Customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentMethod + */ + public function detach($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_methods/%s/detach', $id), $params, $opts); + } + + /** + * Retrieves a PaymentMethod object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentMethod + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payment_methods/%s', $id), $params, $opts); + } + + /** + * Updates a PaymentMethod object. A PaymentMethod must be attached a customer to + * be updated. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PaymentMethod + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_methods/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/PayoutService.php b/libraries/Stripe/lib/Service/PayoutService.php new file mode 100644 index 00000000000..d5fe1b70bd5 --- /dev/null +++ b/libraries/Stripe/lib/Service/PayoutService.php @@ -0,0 +1,127 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payouts', $params, $opts); + } + + /** + * A previously created payout can be canceled if it has not yet been paid out. + * Funds will be refunded to your available balance. You may not cancel automatic + * EDD\Vendor\Stripe payouts. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Payout + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payouts/%s/cancel', $id), $params, $opts); + } + + /** + * To send funds to your own bank account, you create a new payout object. Your EDD\Vendor\Stripe balance must be able to cover the payout amount, or + * you’ll receive an “Insufficient Funds” error. + * + * If your API key is in test mode, money won’t actually be sent, though everything + * else will occur as if in live mode. + * + * If you are creating a manual payout on a EDD\Vendor\Stripe account that uses multiple + * payment source types, you’ll need to specify the source type balance that the + * payout should draw from. The balance object + * details available and pending amounts by source type. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Payout + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payouts', $params, $opts); + } + + /** + * Retrieves the details of an existing payout. Supply the unique payout ID from + * either a payout creation request or the payout list, and EDD\Vendor\Stripe will return the + * corresponding payout information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Payout + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payouts/%s', $id), $params, $opts); + } + + /** + * Reverses a payout by debiting the destination bank account. Only payouts for + * connected accounts to US bank accounts may be reversed at this time. If the + * payout is in the pending status, + * /v1/payouts/:id/cancel should be used instead. + * + * By requesting a reversal via /v1/payouts/:id/reverse, you confirm + * that the authorized signatory of the selected bank account has authorized the + * debit on the bank account and that no other authorization is required. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Payout + */ + public function reverse($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payouts/%s/reverse', $id), $params, $opts); + } + + /** + * Updates the specified payout by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. This request accepts only the + * metadata as arguments. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Payout + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payouts/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/PlanService.php b/libraries/Stripe/lib/Service/PlanService.php new file mode 100644 index 00000000000..32d5abb5e46 --- /dev/null +++ b/libraries/Stripe/lib/Service/PlanService.php @@ -0,0 +1,91 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/plans', $params, $opts); + } + + /** + * You can now model subscriptions more flexibly using the Prices + * API. It replaces the Plans API and is backwards compatible to simplify your + * migration. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Plan + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/plans', $params, $opts); + } + + /** + * Deleting plans means new subscribers can’t be added. Existing subscribers aren’t + * affected. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Plan + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/plans/%s', $id), $params, $opts); + } + + /** + * Retrieves the plan with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Plan + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/plans/%s', $id), $params, $opts); + } + + /** + * Updates the specified plan by setting the values of the parameters passed. Any + * parameters not provided are left unchanged. By design, you cannot change a + * plan’s ID, amount, currency, or billing cycle. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Plan + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/plans/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/PriceService.php b/libraries/Stripe/lib/Service/PriceService.php new file mode 100644 index 00000000000..4b2e79ca95c --- /dev/null +++ b/libraries/Stripe/lib/Service/PriceService.php @@ -0,0 +1,92 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/prices', $params, $opts); + } + + /** + * Creates a new price for an existing product. The price can be recurring or + * one-time. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Price + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/prices', $params, $opts); + } + + /** + * Retrieves the price with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Price + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/prices/%s', $id), $params, $opts); + } + + /** + * Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use + * search in read-after-write flows where strict consistency is necessary. Under + * normal operating conditions, data is searchable in less than a minute. + * Occasionally, propagation of new or updated data can be up to an hour behind + * during outages. Search functionality is not available to merchants in India. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult<\EDD\Vendor\Stripe\Price> + */ + public function search($params = null, $opts = null) + { + return $this->requestSearchResult('get', '/v1/prices/search', $params, $opts); + } + + /** + * Updates the specified price by setting the values of the parameters passed. Any + * parameters not provided are left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Price + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/prices/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/ProductService.php b/libraries/Stripe/lib/Service/ProductService.php new file mode 100644 index 00000000000..7d1a9c3f86d --- /dev/null +++ b/libraries/Stripe/lib/Service/ProductService.php @@ -0,0 +1,112 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/products', $params, $opts); + } + + /** + * Creates a new product object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Product + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/products', $params, $opts); + } + + /** + * Delete a product. Deleting a product is only possible if it has no prices + * associated with it. Additionally, deleting a product with type=good + * is only possible if it has no SKUs associated with it. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Product + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/products/%s', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing product. Supply the unique product ID from + * either a product creation request or the product list, and EDD\Vendor\Stripe will return + * the corresponding product information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Product + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/products/%s', $id), $params, $opts); + } + + /** + * Search for products you’ve previously created using Stripe’s Search Query Language. Don’t use + * search in read-after-write flows where strict consistency is necessary. Under + * normal operating conditions, data is searchable in less than a minute. + * Occasionally, propagation of new or updated data can be up to an hour behind + * during outages. Search functionality is not available to merchants in India. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult<\EDD\Vendor\Stripe\Product> + */ + public function search($params = null, $opts = null) + { + return $this->requestSearchResult('get', '/v1/products/search', $params, $opts); + } + + /** + * Updates the specific product by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Product + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/products/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/PromotionCodeService.php b/libraries/Stripe/lib/Service/PromotionCodeService.php new file mode 100644 index 00000000000..44244f9d18b --- /dev/null +++ b/libraries/Stripe/lib/Service/PromotionCodeService.php @@ -0,0 +1,75 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/promotion_codes', $params, $opts); + } + + /** + * A promotion code points to a coupon. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PromotionCode + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/promotion_codes', $params, $opts); + } + + /** + * Retrieves the promotion code with the given ID. In order to retrieve a promotion + * code by the customer-facing code use list with the desired + * code. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PromotionCode + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/promotion_codes/%s', $id), $params, $opts); + } + + /** + * Updates the specified promotion code by setting the values of the parameters + * passed. Most fields are, by design, not editable. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\PromotionCode + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/promotion_codes/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/QuoteService.php b/libraries/Stripe/lib/Service/QuoteService.php new file mode 100644 index 00000000000..34afe051b54 --- /dev/null +++ b/libraries/Stripe/lib/Service/QuoteService.php @@ -0,0 +1,177 @@ +request('post', $this->buildPath('/v1/quotes/%s/accept', $id), $params, $opts); + } + + /** + * Returns a list of your quotes. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Quote> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/quotes', $params, $opts); + } + + /** + * When retrieving a quote, there is an includable computed.upfront.line_items + * property containing the first handful of those items. There is also a URL where + * you can retrieve the full (paginated) list of upfront line items. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Quote> + */ + public function allComputedUpfrontLineItems($id, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/computed_upfront_line_items', $id), $params, $opts); + } + + /** + * When retrieving a quote, there is an includable line_items + * property containing the first handful of those items. There is also a URL where + * you can retrieve the full (paginated) list of line items. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Quote> + */ + public function allLineItems($id, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/line_items', $id), $params, $opts); + } + + /** + * Cancels the quote. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/quotes/%s/cancel', $id), $params, $opts); + } + + /** + * A quote models prices and services for a customer. Default options for + * header, description, footer, and + * expires_at can be set in the dashboard via the quote template. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/quotes', $params, $opts); + } + + /** + * Finalizes the quote. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote + */ + public function finalizeQuote($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/quotes/%s/finalize', $id), $params, $opts); + } + + /** + * Retrieves the quote with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/quotes/%s', $id), $params, $opts); + } + + /** + * A quote models prices and services for a customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Quote + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/quotes/%s', $id), $params, $opts); + } + + /** + * Download the PDF for a finalized quote. + * + * @param string $id + * @param callable $readBodyChunkCallable + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + */ + public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null) + { + $opts = \EDD\Vendor\Stripe\Util\RequestOptions::parse($opts); + if (!isset($opts->apiBase)) { + $opts->apiBase = $this->getClient()->getFilesBase(); + } + $this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Radar/EarlyFraudWarningService.php b/libraries/Stripe/lib/Service/Radar/EarlyFraudWarningService.php new file mode 100644 index 00000000000..f9407fabb90 --- /dev/null +++ b/libraries/Stripe/lib/Service/Radar/EarlyFraudWarningService.php @@ -0,0 +1,43 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/radar/early_fraud_warnings', $params, $opts); + } + + /** + * Retrieves the details of an early fraud warning that has previously been + * created. + * + * Please refer to the early fraud + * warning object reference for more details. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\EarlyFraudWarning + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/radar/early_fraud_warnings/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Radar/RadarServiceFactory.php b/libraries/Stripe/lib/Service/Radar/RadarServiceFactory.php new file mode 100644 index 00000000000..9491241f2c7 --- /dev/null +++ b/libraries/Stripe/lib/Service/Radar/RadarServiceFactory.php @@ -0,0 +1,29 @@ + + */ + private static $classMap = [ + 'earlyFraudWarnings' => EarlyFraudWarningService::class, + 'valueListItems' => ValueListItemService::class, + 'valueLists' => ValueListService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/Radar/ValueListItemService.php b/libraries/Stripe/lib/Service/Radar/ValueListItemService.php new file mode 100644 index 00000000000..8fc90fb81b5 --- /dev/null +++ b/libraries/Stripe/lib/Service/Radar/ValueListItemService.php @@ -0,0 +1,74 @@ +ValueListItem objects. The objects are sorted in + * descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Radar\ValueListItem> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/radar/value_list_items', $params, $opts); + } + + /** + * Creates a new ValueListItem object, which is added to the specified + * parent value list. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\ValueListItem + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/radar/value_list_items', $params, $opts); + } + + /** + * Deletes a ValueListItem object, removing it from its parent value + * list. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\ValueListItem + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/radar/value_list_items/%s', $id), $params, $opts); + } + + /** + * Retrieves a ValueListItem object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\ValueListItem + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/radar/value_list_items/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Radar/ValueListService.php b/libraries/Stripe/lib/Service/Radar/ValueListService.php new file mode 100644 index 00000000000..6209bb8ecd7 --- /dev/null +++ b/libraries/Stripe/lib/Service/Radar/ValueListService.php @@ -0,0 +1,93 @@ +ValueList objects. The objects are sorted in + * descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Radar\ValueList> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/radar/value_lists', $params, $opts); + } + + /** + * Creates a new ValueList object, which can then be referenced in + * rules. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\ValueList + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/radar/value_lists', $params, $opts); + } + + /** + * Deletes a ValueList object, also deleting any items contained + * within the value list. To be deleted, a value list must not be referenced in any + * rules. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\ValueList + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts); + } + + /** + * Retrieves a ValueList object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\ValueList + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts); + } + + /** + * Updates a ValueList object by setting the values of the parameters + * passed. Any parameters not provided will be left unchanged. Note that + * item_type is immutable. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Radar\ValueList + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/RefundService.php b/libraries/Stripe/lib/Service/RefundService.php new file mode 100644 index 00000000000..b4e4ba241d9 --- /dev/null +++ b/libraries/Stripe/lib/Service/RefundService.php @@ -0,0 +1,95 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/refunds', $params, $opts); + } + + /** + * Cancels a refund with a status of requires_action. + * + * Refunds in other states cannot be canceled, and only refunds for payment methods + * that require customer action will enter the requires_action state. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Refund + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/refunds/%s/cancel', $id), $params, $opts); + } + + /** + * Create a refund. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Refund + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/refunds', $params, $opts); + } + + /** + * Retrieves the details of an existing refund. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Refund + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/refunds/%s', $id), $params, $opts); + } + + /** + * Updates the specified refund by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * This request only accepts metadata as an argument. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Refund + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/refunds/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Reporting/ReportRunService.php b/libraries/Stripe/lib/Service/Reporting/ReportRunService.php new file mode 100644 index 00000000000..5433eb37a0f --- /dev/null +++ b/libraries/Stripe/lib/Service/Reporting/ReportRunService.php @@ -0,0 +1,55 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/reporting/report_runs', $params, $opts); + } + + /** + * Creates a new object and begin running the report. (Certain report types require + * a live-mode API key.). + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Reporting\ReportRun + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/reporting/report_runs', $params, $opts); + } + + /** + * Retrieves the details of an existing Report Run. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Reporting\ReportRun + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/reporting/report_runs/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Reporting/ReportTypeService.php b/libraries/Stripe/lib/Service/Reporting/ReportTypeService.php new file mode 100644 index 00000000000..9a2eba2b43b --- /dev/null +++ b/libraries/Stripe/lib/Service/Reporting/ReportTypeService.php @@ -0,0 +1,40 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/reporting/report_types', $params, $opts); + } + + /** + * Retrieves the details of a Report Type. (Certain report types require a live-mode API key.). + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Reporting\ReportType + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/reporting/report_types/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Reporting/ReportingServiceFactory.php b/libraries/Stripe/lib/Service/Reporting/ReportingServiceFactory.php new file mode 100644 index 00000000000..6d484aadf91 --- /dev/null +++ b/libraries/Stripe/lib/Service/Reporting/ReportingServiceFactory.php @@ -0,0 +1,27 @@ + + */ + private static $classMap = [ + 'reportRuns' => ReportRunService::class, + 'reportTypes' => ReportTypeService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/ReviewService.php b/libraries/Stripe/lib/Service/ReviewService.php new file mode 100644 index 00000000000..85a559db1a1 --- /dev/null +++ b/libraries/Stripe/lib/Service/ReviewService.php @@ -0,0 +1,58 @@ +Review objects that have open set to + * true. The objects are sorted in descending order by creation date, + * with the most recently created object appearing first. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Review> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/reviews', $params, $opts); + } + + /** + * Approves a Review object, closing it and removing it from the list + * of reviews. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Review + */ + public function approve($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/reviews/%s/approve', $id), $params, $opts); + } + + /** + * Retrieves a Review object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Review + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/reviews/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/SetupAttemptService.php b/libraries/Stripe/lib/Service/SetupAttemptService.php new file mode 100644 index 00000000000..b2a91ed6d3a --- /dev/null +++ b/libraries/Stripe/lib/Service/SetupAttemptService.php @@ -0,0 +1,23 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/setup_attempts', $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/SetupIntentService.php b/libraries/Stripe/lib/Service/SetupIntentService.php new file mode 100644 index 00000000000..42687cce484 --- /dev/null +++ b/libraries/Stripe/lib/Service/SetupIntentService.php @@ -0,0 +1,143 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/setup_intents', $params, $opts); + } + + /** + * A SetupIntent object can be canceled when it is in one of these statuses: + * requires_payment_method, requires_confirmation, or + * requires_action. + * + * Once canceled, setup is abandoned and any operations on the SetupIntent will + * fail with an error. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s/cancel', $id), $params, $opts); + } + + /** + * Confirm that your customer intends to set up the current or provided payment + * method. For example, you would confirm a SetupIntent when a customer hits the + * “Save” button on a payment method management page on your website. + * + * If the selected payment method does not require any additional steps from the + * customer, the SetupIntent will transition to the succeeded status. + * + * Otherwise, it will transition to the requires_action status and + * suggest additional actions via next_action. If setup fails, the + * SetupIntent will transition to the requires_payment_method status. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent + */ + public function confirm($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s/confirm', $id), $params, $opts); + } + + /** + * Creates a SetupIntent object. + * + * After the SetupIntent is created, attach a payment method and confirm to collect any required + * permissions to charge the payment method later. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/setup_intents', $params, $opts); + } + + /** + * Retrieves the details of a SetupIntent that has previously been created. + * + * Client-side retrieval using a publishable key is allowed when the + * client_secret is provided in the query string. + * + * When retrieved with a publishable key, only a subset of properties will be + * returned. Please refer to the SetupIntent + * object reference for more details. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts); + } + + /** + * Updates a SetupIntent object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts); + } + + /** + * Verifies microdeposits on a SetupIntent object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent + */ + public function verifyMicrodeposits($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s/verify_microdeposits', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/ShippingRateService.php b/libraries/Stripe/lib/Service/ShippingRateService.php new file mode 100644 index 00000000000..a0a1ca569bd --- /dev/null +++ b/libraries/Stripe/lib/Service/ShippingRateService.php @@ -0,0 +1,70 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/shipping_rates', $params, $opts); + } + + /** + * Creates a new shipping rate object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ShippingRate + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/shipping_rates', $params, $opts); + } + + /** + * Returns the shipping rate object with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ShippingRate + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts); + } + + /** + * Updates an existing shipping rate object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\ShippingRate + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Sigma/ScheduledQueryRunService.php b/libraries/Stripe/lib/Service/Sigma/ScheduledQueryRunService.php new file mode 100644 index 00000000000..f894d0cf930 --- /dev/null +++ b/libraries/Stripe/lib/Service/Sigma/ScheduledQueryRunService.php @@ -0,0 +1,39 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/sigma/scheduled_query_runs', $params, $opts); + } + + /** + * Retrieves the details of an scheduled query run. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Sigma\ScheduledQueryRun + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/sigma/scheduled_query_runs/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Sigma/SigmaServiceFactory.php b/libraries/Stripe/lib/Service/Sigma/SigmaServiceFactory.php new file mode 100644 index 00000000000..ce35269a469 --- /dev/null +++ b/libraries/Stripe/lib/Service/Sigma/SigmaServiceFactory.php @@ -0,0 +1,25 @@ + + */ + private static $classMap = [ + 'scheduledQueryRuns' => ScheduledQueryRunService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/SkuService.php b/libraries/Stripe/lib/Service/SkuService.php new file mode 100644 index 00000000000..c5e10f24ffe --- /dev/null +++ b/libraries/Stripe/lib/Service/SkuService.php @@ -0,0 +1,95 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/skus', $params, $opts); + } + + /** + * Creates a new SKU associated with a product. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SKU + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/skus', $params, $opts); + } + + /** + * Delete a SKU. Deleting a SKU is only possible until it has been used in an + * order. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SKU + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/skus/%s', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing SKU. Supply the unique SKU identifier from + * either a SKU creation request or from the product, and EDD\Vendor\Stripe will return the + * corresponding SKU information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SKU + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/skus/%s', $id), $params, $opts); + } + + /** + * Updates the specific SKU by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * Note that a SKU’s attributes are not editable. Instead, you would + * need to deactivate the existing SKU and create a new one with the new attribute + * values. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SKU + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/skus/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/SourceService.php b/libraries/Stripe/lib/Service/SourceService.php new file mode 100644 index 00000000000..8e18a2d98a5 --- /dev/null +++ b/libraries/Stripe/lib/Service/SourceService.php @@ -0,0 +1,110 @@ +request('get', $this->buildPath('/v1/sources/%s/source_transactions', $id), $params, $opts); + } + + /** + * Creates a new source object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Source + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/sources', $params, $opts); + } + + /** + * Delete a specified source for a given customer. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Source + */ + public function detach($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves an existing source object. Supply the unique source ID from a source + * creation request and EDD\Vendor\Stripe will return the corresponding up-to-date source + * object information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Source + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/sources/%s', $id), $params, $opts); + } + + /** + * Updates the specified source by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * This request accepts the metadata and owner as + * arguments. It is also possible to update type specific information for selected + * payment methods. Please refer to our payment method + * guides for more detail. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Source + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/sources/%s', $id), $params, $opts); + } + + /** + * Verify a given source. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Source + */ + public function verify($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/sources/%s/verify', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/SubscriptionItemService.php b/libraries/Stripe/lib/Service/SubscriptionItemService.php new file mode 100644 index 00000000000..9ff9133ad66 --- /dev/null +++ b/libraries/Stripe/lib/Service/SubscriptionItemService.php @@ -0,0 +1,151 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/subscription_items', $params, $opts); + } + + /** + * For the specified subscription item, returns a list of summary objects. Each + * object in the list provides usage information that’s been summarized from + * multiple usage records and over a subscription billing period (e.g., 15 usage + * records in the month of September). + * + * The list is sorted in reverse-chronological order (newest first). The first list + * item represents the most current usage period that hasn’t ended yet. Since new + * usage records can still be added, the returned summary information for the + * subscription item’s ID should be seen as unstable until the subscription billing + * period ends. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\UsageRecordSummary> + */ + public function allUsageRecordSummaries($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/subscription_items/%s/usage_record_summaries', $parentId), $params, $opts); + } + + /** + * Adds a new item to an existing subscription. No existing items will be changed + * or replaced. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionItem + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/subscription_items', $params, $opts); + } + + /** + * Creates a usage record for a specified subscription item and date, and fills it + * with a quantity. + * + * Usage records provide quantity information that EDD\Vendor\Stripe uses to + * track how much a customer is using your service. With usage information and the + * pricing model set up by the metered + * billing plan, EDD\Vendor\Stripe helps you send accurate invoices to your customers. + * + * The default calculation for usage is to add up all the quantity + * values of the usage records within a billing period. You can change this default + * behavior with the billing plan’s aggregate_usage parameter. When + * there is more than one usage record with the same timestamp, EDD\Vendor\Stripe adds the + * quantity values together. In most cases, this is the desired + * resolution, however, you can change this behavior with the action + * parameter. + * + * The default pricing model for metered billing is per-unit pricing. + * For finer granularity, you can configure metered billing to have a tiered pricing + * model. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\UsageRecord + */ + public function createUsageRecord($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_items/%s/usage_records', $parentId), $params, $opts); + } + + /** + * Deletes an item from the subscription. Removing a subscription item from a + * subscription will not cancel the subscription. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionItem + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); + } + + /** + * Retrieves the subscription item with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionItem + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); + } + + /** + * Updates the plan or quantity of an item on a current subscription. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionItem + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/SubscriptionScheduleService.php b/libraries/Stripe/lib/Service/SubscriptionScheduleService.php new file mode 100644 index 00000000000..ab1b6f13c5d --- /dev/null +++ b/libraries/Stripe/lib/Service/SubscriptionScheduleService.php @@ -0,0 +1,113 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/subscription_schedules', $params, $opts); + } + + /** + * Cancels a subscription schedule and its associated subscription immediately (if + * the subscription schedule has an active subscription). A subscription schedule + * can only be canceled if its status is not_started or + * active. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionSchedule + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/cancel', $id), $params, $opts); + } + + /** + * Creates a new subscription schedule object. Each customer can have up to 500 + * active or scheduled subscriptions. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionSchedule + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/subscription_schedules', $params, $opts); + } + + /** + * Releases the subscription schedule immediately, which will stop scheduling of + * its phases, but leave any existing subscription in place. A schedule can only be + * released if its status is not_started or active. If + * the subscription schedule is currently associated with a subscription, releasing + * it will remove its subscription property and set the subscription’s + * ID to the released_subscription property. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionSchedule + */ + public function release($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/release', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing subscription schedule. You only need to + * supply the unique subscription schedule identifier that was returned upon + * subscription schedule creation. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionSchedule + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts); + } + + /** + * Updates an existing subscription schedule. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionSchedule + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/SubscriptionService.php b/libraries/Stripe/lib/Service/SubscriptionService.php new file mode 100644 index 00000000000..2705c0a2271 --- /dev/null +++ b/libraries/Stripe/lib/Service/SubscriptionService.php @@ -0,0 +1,155 @@ +status=canceled. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Subscription> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/subscriptions', $params, $opts); + } + + /** + * Cancels a customer’s subscription immediately. The customer will not be charged + * again for the subscription. + * + * Note, however, that any pending invoice items that you’ve created will still be + * charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel + * at the end of the period, any pending prorations will also be left in place and + * collected at the end of the period. But if the subscription is set to cancel + * immediately, pending prorations will be removed. + * + * By default, upon subscription cancellation, EDD\Vendor\Stripe will stop automatic + * collection of all finalized invoices for the customer. This is intended to + * prevent unexpected payment attempts after the customer has canceled a + * subscription. However, you can resume automatic collection of the invoices + * manually after subscription cancellation to have us proceed. Or, you could check + * for unpaid invoices before allowing the customer to cancel the subscription at + * all. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Subscription + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); + } + + /** + * Creates a new subscription on an existing customer. Each customer can have up to + * 500 active or scheduled subscriptions. + * + * When you create a subscription with + * collection_method=charge_automatically, the first invoice is + * finalized as part of the request. The payment_behavior parameter + * determines the exact behavior of the initial payment. + * + * To start subscriptions where the first invoice always begins in a + * draft status, use subscription + * schedules instead. Schedules provide the flexibility to model more complex + * billing configurations that change over time. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Subscription + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/subscriptions', $params, $opts); + } + + /** + * Removes the currently applied discount on a subscription. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Subscription + */ + public function deleteDiscount($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/subscriptions/%s/discount', $id), $params, $opts); + } + + /** + * Retrieves the subscription with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Subscription + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); + } + + /** + * Search for subscriptions you’ve previously created using Stripe’s Search Query Language. Don’t use + * search in read-after-write flows where strict consistency is necessary. Under + * normal operating conditions, data is searchable in less than a minute. + * Occasionally, propagation of new or updated data can be up to an hour behind + * during outages. Search functionality is not available to merchants in India. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult<\EDD\Vendor\Stripe\Subscription> + */ + public function search($params = null, $opts = null) + { + return $this->requestSearchResult('get', '/v1/subscriptions/search', $params, $opts); + } + + /** + * Updates an existing subscription on a customer to match the specified + * parameters. When changing plans or quantities, we will optionally prorate the + * price we charge next month to make up for any price changes. To preview how the + * proration will be calculated, use the upcoming + * invoice endpoint. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Subscription + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/TaxCodeService.php b/libraries/Stripe/lib/Service/TaxCodeService.php new file mode 100644 index 00000000000..25cc799a889 --- /dev/null +++ b/libraries/Stripe/lib/Service/TaxCodeService.php @@ -0,0 +1,41 @@ +all tax codes + * available to add to Products in order to allow specific tax calculations. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TaxCode> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/tax_codes', $params, $opts); + } + + /** + * Retrieves the details of an existing tax code. Supply the unique tax code ID and + * EDD\Vendor\Stripe will return the corresponding tax code information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxCode + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/tax_codes/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/TaxRateService.php b/libraries/Stripe/lib/Service/TaxRateService.php new file mode 100644 index 00000000000..75538a662f4 --- /dev/null +++ b/libraries/Stripe/lib/Service/TaxRateService.php @@ -0,0 +1,71 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/tax_rates', $params, $opts); + } + + /** + * Creates a new tax rate. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxRate + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/tax_rates', $params, $opts); + } + + /** + * Retrieves a tax rate with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxRate + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts); + } + + /** + * Updates an existing tax rate. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TaxRate + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Terminal/ConfigurationService.php b/libraries/Stripe/lib/Service/Terminal/ConfigurationService.php new file mode 100644 index 00000000000..1504c9d417b --- /dev/null +++ b/libraries/Stripe/lib/Service/Terminal/ConfigurationService.php @@ -0,0 +1,86 @@ +Configuration objects. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Terminal\Configuration> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/terminal/configurations', $params, $opts); + } + + /** + * Creates a new Configuration object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Configuration + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/terminal/configurations', $params, $opts); + } + + /** + * Deletes a Configuration object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Configuration + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts); + } + + /** + * Retrieves a Configuration object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Configuration + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts); + } + + /** + * Updates a new Configuration object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Configuration + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Terminal/ConnectionTokenService.php b/libraries/Stripe/lib/Service/Terminal/ConnectionTokenService.php new file mode 100644 index 00000000000..0dd154ec5b5 --- /dev/null +++ b/libraries/Stripe/lib/Service/Terminal/ConnectionTokenService.php @@ -0,0 +1,25 @@ +request('post', '/v1/terminal/connection_tokens', $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Terminal/LocationService.php b/libraries/Stripe/lib/Service/Terminal/LocationService.php new file mode 100644 index 00000000000..cfc3022755f --- /dev/null +++ b/libraries/Stripe/lib/Service/Terminal/LocationService.php @@ -0,0 +1,89 @@ +Location objects. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Terminal\Location> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/terminal/locations', $params, $opts); + } + + /** + * Creates a new Location object. For further details, including which + * address fields are required in each country, see the Manage locations guide. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Location + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/terminal/locations', $params, $opts); + } + + /** + * Deletes a Location object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Location + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); + } + + /** + * Retrieves a Location object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Location + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); + } + + /** + * Updates a Location object by setting the values of the parameters + * passed. Any parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Location + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Terminal/ReaderService.php b/libraries/Stripe/lib/Service/Terminal/ReaderService.php new file mode 100644 index 00000000000..4a1c01645b6 --- /dev/null +++ b/libraries/Stripe/lib/Service/Terminal/ReaderService.php @@ -0,0 +1,151 @@ +Reader objects. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\Terminal\Reader> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/terminal/readers', $params, $opts); + } + + /** + * Cancels the current reader action. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function cancelAction($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/cancel_action', $id), $params, $opts); + } + + /** + * Creates a new Reader object. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/terminal/readers', $params, $opts); + } + + /** + * Deletes a Reader object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts); + } + + /** + * Initiates a payment flow on a Reader. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function processPaymentIntent($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/process_payment_intent', $id), $params, $opts); + } + + /** + * Initiates a setup intent flow on a Reader. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function processSetupIntent($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/process_setup_intent', $id), $params, $opts); + } + + /** + * Retrieves a Reader object. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts); + } + + /** + * Sets reader display to show cart details. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function setReaderDisplay($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/set_reader_display', $id), $params, $opts); + } + + /** + * Updates a Reader object by setting the values of the parameters + * passed. Any parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/Terminal/TerminalServiceFactory.php b/libraries/Stripe/lib/Service/Terminal/TerminalServiceFactory.php new file mode 100644 index 00000000000..5a0e4129b77 --- /dev/null +++ b/libraries/Stripe/lib/Service/Terminal/TerminalServiceFactory.php @@ -0,0 +1,31 @@ + + */ + private static $classMap = [ + 'configurations' => ConfigurationService::class, + 'connectionTokens' => ConnectionTokenService::class, + 'locations' => LocationService::class, + 'readers' => ReaderService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/TestHelpers/RefundService.php b/libraries/Stripe/lib/Service/TestHelpers/RefundService.php new file mode 100644 index 00000000000..52e8bdbefeb --- /dev/null +++ b/libraries/Stripe/lib/Service/TestHelpers/RefundService.php @@ -0,0 +1,24 @@ +requires_action. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Refund + */ + public function expire($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/refunds/%s/expire', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/TestHelpers/Terminal/ReaderService.php b/libraries/Stripe/lib/Service/TestHelpers/Terminal/ReaderService.php new file mode 100644 index 00000000000..170d2835bf5 --- /dev/null +++ b/libraries/Stripe/lib/Service/TestHelpers/Terminal/ReaderService.php @@ -0,0 +1,25 @@ +request('post', $this->buildPath('/v1/test_helpers/terminal/readers/%s/present_payment_method', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php b/libraries/Stripe/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php new file mode 100644 index 00000000000..37301cb8b05 --- /dev/null +++ b/libraries/Stripe/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php @@ -0,0 +1,25 @@ + + */ + private static $classMap = [ + 'readers' => ReaderService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/TestHelpers/TestClockService.php b/libraries/Stripe/lib/Service/TestHelpers/TestClockService.php new file mode 100644 index 00000000000..88a26a16963 --- /dev/null +++ b/libraries/Stripe/lib/Service/TestHelpers/TestClockService.php @@ -0,0 +1,87 @@ +Ready. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TestHelpers\TestClock + */ + public function advance($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/test_clocks/%s/advance', $id), $params, $opts); + } + + /** + * Returns a list of your test clocks. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TestHelpers\TestClock> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/test_helpers/test_clocks', $params, $opts); + } + + /** + * Creates a new test clock that can be attached to new customers and quotes. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TestHelpers\TestClock + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/test_helpers/test_clocks', $params, $opts); + } + + /** + * Deletes a test clock. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TestHelpers\TestClock + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts); + } + + /** + * Retrieves a test clock. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TestHelpers\TestClock + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/TestHelpers/TestHelpersServiceFactory.php b/libraries/Stripe/lib/Service/TestHelpers/TestHelpersServiceFactory.php new file mode 100644 index 00000000000..43f4d5e73f1 --- /dev/null +++ b/libraries/Stripe/lib/Service/TestHelpers/TestHelpersServiceFactory.php @@ -0,0 +1,29 @@ + + */ + private static $classMap = [ + 'refunds' => RefundService::class, + 'terminal' => Terminal\TerminalServiceFactory::class, + 'testClocks' => TestClockService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/libraries/Stripe/lib/Service/TokenService.php b/libraries/Stripe/lib/Service/TokenService.php new file mode 100644 index 00000000000..eb0b12a9d40 --- /dev/null +++ b/libraries/Stripe/lib/Service/TokenService.php @@ -0,0 +1,42 @@ +Custom + * account. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Token + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/tokens', $params, $opts); + } + + /** + * Retrieves the token with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Token + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/tokens/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/TopupService.php b/libraries/Stripe/lib/Service/TopupService.php new file mode 100644 index 00000000000..6f5c56099b5 --- /dev/null +++ b/libraries/Stripe/lib/Service/TopupService.php @@ -0,0 +1,89 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/topups', $params, $opts); + } + + /** + * Cancels a top-up. Only pending top-ups can be canceled. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Topup + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/topups/%s/cancel', $id), $params, $opts); + } + + /** + * Top up the balance of an account. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Topup + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/topups', $params, $opts); + } + + /** + * Retrieves the details of a top-up that has previously been created. Supply the + * unique top-up ID that was returned from your previous request, and EDD\Vendor\Stripe will + * return the corresponding top-up information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Topup + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/topups/%s', $id), $params, $opts); + } + + /** + * Updates the metadata of a top-up. Other top-up details are not editable by + * design. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Topup + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/topups/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/TransferService.php b/libraries/Stripe/lib/Service/TransferService.php new file mode 100644 index 00000000000..c09d0a7a5c4 --- /dev/null +++ b/libraries/Stripe/lib/Service/TransferService.php @@ -0,0 +1,175 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/transfers', $params, $opts); + } + + /** + * You can see a list of the reversals belonging to a specific transfer. Note that + * the 10 most recent reversals are always available by default on the transfer + * object. If you need more than those 10, you can use this API method and the + * limit and starting_after parameters to page through + * additional reversals. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TransferReversal> + */ + public function allReversals($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/transfers/%s/reversals', $parentId), $params, $opts); + } + + /** + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Transfer + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s/cancel', $id), $params, $opts); + } + + /** + * To send funds from your EDD\Vendor\Stripe account to a connected account, you create a new + * transfer object. Your EDD\Vendor\Stripe balance must be able to + * cover the transfer amount, or you’ll receive an “Insufficient Funds” error. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Transfer + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/transfers', $params, $opts); + } + + /** + * When you create a new reversal, you must specify a transfer to create it on. + * + * When reversing transfers, you can optionally reverse part of the transfer. You + * can do so as many times as you wish until the entire transfer has been reversed. + * + * Once entirely reversed, a transfer can’t be reversed again. This method will + * return an error when called on an already-reversed transfer, or when trying to + * reverse more money than is left on a transfer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TransferReversal + */ + public function createReversal($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s/reversals', $parentId), $params, $opts); + } + + /** + * Retrieves the details of an existing transfer. Supply the unique transfer ID + * from either a transfer creation request or the transfer list, and EDD\Vendor\Stripe will + * return the corresponding transfer information. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Transfer + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/transfers/%s', $id), $params, $opts); + } + + /** + * By default, you can see the 10 most recent reversals stored directly on the + * transfer object, but you can also retrieve details about a specific reversal + * stored on the transfer. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TransferReversal + */ + public function retrieveReversal($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/transfers/%s/reversals/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates the specified transfer by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged. + * + * This request accepts only metadata as an argument. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Transfer + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s', $id), $params, $opts); + } + + /** + * Updates the specified reversal by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged. + * + * This request only accepts metadata and description as arguments. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TransferReversal + */ + public function updateReversal($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s/reversals/%s', $parentId, $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/Service/WebhookEndpointService.php b/libraries/Stripe/lib/Service/WebhookEndpointService.php new file mode 100644 index 00000000000..c7ad63ed8e5 --- /dev/null +++ b/libraries/Stripe/lib/Service/WebhookEndpointService.php @@ -0,0 +1,97 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/webhook_endpoints', $params, $opts); + } + + /** + * A webhook endpoint must have a url and a list of + * enabled_events. You may optionally specify the Boolean + * connect parameter. If set to true, then a Connect webhook endpoint + * that notifies the specified url about events from all connected + * accounts is created; otherwise an account webhook endpoint that notifies the + * specified url only about events from your account is created. You + * can also create webhook endpoints in the webhooks settings + * section of the Dashboard. + * + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\WebhookEndpoint + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/webhook_endpoints', $params, $opts); + } + + /** + * You can also delete webhook endpoints via the webhook endpoint + * management page of the EDD\Vendor\Stripe dashboard. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\WebhookEndpoint + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); + } + + /** + * Retrieves the webhook endpoint with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\WebhookEndpoint + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); + } + + /** + * Updates the webhook endpoint. You may edit the url, the list of + * enabled_events, and the status of your endpoint. + * + * @param string $id + * @param null|array $params + * @param null|array|\EDD\Vendor\Stripe\Util\RequestOptions $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\WebhookEndpoint + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); + } +} diff --git a/libraries/Stripe/lib/SetupAttempt.php b/libraries/Stripe/lib/SetupAttempt.php new file mode 100644 index 00000000000..c13ec93d91d --- /dev/null +++ b/libraries/Stripe/lib/SetupAttempt.php @@ -0,0 +1,32 @@ +application on the SetupIntent at the time of this confirmation. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer The value of customer on the SetupIntent at the time of this confirmation. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string|\EDD\Vendor\Stripe\Account $on_behalf_of The value of on_behalf_of on the SetupIntent at the time of this confirmation. + * @property string|\EDD\Vendor\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupAttempt. + * @property \EDD\Vendor\Stripe\StripeObject $payment_method_details + * @property null|\EDD\Vendor\Stripe\ErrorObject $setup_error The error encountered during this attempt to confirm the SetupIntent, if any. + * @property string|\EDD\Vendor\Stripe\SetupIntent $setup_intent ID of the SetupIntent that this attempt belongs to. + * @property string $status Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned. + * @property string $usage The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session. + */ +class SetupAttempt extends ApiResource +{ + const OBJECT_NAME = 'setup_attempt'; + + use ApiOperations\All; +} diff --git a/libraries/Stripe/lib/SetupIntent.php b/libraries/Stripe/lib/SetupIntent.php new file mode 100644 index 00000000000..2a2147cac0c --- /dev/null +++ b/libraries/Stripe/lib/SetupIntent.php @@ -0,0 +1,131 @@ +PaymentIntents to drive + * the payment flow. + * + * Create a SetupIntent as soon as you're ready to collect your customer's payment + * credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no + * longer be valid. The SetupIntent then transitions through multiple statuses as + * it guides you through the setup process. + * + * Successful SetupIntents result in payment credentials that are optimized for + * future payments. For example, cardholders in certain regions may need to be + * run through Strong Customer + * Authentication at the time of payment method collection in order to + * streamline later off-session payments. + * If the SetupIntent is used with a Customer, + * upon success, it will automatically attach the resulting payment method to that + * Customer. We recommend using SetupIntents or setup_future_usage + * on PaymentIntents to save payment methods in order to prevent saving invalid or + * unoptimized payment methods. + * + * By using SetupIntents, you ensure that your customers experience the minimum set + * of required friction, even as regulations change over time. + * + * Related guide: Setup + * Intents API. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\EDD\Vendor\Stripe\StripeObject $application ID of the Connect application that created the SetupIntent. + * @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate. + * @property null|string $client_secret

    The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.

    The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

    + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer

    ID of the Customer this SetupIntent belongs to, if one exists.

    If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.

    + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|\EDD\Vendor\Stripe\ErrorObject $last_setup_error The error encountered in the previous SetupIntent confirmation. + * @property null|string|\EDD\Vendor\Stripe\SetupAttempt $latest_attempt The most recent SetupAttempt for this SetupIntent. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string|\EDD\Vendor\Stripe\Mandate $mandate ID of the multi use Mandate generated by the SetupIntent. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\EDD\Vendor\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + * @property null|string|\EDD\Vendor\Stripe\Account $on_behalf_of The account (if any) for which the setup is intended. + * @property null|string|\EDD\Vendor\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupIntent. + * @property null|\EDD\Vendor\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this SetupIntent. + * @property string[] $payment_method_types The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + * @property null|string|\EDD\Vendor\Stripe\Mandate $single_use_mandate ID of the single_use Mandate generated by the SetupIntent. + * @property string $status Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. + * @property string $usage

    Indicates how the payment method is intended to be used in the future.

    Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.

    + */ +class SetupIntent extends ApiResource +{ + const OBJECT_NAME = 'setup_intent'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const STATUS_CANCELED = 'canceled'; + const STATUS_PROCESSING = 'processing'; + const STATUS_REQUIRES_ACTION = 'requires_action'; + const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation'; + const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method'; + const STATUS_SUCCEEDED = 'succeeded'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent the canceled setup intent + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent the confirmed setup intent + */ + public function confirm($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/confirm'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SetupIntent the verified setup intent + */ + public function verifyMicrodeposits($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/verify_microdeposits'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/ShippingRate.php b/libraries/Stripe/lib/ShippingRate.php new file mode 100644 index 00000000000..cc3b8952d9f --- /dev/null +++ b/libraries/Stripe/lib/ShippingRate.php @@ -0,0 +1,40 @@ +Checkout Sessions + * to collect shipping costs. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the shipping rate can be used for new purchases. Defaults to true. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|\EDD\Vendor\Stripe\StripeObject $delivery_estimate The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + * @property null|string $display_name The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + * @property \EDD\Vendor\Stripe\StripeObject $fixed_amount + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. + * @property null|string|\EDD\Vendor\Stripe\TaxCode $tax_code A tax code ID. The Shipping tax code is txcd_92010001. + * @property string $type The type of calculation to use on the shipping rate. Can only be fixed_amount for now. + */ +class ShippingRate extends ApiResource +{ + const OBJECT_NAME = 'shipping_rate'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive'; + const TAX_BEHAVIOR_INCLUSIVE = 'inclusive'; + const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified'; + + const TYPE_FIXED_AMOUNT = 'fixed_amount'; +} diff --git a/libraries/Stripe/lib/Sigma/ScheduledQueryRun.php b/libraries/Stripe/lib/Sigma/ScheduledQueryRun.php new file mode 100644 index 00000000000..80e78ae368b --- /dev/null +++ b/libraries/Stripe/lib/Sigma/ScheduledQueryRun.php @@ -0,0 +1,37 @@ +scheduled + * a Sigma query, you'll receive a + * sigma.scheduled_query_run.created webhook each time the query runs. + * The webhook contains a ScheduledQueryRun object, which you can use + * to retrieve the query results. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property int $data_load_time When the query was run, Sigma contained a snapshot of your EDD\Vendor\Stripe data at this time. + * @property \EDD\Vendor\Stripe\StripeObject $error + * @property null|\EDD\Vendor\Stripe\File $file The file object representing the results of the query. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $result_available_until Time at which the result expires and is no longer available for download. + * @property string $sql SQL for the query. + * @property string $status The query's execution status, which will be completed for successful runs, and canceled, failed, or timed_out otherwise. + * @property string $title Title of the query. + */ +class ScheduledQueryRun extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'scheduled_query_run'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + + public static function classUrl() + { + return '/v1/sigma/scheduled_query_runs'; + } +} diff --git a/libraries/Stripe/lib/SingletonApiResource.php b/libraries/Stripe/lib/SingletonApiResource.php new file mode 100644 index 00000000000..891d6f76cec --- /dev/null +++ b/libraries/Stripe/lib/SingletonApiResource.php @@ -0,0 +1,40 @@ +refresh(); + + return $instance; + } + + /** + * @return string the endpoint associated with this singleton class + */ + public static function classUrl() + { + // Replace dots with slashes for namespaced resources, e.g. if the object's name is + // "foo.bar", then its URL will be "/v1/foo/bar". + + /** @phpstan-ignore-next-line */ + $base = \str_replace('.', '/', static::OBJECT_NAME); + + return "/v1/{$base}"; + } + + /** + * @return string the endpoint associated with this singleton API resource + */ + public function instanceUrl() + { + return static::classUrl(); + } +} diff --git a/libraries/Stripe/lib/Source.php b/libraries/Stripe/lib/Source.php new file mode 100644 index 00000000000..05e8ffdc902 --- /dev/null +++ b/libraries/Stripe/lib/Source.php @@ -0,0 +1,168 @@ +Source objects allow you to accept a variety of payment methods. + * They represent a customer's payment instrument, and can be used with the EDD\Vendor\Stripe + * API just like a Card object: once chargeable, they can be charged, + * or can be attached to customers. + * + * Related guides: Sources API and Sources & Customers. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\StripeObject $ach_credit_transfer + * @property \EDD\Vendor\Stripe\StripeObject $ach_debit + * @property \EDD\Vendor\Stripe\StripeObject $acss_debit + * @property \EDD\Vendor\Stripe\StripeObject $alipay + * @property null|int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources. + * @property \EDD\Vendor\Stripe\StripeObject $au_becs_debit + * @property \EDD\Vendor\Stripe\StripeObject $bancontact + * @property \EDD\Vendor\Stripe\StripeObject $card + * @property \EDD\Vendor\Stripe\StripeObject $card_present + * @property string $client_secret The client secret of the source. Used for client-side retrieval using a publishable key. + * @property \EDD\Vendor\Stripe\StripeObject $code_verification + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $currency Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources. + * @property string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + * @property \EDD\Vendor\Stripe\StripeObject $eps + * @property string $flow The authentication flow of the source. flow is one of redirect, receiver, code_verification, none. + * @property \EDD\Vendor\Stripe\StripeObject $giropay + * @property \EDD\Vendor\Stripe\StripeObject $ideal + * @property \EDD\Vendor\Stripe\StripeObject $klarna + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\StripeObject $multibanco + * @property null|\EDD\Vendor\Stripe\StripeObject $owner Information about the owner of the payment instrument that may be used or required by particular source types. + * @property \EDD\Vendor\Stripe\StripeObject $p24 + * @property \EDD\Vendor\Stripe\StripeObject $receiver + * @property \EDD\Vendor\Stripe\StripeObject $redirect + * @property \EDD\Vendor\Stripe\StripeObject $sepa_credit_transfer + * @property \EDD\Vendor\Stripe\StripeObject $sepa_debit + * @property \EDD\Vendor\Stripe\StripeObject $sofort + * @property \EDD\Vendor\Stripe\StripeObject $source_order + * @property null|string $statement_descriptor Extra information about a source. This will appear on your customer's statement every time you charge the source. + * @property string $status The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge. + * @property \EDD\Vendor\Stripe\StripeObject $three_d_secure + * @property string $type The type of the source. The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used. + * @property null|string $usage Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + * @property \EDD\Vendor\Stripe\StripeObject $wechat + */ +class Source extends ApiResource +{ + const OBJECT_NAME = 'source'; + + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const FLOW_CODE_VERIFICATION = 'code_verification'; + const FLOW_NONE = 'none'; + const FLOW_RECEIVER = 'receiver'; + const FLOW_REDIRECT = 'redirect'; + + const STATUS_CANCELED = 'canceled'; + const STATUS_CHARGEABLE = 'chargeable'; + const STATUS_CONSUMED = 'consumed'; + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; + + const USAGE_REUSABLE = 'reusable'; + const USAGE_SINGLE_USE = 'single_use'; + + use ApiOperations\NestedResource; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\UnexpectedValueException if the source is not attached to a customer + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Source the detached source + */ + public function detach($params = null, $opts = null) + { + self::_validateParams($params); + + $id = $this['id']; + if (!$id) { + $class = static::class; + $msg = "Could not determine which URL to request: {$class} instance " + . "has invalid ID: {$id}"; + + throw new Exception\UnexpectedValueException($msg, null); + } + + if ($this['customer']) { + $base = Customer::classUrl(); + $parentExtn = \urlencode(Util\Util::utf8($this['customer'])); + $extn = \urlencode(Util\Util::utf8($id)); + $url = "{$base}/{$parentExtn}/sources/{$extn}"; + + list($response, $opts) = $this->_request('delete', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + $message = 'This source object does not appear to be currently attached ' + . 'to a customer object.'; + + throw new Exception\UnexpectedValueException($message); + } + + /** + * @deprecated sourceTransactions is deprecated. Please use Source::allSourceTransactions instead. + * + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection the list of source transactions + */ + public function sourceTransactions($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/source_transactions'; + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param string $id + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection the list of source transactions + */ + public static function allSourceTransactions($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, '/source_transactions', $params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Source the verified source + */ + public function verify($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/verify'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/SourceTransaction.php b/libraries/Stripe/lib/SourceTransaction.php new file mode 100644 index 00000000000..125c074522b --- /dev/null +++ b/libraries/Stripe/lib/SourceTransaction.php @@ -0,0 +1,20 @@ +coreServiceFactory) { + $this->coreServiceFactory = new \EDD\Vendor\Stripe\Service\CoreServiceFactory($this); + } + + return $this->coreServiceFactory->__get($name); + } +} diff --git a/libraries/Stripe/lib/StripeClientInterface.php b/libraries/Stripe/lib/StripeClientInterface.php new file mode 100644 index 00000000000..ec9a4bd5b3e --- /dev/null +++ b/libraries/Stripe/lib/StripeClientInterface.php @@ -0,0 +1,21 @@ + "old_value"] + * + * If we update the object with `metadata[new]=new_value`, the server side + * object now has *both* fields: + * + * metadata = ["old" => "old_value", "new" => "new_value"] + * + * This is okay in itself because usually users will want to treat it as + * additive: + * + * $obj->metadata["new"] = "new_value"; + * $obj->save(); + * + * However, in other cases, they may want to replace the entire existing + * contents: + * + * $obj->metadata = ["new" => "new_value"]; + * $obj->save(); + * + * This is where things get a little bit tricky because in order to clear + * any old keys that may have existed, we actually have to send an explicit + * empty string to the server. So the operation above would have to send + * this form to get the intended behavior: + * + * metadata[old]=&metadata[new]=new_value + * + * This method allows us to track which parameters are considered additive, + * and lets us behave correctly where appropriate when serializing + * parameters to be sent. + * + * @return Util\Set Set of additive parameters + */ + public static function getAdditiveParams() + { + static $additiveParams = null; + if (null === $additiveParams) { + // Set `metadata` as additive so that when it's set directly we remember + // to clear keys that may have been previously set by sending empty + // values for them. + // + // It's possible that not every object has `metadata`, but having this + // option set when there is no `metadata` field is not harmful. + $additiveParams = new Util\Set([ + 'metadata', + ]); + } + + return $additiveParams; + } + + public function __construct($id = null, $opts = null) + { + list($id, $this->_retrieveOptions) = Util\Util::normalizeId($id); + $this->_opts = Util\RequestOptions::parse($opts); + $this->_originalValues = []; + $this->_values = []; + $this->_unsavedValues = new Util\Set(); + $this->_transientValues = new Util\Set(); + if (null !== $id) { + $this->_values['id'] = $id; + } + } + + // Standard accessor magic methods + public function __set($k, $v) + { + if (static::getPermanentAttributes()->includes($k)) { + throw new Exception\InvalidArgumentException( + "Cannot set {$k} on this object. HINT: you can't set: " . + \implode(', ', static::getPermanentAttributes()->toArray()) + ); + } + + if ('' === $v) { + throw new Exception\InvalidArgumentException( + 'You cannot set \'' . $k . '\'to an empty string. ' + . 'We interpret empty strings as NULL in requests. ' + . 'You may set obj->' . $k . ' = NULL to delete the property' + ); + } + + $this->_values[$k] = Util\Util::convertToStripeObject($v, $this->_opts); + $this->dirtyValue($this->_values[$k]); + $this->_unsavedValues->add($k); + } + + public function __isset($k) + { + return isset($this->_values[$k]); + } + + public function __unset($k) + { + unset($this->_values[$k]); + $this->_transientValues->add($k); + $this->_unsavedValues->discard($k); + } + + public function &__get($k) + { + // function should return a reference, using $nullval to return a reference to null + $nullval = null; + if (!empty($this->_values) && \array_key_exists($k, $this->_values)) { + return $this->_values[$k]; + } + if (!empty($this->_transientValues) && $this->_transientValues->includes($k)) { + $class = static::class; + $attrs = \implode(', ', \array_keys($this->_values)); + $message = "EDD\Vendor\Stripe Notice: Undefined property of {$class} instance: {$k}. " + . "HINT: The {$k} attribute was set in the past, however. " + . 'It was then wiped when refreshing the object ' + . "with the result returned by Stripe's API, " + . 'probably as a result of a save(). The attributes currently ' + . "available on this object are: {$attrs}"; + Stripe::getLogger()->error($message); + + return $nullval; + } + $class = static::class; + Stripe::getLogger()->error("EDD\Vendor\Stripe Notice: Undefined property of {$class} instance: {$k}"); + + return $nullval; + } + + // Magic method for var_dump output. Only works with PHP >= 5.6 + public function __debugInfo() + { + return $this->_values; + } + + // ArrayAccess methods + #[\ReturnTypeWillChange] + public function offsetSet($k, $v) + { + $this->{$k} = $v; + } + + #[\ReturnTypeWillChange] + public function offsetExists($k) + { + return \array_key_exists($k, $this->_values); + } + + #[\ReturnTypeWillChange] + public function offsetUnset($k) + { + unset($this->{$k}); + } + + #[\ReturnTypeWillChange] + public function offsetGet($k) + { + return \array_key_exists($k, $this->_values) ? $this->_values[$k] : null; + } + + /** + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + return \count($this->_values); + } + + public function keys() + { + return \array_keys($this->_values); + } + + public function values() + { + return \array_values($this->_values); + } + + /** + * This unfortunately needs to be public to be used in Util\Util. + * + * @param array $values + * @param null|array|string|Util\RequestOptions $opts + * + * @return static the object constructed from the given values + */ + public static function constructFrom($values, $opts = null) + { + $obj = new static(isset($values['id']) ? $values['id'] : null); + $obj->refreshFrom($values, $opts); + + return $obj; + } + + /** + * Refreshes this object using the provided values. + * + * @param array $values + * @param null|array|string|Util\RequestOptions $opts + * @param bool $partial defaults to false + */ + public function refreshFrom($values, $opts, $partial = false) + { + $this->_opts = Util\RequestOptions::parse($opts); + + $this->_originalValues = self::deepCopy($values); + + if ($values instanceof StripeObject) { + $values = $values->toArray(); + } + + // Wipe old state before setting new. This is useful for e.g. updating a + // customer, where there is no persistent card parameter. Mark those values + // which don't persist as transient + if ($partial) { + $removed = new Util\Set(); + } else { + $removed = new Util\Set(\array_diff(\array_keys($this->_values), \array_keys($values))); + } + + foreach ($removed->toArray() as $k) { + unset($this->{$k}); + } + + $this->updateAttributes($values, $opts, false); + foreach ($values as $k => $v) { + $this->_transientValues->discard($k); + $this->_unsavedValues->discard($k); + } + } + + /** + * Mass assigns attributes on the model. + * + * @param array $values + * @param null|array|string|Util\RequestOptions $opts + * @param bool $dirty defaults to true + */ + public function updateAttributes($values, $opts = null, $dirty = true) + { + foreach ($values as $k => $v) { + // Special-case metadata to always be cast as a StripeObject + // This is necessary in case metadata is empty, as PHP arrays do + // not differentiate between lists and hashes, and we consider + // empty arrays to be lists. + if (('metadata' === $k) && (\is_array($v))) { + $this->_values[$k] = StripeObject::constructFrom($v, $opts); + } else { + $this->_values[$k] = Util\Util::convertToStripeObject($v, $opts); + } + if ($dirty) { + $this->dirtyValue($this->_values[$k]); + } + $this->_unsavedValues->add($k); + } + } + + /** + * @param bool $force defaults to false + * + * @return array a recursive mapping of attributes to values for this object, + * including the proper value for deleted attributes + */ + public function serializeParameters($force = false) + { + $updateParams = []; + + foreach ($this->_values as $k => $v) { + // There are a few reasons that we may want to add in a parameter for + // update: + // + // 1. The `$force` option has been set. + // 2. We know that it was modified. + // 3. Its value is a StripeObject. A StripeObject may contain modified + // values within in that its parent StripeObject doesn't know about. + // + $original = \array_key_exists($k, $this->_originalValues) ? $this->_originalValues[$k] : null; + $unsaved = $this->_unsavedValues->includes($k); + if ($force || $unsaved || $v instanceof StripeObject) { + $updateParams[$k] = $this->serializeParamsValue( + $this->_values[$k], + $original, + $unsaved, + $force, + $k + ); + } + } + + // a `null` that makes it out of `serializeParamsValue` signals an empty + // value that we shouldn't appear in the serialized form of the object + return \array_filter( + $updateParams, + function ($v) { + return null !== $v; + } + ); + } + + public function serializeParamsValue($value, $original, $unsaved, $force, $key = null) + { + // The logic here is that essentially any object embedded in another + // object that had a `type` is actually an API resource of a different + // type that's been included in the response. These other resources must + // be updated from their proper endpoints, and therefore they are not + // included when serializing even if they've been modified. + // + // There are _some_ known exceptions though. + // + // For example, if the value is unsaved (meaning the user has set it), and + // it looks like the API resource is persisted with an ID, then we include + // the object so that parameters are serialized with a reference to its + // ID. + // + // Another example is that on save API calls it's sometimes desirable to + // update a customer's default source by setting a new card (or other) + // object with `->source=` and then saving the customer. The + // `saveWithParent` flag to override the default behavior allows us to + // handle these exceptions. + // + // We throw an error if a property was set explicitly but we can't do + // anything with it because the integration is probably not working as the + // user intended it to. + if (null === $value) { + return ''; + } + if (($value instanceof ApiResource) && (!$value->saveWithParent)) { + if (!$unsaved) { + return null; + } + if (isset($value->id)) { + return $value; + } + + throw new Exception\InvalidArgumentException( + "Cannot save property `{$key}` containing an API resource of type " . + \get_class($value) . ". It doesn't appear to be persisted and is " . + 'not marked as `saveWithParent`.' + ); + } + if (\is_array($value)) { + if (Util\Util::isList($value)) { + // Sequential array, i.e. a list + $update = []; + foreach ($value as $v) { + $update[] = $this->serializeParamsValue($v, null, true, $force); + } + // This prevents an array that's unchanged from being resent. + if ($update !== $this->serializeParamsValue($original, null, true, $force, $key)) { + return $update; + } + } else { + // Associative array, i.e. a map + return Util\Util::convertToStripeObject($value, $this->_opts)->serializeParameters(); + } + } elseif ($value instanceof StripeObject) { + $update = $value->serializeParameters($force); + if ($original && $unsaved && $key && static::getAdditiveParams()->includes($key)) { + $update = \array_merge(self::emptyValues($original), $update); + } + + return $update; + } else { + return $value; + } + } + + /** + * @return mixed + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Returns an associative array with the key and values composing the + * EDD\Vendor\Stripe object. + * + * @return array the associative array + */ + public function toArray() + { + $maybeToArray = function ($value) { + if (null === $value) { + return null; + } + + return \is_object($value) && \method_exists($value, 'toArray') ? $value->toArray() : $value; + }; + + return \array_reduce(\array_keys($this->_values), function ($acc, $k) use ($maybeToArray) { + if ('_' === \substr((string) $k, 0, 1)) { + return $acc; + } + $v = $this->_values[$k]; + if (Util\Util::isList($v)) { + $acc[$k] = \array_map($maybeToArray, $v); + } else { + $acc[$k] = $maybeToArray($v); + } + + return $acc; + }, []); + } + + /** + * Returns a pretty JSON representation of the EDD\Vendor\Stripe object. + * + * @return string the JSON representation of the EDD\Vendor\Stripe object + */ + public function toJSON() + { + return \json_encode($this->toArray(), \JSON_PRETTY_PRINT); + } + + public function __toString() + { + $class = static::class; + + return $class . ' JSON: ' . $this->toJSON(); + } + + /** + * Sets all keys within the StripeObject as unsaved so that they will be + * included with an update when `serializeParameters` is called. This + * method is also recursive, so any StripeObjects contained as values or + * which are values in a tenant array are also marked as dirty. + */ + public function dirty() + { + $this->_unsavedValues = new Util\Set(\array_keys($this->_values)); + foreach ($this->_values as $k => $v) { + $this->dirtyValue($v); + } + } + + protected function dirtyValue($value) + { + if (\is_array($value)) { + foreach ($value as $v) { + $this->dirtyValue($v); + } + } elseif ($value instanceof StripeObject) { + $value->dirty(); + } + } + + /** + * Produces a deep copy of the given object including support for arrays + * and StripeObjects. + * + * @param mixed $obj + */ + protected static function deepCopy($obj) + { + if (\is_array($obj)) { + $copy = []; + foreach ($obj as $k => $v) { + $copy[$k] = self::deepCopy($v); + } + + return $copy; + } + if ($obj instanceof StripeObject) { + return $obj::constructFrom( + self::deepCopy($obj->_values), + clone $obj->_opts + ); + } + + return $obj; + } + + /** + * Returns a hash of empty values for all the values that are in the given + * StripeObject. + * + * @param mixed $obj + */ + public static function emptyValues($obj) + { + if (\is_array($obj)) { + $values = $obj; + } elseif ($obj instanceof StripeObject) { + $values = $obj->_values; + } else { + throw new Exception\InvalidArgumentException( + 'empty_values got unexpected object type: ' . \get_class($obj) + ); + } + + return \array_fill_keys(\array_keys($values), ''); + } + + /** + * @return null|ApiResponse The last response from the EDD\Vendor\Stripe API + */ + public function getLastResponse() + { + return $this->_lastResponse; + } + + /** + * Sets the last response from the EDD\Vendor\Stripe API. + * + * @param ApiResponse $resp + */ + public function setLastResponse($resp) + { + $this->_lastResponse = $resp; + } + + /** + * Indicates whether or not the resource has been deleted on the server. + * Note that some, but not all, resources can indicate whether they have + * been deleted. + * + * @return bool whether the resource is deleted + */ + public function isDeleted() + { + return isset($this->_values['deleted']) ? $this->_values['deleted'] : false; + } +} diff --git a/libraries/Stripe/lib/StripeStreamingClientInterface.php b/libraries/Stripe/lib/StripeStreamingClientInterface.php new file mode 100644 index 00000000000..4467367b964 --- /dev/null +++ b/libraries/Stripe/lib/StripeStreamingClientInterface.php @@ -0,0 +1,11 @@ +Creating + * Subscriptions. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\EDD\Vendor\Stripe\StripeObject $application ID of the Connect Application that created the subscription. + * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's EDD\Vendor\Stripe account. + * @property \EDD\Vendor\Stripe\StripeObject $automatic_tax + * @property int $billing_cycle_anchor Determines the date of the first full invoice, and, for plans with month or year intervals, the day of the month for subsequent invoices. + * @property null|\EDD\Vendor\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + * @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled + * @property bool $cancel_at_period_end If the subscription has been canceled with the at_period_end flag set to true, cancel_at_period_end on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. + * @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end, canceled_at will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, EDD\Vendor\Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, EDD\Vendor\Stripe will email your customer an invoice with payment instructions. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. + * @property int $current_period_start Start of the current period that the subscription has been invoiced for. + * @property string|\EDD\Vendor\Stripe\Customer $customer ID of the customer who owns the subscription. + * @property null|int $days_until_due Number of days a customer has to pay invoices generated by this subscription. This value will be null for subscriptions where collection_method=charge_automatically. + * @property null|string|\EDD\Vendor\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source. + * @property null|string|\EDD\Vendor\Stripe\Account|\EDD\Vendor\Stripe\AlipayAccount|\EDD\Vendor\Stripe\BankAccount|\EDD\Vendor\Stripe\BitcoinReceiver|\EDD\Vendor\Stripe\Card|\EDD\Vendor\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If default_payment_method is also set, default_payment_method will take precedence. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source. + * @property null|\EDD\Vendor\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have tax_rates set. Invoices created will have their default_tax_rates populated from the subscription. + * @property null|\EDD\Vendor\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. + * @property null|int $ended_at If the subscription has ended, the date the subscription ended. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\SubscriptionItem> $items List of subscription items, each with an attached price. + * @property null|string|\EDD\Vendor\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at pending_invoice_item_interval. + * @property null|\EDD\Vendor\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused. + * @property null|\EDD\Vendor\Stripe\StripeObject $payment_settings Payment settings passed on to invoices created by the subscription. + * @property null|\EDD\Vendor\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval. + * @property null|string|\EDD\Vendor\Stripe\SetupIntent $pending_setup_intent You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide. + * @property null|\EDD\Vendor\Stripe\StripeObject $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid. + * @property null|string|\EDD\Vendor\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription + * @property int $start_date Date when the subscription was first created. The date might differ from the created date due to backdating. + * @property string $status

    Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, or unpaid.

    For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active state. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, the open invoice will be voided and no further invoices will be generated.

    A subscription that is currently in a trial period is trialing and moves to active when the trial period is over.

    If subscription collection_method=charge_automatically it becomes past_due when payment to renew it fails and canceled or unpaid (depending on your subscriptions settings) when EDD\Vendor\Stripe has exhausted all payment retry attempts.

    If subscription collection_method=send_invoice it becomes past_due when its invoice is not paid by the due date, and canceled or unpaid if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.

    + * @property null|string|\EDD\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription belongs to. + * @property null|int $trial_end If the subscription has a trial, the end of that trial. + * @property null|int $trial_start If the subscription has a trial, the beginning of that trial. + */ +class Subscription extends ApiResource +{ + const OBJECT_NAME = 'subscription'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Search; + use ApiOperations\Update; + + const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete'; + const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete'; + const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete'; + const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete'; + + const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; + const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; + const PRORATION_BEHAVIOR_NONE = 'none'; + + const STATUS_ACTIVE = 'active'; + const STATUS_CANCELED = 'canceled'; + const STATUS_INCOMPLETE = 'incomplete'; + const STATUS_INCOMPLETE_EXPIRED = 'incomplete_expired'; + const STATUS_PAST_DUE = 'past_due'; + const STATUS_TRIALING = 'trialing'; + const STATUS_UNPAID = 'unpaid'; + + use ApiOperations\Delete { + delete as protected _delete; + } + + public static function getSavedNestedResources() + { + static $savedNestedResources = null; + if (null === $savedNestedResources) { + $savedNestedResources = new Util\Set([ + 'source', + ]); + } + + return $savedNestedResources; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Subscription the deleted subscription + */ + public function cancel($params = null, $opts = null) + { + return $this->_delete($params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Subscription the updated subscription + */ + public function deleteDiscount($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/discount'; + list($response, $opts) = $this->_request('delete', $url, $params, $opts); + $this->refreshFrom(['discount' => null], $opts, true); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SearchResult the subscription search results + */ + public static function search($params = null, $opts = null) + { + $url = '/v1/subscriptions/search'; + + return self::_searchResource($url, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/SubscriptionItem.php b/libraries/Stripe/lib/SubscriptionItem.php new file mode 100644 index 00000000000..e9f8555b938 --- /dev/null +++ b/libraries/Stripe/lib/SubscriptionItem.php @@ -0,0 +1,84 @@ +key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\Plan $plan

    You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

    Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.

    For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.

    Related guides: Set up a subscription and more about products and prices.

    + * @property \EDD\Vendor\Stripe\Price $price

    Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

    For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

    Related guides: Set up a subscription, create an invoice, and more about products and prices.

    + * @property int $quantity The quantity of the plan to which the customer should be subscribed. + * @property string $subscription The subscription this subscription_item belongs to. + * @property null|\EDD\Vendor\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item. + */ +class SubscriptionItem extends ApiResource +{ + const OBJECT_NAME = 'subscription_item'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\NestedResource; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const PATH_USAGE_RECORDS = '/usage_records'; + + /** + * @param null|string $id the ID of the subscription item on which to create the usage record + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\UsageRecord + */ + public static function createUsageRecord($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_USAGE_RECORDS, $params, $opts); + } + + /** + * @deprecated usageRecordSummaries is deprecated. Please use SubscriptionItem::allUsageRecordSummaries instead. + * + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection the list of usage record summaries + */ + public function usageRecordSummaries($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/usage_record_summaries'; + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = \EDD\Vendor\Stripe\Util\Util::convertToStripeObject($response, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + const PATH_USAGE_RECORD_SUMMARIES = '/usage_record_summaries'; + + /** + * @param string $id the ID of the subscription item on which to retrieve the usage record summaries + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\UsageRecordSummary> the list of usage record summaries + */ + public static function allUsageRecordSummaries($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_USAGE_RECORD_SUMMARIES, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/SubscriptionSchedule.php b/libraries/Stripe/lib/SubscriptionSchedule.php new file mode 100644 index 00000000000..882d5f56cd7 --- /dev/null +++ b/libraries/Stripe/lib/SubscriptionSchedule.php @@ -0,0 +1,76 @@ +Subscription + * Schedules. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\EDD\Vendor\Stripe\StripeObject $application ID of the Connect Application that created the schedule. + * @property null|int $canceled_at Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + * @property null|int $completed_at Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|\EDD\Vendor\Stripe\StripeObject $current_phase Object representing the start and end dates for the current phase of the subscription schedule, if it is active. + * @property string|\EDD\Vendor\Stripe\Customer $customer ID of the customer who owns the subscription schedule. + * @property \EDD\Vendor\Stripe\StripeObject $default_settings + * @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are release and cancel. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\StripeObject[] $phases Configuration for the subscription schedule's phases. + * @property null|int $released_at Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + * @property null|string $released_subscription ID of the subscription once managed by the subscription schedule (if it is released). + * @property string $status The present status of the subscription schedule. Possible values are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide. + * @property null|string|\EDD\Vendor\Stripe\Subscription $subscription ID of the subscription managed by the subscription schedule. + * @property null|string|\EDD\Vendor\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription schedule belongs to. + */ +class SubscriptionSchedule extends ApiResource +{ + const OBJECT_NAME = 'subscription_schedule'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionSchedule the canceled subscription schedule + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\SubscriptionSchedule the released subscription schedule + */ + public function release($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/release'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/TaxCode.php b/libraries/Stripe/lib/TaxCode.php new file mode 100644 index 00000000000..2d7698b1995 --- /dev/null +++ b/libraries/Stripe/lib/TaxCode.php @@ -0,0 +1,22 @@ +Tax codes classify + * goods and services for tax purposes. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $description A detailed description of which types of products the tax code represents. + * @property string $name A short name for the tax code. + */ +class TaxCode extends ApiResource +{ + const OBJECT_NAME = 'tax_code'; + + use ApiOperations\All; + use ApiOperations\Retrieve; +} diff --git a/libraries/Stripe/lib/TaxId.php b/libraries/Stripe/lib/TaxId.php new file mode 100644 index 00000000000..6c97cd8c15e --- /dev/null +++ b/libraries/Stripe/lib/TaxId.php @@ -0,0 +1,120 @@ +customer. A customer's tax IDs + * are displayed on invoices and credit notes issued for the customer. + * + * Related guide: Customer + * Tax Identification Numbers. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $country Two-letter ISO code representing the country of the tax ID. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\EDD\Vendor\Stripe\Customer $customer ID of the customer. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property string $type Type of the tax ID, one of ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tw_vat, ua_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown + * @property string $value Value of the tax ID. + * @property null|\EDD\Vendor\Stripe\StripeObject $verification Tax ID verification information. + */ +class TaxId extends ApiResource +{ + const OBJECT_NAME = 'tax_id'; + + use ApiOperations\Delete; + + const TYPE_AE_TRN = 'ae_trn'; + const TYPE_AU_ABN = 'au_abn'; + const TYPE_AU_ARN = 'au_arn'; + const TYPE_BG_UIC = 'bg_uic'; + const TYPE_BR_CNPJ = 'br_cnpj'; + const TYPE_BR_CPF = 'br_cpf'; + const TYPE_CA_BN = 'ca_bn'; + const TYPE_CA_GST_HST = 'ca_gst_hst'; + const TYPE_CA_PST_BC = 'ca_pst_bc'; + const TYPE_CA_PST_MB = 'ca_pst_mb'; + const TYPE_CA_PST_SK = 'ca_pst_sk'; + const TYPE_CA_QST = 'ca_qst'; + const TYPE_CH_VAT = 'ch_vat'; + const TYPE_CL_TIN = 'cl_tin'; + const TYPE_ES_CIF = 'es_cif'; + const TYPE_EU_OSS_VAT = 'eu_oss_vat'; + const TYPE_EU_VAT = 'eu_vat'; + const TYPE_GB_VAT = 'gb_vat'; + const TYPE_GE_VAT = 'ge_vat'; + const TYPE_HK_BR = 'hk_br'; + const TYPE_HU_TIN = 'hu_tin'; + const TYPE_ID_NPWP = 'id_npwp'; + const TYPE_IL_VAT = 'il_vat'; + const TYPE_IN_GST = 'in_gst'; + const TYPE_IS_VAT = 'is_vat'; + const TYPE_JP_CN = 'jp_cn'; + const TYPE_JP_RN = 'jp_rn'; + const TYPE_KR_BRN = 'kr_brn'; + const TYPE_LI_UID = 'li_uid'; + const TYPE_MX_RFC = 'mx_rfc'; + const TYPE_MY_FRP = 'my_frp'; + const TYPE_MY_ITN = 'my_itn'; + const TYPE_MY_SST = 'my_sst'; + const TYPE_NO_VAT = 'no_vat'; + const TYPE_NZ_GST = 'nz_gst'; + const TYPE_RU_INN = 'ru_inn'; + const TYPE_RU_KPP = 'ru_kpp'; + const TYPE_SA_VAT = 'sa_vat'; + const TYPE_SG_GST = 'sg_gst'; + const TYPE_SG_UEN = 'sg_uen'; + const TYPE_SI_TIN = 'si_tin'; + const TYPE_TH_VAT = 'th_vat'; + const TYPE_TW_VAT = 'tw_vat'; + const TYPE_UA_VAT = 'ua_vat'; + const TYPE_UNKNOWN = 'unknown'; + const TYPE_US_EIN = 'us_ein'; + const TYPE_ZA_VAT = 'za_vat'; + + const VERIFICATION_STATUS_PENDING = 'pending'; + const VERIFICATION_STATUS_UNAVAILABLE = 'unavailable'; + const VERIFICATION_STATUS_UNVERIFIED = 'unverified'; + const VERIFICATION_STATUS_VERIFIED = 'verified'; + + /** + * @return string the API URL for this tax id + */ + public function instanceUrl() + { + $id = $this['id']; + $customer = $this['customer']; + if (!$id) { + throw new Exception\UnexpectedValueException( + "Could not determine which URL to request: class instance has invalid ID: {$id}" + ); + } + $id = Util\Util::utf8($id); + $customer = Util\Util::utf8($customer); + + $base = Customer::classUrl(); + $customerExtn = \urlencode($customer); + $extn = \urlencode($id); + + return "{$base}/{$customerExtn}/tax_ids/{$extn}"; + } + + /** + * @param array|string $_id + * @param null|array|string $_opts + * + * @throws \EDD\Vendor\Stripe\Exception\BadMethodCallException + */ + public static function retrieve($_id, $_opts = null) + { + $msg = 'Tax IDs cannot be retrieved without a customer ID. Retrieve ' . + "a tax ID using `Customer::retrieveTaxId('customer_id', " . + "'tax_id_id')`."; + + throw new Exception\BadMethodCallException($msg); + } +} diff --git a/libraries/Stripe/lib/TaxRate.php b/libraries/Stripe/lib/TaxRate.php new file mode 100644 index 00000000000..d4a62a9d160 --- /dev/null +++ b/libraries/Stripe/lib/TaxRate.php @@ -0,0 +1,50 @@ +invoices, subscriptions and + * Checkout + * Sessions to collect tax. + * + * Related guide: Tax + * Rates. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Defaults to true. When set to false, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + * @property null|string $country Two-letter country code (ISO 3166-1 alpha-2). + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + * @property string $display_name The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + * @property bool $inclusive This specifies if the tax rate is inclusive or exclusive. + * @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property float $percentage This represents the tax rate percent out of 100. + * @property null|string $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States. + * @property null|string $tax_type The high-level tax type, such as vat or sales_tax. + */ +class TaxRate extends ApiResource +{ + const OBJECT_NAME = 'tax_rate'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const TAX_TYPE_GST = 'gst'; + const TAX_TYPE_HST = 'hst'; + const TAX_TYPE_JCT = 'jct'; + const TAX_TYPE_PST = 'pst'; + const TAX_TYPE_QST = 'qst'; + const TAX_TYPE_RST = 'rst'; + const TAX_TYPE_SALES_TAX = 'sales_tax'; + const TAX_TYPE_VAT = 'vat'; +} diff --git a/libraries/Stripe/lib/Terminal/Configuration.php b/libraries/Stripe/lib/Terminal/Configuration.php new file mode 100644 index 00000000000..d32f02eb98d --- /dev/null +++ b/libraries/Stripe/lib/Terminal/Configuration.php @@ -0,0 +1,28 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $tipping + * @property \EDD\Vendor\Stripe\StripeObject $verifone_p400 + */ +class Configuration extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'terminal.configuration'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Delete; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/Terminal/ConnectionToken.php b/libraries/Stripe/lib/Terminal/ConnectionToken.php new file mode 100644 index 00000000000..ce342158fce --- /dev/null +++ b/libraries/Stripe/lib/Terminal/ConnectionToken.php @@ -0,0 +1,22 @@ +Fleet + * Management. + * + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens. + * @property string $secret Your application should pass this token to the EDD\Vendor\Stripe Terminal SDK. + */ +class ConnectionToken extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'terminal.connection_token'; + + use \EDD\Vendor\Stripe\ApiOperations\Create; +} diff --git a/libraries/Stripe/lib/Terminal/Location.php b/libraries/Stripe/lib/Terminal/Location.php new file mode 100644 index 00000000000..ed130499e9b --- /dev/null +++ b/libraries/Stripe/lib/Terminal/Location.php @@ -0,0 +1,30 @@ +Fleet + * Management. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\StripeObject $address + * @property string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location. + * @property string $display_name The display name of the location. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ +class Location extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'terminal.location'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Delete; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/Terminal/Reader.php b/libraries/Stripe/lib/Terminal/Reader.php new file mode 100644 index 00000000000..860553f99df --- /dev/null +++ b/libraries/Stripe/lib/Terminal/Reader.php @@ -0,0 +1,104 @@ +Connecting to a + * Reader. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\EDD\Vendor\Stripe\StripeObject $action The most recent action performed by the reader. + * @property null|string $device_sw_version The current software version of the reader. + * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, bbpos_chipper2x, bbpos_wisepos_e, or verifone_P400. + * @property null|string $ip_address The local IP address of the reader. + * @property string $label Custom label given to the reader for easier identification. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string|\EDD\Vendor\Stripe\Terminal\Location $location The location identifier of the reader. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $serial_number Serial number of the reader. + * @property null|string $status The networking status of the reader. + */ +class Reader extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'terminal.reader'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Delete; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + use \EDD\Vendor\Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader the canceled reader + */ + public function cancelAction($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel_action'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader the processed reader + */ + public function processPaymentIntent($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/process_payment_intent'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader the processed reader + */ + public function processSetupIntent($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/process_setup_intent'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Terminal\Reader the seted reader + */ + public function setReaderDisplay($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/set_reader_display'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/TestHelpers/TestClock.php b/libraries/Stripe/lib/TestHelpers/TestClock.php new file mode 100644 index 00000000000..9753c2735ff --- /dev/null +++ b/libraries/Stripe/lib/TestHelpers/TestClock.php @@ -0,0 +1,53 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $name The custom name supplied at creation. + * @property string $status The status of the Test Clock. + */ +class TestClock extends \EDD\Vendor\Stripe\ApiResource +{ + const OBJECT_NAME = 'test_helpers.test_clock'; + + use \EDD\Vendor\Stripe\ApiOperations\All; + use \EDD\Vendor\Stripe\ApiOperations\Create; + use \EDD\Vendor\Stripe\ApiOperations\Delete; + use \EDD\Vendor\Stripe\ApiOperations\Retrieve; + + const STATUS_ADVANCING = 'advancing'; + const STATUS_INTERNAL_FAILURE = 'internal_failure'; + const STATUS_READY = 'ready'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TestHelpers\TestClock the advanced test clock + */ + public function advance($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/advance'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/ThreeDSecure.php b/libraries/Stripe/lib/ThreeDSecure.php new file mode 100644 index 00000000000..04a19f5e8c0 --- /dev/null +++ b/libraries/Stripe/lib/ThreeDSecure.php @@ -0,0 +1,37 @@ +3D + * Secure object. Once the object has been created, you can use it to + * authenticate the cardholder and create a charge. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount of the charge that you will create when authentication completes. + * @property bool $authenticated True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. + * @property \EDD\Vendor\Stripe\Card $card

    You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.

    Related guide: Card Payments with Sources.

    + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $redirect_url If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". + * @property string $status Possible values are redirect_pending, succeeded, or failed. When the cardholder can be authenticated, the object starts with status redirect_pending. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status succeeded. failed indicates that authentication was attempted unsuccessfully. + */ +class ThreeDSecure extends ApiResource +{ + const OBJECT_NAME = 'three_d_secure'; + + use ApiOperations\Create; + use ApiOperations\Retrieve; + + /** + * @return string the endpoint URL for the given class + */ + public static function classUrl() + { + return '/v1/3d_secure'; + } +} diff --git a/libraries/Stripe/lib/Token.php b/libraries/Stripe/lib/Token.php new file mode 100644 index 00000000000..b3d56b1d989 --- /dev/null +++ b/libraries/Stripe/lib/Token.php @@ -0,0 +1,57 @@ +recommended payments integrations to + * perform this process client-side. This ensures that no sensitive card data + * touches your server, and allows your integration to operate in a PCI-compliant + * way. + * + * If you cannot use client-side tokenization, you can also create tokens using the + * API with either your publishable or secret API key. Keep in mind that if your + * integration uses this method, you are responsible for any PCI compliance that + * may be required, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information is not sent directly to + * Stripe, so we cannot determine how it is handled or stored. + * + * Tokens cannot be stored or used more than once. To store card or bank account + * information for later use, you can create Customer objects or Custom accounts. Note + * that Radar, our integrated solution + * for automatic fraud protection, performs best with integrations that use + * client-side tokenization. + * + * Related guide: Accept + * a payment + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \EDD\Vendor\Stripe\BankAccount $bank_account

    These bank accounts are payment methods on Customer objects.

    On the other hand External Accounts are transfer destinations on Account objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.

    Related guide: Bank Debits and Transfers.

    + * @property \EDD\Vendor\Stripe\Card $card

    You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.

    Related guide: Card Payments with Sources.

    + * @property null|string $client_ip IP address of the client that generated the token. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property string $type Type of the token: account, bank_account, card, or pii. + * @property bool $used Whether this token has already been used (tokens can be used only once). + */ +class Token extends ApiResource +{ + const OBJECT_NAME = 'token'; + + use ApiOperations\Create; + use ApiOperations\Retrieve; + + const TYPE_ACCOUNT = 'account'; + const TYPE_BANK_ACCOUNT = 'bank_account'; + const TYPE_CARD = 'card'; + const TYPE_PII = 'pii'; +} diff --git a/libraries/Stripe/lib/Topup.php b/libraries/Stripe/lib/Topup.php new file mode 100644 index 00000000000..35f38a123cc --- /dev/null +++ b/libraries/Stripe/lib/Topup.php @@ -0,0 +1,63 @@ +Topping Up your + * Platform Account. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount transferred. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|int $expected_availability_date Date the funds are expected to arrive in your EDD\Vendor\Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + * @property null|string $failure_code Error code explaining reason for top-up failure if available (see the errors section for a list of codes). + * @property null|string $failure_message Message to user further explaining reason for top-up failure if available. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\Source $source

    Source objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the EDD\Vendor\Stripe API just like a Card object: once chargeable, they can be charged, or can be attached to customers.

    Related guides: Sources API and Sources & Customers.

    + * @property null|string $statement_descriptor Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + * @property string $status The status of the top-up is either canceled, failed, pending, reversed, or succeeded. + * @property null|string $transfer_group A string that identifies this top-up as part of a group. + */ +class Topup extends ApiResource +{ + const OBJECT_NAME = 'topup'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const STATUS_CANCELED = 'canceled'; + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; + const STATUS_REVERSED = 'reversed'; + const STATUS_SUCCEEDED = 'succeeded'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Topup the canceled topup + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/libraries/Stripe/lib/Transfer.php b/libraries/Stripe/lib/Transfer.php new file mode 100644 index 00000000000..47d97bb9254 --- /dev/null +++ b/libraries/Stripe/lib/Transfer.php @@ -0,0 +1,130 @@ +Transfer object is created when you move funds between EDD\Vendor\Stripe + * accounts as part of Connect. + * + * Before April 6, 2017, transfers also represented movement of funds from a EDD\Vendor\Stripe + * account to a card or bank account. This behavior has since been split out into a + * Payout object, with + * corresponding payout endpoints. For more information, read about the transfer/payout split. + * + * Related guide: Creating Separate + * Charges and Transfers. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount in %s to be transferred. + * @property int $amount_reversed Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this transfer on your account balance. + * @property int $created Time that this record of the transfer was first created. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\EDD\Vendor\Stripe\Account $destination ID of the EDD\Vendor\Stripe account the transfer was sent to. + * @property string|\EDD\Vendor\Stripe\Charge $destination_payment If the destination is a EDD\Vendor\Stripe account, this will be the ID of the payment that the destination account received for the transfer. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TransferReversal> $reversals A list of reversals that have been applied to the transfer. + * @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + * @property null|string|\EDD\Vendor\Stripe\Charge $source_transaction ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. + * @property null|string $source_type The source balance this transfer came from. One of card, fpx, or bank_account. + * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details. + */ +class Transfer extends ApiResource +{ + const OBJECT_NAME = 'transfer'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\NestedResource; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const SOURCE_TYPE_ALIPAY_ACCOUNT = 'alipay_account'; + const SOURCE_TYPE_BANK_ACCOUNT = 'bank_account'; + const SOURCE_TYPE_CARD = 'card'; + const SOURCE_TYPE_FINANCING = 'financing'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Transfer the canceled transfer + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + const PATH_REVERSALS = '/reversals'; + + /** + * @param string $id the ID of the transfer on which to retrieve the transfer reversals + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\Collection<\EDD\Vendor\Stripe\TransferReversal> the list of transfer reversals + */ + public static function allReversals($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_REVERSALS, $params, $opts); + } + + /** + * @param string $id the ID of the transfer on which to create the transfer reversal + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TransferReversal + */ + public static function createReversal($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_REVERSALS, $params, $opts); + } + + /** + * @param string $id the ID of the transfer to which the transfer reversal belongs + * @param string $reversalId the ID of the transfer reversal to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TransferReversal + */ + public static function retrieveReversal($id, $reversalId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts); + } + + /** + * @param string $id the ID of the transfer to which the transfer reversal belongs + * @param string $reversalId the ID of the transfer reversal to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return \EDD\Vendor\Stripe\TransferReversal + */ + public static function updateReversal($id, $reversalId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts); + } +} diff --git a/libraries/Stripe/lib/TransferReversal.php b/libraries/Stripe/lib/TransferReversal.php new file mode 100644 index 00000000000..8b02348ebd9 --- /dev/null +++ b/libraries/Stripe/lib/TransferReversal.php @@ -0,0 +1,79 @@ +EDD\Vendor\Stripe Connect platforms can + * reverse transfers made to a connected account, either entirely or partially, and + * can also specify whether to refund any related application fees. Transfer + * reversals add to the platform's balance and subtract from the destination + * account's balance. + * + * Reversing a transfer that was made for a destination charge is allowed only + * up to the amount of the charge. It is possible to reverse a transfer_group + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: Reversing + * Transfers. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount, in %s. + * @property null|string|\EDD\Vendor\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\EDD\Vendor\Stripe\Refund $destination_payment_refund Linked payment refund for the transfer reversal. + * @property null|\EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\EDD\Vendor\Stripe\Refund $source_refund ID of the refund responsible for the transfer reversal. + * @property string|\EDD\Vendor\Stripe\Transfer $transfer ID of the transfer that was reversed. + */ +class TransferReversal extends ApiResource +{ + const OBJECT_NAME = 'transfer_reversal'; + + use ApiOperations\Update { + save as protected _save; + } + + /** + * @return string the API URL for this EDD\Vendor\Stripe transfer reversal + */ + public function instanceUrl() + { + $id = $this['id']; + $transfer = $this['transfer']; + if (!$id) { + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", + null + ); + } + $id = Util\Util::utf8($id); + $transfer = Util\Util::utf8($transfer); + + $base = Transfer::classUrl(); + $transferExtn = \urlencode($transfer); + $extn = \urlencode($id); + + return "{$base}/{$transferExtn}/reversals/{$extn}"; + } + + /** + * @param null|array|string $opts + * + * @throws \EDD\Vendor\Stripe\Exception\ApiErrorException if the request fails + * + * @return TransferReversal the saved reversal + */ + public function save($opts = null) + { + return $this->_save($opts); + } +} diff --git a/libraries/Stripe/lib/UsageRecord.php b/libraries/Stripe/lib/UsageRecord.php new file mode 100644 index 00000000000..b490b35925d --- /dev/null +++ b/libraries/Stripe/lib/UsageRecord.php @@ -0,0 +1,25 @@ +Metered + * Billing. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $quantity The usage quantity for the specified date. + * @property string $subscription_item The ID of the subscription item this usage record contains data for. + * @property int $timestamp The timestamp when this usage occurred. + */ +class UsageRecord extends ApiResource +{ + const OBJECT_NAME = 'usage_record'; +} diff --git a/libraries/Stripe/lib/UsageRecordSummary.php b/libraries/Stripe/lib/UsageRecordSummary.php new file mode 100644 index 00000000000..dbc41c29f1c --- /dev/null +++ b/libraries/Stripe/lib/UsageRecordSummary.php @@ -0,0 +1,19 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $period + * @property string $subscription_item The ID of the subscription item this summary is describing. + * @property int $total_usage The total usage within this usage period. + */ +class UsageRecordSummary extends ApiResource +{ + const OBJECT_NAME = 'usage_record_summary'; +} diff --git a/libraries/Stripe/lib/Util/CaseInsensitiveArray.php b/libraries/Stripe/lib/Util/CaseInsensitiveArray.php new file mode 100644 index 00000000000..30f4bbb1c36 --- /dev/null +++ b/libraries/Stripe/lib/Util/CaseInsensitiveArray.php @@ -0,0 +1,93 @@ +container = \array_change_key_case($initial_array, \CASE_LOWER); + } + + #[\ReturnTypeWillChange] + public function count() + { + return \count($this->container); + } + + /** + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return new \ArrayIterator($this->container); + } + + /** + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + $offset = static::maybeLowercase($offset); + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + $offset = static::maybeLowercase($offset); + + return isset($this->container[$offset]); + } + + /** + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + $offset = static::maybeLowercase($offset); + unset($this->container[$offset]); + } + + /** + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + $offset = static::maybeLowercase($offset); + + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + private static function maybeLowercase($v) + { + if (\is_string($v)) { + return \strtolower($v); + } + + return $v; + } +} diff --git a/libraries/Stripe/lib/Util/DefaultLogger.php b/libraries/Stripe/lib/Util/DefaultLogger.php new file mode 100644 index 00000000000..f613791b227 --- /dev/null +++ b/libraries/Stripe/lib/Util/DefaultLogger.php @@ -0,0 +1,29 @@ + 0) { + throw new \EDD\Vendor\Stripe\Exception\BadMethodCallException('DefaultLogger does not currently implement context. Please implement if you need it.'); + } + + if (null === $this->destination) { + \error_log($message, $this->messageType); + } else { + \error_log($message, $this->messageType, $this->destination); + } + } +} diff --git a/libraries/Stripe/lib/Util/LoggerInterface.php b/libraries/Stripe/lib/Util/LoggerInterface.php new file mode 100644 index 00000000000..deaa448a073 --- /dev/null +++ b/libraries/Stripe/lib/Util/LoggerInterface.php @@ -0,0 +1,34 @@ + \EDD\Vendor\Stripe\Account::class, + \EDD\Vendor\Stripe\AccountLink::OBJECT_NAME => \EDD\Vendor\Stripe\AccountLink::class, + \EDD\Vendor\Stripe\AlipayAccount::OBJECT_NAME => \EDD\Vendor\Stripe\AlipayAccount::class, + \EDD\Vendor\Stripe\ApplePayDomain::OBJECT_NAME => \EDD\Vendor\Stripe\ApplePayDomain::class, + \EDD\Vendor\Stripe\ApplicationFee::OBJECT_NAME => \EDD\Vendor\Stripe\ApplicationFee::class, + \EDD\Vendor\Stripe\ApplicationFeeRefund::OBJECT_NAME => \EDD\Vendor\Stripe\ApplicationFeeRefund::class, + \EDD\Vendor\Stripe\Balance::OBJECT_NAME => \EDD\Vendor\Stripe\Balance::class, + \EDD\Vendor\Stripe\BalanceTransaction::OBJECT_NAME => \EDD\Vendor\Stripe\BalanceTransaction::class, + \EDD\Vendor\Stripe\BankAccount::OBJECT_NAME => \EDD\Vendor\Stripe\BankAccount::class, + \EDD\Vendor\Stripe\BillingPortal\Configuration::OBJECT_NAME => \EDD\Vendor\Stripe\BillingPortal\Configuration::class, + \EDD\Vendor\Stripe\BillingPortal\Session::OBJECT_NAME => \EDD\Vendor\Stripe\BillingPortal\Session::class, + \EDD\Vendor\Stripe\BitcoinReceiver::OBJECT_NAME => \EDD\Vendor\Stripe\BitcoinReceiver::class, + \EDD\Vendor\Stripe\BitcoinTransaction::OBJECT_NAME => \EDD\Vendor\Stripe\BitcoinTransaction::class, + \EDD\Vendor\Stripe\Capability::OBJECT_NAME => \EDD\Vendor\Stripe\Capability::class, + \EDD\Vendor\Stripe\Card::OBJECT_NAME => \EDD\Vendor\Stripe\Card::class, + \EDD\Vendor\Stripe\CashBalance::OBJECT_NAME => \EDD\Vendor\Stripe\CashBalance::class, + \EDD\Vendor\Stripe\Charge::OBJECT_NAME => \EDD\Vendor\Stripe\Charge::class, + \EDD\Vendor\Stripe\Checkout\Session::OBJECT_NAME => \EDD\Vendor\Stripe\Checkout\Session::class, + \EDD\Vendor\Stripe\Collection::OBJECT_NAME => \EDD\Vendor\Stripe\Collection::class, + \EDD\Vendor\Stripe\CountrySpec::OBJECT_NAME => \EDD\Vendor\Stripe\CountrySpec::class, + \EDD\Vendor\Stripe\Coupon::OBJECT_NAME => \EDD\Vendor\Stripe\Coupon::class, + \EDD\Vendor\Stripe\CreditNote::OBJECT_NAME => \EDD\Vendor\Stripe\CreditNote::class, + \EDD\Vendor\Stripe\CreditNoteLineItem::OBJECT_NAME => \EDD\Vendor\Stripe\CreditNoteLineItem::class, + \EDD\Vendor\Stripe\Customer::OBJECT_NAME => \EDD\Vendor\Stripe\Customer::class, + \EDD\Vendor\Stripe\CustomerBalanceTransaction::OBJECT_NAME => \EDD\Vendor\Stripe\CustomerBalanceTransaction::class, + \EDD\Vendor\Stripe\Discount::OBJECT_NAME => \EDD\Vendor\Stripe\Discount::class, + \EDD\Vendor\Stripe\Dispute::OBJECT_NAME => \EDD\Vendor\Stripe\Dispute::class, + \EDD\Vendor\Stripe\EphemeralKey::OBJECT_NAME => \EDD\Vendor\Stripe\EphemeralKey::class, + \EDD\Vendor\Stripe\Event::OBJECT_NAME => \EDD\Vendor\Stripe\Event::class, + \EDD\Vendor\Stripe\ExchangeRate::OBJECT_NAME => \EDD\Vendor\Stripe\ExchangeRate::class, + \EDD\Vendor\Stripe\File::OBJECT_NAME => \EDD\Vendor\Stripe\File::class, + \EDD\Vendor\Stripe\File::OBJECT_NAME_ALT => \EDD\Vendor\Stripe\File::class, + \EDD\Vendor\Stripe\FileLink::OBJECT_NAME => \EDD\Vendor\Stripe\FileLink::class, + \EDD\Vendor\Stripe\FinancialConnections\Account::OBJECT_NAME => \EDD\Vendor\Stripe\FinancialConnections\Account::class, + \EDD\Vendor\Stripe\FinancialConnections\AccountOwner::OBJECT_NAME => \EDD\Vendor\Stripe\FinancialConnections\AccountOwner::class, + \EDD\Vendor\Stripe\FinancialConnections\AccountOwnership::OBJECT_NAME => \EDD\Vendor\Stripe\FinancialConnections\AccountOwnership::class, + \EDD\Vendor\Stripe\FinancialConnections\Session::OBJECT_NAME => \EDD\Vendor\Stripe\FinancialConnections\Session::class, + \EDD\Vendor\Stripe\FundingInstructions::OBJECT_NAME => \EDD\Vendor\Stripe\FundingInstructions::class, + \EDD\Vendor\Stripe\Identity\VerificationReport::OBJECT_NAME => \EDD\Vendor\Stripe\Identity\VerificationReport::class, + \EDD\Vendor\Stripe\Identity\VerificationSession::OBJECT_NAME => \EDD\Vendor\Stripe\Identity\VerificationSession::class, + \EDD\Vendor\Stripe\Invoice::OBJECT_NAME => \EDD\Vendor\Stripe\Invoice::class, + \EDD\Vendor\Stripe\InvoiceItem::OBJECT_NAME => \EDD\Vendor\Stripe\InvoiceItem::class, + \EDD\Vendor\Stripe\InvoiceLineItem::OBJECT_NAME => \EDD\Vendor\Stripe\InvoiceLineItem::class, + \EDD\Vendor\Stripe\Issuing\Authorization::OBJECT_NAME => \EDD\Vendor\Stripe\Issuing\Authorization::class, + \EDD\Vendor\Stripe\Issuing\Card::OBJECT_NAME => \EDD\Vendor\Stripe\Issuing\Card::class, + \EDD\Vendor\Stripe\Issuing\CardDetails::OBJECT_NAME => \EDD\Vendor\Stripe\Issuing\CardDetails::class, + \EDD\Vendor\Stripe\Issuing\Cardholder::OBJECT_NAME => \EDD\Vendor\Stripe\Issuing\Cardholder::class, + \EDD\Vendor\Stripe\Issuing\Dispute::OBJECT_NAME => \EDD\Vendor\Stripe\Issuing\Dispute::class, + \EDD\Vendor\Stripe\Issuing\Transaction::OBJECT_NAME => \EDD\Vendor\Stripe\Issuing\Transaction::class, + \EDD\Vendor\Stripe\LineItem::OBJECT_NAME => \EDD\Vendor\Stripe\LineItem::class, + \EDD\Vendor\Stripe\LoginLink::OBJECT_NAME => \EDD\Vendor\Stripe\LoginLink::class, + \EDD\Vendor\Stripe\Mandate::OBJECT_NAME => \EDD\Vendor\Stripe\Mandate::class, + \EDD\Vendor\Stripe\Order::OBJECT_NAME => \EDD\Vendor\Stripe\Order::class, + \EDD\Vendor\Stripe\OrderItem::OBJECT_NAME => \EDD\Vendor\Stripe\OrderItem::class, + \EDD\Vendor\Stripe\OrderReturn::OBJECT_NAME => \EDD\Vendor\Stripe\OrderReturn::class, + \EDD\Vendor\Stripe\PaymentIntent::OBJECT_NAME => \EDD\Vendor\Stripe\PaymentIntent::class, + \EDD\Vendor\Stripe\PaymentLink::OBJECT_NAME => \EDD\Vendor\Stripe\PaymentLink::class, + \EDD\Vendor\Stripe\PaymentMethod::OBJECT_NAME => \EDD\Vendor\Stripe\PaymentMethod::class, + \EDD\Vendor\Stripe\Payout::OBJECT_NAME => \EDD\Vendor\Stripe\Payout::class, + \EDD\Vendor\Stripe\Person::OBJECT_NAME => \EDD\Vendor\Stripe\Person::class, + \EDD\Vendor\Stripe\Plan::OBJECT_NAME => \EDD\Vendor\Stripe\Plan::class, + \EDD\Vendor\Stripe\Price::OBJECT_NAME => \EDD\Vendor\Stripe\Price::class, + \EDD\Vendor\Stripe\Product::OBJECT_NAME => \EDD\Vendor\Stripe\Product::class, + \EDD\Vendor\Stripe\PromotionCode::OBJECT_NAME => \EDD\Vendor\Stripe\PromotionCode::class, + \EDD\Vendor\Stripe\Quote::OBJECT_NAME => \EDD\Vendor\Stripe\Quote::class, + \EDD\Vendor\Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \EDD\Vendor\Stripe\Radar\EarlyFraudWarning::class, + \EDD\Vendor\Stripe\Radar\ValueList::OBJECT_NAME => \EDD\Vendor\Stripe\Radar\ValueList::class, + \EDD\Vendor\Stripe\Radar\ValueListItem::OBJECT_NAME => \EDD\Vendor\Stripe\Radar\ValueListItem::class, + \EDD\Vendor\Stripe\Recipient::OBJECT_NAME => \EDD\Vendor\Stripe\Recipient::class, + \EDD\Vendor\Stripe\RecipientTransfer::OBJECT_NAME => \EDD\Vendor\Stripe\RecipientTransfer::class, + \EDD\Vendor\Stripe\Refund::OBJECT_NAME => \EDD\Vendor\Stripe\Refund::class, + \EDD\Vendor\Stripe\Reporting\ReportRun::OBJECT_NAME => \EDD\Vendor\Stripe\Reporting\ReportRun::class, + \EDD\Vendor\Stripe\Reporting\ReportType::OBJECT_NAME => \EDD\Vendor\Stripe\Reporting\ReportType::class, + \EDD\Vendor\Stripe\Review::OBJECT_NAME => \EDD\Vendor\Stripe\Review::class, + \EDD\Vendor\Stripe\SearchResult::OBJECT_NAME => \EDD\Vendor\Stripe\SearchResult::class, + \EDD\Vendor\Stripe\SetupAttempt::OBJECT_NAME => \EDD\Vendor\Stripe\SetupAttempt::class, + \EDD\Vendor\Stripe\SetupIntent::OBJECT_NAME => \EDD\Vendor\Stripe\SetupIntent::class, + \EDD\Vendor\Stripe\ShippingRate::OBJECT_NAME => \EDD\Vendor\Stripe\ShippingRate::class, + \EDD\Vendor\Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => \EDD\Vendor\Stripe\Sigma\ScheduledQueryRun::class, + \EDD\Vendor\Stripe\SKU::OBJECT_NAME => \EDD\Vendor\Stripe\SKU::class, + \EDD\Vendor\Stripe\Source::OBJECT_NAME => \EDD\Vendor\Stripe\Source::class, + \EDD\Vendor\Stripe\SourceTransaction::OBJECT_NAME => \EDD\Vendor\Stripe\SourceTransaction::class, + \EDD\Vendor\Stripe\Subscription::OBJECT_NAME => \EDD\Vendor\Stripe\Subscription::class, + \EDD\Vendor\Stripe\SubscriptionItem::OBJECT_NAME => \EDD\Vendor\Stripe\SubscriptionItem::class, + \EDD\Vendor\Stripe\SubscriptionSchedule::OBJECT_NAME => \EDD\Vendor\Stripe\SubscriptionSchedule::class, + \EDD\Vendor\Stripe\TaxCode::OBJECT_NAME => \EDD\Vendor\Stripe\TaxCode::class, + \EDD\Vendor\Stripe\TaxId::OBJECT_NAME => \EDD\Vendor\Stripe\TaxId::class, + \EDD\Vendor\Stripe\TaxRate::OBJECT_NAME => \EDD\Vendor\Stripe\TaxRate::class, + \EDD\Vendor\Stripe\Terminal\Configuration::OBJECT_NAME => \EDD\Vendor\Stripe\Terminal\Configuration::class, + \EDD\Vendor\Stripe\Terminal\ConnectionToken::OBJECT_NAME => \EDD\Vendor\Stripe\Terminal\ConnectionToken::class, + \EDD\Vendor\Stripe\Terminal\Location::OBJECT_NAME => \EDD\Vendor\Stripe\Terminal\Location::class, + \EDD\Vendor\Stripe\Terminal\Reader::OBJECT_NAME => \EDD\Vendor\Stripe\Terminal\Reader::class, + \EDD\Vendor\Stripe\TestHelpers\TestClock::OBJECT_NAME => \EDD\Vendor\Stripe\TestHelpers\TestClock::class, + \EDD\Vendor\Stripe\ThreeDSecure::OBJECT_NAME => \EDD\Vendor\Stripe\ThreeDSecure::class, + \EDD\Vendor\Stripe\Token::OBJECT_NAME => \EDD\Vendor\Stripe\Token::class, + \EDD\Vendor\Stripe\Topup::OBJECT_NAME => \EDD\Vendor\Stripe\Topup::class, + \EDD\Vendor\Stripe\Transfer::OBJECT_NAME => \EDD\Vendor\Stripe\Transfer::class, + \EDD\Vendor\Stripe\TransferReversal::OBJECT_NAME => \EDD\Vendor\Stripe\TransferReversal::class, + \EDD\Vendor\Stripe\UsageRecord::OBJECT_NAME => \EDD\Vendor\Stripe\UsageRecord::class, + \EDD\Vendor\Stripe\UsageRecordSummary::OBJECT_NAME => \EDD\Vendor\Stripe\UsageRecordSummary::class, + \EDD\Vendor\Stripe\WebhookEndpoint::OBJECT_NAME => \EDD\Vendor\Stripe\WebhookEndpoint::class, + ]; +} diff --git a/libraries/Stripe/lib/Util/RandomGenerator.php b/libraries/Stripe/lib/Util/RandomGenerator.php new file mode 100644 index 00000000000..ee041ea278d --- /dev/null +++ b/libraries/Stripe/lib/Util/RandomGenerator.php @@ -0,0 +1,36 @@ + a list of headers that should be persisted across requests + */ + public static $HEADERS_TO_PERSIST = [ + 'Stripe-Account', + 'Stripe-Version', + ]; + + /** @var array */ + public $headers; + + /** @var null|string */ + public $apiKey; + + /** @var null|string */ + public $apiBase; + + /** + * @param null|string $key + * @param array $headers + * @param null|string $base + */ + public function __construct($key = null, $headers = [], $base = null) + { + $this->apiKey = $key; + $this->headers = $headers; + $this->apiBase = $base; + } + + /** + * @return array + */ + public function __debugInfo() + { + return [ + 'apiKey' => $this->redactedApiKey(), + 'headers' => $this->headers, + 'apiBase' => $this->apiBase, + ]; + } + + /** + * Unpacks an options array and merges it into the existing RequestOptions + * object. + * + * @param null|array|RequestOptions|string $options a key => value array + * @param bool $strict when true, forbid string form and arbitrary keys in array form + * + * @return RequestOptions + */ + public function merge($options, $strict = false) + { + $other_options = self::parse($options, $strict); + if (null === $other_options->apiKey) { + $other_options->apiKey = $this->apiKey; + } + if (null === $other_options->apiBase) { + $other_options->apiBase = $this->apiBase; + } + $other_options->headers = \array_merge($this->headers, $other_options->headers); + + return $other_options; + } + + /** + * Discards all headers that we don't want to persist across requests. + */ + public function discardNonPersistentHeaders() + { + foreach ($this->headers as $k => $v) { + if (!\in_array($k, self::$HEADERS_TO_PERSIST, true)) { + unset($this->headers[$k]); + } + } + } + + /** + * Unpacks an options array into an RequestOptions object. + * + * @param null|array|RequestOptions|string $options a key => value array + * @param bool $strict when true, forbid string form and arbitrary keys in array form + * + * @throws \EDD\Vendor\Stripe\Exception\InvalidArgumentException + * + * @return RequestOptions + */ + public static function parse($options, $strict = false) + { + if ($options instanceof self) { + return clone $options; + } + + if (null === $options) { + return new RequestOptions(null, [], null); + } + + if (\is_string($options)) { + if ($strict) { + $message = 'Do not pass a string for request options. If you want to set the ' + . 'API key, pass an array like ["api_key" => ] instead.'; + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException($message); + } + + return new RequestOptions($options, [], null); + } + + if (\is_array($options)) { + $headers = []; + $key = null; + $base = null; + + if (\array_key_exists('api_key', $options)) { + $key = $options['api_key']; + unset($options['api_key']); + } + if (\array_key_exists('idempotency_key', $options)) { + $headers['Idempotency-Key'] = $options['idempotency_key']; + unset($options['idempotency_key']); + } + if (\array_key_exists('stripe_account', $options)) { + $headers['Stripe-Account'] = $options['stripe_account']; + unset($options['stripe_account']); + } + if (\array_key_exists('stripe_version', $options)) { + $headers['Stripe-Version'] = $options['stripe_version']; + unset($options['stripe_version']); + } + if (\array_key_exists('api_base', $options)) { + $base = $options['api_base']; + unset($options['api_base']); + } + + if ($strict && !empty($options)) { + $message = 'Got unexpected keys in options array: ' . \implode(', ', \array_keys($options)); + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException($message); + } + + return new RequestOptions($key, $headers, $base); + } + + $message = 'The second argument to EDD\Vendor\Stripe API method calls is an ' + . 'optional per-request apiKey, which must be a string, or ' + . 'per-request options, which must be an array. (HINT: you can set ' + . 'a global apiKey by "Stripe::setApiKey()")'; + + throw new \EDD\Vendor\Stripe\Exception\InvalidArgumentException($message); + } + + private function redactedApiKey() + { + $pieces = \explode('_', $this->apiKey, 3); + $last = \array_pop($pieces); + $redactedLast = \strlen($last) > 4 + ? (\str_repeat('*', \strlen($last) - 4) . \substr($last, -4)) + : $last; + $pieces[] = $redactedLast; + + return \implode('_', $pieces); + } +} diff --git a/libraries/Stripe/lib/Util/Set.php b/libraries/Stripe/lib/Util/Set.php new file mode 100644 index 00000000000..793ff7ece3f --- /dev/null +++ b/libraries/Stripe/lib/Util/Set.php @@ -0,0 +1,48 @@ +_elts = []; + foreach ($members as $item) { + $this->_elts[$item] = true; + } + } + + public function includes($elt) + { + return isset($this->_elts[$elt]); + } + + public function add($elt) + { + $this->_elts[$elt] = true; + } + + public function discard($elt) + { + unset($this->_elts[$elt]); + } + + public function toArray() + { + return \array_keys($this->_elts); + } + + /** + * @return ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return new ArrayIterator($this->toArray()); + } +} diff --git a/libraries/Stripe/lib/Util/Util.php b/libraries/Stripe/lib/Util/Util.php new file mode 100644 index 00000000000..c9ffc39dd58 --- /dev/null +++ b/libraries/Stripe/lib/Util/Util.php @@ -0,0 +1,265 @@ +id; + } + if (static::isList($h)) { + $results = []; + foreach ($h as $v) { + $results[] = static::objectsToIds($v); + } + + return $results; + } + if (\is_array($h)) { + $results = []; + foreach ($h as $k => $v) { + if (null === $v) { + continue; + } + $results[$k] = static::objectsToIds($v); + } + + return $results; + } + + return $h; + } + + /** + * @param array $params + * + * @return string + */ + public static function encodeParameters($params) + { + $flattenedParams = self::flattenParams($params); + $pieces = []; + foreach ($flattenedParams as $param) { + list($k, $v) = $param; + $pieces[] = self::urlEncode($k) . '=' . self::urlEncode($v); + } + + return \implode('&', $pieces); + } + + /** + * @param array $params + * @param null|string $parentKey + * + * @return array + */ + public static function flattenParams($params, $parentKey = null) + { + $result = []; + + foreach ($params as $key => $value) { + $calculatedKey = $parentKey ? "{$parentKey}[{$key}]" : $key; + + if (self::isList($value)) { + $result = \array_merge($result, self::flattenParamsList($value, $calculatedKey)); + } elseif (\is_array($value)) { + $result = \array_merge($result, self::flattenParams($value, $calculatedKey)); + } else { + \array_push($result, [$calculatedKey, $value]); + } + } + + return $result; + } + + /** + * @param array $value + * @param string $calculatedKey + * + * @return array + */ + public static function flattenParamsList($value, $calculatedKey) + { + $result = []; + + foreach ($value as $i => $elem) { + if (self::isList($elem)) { + $result = \array_merge($result, self::flattenParamsList($elem, $calculatedKey)); + } elseif (\is_array($elem)) { + $result = \array_merge($result, self::flattenParams($elem, "{$calculatedKey}[{$i}]")); + } else { + \array_push($result, ["{$calculatedKey}[{$i}]", $elem]); + } + } + + return $result; + } + + /** + * @param string $key a string to URL-encode + * + * @return string the URL-encoded string + */ + public static function urlEncode($key) + { + $s = \urlencode((string) $key); + + // Don't use strict form encoding by changing the square bracket control + // characters back to their literals. This is fine by the server, and + // makes these parameter strings easier to read. + $s = \str_replace('%5B', '[', $s); + + return \str_replace('%5D', ']', $s); + } + + public static function normalizeId($id) + { + if (\is_array($id)) { + $params = $id; + $id = $params['id']; + unset($params['id']); + } else { + $params = []; + } + + return [$id, $params]; + } + + /** + * Returns UNIX timestamp in milliseconds. + * + * @return int current time in millis + */ + public static function currentTimeMillis() + { + return (int) \round(\microtime(true) * 1000); + } +} diff --git a/libraries/Stripe/lib/Webhook.php b/libraries/Stripe/lib/Webhook.php new file mode 100644 index 00000000000..82267958063 --- /dev/null +++ b/libraries/Stripe/lib/Webhook.php @@ -0,0 +1,42 @@ +webhook + * endpoints via the API to be notified about events that happen in your EDD\Vendor\Stripe + * account or connected accounts. + * + * Most users configure webhooks from the dashboard, which provides a + * user interface for registering and testing your webhook endpoints. + * + * Related guide: Setting up + * Webhooks. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $api_version The API version events are rendered as for this webhook endpoint. + * @property null|string $application The ID of the associated Connect application. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $description An optional description of what the webhook is used for. + * @property string[] $enabled_events The list of events to enable for this endpoint. ['*'] indicates that all events are enabled, except those that require explicit selection. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \EDD\Vendor\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $secret The endpoint's secret, used to generate webhook signatures. Only returned at creation. + * @property string $status The status of the webhook. It can be enabled or disabled. + * @property string $url The URL of the webhook endpoint. + */ +class WebhookEndpoint extends ApiResource +{ + const OBJECT_NAME = 'webhook_endpoint'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Delete; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/libraries/Stripe/lib/WebhookSignature.php b/libraries/Stripe/lib/WebhookSignature.php new file mode 100644 index 00000000000..f7a8ddf3004 --- /dev/null +++ b/libraries/Stripe/lib/WebhookSignature.php @@ -0,0 +1,140 @@ + 0) && (\abs(\time() - $timestamp) > $tolerance)) { + throw Exception\SignatureVerificationException::factory( + 'Timestamp outside the tolerance zone', + $payload, + $header + ); + } + + return true; + } + + /** + * Extracts the timestamp in a signature header. + * + * @param string $header the signature header + * + * @return int the timestamp contained in the header, or -1 if no valid + * timestamp is found + */ + private static function getTimestamp($header) + { + $items = \explode(',', $header); + + foreach ($items as $item) { + $itemParts = \explode('=', $item, 2); + if ('t' === $itemParts[0]) { + if (!\is_numeric($itemParts[1])) { + return -1; + } + + return (int) ($itemParts[1]); + } + } + + return -1; + } + + /** + * Extracts the signatures matching a given scheme in a signature header. + * + * @param string $header the signature header + * @param string $scheme the signature scheme to look for + * + * @return array the list of signatures matching the provided scheme + */ + private static function getSignatures($header, $scheme) + { + $signatures = []; + $items = \explode(',', $header); + + foreach ($items as $item) { + $itemParts = \explode('=', $item, 2); + if (\trim($itemParts[0]) === $scheme) { + $signatures[] = $itemParts[1]; + } + } + + return $signatures; + } + + /** + * Computes the signature for a given payload and secret. + * + * The current scheme used by EDD\Vendor\Stripe ("v1") is HMAC/SHA-256. + * + * @param string $payload the payload to sign + * @param string $secret the secret used to generate the signature + * + * @return string the signature as a string + */ + private static function computeSignature($payload, $secret) + { + return \hash_hmac('sha256', $payload, $secret); + } +} diff --git a/libraries/Stripe/phpdoc.dist.xml b/libraries/Stripe/phpdoc.dist.xml new file mode 100644 index 00000000000..b1ea92fadc4 --- /dev/null +++ b/libraries/Stripe/phpdoc.dist.xml @@ -0,0 +1,31 @@ + + + + build/phpdoc + + + latest + + + lib + + api + + + php + + stripe-php + + +