diff options
author | Yaco <franco@reevo.org> | 2019-08-12 15:33:43 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2019-08-12 15:33:43 -0300 |
commit | f45e8802d7e6583f4ad3382540b8c61f1a324975 (patch) | |
tree | b0ea93bcec6500f3434fa91b2c88c2e71695854f /www/wiki | |
parent | 7825f9cd26100ff47f2c61aae8cc121ee7c48030 (diff) |
agrega extension MsUpload
Diffstat (limited to 'www/wiki')
89 files changed, 2401 insertions, 0 deletions
diff --git a/www/wiki/LocalSettings.Reevo.php b/www/wiki/LocalSettings.Reevo.php index 5e0f574f..c080b226 100644 --- a/www/wiki/LocalSettings.Reevo.php +++ b/www/wiki/LocalSettings.Reevo.php @@ -283,6 +283,16 @@ $wgUploadWizardConfig = array( 'fileExtensions' => $wgFileExtensions // omitting this may cause errors ); +## MsUpload + +wfLoadExtension( 'MsUpload' ); +$wgMSU_useDragDrop = true; // Should the drag & drop area be shown? (Not set by default) +$wgMSU_showAutoCat = true; // Files uploaded while editing a category page will be added to that category +$wgMSU_checkAutoCat = true; // Whether the checkbox for adding a category to a page is checked by default +$wgMSU_useMsLinks = false; // Insert links in Extension:MsLinks style? +$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox +$wgMSU_imgParams = 'thumb|none'; // Any image parameter separated by a semicolon. Examples are: {width}px, left, right, center, none, border, frameless, frame, thumb etc etc + ###### Extensiones propias ## ImportarPerfil diff --git a/www/wiki/extensions/MsUpload/.gitignore b/www/wiki/extensions/MsUpload/.gitignore new file mode 100644 index 00000000..bb262bec --- /dev/null +++ b/www/wiki/extensions/MsUpload/.gitignore @@ -0,0 +1,7 @@ +*~ +*.kate-swp +.*.swp +.DS_Store +/composer.lock +/node_modules/ +/vendor/ diff --git a/www/wiki/extensions/MsUpload/.gitreview b/www/wiki/extensions/MsUpload/.gitreview new file mode 100644 index 00000000..9a08d4bd --- /dev/null +++ b/www/wiki/extensions/MsUpload/.gitreview @@ -0,0 +1,6 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/MsUpload.git +track=1 +defaultrebase=0 diff --git a/www/wiki/extensions/MsUpload/.jscsrc b/www/wiki/extensions/MsUpload/.jscsrc new file mode 100644 index 00000000..5e5db932 --- /dev/null +++ b/www/wiki/extensions/MsUpload/.jscsrc @@ -0,0 +1,7 @@ +{ + "preset": "wikimedia", + "requireVarDeclFirst": null, + "requireMultipleVarDecl": null, + "requireCamelCaseOrUpperCaseIdentifiers": null, + "disallowEmptyBlocks": null +} diff --git a/www/wiki/extensions/MsUpload/.jshintrc b/www/wiki/extensions/MsUpload/.jshintrc new file mode 100644 index 00000000..df102628 --- /dev/null +++ b/www/wiki/extensions/MsUpload/.jshintrc @@ -0,0 +1,25 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": true, + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false, + "o": false, + "plupload": false + } +} diff --git a/www/wiki/extensions/MsUpload/.phpcs.xml b/www/wiki/extensions/MsUpload/.phpcs.xml new file mode 100644 index 00000000..b00fdb8f --- /dev/null +++ b/www/wiki/extensions/MsUpload/.phpcs.xml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<ruleset> + <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> + <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" /> + <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" /> + <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" /> + <exclude name="Squiz.Scope.MethodScope.Missing" /> + </rule> + <file>.</file> + <arg name="extensions" value="php,php5,inc" /> + <arg name="encoding" value="utf8" /> + <exclude-pattern>vendor</exclude-pattern> +</ruleset> diff --git a/www/wiki/extensions/MsUpload/CODE_OF_CONDUCT.md b/www/wiki/extensions/MsUpload/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..d8e5d087 --- /dev/null +++ b/www/wiki/extensions/MsUpload/CODE_OF_CONDUCT.md @@ -0,0 +1 @@ +The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct). diff --git a/www/wiki/extensions/MsUpload/COPYING b/www/wiki/extensions/MsUpload/COPYING new file mode 100644 index 00000000..d159169d --- /dev/null +++ b/www/wiki/extensions/MsUpload/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/www/wiki/extensions/MsUpload/Gruntfile.js b/www/wiki/extensions/MsUpload/Gruntfile.js new file mode 100644 index 00000000..c12e6120 --- /dev/null +++ b/www/wiki/extensions/MsUpload/Gruntfile.js @@ -0,0 +1,37 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**', + '!vendor/**', + '!plupload/**' + ] + }, + jscs: { + src: '<%= jshint.all %>' + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**', + '!vendor/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/www/wiki/extensions/MsUpload/MsUpload.body.php b/www/wiki/extensions/MsUpload/MsUpload.body.php new file mode 100644 index 00000000..8536729c --- /dev/null +++ b/www/wiki/extensions/MsUpload/MsUpload.body.php @@ -0,0 +1,74 @@ +<?php + +class MsUpload { + + static function start() { + global $wgOut, $wgScriptPath, $wgMSU_useMsLinks, $wgMSU_showAutoCat, $wgMSU_checkAutoCat, + $wgMSU_confirmReplace, $wgMSU_useDragDrop, $wgMSU_imgParams, $wgFileExtensions, + $wgMSU_uploadsize, $wgMSU_flash_swf_url, $wgMSU_silverlight_xap_url; + + $wgMSU_flash_swf_url = __DIR__ . '/plupload/Moxie.swf'; + $wgMSU_silverlight_xap_url = __DIR__ . '/plupload/Moxie.xap'; + + $wgOut->addJsConfigVars( [ + 'wgFileExtensions' => array_values( array_unique( $wgFileExtensions ) ), + ] ); + + if ( $wgMSU_imgParams ) { + $wgMSU_imgParams = '|' . $wgMSU_imgParams; + } + + $msuVars = [ + 'scriptPath' => $wgScriptPath, + 'flash_swf_url' => $wgMSU_flash_swf_url, + 'silverlight_xap_url' => $wgMSU_silverlight_xap_url, + 'useDragDrop' => $wgMSU_useDragDrop, + 'showAutoCat' => $wgMSU_showAutoCat, + 'checkAutoCat' => $wgMSU_checkAutoCat, + 'useMsLinks' => $wgMSU_useMsLinks, + 'confirmReplace' => $wgMSU_confirmReplace, + 'imgParams' => $wgMSU_imgParams, + 'uploadsize' => $wgMSU_uploadsize, + ]; + + $wgOut->addJsConfigVars( 'msuVars', $msuVars ); + $wgOut->addModules( 'ext.MsUpload' ); + + return true; + } + + static function saveCat( $filename, $category ) { + global $wgContLang, $wgUser; + $mediaString = strtolower( $wgContLang->getNsText( NS_FILE ) ); + $title = $mediaString . ':' . $filename; + $text = "\n[[" . $category . "]]"; + $wgEnableWriteAPI = true; + $params = new FauxRequest( [ + 'action' => 'edit', + 'section' => 'new', + 'title' => $title, + 'text' => $text, + 'token' => $wgUser->editToken(), // $token."%2B%5C", + ], true, $_SESSION ); + $enableWrite = true; + $api = new ApiMain( $params, $enableWrite ); + $api->execute(); + $data = $api->getResult()->getResultData(); + return $mediaString; + + /* The code below does the same and is better, + but for some reason it doesn't update the categorylinks table, so it's no good + global $wgContLang, $wgUser; + $title = Title::newFromText( $filename, NS_FILE ); + $page = new WikiPage( $title ); + $text = $page->getText(); + $text .= "\n\n[[" . $category . "]]"; + $summary = wfMessage( 'msu-comment' ); + $status = $page->doEditContent( $text, $summary, EDIT_UPDATE, false, $wgUser ); + $value = $status->value; + $revision = $value['revision']; + $page->doEditUpdates( $revision, $wgUser ); + return true; + */ + } +} diff --git a/www/wiki/extensions/MsUpload/MsUpload.css b/www/wiki/extensions/MsUpload/MsUpload.css new file mode 100644 index 00000000..49120121 --- /dev/null +++ b/www/wiki/extensions/MsUpload/MsUpload.css @@ -0,0 +1,250 @@ +#msupload-container { + display: inline-block; + padding: 3px; + line-height: normal; + vertical-align: middle; +} + +#msupload-container.start-loading { + background: url(images/msu-loading.png) no-repeat 5px 5px; +} + +#msupload-select { + background: url(images/msu-upload-button.png) no-repeat 0; + width: 20px; + height: 20px; + cursor: pointer; +} + +#msupload-select:hover { + opacity: 0.7; + zoom: 1; +} + +#msupload-div { + padding: 0; + background: #657d91; + border: 1px solid #aaa; + z-index: 0; +} + +#msupload-div a { + cursor: pointer; +} + +#msupload-div.nodragdrop { + border: none; +} + +#msupload-dropzone { + margin: 3px; + padding: 5px; + border: 1px dashed #ddd; + text-align: center; + height: 20px; + color: #fff; +} + +.drop-over { + background: #7092ad; + border: 3px dashed #aaa; +} + +#msupload-list { + list-style: none; + margin: 0; + padding: 0; +} + +#msupload-list .file { + background: #dee9e9; + border-top: 1px solid #657d91; + margin: 0; + padding: 10px; + position: relative; +} + +#msupload-list .green { + background: #a8dba8; +} + +#msupload-list .yellow { + background: #f9cdad; +} + +#msupload-list .red { + background: #f9cdad; +} + +#msupload-list .file .file-type { + padding: 10px; + background: url(images/msu-globe.png) no-repeat 0 0; + overflow: hidden; + position: absolute; +} + +#msupload-list .file .image { + background: url(images/msu-thumb-image.png) no-repeat 0 0; +} + +#msupload-list .file .video { + background: url(images/msu-thumb-video.png) no-repeat 0 0; +} + +#msupload-list .file .pdf { + background: url(images/msu-thumb-pdf.png) no-repeat 0 0; +} + +#msupload-list .file .document { + background: url(images/msu-thumb-document.png) no-repeat 0 0; +} + +#msupload-list .file .ok { + background: url(images/msu-ok.png) no-repeat 0 0; +} + +#msupload-list .file .error { + background: url(images/msu-error.png) no-repeat 0 0; +} + +#msupload-list .file .file-load { + background: none; + cursor: pointer; + display: block; + margin: 0; + padding: 0; + top: 5px; left: 5px; +} + +#msupload-list .file .file-load canvas { + display: block; + max-width: 30px; + min-height: 30px; +} + +#msupload-list .file .file-name { + font-weight: bold; + margin-left: 35px; + padding: 3px; +} + +#msupload-list .file .file-name:hover { + padding: 3px; + background-color: white; +} + +#msupload-list .file .file-size { + color: #666; + margin: 0 10px; +} + + +#msupload-list .file-progress-state { + float: right; +} + +#msupload-list .file .file-cancel { + background: url(images/msu-close.png) no-repeat 0 0; + cursor: pointer; + float: right; + height: 20px; + margin-left: 5px; + padding: 5px 10px; +} + +#msupload-list .file .file-cancel:hover { + opacity: 0.7; +} + +#msupload-list .file .file-loading { + background: url(images/msu-loading.png) no-repeat 0 0; + margin: 0 5px; + padding: 1px 8px; +} + +#msupload-list .file .file-warning { + color: #514721; + font-size: 80%; + padding: 2px 5px; + font-style: italic; +} + +#msupload-list .file .file-warning p { + display: inline; +} + +#msupload-list .file .file-warning div.thumb { + display: none; + position: absolute; + right: 10px; +} +#msupload-list .file .file-warning div.thumbinner { + background: none; + border: none; + overflow: visible; + padding: 0; +} + +#msupload-list .file .file-name-input { + background: white; + border: none; + display: inline; + font: inherit; + font-weight: bold; + line-height: normal; + margin-left: 35px; + outline: none; + padding: 3px; +} + +#msupload-list .file .file-extension { + font-weight: bold; +} + +#msupload-list .file .file-size { + color: #666; +} + +#msupload-list .file .file-error { + color: #8a1f11; +} + +.msupload-check-index { + float: right; + margin-top: 7px; +} + +.msupload-check-span { + float: right; + color: #444; +} + +#msupload-bottom { + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); + padding: 8px; + height: 22px; +} + +#msupload-bottom a { + color: white; + font-weight: bold; + margin-right: 20px; +} + +#msupload-bottom #msupload-files { + padding: 3px 0 3px 25px; + background: url(images/msu-upload-icon.png) no-repeat 0 0; + height: 12px; +} + +#msupload-bottom .spacer { + border-left: 1px solid #ccc; + margin: 0 8px; + width: 1px; + background-color: #ccc; +} + +#wikiEditor-section-advanced .options { + z-index: 1; +} + diff --git a/www/wiki/extensions/MsUpload/MsUpload.js b/www/wiki/extensions/MsUpload/MsUpload.js new file mode 100644 index 00000000..7836e22d --- /dev/null +++ b/www/wiki/extensions/MsUpload/MsUpload.js @@ -0,0 +1,510 @@ +( function ( $, mw ) { + var msuVars = mw.config.get( 'msuVars' ); + var MsUpload = { + + fileError: function ( uploader, file, errorText ) { + file.li.warning.text( errorText ); + file.li.addClass( 'yellow' ); + file.li.type.addClass( 'error' ); + file.li.click( function () { // Remove li at click + file.li.fadeOut( 'fast', function () { + $( this ).remove(); + uploader.trigger( 'CheckFiles' ); + } ); + } ); + }, + + galleryArray: [], + insertGallery: function () { + var galleryText = 'File:' + MsUpload.galleryArray.join( '\nFile:' ); + MsUpload.insertText( '<gallery>\n' + galleryText + '\n</gallery>\n' ); + }, + + filesArray: [], + insertFiles: function () { + MsUpload.insertText( '[[File:' + MsUpload.filesArray.join( ']]\n[[File:' ) + ']]\n' ); + }, + + insertLinks: function () { + if ( msuVars.useMsLinks === true ) { + MsUpload.insertText( '*{{#l:' + MsUpload.filesArray.join( '}}\n*{{#l:' ) + '}}\n' ); + } else { + MsUpload.insertText( '*[[:File:' + MsUpload.filesArray.join( ']]\n*[[:File:' ) + ']]\n' ); + } + }, + + /** + * Add text to selection in the main textarea. + * + * @param {string} text + */ + insertText: function ( text ) { + $( '#wpTextbox1' ).textSelection( 'encapsulateSelection', { pre: text } ); + }, + + unconfirmedReplacements: 0, + warningText: function ( fileItem, warning, uploader ) { + switch ( warning ) { + case '': + case ' ': + case ' ': + $( fileItem.warning ).empty() + .siblings( '.file-name' ).show() + .siblings( '.file-name-input' ).hide() + .siblings( '.file-extension' ).hide(); + break; + + case 'Error: Unknown result from API': + case 'Error: Request failed': + $( fileItem.warning ).text( warning ); + break; + + default: + // IMPORTANT! The code below assumes that every warning not captured by the code above is about a file being replaced + $( fileItem.warning ).html( warning ); + + // We break when the particula warning when a file name starts with IMG + if ( warning.indexOf( 'The name of the file you are uploading begins with' ) === 0 ) { + break; // When the file name starts with "IMG", MediaWiki issues this warning. Display it and continue. + } + if ( warning.indexOf( 'Der Dateiname beginnt mit' ) === 0 ) { + break; // Make it work for German too. Must be done this way because the error response doesn't include an error code. + } + + // When hovering over the link to the file about to be replaced, show the thumbnail + $( fileItem.warning ).find( 'a' ).mouseover( function () { + $( fileItem.warning ).find( 'div.thumb' ).show(); + } ).mouseout( function () { + $( fileItem.warning ).find( 'div.thumb' ).hide(); + } ); + + /** + * If a file with the same name already exists, add a checkbox to confirm the replacement + * This checkbox will also appear when the file name differs only in the file extension + * so the confirmation message must be kept generic enough + */ + if ( msuVars.confirmReplace ) { + + MsUpload.unconfirmedReplacements++; + + var title = $( fileItem.warning ).siblings( '.file-name' ); + + var checkbox = $( '<input>' ).attr( 'type', 'checkbox' ).click( function () { + if ( $( this ).is( ':checked' ) ) { + title.show().next().hide(); + MsUpload.unconfirmedReplacements--; + } else { + title.hide().next().show().select(); + MsUpload.unconfirmedReplacements++; + } + uploader.trigger( 'CheckFiles' ); + } ); + $( '<label>' ).append( checkbox ).append( mw.msg( 'msu-continue' ) ).appendTo( fileItem.warning ); + } + break; + } + uploader.trigger( 'CheckFiles' ); + fileItem.loading.hide(); + }, + + checkUploadWarning: function ( filename, fileItem, uploader ) { + $.ajax( { url: mw.util.wikiScript( 'api' ), dataType: 'json', type: 'POST', + data: { + format: 'json', + action: 'query', + titles: 'File:' + filename, + prop: 'imageinfo', + iiprop: 'uploadwarning' + }, success: function ( data ) { + if ( data && data.query && data.query.pages ) { + var pages = data.query.pages; + $.each( pages, function ( index, value ) { + MsUpload.warningText( fileItem, value.imageinfo[ 0 ].html, uploader ); // Pass on the warning message + return false; // Break out + } ); + } else { + MsUpload.warningText( fileItem, 'Error: Unknown result from API', uploader ); + } + }, error: function () { + MsUpload.warningText( fileItem, 'Error: Request failed', uploader ); + } } ); + }, + + build: function ( file, uploader ) { + + // Auto category + if ( msuVars.showAutoCat && mw.config.get( 'wgNamespaceNumber' ) === 14 ) { + file.cat = msuVars.checkAutoCat; // Predefine + $( '<input>' ).attr( { + 'class': 'msupload-check-index', + type: 'checkbox', + checked: file.cat + } ).change( function () { + file.cat = this.checked; // Save + } ).appendTo( file.li ); + + $( '<span>' ).attr( 'class', 'msupload-check-span' ).text( mw.config.get( 'wgPageName' ).replace( /_/g, ' ' ) ).appendTo( file.li ); + } + + // Insert an input field for changing the file title + var fileNameInput = $( '<input>' ).attr( { + 'class': 'file-name-input', + size: file.name.length, + name: 'filename', + value: file.name.substr( 0, file.name.length - file.extension.length - 1 ) + } ).change( function () { + file.name = this.value + '.' + file.extension; + $( this ).prev().text( file.name ); + MsUpload.unconfirmedReplacements = 0; // Hack! If the user renames a file to avoid replacing it, this forces the Upload button to appear, but it also does when a user just renames a file that wasn't about to replace another + MsUpload.checkUploadWarning( this.value, file.li, uploader ); + } ).keydown( function ( event ) { + // For convenience, when pressing enter, save the new title + if ( event.keyCode === 13 ) { + $( this ).change(); + event.preventDefault(); + } + } ).hide().insertAfter( file.li.title ); + + var fileExtension = $( '<span>' ).addClass( 'file-extension' ).text( '.' + file.extension ).hide().insertAfter( fileNameInput ); + + file.li.title.click( function () { + file.li.title.hide(); + fileNameInput.show().select(); + fileExtension.show(); + } ); + + // Insert the progress bar + var progressState = $( '<span>' ).addClass( 'file-progress-state' ); + file.li.children().first().after( progressState ); + }, + + checkExtension: function ( file, uploader ) { + mw.log( file ); + + file.li.loading.show(); + file.extension = file.name.split( '.' ).pop().toLowerCase(); + + if ( $.inArray( file.extension, mw.config.get( 'wgFileExtensions' ) ) !== -1 ) { + switch ( file.extension ) { + case 'jpg': case 'jpeg': case 'png': case 'gif': case 'bmp': case 'tif': case 'tiff': + file.group = 'image'; + try { + var image = new o.Image(); + image.onload = function () { + this.embed( file.li.type.get( 0 ), { + width: 30, + height: 30, + crop: true + } ); + }; + image.load( file.getSource() ); + file.li.type.addClass( 'file-load' ); + } catch ( event ) { + file.li.type.addClass( 'image' ); + } + break; + + case 'mov': case 'avi': + file.group = 'video'; + file.li.type.addClass( 'video' ); + break; + + case 'pdf': + file.li.type.addClass( 'pdf' ); + break; + } + MsUpload.checkUploadWarning( file.name, file.li, uploader ); + + file.li.cancel = $( '<span>' ).attr( { 'class': 'file-cancel', title: mw.msg( 'msu-cancel-upload' ) } ); + file.li.cancel.click( function () { + uploader.removeFile( file ); + if ( file.group === 'image' ) { + var index = $.inArray( file.name, MsUpload.galleryArray ); + if ( index !== -1 ) { + MsUpload.galleryArray.splice( index, 1 ); + } + uploader.trigger( 'CheckFiles' ); + } + file.li.fadeOut( 'fast', function () { + $( this ).remove(); + uploader.trigger( 'CheckFiles' ); + } ); + } ); + file.li.prepend( file.li.cancel ); + + MsUpload.build( file, uploader ); + } else { // Wrong datatype + file.li.loading.hide( 'fast', function () { + uploader.removeFile( file ); + uploader.refresh(); + } ); + MsUpload.fileError( uploader, file, mw.msg( 'msu-ext-not-allowed', mw.config.get( 'wgFileExtensions' ).length ) + ' ' + mw.config.get( 'wgFileExtensions' ).join( ',' ) ); + } + }, + + cleanAll: function () { + MsUpload.galleryArray.length = 0; // Reset + MsUpload.uploader.splice( 0, MsUpload.uploader.files.length ); + $( '#msupload-list .file' ).hide( 'fast', function () { + $( this ).remove(); + $( '#msupload-insert-gallery' ).unbind( 'click' ); + $( '#msupload-bottom' ).hide(); + } ); + }, + + uploader: null, + createUploader: function () { + // Define the GUI elements + var uploadDiv = $( '<div>' ).attr( 'id', 'msupload-div' ), + uploadContainer = $( '<div>' ).attr( { id: 'msupload-container', 'class': 'start-loading', title: mw.msg( 'msu-button-title' ) } ), + uploadButton = $( '<div>' ).attr( 'id', 'msupload-select' ), + statusDiv = $( '<div>' ).attr( 'id', 'msupload-status' ).hide(), + uploadList = $( '<ul>' ).attr( 'id', 'msupload-list' ), + bottomDiv = $( '<div>' ).attr( 'id', 'msupload-bottom' ).hide(), + startButton = $( '<a>' ).attr( 'id', 'msupload-files' ).hide(), + cleanAll = $( '<a>' ).attr( 'id', 'msupload-clean-all' ).text( mw.msg( 'msu-clean-all' ) ).hide(), + galleryInsert = $( '<a>' ).attr( 'id', 'msupload-insert-gallery' ).hide(), + filesInsert = $( '<a>' ).attr( 'id', 'msupload-insert-files' ).hide(), + linksInsert = $( '<a>' ).attr( 'id', 'msupload-insert-links' ).hide(), + uploadDrop = $( '<div>' ).attr( 'id', 'msupload-dropzone' ).hide(); + + // Add them to the DOM + bottomDiv.append( startButton, cleanAll, galleryInsert, filesInsert, linksInsert ); + uploadDiv.append( statusDiv, uploadDrop, uploadList, bottomDiv ); + $( '#wikiEditor-ui-toolbar' ).after( uploadDiv ); + uploadContainer.append( uploadButton ); + $( '#wikiEditor-ui-toolbar .group-insert' ).append( uploadContainer ); + + // Create the Uploader object + MsUpload.uploader = new plupload.Uploader( { + runtimes: 'html5,flash,silverlight,html4', + browse_button: 'msupload-select', + container: 'msupload-container', + max_file_size: msuVars.uploadsize, + drop_element: 'msupload-dropzone', + url: msuVars.scriptPath + '/api.php', + flash_swf_url: msuVars.flash_swf_url, + silverlight_xap_url: msuVars.silverlight_xap_url + } ); + + // Bind events + MsUpload.uploader.bind( 'PostInit', MsUpload.onPostInit ); + MsUpload.uploader.bind( 'FilesAdded', MsUpload.onFilesAdded ); + MsUpload.uploader.bind( 'QueueChanged', MsUpload.onQueueChanged ); + MsUpload.uploader.bind( 'StateChanged', MsUpload.onStateChanged ); + MsUpload.uploader.bind( 'FilesRemoved', MsUpload.onFilesRemoved ); + MsUpload.uploader.bind( 'BeforeUpload', MsUpload.onBeforeUpload ); + MsUpload.uploader.bind( 'UploadProgress', MsUpload.onUploadProgress ); + MsUpload.uploader.bind( 'Error', MsUpload.onError ); + MsUpload.uploader.bind( 'FileUploaded', MsUpload.onFileUploaded ); + MsUpload.uploader.bind( 'CheckFiles', MsUpload.onCheckFiles ); + MsUpload.uploader.bind( 'UploadComplete', MsUpload.onCheckFiles ); + + startButton.click( function ( event ) { + MsUpload.uploader.start(); + event.preventDefault(); + } ); + + // Initialise + MsUpload.uploader.init(); + }, + + onPostInit: function ( uploader ) { + mw.log( 'MsUpload DEBUG: runtime: ' + uploader.runtime + ' features: ' + JSON.stringify( uploader.features ) ); + $( '#msupload-container' ).removeClass( 'start-loading' ); + if ( uploader.features.dragdrop && msuVars.useDragDrop ) { + $( '#msupload-dropzone' ).text( mw.msg( 'msu-dropzone' ) ).show(); + $( '#msupload-dropzone' ).bind( 'dragover', function () { + $( this ).addClass( 'drop-over' ).css( 'padding', 20 ); + } ).bind( 'dragleave', function () { + $( this ).removeClass( 'drop-over' ).css( 'padding', 0 ); + } ).bind( 'drop', function () { + $( this ).removeClass( 'drop-over' ).css( 'padding', 0 ); + } ); + } else { + $( '#msupload-div' ).addClass( 'nodragdrop' ); + } + }, + + onFilesAdded: function ( uploader, files ) { + $.each( files, function ( i, file ) { + // iOS6 by SLBoat + if ( ( navigator.platform === 'iPad' || navigator.platform === 'iPhone' ) ) { + if ( file.name.indexOf( 'image' ) !== -1 && file.name.length < 11 ) { + var heute = new Date(), + fileNameApple = navigator.platform + '_image_' + heute.getFullYear() + '-' + heute.getMonth() + '-' + heute.getDate() + '-' + heute.getTime(); // Because each image is named 'image.jpg' in iOS6 + file.name = fileNameApple + '_' + i + '.' + file.name.split( '.' ).pop(); // image_Y-M-D_0.jpg + } + } + file.li = $( '<li>' ).attr( 'id', file.id ).addClass( 'file' ).appendTo( $( '#msupload-list' ) ); + file.li.type = $( '<span>' ).addClass( 'file-type' ).appendTo( file.li ); + file.li.title = $( '<span>' ).addClass( 'file-name' ).text( file.name ).appendTo( file.li ); + file.li.size = $( '<span>' ).addClass( 'file-size' ).text( plupload.formatSize( file.size ) ).appendTo( file.li ); + file.li.loading = $( '<span>' ).addClass( 'file-loading' ).appendTo( file.li ); + file.li.warning = $( '<span>' ).addClass( 'file-warning' ).appendTo( file.li ); + MsUpload.checkExtension( file, uploader ); + } ); + uploader.refresh(); // Reposition Flash/Silverlight + uploader.trigger( 'CheckFiles' ); + }, + + onQueueChanged: function ( uploader ) { + uploader.trigger( 'CheckFiles' ); + }, + + onStateChanged: function ( uploader ) { + mw.log( uploader.state ); + if ( uploader.files.length === ( uploader.total.uploaded + uploader.total.failed ) ) { + // mw.log( 'State: ' + uploader.files.length ) // All files uploaded + } + }, + + onFilesRemoved: function ( /* uploader, files */ ) { + mw.log( 'Files removed' ); + // uploader.trigger( 'CheckFiles' ); + }, + + onBeforeUpload: function ( uploader, file ) { + file.li.title.text( file.name ).show(); // Show title + $( '#' + file.id + ' .file-name-input' ).hide(); // Hide the file name input + $( '#' + file.id + ' .file-extension' ).hide(); // Hide the file extension + uploader.settings.multipart_params = { + filename: file.name, + token: mw.user.tokens.get( 'editToken' ), + action: 'upload', + ignorewarnings: true, + comment: mw.message( 'msu-comment' ).plain(), + format: 'json' + }; // Set multipart_params + $( '#' + file.id + ' .file-progress-state' ).text( '0%' ); + }, + + onUploadProgress: function ( uploader, file ) { + $( '#' + file.id + ' .file-progress-state' ).text( file.percent + '%' ); + }, + + onError: function ( uploader, error ) { + mw.log( error ); + $( '#' + error.file.id + ' .file-warning' ).html( + 'Error ' + error.code + ', ' + error.message + ( error.file ? ', File: ' + error.file.name : '' ) + ); + $( '#msupload-status' ).append( error.message ); + uploader.refresh(); // Reposition Flash/Silverlight + }, + + onFileUploaded: function ( uploader, file, success ) { + mw.log( success ); + file.li.title.unbind( 'click' ); + file.li.title.unbind( 'mouseover' ); + $( '#' + file.id + ' .file-cancel' ).fadeOut( 'fast' ); + $( '#' + file.id + ' .file-progress-state' ).fadeOut( 'fast' ); + + try { + var result = $.parseJSON( success.response ); + if ( result.error ) { + MsUpload.fileError( uploader, file, result.error.info ); + } else { + file.li.type.addClass( 'ok' ); + file.li.addClass( 'green' ); + file.li.warning.fadeOut( 'fast' ); + + if ( file.cat && mw.config.get( 'wgNamespaceNumber' ) === 14 ) { // Should the categroy be set? + $.get( mw.util.wikiScript(), { + action: 'ajax', + rs: 'MsUpload::saveCat', + rsargs: [ file.name, mw.config.get( 'wgPageName' ) ] + }, 'json' ); + } + $( '<a>' ).text( mw.msg( 'msu-insert-link' ) ).click( function () { + if ( msuVars.useMsLinks === true ) { + MsUpload.insertText( '{{#l:' + file.name + '}}' ); // Insert link + } else { + MsUpload.insertText( '[[:File:' + file.name + ']]' ); // Insert link + } + } ).appendTo( file.li ); + if ( file.group === 'image' ) { + MsUpload.galleryArray.push( file.name ); + if ( MsUpload.galleryArray.length === 2 ) { // Bind click function only the first time + $( '#msupload-insert-gallery' ).click( MsUpload.insertGallery ).text( mw.msg( 'msu-insert-gallery' ) ).show(); + } + $( '<span>' ).text( ' | ' ).appendTo( file.li ); + $( '<a>' ).text( mw.msg( 'msu-insert-image' ) ).click( function () { + MsUpload.insertText( '[[File:' + file.name + msuVars.imgParams + ']]' ); + } ).appendTo( file.li ); + } else if ( file.group === 'video' ) { + $( '<span>' ).text( ' | ' ).appendTo( file.li ); + $( '<a>' ).text( mw.msg( 'msu-insert-video' ) ).click( function () { + MsUpload.insertText( '[[File:' + file.name + ']]' ); + } ).appendTo( file.li ); + } + MsUpload.filesArray.push( file.name ); + if ( MsUpload.filesArray.length === 2 ) { // Bind click function only the first time + $( '#msupload-insert-files' ).click( MsUpload.insertFiles ).text( mw.msg( 'msu-insert-files' ) ).show(); + $( '#msupload-insert-links' ).click( MsUpload.insertLinks ).text( mw.msg( 'msu-insert-links' ) ).show(); + } + } + } catch ( error ) { + MsUpload.fileError( uploader, file, 'Error: ' + success.response.replace( /(<([^>]+)>)/ig, '' ) ); // Remove html tags + } + uploader.removeFile( file ); // For preventing a second upload afterwards + }, + + onCheckFiles: function ( uploader ) { + var filesLength = uploader.files.length, + listLength = $( '#msupload-list li' ).length; + + mw.log( 'files: ' + filesLength + ', gallery: ' + MsUpload.galleryArray.length + ', list: ' + listLength ); + + if ( filesLength ) { + $( '#msupload-bottom' ).show(); + if ( filesLength === 1 ) { + $( '#msupload-files' ).text( mw.msg( 'msu-upload-this' ) ).show(); + } else { + $( '#msupload-files' ).text( mw.msg( 'msu-upload-all' ) ).show(); + } + } else { + $( '#msupload-files' ).hide(); + } + + if ( MsUpload.unconfirmedReplacements ) { + $( '#msupload-files' ).hide(); + } + + if ( MsUpload.filesArray.length > 1 ) { + $( '#msupload-insert-files' ).show(); + $( '#msupload-insert-links' ).show(); + } else { + $( '#msupload-insert-files' ).hide(); + $( '#msupload-insert-links' ).hide(); + } + + if ( MsUpload.galleryArray.length > 1 ) { + $( '#msupload-insert-gallery' ).show(); + $( '#msupload-bottom' ).show(); + } else { + $( '#msupload-insert-gallery' ).hide(); + } + + if ( listLength ) { + $( '#msupload-bottom' ).show(); + $( '#msupload-clean-all' ).text( mw.msg( 'msu-clean-all' ) ).click( MsUpload.cleanAll ).show(); + } else { + $( '#msupload-bottom' ).hide(); + } + uploader.refresh(); // Reposition Flash/Silverlight + }, + + init: function () { + if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) { + mw.loader.using( 'user.options', function () { + if ( mw.user.options.get( 'usebetatoolbar' ) ) { + $.when( mw.loader.using( 'ext.wikiEditor' ), $.ready ) + .then( MsUpload.createUploader ); + } + } ); + } + } + }; + + $( MsUpload.init ); +}( jQuery, mediaWiki ) ); diff --git a/www/wiki/extensions/MsUpload/MsUpload.php b/www/wiki/extensions/MsUpload/MsUpload.php new file mode 100644 index 00000000..12b03cc0 --- /dev/null +++ b/www/wiki/extensions/MsUpload/MsUpload.php @@ -0,0 +1,15 @@ +<?php + +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'MsUpload' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['MsUpload'] = __DIR__ . '/i18n'; + /* wfWarn( + 'Deprecated PHP entry point used for MsUpload extension. ' . + 'Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return; +} else { + die( 'This version of the MsUpload extension requires MediaWiki 1.25+' ); +} diff --git a/www/wiki/extensions/MsUpload/README.md b/www/wiki/extensions/MsUpload/README.md new file mode 100644 index 00000000..2db433e8 --- /dev/null +++ b/www/wiki/extensions/MsUpload/README.md @@ -0,0 +1,28 @@ +# MsUpload + +## Installation + +To install MsUpload, add the following to your LocalSettings.php: + +// If necessary, adjust the global configuration: +$wgEnableWriteAPI = true; // Enable the API +$wgEnableUploads = true; // Enable uploads +$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx','xlsx','pptx','ps','odt','ods','odp','odg'); +$wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.) +$wgVerifyMimeType = false; // May solve problem with uploads of incorrect mime types + +// Then load the extension and configure it as needed. The values shown below are the defaults, so they may be omitted: +wfLoadExtension( 'MsUpload' ); +$wgMSU_useDragDrop = true; +$wgMSU_showAutoCat = true; +$wgMSU_checkAutoCat = true; +$wgMSU_useMsLinks = false; +$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox +$wgMSU_imgParams = '400px'; + +## Credits + +* Developed and coded by Martin Schwindl (wiki@ratin.de) +* Idea, project management and bug fixing by Martin Keyler (wiki@keyler-consult.de) +* Updated, debugged and enhanced by Felipe Schenone (schenonef@gmail.com) +* Some icons by Yusuke Kamiyamane (http://p.yusukekamiyamane.com). All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.
\ No newline at end of file diff --git a/www/wiki/extensions/MsUpload/composer.json b/www/wiki/extensions/MsUpload/composer.json new file mode 100644 index 00000000..e17a4053 --- /dev/null +++ b/www/wiki/extensions/MsUpload/composer.json @@ -0,0 +1,19 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "1.0.0", + "mediawiki/mediawiki-codesniffer": "18.0.0", + "jakub-onderka/php-console-highlighter": "0.3.2", + "mediawiki/minus-x": "0.3.1" + }, + "scripts": { + "fix": [ + "phpcbf", + "minus-x fix ." + ], + "test": [ + "parallel-lint . --exclude vendor --exclude node_modules", + "phpcs -p -s", + "minus-x check ." + ] + } +} diff --git a/www/wiki/extensions/MsUpload/extension.json b/www/wiki/extensions/MsUpload/extension.json new file mode 100644 index 00000000..9de42fb9 --- /dev/null +++ b/www/wiki/extensions/MsUpload/extension.json @@ -0,0 +1,70 @@ +{ + "name": "MsUpload", + "version": "12.0", + "author": [ + "[mailto:wiki@ratin.de Martin Schwindl]", + "[mailto:wiki@keyler-consult.de Martin Keyler]", + "[https://www.mediawiki.org/wiki/User:Sophivorus Felipe Schenone]" + ], + "url": "https://www.mediawiki.org/wiki/Extension:MsUpload", + "descriptionmsg": "msu-desc", + "license-name": "GPL-2.0-or-later", + "type": "parserhook", + "MessagesDirs": { + "MsUpload": [ + "i18n" + ] + }, + "AutoloadClasses": { + "MsUpload": "MsUpload.body.php" + }, + "ResourceModules": { + "ext.MsUpload": { + "scripts": [ + "plupload/plupload.full.min.js", + "MsUpload.js" + ], + "dependencies": "jquery.ui.progressbar", + "styles": "MsUpload.css", + "messages": [ + "msu-button-title", + "msu-insert-link", + "msu-insert-gallery", + "msu-insert-files", + "msu-insert-links", + "msu-insert-image", + "msu-insert-video", + "msu-cancel-upload", + "msu-continue", + "msu-clean-all", + "msu-ext-not-allowed", + "msu-upload-this", + "msu-upload-all", + "msu-dropzone", + "msu-comment" + ] + } + }, + "ResourceFileModulePaths": { + "localBasePath": "", + "remoteExtPath": "MsUpload" + }, + "Hooks": { + "EditPage::showEditForm:initial": [ + "MsUpload::start" + ] + }, + "AjaxExportList": [ + "MsUpload::saveCat" + ], + "config": { + "MSU_useDragDrop": true, + "MSU_showAutoCat": true, + "MSU_checkAutoCat": true, + "MSU_useMsLinks": false, + "MSU_confirmReplace": true, + "MSU_imgParams": "400px", + "MSU_uploadsize": "100mb" + }, + "manifest_version": 1 +} diff --git a/www/wiki/extensions/MsUpload/gitinfo.json b/www/wiki/extensions/MsUpload/gitinfo.json new file mode 100644 index 00000000..a68ba9b4 --- /dev/null +++ b/www/wiki/extensions/MsUpload/gitinfo.json @@ -0,0 +1 @@ +{"headSHA1": "d854ddf61ef29e57f2b95f299bda8e1d24330772\n", "head": "d854ddf61ef29e57f2b95f299bda8e1d24330772\n", "remoteURL": "https://gerrit.wikimedia.org/r/mediawiki/extensions/MsUpload", "branch": "d854ddf61ef29e57f2b95f299bda8e1d24330772\n", "headCommitDate": "1537003811"}
\ No newline at end of file diff --git a/www/wiki/extensions/MsUpload/i18n/af.json b/www/wiki/extensions/MsUpload/i18n/af.json new file mode 100644 index 00000000..42e2aa88 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/af.json @@ -0,0 +1,15 @@ +{ + "@metadata": { + "authors": [ + "Oesjaar" + ] + }, + "msu-insert-link": "Voeg skakel by", + "msu-insert-links": "Voeg alles as skakels in", + "msu-insert-image": "Voeg prent in.", + "msu-cancel-upload": "Kanselleer oplaai.", + "msu-clean-all": "Maak lys skoon", + "msu-ext-not-allowed": "Slegs die volgende lêer tipes word toegelaat:", + "msu-upload-this": "Kliek hier om hierdie lêer op te laai.", + "msu-dropzone": "Laai lêers hier af." +} diff --git a/www/wiki/extensions/MsUpload/i18n/ar.json b/www/wiki/extensions/MsUpload/i18n/ar.json new file mode 100644 index 00000000..b4886e60 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ar.json @@ -0,0 +1,13 @@ +{ + "@metadata": { + "authors": [ + "Mervat Salman", + "محمد أحمد عبد الفتاح", + "ديفيد" + ] + }, + "msu-desc": "يتيح تحميل ملف واحد أو عدة ملفات معاً بسهولة", + "msu-insert-image": "إدراج كصورة", + "msu-insert-video": "أضف فيديو", + "msu-ext-not-allowed": "الملف {{PLURAL:$1|type is|types are}} متاح فقط:" +} diff --git a/www/wiki/extensions/MsUpload/i18n/bcl.json b/www/wiki/extensions/MsUpload/i18n/bcl.json new file mode 100644 index 00000000..b4c04540 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/bcl.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "Geopoet" + ] + }, + "msu-insert-video": "Isingit an sine", + "msu-ext-not-allowed": "An sagunson sana na arog kaining {{PLURAL:$1|tipo|mga tipo}} an pinagtutugot:", + "msu-upload-all": "Ikarga an gabos na mga sagunson", + "msu-dropzone": "Hulugon an mga sagunson digde" +} diff --git a/www/wiki/extensions/MsUpload/i18n/bn.json b/www/wiki/extensions/MsUpload/i18n/bn.json new file mode 100644 index 00000000..ecca2bbf --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/bn.json @@ -0,0 +1,22 @@ +{ + "@metadata": { + "authors": [ + "Aftabuzzaman" + ] + }, + "msu-desc": "একযোগে সহজে একটি ফাইল বা একাধিক ফাইল আপলোড করা সক্ষম করে", + "msu-button-title": "ফাইলসমূহ নির্বাচন করুন", + "msu-insert-link": "লিংক যোগ করো", + "msu-insert-gallery": "গ্যালারি হিসাবে সব সন্নিবেশ করুন", + "msu-insert-files": "ফাইলসমূহ হিসাবে সব সন্নিবেশ করুন", + "msu-insert-links": "লিঙ্ক হিসাবে সব সন্নিবেশ করুন", + "msu-insert-image": "চিত্র হিসেবে সন্নিবেশ করুন", + "msu-insert-video": "ভিডিও সন্নিবেশ করুন", + "msu-cancel-upload": "আপলোড বাতিল করুন", + "msu-clean-all": "তালিকা পরিষ্কার করুন", + "msu-ext-not-allowed": "কেবলমাত্র নিচের ফাইলের {{PLURAL:$1|ধরন|ধরনসমূহ}} অনুমোদিত:", + "msu-upload-this": "এই ফাইল ডাউনলোড করুন", + "msu-upload-all": "সব ফাইল আপলোড করুন", + "msu-dropzone": "এখানে ফাইল ছাড়ুন", + "msu-comment": "এমএসআপলোড দিয়ে ফাইল আপলোডকৃত" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ca.json b/www/wiki/extensions/MsUpload/i18n/ca.json new file mode 100644 index 00000000..f25e8fb0 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ca.json @@ -0,0 +1,23 @@ +{ + "@metadata": { + "authors": [ + "F3RaN", + "Vriullop", + "Jaumeortola" + ] + }, + "msu-desc": "Permet càrregues simples per un o múltiples fitxers simultàniament", + "msu-button-title": "Seleccioneu els fitxers", + "msu-insert-link": "Inserir un enllaç", + "msu-insert-gallery": "Insereix-los tots com a galeria", + "msu-insert-links": "Insereix-los tots com a enllaços", + "msu-insert-image": "Inserir imatge", + "msu-insert-video": "Inserir pel·lícula", + "msu-cancel-upload": "Cancel·lar la càrrega", + "msu-clean-all": "Esborrar la llista", + "msu-ext-not-allowed": "Només {{PLURAL:$1|el següent tipus de fitxer és permès| els següents tipus de fitxer són permesos}}:", + "msu-upload-this": "Carrega aquest fitxer", + "msu-upload-all": "Carrega tots els fitxers", + "msu-dropzone": "Deseu els arxius aquí", + "msu-comment": "Fitxer carregat amb MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ckb.json b/www/wiki/extensions/MsUpload/i18n/ckb.json new file mode 100644 index 00000000..bd429bb6 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ckb.json @@ -0,0 +1,20 @@ +{ + "@metadata": { + "authors": [ + "Pirehelokan" + ] + }, + "msu-button-title": "پەڕگەکان ھەڵبژێرە", + "msu-insert-link": "بەستەر زیاد بکە", + "msu-insert-gallery": "ھەموویان وەکوو گالەری زیاد بکە", + "msu-insert-files": "ھەموویان وەکوو فایل زیاد بکە", + "msu-insert-links": "ھەموویان وەکوو بەستەر زیاد بکە", + "msu-insert-image": "وێنە زیاد بکە", + "msu-insert-video": "فیلم زیاد بکە", + "msu-cancel-upload": "بارکردن پووچەڵ بکەرەوە", + "msu-clean-all": "لیستەکە پاک بکەرەوە", + "msu-ext-not-allowed": "تەنیا ئەم جۆرە فایلانە ڕێگەیان پێ دراوە:", + "msu-upload-this": "ئەم پەڕگەیە بار بکە", + "msu-upload-all": "گشت پەڕگەکان بار بکە", + "msu-dropzone": "فایلەکان بخەرە ئێرە" +} diff --git a/www/wiki/extensions/MsUpload/i18n/cu.json b/www/wiki/extensions/MsUpload/i18n/cu.json new file mode 100644 index 00000000..dc622d4a --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/cu.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Илья Драконов" + ] + }, + "msu-upload-this": "Загрузить этот файл", + "msu-upload-all": "Загрузить все файлы" +} diff --git a/www/wiki/extensions/MsUpload/i18n/de.json b/www/wiki/extensions/MsUpload/i18n/de.json new file mode 100644 index 00000000..73dcaf39 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/de.json @@ -0,0 +1,24 @@ +{ + "@metadata": { + "authors": [ + "Martin Schwindl <martin.schwindl@ratin.de>", + "Metalhead64" + ] + }, + "msu-desc": "Ermöglicht einfache Uploads für eine oder mehrere Dateien gleichzeitig", + "msu-button-title": "Datei(en) auswählen", + "msu-insert-link": "als Link einfügen", + "msu-insert-gallery": "Alle als Gallerie einfügen", + "msu-insert-files": "Alle als Bild einfügen", + "msu-insert-links": "Alle als Link einfügen", + "msu-insert-image": "als Bild einfügen", + "msu-insert-video": "Video einfügen", + "msu-cancel-upload": "Upload abbrechen", + "msu-continue": "Trotzdem fortfahren?", + "msu-clean-all": "Liste leeren", + "msu-ext-not-allowed": "Es {{PLURAL:$1|ist nur folgender Dateityp|sind nur folgende Dateitypen}} erlaubt:", + "msu-upload-this": "Diese Datei hochladen", + "msu-upload-all": "Alle Dateien hochladen", + "msu-dropzone": "Datei(en) hier ablegen", + "msu-comment": "Datei hochgeladen mit MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/el.json b/www/wiki/extensions/MsUpload/i18n/el.json new file mode 100644 index 00000000..b8375a42 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/el.json @@ -0,0 +1,24 @@ +{ + "@metadata": { + "authors": [ + "Geraki", + "Nikosgranturismogt" + ] + }, + "msu-desc": "Επιτρέπει εύκολες επιφορτώσεις για ένα αρχείο ή για πολλαπλά αρχεία ταυτόχρονα", + "msu-button-title": "Επιλογή αρχείων", + "msu-insert-link": "Εισαγωγή συνδέσμου", + "msu-insert-gallery": "Εισαγωγή όλων ως γκαλερί", + "msu-insert-files": "Εισαγωγή όλων ως αρχεία", + "msu-insert-links": "Εισαγωγή όλων ως σύνδεσμοι", + "msu-insert-image": "Εισαγωγή ως εικόνα", + "msu-insert-video": "Εισαγωγή βίντεο", + "msu-cancel-upload": "Ακύρωση ανεβάσματος", + "msu-continue": "Συνέχεια όπως και αν έχει;", + "msu-clean-all": "Εκκαθάριση λίστας", + "msu-ext-not-allowed": "Επιτρέπονται μόνο οι ακόλουθοι {{PLURAL:$1|τύπος|τύποι}} αρχείων:", + "msu-upload-this": "Επιφόρτωση αυτού του αρχείου", + "msu-upload-all": "Επιφόρτωση όλων των αρχείων", + "msu-dropzone": "Αποθέστε τα αρχεία εδώ", + "msu-comment": "Το αρχείο μεταφορτώθηκε με το MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/eml.json b/www/wiki/extensions/MsUpload/i18n/eml.json new file mode 100644 index 00000000..a136bce2 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/eml.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Gloria sah" + ] + }, + "msu-upload-possible": "Al file selesionê al n'pōl minga èser carghê" +} diff --git a/www/wiki/extensions/MsUpload/i18n/en-ca.json b/www/wiki/extensions/MsUpload/i18n/en-ca.json new file mode 100644 index 00000000..f66b31f5 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/en-ca.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Rbix" + ] + }, + "msu-desc": "Enables easy uploads for one file or multiple files simultaneously", + "msu-ext-not-allowed": "Only the following file {{PLURAL:$1|type is|types are}} allowed:" +} diff --git a/www/wiki/extensions/MsUpload/i18n/en.json b/www/wiki/extensions/MsUpload/i18n/en.json new file mode 100644 index 00000000..90b3ca55 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/en.json @@ -0,0 +1,25 @@ +{ + "@metadata": { + "authors": [ + "Martin Schwindl", + "Taylor Braun-Jones", + "kotra" + ] + }, + "msu-desc": "Enables easy uploads for one file or multiple files simultaneously", + "msu-button-title": "Select files", + "msu-insert-link": "Insert link", + "msu-insert-gallery": "Insert all as gallery", + "msu-insert-files": "Insert all as files", + "msu-insert-links": "Insert all as links", + "msu-insert-image": "Insert as image", + "msu-insert-video": "Insert video", + "msu-cancel-upload": "Cancel upload", + "msu-continue": "Continue anyway?", + "msu-clean-all": "Clear list", + "msu-ext-not-allowed": "Only the following file {{PLURAL:$1|type is|types are}} allowed:", + "msu-upload-this": "Upload this file", + "msu-upload-all": "Upload all files", + "msu-dropzone": "Drop files here", + "msu-comment": "File uploaded with MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/es.json b/www/wiki/extensions/MsUpload/i18n/es.json new file mode 100644 index 00000000..63609e08 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/es.json @@ -0,0 +1,25 @@ +{ + "@metadata": { + "authors": [ + "Hernan Hegykozi", + "Macofe", + "Fitoschido" + ] + }, + "msu-desc": "Permite la subida sencilla de uno o varios archivos al mismo tiempo", + "msu-button-title": "Seleccionar archivos", + "msu-insert-link": "Insertar enlace", + "msu-insert-gallery": "Insertar todos como una galería", + "msu-insert-files": "Insertar todos como archivos", + "msu-insert-links": "Insertar todos como enlaces", + "msu-insert-image": "Insertar como imagen", + "msu-insert-video": "Insertar vídeo", + "msu-cancel-upload": "Cancelar la subida", + "msu-continue": "¿Quieres continuar de todos modos?", + "msu-clean-all": "Vaciar la lista", + "msu-ext-not-allowed": "Sólo se {{PLURAL:$1|permite el siguiente tipo|permiten los siguientes tipos}} de archivos:", + "msu-upload-this": "Subir este archivo", + "msu-upload-all": "Subir todos los archivos", + "msu-dropzone": "Soltar los archivos aquí", + "msu-comment": "Archivo subido con MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/eu.json b/www/wiki/extensions/MsUpload/i18n/eu.json new file mode 100644 index 00000000..7c9b4120 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/eu.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Sator" + ] + }, + "msu-upload-this": "fitxategi hau igo", + "msu-upload-all": "Igo fitxategi guztiak" +} diff --git a/www/wiki/extensions/MsUpload/i18n/fa.json b/www/wiki/extensions/MsUpload/i18n/fa.json new file mode 100644 index 00000000..05771b83 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/fa.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "Reza1615", + "Alifakoor" + ] + }, + "msu-insert-link": "درج پیوند", + "msu-continue": "به هر قیمتی ادامه میدهید؟" +} diff --git a/www/wiki/extensions/MsUpload/i18n/fi.json b/www/wiki/extensions/MsUpload/i18n/fi.json new file mode 100644 index 00000000..7a63f3af --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/fi.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "Nike" + ] + }, + "msu-insert-image": "Lisää kuva", + "msu-insert-video": "Lisää elokuva", + "msu-cancel-upload": "Peru tallennus", + "msu-dropzone": "Pudota tiedostoja tähän" +} diff --git a/www/wiki/extensions/MsUpload/i18n/fr.json b/www/wiki/extensions/MsUpload/i18n/fr.json new file mode 100644 index 00000000..51b9bbcf --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/fr.json @@ -0,0 +1,30 @@ +{ + "@metadata": { + "authors": [ + "Marc MORA", + "Windes", + "Wladek92", + "TomT0m", + "Orlodrim", + "Gomoko", + "Brenloch56", + "Yzelf" + ] + }, + "msu-desc": "Permet les téléversements faciles d'un seul ou de plusieurs fichiers en même temps", + "msu-button-title": "Sélectionnez les fichiers", + "msu-insert-link": "Insérer le lien", + "msu-insert-gallery": "Insérer l'ensemble en tant que galerie", + "msu-insert-files": "Insérer tout en tant que fichiers", + "msu-insert-links": "Insérer tout en tant que liens", + "msu-insert-image": "Insérer en tant qu’image", + "msu-insert-video": "Insérer une vidéo", + "msu-cancel-upload": "Annuler le téléversement", + "msu-continue": "Continuer malgré tout ?", + "msu-clean-all": "Effacer la liste", + "msu-ext-not-allowed": "Seulement {{PLURAL:$1|le type de fichier suivant est autorisé|les types de fichiers suivants sont autorisés}} :", + "msu-upload-this": "Téléverser ce fichier", + "msu-upload-all": "Téléverser tous les fichiers", + "msu-dropzone": "Glisser ici les fichiers", + "msu-comment": "Fichier téléversé avec MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ga.json b/www/wiki/extensions/MsUpload/i18n/ga.json new file mode 100644 index 00000000..f5caa912 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ga.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "Nmacu" + ] + }, + "msu-insert-link": "Ionsáigh nasc", + "msu-insert-files": "Ionsáigh gach rud mar chomhaid", + "msu-insert-image": "Ionsáigh mar íomhá" +} diff --git a/www/wiki/extensions/MsUpload/i18n/gl.json b/www/wiki/extensions/MsUpload/i18n/gl.json new file mode 100644 index 00000000..5779c920 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/gl.json @@ -0,0 +1,22 @@ +{ + "@metadata": { + "authors": [ + "Elisardojm" + ] + }, + "msu-desc": "Permite a transferencia sinxela para un ou varios ficheiros ó mesmo tempo", + "msu-button-title": "Seleccionar ficheiros", + "msu-insert-link": "Inserir ligazón", + "msu-insert-gallery": "Inserir todos como unha galería", + "msu-insert-files": "Inserir todos como ficheiros", + "msu-insert-links": "Inserir todos como ligazóns", + "msu-insert-image": "Inserir como imaxe", + "msu-insert-video": "Inserir vídeo", + "msu-cancel-upload": "Cancelar a carga", + "msu-clean-all": "Baleirar a lista", + "msu-ext-not-allowed": "Só se {{PLURAL:$1|permite o seguinte tipo|permiten os seguintes tipos}} de ficheiros:", + "msu-upload-this": "Subir este ficheiro", + "msu-upload-all": "Subir todos os ficheiros", + "msu-dropzone": "Soltar os ficheiros aquí", + "msu-comment": "Ficheiro cargado con MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/he.json b/www/wiki/extensions/MsUpload/i18n/he.json new file mode 100644 index 00000000..6392cd3c --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/he.json @@ -0,0 +1,20 @@ +{ + "@metadata": { + "authors": [ + "JNF" + ] + }, + "msu-desc": "מאפשר העלאת קבצים בקלות. כולל אפשרות לקבצים מרובים וממשק גרירת קבצים", + "msu-button-title": "בחרו קבצים", + "msu-insert-link": "הכנס קישור", + "msu-insert-gallery": "הפוך תמונות לגלריה", + "msu-insert-image": "הכנס תמונה", + "msu-insert-video": "הכנס סרטון", + "msu-cancel-upload": "בטל העלאה", + "msu-clean-all": "נקה רשימה", + "msu-ext-not-allowed": "רק סוגי הקבצים הבאים מורשים:", + "msu-upload-this": "לחצו כאן להעלאת קובץ זה", + "msu-upload-all": "לחצו כאן להעלאת כל הקבצים", + "msu-dropzone": "גררו קבצים לכאן", + "msu-comment": "MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/hi.json b/www/wiki/extensions/MsUpload/i18n/hi.json new file mode 100644 index 00000000..85440316 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/hi.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Sfic" + ] + }, + "msu-insert-image": "छवि के रूप में डालें", + "msu-insert-video": "वीडियो डालें" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ht.json b/www/wiki/extensions/MsUpload/i18n/ht.json new file mode 100644 index 00000000..d2a54f74 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ht.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "Bfpage" + ] + }, + "msu-insert-image": "Foto Antre", + "msu-insert-video": "Antre fim", + "msu-upload-this": "Klike la a yo Upload sa a ranpli" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ia.json b/www/wiki/extensions/MsUpload/i18n/ia.json new file mode 100644 index 00000000..a4546a4d --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ia.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Karmwiki" + ] + }, + "msu-continue": "Continuar comocunque?" +} diff --git a/www/wiki/extensions/MsUpload/i18n/it.json b/www/wiki/extensions/MsUpload/i18n/it.json new file mode 100644 index 00000000..de9bba72 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/it.json @@ -0,0 +1,25 @@ +{ + "@metadata": { + "authors": [ + "teokraba", + "Fringio", + "The Polish", + "F. Cosoleto", + "Beta16" + ] + }, + "msu-desc": "Consente il caricamento veloce per uno o più file contemporaneamente", + "msu-button-title": "Seleziona files", + "msu-insert-link": "Inserisci link", + "msu-insert-gallery": "Inserisci immagini come galleria", + "msu-insert-image": "Inserisci come immagine", + "msu-insert-video": "Inserisci video", + "msu-cancel-upload": "Annulla caricamento", + "msu-continue": "Continua comunque?", + "msu-clean-all": "Pulisci elenco", + "msu-ext-not-allowed": "Solo {{PLURAL:$1|il seguente tipo di file è permesso|i seguenti tipi di file sono permessi}}:", + "msu-upload-this": "Carica questo file", + "msu-upload-all": "Carica tutti i file", + "msu-dropzone": "Posiziona i file qui", + "msu-comment": "MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ja.json b/www/wiki/extensions/MsUpload/i18n/ja.json new file mode 100644 index 00000000..ec33c2c3 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ja.json @@ -0,0 +1,24 @@ +{ + "@metadata": { + "authors": [ + "Kouichi Nishizawa", + "Sujiniku", + "Otokoume" + ] + }, + "msu-desc": "ひとつまたは複数のファイルを同時にアップロードできるようにする", + "msu-button-title": "ファイル選択", + "msu-insert-link": "リンクを挿入", + "msu-insert-gallery": "ギャラリーとして画像を挿入", + "msu-insert-files": "ファイルとしてすべて挿入", + "msu-insert-links": "リンクとしてすべて挿入", + "msu-insert-image": "画像として挿入", + "msu-insert-video": "動画を挿入", + "msu-cancel-upload": "アップロードをキャンセル", + "msu-clean-all": "クリア", + "msu-ext-not-allowed": "次の{{PLURAL:$1|形式|形式}}のファイルのみアップロードできます:", + "msu-upload-this": "このファイルをアップロード", + "msu-upload-all": "すべてのファイルをアップロード", + "msu-dropzone": "ファイルをここにドロップしてください", + "msu-comment": "MsUpload によるアップロード" +} diff --git a/www/wiki/extensions/MsUpload/i18n/kn.json b/www/wiki/extensions/MsUpload/i18n/kn.json new file mode 100644 index 00000000..638df31e --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/kn.json @@ -0,0 +1,18 @@ +{ + "@metadata": { + "authors": [ + "Ananth subray" + ] + }, + "msu-button-title": "ಕಡತಗಳನ್ನು ಆಯ್ಕೆಮಾಡಿ", + "msu-insert-link": "ಸಂಪರ್ಕವನ್ನು ಅಳವಡಿಸಿ", + "msu-insert-files": "ಎಲ್ಲವನ್ನೂ ಕಡತಗಳನ್ನಾಗಿ ಸೇರಿಸಿ", + "msu-insert-links": "ಎಲ್ಲವನ್ನೂ ಲಿಂಕ್ಗಳನ್ನಾಗಿ ಸೇರಿಸಿ", + "msu-insert-image": "ಚಿತ್ರವನ್ನು ಸೇರಿಸಿ", + "msu-insert-video": "ಚಲನಚಿತ್ರ ಸೇರಿಸಿ", + "msu-cancel-upload": "ಅಪ್ಲೋಡನ್ನು ರದ್ದು ಮಾಡಿ", + "msu-clean-all": "ಸ್ಪಷ್ಟ ಪಟ್ಟಿ", + "msu-upload-this": "ಈ ಕಡತವನ್ನು ಅಪ್ಲೋಡ್ ಮಾಡಿ", + "msu-upload-all": "ಎಲ್ಲಾ ಕಡತಗಳನ್ನು ಅಪ್ಲೋಡ್ ಮಾಡಿ", + "msu-dropzone": "ಇಲ್ಲಿ ಕಡತಗಳನ್ನು ಬಿಡಿ" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ko.json b/www/wiki/extensions/MsUpload/i18n/ko.json new file mode 100644 index 00000000..2a4fa8a7 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ko.json @@ -0,0 +1,25 @@ +{ + "@metadata": { + "authors": [ + "Hwangjy9", + "Revi", + "Ykhwong" + ] + }, + "msu-desc": "동시에 하나 또는 여러 개의 파일을 쉽게 올릴 수 있습니다", + "msu-button-title": "파일 선택", + "msu-insert-link": "링크 넣기", + "msu-insert-gallery": "모두 갤러리로 넣기", + "msu-insert-files": "모두 파일로 넣기", + "msu-insert-links": "모두 링크로 넣기", + "msu-insert-image": "그림 넣기", + "msu-insert-video": "동영상 넣기", + "msu-cancel-upload": "올리기 취소", + "msu-continue": "그래도 계속하시겠습니까?", + "msu-clean-all": "목록 비우기", + "msu-ext-not-allowed": "다음 {{PLURAL:$1|형식의|형식의}} 파일만 허용됩니다:", + "msu-upload-this": "이 파일 올리기", + "msu-upload-all": "모든 파일 올리기", + "msu-dropzone": "여기에 파일을 놓으세요", + "msu-comment": "MsUpload로 파일을 올림" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ksh.json b/www/wiki/extensions/MsUpload/i18n/ksh.json new file mode 100644 index 00000000..04c240e0 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ksh.json @@ -0,0 +1,22 @@ +{ + "@metadata": { + "authors": [ + "Purodha" + ] + }, + "msu-desc": "Määd et einfach, Datteije huhzelahde, för ein Dattei udder en Aanzahl Dateije ob eijmohl.", + "msu-button-title": "Söhk Datteije uß", + "msu-insert-link": "Donn ene Lengk ennföhje", + "msu-insert-gallery": "Alle als en Jallerih ennföhje", + "msu-insert-files": "Alle als Datteije ennföhje", + "msu-insert-links": "Alle als Lengks ennföhje", + "msu-insert-image": "Donn e Beld ennföhje", + "msu-insert-video": "Donn ene Viddejoh ennföhje", + "msu-cancel-upload": "Ophühre!", + "msu-clean-all": "maach di leß läddesch", + "msu-ext-not-allowed": "Bloß heh di {{PLURAL:$1|Zoot Dattei|Zoote Datteije|kein Datteije}} sin zohjelohße:", + "msu-upload-this": "Lohß Jonn!", + "msu-upload-all": "Lohß Jonn!", + "msu-dropzone": "Lähsch de Datteije heh hen", + "msu-comment": "Met <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\">MsUpload</i>\nhuhjelahde Dattei" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ku-latn.json b/www/wiki/extensions/MsUpload/i18n/ku-latn.json new file mode 100644 index 00000000..a74f1253 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ku-latn.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "George Animal" + ] + }, + "msu-button-title": "Dosyeyan hilbijêre" +} diff --git a/www/wiki/extensions/MsUpload/i18n/lb.json b/www/wiki/extensions/MsUpload/i18n/lb.json new file mode 100644 index 00000000..b50a9d90 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/lb.json @@ -0,0 +1,23 @@ +{ + "@metadata": { + "authors": [ + "Robby" + ] + }, + "msu-desc": "Erméiglecht et fir een oder méi Fichieren einfach zesummen eropzelueden", + "msu-button-title": "Fichieren eraussichen", + "msu-insert-link": "Link drasetzen", + "msu-insert-gallery": "All als Galerie drasetzen", + "msu-insert-files": "All als Fichieren drasetzen", + "msu-insert-links": "All als Link drasetzen", + "msu-insert-image": "Als Bild drasetzen", + "msu-insert-video": "Video drasetzen", + "msu-cancel-upload": "Eroplueden ofbriechen", + "msu-continue": "Trotzdeem virufueren?", + "msu-clean-all": "Lëscht eidelmaachen", + "msu-ext-not-allowed": "Nëmmen {{PLURAL:$1|dësen Typ vu Fichier ass|dës Type vu Fichiere sinn}} erlaabt:", + "msu-upload-this": "Dëse Fichier eroplueden", + "msu-upload-all": "all Fichieren eroplueden", + "msu-dropzone": "Fichieren hei ofleeën", + "msu-comment": "Fichier mat MsUpload eropgelueden" +} diff --git a/www/wiki/extensions/MsUpload/i18n/lt.json b/www/wiki/extensions/MsUpload/i18n/lt.json new file mode 100644 index 00000000..ac7fe3c2 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/lt.json @@ -0,0 +1,22 @@ +{ + "@metadata": { + "authors": [ + "Vitas Povilaitis", + "Zygimantus", + "Manvydasz" + ] + }, + "msu-desc": "Leidžia lengviau pakrauti vieną arba keletą failų vienu metu. Yra galimybė naudoti drag&drop.", + "msu-button-title": "Pasirinkti failus", + "msu-insert-link": "Įterpti nuorodas", + "msu-insert-gallery": "Įterpti vaizdų galeriją", + "msu-insert-image": "Įterpti kaip paveikslėlį", + "msu-insert-video": "Įterpti vaizdo įrašą", + "msu-cancel-upload": "Nutraukti pakrovimą", + "msu-clean-all": "Išvalyti sąrašą", + "msu-ext-not-allowed": "Leidžiami tik {{PLURAL:$1|sekantis failų tipas|sekantys failų tipai}}:", + "msu-upload-this": "Įkelti šią rinkmeną", + "msu-upload-all": "Įkelti visus failus", + "msu-dropzone": "Čia užtemk failus", + "msu-comment": "MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/lv.json b/www/wiki/extensions/MsUpload/i18n/lv.json new file mode 100644 index 00000000..a4749fae --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/lv.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "Papuass" + ] + }, + "msu-cancel-upload": "Atcelt augšupielādi", + "msu-continue": "Turpināt tāpat?", + "msu-upload-this": "Augšupielādēt šo failu", + "msu-upload-all": "Augšupielādēt visus failus" +} diff --git a/www/wiki/extensions/MsUpload/i18n/mk.json b/www/wiki/extensions/MsUpload/i18n/mk.json new file mode 100644 index 00000000..5b518589 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/mk.json @@ -0,0 +1,23 @@ +{ + "@metadata": { + "authors": [ + "Bjankuloski06" + ] + }, + "msu-desc": "Овозможува лесно подигање на една или повеќе податотеки одеднаш", + "msu-button-title": "Одберете податотеки", + "msu-insert-link": "Вметни врска", + "msu-insert-gallery": "Вметни ги сите како галерија", + "msu-insert-files": "Вметни ги сите како податотеки", + "msu-insert-links": "Вметни ги сите како врски", + "msu-insert-image": "Вметни како слика", + "msu-insert-video": "Вметни видео", + "msu-cancel-upload": "Откажи подигање", + "msu-continue": "Сепак да продолжам?", + "msu-clean-all": "Исчисти список", + "msu-ext-not-allowed": "{{PLURAL:$1|Допуштен е само следниов подтотечен тип|Допуштени се само следниве подтотечни типови}}:", + "msu-upload-this": "Подигни ја податотекава", + "msu-upload-all": "Подигни ги сите податотеки", + "msu-dropzone": "Тука пуштајте ги податотеките", + "msu-comment": "Подигната податотека со MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/mr.json b/www/wiki/extensions/MsUpload/i18n/mr.json new file mode 100644 index 00000000..acbb24da --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/mr.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "Anuragbihani94", + "V.narsikar" + ] + }, + "msu-insert-link": "दुवा जोडा", + "msu-insert-video": "चित्रपट घाला.", + "msu-continue": "तरीही पुढे चलावयाचे काय?" +} diff --git a/www/wiki/extensions/MsUpload/i18n/mwl.json b/www/wiki/extensions/MsUpload/i18n/mwl.json new file mode 100644 index 00000000..221947f6 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/mwl.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "MokaAkashiyaPT", + "Athena in Wonderland" + ] + }, + "msu-insert-link": "Poner lhigaçon" +} diff --git a/www/wiki/extensions/MsUpload/i18n/nl.json b/www/wiki/extensions/MsUpload/i18n/nl.json new file mode 100644 index 00000000..ee4f19a6 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/nl.json @@ -0,0 +1,24 @@ +{ + "@metadata": { + "authors": [ + "FabianRM", + "Sjoerddebruin", + "Romaine" + ] + }, + "msu-desc": "Staat enkele of meerdere gelijktijdige uploads toe", + "msu-button-title": "Selecteer bestanden", + "msu-insert-link": "Koppeling invoegen", + "msu-insert-gallery": "Voeg in als galerij", + "msu-insert-files": "Voeg alle in als bestanden", + "msu-insert-links": "Voeg alle in als links", + "msu-insert-image": "Voeg in als afbeelding", + "msu-insert-video": "Video invoegen", + "msu-cancel-upload": "Uploaden annuleren", + "msu-clean-all": "Lijst wissen", + "msu-ext-not-allowed": "Alleen {{PLURAL:$1|het volgende bestandstype is|de volgende bestandstypen zijn}} toegestaan:", + "msu-upload-this": "Dit bestand uploaden", + "msu-upload-all": "Alle bestanden uploaden", + "msu-dropzone": "Sleep hier bestanden heen", + "msu-comment": "Bestand is geüpload met MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/nn.json b/www/wiki/extensions/MsUpload/i18n/nn.json new file mode 100644 index 00000000..b4dd67c4 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/nn.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Njardarlogar" + ] + }, + "msu-button-title": "Vel filer" +} diff --git a/www/wiki/extensions/MsUpload/i18n/olo.json b/www/wiki/extensions/MsUpload/i18n/olo.json new file mode 100644 index 00000000..08f10032 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/olo.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Mashoi7" + ] + }, + "msu-upload-possible": "Vallittuu failua ei voi ližätä" +} diff --git a/www/wiki/extensions/MsUpload/i18n/om.json b/www/wiki/extensions/MsUpload/i18n/om.json new file mode 100644 index 00000000..38e0281f --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/om.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Tumsaa" + ] + }, + "msu-insert-image": "Akka suuratti galchi", + "msu-insert-video": "Viidiyoo galchi" +} diff --git a/www/wiki/extensions/MsUpload/i18n/pl.json b/www/wiki/extensions/MsUpload/i18n/pl.json new file mode 100644 index 00000000..a0b9c8fd --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/pl.json @@ -0,0 +1,23 @@ +{ + "@metadata": { + "authors": [ + "Chrumps" + ] + }, + "msu-desc": "Umożliwia łatwe przesyłanie jednego pliku lub jednocześnie wielu plików", + "msu-button-title": "Wybierz pliki", + "msu-insert-link": "Wstaw link", + "msu-insert-gallery": "Wstaw wszystko jako galerię", + "msu-insert-files": "Wstaw wszystko jako pliki", + "msu-insert-links": "Wstaw wszystko jako linki", + "msu-insert-image": "Wstaw jako obrazek", + "msu-insert-video": "Wstaw film", + "msu-cancel-upload": "Anuluj przesyłanie", + "msu-continue": "Kontynuować mimo to?", + "msu-clean-all": "Wyczyść listę", + "msu-ext-not-allowed": "{{PLURAL:$1|Dozwolony jest następujący typ pliku|Dozwolone są następujące typy plików}}:", + "msu-upload-this": "Prześlij ten plik", + "msu-upload-all": "Prześlij wszystkie pliki", + "msu-dropzone": "Przeciągnij pliki tutaj", + "msu-comment": "Plik przesłany za pomocą MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/ps.json b/www/wiki/extensions/MsUpload/i18n/ps.json new file mode 100644 index 00000000..0b96dc5c --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ps.json @@ -0,0 +1,22 @@ +{ + "@metadata": { + "authors": [ + "Ahmed-Najib-Biabani-Ibrahimkhel" + ] + }, + "msu-desc": "آسانه پورته کېدنه (که دا چاره موجوده وي نو د راکاږل او خوشې کولو له لارې) هممهاله د يوې او يا څو دوتنو لپاره چارنوي", + "msu-button-title": "دوتنې ټاکل", + "msu-insert-link": "تړنه ورټومبل", + "msu-insert-gallery": "ټول د انځورتون په توگه ورټومبل", + "msu-insert-files": "ټول د دوتنو په توگه ورټومبل", + "msu-insert-links": "ټول د تړنو په توگه ورټومبل", + "msu-insert-image": "انځور ورټومبل", + "msu-insert-video": "ويډيو ورټومبل", + "msu-cancel-upload": "پورته کېدنه ناگارل", + "msu-clean-all": "لړليک سپينول", + "msu-ext-not-allowed": "يوازې د دوتنو لانديني ډولونه پرېښل شوي:", + "msu-upload-this": "د دې دوتنې پورته کولو لپاه دلته کېښکاږئ", + "msu-upload-all": "د ټولو دوتنو د پورته کولو لپاره دلته کېښکاږئ", + "msu-dropzone": "دوتنې مو دلته خوشې کړئ", + "msu-comment": "دوتنه د MsUpload له لارې پورته شوې" +} diff --git a/www/wiki/extensions/MsUpload/i18n/pt-br.json b/www/wiki/extensions/MsUpload/i18n/pt-br.json new file mode 100644 index 00000000..b5123b85 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/pt-br.json @@ -0,0 +1,25 @@ +{ + "@metadata": { + "authors": [ + "Michael Siegwarth (msiegwarth@gmail.com)", + "Felipe L. Ewald", + "Eduardo Addad de Oliveira" + ] + }, + "msu-desc": "Habilita uploads fáceis para um ou vários arquivos, simultaneamente", + "msu-button-title": "Selecionar arquivos", + "msu-insert-link": "Inserir link", + "msu-insert-gallery": "Inserir imagem como galeria", + "msu-insert-files": "Inserir todos como arquivos", + "msu-insert-links": "Inserir todos como links", + "msu-insert-image": "Inserir como imagem", + "msu-insert-video": "Inserir vídeo", + "msu-cancel-upload": "Cancelar upload", + "msu-continue": "Continuar mesmo assim?", + "msu-clean-all": "Clear list", + "msu-ext-not-allowed": "Somente {{PLURAL:$1|o seguinte tipo de arquivo é permitido|os seguintes tipos de arquivos são permitidos}}:", + "msu-upload-this": "Enviar este arquivo", + "msu-upload-all": "Enviar todos os arquivos", + "msu-dropzone": "Arraste arquivos para cá", + "msu-comment": "MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/pt.json b/www/wiki/extensions/MsUpload/i18n/pt.json new file mode 100644 index 00000000..868e3295 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/pt.json @@ -0,0 +1,27 @@ +{ + "@metadata": { + "authors": [ + "Vitorvicentevalente", + "Macofe", + "Fúlvio", + "Hamilton Abreu", + "Athena in Wonderland" + ] + }, + "msu-desc": "Permite a transferência fácil de um ficheiro ou de vários ficheiros em simultâneo", + "msu-button-title": "Selecionar ficheiros", + "msu-insert-link": "Inserir hiperligação", + "msu-insert-gallery": "Inserir todos como galeria", + "msu-insert-files": "Inserir todos como ficheiros", + "msu-insert-links": "Inserir todos como hiperligações", + "msu-insert-image": "Inserir como imagem", + "msu-insert-video": "Inserir vídeo", + "msu-cancel-upload": "Cancelar carregamento", + "msu-continue": "Continuar mesmo assim?", + "msu-clean-all": "Limpar lista", + "msu-ext-not-allowed": "Só {{PLURAL:$1|é permitido o seguinte tipo de ficheiro|são permitidos os seguintes tipos de ficheiro}}:", + "msu-upload-this": "Carregar este ficheiro", + "msu-upload-all": "Carregar todos os ficheiros", + "msu-dropzone": "Solte os ficheiros aqui", + "msu-comment": "Ficheiro carregado com MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/qqq.json b/www/wiki/extensions/MsUpload/i18n/qqq.json new file mode 100644 index 00000000..cf3722b5 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/qqq.json @@ -0,0 +1,26 @@ +{ + "@metadata": { + "authors": [ + "Sophivorus", + "Robby", + "Purodha", + "Umherirrender" + ] + }, + "msu-desc": "{{desc|name=MsUpload|url=https://www.mediawiki.org/wiki/Extension:MsUpload}}", + "msu-button-title": "Button for selecting files from the users computer.\n{{Identical|Select file}}", + "msu-insert-link": "Button for inserting a file link into the wikitext.\n{{Identical|Insert link}}", + "msu-insert-gallery": "Button for inserting a gallery with all the uploaded files into the wikitext.", + "msu-insert-files": "Button for inserting calls to all the uploaded files into the wikitext.", + "msu-insert-links": "Button for inserting links to all the uploaded files into the wikitext.", + "msu-insert-image": "Button for inserting an image into the wikitext", + "msu-insert-video": "Button for inserting a video", + "msu-cancel-upload": "Button for canceling an upload", + "msu-continue": "Confirmation message before replacing a file or uploading a file with a similar name to an existing one", + "msu-clean-all": "Button for clearing the list of uploaded files", + "msu-ext-not-allowed": "Message that alerts the user that one or more of the selected files are of a forbidden type.\n$1 is the number of file types listed after this message. It is to used for PLURAL.", + "msu-upload-this": "Button for uploading the selected file.", + "msu-upload-all": "Button for uploading all the selected files.", + "msu-dropzone": "Message in the area where files can be dropped.", + "msu-comment": "Comment left as an edit summary when uploading a file, and in the page of the uploaded file." +} diff --git a/www/wiki/extensions/MsUpload/i18n/ru.json b/www/wiki/extensions/MsUpload/i18n/ru.json new file mode 100644 index 00000000..e07be0f3 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/ru.json @@ -0,0 +1,25 @@ +{ + "@metadata": { + "authors": [ + "alexandr", + "Okras", + "Iniquity" + ] + }, + "msu-desc": "Позволяет удобно загружать один или несколько файлов одновременно", + "msu-button-title": "Выберите файлы", + "msu-insert-link": "Вставить ссылку", + "msu-insert-gallery": "Вставить картинки как галерея", + "msu-insert-files": "Вставить всё как файлы", + "msu-insert-links": "Вставить всё как ссылки", + "msu-insert-image": "Вставить как изображение", + "msu-insert-video": "Вставить видео", + "msu-cancel-upload": "Отменить загрузку", + "msu-continue": "Всё равно продолжить?", + "msu-clean-all": "Clear list", + "msu-ext-not-allowed": "Разрешен{{PLURAL:$1||ы}} только {{PLURAL:$1|следующий тип|следующие типы}} файлов:", + "msu-upload-this": "Загрузить этот файл", + "msu-upload-all": "Загрузить все файлы", + "msu-dropzone": "Перетащите файлы сюда", + "msu-comment": "MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/sd.json b/www/wiki/extensions/MsUpload/i18n/sd.json new file mode 100644 index 00000000..93f0a218 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/sd.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "Mehtab ahmed" + ] + }, + "msu-insert-link": "ڳنڍڻو وجھو", + "msu-insert-video": "وڊيو وجھو", + "msu-cancel-upload": "چاڙھ رد ڪريو" +} diff --git a/www/wiki/extensions/MsUpload/i18n/shn.json b/www/wiki/extensions/MsUpload/i18n/shn.json new file mode 100644 index 00000000..9b0ba776 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/shn.json @@ -0,0 +1,22 @@ +{ + "@metadata": { + "authors": [ + "Saosukham" + ] + }, + "msu-desc": "ဢမ်ႇၸၢင်ႈလူတ်ႇၶိုၼ်ႈငၢႆႈငၢႆႈ (when available also via drag&drop) တႃႇၼိုင်ႈၾၢႆႇ ဢမ်ႇၼၼ် ၾၢႆႇသွၼ်ႉၵပ်းၵၼ်", + "msu-button-title": "လိူၵ်ႈၾၢႆႇ", + "msu-insert-link": "သႂ်ႇလိင်ႉၵွင်ႉ", + "msu-insert-gallery": "ဢဝ် gallery သႂ်ႇသဵင်ႈ", + "msu-insert-files": "သႂ်ႇၾၢႆႇ ၼင်ႇတင်းသဵင်ႈ", + "msu-insert-links": "သႂ်ႇလိင်ႉၵွင်ႉတင်းသဵင်ႈ", + "msu-insert-image": "သႂ်ႇၶႅပ်းႁၢင်ႈ", + "msu-insert-video": "သႂ်ႇငဝ်းတူင်ႉ", + "msu-cancel-upload": "ယႃႉပႅတ်ႈ လူတ်ႇၶိုၼ်ႈ", + "msu-clean-all": "ၽဵဝ်ႈပႅတ်ႈသဵၼ်ႈ", + "msu-ext-not-allowed": "filetypes ၾၢႆႇလိၵ်ႈတီႈတႂ်းၼႆႉၵူၺ်း ပၼ်ပေႃႉ", + "msu-upload-this": "ၼဵၵ်းတီႈၼႆႈ တႃႇလူတ်ႇၾၢႆႇၶိုၼ်ႈ", + "msu-upload-all": "ၼဵၵ်းတီႈၼႆႈ တႃႇလူတ်ႇၾၢႆႇၶိုၼ်ႈ", + "msu-dropzone": "ဢဝ်ၾၢႆႇ သႂ်ႇတီႈၼႆႉ", + "msu-comment": "လူတ်ႇၶိုၼ်ႈၾၢႆႇၵိုၵ်း MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/sq.json b/www/wiki/extensions/MsUpload/i18n/sq.json new file mode 100644 index 00000000..ef5b53c5 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/sq.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Kosovastar" + ] + }, + "msu-upload-possible": "Skeda(t) e zgjedhur(a) nuk mund të ngarkohet(n)" +} diff --git a/www/wiki/extensions/MsUpload/i18n/su.json b/www/wiki/extensions/MsUpload/i18n/su.json new file mode 100644 index 00000000..5236a145 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/su.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Uchup19" + ] + }, + "msu-cancel-upload": "Bolaykeun unjalan" +} diff --git a/www/wiki/extensions/MsUpload/i18n/sv.json b/www/wiki/extensions/MsUpload/i18n/sv.json new file mode 100644 index 00000000..114c5238 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/sv.json @@ -0,0 +1,23 @@ +{ + "@metadata": { + "authors": [ + "WikiPhoenix" + ] + }, + "msu-desc": "Aktiverar enkelt uppladdning för en eller flera filer samtidigt", + "msu-button-title": "Välj filer", + "msu-insert-link": "Infoga länk", + "msu-insert-gallery": "Infoga alla som galleri", + "msu-insert-files": "Infoga alla som filer", + "msu-insert-links": "Infoga alla som länkar", + "msu-insert-image": "Infoga som bild", + "msu-insert-video": "Infoga video", + "msu-cancel-upload": "Avbryt uppladdning", + "msu-continue": "Fortsätt ändå", + "msu-clean-all": "Rensa lista", + "msu-ext-not-allowed": "Endast följande {{PLURAL:$1|filtyp|filtyper}} tillåts:", + "msu-upload-this": "Ladda upp denna fil", + "msu-upload-all": "Ladda upp alla filer", + "msu-dropzone": "Släpp filer här", + "msu-comment": "Fil laddades upp med MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/tr.json b/www/wiki/extensions/MsUpload/i18n/tr.json new file mode 100644 index 00000000..159f2ce6 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/tr.json @@ -0,0 +1,13 @@ +{ + "@metadata": { + "authors": [ + "Ömer Berkay", + "Kincki", + "KorkmazO" + ] + }, + "msu-desc": "Aynı anda tek bir dosya veya birden fazla dosya için kolay yükleme sağlar", + "msu-ext-not-allowed": "Sadece aşağıdaki dosya {{ÇOĞUL:$1|tipi|tipleri}} kullanılabilir:", + "msu-upload-this": "Dosyayı yükle", + "msu-upload-all": "Tüm dosyaları yükle" +} diff --git a/www/wiki/extensions/MsUpload/i18n/uk.json b/www/wiki/extensions/MsUpload/i18n/uk.json new file mode 100644 index 00000000..d8b6de5b --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/uk.json @@ -0,0 +1,25 @@ +{ + "@metadata": { + "authors": [ + "Ата", + "Piramidion", + "Movses" + ] + }, + "msu-desc": "Дозволяє легко вивантажувати один файл або декілька файлів одночасно", + "msu-button-title": "Вибрати файли", + "msu-insert-link": "Вставити посилання", + "msu-insert-gallery": "Вставити все як галерею", + "msu-insert-files": "Вставити все як файли", + "msu-insert-links": "Вставити все як посилання", + "msu-insert-image": "Вставити як зображення", + "msu-insert-video": "Вставити відео", + "msu-cancel-upload": "Скасування завантаження", + "msu-continue": "Все одно продовжити?", + "msu-clean-all": "Очистити список", + "msu-ext-not-allowed": "Дозволено лише {{PLURAL:$1|такий тип|такі типи}} файлів:", + "msu-upload-this": "Завантажити цей файл", + "msu-upload-all": "Завантажити усі файли", + "msu-dropzone": "Перемістіть файли сюди", + "msu-comment": "Файл завантажений з MsUpload" +} diff --git a/www/wiki/extensions/MsUpload/i18n/zh-hans.json b/www/wiki/extensions/MsUpload/i18n/zh-hans.json new file mode 100644 index 00000000..12c1f42a --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/zh-hans.json @@ -0,0 +1,24 @@ +{ + "@metadata": { + "authors": [ + "晒太阳的冰 (zoglun@gmail.com)", + "Liuxinyu970226" + ] + }, + "msu-desc": "为一个或多个文件同时开启轻松上传", + "msu-button-title": "选择文件", + "msu-insert-link": "插入链接", + "msu-insert-gallery": "将所有插入为图库", + "msu-insert-files": "将所有插入为文件", + "msu-insert-links": "将所有插入为链接", + "msu-insert-image": "插入为图片", + "msu-insert-video": "插入视频", + "msu-cancel-upload": "取消上传", + "msu-continue": "仍要继续么?", + "msu-clean-all": "清空列表", + "msu-ext-not-allowed": "只允许以下文件{{PLURAL:$1|类型}}:", + "msu-upload-this": "上传此文件", + "msu-upload-all": "上传所有文件", + "msu-dropzone": "拖动文件至此", + "msu-comment": "基于MsUpload的文件上传" +} diff --git a/www/wiki/extensions/MsUpload/i18n/zh-hant.json b/www/wiki/extensions/MsUpload/i18n/zh-hant.json new file mode 100644 index 00000000..619d01a5 --- /dev/null +++ b/www/wiki/extensions/MsUpload/i18n/zh-hant.json @@ -0,0 +1,26 @@ +{ + "@metadata": { + "authors": [ + "晒太阳的冰 (zoglun@gmail.com)", + "LNDDYL", + "Cwlin0416", + "Kly" + ] + }, + "msu-desc": "開啟單檔或多檔的簡易上傳", + "msu-button-title": "選擇檔案", + "msu-insert-link": "插入連結", + "msu-insert-gallery": "插入全部作為圖庫", + "msu-insert-files": "插入全部作為檔案", + "msu-insert-links": "插入全部作為連結", + "msu-insert-image": "插入為圖片", + "msu-insert-video": "插入影片", + "msu-cancel-upload": "取消上傳", + "msu-continue": "仍要繼續?", + "msu-clean-all": "清空清單", + "msu-ext-not-allowed": "只允許上傳下列{{PLURAL:$1|類型|類型}}檔案:", + "msu-upload-this": "上傳此檔案", + "msu-upload-all": "上傳所有檔案", + "msu-dropzone": "拖曳檔案到此處", + "msu-comment": "使用 MsUpload 上傳檔案" +} diff --git a/www/wiki/extensions/MsUpload/images/msu-close.png b/www/wiki/extensions/MsUpload/images/msu-close.png Binary files differnew file mode 100644 index 00000000..fa420369 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-close.png diff --git a/www/wiki/extensions/MsUpload/images/msu-error.png b/www/wiki/extensions/MsUpload/images/msu-error.png Binary files differnew file mode 100644 index 00000000..b18b8bfe --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-error.png diff --git a/www/wiki/extensions/MsUpload/images/msu-globe.png b/www/wiki/extensions/MsUpload/images/msu-globe.png Binary files differnew file mode 100644 index 00000000..911f3663 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-globe.png diff --git a/www/wiki/extensions/MsUpload/images/msu-loading.png b/www/wiki/extensions/MsUpload/images/msu-loading.png Binary files differnew file mode 100644 index 00000000..1327e5e9 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-loading.png diff --git a/www/wiki/extensions/MsUpload/images/msu-ok.png b/www/wiki/extensions/MsUpload/images/msu-ok.png Binary files differnew file mode 100644 index 00000000..1a987c8a --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-ok.png diff --git a/www/wiki/extensions/MsUpload/images/msu-progress-stripe.png b/www/wiki/extensions/MsUpload/images/msu-progress-stripe.png Binary files differnew file mode 100644 index 00000000..b1e0f216 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-progress-stripe.png diff --git a/www/wiki/extensions/MsUpload/images/msu-thumb-audio.png b/www/wiki/extensions/MsUpload/images/msu-thumb-audio.png Binary files differnew file mode 100644 index 00000000..5750a5b6 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-thumb-audio.png diff --git a/www/wiki/extensions/MsUpload/images/msu-thumb-document.png b/www/wiki/extensions/MsUpload/images/msu-thumb-document.png Binary files differnew file mode 100644 index 00000000..d045d741 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-thumb-document.png diff --git a/www/wiki/extensions/MsUpload/images/msu-thumb-image.png b/www/wiki/extensions/MsUpload/images/msu-thumb-image.png Binary files differnew file mode 100644 index 00000000..ed505649 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-thumb-image.png diff --git a/www/wiki/extensions/MsUpload/images/msu-thumb-pdf.png b/www/wiki/extensions/MsUpload/images/msu-thumb-pdf.png Binary files differnew file mode 100644 index 00000000..2c2135f5 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-thumb-pdf.png diff --git a/www/wiki/extensions/MsUpload/images/msu-thumb-video.png b/www/wiki/extensions/MsUpload/images/msu-thumb-video.png Binary files differnew file mode 100644 index 00000000..277714af --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-thumb-video.png diff --git a/www/wiki/extensions/MsUpload/images/msu-upload-button.png b/www/wiki/extensions/MsUpload/images/msu-upload-button.png Binary files differnew file mode 100644 index 00000000..90dffa61 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-upload-button.png diff --git a/www/wiki/extensions/MsUpload/images/msu-upload-icon.png b/www/wiki/extensions/MsUpload/images/msu-upload-icon.png Binary files differnew file mode 100644 index 00000000..1990b630 --- /dev/null +++ b/www/wiki/extensions/MsUpload/images/msu-upload-icon.png diff --git a/www/wiki/extensions/MsUpload/package.json b/www/wiki/extensions/MsUpload/package.json new file mode 100644 index 00000000..b7ce0dba --- /dev/null +++ b/www/wiki/extensions/MsUpload/package.json @@ -0,0 +1,13 @@ +{ + "private": true, + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "1.0.1", + "grunt-contrib-jshint": "1.0.0", + "grunt-banana-checker": "0.5.0", + "grunt-jscs": "2.8.0", + "grunt-jsonlint": "1.1.0" + } +} diff --git a/www/wiki/extensions/MsUpload/plupload/Moxie.swf b/www/wiki/extensions/MsUpload/plupload/Moxie.swf Binary files differnew file mode 100644 index 00000000..da9914bb --- /dev/null +++ b/www/wiki/extensions/MsUpload/plupload/Moxie.swf diff --git a/www/wiki/extensions/MsUpload/plupload/Moxie.xap b/www/wiki/extensions/MsUpload/plupload/Moxie.xap Binary files differnew file mode 100644 index 00000000..aabc9f7c --- /dev/null +++ b/www/wiki/extensions/MsUpload/plupload/Moxie.xap diff --git a/www/wiki/extensions/MsUpload/plupload/plupload.full.min.js b/www/wiki/extensions/MsUpload/plupload/plupload.full.min.js new file mode 100644 index 00000000..ca6cdf82 --- /dev/null +++ b/www/wiki/extensions/MsUpload/plupload/plupload.full.min.js @@ -0,0 +1,28 @@ +/** + * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill + * v1.2.1 + * + * Copyright 2013, Moxiecode Systems AB + * Released under GPL License. + * + * License: http://www.plupload.com/license + * Contributing: http://www.plupload.com/contributing + * + * Date: 2014-05-14 + */ +!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r<e.length;++r){if(n=s[e[r]]||o(e[r]),!n)throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}function i(e,i,r){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";n(i,function(){s[e]=r.apply(null,arguments)})}function r(e){return!!s[e]}function o(t){for(var n=e,i=t.split(/[.\/]/),r=0;r<i.length;++r){if(!n[i[r]])return;n=n[i[r]]}return n}function a(n){for(var i=0;i<n.length;i++){for(var r=e,o=n[i],a=o.split(/[.\/]/),u=0;u<a.length-1;++u)r[a[u]]===t&&(r[a[u]]={}),r=r[a[u]];r[a[a.length-1]]=s[o]}}var s={},u="moxie/core/utils/Basic",c="moxie/core/I18n",l="moxie/core/utils/Mime",d="moxie/core/utils/Env",f="moxie/core/utils/Dom",h="moxie/core/Exceptions",p="moxie/core/EventTarget",m="moxie/core/utils/Encode",g="moxie/runtime/Runtime",v="moxie/runtime/RuntimeClient",y="moxie/file/Blob",w="moxie/file/File",E="moxie/file/FileInput",_="moxie/file/FileDrop",x="moxie/runtime/RuntimeTarget",b="moxie/file/FileReader",R="moxie/core/utils/Url",T="moxie/file/FileReaderSync",A="moxie/xhr/FormData",S="moxie/xhr/XMLHttpRequest",O="moxie/runtime/Transporter",I="moxie/image/Image",D="moxie/runtime/html5/Runtime",N="moxie/runtime/html5/file/Blob",L="moxie/core/utils/Events",M="moxie/runtime/html5/file/FileInput",C="moxie/runtime/html5/file/FileDrop",F="moxie/runtime/html5/file/FileReader",H="moxie/runtime/html5/xhr/XMLHttpRequest",P="moxie/runtime/html5/utils/BinaryReader",k="moxie/runtime/html5/image/JPEGHeaders",U="moxie/runtime/html5/image/ExifParser",B="moxie/runtime/html5/image/JPEG",z="moxie/runtime/html5/image/PNG",G="moxie/runtime/html5/image/ImageInfo",q="moxie/runtime/html5/image/MegaPixel",X="moxie/runtime/html5/image/Image",j="moxie/runtime/flash/Runtime",V="moxie/runtime/flash/file/Blob",W="moxie/runtime/flash/file/FileInput",Y="moxie/runtime/flash/file/FileReader",$="moxie/runtime/flash/file/FileReaderSync",J="moxie/runtime/flash/xhr/XMLHttpRequest",Z="moxie/runtime/flash/runtime/Transporter",K="moxie/runtime/flash/image/Image",Q="moxie/runtime/silverlight/Runtime",et="moxie/runtime/silverlight/file/Blob",tt="moxie/runtime/silverlight/file/FileInput",nt="moxie/runtime/silverlight/file/FileDrop",it="moxie/runtime/silverlight/file/FileReader",rt="moxie/runtime/silverlight/file/FileReaderSync",ot="moxie/runtime/silverlight/xhr/XMLHttpRequest",at="moxie/runtime/silverlight/runtime/Transporter",st="moxie/runtime/silverlight/image/Image",ut="moxie/runtime/html4/Runtime",ct="moxie/runtime/html4/file/FileInput",lt="moxie/runtime/html4/file/FileReader",dt="moxie/runtime/html4/xhr/XMLHttpRequest",ft="moxie/runtime/html4/image/Image";i(u,[],function(){var e=function(e){var t;return e===t?"undefined":null===e?"null":e.nodeType?"node":{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},t=function(i){var r;return n(arguments,function(o,s){s>0&&n(o,function(n,o){n!==r&&(e(i[o])===e(n)&&~a(e(n),["array","object"])?t(i[o],n):i[o]=n)})}),i},n=function(e,t){var n,i,r,o;if(e){try{n=e.length}catch(a){n=o}if(n===o){for(i in e)if(e.hasOwnProperty(i)&&t(e[i],i)===!1)return}else for(r=0;n>r;r++)if(t(e[r],r)===!1)return}},i=function(t){var n;if(!t||"object"!==e(t))return!0;for(n in t)return!1;return!0},r=function(t,n){function i(r){"function"===e(t[r])&&t[r](function(e){++r<o&&!e?i(r):n(e)})}var r=0,o=t.length;"function"!==e(n)&&(n=function(){}),t&&t.length||n(),i(r)},o=function(e,t){var i=0,r=e.length,o=new Array(r);n(e,function(e,n){e(function(e){if(e)return t(e);var a=[].slice.call(arguments);a.shift(),o[n]=a,i++,i===r&&(o.unshift(null),t.apply(this,o))})})},a=function(e,t){if(t){if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1},s=function(t,n){var i=[];"array"!==e(t)&&(t=[t]),"array"!==e(n)&&(n=[n]);for(var r in t)-1===a(t[r],n)&&i.push(t[r]);return i.length?i:!1},u=function(e,t){var i=[];return n(e,function(e){-1!==a(e,t)&&i.push(e)}),i.length?i:null},c=function(e){var t,n=[];for(t=0;t<e.length;t++)n[t]=e[t];return n},l=function(){var e=0;return function(t){var n=(new Date).getTime().toString(32),i;for(i=0;5>i;i++)n+=Math.floor(65535*Math.random()).toString(32);return(t||"o_")+n+(e++).toString(32)}}(),d=function(e){return e?String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,""):e},f=function(e){if("string"!=typeof e)return e;var t={t:1099511627776,g:1073741824,m:1048576,k:1024},n;return e=/^([0-9]+)([mgk]?)$/.exec(e.toLowerCase().replace(/[^0-9mkg]/g,"")),n=e[2],e=+e[1],t.hasOwnProperty(n)&&(e*=t[n]),e};return{guid:l,typeOf:e,extend:t,each:n,isEmptyObj:i,inSeries:r,inParallel:o,inArray:a,arrayDiff:s,arrayIntersect:u,toArray:c,trim:d,parseSizeStr:f}}),i(c,[u],function(e){var t={};return{addI18n:function(n){return e.extend(t,n)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)},sprintf:function(t){var n=[].slice.call(arguments,1);return t.replace(/%[a-z]/g,function(){var t=n.shift();return"undefined"!==e.typeOf(t)?t:""})}}}),i(l,[u,c],function(e,t){var n="application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe",i={mimes:{},extensions:{},addMimeType:function(e){var t=e.split(/,/),n,i,r;for(n=0;n<t.length;n+=2){for(r=t[n+1].split(/ /),i=0;i<r.length;i++)this.mimes[r[i]]=t[n];this.extensions[t[n]]=r}},extList2mimes:function(t,n){var i=this,r,o,a,s,u=[];for(o=0;o<t.length;o++)for(r=t[o].extensions.split(/\s*,\s*/),a=0;a<r.length;a++){if("*"===r[a])return[];if(s=i.mimes[r[a]])-1===e.inArray(s,u)&&u.push(s);else{if(!n||!/^\w+$/.test(r[a]))return[];u.push("."+r[a])}}return u},mimes2exts:function(t){var n=this,i=[];return e.each(t,function(t){if("*"===t)return i=[],!1;var r=t.match(/^(\w+)\/(\*|\w+)$/);r&&("*"===r[2]?e.each(n.extensions,function(e,t){new RegExp("^"+r[1]+"/").test(t)&&[].push.apply(i,n.extensions[t])}):n.extensions[t]&&[].push.apply(i,n.extensions[t]))}),i},mimes2extList:function(n){var i=[],r=[];return"string"===e.typeOf(n)&&(n=e.trim(n).split(/\s*,\s*/)),r=this.mimes2exts(n),i.push({title:t.translate("Files"),extensions:r.length?r.join(","):"*"}),i.mimes=n,i},getFileExtension:function(e){var t=e&&e.match(/\.([^.]+)$/);return t?t[1].toLowerCase():""},getFileMime:function(e){return this.mimes[this.getFileExtension(e)]||""}};return i.addMimeType(n),i}),i(d,[u],function(e){function t(e,t,n){var i=0,r=0,o=0,a={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},s=function(e){return e=(""+e).replace(/[_\-+]/g,"."),e=e.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),e.length?e.split("."):[-8]},u=function(e){return e?isNaN(e)?a[e]||-7:parseInt(e,10):0};for(e=s(e),t=s(t),r=Math.max(e.length,t.length),i=0;r>i;i++)if(e[i]!=t[i]){if(e[i]=u(e[i]),t[i]=u(t[i]),e[i]<t[i]){o=-1;break}if(e[i]>t[i]){o=1;break}}if(!n)return o;switch(n){case">":case"gt":return o>0;case">=":case"ge":return o>=0;case"<=":case"le":return 0>=o;case"==":case"=":case"eq":return 0===o;case"<>":case"!=":case"ne":return 0!==o;case"":case"<":case"lt":return 0>o;default:return null}}var n=function(e){var t="",n="?",i="function",r="undefined",o="object",a="major",s="model",u="name",c="type",l="vendor",d="version",f="architecture",h="console",p="mobile",m="tablet",g={has:function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()}},v={rgx:function(){for(var t,n=0,a,s,u,c,l,d,f=arguments;n<f.length;n+=2){var h=f[n],p=f[n+1];if(typeof t===r){t={};for(u in p)c=p[u],typeof c===o?t[c[0]]=e:t[c]=e}for(a=s=0;a<h.length;a++)if(l=h[a].exec(this.getUA())){for(u=0;u<p.length;u++)d=l[++s],c=p[u],typeof c===o&&c.length>0?2==c.length?t[c[0]]=typeof c[1]==i?c[1].call(this,d):c[1]:3==c.length?t[c[0]]=typeof c[1]!==i||c[1].exec&&c[1].test?d?d.replace(c[1],c[2]):e:d?c[1].call(this,d,c[2]):e:4==c.length&&(t[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):e):t[c]=d?d:e;break}if(l)break}return t},str:function(t,i){for(var r in i)if(typeof i[r]===o&&i[r].length>0){for(var a=0;a<i[r].length;a++)if(g.has(i[r][a],t))return r===n?e:r}else if(g.has(i[r],t))return r===n?e:r;return t}},y={browser:{oldsafari:{major:{1:["/8","/1","/3"],2:"/4","?":"/"},version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",RT:"ARM"}}}},w={browser:[[/(opera\smini)\/((\d+)?[\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i,/(opera).+version\/((\d+)?[\w\.]+)/i,/(opera)[\/\s]+((\d+)?[\w\.]+)/i],[u,d,a],[/\s(opr)\/((\d+)?[\w\.]+)/i],[[u,"Opera"],d,a],[/(kindle)\/((\d+)?[\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i,/(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i,/(rekonq)((?:\/)[\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron)\/((\d+)?[\w\.-]+)/i],[u,d,a],[/(trident).+rv[:\s]((\d+)?[\w\.]+).+like\sgecko/i],[[u,"IE"],d,a],[/(yabrowser)\/((\d+)?[\w\.]+)/i],[[u,"Yandex"],d,a],[/(comodo_dragon)\/((\d+)?[\w\.]+)/i],[[u,/_/g," "],d,a],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?((\d+)?[\w\.]+)/i],[u,d,a],[/(dolfin)\/((\d+)?[\w\.]+)/i],[[u,"Dolphin"],d,a],[/((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i],[[u,"Chrome"],d,a],[/((?:android.+))version\/((\d+)?[\w\.]+)\smobile\ssafari/i],[[u,"Android Browser"],d,a],[/version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i],[d,a,[u,"Mobile Safari"]],[/version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i],[d,a,u],[/webkit.+?(mobile\s?safari|safari)((\/[\w\.]+))/i],[u,[a,v.str,y.browser.oldsafari.major],[d,v.str,y.browser.oldsafari.version]],[/(konqueror)\/((\d+)?[\w\.]+)/i,/(webkit|khtml)\/((\d+)?[\w\.]+)/i],[u,d,a],[/(navigator|netscape)\/((\d+)?[\w\.-]+)/i],[[u,"Netscape"],d,a],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?((\d+)?[\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i,/(mozilla)\/((\d+)?[\w\.]+).+rv\:.+gecko\/\d+/i,/(uc\s?browser|polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|qqbrowser)[\/\s]?((\d+)?[\w\.]+)/i,/(links)\s\(((\d+)?[\w\.]+)/i,/(gobrowser)\/?((\d+)?[\w\.]+)*/i,/(ice\s?browser)\/v?((\d+)?[\w\._]+)/i,/(mosaic)[\/\s]((\d+)?[\w\.]+)/i],[u,d,a]],engine:[[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[u,d],[/rv\:([\w\.]+).*(gecko)/i],[d,u]],os:[[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[u,[d,v.str,y.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[u,"Windows"],[d,v.str,y.os.windows.version]],[/\((bb)(10);/i],[[u,"BlackBerry"],d],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)\/([\w\.]+)/i,/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i],[u,d],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[u,"Symbian"],d],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[u,"Firefox OS"],d],[/(nintendo|playstation)\s([wids3portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[u,d],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[u,"Chromium OS"],d],[/(sunos)\s?([\w\.]+\d)*/i],[[u,"Solaris"],d],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[u,d],[/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[u,"iOS"],[d,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i],[u,[d,/_/g,"."]],[/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i,/(unix)\s?([\w\.]+)*/i],[u,d]]},E=function(e){var n=e||(window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:t);this.getBrowser=function(){return v.rgx.apply(this,w.browser)},this.getEngine=function(){return v.rgx.apply(this,w.engine)},this.getOS=function(){return v.rgx.apply(this,w.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this.setUA(n)};return(new E).getResult()}(),i=function(){var t={define_property:function(){return!1}(),create_canvas:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}(),return_response_type:function(t){try{if(-1!==e.inArray(t,["","text","document"]))return!0;if(window.XMLHttpRequest){var n=new XMLHttpRequest;if(n.open("get","/"),"responseType"in n)return n.responseType=t,n.responseType!==t?!1:!0}}catch(i){}return!1},use_data_uri:function(){var e=new Image;return e.onload=function(){t.use_data_uri=1===e.width&&1===e.height},setTimeout(function(){e.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1),!1}(),use_data_uri_over32kb:function(){return t.use_data_uri&&("IE"!==r.browser||r.version>=9)},use_data_uri_of:function(e){return t.use_data_uri&&33e3>e||t.use_data_uri_over32kb()},use_fileinput:function(){var e=document.createElement("input");return e.setAttribute("type","file"),!e.disabled}};return function(n){var i=[].slice.call(arguments);return i.shift(),"function"===e.typeOf(t[n])?t[n].apply(this,i):!!t[n]}}(),r={can:i,browser:n.browser.name,version:parseFloat(n.browser.major),os:n.os.name,osVersion:n.os.version,verComp:t,swf_url:"../flash/Moxie.swf",xap_url:"../silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return r.OS=r.os,r}),i(f,[d],function(e){var t=function(e){return"string"!=typeof e?e:document.getElementById(e)},n=function(e,t){if(!e.className)return!1;var n=new RegExp("(^|\\s+)"+t+"(\\s+|$)");return n.test(e.className)},i=function(e,t){n(e,t)||(e.className=e.className?e.className.replace(/\s+$/,"")+" "+t:t)},r=function(e,t){if(e.className){var n=new RegExp("(^|\\s+)"+t+"(\\s+|$)");e.className=e.className.replace(n,function(e,t,n){return" "===t&&" "===n?" ":""})}},o=function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null)[t]:void 0},a=function(t,n){function i(e){var t,n,i=0,r=0;return e&&(n=e.getBoundingClientRect(),t="CSS1Compat"===s.compatMode?s.documentElement:s.body,i=n.left+t.scrollLeft,r=n.top+t.scrollTop),{x:i,y:r}}var r=0,o=0,a,s=document,u,c;if(t=t,n=n||s.body,t&&t.getBoundingClientRect&&"IE"===e.browser&&(!s.documentMode||s.documentMode<8))return u=i(t),c=i(n),{x:u.x-c.x,y:u.y-c.y};for(a=t;a&&a!=n&&a.nodeType;)r+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=t.parentNode;a&&a!=n&&a.nodeType;)r-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode;return{x:r,y:o}},s=function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}};return{get:t,hasClass:n,addClass:i,removeClass:r,getStyle:o,getPos:a,getSize:s}}),i(h,[u],function(e){function t(e,t){var n;for(n in e)if(e[n]===t)return n;return null}return{RuntimeError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": RuntimeError "+this.code}var i={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4};return e.extend(n,i),n.prototype=Error.prototype,n}(),OperationNotAllowedException:function(){function t(e){this.code=e,this.name="OperationNotAllowedException"}return e.extend(t,{NOT_ALLOWED_ERR:1}),t.prototype=Error.prototype,t}(),ImageError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": ImageError "+this.code}var i={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2};return e.extend(n,i),n.prototype=Error.prototype,n}(),FileException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": FileException "+this.code}var i={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return e.extend(n,i),n.prototype=Error.prototype,n}(),DOMException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": DOMException "+this.code}var i={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return e.extend(n,i),n.prototype=Error.prototype,n}(),EventException:function(){function t(e){this.code=e,this.name="EventException"}return e.extend(t,{UNSPECIFIED_EVENT_TYPE_ERR:0}),t.prototype=Error.prototype,t}()}}),i(p,[h,u],function(e,t){function n(){var n={};t.extend(this,{uid:null,init:function(){this.uid||(this.uid=t.guid("uid_"))},addEventListener:function(e,i,r,o){var a=this,s;return e=t.trim(e),/\s/.test(e)?void t.each(e.split(/\s+/),function(e){a.addEventListener(e,i,r,o)}):(e=e.toLowerCase(),r=parseInt(r,10)||0,s=n[this.uid]&&n[this.uid][e]||[],s.push({fn:i,priority:r,scope:o||this}),n[this.uid]||(n[this.uid]={}),void(n[this.uid][e]=s))},hasEventListener:function(e){return e?!(!n[this.uid]||!n[this.uid][e]):!!n[this.uid]},removeEventListener:function(e,i){e=e.toLowerCase();var r=n[this.uid]&&n[this.uid][e],o;if(r){if(i){for(o=r.length-1;o>=0;o--)if(r[o].fn===i){r.splice(o,1);break}}else r=[];r.length||(delete n[this.uid][e],t.isEmptyObj(n[this.uid])&&delete n[this.uid])}},removeAllEventListeners:function(){n[this.uid]&&delete n[this.uid]},dispatchEvent:function(i){var r,o,a,s,u={},c=!0,l;if("string"!==t.typeOf(i)){if(s=i,"string"!==t.typeOf(s.type))throw new e.EventException(e.EventException.UNSPECIFIED_EVENT_TYPE_ERR);i=s.type,s.total!==l&&s.loaded!==l&&(u.total=s.total,u.loaded=s.loaded),u.async=s.async||!1}if(-1!==i.indexOf("::")?!function(e){r=e[0],i=e[1]}(i.split("::")):r=this.uid,i=i.toLowerCase(),o=n[r]&&n[r][i]){o.sort(function(e,t){return t.priority-e.priority}),a=[].slice.call(arguments),a.shift(),u.type=i,a.unshift(u);var d=[];t.each(o,function(e){a[0].target=e.scope,d.push(u.async?function(t){setTimeout(function(){t(e.fn.apply(e.scope,a)===!1)},1)}:function(t){t(e.fn.apply(e.scope,a)===!1)})}),d.length&&t.inSeries(d,function(e){c=!e})}return c},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},convertEventPropsToHandlers:function(e){var n;"array"!==t.typeOf(e)&&(e=[e]);for(var i=0;i<e.length;i++)n="on"+e[i],"function"===t.typeOf(this[n])?this.addEventListener(e[i],this[n]):"undefined"===t.typeOf(this[n])&&(this[n]=null)}})}return n.instance=new n,n}),i(m,[],function(){var e=function(e){return unescape(encodeURIComponent(e))},t=function(e){return decodeURIComponent(escape(e))},n=function(e,n){if("function"==typeof window.atob)return n?t(window.atob(e)):window.atob(e);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,a,s,u,c,l,d,f=0,h=0,p="",m=[];if(!e)return e;e+="";do s=i.indexOf(e.charAt(f++)),u=i.indexOf(e.charAt(f++)),c=i.indexOf(e.charAt(f++)),l=i.indexOf(e.charAt(f++)),d=s<<18|u<<12|c<<6|l,r=d>>16&255,o=d>>8&255,a=255&d,m[h++]=64==c?String.fromCharCode(r):64==l?String.fromCharCode(r,o):String.fromCharCode(r,o,a);while(f<e.length);return p=m.join(""),n?t(p):p},i=function(t,n){if(n&&e(t),"function"==typeof window.btoa)return window.btoa(t);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,a,s,u,c,l,d,f=0,h=0,p="",m=[];if(!t)return t;do r=t.charCodeAt(f++),o=t.charCodeAt(f++),a=t.charCodeAt(f++),d=r<<16|o<<8|a,s=d>>18&63,u=d>>12&63,c=d>>6&63,l=63&d,m[h++]=i.charAt(s)+i.charAt(u)+i.charAt(c)+i.charAt(l);while(f<t.length);p=m.join("");var g=t.length%3;return(g?p.slice(0,g-3):p)+"===".slice(g||3)};return{utf8_encode:e,utf8_decode:t,atob:n,btoa:i}}),i(g,[u,f,p],function(e,t,n){function i(n,r,a,s,u){var c=this,l,d=e.guid(r+"_"),f=u||"browser";n=n||{},o[d]=this,a=e.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},a),n.preferred_caps&&(f=i.getMode(s,n.preferred_caps,f)),l=function(){var t={};return{exec:function(e,n,i,r){return l[n]&&(t[e]||(t[e]={context:this,instance:new l[n]}),t[e].instance[i])?t[e].instance[i].apply(this,r):void 0},removeInstance:function(e){delete t[e]},removeAllInstances:function(){var n=this;e.each(t,function(t,i){"function"===e.typeOf(t.instance.destroy)&&t.instance.destroy.call(t.context),n.removeInstance(i)})}}}(),e.extend(this,{initialized:!1,uid:d,type:r,mode:i.getMode(s,n.required_caps,f),shimid:d+"_container",clients:0,options:n,can:function(t,n){var r=arguments[2]||a;if("string"===e.typeOf(t)&&"undefined"===e.typeOf(n)&&(t=i.parseCaps(t)),"object"===e.typeOf(t)){for(var o in t)if(!this.can(o,t[o],r))return!1;return!0}return"function"===e.typeOf(r[t])?r[t].call(this,n):n===r[t]},getShimContainer:function(){var n,i=t.get(this.shimid);return i||(n=this.options.container?t.get(this.options.container):document.body,i=document.createElement("div"),i.id=this.shimid,i.className="moxie-shim moxie-shim-"+this.type,e.extend(i.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),n.appendChild(i),n=null),i},getShim:function(){return l},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec.call(this,this.uid,e,t,n)},exec:function(e,t){var n=[].slice.call(arguments,2);return c[e]&&c[e][t]?c[e][t].apply(this,n):c.shimExec.apply(this,arguments)},destroy:function(){if(c){var e=t.get(this.shimid);e&&e.parentNode.removeChild(e),l&&l.removeAllInstances(),this.unbindAll(),delete o[this.uid],this.uid=null,d=c=l=e=null}}}),this.mode&&n.required_caps&&!this.can(n.required_caps)&&(this.mode=!1)}var r={},o={};return i.order="html5,flash,silverlight,html4",i.getRuntime=function(e){return o[e]?o[e]:!1},i.addConstructor=function(e,t){t.prototype=n.instance,r[e]=t},i.getConstructor=function(e){return r[e]||null},i.getInfo=function(e){var t=i.getRuntime(e);return t?{uid:t.uid,type:t.type,mode:t.mode,can:function(){return t.can.apply(t,arguments)}}:null},i.parseCaps=function(t){var n={};return"string"!==e.typeOf(t)?t||{}:(e.each(t.split(","),function(e){n[e]=!0}),n)},i.can=function(e,t){var n,r=i.getConstructor(e),o;return r?(n=new r({required_caps:t}),o=n.mode,n.destroy(),!!o):!1},i.thatCan=function(e,t){var n=(t||i.order).split(/\s*,\s*/);for(var r in n)if(i.can(n[r],e))return n[r];return null},i.getMode=function(t,n,i){var r=null;if("undefined"===e.typeOf(i)&&(i="browser"),n&&!e.isEmptyObj(t)){if(e.each(n,function(n,i){if(t.hasOwnProperty(i)){var o=t[i](n);if("string"==typeof o&&(o=[o]),r){if(!(r=e.arrayIntersect(r,o)))return r=!1}else r=o}}),r)return-1!==e.inArray(i,r)?i:r[0];if(r===!1)return!1}return i},i.capTrue=function(){return!0},i.capFalse=function(){return!1},i.capTest=function(e){return function(){return!!e}},i}),i(v,[h,u,g],function(e,t,n){return function i(){var i;t.extend(this,{connectRuntime:function(r){function o(t){var s,u;return t.length?(s=t.shift(),(u=n.getConstructor(s))?(i=new u(r),i.bind("Init",function(){i.initialized=!0,setTimeout(function(){i.clients++,a.trigger("RuntimeInit",i)},1)}),i.bind("Error",function(){i.destroy(),o(t)}),i.mode?void i.init():void i.trigger("Error")):void o(t)):(a.trigger("RuntimeError",new e.RuntimeError(e.RuntimeError.NOT_INIT_ERR)),void(i=null))}var a=this,s;if("string"===t.typeOf(r)?s=r:"string"===t.typeOf(r.ruid)&&(s=r.ruid),s){if(i=n.getRuntime(s))return i.clients++,i;throw new e.RuntimeError(e.RuntimeError.NOT_INIT_ERR)}o((r.runtime_order||n.order).split(/\s*,\s*/))},getRuntime:function(){return i&&i.uid?i:(i=null,null)},disconnectRuntime:function(){i&&--i.clients<=0&&(i.destroy(),i=null)}})}}),i(y,[u,m,v],function(e,t,n){function i(o,a){function s(t,n,o){var a,s=r[this.uid];return"string"===e.typeOf(s)&&s.length?(a=new i(null,{type:o,size:n-t}),a.detach(s.substr(t,a.size)),a):null}n.call(this),o&&this.connectRuntime(o),a?"string"===e.typeOf(a)&&(a={data:a}):a={},e.extend(this,{uid:a.uid||e.guid("uid_"),ruid:o,size:a.size||0,type:a.type||"",slice:function(e,t,n){return this.isDetached()?s.apply(this,arguments):this.getRuntime().exec.call(this,"Blob","slice",this.getSource(),e,t,n)},getSource:function(){return r[this.uid]?r[this.uid]:null},detach:function(e){this.ruid&&(this.getRuntime().exec.call(this,"Blob","destroy"),this.disconnectRuntime(),this.ruid=null),e=e||"";var n=e.match(/^data:([^;]*);base64,/);n&&(this.type=n[1],e=t.atob(e.substring(e.indexOf("base64,")+7))),this.size=e.length,r[this.uid]=e},isDetached:function(){return!this.ruid&&"string"===e.typeOf(r[this.uid])},destroy:function(){this.detach(),delete r[this.uid]}}),a.data?this.detach(a.data):r[this.uid]=a}var r={};return i}),i(w,[u,l,y],function(e,t,n){function i(i,r){var o,a;if(r||(r={}),a=r.type&&""!==r.type?r.type:t.getFileMime(r.name),r.name)o=r.name.replace(/\\/g,"/"),o=o.substr(o.lastIndexOf("/")+1);else{var s=a.split("/")[0];o=e.guid((""!==s?s:"file")+"_"),t.extensions[a]&&(o+="."+t.extensions[a][0])}n.apply(this,arguments),e.extend(this,{type:a||"",name:o||e.guid("file_"),lastModifiedDate:r.lastModifiedDate||(new Date).toLocaleString()})}return i.prototype=n.prototype,i}),i(E,[u,l,f,h,p,c,w,g,v],function(e,t,n,i,r,o,a,s,u){function c(r){var c=this,d,f,h;if(-1!==e.inArray(e.typeOf(r),["string","node"])&&(r={browse_button:r}),f=n.get(r.browse_button),!f)throw new i.DOMException(i.DOMException.NOT_FOUND_ERR);h={accept:[{title:o.translate("All Files"),extensions:"*"}],name:"file",multiple:!1,required_caps:!1,container:f.parentNode||document.body},r=e.extend({},h,r),"string"==typeof r.required_caps&&(r.required_caps=s.parseCaps(r.required_caps)),"string"==typeof r.accept&&(r.accept=t.mimes2extList(r.accept)),d=n.get(r.container),d||(d=document.body),"static"===n.getStyle(d,"position")&&(d.style.position="relative"),d=f=null,u.call(c),e.extend(c,{uid:e.guid("uid_"),ruid:null,shimid:null,files:null,init:function(){c.convertEventPropsToHandlers(l),c.bind("RuntimeInit",function(t,i){c.ruid=i.uid,c.shimid=i.shimid,c.bind("Ready",function(){c.trigger("Refresh")},999),c.bind("Change",function(){var t=i.exec.call(c,"FileInput","getFiles");c.files=[],e.each(t,function(e){return 0===e.size?!0:void c.files.push(new a(c.ruid,e))})},999),c.bind("Refresh",function(){var t,o,a,s;a=n.get(r.browse_button),s=n.get(i.shimid),a&&(t=n.getPos(a,n.get(r.container)),o=n.getSize(a),s&&e.extend(s.style,{top:t.y+"px",left:t.x+"px",width:o.w+"px",height:o.h+"px"})),s=a=null}),i.exec.call(c,"FileInput","init",r)}),c.connectRuntime(e.extend({},r,{required_caps:{select_file:!0}}))},disable:function(t){var n=this.getRuntime();n&&n.exec.call(this,"FileInput","disable","undefined"===e.typeOf(t)?!0:t)},refresh:function(){c.trigger("Refresh")},destroy:function(){var t=this.getRuntime();t&&(t.exec.call(this,"FileInput","destroy"),this.disconnectRuntime()),"array"===e.typeOf(this.files)&&e.each(this.files,function(e){e.destroy()}),this.files=null}})}var l=["ready","change","cancel","mouseenter","mouseleave","mousedown","mouseup"];return c.prototype=r.instance,c}),i(_,[c,f,h,u,w,v,p,l],function(e,t,n,i,r,o,a,s){function u(n){var a=this,u;"string"==typeof n&&(n={drop_zone:n}),u={accept:[{title:e.translate("All Files"),extensions:"*"}],required_caps:{drag_and_drop:!0}},n="object"==typeof n?i.extend({},u,n):u,n.container=t.get(n.drop_zone)||document.body,"static"===t.getStyle(n.container,"position")&&(n.container.style.position="relative"),"string"==typeof n.accept&&(n.accept=s.mimes2extList(n.accept)),o.call(a),i.extend(a,{uid:i.guid("uid_"),ruid:null,files:null,init:function(){a.convertEventPropsToHandlers(c),a.bind("RuntimeInit",function(e,t){a.ruid=t.uid,a.bind("Drop",function(){var e=t.exec.call(a,"FileDrop","getFiles");a.files=[],i.each(e,function(e){a.files.push(new r(a.ruid,e))})},999),t.exec.call(a,"FileDrop","init",n),a.dispatchEvent("ready")}),a.connectRuntime(n)},destroy:function(){var e=this.getRuntime();e&&(e.exec.call(this,"FileDrop","destroy"),this.disconnectRuntime()),this.files=null}})}var c=["ready","dragenter","dragleave","drop","error"];return u.prototype=a.instance,u}),i(x,[u,v,p],function(e,t,n){function i(){this.uid=e.guid("uid_"),t.call(this),this.destroy=function(){this.disconnectRuntime(),this.unbindAll()}}return i.prototype=n.instance,i}),i(b,[u,m,h,p,y,w,x],function(e,t,n,i,r,o,a){function s(){function i(e,i){function l(e){o.readyState=s.DONE,o.error=e,o.trigger("error"),d()}function d(){c.destroy(),c=null,o.trigger("loadend")}function f(t){c.bind("Error",function(e,t){l(t)}),c.bind("Progress",function(e){o.result=t.exec.call(c,"FileReader","getResult"),o.trigger(e)}),c.bind("Load",function(e){o.readyState=s.DONE,o.result=t.exec.call(c,"FileReader","getResult"),o.trigger(e),d()}),t.exec.call(c,"FileReader","read",e,i)}if(c=new a,this.convertEventPropsToHandlers(u),this.readyState===s.LOADING)return l(new n.DOMException(n.DOMException.INVALID_STATE_ERR));if(this.readyState=s.LOADING,this.trigger("loadstart"),i instanceof r)if(i.isDetached()){var h=i.getSource();switch(e){case"readAsText":case"readAsBinaryString":this.result=h;break;case"readAsDataURL":this.result="data:"+i.type+";base64,"+t.btoa(h)}this.readyState=s.DONE,this.trigger("load"),d()}else f(c.connectRuntime(i.ruid));else l(new n.DOMException(n.DOMException.NOT_FOUND_ERR))}var o=this,c;e.extend(this,{uid:e.guid("uid_"),readyState:s.EMPTY,result:null,error:null,readAsBinaryString:function(e){i.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){i.call(this,"readAsDataURL",e)},readAsText:function(e){i.call(this,"readAsText",e)},abort:function(){this.result=null,-1===e.inArray(this.readyState,[s.EMPTY,s.DONE])&&(this.readyState===s.LOADING&&(this.readyState=s.DONE),c&&c.getRuntime().exec.call(this,"FileReader","abort"),this.trigger("abort"),this.trigger("loadend")) +},destroy:function(){this.abort(),c&&(c.getRuntime().exec.call(this,"FileReader","destroy"),c.disconnectRuntime()),o=c=null}})}var u=["loadstart","progress","load","abort","error","loadend"];return s.EMPTY=0,s.LOADING=1,s.DONE=2,s.prototype=i.instance,s}),i(R,[],function(){var e=function(t,n){for(var i=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],r=i.length,o={http:80,https:443},a={},s=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,u=s.exec(t||"");r--;)u[r]&&(a[i[r]]=u[r]);if(!a.scheme){n&&"string"!=typeof n||(n=e(n||document.location.href)),a.scheme=n.scheme,a.host=n.host,a.port=n.port;var c="";/^[^\/]/.test(a.path)&&(c=n.path,/(\/|\/[^\.]+)$/.test(c)?c+="/":c=c.replace(/\/[^\/]+$/,"/")),a.path=c+(a.path||"")}return a.port||(a.port=o[a.scheme]||80),a.port=parseInt(a.port,10),a.path||(a.path="/"),delete a.source,a},t=function(t){var n={http:80,https:443},i=e(t);return i.scheme+"://"+i.host+(i.port!==n[i.scheme]?":"+i.port:"")+i.path+(i.query?i.query:"")},n=function(t){function n(e){return[e.scheme,e.host,e.port].join("/")}return"string"==typeof t&&(t=e(t)),n(e())===n(t)};return{parseUrl:e,resolveUrl:t,hasSameOrigin:n}}),i(T,[u,v,m],function(e,t,n){return function(){function i(e,t){if(!t.isDetached()){var i=this.connectRuntime(t.ruid).exec.call(this,"FileReaderSync","read",e,t);return this.disconnectRuntime(),i}var r=t.getSource();switch(e){case"readAsBinaryString":return r;case"readAsDataURL":return"data:"+t.type+";base64,"+n.btoa(r);case"readAsText":for(var o="",a=0,s=r.length;s>a;a++)o+=String.fromCharCode(r[a]);return o}}t.call(this),e.extend(this,{uid:e.guid("uid_"),readAsBinaryString:function(e){return i.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){return i.call(this,"readAsDataURL",e)},readAsText:function(e){return i.call(this,"readAsText",e)}})}}),i(A,[h,u,y],function(e,t,n){function i(){var e,i=[];t.extend(this,{append:function(r,o){var a=this,s=t.typeOf(o);o instanceof n?e={name:r,value:o}:"array"===s?(r+="[]",t.each(o,function(e){a.append(r,e)})):"object"===s?t.each(o,function(e,t){a.append(r+"["+t+"]",e)}):"null"===s||"undefined"===s||"number"===s&&isNaN(o)?a.append(r,"false"):i.push({name:r,value:o.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return e&&e.value||null},getBlobName:function(){return e&&e.name||null},each:function(n){t.each(i,function(e){n(e.value,e.name)}),e&&n(e.value,e.name)},destroy:function(){e=null,i=[]}})}return i}),i(S,[u,h,p,m,R,g,x,y,T,A,d,l],function(e,t,n,i,r,o,a,s,u,c,l,d){function f(){this.uid=e.guid("uid_")}function h(){function n(e,t){return y.hasOwnProperty(e)?1===arguments.length?l.can("define_property")?y[e]:v[e]:void(l.can("define_property")?y[e]=t:v[e]=t):void 0}function u(t){function i(){k&&(k.destroy(),k=null),s.dispatchEvent("loadend"),s=null}function r(r){k.bind("LoadStart",function(e){n("readyState",h.LOADING),s.dispatchEvent("readystatechange"),s.dispatchEvent(e),I&&s.upload.dispatchEvent(e)}),k.bind("Progress",function(e){n("readyState")!==h.LOADING&&(n("readyState",h.LOADING),s.dispatchEvent("readystatechange")),s.dispatchEvent(e)}),k.bind("UploadProgress",function(e){I&&s.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:e.total,loaded:e.loaded})}),k.bind("Load",function(t){n("readyState",h.DONE),n("status",Number(r.exec.call(k,"XMLHttpRequest","getStatus")||0)),n("statusText",p[n("status")]||""),n("response",r.exec.call(k,"XMLHttpRequest","getResponse",n("responseType"))),~e.inArray(n("responseType"),["text",""])?n("responseText",n("response")):"document"===n("responseType")&&n("responseXML",n("response")),U=r.exec.call(k,"XMLHttpRequest","getAllResponseHeaders"),s.dispatchEvent("readystatechange"),n("status")>0?(I&&s.upload.dispatchEvent(t),s.dispatchEvent(t)):(N=!0,s.dispatchEvent("error")),i()}),k.bind("Abort",function(e){s.dispatchEvent(e),i()}),k.bind("Error",function(e){N=!0,n("readyState",h.DONE),s.dispatchEvent("readystatechange"),D=!0,s.dispatchEvent(e),i()}),r.exec.call(k,"XMLHttpRequest","send",{url:E,method:_,async:w,user:b,password:R,headers:x,mimeType:A,encoding:T,responseType:s.responseType,withCredentials:s.withCredentials,options:P},t)}var s=this;M=(new Date).getTime(),k=new a,"string"==typeof P.required_caps&&(P.required_caps=o.parseCaps(P.required_caps)),P.required_caps=e.extend({},P.required_caps,{return_response_type:s.responseType}),t instanceof c&&(P.required_caps.send_multipart=!0),L||(P.required_caps.do_cors=!0),P.ruid?r(k.connectRuntime(P)):(k.bind("RuntimeInit",function(e,t){r(t)}),k.bind("RuntimeError",function(e,t){s.dispatchEvent("RuntimeError",t)}),k.connectRuntime(P))}function g(){n("responseText",""),n("responseXML",null),n("response",null),n("status",0),n("statusText",""),M=C=null}var v=this,y={timeout:0,readyState:h.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},w=!0,E,_,x={},b,R,T=null,A=null,S=!1,O=!1,I=!1,D=!1,N=!1,L=!1,M,C,F=null,H=null,P={},k,U="",B;e.extend(this,y,{uid:e.guid("uid_"),upload:new f,open:function(o,a,s,u,c){var l;if(!o||!a)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(o)||i.utf8_encode(o)!==o)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(~e.inArray(o.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(_=o.toUpperCase()),~e.inArray(_,["CONNECT","TRACE","TRACK"]))throw new t.DOMException(t.DOMException.SECURITY_ERR);if(a=i.utf8_encode(a),l=r.parseUrl(a),L=r.hasSameOrigin(l),E=r.resolveUrl(a),(u||c)&&!L)throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);if(b=u||l.user,R=c||l.pass,w=s||!0,w===!1&&(n("timeout")||n("withCredentials")||""!==n("responseType")))throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);S=!w,O=!1,x={},g.call(this),n("readyState",h.OPENED),this.convertEventPropsToHandlers(["readystatechange"]),this.dispatchEvent("readystatechange")},setRequestHeader:function(r,o){var a=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];if(n("readyState")!==h.OPENED||O)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(r)||i.utf8_encode(r)!==r)throw new t.DOMException(t.DOMException.SYNTAX_ERR);return r=e.trim(r).toLowerCase(),~e.inArray(r,a)||/^(proxy\-|sec\-)/.test(r)?!1:(x[r]?x[r]+=", "+o:x[r]=o,!0)},getAllResponseHeaders:function(){return U||""},getResponseHeader:function(t){return t=t.toLowerCase(),N||~e.inArray(t,["set-cookie","set-cookie2"])?null:U&&""!==U&&(B||(B={},e.each(U.split(/\r\n/),function(t){var n=t.split(/:\s+/);2===n.length&&(n[0]=e.trim(n[0]),B[n[0].toLowerCase()]={header:n[0],value:e.trim(n[1])})})),B.hasOwnProperty(t))?B[t].header+": "+B[t].value:null},overrideMimeType:function(i){var r,o;if(~e.inArray(n("readyState"),[h.LOADING,h.DONE]))throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(i=e.trim(i.toLowerCase()),/;/.test(i)&&(r=i.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(i=r[1],r[2]&&(o=r[2])),!d.mimes[i])throw new t.DOMException(t.DOMException.SYNTAX_ERR);F=i,H=o},send:function(n,r){if(P="string"===e.typeOf(r)?{ruid:r}:r?r:{},this.convertEventPropsToHandlers(m),this.upload.convertEventPropsToHandlers(m),this.readyState!==h.OPENED||O)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(n instanceof s)P.ruid=n.ruid,A=n.type||"application/octet-stream";else if(n instanceof c){if(n.hasBlob()){var o=n.getBlob();P.ruid=o.ruid,A=o.type||"application/octet-stream"}}else"string"==typeof n&&(T="UTF-8",A="text/plain;charset=UTF-8",n=i.utf8_encode(n));this.withCredentials||(this.withCredentials=P.required_caps&&P.required_caps.send_browser_cookies&&!L),I=!S&&this.upload.hasEventListener(),N=!1,D=!n,S||(O=!0),u.call(this,n)},abort:function(){if(N=!0,S=!1,~e.inArray(n("readyState"),[h.UNSENT,h.OPENED,h.DONE]))n("readyState",h.UNSENT);else{if(n("readyState",h.DONE),O=!1,!k)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);k.getRuntime().exec.call(k,"XMLHttpRequest","abort",D),D=!0}},destroy:function(){k&&("function"===e.typeOf(k.destroy)&&k.destroy(),k=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}})}var p={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};f.prototype=n.instance;var m=["loadstart","progress","abort","error","load","timeout","loadend"],g=1,v=2;return h.UNSENT=0,h.OPENED=1,h.HEADERS_RECEIVED=2,h.LOADING=3,h.DONE=4,h.prototype=n.instance,h}),i(O,[u,m,v,p],function(e,t,n,i){function r(){function i(){l=d=0,c=this.result=null}function o(t,n){var i=this;u=n,i.bind("TransportingProgress",function(t){d=t.loaded,l>d&&-1===e.inArray(i.state,[r.IDLE,r.DONE])&&a.call(i)},999),i.bind("TransportingComplete",function(){d=l,i.state=r.DONE,c=null,i.result=u.exec.call(i,"Transporter","getAsBlob",t||"")},999),i.state=r.BUSY,i.trigger("TransportingStarted"),a.call(i)}function a(){var e=this,n,i=l-d;f>i&&(f=i),n=t.btoa(c.substr(d,f)),u.exec.call(e,"Transporter","receive",n,l)}var s,u,c,l,d,f;n.call(this),e.extend(this,{uid:e.guid("uid_"),state:r.IDLE,result:null,transport:function(t,n,r){var a=this;if(r=e.extend({chunk_size:204798},r),(s=r.chunk_size%3)&&(r.chunk_size+=3-s),f=r.chunk_size,i.call(this),c=t,l=t.length,"string"===e.typeOf(r)||r.ruid)o.call(a,n,this.connectRuntime(r));else{var u=function(e,t){a.unbind("RuntimeInit",u),o.call(a,n,t)};this.bind("RuntimeInit",u),this.connectRuntime(r)}},abort:function(){var e=this;e.state=r.IDLE,u&&(u.exec.call(e,"Transporter","clear"),e.trigger("TransportingAborted")),i.call(e)},destroy:function(){this.unbindAll(),u=null,this.disconnectRuntime(),i.call(this)}})}return r.IDLE=0,r.BUSY=1,r.DONE=2,r.prototype=i.instance,r}),i(I,[u,f,h,T,S,g,v,O,d,p,y,w,m],function(e,t,n,i,r,o,a,s,u,c,l,d,f){function h(){function i(e){e||(e=this.getRuntime().exec.call(this,"Image","getInfo")),this.size=e.size,this.width=e.width,this.height=e.height,this.type=e.type,this.meta=e.meta,""===this.name&&(this.name=e.name)}function c(t){var i=e.typeOf(t);try{if(t instanceof h){if(!t.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);m.apply(this,arguments)}else if(t instanceof l){if(!~e.inArray(t.type,["image/jpeg","image/png"]))throw new n.ImageError(n.ImageError.WRONG_FORMAT);g.apply(this,arguments)}else if(-1!==e.inArray(i,["blob","file"]))c.call(this,new d(null,t),arguments[1]);else if("string"===i)/^data:[^;]*;base64,/.test(t)?c.call(this,new l(null,{data:t}),arguments[1]):v.apply(this,arguments);else{if("node"!==i||"img"!==t.nodeName.toLowerCase())throw new n.DOMException(n.DOMException.TYPE_MISMATCH_ERR);c.call(this,t.src,arguments[1])}}catch(r){this.trigger("error",r.code)}}function m(t,n){var i=this.connectRuntime(t.ruid);this.ruid=i.uid,i.exec.call(this,"Image","loadFromImage",t,"undefined"===e.typeOf(n)?!0:n)}function g(t,n){function i(e){r.ruid=e.uid,e.exec.call(r,"Image","loadFromBlob",t)}var r=this;r.name=t.name||"",t.isDetached()?(this.bind("RuntimeInit",function(e,t){i(t)}),n&&"string"==typeof n.required_caps&&(n.required_caps=o.parseCaps(n.required_caps)),this.connectRuntime(e.extend({required_caps:{access_image_binary:!0,resize_image:!0}},n))):i(this.connectRuntime(t.ruid))}function v(e,t){var n=this,i;i=new r,i.open("get",e),i.responseType="blob",i.onprogress=function(e){n.trigger(e)},i.onload=function(){g.call(n,i.response,!0)},i.onerror=function(e){n.trigger(e)},i.onloadend=function(){i.destroy()},i.bind("RuntimeError",function(e,t){n.trigger("RuntimeError",t)}),i.send(null,t)}a.call(this),e.extend(this,{uid:e.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){this.bind("Load Resize",function(){i.call(this)},999),this.convertEventPropsToHandlers(p),c.apply(this,arguments)},downsize:function(t){var i={width:this.width,height:this.height,crop:!1,preserveHeaders:!0};t="object"==typeof t?e.extend(i,t):e.extend(i,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]});try{if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);if(this.width>h.MAX_RESIZE_WIDTH||this.height>h.MAX_RESIZE_HEIGHT)throw new n.ImageError(n.ImageError.MAX_RESOLUTION_ERR);this.getRuntime().exec.call(this,"Image","downsize",t.width,t.height,t.crop,t.preserveHeaders)}catch(r){this.trigger("error",r.code)}},crop:function(e,t,n){this.downsize(e,t,!0,n)},getAsCanvas:function(){if(!u.can("create_canvas"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);var e=this.connectRuntime(this.ruid);return e.exec.call(this,"Image","getAsCanvas")},getAsBlob:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return e||(e="image/jpeg"),"image/jpeg"!==e||t||(t=90),this.getRuntime().exec.call(this,"Image","getAsBlob",e,t)},getAsDataURL:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return this.getRuntime().exec.call(this,"Image","getAsDataURL",e,t)},getAsBinaryString:function(e,t){var n=this.getAsDataURL(e,t);return f.atob(n.substring(n.indexOf("base64,")+7))},embed:function(i){function r(){if(u.can("create_canvas")){var t=a.getAsCanvas();if(t)return i.appendChild(t),t=null,a.destroy(),void o.trigger("embedded")}var r=a.getAsDataURL(c,l);if(!r)throw new n.ImageError(n.ImageError.WRONG_FORMAT);if(u.can("use_data_uri_of",r.length))i.innerHTML='<img src="'+r+'" width="'+a.width+'" height="'+a.height+'" />',a.destroy(),o.trigger("embedded");else{var d=new s;d.bind("TransportingComplete",function(){v=o.connectRuntime(this.result.ruid),o.bind("Embedded",function(){e.extend(v.getShimContainer().style,{top:"0px",left:"0px",width:a.width+"px",height:a.height+"px"}),v=null},999),v.exec.call(o,"ImageView","display",this.result.uid,m,g),a.destroy()}),d.transport(f.atob(r.substring(r.indexOf("base64,")+7)),c,e.extend({},p,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:i}))}}var o=this,a,c,l,d,p=arguments[1]||{},m=this.width,g=this.height,v;try{if(!(i=t.get(i)))throw new n.DOMException(n.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);if(this.width>h.MAX_RESIZE_WIDTH||this.height>h.MAX_RESIZE_HEIGHT)throw new n.ImageError(n.ImageError.MAX_RESOLUTION_ERR);if(c=p.type||this.type||"image/jpeg",l=p.quality||90,d="undefined"!==e.typeOf(p.crop)?p.crop:!1,p.width)m=p.width,g=p.height||m;else{var y=t.getSize(i);y.w&&y.h&&(m=y.w,g=y.h)}return a=new h,a.bind("Resize",function(){r.call(o)}),a.bind("Load",function(){a.downsize(m,g,d,!1)}),a.clone(this,!1),a}catch(w){this.trigger("error",w.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.unbindAll()}})}var p=["progress","load","error","resize","embedded"];return h.MAX_RESIZE_WIDTH=6500,h.MAX_RESIZE_HEIGHT=6500,h.prototype=c.instance,h}),i(D,[u,h,g,d],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue,c=e.extend({access_binary:s(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return r.can("access_binary")&&!!a.Image},display_media:s(i.can("create_canvas")||i.can("use_data_uri_over32kb")),do_cors:s(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:s(function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&("IE"!==i.browser||i.version>9)}()),filter_by_extension:s(function(){return"Chrome"===i.browser&&i.version>=28||"IE"===i.browser&&i.version>=10}()),return_response_headers:u,return_response_type:function(e){return"json"===e&&window.JSON?!0:i.can("return_response_type",e)},return_status_code:u,report_upload_progress:s(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return r.can("access_binary")&&i.can("create_canvas")},select_file:function(){return i.can("use_fileinput")&&window.File},select_folder:function(){return r.can("select_file")&&"Chrome"===i.browser&&i.version>=21},select_multiple:function(){return!(!r.can("select_file")||"Safari"===i.browser&&"Windows"===i.os||"iOS"===i.os&&i.verComp(i.osVersion,"7.0.4","<"))},send_binary_string:s(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:s(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||r.can("send_binary_string")},slice_blob:s(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return r.can("slice_blob")&&r.can("send_multipart")},summon_file_dialog:s(function(){return"Firefox"===i.browser&&i.version>=4||"Opera"===i.browser&&i.version>=12||"IE"===i.browser&&i.version>=10||!!~e.inArray(i.browser,["Chrome","Safari"])}()),upload_filesize:u},arguments[2]);n.call(this,t,arguments[1]||o,c),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html5",a={};return n.addConstructor(o,r),a}),i(N,[D,y],function(e,t){function n(){function e(e,t,n){var i;if(!window.File.prototype.slice)return(i=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?i.call(e,t,n):null;try{return e.slice(),e.slice(t,n)}catch(r){return e.slice(t,n-t)}}this.slice=function(){return new t(this.getRuntime().uid,e.apply(this,arguments))}}return e.Blob=n}),i(L,[u],function(e){function t(){this.returnValue=!1}function n(){this.cancelBubble=!0}var i={},r="moxie_"+e.guid(),o=function(o,a,s,u){var c,l;a=a.toLowerCase(),o.addEventListener?(c=s,o.addEventListener(a,c,!1)):o.attachEvent&&(c=function(){var e=window.event;e.target||(e.target=e.srcElement),e.preventDefault=t,e.stopPropagation=n,s(e)},o.attachEvent("on"+a,c)),o[r]||(o[r]=e.guid()),i.hasOwnProperty(o[r])||(i[o[r]]={}),l=i[o[r]],l.hasOwnProperty(a)||(l[a]=[]),l[a].push({func:c,orig:s,key:u})},a=function(t,n,o){var a,s;if(n=n.toLowerCase(),t[r]&&i[t[r]]&&i[t[r]][n]){a=i[t[r]][n];for(var u=a.length-1;u>=0&&(a[u].orig!==o&&a[u].key!==o||(t.removeEventListener?t.removeEventListener(n,a[u].func,!1):t.detachEvent&&t.detachEvent("on"+n,a[u].func),a[u].orig=null,a[u].func=null,a.splice(u,1),o===s));u--);if(a.length||delete i[t[r]][n],e.isEmptyObj(i[t[r]])){delete i[t[r]];try{delete t[r]}catch(c){t[r]=s}}}},s=function(t,n){t&&t[r]&&e.each(i[t[r]],function(e,i){a(t,i,n)})};return{addEvent:o,removeEvent:a,removeAllEvents:s}}),i(M,[D,u,f,L,l,d],function(e,t,n,i,r,o){function a(){var e=[],a;t.extend(this,{init:function(s){var u=this,c=u.getRuntime(),l,d,f,h,p,m;a=s,e=[],f=a.accept.mimes||r.extList2mimes(a.accept,c.can("filter_by_extension")),d=c.getShimContainer(),d.innerHTML='<input id="'+c.uid+'" type="file" style="font-size:999px;opacity:0;"'+(a.multiple&&c.can("select_multiple")?"multiple":"")+(a.directory&&c.can("select_folder")?"webkitdirectory directory":"")+(f?' accept="'+f.join(",")+'"':"")+" />",l=n.get(c.uid),t.extend(l.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),h=n.get(a.browse_button),c.can("summon_file_dialog")&&("static"===n.getStyle(h,"position")&&(h.style.position="relative"),p=parseInt(n.getStyle(h,"z-index"),10)||1,h.style.zIndex=p,d.style.zIndex=p-1,i.addEvent(h,"click",function(e){var t=n.get(c.uid);t&&!t.disabled&&t.click(),e.preventDefault()},u.uid)),m=c.can("summon_file_dialog")?h:d,i.addEvent(m,"mouseover",function(){u.trigger("mouseenter")},u.uid),i.addEvent(m,"mouseout",function(){u.trigger("mouseleave")},u.uid),i.addEvent(m,"mousedown",function(){u.trigger("mousedown")},u.uid),i.addEvent(n.get(a.container),"mouseup",function(){u.trigger("mouseup")},u.uid),l.onchange=function g(){if(e=[],a.directory?t.each(this.files,function(t){"."!==t.name&&e.push(t)}):e=[].slice.call(this.files),"IE"!==o.browser&&"IEMobile"!==o.browser)this.value="";else{var n=this.cloneNode(!0);this.parentNode.replaceChild(n,this),n.onchange=g}u.trigger("change")},u.trigger({type:"ready",async:!0}),d=null},getFiles:function(){return e},disable:function(e){var t=this.getRuntime(),i;(i=n.get(t.uid))&&(i.disabled=!!e)},destroy:function(){var t=this.getRuntime(),r=t.getShim(),o=t.getShimContainer();i.removeAllEvents(o,this.uid),i.removeAllEvents(a&&n.get(a.container),this.uid),i.removeAllEvents(a&&n.get(a.browse_button),this.uid),o&&(o.innerHTML=""),r.removeInstance(this.uid),e=a=o=r=null}})}return e.FileInput=a}),i(C,[D,u,f,L,l],function(e,t,n,i,r){function o(){function e(e){if(!e.dataTransfer||!e.dataTransfer.types)return!1;var n=t.toArray(e.dataTransfer.types||[]);return-1!==t.inArray("Files",n)||-1!==t.inArray("public.file-url",n)||-1!==t.inArray("application/x-moz-file",n)}function o(e){for(var n=[],i=0;i<e.length;i++)[].push.apply(n,e[i].extensions.split(/\s*,\s*/));return-1===t.inArray("*",n)?n:[]}function a(e){if(!f.length)return!0;var n=r.getFileExtension(e.name);return!n||-1!==t.inArray(n,f)}function s(e,n){var i=[];t.each(e,function(e){var t=e.webkitGetAsEntry();if(t)if(t.isFile){var n=e.getAsFile();a(n)&&d.push(n)}else i.push(t)}),i.length?u(i,n):n()}function u(e,n){var i=[];t.each(e,function(e){i.push(function(t){c(e,t)})}),t.inSeries(i,function(){n()})}function c(e,t){e.isFile?e.file(function(e){a(e)&&d.push(e),t()},function(){t()}):e.isDirectory?l(e,t):t()}function l(e,t){function n(e){r.readEntries(function(t){t.length?([].push.apply(i,t),n(e)):e()},e)}var i=[],r=e.createReader();n(function(){u(i,t)})}var d=[],f=[],h;t.extend(this,{init:function(n){var r=this,u;h=n,f=o(h.accept),u=h.container,i.addEvent(u,"dragover",function(t){e(t)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")},r.uid),i.addEvent(u,"drop",function(n){e(n)&&(n.preventDefault(),d=[],n.dataTransfer.items&&n.dataTransfer.items[0].webkitGetAsEntry?s(n.dataTransfer.items,function(){r.trigger("drop")}):(t.each(n.dataTransfer.files,function(e){a(e)&&d.push(e)}),r.trigger("drop")))},r.uid),i.addEvent(u,"dragenter",function(e){r.trigger("dragenter")},r.uid),i.addEvent(u,"dragleave",function(e){r.trigger("dragleave")},r.uid)},getFiles:function(){return d},destroy:function(){i.removeAllEvents(h&&n.get(h.container),this.uid),d=f=h=null}})}return e.FileDrop=o}),i(F,[D,m,u],function(e,t,n){function i(){function e(e){return t.atob(e.substring(e.indexOf("base64,")+7))}var i,r=!1;n.extend(this,{read:function(e,t){var o=this;i=new window.FileReader,i.addEventListener("progress",function(e){o.trigger(e)}),i.addEventListener("load",function(e){o.trigger(e)}),i.addEventListener("error",function(e){o.trigger(e,i.error)}),i.addEventListener("loadend",function(){i=null}),"function"===n.typeOf(i[e])?(r=!1,i[e](t.getSource())):"readAsBinaryString"===e&&(r=!0,i.readAsDataURL(t.getSource()))},getResult:function(){return i&&i.result?r?e(i.result):i.result:null},abort:function(){i&&i.abort()},destroy:function(){i=null}})}return e.FileReader=i}),i(H,[D,u,l,R,w,y,A,h,d],function(e,t,n,i,r,o,a,s,u){function c(){function e(e,t){var n=this,i,r;i=t.getBlob().getSource(),r=new window.FileReader,r.onload=function(){t.append(t.getBlobName(),new o(null,{type:i.type,data:r.result})),f.send.call(n,e,t)},r.readAsBinaryString(i)}function c(){return!window.XMLHttpRequest||"IE"===u.browser&&u.version<8?function(){for(var e=["Msxml2.XMLHTTP.6.0","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(n){}}():new window.XMLHttpRequest}function l(e){var t=e.responseXML,n=e.responseText;return"IE"===u.browser&&n&&t&&!t.documentElement&&/[^\/]+\/[^\+]+\+xml/.test(e.getResponseHeader("Content-Type"))&&(t=new window.ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.validateOnParse=!1,t.loadXML(n)),t&&("IE"===u.browser&&0!==t.parseError||!t.documentElement||"parsererror"===t.documentElement.tagName)?null:t}function d(e){var t="----moxieboundary"+(new Date).getTime(),n="--",i="\r\n",r="",a=this.getRuntime();if(!a.can("send_binary_string"))throw new s.RuntimeError(s.RuntimeError.NOT_SUPPORTED_ERR);return h.setRequestHeader("Content-Type","multipart/form-data; boundary="+t),e.each(function(e,a){r+=e instanceof o?n+t+i+'Content-Disposition: form-data; name="'+a+'"; filename="'+unescape(encodeURIComponent(e.name||"blob"))+'"'+i+"Content-Type: "+(e.type||"application/octet-stream")+i+i+e.getSource()+i:n+t+i+'Content-Disposition: form-data; name="'+a+'"'+i+i+unescape(encodeURIComponent(e))+i}),r+=n+t+n+i}var f=this,h,p;t.extend(this,{send:function(n,r){var s=this,l="Mozilla"===u.browser&&u.version>=4&&u.version<7,f="Android Browser"===u.browser,m=!1;if(p=n.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),h=c(),h.open(n.method,n.url,n.async,n.user,n.password),r instanceof o)r.isDetached()&&(m=!0),r=r.getSource();else if(r instanceof a){if(r.hasBlob())if(r.getBlob().isDetached())r=d.call(s,r),m=!0;else if((l||f)&&"blob"===t.typeOf(r.getBlob().getSource())&&window.FileReader)return void e.call(s,n,r);if(r instanceof a){var g=new window.FormData;r.each(function(e,t){e instanceof o?g.append(t,e.getSource()):g.append(t,e)}),r=g}}h.upload?(n.withCredentials&&(h.withCredentials=!0),h.addEventListener("load",function(e){s.trigger(e)}),h.addEventListener("error",function(e){s.trigger(e)}),h.addEventListener("progress",function(e){s.trigger(e)}),h.upload.addEventListener("progress",function(e){s.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})):h.onreadystatechange=function v(){switch(h.readyState){case 1:break;case 2:break;case 3:var e,t;try{i.hasSameOrigin(n.url)&&(e=h.getResponseHeader("Content-Length")||0),h.responseText&&(t=h.responseText.length)}catch(r){e=t=0}s.trigger({type:"progress",lengthComputable:!!e,total:parseInt(e,10),loaded:t});break;case 4:h.onreadystatechange=function(){},s.trigger(0===h.status?"error":"load")}},t.isEmptyObj(n.headers)||t.each(n.headers,function(e,t){h.setRequestHeader(t,e)}),""!==n.responseType&&"responseType"in h&&(h.responseType="json"!==n.responseType||u.can("return_response_type","json")?n.responseType:"text"),m?h.sendAsBinary?h.sendAsBinary(r):!function(){for(var e=new Uint8Array(r.length),t=0;t<r.length;t++)e[t]=255&r.charCodeAt(t);h.send(e.buffer)}():h.send(r),s.trigger("loadstart")},getStatus:function(){try{if(h)return h.status}catch(e){}return 0},getResponse:function(e){var t=this.getRuntime();try{switch(e){case"blob":var i=new r(t.uid,h.response),o=h.getResponseHeader("Content-Disposition");if(o){var a=o.match(/filename=([\'\"'])([^\1]+)\1/);a&&(p=a[2])}return i.name=p,i.type||(i.type=n.getFileMime(p)),i;case"json":return u.can("return_response_type","json")?h.response:200===h.status&&window.JSON?JSON.parse(h.responseText):null;case"document":return l(h);default:return""!==h.responseText?h.responseText:null}}catch(s){return null}},getAllResponseHeaders:function(){try{return h.getAllResponseHeaders()}catch(e){}return""},abort:function(){h&&h.abort()},destroy:function(){f=p=null}})}return e.XMLHttpRequest=c}),i(P,[],function(){return function(){function e(e,t){var n=r?0:-8*(t-1),i=0,a;for(a=0;t>a;a++)i|=o.charCodeAt(e+a)<<Math.abs(n+8*a);return i}function n(e,t,n){n=3===arguments.length?n:o.length-t-1,o=o.substr(0,t)+e+o.substr(n+t)}function i(e,t,i){var o="",a=r?0:-8*(i-1),s;for(s=0;i>s;s++)o+=String.fromCharCode(t>>Math.abs(a+8*s)&255);n(o,e,i)}var r=!1,o;return{II:function(e){return e===t?r:void(r=e)},init:function(e){r=!1,o=e},SEGMENT:function(e,t,i){switch(arguments.length){case 1:return o.substr(e,o.length-e-1);case 2:return o.substr(e,t);case 3:n(i,e,t);break;default:return o}},BYTE:function(t){return e(t,1)},SHORT:function(t){return e(t,2)},LONG:function(n,r){return r===t?e(n,4):void i(n,r,4)},SLONG:function(t){var n=e(t,4);return n>2147483647?n-4294967296:n},STRING:function(t,n){var i="";for(n+=t;n>t;t++)i+=String.fromCharCode(e(t,1));return i}}}}),i(k,[P],function(e){return function t(n){var i=[],r,o,a,s=0;if(r=new e,r.init(n),65496===r.SHORT(0)){for(o=2;o<=n.length;)if(a=r.SHORT(o),a>=65488&&65495>=a)o+=2;else{if(65498===a||65497===a)break;s=r.SHORT(o+2)+2,a>=65505&&65519>=a&&i.push({hex:a,name:"APP"+(15&a),start:o,length:s,segment:r.SEGMENT(o,s)}),o+=s}return r.init(null),{headers:i,restore:function(e){var t,n;for(r.init(e),o=65504==r.SHORT(2)?4+r.SHORT(4):2,n=0,t=i.length;t>n;n++)r.SEGMENT(o,0,i[n].segment),o+=i[n].length;return e=r.SEGMENT(),r.init(null),e},strip:function(e){var n,i,o;for(i=new t(e),n=i.headers,i.purge(),r.init(e),o=n.length;o--;)r.SEGMENT(n[o].start,n[o].length,"");return e=r.SEGMENT(),r.init(null),e},get:function(e){for(var t=[],n=0,r=i.length;r>n;n++)i[n].name===e.toUpperCase()&&t.push(i[n].segment);return t},set:function(e,t){var n=[],r,o,a;for("string"==typeof t?n.push(t):n=t,r=o=0,a=i.length;a>r&&(i[r].name===e.toUpperCase()&&(i[r].segment=n[o],i[r].length=n[o].length,o++),!(o>=n.length));r++);},purge:function(){i=[],r.init(null),r=null}}}}}),i(U,[u,P],function(e,n){return function i(){function i(e,n){var i=a.SHORT(e),r,o,s,u,d,f,h,p,m=[],g={};for(r=0;i>r;r++)if(h=f=e+12*r+2,s=n[a.SHORT(h)],s!==t){switch(u=a.SHORT(h+=2),d=a.LONG(h+=2),h+=4,m=[],u){case 1:case 7:for(d>4&&(h=a.LONG(h)+c.tiffHeader),o=0;d>o;o++)m[o]=a.BYTE(h+o);break;case 2:d>4&&(h=a.LONG(h)+c.tiffHeader),g[s]=a.STRING(h,d-1);continue;case 3:for(d>2&&(h=a.LONG(h)+c.tiffHeader),o=0;d>o;o++)m[o]=a.SHORT(h+2*o);break;case 4:for(d>1&&(h=a.LONG(h)+c.tiffHeader),o=0;d>o;o++)m[o]=a.LONG(h+4*o);break;case 5:for(h=a.LONG(h)+c.tiffHeader,o=0;d>o;o++)m[o]=a.LONG(h+4*o)/a.LONG(h+4*o+4);break;case 9:for(h=a.LONG(h)+c.tiffHeader,o=0;d>o;o++)m[o]=a.SLONG(h+4*o);break;case 10:for(h=a.LONG(h)+c.tiffHeader,o=0;d>o;o++)m[o]=a.SLONG(h+4*o)/a.SLONG(h+4*o+4);break;default:continue}p=1==d?m[0]:m,g[s]=l.hasOwnProperty(s)&&"object"!=typeof p?l[s][p]:p}return g}function r(){var e=c.tiffHeader;return a.II(18761==a.SHORT(e)),42!==a.SHORT(e+=2)?!1:(c.IFD0=c.tiffHeader+a.LONG(e+=2),u=i(c.IFD0,s.tiff),"ExifIFDPointer"in u&&(c.exifIFD=c.tiffHeader+u.ExifIFDPointer,delete u.ExifIFDPointer),"GPSInfoIFDPointer"in u&&(c.gpsIFD=c.tiffHeader+u.GPSInfoIFDPointer,delete u.GPSInfoIFDPointer),!0)}function o(e,t,n){var i,r,o,u=0;if("string"==typeof t){var l=s[e.toLowerCase()];for(var d in l)if(l[d]===t){t=d;break}}i=c[e.toLowerCase()+"IFD"],r=a.SHORT(i);for(var f=0;r>f;f++)if(o=i+12*f+2,a.SHORT(o)==t){u=o+8;break}return u?(a.LONG(u,n),!0):!1}var a,s,u,c={},l;return a=new n,s={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}},l={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},{init:function(e){return c={tiffHeader:10},e!==t&&e.length?(a.init(e),65505===a.SHORT(0)&&"EXIF\x00"===a.STRING(4,5).toUpperCase()?r():!1):!1 +},TIFF:function(){return u},EXIF:function(){var t;if(t=i(c.exifIFD,s.exif),t.ExifVersion&&"array"===e.typeOf(t.ExifVersion)){for(var n=0,r="";n<t.ExifVersion.length;n++)r+=String.fromCharCode(t.ExifVersion[n]);t.ExifVersion=r}return t},GPS:function(){var t;return t=i(c.gpsIFD,s.gps),t.GPSVersionID&&"array"===e.typeOf(t.GPSVersionID)&&(t.GPSVersionID=t.GPSVersionID.join(".")),t},setExif:function(e,t){return"PixelXDimension"!==e&&"PixelYDimension"!==e?!1:o("exif",e,t)},getBinary:function(){return a.SEGMENT()},purge:function(){a.init(null),a=u=null,c={}}}}}),i(B,[u,h,k,P,U],function(e,t,n,i,r){function o(o){function a(){for(var e=0,t,n;e<=u.length;){if(t=c.SHORT(e+=2),t>=65472&&65475>=t)return e+=5,{height:c.SHORT(e),width:c.SHORT(e+=2)};n=c.SHORT(e+=2),e+=n-2}return null}function s(){d&&l&&c&&(d.purge(),l.purge(),c.init(null),u=f=l=d=c=null)}var u,c,l,d,f,h;if(u=o,c=new i,c.init(u),65496!==c.SHORT(0))throw new t.ImageError(t.ImageError.WRONG_FORMAT);l=new n(o),d=new r,h=!!d.init(l.get("app1")[0]),f=a.call(this),e.extend(this,{type:"image/jpeg",size:u.length,width:f&&f.width||0,height:f&&f.height||0,setExif:function(t,n){return h?("object"===e.typeOf(t)?e.each(t,function(e,t){d.setExif(t,e)}):d.setExif(t,n),void l.set("app1",d.getBinary())):!1},writeHeaders:function(){return arguments.length?l.restore(arguments[0]):u=l.restore(u)},stripHeaders:function(e){return l.strip(e)},purge:function(){s.call(this)}}),h&&(this.meta={tiff:d.TIFF(),exif:d.EXIF(),gps:d.GPS()})}return o}),i(z,[h,u,P],function(e,t,n){function i(i){function r(){var e,t;return e=a.call(this,8),"IHDR"==e.type?(t=e.start,{width:u.LONG(t),height:u.LONG(t+=4)}):null}function o(){u&&(u.init(null),s=d=c=l=u=null)}function a(e){var t,n,i,r;return t=u.LONG(e),n=u.STRING(e+=4,4),i=e+=4,r=u.LONG(e+t),{length:t,type:n,start:i,CRC:r}}var s,u,c,l,d;s=i,u=new n,u.init(s),function(){var t=0,n=0,i=[35152,20039,3338,6666];for(n=0;n<i.length;n++,t+=2)if(i[n]!=u.SHORT(t))throw new e.ImageError(e.ImageError.WRONG_FORMAT)}(),d=r.call(this),t.extend(this,{type:"image/png",size:s.length,width:d.width,height:d.height,purge:function(){o.call(this)}}),o.call(this)}return i}),i(G,[u,h,B,z],function(e,t,n,i){return function(r){var o=[n,i],a;a=function(){for(var e=0;e<o.length;e++)try{return new o[e](r)}catch(n){}throw new t.ImageError(t.ImageError.WRONG_FORMAT)}(),e.extend(this,{type:"",size:0,width:0,height:0,setExif:function(){},writeHeaders:function(e){return e},stripHeaders:function(e){return e},purge:function(){}}),e.extend(this,a),this.purge=function(){a.purge(),a=null}}}),i(q,[],function(){function e(e,i,r){var o=e.naturalWidth,a=e.naturalHeight,s=r.width,u=r.height,c=r.x||0,l=r.y||0,d=i.getContext("2d");t(e)&&(o/=2,a/=2);var f=1024,h=document.createElement("canvas");h.width=h.height=f;for(var p=h.getContext("2d"),m=n(e,o,a),g=0;a>g;){for(var v=g+f>a?a-g:f,y=0;o>y;){var w=y+f>o?o-y:f;p.clearRect(0,0,f,f),p.drawImage(e,-y,-g);var E=y*s/o+c<<0,_=Math.ceil(w*s/o),x=g*u/a/m+l<<0,b=Math.ceil(v*u/a/m);d.drawImage(h,0,0,w,v,E,x,_,b),y+=f}g+=f}h=p=null}function t(e){var t=e.naturalWidth,n=e.naturalHeight;if(t*n>1048576){var i=document.createElement("canvas");i.width=i.height=1;var r=i.getContext("2d");return r.drawImage(e,-t+1,0),0===r.getImageData(0,0,1,1).data[3]}return!1}function n(e,t,n){var i=document.createElement("canvas");i.width=1,i.height=n;var r=i.getContext("2d");r.drawImage(e,0,0);for(var o=r.getImageData(0,0,1,n).data,a=0,s=n,u=n;u>a;){var c=o[4*(u-1)+3];0===c?s=u:a=u,u=s+a>>1}i=null;var l=u/n;return 0===l?1:l}return{isSubsampled:t,renderTo:e}}),i(X,[D,u,h,m,w,G,q,l,d],function(e,t,n,i,r,o,a,s,u){function c(){function e(){if(!E&&!y)throw new n.ImageError(n.DOMException.INVALID_STATE_ERR);return E||y}function c(e){return i.atob(e.substring(e.indexOf("base64,")+7))}function l(e,t){return"data:"+(t||"")+";base64,"+i.btoa(e)}function d(e){var t=this;y=new Image,y.onerror=function(){g.call(this),t.trigger("error",n.ImageError.WRONG_FORMAT)},y.onload=function(){t.trigger("load")},y.src=/^data:[^;]*;base64,/.test(e)?e:l(e,x.type)}function f(e,t){var i=this,r;return window.FileReader?(r=new FileReader,r.onload=function(){t(this.result)},r.onerror=function(){i.trigger("error",n.ImageError.WRONG_FORMAT)},r.readAsDataURL(e),void 0):t(e.getAsDataURL())}function h(n,i,r,o){var a=this,s,u,c=0,l=0,d,f,h,g;if(R=o,g=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1,-1!==t.inArray(g,[5,6,7,8])){var v=n;n=i,i=v}return d=e(),r?(n=Math.min(n,d.width),i=Math.min(i,d.height),s=Math.max(n/d.width,i/d.height)):s=Math.min(n/d.width,i/d.height),s>1&&!r&&o?void this.trigger("Resize"):(E||(E=document.createElement("canvas")),f=Math.round(d.width*s),h=Math.round(d.height*s),r?(E.width=n,E.height=i,f>n&&(c=Math.round((f-n)/2)),h>i&&(l=Math.round((h-i)/2))):(E.width=f,E.height=h),R||m(E.width,E.height,g),p.call(this,d,E,-c,-l,f,h),this.width=E.width,this.height=E.height,b=!0,void a.trigger("Resize"))}function p(e,t,n,i,r,o){if("iOS"===u.OS)a.renderTo(e,t,{width:r,height:o,x:n,y:i});else{var s=t.getContext("2d");s.drawImage(e,n,i,r,o)}}function m(e,t,n){switch(n){case 5:case 6:case 7:case 8:E.width=t,E.height=e;break;default:E.width=e,E.height=t}var i=E.getContext("2d");switch(n){case 2:i.translate(e,0),i.scale(-1,1);break;case 3:i.translate(e,t),i.rotate(Math.PI);break;case 4:i.translate(0,t),i.scale(1,-1);break;case 5:i.rotate(.5*Math.PI),i.scale(1,-1);break;case 6:i.rotate(.5*Math.PI),i.translate(0,-t);break;case 7:i.rotate(.5*Math.PI),i.translate(e,-t),i.scale(-1,1);break;case 8:i.rotate(-.5*Math.PI),i.translate(-e,0)}}function g(){w&&(w.purge(),w=null),_=y=E=x=null,b=!1}var v=this,y,w,E,_,x,b=!1,R=!0;t.extend(this,{loadFromBlob:function(e){var t=this,i=t.getRuntime(),r=arguments.length>1?arguments[1]:!0;if(!i.can("access_binary"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);return x=e,e.isDetached()?(_=e.getSource(),void d.call(this,_)):void f.call(this,e.getSource(),function(e){r&&(_=c(e)),d.call(t,e)})},loadFromImage:function(e,t){this.meta=e.meta,x=new r(null,{name:e.name,size:e.size,type:e.type}),d.call(this,t?_=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var t=this.getRuntime(),n;return!w&&_&&t.can("access_image_binary")&&(w=new o(_)),n={width:e().width||0,height:e().height||0,type:x.type||s.getFileMime(x.name),size:_&&_.length||x.size||0,name:x.name||"",meta:w&&w.meta||this.meta||{}}},downsize:function(){h.apply(this,arguments)},getAsCanvas:function(){return E&&(E.id=this.uid+"_canvas"),E},getAsBlob:function(e,t){return e!==this.type&&h.call(this,this.width,this.height,!1),new r(null,{name:x.name||"",type:e,data:v.getAsBinaryString.call(this,e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!b)return y.src;if("image/jpeg"!==e)return E.toDataURL("image/png");try{return E.toDataURL("image/jpeg",t/100)}catch(n){return E.toDataURL("image/jpeg")}},getAsBinaryString:function(e,t){if(!b)return _||(_=c(v.getAsDataURL(e,t))),_;if("image/jpeg"!==e)_=c(v.getAsDataURL(e,t));else{var n;t||(t=90);try{n=E.toDataURL("image/jpeg",t/100)}catch(i){n=E.toDataURL("image/jpeg")}_=c(n),w&&(_=w.stripHeaders(_),R&&(w.meta&&w.meta.exif&&w.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),_=w.writeHeaders(_)),w.purge(),w=null)}return b=!1,_},destroy:function(){v=null,g.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return e.Image=c}),i(j,[u,d,f,h,g],function(e,t,n,i,r){function o(){var e;try{e=navigator.plugins["Shockwave Flash"],e=e.description}catch(t){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(n){e="0.0"}}return e=e.match(/\d+/g),parseFloat(e[0]+"."+e[1])}function a(a){var c=this,l;a=e.extend({swf_url:t.swf_url},a),r.call(this,a,s,{access_binary:function(e){return e&&"browser"===c.mode},access_image_binary:function(e){return e&&"browser"===c.mode},display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:function(){return"client"===c.mode},resize_image:r.capTrue,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!e.arrayDiff(t,["","text","document"])||"browser"===c.mode},return_status_code:function(t){return"browser"===c.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:function(e){return e&&"browser"===c.mode},send_browser_cookies:function(e){return e&&"browser"===c.mode},send_custom_headers:function(e){return e&&"browser"===c.mode},send_multipart:r.capTrue,slice_blob:function(e){return e&&"browser"===c.mode},stream_upload:function(e){return e&&"browser"===c.mode},summon_file_dialog:!1,upload_filesize:function(t){return e.parseSizeStr(t)<=2097152||"client"===c.mode},use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}},{access_binary:function(e){return e?"browser":"client"},access_image_binary:function(e){return e?"browser":"client"},report_upload_progress:function(e){return e?"browser":"client"},return_response_type:function(t){return e.arrayDiff(t,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"browser":["client","browser"]},send_binary_string:function(e){return e?"browser":"client"},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"browser":"client"},stream_upload:function(e){return e?"client":"browser"},upload_filesize:function(t){return e.parseSizeStr(t)>=2097152?"client":"browser"}},"client"),o()<10&&(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid)},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec(this.uid,e,t,n)},init:function(){var n,r,o;o=this.getShimContainer(),e.extend(o.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),n='<object id="'+this.uid+'" type="application/x-shockwave-flash" data="'+a.swf_url+'" ',"IE"===t.browser&&(n+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '),n+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+a.swf_url+'" /><param name="flashvars" value="uid='+escape(this.uid)+"&target="+t.global_event_dispatcher+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>',"IE"===t.browser?(r=document.createElement("div"),o.appendChild(r),r.outerHTML=n,r=o=null):o.innerHTML=n,l=setTimeout(function(){c&&!c.initialized&&c.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},5e3)},destroy:function(e){return function(){e.call(c),clearTimeout(l),a=l=e=c=null}}(this.destroy)},u)}var s="flash",u={};return r.addConstructor(s,a),u}),i(V,[j,y],function(e,t){var n={slice:function(e,n,i,r){var o=this.getRuntime();return 0>n?n=Math.max(e.size+n,0):n>0&&(n=Math.min(n,e.size)),0>i?i=Math.max(e.size+i,0):i>0&&(i=Math.min(i,e.size)),e=o.shimExec.call(this,"Blob","slice",n,i,r||""),e&&(e=new t(o.uid,e)),e}};return e.Blob=n}),i(W,[j],function(e){var t={init:function(e){this.getRuntime().shimExec.call(this,"FileInput","init",{name:e.name,accept:e.accept,multiple:e.multiple}),this.trigger("ready")}};return e.FileInput=t}),i(Y,[j,m],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var i="",r={read:function(e,t){var r=this,o=r.getRuntime();return"readAsDataURL"===e&&(i="data:"+(t.type||"")+";base64,"),r.bind("Progress",function(t,r){r&&(i+=n(r,e))}),o.shimExec.call(this,"FileReader","readAsBase64",t.uid)},getResult:function(){return i},destroy:function(){i=null}};return e.FileReader=r}),i($,[j,m],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var i={read:function(e,t){var i,r=this.getRuntime();return(i=r.shimExec.call(this,"FileReaderSync","readAsBase64",t.uid))?("readAsDataURL"===e&&(i="data:"+(t.type||"")+";base64,"+i),n(i,e,t.type)):null}};return e.FileReaderSync=i}),i(J,[j,u,y,w,T,A,O],function(e,t,n,i,r,o,a){var s={send:function(e,i){function r(){e.transport=l.mode,l.shimExec.call(c,"XMLHttpRequest","send",e,i)}function s(e,t){l.shimExec.call(c,"XMLHttpRequest","appendBlob",e,t.uid),i=null,r()}function u(e,t){var n=new a;n.bind("TransportingComplete",function(){t(this.result)}),n.transport(e.getSource(),e.type,{ruid:l.uid})}var c=this,l=c.getRuntime();if(t.isEmptyObj(e.headers)||t.each(e.headers,function(e,t){l.shimExec.call(c,"XMLHttpRequest","setRequestHeader",t,e.toString())}),i instanceof o){var d;if(i.each(function(e,t){e instanceof n?d=t:l.shimExec.call(c,"XMLHttpRequest","append",t,e)}),i.hasBlob()){var f=i.getBlob();f.isDetached()?u(f,function(e){f.destroy(),s(d,e)}):s(d,f)}else i=null,r()}else i instanceof n?i.isDetached()?u(i,function(e){i.destroy(),i=e.uid,r()}):(i=i.uid,r()):r()},getResponse:function(e){var n,o,a=this.getRuntime();if(o=a.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob")){if(o=new i(a.uid,o),"blob"===e)return o;try{if(n=new r,~t.inArray(e,["","text"]))return n.readAsText(o);if("json"===e&&window.JSON)return JSON.parse(n.readAsText(o))}finally{o.destroy()}}return null},abort:function(e){var t=this.getRuntime();t.shimExec.call(this,"XMLHttpRequest","abort"),this.dispatchEvent("readystatechange"),this.dispatchEvent("abort")}};return e.XMLHttpRequest=s}),i(Z,[j,y],function(e,t){var n={getAsBlob:function(e){var n=this.getRuntime(),i=n.shimExec.call(this,"Transporter","getAsBlob",e);return i?new t(n.uid,i):null}};return e.Transporter=n}),i(K,[j,u,O,y,T],function(e,t,n,i,r){var o={loadFromBlob:function(e){function t(e){r.shimExec.call(i,"Image","loadFromBlob",e.uid),i=r=null}var i=this,r=i.getRuntime();if(e.isDetached()){var o=new n;o.bind("TransportingComplete",function(){t(o.result.getSource())}),o.transport(e.getSource(),e.type,{ruid:r.uid})}else t(e.getSource())},loadFromImage:function(e){var t=this.getRuntime();return t.shimExec.call(this,"Image","loadFromImage",e.uid)},getAsBlob:function(e,t){var n=this.getRuntime(),r=n.shimExec.call(this,"Image","getAsBlob",e,t);return r?new i(n.uid,r):null},getAsDataURL:function(){var e=this.getRuntime(),t=e.Image.getAsBlob.apply(this,arguments),n;return t?(n=new r,n.readAsDataURL(t)):null}};return e.Image=o}),i(Q,[u,d,f,h,g],function(e,t,n,i,r){function o(e){var t=!1,n=null,i,r,o,a,s,u=0;try{try{n=new ActiveXObject("AgControl.AgControl"),n.IsVersionSupported(e)&&(t=!0),n=null}catch(c){var l=navigator.plugins["Silverlight Plug-In"];if(l){for(i=l.description,"1.0.30226.2"===i&&(i="2.0.30226.2"),r=i.split(".");r.length>3;)r.pop();for(;r.length<4;)r.push(0);for(o=e.split(".");o.length>4;)o.pop();do a=parseInt(o[u],10),s=parseInt(r[u],10),u++;while(u<o.length&&a===s);s>=a&&!isNaN(a)&&(t=!0)}}}catch(d){t=!1}return t}function a(a){var c=this,l;a=e.extend({xap_url:t.xap_url},a),r.call(this,a,s,{access_binary:r.capTrue,access_image_binary:r.capTrue,display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:r.capTrue,resize_image:r.capTrue,return_response_headers:function(e){return e&&"client"===c.mode},return_response_type:function(e){return"json"!==e?!0:!!window.JSON},return_status_code:function(t){return"client"===c.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:r.capTrue,send_browser_cookies:function(e){return e&&"browser"===c.mode},send_custom_headers:function(e){return e&&"client"===c.mode},send_multipart:r.capTrue,slice_blob:r.capTrue,stream_upload:!0,summon_file_dialog:!1,upload_filesize:r.capTrue,use_http_method:function(t){return"client"===c.mode||!e.arrayDiff(t,["GET","POST"])}},{return_response_headers:function(e){return e?"client":"browser"},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"client":["client","browser"]},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"client":"browser"},use_http_method:function(t){return e.arrayDiff(t,["GET","POST"])?"client":["client","browser"]}}),o("2.0.31005.0")&&"Opera"!==t.browser||(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid).content.Moxie},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec(this.uid,e,t,n)},init:function(){var e;e=this.getShimContainer(),e.innerHTML='<object id="'+this.uid+'" data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%" style="outline:none;"><param name="source" value="'+a.xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="uid='+this.uid+",target="+t.global_event_dispatcher+'"/></object>',l=setTimeout(function(){c&&!c.initialized&&c.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},"Windows"!==t.OS?1e4:5e3)},destroy:function(e){return function(){e.call(c),clearTimeout(l),a=l=e=c=null}}(this.destroy)},u)}var s="silverlight",u={};return r.addConstructor(s,a),u}),i(et,[Q,u,V],function(e,t,n){return e.Blob=t.extend({},n)}),i(tt,[Q],function(e){var t={init:function(e){function t(e){for(var t="",n=0;n<e.length;n++)t+=(""!==t?"|":"")+e[n].title+" | *."+e[n].extensions.replace(/,/g,";*.");return t}this.getRuntime().shimExec.call(this,"FileInput","init",t(e.accept),e.name,e.multiple),this.trigger("ready")}};return e.FileInput=t}),i(nt,[Q,f,L],function(e,t,n){var i={init:function(){var e=this,i=e.getRuntime(),r;return r=i.getShimContainer(),n.addEvent(r,"dragover",function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="copy"},e.uid),n.addEvent(r,"dragenter",function(e){e.preventDefault();var n=t.get(i.uid).dragEnter(e);n&&e.stopPropagation()},e.uid),n.addEvent(r,"drop",function(e){e.preventDefault();var n=t.get(i.uid).dragDrop(e);n&&e.stopPropagation()},e.uid),i.shimExec.call(this,"FileDrop","init")}};return e.FileDrop=i}),i(it,[Q,u,Y],function(e,t,n){return e.FileReader=t.extend({},n)}),i(rt,[Q,u,$],function(e,t,n){return e.FileReaderSync=t.extend({},n)}),i(ot,[Q,u,J],function(e,t,n){return e.XMLHttpRequest=t.extend({},n)}),i(at,[Q,u,Z],function(e,t,n){return e.Transporter=t.extend({},n)}),i(st,[Q,u,K],function(e,t,n){return e.Image=t.extend({},n,{getInfo:function(){var e=this.getRuntime(),n=["tiff","exif","gps"],i={meta:{}},r=e.shimExec.call(this,"Image","getInfo");return r.meta&&t.each(n,function(e){var t=r.meta[e],n,o,a,s;if(t&&t.keys)for(i.meta[e]={},o=0,a=t.keys.length;a>o;o++)n=t.keys[o],s=t[n],s&&(/^(\d|[1-9]\d+)$/.test(s)?s=parseInt(s,10):/^\d*\.\d+$/.test(s)&&(s=parseFloat(s)),i.meta[e][n]=s)}),i.width=parseInt(r.width,10),i.height=parseInt(r.height,10),i.size=parseInt(r.size,10),i.type=r.type,i.name=r.name,i}})}),i(ut,[u,h,g,d],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue;n.call(this,t,o,{access_binary:s(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:s(a.Image&&(i.can("create_canvas")||i.can("use_data_uri_over32kb"))),do_cors:!1,drag_and_drop:!1,filter_by_extension:s(function(){return"Chrome"===i.browser&&i.version>=28||"IE"===i.browser&&i.version>=10}()),resize_image:function(){return a.Image&&r.can("access_binary")&&i.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!!~e.inArray(t,["text","document",""])},return_status_code:function(t){return!e.arrayDiff(t,[200,404])},select_file:function(){return i.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return r.can("select_file")},summon_file_dialog:s(function(){return"Firefox"===i.browser&&i.version>=4||"Opera"===i.browser&&i.version>=12||!!~e.inArray(i.browser,["Chrome","Safari"])}()),upload_filesize:u,use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}}),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html4",a={};return n.addConstructor(o,r),a}),i(ct,[ut,u,f,L,l,d],function(e,t,n,i,r,o){function a(){function e(){var r=this,l=r.getRuntime(),d,f,h,p,m,g;g=t.guid("uid_"),d=l.getShimContainer(),a&&(h=n.get(a+"_form"),h&&t.extend(h.style,{top:"100%"})),p=document.createElement("form"),p.setAttribute("id",g+"_form"),p.setAttribute("method","post"),p.setAttribute("enctype","multipart/form-data"),p.setAttribute("encoding","multipart/form-data"),t.extend(p.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),m=document.createElement("input"),m.setAttribute("id",g),m.setAttribute("type","file"),m.setAttribute("name",c.name||"Filedata"),m.setAttribute("accept",u.join(",")),t.extend(m.style,{fontSize:"999px",opacity:0}),p.appendChild(m),d.appendChild(p),t.extend(m.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===o.browser&&o.version<10&&t.extend(m.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),m.onchange=function(){var t;this.value&&(t=this.files?this.files[0]:{name:this.value},s=[t],this.onchange=function(){},e.call(r),r.bind("change",function i(){var e=n.get(g),t=n.get(g+"_form"),o;r.unbind("change",i),r.files.length&&e&&t&&(o=r.files[0],e.setAttribute("id",o.uid),t.setAttribute("id",o.uid+"_form"),t.setAttribute("target",o.uid+"_iframe")),e=t=null},998),m=p=null,r.trigger("change"))},l.can("summon_file_dialog")&&(f=n.get(c.browse_button),i.removeEvent(f,"click",r.uid),i.addEvent(f,"click",function(e){m&&!m.disabled&&m.click(),e.preventDefault()},r.uid)),a=g,d=h=f=null}var a,s=[],u=[],c;t.extend(this,{init:function(t){var o=this,a=o.getRuntime(),s;c=t,u=t.accept.mimes||r.extList2mimes(t.accept,a.can("filter_by_extension")),s=a.getShimContainer(),function(){var e,r,u;e=n.get(t.browse_button),a.can("summon_file_dialog")&&("static"===n.getStyle(e,"position")&&(e.style.position="relative"),r=parseInt(n.getStyle(e,"z-index"),10)||1,e.style.zIndex=r,s.style.zIndex=r-1),u=a.can("summon_file_dialog")?e:s,i.addEvent(u,"mouseover",function(){o.trigger("mouseenter")},o.uid),i.addEvent(u,"mouseout",function(){o.trigger("mouseleave")},o.uid),i.addEvent(u,"mousedown",function(){o.trigger("mousedown")},o.uid),i.addEvent(n.get(t.container),"mouseup",function(){o.trigger("mouseup")},o.uid),e=null}(),e.call(this),s=null,o.trigger({type:"ready",async:!0})},getFiles:function(){return s},disable:function(e){var t;(t=n.get(a))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),r=e.getShimContainer();i.removeAllEvents(r,this.uid),i.removeAllEvents(c&&n.get(c.container),this.uid),i.removeAllEvents(c&&n.get(c.browse_button),this.uid),r&&(r.innerHTML=""),t.removeInstance(this.uid),a=s=u=c=r=t=null}})}return e.FileInput=a}),i(lt,[ut,F],function(e,t){return e.FileReader=t}),i(dt,[ut,u,f,R,h,L,y,A],function(e,t,n,i,r,o,a,s){function u(){function e(e){var t=this,i,r,a,s,u=!1;if(l){if(i=l.id.replace(/_iframe$/,""),r=n.get(i+"_form")){for(a=r.getElementsByTagName("input"),s=a.length;s--;)switch(a[s].getAttribute("type")){case"hidden":a[s].parentNode.removeChild(a[s]);break;case"file":u=!0}a=[],u||r.parentNode.removeChild(r),r=null}setTimeout(function(){o.removeEvent(l,"load",t.uid),l.parentNode&&l.parentNode.removeChild(l);var n=t.getRuntime().getShimContainer();n.children.length||n.parentNode.removeChild(n),n=l=null,e()},1)}}var u,c,l;t.extend(this,{send:function(d,f){function h(){var n=m.getShimContainer()||document.body,r=document.createElement("div");r.innerHTML='<iframe id="'+g+'_iframe" name="'+g+'_iframe" src="javascript:""" style="display:none"></iframe>',l=r.firstChild,n.appendChild(l),o.addEvent(l,"load",function(){var n;try{n=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(n.title)?u=n.title.replace(/^(\d+).*$/,"$1"):(u=200,c=t.trim(n.body.innerHTML),p.trigger({type:"progress",loaded:c.length,total:c.length}),w&&p.trigger({type:"uploadprogress",loaded:w.size||1025,total:w.size||1025}))}catch(r){if(!i.hasSameOrigin(d.url))return void e.call(p,function(){p.trigger("error")});u=404}e.call(p,function(){p.trigger("load")})},p.uid)}var p=this,m=p.getRuntime(),g,v,y,w;if(u=c=null,f instanceof s&&f.hasBlob()){if(w=f.getBlob(),g=w.uid,y=n.get(g),v=n.get(g+"_form"),!v)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR)}else g=t.guid("uid_"),v=document.createElement("form"),v.setAttribute("id",g+"_form"),v.setAttribute("method",d.method),v.setAttribute("enctype","multipart/form-data"),v.setAttribute("encoding","multipart/form-data"),v.setAttribute("target",g+"_iframe"),m.getShimContainer().appendChild(v);f instanceof s&&f.each(function(e,n){if(e instanceof a)y&&y.setAttribute("name",n);else{var i=document.createElement("input");t.extend(i,{type:"hidden",name:n,value:e}),y?v.insertBefore(i,y):v.appendChild(i)}}),v.setAttribute("action",d.url),h(),v.submit(),p.trigger("loadstart")},getStatus:function(){return u},getResponse:function(e){if("json"===e&&"string"===t.typeOf(c)&&window.JSON)try{return JSON.parse(c.replace(/^\s*<pre[^>]*>/,"").replace(/<\/pre>\s*$/,""))}catch(n){return null}return c},abort:function(){var t=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand("Stop"):l.src="about:blank"),e.call(this,function(){t.dispatchEvent("abort")})}})}return e.XMLHttpRequest=u}),i(ft,[ut,X],function(e,t){return e.Image=t}),a([u,c,l,d,f,h,p,m,g,v,y,w,E,_,x,b,R,T,A,S,O,I,L])}(this);;(function(e){"use strict";var t={},n=e.moxie.core.utils.Basic.inArray;return function r(e){var i,s;for(i in e)s=typeof e[i],s==="object"&&!~n(i,["Exceptions","Env","Mime"])?r(e[i]):s==="function"&&(t[i]=e[i])}(e.moxie),t.Env=e.moxie.core.utils.Env,t.Mime=e.moxie.core.utils.Mime,t.Exceptions=e.moxie.core.Exceptions,e.mOxie=t,e.o||(e.o=t),t})(this); +/** + * Plupload - multi-runtime File Uploader + * v2.1.2 + * + * Copyright 2013, Moxiecode Systems AB + * Released under GPL License. + * + * License: http://www.plupload.com/license + * Contributing: http://www.plupload.com/contributing + * + * Date: 2014-05-14 + */ +;(function(e,t,n){function s(e){function r(e,t,r){var i={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};i[e]?n[i[e]]=t:r||(n[e]=t)}var t=e.required_features,n={};if(typeof t=="string")o.each(t.split(/\s*,\s*/),function(e){r(e,!0)});else if(typeof t=="object")o.each(t,function(e,t){r(t,e)});else if(t===!0){e.chunk_size>0&&(n.slice_blob=!0);if(e.resize.enabled||!e.multipart)n.send_binary_string=!0;o.each(e,function(e,t){r(t,!!e,!0)})}return n}var r=e.setTimeout,i={},o={VERSION:"2.1.2",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:t.mimes,ua:t.ua,typeOf:t.typeOf,extend:t.extend,guid:t.guid,get:function(n){var r=[],i;t.typeOf(n)!=="array"&&(n=[n]);var s=n.length;while(s--)i=t.get(n[s]),i&&r.push(i);return r.length?r:null},each:t.each,getPos:t.getPos,getSize:t.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},n=/[<>&\"\']/g;return e?(""+e).replace(n,function(e){return t[e]?"&"+t[e]+";":e}):e},toArray:t.toArray,inArray:t.inArray,addI18n:t.addI18n,translate:t.translate,isEmptyObj:t.isEmptyObj,hasClass:t.hasClass,addClass:t.addClass,removeClass:t.removeClass,getStyle:t.getStyle,addEvent:t.addEvent,removeEvent:t.removeEvent,removeAllEvents:t.removeAllEvents,cleanName:function(e){var t,n;n=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(t=0;t<n.length;t+=2)e=e.replace(n[t],n[t+1]);return e=e.replace(/\s+/g,"_"),e=e.replace(/[^a-z0-9_\-\.]+/gi,""),e},buildUrl:function(e,t){var n="";return o.each(t,function(e,t){n+=(n?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)}),n&&(e+=(e.indexOf("?")>0?"&":"?")+n),e},formatSize:function(e){function t(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}if(e===n||/\D/.test(e))return o.translate("N/A");var r=Math.pow(1024,4);return e>r?t(e/r,1)+" "+o.translate("tb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("gb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("mb"):e>1024?Math.round(e/1024)+" "+o.translate("kb"):e+" "+o.translate("b")},parseSize:t.parseSizeStr,predictRuntime:function(e,n){var r,i;return r=new o.Uploader(e),i=t.Runtime.thatCan(r.getOption().required_features,n||e.runtimes),r.destroy(),i},addFileFilter:function(e,t){i[e]=t}};o.addFileFilter("mime_types",function(e,t,n){e.length&&!e.regexp.test(t.name)?(this.trigger("Error",{code:o.FILE_EXTENSION_ERROR,message:o.translate("File extension error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("max_file_size",function(e,t,n){var r;e=o.parseSize(e),t.size!==r&&e&&t.size>e?(this.trigger("Error",{code:o.FILE_SIZE_ERROR,message:o.translate("File size error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("prevent_duplicates",function(e,t,n){if(e){var r=this.files.length;while(r--)if(t.name===this.files[r].name&&t.size===this.files[r].size){this.trigger("Error",{code:o.FILE_DUPLICATE_ERROR,message:o.translate("Duplicate file error."),file:t}),n(!1);return}}n(!0)}),o.Uploader=function(e){function g(){var e,t=0,n;if(this.state==o.STARTED){for(n=0;n<f.length;n++)!e&&f[n].status==o.QUEUED?(e=f[n],this.trigger("BeforeUpload",e)&&(e.status=o.UPLOADING,this.trigger("UploadFile",e))):t++;t==f.length&&(this.state!==o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged")),this.trigger("UploadComplete",f))}}function y(e){e.percent=e.size>0?Math.ceil(e.loaded/e.size*100):100,b()}function b(){var e,t;d.reset();for(e=0;e<f.length;e++)t=f[e],t.size!==n?(d.size+=t.origSize,d.loaded+=t.loaded*t.origSize/t.size):d.size=n,t.status==o.DONE?d.uploaded++:t.status==o.FAILED?d.failed++:d.queued++;d.size===n?d.percent=f.length>0?Math.ceil(d.uploaded/f.length*100):0:(d.bytesPerSec=Math.ceil(d.loaded/((+(new Date)-p||1)/1e3)),d.percent=d.size>0?Math.ceil(d.loaded/d.size*100):0)}function w(){var e=c[0]||h[0];return e?e.getRuntime().uid:!1}function E(e,n){if(e.ruid){var r=t.Runtime.getInfo(e.ruid);if(r)return r.can(n)}return!1}function S(){this.bind("FilesAdded FilesRemoved",function(e){e.trigger("QueueChanged"),e.refresh()}),this.bind("CancelUpload",O),this.bind("BeforeUpload",C),this.bind("UploadFile",k),this.bind("UploadProgress",L),this.bind("StateChanged",A),this.bind("QueueChanged",b),this.bind("Error",_),this.bind("FileUploaded",M),this.bind("Destroy",D)}function x(e,n){var r=this,i=0,s=[],u={runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:l,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};o.each(e.runtimes.split(/\s*,\s*/),function(t){e[t]&&(u[t]=e[t])}),e.browse_button&&o.each(e.browse_button,function(n){s.push(function(s){var a=new t.FileInput(o.extend({},u,{accept:e.filters.mime_types,name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:n}));a.onready=function(){var e=t.Runtime.getInfo(this.ruid);t.extend(r.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),i++,c.push(this),s()},a.onchange=function(){r.addFile(this.files)},a.bind("mouseenter mouseleave mousedown mouseup",function(r){v||(e.browse_button_hover&&("mouseenter"===r.type?t.addClass(n,e.browse_button_hover):"mouseleave"===r.type&&t.removeClass(n,e.browse_button_hover)),e.browse_button_active&&("mousedown"===r.type?t.addClass(n,e.browse_button_active):"mouseup"===r.type&&t.removeClass(n,e.browse_button_active)))}),a.bind("mousedown",function(){r.trigger("Browse")}),a.bind("error runtimeerror",function(){a=null,s()}),a.init()})}),e.drop_element&&o.each(e.drop_element,function(e){s.push(function(n){var s=new t.FileDrop(o.extend({},u,{drop_zone:e}));s.onready=function(){var e=t.Runtime.getInfo(this.ruid);r.features.dragdrop=e.can("drag_and_drop"),i++,h.push(this),n()},s.ondrop=function(){r.addFile(this.files)},s.bind("error runtimeerror",function(){s=null,n()}),s.init()})}),t.inSeries(s,function(){typeof n=="function"&&n(i)})}function T(e,r,i){var s=new t.Image;try{s.onload=function(){if(r.width>this.width&&r.height>this.height&&r.quality===n&&r.preserve_headers&&!r.crop)return this.destroy(),i(e);s.downsize(r.width,r.height,r.crop,r.preserve_headers)},s.onresize=function(){i(this.getAsBlob(e.type,r.quality)),this.destroy()},s.onerror=function(){i(e)},s.load(e)}catch(o){i(e)}}function N(e,n,r){function f(e,t,n){var r=a[e];switch(e){case"max_file_size":e==="max_file_size"&&(a.max_file_size=a.filters.max_file_size=t);break;case"chunk_size":if(t=o.parseSize(t))a[e]=t,a.send_file_name=!0;break;case"multipart":a[e]=t,t||(a.send_file_name=!0);break;case"unique_names":a[e]=t,t&&(a.send_file_name=!0);break;case"filters":o.typeOf(t)==="array"&&(t={mime_types:t}),n?o.extend(a.filters,t):a.filters=t,t.mime_types&&(a.filters.mime_types.regexp=function(e){var t=[];return o.each(e,function(e){o.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?t.push("\\.*"):t.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+t.join("|")+")$","i")}(a.filters.mime_types));break;case"resize":n?o.extend(a.resize,t,{enabled:!0}):a.resize=t;break;case"prevent_duplicates":a.prevent_duplicates=a.filters.prevent_duplicates=!!t;break;case"browse_button":case"drop_element":t=o.get(t);case"container":case"runtimes":case"multi_selection":case"flash_swf_url":case"silverlight_xap_url":a[e]=t,n||(u=!0);break;default:a[e]=t}n||i.trigger("OptionChanged",e,t,r)}var i=this,u=!1;typeof e=="object"?o.each(e,function(e,t){f(t,e,r)}):f(e,n,r),r?(a.required_features=s(o.extend({},a)),l=s(o.extend({},a,{required_features:!0}))):u&&(i.trigger("Destroy"),x.call(i,a,function(e){e?(i.runtime=t.Runtime.getInfo(w()).type,i.trigger("Init",{runtime:i.runtime}),i.trigger("PostInit")):i.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})}))}function C(e,t){if(e.settings.unique_names){var n=t.name.match(/\.([^.]+)$/),r="part";n&&(r=n[1]),t.target_name=t.id+"."+r}}function k(e,n){function h(){u-->0?r(p,1e3):(n.loaded=f,e.trigger("Error",{code:o.HTTP_ERROR,message:o.translate("HTTP Error."),file:n,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}))}function p(){var d,v,g={},y;if(n.status!==o.UPLOADING||e.state===o.STOPPED)return;e.settings.send_file_name&&(g.name=n.target_name||n.name),s&&a.chunks&&c.size>s?(y=Math.min(s,c.size-f),d=c.slice(f,f+y)):(y=c.size,d=c),s&&a.chunks&&(e.settings.send_chunk_number?(g.chunk=Math.ceil(f/s),g.chunks=Math.ceil(c.size/s)):(g.offset=f,g.total=c.size)),m=new t.XMLHttpRequest,m.upload&&(m.upload.onprogress=function(t){n.loaded=Math.min(n.size,f+t.loaded),e.trigger("UploadProgress",n)}),m.onload=function(){if(m.status>=400){h();return}u=e.settings.max_retries,y<c.size?(d.destroy(),f+=y,n.loaded=Math.min(f,c.size),e.trigger("ChunkUploaded",n,{offset:n.loaded,total:c.size,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}),t.Env.browser==="Android Browser"&&e.trigger("UploadProgress",n)):n.loaded=n.size,d=v=null,!f||f>=c.size?(n.size!=n.origSize&&(c.destroy(),c=null),e.trigger("UploadProgress",n),n.status=o.DONE,e.trigger("FileUploaded",n,{response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()})):r(p,1)},m.onerror=function(){h()},m.onloadend=function(){this.destroy(),m=null},e.settings.multipart&&a.multipart?(m.open("post",i,!0),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),v=new t.FormData,o.each(o.extend(g,e.settings.multipart_params),function(e,t){v.append(t,e)}),v.append(e.settings.file_data_name,d),m.send(v,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url})):(i=o.buildUrl(e.settings.url,o.extend(g,e.settings.multipart_params)),m.open("post",i,!0),m.setRequestHeader("Content-Type","application/octet-stream"),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),m.send(d,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url}))}var i=e.settings.url,s=e.settings.chunk_size,u=e.settings.max_retries,a=e.features,f=0,c;n.loaded&&(f=n.loaded=s?s*Math.floor(n.loaded/s):0),c=n.getSource(),e.settings.resize.enabled&&E(c,"send_binary_string")&&!!~t.inArray(c.type,["image/jpeg","image/png"])?T.call(this,c,e.settings.resize,function(e){c=e,n.size=e.size,p()}):p()}function L(e,t){y(t)}function A(e){if(e.state==o.STARTED)p=+(new Date);else if(e.state==o.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==o.UPLOADING&&(e.files[t].status=o.QUEUED,b())}function O(){m&&m.abort()}function M(e){b(),r(function(){g.call(e)},1)}function _(e,t){t.code===o.INIT_ERROR?e.destroy():t.file&&(t.file.status=o.FAILED,y(t.file),e.state==o.STARTED&&(e.trigger("CancelUpload"),r(function(){g.call(e)},1)))}function D(e){e.stop(),o.each(f,function(e){e.destroy()}),f=[],c.length&&(o.each(c,function(e){e.destroy()}),c=[]),h.length&&(o.each(h,function(e){e.destroy()}),h=[]),l={},v=!1,p=m=null,d.reset()}var u=o.guid(),a,f=[],l={},c=[],h=[],p,d,v=!1,m;a={runtimes:t.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",flash_swf_url:"js/Moxie.swf",silverlight_xap_url:"js/Moxie.xap",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_file_name:!0,send_chunk_number:!0},N.call(this,e,null,!0),d=new o.QueueProgress,o.extend(this,{id:u,uid:u,state:o.STOPPED,features:{},runtime:null,files:f,settings:a,total:d,init:function(){var e=this;typeof a.preinit=="function"?a.preinit(e):o.each(a.preinit,function(t,n){e.bind(n,t)}),S.call(this);if(!a.browse_button||!a.url){this.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")});return}x.call(this,a,function(n){typeof a.init=="function"?a.init(e):o.each(a.init,function(t,n){e.bind(n,t)}),n?(e.runtime=t.Runtime.getInfo(w()).type,e.trigger("Init",{runtime:e.runtime}),e.trigger("PostInit")):e.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})})},setOption:function(e,t){N.call(this,e,t,!this.runtime)},getOption:function(e){return e?a[e]:a},refresh:function(){c.length&&o.each(c,function(e){e.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=o.STARTED&&(this.state=o.STARTED,this.trigger("StateChanged"),g.call(this))},stop:function(){this.state!=o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){v=arguments[0]!==n?arguments[0]:!0,c.length&&o.each(c,function(e){e.disable(v)}),this.trigger("DisableBrowse",v)},getFile:function(e){var t;for(t=f.length-1;t>=0;t--)if(f[t].id===e)return f[t]},addFile:function(e,n){function c(e,n){var r=[];t.each(s.settings.filters,function(t,n){i[n]&&r.push(function(r){i[n].call(s,t,e,function(e){r(!e)})})}),t.inSeries(r,n)}function h(e){var i=t.typeOf(e);if(e instanceof t.File){if(!e.ruid&&!e.isDetached()){if(!l)return!1;e.ruid=l,e.connectRuntime(l)}h(new o.File(e))}else e instanceof t.Blob?(h(e.getSource()),e.destroy()):e instanceof o.File?(n&&(e.name=n),u.push(function(t){c(e,function(n){n||(f.push(e),a.push(e),s.trigger("FileFiltered",e)),r(t,1)})})):t.inArray(i,["file","blob"])!==-1?h(new t.File(null,e)):i==="node"&&t.typeOf(e.files)==="filelist"?t.each(e.files,h):i==="array"&&(n=null,t.each(e,h))}var s=this,u=[],a=[],l;l=w(),h(e),u.length&&t.inSeries(u,function(){a.length&&s.trigger("FilesAdded",a)})},removeFile:function(e){var t=typeof e=="string"?e:e.id;for(var n=f.length-1;n>=0;n--)if(f[n].id===t)return this.splice(n,1)[0]},splice:function(e,t){var r=f.splice(e===n?0:e,t===n?f.length:t),i=!1;return this.state==o.STARTED&&(o.each(r,function(e){if(e.status===o.UPLOADING)return i=!0,!1}),i&&this.stop()),this.trigger("FilesRemoved",r),o.each(r,function(e){e.destroy()}),i&&this.start(),r},bind:function(e,t,n){var r=this;o.Uploader.prototype.bind.call(this,e,function(){var e=[].slice.call(arguments);return e.splice(0,1,r),t.apply(this,e)},0,n)},destroy:function(){this.trigger("Destroy"),a=d=null,this.unbindAll()}})},o.Uploader.prototype=t.EventTarget.instance,o.File=function(){function n(n){o.extend(this,{id:o.guid(),name:n.name||n.fileName,type:n.type||"",size:n.size||n.fileSize,origSize:n.size||n.fileSize,loaded:0,percent:0,status:o.QUEUED,lastModifiedDate:n.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var e=this.getSource().getSource();return t.inArray(t.typeOf(e),["blob","file"])!==-1?e:null},getSource:function(){return e[this.id]?e[this.id]:null},destroy:function(){var t=this.getSource();t&&(t.destroy(),delete e[this.id])}}),e[this.id]=n}var e={};return n}(),o.QueueProgress=function(){var e=this;e.size=0,e.loaded=0,e.uploaded=0,e.failed=0,e.queued=0,e.percent=0,e.bytesPerSec=0,e.reset=function(){e.size=e.loaded=e.uploaded=e.failed=e.queued=e.percent=e.bytesPerSec=0}},e.plupload=o})(window,mOxie);
\ No newline at end of file diff --git a/www/wiki/extensions/MsUpload/version b/www/wiki/extensions/MsUpload/version new file mode 100644 index 00000000..9f011765 --- /dev/null +++ b/www/wiki/extensions/MsUpload/version @@ -0,0 +1,4 @@ +MsUpload: REL1_31 +2018-11-22T19:13:45 + +d854ddf |