From 1c9e5e48bf1251d6be04cdc1a4f7ebcebfe7ee32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D?= Date: Tue, 15 Jan 2019 16:21:15 +0100 Subject: [PATCH] Merge branch 'master' of /home/rdb/DEV/PhpstormProjects/sysPass with conflicts. --- ajax/ajax_configSave.php | 73 +- ajax/ajax_upgrade.php | 74 +- .../api/Controllers/Help/HelpTrait.php | 65 + .../Helpers/Grid/GridInterface.php | 44 + .../Controllers/Helpers/HelperException.php | 52 + app/modules/web/Forms/FormBase.php | 88 + .../material-blue/css/search-card.css.map | 7 + .../material-blue/css/search-grid.css.map | 7 + .../css/selectize-custom.css.map | 7 + .../css/selectize-custom.min.css | 1 + .../themes/material-blue/css/styles.min.css | 1 + .../web/themes/material-blue/js/app-theme.map | 8 + .../themes/material-blue/js/app-theme.min.js | 21 + .../material-blue/views/plugin/index.inc | 4 + css/fonts.css | 68 +- css/fonts/MaterialIcons-Regular.svg | 1633 +- css/jquery-ui.min.css | 12 +- css/jquery-ui.structure.min.css | 8 +- css/magnific-popup.css | 748 +- css/magnific-popup.min.css | 2 +- css/material-icons.css | 118 +- css/toastr.css | 479 +- css/toastr.min.css | 2 +- inc/SP/Account/AccountInterface.class.php | 108 +- inc/SP/Api/ApiInterface.class.php | 86 +- inc/SP/Auth/AuthDataBase.class.php | 354 +- inc/SP/Auth/AuthInterface.class.php | 91 +- inc/SP/Auth/AuthResult.class.php | 151 +- .../Auth/Database/DatabaseAuthData.class.php | 72 +- inc/SP/Auth/Ldap/LdapAuthData.class.php | 250 +- inc/SP/Auth/Ldap/LdapInterface.class.php | 105 +- inc/SP/Auth/Ldap/LdapUtil.class.php | 114 +- inc/SP/Config/ConfigInterface.class.php | 171 +- inc/SP/Controller/TabControllerBase.class.php | 130 +- inc/SP/Controller/TabsInterface.class.php | 88 +- inc/SP/Core/Crypt/Crypt.class.php | 285 +- .../Core/Crypt/CryptSessionHandler.class.php | 249 +- inc/SP/Core/Crypt/Hash.class.php | 191 +- inc/SP/Core/Crypt/Vault.class.php | 273 +- inc/SP/Core/Events/EventDispatcher.class.php | 68 +- .../Events/EventDispatcherInterface.class.php | 81 +- .../Core/Exceptions/AuthException.class.php | 69 +- .../Exceptions/ConstraintException.class.php | 68 +- .../FileNotFoundException.class.php | 68 +- .../InvalidArgumentException.class.php | 68 +- .../InvalidClassException.class.php | 68 +- .../Core/Exceptions/ItemException.class.php | 70 +- .../Exceptions/ValidationException.class.php | 68 +- inc/SP/Core/ItemsTypeInterface.class.php | 86 +- .../Core/Messages/MessageInterface.class.php | 94 +- inc/SP/Core/Messages/TaskMessage.class.php | 458 +- inc/SP/Core/UI/ThemeIconsInterface.class.php | 78 +- inc/SP/Core/UI/ThemeInterface.class.php | 167 +- inc/SP/DataModel/AccountExtData.class.php | 410 +- inc/SP/DataModel/AccountHistoryData.class.php | 166 +- inc/SP/DataModel/AccountSearchData.class.php | 110 +- .../DataModel/CustomFieldBaseData.class.php | 498 +- inc/SP/DataModel/DataModelBase.class.php | 68 +- inc/SP/DataModel/DataModelInterface.class.php | 86 +- inc/SP/DataModel/FileExtData.class.php | 146 +- inc/SP/DataModel/GroupAccountsData.class.php | 206 +- inc/SP/DataModel/GroupUsersData.class.php | 206 +- inc/SP/DataModel/InstallData.class.php | 666 +- inc/SP/DataModel/ItemSearchData.class.php | 237 +- inc/SP/DataModel/PluginData.class.php | 262 +- inc/SP/DataModel/ProfileBaseData.class.php | 206 +- inc/SP/DataModel/ProfileData.class.php | 1422 +- inc/SP/DataModel/UserLoginData.class.php | 154 +- inc/SP/DataModel/UserPassData.class.php | 306 +- .../DataModel/UserPassRecoverData.class.php | 228 +- inc/SP/Forms/PublicLinkForm.class.php | 142 +- inc/SP/Html/Assets/FontIcon.class.php | 112 +- inc/SP/Html/Assets/IconBase.class.php | 223 +- inc/SP/Html/Assets/IconInterface.class.php | 128 +- inc/SP/Html/Assets/ImageIcon.class.php | 92 +- inc/SP/Html/DataGrid/DataGridData.class.php | 72 +- .../DataGrid/DataGridSortInterface.class.php | 194 +- inc/SP/Http/Cookies.class.php | 81 +- inc/SP/Http/JsonResponse.class.php | 556 +- inc/SP/Http/Message.class.php | 194 +- inc/SP/Import/ImportInterface.class.php | 90 +- inc/SP/Import/ImportParams.class.php | 268 +- inc/SP/Log/LogUtil.class.php | 89 +- inc/SP/Mgmt/Files/FileBase.class.php | 91 +- inc/SP/Mgmt/ItemSelectInterface.class.php | 74 +- inc/SP/Storage/DBStorageInterface.class.php | 110 +- inc/SP/Storage/FileStorageInterface.class.php | 102 +- inc/SP/Util/ArrayUtil.class.php | 199 +- inc/SP/Util/ConnectionInterface.class.php | 134 +- inc/SP/Util/Filter.class.php | 92 +- .../css/mdl-datetimepicker.min.css | 2 +- js/clipboard.js | 638 +- js/jquery-3.2.0.js | 20608 +++++++------ js/jquery-migrate-3.0.0.js | 1080 +- js/jquery-migrate-3.0.0.min.js | 34 +- js/jquery.magnific-popup.js | 3712 +-- js/jquery.magnific-popup.min.js | 2 +- js/jsencrypt.js | 9282 +++--- js/jsencrypt.min.js | 214 +- js/moment-timezone.js | 2417 +- js/moment-timezone.min.js | 28 +- js/moment.js | 25724 ++++++++-------- js/moment.min.js | 2 +- js/selectize-plugins.js | 58 +- js/selectize-plugins.min.js | 2 +- js/selectize.js | 7624 ++--- js/selectize.min.js | 2 +- js/spark-md5.js | 1406 +- js/spark-md5.min.js | 30 +- js/toastr.js | 928 +- js/toastr.min.js | 20 +- js/zxcvbn.min.js | 56 +- lib/BaseFunctions.php | 254 + lib/SP/Core/Acl/ActionNotFoundException.php | 37 + lib/SP/Core/Context/ContextCollection.php | 37 + lib/SP/Core/Context/ContextException.php | 37 + lib/SP/Core/Crypt/Cookie.php | 124 + lib/SP/Core/Crypt/SecureKeyCookie.php | 161 + lib/SP/Core/Crypt/Session.php | 91 + lib/SP/Core/Crypt/UUIDCookie.php | 82 + lib/SP/Core/DataCollection.php | 312 + lib/SP/Core/Events/EventReceiver.php | 57 + lib/SP/Core/Exceptions/ConfigException.php | 35 + .../Exceptions/InitializationException.php | 35 + .../Core/Exceptions/InvalidImageException.php | 35 + lib/SP/Core/Exceptions/QueryException.php | 35 + lib/SP/Core/PhpExtensionChecker.php | 278 + lib/SP/DataModel/AccountData.php | 527 + lib/SP/DataModel/AccountSearchVData.php | 568 + lib/SP/DataModel/AccountVData.php | 601 + lib/SP/DataModel/AuthTokenData.php | 204 + lib/SP/DataModel/CategoryData.php | 125 + lib/SP/DataModel/ClientData.php | 142 + lib/SP/DataModel/ConfigData.php | 87 + .../DataModel/CustomFieldDefinitionData.php | 214 + lib/SP/DataModel/CustomFieldTypeData.php | 97 + .../DataModel/Dto/AccountSearchResponse.php | 72 + lib/SP/DataModel/FileData.php | 204 + .../ItemPreset/AccountPermission.php | 141 + lib/SP/DataModel/ItemPreset/Password.php | 267 + .../DataModel/ItemPreset/SessionTimeout.php | 104 + lib/SP/DataModel/ItemPresetData.php | 250 + lib/SP/DataModel/PublicLinkData.php | 332 + lib/SP/DataModel/UserData.php | 416 + lib/SP/DataModel/UserLoginData.php | 100 + lib/SP/Http/Uri.php | 116 + lib/SP/Http/Xml.php | 89 + .../Controller/CrudControllerInterface.php | 76 + lib/SP/Mvc/Model/QueryAssignment.php | 99 + lib/SP/Mvc/Model/QueryJoin.php | 91 + .../View/Components/ItemAdapterInterface.php | 61 + lib/SP/Providers/Auth/Browser/Browser.php | 158 + .../Auth/Browser/BrowserAuthData.php | 37 + lib/SP/Providers/Auth/Database/Database.php | 136 + lib/SP/Providers/Auth/Ldap/LdapException.php | 37 + lib/SP/Providers/EventsTrait.php | 43 + lib/SP/Providers/Mail/MailParams.php | 62 + .../Providers/Mail/MailProviderException.php | 37 + lib/SP/Providers/Provider.php | 69 + .../Repositories/Config/ConfigRepository.php | 134 + .../CustomField/CustomFieldDefCollection.php | 37 + .../CustomField/CustomFieldRepository.php | 417 + .../Repositories/DuplicatedItemException.php | 37 + lib/SP/Repositories/Repository.php | 61 + .../Services/Account/AccountSearchFilter.php | 446 + .../Account/AccountToFavoriteService.php | 94 + .../Services/Account/AccountToTagService.php | 64 + lib/SP/Services/Api/ApiRequestException.php | 37 + lib/SP/Services/Api/ApiResponse.php | 110 + lib/SP/Services/Api/JsonRpcResponse.php | 93 + lib/SP/Services/Auth/AuthException.php | 37 + lib/SP/Services/Auth/LoginResponse.php | 70 + lib/SP/Services/Crypt/MasterPassService.php | 122 + .../Crypt/UpdateMasterPassRequest.php | 124 + .../Services/CustomField/CustomFieldItem.php | 47 + lib/SP/Services/EventLog/EventlogService.php | 100 + lib/SP/Services/Export/VerifyResult.php | 85 + lib/SP/Services/Import/ImportException.php | 37 + .../Install/DatabaseSetupInterface.php | 94 + .../ItemPreset/ItemPresetInterface.php | 39 + lib/SP/Services/Ldap/LdapImportParams.php | 58 + lib/SP/Services/ServiceException.php | 38 + lib/SP/Services/Upgrade/UpgradeException.php | 37 + lib/SP/Services/User/UpdatePassRequest.php | 96 + lib/SP/Services/User/UserLoginRequest.php | 134 + lib/SP/Services/User/UserLoginResponse.php | 566 + lib/SP/Services/User/UserPassResponse.php | 126 + .../Database/DatabaseConnectionData.php | 207 + lib/SP/Storage/Database/DatabaseException.php | 37 + lib/SP/Storage/Database/MySQLFileParser.php | 105 + lib/SP/Storage/Database/QueryResult.php | 200 + lib/SP/Storage/File/FileException.php | 37 + .../Storage/File/XmlFileStorageInterface.php | 70 + lib/SP/Util/Checks.php | 53 + lib/SP/Util/Filter.php | 107 + lib/SP/Util/HttpUtil.php | 73 + public/js/app-actions.min.js | 59 + public/js/app-triggers.min.js | 19 + public/js/app-util.min.js | 17 + public/vendor/css/reset.css | 76 + public/vendor/js/eventsource.min.js | 26 + public/vendor/js/jquery-3.3.1.min.js | 175 + public/vendor/js/zxcvbn-async.js | 51 + public/vendor/js/zxcvbn-async.min.js | 1 + schemas/30018010101.sql | 832 + schemas/30018072302.sql | 42 + schemas/30018072501.sql | 3 + schemas/30018083001.sql | 29 + schemas/30018083002.sql | 53 + tests/SP/Core/Crypt/CryptTest.php | 119 + tests/SP/Core/Crypt/SecureKeyCookieTest.php | 99 + tests/SP/DatabaseTestCase.php | 89 + tests/SP/Http/AddressTest.php | 268 + .../Controllers/CategoryControllerTest.php | 205 + .../Api/Controllers/ClientControllerTest.php | 209 + .../Api/Controllers/ConfigControllerTest.php | 79 + .../Api/Controllers/TagControllerTest.php | 202 + .../Controller/Validators/ValidatorTest.php | 102 + .../AccountFileRepositoryTest.php | 306 + .../AccountToFavoriteRepositoryTest.php | 109 + .../AccountToTagRepositoryTest.php | 150 + .../Repositories/CategoryRepositoryTest.php | 297 + .../SP/Repositories/ClientRepositoryTest.php | 308 + .../SP/Repositories/ConfigRepositoryTest.php | 159 + .../CustomFieldDefRepositoryTest.php | 294 + .../CustomFieldRepositoryTest.php | 408 + .../CustomFieldTypeRepositoryTest.php | 172 + .../Repositories/EventlogRepositoryTest.php | 154 + .../SP/Repositories/PluginRepositoryTest.php | 371 + tests/SP/Repositories/TagRepositoryTest.php | 253 + .../Repositories/UserGroupRepositoryTest.php | 355 + .../UserProfileRepositoryTest.php | 291 + tests/SP/Repositories/UserRepositoryTest.php | 443 + .../UserToUserGroupRepositoryTest.php | 231 + .../Account/AccountCryptServiceTest.php | 151 + .../Account/AccountSearchServiceTest.php | 493 + .../Account/AccountToFavoriteServiceTest.php | 104 + .../Account/AccountToTagServiceTest.php | 71 + tests/SP/Services/Api/ApiRequestTest.php | 104 + tests/SP/Services/Api/ApiServiceTest.php | 202 + .../SP/Services/Client/ClientServiceTest.php | 310 + .../SP/Services/Config/ConfigServiceTest.php | 151 + .../Services/Crypt/MasterPassServiceTest.php | 193 + .../Crypt/SecureSessionServiceTest.php | 59 + .../Crypt/TemporaryMasterPassServiceTest.php | 127 + .../CustomFieldCryptServiceTest.php | 89 + .../CustomField/CustomFieldDefServiceTest.php | 250 + .../CustomField/CustomFieldServiceTest.php | 398 + .../Services/Eventlog/EventlogServiceTest.php | 147 + .../SP/Services/Import/SyspassImportTest.php | 226 + .../SP/Services/Import/XmlFileImportTest.php | 86 + tests/SP/Services/Import/XmlImportTest.php | 85 + .../SP/Services/Plugin/PluginServiceTest.php | 384 + tests/SP/Services/Tag/TagServiceTest.php | 239 + .../SP/Services/User/UserPassServiceTest.php | 220 + tests/SP/Services/User/UserServiceTest.php | 709 + .../UserGroup/UserToUserGroupServiceTest.php | 192 + .../UserProfile/UserProfileServiceTest.php | 286 + tests/SP/Storage/FileHandlerTest.php | 167 + tests/SP/Storage/XmlHandlerTest.php | 117 + tests/res/config/actions.xml | 868 + tests/res/datasets/syspass.xml | 545 + tests/res/datasets/syspass_account.xml | 437 + tests/res/datasets/syspass_accountAcl.xml | 209 + tests/res/datasets/syspass_accountCrypt.xml | 232 + .../res/datasets/syspass_accountFavorite.xml | 181 + tests/res/datasets/syspass_accountFile.xml | 272 + tests/res/datasets/syspass_accountHistory.xml | 387 + tests/res/datasets/syspass_accountSearch.xml | 213 + tests/res/datasets/syspass_authToken.xml | 57 + tests/res/datasets/syspass_config.xml | 51 + tests/res/datasets/syspass_customField.xml | 63 + tests/res/datasets/syspass_eventlog.xml | 175 + tests/res/datasets/syspass_plugin.xml | 28 + tests/res/datasets/syspass_publicLink.xml | 53 + tests/res/datasets/syspass_tag.xml | 28 + tests/res/datasets/syspass_track.xml | 55 + tests/res/datasets/syspass_user.xml | 159 + tests/res/datasets/syspass_userGroup.xml | 90 + tests/res/import/data.csv | 7 + tests/res/import/data_empty.xml | 3 + tests/res/import/data_invalid.csv | 3 + tests/res/import/data_keepass.xml | 494 + tests/res/import/data_syspass.xml | 143 + tests/res/import/data_syspass_encrypted.xml | 17 + tests/res/import/data_syspass_invalid.xml | 139 + tests/res/import/data_syspass_valid_hash.xml | 91 + tests/res/json/account_add.json | 23 + tests/res/json/account_search.json | 13 + tests/res/json/account_viewPass.json | 11 + 290 files changed, 74421 insertions(+), 44683 deletions(-) create mode 100644 app/modules/api/Controllers/Help/HelpTrait.php create mode 100644 app/modules/web/Controllers/Helpers/Grid/GridInterface.php create mode 100644 app/modules/web/Controllers/Helpers/HelperException.php create mode 100644 app/modules/web/Forms/FormBase.php create mode 100644 app/modules/web/themes/material-blue/css/search-card.css.map create mode 100644 app/modules/web/themes/material-blue/css/search-grid.css.map create mode 100644 app/modules/web/themes/material-blue/css/selectize-custom.css.map create mode 100644 app/modules/web/themes/material-blue/css/selectize-custom.min.css create mode 100644 app/modules/web/themes/material-blue/css/styles.min.css create mode 100644 app/modules/web/themes/material-blue/js/app-theme.map create mode 100644 app/modules/web/themes/material-blue/js/app-theme.min.js create mode 100644 app/modules/web/themes/material-blue/views/plugin/index.inc create mode 100644 lib/BaseFunctions.php create mode 100644 lib/SP/Core/Acl/ActionNotFoundException.php create mode 100644 lib/SP/Core/Context/ContextCollection.php create mode 100644 lib/SP/Core/Context/ContextException.php create mode 100644 lib/SP/Core/Crypt/Cookie.php create mode 100644 lib/SP/Core/Crypt/SecureKeyCookie.php create mode 100644 lib/SP/Core/Crypt/Session.php create mode 100644 lib/SP/Core/Crypt/UUIDCookie.php create mode 100644 lib/SP/Core/DataCollection.php create mode 100644 lib/SP/Core/Events/EventReceiver.php create mode 100644 lib/SP/Core/Exceptions/ConfigException.php create mode 100644 lib/SP/Core/Exceptions/InitializationException.php create mode 100644 lib/SP/Core/Exceptions/InvalidImageException.php create mode 100644 lib/SP/Core/Exceptions/QueryException.php create mode 100644 lib/SP/Core/PhpExtensionChecker.php create mode 100644 lib/SP/DataModel/AccountData.php create mode 100644 lib/SP/DataModel/AccountSearchVData.php create mode 100644 lib/SP/DataModel/AccountVData.php create mode 100644 lib/SP/DataModel/AuthTokenData.php create mode 100644 lib/SP/DataModel/CategoryData.php create mode 100644 lib/SP/DataModel/ClientData.php create mode 100644 lib/SP/DataModel/ConfigData.php create mode 100644 lib/SP/DataModel/CustomFieldDefinitionData.php create mode 100644 lib/SP/DataModel/CustomFieldTypeData.php create mode 100644 lib/SP/DataModel/Dto/AccountSearchResponse.php create mode 100644 lib/SP/DataModel/FileData.php create mode 100644 lib/SP/DataModel/ItemPreset/AccountPermission.php create mode 100644 lib/SP/DataModel/ItemPreset/Password.php create mode 100644 lib/SP/DataModel/ItemPreset/SessionTimeout.php create mode 100644 lib/SP/DataModel/ItemPresetData.php create mode 100644 lib/SP/DataModel/PublicLinkData.php create mode 100644 lib/SP/DataModel/UserData.php create mode 100644 lib/SP/DataModel/UserLoginData.php create mode 100644 lib/SP/Http/Uri.php create mode 100644 lib/SP/Http/Xml.php create mode 100644 lib/SP/Mvc/Controller/CrudControllerInterface.php create mode 100644 lib/SP/Mvc/Model/QueryAssignment.php create mode 100644 lib/SP/Mvc/Model/QueryJoin.php create mode 100644 lib/SP/Mvc/View/Components/ItemAdapterInterface.php create mode 100644 lib/SP/Providers/Auth/Browser/Browser.php create mode 100644 lib/SP/Providers/Auth/Browser/BrowserAuthData.php create mode 100644 lib/SP/Providers/Auth/Database/Database.php create mode 100644 lib/SP/Providers/Auth/Ldap/LdapException.php create mode 100644 lib/SP/Providers/EventsTrait.php create mode 100644 lib/SP/Providers/Mail/MailParams.php create mode 100644 lib/SP/Providers/Mail/MailProviderException.php create mode 100644 lib/SP/Providers/Provider.php create mode 100644 lib/SP/Repositories/Config/ConfigRepository.php create mode 100644 lib/SP/Repositories/CustomField/CustomFieldDefCollection.php create mode 100644 lib/SP/Repositories/CustomField/CustomFieldRepository.php create mode 100644 lib/SP/Repositories/DuplicatedItemException.php create mode 100644 lib/SP/Repositories/Repository.php create mode 100644 lib/SP/Services/Account/AccountSearchFilter.php create mode 100644 lib/SP/Services/Account/AccountToFavoriteService.php create mode 100644 lib/SP/Services/Account/AccountToTagService.php create mode 100644 lib/SP/Services/Api/ApiRequestException.php create mode 100644 lib/SP/Services/Api/ApiResponse.php create mode 100644 lib/SP/Services/Api/JsonRpcResponse.php create mode 100644 lib/SP/Services/Auth/AuthException.php create mode 100644 lib/SP/Services/Auth/LoginResponse.php create mode 100644 lib/SP/Services/Crypt/MasterPassService.php create mode 100644 lib/SP/Services/Crypt/UpdateMasterPassRequest.php create mode 100644 lib/SP/Services/CustomField/CustomFieldItem.php create mode 100644 lib/SP/Services/EventLog/EventlogService.php create mode 100644 lib/SP/Services/Export/VerifyResult.php create mode 100644 lib/SP/Services/Import/ImportException.php create mode 100644 lib/SP/Services/Install/DatabaseSetupInterface.php create mode 100644 lib/SP/Services/ItemPreset/ItemPresetInterface.php create mode 100644 lib/SP/Services/Ldap/LdapImportParams.php create mode 100644 lib/SP/Services/ServiceException.php create mode 100644 lib/SP/Services/Upgrade/UpgradeException.php create mode 100644 lib/SP/Services/User/UpdatePassRequest.php create mode 100644 lib/SP/Services/User/UserLoginRequest.php create mode 100644 lib/SP/Services/User/UserLoginResponse.php create mode 100644 lib/SP/Services/User/UserPassResponse.php create mode 100644 lib/SP/Storage/Database/DatabaseConnectionData.php create mode 100644 lib/SP/Storage/Database/DatabaseException.php create mode 100644 lib/SP/Storage/Database/MySQLFileParser.php create mode 100644 lib/SP/Storage/Database/QueryResult.php create mode 100644 lib/SP/Storage/File/FileException.php create mode 100644 lib/SP/Storage/File/XmlFileStorageInterface.php create mode 100644 lib/SP/Util/Checks.php create mode 100644 lib/SP/Util/Filter.php create mode 100644 lib/SP/Util/HttpUtil.php create mode 100644 public/js/app-actions.min.js create mode 100644 public/js/app-triggers.min.js create mode 100644 public/js/app-util.min.js create mode 100644 public/vendor/css/reset.css create mode 100644 public/vendor/js/eventsource.min.js create mode 100644 public/vendor/js/jquery-3.3.1.min.js create mode 100644 public/vendor/js/zxcvbn-async.js create mode 100644 public/vendor/js/zxcvbn-async.min.js create mode 100644 schemas/30018010101.sql create mode 100644 schemas/30018072302.sql create mode 100644 schemas/30018072501.sql create mode 100644 schemas/30018083001.sql create mode 100644 schemas/30018083002.sql create mode 100644 tests/SP/Core/Crypt/CryptTest.php create mode 100644 tests/SP/Core/Crypt/SecureKeyCookieTest.php create mode 100644 tests/SP/DatabaseTestCase.php create mode 100644 tests/SP/Http/AddressTest.php create mode 100644 tests/SP/Modules/Api/Controllers/CategoryControllerTest.php create mode 100644 tests/SP/Modules/Api/Controllers/ClientControllerTest.php create mode 100644 tests/SP/Modules/Api/Controllers/ConfigControllerTest.php create mode 100644 tests/SP/Modules/Api/Controllers/TagControllerTest.php create mode 100644 tests/SP/Mvc/Controller/Validators/ValidatorTest.php create mode 100644 tests/SP/Repositories/AccountFileRepositoryTest.php create mode 100644 tests/SP/Repositories/AccountToFavoriteRepositoryTest.php create mode 100644 tests/SP/Repositories/AccountToTagRepositoryTest.php create mode 100644 tests/SP/Repositories/CategoryRepositoryTest.php create mode 100644 tests/SP/Repositories/ClientRepositoryTest.php create mode 100644 tests/SP/Repositories/ConfigRepositoryTest.php create mode 100644 tests/SP/Repositories/CustomFieldDefRepositoryTest.php create mode 100644 tests/SP/Repositories/CustomFieldRepositoryTest.php create mode 100644 tests/SP/Repositories/CustomFieldTypeRepositoryTest.php create mode 100644 tests/SP/Repositories/EventlogRepositoryTest.php create mode 100644 tests/SP/Repositories/PluginRepositoryTest.php create mode 100644 tests/SP/Repositories/TagRepositoryTest.php create mode 100644 tests/SP/Repositories/UserGroupRepositoryTest.php create mode 100644 tests/SP/Repositories/UserProfileRepositoryTest.php create mode 100644 tests/SP/Repositories/UserRepositoryTest.php create mode 100644 tests/SP/Repositories/UserToUserGroupRepositoryTest.php create mode 100644 tests/SP/Services/Account/AccountCryptServiceTest.php create mode 100644 tests/SP/Services/Account/AccountSearchServiceTest.php create mode 100644 tests/SP/Services/Account/AccountToFavoriteServiceTest.php create mode 100644 tests/SP/Services/Account/AccountToTagServiceTest.php create mode 100644 tests/SP/Services/Api/ApiRequestTest.php create mode 100644 tests/SP/Services/Api/ApiServiceTest.php create mode 100644 tests/SP/Services/Client/ClientServiceTest.php create mode 100644 tests/SP/Services/Config/ConfigServiceTest.php create mode 100644 tests/SP/Services/Crypt/MasterPassServiceTest.php create mode 100644 tests/SP/Services/Crypt/SecureSessionServiceTest.php create mode 100644 tests/SP/Services/Crypt/TemporaryMasterPassServiceTest.php create mode 100644 tests/SP/Services/CustomField/CustomFieldCryptServiceTest.php create mode 100644 tests/SP/Services/CustomField/CustomFieldDefServiceTest.php create mode 100644 tests/SP/Services/CustomField/CustomFieldServiceTest.php create mode 100644 tests/SP/Services/Eventlog/EventlogServiceTest.php create mode 100644 tests/SP/Services/Import/SyspassImportTest.php create mode 100644 tests/SP/Services/Import/XmlFileImportTest.php create mode 100644 tests/SP/Services/Import/XmlImportTest.php create mode 100644 tests/SP/Services/Plugin/PluginServiceTest.php create mode 100644 tests/SP/Services/Tag/TagServiceTest.php create mode 100644 tests/SP/Services/User/UserPassServiceTest.php create mode 100644 tests/SP/Services/User/UserServiceTest.php create mode 100644 tests/SP/Services/UserGroup/UserToUserGroupServiceTest.php create mode 100644 tests/SP/Services/UserProfile/UserProfileServiceTest.php create mode 100644 tests/SP/Storage/FileHandlerTest.php create mode 100644 tests/SP/Storage/XmlHandlerTest.php create mode 100644 tests/res/config/actions.xml create mode 100644 tests/res/datasets/syspass.xml create mode 100644 tests/res/datasets/syspass_account.xml create mode 100644 tests/res/datasets/syspass_accountAcl.xml create mode 100644 tests/res/datasets/syspass_accountCrypt.xml create mode 100644 tests/res/datasets/syspass_accountFavorite.xml create mode 100644 tests/res/datasets/syspass_accountFile.xml create mode 100644 tests/res/datasets/syspass_accountHistory.xml create mode 100644 tests/res/datasets/syspass_accountSearch.xml create mode 100644 tests/res/datasets/syspass_authToken.xml create mode 100644 tests/res/datasets/syspass_config.xml create mode 100644 tests/res/datasets/syspass_customField.xml create mode 100644 tests/res/datasets/syspass_eventlog.xml create mode 100644 tests/res/datasets/syspass_plugin.xml create mode 100644 tests/res/datasets/syspass_publicLink.xml create mode 100644 tests/res/datasets/syspass_tag.xml create mode 100644 tests/res/datasets/syspass_track.xml create mode 100644 tests/res/datasets/syspass_user.xml create mode 100644 tests/res/datasets/syspass_userGroup.xml create mode 100644 tests/res/import/data.csv create mode 100644 tests/res/import/data_empty.xml create mode 100644 tests/res/import/data_invalid.csv create mode 100644 tests/res/import/data_keepass.xml create mode 100644 tests/res/import/data_syspass.xml create mode 100644 tests/res/import/data_syspass_encrypted.xml create mode 100644 tests/res/import/data_syspass_invalid.xml create mode 100644 tests/res/import/data_syspass_valid_hash.xml create mode 100644 tests/res/json/account_add.json create mode 100644 tests/res/json/account_search.json create mode 100644 tests/res/json/account_viewPass.json diff --git a/ajax/ajax_configSave.php b/ajax/ajax_configSave.php index 4d6f9c59..c5fdf189 100644 --- a/ajax/ajax_configSave.php +++ b/ajax/ajax_configSave.php @@ -1,35 +1,38 @@ -. - */ - -use SP\Controller\ConfigActionController; -use SP\Http\Request; - -define('APP_ROOT', '..'); - -require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; - -Request::checkReferer('POST'); - -$Controller = new ConfigActionController(); -$Controller->doAction(); +. + */ + +namespace SP\Repositories; + + +use SP\Core\Exceptions\SPException; + +/** + * Class NoSuchItemException + * + * @package SP\Repositories + */ +final class NoSuchItemException extends SPException +{ + +} \ No newline at end of file diff --git a/ajax/ajax_upgrade.php b/ajax/ajax_upgrade.php index e8213874..11bdc6fd 100644 --- a/ajax/ajax_upgrade.php +++ b/ajax/ajax_upgrade.php @@ -1,36 +1,38 @@ -. - */ - -use SP\Controller\MainActionController; -use SP\Http\Request; - -define('APP_ROOT', '..'); -define('IS_UPGRADE', 1); - -require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; - -Request::checkReferer('GET'); - -$Controller = new MainActionController(); -$Controller->doAction(); \ No newline at end of file +. + */ + +namespace SP\Services\Api; + + +use SP\Core\DataCollection; + +/** + * Class ApiData + * + * @package SP\Services\Api + */ +final class ApiRequestData extends DataCollection +{ + +} \ No newline at end of file diff --git a/app/modules/api/Controllers/Help/HelpTrait.php b/app/modules/api/Controllers/Help/HelpTrait.php new file mode 100644 index 00000000..82858868 --- /dev/null +++ b/app/modules/api/Controllers/Help/HelpTrait.php @@ -0,0 +1,65 @@ +. + */ + +namespace SP\Modules\Api\Controllers\Help; + +/** + * Trait HelpTrait + * + * @package SP\Modules\Api\Controllers\Help + */ +trait HelpTrait +{ + /** + * @param string $action + * + * @return array + */ + public static function getHelpFor(string $action): array + { + if (strpos($action, '/') !== false) { + list(, $action) = explode('/', $action); + } + + if (method_exists(static::class, $action)) { + return [ + 'help' => static::$action() + ]; + } + + return []; + } + + /** + * @param string $name + * @param string $description + * @param bool $required + * + * @return array + */ + private static function getItem(string $name, string $description, bool $required = false): array + { + return [$name => ['description' => $description, 'required' => $required]]; + } +} \ No newline at end of file diff --git a/app/modules/web/Controllers/Helpers/Grid/GridInterface.php b/app/modules/web/Controllers/Helpers/Grid/GridInterface.php new file mode 100644 index 00000000..682b682b --- /dev/null +++ b/app/modules/web/Controllers/Helpers/Grid/GridInterface.php @@ -0,0 +1,44 @@ +. + */ + +namespace SP\Modules\Web\Controllers\Helpers\Grid; + +use SP\Html\DataGrid\DataGridInterface; +use SP\Storage\Database\QueryResult; + + +/** + * Interface GridInterface + * + * @package SP\Modules\Web\Controllers\Helpers\Grid + */ +interface GridInterface +{ + /** + * @param QueryResult $queryResult + * + * @return DataGridInterface + */ + public function getGrid(QueryResult $queryResult): DataGridInterface; +} \ No newline at end of file diff --git a/app/modules/web/Controllers/Helpers/HelperException.php b/app/modules/web/Controllers/Helpers/HelperException.php new file mode 100644 index 00000000..96eba82e --- /dev/null +++ b/app/modules/web/Controllers/Helpers/HelperException.php @@ -0,0 +1,52 @@ +. + */ + +namespace SP\Modules\Web\Controllers\Helpers; + +use Exception; +use Throwable; + +/** + * Class HelperException + * + * @package SP\Modules\Web\Controllers\Helpers + */ +final class HelperException extends Exception +{ + /** + * Construct the exception. Note: The message is NOT binary safe. + * + * @link http://php.net/manual/en/exception.construct.php + * + * @param string $message [optional] The Exception message to throw. + * @param int $code [optional] The Exception code. + * @param Throwable $previous [optional] The previous throwable used for the exception chaining. + * + * @since 5.1.0 + */ + public function __construct($message = "", $code = 0, Throwable $previous = null) + { + parent::__construct($message, $code, $previous); + } +} \ No newline at end of file diff --git a/app/modules/web/Forms/FormBase.php b/app/modules/web/Forms/FormBase.php new file mode 100644 index 00000000..32b8527b --- /dev/null +++ b/app/modules/web/Forms/FormBase.php @@ -0,0 +1,88 @@ +. + */ + +namespace SP\Modules\Web\Forms; + +use Psr\Container\ContainerInterface; +use SP\Config\Config; +use SP\Config\ConfigData; +use SP\Core\Context\ContextInterface; +use SP\Core\Context\SessionContext; +use SP\Http\Request; + +/** + * Class FormBase + * + * @package SP\Modules\Web\Forms + */ +abstract class FormBase +{ + /** + * @var int + */ + protected $itemId; + /** + * @var Config + */ + protected $config; + /** + * @var ConfigData + */ + protected $configData; + /** + * @var SessionContext + */ + protected $context; + /** + * @var Request + */ + protected $request; + + /** + * FormBase constructor. + * + * @param ContainerInterface $container + * @param int $itemId + */ + public function __construct(ContainerInterface $container, $itemId = null) + { + $this->config = $container->get(Config::class); + $this->configData = $this->config->getConfigData(); + $this->context = $container->get(ContextInterface::class); + $this->request = $container->get(Request::class); + + $this->itemId = $itemId; + + if (method_exists($this, 'initialize')) { + $this->initialize($container); + } + } + + /** + * Analizar los datos de la petición HTTP + * + * @return void + */ + abstract protected function analyzeRequestData(); +} \ No newline at end of file diff --git a/app/modules/web/themes/material-blue/css/search-card.css.map b/app/modules/web/themes/material-blue/css/search-card.css.map new file mode 100644 index 00000000..001b536d --- /dev/null +++ b/app/modules/web/themes/material-blue/css/search-card.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": ";;AAIE,qBAAa;EACX,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI;EACf,eAAe,EAAE,UAAU;EAC3B,UAAU,EAAE,MAAM;EAClB,OAAO,EAAE,OAAO;EAChB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,MAAM;EAEd,oCAAe;IACb,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,aAAa;IAC9B,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,GAAG;IACf,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,OAAO;IACd,gBAAgB,EAAE,OAAO;IACzB,OAAO,EAAE,MAAM;IAEf;wDACgB;MACd,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,GAAG;MACf,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,OAAO;IAGlB,oDAAgB;MACd,MAAM,EAAE,GAAG;IAGb,gDAAY;MACV,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,MAAM;MACnB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;IAGd,iDAAa;MACX,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;MACf,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,uDAAQ;QACN,KAAK,EAAE,IAAI;IAIf,iDAAa;MACX,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,GAAG;MACf,MAAM,EAAE,IAAI;MACZ,OAAO,EAAE,MAAM;IAGjB,gDAAY;MACV,SAAS,EAAE,UAAU;MACrB,kDAAE;QACA,KAAK,EC3DG,OAAO;ID+DnB,oDAAgB;MACd,SAAS,EAAE,CAAC;IAGd,gDAAY;MACV,OAAO,EAAE,WAAW;MACpB,KAAK,EAAE,OAAO;MACd,UAAU,EAAE,IAAI;MAChB,aAAa,EAAE,iBACjB;IAEA,uDAAmB;MACjB,OAAO,EAAE,IAAI;IAGf,wDAAoB;MAClB,KAAK,EAAE,KAAK;MACZ,WAAW,EAAE,IAAI;IAGnB;mDACW;MACT,KAAK,EAAE,KAAK;MACZ,WAAW,EAAE,IAAI;EAIrB,mCAAc;IACZ,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,GAAG;IACZ,UAAU,EAAE,GAAG;IACf,yCAAQ;MACN,OAAO,EAAE,CAAC;EAId,sCAAiB;IACf,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,iBAAiB;IAC7B,wCAAE;MACA,OAAO,EAAE,EAAE;MACX,8CAAQ;QACN,OAAO,EAAE,CAAC;EAKhB,qCAAgB;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;EAGZ,+BAAU;IACR,OAAO,EAAE,YAAY;IAErB,wCAAS;MACP,MAAM,EAAE,OAAO;MACf,OAAO,EAAE,GAAG;MACZ,8CAAQ;QACN,OAAO,EAAE,CAAC", +"sources": ["search-card.scss","_base.scss"], +"names": [], +"file": "search-card.css" +} \ No newline at end of file diff --git a/app/modules/web/themes/material-blue/css/search-grid.css.map b/app/modules/web/themes/material-blue/css/search-grid.css.map new file mode 100644 index 00000000..99c6b33a --- /dev/null +++ b/app/modules/web/themes/material-blue/css/search-grid.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": ";;AAIE,qBAAa;EACX,UAAU,EAAE,MAAM;EAClB,OAAO,EAAE,OAAO;EAChB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,MAAM;EAEd;4CACqB;IACnB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,OAAO;EAGjB,oCAAe;IACb,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,aAAa;IAC9B,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,GAAG;IACf,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,OAAO;IACd,gBAAgB,EAAE,OAAO;IACzB,OAAO,EAAE,MAAM;IAEf;wDACgB;MACd,OAAO,EAAE,IAAI;MACb,UAAU,EAAE,GAAG;MACf,MAAM,EAAE,IAAI;MACZ,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,OAAO;IAGlB,oDAAgB;MACd,MAAM,EAAE,GAAG;IAGb,gDAAY;MACV,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,MAAM;MACnB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,GAAG;IAGb,iDAAa;MACX,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;MACf,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,GAAG;MACX,uDAAQ;QACN,KAAK,EAAE,IAAI;IAIf,iDAAa;MACX,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,GAAG;MACf,MAAM,EAAE,IAAI;MACZ,OAAO,EAAE,MAAM;IAGjB,gDAAY;MACV,SAAS,EAAE,UAAU;MACrB,kDAAE;QACA,KAAK,EC7DG,OAAO;IDiEnB,oDAAgB;MACd,SAAS,EAAE,CAAC;IAGd,gDAAY;MACV,OAAO,EAAE,WAAW;MACpB,KAAK,EAAE,OAAO;MACd,OAAO,EAAE,IAAI;IAGf,uDAAmB;MACjB,OAAO,EAAE,IAAI;IAGf,wDAAoB;MAClB,KAAK,EAAE,KAAK;MACZ,WAAW,EAAE,IAAI;IAGnB;mDACW;MACT,KAAK,EAAE,KAAK;MACZ,WAAW,EAAE,IAAI;EAIrB,mCAAc;IACZ,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,GAAG;IACZ,UAAU,EAAE,GAAG;IACf,yCAAQ;MACN,OAAO,EAAE,CAAC;EAId,sCAAiB;IACf,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,iBAAiB;EAG/B,qCAAgB;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;EAGZ,+BAAU;IACR,OAAO,EAAE,YAAY;IAErB,wCAAS;MACP,MAAM,EAAE,OAAO;MACf,OAAO,EAAE,GAAG;MACZ,8CAAQ;QACN,OAAO,EAAE,CAAC;;AAOpB,qCAAsC;EAGhC,oCAAe;IACb,SAAS,EAAE,IAAI;IAEf;wDACgB;MACd,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,IAAI;IAIZ,6DAAY;MACV,OAAO,EAAE,KAAK;MACd,UAAU,EAAE,IAAI;MAChB,aAAa,EAAE,iBAAiB;MAChC,KAAK,EC/IG,OAAO;IDmJnB;qDACa;MACX,MAAM,EAAE,IAAI;IAGd;2DACmB;MACjB,KAAK,EAAE,IAAI", +"sources": ["search-grid.scss","_base.scss"], +"names": [], +"file": "search-grid.css" +} \ No newline at end of file diff --git a/app/modules/web/themes/material-blue/css/selectize-custom.css.map b/app/modules/web/themes/material-blue/css/selectize-custom.css.map new file mode 100644 index 00000000..69652d81 --- /dev/null +++ b/app/modules/web/themes/material-blue/css/selectize-custom.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": ";;;;;;;;;;;;;;;;AAiBA,0FAA2F;EACzF,UAAU,EAAE,kBAAkB;EAC9B,UAAU,EAAE,kBAAkB;EAC9B,UAAU,EAAE,8BAA8B;EAC1C,MAAM,EAAE,iBAAiB;EACzB,kBAAkB,EAAE,0BAA0B;EAC9C,UAAU,EAAE,0BAA0B;;AAGxC,mEAAoE;EAClE,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,MAAM;;AAGpB,uDAAwD;EACtD,kBAAkB,EAAE,4BAA4B;EAChD,UAAU,EAAE,4BAA4B;;AAG1C,0BAA2B;EACzB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,QAAQ;EACjB,aAAa,EAAE,iBAAiB;EAChC,UAAU,EAAE,OAAO;EACnB,qBAAqB,EAAE,WAAW;EAClC,kBAAkB,EAAE,WAAW;EAC/B,aAAa,EAAE,WAAW;;AAG5B,gCAAiC;EAC/B,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,GAAG,EAAE,GAAG;EACR,KAAK,EAAE,OAAO;EACd,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,KAAK;EACjB,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,eAAe;;AAG5B,sCAAuC;EACrC,KAAK,EAAE,OAAO;;AAGhB,qDAAsD;EACpD,YAAY,EAAE,iBAAiB;EAC/B,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,IAAI;EACX,kBAAkB,EAAE,UAAU;EAC9B,eAAe,EAAE,UAAU;EAC3B,UAAU,EAAE,UAAU;;AAGxB,gEAAiE;EAC/D,YAAY,EAAE,MAAM;;AAGtB,4DAA6D;EAC3D,OAAO,EAAE,IAAI;;AAGf,4DAA6D;EAC3D,UAAU,EAAE,MAAM;;AAGpB,oDAAqD;EACnD,QAAQ,EAAE,QAAQ;EAClB,aAAa,EAAE,eAAe;;AAGhC,4DAA6D;EAC3D,OAAO,EAAE,CAAC;;EAEV,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,CAAC;EACR,MAAM,EAAE,CAAC;EACT,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,OAAO;EACd,eAAe,EAAE,IAAI;EACrB,cAAc,EAAE,MAAM;EACtB,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,SAAS;EAClB,WAAW,EAAE,qBAA0B;EACvC,qBAAqB,EAAE,WAAW;EAClC,kBAAkB,EAAE,WAAW;EAC/B,aAAa,EAAE,WAAW;EAC1B,kBAAkB,EAAE,UAAU;EAC9B,eAAe,EAAE,UAAU;EAC3B,UAAU,EAAE,UAAU;;AAGxB,kEAAmE;EACjE,UAAU,EAAE,mBAAmB;;AAGjC,mEAAoE;EAClE,iBAAiB,EAAE,WAAgB;;AAGrC,4EAA6E;EAC3E,UAAU,EAAE,IAAI;;AAGlB,sEAAuE;EACrE,iBAAiB,EAAE,mBAAmB;;AAGxC,kBAAmB;EACjB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,MAAM;;AAGjB;;sBAEuB;EACrB,KAAK,EAAE,OAAO;;;EAGd,WAAW,EAAE,IAAI;EACjB,sBAAsB,EAAE,OAAO;;AAGjC,yBAA0B;EACxB,OAAO,EAAE,YAAY;;AAGvB;uDACwD;EACtD,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,YAAY;;AAGvB,gBAAiB;EACf,aAAa,EAAE,iBAAiB;EAChC,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,KAAK;EACZ,QAAQ,EAAE,MAAM;EAChB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,CAAC;EACV,kBAAkB,EAAE,UAAU;EAC9B,eAAe,EAAE,UAAU;EAC3B,UAAU,EAAE,UAAU;EACtB,kBAAkB,EAAE,IAAI;EACxB,UAAU,EAAE,IAAI;;AAMlB,0BAA2B;EACzB,KAAK,ECpKW,OAAO;EDqKvB,SAAS,EAAE,KAAK;;AAGlB,mDAAoD;EAClD,OAAO,EAAE,YAAY;;AAGvB;yBAC0B;EACxB,gBAAgB,EAAE,OAAO;;AAG3B;2BAC4B;EAC1B,MAAM,EAAE,kBAAkB;;AAG5B,sBAAuB;EACrB,kBAAkB,EAAE,oCAAoC;EACxD,UAAU,EAAE,oCAAoC;;AAGlD,oBAAqB;EACnB,cAAc,EAAE,QAAQ;EACxB,OAAO,EAAE,iBAAiB;EAC1B,OAAO,EAAE,YAAY;EACrB,IAAI,EAAE,CAAC;EACP,QAAQ,EAAE,MAAM;;AAGlB,yCAA0C;EACxC,KAAK,EAAE,GAAG;;AAGZ,+CAAgD;EAC9C,MAAM,EAAE,OAAO;EACf,MAAM,EAAE,WAAW;EACnB,OAAO,EAAE,OAAO;EAChB,UAAU,EC3MM,OAAO;ED4MvB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,mBAAwB;;AAGlC,sDAAuD;EACrD,UAAU,EC9MQ,OAAO;ED+MzB,KAAK,EAAE,OAAO;EACd,MAAM,EAAE,mBAAwB;;AAGlC;+DACgE;EAC9D,KAAK,EAAE,OAAO;EACd,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,2BAA2B;;AAGrC,wBAAyB;EACvB,OAAO,EAAE,uBAAuB;EAChC,OAAO,EAAE,YAAY;EACrB,UAAU,EAAE,YAAY;EACxB,UAAU,EAAE,eAAe;EAC3B,SAAS,EAAE,eAAe;EAC1B,MAAM,EAAE,YAAY;EACpB,WAAW,EAAE,YAAY;EACzB,MAAM,EAAE,iBAAiB;EACzB,UAAU,EAAE,eAAe;EAC3B,WAAW,EAAE,kBAAkB;EAC/B,mBAAmB,EAAE,eAAe;EACpC,kBAAkB,EAAE,eAAe;EACnC,UAAU,EAAE,eAAe;EAC3B,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,kBAAiB;;AAG1B,mCAAoC;EAClC,OAAO,EAAE,IAAI;;AAGf,8BAA+B;EAC7B,OAAO,EAAE,eAAe;;AAG1B,uBAAwB;EACtB,OAAO,EAAE,GAAG;EACZ,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;AAGb,wCAAyC;EACvC,OAAO,EAAE,GAAG;EACZ,OAAO,EAAE,KAAK;EACd,QAAQ,EAAE,QAAQ;EAClB,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,GAAG;EACX,MAAM,EAAE,CAAC;EACT,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,CAAC;;AAGV,mBAAoB;EAClB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,EAAE;EACX,MAAM,EAAE,iBAAiB;EACzB,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,UAAU;EAClB,UAAU,EAAE,MAAM;EAClB,kBAAkB,EAAE,UAAU;EAC9B,eAAe,EAAE,UAAU;EAC3B,UAAU,EAAE,UAAU;EACtB,kBAAkB,EAAE,4BAA4B;EAChD,UAAU,EAAE,4BAA4B;EACxC,qBAAqB,EAAE,WAAW;EAClC,kBAAkB,EAAE,WAAW;EAC/B,aAAa,EAAE,WAAW;;AAG5B,qCAAsC;EACpC,MAAM,EAAE,OAAO;EACf,QAAQ,EAAE,MAAM;;AAGlB,gDAAiD;EAC/C,UAAU,EAAE,uBAAuB;EACnC,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;;AAGpB;oCACqC;EACnC,OAAO,EAAE,QAAQ;;AAGnB,0DAA2D;EACzD,UAAU,EAAE,MAAM;;AAGpB,oCAAqC;EACnC,KAAK,EAAE,OAAO;EACd,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,OAAO;;AAGjB,2BAA4B;;;EAG1B,gBAAgB,ECxTA,OAAO;EDyTvB,KAAK,EAAE,IAAI;;AAGb,kCAAmC;EACjC,KAAK,EAAE,OAAO;;AAGhB,2BAA4B;EAC1B,KAAK,EAAE,qBAAqB;;AAG9B,2BAA4B;EAC1B,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,KAAK;;AAGnB;gDACiD;EAC/C,MAAM,EAAE,OAAO;;AAGjB;6DAC8D;EAC5D,MAAM,EAAE,IAAI;;AAGd,gDAAiD;EAC/C,OAAO,EAAE,GAAG;EACZ,OAAO,EAAE,KAAK;EACd,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,CAAC;EACR,MAAM,EAAE,CAAC;EACT,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,aAAa;EAC3B,YAAY,EAAE,2CAA2C;;AAG3D,gEAAiE;EAC/D,UAAU,EAAE,IAAI;EAChB,YAAY,EAAE,aAAa;EAC3B,YAAY,EAAE,2CAA2C;;AAG3D,oDAAqD;EACnD,IAAI,EAAE,IAAI;EACV,KAAK,EAAE,IAAI;;AAGb,+CAAgD;EAC9C,MAAM,EAAE,uBAAuB;;AAGjC,4CAA6C;EAE3C,gBAAgB,EAAE,OAAO;;AAG3B;gCACiC;EAC/B,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,iBAAiB;EACzB,MAAM,EAAE,6BAA6B;EACrC,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;EAClB,kBAAkB,EAAE,+BAA+B;EACnD,UAAU,EAAE,+BAA+B;;AAG7C,oCAAqC;EACnC,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,UAAU;;AAGzB,gDAAiD;EAC/C,OAAO,EAAE,IAAI;;AAGf,oCAAqC;EACnC,OAAO,EAAE,GAAG;EACZ,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,GAAG;EACX,MAAM,EAAE,KAAK;EACb,QAAQ,EAAE,MAAM;EAChB,gBAAgB,EAAE,OAAO;EACzB,WAAW,EAAE,KAAK;EAClB,YAAY,EAAE,KAAK;;AAGrB,2BAA4B;EAC1B,OAAO,EAAE,KAAK;;AAGhB,0BAA2B;EACzB,OAAO,EAAE,QAAQ;;AAanB,wCAAyC;EACvC,OAAO,EAAE,IAAI;;AAGf,sBAAuB;;EAErB,YAAY,EC/aM,OAAO;EDgbzB,OAAO,EAAE,CAAC;;EAGV,kBAAkB,EAAE,qCAAoC;;EAGxD,UAAU,EAAE,qCAAoC;;AAGlD,2BAA4B;EAC1B,YAAY,ECjcC,OAAO;EDkcpB,kBAAkB,EAAE,oCAAoC;EACxD,UAAU,EAAE,oCAAoC;;AAGlD,iCAAkC;EAChC,YAAY,ECvcC,OAAO;EDwcpB,kBAAkB,EAAE,qDAAoC;EACxD,UAAU,EAAE,qDAAoC;;AAGlD,mDAAoD;EAClD,YAAY,EAAE,GAAG;EACjB,aAAa,EAAE,GAAG;;AAGpB,+CAAgD;EAC9C,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;;AAGpB,+BAAgC;EAC9B,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,IAAI;EAChB,kBAAkB,EAAE,IAAI;EACxB,UAAU,EAAE,IAAI;EAChB,qBAAqB,EAAE,CAAC;EACxB,kBAAkB,EAAE,CAAC;EACrB,aAAa,EAAE,CAAC", +"sources": ["selectize-custom.scss","_base.scss"], +"names": [], +"file": "selectize-custom.css" +} \ No newline at end of file diff --git a/app/modules/web/themes/material-blue/css/selectize-custom.min.css b/app/modules/web/themes/material-blue/css/selectize-custom.min.css new file mode 100644 index 00000000..0cd9d821 --- /dev/null +++ b/app/modules/web/themes/material-blue/css/selectize-custom.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.selectize-control.plugin-drag_drop.multi>.selectize-input>div.ui-sortable-placeholder{visibility:visible!important;background:#f2f2f2!important;background:rgba(0,0,0,0.06)!important;border:0 none!important;-webkit-box-shadow:inset 0 0 12px 4px #fff;box-shadow:inset 0 0 12px 4px #fff}.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after{content:'!';visibility:hidden}.selectize-control.plugin-drag_drop .ui-sortable-helper{-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.2);box-shadow:0 2px 5px rgba(0,0,0,0.2)}.selectize-dropdown-header{position:relative;padding:3px 12px;border-bottom:1px solid #d0d0d0;background:#f8f8f8;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.selectize-dropdown-header-close{position:absolute;right:12px;top:50%;color:#333;opacity:.4;margin-top:-12px;line-height:20px;font-size:20px!important}.selectize-dropdown-header-close:hover{color:#000}.selectize-dropdown.plugin-optgroup_columns .optgroup{border-right:1px solid #f2f2f2;border-top:0 none;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child{border-right:0 none}.selectize-dropdown.plugin-optgroup_columns .optgroup:before{display:none}.selectize-dropdown.plugin-optgroup_columns .optgroup-header{border-top:0 none}.selectize-control.plugin-remove_button [data-value]{position:relative;padding-right:24px!important}.selectize-control.plugin-remove_button [data-value] .remove{z-index:1;position:absolute;top:0;right:0;bottom:0;width:17px;text-align:center;font-weight:bold;font-size:12px;color:inherit;text-decoration:none;vertical-align:middle;display:inline-block;padding:1px 0 0 0;border-left:1px solid transparent;-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.selectize-control.plugin-remove_button [data-value] .remove:hover{background:rgba(0,0,0,0.05)}.selectize-control.plugin-remove_button [data-value].active .remove{border-left-color:transparent}.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover{background:0}.selectize-control.plugin-remove_button .disabled [data-value] .remove{border-left-color:rgba(77,77,77,0)}.selectize-control{position:relative;padding:20px 0}.selectize-dropdown,.selectize-input,.selectize-input input{color:#333;line-height:20px;-webkit-font-smoothing:inherit}.selectize-control.single{display:inline-block}.selectize-input,.selectize-control.single .selectize-input.input-active{background:#fff;cursor:text;display:inline-block}.selectize-input{border-bottom:1px solid #ccc;padding:3px 0;display:inline-block;width:300px;overflow:hidden;position:relative;z-index:1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:none;box-shadow:none}.selectize-input.has-items{color:#5c6bc0;font-size:1.3em}.selectize-control.multi .selectize-input.has-items{padding:5px 12px 2px}.selectize-input.full,.selectize-input.not-full{background-color:#fff}.selectize-input.disabled,.selectize-input.disabled *{cursor:default!important}.selectize-input.focus{-webkit-box-shadow:inset 0 -1px 2px rgba(0,0,0,0.15);box-shadow:inset 0 -1px 2px rgba(0,0,0,0.15)}.selectize-input>*{vertical-align:baseline;display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline}.selectize-control.multi .selectize-input{width:95%}.selectize-control.multi .selectize-input>div{cursor:pointer;margin:0 3px 3px 0;padding:1px 3px;background:#5c6bc0;color:#fff;border:0 solid transparent}.selectize-control.multi .selectize-input>div.active{background:#607d8b;color:#fff;border:0 solid transparent}.selectize-control.multi .selectize-input.disabled>div,.selectize-control.multi .selectize-input.disabled>div.active{color:#808080;background:#fff;border:0 solid rgba(77,77,77,0)}.selectize-input>input{display:inline-block!important;padding:0!important;min-height:0!important;max-height:none!important;max-width:100%!important;margin:0!important;text-indent:0!important;border:0 none!important;background:none!important;line-height:inherit!important;-webkit-user-select:auto!important;-webkit-box-shadow:none!important;box-shadow:none!important;font-size:16px;color:#888;color:rgba(0,0,0,0.5)}.selectize-input>input::-ms-clear{display:none}.selectize-input>input:focus{outline:none!important}.selectize-input::after{content:' ';display:block;clear:left}.selectize-input.dropdown-active::before{content:' ';display:block;position:absolute;background:#fff;height:1px;bottom:0;left:0;right:0}.selectize-dropdown{position:absolute;z-index:10;border:1px solid #d0d0d0;background:#fff;margin:-1px 0 0 0;border-top:0 none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1);-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.selectize-dropdown [data-selectable]{cursor:pointer;overflow:hidden}.selectize-dropdown [data-selectable] .highlight{background:rgba(255,237,40,0.4);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.selectize-dropdown [data-selectable],.selectize-dropdown .optgroup-header{padding:3px 12px}.selectize-dropdown .optgroup:first-child .optgroup-header{border-top:0 none}.selectize-dropdown .optgroup-header{color:#777;background:#fff;cursor:default}.selectize-dropdown .active{background-color:#5c6bc0;color:#fff}.selectize-dropdown .active.create{color:#262626}.selectize-dropdown .create{color:rgba(51,51,51,0.5)}.selectize-dropdown-content{overflow-y:auto;overflow-x:hidden;max-height:200px}.selectize-control.single .selectize-input,.selectize-control.single .selectize-input input{cursor:pointer}.selectize-control.single .selectize-input.input-active,.selectize-control.single .selectize-input.input-active input{cursor:text}.selectize-control.single .selectize-input:after{content:' ';display:block;position:absolute;top:50%;right:17px;margin-top:-3px;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#333 transparent transparent transparent}.selectize-control.single .selectize-input.dropdown-active:after{margin-top:-4px;border-width:0 5px 5px 5px;border-color:transparent transparent #333 transparent}.selectize-control.rtl.single .selectize-input:after{left:17px;right:auto}.selectize-control.rtl .selectize-input>input{margin:0 4px 0 -2px!important}.selectize-control .selectize-input.disabled{background-color:#fff}.selectize-dropdown,.selectize-dropdown.form-control{height:auto;padding:0;margin:2px 0 0 0;z-index:1000;background:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175)}.selectize-dropdown .optgroup-header{font-size:12px;line-height:1.42857143}.selectize-dropdown .optgroup:first-child:before{display:none}.selectize-dropdown .optgroup:before{content:' ';display:block;height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5;margin-left:-12px;margin-right:-12px}.selectize-dropdown-content{padding:5px 0}.selectize-dropdown-header{padding:6px 12px}.selectize-input.dropdown-active::before{display:none}.selectize-input.focus{border-color:#607d8b;outline:0;-webkit-box-shadow:inset 0 -1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 -1px 1px rgba(0,0,0,0.075)}.has-error .selectize-input{border-color:#ef5350;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .selectize-input:focus{border-color:#ef5350;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.selectize-control.multi .selectize-input.has-items{padding-left:9px;padding-right:9px}.selectize-control.multi .selectize-input>div{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.form-control.selectize-control{padding:0;height:auto;border:0;background:0;-webkit-box-shadow:none;box-shadow:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0} \ No newline at end of file diff --git a/app/modules/web/themes/material-blue/css/styles.min.css b/app/modules/web/themes/material-blue/css/styles.min.css new file mode 100644 index 00000000..b84e831d --- /dev/null +++ b/app/modules/web/themes/material-blue/css/styles.min.css @@ -0,0 +1 @@ +html,body{margin:0;padding:0;text-align:left;background-color:#f5f5f5;color:#555;font-size:12px;font-weight:normal;box-sizing:border-box;max-width:100%}*{font-family:"Roboto Regular",Verdana,Tahoma,sans-serif;box-sizing:inherit}*:before,*:after{box-sizing:inherit}table{font-size:11px;border-spacing:0}table th{border-bottom:2px solid transparent;vertical-align:middle}table th .icon{width:24px;height:24px}table tr{height:20px}table tr.odd{background-color:#f9f9f9}table tr.even>td,table tr.odd>td{border-bottom:1px solid #d9d9d9!important}table tr.even:hover,table tr.odd:hover{background-color:#e8ff99}table td{padding:3px}table td.txtCliente{font-weight:bold;text-align:center}form{font-size:11px;margin:0}input.inputImg,img.inputImg{background-color:transparent!important;width:24px!important;height:24px!important;border:0;vertical-align:middle;margin:0 .5em}input.txtFile{width:200px}input.txtLong{width:300px}textarea{width:350px}select.files{width:250px}input.spinner{width:5em}img{margin:0;padding:0;border:0;cursor:pointer}img.inputImgMini{background-color:transparent!important;width:16px!important;height:16px!important;margin:0 5px 0 5px;border:0;vertical-align:middle}i{cursor:pointer}form .form-field{display:flex;justify-content:space-between}form .form-field>label{min-width:12em;padding:.5em 0;font-size:16px;align-self:center}form .form-field>div{width:100%;align-self:center}a{text-decoration:none;color:#536dfe}a:visited{text-decoration:none;color:#536dfe}a:hover,a:active,a:focus{text-decoration:none;cursor:pointer}pre,code,samp,kbd{font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:1em;direction:ltr;text-align:left;background-color:#fbfaf9;color:#333;box-shadow:inset 0 0 .3em #ccc;border-radius:2px}body.login,body.logout,body.userpassreset{background:#607d8b}body.login #wrap,body.logout #wrap,body.userpassreset #wrap{background:transparent}body.login #container,body.logout #container,body.userpassreset #container{padding-top:5%}body.login footer,body.logout footer,body.userpassreset footer{background:#78909c}body.login footer a,body.logout footer a,body.userpassreset footer a{color:#f2f2f2}#box-pub-noheader{background:transparent url("public/images/logo_full_nobg_outline.png") no-repeat top center;background-size:75% auto;width:40em;min-height:20em;margin:0 auto}#box-pub-noheader>div{width:100%;padding:1em;margin:0 auto}#box-pub-noheader .box-spacer{height:15em;background-color:transparent}#box-pub-noheader .box-header{width:100%;color:#f2f2f2;font-size:16px;font-weight:bold;text-align:center;margin:1em 0;letter-spacing:.1em;padding:.2em 0}#box-pub-noheader .box-form{-moz-box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);background-color:#f2f2f2}#box-pub-noheader .box-form form fieldset#box-data{height:100%;min-height:14em;text-align:left;background-color:transparent;margin-bottom:2em}#box-pub-noheader .box-form form fieldset#box-data legend{width:100%;color:#607d8b;font-size:14px;font-weight:bold;text-align:center;margin:1em 0;letter-spacing:.1em;padding:.2em 0}#box-pub-noheader .box-form form fieldset#box-data .form-control>i{margin-right:.5em;opacity:.5}#box-pub-noheader .box-form form fieldset#box-data .extra-hidden{display:none}#box-pub-noheader .box-form div#box-buttons{margin-top:2em;text-align:center}@media screen and (max-width:600px){#box-pub-noheader{width:25em}#box-pub-noheader .box-spacer{height:10em}#box-pub-noheader form fieldset#box-data .mdl-textfield{width:100%}}#nojs{width:80%;text-align:center;vertical-align:middle;margin:10px auto;padding:3px;background-color:#ef5350;color:white;font-weight:bold;font-size:14px}#wrap{height:auto!important;min-height:100%;width:100%;background-color:#f5f5f5;padding-bottom:5em}#wrap-loading{position:fixed;z-index:9999;top:50%;left:50%;padding:1em;background-color:rgba(255,255,255,0.8);display:none;border-radius:5px!important;-moz-border-radius:5px!important;-webkit-border-radius:5px!important}#wrap-loading.overlay-full{top:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,0.5)}#wrap-loading.overlay-full #loading{position:absolute;top:50%;left:50%}#wrap-loading.overlay-full #taskStatus{display:none}#wrap-loading #taskStatus{display:none;position:absolute;left:0;top:55%;width:100%;text-align:center;color:white;background-color:rgba(0,0,0,0.5);padding:1em 0}#container{margin:auto;width:100%}#container.error,#container.install{width:100%}#container .logo{height:64px}#container #actions-bar{z-index:100;display:flex;justify-content:space-between;position:fixed;border:0 none;top:0;left:0;width:100%;padding:1em 0;background-color:transparent}#container #actions-bar-icons{flex-grow:1;text-align:center}#container #actions-bar-logo{display:none;padding:0 .5em}#container #actions-bar-logo img{display:inline-block;width:50px;opacity:.75}#container #content{width:95%;margin:2em auto 8em auto}#container #content.public-link{width:70%;min-height:0;margin:5em auto}#content td.descField,#box-popup td.descField{text-align:right;padding-right:20px;width:25%;border-right:1px solid #d9d9d9;color:#999;font-size:12px;font-weight:bold}#content td.valField,#box-popup td.valField{padding-left:1em;width:100%}#content td.valField .lowres-title,#box-popup td.valField .lowres-title{display:none;width:100%;color:#607d8b;font-size:12px}#content td.valField .notification-description,#box-popup td.valField .notification-description{font-size:16px;max-width:100%}#content td.valField .notification-description .event-description,#content td.valField .notification-description .event-details,#box-popup td.valField .notification-description .event-description,#box-popup td.valField .notification-description .event-details{padding:.5em 0}#content td.valField .notification-description .event-description,#box-popup td.valField .notification-description .event-description{color:#5c6bc0;border-bottom:1px solid #e9e9e9}#content td.valField .notification-description .event-details .detail,#box-popup td.valField .notification-description .event-details .detail{display:flex;padding:.2em 0}#content td.valField .notification-description .event-details .detail .detail-left,#box-popup td.valField .notification-description .event-details .detail .detail-left{flex:none;width:8em;font-weight:bold}#content td.valField .notification-description .event-details .detail .detail-right,#box-popup td.valField .notification-description .event-details .detail .detail-right{flex-grow:1}#content .pager{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;justify-content:space-between;align-content:space-between;flex-wrap:wrap;width:100%;margin-top:15px;padding:.5em;font-size:11px;color:#999;background-color:#fcfcfc}#content .pager img{margin-left:5px;vertical-align:middle}#content .pager a{margin-left:5px;font-size:12px;color:#999}#content #title{width:100%;padding:7px;background-color:#d9d9d9;color:#fff;font-size:17px;letter-spacing:.2em}#content #title.titleNormal{background-color:#607d8b;color:#fff}#content .data-container{width:75%;margin:0 auto}#content fieldset.data{margin:2em auto}#content fieldset.data>legend{color:#607d8b;padding:0 .5em;font-size:1.5em}#content fieldset.data>div{display:none}#content fieldset.data>div table{width:100%}#content .data{width:100%;padding:10px;margin:0 auto;background-color:#fff;-webkit-box-shadow:2px 2px 3px -3px rgba(0,0,0,0.14);-moz-box-shadow:2px 2px 3px -3px rgba(0,0,0,0.14);box-shadow:1px 1px 2px rgba(0,0,0,0.14)}#content .data #history-icon{position:relative;top:5em;right:2em}#content .data td{text-align:left}#content .data td.descField{text-align:right}#content .data select{min-width:210px}#content .data .list-wrap{max-height:10em;overflow:auto;padding:.5em;margin:1em 0}#content .data .dropzone{width:100%;padding:1em;border:2px dashed #26a69a;text-align:center;opacity:.3}#content .data .dropzone:hover{opacity:1}#content .data .dropzone img{vertical-align:middle}#content .data .file-upload{display:none}#content .data .account-permissions{width:100%}#content .extra-info{margin-top:20px}#content #tabs fieldset{border:1px solid #c9c9c9}#content #tabs #frmConfig label{float:left}#content .tblConfig{margin-bottom:2em}#content .tblConfig td.descField{width:35%;font-size:11px;font-weight:bold}#content .tblConfig td.rowHeader{padding:5px 0 5px 0;background-color:#f5f5f5;text-align:center;font-weight:bold;border-top:15px solid #f9f9f9;border-bottom:3px solid #a9c1d7;letter-spacing:.5em;color:#696969}#content .tblConfig input.checkbox{width:15px;text-align:left;padding:0}#content .tblConfig .option-disabled{text-align:center;background-color:#fff8e1;color:#ffca28;font-weight:bold}#content h2{width:100%;height:1.5em;font-size:18px;color:white;background-color:#a9c1d7;margin:0;padding-top:.1em}#content .section{margin-top:2.5em;border-bottom:1px solid #d9d9d9;text-align:left;font-size:14px;font-weight:bold;color:#5c6bc0}#content .row_even>td{background-color:#f5f5f5}#content .row_odd>td{background-color:white}#content .data-header ul{list-style:none;width:100%;margin:0 0 10px 0;padding:0}#content .data-header li{display:inline-block;padding:.2em .5em;font-weight:bold;letter-spacing:.2em;color:#fff;text-align:center}#content .data-header li a{color:#777}#content .data-header li img{float:right;width:24px;height:24px;vertical-align:middle}#content .data-header-minimal{border-bottom:1px solid #dfdfdf}#content .data-header-minimal ul{display:flex;flex-flow:row;flex-wrap:wrap;align-content:flex-start;justify-content:space-around;margin:0}#content .data-header-minimal li{min-width:10em;font-weight:normal;letter-spacing:normal}#content .data-header-minimal li a{color:#b9b9b9;padding:.3em .8em}#content .data-header-minimal li.search-filter-spacer{flex:0 0 18em}#content .data-table{width:100%}#content .data-table td:first-of-type,#content .data-table th:first-of-type{width:5em}#content .data-table thead th{background-color:#607d8b;color:#fff}#content .data-table tbody td.cell-data{text-align:left}#content .data-table tbody td.cell-nodata{padding:0 .5em;text-align:left}#content .data-table tbody td.cell-actions{text-align:right}#content .data-table tbody td.cell-actions i{opacity:.5}#content .data-table tbody td.cell-actions i:hover{opacity:1}#content .data-rows ul{display:table;list-style:none;width:100%;margin:0 0 10px 0;padding:0;background-color:#fcfcfc}#content .data-rows li{float:left;display:block;padding:1em;color:#696969;text-align:center;min-height:2em}#content .data-rows li.cell-nodata{padding:1em 0;min-height:2em;text-align:left}#content .data-rows li.cell-actions{float:right;min-height:2em;padding:1em 0;text-align:left;background-color:#fcfcfc;width:15em}#content .data-rows li.cell-nodata img,#content .data-rows li.cell-actions img{width:24px;height:24px;margin:0 .5em}#content #resEventLog .data{width:100%}#content #resEventLog thead{text-align:center}#content #resEventLog tbody{width:100%;height:500px;overflow:auto}#content #resEventLog td{border-bottom:1px solid #d9d9d9}#content #resEventLog .cell{text-align:center}#content #resEventLog .cell-description{width:60%}#content #searchbox{background-color:#fcfcfc;vertical-align:middle;position:relative;height:auto;padding:.5em 1em;margin-bottom:2em}#content #searchbox form{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;text-align:left}#content #searchbox .search-filters>*{margin:0 .5em}#content #searchbox .search-filters .filter-buttons{display:inline-block}#content #searchbox .search-filters .filter-slider{width:10em}#content #searchbox .search-filters-tags{display:none;flex-grow:2}#content .btn-clear{opacity:.35;filter:alpha(opacity=35)}#content .btn-clear:hover{opacity:1;filter:alpha(opacity=100)}#content .actions-optional{display:none}#content .error{width:350px;padding:15px;margin:0 auto;text-align:center;font-size:16px;line-height:1.5em;color:#ffca28;background-color:#fff8e1;border:1px solid #ffca28}#content .data .user-list-action,#content .data .profile-list-action,#box-popup .user-list-action,#box-popup .profile-list-action{width:75%;margin:0 auto}#content .data .list-wrap,#box-popup .list-wrap{max-height:20em;overflow:auto;padding:.5em;margin:1em 0}#content .data .list-wrap ul,#box-popup .list-wrap ul{list-style-type:none;margin:0;padding:0}#content .data .list-wrap li,#box-popup .list-wrap li{display:flex;background:#f2f2f2;padding:.5em;font-size:1em;margin-bottom:.5em}#content .data .list-wrap li:hover,#box-popup .list-wrap li:hover{background:#e8eaf6;color:#000}#content .data .list-wrap div.files-item-info,#box-popup .list-wrap div.files-item-info{flex-grow:2}#content .data .list-wrap div.files-item-info img,#box-popup .list-wrap div.files-item-info img{margin:0 .5em}#content .data .list-wrap div.files-item-actions,#box-popup .list-wrap div.files-item-actions{padding:.3em 0}#content .data .list-actions i,#box-popup .list-actions i{opacity:.5}#content .data .list-actions i:hover,#box-popup .list-actions i:hover{opacity:1}#box-popup{width:-webkit-min-content;width:-moz-min-content;width:min-content;min-width:50em;margin:5em auto;padding:0;background-color:#fff}#box-popup.box-password-view{width:-webkit-min-content;width:-moz-min-content;width:min-content;min-width:30em}#box-popup>h2{position:relative;width:100%;font-size:18px;color:#fff;background-color:#607d8b;margin:0;padding:.5em 0;line-height:1em}#box-popup>h2 .btn-popup-close{display:none;position:absolute;right:.5em;top:.2em}#box-popup>table{width:100%;padding-bottom:1em}#box-popup select{width:220px}#box-popup #resFancyAccion{display:none}#box-popup #resCheck{display:inline-block;width:80%;height:4em;padding:1em 0}#box-popup.image{background-color:transparent;max-width:100%;margin:0 auto;border-radius:0!important;-moz-border-radius:0!important;-webkit-border-radius:0!important}#box-popup.image img{width:auto;margin:0 auto}#box-popup.image>div.title{background-color:#607d8b;color:#fff;padding:.5em}#box-popup.help{min-height:100px;background-color:#f5f5f5}#box-popup.help p{font-size:14px;text-align:justify;line-height:2em}#box-complexity>div{text-align:justify;line-height:1.5em;margin-top:1em}#box-upload-files>*{margin:0 auto}#debug{float:left;text-align:left}#debuginfo{width:100%;min-height:10em;padding:1em;background-color:#fff8e1;text-align:left;line-height:1.5em}#debuginfo H3{text-align:center}.popup-data{width:100%;min-width:400px;border:0;text-align:left;margin:0;padding:1em .5em}.popup-data .descField{min-width:100px}footer{display:flex;justify-content:space-between;position:fixed;bottom:0;z-index:100;width:100%;padding:.5em 0;background-color:#f5f5f5;color:#b9b9b9;font-size:1em;-webkit-box-shadow:0 -3px 2px -2px rgba(0,0,0,0.14);-moz-box-shadow:0 -3px 2px -2px rgba(0,0,0,0.14);box-shadow:0 -3px 2px -2px rgba(0,0,0,0.14)}footer .footer-parts{display:flex;justify-content:space-between}footer #footer-left{width:50%;margin:0 1em}footer #footer-right{width:50%;margin:0 1em;justify-content:flex-end;text-align:right}footer #updates,footer #notices{min-width:5em;text-align:center;cursor:pointer}footer #notices .notices-title{font-weight:bold;border-bottom:1px solid #c9c9c9;margin-bottom:1em}footer #status{margin:0 1em}footer #status>div{display:inline-block}footer #status .status-info{padding:.5em}footer #session{text-align:left;color:#999;font-size:.8em}footer a{color:#b9b9b9}footer a:visited{color:#b9b9b9}footer #project a:hover{color:#a9c1d7;border-bottom:1px solid #a9c1d7}footer #updates a:hover{color:#a9c1d7}footer img{border:0;width:16px;height:16px;vertical-align:middle}.round,.round5{border-radius:5px!important;-moz-border-radius:5px!important;-webkit-border-radius:5px!important}.midround{border-radius:0 0 10px 10px!important;-moz-border-radius:0 0 10px 10px!important;-webkit-border-radius:0 0 10px 10px!important}.midroundup{border-radius:10px 10px 0 0!important;-moz-border-radius:10px 10px 0 0!important;-webkit-border-radius:10px 10px 0 0!important}.fullround{border-radius:50%!important;-moz-border-radius:50%!important;-webkit-border-radius:50%!important}.iconMini{width:16px!important;height:16px!important;vertical-align:middle}.hide{display:none!important}.btn-checks{padding:5px;margin:.2em 0;width:30em;border-bottom:1px solid #c9c9c9}.shadow{-webkit-box-shadow:2px 2px 3px -3px rgba(0,0,0,0.14);-moz-box-shadow:2px 2px 3px -3px rgba(0,0,0,0.14);box-shadow:1px 1px 2px rgba(0,0,0,0.14)}.noRes{width:60%;padding:15px;background-color:#f9f9f9;color:#a9a9a9;border:#c9c9c9 1px solid;margin:20px auto;text-align:center;font-size:16px}.header-grey{background-color:#607d8b;color:#fff;min-height:2em}.no-background{background:none!important}.action-in-box{padding:1em;text-align:right}.action-in-box ul{list-style:none;margin:0;padding:0}.tab-data{margin:2em auto 0;width:75%}.item-actions{display:flex;justify-content:flex-end;position:relative;margin:1em auto}.item-actions>div{display:inline-block}.tab-actions{margin:2em 0}.item-actions>ul,.tab-actions>ul{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;list-style:none;margin:0;padding:0}.item-actions>ul>li,.tab-actions>ul>li{width:auto;min-width:2em;margin-left:.5em}.item-actions>ul>li.datagrid-action-search,.tab-actions>ul>li.datagrid-action-search{min-width:5em}.item-actions>ul>li.datagrid-action-search form,.tab-actions>ul>li.datagrid-action-search form{width:100%}h5.datagrid-header-title{padding:.7em;border-bottom:1px solid #d9d9d9}.fullWidth{max-width:100%!important}.filter-on{color:#26a69a;background-color:#e0f2f1;border:1px solid #26a69a;padding:.3em 1em}.global-on{color:#ffca28;background-color:#fff8e1;border:1px solid #ffca28;padding:.3em 1em}.opacity50{filter:alpha(opacity=50);opacity:.5}.custom-combobox{position:relative;display:inline-block}.custom-combobox input{width:80%}.custom-combobox-toggle{position:absolute;top:0;bottom:0;margin-left:-1px;padding:0;*height:1.7em;*top:.1em}.custom-combobox-input{margin:0;padding:.3em}.password-level.strongest{color:#26a69a}.password-level.strong{color:#2196f3}.password-level.good{color:#ffca28}.password-level.weak{color:#ef5350}#alert #alert-text{margin:15px auto;font-size:14px;font-weight:bold}#alert #alert-pass{width:50%;padding:10px;margin:15px auto;border:1px solid #c9c9c9;color:#555;font-weight:bold}.dialog-text,.dialog-user-text,.dialog-pass-text{font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;padding:.5em;text-align:center;min-width:200px}.dialog-user-text{border-bottom:#d9d9d9 1px solid;color:#a9a9a9}.dialog-pass-text{border:transparent 1px solid;letter-spacing:.2em}.dialog-button{width:150px}.dialog-buttons{text-align:center;padding:.5em;border-top:1px solid #c9c9c9;line-height:2.5em}.dialog-clip-copy{color:#26a69a;background-color:#e0f2f1}.btn-help{cursor:pointer}.help-box{display:none;background-color:#fff!important;color:#607d8b}.help-box>*{font-weight:bold}.help-container ul{padding:0 .5em;list-style:none}.help-container ul li{padding:.5em 0}.help-container .help-text{text-align:justify;line-height:1.5em;margin-top:1em}.tooltip{width:300px;max-width:300px;background-color:#777;color:#fff;z-index:101}.tooltip-text{padding:.5em}.tooltip-text .tooltip-header{text-transform:capitalize;font-weight:bold;border-bottom:1px solid #c9c9c9}.cursor-pointer{cursor:pointer}.password-actions{display:inline-block;width:12em}.password-actions>span,.password-actions i{margin-right:.6em}.form-control{position:relative}.form-control .password-actions{position:absolute;right:0;padding:20px}.custom-input-color{width:3em;height:1em;display:inline-block}.account-pass-image{height:32px;width:auto}.select-box{min-width:300px;max-width:100%}fieldset.warning{padding:8px;border-radius:5px;color:#ef5350;background-color:#ffebee;border:1px solid #ef5350}fieldset.warning legend{color:#ef5350!important}fieldset.warning a{color:#ef5350!important;font-weight:bold}#actions{width:100%;line-height:2em;margin-bottom:5em}#actions #logo{display:flex;width:100%;margin-bottom:30px;color:#607d8b;align-items:center;background:url("public/images/logo_full_bg.png") left no-repeat;background-size:auto 150px;height:150px}#actions #page-title{width:100%;color:#607d8b;text-align:center}#actions #page-title h1{font-weight:bold;font-size:24px;letter-spacing:3px}#actions ul.errors{max-width:40vw;margin:0 auto;list-style:none;font-size:14px;text-align:left}#actions ul.errors>li{margin:1.5em auto;border-radius:3px;padding:1em .5em}#actions ul.errors>li.msg-critical{color:#ef5350;background-color:#ffebee;border:1px solid #ef5350}#actions ul.errors>li.msg-warning{color:#ffca28;background-color:#fff8e1;border:1px solid #ffca28;color:#555}#actions ul.errors>li.msg-ok{color:#26a69a;background-color:#e0f2f1;border:1px solid #26a69a}#actions ul.errors>li>p.hint{color:#555;font-size:12px}#actions ul.errors>li>p.hint i{margin-right:.5em}#actions form{width:450px;margin:0 auto;text-align:left}#actions form fieldset{margin-bottom:2em}#actions form fieldset legend{width:100%;color:#fff;font-size:14px;font-weight:bold;text-align:center;background-color:#607d8b;margin:1em 0;letter-spacing:.2em;padding:.2em 0}#actions div.buttons{margin-top:2em;text-align:center}.center{text-align:center!important}.right{text-align:right!important}.left{text-align:left!important}.opacity50{opacity:.5!important}.msg-option-unvailable{color:#ffca28;background-color:#fff8e1;border:1px solid #ffca28;border:0;padding:.5em;text-align:center;margin:1em 0;font-size:1.5em}div.tag-list-box{margin-bottom:1em}div.tag-list-box .tag-list-header{text-align:left;border-bottom:1px solid #d9d9d9;color:#607d8b;font-size:12px;font-weight:bold;margin-bottom:.5em}div.tag-list-box .tag-list-body .tags-list-items{display:inline-block;padding:.5em;width:95%;height:3em;border-bottom:1px solid rgba(0,0,0,0.12);border-radius:3px!important;-moz-border-radius:3px!important;-webkit-border-radius:3px!important}div.tag-list-box i.select-icon{margin-right:.5em;color:#607d8b;font-size:18px}div.tag-list-box span.tag,div.tags-box span.tag{margin:0 3px 3px 0;padding:3px;background:#5c6bc0;color:#fff;border:0;border-radius:3px!important;-moz-border-radius:3px!important;-webkit-border-radius:3px!important}#box-pub-noheader #box-login{position:relative;min-height:14em}#box-pub-noheader #box-login #box-buttons{position:absolute;top:2em;right:2em}#box-pub-noheader #box-login #box-actions{width:100%;text-align:right}#box-pub-noheader #box-login #box-actions a{color:#c9c9c9}#box-pub-noheader #box-updated{width:350px;margin:3em auto;font-size:14px;text-align:center;padding:.5em;color:#26a69a;background-color:#e0f2f1;border:1px solid #26a69a}#box-pub-noheader #demo-info{padding:.5em;margin:3em auto 0 auto;color:#c9c9c9;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9}#box-pub-noheader #demo-info ul{display:flex;justify-content:space-around;list-style:none}#box-pub-noheader #demo-info ul li>span{padding:0 1em}@media screen and (max-width:600px){#box-pub-noheader #box-login #box-buttons{position:relative;top:0;right:0;text-align:right}#box-pub-noheader #box-login #box-actions{margin-top:1em}#box-pub-noheader #demo-info ul{display:flex;flex-direction:column;align-items:center;list-style:none}#box-pub-noheader #demo-info ul li{width:11em;text-align:left}#box-pub-noheader #demo-info ul li>span{padding:0 1em}}@media screen and (max-width:1000px){#content #searchbox .search-filters>*{margin:.5em 1em .5em 0}footer{display:none;justify-content:space-between;flex-wrap:wrap}footer .footer-parts{justify-content:space-between;flex-wrap:wrap}footer #footer-left,footer #footer-right{width:100%}footer .footer-parts>div{width:100%;padding:.5em 0}}@media screen and (max-width:600px){#content input,#box-popup input{width:100%}#content .mdl-textfield,#box-popup .mdl-textfield{width:100%}#content td.descField,#box-popup td.descField{display:none}#content td.valField .lowres-title,#box-popup td.valField .lowres-title{display:block}#content #searchbox .mdl-textfield{width:90%}#content #searchbox .search-text{width:90%}#content #searchbox .search-filters .selectize-control{width:100%}#content .data-header-minimal li.search-filter-spacer{display:none}#content .data-container,#content .tab-data{width:100%}#content .data-container .selectize-control,#content .tab-data .selectize-control{width:100%}#content .mdl-tabs__tab-bar{flex-wrap:wrap;height:auto}#content .pager{flex-direction:column-reverse}#content .pager>div{text-align:center;width:100%}#box-popup h2>.btn-popup-close{display:inline-block}#actions ul.errors{max-width:90vw}.mdl-data-table{table-layout:fixed;width:100%}.table-responsive td,.table-responsive th{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis}.table-responsive .cell-actions i{display:block!important}} \ No newline at end of file diff --git a/app/modules/web/themes/material-blue/js/app-theme.map b/app/modules/web/themes/material-blue/js/app-theme.map new file mode 100644 index 00000000..caf75469 --- /dev/null +++ b/app/modules/web/themes/material-blue/js/app-theme.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"app-theme.min.js", +"lineCount":21, +"mappings":"AAyBA,IAAI,QAAU,CAGN,MAAQ,EAHF,CCQN,aAAe,QAAQ,CAAC,CAAD,CAAQ,CAAR,CAAkB,CAAlB,CAA2B,CACpD,CAAJ,WAAqB,OAArB,GACE,CADF,CACsC,MAAA,CAAO,CAAP,CADtC,CAIA,KADA,IAAI,EAAM,CAAA,OAAV,CACS,EAAI,CAAb,CAAgB,CAAhB,CAAoB,CAApB,CAAyB,CAAA,EAAzB,CAA8B,CAC5B,IAAI,EAAQ,CAAA,CAAM,CAAN,CACZ,IAAI,CAAA,KAAA,CAAc,CAAd,CAAuB,CAAvB,CAA8B,CAA9B,CAAiC,CAAjC,CAAJ,CAA6C,MAAO,CAAC,EAAG,CAAJ,CAAO,EAAG,CAAV,CAFxB,CAI9B,MAAO,CAAC,EAAI,EAAL,CAAQ,EAAG,IAAK,EAAhB,CATiD,CDR5C,CEWd,QAAA,eAAA,CACsC,UAAlC,EAAA,MAAO,OAAA,iBAAP,CACA,MAAA,eADA,CAEA,QAAQ,CAAC,CAAD,CAAS,CAAT,CAAmB,CAAnB,CAA+B,CAErC,GAAI,CAAA,IAAJ,EAAsB,CAAA,IAAtB,CACE,KAAM,KAAI,SAAJ,CAAc,2CAAd,CAAN,CAEE,CAAJ,EAAc,KAAA,UAAd,EAAiC,CAAjC,EAA2C,MAAA,UAA3C,GACA,CAAA,CAAO,CAAP,CADA,CACmB,CAAA,MADnB,CALqC,CCV3C;OAAA,UAAA,CAAoB,QAAQ,CAAC,CAAD,CAAc,CACxC,MAAyB,WAAlB,EAAC,MAAO,OAAR,EAAiC,MAAjC,GAA4C,CAA5C,CACH,CADG,CAEe,WAAlB,EAAC,MAAO,OAAR,EAA2C,IAA3C,EAAiC,MAAjC,CAAmD,MAAnD,CAA4D,CAHxB,CAc1C,QAAA,OAAA,CAAiB,OAAA,UAAA,CAAkB,IAAlB,CCdjB,QAAA,SAAA,CAAmB,QAAQ,CAAC,CAAD,CAAS,CAAT,CAAmB,CAAnB,CAA6B,CAA7B,CAAqC,CAC9D,GAAK,CAAL,CAAA,CACI,CAAA,CAAM,OAAA,OACN,EAAA,CAAQ,CAAA,MAAA,CAAa,GAAb,CACZ,KAAS,CAAT,CAAa,CAAb,CAAgB,CAAhB,CAAoB,CAAA,OAApB,CAAmC,CAAnC,CAAsC,CAAA,EAAtC,CAA2C,CACzC,IAAI,EAAM,CAAA,CAAM,CAAN,CACJ,EAAN,GAAa,EAAb,GAAmB,CAAA,CAAI,CAAJ,CAAnB,CAA8B,EAA9B,CACA,EAAA,CAAM,CAAA,CAAI,CAAJ,CAHmC,CAKvC,CAAA,CAAW,CAAA,CAAM,CAAA,OAAN,CAAqB,CAArB,CACX,EAAA,CAAO,CAAA,CAAI,CAAJ,CACP,EAAA,CAAO,CAAA,CAAS,CAAT,CACP,EAAJ,EAAY,CAAZ,EAA4B,IAA5B,EAAoB,CAApB,EACA,OAAA,eAAA,CACI,CADJ,CACS,CADT,CACmB,CAAC,aAAc,CAAA,CAAf,CAAqB,SAAU,CAAA,CAA/B,CAAqC,MAAO,CAA5C,CADnB,CAZA,CAD8D,CCVhE;OAAA,SAAA,CAAiB,sBAAjB,CAAyC,QAAQ,CAAC,CAAD,CAAO,CACtD,MAAI,EAAJ,CAAiB,CAAjB,CAYe,QAAQ,CAAC,CAAD,CAAW,CAAX,CAAwB,CAC7C,MAAO,QAAA,aAAA,CAAqB,IAArB,CAA2B,CAA3B,CAAqC,CAArC,CAAA,EADsC,CAbO,CAAxD,CAkBG,UAlBH,CAkBe,KAlBf,CCIAA;OAAAC,MAAA,CAAgBC,QAAS,CAACC,CAAD,CAAM,CAG3B,IAAMC,EAAcC,CAAAC,MAAA,CAAQ,cAAR,CAApB,CAoBMC,EAAU,CACZC,MAAO,CACHC,MAAOJ,CAAA,CAAE,eAAF,CADJ,CAEHK,SAAUL,CAAA,CAAE,UAAF,CAFP,CADK,CAKZM,KAAMA,QAAS,CAACC,CAAD,CAAO,CACLC,IAAAA,EAAb,GAAID,CAAJ,EAAmC,CAAA,CAAnC,GAA0BA,CAA1B,EACIL,CAAAC,MAAAC,MAAAK,SAAA,CAA6B,cAA7B,CAGJP,EAAAC,MAAAC,MAAAE,KAAA,EACAJ,EAAAC,MAAAE,SAAAI,SAAA,CAAgC,WAAhC,CANkB,CALV,CAaZC,KAAMA,QAAS,EAAG,CACdR,CAAAC,MAAAC,MAAAO,YAAA,CAAgC,cAAhC,CAAAD,KAAA,EACAR,EAAAC,MAAAE,SAAAM,YAAA,CAAmC,WAAnC,CAFc,CAbN,CAiBZC,YAAaA,QAAS,EAAG,CACrBV,CAAAC,MAAAC,MAAAK,SAAA,CAA6B,cAA7B,CADqB,CAjBb,CApBhB,CA2CMI,EAAiBA,QAAS,CAACC,CAAD,CAAU,CACtCC,UAAAC,KAAAC,SAAAC,OAAA,CAAgC,QAAS,CAACD,CAAD,CAAWE,CAAX,CAAkB,CACvDL,CAAAM,KAAA,CAAa,WAAb;AAA0BH,CAA1B,CAGA,KAAMI,EAAaP,CAAAQ,OAAA,EAAnB,CACMC,EAAWvB,CAAA,CAAE,GAAF,CAAQc,CAAAM,KAAA,CAAa,IAAb,CAAR,CAA6B,SAA7B,CAEjBL,WAAAC,KAAAC,SAAAO,OAAA,CAAgCL,CAAhC,CAAuCL,CAAvC,CAGA,KAAMW,EAAM,IAAIC,iBAGhBL,EAAAM,KAAA,CAAgB,gBAAhB,CAAAC,IAAA,CAAsCX,CAAtC,CACAI,EAAAZ,SAAA,CACcgB,CAAAI,YAAAC,SADd,CAAAnB,YAAA,CAEiBc,CAAAI,YAAAE,WAFjB,CAKsB,EAAtB,CAAIR,CAAAS,OAAJ,GACIT,CAAAK,IAAA,CAAaX,CAAb,CAAAK,OAAA,EAAAb,SAAA,CACcgB,CAAAI,YAAAC,SADd,CAAAnB,YAAA,CAEiBc,CAAAI,YAAAE,WAFjB,CAGA,CAAAhB,UAAAkB,iBAAA,CAA4BV,CAA5B,CAJJ,CAnBuD,CAA3D,CADsC,CA3C1C,CAyEMW,EAAmBA,QAAS,EAAG,CAEjC,IAAMC,EACF,wSADEA;AAIkCpB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAJlCF,CAI4D,6SAJ5DA,CAQkCpB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CARlCF,CAQ4D,2SAR5DA;AAYkCpB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAZlCF,CAY4D,qSAZ5DA,CAgBkCpB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAhBlCF,CAgB4D,0TAhB5DA;AAoBqDpB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CApBrDF,CAoB+E,8LAIrFG,UAAA,EAAAhC,KAAA,CAAiB,CACbiC,MAAOxB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CADM,CAEbG,KAAML,CAFO,CAGbM,SAAU,CACNF,MAAOxB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CADD,CAHG,CAMbK,SAAU,CACNH,MAAOxB,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CADD,CAENM,QAASA,QAAS,CAACC,CAAD,CAAI,CAClBA,CAAAC,eAAA,EAEA9B,WAAAC,KAAAC,SAAAmB,OAAAU,WAAAC,MAAA,CAAmD/C,CAAA,CAAE,iBAAF,CAAAgD,GAAA,CAAwB,UAAxB,CACnDjC,WAAAC,KAAAC,SAAAmB,OAAAU,WAAAG,QAAA;AAAqDjD,CAAA,CAAE,mBAAF,CAAAgD,GAAA,CAA0B,UAA1B,CACrDjC,WAAAC,KAAAC,SAAAmB,OAAAU,WAAAI,UAAA,CAAuDlD,CAAA,CAAE,qBAAF,CAAAgD,GAAA,CAA4B,UAA5B,CACvDjC,WAAAC,KAAAC,SAAAmB,OAAAU,WAAAK,QAAA,CAAqDnD,CAAA,CAAE,mBAAF,CAAAgD,GAAA,CAA0B,UAA1B,CACrDjC,WAAAC,KAAAC,SAAAmB,OAAAU,WAAAM,UAAA,CAAuDC,QAAA,CAASrD,CAAA,CAAE,aAAF,CAAA4B,IAAA,EAAT,CAPrC,CAFhB,CANG,CAkBb0B,WAAY,CAAA,CAlBC,CAmBbC,aAAc,CAAC,YAAa,OAAd,CAnBD,CAoBbC,SAAUA,QAAS,EAAG,CAClBxD,CAAA,CAAE,iBAAF,CAAAyD,KAAA,CAA0B,SAA1B,CAAqC1C,UAAAC,KAAAC,SAAAmB,OAAAU,WAAAC,MAArC,CACA/C,EAAA,CAAE,mBAAF,CAAAyD,KAAA,CAA4B,SAA5B;AAAuC1C,UAAAC,KAAAC,SAAAmB,OAAAU,WAAAG,QAAvC,CACAjD,EAAA,CAAE,qBAAF,CAAAyD,KAAA,CAA8B,SAA9B,CAAyC1C,UAAAC,KAAAC,SAAAmB,OAAAU,WAAAI,UAAzC,CACAlD,EAAA,CAAE,mBAAF,CAAAyD,KAAA,CAA4B,SAA5B,CAAuC1C,UAAAC,KAAAC,SAAAmB,OAAAU,WAAAK,QAAvC,CACAnD,EAAA,CAAE,aAAF,CAAA4B,IAAA,CAAqBb,UAAAC,KAAAC,SAAAmB,OAAAU,WAAAM,UAArB,CALkB,CApBT,CAAjB,CA1BiC,CAzErC,CAoIMM,EAAiBA,QAAS,CAACC,CAAD,CAAa,CAEzCA,CAAAhC,KAAA,CAAgB,uBAAhB,CAAAiC,KAAA,CAA8C,QAAS,EAAG,CACtD,IAAMC,EAAQ7D,CAAA,CAAE,IAAF,CAEd,IAAyC,MAAzC,GAAI6D,CAAAzC,KAAA,CAAW,oBAAX,CAAJ,CAAA,CAIA,IAAM0C,EAAW/C,UAAAC,KAAA8C,SAAA,EAAjB,CACMC,EAAcF,CAAAvC,OAAA,EADpB,CAEM0C,EAAQH,CAAAI,QAAA,CAAc,MAAd,CAFd,CAGMC;AAAWL,CAAAzC,KAAA,CAAW,IAAX,CAAX8C,CAA8B,GAA9BA,CAAoCJ,CAH1C,CAKMK,EAAkBH,CAAArC,KAAA,CAAW,GAAX,CAAiBkC,CAAAzC,KAAA,CAAW,IAAX,CAAjB,CAAoC,SAApC,CACxB+C,EAAA/C,KAAA,CAAqB,IAArB,CAA2B8C,CAA3B,CAAsC,SAAtC,CAEAL,EAAAzC,KAAA,CAAW,IAAX,CAAiB8C,CAAjB,CACAL,EAAAzC,KAAA,CAAW,WAAX,CAAwByC,CAAAjC,IAAA,EAAxB,CAEIwC,EAAAA,CACA,4BADAA,CAC6BF,CAD7BE,CACqC,2EADrCA,CACiHrD,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CADjH+B,CAC2I,0HAD3IA,CAEsDF,CAFtDE,CAE8D,+FAF9DA,CAG2ErD,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAH3E+B;AAGqG,wGAHrGA,CAIiFrD,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAJjF+B,CAI2G,+FAJ3GA,CAKwErD,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CALxE+B,CAKkG,YAEtGL,EAAAM,MAAA,CAAkB,kCAAlB,CAEAN,EAAAO,KAAA,CAAiB,mBAAjB,CAAAC,QAAA,CACa,wBADb,CACsCL,CADtC,CAC8C,4FAD9C,CACyIA,CADzI,CACiJ,+BADjJ;AACgLnD,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CADhL,CAC0M,sBAD1M,CAAAkC,QAAA,CAEaH,CAFb,CAIAP,EAAAW,GAAA,CAAS,OAAT,CAAkB,QAAS,EAAG,CAC1BzD,UAAAC,KAAAC,SAAAwD,WAAA,CAAoCZ,CAApC,CAEA,KAAAa,QAAAC,KAAA,CAAoBd,CAAAjC,IAAA,EAHM,CAA9B,CAMMgD,EAAAA,CAAmBf,CAAAvC,OAAA,EAAAgD,KAAA,EAGzBM,EAAAjD,KAAA,CACU,UADV,CAAA6C,GAAA,CAEQ,OAFR,CAEiB,QAAS,EAAG,CACrB3D,CAAA,CAAegD,CAAf,CAEAA,EAAAgB,KAAA,EAHqB,CAF7B,CAQAD,EAAAjD,KAAA,CACU,iBADV,CAAA6C,GAAA,CAEQ,OAFR,CAEiB,QAAS,EAAG,CACrBtC,CAAA,EADqB,CAF7B,CAOA0C,EAAAjD,KAAA,CACU,WADV,CAAA6C,GAAA,CAEQ,WAFR,CAEqB,QAAS,EAAG,CACK,EAA9B,GAAI,IAAAE,QAAAI,SAAJ,CACI9E,CAAA,CAAE,IAAF,CAAAoB,KAAA,CAAa,OAAb,CAAsB,IAAAsD,QAAAI,SAAtB,CAA8C,MAA9C,CAAuDjB,CAAA,CAAM,CAAN,CAAAa,QAAAC,KAAvD,CADJ,CAGI3E,CAAA,CAAE,IAAF,CAAAoB,KAAA,CAAa,OAAb,CAAsByC,CAAA,CAAM,CAAN,CAAAa,QAAAC,KAAtB,CAJqB,CAFjC,CAWAC,EAAAjD,KAAA,CACU,QADV,CAAA6C,GAAA,CAEQ,OAFR,CAEiB,QAAS,EAAG,CACrBX,CAAAjC,IAAA,CAAU,EAAV,CACAiC;CAAA,CAAM,CAAN,CAAAa,QAAAC,KAAA,CAAwB,EAEK,EAA7B,CAAIR,CAAAnC,OAAJ,EACImC,CAAAvC,IAAA,CAAoB,EAApB,CAIJmD,iBAAAC,WAAA,EATqB,CAF7B,CAcAnB,EAAAzC,KAAA,CAAW,oBAAX,CAAiC,MAAjC,CAGA2D,iBAAAC,WAAA,EAhFA,CAHsD,CAA1D,CAuFArB,EAAAhC,KAAA,CAAgB,4BAAhB,CAAAiC,KAAA,CAAmD,QAAS,EAAG,CAC3D,IAAMC,EAAQ7D,CAAA,CAAE,IAAF,CAAd,CACMiF,EAAQjF,CAAA,CAAE,4CAAF,CAAoDe,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAApD,CAAiF,sBAAjF,CAEd,IAAgC,CAAhC,GAAIwB,CAAAqB,KAAA,CAAW,WAAX,CAAJ,CAAmC,CAC/B,IAAMC,EAAQnF,CAAA,CAAE,kDAAF,CAA0De,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAA1D,CAAuF,4BAAvF,CAAwHwB,CAAAzC,KAAA,CAAW,IAAX,CAAxH,CAA2I,qBAA3I,CACdyC,EAAAvC,OAAA,EAAA+C,MAAA,CAAqBc,CAArB,CAAAd,MAAA,CAAkCY,CAAlC,CAF+B,CAAnC,IAIIpB,EAAAvC,OAAA,EAAA+C,MAAA,CAAqBY,CAArB,CAIJA;CAAAT,GAAA,CAAS,WAAT,CAAsB,QAAS,EAAG,CAC9BS,CAAA7D,KAAA,CAAW,OAAX,CAAoByC,CAAA,CAAM,CAAN,CAAAa,QAAAC,KAApB,CAD8B,CAAlC,CAZ2D,CAA/D,CAzFyC,CApI7C,CAmPMS,EAAkBA,QAAS,CAACzB,CAAD,CAAa,CAC1C7D,CAAAuF,KAAA,CAAS,iBAAT,CAEA,KAAMC,EAAiB,CACnBC,OAAQ,YADW,CAEnBC,KAAMzE,UAAAqB,OAAAqD,QAAAC,OAAAC,OAAA,CAAwC,CAAxC,CAA2C,CAA3C,CAFa,CAGnBC,KAAM,CAAA,CAHa,CAInBC,WAAY9E,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAJO,CAKnByD,OAAQ/E,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CALW,CAMnB0D,UAAWhF,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CANQ,CAOnB2D,QAASjF,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAPU,CAQnB4D,QAAS,IAAIC,IARM,CASnBC,aAAc,eATK,CAgBvBxC,EAAAhC,KAAA,CAAgB,4BAAhB,CAAAiC,KAAA,CAAmD,QAAS,EAAG,CAC3D,IAAMC,EAAQ7D,CAAA,CAAE,IAAF,CAAd,CACMoG,EAAUvC,CAAAvC,OAAA,EAEhBuC,EAAAwC,4BAAA,CAAkCf,CAAlC,CAGA,KAAMgB;AAAWF,CAAAzE,KAAA,CAAa,aAAb,CAA6BkC,CAAAqB,KAAA,CAAW,UAAX,CAA7B,CAAsD,GAAtD,CAEC,EAAlB,CAAIrB,CAAAjC,IAAA,EAAJ,EACI0E,CAAA1E,IAAA,CAbG2E,MAAAC,GAAA,CAasB3C,CAAAjC,IAAAA,EAbtB,CAAeb,UAAAqB,OAAAqD,QAAAgB,SAAf,CAAAlB,OAAA,CAA0D,GAA1D,CAaH,CAIJa,EAAA9B,KAAA,CAAa,GAAb,CAAAE,GAAA,CAAqB,OAArB,CAA8B,QAAS,EAAG,CACtCX,CAAA6C,QAAA,CAAc,eAAd,CADsC,CAA1C,CAKA7C,EAAAW,GAAA,CAAS,QAAT,CAAmB,QAAS,EAAG,CAC3B8B,CAAA1E,IAAA,CAvBG2E,MAAAC,GAAA,CAuBsB3C,CAAAjC,IAAAA,EAvBtB,CAAeb,UAAAqB,OAAAqD,QAAAgB,SAAf,CAAAlB,OAAA,CAA0D,GAA1D,CAuBH,CAD2B,CAA/B,CAnB2D,CAA/D,CAnB0C,CAnP9C,CAieMoB,EAASA,QAAS,EAAG,CACvB7G,CAAAuF,KAAA,CAAS,cAAT,CAGAN,iBAAAC,WAAA,EAEAhF,EAAA,CAAE,MAAF,CAAA0G,QAAA,CAAkB3G,CAAlB,CANuB,CAiB3B,OAAO,CACH2D,eAAgBA,CADb,CAEHzC,SAAUJ,CAFP,CAGH8F,OAAQA,CAHL,CAIHC,cApNkBA,CAClBC,KAAMA,QAAS,EAAG,CACd,IAAMC,EAASC,QAAAC,cAAA,CAAuB,aAAvB,CACChH;CAAAiH,CAAE,qBAAFA,CAEhBtF,KAAA,CAAa,GAAb,CAAAuF,MAAA,CAAwB,QAAS,EAAG,CAChCJ,CAAAK,eAAAC,aAAA,EADgC,CAApC,CAJc,CADAR,CASlBS,OAAQA,QAAS,EAAG,CAChB,IAAMC,EAAatH,CAAA,CAAE,YAAF,CAAnB,CACMuH,EAAcvH,CAAA,CAAE,cAAF,CAEpBsH,EAAA3F,KAAA,CAAgB,kBAAhB,CAAA6C,GAAA,CAAuC,OAAvC,CAAgD,QAAS,CAAC5B,CAAD,CAAI,CACzD5C,CAAA,CAAE,iBAAF,CAAA2B,KAAA,CAA0B,GAA1B,CAAAhB,YAAA,CAA2C,4BAA3C,CADyD,CAA7D,CAIA2G,EAAA3F,KAAA,CAAgB,iBAAhB,CAAA6C,GAAA,CAAsC,OAAtC,CAA+C,QAAS,EAAG,CACvD,IAAMS,EAAQjF,CAAA,CAAE,IAAF,CAAA2B,KAAA,CAAa,GAAb,CAAd,CACM6F,EAAaF,CAAA3F,KAAA,CAAgB,yBAAhB,CAEK,EAAxB,EAAI6F,CAAA5F,IAAA,EAAJ,EACIqD,CAAAxE,SAAA,CAAe,4BAAf,CAGA,CAFAwE,CAAA7D,KAAA,CAAW,OAAX,CAAoBL,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAApB,CAEA,CAAAmF,CAAA5F,IAAA,CAAe,CAAf,CAJJ,GAMIqD,CAAAtE,YAAA,CAAkB,4BAAlB,CAGA;AAFAsE,CAAA7D,KAAA,CAAW,OAAX,CAAoBL,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAApB,CAEA,CAAAmF,CAAA5F,IAAA,CAAe,CAAf,CATJ,CAYA0F,EAAAG,OAAA,EAhBuD,CAA3D,CA+BA,KAAMC,EAAcJ,CAAA3F,KAAA,CAAgB,OAAhB,CAAA,CAAyB,CAAzB,CAApB,CACMgG,EAAWL,CAAA3F,KAAA,CAAgB,sBAAhB,CADjB,CAEMiG,EAAcN,CAAA3F,KAAA,CAAgB,eAAhB,CAEpB4F,EAAA/C,GAAA,CAAe,OAAf,CAAwB,6DAAxB,CAAuF,QAAS,EAAG,CAC/F,IAAMX,EAAQ7D,CAAA,CAAE,IAAF,CACd6D,EAAAvC,OAAA,EAAAK,KAAA,CAAoB,GAApB,CAAAlB,SAAA,CAAkC,UAAlC,CAEAM,WAAA8G,QAAAC,QAAAC,KAAA,CAAgClE,CAAhC,CAJ+F,CAAnG,CAAAW,GAAA,CAKM,OALN,CAKe,8BALf,CAK+C,QAAS,EAAG,CACvD,IAAMX,EAAQ7D,CAAA,CAAE,IAAF,CAEde,WAAA8G,QAAAC,QAAAE,aAAA,CAAwCnE,CAAxC,CAA+C,QAAS,EAAG,CAvB/B,IAA5B,GAwBkBA,CAxBdqB,KAAA,CAAU,QAAV,CAAJ,EAwBkBrB,CAvBdpD,SAAA,CAAc,4BAAd,CAEA;AAqBcoD,CAtBdzC,KAAA,CAAU,OAAV,CAAmBL,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAAnB,CACA,CAqBcwB,CArBdoE,KAAA,CAAU,MAAV,CAHJ,GAwBkBpE,CAnBdlD,YAAA,CAAiB,4BAAjB,CAEA,CAiBckD,CAlBdzC,KAAA,CAAU,OAAV,CAAmBL,UAAAqB,OAAAC,KAAA,CAAuB,EAAvB,CAAnB,CACA,CAiBcwB,CAjBdoE,KAAA,CAAU,aAAV,CAPJ,CAuB2D,CAA3D,CAHuD,CAL3D,CAAAzD,GAAA,CAWM,OAXN,CAWe,uBAXf,CAWwC,QAAS,EAAG,CAC5CmD,CAAA3E,GAAA,CAAY,SAAZ,CAAJ,EACI4E,CAAAlB,QAAA,CAAoB,OAApB,CAGJgB,EAAAQ,UAAAC,QAAA,CAA8BnI,CAAA,CAAE,IAAF,CAAAkF,KAAA,CAAa,QAAb,CAA9B,CAAsD,CAAA,CAAtD,CALgD,CAXpD,CAmBA0C,EAAApD,GAAA,CAAe,OAAf,CAAwB,QAAS,EAAG,CAChC,IAAMX,EAAQ7D,CAAA,CAAE,IAAF,CAEV2H,EAAA3E,GAAA,CAAY,SAAZ,CAAJ,EACI2E,CAAAS,UAAA,CAAmB,MAAnB,CACA,CAAAvE,CAAAoE,KAAA,CAAWpE,CAAAqB,KAAA,CAAW,SAAX,CAAX,CAFJ,GAIIyC,CAAAU,QAAA,CAAiB,MAAjB,CACA,CAAAxE,CAAAoE,KAAA,CAAWpE,CAAAqB,KAAA,CAAW,WAAX,CAAX,CALJ,CAHgC,CAApC,CAYmC,GAAnC,GAAIwC,CAAAY,cAAJ,EACoC,CADpC,GACOV,CAAA1C,KAAA,CAAiB,MAAjB,CADP,EAGI0C,CAAAlB,QAAA,CAAoB,OAApB,CA7EY,CATFE;AAyFlB2B,OAAQA,QAAS,CAAC5E,CAAD,CAAa,CAC1BD,CAAA,CAAeC,CAAf,CACAyB,EAAA,CAAgBzB,CAAhB,CAF0B,CAzFZiD,CAgNf,CAKH1G,QAASA,CALN,CAMHsI,KAjfSA,CACTC,SAAUA,QAAS,EAAG,CAClB3I,CAAAuF,KAAA,CAAS,eAAT,CAEAsB,EAAA,EAHkB,CADb6B,CA2eN,CAOHP,KA/DSA,CACTS,QAASA,QAAS,CAACC,CAAD,CAAQC,CAAR,CAAc,CAC5B,IAAMC,EAAM7I,CAAA,CAAE,2CAAF,CAAZ,CACM8I,EAAM9I,CAAA,CAAE,kCAAF,CADZ,CAEM+I,EAAQ/I,CAAA,CAAE,sDAAF,CAFd,CAIMgJ,EAAI,gDAAJA,EAAmExI,IAAAA,EAAT,GAAAoI,CAAA,EAA+B,EAA/B,GAAsBA,CAAtB,CAAoC,aAApC,CAAoDA,CAA9GI,EAAsH,MAE5HL,EAAAM,QAAA,CAAc,QAAS,CAACC,CAAD,CAAQ,CAC3B,IAAMC,EAAaJ,CAAAK,MAAA,EACnBD,EAAAE,OAAA,CAAkBL,CAAlB,CACAG,EAAAE,OAAA,CAAkBH,CAAlB,CAEMI,EAAAA,CAAQR,CAAAM,MAAA,EAAAC,OAAA,CAAmBF,CAAnB,CACdN,EAAAQ,OAAA,CAAWC,CAAX,CAN2B,CAA/B,CASA,OAAOT,EAhBqB,CADvBZ,CAmBTsB,KAAM,CACFC,IAAKA,QAAS,CAACC,CAAD;AAASC,CAAT,CAAgBnH,CAAhB,CAAuBoH,CAAvB,CAAiC,CACrCC,CAAAA,CAAU5J,CAAA,CAAEyJ,CAAF,CAChB,KAAII,CAEa,EAAjB,GAAIF,CAAJ,GACIC,CAAAtI,OAAA,EAAAK,KAAA,CAAsB,QAAtB,CAAiC+H,CAAjC,CAAAjJ,SAAA,CAAiD,WAAjD,CACA,CAAAoJ,CAAA,CAAS,WAFb,CAOAD,EAAAP,OAAA,CAFY,iBAEZ,CAFiCK,CAEjC,CAFyC,yBAEzC,CAFuEG,CAEvE,CAFgF,IAEhF,CAFwFtH,CAExF,CAFgG,MAEhG,CAX2C,CAD7C,CAnBG0F,CAwDN,CArfoB;", +"sources":[" [synthetic:base] "," [synthetic:util/findinternal] "," [synthetic:util/defineproperty] "," [synthetic:util/global] "," [synthetic:util/polyfill] "," [synthetic:es6/array/find] ","app-theme.js"], +"names":["sysPass","Theme","sysPass.Theme","log","updateEvent","$","Event","loading","elems","$wrap","$loading","show","full","undefined","addClass","hide","removeClass","upgradeFull","randomPassword","$target","sysPassApp","util","password","random","level","attr","$dstParent","parent","$targetR","output","mdl","MaterialTextfield","find","val","CssClasses_","IS_DIRTY","IS_INVALID","length","encryptFormValue","complexityDialog","content","config","LANG","mdlDialog","title","text","negative","positive","onClick","e","preventDefault","complexity","chars","is","numbers","uppercase","symbols","numlength","parseInt","cancelable","contentStyle","onLoaded","prop","passwordDetect","$container","each","$this","uniqueId","$thisParent","$form","closest","targetId","$passwordRepeat","btnMenu","after","next","prepend","on","checkLevel","dataset","pass","$passwordActions","blur","levelMsg","componentHandler","upgradeDom","$icon","data","$clip","setupDatePicker","info","datePickerOpts","format","lang","BROWSER","LOCALE","substr","time","cancelText","okText","clearText","nowText","minDate","Date","triggerEvent","$parent","bootstrapMaterialDatePicker","$dstUnix","moment","tz","TIMEZONE","trigger","update","viewsTriggers","main","layout","document","querySelector","$drawer","click","MaterialLayout","toggleDrawer","search","$frmSearch","$resContent","$searchfav","submit","$tagsSelect","$tagsBar","$showFilter","actions","account","sort","saveFavorite","html","selectize","addItem","slideDown","slideUp","selectedIndex","common","ajax","complete","getList","items","icon","$ul","$li","$span","i","forEach","value","$spanClone","clone","append","$item","tabs","add","header","index","isActive","$header","active"] +} diff --git a/app/modules/web/themes/material-blue/js/app-theme.min.js b/app/modules/web/themes/material-blue/js/app-theme.min.js new file mode 100644 index 00000000..b423d44a --- /dev/null +++ b/app/modules/web/themes/material-blue/js/app-theme.min.js @@ -0,0 +1,21 @@ +var $jscomp={scope:{},findInternal:function(a,g,b){a instanceof String&&(a=String(a));for(var e=a.length,f=0;f\n \n \n \n \n
\n \n \n
\n ';mdlDialog().show({title:sysPassApp.config.LANG[29],text:a,negative:{title:sysPassApp.config.LANG[44]},positive:{title:sysPassApp.config.LANG[43],onClick:function(d){d.preventDefault();sysPassApp.util.password.config.complexity.chars=$("#checkbox-chars").is(":checked");sysPassApp.util.password.config.complexity.numbers= +$("#checkbox-numbers").is(":checked");sysPassApp.util.password.config.complexity.uppercase=$("#checkbox-uppercase").is(":checked");sysPassApp.util.password.config.complexity.symbols=$("#checkbox-symbols").is(":checked");sysPassApp.util.password.config.complexity.numlength=parseInt($("#passlength").val())}},cancelable:!0,contentStyle:{"max-width":"300px"},onLoaded:function(){$("#checkbox-chars").prop("checked",sysPassApp.util.password.config.complexity.chars);$("#checkbox-numbers").prop("checked", +sysPassApp.util.password.config.complexity.numbers);$("#checkbox-uppercase").prop("checked",sysPassApp.util.password.config.complexity.uppercase);$("#checkbox-symbols").prop("checked",sysPassApp.util.password.config.complexity.symbols);$("#passlength").val(sysPassApp.util.password.config.complexity.numlength)}})},k=function(a){a.find(".passwordfield__input").each(function(){var d=$(this);if("true"!==d.attr("data-pass-upgraded")){var a=sysPassApp.util.uniqueId(),c=d.parent(),b=d.closest("form"),a= +d.attr("id")+"-"+a,h=b.find("#"+d.attr("id")+"_repeat");h.attr("id",a+"_repeat");d.attr("id",a);d.attr("data-pass",d.val());b='\n ";c.after('
');c.next(".password-actions").prepend("remove_red_eye').prepend(b);d.on("keyup",function(){sysPassApp.util.password.checkLevel(d);this.dataset.pass=d.val()});c=d.parent().next();c.find(".passGen").on("click",function(){e(d);d.blur()});c.find(".passComplexity").on("click",function(){f()});c.find(".showpass").on("mouseover",function(){""!==this.dataset.levelMsg?$(this).attr("title",this.dataset.levelMsg+"\n\n"+d[0].dataset.pass):$(this).attr("title",d[0].dataset.pass)});c.find(".reset").on("click",function(){d.val(""); +d[0].dataset.pass="";0remove_red_eye');if(1===a.data("clipboard")){var b=$('content_paste');a.parent().after(b).after(c)}else a.parent().after(c); +c.on("mouseover",function(){c.attr("title",a[0].dataset.pass)})})},n=function(c){a.info("setupDatePicker");var d={format:"YYYY-MM-DD",lang:sysPassApp.config.BROWSER.LOCALE.substr(0,2),time:!1,cancelText:sysPassApp.config.LANG[44],okText:sysPassApp.config.LANG[43],clearText:sysPassApp.config.LANG[30],nowText:sysPassApp.config.LANG[56],minDate:new Date,triggerEvent:"dateIconClick"};c.find(".password-datefield__input").each(function(){var a=$(this),c=a.parent();a.bootstrapMaterialDatePicker(d);var b= +c.find("input[name="+a.data("dst-unix")+"]");0'),d=$('
  • '),e=$(''),f=''+(void 0===b||""===b?"description":b)+"";a.forEach(function(a){var b=e.clone();b.append(f);b.append(a);a=d.clone().append(b);c.append(a)});return c},tabs:{add:function(a, +b,e,f){a=$(a);var c;1===f&&(a.parent().find("#tabs-"+b).addClass("is-active"),c="is-active");a.append(''+e+"")}}}}}; diff --git a/app/modules/web/themes/material-blue/views/plugin/index.inc b/app/modules/web/themes/material-blue/views/plugin/index.inc new file mode 100644 index 00000000..50c1aa00 --- /dev/null +++ b/app/modules/web/themes/material-blue/views/plugin/index.inc @@ -0,0 +1,4 @@ +
    +includeTemplate('datagrid-grid', 'grid'); \ No newline at end of file diff --git a/css/fonts.css b/css/fonts.css index fbb48d2d..56eedf2c 100644 --- a/css/fonts.css +++ b/css/fonts.css @@ -1,35 +1,35 @@ -/* - * sysPass - * - * @author nuxsmin - * @link http://syspass.org - * @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org - * - * This file is part of sysPass. - * - * sysPass is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * sysPass is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with sysPass. If not, see . - */ - -/* Fuentes para Iconos de MDL */ -@font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url("fonts/MaterialIcons-Regular.eot"); /* For IE6-8 */ - src: local('Material Icons'), - local('MaterialIcons-Regular'), - url("fonts/MaterialIcons-Regular.woff2") format('woff2'), - url("fonts/MaterialIcons-Regular.woff") format('woff'), - url("fonts/MaterialIcons-Regular.ttf") format('truetype'); +/* + * sysPass + * + * @author nuxsmin + * @link http://syspass.org + * @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org + * + * This file is part of sysPass. + * + * sysPass is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * sysPass is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with sysPass. If not, see . + */ + +/* Fuentes para Iconos de MDL */ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url("public/vendor/fonts/MaterialIcons-Regular.eot"); /* For IE6-8 */ + src: local('Material Icons'), + local('MaterialIcons-Regular'), + url("public/vendor/fonts/MaterialIcons-Regular.woff2") format('woff2'), + url("public/vendor/fonts/MaterialIcons-Regular.woff") format('woff'), + url("public/vendor/fonts/MaterialIcons-Regular.ttf") format('truetype'); } \ No newline at end of file diff --git a/css/fonts/MaterialIcons-Regular.svg b/css/fonts/MaterialIcons-Regular.svg index 29464918..b665b281 100644 --- a/css/fonts/MaterialIcons-Regular.svg +++ b/css/fonts/MaterialIcons-Regular.svg @@ -1,830 +1,803 @@ - - - - - - - - - - - - - - - - - - - - - - - - material-design-icons/MaterialIcons-Regular.svg at master · google/material-design-icons · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Skip to content - - - - - - - - - - - -
    - -
    -
    - - -
    -
    -
    - - - -
    -
    - - - -Permalink - - - - - - -
    - - - ac75e83 - - Feb 9, 2016 - - - -
    - - -
    - - -
    - -
    -
    -
    - - -
    - Raw - Blame - History -
    - - - - -
    - -
    - 2374 lines (2373 sloc) - - 275 KB -
    -
    - - - -
    - -
    -
    - -
    Sorry, something went wrong. Reload?
    -
    Sorry, we cannot display this file.
    -
    Sorry, this file is invalid so it cannot be displayed.
    - -
    -
    - -
    - -
    - - - - -
    - -
    - - -
    -
    - -
    - - - - - - - -
    - - - You can't perform that action at this time. -
    - - - - - - - - - - -
    - - You signed in with another tab or window. Reload to refresh your session. - You signed out in another tab or window. Reload to refresh your session. -
    - - - - - + + + + + + + + + + + + + + + + + + material-design-icons/MaterialIcons-Regular.svg at master · google/material-design-icons · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Skip to content + + + + + + + + + + + +
    + +
    +
    + + +
    +
    +
    + + + +
    +
    + + + +Permalink + + + + + + +
    + + + ac75e83 + + Feb 9, 2016 + + + +
    + + +
    + + +
    + +
    +
    +
    + + +
    + Raw + Blame + History +
    + + + + +
    + +
    + 2374 lines (2373 sloc) + + 275 KB +
    +
    + + + +
    + +
    +
    + +
    Sorry, something went wrong. Reload?
    +
    Sorry, we cannot display this file.
    +
    Sorry, this file is invalid so it cannot be displayed.
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + +
    + + + + + + + +
    + + + You can't perform that action at this time. +
    + + + + + + + + + + +
    + + You signed in with another tab or window. Reload to refresh your session. + You signed out in another tab or window. Reload to refresh your session. +
    + + + + + diff --git a/css/jquery-ui.min.css b/css/jquery-ui.min.css index 8b4ec08d..fd7d148c 100644 --- a/css/jquery-ui.min.css +++ b/css/jquery-ui.min.css @@ -1,7 +1,7 @@ -/*! jQuery UI - v1.11.4 - 2015-07-18 -* http://jqueryui.com -* Includes: core.css, draggable.css, resizable.css, accordion.css, button.css, dialog.css, menu.css, spinner.css, tabs.css, theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px -* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ - +/*! jQuery UI - v1.11.4 - 2015-07-18 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, accordion.css, button.css, dialog.css, menu.css, spinner.css, tabs.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width: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:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.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-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.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:normal}.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-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;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:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.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:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;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 #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.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-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.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-on{background-position:-96px -144px}.ui-icon-radio-off{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{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/css/jquery-ui.structure.min.css b/css/jquery-ui.structure.min.css index cefc65bc..7525edec 100644 --- a/css/jquery-ui.structure.min.css +++ b/css/jquery-ui.structure.min.css @@ -1,5 +1,5 @@ -/*! jQuery UI - v1.11.4 - 2015-07-18 -* http://jqueryui.com -* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ - +/*! jQuery UI - v1.11.4 - 2015-07-18 +* http://jqueryui.com +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width: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:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.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-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.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:normal}.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-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;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:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.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:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none} \ No newline at end of file diff --git a/css/magnific-popup.css b/css/magnific-popup.css index 96972a73..b4760c67 100644 --- a/css/magnific-popup.css +++ b/css/magnific-popup.css @@ -1,374 +1,374 @@ -/* - * sysPass - * - * @author nuxsmin - * @link http://syspass.org - * @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org - * - * This file is part of sysPass. - * - * sysPass is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * sysPass is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with sysPass. If not, see . - */ - -/* Magnific Popup CSS */ -.mfp-bg { - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1042; - overflow: hidden; - position: fixed; - background: #0b0b0b; - opacity: 0.5; } - -.mfp-wrap { - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1043; - position: fixed; - outline: none !important; - -webkit-backface-visibility: hidden; } - -.mfp-container { - text-align: center; - position: absolute; - width: 100%; - height: 100%; - left: 0; - top: 0; - padding: 0 8px; - box-sizing: border-box; } - -.mfp-container:before { - content: ''; - display: inline-block; - height: 100%; - vertical-align: middle; } - -.mfp-align-top .mfp-container:before { - display: none; } - -.mfp-content { - position: relative; - display: inline-block; - vertical-align: middle; - margin: 0 auto; - text-align: left; - z-index: 1045; } - -.mfp-inline-holder .mfp-content, -.mfp-ajax-holder .mfp-content { - width: 100%; - cursor: auto; } - -.mfp-ajax-cur { - cursor: progress; } - -.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { - cursor: -moz-zoom-out; - cursor: -webkit-zoom-out; - cursor: zoom-out; } - -.mfp-zoom { - cursor: pointer; - cursor: -webkit-zoom-in; - cursor: -moz-zoom-in; - cursor: zoom-in; } - -.mfp-auto-cursor .mfp-content { - cursor: auto; } - -.mfp-close, -.mfp-arrow, -.mfp-preloader, -.mfp-counter { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; } - -.mfp-loading.mfp-figure { - display: none; } - -.mfp-hide { - display: none !important; } - -.mfp-preloader { - color: #CCC; - position: absolute; - top: 50%; - width: auto; - text-align: center; - margin-top: -0.8em; - left: 8px; - right: 8px; - z-index: 1044; } - .mfp-preloader a { - color: #CCC; } - .mfp-preloader a:hover { - color: #FFF; } - -.mfp-s-ready .mfp-preloader { - display: none; } - -.mfp-s-error .mfp-content { - display: none; } - -button.mfp-close, -button.mfp-arrow { - overflow: visible; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; - display: block; - outline: none; - padding: 0; - z-index: 1046; - box-shadow: none; - touch-action: manipulation; } - -button::-moz-focus-inner { - padding: 0; - border: 0; } - -.mfp-close { - width: 44px; - height: 44px; - line-height: 44px; - position: absolute; - right: 0; - top: 0; - text-decoration: none; - text-align: center; - opacity: 0.65; - padding: 0 0 18px 10px; - color: #FFF; - font-style: normal; - font-size: 28px; - font-family: Arial, Baskerville, monospace; } - .mfp-close:hover, - .mfp-close:focus { - opacity: 1; } - .mfp-close:active { - top: 1px; } - -.mfp-close-btn-in .mfp-close { - color: #333; } - -.mfp-image-holder .mfp-close, -.mfp-iframe-holder .mfp-close { - color: #FFF; - right: -6px; - text-align: right; - padding-right: 6px; - width: 100%; } - -.mfp-counter { - position: absolute; - top: 0; - right: 0; - color: #CCC; - font-size: 12px; - line-height: 18px; - white-space: nowrap; } - -.mfp-arrow { - position: absolute; - opacity: 0.65; - margin: 0; - top: 50%; - margin-top: -55px; - padding: 0; - width: 90px; - height: 110px; - -webkit-tap-highlight-color: transparent; } - .mfp-arrow:active { - margin-top: -54px; } - .mfp-arrow:hover, - .mfp-arrow:focus { - opacity: 1; } - .mfp-arrow:before, - .mfp-arrow:after { - content: ''; - display: block; - width: 0; - height: 0; - position: absolute; - left: 0; - top: 0; - margin-top: 35px; - margin-left: 35px; - border: medium inset transparent; } - .mfp-arrow:after { - border-top-width: 13px; - border-bottom-width: 13px; - top: 8px; } - .mfp-arrow:before { - border-top-width: 21px; - border-bottom-width: 21px; - opacity: 0.7; } - -.mfp-arrow-left { - left: 0; } - .mfp-arrow-left:after { - border-right: 17px solid #FFF; - margin-left: 31px; } - .mfp-arrow-left:before { - margin-left: 25px; - border-right: 27px solid #3F3F3F; } - -.mfp-arrow-right { - right: 0; } - .mfp-arrow-right:after { - border-left: 17px solid #FFF; - margin-left: 39px; } - .mfp-arrow-right:before { - border-left: 27px solid #3F3F3F; } - -.mfp-iframe-holder { - padding-top: 40px; - padding-bottom: 40px; } - .mfp-iframe-holder .mfp-content { - line-height: 0; - width: 100%; - max-width: 900px; } - .mfp-iframe-holder .mfp-close { - top: -40px; } - -.mfp-iframe-scaler { - width: 100%; - height: 0; - overflow: hidden; - padding-top: 56.25%; } - .mfp-iframe-scaler iframe { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); - background: #000; } - -/* Main image in popup */ -img.mfp-img { - width: auto; - max-width: 100%; - height: auto; - display: block; - line-height: 0; - box-sizing: border-box; - padding: 40px 0 40px; - margin: 0 auto; } - -/* The shadow behind the image */ -.mfp-figure { - line-height: 0; } - .mfp-figure:after { - content: ''; - position: absolute; - left: 0; - top: 40px; - bottom: 40px; - display: block; - right: 0; - width: auto; - height: auto; - z-index: -1; - box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); - background: #444; } - .mfp-figure small { - color: #BDBDBD; - display: block; - font-size: 12px; - line-height: 14px; } - .mfp-figure figure { - margin: 0; } - -.mfp-bottom-bar { - margin-top: -36px; - position: absolute; - top: 100%; - left: 0; - width: 100%; - cursor: auto; } - -.mfp-title { - text-align: left; - line-height: 18px; - color: #F3F3F3; - word-wrap: break-word; - padding-right: 36px; } - -.mfp-image-holder .mfp-content { - max-width: 100%; } - -.mfp-gallery .mfp-image-holder .mfp-figure { - cursor: pointer; } - -@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { - /** - * Remove all paddings around the image on small screen - */ - .mfp-img-mobile .mfp-image-holder { - padding-left: 0; - padding-right: 0; } - .mfp-img-mobile img.mfp-img { - padding: 0; } - .mfp-img-mobile .mfp-figure:after { - top: 0; - bottom: 0; } - .mfp-img-mobile .mfp-figure small { - display: inline; - margin-left: 5px; } - .mfp-img-mobile .mfp-bottom-bar { - background: rgba(0, 0, 0, 0.6); - bottom: 0; - margin: 0; - top: auto; - padding: 3px 5px; - position: fixed; - box-sizing: border-box; } - .mfp-img-mobile .mfp-bottom-bar:empty { - padding: 0; } - .mfp-img-mobile .mfp-counter { - right: 5px; - top: 3px; } - .mfp-img-mobile .mfp-close { - top: 0; - right: 0; - width: 35px; - height: 35px; - line-height: 35px; - background: rgba(0, 0, 0, 0.6); - position: fixed; - text-align: center; - padding: 0; } } - -@media all and (max-width: 900px) { - .mfp-arrow { - -webkit-transform: scale(0.75); - transform: scale(0.75); } - .mfp-arrow-left { - -webkit-transform-origin: 0; - transform-origin: 0; } - .mfp-arrow-right { - -webkit-transform-origin: 100%; - transform-origin: 100%; } - .mfp-container { - padding-left: 6px; - padding-right: 6px; } } +/* + * sysPass + * + * @author nuxsmin + * @link http://syspass.org + * @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org + * + * This file is part of sysPass. + * + * sysPass is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * sysPass is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with sysPass. If not, see . + */ + +/* Magnific Popup CSS */ +.mfp-bg { + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1042; + overflow: hidden; + position: fixed; + background: #0b0b0b; + opacity: 0.5; } + +.mfp-wrap { + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1043; + position: fixed; + outline: none !important; + -webkit-backface-visibility: hidden; } + +.mfp-container { + text-align: center; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + padding: 0 8px; + box-sizing: border-box; } + +.mfp-container:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; } + +.mfp-align-top .mfp-container:before { + display: none; } + +.mfp-content { + position: relative; + display: inline-block; + vertical-align: middle; + margin: 0 auto; + text-align: left; + z-index: 1045; } + +.mfp-inline-holder .mfp-content, +.mfp-ajax-holder .mfp-content { + width: 100%; + cursor: auto; } + +.mfp-ajax-cur { + cursor: progress; } + +.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { + cursor: -moz-zoom-out; + cursor: -webkit-zoom-out; + cursor: zoom-out; } + +.mfp-zoom { + cursor: pointer; + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; } + +.mfp-auto-cursor .mfp-content { + cursor: auto; } + +.mfp-close, +.mfp-arrow, +.mfp-preloader, +.mfp-counter { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } + +.mfp-loading.mfp-figure { + display: none; } + +.mfp-hide { + display: none !important; } + +.mfp-preloader { + color: #CCC; + position: absolute; + top: 50%; + width: auto; + text-align: center; + margin-top: -0.8em; + left: 8px; + right: 8px; + z-index: 1044; } + .mfp-preloader a { + color: #CCC; } + .mfp-preloader a:hover { + color: #FFF; } + +.mfp-s-ready .mfp-preloader { + display: none; } + +.mfp-s-error .mfp-content { + display: none; } + +button.mfp-close, +button.mfp-arrow { + overflow: visible; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + display: block; + outline: none; + padding: 0; + z-index: 1046; + box-shadow: none; + touch-action: manipulation; } + +button::-moz-focus-inner { + padding: 0; + border: 0; } + +.mfp-close { + width: 44px; + height: 44px; + line-height: 44px; + position: absolute; + right: 0; + top: 0; + text-decoration: none; + text-align: center; + opacity: 0.65; + padding: 0 0 18px 10px; + color: #FFF; + font-style: normal; + font-size: 28px; + font-family: Arial, Baskerville, monospace; } + .mfp-close:hover, + .mfp-close:focus { + opacity: 1; } + .mfp-close:active { + top: 1px; } + +.mfp-close-btn-in .mfp-close { + color: #333; } + +.mfp-image-holder .mfp-close, +.mfp-iframe-holder .mfp-close { + color: #FFF; + right: -6px; + text-align: right; + padding-right: 6px; + width: 100%; } + +.mfp-counter { + position: absolute; + top: 0; + right: 0; + color: #CCC; + font-size: 12px; + line-height: 18px; + white-space: nowrap; } + +.mfp-arrow { + position: absolute; + opacity: 0.65; + margin: 0; + top: 50%; + margin-top: -55px; + padding: 0; + width: 90px; + height: 110px; + -webkit-tap-highlight-color: transparent; } + .mfp-arrow:active { + margin-top: -54px; } + .mfp-arrow:hover, + .mfp-arrow:focus { + opacity: 1; } + .mfp-arrow:before, + .mfp-arrow:after { + content: ''; + display: block; + width: 0; + height: 0; + position: absolute; + left: 0; + top: 0; + margin-top: 35px; + margin-left: 35px; + border: medium inset transparent; } + .mfp-arrow:after { + border-top-width: 13px; + border-bottom-width: 13px; + top: 8px; } + .mfp-arrow:before { + border-top-width: 21px; + border-bottom-width: 21px; + opacity: 0.7; } + +.mfp-arrow-left { + left: 0; } + .mfp-arrow-left:after { + border-right: 17px solid #FFF; + margin-left: 31px; } + .mfp-arrow-left:before { + margin-left: 25px; + border-right: 27px solid #3F3F3F; } + +.mfp-arrow-right { + right: 0; } + .mfp-arrow-right:after { + border-left: 17px solid #FFF; + margin-left: 39px; } + .mfp-arrow-right:before { + border-left: 27px solid #3F3F3F; } + +.mfp-iframe-holder { + padding-top: 40px; + padding-bottom: 40px; } + .mfp-iframe-holder .mfp-content { + line-height: 0; + width: 100%; + max-width: 900px; } + .mfp-iframe-holder .mfp-close { + top: -40px; } + +.mfp-iframe-scaler { + width: 100%; + height: 0; + overflow: hidden; + padding-top: 56.25%; } + .mfp-iframe-scaler iframe { + position: absolute; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + background: #000; } + +/* Main image in popup */ +img.mfp-img { + width: auto; + max-width: 100%; + height: auto; + display: block; + line-height: 0; + box-sizing: border-box; + padding: 40px 0 40px; + margin: 0 auto; } + +/* The shadow behind the image */ +.mfp-figure { + line-height: 0; } + .mfp-figure:after { + content: ''; + position: absolute; + left: 0; + top: 40px; + bottom: 40px; + display: block; + right: 0; + width: auto; + height: auto; + z-index: -1; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + background: #444; } + .mfp-figure small { + color: #BDBDBD; + display: block; + font-size: 12px; + line-height: 14px; } + .mfp-figure figure { + margin: 0; } + +.mfp-bottom-bar { + margin-top: -36px; + position: absolute; + top: 100%; + left: 0; + width: 100%; + cursor: auto; } + +.mfp-title { + text-align: left; + line-height: 18px; + color: #F3F3F3; + word-wrap: break-word; + padding-right: 36px; } + +.mfp-image-holder .mfp-content { + max-width: 100%; } + +.mfp-gallery .mfp-image-holder .mfp-figure { + cursor: pointer; } + +@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { + /** + * Remove all paddings around the image on small screen + */ + .mfp-img-mobile .mfp-image-holder { + padding-left: 0; + padding-right: 0; } + .mfp-img-mobile img.mfp-img { + padding: 0; } + .mfp-img-mobile .mfp-figure:after { + top: 0; + bottom: 0; } + .mfp-img-mobile .mfp-figure small { + display: inline; + margin-left: 5px; } + .mfp-img-mobile .mfp-bottom-bar { + background: rgba(0, 0, 0, 0.6); + bottom: 0; + margin: 0; + top: auto; + padding: 3px 5px; + position: fixed; + box-sizing: border-box; } + .mfp-img-mobile .mfp-bottom-bar:empty { + padding: 0; } + .mfp-img-mobile .mfp-counter { + right: 5px; + top: 3px; } + .mfp-img-mobile .mfp-close { + top: 0; + right: 0; + width: 35px; + height: 35px; + line-height: 35px; + background: rgba(0, 0, 0, 0.6); + position: fixed; + text-align: center; + padding: 0; } } + +@media all and (max-width: 900px) { + .mfp-arrow { + -webkit-transform: scale(0.75); + transform: scale(0.75); } + .mfp-arrow-left { + -webkit-transform-origin: 0; + transform-origin: 0; } + .mfp-arrow-right { + -webkit-transform-origin: 100%; + transform-origin: 100%; } + .mfp-container { + padding-left: 6px; + padding-right: 6px; } } diff --git a/css/magnific-popup.min.css b/css/magnific-popup.min.css index 364a2307..e19f0a4c 100644 --- a/css/magnific-popup.min.css +++ b/css/magnific-popup.min.css @@ -1 +1 @@ -.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:.5}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:1043;position:fixed;outline:none !important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-close,.mfp-arrow,.mfp-preloader,.mfp-counter{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none !important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-0.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-preloader a:hover{color:#FFF}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;padding:0 0 18px 10px;color:#FFF;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:hover,.mfp-close:focus{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:.65;margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:hover,.mfp-arrow:focus{opacity:1}.mfp-arrow:before,.mfp-arrow:after{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3f3f3f}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3f3f3f}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#444}.mfp-figure small{color:#bdbdbd;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#f3f3f3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,0.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,0.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0 0;transform-origin:0 0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}} \ No newline at end of file +.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:.5}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:1043;position:fixed;outline:none!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-close,.mfp-arrow,.mfp-preloader,.mfp-counter{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-0.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-preloader a:hover{color:#FFF}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;padding:0 0 18px 10px;color:#FFF;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:hover,.mfp-close:focus{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:.65;margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:hover,.mfp-arrow:focus{opacity:1}.mfp-arrow:before,.mfp-arrow:after{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3f3f3f}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3f3f3f}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#444}.mfp-figure small{color:#bdbdbd;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#f3f3f3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,0.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,0.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0 0;transform-origin:0 0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}} \ No newline at end of file diff --git a/css/material-icons.css b/css/material-icons.css index 1428dd4d..971daea1 100644 --- a/css/material-icons.css +++ b/css/material-icons.css @@ -1,60 +1,60 @@ -/* - * sysPass - * - * @author nuxsmin - * @link http://syspass.org - * @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org - * - * This file is part of sysPass. - * - * sysPass is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * sysPass is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with sysPass. If not, see . - */ - -/* Iconos de MDL */ -.material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; /* Preferred icon size */ - display: inline-block; - width: 1em; - height: 1em; - line-height: 1; - text-transform: none; - letter-spacing: normal; - word-wrap: normal; - - /* Support for all WebKit browsers. */ - -webkit-font-smoothing: antialiased; - /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; - - /* Support for Firefox. */ - -moz-osx-font-smoothing: grayscale; - - /* Support for IE. */ - font-feature-settings: 'liga'; -} - -.material-icons.md-18 { font-size: 18px; } -.material-icons.md-24 { font-size: 24px; } -.material-icons.md-36 { font-size: 36px; } -.material-icons.md-48 { font-size: 48px; } -.material-icons.md-60 { font-size: 60px; } - -.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); } -.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); } - -.material-icons.md-light { color: rgba(255, 255, 255, 1); } +/* + * sysPass + * + * @author nuxsmin + * @link http://syspass.org + * @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org + * + * This file is part of sysPass. + * + * sysPass is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * sysPass is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with sysPass. If not, see . + */ + +/* Iconos de MDL */ +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; +} + +.material-icons.md-18 { font-size: 18px; } +.material-icons.md-24 { font-size: 24px; } +.material-icons.md-36 { font-size: 36px; } +.material-icons.md-48 { font-size: 48px; } +.material-icons.md-60 { font-size: 60px; } + +.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); } +.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); } + +.material-icons.md-light { color: rgba(255, 255, 255, 1); } .material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); } \ No newline at end of file diff --git a/css/toastr.css b/css/toastr.css index 75d326cd..d5cbfe84 100644 --- a/css/toastr.css +++ b/css/toastr.css @@ -1,251 +1,228 @@ -/* - * sysPass - * - * @author nuxsmin - * @link http://syspass.org - * @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org - * - * This file is part of sysPass. - * - * sysPass is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * sysPass is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with sysPass. If not, see . - */ - -.toast-title { - font-weight: bold; -} -.toast-message { - -ms-word-wrap: break-word; - word-wrap: break-word; -} -.toast-message a, -.toast-message label { - color: #FFFFFF; -} -.toast-message a:hover { - color: #CCCCCC; - text-decoration: none; -} -.toast-close-button { - position: relative; - right: -0.3em; - top: -0.3em; - float: right; - font-size: 20px; - font-weight: bold; - color: #FFFFFF; - -webkit-text-shadow: 0 1px 0 #ffffff; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.8; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); - filter: alpha(opacity=80); - line-height: 1; -} -.toast-close-button:hover, -.toast-close-button:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); - filter: alpha(opacity=40); -} -.rtl .toast-close-button { - left: -0.3em; - float: left; - right: 0.3em; -} -/*Additional properties for button version - iOS requires the button element instead of an anchor tag. - If you want the anchor version, it requires `href="#"`.*/ -button.toast-close-button { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} -.toast-top-center { - top: 0; - right: 0; - width: 100%; -} -.toast-bottom-center { - bottom: 0; - right: 0; - width: 100%; -} -.toast-top-full-width { - top: 0; - right: 0; - width: 100%; -} -.toast-bottom-full-width { - bottom: 0; - right: 0; - width: 100%; -} -.toast-top-left { - top: 12px; - left: 12px; -} -.toast-top-right { - top: 12px; - right: 12px; -} -.toast-bottom-right { - right: 12px; - bottom: 12px; -} -.toast-bottom-left { - bottom: 12px; - left: 12px; -} -#toast-container { - position: fixed; - z-index: 999999; - pointer-events: none; - /*overrides*/ -} -#toast-container * { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -#toast-container > div { - position: relative; - pointer-events: auto; - overflow: hidden; - margin: 0 0 6px; - padding: 15px 15px 15px 50px; - width: 300px; - -moz-border-radius: 3px 3px 3px 3px; - -webkit-border-radius: 3px 3px 3px 3px; - border-radius: 3px 3px 3px 3px; - background-position: 15px center; - background-repeat: no-repeat; - -moz-box-shadow: 0 0 12px #999999; - -webkit-box-shadow: 0 0 12px #999999; - box-shadow: 0 0 12px #999999; - color: #FFFFFF; - opacity: 0.8; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); - filter: alpha(opacity=80); -} -#toast-container > div.rtl { - direction: rtl; - padding: 15px 50px 15px 15px; - background-position: right 15px center; -} -#toast-container > div:hover { - -moz-box-shadow: 0 0 12px #000000; - -webkit-box-shadow: 0 0 12px #000000; - box-shadow: 0 0 12px #000000; - opacity: 1; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - filter: alpha(opacity=100); - cursor: pointer; -} -#toast-container > .toast-info { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important; -} -#toast-container > .toast-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important; -} -#toast-container > .toast-success { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important; -} -#toast-container > .toast-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important; -} -#toast-container.toast-top-center > div, -#toast-container.toast-bottom-center > div { - width: 300px; - margin-left: auto; - margin-right: auto; -} -#toast-container.toast-top-full-width > div, -#toast-container.toast-bottom-full-width > div { - width: 96%; - margin-left: auto; - margin-right: auto; -} -.toast { - background-color: #030303; -} -.toast-success { - background-color: #51A351; -} -.toast-error { - background-color: #BD362F; -} -.toast-info { - background-color: #2F96B4; -} -.toast-warning { - background-color: #F89406; -} -.toast-progress { - position: absolute; - left: 0; - bottom: 0; - height: 4px; - background-color: #000000; - opacity: 0.4; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); - filter: alpha(opacity=40); -} -/*Responsive Design*/ -@media all and (max-width: 240px) { - #toast-container > div { - padding: 8px 8px 8px 50px; - width: 11em; - } - #toast-container > div.rtl { - padding: 8px 50px 8px 8px; - } - #toast-container .toast-close-button { - right: -0.2em; - top: -0.2em; - } - #toast-container .rtl .toast-close-button { - left: -0.2em; - right: 0.2em; - } -} -@media all and (min-width: 241px) and (max-width: 480px) { - #toast-container > div { - padding: 8px 8px 8px 50px; - width: 18em; - } - #toast-container > div.rtl { - padding: 8px 50px 8px 8px; - } - #toast-container .toast-close-button { - right: -0.2em; - top: -0.2em; - } - #toast-container .rtl .toast-close-button { - left: -0.2em; - right: 0.2em; - } -} -@media all and (min-width: 481px) and (max-width: 768px) { - #toast-container > div { - padding: 15px 15px 15px 50px; - width: 25em; - } - #toast-container > div.rtl { - padding: 15px 50px 15px 15px; - } -} +.toast-title { + font-weight: bold; +} +.toast-message { + -ms-word-wrap: break-word; + word-wrap: break-word; +} +.toast-message a, +.toast-message label { + color: #FFFFFF; +} +.toast-message a:hover { + color: #CCCCCC; + text-decoration: none; +} +.toast-close-button { + position: relative; + right: -0.3em; + top: -0.3em; + float: right; + font-size: 20px; + font-weight: bold; + color: #FFFFFF; + -webkit-text-shadow: 0 1px 0 #ffffff; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.8; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); + filter: alpha(opacity=80); + line-height: 1; +} +.toast-close-button:hover, +.toast-close-button:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); + filter: alpha(opacity=40); +} +.rtl .toast-close-button { + left: -0.3em; + float: left; + right: 0.3em; +} +/*Additional properties for button version + iOS requires the button element instead of an anchor tag. + If you want the anchor version, it requires `href="#"`.*/ +button.toast-close-button { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.toast-top-center { + top: 0; + right: 0; + width: 100%; +} +.toast-bottom-center { + bottom: 0; + right: 0; + width: 100%; +} +.toast-top-full-width { + top: 0; + right: 0; + width: 100%; +} +.toast-bottom-full-width { + bottom: 0; + right: 0; + width: 100%; +} +.toast-top-left { + top: 12px; + left: 12px; +} +.toast-top-right { + top: 12px; + right: 12px; +} +.toast-bottom-right { + right: 12px; + bottom: 12px; +} +.toast-bottom-left { + bottom: 12px; + left: 12px; +} +#toast-container { + position: fixed; + z-index: 999999; + pointer-events: none; + /*overrides*/ +} +#toast-container * { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +#toast-container > div { + position: relative; + pointer-events: auto; + overflow: hidden; + margin: 0 0 6px; + padding: 15px 15px 15px 50px; + width: 300px; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; + background-position: 15px center; + background-repeat: no-repeat; + -moz-box-shadow: 0 0 12px #999999; + -webkit-box-shadow: 0 0 12px #999999; + box-shadow: 0 0 12px #999999; + color: #FFFFFF; + opacity: 0.8; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); + filter: alpha(opacity=80); +} +#toast-container > div.rtl { + direction: rtl; + padding: 15px 50px 15px 15px; + background-position: right 15px center; +} +#toast-container > div:hover { + -moz-box-shadow: 0 0 12px #000000; + -webkit-box-shadow: 0 0 12px #000000; + box-shadow: 0 0 12px #000000; + opacity: 1; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + filter: alpha(opacity=100); + cursor: pointer; +} +#toast-container > .toast-info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important; +} +#toast-container > .toast-error { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important; +} +#toast-container > .toast-success { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important; +} +#toast-container > .toast-warning { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important; +} +#toast-container.toast-top-center > div, +#toast-container.toast-bottom-center > div { + width: 300px; + margin-left: auto; + margin-right: auto; +} +#toast-container.toast-top-full-width > div, +#toast-container.toast-bottom-full-width > div { + width: 96%; + margin-left: auto; + margin-right: auto; +} +.toast { + background-color: #030303; +} +.toast-success { + background-color: #51A351; +} +.toast-error { + background-color: #BD362F; +} +.toast-info { + background-color: #2F96B4; +} +.toast-warning { + background-color: #F89406; +} +.toast-progress { + position: absolute; + left: 0; + bottom: 0; + height: 4px; + background-color: #000000; + opacity: 0.4; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); + filter: alpha(opacity=40); +} +/*Responsive Design*/ +@media all and (max-width: 240px) { + #toast-container > div { + padding: 8px 8px 8px 50px; + width: 11em; + } + #toast-container > div.rtl { + padding: 8px 50px 8px 8px; + } + #toast-container .toast-close-button { + right: -0.2em; + top: -0.2em; + } + #toast-container .rtl .toast-close-button { + left: -0.2em; + right: 0.2em; + } +} +@media all and (min-width: 241px) and (max-width: 480px) { + #toast-container > div { + padding: 8px 8px 8px 50px; + width: 18em; + } + #toast-container > div.rtl { + padding: 8px 50px 8px 8px; + } + #toast-container .toast-close-button { + right: -0.2em; + top: -0.2em; + } + #toast-container .rtl .toast-close-button { + left: -0.2em; + right: 0.2em; + } +} +@media all and (min-width: 481px) and (max-width: 768px) { + #toast-container > div { + padding: 15px 15px 15px 50px; + width: 25em; + } + #toast-container > div.rtl { + padding: 15px 50px 15px 15px; + } +} diff --git a/css/toastr.min.css b/css/toastr.min.css index d095e5ac..c174f8f3 100644 --- a/css/toastr.min.css +++ b/css/toastr.min.css @@ -1 +1 @@ -.toast-title{font-weight:bold}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#fff}.toast-message a:hover{color:#ccc;text-decoration:none}.toast-close-button{position:relative;right:-0.3em;top:-0.3em;float:right;font-size:20px;font-weight:bold;color:#fff;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:alpha(opacity=80);filter:alpha(opacity=80);line-height:1}.toast-close-button:hover,.toast-close-button:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:alpha(opacity=40);filter:alpha(opacity=40)}.rtl .toast-close-button{left:-0.3em;float:left;right:.3em}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999;pointer-events:none}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;border-radius:3px 3px 3px 3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#fff;opacity:.8;-ms-filter:alpha(opacity=80);filter:alpha(opacity=80)}#toast-container>div.rtl{direction:rtl;padding:15px 50px 15px 15px;background-position:right 15px center}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:alpha(opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important}#toast-container>.toast-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important}#toast-container>.toast-success{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important}#toast-container>.toast-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important}#toast-container.toast-top-center>div,#toast-container.toast-bottom-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-top-full-width>div,#toast-container.toast-bottom-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:alpha(opacity=40);filter:alpha(opacity=40)}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}#toast-container .rtl .toast-close-button{left:-0.2em;right:.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}#toast-container .rtl .toast-close-button{left:-0.2em;right:.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}} \ No newline at end of file +.toast-title{font-weight:bold}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#fff}.toast-message a:hover{color:#ccc;text-decoration:none}.toast-close-button{position:relative;right:-0.3em;top:-0.3em;float:right;font-size:20px;font-weight:bold;color:#fff;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:alpha(opacity=80);filter:alpha(opacity=80);line-height:1}.toast-close-button:hover,.toast-close-button:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:alpha(opacity=40);filter:alpha(opacity=40)}.rtl .toast-close-button{left:-0.3em;float:left;right:.3em}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999;pointer-events:none}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;border-radius:3px 3px 3px 3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#fff;opacity:.8;-ms-filter:alpha(opacity=80);filter:alpha(opacity=80)}#toast-container>div.rtl{direction:rtl;padding:15px 50px 15px 15px;background-position:right 15px center}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:alpha(opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=")!important}#toast-container>.toast-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=")!important}#toast-container>.toast-success{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==")!important}#toast-container>.toast-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=")!important}#toast-container.toast-top-center>div,#toast-container.toast-bottom-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-top-full-width>div,#toast-container.toast-bottom-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:alpha(opacity=40);filter:alpha(opacity=40)}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}#toast-container .rtl .toast-close-button{left:-0.2em;right:.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}#toast-container .rtl .toast-close-button{left:-0.2em;right:.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}} \ No newline at end of file diff --git a/inc/SP/Account/AccountInterface.class.php b/inc/SP/Account/AccountInterface.class.php index ff084266..93f35467 100644 --- a/inc/SP/Account/AccountInterface.class.php +++ b/inc/SP/Account/AccountInterface.class.php @@ -1,54 +1,56 @@ -. - */ - -namespace SP\Account; - -use SP\DataModel\AccountData; -use SP\DataModel\AccountExtData; -use SP\DataModel\AccountHistoryData; - -defined('APP_ROOT') || die(); - -/** - * Interface AccountInterface con la definición de métodos comunes a las cuentas - */ -interface AccountInterface -{ - /** - * @return AccountExtData|AccountData|AccountHistoryData - */ - public function getData(); - - /** - * @param bool $encryptPass Si se encripta la clave de la cuenta - * @return mixed - */ - public function createAccount($encryptPass = true); - - /** - * @param $id - * @return mixed - */ - public function deleteAccount($id); +. + */ + +namespace SP\Services\Account; + +use SP\DataModel\AccountData; +use SP\DataModel\AccountExtData; +use SP\DataModel\AccountHistoryData; + +defined('APP_ROOT') || die(); + +/** + * Interface AccountInterface con la definición de métodos comunes a las cuentas + */ +interface AccountInterface +{ + /** + * @return AccountExtData|AccountData|AccountHistoryData + */ + public function getData(); + + /** + * @param bool $encryptPass Si se encripta la clave de la cuenta + * + * @return mixed + */ + public function createAccount($encryptPass = true); + + /** + * @param $id + * + * @return mixed + */ + public function deleteAccount($id); } \ No newline at end of file diff --git a/inc/SP/Api/ApiInterface.class.php b/inc/SP/Api/ApiInterface.class.php index 75b4c5f4..f3706dd4 100644 --- a/inc/SP/Api/ApiInterface.class.php +++ b/inc/SP/Api/ApiInterface.class.php @@ -1,48 +1,40 @@ -. - */ - -namespace SP\Api; - -/** - * Interface ApiInterface - * - * @package SP\Api - */ -interface ApiInterface -{ - /** - * Devuelve las acciones que implementa la API - * - * @return array - */ - public function getActions(); - - /** - * Devuelve la ayuda para una acción - * - * @param string $action - * @return array - */ - public function getHelp($action); +. + */ + +namespace SP\Modules\Api\Controllers\Help; + +/** + * Interface HelpInterface + * + * @package SP\Modules\Api\Controllers\Help + */ +interface HelpInterface +{ + /** + * @param string $action + * + * @return array + */ + public static function getHelpFor(string $action): array; } \ No newline at end of file diff --git a/inc/SP/Auth/AuthDataBase.class.php b/inc/SP/Auth/AuthDataBase.class.php index 05e5eb5b..9ccf2b2d 100644 --- a/inc/SP/Auth/AuthDataBase.class.php +++ b/inc/SP/Auth/AuthDataBase.class.php @@ -1,174 +1,182 @@ -. - */ - -namespace SP\Auth; - -/** - * Class AuthData - * - * @package Auth - */ -abstract class AuthDataBase -{ - /** - * @var string - */ - protected $name; - /** - * @var string - */ - protected $email; - /** - * @var int - */ - protected $authenticated; - /** - * @var int - */ - protected $statusCode = 0; - /** - * @var string - */ - protected $server; - /** - * @var bool - */ - protected $required = false; - /** - * @var bool - */ - protected $failed = false; - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - */ - public function setEmail($email) - { - $this->email = $email; - } - - /** - * @return int - */ - public function getAuthenticated() - { - return $this->authenticated; - } - - /** - * @param int $authenticated - */ - public function setAuthenticated($authenticated) - { - $this->authenticated = (int)$authenticated; - } - - /** - * @return string - */ - public function getServer() - { - return $this->server; - } - - /** - * @param string $server - */ - public function setServer($server) - { - $this->server = $server; - } - - /** - * @return int - */ - public function getStatusCode() - { - return (int)$this->statusCode; - } - - /** - * @param int $statusCode - */ - public function setStatusCode($statusCode) - { - $this->statusCode = (int)$statusCode; - } - - /** - * @return bool - */ - public function isRequired() - { - return (bool)$this->required; - } - - /** - * @param bool $required - */ - public function setRequired($required) - { - $this->required = (bool)$required; - } - - /** - * @return bool - */ - public function isFailed() - { - return $this->failed; - } - - /** - * @param bool $failed - */ - public function setFailed($failed) - { - $this->failed = $failed; - } +. + */ + +namespace SP\Providers\Auth; + +/** + * Class AuthData + * + * @package Auth + */ +abstract class AuthDataBase +{ + /** + * @var string + */ + protected $name; + /** + * @var string + */ + protected $email; + /** + * @var bool + */ + protected $authenticated; + /** + * @var int + */ + protected $statusCode = 0; + /** + * @var string + */ + protected $server; + /** + * @var bool + */ + protected $authGranted = false; + /** + * @var bool + */ + protected $failed = false; + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * @param string $email + */ + public function setEmail($email) + { + $this->email = $email; + } + + /** + * @return int + */ + public function getAuthenticated() + { + return $this->authenticated; + } + + /** + * @param bool $authenticated + * + * @return $this + */ + public function setAuthenticated($authenticated = null) + { + $this->authenticated = $authenticated !== null ? (bool)$authenticated : null; + + return $this; + } + + /** + * @return string + */ + public function getServer() + { + return $this->server; + } + + /** + * @param string $server + */ + public function setServer($server) + { + $this->server = $server; + } + + /** + * @return int + */ + public function getStatusCode() + { + return (int)$this->statusCode; + } + + /** + * @param int $statusCode + */ + public function setStatusCode($statusCode) + { + $this->statusCode = (int)$statusCode; + } + + /** + * Indica si es requerida para acceder a la aplicación + * + * @return bool + */ + public function isAuthGranted() + { + return (bool)$this->authGranted; + } + + /** + * Indica si es requerida para acceder a la aplicación + * + * @param bool $authGranted + */ + public function setAuthGranted($authGranted) + { + $this->authGranted = (bool)$authGranted; + } + + /** + * @return bool + */ + public function isFailed() + { + return $this->failed; + } + + /** + * @param bool $failed + */ + public function setFailed($failed) + { + $this->failed = $failed; + } } \ No newline at end of file diff --git a/inc/SP/Auth/AuthInterface.class.php b/inc/SP/Auth/AuthInterface.class.php index ecc6acb9..43df6f29 100644 --- a/inc/SP/Auth/AuthInterface.class.php +++ b/inc/SP/Auth/AuthInterface.class.php @@ -1,42 +1,51 @@ -. - */ - -namespace SP\Auth; - -use SP\DataModel\UserLoginData; - -/** - * Interface AuthInterface - * @package Auth - */ -interface AuthInterface -{ - /** - * Autentificar al usuario - * - * @param UserLoginData $UserData Datos del usuario - * @return mixed|AuthDataBase - */ - public function authenticate(UserLoginData $UserData); +. + */ + +namespace SP\Providers\Auth; + +use SP\DataModel\UserLoginData; + +/** + * Interface AuthInterface + * + * @package Auth + */ +interface AuthInterface +{ + /** + * Autentificar al usuario + * + * @param UserLoginData $UserData Datos del usuario + * + * @return mixed|AuthDataBase + */ + public function authenticate(UserLoginData $UserData); + + /** + * Indica si es requerida para acceder a la aplicación + * + * @return boolean + */ + public function isAuthGranted(); } \ No newline at end of file diff --git a/inc/SP/Auth/AuthResult.class.php b/inc/SP/Auth/AuthResult.class.php index 27aa3bdc..eed1b91f 100644 --- a/inc/SP/Auth/AuthResult.class.php +++ b/inc/SP/Auth/AuthResult.class.php @@ -1,70 +1,83 @@ -. - */ - -namespace SP\Auth; - -/** - * Class AuthData - * - * @package SP\Auth - */ -class AuthResult -{ - /** - * @var string - */ - public $auth; - /** - * @var AuthDataBase - */ - public $data; - - /** - * AuthResult constructor. - * - * @param string $auth - * @param AuthDataBase $data - */ - public function __construct($auth, AuthDataBase $data) - { - $this->auth = $auth; - $this->data = $data; - } - - /** - * @return string - */ - public function getAuth() - { - return $this->auth; - } - - /** - * @return AuthDataBase - */ - public function getData() - { - return $this->data; - } +. + */ + +namespace SP\Providers\Auth; + +/** + * Class AuthData + * + * @package SP\Providers\Auth + */ +final class AuthResult +{ + /** + * @var string + */ + public $auth; + /** + * @var AuthDataBase + */ + public $data; + /** + * @var bool + */ + public $authGranted = false; + + /** + * AuthResult constructor. + * + * @param string $auth + * @param AuthDataBase $data + */ + public function __construct($auth, AuthDataBase $data) + { + $this->auth = $auth; + $this->data = $data; + $this->authGranted = $data->isAuthGranted(); + } + + /** + * @return string + */ + public function getAuth() + { + return $this->auth; + } + + /** + * @return AuthDataBase + */ + public function getData() + { + return $this->data; + } + + /** + * @return bool + */ + public function isAuthGranted() + { + return $this->authGranted; + } } \ No newline at end of file diff --git a/inc/SP/Auth/Database/DatabaseAuthData.class.php b/inc/SP/Auth/Database/DatabaseAuthData.class.php index 3d8c9c02..29028a57 100644 --- a/inc/SP/Auth/Database/DatabaseAuthData.class.php +++ b/inc/SP/Auth/Database/DatabaseAuthData.class.php @@ -1,37 +1,37 @@ -. - */ - -namespace SP\Auth\Database; - -use SP\Auth\AuthDataBase; - -/** - * Class DatabaseAuthData - * - * @package SP\Auth\Database - */ -class DatabaseAuthData extends AuthDataBase -{ - +. + */ + +namespace SP\Providers\Auth\Database; + +use SP\Providers\Auth\AuthDataBase; + +/** + * Class DatabaseAuthData + * + * @package SP\Auth\Database + */ +final class DatabaseAuthData extends AuthDataBase +{ + } \ No newline at end of file diff --git a/inc/SP/Auth/Ldap/LdapAuthData.class.php b/inc/SP/Auth/Ldap/LdapAuthData.class.php index 9916bd7e..4b835a39 100644 --- a/inc/SP/Auth/Ldap/LdapAuthData.class.php +++ b/inc/SP/Auth/Ldap/LdapAuthData.class.php @@ -1,136 +1,116 @@ -. - */ - -namespace SP\Auth\Ldap; - -use SP\Auth\AuthDataBase; - -/** - * Class LdapUserData - * - * @package SP\Auth\Ldap - */ -class LdapAuthData extends AuthDataBase -{ - /** - * @var string - */ - protected $dn; - /** - * @var string - */ - protected $groupDn; - /** - * @var array - */ - protected $groups = []; - /** - * @var int - */ - protected $expire = 0; - /** - * @var bool - */ - protected $inGroup = false; - - /** - * @return string - */ - public function getDn() - { - return $this->dn; - } - - /** - * @param string $dn - */ - public function setDn($dn) - { - $this->dn = $dn; - } - - /** - * @return array - */ - public function getGroups() - { - return $this->groups; - } - - /** - * @param array|string $groups - */ - public function setGroups($groups) - { - $this->groups = is_string($groups) ? [$groups] : $groups; - } - - /** - * @return int - */ - public function getExpire() - { - return (int)$this->expire; - } - - /** - * @param int $expire - */ - public function setExpire($expire) - { - $this->expire = (int)$expire; - } - - /** - * @return boolean - */ - public function isInGroup() - { - return $this->inGroup; - } - - /** - * @param boolean $inGroup - */ - public function setInGroup($inGroup) - { - $this->inGroup = $inGroup; - } - - /** - * @return string - */ - public function getGroupDn() - { - return $this->groupDn; - } - - /** - * @param string $groupDn - */ - public function setGroupDn($groupDn) - { - $this->groupDn = $groupDn; - } +. + */ + +namespace SP\Providers\Auth\Ldap; + +use SP\Providers\Auth\AuthDataBase; + +/** + * Class LdapUserData + * + * @package SP\Providers\Auth\Ldap + */ +final class LdapAuthData extends AuthDataBase +{ + /** + * @var string + */ + protected $dn; + /** + * @var string + */ + protected $groupDn; + /** + * @var int + */ + protected $expire = 0; + /** + * @var bool + */ + protected $inGroup = false; + + /** + * @return string + */ + public function getDn() + { + return $this->dn; + } + + /** + * @param string $dn + */ + public function setDn($dn) + { + $this->dn = $dn; + } + + /** + * @return int + */ + public function getExpire() + { + return (int)$this->expire; + } + + /** + * @param int $expire + */ + public function setExpire($expire) + { + $this->expire = (int)$expire; + } + + /** + * @return boolean + */ + public function isInGroup() + { + return $this->inGroup; + } + + /** + * @param boolean $inGroup + */ + public function setInGroup($inGroup) + { + $this->inGroup = $inGroup; + } + + /** + * @return string + */ + public function getGroupDn() + { + return $this->groupDn; + } + + /** + * @param string $groupDn + */ + public function setGroupDn($groupDn) + { + $this->groupDn = $groupDn; + } } \ No newline at end of file diff --git a/inc/SP/Auth/Ldap/LdapInterface.class.php b/inc/SP/Auth/Ldap/LdapInterface.class.php index 0eaa35db..827f3a3d 100644 --- a/inc/SP/Auth/Ldap/LdapInterface.class.php +++ b/inc/SP/Auth/Ldap/LdapInterface.class.php @@ -1,55 +1,52 @@ -. - */ - -namespace SP\Auth\Ldap; - -/** - * Interface LdapInterface - * - * @package Auth\Ldap - */ -interface LdapInterface -{ - /** - * Comprobar la conexión al servidor de LDAP. - * - * @return bool - */ - public function checkConnection(); - - - /** - * Comprobar si los parámetros necesarios de LDAP están establecidos. - * - * @return bool - */ - public function checkParams(); - - /** - * Obtener los atributos del usuario. - * - * @return LdapAuthData - */ - public function getAttributes(); +. + */ + +namespace SP\Services\Upgrade; + +use SP\Config\ConfigData; + +/** + * Interface UpgradeInterface + * + * @package SP\Services\Upgrade + */ +interface UpgradeInterface +{ + /** + * Performs the upgrading process + * + * @param $version + * @param ConfigData $configData + */ + public function upgrade($version, ConfigData $configData); + + /** + * Check if it needs to be upgraded + * + * @param $version + * + * @return bool + */ + public static function needsUpgrade($version); } \ No newline at end of file diff --git a/inc/SP/Auth/Ldap/LdapUtil.class.php b/inc/SP/Auth/Ldap/LdapUtil.class.php index 86a66fef..48c3d78a 100644 --- a/inc/SP/Auth/Ldap/LdapUtil.class.php +++ b/inc/SP/Auth/Ldap/LdapUtil.class.php @@ -1,58 +1,58 @@ -. - */ - -namespace SP\Auth\Ldap; - - -/** - * Class LdapUtil - * - * @package SP\Auth\Ldap - */ -class LdapUtil -{ - /** - * Obtener los datos de una búsqueda de LDAP de un atributo - * - * @param array $results - * @param string $attribute - * @return array - */ - public static function getResultsData(array &$results, $attribute) - { - $out = []; - - foreach ($results as $result) { - if (is_array($result)) { - foreach ($result as $ldapAttribute => $value) { - if (strtolower($ldapAttribute) === $attribute) { - $out[] = $value; - } - } - } - } - - return $out; - } +. + */ + +namespace SP\Http; + +use SP\Config\ConfigData; + +/** + * Class Client + * + * @package SP\Http + */ +final class Client +{ + /** + * @param ConfigData $configData + * + * @return array + */ + public static function getOptions(ConfigData $configData) + { + $options = [ + 'timeout' => 10, + 'version' => 1.1 + ]; + + if ($configData->isProxyEnabled()) { + $options['proxy'] = sprintf('tcp://%s:%d', $configData->getProxyServer(), $configData->getProxyPort()); + + if (!empty($configData->getProxyUser()) && !empty($configData->getProxyPass())) { + $options['auth'] = [$configData->getProxyUser(), $configData->getProxyPass()]; + } + } + + return $options; + } } \ No newline at end of file diff --git a/inc/SP/Config/ConfigInterface.class.php b/inc/SP/Config/ConfigInterface.class.php index 9b46f332..231cdfea 100644 --- a/inc/SP/Config/ConfigInterface.class.php +++ b/inc/SP/Config/ConfigInterface.class.php @@ -1,85 +1,88 @@ -. - */ - -namespace SP\Config; - -defined('APP_ROOT') || die(); - -/** - * Interface ConfigInterface para las clases que gestionan la configuración de sysPass - * - * @package SP - */ -interface ConfigInterface -{ - /** - * Obtiene un valor de configuración - * - * @param string $param El valor a obtener - * @param string $default El valor por defecto - * @return string el valor o $default - */ - public static function getValue($param, $default = null); - - /** - * Guardar un parámetro de configuración - * - * @param string $param El parámetro a guardar - * @param string $value El valor a guardar - * @param bool $email enviar email? - * @param bool $hideValue Ocultar el valor del registro en el log - * @return bool - */ - public static function setValue($param, $value, $email = true, $hideValue = false); - - /** - * Elimina un parámetro de la configuración. - * - * @param string $param clave - * @return bool - */ - public static function deleteParam($param); - - /** - * Actualizar el array de parámetros de configuración - * - * @param $param string El parámetro a actualizar - * @param $value mixed El valor a actualizar - */ - public static function setCacheConfigValue($param, $value); - - /** - * Obtener un parámetro del array de parámetros de configuración - * - * @param $param string El parámetro a devolver - */ - public static function getCacheConfigValue($param); - - /** - * Obtener un array con la configuración almacenada. - * - * @return bool - */ - public static function readConfig(); +. + */ + +namespace SP\Config; + +defined('APP_ROOT') || die(); + +/** + * Interface ConfigInterface para las clases que gestionan la configuración de sysPass + * + * @package SP + */ +interface ConfigInterface +{ + /** + * Obtiene un valor de configuración + * + * @param string $param El valor a obtener + * @param string $default El valor por defecto + * + * @return string el valor o $default + */ + public static function getValue($param, $default = null); + + /** + * Guardar un parámetro de configuración + * + * @param string $param El parámetro a guardar + * @param string $value El valor a guardar + * @param bool $email enviar email? + * @param bool $hideValue Ocultar el valor del registro en el log + * + * @return bool + */ + public static function setValue($param, $value, $email = true, $hideValue = false); + + /** + * Elimina un parámetro de la configuración. + * + * @param string $param clave + * + * @return bool + */ + public static function deleteParam($param); + + /** + * Actualizar el array de parámetros de configuración + * + * @param $param string El parámetro a actualizar + * @param $value mixed El valor a actualizar + */ + public static function setCacheConfigValue($param, $value); + + /** + * Obtener un parámetro del array de parámetros de configuración + * + * @param $param string El parámetro a devolver + */ + public static function getCacheConfigValue($param); + + /** + * Obtener un array con la configuración almacenada. + * + * @return bool + */ + public static function readConfig(); } \ No newline at end of file diff --git a/inc/SP/Controller/TabControllerBase.class.php b/inc/SP/Controller/TabControllerBase.class.php index dcf62e42..939c050d 100644 --- a/inc/SP/Controller/TabControllerBase.class.php +++ b/inc/SP/Controller/TabControllerBase.class.php @@ -1,66 +1,66 @@ -. - */ - -namespace SP\Controller; - - -/** - * Class TabControllerBase - * - * @package SP\Controller - */ -abstract class TabControllerBase extends ControllerBase implements TabsInterface -{ - /** - * Pestañas - * - * @var array - */ - private $tabs = []; - - /** - * Añadir una nueva pestaña - * - * @param string $title - * @return int Índice de la última pestaña añadida - */ - public function addTab($title) - { - $this->tabs[] = ['title' => $title]; - - $this->view->assign('tabs', $this->tabs); - - return count($this->tabs) - 1; - } - - /** - * Devuelve las pestañas - * - * @return array - */ - public function getTabs() - { - return $this->tabs; - } +. + */ + +namespace SP\DataModel\Dto; + + +/** + * Class ConfigRequest + * + * @package SP\DataModel\Dto + */ +class ConfigRequest +{ + /** + * @var array + */ + private $data = []; + + /** + * @param $param + * @param $value + */ + public function add($param, $value) + { + $this->data[$param] = $value; + } + + /** + * @param $param + * + * @return mixed|null + */ + public function get($param) + { + return isset($this->data[$param]) ? $this->data[$param] : null; + } + + /** + * @return array + */ + public function getData() + { + return $this->data; + } } \ No newline at end of file diff --git a/inc/SP/Controller/TabsInterface.class.php b/inc/SP/Controller/TabsInterface.class.php index 8a4d5522..b77bda04 100644 --- a/inc/SP/Controller/TabsInterface.class.php +++ b/inc/SP/Controller/TabsInterface.class.php @@ -1,48 +1,42 @@ -. - */ - -namespace SP\Controller; - -/** - * Interface TabsInterface - * - * @package SP\Controller - */ -interface TabsInterface -{ - /** - * Añadir una nueva pestaña - * - * @param string $title - * @return int Índice actual de pestaña - */ - public function addTab($title); - - /** - * Devuelve las pestañas - * - * @return array - */ - public function getTabs(); +. + */ + +namespace SP\Storage\Database; + +/** + * Interface DatabaseFileInterface + * + * @package SP\Storage + */ +interface DatabaseFileInterface +{ + /** + * Parses a database script file and returns an array of lines parsed + * + * @param string $delimiter + * + * @return array + */ + public function parse($delimiter = ';'); } \ No newline at end of file diff --git a/inc/SP/Core/Crypt/Crypt.class.php b/inc/SP/Core/Crypt/Crypt.class.php index a8d54d54..24458712 100644 --- a/inc/SP/Core/Crypt/Crypt.class.php +++ b/inc/SP/Core/Crypt/Crypt.class.php @@ -1,141 +1,146 @@ -. - */ - -namespace SP\Core\Crypt; - -use Defuse\Crypto\Crypto; -use Defuse\Crypto\Exception\CryptoException; -use Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException; -use Defuse\Crypto\Key; -use Defuse\Crypto\KeyProtectedByPassword; - -/** - * Class Crypt - * - * @package SP\Core\Crypt - */ -class Crypt -{ - /** - * Encriptar datos con una clave segura - * - * @param string $data - * @param string|Key $securedKey - * @param string $password - * @return string - * @throws CryptoException - */ - public static function encrypt($data, $securedKey, $password = null) - { - try { - if ($securedKey instanceof Key) { - $key = $securedKey; - } elseif (!empty($password)) { - $key = self::unlockSecuredKey($securedKey, $password, false); - } else { - $key = Key::loadFromAsciiSafeString($securedKey); - } - - return Crypto::encrypt($data, $key); - } catch (CryptoException $e) { - debugLog($e->getMessage()); - - throw $e; - } - } - - /** - * @param string $key - * @param string $password - * @param bool $useAscii - * @return string|Key - * @throws CryptoException - */ - public static function unlockSecuredKey($key, $password, $useAscii = true) - { - try { - if ($useAscii) { - return KeyProtectedByPassword::loadFromAsciiSafeString($key)->unlockKey($password)->saveToAsciiSafeString(); - } - - return KeyProtectedByPassword::loadFromAsciiSafeString($key)->unlockKey($password); - } catch (CryptoException $e) { - debugLog($e->getMessage()); - - throw $e; - } - } - - /** - * Desencriptar datos con una clave segura - * - * @param string $data - * @param string|Key $securedKey - * @param string $password - * @return string - * @throws CryptoException - */ - public static function decrypt($data, $securedKey, $password = null) - { - try { - if ($securedKey instanceof Key) { - $key = $securedKey; - } elseif (!empty($password) && $securedKey instanceof KeyProtectedByPassword) { - $key = self::unlockSecuredKey($securedKey, $password); - } else { - $key = Key::loadFromAsciiSafeString($securedKey); - } - - return Crypto::decrypt($data, $key); - } catch (CryptoException $e) { - debugLog($e->getMessage()); - - throw $e; - } - - } - - /** - * Securiza una clave de seguridad - * - * @param string $password - * @param bool $useAscii - * @return string|Key - * @throws CryptoException - */ - public static function makeSecuredKey($password, $useAscii = true) - { - try { - if ($useAscii) { - return KeyProtectedByPassword::createRandomPasswordProtectedKey($password)->saveToAsciiSafeString(); - } - - return KeyProtectedByPassword::createRandomPasswordProtectedKey($password); - } catch (CryptoException $e) { - debugLog($e->getMessage()); - - throw $e; - } - } +. + */ + +namespace SP\Core\Crypt; + +use Defuse\Crypto\Crypto; +use Defuse\Crypto\Exception\CryptoException; +use Defuse\Crypto\Key; +use Defuse\Crypto\KeyProtectedByPassword; + +/** + * Class Crypt + * + * @package SP\Core\Crypt + */ +final class Crypt +{ + /** + * Encriptar datos con una clave segura + * + * @param string $data + * @param string|Key $securedKey + * @param string $password + * + * @return string + * @throws CryptoException + */ + public static function encrypt($data, $securedKey, $password = null) + { + try { + if ($securedKey instanceof Key) { + $key = $securedKey; + } elseif (null !== $password) { + $key = self::unlockSecuredKey($securedKey, $password, false); + } else { + $key = Key::loadFromAsciiSafeString($securedKey); + } + + return Crypto::encrypt((string)$data, $key); + } catch (CryptoException $e) { + logger($e->getMessage()); + + throw $e; + } + } + + /** + * @param string $key + * @param string $password + * @param bool $useAscii + * + * @return string|Key + * @throws CryptoException + */ + public static function unlockSecuredKey($key, $password, $useAscii = true) + { + try { + if ($useAscii) { + return KeyProtectedByPassword::loadFromAsciiSafeString($key)->unlockKey($password)->saveToAsciiSafeString(); + } + + return KeyProtectedByPassword::loadFromAsciiSafeString($key)->unlockKey($password); + } catch (CryptoException $e) { + logger($e->getMessage()); + + throw $e; + } + } + + /** + * Desencriptar datos con una clave segura + * + * @param string $data + * @param string|Key|KeyProtectedByPassword $securedKey + * @param string $password + * + * @return string + * @throws CryptoException + */ + public static function decrypt($data, $securedKey, $password = null) + { + try { + if ($securedKey instanceof Key) { + return Crypto::decrypt($data, $securedKey); + } elseif (null !== $password) { + if ($securedKey instanceof KeyProtectedByPassword) { + return Crypto::decrypt($data, $securedKey->unlockKey($password)); + } else { + return Crypto::decrypt($data, self::unlockSecuredKey($securedKey, $password, false)); + } + } + + return Crypto::decrypt($data, Key::loadFromAsciiSafeString($securedKey)); + } catch (CryptoException $e) { + logger($e->getMessage()); + + throw $e; + } + + } + + /** + * Securiza una clave de seguridad + * + * @param string $password + * @param bool $useAscii + * + * @return string|KeyProtectedByPassword + * @throws CryptoException + */ + public static function makeSecuredKey($password, $useAscii = true) + { + try { + if ($useAscii) { + return KeyProtectedByPassword::createRandomPasswordProtectedKey($password)->saveToAsciiSafeString(); + } + + return KeyProtectedByPassword::createRandomPasswordProtectedKey($password); + } catch (CryptoException $e) { + logger($e->getMessage()); + + throw $e; + } + } } \ No newline at end of file diff --git a/inc/SP/Core/Crypt/CryptSessionHandler.class.php b/inc/SP/Core/Crypt/CryptSessionHandler.class.php index a45e4388..b46d6bb0 100644 --- a/inc/SP/Core/Crypt/CryptSessionHandler.class.php +++ b/inc/SP/Core/Crypt/CryptSessionHandler.class.php @@ -1,124 +1,127 @@ -. - */ - -namespace SP\Core\Crypt; - -use Defuse\Crypto\Exception\CryptoException; -use Defuse\Crypto\Key; - - -/** - * Class CryptSessionHandler - * - * @package SP\Core\Crypt - */ -class CryptSessionHandler extends \SessionHandler -{ - /** - * @var bool Indica si la sesión está encriptada - */ - public static $isSecured = false; - /** - * @var Key - */ - private $Key; - - /** - * Session constructor. - * - * @param Key $Key - */ - public function __construct(Key $Key) - { - $this->Key = $Key; - } - - /** - * Read session data - * - * @link http://php.net/manual/en/sessionhandler.read.php - * @param string $id The session id to read data for. - * @return string

    - * Returns an encoded string of the read data. - * If nothing was read, it must return an empty string. - * Note this value is returned internally to PHP for processing. - *

    - * @since 5.4.0 - */ - public function read($id) - { - $data = parent::read($id); - - if (!$data) { - return ''; - } else { - try { - self::$isSecured = true; - - return Crypt::decrypt($data, $this->Key); - } catch (CryptoException $e) { - self::$isSecured = false; - - debugLog($e->getMessage()); - debugLog('Session data not encrypted.'); - - return $data; - } - } - } - - /** - * Write session data - * - * @link http://php.net/manual/en/sessionhandler.write.php - * @param string $id The session id. - * @param string $data

    - * The encoded session data. This data is the - * result of the PHP internally encoding - * the $_SESSION superglobal to a serialized - * string and passing it as this parameter. - * Please note sessions use an alternative serialization method. - *

    - * @return bool

    - * The return value (usually TRUE on success, FALSE on failure). - * Note this value is returned internally to PHP for processing. - *

    - * @since 5.4.0 - */ - public function write($id, $data) - { - try { - $data = Crypt::encrypt($data, $this->Key); - - self::$isSecured = true; - } catch (CryptoException $e) { - self::$isSecured = false; - - debugLog('Could not encrypt session data.'); - debugLog($e->getMessage()); - } - - return parent::write($id, $data); - } +. + */ + +namespace SP\Core\Crypt; + +use Defuse\Crypto\Exception\CryptoException; +use Defuse\Crypto\Key; + +/** + * Class CryptSessionHandler + * + * @package SP\Core\Crypt + */ +final class CryptSessionHandler extends \SessionHandler +{ + /** + * @var bool Indica si la sesión está encriptada + */ + public static $isSecured = false; + /** + * @var Key + */ + private $key; + + /** + * Session constructor. + * + * @param Key $Key + */ + public function __construct(Key $Key) + { + $this->key = $Key; + } + + /** + * Read session data + * + * @link http://php.net/manual/en/sessionhandler.read.php + * + * @param string $id The session id to read data for. + * + * @return string

    + * Returns an encoded string of the read data. + * If nothing was read, it must return an empty string. + * Note this value is returned internally to PHP for processing. + *

    + * @since 5.4.0 + */ + public function read($id) + { + $data = parent::read($id); + + if (!$data) { + return ''; + } else { + try { + self::$isSecured = true; + + return Crypt::decrypt($data, $this->key); + } catch (CryptoException $e) { + self::$isSecured = false; + + logger($e->getMessage()); + logger('Session data not encrypted.'); + + return $data; + } + } + } + + /** + * Write session data + * + * @link http://php.net/manual/en/sessionhandler.write.php + * + * @param string $id The session id. + * @param string $data

    + * The encoded session data. This data is the + * result of the PHP internally encoding + * the $_SESSION superglobal to a serialized + * string and passing it as this parameter. + * Please note sessions use an alternative serialization method. + *

    + * + * @return bool

    + * The return value (usually TRUE on success, FALSE on failure). + * Note this value is returned internally to PHP for processing. + *

    + * @since 5.4.0 + */ + public function write($id, $data) + { + try { + $data = Crypt::encrypt($data, $this->key); + + self::$isSecured = true; + } catch (CryptoException $e) { + self::$isSecured = false; + + logger('Could not encrypt session data.'); + logger($e->getMessage()); + } + + return parent::write($id, $data); + } } \ No newline at end of file diff --git a/inc/SP/Core/Crypt/Hash.class.php b/inc/SP/Core/Crypt/Hash.class.php index 5f5b97b9..e780cacd 100644 --- a/inc/SP/Core/Crypt/Hash.class.php +++ b/inc/SP/Core/Crypt/Hash.class.php @@ -1,82 +1,111 @@ -. - */ - -namespace SP\Core\Crypt; - -/** - * Class Hash - * - * @package SP\Core\Crypt - */ -class Hash -{ - /** - * Longitud máxima aceptada para hashing - */ - const MAX_KEY_LENGTH = 72; - - /** - * Comprobar el hash de una clave. - * - * @param string $key con la clave a comprobar - * @param string $hash con el hash a comprobar - * @return bool - * @throws \SP\Core\Exceptions\SPException - */ - public static function checkHashKey($key, $hash) - { - return password_verify(self::getKey($key), $hash); - } - - /** - * Devolver la clave preparada. Se crea un hash si supera la longitud máxima. - * - * @param string $key - * @param bool $isCheck Indica si la operación es de comprobación o no - * @return string - */ - private static function getKey(&$key, $isCheck = true) - { - if (mb_strlen($key) > Hash::MAX_KEY_LENGTH) { - $key = hash('sha256', $key); - - if ($isCheck === false) { - debugLog('[INFO] Password string shortened using SHA256 and then BCRYPT'); - } - } - - return $key; - } - - /** - * Generar un hash de una clave criptográficamente segura - * - * @param string $key con la clave a 'hashear' - * @return string con el hash de la clave - */ - public static function hashKey($key) - { - return password_hash(self::getKey($key, false), PASSWORD_BCRYPT); - } +. + */ + +namespace SP\Core\Crypt; + +/** + * Class Hash + * + * @package SP\Core\Crypt + */ +final class Hash +{ + /** + * Longitud máxima aceptada para hashing + */ + const MAX_KEY_LENGTH = 72; + + /** + * Comprobar el hash de una clave. + * + * @param string $key con la clave a comprobar + * @param string $hash con el hash a comprobar + * + * @return bool + */ + public static function checkHashKey($key, $hash) + { + return password_verify(self::getKey($key), $hash); + } + + /** + * Devolver la clave preparada. Se crea un hash si supera la longitud máxima. + * + * @param string $key + * @param bool $isCheck Indica si la operación es de comprobación o no + * + * @return string + */ + private static function getKey(&$key, $isCheck = true) + { + if (mb_strlen($key) > self::MAX_KEY_LENGTH) { + $key = hash('sha256', $key); + + if ($isCheck === false) { + logger('[INFO] Password string shortened using SHA256 and then BCRYPT'); + } + } + + return $key; + } + + /** + * Generar un hash de una clave criptográficamente segura + * + * @param string $key con la clave a 'hashear' + * + * @return string con el hash de la clave + */ + public static function hashKey($key) + { + return password_hash(self::getKey($key, false), PASSWORD_BCRYPT); + } + + /** + * Checks a message with a given key against a hash + * + * @param $message + * @param $key + * @param $hash + * + * @return bool + */ + public static function checkMessage($message, $key, $hash) + { + return hash_equals($hash, self::signMessage($message, $key)); + } + + /** + * Signs a message with a given key + * + * @param $message + * @param $key + * + * @return string + */ + public static function signMessage($message, $key) + { + return hash_hmac('sha256', $message, $key); + } } \ No newline at end of file diff --git a/inc/SP/Core/Crypt/Vault.class.php b/inc/SP/Core/Crypt/Vault.class.php index a708b765..cfcb4aa0 100644 --- a/inc/SP/Core/Crypt/Vault.class.php +++ b/inc/SP/Core/Crypt/Vault.class.php @@ -1,140 +1,135 @@ -. - */ - -namespace SP\Core\Crypt; - -use SP\Core\Session as CoreSession; -use SP\Core\SessionUtil; - -/** - * Class Vault - * - * @package SP\Core\Crypt - */ -class Vault -{ - /** - * @var string - */ - private $data; - /** - * @var string - */ - private $key; - /** - * @var int - */ - private $timeSet = 0; - /** - * @var int - */ - private $timeUpdated = 0; - - /** - * Regenerar la clave de sesión - * - * @param string $key - * @throws \Defuse\Crypto\Exception\BadFormatException - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @return Vault - */ - public function reKey($key = null) - { - $this->timeUpdated = time(); - $sessionMPass = $this->getData($key); - - SessionUtil::regenerate(); - - $this->saveData($sessionMPass, $key); - - return $this; - } - - /** - * Devolver la clave maestra de la sesión - * - * @param string $key - * @return string - * @throws \Defuse\Crypto\Exception\CryptoException - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \Defuse\Crypto\Exception\BadFormatException - */ - public function getData($key = null) - { - $key = $key ?: $this->getKey(); - $securedKey = Crypt::unlockSecuredKey($this->key, $key); - - return Crypt::decrypt($this->data, $securedKey, $key); - } - - /** - * Devolver la clave utilizada para generar la llave segura - * - * @return string - */ - private function getKey() - { - return session_id() . CoreSession::getSidStartTime(); - } - - /** - * Guardar la clave maestra en la sesión - * - * @param $data - * @param string $key - * @return $this - * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException - * @throws \Defuse\Crypto\Exception\BadFormatException - * @throws \Defuse\Crypto\Exception\CryptoException - */ - public function saveData($data, $key = null) - { - if ($this->timeSet === 0) { - $this->timeSet = time(); - } - - $key = $key ?: $this->getKey(); - $this->key = Crypt::makeSecuredKey($key); - $this->data = Crypt::encrypt($data, $this->key, $key); - - return $this; - } - - /** - * @return int - */ - public function getTimeSet() - { - return $this->timeSet; - } - - /** - * @return int - */ - public function getTimeUpdated() - { - return $this->timeUpdated; - } +. + */ + +namespace SP\Core\Crypt; + +/** + * Class Vault + * + * @package SP\Core\Crypt + */ +final class Vault +{ + /** + * @var string + */ + private $data; + /** + * @var string + */ + private $key; + /** + * @var int + */ + private $timeSet = 0; + /** + * @var int + */ + private $timeUpdated = 0; + + /** + * @return static + */ + public static function getInstance() + { + return new static(); + } + + /** + * Regenerar la clave de sesión + * + * @param string $newSeed + * @param string $oldSeed + * + * @return Vault + * @throws \Defuse\Crypto\Exception\CryptoException + */ + public function reKey($newSeed, $oldSeed) + { + $this->timeUpdated = time(); + $sessionMPass = $this->getData($oldSeed); + + $this->saveData($sessionMPass, $newSeed); + + return $this; + } + + /** + * Devolver la clave maestra de la sesión + * + * @param string $key + * + * @return string + * @throws \Defuse\Crypto\Exception\CryptoException + */ + public function getData($key) + { + return Crypt::decrypt($this->data, $this->key, $key); + } + + /** + * Guardar la clave maestra en la sesión + * + * @param mixed $data + * @param string $key + * + * @return $this + * @throws \Defuse\Crypto\Exception\CryptoException + */ + public function saveData($data, $key) + { + if ($this->timeSet === 0) { + $this->timeSet = time(); + } + + $this->key = Crypt::makeSecuredKey($key); + $this->data = Crypt::encrypt($data, $this->key, $key); + + return $this; + } + + /** + * @return int + */ + public function getTimeSet() + { + return $this->timeSet; + } + + /** + * @return int + */ + public function getTimeUpdated() + { + return $this->timeUpdated; + } + + /** + * Serializaes the current object + */ + public function getSerialized() + { + return serialize($this); + } } \ No newline at end of file diff --git a/inc/SP/Core/Events/EventDispatcher.class.php b/inc/SP/Core/Events/EventDispatcher.class.php index 3489dea6..d2b766ee 100644 --- a/inc/SP/Core/Events/EventDispatcher.class.php +++ b/inc/SP/Core/Events/EventDispatcher.class.php @@ -1,35 +1,35 @@ -. - */ - -namespace SP\Core\Events; - -/** - * Class EventDispatcher - * - * @package SP\Core\EventDispatcher - */ -class EventDispatcher extends EventDispatcherBase -{ - +. + */ + +namespace SP\Core\Events; + +/** + * Class EventDispatcher + * + * @package SP\Core\EventDispatcher + */ +final class EventDispatcher extends EventDispatcherBase +{ + } \ No newline at end of file diff --git a/inc/SP/Core/Events/EventDispatcherInterface.class.php b/inc/SP/Core/Events/EventDispatcherInterface.class.php index d6adf07f..7e1b9689 100644 --- a/inc/SP/Core/Events/EventDispatcherInterface.class.php +++ b/inc/SP/Core/Events/EventDispatcherInterface.class.php @@ -1,42 +1,41 @@ -. - */ - -namespace SP\Core\Events; - -/** - * Interface EventDispatcherInterface - * - * @package SP\Core\EventDispatcher - */ -interface EventDispatcherInterface extends \SplSubject -{ - /** - * Notificar a los observadores y establecer el estado - * - * @param string $event Nombre del evento - * @param mixed $object Objeto del evento - * @return - */ - public function notifyEvent($event, $object); +. + */ + +namespace SP\Core\Events; + +/** + * Interface EventDispatcherInterface + * + * @package SP\Core\EventDispatcher + */ +interface EventDispatcherInterface extends \SplSubject +{ + /** + * Notificar a los observadores y establecer el estado + * + * @param string $event Nombre del evento + * @param Event $object Objeto del evento + */ + public function notifyEvent($event, Event $object); } \ No newline at end of file diff --git a/inc/SP/Core/Exceptions/AuthException.class.php b/inc/SP/Core/Exceptions/AuthException.class.php index 264cce05..dfa99687 100644 --- a/inc/SP/Core/Exceptions/AuthException.class.php +++ b/inc/SP/Core/Exceptions/AuthException.class.php @@ -1,36 +1,35 @@ -. - */ - -namespace SP\Core\Exceptions; - - -/** - * Class AuthException - * - * @package SP\Core\Exceptions - */ -class AuthException extends SPException -{ - +. + */ + +namespace SP\Core\Exceptions; + +/** + * Class NoSuchPropertyException + * + * @package SP\Core\Exceptions + */ +class NoSuchPropertyException extends \Exception +{ + } \ No newline at end of file diff --git a/inc/SP/Core/Exceptions/ConstraintException.class.php b/inc/SP/Core/Exceptions/ConstraintException.class.php index 84f3dc07..4675bc70 100644 --- a/inc/SP/Core/Exceptions/ConstraintException.class.php +++ b/inc/SP/Core/Exceptions/ConstraintException.class.php @@ -1,35 +1,35 @@ -. - */ - -namespace SP\Core\Exceptions; - -/** - * Class ConstraintException - * - * @package SP\Core\Exceptions - */ -class ConstraintException extends SPException -{ - +. + */ + +namespace SP\Core\Exceptions; + +/** + * Class ConstraintException + * + * @package SP\Core\Exceptions + */ +final class ConstraintException extends SPException +{ + } \ No newline at end of file diff --git a/inc/SP/Core/Exceptions/FileNotFoundException.class.php b/inc/SP/Core/Exceptions/FileNotFoundException.class.php index 6a1c0982..652823a1 100644 --- a/inc/SP/Core/Exceptions/FileNotFoundException.class.php +++ b/inc/SP/Core/Exceptions/FileNotFoundException.class.php @@ -1,35 +1,35 @@ -. - */ - -namespace SP\Core\Exceptions; - -/** - * Class FileNotFoundException - * - * @package SP\Core\Exceptions - */ -class FileNotFoundException extends SPException -{ - +. + */ + +namespace SP\Core\Exceptions; + +/** + * Class FileNotFoundException + * + * @package SP\Core\Exceptions + */ +final class FileNotFoundException extends SPException +{ + } \ No newline at end of file diff --git a/inc/SP/Core/Exceptions/InvalidArgumentException.class.php b/inc/SP/Core/Exceptions/InvalidArgumentException.class.php index 49739dad..46ad48b5 100644 --- a/inc/SP/Core/Exceptions/InvalidArgumentException.class.php +++ b/inc/SP/Core/Exceptions/InvalidArgumentException.class.php @@ -1,35 +1,35 @@ -. - */ - -namespace SP\Core\Exceptions; - -/** - * Class InvalidArgumentException - * - * @package SP\Core\Exceptions - */ -class InvalidArgumentException extends SPException -{ - +. + */ + +namespace SP\Core\Exceptions; + +/** + * Class InvalidArgumentException + * + * @package SP\Core\Exceptions + */ +final class InvalidArgumentException extends SPException +{ + } \ No newline at end of file diff --git a/inc/SP/Core/Exceptions/InvalidClassException.class.php b/inc/SP/Core/Exceptions/InvalidClassException.class.php index 05b6f7b7..3adda73a 100644 --- a/inc/SP/Core/Exceptions/InvalidClassException.class.php +++ b/inc/SP/Core/Exceptions/InvalidClassException.class.php @@ -1,35 +1,35 @@ -. - */ - -namespace SP\Core\Exceptions; - -/** - * Class InvalidClassException - * - * @package SP\Core\Exceptions - */ -class InvalidClassException extends SPException -{ - +. + */ + +namespace SP\Core\Exceptions; + +/** + * Class InvalidClassException + * + * @package SP\Core\Exceptions + */ +final class InvalidClassException extends SPException +{ + } \ No newline at end of file diff --git a/inc/SP/Core/Exceptions/ItemException.class.php b/inc/SP/Core/Exceptions/ItemException.class.php index eaa7399d..66899e77 100644 --- a/inc/SP/Core/Exceptions/ItemException.class.php +++ b/inc/SP/Core/Exceptions/ItemException.class.php @@ -1,36 +1,36 @@ -. - */ - -namespace SP\Core\Exceptions; - - -/** - * Class ItemException - * - * @package SP\Core\Exceptions - */ -class ItemException extends \Exception -{ - +. + */ + +namespace SP\Core\Exceptions; + + +/** + * Class ItemException + * + * @package SP\Core\Exceptions + */ +final class ItemException extends \Exception +{ + } \ No newline at end of file diff --git a/inc/SP/Core/Exceptions/ValidationException.class.php b/inc/SP/Core/Exceptions/ValidationException.class.php index 75dd90a0..9271c047 100644 --- a/inc/SP/Core/Exceptions/ValidationException.class.php +++ b/inc/SP/Core/Exceptions/ValidationException.class.php @@ -1,35 +1,35 @@ -. - */ - -namespace SP\Core\Exceptions; - -/** - * Class ValidationException para excepciones en validación de formularios - * - * @package SP\Core\Exceptions - */ -class ValidationException extends \Exception -{ - +. + */ + +namespace SP\Core\Exceptions; + +/** + * Class ValidationException para excepciones en validación de formularios + * + * @package SP\Core\Exceptions + */ +final class ValidationException extends SPException +{ + } \ No newline at end of file diff --git a/inc/SP/Core/ItemsTypeInterface.class.php b/inc/SP/Core/ItemsTypeInterface.class.php index 0f95f8f4..602db383 100644 --- a/inc/SP/Core/ItemsTypeInterface.class.php +++ b/inc/SP/Core/ItemsTypeInterface.class.php @@ -1,44 +1,44 @@ -. - */ - -namespace SP\Core; - -/** - * Interface ItemsTypeInterface para la definición de tipos de elementos - * - * @package SP\Core - */ -interface ItemsTypeInterface -{ - const ITEM_CATEGORIES = 1; - const ITEM_CUSTOMERS = 2; - const ITEM_CUSTOMERS_USER = 52; - const ITEM_FILES = 3; - const ITEM_TAGS = 4; - const ITEM_USERS = 5; - const ITEM_GROUPS = 6; - const ITEM_PROFILES = 7; - const ITEM_ACCOUNTS = 8; - const ITEM_ACCOUNTS_USER = 58; +. + */ + +namespace SP\Core; + +/** + * Interface ItemsTypeInterface para la definición de tipos de elementos + * + * @package SP\Core + */ +interface ItemsTypeInterface +{ + const ITEM_CATEGORIES = 1; + const ITEM_CUSTOMERS = 2; + const ITEM_CUSTOMERS_USER = 52; + const ITEM_FILES = 3; + const ITEM_TAGS = 4; + const ITEM_USERS = 5; + const ITEM_GROUPS = 6; + const ITEM_PROFILES = 7; + const ITEM_ACCOUNTS = 8; + const ITEM_ACCOUNTS_USER = 58; } \ No newline at end of file diff --git a/inc/SP/Core/Messages/MessageInterface.class.php b/inc/SP/Core/Messages/MessageInterface.class.php index 42b0f541..7c59a0b4 100644 --- a/inc/SP/Core/Messages/MessageInterface.class.php +++ b/inc/SP/Core/Messages/MessageInterface.class.php @@ -1,47 +1,49 @@ -. - */ - -namespace SP\Core\Messages; - -/** - * Interface MessageInterface - * - * @package SP\Core\Messages - */ -interface MessageInterface -{ - /** - * Componer un mensaje en formato texto - * - * @return string - */ - public function composeText(); - - /** - * Componer un mensaje en formato HTML - * - * @return mixed - */ - public function composeHtml(); +. + */ + +namespace SP\Core\Messages; + +/** + * Interface MessageInterface + * + * @package SP\Core\Messages + */ +interface MessageInterface +{ + /** + * Componer un mensaje en formato texto + * + * @param string $delimiter + * + * @return string + */ + public function composeText($delimiter = PHP_EOL); + + /** + * Componer un mensaje en formato HTML + * + * @return mixed + */ + public function composeHtml(); } \ No newline at end of file diff --git a/inc/SP/Core/Messages/TaskMessage.class.php b/inc/SP/Core/Messages/TaskMessage.class.php index e6e3bbc3..be3fcbf0 100644 --- a/inc/SP/Core/Messages/TaskMessage.class.php +++ b/inc/SP/Core/Messages/TaskMessage.class.php @@ -1,211 +1,249 @@ -. - */ - -namespace SP\Core\Messages; - -use JsonSerializable; - -/** - * Class TaskMessage - * - * @package SP\Core\Messages - */ -class TaskMessage implements MessageInterface, JsonSerializable -{ - /** - * @var string - */ - protected $taskId; - /** - * @var string - */ - protected $task; - /** - * @var string - */ - protected $message; - /** - * @var int - */ - protected $time = 0; - /** - * @var int - */ - protected $progress = 0; - /** - * @var int - */ - protected $end = 0; - - /** - * @return string - */ - public function getTask() - { - return $this->task; - } - - /** - * @param string $task - */ - public function setTask($task) - { - $this->task = $task; - } - - /** - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * @param string $message - */ - public function setMessage($message) - { - $this->message = $message; - } - - /** - * @return int - */ - public function getTime() - { - return $this->time; - } - - /** - * @param int $time - */ - public function setTime($time) - { - $this->time = $time; - } - - /** - * @return int - */ - public function getProgress() - { - return $this->progress; - } - - /** - * @param int $progress - */ - public function setProgress($progress) - { - $this->progress = $progress; - } - - /** - * @return int - */ - public function getEnd() - { - return $this->end; - } - - /** - * @param int $end - */ - public function setEnd($end) - { - $this->end = $end; - } - - /** - * Componer un mensaje en formato texto - * - * @return string - */ - public function composeText() - { - return implode(';', [ - 'taskId' => $this->taskId, - 'task' => $this->task, - 'message' => $this->message, - 'time' => $this->time, - 'progress' => $this->progress, - 'end' => $this->end - ]); - } - - /** - * Componer un mensaje en formato HTML - * - * @return mixed - */ - public function composeHtml() - { - return [ - 'taskId' => $this->taskId, - 'task' => $this->task, - 'message' => $this->message, - 'time' => $this->time, - 'progress' => $this->progress, - 'end' => $this->end - ]; - } - - /** - * Componer un mensaje en formato JSON - */ - public function composeJson() - { - return json_encode($this); - } - - /** - * Specify data which should be serialized to JSON - * - * @link http://php.net/manual/en/jsonserializable.jsonserialize.php - * @return mixed data which can be serialized by json_encode, - * which is a value of any type other than a resource. - * @since 5.4.0 - */ - public function jsonSerialize() - { - return get_object_vars($this); - } - - /** - * @return string - */ - public function getTaskId() - { - return $this->taskId; - } - - /** - * @param string $taskId - */ - public function setTaskId($taskId) - { - $this->taskId = $taskId; - } +. + */ + +namespace SP\Core\Messages; + +use JsonSerializable; + +/** + * Class TaskMessage + * + * @package SP\Core\Messages + */ +final class TaskMessage implements MessageInterface, JsonSerializable +{ + /** + * @var string + */ + protected $taskId; + /** + * @var string + */ + protected $task; + /** + * @var string + */ + protected $message; + /** + * @var int + */ + protected $time = 0; + /** + * @var int + */ + protected $progress = 0; + /** + * @var int + */ + protected $end = 0; + + /** + * TaskMessage constructor. + * + * @param string $taskId + * @param string $task + */ + public function __construct($taskId, $task) + { + $this->taskId = $taskId; + $this->task = $task; + } + + /** + * @return string + */ + public function getTask() + { + return $this->task; + } + + /** + * @param string $task + * + * @return TaskMessage + */ + public function setTask($task) + { + $this->task = $task; + + return $this; + } + + /** + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * @param string $message + * + * @return TaskMessage + */ + public function setMessage($message) + { + $this->message = $message; + + return $this; + } + + /** + * @return int + */ + public function getTime() + { + return $this->time; + } + + /** + * @param int $time + * + * @return TaskMessage + */ + public function setTime($time) + { + $this->time = $time; + + return $this; + } + + /** + * @return int + */ + public function getProgress() + { + return $this->progress; + } + + /** + * @param int $progress + * + * @return TaskMessage + */ + public function setProgress($progress) + { + $this->progress = $progress; + + return $this; + } + + /** + * @return int + */ + public function getEnd() + { + return $this->end; + } + + /** + * @param int $end + * + * @return TaskMessage + */ + public function setEnd($end) + { + $this->end = $end; + + return $this; + } + + /** + * Componer un mensaje en formato texto + * + * @param string $delimiter + * + * @return string + */ + public function composeText($delimiter = ';') + { + return implode($delimiter, [ + 'taskId' => $this->taskId, + 'task' => $this->task, + 'message' => $this->message, + 'time' => $this->time, + 'progress' => $this->progress, + 'end' => $this->end + ]); + } + + /** + * Componer un mensaje en formato HTML + * + * @return mixed + */ + public function composeHtml() + { + return [ + 'taskId' => $this->taskId, + 'task' => $this->task, + 'message' => $this->message, + 'time' => $this->time, + 'progress' => $this->progress, + 'end' => $this->end + ]; + } + + /** + * Componer un mensaje en formato JSON + */ + public function composeJson() + { + return json_encode($this); + } + + /** + * Specify data which should be serialized to JSON + * + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + * @return mixed data which can be serialized by json_encode, + * which is a value of any type other than a resource. + * @since 5.4.0 + */ + public function jsonSerialize() + { + return get_object_vars($this); + } + + /** + * @return string + */ + public function getTaskId() + { + return $this->taskId; + } + + /** + * @param string $taskId + * + * @return TaskMessage + */ + public function setTaskId($taskId) + { + $this->taskId = $taskId; + + return $this; + } } \ No newline at end of file diff --git a/inc/SP/Core/UI/ThemeIconsInterface.class.php b/inc/SP/Core/UI/ThemeIconsInterface.class.php index 78242700..48cd67b4 100644 --- a/inc/SP/Core/UI/ThemeIconsInterface.class.php +++ b/inc/SP/Core/UI/ThemeIconsInterface.class.php @@ -1,40 +1,40 @@ -. - */ - -namespace SP\Core\UI; - -defined('APP_ROOT') || die(); - -/** - * Interface ThemeIconsInterface - * - * @package SP\Core - */ -interface ThemeIconsInterface -{ - /** - * @return mixed - */ - public function setIcons(); +. + */ + +namespace SP\Core\UI; + +defined('APP_ROOT') || die(); + +/** + * Interface ThemeIconsInterface + * + * @package SP\Core + */ +interface ThemeIconsInterface +{ + /** + * @return mixed + */ + public function setIcons(); } \ No newline at end of file diff --git a/inc/SP/Core/UI/ThemeInterface.class.php b/inc/SP/Core/UI/ThemeInterface.class.php index 485f61f2..431607fd 100644 --- a/inc/SP/Core/UI/ThemeInterface.class.php +++ b/inc/SP/Core/UI/ThemeInterface.class.php @@ -1,84 +1,85 @@ -. - */ - -namespace SP\Core\UI; - -/** - * Interface ThemeInterface - * - * @package SP\Core\UI - */ -interface ThemeInterface -{ - /** - * @param bool $force Forzar la detección del tema para los inicios de sesión - * @return mixed - */ - public function initTheme($force = false); - - /** - * Obtener los temas disponibles desde el directorio de temas - * - * @return array Con la información del tema - */ - public function getThemesAvailable(); - - /** - * Obtener la información del tema desde el archivo de información - * - * @return array ( - * 'name' => string - * 'creator' => string - * 'version' => string - * 'js' => array - * 'css' => array - * ) - */ - public function getThemeInfo(); - - /** - * @return string - */ - public function getThemeUri(); - - /** - * @return string - */ - public function getThemePath(); - - /** - * @return string - */ - public function getThemeName(); - - /** - * @return ThemeIconsInterface - */ - public function getIcons(); - - /** - * @return string - */ - public function getViewsPath(); +. + */ + +namespace SP\Core\UI; + +/** + * Interface ThemeInterface + * + * @package SP\Core\UI + */ +interface ThemeInterface +{ + /** + * @param bool $force Forzar la detección del tema para los inicios de sesión + * + * @return mixed + */ + public function initTheme($force = false); + + /** + * Obtener los temas disponibles desde el directorio de temas + * + * @return array Con la información del tema + */ + public function getThemesAvailable(); + + /** + * Obtener la información del tema desde el archivo de información + * + * @return array ( + * 'name' => string + * 'creator' => string + * 'version' => string + * 'js' => array + * 'css' => array + * ) + */ + public function getThemeInfo(); + + /** + * @return string + */ + public function getThemeUri(); + + /** + * @return string + */ + public function getThemePath(); + + /** + * @return string + */ + public function getThemeName(); + + /** + * @return ThemeIcons + */ + public function getIcons(); + + /** + * @return string + */ + public function getViewsPath(); } \ No newline at end of file diff --git a/inc/SP/DataModel/AccountExtData.class.php b/inc/SP/DataModel/AccountExtData.class.php index 2916e3a1..e0af6264 100644 --- a/inc/SP/DataModel/AccountExtData.class.php +++ b/inc/SP/DataModel/AccountExtData.class.php @@ -1,206 +1,206 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class AccountExtData - * - * @package SP\DataModel - */ -class AccountExtData extends AccountData -{ - /** - * @var array Los Ids de los usuarios secundarios de la cuenta. - */ - public $usersId = []; - /** - * @var array Los Ids de los grupos secundarios de la cuenta. - */ - public $userGroupsId = []; - /** - * @var array - */ - public $tags = []; - /** - * @var string - */ - public $category_name = ''; - /** - * @var string - */ - public $customer_name = ''; - /** - * @var string - */ - public $usergroup_name = ''; - /** - * @var string - */ - public $user_name = ''; - /** - * @var string - */ - public $user_login = ''; - /** - * @var string - */ - public $user_editName = ''; - /** - * @var string - */ - public $user_editLogin = ''; - /** - * @var string - */ - public $publicLink_hash = ''; - - /** - * @return string - */ - public function getUserEditName() - { - return $this->user_editName; - } - - /** - * @return string - */ - public function getUserEditLogin() - { - return $this->user_editLogin; - } - - /** - * @return string - */ - public function getPublicLinkHash() - { - return $this->publicLink_hash; - } - - /** - * @return array - */ - public function getAccountUsersId() - { - return $this->usersId; - } - - /** - * @return array - */ - public function getAccountUserGroupsId() - { - return $this->userGroupsId; - } - - /** - * @return array - */ - public function getTags() - { - return $this->tags; - } - - /** - * @param array $tags - */ - public function setTags(array $tags) - { - $this->tags = $tags; - } - - /** - * @return string - */ - public function getCategoryName() - { - return $this->category_name; - } - - /** - * @return string - */ - public function getCustomerName() - { - return $this->customer_name; - } - - /** - * @return string - */ - public function getUsergroupName() - { - return $this->usergroup_name; - } - - /** - * @return string - */ - public function getUserName() - { - return $this->user_name; - } - - /** - * @return string - */ - public function getUserLogin() - { - return $this->user_login; - } - - /** - * @return array - */ - public function getUsersId() - { - return $this->usersId; - } - - /** - * @param array $usersId - */ - public function setUsersId(array $usersId) - { - $this->usersId = $usersId; - } - - /** - * @return array - */ - public function getUserGroupsId() - { - return $this->userGroupsId; - } - - /** - * @param array $userGroupsId - */ - public function setUserGroupsId(array $userGroupsId) - { - $this->userGroupsId = $userGroupsId; - } +. + */ + +namespace SP\DataModel; + +/** + * Class AccountExtData + * + * @package SP\DataModel + */ +class AccountExtData extends AccountData +{ + /** + * @var array Los Ids de los usuarios secundarios de la cuenta. + */ + public $usersId = []; + /** + * @var array Los Ids de los grupos secundarios de la cuenta. + */ + public $userGroupsId = []; + /** + * @var array + */ + public $tags = []; + /** + * @var string + */ + public $categoryName = ''; + /** + * @var string + */ + public $clientName = ''; + /** + * @var string + */ + public $userGroupName = ''; + /** + * @var string + */ + public $userName = ''; + /** + * @var string + */ + public $userLogin = ''; + /** + * @var string + */ + public $userEditName = ''; + /** + * @var string + */ + public $userEditLogin = ''; + /** + * @var string + */ + public $publicLinkHash = ''; + + /** + * @return string + */ + public function getUserEditName() + { + return $this->userEditName; + } + + /** + * @return string + */ + public function getUserEditLogin() + { + return $this->userEditLogin; + } + + /** + * @return string + */ + public function getPublicLinkHash() + { + return $this->publicLinkHash; + } + + /** + * @return array + */ + public function getAccountUsersId() + { + return $this->usersId; + } + + /** + * @return array + */ + public function getAccountUserGroupsId() + { + return $this->userGroupsId; + } + + /** + * @return array + */ + public function getTags() + { + return $this->tags; + } + + /** + * @param array $tags + */ + public function setTags(array $tags) + { + $this->tags = $tags; + } + + /** + * @return string + */ + public function getCategoryName() + { + return $this->categoryName; + } + + /** + * @return string + */ + public function getClientName() + { + return $this->clientName; + } + + /** + * @return string + */ + public function getUserGroupName() + { + return $this->userGroupName; + } + + /** + * @return string + */ + public function getUserName() + { + return $this->userName; + } + + /** + * @return string + */ + public function getUserLogin() + { + return $this->userLogin; + } + + /** + * @return array + */ + public function getUsersId() + { + return $this->usersId; + } + + /** + * @param array $usersId + */ + public function setUsersId(array $usersId) + { + $this->usersId = $usersId; + } + + /** + * @return array + */ + public function getUserGroupsId() + { + return $this->userGroupsId; + } + + /** + * @param array $userGroupsId + */ + public function setUserGroupsId(array $userGroupsId) + { + $this->userGroupsId = $userGroupsId; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/AccountHistoryData.class.php b/inc/SP/DataModel/AccountHistoryData.class.php index 7740eb33..28088315 100644 --- a/inc/SP/DataModel/AccountHistoryData.class.php +++ b/inc/SP/DataModel/AccountHistoryData.class.php @@ -1,74 +1,94 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class AccountHistoryData - * - * @package SP\DataModel - */ -class AccountHistoryData extends AccountData -{ - /** - * @var bool - */ - public $isModify = 0; - /** - * @var bool - */ - public $isDeleted = 0; - - /** - * @return boolean - */ - public function isIsModify() - { - return (int)$this->isModify; - } - - /** - * @param boolean $isModify - */ - public function setIsModify($isModify) - { - $this->isModify = (int)$isModify; - } - - /** - * @return boolean - */ - public function isIsDeleted() - { - return (int)$this->isDeleted; - } - - /** - * @param boolean $isDeleted - */ - public function setIsDeleted($isDeleted) - { - $this->isDeleted = (int)$isDeleted; - } +. + */ + +namespace SP\DataModel; + +/** + * Class AccountHistoryData + * + * @package SP\DataModel + */ +class AccountHistoryData extends AccountExtData +{ + /** + * @var bool + */ + public $isModify = 0; + /** + * @var bool + */ + public $isDeleted = 0; + /** + * @var int + */ + public $accountId; + + /** + * @return int + */ + public function isIsModify() + { + return (int)$this->isModify; + } + + /** + * @param boolean $isModify + */ + public function setIsModify($isModify) + { + $this->isModify = (int)$isModify; + } + + /** + * @return int + */ + public function isIsDeleted() + { + return (int)$this->isDeleted; + } + + /** + * @param boolean $isDeleted + */ + public function setIsDeleted($isDeleted) + { + $this->isDeleted = (int)$isDeleted; + } + + /** + * @return int + */ + public function getAccountId() + { + return $this->accountId; + } + + /** + * @param int $accountId + */ + public function setAccountId($accountId) + { + $this->accountId = $accountId; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/AccountSearchData.class.php b/inc/SP/DataModel/AccountSearchData.class.php index 067464b2..a1e22458 100644 --- a/inc/SP/DataModel/AccountSearchData.class.php +++ b/inc/SP/DataModel/AccountSearchData.class.php @@ -1,54 +1,58 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class AccountSearchData - * - * @package SP\DataModel - */ -class AccountSearchData extends AccountExtData -{ - /** - * @var int - */ - public $num_files = 0; - - /** - * @return int - */ - public function getNumFiles() - { - return (int)$this->num_files; - } - - /** - * @param int $num_files - */ - public function setNumFiles($num_files) - { - $this->num_files = (int)$num_files; - } +. + */ + +namespace SP\DataModel; + +/** + * Class ItemData + * + * @package SP\DataModel + */ +class ItemData implements DataModelInterface +{ + /** + * @var int + */ + public $id; + /** + * @var string + */ + public $name; + + /** + * @return int + */ + public function getId() + { + return (int)$this->id; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/CustomFieldBaseData.class.php b/inc/SP/DataModel/CustomFieldBaseData.class.php index 4fee532f..d72a5789 100644 --- a/inc/SP/DataModel/CustomFieldBaseData.class.php +++ b/inc/SP/DataModel/CustomFieldBaseData.class.php @@ -1,250 +1,250 @@ -. - */ - -namespace SP\DataModel; - -defined('APP_ROOT') || die(); - -/** - * Class CustomFieldData - * - * @package SP\DataModel - */ -class CustomFieldBaseData extends DataModelBase -{ - /** - * @var int - */ - public $customfielddata_id = 0; - /** - * @var int - */ - public $customfielddef_id = 0; - /** - * @var string - */ - public $customfielddata_data = ''; - /** - * @var string - */ - public $customfielddata_key = ''; - /** - * @var string - */ - public $customfielddef_field = ''; - /** - * @var string - */ - public $name = ''; - /** - * @var int - */ - public $type = 0; - /** - * @var int - */ - public $module = 0; - /** - * @var int - */ - public $id = 0; - - /** - * CustomFieldBaseData constructor. - * - * @param int $module - * @param int $id - */ - public function __construct($module = 0, $id = 0) - { - $this->module = $module; - $this->id = $id; - } - - /** - * @return int - */ - public function getCustomfielddataId() - { - return $this->customfielddata_id; - } - - /** - * @param int $customfielddata_id - */ - public function setCustomfielddataId($customfielddata_id) - { - $this->customfielddata_id = $customfielddata_id; - } - - /** - * @return int - */ - public function getCustomfielddefId() - { - return $this->customfielddef_id; - } - - /** - * @param int $customfielddef_id - */ - public function setCustomfielddefId($customfielddef_id) - { - $this->customfielddef_id = $customfielddef_id; - } - - /** - * @return string - */ - public function getCustomfielddataData() - { - return $this->customfielddata_data; - } - - /** - * @param string $customfielddata_data - */ - public function setCustomfielddataData($customfielddata_data) - { - $this->customfielddata_data = $customfielddata_data; - } - - /** - * @return string - */ - public function getCustomfielddataKey() - { - return $this->customfielddata_key; - } - - /** - * @param string $customfielddata_key - */ - public function setCustomfielddataKey($customfielddata_key) - { - $this->customfielddata_key = $customfielddata_key; - } - - /** - * @return string - */ - public function getCustomfielddefField() - { - return $this->customfielddef_field; - } - - /** - * @param string $customfielddef_field - */ - public function setCustomfielddefField($customfielddef_field) - { - $this->customfielddef_field = $customfielddef_field; - } - - /** - * @return int - */ - public function getModule() - { - return $this->module; - } - - /** - * @param int $module - */ - public function setModule($module) - { - $this->module = $module; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * @param int $type - */ - public function setType($type) - { - $this->type = $type; - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - */ - public function setId($id) - { - $this->id = $id; - } - - /** - * unserialize() checks for the presence of a function with the magic name __wakeup. - * If present, this function can reconstruct any resources that the object may have. - * The intended use of __wakeup is to reestablish any database connections that may have been lost during - * serialization and perform other reinitialization tasks. - * - * @return void - * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep - */ - public function __wakeup() - { - // Para realizar la conversión de nombre de propiedades que empiezan por _ - foreach (get_object_vars($this) as $name => $value) { - if ($name[0] === '_') { - $newName = substr($name, 1); - $this->$newName = $value; - } - } - } - - +. + */ + +namespace SP\DataModel; + +defined('APP_ROOT') || die(); + +/** + * Class CustomFieldData + * + * @package SP\DataModel + */ +class CustomFieldBaseData extends DataModelBase +{ + /** + * @var int + */ + public $customfielddata_id = 0; + /** + * @var int + */ + public $customfielddef_id = 0; + /** + * @var string + */ + public $customfielddata_data = ''; + /** + * @var string + */ + public $customfielddata_key = ''; + /** + * @var string + */ + public $customfielddef_field = ''; + /** + * @var string + */ + public $name = ''; + /** + * @var int + */ + public $type = 0; + /** + * @var int + */ + public $module = 0; + /** + * @var int + */ + public $id = 0; + + /** + * CustomFieldBaseData constructor. + * + * @param int $module + * @param int $id + */ + public function __construct($module = 0, $id = 0) + { + $this->module = $module; + $this->id = $id; + } + + /** + * @return int + */ + public function getCustomfielddataId() + { + return $this->customfielddata_id; + } + + /** + * @param int $customfielddata_id + */ + public function setCustomfielddataId($customfielddata_id) + { + $this->customfielddata_id = $customfielddata_id; + } + + /** + * @return int + */ + public function getCustomfielddefId() + { + return $this->customfielddef_id; + } + + /** + * @param int $customfielddef_id + */ + public function setCustomfielddefId($customfielddef_id) + { + $this->customfielddef_id = $customfielddef_id; + } + + /** + * @return string + */ + public function getCustomfielddataData() + { + return $this->customfielddata_data; + } + + /** + * @param string $customfielddata_data + */ + public function setCustomfielddataData($customfielddata_data) + { + $this->customfielddata_data = $customfielddata_data; + } + + /** + * @return string + */ + public function getCustomfielddataKey() + { + return $this->customfielddata_key; + } + + /** + * @param string $customfielddata_key + */ + public function setCustomfielddataKey($customfielddata_key) + { + $this->customfielddata_key = $customfielddata_key; + } + + /** + * @return string + */ + public function getCustomfielddefField() + { + return $this->customfielddef_field; + } + + /** + * @param string $customfielddef_field + */ + public function setCustomfielddefField($customfielddef_field) + { + $this->customfielddef_field = $customfielddef_field; + } + + /** + * @return int + */ + public function getModule() + { + return $this->module; + } + + /** + * @param int $module + */ + public function setModule($module) + { + $this->module = $module; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * @param int $type + */ + public function setType($type) + { + $this->type = $type; + } + + /** + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * unserialize() checks for the presence of a function with the magic name __wakeup. + * If present, this function can reconstruct any resources that the object may have. + * The intended use of __wakeup is to reestablish any database connections that may have been lost during + * serialization and perform other reinitialization tasks. + * + * @return void + * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep + */ + public function __wakeup() + { + // Para realizar la conversión de nombre de propiedades que empiezan por _ + foreach (get_object_vars($this) as $name => $value) { + if ($name[0] === '_') { + $newName = substr($name, 1); + $this->$newName = $value; + } + } + } + + } \ No newline at end of file diff --git a/inc/SP/DataModel/DataModelBase.class.php b/inc/SP/DataModel/DataModelBase.class.php index d376f27b..26c0342d 100644 --- a/inc/SP/DataModel/DataModelBase.class.php +++ b/inc/SP/DataModel/DataModelBase.class.php @@ -1,35 +1,35 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class DataModelBase - * - * @package SP\DataModel - */ -abstract class DataModelBase -{ - +. + */ + +namespace SP\DataModel; + +/** + * Class DataModelBase + * + * @package SP\DataModel + */ +abstract class DataModelBase +{ + } \ No newline at end of file diff --git a/inc/SP/DataModel/DataModelInterface.class.php b/inc/SP/DataModel/DataModelInterface.class.php index 7a2172ec..33154b18 100644 --- a/inc/SP/DataModel/DataModelInterface.class.php +++ b/inc/SP/DataModel/DataModelInterface.class.php @@ -1,44 +1,44 @@ -. - */ - -namespace SP\DataModel; - - -/** - * Interface DataModelInterface - * - * @package SP\DataModel - */ -interface DataModelInterface -{ - /** - * @return int - */ - public function getId(); - - /** - * @return string - */ - public function getName(); +. + */ + +namespace SP\DataModel; + + +/** + * Interface DataModelInterface + * + * @package SP\DataModel + */ +interface DataModelInterface +{ + /** + * @return int + */ + public function getId(); + + /** + * @return string + */ + public function getName(); } \ No newline at end of file diff --git a/inc/SP/DataModel/FileExtData.class.php b/inc/SP/DataModel/FileExtData.class.php index 204b0176..bd6935d4 100644 --- a/inc/SP/DataModel/FileExtData.class.php +++ b/inc/SP/DataModel/FileExtData.class.php @@ -1,74 +1,74 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class FileExtData - * - * @package SP\DataModel - */ -class FileExtData extends FileData -{ - /** - * @var string - */ - public $customer_name = ''; - /** - * @var string - */ - public $account_name = ''; - - /** - * @return string - */ - public function getCustomerName() - { - return $this->customer_name; - } - - /** - * @param string $customer_name - */ - public function setCustomerName($customer_name) - { - $this->customer_name = $customer_name; - } - - /** - * @return string - */ - public function getAccountName() - { - return $this->account_name; - } - - /** - * @param string $account_name - */ - public function setAccountName($account_name) - { - $this->account_name = $account_name; - } +. + */ + +namespace SP\DataModel; + +/** + * Class FileExtData + * + * @package SP\DataModel + */ +class FileExtData extends FileData +{ + /** + * @var string + */ + public $clientName = ''; + /** + * @var string + */ + public $accountName = ''; + + /** + * @return string + */ + public function getClientName() + { + return $this->clientName; + } + + /** + * @param string $clientName + */ + public function setClientName($clientName) + { + $this->clientName = $clientName; + } + + /** + * @return string + */ + public function getAccountName() + { + return $this->accountName; + } + + /** + * @param string $accountName + */ + public function setAccountName($accountName) + { + $this->accountName = $accountName; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/GroupAccountsData.class.php b/inc/SP/DataModel/GroupAccountsData.class.php index 1bf26f14..7ea35f24 100644 --- a/inc/SP/DataModel/GroupAccountsData.class.php +++ b/inc/SP/DataModel/GroupAccountsData.class.php @@ -1,104 +1,104 @@ -. - */ - -namespace SP\DataModel; - -defined('APP_ROOT') || die(); - -/** - * Class GroupAccountsData - * - * @package SP\DataModel - */ -class GroupAccountsData extends DataModelBase -{ - /** - * @var int - */ - public $accgroup_groupId = 0; - /** - * @var int - */ - public $accgroup_accountId = 0; - /** - * @var array - */ - protected $groups = []; - - /** - * @return int - */ - public function getAccgroupGroupId() - { - return $this->accgroup_groupId; - } - - /** - * @param int $accgroup_groupId - */ - public function setAccgroupGroupId($accgroup_groupId) - { - $this->accgroup_groupId = $accgroup_groupId; - } - - /** - * @return int - */ - public function getAccgroupAccountId() - { - return $this->accgroup_accountId; - } - - /** - * @param int $accgroup_accountId - */ - public function setAccgroupAccountId($accgroup_accountId) - { - $this->accgroup_accountId = $accgroup_accountId; - } - - /** - * @return array - */ - public function getGroups() - { - return $this->groups; - } - - /** - * @param array $groups - */ - public function setGroups(array $groups) - { - $this->groups = $groups; - } - - /** - * @param int $group - */ - public function addGroup($group) - { - $this->groups[] = intval($group); - } +. + */ + +namespace SP\DataModel; + +defined('APP_ROOT') || die(); + +/** + * Class GroupAccountsData + * + * @package SP\DataModel + */ +class AccountToUserGroupData extends DataModelBase +{ + /** + * @var int + */ + public $userGroupId = 0; + /** + * @var int + */ + public $accountId = 0; + /** + * @var array + */ + protected $groups = []; + + /** + * @return int + */ + public function getUserGroupId() + { + return $this->userGroupId; + } + + /** + * @param int $userGroupId + */ + public function setUserGroupId($userGroupId) + { + $this->userGroupId = $userGroupId; + } + + /** + * @return int + */ + public function getAccountId() + { + return $this->accountId; + } + + /** + * @param int $accountId + */ + public function setAccountId($accountId) + { + $this->accountId = $accountId; + } + + /** + * @return array + */ + public function getGroups() + { + return $this->groups; + } + + /** + * @param array $groups + */ + public function setGroups(array $groups) + { + $this->groups = $groups; + } + + /** + * @param int $group + */ + public function addGroup($group) + { + $this->groups[] = (int)$group; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/GroupUsersData.class.php b/inc/SP/DataModel/GroupUsersData.class.php index 1a8b43e7..9a343e2f 100644 --- a/inc/SP/DataModel/GroupUsersData.class.php +++ b/inc/SP/DataModel/GroupUsersData.class.php @@ -1,104 +1,104 @@ -. - */ - -namespace SP\DataModel; - -defined('APP_ROOT') || die(); - -/** - * Class GroupUserData - * - * @package SP\DataModel - */ -class GroupUsersData extends DataModelBase -{ - /** - * @var int - */ - public $usertogroup_groupId = 0; - /** - * @var int - */ - public $usertogroup_userId = 0; - /** - * @var array - */ - public $users = []; - - /** - * @return int - */ - public function getUsertogroupGroupId() - { - return (int)$this->usertogroup_groupId; - } - - /** - * @param int $usertogroup_groupId - */ - public function setUsertogroupGroupId($usertogroup_groupId) - { - $this->usertogroup_groupId = $usertogroup_groupId; - } - - /** - * @return int - */ - public function getUsertogroupUserId() - { - return (int)$this->usertogroup_userId; - } - - /** - * @param int $usertogroup_userId - */ - public function setUsertogroupUserId($usertogroup_userId) - { - $this->usertogroup_userId = $usertogroup_userId; - } - - /** - * @return array - */ - public function getUsers() - { - return $this->users; - } - - /** - * @param array $users - */ - public function setUsers(array $users) - { - $this->users = $users; - } - - /** - * @param int $user - */ - public function addUser($user) - { - $this->users[] = intval($user); - } +. + */ + +namespace SP\DataModel; + +defined('APP_ROOT') || die(); + +/** + * Class GroupUserData + * + * @package SP\DataModel + */ +class UserToUserGroupData extends DataModelBase +{ + /** + * @var int + */ + public $userGroupId = 0; + /** + * @var int + */ + public $userId = 0; + /** + * @var array + */ + public $users = []; + + /** + * @return int + */ + public function getUserGroupId() + { + return (int)$this->userGroupId; + } + + /** + * @param int $userGroupId + */ + public function setUserGroupId($userGroupId) + { + $this->userGroupId = $userGroupId; + } + + /** + * @return int + */ + public function getUserId() + { + return (int)$this->userId; + } + + /** + * @param int $userId + */ + public function setUserId($userId) + { + $this->userId = $userId; + } + + /** + * @return array + */ + public function getUsers() + { + return $this->users; + } + + /** + * @param array $users + */ + public function setUsers(array $users) + { + $this->users = $users; + } + + /** + * @param int $user + */ + public function addUser($user) + { + $this->users[] = (int)$user; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/InstallData.class.php b/inc/SP/DataModel/InstallData.class.php index 5b00ae44..3efd42ac 100644 --- a/inc/SP/DataModel/InstallData.class.php +++ b/inc/SP/DataModel/InstallData.class.php @@ -1,334 +1,334 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class InstallData - * - * @package SP\DataModel - */ -class InstallData -{ - /** - * @var string Usuario de la BD - */ - private $dbUser; - /** - * @var string - */ - private $dbAdminUser = ''; - /** - * @var string Clave de la BD - */ - private $dbPass; - /** - * @var string - */ - private $dbAdminPass = ''; - /** - * @var string Nombre de la BD - */ - private $dbName = 'syspass'; - /** - * @var string Host de la BD - */ - private $dbHost = 'localhost'; - /** - * @var string - */ - private $dbSocket; - /** - * @var int - */ - private $dbPort = 0; - /** - * @var string Usuario 'admin' de sysPass - */ - private $adminLogin = ''; - /** - * @var string Clave del usuario 'admin' de sysPass - */ - private $adminPass = ''; - /** - * @var string Clave maestra de sysPass - */ - private $masterPassword = ''; - /** - * @var bool Activar/desactivar Modo hosting - */ - private $hostingMode = false; - /** - * @var string - */ - private $dbAuthHost = ''; - /** - * @var string - */ - private $dbAuthHostDns = ''; - /** - * @var string - */ - private $siteLang = 'en_US'; - - /** - * @return string - */ - public function getDbUser() - { - return $this->dbUser; - } - - /** - * @param string $dbUser - */ - public function setDbUser($dbUser) - { - $this->dbUser = $dbUser; - } - - /** - * @return string - */ - public function getDbPass() - { - return $this->dbPass; - } - - /** - * @param string $dbPass - */ - public function setDbPass($dbPass) - { - $this->dbPass = $dbPass; - } - - /** - * @return string - */ - public function getDbName() - { - return $this->dbName; - } - - /** - * @param string $dbName - */ - public function setDbName($dbName) - { - $this->dbName = $dbName; - } - - /** - * @return string - */ - public function getDbHost() - { - return $this->dbHost; - } - - /** - * @param string $dbHost - */ - public function setDbHost($dbHost) - { - $this->dbHost = $dbHost; - } - - /** - * @return string - */ - public function getAdminLogin() - { - return $this->adminLogin; - } - - /** - * @param string $adminLogin - */ - public function setAdminLogin($adminLogin) - { - $this->adminLogin = $adminLogin; - } - - /** - * @return string - */ - public function getAdminPass() - { - return $this->adminPass; - } - - /** - * @param string $adminPass - */ - public function setAdminPass($adminPass) - { - $this->adminPass = $adminPass; - } - - /** - * @return string - */ - public function getMasterPassword() - { - return $this->masterPassword; - } - - /** - * @param string $masterPassword - */ - public function setMasterPassword($masterPassword) - { - $this->masterPassword = $masterPassword; - } - - /** - * @return boolean - */ - public function isHostingMode() - { - return $this->hostingMode; - } - - /** - * @param boolean $hostingMode - */ - public function setHostingMode($hostingMode) - { - $this->hostingMode = $hostingMode; - } - - /** - * @return string - */ - public function getDbAuthHost() - { - return $this->dbAuthHost; - } - - /** - * @param string $dbAuthHost - */ - public function setDbAuthHost($dbAuthHost) - { - $this->dbAuthHost = $dbAuthHost; - } - - /** - * @return int - */ - public function getDbPort() - { - return $this->dbPort; - } - - /** - * @param int $dbPort - */ - public function setDbPort($dbPort) - { - $this->dbPort = $dbPort; - } - - /** - * @return string - */ - public function getDbAdminUser() - { - return $this->dbAdminUser; - } - - /** - * @param string $dbAdminUser - */ - public function setDbAdminUser($dbAdminUser) - { - $this->dbAdminUser = $dbAdminUser; - } - - /** - * @return string - */ - public function getDbAdminPass() - { - return $this->dbAdminPass; - } - - /** - * @param string $dbAdminPass - */ - public function setDbAdminPass($dbAdminPass) - { - $this->dbAdminPass = $dbAdminPass; - } - - /** - * @return string - */ - public function getSiteLang() - { - return $this->siteLang; - } - - /** - * @param string $siteLang - */ - public function setSiteLang($siteLang) - { - $this->siteLang = $siteLang; - } - - /** - * @return string - */ - public function getDbAuthHostDns() - { - return $this->dbAuthHostDns; - } - - /** - * @param string $dbAuthHostDns - */ - public function setDbAuthHostDns($dbAuthHostDns) - { - $this->dbAuthHostDns = $dbAuthHostDns; - } - - /** - * @return string - */ - public function getDbSocket() - { - return $this->dbSocket; - } - - /** - * @param string $dbSocket - */ - public function setDbSocket($dbSocket) - { - $this->dbSocket = $dbSocket; - } +. + */ + +namespace SP\Services\Install; + +/** + * Class InstallData + * + * @package SP\DataModel + */ +final class InstallData +{ + /** + * @var string Usuario de la BD + */ + private $dbUser; + /** + * @var string + */ + private $dbAdminUser = ''; + /** + * @var string Clave de la BD + */ + private $dbPass; + /** + * @var string + */ + private $dbAdminPass = ''; + /** + * @var string Nombre de la BD + */ + private $dbName = 'syspass'; + /** + * @var string Host de la BD + */ + private $dbHost = 'localhost'; + /** + * @var string + */ + private $dbSocket; + /** + * @var int + */ + private $dbPort = 0; + /** + * @var string Usuario 'admin' de sysPass + */ + private $adminLogin = ''; + /** + * @var string Clave del usuario 'admin' de sysPass + */ + private $adminPass = ''; + /** + * @var string Clave maestra de sysPass + */ + private $masterPassword = ''; + /** + * @var bool Activar/desactivar Modo hosting + */ + private $hostingMode = false; + /** + * @var string + */ + private $dbAuthHost = ''; + /** + * @var string + */ + private $dbAuthHostDns = ''; + /** + * @var string + */ + private $siteLang = 'en_US'; + + /** + * @return string + */ + public function getDbUser() + { + return $this->dbUser; + } + + /** + * @param string $dbUser + */ + public function setDbUser($dbUser) + { + $this->dbUser = $dbUser; + } + + /** + * @return string + */ + public function getDbPass() + { + return $this->dbPass; + } + + /** + * @param string $dbPass + */ + public function setDbPass($dbPass) + { + $this->dbPass = $dbPass; + } + + /** + * @return string + */ + public function getDbName() + { + return $this->dbName; + } + + /** + * @param string $dbName + */ + public function setDbName($dbName) + { + $this->dbName = $dbName; + } + + /** + * @return string + */ + public function getDbHost() + { + return $this->dbHost; + } + + /** + * @param string $dbHost + */ + public function setDbHost($dbHost) + { + $this->dbHost = $dbHost; + } + + /** + * @return string + */ + public function getAdminLogin() + { + return $this->adminLogin; + } + + /** + * @param string $adminLogin + */ + public function setAdminLogin($adminLogin) + { + $this->adminLogin = $adminLogin; + } + + /** + * @return string + */ + public function getAdminPass() + { + return $this->adminPass; + } + + /** + * @param string $adminPass + */ + public function setAdminPass($adminPass) + { + $this->adminPass = $adminPass; + } + + /** + * @return string + */ + public function getMasterPassword() + { + return $this->masterPassword; + } + + /** + * @param string $masterPassword + */ + public function setMasterPassword($masterPassword) + { + $this->masterPassword = $masterPassword; + } + + /** + * @return boolean + */ + public function isHostingMode() + { + return $this->hostingMode; + } + + /** + * @param boolean $hostingMode + */ + public function setHostingMode($hostingMode) + { + $this->hostingMode = $hostingMode; + } + + /** + * @return string + */ + public function getDbAuthHost() + { + return $this->dbAuthHost; + } + + /** + * @param string $dbAuthHost + */ + public function setDbAuthHost($dbAuthHost) + { + $this->dbAuthHost = $dbAuthHost; + } + + /** + * @return int + */ + public function getDbPort() + { + return $this->dbPort; + } + + /** + * @param int $dbPort + */ + public function setDbPort($dbPort) + { + $this->dbPort = $dbPort; + } + + /** + * @return string + */ + public function getDbAdminUser() + { + return $this->dbAdminUser; + } + + /** + * @param string $dbAdminUser + */ + public function setDbAdminUser($dbAdminUser) + { + $this->dbAdminUser = $dbAdminUser; + } + + /** + * @return string + */ + public function getDbAdminPass() + { + return $this->dbAdminPass; + } + + /** + * @param string $dbAdminPass + */ + public function setDbAdminPass($dbAdminPass) + { + $this->dbAdminPass = $dbAdminPass; + } + + /** + * @return string + */ + public function getSiteLang() + { + return $this->siteLang; + } + + /** + * @param string $siteLang + */ + public function setSiteLang($siteLang) + { + $this->siteLang = $siteLang; + } + + /** + * @return string + */ + public function getDbAuthHostDns() + { + return $this->dbAuthHostDns; + } + + /** + * @param string $dbAuthHostDns + */ + public function setDbAuthHostDns($dbAuthHostDns) + { + $this->dbAuthHostDns = $dbAuthHostDns; + } + + /** + * @return string + */ + public function getDbSocket() + { + return $this->dbSocket; + } + + /** + * @param string $dbSocket + */ + public function setDbSocket($dbSocket) + { + $this->dbSocket = $dbSocket; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/ItemSearchData.class.php b/inc/SP/DataModel/ItemSearchData.class.php index a405a8a9..c721ff05 100644 --- a/inc/SP/DataModel/ItemSearchData.class.php +++ b/inc/SP/DataModel/ItemSearchData.class.php @@ -1,119 +1,120 @@ -. - */ - -namespace SP\DataModel; -use SP\Util\Filter; - - -/** - * Class ItemSearchData - * - * @package SP\DataModel - */ -class ItemSearchData -{ - const ORDER_ASC = 'ASC'; - const ORDER_DESC = 'DESC'; - - /** - * @var string - */ - public $seachString = ''; - /** - * @var int - */ - public $limitStart = 0; - /** - * @var int - */ - public $limitCount = 0; - /** - * @var string - */ - public $order = self::ORDER_ASC; - - /** - * @return string - */ - public function getSeachString() - { - return $this->seachString; - } - - /** - * @param string $seachString - */ - public function setSeachString($seachString) - { - $this->seachString = Filter::safeSearchString($seachString); - } - - /** - * @return int - */ - public function getLimitStart() - { - return $this->limitStart; - } - - /** - * @param int $limitStart - */ - public function setLimitStart($limitStart) - { - $this->limitStart = $limitStart; - } - - /** - * @return int - */ - public function getLimitCount() - { - return $this->limitCount; - } - - /** - * @param int $limitCount - */ - public function setLimitCount($limitCount) - { - $this->limitCount = $limitCount; - } - - /** - * @return string - */ - public function getOrder() - { - return $this->order; - } - - /** - * @param string $order - */ - public function setOrder($order) - { - $this->order = $order; - } +. + */ + +namespace SP\DataModel; + +use SP\Util\Filter; + + +/** + * Class ItemSearchData + * + * @package SP\DataModel + */ +class ItemSearchData +{ + const ORDER_ASC = 'ASC'; + const ORDER_DESC = 'DESC'; + + /** + * @var string + */ + public $seachString = ''; + /** + * @var int + */ + public $limitStart = 0; + /** + * @var int + */ + public $limitCount = 0; + /** + * @var string + */ + public $order = self::ORDER_ASC; + + /** + * @return string + */ + public function getSeachString() + { + return $this->seachString; + } + + /** + * @param string $seachString + */ + public function setSeachString($seachString) + { + $this->seachString = Filter::safeSearchString($seachString); + } + + /** + * @return int + */ + public function getLimitStart() + { + return $this->limitStart; + } + + /** + * @param int $limitStart + */ + public function setLimitStart($limitStart) + { + $this->limitStart = (int)$limitStart; + } + + /** + * @return int + */ + public function getLimitCount() + { + return $this->limitCount; + } + + /** + * @param int $limitCount + */ + public function setLimitCount($limitCount) + { + $this->limitCount = (int)$limitCount; + } + + /** + * @return string + */ + public function getOrder() + { + return $this->order; + } + + /** + * @param string $order + */ + public function setOrder($order) + { + $this->order = $order; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/PluginData.class.php b/inc/SP/DataModel/PluginData.class.php index a82cff6f..ee76d13e 100644 --- a/inc/SP/DataModel/PluginData.class.php +++ b/inc/SP/DataModel/PluginData.class.php @@ -1,130 +1,134 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class PluginData - * - * @package SP\DataModel - */ -class PluginData extends DataModelBase implements DataModelInterface -{ - /** - * @var int - */ - public $plugin_id; - /** - * @var string - */ - public $plugin_name; - /** - * @var string - */ - public $plugin_data; - /** - * @var int - */ - public $plugin_enabled = 0; - - /** - * @return int - */ - public function getId() - { - return (int)$this->plugin_id; - } - - /** - * @return string - */ - public function getName() - { - return $this->plugin_name; - } - - /** - * @return int - */ - public function getPluginId() - { - return (int)$this->plugin_id; - } - - /** - * @param int $plugin_id - */ - public function setPluginId($plugin_id) - { - $this->plugin_id = (int)$plugin_id; - } - - /** - * @return string - */ - public function getPluginName() - { - return $this->plugin_name; - } - - /** - * @param string $plugin_name - */ - public function setPluginName($plugin_name) - { - $this->plugin_name = $plugin_name; - } - - /** - * @return string - */ - public function getPluginData() - { - return $this->plugin_data; - } - - /** - * @param string $plugin_data - */ - public function setPluginData($plugin_data) - { - $this->plugin_data = $plugin_data; - } - - /** - * @return int - */ - public function getPluginEnabled() - { - return (int)$this->plugin_enabled; - } - - /** - * @param int $plugin_enabled - */ - public function setPluginEnabled($plugin_enabled) - { - $this->plugin_enabled = (int)$plugin_enabled; - } +. + */ + +namespace SP\DataModel; + +/** + * Class PluginData + * + * @package SP\DataModel + */ +class PluginData extends DataModelBase implements DataModelInterface +{ + /** + * @var int + */ + public $id; + /** + * @var string + */ + public $name; + /** + * @var string + */ + public $data; + /** + * @var int + */ + public $enabled = 0; + /** + * @var int + */ + public $available = 1; + + /** + * @return int + */ + public function getId() + { + return (int)$this->id; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = (int)$id; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * @param string $data + */ + public function setData($data) + { + $this->data = $data; + } + + /** + * @return int + */ + public function getEnabled() + { + return (int)$this->enabled; + } + + /** + * @param int $enabled + */ + public function setEnabled($enabled) + { + $this->enabled = (int)$enabled; + } + + /** + * @return int + */ + public function getAvailable() + { + return (int)$this->available; + } + + /** + * @param int $available + */ + public function setAvailable($available) + { + $this->available = (int)$available; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/ProfileBaseData.class.php b/inc/SP/DataModel/ProfileBaseData.class.php index bca857e7..38dc5b04 100644 --- a/inc/SP/DataModel/ProfileBaseData.class.php +++ b/inc/SP/DataModel/ProfileBaseData.class.php @@ -1,112 +1,96 @@ -. - */ - -namespace SP\DataModel; - -defined('APP_ROOT') || die(); - -/** - * Class ProfileBaseData - * - * @package SP\DataModel - */ -class ProfileBaseData extends DataModelBase implements DataModelInterface -{ - /** - * @var int - */ - public $userprofile_id = 0; - /** - * @var string - */ - public $userprofile_name = ''; - /** - * @var ProfileData - */ - public $userprofile_profile; - - /** - * @return string - */ - public function getUserprofileName() - { - return $this->userprofile_name; - } - - /** - * @param string $userprofile_name - */ - public function setUserprofileName($userprofile_name) - { - $this->userprofile_name = $userprofile_name; - } - - /** - * @return int - */ - public function getUserprofileId() - { - return $this->userprofile_id; - } - - /** - * @param int $userprofile_id - */ - public function setUserprofileId($userprofile_id) - { - $this->userprofile_id = $userprofile_id; - } - - /** - * @return ProfileData - */ - public function getUserprofileProfile() - { - return $this->userprofile_profile; - } - - /** - * @param ProfileData $userprofile_profile - */ - public function setUserprofileProfile($userprofile_profile) - { - $this->userprofile_profile = $userprofile_profile; - } - - /** - * @return int - */ - public function getId() - { - return $this->userprofile_id; - } - - /** - * @return string - */ - public function getName() - { - return $this->userprofile_name; - } +. + */ + +namespace SP\DataModel; + +defined('APP_ROOT') || die(); + +/** + * Class ProfileBaseData + * + * @package SP\DataModel + */ +class UserProfileData extends DataModelBase implements DataModelInterface +{ + /** + * @var int + */ + public $id = 0; + /** + * @var string + */ + public $name = ''; + /** + * @var ProfileData + */ + public $profile; + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * @return int + */ + public function getId() + { + return (int)$this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = (int)$id; + } + + /** + * @return ProfileData + */ + public function getProfile() + { + return $this->profile; + } + + /** + * @param ProfileData $profile + */ + public function setProfile(ProfileData $profile) + { + $this->profile = $profile; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/ProfileData.class.php b/inc/SP/DataModel/ProfileData.class.php index 774ac5e3..2260e3c0 100644 --- a/inc/SP/DataModel/ProfileData.class.php +++ b/inc/SP/DataModel/ProfileData.class.php @@ -1,636 +1,788 @@ -. - */ - -namespace SP\DataModel; - -defined('APP_ROOT') || die(); - -/** - * Class ProfileData - * - * @package SP\DataModel - */ -class ProfileData extends ProfileBaseData -{ - /** - * @var bool - */ - protected $accView = false; - /** - * @var bool - */ - protected $accViewPass = false; - /** - * @var bool - */ - protected $accViewHistory = false; - /** - * @var bool - */ - protected $accEdit = false; - /** - * @var bool - */ - protected $accEditPass = false; - /** - * @var bool - */ - protected $accAdd = false; - /** - * @var bool - */ - protected $accDelete = false; - /** - * @var bool - */ - protected $accFiles = false; - /** - * @var bool - */ - protected $accPrivate = false; - /** - * @var bool - */ - protected $accPrivateGroup = false; - /** - * @var bool - */ - protected $accPermission = false; - /** - * @var bool - */ - protected $accPublicLinks = false; - /** - * @var bool - */ - protected $accGlobalSearch = false; - /** - * @var bool - */ - protected $configGeneral = false; - /** - * @var bool - */ - protected $configEncryption = false; - /** - * @var bool - */ - protected $configBackup = false; - /** - * @var bool - */ - protected $configImport = false; - /** - * @var bool - */ - protected $mgmUsers = false; - /** - * @var bool - */ - protected $mgmGroups = false; - /** - * @var bool - */ - protected $mgmProfiles = false; - /** - * @var bool - */ - protected $mgmCategories = false; - /** - * @var bool - */ - protected $mgmCustomers = false; - /** - * @var bool - */ - protected $mgmApiTokens = false; - /** - * @var bool - */ - protected $mgmPublicLinks = false; - /** - * @var bool - */ - protected $mgmAccounts = false; - /** - * @var bool - */ - protected $mgmTags = false; - /** - * @var bool - */ - protected $mgmFiles = false; - /** - * @var bool - */ - protected $evl = false; - /** - * @var bool - */ - protected $mgmCustomFields = false; - - /** - * @return boolean - */ - public function isAccView() - { - return $this->accView; - } - - /** - * @param boolean $accView - */ - public function setAccView($accView) - { - $this->accView = $accView; - } - - /** - * @return boolean - */ - public function isAccViewPass() - { - return $this->accViewPass; - } - - /** - * @param boolean $accViewPass - */ - public function setAccViewPass($accViewPass) - { - $this->accViewPass = $accViewPass; - } - - /** - * @return boolean - */ - public function isAccViewHistory() - { - return $this->accViewHistory; - } - - /** - * @param boolean $accViewHistory - */ - public function setAccViewHistory($accViewHistory) - { - $this->accViewHistory = $accViewHistory; - } - - /** - * @return boolean - */ - public function isAccEdit() - { - return $this->accEdit; - } - - /** - * @param boolean $accEdit - */ - public function setAccEdit($accEdit) - { - $this->accEdit = $accEdit; - } - - /** - * @return boolean - */ - public function isAccEditPass() - { - return $this->accEditPass; - } - - /** - * @param boolean $accEditPass - */ - public function setAccEditPass($accEditPass) - { - $this->accEditPass = $accEditPass; - } - - /** - * @return boolean - */ - public function isAccAdd() - { - return $this->accAdd; - } - - /** - * @param boolean $accAdd - */ - public function setAccAdd($accAdd) - { - $this->accAdd = $accAdd; - } - - /** - * @return boolean - */ - public function isAccDelete() - { - return $this->accDelete; - } - - /** - * @param boolean $accDelete - */ - public function setAccDelete($accDelete) - { - $this->accDelete = $accDelete; - } - - /** - * @return boolean - */ - public function isAccFiles() - { - return $this->accFiles; - } - - /** - * @param boolean $accFiles - */ - public function setAccFiles($accFiles) - { - $this->accFiles = $accFiles; - } - - /** - * @return boolean - */ - public function isAccPublicLinks() - { - return $this->accPublicLinks; - } - - /** - * @param boolean $accPublicLinks - */ - public function setAccPublicLinks($accPublicLinks) - { - $this->accPublicLinks = $accPublicLinks; - } - - /** - * @return boolean - */ - public function isConfigGeneral() - { - return $this->configGeneral; - } - - /** - * @param boolean $configGeneral - */ - public function setConfigGeneral($configGeneral) - { - $this->configGeneral = $configGeneral; - } - - /** - * @return boolean - */ - public function isConfigEncryption() - { - return $this->configEncryption; - } - - /** - * @param boolean $configEncryption - */ - public function setConfigEncryption($configEncryption) - { - $this->configEncryption = $configEncryption; - } - - /** - * @return boolean - */ - public function isConfigBackup() - { - return $this->configBackup; - } - - /** - * @param boolean $configBackup - */ - public function setConfigBackup($configBackup) - { - $this->configBackup = $configBackup; - } - - /** - * @return boolean - */ - public function isConfigImport() - { - return $this->configImport; - } - - /** - * @param boolean $configImport - */ - public function setConfigImport($configImport) - { - $this->configImport = $configImport; - } - - /** - * @return boolean - */ - public function isMgmUsers() - { - return $this->mgmUsers; - } - - /** - * @param boolean $mgmUsers - */ - public function setMgmUsers($mgmUsers) - { - $this->mgmUsers = $mgmUsers; - } - - /** - * @return boolean - */ - public function isMgmGroups() - { - return $this->mgmGroups; - } - - /** - * @param boolean $mgmGroups - */ - public function setMgmGroups($mgmGroups) - { - $this->mgmGroups = $mgmGroups; - } - - /** - * @return boolean - */ - public function isMgmProfiles() - { - return $this->mgmProfiles; - } - - /** - * @param boolean $mgmProfiles - */ - public function setMgmProfiles($mgmProfiles) - { - $this->mgmProfiles = $mgmProfiles; - } - - /** - * @return boolean - */ - public function isMgmCategories() - { - return $this->mgmCategories; - } - - /** - * @param boolean $mgmCategories - */ - public function setMgmCategories($mgmCategories) - { - $this->mgmCategories = $mgmCategories; - } - - /** - * @return boolean - */ - public function isMgmCustomers() - { - return $this->mgmCustomers; - } - - /** - * @param boolean $mgmCustomers - */ - public function setMgmCustomers($mgmCustomers) - { - $this->mgmCustomers = $mgmCustomers; - } - - /** - * @return boolean - */ - public function isMgmApiTokens() - { - return $this->mgmApiTokens; - } - - /** - * @param boolean $mgmApiTokens - */ - public function setMgmApiTokens($mgmApiTokens) - { - $this->mgmApiTokens = $mgmApiTokens; - } - - /** - * @return boolean - */ - public function isMgmPublicLinks() - { - return $this->mgmPublicLinks; - } - - /** - * @param boolean $mgmPublicLinks - */ - public function setMgmPublicLinks($mgmPublicLinks) - { - $this->mgmPublicLinks = $mgmPublicLinks; - } - - /** - * @return boolean - */ - public function isEvl() - { - return $this->evl; - } - - /** - * @param boolean $evl - */ - public function setEvl($evl) - { - $this->evl = $evl; - } - - /** - * @return boolean - */ - public function isMgmCustomFields() - { - return $this->mgmCustomFields; - } - - /** - * @param boolean $mgmCustomFields - */ - public function setMgmCustomFields($mgmCustomFields) - { - $this->mgmCustomFields = $mgmCustomFields; - } - - /** - * unserialize() checks for the presence of a function with the magic name __wakeup. - * If present, this function can reconstruct any resources that the object may have. - * The intended use of __wakeup is to reestablish any database connections that may have been lost during - * serialization and perform other reinitialization tasks. - * - * @return void - * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep - */ - public function __wakeup() - { - // Para realizar la conversión de nombre de propiedades que empiezan por _ - foreach (get_object_vars($this) as $name => $value) { - if ($name[0] === '_') { - $newName = substr($name, 1); - $this->$newName = $value; - } - } - } - - /** - * @return boolean - */ - public function isAccPrivate() - { - return $this->accPrivate; - } - - /** - * @param boolean $accPrivate - */ - public function setAccPrivate($accPrivate) - { - $this->accPrivate = $accPrivate; - } - - /** - * @return boolean - */ - public function isAccPermission() - { - return $this->accPermission; - } - - /** - * @param boolean $accPermission - */ - public function setAccPermission($accPermission) - { - $this->accPermission = $accPermission; - } - - /** - * @return boolean - */ - public function isMgmAccounts() - { - return $this->mgmAccounts; - } - - /** - * @param boolean $mgmAccounts - */ - public function setMgmAccounts($mgmAccounts) - { - $this->mgmAccounts = $mgmAccounts; - } - - /** - * @return boolean - */ - public function isMgmTags() - { - return $this->mgmTags; - } - - /** - * @param boolean $mgmTags - */ - public function setMgmTags($mgmTags) - { - $this->mgmTags = $mgmTags; - } - - /** - * @return boolean - */ - public function isMgmFiles() - { - return $this->mgmFiles; - } - - /** - * @param boolean $mgmFiles - */ - public function setMgmFiles($mgmFiles) - { - $this->mgmFiles = $mgmFiles; - } - - /** - * @return boolean - */ - public function isAccGlobalSearch() - { - return $this->accGlobalSearch; - } - - /** - * @param boolean $accGlobalSearch - */ - public function setAccGlobalSearch($accGlobalSearch) - { - $this->accGlobalSearch = $accGlobalSearch; - } - - /** - * @return bool - */ - public function isAccPrivateGroup() - { - return $this->accPrivateGroup; - } - - /** - * @param bool $accPrivateGroup - */ - public function setAccPrivateGroup($accPrivateGroup) - { - $this->accPrivateGroup = $accPrivateGroup; - } +. + */ + +namespace SP\DataModel; + +defined('APP_ROOT') || die(); + +/** + * Class ProfileData + * + * @package SP\DataModel + */ +class ProfileData +{ + /** + * @var bool + */ + protected $accView = false; + /** + * @var bool + */ + protected $accViewPass = false; + /** + * @var bool + */ + protected $accViewHistory = false; + /** + * @var bool + */ + protected $accEdit = false; + /** + * @var bool + */ + protected $accEditPass = false; + /** + * @var bool + */ + protected $accAdd = false; + /** + * @var bool + */ + protected $accDelete = false; + /** + * @var bool + */ + protected $accFiles = false; + /** + * @var bool + */ + protected $accPrivate = false; + /** + * @var bool + */ + protected $accPrivateGroup = false; + /** + * @var bool + */ + protected $accPermission = false; + /** + * @var bool + */ + protected $accPublicLinks = false; + /** + * @var bool + */ + protected $accGlobalSearch = false; + /** + * @var bool + */ + protected $configGeneral = false; + /** + * @var bool + */ + protected $configEncryption = false; + /** + * @var bool + */ + protected $configBackup = false; + /** + * @var bool + */ + protected $configImport = false; + /** + * @var bool + */ + protected $mgmUsers = false; + /** + * @var bool + */ + protected $mgmGroups = false; + /** + * @var bool + */ + protected $mgmProfiles = false; + /** + * @var bool + */ + protected $mgmCategories = false; + /** + * @var bool + */ + protected $mgmCustomers = false; + /** + * @var bool + */ + protected $mgmApiTokens = false; + /** + * @var bool + */ + protected $mgmPublicLinks = false; + /** + * @var bool + */ + protected $mgmAccounts = false; + /** + * @var bool + */ + protected $mgmTags = false; + /** + * @var bool + */ + protected $mgmFiles = false; + /** + * @var bool + */ + protected $mgmItemsPreset = false; + /** + * @var bool + */ + protected $evl = false; + /** + * @var bool + */ + protected $mgmCustomFields = false; + + /** + * @return boolean + */ + public function isAccView() + { + return $this->accView; + } + + /** + * @param boolean $accView + * + * @return ProfileData + */ + public function setAccView($accView) + { + $this->accView = $accView; + + return $this; + } + + /** + * @return boolean + */ + public function isAccViewPass() + { + return $this->accViewPass; + } + + /** + * @param boolean $accViewPass + * + * @return ProfileData + */ + public function setAccViewPass($accViewPass) + { + $this->accViewPass = $accViewPass; + + return $this; + } + + /** + * @return boolean + */ + public function isAccViewHistory() + { + return $this->accViewHistory; + } + + /** + * @param boolean $accViewHistory + * + * @return ProfileData + */ + public function setAccViewHistory($accViewHistory) + { + $this->accViewHistory = $accViewHistory; + + return $this; + } + + /** + * @return boolean + */ + public function isAccEdit() + { + return $this->accEdit; + } + + /** + * @param boolean $accEdit + * + * @return ProfileData + */ + public function setAccEdit($accEdit) + { + $this->accEdit = $accEdit; + + return $this; + } + + /** + * @return boolean + */ + public function isAccEditPass() + { + return $this->accEditPass; + } + + /** + * @param boolean $accEditPass + * + * @return ProfileData + */ + public function setAccEditPass($accEditPass) + { + $this->accEditPass = $accEditPass; + + return $this; + } + + /** + * @return boolean + */ + public function isAccAdd() + { + return $this->accAdd; + } + + /** + * @param boolean $accAdd + * + * @return ProfileData + */ + public function setAccAdd($accAdd) + { + $this->accAdd = $accAdd; + + return $this; + } + + /** + * @return boolean + */ + public function isAccDelete() + { + return $this->accDelete; + } + + /** + * @param boolean $accDelete + * + * @return ProfileData + */ + public function setAccDelete($accDelete) + { + $this->accDelete = $accDelete; + + return $this; + } + + /** + * @return boolean + */ + public function isAccFiles() + { + return $this->accFiles; + } + + /** + * @param boolean $accFiles + * + * @return ProfileData + */ + public function setAccFiles($accFiles) + { + $this->accFiles = $accFiles; + + return $this; + } + + /** + * @return boolean + */ + public function isAccPublicLinks() + { + return $this->accPublicLinks; + } + + /** + * @param boolean $accPublicLinks + * + * @return ProfileData + */ + public function setAccPublicLinks($accPublicLinks) + { + $this->accPublicLinks = $accPublicLinks; + + return $this; + } + + /** + * @return boolean + */ + public function isConfigGeneral() + { + return $this->configGeneral; + } + + /** + * @param boolean $configGeneral + * + * @return ProfileData + */ + public function setConfigGeneral($configGeneral) + { + $this->configGeneral = $configGeneral; + + return $this; + } + + /** + * @return boolean + */ + public function isConfigEncryption() + { + return $this->configEncryption; + } + + /** + * @param boolean $configEncryption + * + * @return ProfileData + */ + public function setConfigEncryption($configEncryption) + { + $this->configEncryption = $configEncryption; + + return $this; + } + + /** + * @return boolean + */ + public function isConfigBackup() + { + return $this->configBackup; + } + + /** + * @param boolean $configBackup + * + * @return ProfileData + */ + public function setConfigBackup($configBackup) + { + $this->configBackup = $configBackup; + + return $this; + } + + /** + * @return boolean + */ + public function isConfigImport() + { + return $this->configImport; + } + + /** + * @param boolean $configImport + * + * @return ProfileData + */ + public function setConfigImport($configImport) + { + $this->configImport = $configImport; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmUsers() + { + return $this->mgmUsers; + } + + /** + * @param boolean $mgmUsers + * + * @return ProfileData + */ + public function setMgmUsers($mgmUsers) + { + $this->mgmUsers = $mgmUsers; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmGroups() + { + return $this->mgmGroups; + } + + /** + * @param boolean $mgmGroups + * + * @return ProfileData + */ + public function setMgmGroups($mgmGroups) + { + $this->mgmGroups = $mgmGroups; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmProfiles() + { + return $this->mgmProfiles; + } + + /** + * @param boolean $mgmProfiles + * + * @return ProfileData + */ + public function setMgmProfiles($mgmProfiles) + { + $this->mgmProfiles = $mgmProfiles; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmCategories() + { + return $this->mgmCategories; + } + + /** + * @param boolean $mgmCategories + * + * @return ProfileData + */ + public function setMgmCategories($mgmCategories) + { + $this->mgmCategories = $mgmCategories; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmCustomers() + { + return $this->mgmCustomers; + } + + /** + * @param boolean $mgmCustomers + * + * @return ProfileData + */ + public function setMgmCustomers($mgmCustomers) + { + $this->mgmCustomers = $mgmCustomers; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmApiTokens() + { + return $this->mgmApiTokens; + } + + /** + * @param boolean $mgmApiTokens + * + * @return ProfileData + */ + public function setMgmApiTokens($mgmApiTokens) + { + $this->mgmApiTokens = $mgmApiTokens; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmPublicLinks() + { + return $this->mgmPublicLinks; + } + + /** + * @param boolean $mgmPublicLinks + * + * @return ProfileData + */ + public function setMgmPublicLinks($mgmPublicLinks) + { + $this->mgmPublicLinks = $mgmPublicLinks; + + return $this; + } + + /** + * @return boolean + */ + public function isEvl() + { + return $this->evl; + } + + /** + * @param boolean $evl + * + * @return ProfileData + */ + public function setEvl($evl) + { + $this->evl = $evl; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmCustomFields() + { + return $this->mgmCustomFields; + } + + /** + * @param boolean $mgmCustomFields + * + * @return ProfileData + */ + public function setMgmCustomFields($mgmCustomFields) + { + $this->mgmCustomFields = $mgmCustomFields; + + return $this; + } + + /** + * unserialize() checks for the presence of a function with the magic name __wakeup. + * If present, this function can reconstruct any resources that the object may have. + * The intended use of __wakeup is to reestablish any database connections that may have been lost during + * serialization and perform other reinitialization tasks. + * + * @return void + * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep + */ + public function __wakeup() + { + // Para realizar la conversión de nombre de propiedades que empiezan por _ + foreach (get_object_vars($this) as $name => $value) { + if ($name[0] === '_') { + $newName = substr($name, 1); + $this->$newName = $value; + } + } + } + + /** + * @return boolean + */ + public function isAccPrivate() + { + return $this->accPrivate; + } + + /** + * @param boolean $accPrivate + * + * @return ProfileData + */ + public function setAccPrivate($accPrivate) + { + $this->accPrivate = $accPrivate; + + return $this; + } + + /** + * @return boolean + */ + public function isAccPermission() + { + return $this->accPermission; + } + + /** + * @param boolean $accPermission + * + * @return ProfileData + */ + public function setAccPermission($accPermission) + { + $this->accPermission = $accPermission; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmAccounts() + { + return $this->mgmAccounts; + } + + /** + * @param boolean $mgmAccounts + * + * @return ProfileData + */ + public function setMgmAccounts($mgmAccounts) + { + $this->mgmAccounts = $mgmAccounts; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmTags() + { + return $this->mgmTags; + } + + /** + * @param boolean $mgmTags + * + * @return ProfileData + */ + public function setMgmTags($mgmTags) + { + $this->mgmTags = $mgmTags; + + return $this; + } + + /** + * @return boolean + */ + public function isMgmFiles() + { + return $this->mgmFiles; + } + + /** + * @param boolean $mgmFiles + * + * @return ProfileData + */ + public function setMgmFiles($mgmFiles) + { + $this->mgmFiles = $mgmFiles; + + return $this; + } + + /** + * @return boolean + */ + public function isAccGlobalSearch() + { + return $this->accGlobalSearch; + } + + /** + * @param boolean $accGlobalSearch + * + * @return ProfileData + */ + public function setAccGlobalSearch($accGlobalSearch) + { + $this->accGlobalSearch = $accGlobalSearch; + + return $this; + } + + /** + * @return bool + */ + public function isAccPrivateGroup() + { + return $this->accPrivateGroup; + } + + /** + * @param bool $accPrivateGroup + * + * @return ProfileData + */ + public function setAccPrivateGroup($accPrivateGroup) + { + $this->accPrivateGroup = $accPrivateGroup; + + return $this; + } + + /** + * @return $this + */ + public function reset() + { + foreach ($this as $property => $value) { + $this->{$property} = false; + } + + return $this; + } + + /** + * @return bool + */ + public function isMgmItemsPreset(): bool + { + return $this->mgmItemsPreset; + } + + /** + * @param bool $mgmItemsPreset + * + * @return ProfileData + */ + public function setMgmItemsPreset(bool $mgmItemsPreset) + { + $this->mgmItemsPreset = $mgmItemsPreset; + + return $this; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/UserLoginData.class.php b/inc/SP/DataModel/UserLoginData.class.php index 1221ac33..83a57324 100644 --- a/inc/SP/DataModel/UserLoginData.class.php +++ b/inc/SP/DataModel/UserLoginData.class.php @@ -1,74 +1,82 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class UserLoginData - * - * @package SP\DataModel - */ -class UserLoginData extends UserData -{ - /** - * @var string - */ - protected $login; - /** - * @var string - */ - protected $loginPass; - - /** - * @return string - */ - public function getLogin() - { - return $this->login; - } - - /** - * @param string $login - */ - public function setLogin($login) - { - $this->login = $login; - } - - /** - * @return string - */ - public function getLoginPass() - { - return $this->loginPass; - } - - /** - * @param string $loginPass - */ - public function setLoginPass($loginPass) - { - $this->loginPass = $loginPass; - } +. + */ + +namespace SP\DataModel; + +/** + * Class ActionData + * + * @package SP\DataModel + */ +class ActionData implements DataModelInterface +{ + /** + * @var int + */ + public $id; + /** + * @var string + */ + public $name; + /** + * @var string + */ + public $text; + /** + * @var string + */ + public $route; + + /** + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * @return string + */ + public function getRoute() + { + return $this->route; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/UserPassData.class.php b/inc/SP/DataModel/UserPassData.class.php index f7cdf5d2..cf8c2f9c 100644 --- a/inc/SP/DataModel/UserPassData.class.php +++ b/inc/SP/DataModel/UserPassData.class.php @@ -1,154 +1,154 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class UserPassData - * - * @package SP\DataModel - */ -class UserPassData extends DataModelBase -{ - /** - * @var int - */ - public $user_id = 0; - /** - * @var string - */ - public $user_pass = ''; - /** - * @var string - */ - public $user_hashSalt = ''; - /** - * @var string - */ - public $user_mPass = ''; - /** - * @var string - */ - public $user_mKey = ''; - /** - * @var int - */ - public $user_lastUpdateMPass = 0; - - /** - * @return string - */ - public function getUserPass() - { - return $this->user_pass; - } - - /** - * @param string $user_pass - */ - public function setUserPass($user_pass) - { - $this->user_pass = $user_pass; - } - - /** - * @return string - */ - public function getUserHashSalt() - { - return $this->user_hashSalt; - } - - /** - * @param string $user_hashSalt - */ - public function setUserHashSalt($user_hashSalt) - { - $this->user_hashSalt = $user_hashSalt; - } - - /** - * @return string - */ - public function getUserMPass() - { - return $this->user_mPass; - } - - /** - * @param string $user_mPass - */ - public function setUserMPass($user_mPass) - { - $this->user_mPass = $user_mPass; - } - - /** - * @return string - */ - public function getUserMKey() - { - return $this->user_mKey; - } - - /** - * @param string $user_mKey - */ - public function setUserMKey($user_mKey) - { - $this->user_mKey = $user_mKey; - } - - /** - * @return int - */ - public function getUserLastUpdateMPass() - { - return (int)$this->user_lastUpdateMPass; - } - - /** - * @param int $user_lastUpdateMPass - */ - public function setUserLastUpdateMPass($user_lastUpdateMPass) - { - $this->user_lastUpdateMPass = (int)$user_lastUpdateMPass; - } - - /** - * @return int - */ - public function getUserId() - { - return (int)$this->user_id; - } - - /** - * @param int $user_id - */ - public function setUserId($user_id) - { - $this->user_id = (int)$user_id; - } +. + */ + +namespace SP\DataModel; + +/** + * Class UserPassData + * + * @package SP\DataModel + */ +class UserPassData extends DataModelBase +{ + /** + * @var int + */ + public $id = 0; + /** + * @var string + */ + public $pass; + /** + * @var string + */ + public $hashSalt; + /** + * @var string + */ + public $mPass; + /** + * @var string + */ + public $mKey; + /** + * @var int + */ + public $lastUpdateMPass = 0; + + /** + * @return string + */ + public function getPass() + { + return $this->pass; + } + + /** + * @param string $pass + */ + public function setPass($pass) + { + $this->pass = $pass; + } + + /** + * @return string + */ + public function getHashSalt() + { + return $this->hashSalt; + } + + /** + * @param string $hashSalt + */ + public function setHashSalt($hashSalt) + { + $this->hashSalt = $hashSalt; + } + + /** + * @return string + */ + public function getMPass() + { + return $this->mPass; + } + + /** + * @param string $mPass + */ + public function setMPass($mPass) + { + $this->mPass = $mPass; + } + + /** + * @return string + */ + public function getMKey() + { + return $this->mKey; + } + + /** + * @param string $mKey + */ + public function setMKey($mKey) + { + $this->mKey = $mKey; + } + + /** + * @return int + */ + public function getLastUpdateMPass() + { + return (int)$this->lastUpdateMPass; + } + + /** + * @param int $lastUpdateMPass + */ + public function setLastUpdateMPass($lastUpdateMPass) + { + $this->lastUpdateMPass = (int)$lastUpdateMPass; + } + + /** + * @return int + */ + public function getId() + { + return (int)$this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = (int)$id; + } } \ No newline at end of file diff --git a/inc/SP/DataModel/UserPassRecoverData.class.php b/inc/SP/DataModel/UserPassRecoverData.class.php index 772737c2..f359c68e 100644 --- a/inc/SP/DataModel/UserPassRecoverData.class.php +++ b/inc/SP/DataModel/UserPassRecoverData.class.php @@ -1,115 +1,115 @@ -. - */ - -namespace SP\DataModel; - -/** - * Class UserPassRecoverData - * - * @package SP\DataModel - */ -class UserPassRecoverData extends DataModelBase -{ - /** - * @var int - */ - public $userpassr_userId = 0; - /** - * @var string - */ - public $userpassr_hash = ''; - /** - * @var int - */ - public $userpassr_date = 0; - /** - * @var bool - */ - public $userpassr_used = 0; - - /** - * @return int - */ - public function getUserpassrUserId() - { - return (int)$this->userpassr_userId; - } - - /** - * @param int $userpassr_userId - */ - public function setUserpassrUserId($userpassr_userId) - { - $this->userpassr_userId = (int)$userpassr_userId; - } - - /** - * @return string - */ - public function getUserpassrHash() - { - return $this->userpassr_hash; - } - - /** - * @param string $userpassr_hash - */ - public function setUserpassrHash($userpassr_hash) - { - $this->userpassr_hash = $userpassr_hash; - } - - /** - * @return int - */ - public function getUserpassrDate() - { - return $this->userpassr_date; - } - - /** - * @param int $userpassr_date - */ - public function setUserpassrDate($userpassr_date) - { - $this->userpassr_date = $userpassr_date; - } - - /** - * @return boolean - */ - public function isUserpassrUsed() - { - return (int)$this->userpassr_used; - } - - /** - * @param boolean $userpassr_used - */ - public function setUserpassrUsed($userpassr_used) - { - $this->userpassr_used = (int)$userpassr_used; - } - +. + */ + +namespace SP\DataModel; + +/** + * Class UserPassRecoverData + * + * @package SP\DataModel + */ +class UserPassRecoverData extends DataModelBase +{ + /** + * @var int + */ + public $userId = 0; + /** + * @var string + */ + public $hash = ''; + /** + * @var int + */ + public $date = 0; + /** + * @var bool + */ + public $used = 0; + + /** + * @return int + */ + public function getUserId() + { + return (int)$this->userId; + } + + /** + * @param int $userId + */ + public function setUserId($userId) + { + $this->userId = (int)$userId; + } + + /** + * @return string + */ + public function getHash() + { + return $this->hash; + } + + /** + * @param string $hash + */ + public function setHash($hash) + { + $this->hash = $hash; + } + + /** + * @return int + */ + public function getDate() + { + return $this->date; + } + + /** + * @param int $date + */ + public function setDate($date) + { + $this->date = $date; + } + + /** + * @return boolean + */ + public function isUsed() + { + return (int)$this->used; + } + + /** + * @param boolean $used + */ + public function setUsed($used) + { + $this->used = (int)$used; + } + } \ No newline at end of file diff --git a/inc/SP/Forms/PublicLinkForm.class.php b/inc/SP/Forms/PublicLinkForm.class.php index d2d68c0f..983388f9 100644 --- a/inc/SP/Forms/PublicLinkForm.class.php +++ b/inc/SP/Forms/PublicLinkForm.class.php @@ -1,70 +1,74 @@ -. - */ - -namespace SP\Forms; - -use SP\DataModel\PublicLinkData; - -/** - * Class PublicLinkForm - * - * @package SP\Forms - */ -class PublicLinkForm implements FormInterface -{ - /** - * @var PublicLinkData - */ - protected $PublicLinkData; - - /** - * CustomerForm constructor. - * - * @param PublicLinkData $PublicLinkData - */ - public function __construct(PublicLinkData $PublicLinkData) - { - $this->PublicLinkData = $PublicLinkData; - } - - /** - * Validar el formulario - * - * @param $action - * @return bool - * @throws \SP\Core\Exceptions\ValidationException - */ - public function validate($action) - { - return true; - } - - /** - * @return mixed - */ - public function getItemData() - { - // TODO: Implement getItemData() method. - } +. + */ + +namespace SP\DataModel\ItemPreset; + +/** + * Class AccountPrivate + * + * @package SP\DataModel + */ +class AccountPrivate +{ + /** + * @var bool + */ + private $privateUser = false; + /** + * @var bool + */ + private $privateGroup = false; + + /** + * @return bool + */ + public function isPrivateUser(): bool + { + return $this->privateUser; + } + + /** + * @param bool $privateUser + */ + public function setPrivateUser(bool $privateUser) + { + $this->privateUser = $privateUser; + } + + /** + * @return bool + */ + public function isPrivateGroup(): bool + { + return $this->privateGroup; + } + + /** + * @param bool $privateGroup + */ + public function setPrivateGroup(bool $privateGroup) + { + $this->privateGroup = $privateGroup; + } } \ No newline at end of file diff --git a/inc/SP/Html/Assets/FontIcon.class.php b/inc/SP/Html/Assets/FontIcon.class.php index 8dcbb295..a61f4a59 100644 --- a/inc/SP/Html/Assets/FontIcon.class.php +++ b/inc/SP/Html/Assets/FontIcon.class.php @@ -1,57 +1,57 @@ -. - */ - -namespace SP\Html\Assets; - -defined('APP_ROOT') || die(); - -/** - * Class FontIcon para crear los iconos de la matriz - * - * @package SP\Html\Assets - */ -class FontIcon extends IconBase -{ - /** - * @param string $icon - * @param string $class - * @param string $title - */ - public function __construct($icon, $class = null, $title = null) - { - $this->setIcon($icon); - $this->setClass($class); - $this->setTitle($title); - } - - /** - * Devolver la clase del icono adaptada para un botón - * - * @return string - */ - public function getClassButton() - { - return preg_replace('/-text--/', '--', $this->getClass()); - } +. + */ + +namespace SP\Html\Assets; + +defined('APP_ROOT') || die(); + +/** + * Class FontIcon para crear los iconos de la matriz + * + * @package SP\Html\Assets + */ +final class FontIcon extends IconBase +{ + /** + * @param string $icon + * @param string $class + * @param string $title + */ + public function __construct($icon, $class = null, $title = null) + { + $this->setIcon($icon); + $this->setClass($class); + $this->setTitle($title); + } + + /** + * Devolver la clase del icono adaptada para un botón + * + * @return string + */ + public function getClassButton() + { + return str_replace('-text--', '--', $this->getClass()); + } } \ No newline at end of file diff --git a/inc/SP/Html/Assets/IconBase.class.php b/inc/SP/Html/Assets/IconBase.class.php index c5f42fa0..be411119 100644 --- a/inc/SP/Html/Assets/IconBase.class.php +++ b/inc/SP/Html/Assets/IconBase.class.php @@ -1,111 +1,114 @@ -. - */ - -namespace SP\Html\Assets; - -defined('APP_ROOT') || die(); - -/** - * Class DataGridIconBase para crear los iconos de la matriz - * - * @package SP\Html\DataGrid - */ -abstract class IconBase implements IconInterface -{ - /** - * El nombre del icono o imagen a utilizar - * - * @var string - */ - protected $_icon = ''; - - /** - * Título del icono - * - * @var string - */ - protected $_title = ''; - /** - * Clases CSS del icono - * - * @var array - */ - protected $_class = array(); - - /** - * @return string - */ - public function getTitle() - { - return $this->_title; - } - - /** - * @param $title - * @return $this - */ - public function setTitle($title) - { - $this->_title = $title; - - return $this; - } - - /** - * @param $class - * @return $this - */ - public function setClass($class) - { - $this->_class[] = $class; - - return $this; - } - - /** - * @return string - */ - public function getClass() - { - return implode(' ', $this->_class); - } - - /** - * @return string - */ - public function getIcon() - { - return $this->_icon; - } - - /** - * @param $icon - * @return $this - */ - public function setIcon($icon) - { - $this->_icon = $icon; - return $this; - } +. + */ + +namespace SP\Html\Assets; + +defined('APP_ROOT') || die(); + +/** + * Class DataGridIconBase para crear los iconos de la matriz + * + * @package SP\Html\DataGrid + */ +abstract class IconBase implements IconInterface +{ + /** + * El nombre del icono o imagen a utilizar + * + * @var string + */ + protected $icon = ''; + + /** + * Título del icono + * + * @var string + */ + protected $title = ''; + /** + * Clases CSS del icono + * + * @var array + */ + protected $class = []; + + /** + * @return string + */ + public function getTitle() + { + return __($this->title); + } + + /** + * @param $title + * + * @return $this + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * @return string + */ + public function getClass() + { + return implode(' ', $this->class); + } + + /** + * @param $class + * + * @return $this + */ + public function setClass($class) + { + $this->class[] = $class; + + return $this; + } + + /** + * @return string + */ + public function getIcon() + { + return $this->icon; + } + + /** + * @param $icon + * + * @return $this + */ + public function setIcon($icon) + { + $this->icon = $icon; + return $this; + } } \ No newline at end of file diff --git a/inc/SP/Html/Assets/IconInterface.class.php b/inc/SP/Html/Assets/IconInterface.class.php index 97b5808d..16530d8d 100644 --- a/inc/SP/Html/Assets/IconInterface.class.php +++ b/inc/SP/Html/Assets/IconInterface.class.php @@ -1,65 +1,65 @@ -. - */ - -namespace SP\Html\Assets; - -defined('APP_ROOT') || die(); - -/** - * Interface IconInterface - * - * @package SP\Html\Assets - */ -interface IconInterface -{ - /** - * @param $title - */ - public function setTitle($title); - - /** - * @return string - */ - public function getTitle(); - - /** - * @param $class - */ - public function setClass($class); - - /** - * @return string - */ - public function getClass(); - - /** - * @return string - */ - public function getIcon(); - - /** - * @param $icon - */ - public function setIcon($icon); +. + */ + +namespace SP\Html\Assets; + +defined('APP_ROOT') || die(); + +/** + * Interface IconInterface + * + * @package SP\Html\Assets + */ +interface IconInterface +{ + /** + * @param $title + */ + public function setTitle($title); + + /** + * @return string + */ + public function getTitle(); + + /** + * @param $class + */ + public function setClass($class); + + /** + * @return string + */ + public function getClass(); + + /** + * @return string + */ + public function getIcon(); + + /** + * @param $icon + */ + public function setIcon($icon); } \ No newline at end of file diff --git a/inc/SP/Html/Assets/ImageIcon.class.php b/inc/SP/Html/Assets/ImageIcon.class.php index d4afd36e..6ffc5f77 100644 --- a/inc/SP/Html/Assets/ImageIcon.class.php +++ b/inc/SP/Html/Assets/ImageIcon.class.php @@ -1,47 +1,47 @@ -. - */ - -namespace SP\Html\Assets; - -defined('APP_ROOT') || die(); - -/** - * Class ImageIcon para crear los iconos del tipo imagen - * - * @package SP\Html\Assets - */ -class ImageIcon extends IconBase -{ - /** - * @param string $icon - * @param string $class - * @param string $title - */ - public function __construct($icon, $class = null, $title = null) - { - $this->setIcon($icon); - $this->setClass($class); - $this->setTitle($title); - } +. + */ + +namespace SP\Html\Assets; + +defined('APP_ROOT') || die(); + +/** + * Class ImageIcon para crear los iconos del tipo imagen + * + * @package SP\Html\Assets + */ +final class ImageIcon extends IconBase +{ + /** + * @param string $icon + * @param string $class + * @param string $title + */ + public function __construct($icon, $class = null, $title = null) + { + $this->setIcon($icon); + $this->setClass($class); + $this->setTitle($title); + } } \ No newline at end of file diff --git a/inc/SP/Html/DataGrid/DataGridData.class.php b/inc/SP/Html/DataGrid/DataGridData.class.php index 3436e9f0..89baefb4 100644 --- a/inc/SP/Html/DataGrid/DataGridData.class.php +++ b/inc/SP/Html/DataGrid/DataGridData.class.php @@ -1,37 +1,37 @@ -. - */ - -namespace SP\Html\DataGrid; - -defined('APP_ROOT') || die(); - -/** - * Class DataGridData para establecer el origen de datos de la matriz - * - * @package SP\Html\DataGrid - */ -class DataGridData extends DataGridDataBase -{ - +. + */ + +namespace SP\Html\DataGrid; + +defined('APP_ROOT') || die(); + +/** + * Class DataGridData para establecer el origen de datos de la matriz + * + * @package SP\Html\DataGrid + */ +final class DataGridData extends DataGridDataBase +{ + } \ No newline at end of file diff --git a/inc/SP/Html/DataGrid/DataGridSortInterface.class.php b/inc/SP/Html/DataGrid/DataGridSortInterface.class.php index 850a073d..1767114c 100644 --- a/inc/SP/Html/DataGrid/DataGridSortInterface.class.php +++ b/inc/SP/Html/DataGrid/DataGridSortInterface.class.php @@ -1,98 +1,98 @@ -. - */ - -namespace SP\Html\DataGrid; - -use SP\Html\Assets\IconInterface; - -defined('APP_ROOT') || die(); - - -/** - * Interface DataGridSortInterface para la definicíon de campos de ordenación - * - * @package SP\Html\DataGrid - */ -interface DataGridSortInterface -{ - /** - * @return int - */ - public function getSortKey(); - - /** - * @param $key int - */ - public function setSortKey($key); - - /** - * @return string - */ - public function getTitle(); - - /** - * @param $title string - */ - public function setTitle($title); - - /** - * @return string - */ - public function getName(); - - /** - * @param $name string - */ - public function setName($name); - - /** - * @return string - */ - public function getClass(); - - /** - * @param $class string - */ - public function setClass($class); - - /** - * @return IconInterface - */ - public function getIconUp(); - - /** - * @param IconInterface $icon - */ - public function setIconUp(IconInterface $icon); - - /** - * @return IconInterface - */ - public function getIconDown(); - - /** - * @param IconInterface $icon - */ - public function setIconDown(IconInterface $icon); +. + */ + +namespace SP\Html\DataGrid; + +use SP\Html\Assets\IconInterface; + +defined('APP_ROOT') || die(); + + +/** + * Interface DataGridSortInterface para la definicíon de campos de ordenación + * + * @package SP\Html\DataGrid + */ +interface DataGridSortInterface +{ + /** + * @return int + */ + public function getSortKey(); + + /** + * @param $key int + */ + public function setSortKey($key); + + /** + * @return string + */ + public function getTitle(); + + /** + * @param $title string + */ + public function setTitle($title); + + /** + * @return string + */ + public function getName(); + + /** + * @param $name string + */ + public function setName($name); + + /** + * @return string + */ + public function getClass(); + + /** + * @param $class string + */ + public function setClass($class); + + /** + * @return IconInterface + */ + public function getIconUp(); + + /** + * @param IconInterface $icon + */ + public function setIconUp(IconInterface $icon); + + /** + * @return IconInterface + */ + public function getIconDown(); + + /** + * @param IconInterface $icon + */ + public function setIconDown(IconInterface $icon); } \ No newline at end of file diff --git a/inc/SP/Http/Cookies.class.php b/inc/SP/Http/Cookies.class.php index a67e9eb5..a9d2d989 100644 --- a/inc/SP/Http/Cookies.class.php +++ b/inc/SP/Http/Cookies.class.php @@ -1,43 +1,40 @@ -. - */ - -namespace SP\Http; - -/** - * Class Cookies - * - * @package SP\Http - */ -class Cookies -{ - /** - * Comprueba si las cookies están habilitadas - * - * @return bool - */ - public static function checkCookies() - { - return isset($_COOKIE[session_name()]); - } +. + */ + +namespace SP\Mvc\Controller\Validators; + +/** + * Interface ValidatorInterface + * + * @package SP\Mvc\Controller\Validators + */ +interface ValidatorInterface +{ + /** + * @param string $string + * + * @return bool + */ + public function validate(string $string): bool; } \ No newline at end of file diff --git a/inc/SP/Http/JsonResponse.class.php b/inc/SP/Http/JsonResponse.class.php index 2e55aa44..3c072fd9 100644 --- a/inc/SP/Http/JsonResponse.class.php +++ b/inc/SP/Http/JsonResponse.class.php @@ -1,265 +1,293 @@ -. - */ - -namespace SP\Http; - -/** - * Class Json para definir la estructura de una respuesta en formato JSON - * - * @package SP\Http - */ -class JsonResponse implements \JsonSerializable -{ - /** - * @var int - */ - protected $status = 1; - /** - * @var string - */ - protected $description = ''; - /** - * @var string - */ - protected $action = ''; - /** - * @var array - */ - protected $data = []; - /** - * @var array - */ - protected $messages = []; - /** - * @var string - */ - protected $container = ''; - /** - * @var string - */ - protected $csrf = ''; - - /** - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param int $status - * @return JsonResponse - */ - public function setStatus($status) - { - $this->status = (int)$status; - - return $this; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - * @return JsonResponse - */ - public function setDescription($description) - { - $this->description = __($description); - - return $this; - } - - /** - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * @param string $action - * @return JsonResponse - */ - public function setAction($action) - { - $this->action = $action; - - return $this; - } - - /** - * @return array - */ - public function getData() - { - return $this->data; - } - - /** - * @param array|\stdClass $data - * @return JsonResponse - */ - public function setData($data) - { - $this->data = $data; - - return $this; - } - - /** - * @return array - */ - public function getMessages() - { - return $this->messages; - } - - /** - * @param array $messages - * @return JsonResponse - */ - public function setMessages(array $messages) - { - $this->messages = $messages; - - return $this; - } - - /** - * @return string - */ - public function getContainer() - { - return $this->container; - } - - /** - * @param string $container - * @return JsonResponse - */ - public function setContainer($container) - { - $this->container = $container; - - return $this; - } - - /** - * @return string - */ - public function getCsrf() - { - return $this->csrf; - } - - /** - * @param string $csrf - * @return JsonResponse - */ - public function setCsrf($csrf) - { - $this->csrf = $csrf; - - return $this; - } - - /** - * @param $message - * @return JsonResponse - */ - public function addMessage($message) - { - $this->messages[] = __($message); - return $this; - } - - /** - * @param $param - * @return $this - */ - public function addParam($param) - { - if (is_numeric($param)) { - $param = (int)$param; - } - - $this->data[] = $param; - - return $this; - } - - /** - * Specify data which should be serialized to JSON - * @link http://php.net/manual/en/jsonserializable.jsonserialize.php - * @return mixed data which can be serialized by json_encode, - * which is a value of any type other than a resource. - * @since 5.4.0 - */ - public function jsonSerialize() - { - return $this->getJsonArray(); - } - - /** - * Devolver un array con las propiedades del objeto - * - * @return array - */ - public function getJsonArray() - { - $out = []; - - foreach ($this as $key => $value) { - $out[$key] = $value; - } - - return $out; - } - - /** - * Establecer los valores por defecto - * - * @return JsonResponse - */ - public function clear() - { - $this->status = 0; - $this->action = ''; - $this->data = []; - $this->messages = []; - $this->container = ''; - $this->csrf = ''; - - return $this; - } +. + */ + +namespace SP\Http; + +/** + * Class Json para definir la estructura de una respuesta en formato JSON + * + * @package SP\Http + */ +final class JsonResponse implements \JsonSerializable +{ + const JSON_SUCCESS = 0; + const JSON_SUCCESS_STICKY = 100; + const JSON_ERROR = 1; + const JSON_ERROR_STICKY = 101; + const JSON_WARNING = 2; + const JSON_WARNING_STICKY = 102; + const JSON_LOGOUT = 10; + + /** + * @var int + */ + protected $status = 1; + /** + * @var string + */ + protected $description = ''; + /** + * @var string + */ + protected $action = ''; + /** + * @var array + */ + protected $data = []; + /** + * @var array + */ + protected $messages = []; + /** + * @var string + */ + protected $container = ''; + /** + * @var string + */ + protected $csrf = ''; + + /** + * JsonResponse constructor. + * + * @param string $description + */ + public function __construct(string $description = null) + { + $this->description = $description; + } + + /** + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param int $status + * + * @return JsonResponse + */ + public function setStatus($status) + { + $this->status = (int)$status; + + return $this; + } + + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @param string $description + * + * @return JsonResponse + */ + public function setDescription($description) + { + $this->description = __($description); + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * @param string $action + * + * @return JsonResponse + */ + public function setAction($action) + { + $this->action = $action; + + return $this; + } + + /** + * @return array + */ + public function getData() + { + return $this->data; + } + + /** + * @param array|\stdClass $data + * + * @return JsonResponse + */ + public function setData($data) + { + $this->data = $data; + + return $this; + } + + /** + * @return array + */ + public function getMessages() + { + return $this->messages; + } + + /** + * @param array $messages + * + * @return JsonResponse + */ + public function setMessages(array $messages) + { + $this->messages = array_map('__', $messages); + + return $this; + } + + /** + * @return string + */ + public function getContainer() + { + return $this->container; + } + + /** + * @param string $container + * + * @return JsonResponse + */ + public function setContainer($container) + { + $this->container = $container; + + return $this; + } + + /** + * @return string + */ + public function getCsrf() + { + return $this->csrf; + } + + /** + * @param string $csrf + * + * @return JsonResponse + */ + public function setCsrf($csrf) + { + $this->csrf = $csrf; + + return $this; + } + + /** + * @param $message + * + * @return JsonResponse + */ + public function addMessage($message) + { + $this->messages[] = __($message); + return $this; + } + + /** + * @param $param + * + * @return $this + */ + public function addParam($param) + { + if (is_numeric($param)) { + $param = (int)$param; + } + + $this->data[] = $param; + + return $this; + } + + /** + * Specify data which should be serialized to JSON + * + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + * @return mixed data which can be serialized by json_encode, + * which is a value of any type other than a resource. + * @since 5.4.0 + */ + public function jsonSerialize() + { + return $this->getJsonArray(); + } + + /** + * Devolver un array con las propiedades del objeto + * + * @return array + */ + public function getJsonArray() + { + $out = []; + + foreach ($this as $key => $value) { + $out[$key] = $value; + } + + return $out; + } + + /** + * Establecer los valores por defecto + * + * @return JsonResponse + */ + public function clear() + { + $this->status = 0; + $this->action = ''; + $this->data = []; + $this->messages = []; + $this->container = ''; + $this->csrf = ''; + + return $this; + } } \ No newline at end of file diff --git a/inc/SP/Http/Message.class.php b/inc/SP/Http/Message.class.php index 022dcfc9..c66fa42f 100644 --- a/inc/SP/Http/Message.class.php +++ b/inc/SP/Http/Message.class.php @@ -1,98 +1,98 @@ -. - */ - -namespace SP\Http; - -/** - * Class Message - * - * @package SP\Http - */ -class Message -{ - const TYPE_OK = 0; - const TYPE_ERROR = 1; - const TYPE_WARNING = 2; - - /** - * @var int - */ - protected $type = 0; - /** - * @var string - */ - protected $description; - /** - * @var string - */ - protected $hint; - - /** - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * @param int $type - */ - public function setType($type) - { - $this->type = $type; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - */ - public function setDescription($description) - { - $this->description = $description; - } - - /** - * @return string - */ - public function getHint() - { - return $this->hint; - } - - /** - * @param string $hint - */ - public function setHint($hint) - { - $this->hint = $hint; - } +. + */ + +namespace SP\Http; + +/** + * Class Message + * + * @package SP\Http + */ +final class Message +{ + const TYPE_OK = 0; + const TYPE_ERROR = 1; + const TYPE_WARNING = 2; + + /** + * @var int + */ + protected $type = 0; + /** + * @var string + */ + protected $description; + /** + * @var string + */ + protected $hint; + + /** + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * @param int $type + */ + public function setType($type) + { + $this->type = $type; + } + + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * @return string + */ + public function getHint() + { + return $this->hint; + } + + /** + * @param string $hint + */ + public function setHint($hint) + { + $this->hint = $hint; + } } \ No newline at end of file diff --git a/inc/SP/Import/ImportInterface.class.php b/inc/SP/Import/ImportInterface.class.php index 25325ce2..8c227c61 100644 --- a/inc/SP/Import/ImportInterface.class.php +++ b/inc/SP/Import/ImportInterface.class.php @@ -1,45 +1,47 @@ -. - */ - -namespace SP\Import; - -/** - * Interface ImportInterface - * - * @package Import - */ -interface ImportInterface -{ - /** - * Iniciar la importación - */ - public function doImport(); - - /** - * Devolver el contador de objetos importados - * - * @return int - */ - public function getCounter(); +. + */ + +namespace SP\Services\Import; + +/** + * Interface ImportInterface + * + * @package Import + */ +interface ImportInterface +{ + /** + * Iniciar la importación + * + * @return ImportInterface + */ + public function doImport(); + + /** + * Devolver el contador de objetos importados + * + * @return int + */ + public function getCounter(); } \ No newline at end of file diff --git a/inc/SP/Import/ImportParams.class.php b/inc/SP/Import/ImportParams.class.php index 0279d52b..8821d174 100644 --- a/inc/SP/Import/ImportParams.class.php +++ b/inc/SP/Import/ImportParams.class.php @@ -1,135 +1,135 @@ -. - */ - -namespace SP\Import; - - -/** - * Class ImportParams - * - * @package SP\Import - */ -class ImportParams -{ - /** - * @var string - */ - protected $importPwd; - /** - * @var string - */ - protected $importMasterPwd; - /** - * @var int - */ - protected $defaultUser = 0; - /** - * @var int - */ - protected $defaultGroup = 0; - /** - * @var string - */ - protected $csvDelimiter = ';'; - - /** - * @return string - */ - public function getImportPwd() - { - return $this->importPwd; - } - - /** - * @param string $importPwd - */ - public function setImportPwd($importPwd) - { - $this->importPwd = $importPwd; - } - - /** - * @return int - */ - public function getDefaultGroup() - { - return $this->defaultGroup; - } - - /** - * @param int $defaultGroup - */ - public function setDefaultGroup($defaultGroup) - { - $this->defaultGroup = (int)$defaultGroup; - } - - /** - * @return string - */ - public function getCsvDelimiter() - { - return $this->csvDelimiter; - } - - /** - * @param string $csvDelimiter - */ - public function setCsvDelimiter($csvDelimiter) - { - $this->csvDelimiter = $csvDelimiter; - } - - /** - * @return string - */ - public function getImportMasterPwd() - { - return $this->importMasterPwd; - } - - /** - * @param string $importMasterPwd - */ - public function setImportMasterPwd($importMasterPwd) - { - $this->importMasterPwd = $importMasterPwd; - } - - /** - * @return int - */ - public function getDefaultUser() - { - return $this->defaultUser; - } - - /** - * @param int $defaultUser - */ - public function setDefaultUser($defaultUser) - { - $this->defaultUser = (int)$defaultUser; - } +. + */ + +namespace SP\Services\Import; + + +/** + * Class ImportParams + * + * @package SP\Services\Import + */ +final class ImportParams +{ + /** + * @var string + */ + protected $importPwd; + /** + * @var string + */ + protected $importMasterPwd; + /** + * @var int + */ + protected $defaultUser = 0; + /** + * @var int + */ + protected $defaultGroup = 0; + /** + * @var string + */ + protected $csvDelimiter = ';'; + + /** + * @return string + */ + public function getImportPwd() + { + return $this->importPwd; + } + + /** + * @param string $importPwd + */ + public function setImportPwd($importPwd) + { + $this->importPwd = $importPwd; + } + + /** + * @return int + */ + public function getDefaultGroup() + { + return $this->defaultGroup; + } + + /** + * @param int $defaultGroup + */ + public function setDefaultGroup($defaultGroup) + { + $this->defaultGroup = (int)$defaultGroup; + } + + /** + * @return string + */ + public function getCsvDelimiter() + { + return $this->csvDelimiter; + } + + /** + * @param string $csvDelimiter + */ + public function setCsvDelimiter($csvDelimiter) + { + $this->csvDelimiter = $csvDelimiter; + } + + /** + * @return string + */ + public function getImportMasterPwd() + { + return $this->importMasterPwd; + } + + /** + * @param string $importMasterPwd + */ + public function setImportMasterPwd($importMasterPwd) + { + $this->importMasterPwd = $importMasterPwd; + } + + /** + * @return int + */ + public function getDefaultUser() + { + return $this->defaultUser; + } + + /** + * @param int $defaultUser + */ + public function setDefaultUser($defaultUser) + { + $this->defaultUser = (int)$defaultUser; + } } \ No newline at end of file diff --git a/inc/SP/Log/LogUtil.class.php b/inc/SP/Log/LogUtil.class.php index b3f0a980..b09ec803 100644 --- a/inc/SP/Log/LogUtil.class.php +++ b/inc/SP/Log/LogUtil.class.php @@ -1,48 +1,43 @@ -. - */ - -namespace SP\Log; - -/** - * Class LogUtil - * - * @package SP\Log - */ -class LogUtil -{ - /** - * Registrar que una extensión no ha sido cargada - * - * @param string $extension La extensión no cargada - * @param string $source El origen del error - * @return Log - * @throws \SP\Core\Exceptions\SPException - */ - public static function extensionNotLoaded($extension, $source = __FUNCTION__) - { - $msg = sprintf(__('Extensión \'%s\' no cargada'), $extension); - - return Log::writeNewLog($source, $msg, Log::ERROR); - } +. + */ + +namespace SP\Services\Account; + +use SP\DataModel\Dto\AccountDetailsResponse; + +/** + * Interface AccountServiceInterface + * + * @package SP\Services\Account + */ +interface AccountServiceInterface +{ + /** + * @param int $id + * + * @return AccountDetailsResponse + * @throws \SP\Core\Exceptions\SPException + */ + public function getById($id); } \ No newline at end of file diff --git a/inc/SP/Mgmt/Files/FileBase.class.php b/inc/SP/Mgmt/Files/FileBase.class.php index 10a100c9..1a8db065 100644 --- a/inc/SP/Mgmt/Files/FileBase.class.php +++ b/inc/SP/Mgmt/Files/FileBase.class.php @@ -1,51 +1,42 @@ -. - */ - -namespace SP\Mgmt\Files; - -use SP\Core\Exceptions\InvalidClassException; -use SP\DataModel\FileData; -use SP\Mgmt\ItemBaseInterface; -use SP\Mgmt\ItemBaseTrait; - -/** - * Class FileBase - * - * @package SP\Mgmt\Files - */ -abstract class FileBase implements ItemBaseInterface -{ - use ItemBaseTrait; - - /** - * Inicializar la clase - * - * @return void - * @throws InvalidClassException - */ - protected function init() - { - $this->setDataModel(FileData::class); - } +. + */ + +namespace SP\DataModel; + +/** + * Interface HydratableInterface + * + * @package SP\DataModel + */ +interface HydratableInterface +{ + /** + * @param string $class + * + * @param string $property + * + * @return mixed|null + */ + public function hydrate(string $class = null, string $property = 'data'); } \ No newline at end of file diff --git a/inc/SP/Mgmt/ItemSelectInterface.class.php b/inc/SP/Mgmt/ItemSelectInterface.class.php index 069a8b4c..2dac822b 100644 --- a/inc/SP/Mgmt/ItemSelectInterface.class.php +++ b/inc/SP/Mgmt/ItemSelectInterface.class.php @@ -1,38 +1,38 @@ -. - */ - -namespace SP\Mgmt; - -/** - * Interface ItemSelectInterface - * - * @package SP\Mgmt - */ -interface ItemSelectInterface -{ - /** - * @return array - */ - public function getItemsForSelect(); +. + */ + +namespace SP\Services; + +/** + * Interface ServiceItemInterface + * + * @package SP\Services + */ +interface ServiceItemInterface +{ + /** + * @return array + */ + public function getAll(); } \ No newline at end of file diff --git a/inc/SP/Storage/DBStorageInterface.class.php b/inc/SP/Storage/DBStorageInterface.class.php index dacdb683..a525beb4 100644 --- a/inc/SP/Storage/DBStorageInterface.class.php +++ b/inc/SP/Storage/DBStorageInterface.class.php @@ -1,48 +1,64 @@ -. - */ - -namespace SP\Storage; - -/** - * Interface DBStorageInterface - * - * @package SP\Storage - */ -interface DBStorageInterface -{ - /** - * @return \PDO - */ - public function getConnection(); - - /** - * @return mixed - */ - public function setConnectionData(); - - /** - * @return int - */ - public function getDbStatus(); +. + */ + +namespace SP\Storage\Database; + +/** + * Interface DBStorageInterface + * + * @package SP\Storage + */ +interface DBStorageInterface +{ + /** + * Obtener una conexión PDO + * + * @return \PDO + */ + public function getConnection(); + + /** + * Obtener una conexión PDO sin seleccionar la BD + * + * @return \PDO + */ + public function getConnectionSimple(); + + /** + * Devolcer el estado de la BD + * + * @return int + */ + public function getDbStatus(); + + /** + * @return mixed + */ + public function getConnectionUri(); + + /** + * @return string + */ + public function getDatabaseName(); } \ No newline at end of file diff --git a/inc/SP/Storage/FileStorageInterface.class.php b/inc/SP/Storage/FileStorageInterface.class.php index a22990f7..0e300c04 100644 --- a/inc/SP/Storage/FileStorageInterface.class.php +++ b/inc/SP/Storage/FileStorageInterface.class.php @@ -1,54 +1,50 @@ -. - */ - -namespace SP\Storage; - -/** - * Interface StorageInterface - * - * @package SMD\Storage - */ -interface FileStorageInterface -{ - /** - * @return FileStorageInterface - */ - public function load(); - - /** - * @return FileStorageInterface - */ - public function save(); - - /** - * @return mixed - */ - public function getItems(); - - /** - * @param $items - * @return mixed - */ - public function setItems($items); +. + */ + +namespace SP\Services\Account; + +/** + * Class AccountPasswordRequest + * + * @package SP\Services\Account + */ +final class AccountPasswordRequest +{ + /** + * @var int + */ + public $id; + /** + * @var string + */ + public $pass; + /** + * @var string + */ + public $key; + /** + * @var string + */ + public $hash; } \ No newline at end of file diff --git a/inc/SP/Util/ArrayUtil.class.php b/inc/SP/Util/ArrayUtil.class.php index 067a402f..8119d1de 100644 --- a/inc/SP/Util/ArrayUtil.class.php +++ b/inc/SP/Util/ArrayUtil.class.php @@ -1,97 +1,104 @@ -. - */ - -namespace SP\Util; - -/** - * Class ArrayUtil - * - * @package SP\Util - */ -class ArrayUtil -{ - /** - * Buscar un objeto en un array según el valor de una propiedad - * - * @param array $array - * @param string $property Nombre de la propiedad - * @param string $value Valor de la propiedad - * @param object $default Valor por defecto - * @return false|object - */ - public static function searchInObject(array $array, $property, $value, $default = null) - { - foreach ($array as $object) { - if (is_object($object) - && isset($object->$property) - && $value == $object->$property - ) { - return $object; - } - } - - return null !== $default ? $default : false; - } - - /** - * Comprobar si un valor existe en un array de objetos - * - * @param array $objectArray - * @param string $method - * @param mixed $value - * @return bool - */ - public static function checkInObjectArrayMethod(array $objectArray, $method, $value) - { - foreach ($objectArray as $object) { - if (is_callable([$object, $method]) && $object->$method() === $value) { - return true; - } - } - - return false; - } - - /** - * Comprobar si un valor existe en un array de objetos - * - * @param array $objectArray - * @param string $property - * @param mixed $value - * @return bool - */ - public static function checkInObjectArray(array $objectArray, $property, $value) - { - foreach ($objectArray as $object) { - if (is_object($object) - && isset($object->$property) - && $object->$property == $value - ) { - return true; - } - } - - return false; - } +. + */ + +namespace SP\Util; + +/** + * Class ArrayUtil + * + * @package SP\Util + */ +final class ArrayUtil +{ + /** + * Buscar un objeto en un array según el valor de una propiedad + * + * @param array $array + * @param string $property Nombre de la propiedad + * @param string $value Valor de la propiedad + * @param object $default Valor por defecto + * + * @return false|object + */ + public static function searchInObject(array $array, $property, $value, $default = null) + { + foreach ($array as $object) { + if (is_object($object) + && isset($object->$property) + && $value == $object->$property + ) { + return $object; + } + } + + return null !== $default ? $default : false; + } + + /** + * Comprobar si un valor existe en un array de objetos + * + * @param array $objectArray + * @param string $method + * @param mixed $value + * + * @return bool + */ + public static function checkInObjectArrayMethod(array $objectArray, $method, $value) + { + foreach ($objectArray as $object) { + if (is_callable([$object, $method]) && $object->$method() === $value) { + return true; + } + } + + return false; + } + + /** + * Comprobar si un valor existe en un array de objetos + * + * @param array $objectArray + * @param string $property + * @param mixed $value + * + * @return bool + */ + public static function checkInObjectArray(array $objectArray, $property, $value) + { + if (empty($objectArray)) { + return false; + } + + foreach ($objectArray as $object) { + if (is_object($object) + && isset($object->$property) + && $object->$property == $value + ) { + return true; + } + } + + return false; + } } \ No newline at end of file diff --git a/inc/SP/Util/ConnectionInterface.class.php b/inc/SP/Util/ConnectionInterface.class.php index cec5db2f..d681cd8e 100644 --- a/inc/SP/Util/ConnectionInterface.class.php +++ b/inc/SP/Util/ConnectionInterface.class.php @@ -1,67 +1,69 @@ -. - */ - -namespace SP\Util; - -/** - * Class ConnectionInterface - * - * @package SP\Util - */ -interface ConnectionInterface -{ - const TYPE_TCP = 1; - const TYPE_UDP = 2; - const SOCKET_TIMEOUT = 10; - - /** - * Obtener un socket - * - * @param $type - * @return resource - */ - public function getSocket($type); - - /** - * Cerrar un socket - * - * @return mixed - */ - public function closeSocket(); - - /** - * Obtener el último error del socket - * - * @return string - */ - public function getSocketError(); - - /** - * Enviar un mensaje al socket - * - * @param $message string El mensaje a enviar - * @return mixed - */ - public function send($message); +. + */ + +namespace SP\Util; + +/** + * Class ConnectionInterface + * + * @package SP\Util + */ +interface ConnectionInterface +{ + const TYPE_TCP = 1; + const TYPE_UDP = 2; + const SOCKET_TIMEOUT = 10; + + /** + * Obtener un socket + * + * @param $type + * + * @return resource + */ + public function getSocket($type); + + /** + * Cerrar un socket + * + * @return mixed + */ + public function closeSocket(); + + /** + * Obtener el último error del socket + * + * @return string + */ + public function getSocketError(); + + /** + * Enviar un mensaje al socket + * + * @param $message string El mensaje a enviar + * + * @return mixed + */ + public function send($message); } \ No newline at end of file diff --git a/inc/SP/Util/Filter.class.php b/inc/SP/Util/Filter.class.php index b18a220f..3a89c216 100644 --- a/inc/SP/Util/Filter.class.php +++ b/inc/SP/Util/Filter.class.php @@ -1,48 +1,46 @@ -. - */ - -namespace SP\Util; - -defined('APP_ROOT') || die(); - - -/** - * Class Filter para el filtrado de datos - * - * @package SP\Util - */ -class Filter -{ - /** - * Limpiar una cadena de búsqueda de carácteres utilizados en expresiones regulares - * - * @param $string - * @return mixed - */ - public static function safeSearchString($string) - { - return preg_replace(/** @lang RegExp */ - '/[\[\]%{}*$]+/', '', (string)$string); - } +. + */ + +namespace SP\Util; + +/** + * Class DateUtil + * + * @package SP\Util + */ +final class DateUtil +{ + /** + * Returns date string from UNIX timestamp + * + * @param $date + * @param string $format + * + * @return false|string + */ + public static function getDateFromUnix($date, $format = 'Y-m-d H:i') + { + return is_numeric($date) ? date($format, $date) : $date; + } } \ No newline at end of file diff --git a/inc/themes/material-blue/css/mdl-datetimepicker.min.css b/inc/themes/material-blue/css/mdl-datetimepicker.min.css index 2a4bf147..6470cc2a 100644 --- a/inc/themes/material-blue/css/mdl-datetimepicker.min.css +++ b/inc/themes/material-blue/css/mdl-datetimepicker.min.css @@ -1 +1 @@ -.dtp{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.2);z-index:2000;font-size:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dtp>.dtp-content{background:#fff;max-width:300px;box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);max-height:520px;position:relative;left:50%}.dtp>.dtp-content>.dtp-date-view>header.dtp-header{background:#607d8b;color:#eceff1;text-align:center;padding:.3em}.dtp div.dtp-date,.dtp div.dtp-time{background:#607d8b;text-align:center;color:#eceff1;padding:10px}.dtp div.dtp-date>div{padding:0;margin:0}.dtp div.dtp-actual-month{font-size:1.5em}.dtp div.dtp-actual-num{font-size:3em;line-height:.9}.dtp div.dtp-actual-maxtime{font-size:3em;line-height:.9}.dtp div.dtp-actual-year{font-size:1.5em;color:#fff}.dtp div.dtp-picker{padding:1em;text-align:center}.dtp div.dtp-picker-month,.dtp div.dtp-actual-time{font-weight:500;text-align:center}.dtp div.dtp-picker-month{padding-bottom:20px !important;text-transform:uppercase !important}.dtp .dtp-close{position:absolute;top:.5em;right:1em}.dtp .dtp-close>a{color:#fff}.dtp .dtp-close>a>i{font-size:1em}.dtp table.dtp-picker-days{margin:0;min-height:251px}.dtp table.dtp-picker-days,.dtp table.dtp-picker-days tr,.dtp table.dtp-picker-days tr>td{border:0}.dtp table.dtp-picker-days tr>td{font-weight:700;text-align:center;padding:.5em}.dtp table.dtp-picker-days tr>td>span.dtp-select-day{color:#bdbdbd !important;padding:.4em .5em .5em .6em}.dtp table.dtp-picker-days tr>td>a,.dtp .dtp-picker-time>a{color:#212121;text-decoration:none;padding:.4em;border-radius:5px !important}.dtp table.dtp-picker-days tr>td>a.selected{background:#607d8b;color:#eceff1}.dtp table.dtp-picker-days tr>th{color:#757575;text-align:center;font-weight:700;padding:.4em .3em}.dtp .p10>a{color:#fff;text-decoration:none}.dtp .p10{width:10%;display:inline-block}.dtp .p20{width:20%;display:inline-block}.dtp .p60{width:60%;display:inline-block}.dtp .p80{width:80%;display:inline-block}.dtp a.dtp-meridien-am,.dtp a.dtp-meridien-pm{position:relative;top:10px;color:#212121;font-weight:500;padding:.7em .5em;border-radius:50% !important;text-decoration:none;background:#eee;font-size:1em}.dtp .dtp-actual-meridien a.selected{background:#607d8b;color:#eceff1}.dtp .dtp-picker-time>.dtp-select-hour{cursor:pointer}.dtp .dtp-picker-time>.dtp-select-minute{cursor:pointer}.dtp .dtp-buttons{padding:0 1em 1em 1em;text-align:right}.dtp.hidden,.dtp .hidden{display:none}.dtp .invisible{visibility:hidden}.dtp .left{float:left}.dtp .right{float:right}.dtp .clearfix{clear:both}.dtp .center{text-align:center} \ No newline at end of file +.dtp{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.2);z-index:2000;font-size:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dtp>.dtp-content{background:#fff;max-width:300px;box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);max-height:520px;position:relative;left:50%}.dtp>.dtp-content>.dtp-date-view>header.dtp-header{background:#607d8b;color:#eceff1;text-align:center;padding:.3em}.dtp div.dtp-date,.dtp div.dtp-time{background:#607d8b;text-align:center;color:#eceff1;padding:10px}.dtp div.dtp-date>div{padding:0;margin:0}.dtp div.dtp-actual-month{font-size:1.5em}.dtp div.dtp-actual-num{font-size:3em;line-height:.9}.dtp div.dtp-actual-maxtime{font-size:3em;line-height:.9}.dtp div.dtp-actual-year{font-size:1.5em;color:#fff}.dtp div.dtp-picker{padding:1em;text-align:center}.dtp div.dtp-picker-month,.dtp div.dtp-actual-time{font-weight:500;text-align:center}.dtp div.dtp-picker-month{padding-bottom:20px!important;text-transform:uppercase!important}.dtp .dtp-close{position:absolute;top:.5em;right:1em}.dtp .dtp-close>a{color:#fff}.dtp .dtp-close>a>i{font-size:1em}.dtp table.dtp-picker-days{margin:0;min-height:251px}.dtp table.dtp-picker-days,.dtp table.dtp-picker-days tr,.dtp table.dtp-picker-days tr>td{border:0}.dtp table.dtp-picker-days tr>td{font-weight:700;text-align:center;padding:.5em}.dtp table.dtp-picker-days tr>td>span.dtp-select-day{color:#bdbdbd!important;padding:.4em .5em .5em .6em}.dtp table.dtp-picker-days tr>td>a,.dtp .dtp-picker-time>a{color:#212121;text-decoration:none;padding:.4em;border-radius:5px!important}.dtp table.dtp-picker-days tr>td>a.selected{background:#607d8b;color:#eceff1}.dtp table.dtp-picker-days tr>th{color:#757575;text-align:center;font-weight:700;padding:.4em .3em}.dtp .p10>a{color:#fff;text-decoration:none}.dtp .p10{width:10%;display:inline-block}.dtp .p20{width:20%;display:inline-block}.dtp .p60{width:60%;display:inline-block}.dtp .p80{width:80%;display:inline-block}.dtp a.dtp-meridien-am,.dtp a.dtp-meridien-pm{position:relative;top:10px;color:#212121;font-weight:500;padding:.7em .5em;border-radius:50%!important;text-decoration:none;background:#eee;font-size:1em}.dtp .dtp-actual-meridien a.selected{background:#607d8b;color:#eceff1}.dtp .dtp-picker-time>.dtp-select-hour{cursor:pointer}.dtp .dtp-picker-time>.dtp-select-minute{cursor:pointer}.dtp .dtp-buttons{padding:0 1em 1em 1em;text-align:right}.dtp.hidden,.dtp .hidden{display:none}.dtp .invisible{visibility:hidden}.dtp .left{float:left}.dtp .right{float:right}.dtp .clearfix{clear:both}.dtp .center{text-align:center} \ No newline at end of file diff --git a/js/clipboard.js b/js/clipboard.js index 613bf0fb..8333fb2c 100644 --- a/js/clipboard.js +++ b/js/clipboard.js @@ -1,321 +1,317 @@ -/* - The MIT License (MIT) - - Copyright (c) 2014 Lucas Garron - - 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. - */ -// @author https://github.com/lgarron -// Import support https://stackoverflow.com/questions/13673346/supporting-both-commonjs-and-amd -(function (name, definition) { - if (typeof module !== "undefined") { - module.exports = definition(); - } - else if (typeof define === "function" && typeof define.amd === "object") { - define(definition); - } - else { - this[name] = definition(); - } -}("clipboard", function () { - if (typeof document === 'undefined' || !document.addEventListener) { - return null; - } - - var clipboard = {}; - - clipboard.copy = (function () { - var _intercept = false; - var _data = null; // Map from data type (e.g. "text/html") to value. - var _bogusSelection = false; - - function cleanup() { - _intercept = false; - _data = null; - if (_bogusSelection) { - window.getSelection().removeAllRanges(); - } - _bogusSelection = false; - } - - document.addEventListener("copy", function (e) { - if (_intercept) { - for (var key in _data) { - e.clipboardData.setData(key, _data[key]); - } - e.preventDefault(); - } - }); - - // Workaround for Safari: https://bugs.webkit.org/show_bug.cgi?id=156529 - function bogusSelect() { - var sel = document.getSelection(); - // If "nothing" is selected... - if (!document.queryCommandEnabled("copy") && sel.isCollapsed) { - // ... temporarily select the entire body. - // - // We select the entire body because: - // - it's guaranteed to exist, - // - it works (unlike, say, document.head, or phantom element that is - // not inserted into the DOM), - // - it doesn't seem to flicker (due to the synchronous copy event), and - // - it avoids modifying the DOM (can trigger mutation observers). - // - // Because we can't do proper feature detection (we already checked - // document.queryCommandEnabled("copy") , which actually gives a false - // negative for Blink when nothing is selected) and UA sniffing is not - // reliable (a lot of UA strings contain "Safari"), this will also - // happen for some browsers other than Safari. :-() - var range = document.createRange(); - range.selectNodeContents(document.body); - sel.removeAllRanges(); - sel.addRange(range); - _bogusSelection = true; - } - }; - - return function (data) { - return new Promise(function (resolve, reject) { - _intercept = true; - if (typeof data === "string") { - _data = {"text/plain": data}; - } else if (data instanceof Node) { - _data = {"text/html": new XMLSerializer().serializeToString(data)}; - } else { - _data = data; - } - - function triggerCopy(tryBogusSelect) { - try { - if (document.execCommand("copy")) { - // document.execCommand is synchronous: http://www.w3.org/TR/2015/WD-clipboard-apis-20150421/#integration-with-rich-text-editing-apis - // So we can call resolve() back here. - cleanup(); - resolve(); - } - else { - if (!tryBogusSelect) { - bogusSelect(); - triggerCopy(true); - } else { - cleanup(); - throw new Error("Unable to copy. Perhaps it's not available in your browser?"); - } - } - } catch (e) { - cleanup(); - reject(e); - } - } - - triggerCopy(false); - - }); - }; - })(); - - clipboard.paste = (function () { - var _intercept = false; - var _resolve; - var _dataType; - - document.addEventListener("paste", function (e) { - if (_intercept) { - _intercept = false; - e.preventDefault(); - var resolve = _resolve; - _resolve = null; - resolve(e.clipboardData.getData(_dataType)); - } - }); - - return function (dataType) { - return new Promise(function (resolve, reject) { - _intercept = true; - _resolve = resolve; - _dataType = dataType || "text/plain"; - try { - if (!document.execCommand("paste")) { - _intercept = false; - reject(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")); - } - } catch (e) { - _intercept = false; - reject(new Error(e)); - } - }); - }; - })(); - - // @author https://github.com/zenorocha - clipboard.isSupported = function isSupported() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ["copy", "cut"]; - - var actions = typeof action === "string" ? [action] : action; - var support = !!document.queryCommandSupported; - - actions.forEach(function (action) { - support = support && !!document.queryCommandSupported(action); - }); - - return support; - }; - - // Handle IE behaviour. - if (typeof ClipboardEvent === "undefined" && - typeof window.clipboardData !== "undefined" && - typeof window.clipboardData.setData !== "undefined") { - - /*! promise-polyfill 2.0.1 */ - (function (a) { - function b(a, b) { - return function () { - a.apply(b, arguments) - } - } - - function c(a) { - if ("object" != typeof this)throw new TypeError("Promises must be constructed via new"); - if ("function" != typeof a)throw new TypeError("not a function"); - this._state = null, this._value = null, this._deferreds = [], i(a, b(e, this), b(f, this)) - } - - function d(a) { - var b = this; - return null === this._state ? void this._deferreds.push(a) : void j(function () { - var c = b._state ? a.onFulfilled : a.onRejected; - if (null === c)return void(b._state ? a.resolve : a.reject)(b._value); - var d; - try { - d = c(b._value) - } catch (e) { - return void a.reject(e) - } - a.resolve(d) - }) - } - - function e(a) { - try { - if (a === this)throw new TypeError("A promise cannot be resolved with itself."); - if (a && ("object" == typeof a || "function" == typeof a)) { - var c = a.then; - if ("function" == typeof c)return void i(b(c, a), b(e, this), b(f, this)) - } - this._state = !0, this._value = a, g.call(this) - } catch (d) { - f.call(this, d) - } - } - - function f(a) { - this._state = !1, this._value = a, g.call(this) - } - - function g() { - for (var a = 0, b = this._deferreds.length; b > a; a++)d.call(this, this._deferreds[a]); - this._deferreds = null - } - - function h(a, b, c, d) { - this.onFulfilled = "function" == typeof a ? a : null, this.onRejected = "function" == typeof b ? b : null, this.resolve = c, this.reject = d - } - - function i(a, b, c) { - var d = !1; - try { - a(function (a) { - d || (d = !0, b(a)) - }, function (a) { - d || (d = !0, c(a)) - }) - } catch (e) { - if (d)return; - d = !0, c(e) - } - } - - var j = c.immediateFn || "function" == typeof setImmediate && setImmediate || function (a) { - setTimeout(a, 1) - }, k = Array.isArray || function (a) { - return "[object Array]" === Object.prototype.toString.call(a) - }; - c.prototype["catch"] = function (a) { - return this.then(null, a) - }, c.prototype.then = function (a, b) { - var e = this; - return new c(function (c, f) { - d.call(e, new h(a, b, c, f)) - }) - }, c.all = function () { - var a = Array.prototype.slice.call(1 === arguments.length && k(arguments[0]) ? arguments[0] : arguments); - return new c(function (b, c) { - function d(f, g) { - try { - if (g && ("object" == typeof g || "function" == typeof g)) { - var h = g.then; - if ("function" == typeof h)return void h.call(g, function (a) { - d(f, a) - }, c) - } - a[f] = g, 0 === --e && b(a) - } catch (i) { - c(i) - } - } - - if (0 === a.length)return b([]); - for (var e = a.length, f = 0; f < a.length; f++)d(f, a[f]) - }) - }, c.resolve = function (a) { - return a && "object" == typeof a && a.constructor === c ? a : new c(function (b) { - b(a) - }) - }, c.reject = function (a) { - return new c(function (b, c) { - c(a) - }) - }, c.race = function (a) { - return new c(function (b, c) { - for (var d = 0, e = a.length; e > d; d++)a[d].then(b, c) - }) - }, "undefined" != typeof module && module.exports ? module.exports = c : a.Promise || (a.Promise = c) - })(this); - - clipboard.copy = function (data) { - return new Promise(function (resolve, reject) { - // IE supports string and URL types: https://msdn.microsoft.com/en-us/library/ms536744(v=vs.85).aspx - // We only support the string type for now. - if (typeof data !== "string" && !("text/plain" in data)) { - throw new Error("You must provide a text/plain type."); - } - - var strData = (typeof data === "string" ? data : data["text/plain"]); - var copySucceeded = window.clipboardData.setData("Text", strData); - if (copySucceeded) { - resolve(); - } else { - reject(new Error("Copying was rejected.")); - } - }); - }; - - clipboard.paste = function () { - return new Promise(function (resolve, reject) { - var strData = window.clipboardData.getData("Text"); - if (strData) { - resolve(strData); - } else { - // The user rejected the paste request. - reject(new Error("Pasting was rejected.")); - } - }); - }; - } - - return clipboard; -})); +/* + The MIT License (MIT) + Copyright (c) 2014 Lucas Garron + 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. + */ +// @author https://github.com/lgarron +// Import support https://stackoverflow.com/questions/13673346/supporting-both-commonjs-and-amd +(function (name, definition) { + if (typeof module !== "undefined") { + module.exports = definition(); + } + else if (typeof define === "function" && typeof define.amd === "object") { + define(definition); + } + else { + this[name] = definition(); + } +}("clipboard", function () { + if (typeof document === 'undefined' || !document.addEventListener) { + return null; + } + + var clipboard = {}; + + clipboard.copy = (function () { + var _intercept = false; + var _data = null; // Map from data type (e.g. "text/html") to value. + var _bogusSelection = false; + + function cleanup() { + _intercept = false; + _data = null; + if (_bogusSelection) { + window.getSelection().removeAllRanges(); + } + _bogusSelection = false; + } + + document.addEventListener("copy", function (e) { + if (_intercept) { + for (var key in _data) { + e.clipboardData.setData(key, _data[key]); + } + e.preventDefault(); + } + }); + + // Workaround for Safari: https://bugs.webkit.org/show_bug.cgi?id=156529 + function bogusSelect() { + var sel = document.getSelection(); + // If "nothing" is selected... + if (!document.queryCommandEnabled("copy") && sel.isCollapsed) { + // ... temporarily select the entire body. + // + // We select the entire body because: + // - it's guaranteed to exist, + // - it works (unlike, say, document.head, or phantom element that is + // not inserted into the DOM), + // - it doesn't seem to flicker (due to the synchronous copy event), and + // - it avoids modifying the DOM (can trigger mutation observers). + // + // Because we can't do proper feature detection (we already checked + // document.queryCommandEnabled("copy") , which actually gives a false + // negative for Blink when nothing is selected) and UA sniffing is not + // reliable (a lot of UA strings contain "Safari"), this will also + // happen for some browsers other than Safari. :-() + var range = document.createRange(); + range.selectNodeContents(document.body); + sel.removeAllRanges(); + sel.addRange(range); + _bogusSelection = true; + } + }; + + return function (data) { + return new Promise(function (resolve, reject) { + _intercept = true; + if (typeof data === "string") { + _data = {"text/plain": data}; + } else if (data instanceof Node) { + _data = {"text/html": new XMLSerializer().serializeToString(data)}; + } else { + _data = data; + } + + function triggerCopy(tryBogusSelect) { + try { + if (document.execCommand("copy")) { + // document.execCommand is synchronous: http://www.w3.org/TR/2015/WD-clipboard-apis-20150421/#integration-with-rich-text-editing-apis + // So we can call resolve() back here. + cleanup(); + resolve(); + } + else { + if (!tryBogusSelect) { + bogusSelect(); + triggerCopy(true); + } else { + cleanup(); + throw new Error("Unable to copy. Perhaps it's not available in your browser?"); + } + } + } catch (e) { + cleanup(); + reject(e); + } + } + + triggerCopy(false); + + }); + }; + })(); + + clipboard.paste = (function () { + var _intercept = false; + var _resolve; + var _dataType; + + document.addEventListener("paste", function (e) { + if (_intercept) { + _intercept = false; + e.preventDefault(); + var resolve = _resolve; + _resolve = null; + resolve(e.clipboardData.getData(_dataType)); + } + }); + + return function (dataType) { + return new Promise(function (resolve, reject) { + _intercept = true; + _resolve = resolve; + _dataType = dataType || "text/plain"; + try { + if (!document.execCommand("paste")) { + _intercept = false; + reject(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")); + } + } catch (e) { + _intercept = false; + reject(new Error(e)); + } + }); + }; + })(); + + // @author https://github.com/zenorocha + clipboard.isSupported = function isSupported() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ["copy", "cut"]; + + var actions = typeof action === "string" ? [action] : action; + var support = !!document.queryCommandSupported; + + actions.forEach(function (action) { + support = support && !!document.queryCommandSupported(action); + }); + + return support; + }; + + // Handle IE behaviour. + if (typeof ClipboardEvent === "undefined" && + typeof window.clipboardData !== "undefined" && + typeof window.clipboardData.setData !== "undefined") { + + /*! promise-polyfill 2.0.1 */ + (function (a) { + function b(a, b) { + return function () { + a.apply(b, arguments) + } + } + + function c(a) { + if ("object" != typeof this) throw new TypeError("Promises must be constructed via new"); + if ("function" != typeof a) throw new TypeError("not a function"); + this._state = null, this._value = null, this._deferreds = [], i(a, b(e, this), b(f, this)) + } + + function d(a) { + var b = this; + return null === this._state ? void this._deferreds.push(a) : void j(function () { + var c = b._state ? a.onFulfilled : a.onRejected; + if (null === c) return void(b._state ? a.resolve : a.reject)(b._value); + var d; + try { + d = c(b._value) + } catch (e) { + return void a.reject(e) + } + a.resolve(d) + }) + } + + function e(a) { + try { + if (a === this) throw new TypeError("A promise cannot be resolved with itself."); + if (a && ("object" == typeof a || "function" == typeof a)) { + var c = a.then; + if ("function" == typeof c) return void i(b(c, a), b(e, this), b(f, this)) + } + this._state = !0, this._value = a, g.call(this) + } catch (d) { + f.call(this, d) + } + } + + function f(a) { + this._state = !1, this._value = a, g.call(this) + } + + function g() { + for (var a = 0, b = this._deferreds.length; b > a; a++) d.call(this, this._deferreds[a]); + this._deferreds = null + } + + function h(a, b, c, d) { + this.onFulfilled = "function" == typeof a ? a : null, this.onRejected = "function" == typeof b ? b : null, this.resolve = c, this.reject = d + } + + function i(a, b, c) { + var d = !1; + try { + a(function (a) { + d || (d = !0, b(a)) + }, function (a) { + d || (d = !0, c(a)) + }) + } catch (e) { + if (d) return; + d = !0, c(e) + } + } + + var j = c.immediateFn || "function" == typeof setImmediate && setImmediate || function (a) { + setTimeout(a, 1) + }, k = Array.isArray || function (a) { + return "[object Array]" === Object.prototype.toString.call(a) + }; + c.prototype["catch"] = function (a) { + return this.then(null, a) + }, c.prototype.then = function (a, b) { + var e = this; + return new c(function (c, f) { + d.call(e, new h(a, b, c, f)) + }) + }, c.all = function () { + var a = Array.prototype.slice.call(1 === arguments.length && k(arguments[0]) ? arguments[0] : arguments); + return new c(function (b, c) { + function d(f, g) { + try { + if (g && ("object" == typeof g || "function" == typeof g)) { + var h = g.then; + if ("function" == typeof h) return void h.call(g, function (a) { + d(f, a) + }, c) + } + a[f] = g, 0 === --e && b(a) + } catch (i) { + c(i) + } + } + + if (0 === a.length) return b([]); + for (var e = a.length, f = 0; f < a.length; f++) d(f, a[f]) + }) + }, c.resolve = function (a) { + return a && "object" == typeof a && a.constructor === c ? a : new c(function (b) { + b(a) + }) + }, c.reject = function (a) { + return new c(function (b, c) { + c(a) + }) + }, c.race = function (a) { + return new c(function (b, c) { + for (var d = 0, e = a.length; e > d; d++) a[d].then(b, c) + }) + }, "undefined" != typeof module && module.exports ? module.exports = c : a.Promise || (a.Promise = c) + })(this); + + clipboard.copy = function (data) { + return new Promise(function (resolve, reject) { + // IE supports string and URL types: https://msdn.microsoft.com/en-us/library/ms536744(v=vs.85).aspx + // We only support the string type for now. + if (typeof data !== "string" && !("text/plain" in data)) { + throw new Error("You must provide a text/plain type."); + } + + var strData = (typeof data === "string" ? data : data["text/plain"]); + var copySucceeded = window.clipboardData.setData("Text", strData); + if (copySucceeded) { + resolve(); + } else { + reject(new Error("Copying was rejected.")); + } + }); + }; + + clipboard.paste = function () { + return new Promise(function (resolve, reject) { + var strData = window.clipboardData.getData("Text"); + if (strData) { + resolve(strData); + } else { + // The user rejected the paste request. + reject(new Error("Pasting was rejected.")); + } + }); + }; + } + + return clipboard; +})); diff --git a/js/jquery-3.2.0.js b/js/jquery-3.2.0.js index b8e81143..fd90fe8e 100644 --- a/js/jquery-3.2.0.js +++ b/js/jquery-3.2.0.js @@ -1,10244 +1,10364 @@ -/*! - * jQuery JavaScript Library v3.2.0 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2017-03-16T21:26Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - - - - function DOMEval( code, doc ) { - doc = doc || document; - - var script = doc.createElement( "script" ); - - script.text = code; - doc.head.appendChild( script ).parentNode.removeChild( script ); - } -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.2.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && Array.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // As of jQuery 3.0, isNumeric is limited to - // strings and numbers (primitives or objects) - // that can be coerced to finite numbers (gh-2662) - var type = jQuery.type( obj ); - return ( type === "number" || type === "string" ) && - - // parseFloat NaNs numeric-cast false positives ("") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - !isNaN( obj - parseFloat( obj ) ); - }, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - - /* eslint-disable no-unused-vars */ - // See https://github.com/eslint/eslint/issues/6125 - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - DOMEval( code ); - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE <=9 - 11, Edge 12 - 13 - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.3 - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-08-08 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - disabledAncestor = addCombinator( - function( elem ) { - return elem.disabled === true && ("form" in elem || "label" in elem); - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - disabledAncestor( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( preferredDoc !== document && - (subWindow = document.defaultView) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( el ) { - el.className = "i"; - return !el.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( el ) { - el.appendChild( document.createComment("") ); - return !el.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID filter and find - if ( support.getById ) { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( (elem = elems[i++]) ) { - node = elem.getAttributeNode("id"); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( el ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll(":enabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll(":disabled").length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( el ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return (sel + "").replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( (oldCache = uniqueCache[ key ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( el ) { - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( el ) { - return el.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Simple selector that can be filtered directly, removing non-Elements - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - // Complex selector, compare the two sets, removing non-Elements - qualifier = jQuery.filter( qualifier, elements ); - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; - } ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( nodeName( elem, "iframe" ) ) { - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( jQuery.isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - jQuery.isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ jQuery.camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ jQuery.camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( jQuery.camelCase ); - } else { - key = jQuery.camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - jQuery.contains( elem.ownerDocument, elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - -var swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - do { - - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); - -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE <=9 only - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
    " ], - col: [ 2, "", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - _default: [ 0, "", "" ] -}; - -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); -var documentElement = document.documentElement; - - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 only -// See #13393 for more info -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: jQuery.isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - - // For checkable types, fire native event so checked state will be right - trigger: function() { - if ( rcheckableType.test( this.type ) && - this.click && nodeName( this, "input" ) ) { - - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - /* eslint-disable max-len */ - - // See https://github.com/eslint/eslint/issues/3229 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - - /* eslint-enable */ - - // Support: IE <=10 - 11, Edge 12 - 13 - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( ">tbody", elem )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rmargin = ( /^margin/ ); - -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - div.style.cssText = - "box-sizing:border-box;" + - "position:relative;display:block;" + - "margin:auto;border:1px;padding:1px;" + - "top:1%;width:50%"; - div.innerHTML = ""; - documentElement.appendChild( container ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = divStyle.marginLeft === "2px"; - boxSizingReliableVal = divStyle.width === "4px"; - - // Support: Android 4.0 - 4.3 only - // Some styles come back with percentage values, even though they shouldn't - div.style.marginRight = "50%"; - pixelMarginRightVal = divStyle.marginRight === "4px"; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + - "padding:0;margin-top:1px;position:absolute"; - container.appendChild( div ); - - jQuery.extend( support, { - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelMarginRight: function() { - computeStyleTests(); - return pixelMarginRightVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }, - - cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style; - -// Return a css property mapped to a potentially vendor prefixed property -function vendorPropName( name ) { - - // Shortcut for names that are not vendor prefixed - if ( name in emptyStyle ) { - return name; - } - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a property mapped along what jQuery.cssProps suggests or to -// a vendor prefixed property. -function finalPropName( name ) { - var ret = jQuery.cssProps[ name ]; - if ( !ret ) { - ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; - } - return ret; -} - -function setPositiveNumber( elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i, - val = 0; - - // If we already have the right measurement, avoid augmentation - if ( extra === ( isBorderBox ? "border" : "content" ) ) { - i = 4; - - // Otherwise initialize for horizontal or vertical properties - } else { - i = name === "width" ? 1 : 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // At this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - - // At this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // At this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with computed style - var valueIsBorderBox, - styles = getStyles( elem ), - val = curCSS( elem, name, styles ), - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test( val ) ) { - return val; - } - - // Check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && - ( support.boxSizingReliable() || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - - // Use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - "float": "cssFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - if ( type === "number" ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = jQuery.camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - } ) : - getWidthOrHeight( elem, name, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = extra && getStyles( elem ), - subtract = extra && augmentWidthOrHeight( - elem, - name, - extra, - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles - ); - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ name ] = value; - value = jQuery.css( elem, name ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && - ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || - jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = jQuery.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 13 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( jQuery.isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - jQuery.proxy( result.stop, result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = jQuery.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( jQuery.isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; - - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( jQuery.isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; - - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( type === "string" ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = value.match( rnothtmlwhite ) || []; - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, isFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup contextmenu" ).split( " " ), - function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; -} ); - -jQuery.fn.extend( { - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -} ); - - - - -support.focusin = "onfocusin" in window; - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = jQuery.now(); - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = jQuery.isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( jQuery.isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match == null ? null : match; - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 13 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available, append data to url - if ( s.data ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - - -jQuery._evalUrl = function( url ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - "throws": true - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( jQuery.isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( "