diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..d144897 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,113 @@ + +# 1.3.0alpha1 +- Change index_ajax.php to not include / call functions that have been deprecated since 4.3 + and take advantage of session lazy loading on 4.4 +- Change use of old templateInit() api and use class based api introduced in 4.3 instead +- Updated jQuery to 1.4.3 +- Fixed bug #017355: admin2: js error prevents context menu in children items table to pop up +- Fixed bug #017573: (tc-458) utf8 names are no rendered properly in admin2 interface +- Added a new server call for the content publishing queue +- Fixed bug #017970: (tc-150)(teamroom) "Error loading box" in teamroom home page + +# v1.2.0rc1 +- Fixed bug #017223: Make LoadFromCDN disabled by default + +# v1.2.0beta2 +- Added jQuery.ez() post param string support like jQuery.post() +- ezjscnode::load added to load json data about object / node +- Update YUI to 3.1.2 +- Fixed bug #017079: ezoe: IE8 Insert MEDIA/IMAGE browse: Tree Nodes not shown + +# v1.2.0alpha6 +- Make index_ajax.php compatible with 4.4 eZSession change + +# v1.2.0alpha4 +- Fixed bug #016900: [patch] eZJSCore: clearing Packer cache in DB cluster + +# v1.2.0alpha3 +- Implemented #16495: Improvements of ezjscPacker::optimizeCSS() +- Fixed bug #16635: ezjscore: @charset "utf-8"; is not stripped +- Fixed bug #16831: ezjscore create one js cache file for all siteaccess (patch) +- Remove ezwebin template override to simplify webin + ezjscore setup (loading order does not matter anymore) + BC: Means ezjscore v1.2.0+ will not work on older ezwebin versions, only ezwebin 1.7.0 and up! +- Updated YUI to 3.1.1 and 2.8.1 + +# v1.2.0alpha2 +- Fixed bug #16726: Src for original image in "Insert image" has a pipe ("|") at the end +- Fixed bug #16761: ini settings and ActiveAccessExtension +- Fixed bug #16669: wrong content-type header for packed js/css files using clustering +- ezjscAjaxContent: Make sure image attribute has content before we add it to json image array + +# v1.2.0alpha1 +- Fixed bug #16393: TC-36 - eZFlow + eZFind show-facets and enable-spellchecker always enabled +- Upgraded YUI 3.x from 3.0.0 to 3.1.0 + + +# v1.1.0rc1 +- Fixed bug #16456: ezjscore not cluster aware? + +# v1.1.0beta1 + +- Fixed #016129: hasAccessToLimitation ezjscore 1.0.1 function does not properly check multiple policies + Added: has_access_to_limitation now has a fourth parameter 'debug', that needs to be true to get debug + on unmatched policy's +- Added a fourth parameter on ezjscore/call to be able to enable debug in response +- Make ezjscServerRouter use hasAccessToLimitation to support multiple policies +- Add support for spellchecker and facets support for ezfind +- Add support for serializeArray() format as post parameter on jQuery.ez +- Updated jQuery to 1.4.2 +- Changed back to using ajax.googleapis.com for jQuery like 1.0, reported in #016229 + + +# v1.1.0alpha1 + +- Fixed bug: ie6 issue with Y.io.ez +- Updated YUI 3.0.0 to GA +- Fixed bug #15606: Admin Content Tree images not found +- Fixed bug #15699: eZJSCore: possible function mixup for ezscriptfiles template operator +- BC: Removed charset attribute from all html tags but script with src attribute (html validation) +- Deprecated charset parameter on ezcss, ezcss_load and ezcss_requried template operators! +- Only use POST parameters for ezjscore/call parameters to avoid reaching url limit and + logging parameters in wwwserver logs +- Add missing include_once('kernel/common/i18n.php'); in index_ajax.php +- Make sure admin user has access to /call even if PolicyOmitList/AnonymousAccessList is commented +- Add support for c.arguments on Y.io.ez() like Y.io() has +- Added support for setting ContentType with get parameter on ezjscore/call for development use +- Added ezjsc::search for re use by other extensions (same parameters as the one in ezflow and ezoe) +- Fixed ezjscore/run issue with eZ Publish 4.0.0 / 4.0.1 on eZURI::instance() +- Disabled language attribute by default on ezscript() for xhtml strict / xhtml1.1 / html5 validation +- BC: Fixed setting typo LocaleScript -> LocalScript in ezjscore.ini +- Added support for more general use of has_access_to_limitation including array values for limitations +- ezjsc::search: Added support for SearchContentClassIdentifier (requires ezp 4.1 or higher) +- ezjsc::search: Return SearchString as part of returned result for js callback use +- Bump required eZ Publish version to 4.1 +- Implemented #15811: ez JS Packer option to include modified time in file url +- Packer: Don't waste cycles on packing and caching if there is only one file, serve it directly +- Fixed bug #15972: ezcache.php --clear-all does not clear ezjscore cache +- Implemented enhancement #16059: DEPRECATED CSSFileList|JavaScriptList in favour of [Frontend|Backend][CSSFileList|JavaScriptList] settings +- Updated jQuery to 1.4.1 +- Implemented enhancement #16068: ezjscore Packer option to specify domain for js/css url +- Add possibility to use GET method if specified (yui3io: in c parameter, jqueryio: with false post parameter) + + + +# v1.0.0 29 Sept 2009 + +- Added FAQ and CHANGELOG +- Moved [eZJSCore]Packer=disabled from site.ini to ezjscore.ini to comply with eZ Network certification + + + +# v1.0.0rc2 19 Sept 2009 + +- Added link to project website in ezinfo page +- Don't store $moduleResult['content_info']['persistent_variable'] unless it's already defined (to avoid confusing code that checks for presence of $moduleResult['content_info']) +- Flatten persistent_variable array to make sure array_unique can actually remove all duplicates +- Fixed bug: Access to a kernel module via index_ajax.php +- Added note in ezinfo about jQuery +- Fixed url to jQuery to use google cdn and not googlecode + + +# v1.0.0rc1 17 Sept 2009 + +- Initial version diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..60549be --- /dev/null +++ b/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library 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. + + + Copyright (C) 19yy + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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) 19yy 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. + + , 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 Library General +Public License instead of this License. diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb794d2 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Aplia eZ JS Core (fork of eZ JS Core ) + +## What is Aplia eZ JS Core? + +Aplia eZ JS Core is a fork of eZ JS Core extension which is bundled inside the eZ Publish legacy repository. + +#### How to merge with eZ JS Core + +1. Checkout `ezpublish-legacy` + + `git clone https://github.com/ezsystems/ezpublish-legacy` + +2. Checkout Aplia eZ JS Core + + `git clone git@github.com:Aplia/ezjscore.git aplia-ezjscore` + +3. Enter Aplia eZ JS Core + + `cd aplia-ezjscore` + +4. Remove everything except `.git`, `README.md` and `composer.json` + + `ls | grep -v '.git' | grep -v 'README.md' | grep -v 'composer.json' | xargs rm -R` + +5. Copy updated code from `ezpublish-legacy` + + `cp -R ../ezpublish-legacy/extension/ezjscore/ .` + +6. Review and add changes + + `git add .` + +7. Push code and add new release diff --git a/autoloads/ezjscaccesstemplatefunctions.php b/autoloads/ezjscaccesstemplatefunctions.php new file mode 100644 index 0000000..98ede4a --- /dev/null +++ b/autoloads/ezjscaccesstemplatefunctions.php @@ -0,0 +1,180 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/** + * Custom has access to call that also lets you check that user has access to provided limitation(s) + * + * has_access_to_limitation( string $module, string $function, hash $limitations ): + * Currently only returns true/false, but will in the future also return array of limitations that + * did not match (as in limitations you did not ask to check by your provided parameters) + */ + +class ezjscAccessTemplateFunctions +{ + function operatorList() + { + return array( 'has_access_to_limitation' ); + } + + function namedParameterPerOperator() + { + return true; + } + + function namedParameterList() + { + return array( 'has_access_to_limitation' => array( 'module' => array( 'type' => 'string', + 'required' => true, + 'default' => '' ), + 'function' => array( 'type' => 'string', + 'required' => true, + 'default' => '' ), + 'limitations' => array( 'type' => 'array', + 'required' => true, + 'default' => array() ), + 'debug' => array( 'type' => 'bool', + 'required' => false, + 'default' => false )), + ); + + } + + function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters ) + { + switch ( $operatorName ) + { + case 'has_access_to_limitation': + { + $operatorValue = self::hasAccessToLimitation( $namedParameters['module'], $namedParameters['function'], $namedParameters['limitations'], $namedParameters['debug'] ); + } break; + } + } + + /** + * Check access to a specific module/function with limitation values. + * See eZ Publish documentation on more info on module, function and + * limitation values. Example: a user can have content/read permissions + * but it can be limited to a specific limitation like a section, a node + * or node tree. Limitation: returns false if one of provided values + * don't match but ignores limitations not specified in $limitations. + * + * @param string $module + * @param string $function + * @param array|null $limitations A hash of limitation keys and values + * @return bool + */ + public static function hasAccessToLimitation( $module, $function, $limitations = null, $debug = false ) + { + // Like fetch(user,has_access_to), but with support for limitations + $user = eZUser::currentUser(); + if ( !$user instanceof eZUser ) + { + eZDebug::writeDebug( 'No user instance', __METHOD__ ); + return false; + } + + $result = $user->hasAccessTo( $module, $function ); + if ( $result['accessWord'] !== 'limited') + { + return $result['accessWord'] === 'yes'; + } + + // Merge limitations before we check access + $mergedLimitations = array(); + $missingLimitations = array(); + foreach ( $result['policies'] as $userLimitationArray ) + { + foreach ( $userLimitationArray as $userLimitationKey => $userLimitationValues ) + { + if ( isset( $limitations[$userLimitationKey] ) ) + { + if ( isset( $mergedLimitations[$userLimitationKey] ) ) + $mergedLimitations[$userLimitationKey] = array_merge( $mergedLimitations[$userLimitationKey], $userLimitationValues ); + else + $mergedLimitations[$userLimitationKey] = $userLimitationValues; + } + else + { + $missingLimitations[] = $userLimitationKey; + } + } + } + + // User has access unless provided limitations don't match + foreach ( $mergedLimitations as $userLimitationKey => $userLimitationValues ) + { + // Handle subtree matching specifically as we need to match path string + if ( $userLimitationKey === 'User_Subtree' || $userLimitationKey === 'Subtree' ) + { + $pathMatch = false; + foreach ( $userLimitationValues as $subtreeString ) + { + if ( strstr( $limitations[$userLimitationKey], $subtreeString ) ) + { + $pathMatch = true; + break; + } + } + if ( !$pathMatch ) + { + if ( $debug ) eZDebug::writeDebug( "Unmatched[$module/$function]: " . $userLimitationKey . ' '. $limitations[$userLimitationKey] . ' != ' . $subtreeString, __METHOD__ ); + return false; + } + } + else + { + if ( is_array( $limitations[$userLimitationKey] ) ) + { + // All provided limitations must exist in $userLimitationValues + foreach( $limitations[$userLimitationKey] as $limitationValue ) + { + if ( !in_array( $limitationValue, $userLimitationValues ) ) + { + if ( $debug ) eZDebug::writeDebug( "Unmatched[$module/$function]: " . $userLimitationKey . ' ' . $limitationValue . ' != [' . implode( ', ', $userLimitationValues ) . ']', __METHOD__ ); + return false; + } + } + } + else if ( !in_array( $limitations[$userLimitationKey], $userLimitationValues ) ) + { + if ( $debug ) eZDebug::writeDebug( "Unmatched[$module/$function]: " . $userLimitationKey . ' ' . $limitations[$userLimitationKey] . ' != [' . implode( ', ', $userLimitationValues ) . ']', __METHOD__ ); + return false; + } + } + } + if ( !empty( $missingLimitations ) && $debug ) + { + eZDebug::writeNotice( "Matched, but missing limitations[$module/$function]: " . implode( ', ', $missingLimitations ), __METHOD__ ); + } + return true; + } +} + +?> diff --git a/autoloads/ezjscencodingtemplatefunctions.php b/autoloads/ezjscencodingtemplatefunctions.php new file mode 100644 index 0000000..2d03191 --- /dev/null +++ b/autoloads/ezjscencodingtemplatefunctions.php @@ -0,0 +1,102 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + + +/** + * ezjscAjaxContent related template operators + * + * (json|xml)_encode( hash $hash ): + * Encodes a array hash to (json|xml) + * + * node_encode( array|eZContentObjectTreeNode $node[, hash $parameter[, string $type = 'json' ]] ): + * Simplifies a node or array of nodes to a array hash and encodes it to + * json(default), xml or just the generated array hash. + */ + +class ezjscEncodingTemplateFunctions +{ + function operatorList() + { + return array( 'json_encode', + 'xml_encode', + 'node_encode', + ); + } + + function namedParameterPerOperator() + { + return true; + } + + function namedParameterList() + { + return array( 'json_encode' => array( 'hash' => array( 'type' => 'hash', + 'required' => true, + 'default' => array() )), + 'xml_encode' => array( 'hash' => array( 'type' => 'hash', + 'required' => true, + 'default' => array() )), + 'node_encode' => array( 'node' => array( 'type' => 'object', + 'required' => true, + 'default' => array() ), + 'params' => array( 'type' => 'hash', + 'required' => false, + 'default' => array() ), + 'type' => array( 'type' => 'string', + 'required' => false, + 'default' => 'json' )), + ); + + } + + function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters ) + { + switch ( $operatorName ) + { + case 'json_encode': + { + // Lets you use json_encode from templates + $operatorValue = json_encode( $namedParameters['hash'] ); + } break; + case 'xml_encode': + { + // Lets you use ezjscAjaxContent::xmlEncode from templates + $operatorValue = ezjscAjaxContent::xmlEncode( $namedParameters['hash'] ); + } break; + case 'node_encode': + { + // Lets you use ezjscAjaxContent::nodeEncode from templates + $operatorValue = ezjscAjaxContent::nodeEncode( $namedParameters['node'], $namedParameters['params'], $namedParameters['type'] ); + } break; + } + } +} + +?> diff --git a/autoloads/ezjscpackertemplatefunctions.php b/autoloads/ezjscpackertemplatefunctions.php new file mode 100644 index 0000000..0026d18 --- /dev/null +++ b/autoloads/ezjscpackertemplatefunctions.php @@ -0,0 +1,443 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/** + * ezjsPacker related template operators + * For merging and packing javascript or stylesheet files together to reduce size and + * number of files(as in reduces client connections). + * + * ezscript[_require|_load]( array|string $scripts + * [, string $type='text/javascript' + * [, string $language='javascript' + * [, string $charset='utf-8' + * [, int $pack_level=2]]]]) + * + * ezcss[_require|_load]( array|string $css_files + * [, string $media='all' + * [, string $type='text/css' + * [, string $rel='stylesheet' + * [, string $charset='' + * [, int $pack_level=3]]]]]) + * + * ezscriptfiles( array|string $scripts[, int $pack_level=2[, bool $ignore_loaded=false]] ) + * ezcssfiles( array|string $css_files[, int $pack_level=3[, bool $ignore_loaded=false]] ) + * + * These are alternatives to ezscript and ezcss that return array of files to be included + * instead of generating the (x)html for them. + * + * Genal note: + * Packing has 4 levels: + * 0 = off + * 1 = merge files + * 2 = 1 + remove whitespace + * 3 = 2 (deprecated) + * !Will be forced to 0 when site.ini[TemplateSettings]DevelopmentMode is enabled. + * + * In case of css files, relative image paths will be replaced by absolute paths. + * + * You can also use css / js generators to generate content dynamically. + * This is better explained in ezjscore.ini[Packer_] + * + * Brief (ezscript|ezcss)_require + (ezscript|ezcss)_load: + * Lets you do on demand loading of javscript and css files instead of loading + * them on every page using JavaScriptList & CSSFileList witch tends to also + * load files no matter what design you use. + * + * (ezscript|ezcss)_require : Stores list of required files in persistent_variable hash + * values (js|css)_files or if not defined (on non content pages) on protected variable + * ezjscPackerTemplateFunctions::$persistentVariable so they can be loaded later + * by (ezscript|ezcss)_load. If already loaded, then executed right away just like + * calling (ezscript|ezcss) operators. + * + * (ezscript|ezcss)_load : Packs the files you (optionally) pass to it + the files marked + * to be loaded by (ezscript|ezcss)_require. + */ + +//include_once( 'extension/ezjscore/classes/ezjscorepacker.php' ); + +class ezjscPackerTemplateFunctions +{ + function operatorList() + { + return array( 'ezscript', 'ezscript_require', 'ezscript_load', 'ezscriptfiles', 'ezcss', 'ezcss_require', 'ezcss_load', 'ezcssfiles' ); + } + + function namedParameterPerOperator() + { + return true; + } + + function namedParameterList() + { + static $def = null; + if ( $def === null ) + { + $def = array( 'ezscript' => array( 'script_array' => array( 'type' => 'array', + 'required' => true, + 'default' => array() ), + 'type' => array( 'type' => 'string', + 'required' => false, + 'default' => 'text/javascript' ), + 'language' => array( 'type' => 'string', + 'required' => false, + 'default' => '' ),// Opt in, not valid xhtml/html5 + 'charset' => array( 'type' => 'string', + 'required' => false, + 'default' => 'utf-8' ), + 'pack_level' => array( 'type' => 'integer', + 'required' => false, + 'default' => 2 )), + 'ezscriptfiles' => array( 'script_array' => array( 'type' => 'array', + 'required' => true, + 'default' => array() ), + 'pack_level' => array( 'type' => 'integer', + 'required' => false, + 'default' => 2 ), + 'ignore_loaded' => array( 'type' => 'bool', + 'required' => false, + 'default' => false )), + 'ezcss' => array( 'css_array' => array( 'type' => 'array', + 'required' => true, + 'default' => array() ), + 'media' => array( 'type' => 'string', + 'required' => false, + 'default' => 'all' ), + 'type' => array( 'type' => 'string', + 'required' => false, + 'default' => 'text/css' ), + 'rel' => array( 'type' => 'string', + 'required' => false, + 'default' => 'stylesheet' ), + 'charset' => array( 'type' => 'string', // Deprecated (not valid html) + 'required' => false, + 'default' => '' ), + 'pack_level' => array( 'type' => 'integer', + 'required' => false, + 'default' => 3 ) ), + 'ezcssfiles' => array( 'css_array' => array( 'type' => 'array', + 'required' => true, + 'default' => array() ), + 'pack_level' => array( 'type' => 'integer', + 'required' => false, + 'default' => 3 ), + 'ignore_loaded' => array( 'type' => 'bool', + 'required' => false, + 'default' => false ) )); + + // Definition for _require and _load is the same as main functons, so copy to keep code size down + $def['ezscript_require'] = $def['ezscript']; + $def['ezscript_load'] = $def['ezscript']; + $def['ezscript_load']['script_array']['required'] = false; + + $def['ezcss_require'] = $def['ezcss']; + $def['ezcss_load'] = $def['ezcss']; + $def['ezcss_load']['css_array']['required'] = false; + } + return $def; + } + + /** + * Template operator function for all functions defined on this class + * + * @param eZTemplate $tpl + * @param string $operatorName + * @param array $operatorParameters + * @param string $rootNamespace + * @param string $currentNamespace + * @param null|mixed $operatorValue + * @param array $namedParameters + */ + function modify( eZTemplate $tpl, $operatorName, array $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, array $namedParameters ) + { + $ret = ''; + switch ( $operatorName ) + { + case 'ezscript_load': + { + if ( !isset( self::$loaded['js_files'] ) ) + { + $depend = self::setPersistentArray( 'js_files', self::flattenArray( $namedParameters['script_array'] ), $tpl, false, true ); + $ret = ezjscPacker::buildJavascriptTag( $depend, + $namedParameters['type'], + $namedParameters['language'], + $namedParameters['charset'], + $namedParameters['pack_level'] ); + self::$loaded['js_files'] = true; + break; + }// let 'ezscript' handle loaded calls + elseif ( $operatorName === 'ezscript_load' ) + { + $namedParameters['script_array'] = self::setPersistentArray( 'js_files', self::flattenArray( $namedParameters['script_array'] ), $tpl, true, true, true ); + } + } + case 'ezscript_require': + { + if ( !isset( self::$loaded['js_files'] ) ) + { + self::setPersistentArray( 'js_files', self::flattenArray( $namedParameters['script_array'] ), $tpl, true ); + break; + }// let 'ezscript' handle loaded calls + elseif ( $operatorName === 'ezscript_require' ) + { + $namedParameters['script_array'] = self::setPersistentArray( 'js_files', self::flattenArray( $namedParameters['script_array'] ), $tpl, true, true, true ); + } + } + case 'ezscript': + { + $ret = ezjscPacker::buildJavascriptTag( $namedParameters['script_array'], + $namedParameters['type'], + $namedParameters['language'], + $namedParameters['charset'], + $namedParameters['pack_level'] ); + } break; + case 'ezscriptfiles': + { + if ( $namedParameters['ignore_loaded'] ) + { + $ret = ezjscPacker::buildJavascriptFiles( $namedParameters['script_array'], $namedParameters['pack_level'] ); + } + else + { + $diff = self::setPersistentArray( 'js_files', self::flattenArray( $namedParameters['script_array'] ), $tpl, true, true, true ); + $ret = ezjscPacker::buildJavascriptFiles( $diff, $namedParameters['pack_level'] ); + } + } break; + case 'ezcss_load': + { + if ( !isset( self::$loaded['css_files'] ) ) + { + $depend = self::setPersistentArray( 'css_files', self::flattenArray( $namedParameters['css_array'] ), $tpl, false, true ); + $ret = ezjscPacker::buildStylesheetTag( $depend, + $namedParameters['media'], + $namedParameters['type'], + $namedParameters['rel'], + $namedParameters['pack_level'] ); + self::$loaded['css_files'] = true; + break; + }// let 'ezcss' handle loaded calls + elseif ( $operatorName === 'ezcss_load' ) + { + $namedParameters['css_array'] = self::setPersistentArray( 'css_files', self::flattenArray( $namedParameters['css_array'] ), $tpl, true, true, true ); + } + } + case 'ezcss_require': + { + if ( !isset( self::$loaded['css_files'] ) ) + { + self::setPersistentArray( 'css_files', self::flattenArray( $namedParameters['css_array'] ), $tpl, true ); + break; + }// let 'ezcss' handle loaded calls + elseif ( $operatorName === 'ezcss_require' ) + { + $namedParameters['css_array'] = self::setPersistentArray( 'css_files', self::flattenArray( $namedParameters['css_array'] ), $tpl, true, true, true ); + } + } + case 'ezcss': + { + $ret = ezjscPacker::buildStylesheetTag( $namedParameters['css_array'], + $namedParameters['media'], + $namedParameters['type'], + $namedParameters['rel'], + $namedParameters['pack_level'] ); + } break; + case 'ezcssfiles': + { + if ( $namedParameters['ignore_loaded'] ) + { + $ret = ezjscPacker::buildStylesheetFiles( $namedParameters['css_array'], $namedParameters['pack_level'] ); + } + else + { + $diff = self::setPersistentArray( 'css_files', self::flattenArray( $namedParameters['css_array'] ), $tpl, true, true, true ); + $ret = ezjscPacker::buildStylesheetFiles( $diff, $namedParameters['pack_level'] ); + } + } break; + } + $operatorValue = $ret; + } + + /** + * Function for setting values to deal with persistent_variable either from + * template or internally on {@link self::$persistentVariable} + * + * @internal + * @param string $key Key to store values on + * @param string|array $value Value(s) to store + * @param eZTemplate $tpl Template object to get values from + * @param bool $append Append or prepend value? + * @param bool $arrayUnique Make sure array is unique to remove duplicates + * @param bool $returnArrayDiff Return diff against existing values instead of resulting array + * @param bool $override Override/Wipe out values or merge? + * @return array + */ + static public function setPersistentArray( $key, $value, eZTemplate $tpl, $append = true, $arrayUnique = false, $returnArrayDiff = false, $override = false ) + { + $isPageLayout = false; + $persistentVariable = array(); + if ( $tpl->hasVariable('module_result') ) + { + $isPageLayout = true; + $moduleResult = $tpl->variable('module_result'); + } + + if ( isset( $moduleResult['content_info']['persistent_variable'] ) ) + { + $persistentVariable = $moduleResult['content_info']['persistent_variable']; + } + else if ( !$isPageLayout && $tpl->hasVariable('persistent_variable') ) + { + $persistentVariable = $tpl->variable('persistent_variable'); + } + else if ( self::$persistentVariable !== null ) + { + $persistentVariable = self::$persistentVariable; + } + + if ( $persistentVariable === false || !is_array( $persistentVariable ) ) + { + // Give warning if value is not array as we depend on it + if ( !$isPageLayout && $persistentVariable ) + { + eZDebug::writeError( 'persistent_variable was not an array and where cleared, see ezjscore requriments!', __METHOD__ ); + } + $persistentVariable = array(); + } + + // make a copy in case we need to diff value in the end + $persistentVariableCopy = $persistentVariable; + + if ( !$override ) + { + if ( isset( $persistentVariable[ $key ] ) && is_array( $persistentVariable[ $key ] ) ) + { + if ( is_array( $value ) ) + { + if ( $append ) + $persistentVariable[ $key ] = array_merge( $persistentVariable[ $key ], $value ); + else + $persistentVariable[ $key ] = array_merge( $value, $persistentVariable[ $key ] ); + } + else if ( $append ) + $persistentVariable[ $key ][] = $value; + else + $persistentVariable[ $key ] = array_merge( array( $value ), $persistentVariable[ $key ] ); + } + else + { + if ( is_array( $value ) ) + $persistentVariable[ $key ] = $value; + else + $persistentVariable[ $key ] = array( $value ); + } + } + else + { + $persistentVariable[ $key ] = $value; + } + + if ( $arrayUnique && isset( $persistentVariable[$key][1] ) ) + { + $persistentVariable[$key] = array_unique( $persistentVariable[$key] ); + } + + // set the finnished array in the template + if ( $isPageLayout ) + { + if ( isset( $moduleResult['content_info']['persistent_variable'] ) ) + { + $moduleResult['content_info']['persistent_variable'] = $persistentVariable; + $tpl->setVariable('module_result', $moduleResult ); + } + } + else + { + $tpl->setVariable('persistent_variable', $persistentVariable ); + } + + // storing the value internally as well in case this is not a view that supports persistent_variable (ezpagedata will look for it) + self::$persistentVariable = $persistentVariable; + + if ( $returnArrayDiff && isset( $persistentVariableCopy[ $key ][0] ) ) + return array_diff( $persistentVariable[ $key ], $persistentVariableCopy[ $key ] ); + + return $persistentVariable[$key]; + } + + /** + * Flatten css_array/script_array so {@link self::setPersistentArray()} is able to proporly make it unique + * + * @param array|string $value + * @return array + */ + static protected function flattenArray( $array ) + { + if ( !is_array( $array ) ) + { + return array( $array ); + } + + $arrayFlatten = array(); + while( !empty( $array ) ) + { + $item = array_shift( $array ); + if ( is_array( $item ) ) + $array = array_merge( $item, $array ); + else + $arrayFlatten[] = $item; + } + return $arrayFlatten; + } + + /** + * Reusable function for getting internal persistent_variable + * + * @internal + * @param string $key Optional, return all values if null + * @return array|string + */ + static public function getPersistentVariable( $key = null ) + { + if ( $key !== null ) + { + if ( isset( self::$persistentVariable[ $key ] ) ) + return self::$persistentVariable[ $key ]; + return null; + } + return self::$persistentVariable; + } + + // Internal version of the $persistent_variable used on view that don't support it + static protected $persistentVariable = null; + + // Internal flag for already loaded types + static protected $loaded = array(); +} + +?> diff --git a/autoloads/eztemplateautoload.php b/autoloads/eztemplateautoload.php new file mode 100644 index 0000000..040d7d4 --- /dev/null +++ b/autoloads/eztemplateautoload.php @@ -0,0 +1,41 @@ + 'extension/ezjscore/autoloads/ezjscpackertemplatefunctions.php', + 'class' => 'ezjscPackerTemplateFunctions', + 'operator_names' => array( 'ezscript', + 'ezscript_require', + 'ezscript_load', + 'ezscriptfiles', + 'ezcss', + 'ezcss_require', + 'ezcss_load', + 'ezcssfiles' ) ); + +$eZTemplateOperatorArray[] = array( 'script' => 'extension/ezjscore/autoloads/ezjscencodingtemplatefunctions.php', + 'class' => 'ezjscEncodingTemplateFunctions', + 'operator_names' => array( 'json_encode', + 'xml_encode', + 'node_encode', +) ); + +$eZTemplateOperatorArray[] = array( 'script' => 'extension/ezjscore/autoloads/ezjscaccesstemplatefunctions.php', + 'class' => 'ezjscAccessTemplateFunctions', + 'operator_names' => array( 'has_access_to_limitation', +) ); + + +?> diff --git a/classes/ajaxuploader/ezpajaxuploaderhandlerinterface.php b/classes/ajaxuploader/ezpajaxuploaderhandlerinterface.php new file mode 100644 index 0000000..52ea12d --- /dev/null +++ b/classes/ajaxuploader/ezpajaxuploaderhandlerinterface.php @@ -0,0 +1,71 @@ + array(), 'file' => eZHTTPFile ) + */ + public function getFileInfo(); + + /** + * Returns the content class to use when creating the content object from + * the file + * + * @param array $mimeData + * @return eZContentClass + */ + public function getContentClass( array $mimeData ); + + /** + * Returns the node id of the default location of the future object + * + * @param eZContentClass $class + * @return int + */ + public function getDefaultParentNodeId( eZContentClass $class ); + + /** + * Creates the eZContentObject from the uploaded file + * + * @param eZHTTPFile $file + * @param eZContentObjectTreeNode $location + * @param string $name + * @return eZContentObject + */ + public function createObject( $file, $location, $name = '' ); + + /** + * Serialize the eZContentObject to be used to build the result in + * JavaScript + * + * @param eZContentObject $object + * @return array + */ + public function serializeObject( eZContentObject $object ); +} + +?> diff --git a/classes/ajaxuploader/ezprelationajaxuploader.php b/classes/ajaxuploader/ezprelationajaxuploader.php new file mode 100644 index 0000000..68f75cc --- /dev/null +++ b/classes/ajaxuploader/ezprelationajaxuploader.php @@ -0,0 +1,37 @@ +hasAccessTo( 'content', 'create' ); + if ( $access['accessWord'] === 'no' ) + { + return false; + } + return true; + } + +} + +?> diff --git a/classes/ajaxuploader/ezprelationlistajaxuploader.php b/classes/ajaxuploader/ezprelationlistajaxuploader.php new file mode 100644 index 0000000..eea41bc --- /dev/null +++ b/classes/ajaxuploader/ezprelationlistajaxuploader.php @@ -0,0 +1,227 @@ +attribute = eZContentObjectAttribute::fetch( $attributeId, $version ); + if ( !$this->attribute instanceof eZContentObjectAttribute ) + { + throw new InvalidArgumentException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'Provided attribute id and version number are invalid.' + ) + ); + } + } + + /** + * Checks if a file can be uploaded + * + * @return boolean + */ + public function canUpload() + { + $access = eZUser::instance()->hasAccessTo( 'content', 'create' ); + if ( $access['accessWord'] === 'no' ) + { + return false; + } + $ini = eZINI::instance( 'upload.ini' ); + $uploadableClassList = $ini->variable( 'CreateSettings', 'MimeClassMap' ); + $uploadableClassList[] = $ini->variable( 'CreateSettings', 'DefaultClass' ); + $classContent = $this->attribute->attribute( 'class_content' ); + + $intersect = array_intersect( $classContent['class_constraint_list'], $uploadableClassList ); + if ( !empty( $classContent['class_constraint_list'] ) && empty( $intersect ) ) + { + return false; + } + return true; + } + /** + * Returns infos on the uploaded file + * + * @return array( 'mime' => array(), 'file' => eZHTTPFile ) + * @throw RuntimeException if the uploaded file can not be found + */ + public function getFileInfo() + { + $upload = new eZContentUpload(); + $errors = array(); + $mimeData = $file = ''; + $result = $upload->fetchHTTPFile( 'UploadFile', $errors, $file, $mimeData ); + + if ( $result === false ) + { + throw new RuntimeException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'Unable to retrieve the uploaded file: %message', + null, array( '%message' => $errors[0]['description'] ) + ) + ); + } + return array( + 'file' => $file, + 'mime' => $mimeData + ); + } + + /** + * Returns the content class to use when creating the content object from + * the file + * + * @param array $mimeData + * @return eZContentClass + * @throw RuntimeException if the found class identifier does not exists + * @throw DomainException if objects of the found class are not allowed + */ + public function getContentClass( array $mimeData ) + { + $upload = new eZContentUpload(); + + $classIdentifier = $upload->detectClassIdentifier( $mimeData['name'] ); + $class = eZContentClass::fetchByIdentifier( $classIdentifier ); + if ( !$class instanceof eZContentClass ) + { + throw new RuntimeException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'Unable to load the class which identifier is "%class",' . + ' this is probably a configuration issue in upload.ini.', + null, array( '%class' => $classIdentifier ) + ) + ); + } + + $classContent = $this->attribute->attribute( 'class_content' ); + + if ( !empty( $classContent['class_constraint_list'] ) + && !in_array( $classIdentifier, $classContent['class_constraint_list'] ) ) + { + throw new DomainException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', 'The file cannot be processed because' . + ' it would result in a \'%class\' object and this relation' . + ' does not accept this type of object.', + null, array( '%class' => $class->attribute( 'name' ) ) + ) + ); + } + return $class; + } + + /** + * Returns the node id of the default location of the future object + * + * @param eZContentClass $class + * @return int + */ + public function getDefaultParentNodeId( eZContentClass $class ) + { + $parentNodes = array(); + $parentMainNode = null; + $upload = new eZContentUpload(); + $upload->detectLocations( + $class->attribute( 'identifier' ), $class, 'auto', + $parentNodes, $parentMainNode + ); + return $parentMainNode; + } + + /** + * Creates the eZContentObject from the uploaded file + * + * @param eZHTTPFile $file + * @param eZContentObjectTreeNode $location + * @param string $name + * @return eZContentObject + * @throw InvalidArgumentException if the parent location does not exists + * @throw RuntimeException if the object can not be created + */ + public function createObject( $file, $parentNodeId, $name = '' ) + { + $result = array(); + $parentNode = eZContentObjectTreeNode::fetch( $parentNodeId ); + if ( !$parentNode instanceof eZContentObjectTreeNode ) + { + throw new InvalidArgumentException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', 'Location not found.' + ) + ); + } + + $upload = new eZContentUpload(); + $r = $upload->handleLocalFile( + $result, $file, $parentNodeId, null, $name, + $this->attribute->attribute( 'language_code' ) + ); + if ( !$r || !$result['contentobject'] instanceof eZContentObject ) + { + throw new RuntimeException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'Unable to create the content object to add to the relation: %detail', + null, array( '%detail' => $result['errors'][0]['description'] ) + ) + ); + } + return $result['contentobject']; + } + + /** + * Serialize the eZContentObject to be used to build the result in + * JavaScript + * + * @param eZContentObject $object + * @return array + */ + public function serializeObject( eZContentObject $contentObject ) + { + $section = eZSection::fetch( $contentObject->attribute( 'section_id' ) ); + return array( + 'object_info' => array( + 'id' => $contentObject->attribute( 'id' ), + 'name' => $contentObject->attribute( 'name' ), + 'class_name' => $contentObject->attribute( 'class_name' ), + 'section_name' => $section->attribute( 'name' ), + 'published' => ezpI18n::tr( 'design/standard/content/datatype', 'Yes' ), + ) + ); + } +} + +?> diff --git a/classes/ezjscajaxcontent.php b/classes/ezjscajaxcontent.php new file mode 100644 index 0000000..ed119d4 --- /dev/null +++ b/classes/ezjscajaxcontent.php @@ -0,0 +1,577 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +// Simplifying and encoding content objects / nodes to json +// using the php json extension included in php 5.2 + + +class ezjscAjaxContent +{ + /** + * Constructor + */ + protected function __construct() + { + } + + /** + * Clone + */ + protected function __clone() + { + } + + /** + * Gets the first most prefered response type as defined by http_accept + * uses post and get parameter if present, if not falls back to the one + * defined in http header. First parameter lets you define fallback value + * if none of the alternatives in second parameter is found. Second parameter + * lets you limit the allowes types with a alias hash. xhtml, json, xml and + * text are default allowed types. + * + * @param string $default + * @param array $aliasList + * @return string + */ + public static function getHttpAccept( $default = 'xhtml', $aliasList = array( 'html' => 'xhtml', + 'json' => 'json', + 'javascript' => 'json', + 'xml' => 'xml', + 'text' => 'text' ) ) + { + $acceptList = array(); + + if ( isset($_POST['http_accept']) ) + $acceptList = explode( ',', $_POST['http_accept'] ); + else if ( isset($_POST['HTTP_ACCEPT']) ) + $acceptList = explode( ',', $_POST['HTTP_ACCEPT'] ); + else if ( isset($_GET['http_accept']) ) + $acceptList = explode( ',', $_GET['http_accept'] ); + else if ( isset($_GET['HTTP_ACCEPT']) ) + $acceptList = explode( ',', $_GET['HTTP_ACCEPT'] ); + else if ( isset($_SERVER['HTTP_ACCEPT']) ) + $acceptList = explode( ',', $_SERVER['HTTP_ACCEPT'] ); + + foreach( $acceptList as $accept ) + { + foreach( $aliasList as $alias => $returnType ) + { + if ( strpos( $accept, $alias ) !== false ) + { + $default = $returnType; + break 2; + } + } + } + return $default; + } + + /** + * Encodes the content based on http accept values, more on + * this on the getHttpAccept function. + * Will simply implode the return value if array and not xml or + * json is prefered return type. + * + * @param mixed $ret + * @param string $type + * @return string + */ + public static function autoEncode( $ret, $type = null ) + { + if ( $type === null ) + $type = self::getHttpAccept( ); + + if ( $type === 'xml' ) + return self::xmlEncode( $ret ); + else if ( $type === 'json' ) + return json_encode( $ret ); + else + return self::textEncode( $ret ); + } + + /** + * Encodes mixed value to string or comma seperated list of strings + * + * @param mixed $mix + * @return string + */ + public static function textEncode( $mix ) + { + if ( is_array( $mix ) ) + return implode(',', array_map( array('ezjscAjaxContent', 'textEncode'), array_filter( $mix ) ) ); + + return htmlspecialchars( $mix ); + } + + /** + * Function for encoding content object(s) or node(s) to simplified + * json objects, xml or array hash + * + * @param mixed $obj + * @param array $params + * @param string $type + * @return mixed + */ + public static function nodeEncode( $obj, $params = array(), $type = 'json' ) + { + if ( is_array( $obj ) ) + { + $ret = array(); + foreach ( $obj as $ob ) + { + $ret[] = self::simplify( $ob, $params ); + } + } + else + { + $ret = self::simplify( $obj, $params ); + } + + if ( $type === 'xml' ) + return self::xmlEncode( $ret ); + else if ( $type === 'json' ) + return json_encode( $ret ); + else + return $ret; + } + + /** + * Function for simplifying a content object or node + * + * @param mixed $obj + * @param array $params + * @return array + */ + public static function simplify( $obj, $params = array() ) + { + if ( !$obj ) + { + return array(); + } + else if ( $obj instanceof eZContentObject) + { + $node = $obj->attribute( 'main_node' ); + $contentObject = $obj; + } + else if ( $obj instanceof eZContentObjectTreeNode || $obj instanceof eZFindResultNode ) + { + $node = $obj; + $contentObject = $obj->attribute( 'object' ); + } + else if( isset( $params['fetchNodeFunction'] ) && method_exists( $obj, $params['fetchNodeFunction'] ) ) + { + // You can supply fetchNodeFunction parameter to be able to support other node related classes + $node = call_user_func( array( $obj, $params['fetchNodeFunction'] ) ); + if ( !$node instanceof eZContentObjectTreeNode ) + { + return ''; + } + $contentObject = $node->attribute( 'object' ); + } + else if ( is_array( $obj ) ) + { + return $obj; // Array is returned as is + } + else + { + return ''; // Other passed objects are not supported + } + + $ini = eZINI::instance( 'site.ini' ); + $params = array_merge( array( + 'dataMap' => array(), // collection of identifiers you want to load, load all with array('all') + 'fetchPath' => false, // fetch node path + 'fetchSection' => false, // fetch section + 'fetchChildrenCount' => false, + 'dataMapType' => array(), //if you want to filter datamap by type + 'loadImages' => false, + 'imagePreGenerateSizes' => array('small') //Pre generated images, loading all can be quite time consuming + ), $params ); + + if ( !isset( $params['imageSizes'] ) )// list of available image sizes + { + $imageIni = eZINI::instance( 'image.ini' ); + $params['imageSizes'] = $imageIni->variable( 'AliasSettings', 'AliasList' ); + } + + if ( $params['imageSizes'] === null || !isset( $params['imageSizes'][0] ) ) + $params['imageSizes'] = array(); + + if ( !isset( $params['imageDataTypes'] ) ) + $params['imageDataTypes'] = $ini->variable( 'ImageDataTypeSettings', 'AvailableImageDataTypes' ); + + $ret = array(); + $attributeArray = array(); + $ret['name'] = htmlentities( $contentObject->attribute( 'name' ), ENT_QUOTES, "UTF-8" ); + $ret['contentobject_id'] = $ret['id'] = (int) $contentObject->attribute( 'id' ); + $ret['contentobject_remote_id'] = $contentObject->attribute( 'remote_id' ); + $ret['contentobject_state'] = implode( ", ", $contentObject->attribute( 'state_identifier_array' ) ); + $ret['main_node_id'] = (int)$contentObject->attribute( 'main_node_id' ); + $ret['version'] = (int)$contentObject->attribute( 'current_version' ); + $ret['modified'] = $contentObject->attribute( 'modified' ); + $ret['published'] = $contentObject->attribute( 'published' ); + $ret['section_id'] = (int) $contentObject->attribute( 'section_id' ); + $ret['current_language'] = $contentObject->attribute( 'current_language' ); + $ret['owner_id'] = (int) $contentObject->attribute( 'owner_id' ); + $ret['class_id'] = (int) $contentObject->attribute( 'contentclass_id' ); + $ret['class_name'] = $contentObject->attribute( 'class_name' ); + $ret['path_identification_string'] = $node ? $node->attribute( 'path_identification_string' ) : ''; + $ret['translations'] = eZContentLanguage::decodeLanguageMask($contentObject->attribute( 'language_mask' ), true); + $ret['can_edit'] = $contentObject->attribute( 'can_edit' ); + + if ( isset( $params['formatDate'] ) ) + { + $ret['modified_date'] = self::formatLocaleDate( $contentObject->attribute( 'modified' ), $params['formatDate'] ); + $ret['published_date'] = self::formatLocaleDate( $contentObject->attribute( 'published' ), $params['formatDate'] ); + } + + if ( isset( $params['fetchCreator'] ) ) + { + $creator = $contentObject->attribute( 'current' )->attribute('creator'); + if ( $creator instanceof eZContentObject ) + { + $ret['creator'] = array( 'id' => $creator->attribute( 'id' ), + 'name' => $creator->attribute('name') ); + } + else + { + $ret['creator'] = array( 'id' => $contentObject->attribute( 'current' )->attribute('creator_id'), + 'name' => null );// user has been deleted + } + } + + if ( isset( $params['fetchClassIcon'] ) ) + { + $operator = new eZWordToImageOperator(); + $tpl = eZTemplate::instance(); + + $operatorValue = $contentObject->attribute( 'class_identifier' ); + + $operatorParameters = array( array( array( 1, 'small' ) ) ); + $namedParameters = array(); + + $operatorName = 'class_icon'; + + $operator->modify( + $tpl, $operatorName, $operatorParameters, '', '', + $operatorValue, $namedParameters, array() + ); + + $ret['class_icon'] = $operatorValue; + } + + if ( isset( $params['fetchThumbPreview'] ) ) + { + $thumbUrl = ''; + $thumbWidth = 0; + $thumbHeight = 0; + $thumbDataType = isset( $params['thumbDataType'] ) ? $params['thumbDataType'] : 'ezimage'; + $thumbImageSize = isset( $params['thumbImageSize'] ) ? $params['thumbImageSize'] : 'small'; + + foreach( $contentObject->attribute( 'data_map' ) as $key => $atr ) + { + if ( $atr->attribute( 'data_type_string' ) == $thumbDataType + && $atr->attribute( 'has_content' ) ) + { + $imageContent = $atr->attribute( 'content' ); + + if ( $imageContent->hasAttribute( $thumbImageSize ) ) + $imageAlias = $imageContent->attribute( $thumbImageSize ); + else + eZDebug::writeError( "Image alias does not exist: '{$thumbImageSize}', missing from image.ini?", + __METHOD__ ); + + $thumbUrl = isset( $imageAlias['full_path'] ) ? $imageAlias['full_path'] : ''; + $thumbWidth = isset( $imageAlias['width'] ) ? (int) $imageAlias['width'] : 0; + $thumbHeight = isset( $imageAlias['height'] ) ? (int) $imageAlias['height'] : 0; + + if ( $thumbUrl !== '' ) + { + eZURI::transformURI( $thumbUrl, true, null, false ); + } + + break; + } + } + + $ret['thumbnail_url'] = $thumbUrl; + $ret['thumbnail_width'] = $thumbWidth; + $ret['thumbnail_height'] = $thumbHeight; + } + + if ( $params['fetchSection'] ) + { + $section = eZSection::fetch( $ret['section_id'] ); + if ( $section instanceof eZSection ) + { + $ret['section'] = array( + 'id' => $section->attribute('id'), + 'name' => $section->attribute('name'), + 'navigation_part_identifier' => $section->attribute('navigation_part_identifier'), + 'locale' => $section->attribute('locale'), + ); + } + else + { + $ret['section'] = null; + } + } + + if ( $node ) + { + // optimization for eZ Publish 4.1 (avoid fetching class) + if ( $node->hasAttribute( 'is_container' ) ) + { + $ret['class_identifier'] = $node->attribute( 'class_identifier' ); + $ret['is_container'] = (int) $node->attribute( 'is_container' ); + } + else + { + $class = $contentObject->attribute( 'content_class' ); + $ret['class_identifier'] = $class->attribute( 'identifier' ); + $ret['is_container'] = (int) $class->attribute( 'is_container' ); + } + + $ret['node_id'] = (int) $node->attribute( 'node_id' ); + $ret['parent_node_id'] = (int) $node->attribute( 'parent_node_id' ); + $ret['node_remote_id'] = $node->attribute( 'remote_id' ); + $ret['url_alias'] = $node->attribute( 'url_alias' ); + $ret['url'] = $node->url(); + // force system url on empty urls (root node) + if ( $ret['url'] === '' ) + $ret['url'] = 'content/view/full/' . $node->attribute( 'node_id' ); + eZURI::transformURI( $ret['url'] ); + + $ret['depth'] = (int) $node->attribute( 'depth' ); + $ret['priority'] = (int) $node->attribute( 'priority' ); + $ret['hidden_status_string'] = $node->attribute( 'hidden_status_string' ); + + if ( $params['fetchPath'] ) + { + $ret['path'] = array(); + foreach ( $node->attribute( 'path' ) as $n ) + { + $ret['path'][] = self::simplify( $n ); + } + } + else + { + $ret['path'] = false; + } + + if ( $params['fetchChildrenCount'] ) + { + $ret['children_count'] = $ret['is_container'] ? (int) $node->attribute( 'children_count' ) : 0; + } + else + { + $ret['children_count'] = false; + } + } + else + { + $class = $contentObject->attribute( 'content_class' ); + $ret['class_identifier'] = $class->attribute( 'identifier' ); + $ret['is_container'] = (int) $class->attribute( 'is_container' ); + } + + $ret['image_attributes'] = array(); + + if ( is_array( $params['dataMap'] ) && is_array( $params['dataMapType'] ) ) + { + $dataMap = $contentObject->attribute( 'data_map' ); + $datatypeBlacklist = array_fill_keys( + $ini->variable( 'ContentSettings', 'DatatypeBlackListForExternal' ), + true + ); + foreach( $dataMap as $key => $atr ) + { + $dataTypeString = $atr->attribute( 'data_type_string' ); + //if ( in_array( $dataTypeString, $params['imageDataTypes'], true) !== false ) + + if ( !in_array( 'all' ,$params['dataMap'], true ) + && !in_array( $key ,$params['dataMap'], true ) + && !in_array( $dataTypeString, $params['dataMapType'], true ) + && !( $params['loadImages'] && in_array( $dataTypeString, $params['imageDataTypes'], true ) ) ) + { + continue; + } + + $attributeArray[ $key ]['id'] = $atr->attribute( 'id' ); + $attributeArray[ $key ]['type'] = $dataTypeString; + $attributeArray[ $key ]['identifier'] = $key; + if ( isset ( $datatypeBlacklist[$dataTypeString] ) ) + $attributeArray[ $key ]['content'] = null; + else + $attributeArray[ $key ]['content'] = $atr->toString(); + + // images + if ( in_array( $dataTypeString, $params['imageDataTypes'], true) && $atr->hasContent() ) + { + $content = $atr->attribute( 'content' ); + $imageArray = array(); + if ( $content != null ) + { + foreach( $params['imageSizes'] as $size ) + { + $imageArray[ $size ] = false; + if ( in_array( $size, $params['imagePreGenerateSizes'], true ) ) + { + if ( $content->hasAttribute( $size ) ) + $imageArray[ $size ] = $content->attribute( $size ); + else + eZDebug::writeError( "Image alias does not exist: '$size', missing from image.ini?", + __METHOD__ ); + } + } + $ret['image_attributes'][] = $key; + } + + if ( !isset( $imageArray['original'] ) ) + $imageArray['original'] = $content->attribute( 'original' ); + + array_walk_recursive( + $imageArray, + function ( &$element, $key ) + { + // These fields can contain non utf-8 content + // badly handled by mb_check_encoding + // so they are just encoded in base64 + // see https://jira.ez.no/browse/EZP-21358 + if ( $key == "MakerNote" || $key == "UserComment") + { + $element = base64_encode( (string)$element ); + } + // json_encode/xmlEncode need UTF8 encoded strings + // (exif) metadata might not be for instance + // see https://jira.ez.no/browse/EZP-19929 + else if ( !mb_check_encoding( $element, 'UTF-8' ) ) + { + $element = mb_convert_encoding( + (string)$element, 'UTF-8' + ); + } + if( $key === 'url' ) + { + eZURI::transformURI( $element, true ); + } + } + ); + + $attributeArray[ $key ]['content'] = $imageArray; + } + } + } + $ret['data_map'] = $attributeArray; + return $ret; + } + + /** + * Encodes simple multilevel array and hash values to valid xml string + * + * @param mixed $hash + * @param string $childName + * @return string + */ + public static function xmlEncode( $hash, $childName = 'child' ) + { + $xml = new XmlWriter(); + $xml->openMemory(); + $xml->startDocument('1.0', 'UTF-8'); + $xml->startElement('root'); + + self::xmlWrite( $xml, $hash, $childName ); + + $xml->endElement(); + return $xml->outputMemory( true ); + + } + + /** + * Recursive xmlWriter function called by xmlEncode + * + * @param XMLWriter $xml + * @param mixed $hash + * @param string $childName + */ + protected static function xmlWrite( XMLWriter $xml, $hash, $childName = 'child' ) + { + foreach( $hash as $key => $value ) + { + if( is_array( $value ) ) + { + if ( is_numeric( $key ) ) + $xml->startElement( $childName ); + else + $xml->startElement( $key ); + self::xmlWrite( $xml, $value ); + $xml->endElement(); + continue; + } + if ( is_numeric( $key ) ) + { + $xml->writeElement( $childName, $value ); + } + else + { + $xml->writeElement( $key, $value ); + } + } + } + + /** + * Format date timestamp according to currently used locale code + * Allowed are following types: + * - time + * - shorttime + * - date + * - shortdate + * - datetime + * - shortdatetime + * + * @param integer $timestamp + * @param string $type + * @return string + */ + public static function formatLocaleDate( $timestamp, $type ) + { + $formattedDate = null; + + $locale = eZLocale::instance(); + + $method = $locale->getFormattingFunction( $type ); + if ( $method ) + $formattedDate = $locale->$method( $timestamp ); + + return $formattedDate; + } +} + +?> diff --git a/classes/ezjsccachemanager.php b/classes/ezjsccachemanager.php new file mode 100644 index 0000000..531ef20 --- /dev/null +++ b/classes/ezjsccachemanager.php @@ -0,0 +1,23 @@ +fileDeleteByDirList( + array( 'javascript', 'stylesheets' ), + eZSys::cacheDirectory() . '/' . $cacheItem['path'], '' + ); + } +} diff --git a/classes/ezjsccssoptimizer.php b/classes/ezjsccssoptimizer.php new file mode 100644 index 0000000..faf1919 --- /dev/null +++ b/classes/ezjsccssoptimizer.php @@ -0,0 +1,78 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +class ezjscCssOptimizer +{ + /** + * 'compress' css code by removing whitespace + * + * @param string $css Concated Css string + * @param int $packLevel Level of packing, values: 2-3 + * @return string + */ + public static function optimize( $css, $packLevel = 2 ) + { + // Normalize line feeds + $css = str_replace( array( "\r\n", "\r" ), "\n", $css ); + + // Remove multiline comments + $css = preg_replace( '!(?:\n|\s|^)/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css ); + $css = preg_replace( '!(?:;)/\*[^*]*\*+([^/][^*]*\*+)*/!', ';', $css ); + + // Remove whitespace from start and end of line + multiple linefeeds + $css = preg_replace( array( '/\n\s+/', '/\s+\n/', '/\n+/' ), "\n", $css ); + + if ( $packLevel > 2 ) + { + // Remove space around ':' and ',' + $css = preg_replace( array( '/:\s+/', '/\s+:/' ), ':', $css ); + $css = preg_replace( array( '/,\s+/', '/\s+,/' ), ',', $css ); + + // Remove unnecessary line breaks... + $css = str_replace( array( ";\n", '; ' ), ';', $css ); + $css = str_replace( array( "}\n", "\n}", ';}' ), '}', $css ); + $css = str_replace( array( "{\n", "\n{", '{;' ), '{', $css ); + // ... and spaces as well + $css = str_replace(array('\s{\s', '\s{', '{\s' ), '{', $css ); + $css = str_replace(array('\s}\s', '\s}', '}\s' ), '}', $css ); + + // Optimize css + $css = str_replace( array( ' 0em', ' 0px', ' 0pt', ' 0pc' ), ' 0', $css ); + $css = str_replace( array( ':0em', ':0px', ':0pt', ':0pc' ), ':0', $css ); + $css = str_replace( ' 0 0 0 0;', ' 0;', $css ); + $css = str_replace( ':0 0 0 0;', ':0;', $css ); + + // Optimize hex colors from #bbbbbb to #bbb + $css = preg_replace( "/color:#([0-9a-fA-F])\\1([0-9a-fA-F])\\2([0-9a-fA-F])\\3/", "color:#\\1\\2\\3", $css ); + } + return $css; + } +} +?> diff --git a/classes/ezjscjavascriptoptimizer.php b/classes/ezjscjavascriptoptimizer.php new file mode 100644 index 0000000..d342e30 --- /dev/null +++ b/classes/ezjscjavascriptoptimizer.php @@ -0,0 +1,55 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +class ezjscJavascriptOptimizer +{ + /** + * 'compress' javascript code by removing whitespace + * + * @param string $script Concated JavaScript string + * @param int $packLevel Level of packing, values: 2-3 + * @return string + */ + public static function optimize( $script, $packLevel = 2 ) + { + // Normalize line feeds + $script = str_replace( array( "\r\n", "\r" ), "\n", $script ); + + // Remove whitespace from start & end of line + singelline comment + multiple linefeeds + $script = preg_replace( array( '/\n\s+/', '/\s+\n/', '#\n\s*//.*#', '/\n+/' ), "\n", $script ); + + // Remove multiline comments + $script = preg_replace( '!(?:\n|\s|^)/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $script ); + $script = preg_replace( '!(?:;)/\*[^*]*\*+([^/][^*]*\*+)*/!', ';', $script ); + + return $script; + } +} +?> diff --git a/classes/ezjscpacker.php b/classes/ezjscpacker.php new file mode 100644 index 0000000..893ed51 --- /dev/null +++ b/classes/ezjscpacker.php @@ -0,0 +1,648 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/* + Functions for merging and packing css and javascript files. + Reduces page load time both in terms of reducing connections from clients + and bandwidth ( if packing is turned on ). + + Packing has 4 levels: + 0 = off + 1 = merge files + 2 = 1 + remove whitespace & code comments + 3 = 2 + remove more whitespace + + In case of css files, relative image paths will be replaced + by absolute paths. + + You can also use css / js generators to generate content dynamically. + This is better explained in ezjscore.ini[ezjscServer] + + buildStylesheetFiles and buildJavascriptFiles functions does not return html, just + an array of file url's / content (from generators). +*/ + +class ezjscPacker +{ + /** + * Constructor + */ + protected function __construct() + { + } + + /** + * Builds javascript tag(s) based on input files and packing level + * + * @param array|string $scriptFiles Either array of file paths, or string with file path + * @param string $type Should be 'text/javascript' + * @param string $lang Optionally set to 'Javascript' + * @param string $charset + * @param int $packLevel Level of packing, values: 0-3 + * @param bool $indexDirInCacheHash To add index path in cache hash or not + * @return string Html with generated tags + */ + static function buildJavascriptTag( $scriptFiles, $type = 'text/javascript', $lang = '', $charset = 'utf-8', $packLevel = 2, $indexDirInCacheHash = true ) + { + $ret = ''; + $lang = $lang ? ' language="' . $lang . '"' : ''; + $http = eZHTTPTool::instance(); + $useFullUrl = ( isset( $http->UseFullUrl ) && $http->UseFullUrl ); + $packedFiles = ezjscPacker::packFiles( $scriptFiles, 'javascript/', '.js', $packLevel, $indexDirInCacheHash ); + if ( $charset ) + $charset = " charset=\"$charset\""; + foreach ( $packedFiles as $packedFile ) + { + // Is this a js file or js content? + if ( isset( $packedFile[4] ) && + ( strpos( $packedFile, 'http://' ) === 0 || + strpos( $packedFile, 'https://' ) === 0 || + strripos( $packedFile, '.js' ) === ( strlen( $packedFile ) -3 ) ) ) + { + if ( $useFullUrl ) + { + $packedFile = $http->createRedirectUrl( $packedFile, array( 'pre_url' => false ) ); + } + $ret .= "\r\n"; + } + else + { + $ret .= $packedFile ? "\r\n$packedFile\r\n\r\n" : ''; + } + } + return $ret; + } + + /** + * Builds stylesheet tag(s) based on input files and packing level + * + * @param array|string $cssFiles Either array of file paths, or string with file path + * @param string $media Should be media type, normally 'all' + * @param string $type Should be 'text/css' + * @param string $rel Should be 'stylesheet' + * @param int $packLevel Level of packing, values: 0-3 + * @param bool $indexDirInCacheHash To add index path in cache hash or not + * @return string Html with generated tags + */ + static function buildStylesheetTag( $cssFiles, $media = 'all', $type = 'text/css', $rel = 'stylesheet', $packLevel = 3, $indexDirInCacheHash = true ) + { + $ret = ''; + $packedFiles = ezjscPacker::packFiles( $cssFiles, 'stylesheets/', '.css', $packLevel, $indexDirInCacheHash, '_' . $media ); + $http = eZHTTPTool::instance(); + $useFullUrl = ( isset( $http->UseFullUrl ) && $http->UseFullUrl ); + $media = $media && $media !== 'all' ? ' media="' . $media . '"' : ''; + foreach ( $packedFiles as $packedFile ) + { + // Is this a css file or css content? + if ( isset( $packedFile[5] ) && + ( strpos( $packedFile, 'http://' ) === 0 || + strpos( $packedFile, 'https://' ) === 0 || + strripos( $packedFile, '.css' ) === ( strlen( $packedFile ) -4 ) ) ) + { + if ( $useFullUrl ) + { + $packedFile = $http->createRedirectUrl( $packedFile, array( 'pre_url' => false ) ); + } + $ret .= "\r\n"; + } + else + { + $ret .= $packedFile ? "\r\n" : ''; + } + } + return $ret; + } + + /** + * Builds javascript files + * + * @param array|string $scriptFiles Either array of file paths, or string with file path + * @param int $packLevel Level of packing, values: 0-3 + * @param bool $indexDirInCacheHash To add index path in cache hash or not + * @return array List of javascript files + */ + static function buildJavascriptFiles( $scriptFiles, $packLevel = 2, $indexDirInCacheHash = true ) + { + return ezjscPacker::packFiles( $scriptFiles, 'javascript/', '.js', $packLevel, $indexDirInCacheHash ); + } + + /** + * Builds stylesheet files + * + * @param array|string $cssFiles Either array of file paths, or string with file path + * @param int $packLevel Level of packing, values: 0-3 + * @param bool $indexDirInCacheHash To add index path in cache hash or not + * @return array List of css files + */ + static function buildStylesheetFiles( $cssFiles, $packLevel = 3, $indexDirInCacheHash = true ) + { + return ezjscPacker::packFiles( $cssFiles, 'stylesheets/', '.css', $packLevel, $indexDirInCacheHash, '_all' ); + } + + // static :: gets the cache dir + protected static function getCacheDir() + { + static $cacheDir = null; + if ( $cacheDir === null ) + { + $cacheDir = eZSys::cacheDirectory() . '/public/'; + } + return $cacheDir; + } + + // static :: gets the www dir + protected static function getWwwDir() + { + static $wwwDir = null; + if ( $wwwDir === null ) + { + $wwwDir = eZSys::wwwDir() . '/'; + } + return $wwwDir; + } + + // static :: gets the index dir (including index.php and siteaccess name if that is part of url) + protected static function getIndexDir() + { + static $indexDir = null; + if ( $indexDir === null ) + { + $indexDir = eZSys::indexDir() . '/'; + } + return $indexDir; + } + + /** + * Merges a collection of files togheter and returns array of paths to the files. + * js /css content is returned as string if packlevel is 0 and you use a js/ css generator. + * $fileArray can also be array of array of files, like array( 'file.js', 'file2.js', array( 'file5.js' ) ) + * The name of the cached file is a md5 hash consistant of the file paths + * of the valid files in $file_array and the packlevel. + * The whole argument is used instead of file path on js/ css generators in the cache hash. + * + * @param array|string $fileArray Either array of file paths, or string with file path + * @param string $subPath In witch sub path of design folder to look for files. + * @param string $fileExtension File extension name (for use on cache file) + * @param int $packLevel Level of packing, values: 0-3 + * @param bool $indexDirInCacheHash To add index path in cache hash or not + * @param string $filePostName Extra file name part, example "_screen" in case of medai use for css + * + * @return array List of css files + */ + static function packFiles( $fileArray, $subPath = '', $fileExtension = '.js', $packLevel = 2, $indexDirInCacheHash = false, $filePostName = '' ) + { + if ( !$fileArray ) + { + return array(); + } + else if ( !is_array( $fileArray ) ) + { + $fileArray = array( $fileArray ); + } + + $ezjscINI = eZINI::instance( 'ezjscore.ini' ); + $bases = eZTemplateDesignResource::allDesignBases(); + $customHosts = $ezjscINI->variable( 'Packer', 'CustomHosts' ); + $data = array( + 'http' => array(), + 'www' => array(), + 'locale' => array(), + 'cache_name' => '', + 'cache_hash' => '', + 'cache_path' => '', + 'last_modified' => 0, + 'file_extension' => $fileExtension, + 'file_post_name' => $filePostName, + 'pack_level' => $packLevel, + 'sub_path' => $subPath, + 'cache_dir' => self::getCacheDir(), + 'www_dir' => htmlspecialchars( self::getWwwDir(), ENT_COMPAT, 'UTF-8' ), + 'index_dir' => self::getIndexDir(), + 'custom_host' => ( isset( $customHosts[$fileExtension] ) ? $customHosts[$fileExtension] : '' ), + ); + + // Only pack files if Packer is enabled and if not set DevelopmentMode is disabled + if ( $ezjscINI->hasVariable( 'eZJSCore', 'Packer' ) ) + { + $packerIniValue = $ezjscINI->variable( 'eZJSCore', 'Packer' ); + if ( $packerIniValue === 'disabled' ) + $data['pack_level'] = 0; + else if ( is_numeric( $packerIniValue ) ) + $data['pack_level'] = (int) $packerIniValue; + } + else + { + if ( eZINI::instance()->variable( 'TemplateSettings', 'DevelopmentMode' ) === 'enabled' ) + { + $data['pack_level'] = 0; + } + } + + // Needed for image includes to work on ezp installs with mixed access methods (virtualhost + url based setup) + if ( $indexDirInCacheHash ) + { + $data['cache_name'] = $data['index_dir']; + } + + $originalFileArray = $fileArray; + while ( !empty( $fileArray ) ) + { + $file = array_shift( $fileArray ); + + // if $file is array, concat it to the file array and continue + if ( $file && is_array( $file ) ) + { + $fileArray = array_merge( $file, $fileArray ); + continue; + } + else if ( !$file ) + { + continue; + } + // if the file name contains :: it is threated as a custom code genarator + else if ( strpos( $file, '::' ) !== false ) + { + $server = self::serverCallHelper( explode( '::', $file ) ); + if ( !$server instanceof ezjscServerRouter ) + { + continue; + } + + $fileTime = $server->getCacheTime( $data ); + + // Generate content straight away if packing is disabled + if ( $data['pack_level'] === 0 ) + { + $data['www'][] = $server->call( $fileArray ); + } + // Always generate functions with file_time=-1 (they modify $fileArray ) + // or they return content that should not be part of the cache file + else if ( $fileTime === -1 ) + { + $data['http'][] = $server->call( $fileArray ); + } + else + { + $data['locale'][] = $server; + $data['cache_name'] .= $file . '_'; + } + $data['last_modified'] = max( $data['last_modified'], $fileTime ); + continue; + } + // is it a http / https url ? + else if ( strpos( $file, 'http://' ) === 0 || strpos( $file, 'https://' ) === 0 ) + { + $data['http'][] = $file; + continue; + } + // is it a http / https url where protocol is selected dynamically ? + else if ( strpos( $file, '://' ) === 0 ) + { + if ( !isset( $protocol ) ) + $protocol = eZSys::serverProtocol(); + + $data['http'][] = $protocol . $file; + continue; + } + // is it a absolute path ? + else if ( strpos( $file, 'var/' ) === 0 ) + { + if ( substr( $file, 0, 2 ) === '//' || preg_match( "#^[a-zA-Z0-9]+:#", $file ) ) + $file = '/'; + else if ( strlen( $file ) > 0 && $file[0] !== '/' ) + $file = '/' . $file; + + eZURI::transformURI( $file, true, 'relative' ); + // Get file time and continue if it return false + $file = str_replace( '//' . $data['www_dir'], '', '//' . $file ); + $fileTime = file_exists( $file ) ? filemtime( $file ): false; + $wwwFile = $data['www_dir'] . $file; + } + // or is it a relative path + else + { + // Allow path to be outside subpath if it starts with '/' + if ( $file[0] === '/' ) + $file = ltrim( $file, '/' ); + else + $file = $subPath . $file; + + $triedFiles = array(); + $match = eZTemplateDesignResource::fileMatch( $bases, '', $file, $triedFiles ); + if ( $match === false ) + { + eZDebug::writeWarning( "Could not find: $file", __METHOD__ ); + continue; + } + $file = htmlspecialchars( $match['path'] ); + $fileTime = file_exists( $file ) ? filemtime( $file ): false; + $wwwFile = $data['www_dir'] . $file; + } + + if ( $fileTime === false ) + { + eZDebug::writeWarning( "Could not get modified time of file: $file", __METHOD__ ); + continue; + } + + // Calculate last modified time and store in arrays + $data['last_modified'] = max( $data['last_modified'], $fileTime ); + $data['locale'][] = $file; + $data['www'][] = $wwwFile; + $data['cache_name'] .= $file . '_'; + } + + if ( $data['pack_level'] === 0 ) + { + self::$log[] = $data; + // if packing is disabled, return the valid paths / content we have generated + return array_merge( $data['http'], $data['www'] ); + } + else if ( empty($data['locale']) && !empty($data['http']) ) + { + self::$log[] = $data; + // return if there are only external scripts and no local files to cache + return array_merge( $data['http'], $data['www'] ); + } + else if ( empty($data['locale']) ) + { + eZDebug::writeWarning( "Could not find any files: " . var_export( $originalFileArray, true ), __METHOD__ ); + return array(); + } + + // See if cahe file exists and if it has expired (only if time is not part of name) + if ( $ezjscINI->variable( 'Packer', 'AppendLastModifiedTime' ) === 'enabled' ) + { + $data['cache_hash'] = md5( $data['cache_name'] . $data['pack_level'] ) . '_' . $data['last_modified'] . + $data['file_post_name'] . $data['file_extension']; + $data['cache_path'] = $data['cache_dir'] . $subPath . $data['cache_hash']; + $clusterFileHandler = eZClusterFileHandler::instance( $data['cache_path'] ); + if ( $clusterFileHandler->fileExists( $data['cache_path'] ) ) + { + $data['http'][] = $data['custom_host'] . $data['www_dir'] . $data['cache_path']; + self::$log[] = $data; + return $data['http']; + } + } + else + { + $data['cache_hash'] = md5( $data['cache_name'] . $data['pack_level'] ) . + $data['file_post_name'] . $data['file_extension']; + $data['cache_path'] = $data['cache_dir'] . $subPath . $data['cache_hash']; + $clusterFileHandler = eZClusterFileHandler::instance( $data['cache_path'] ); + // Check last modified time and return path to cache file if valid + if ( $clusterFileHandler->fileExists( $data['cache_path'] ) && $data['last_modified'] <= $clusterFileHandler->mtime( $data['cache_path'] ) ) + { + $data['http'][] = $data['custom_host'] . $data['www_dir'] . $data['cache_path']; + self::$log[] = $data; + return $data['http']; + } + } + + // Merge file content and create new cache file + $content = ''; + $isCSS = $data['file_extension'] === '.css'; + foreach( $data['locale'] as $i => $file ) + { + // if this is a js / css generator, call to get content + if ( $file instanceOf ezjscServerRouter ) + { + $content .= $file->call( $data['locale'] ); + continue; + } + else if ( !$file ) + { + continue; + } + + // else, get content of normal file + $fileContent = file_get_contents( $file ); + + if ( !trim( $fileContent ) ) + { + $content .= "/* empty: $file */\r\n"; + continue; + } + + if ( $isCSS ) + { + // We need to fix relative background image paths if this is a css file + $fileContent = ezjscPacker::fixImgPaths( $fileContent, $file ); + // Remove @charset if this is not the first file (some browsers will ignore css after a second occurance of this) + if ( $i ) $fileContent = preg_replace('/^@charset[^;]+;/i', '', $fileContent); + } + + $content .= "/* start: $file */\r\n"; + $content .= $fileContent; + $content .= "\r\n/* end: $file */\r\n\r\n"; + } + + // Pack all files to save bandwidth + if ( $data['pack_level'] > 1 ) + { + foreach( $ezjscINI->variable( 'eZJSCore', $isCSS ? 'CssOptimizer' : 'JavaScriptOptimizer' ) as $optimizer ) + { + if ( is_callable( array( $optimizer, 'optimize' ) ) ) + $content = call_user_func( array( $optimizer, 'optimize' ), $content, $data['pack_level'] ); + else + eZDebug::writeWarning( "Could not call optimizer '{$optimizer}'", __METHOD__ ); + } + } + + // Save cache file and return path + $clusterFileHandler->fileStoreContents( $data['cache_path'], $content, 'ezjscore', $isCSS ? 'text/css' : 'text/javascript' ); + $data['http'][] = $data['custom_host'] . $data['www_dir'] . $data['cache_path']; + + self::$log[] = $data; + return $data['http']; + } + + /** + * Fix image paths in css. + * + * @param string $fileContent Css string + * @param string $file File incl path to calculate relative paths from. + * @return string + */ + static function fixImgPaths( $fileContent, $file ) + { + if ( preg_match_all( "/url\(\s*[\'|\"]?([A-Za-z0-9_\-\/\.\\%?&@#=]+)[\'|\"]?\s*\)/ix", $fileContent, $urlMatches ) ) + { + $urlPaths = array(); + $urlMatches = array_unique( $urlMatches[1] ); + $cssPathArray = explode( '/', $file ); + $wwwDir = self::getWwwDir(); + // Pop the css file name + array_pop( $cssPathArray ); + $cssPathCount = count( $cssPathArray ); + foreach ( $urlMatches as $match ) + { + $match = str_replace( '\\', '/', $match ); + $relativeCount = substr_count( $match, '../' ); + // Replace path if it is realtive + if ( $match[0] !== '/' and strpos( $match, 'http:' ) === false ) + { + $cssPathSlice = $relativeCount === 0 ? $cssPathArray : array_slice( $cssPathArray , 0, $cssPathCount - $relativeCount ); + $newMatchPath = $wwwDir; + if ( !empty( $cssPathSlice ) ) + { + $newMatchPath .= implode( '/', $cssPathSlice ) . '/'; + } + $newMatchPath .= str_replace( '../', '', $match ); + $urlPaths[$match] = $newMatchPath; + } + } + $fileContent = strtr( $fileContent, $urlPaths ); + } + return $fileContent; + } + + /** + * Helper function to get and validate server functions + * + * @param string $strServerCall + * @return ezjscServerRouter|null + */ + static function serverCallHelper( $strServerCall ) + { + $server = ezjscServerRouter::getInstance( $strServerCall ); + if ( !$server instanceof ezjscServerRouter ) + { + eZDebug::writeError( 'Not a valid ezjscServer function: ' . implode( '::', $strServerCall ), __METHOD__ ); + return null; + } + // Make sure the function is present on the class + if ( !$server->hasFunction() ) + { + eZDebug::writeError( 'Could not find function: ' . $server->getName() . '()', __METHOD__ ); + return null; + } + return $server; + } + + /** + * Generate a debug report of packer use + * + * @internal + * @param bool $as_html + * @return string + */ + static public function printDebugReport( $as_html = true ) + { + if ( !eZTemplate::isTemplatesUsageStatisticsEnabled() ) + return ''; + + $stats = ''; + if ( $as_html ) + { + $stats .= '

CSS/JS files loaded with "ezjscPacker" during request:

'; + $stats .= ''; + $stats .= ''; + } + else + { + $stats .= "CSS/JS files loaded with 'ezjscPacker' during request\n"; + $stats .= sprintf( "%-40s%-40s%-40s\n", 'Cache', 'Type', 'Packlevel' ); + } + + foreach( self::$log as $data ) + { + $extension = $data['file_extension'] === '.js' ? 'JS' : 'CSS'; + if ( $as_html ) + { + $sourceFilesStats = self::printDebugReportFiles( $data, $as_html ); + $cache = $data['cache_path'] === '' ? '' + : "{$data['cache_hash']}"; + $stats .= ""; + } + else + { + $stats .= sprintf( "%-40s%-40s%-40s\n", $data['cache_hash'], $extension, $data['pack_level'] ); + } + } + + if ( $as_html ) + { + $stats .= '
CacheTypePacklevelSourceFiles
{$cache}{$extension}{$data['pack_level']}{$sourceFilesStats}
'; + } + + return $stats; + } + + /** + * Return data for array of files + * + * @param array ['locale'] + * @param bool $as_html + */ + static protected function printDebugReportFiles( array $data ) + { + $stats = ''; + foreach ( $data['http'] as $i => $file ) + { + // Skip last if it is cache file + if ( !isset( $data['http'][$i+1] ) && $data['cache_path'] !== '' ) + break; + + if ( !$file ) + continue; + else if ( $stats !== '' ) + $stats .= '
'; + + $stats .= "{$file}"; + } + + foreach ( $data['locale'] as $file ) + { + if ( !$file ) + continue; + elseif ( $stats !== '' ) + $stats .= '
'; + + if ( $file instanceOf ezjscServerRouter ) + $stats .= $file->getName(); + else + $stats .= $file; + } + return $stats; + } + + /** + * Internal log of all generated files and source files, for use by {@link printDebugReport()} + * + * @var array + */ + protected static $log = array(); +} + +// Auto append callback on eZDebug to be able to show report on packer use +eZDebug::appendBottomReport( 'ezjscPacker', array( 'ezjscPacker', 'printDebugReport' ) ); + +?> diff --git a/classes/ezjscserverfunctions.php b/classes/ezjscserverfunctions.php new file mode 100644 index 0000000..4ff8898 --- /dev/null +++ b/classes/ezjscserverfunctions.php @@ -0,0 +1,49 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/* + * ezjscServerCall "Interface" + */ + +class ezjscServerFunctions +{ + /** + * Cache time for retunrned data, only currently used by ezjscPacker + * + * @param string $functionName + * @return int Uniq timestamp (can return -1 to signal that $functionName is not cacheable) + */ + public static function getCacheTime( $functionName ) + { + return 0; + } +} + +?> diff --git a/classes/ezjscserverfunctionsajaxuploader.php b/classes/ezjscserverfunctionsajaxuploader.php new file mode 100644 index 0000000..1888929 --- /dev/null +++ b/classes/ezjscserverfunctionsajaxuploader.php @@ -0,0 +1,383 @@ +postVariable( 'AjaxUploadHandlerData', array() ); + + $handlerOptions = new ezpExtensionOptions(); + $handlerOptions->iniFile = 'ezjscore.ini'; + $handlerOptions->iniSection = 'AjaxUploader'; + $handlerOptions->iniVariable = 'AjaxUploadHandler'; + $handlerOptions->handlerIndex = $args[0]; + $handlerOptions->handlerParams = $handlerData; + + $handler = eZExtension::getHandlerClass( $handlerOptions ); + + if ( !$handler instanceof ezpAjaxUploaderHandlerInterface ) + { + throw new InvalidArgumentException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'Unable to load the ajax upload handler' + ) + ); + } + return $handler; + } + + /** + * Returns the upload form + * + * @param array $args ezjscore function arguments, the first element is the AJAX + * upload handler identifier ({@link + * ezjscServerFunctionsAjaxUploader::getHandler}) + * @return array( 'meta_data' => false, 'html' => string) + * + * @throw RuntimeException if the user is not allowed to upload a file + */ + static function uploadForm( $args ) + { + $handler = self::getHandler( $args ); + if ( !$handler->canUpload() ) + { + throw new RuntimeException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'You are not allowed to upload a file.' + ) + ); + } + $tpl = eZTemplate::factory(); + return array( + 'meta_data' => false, + 'html' => $tpl->fetch( 'design:ajaxuploader/upload.tpl' ) + ); + } + + /** + * Stores the uploaded file and returns the location form. The result of + * this method is always json encoded. + * + * @param array $args + * @return string a json encoded array + */ + static function upload( $args ) + { + try + { + $handler = self::getHandler( $args ); + $fileInfo = $handler->getFileinfo(); + $mimeData = $fileInfo['mime']; + $file = $fileInfo['file']; + $class = $handler->getContentClass( $mimeData ); + + if ( $file->store( false, $mimeData['suffix'] ) === false ) + { + throw new RuntimeException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'Unable to store the uploaded file.' + ) + ); + } + else + { + $fileHandler = eZClusterFileHandler::instance(); + $fileHandler->fileStore( $file->attribute( 'filename' ), 'tmp', true, $file->attribute( 'mime_type' ) ); + } + + $start = $handler->getDefaultParentNodeId( $class ); + $defaultParentNode = eZContentObjectTreeNode::fetch( $start ); + if ( !$defaultParentNode instanceof eZContentObjectTreeNode ) + { + throw new RuntimeException( + ezpI18n::tr( + "extension/ezjscore/ajaxuploader", + "The default parent location for uploads cannot be retrieved! Check user permissions and correctness of settings." + ) + ); + } + } + catch ( Exception $e ) + { + // manually catch exception to force json encode + // because most browsers cannot upload + // wit a json HTTP Accept header... + // see JavaScript code in eZAjaxUploader::delegateWindowEvents(); + return json_encode( + array( + 'error_text' => $e->getMessage(), + 'content' => '' + ) + ); + } + + $browseItems = self::getBrowseItems( $defaultParentNode->attribute( 'parent' ), $class ); + + $http = eZHTTPTool::instance(); + $tpl = eZTemplate::factory(); + $tpl->setVariable( 'file', $file ); + $tpl->setVariable( 'name', $http->postVariable( 'UploadName', $file->attribute( 'original_filename' ) ) ); + $tpl->setVariable( 'mime_data', $mimeData ); + $tpl->setVariable( 'class', $class ); + $tpl->setVariable( 'browse_start', $defaultParentNode->attribute( 'parent' ) ); + $tpl->setVariable( 'default_parent_node', $defaultParentNode ); + $tpl->setVariable( 'browse', $browseItems ); + // json_encode and url encode the HTML to be able to get it in the + // JavaScript code. see eZAjaxUploader::delegateWindowEvents() + return json_encode( + array( + 'meta_data' => false, + 'html' => rawurlencode( + $tpl->fetch( 'design:ajaxuploader/location.tpl' ) + ) + ) + ); + } + + /** + * Returns a struct containing the following values: + * - limit the number of element by page + * - offset the current offset + * - items array, each element contains + * - has_child boolean + * - can_create boolean + * - node eZContentObjectTreeNode + * - has_prev boolean, true if there's a previous page + * - has_next boolean, true if there's a next page + * + * @param eZContentObjectTreeNode $start the node where the browse will start + * @param eZContentClass $class class of the object to be created + * @param int $offset + * @return array + */ + private static function getBrowseItems( eZContentObjectTreeNode $start, eZContentClass $class, $offset = 0 ) + { + $result = array( + 'limit' => 10, + 'offset' => $offset, + 'items' => array(), + 'has_prev' => ( $offset != 0 ), + 'has_next' => false + ); + $containerClasses = eZPersistentObject::fetchObjectList( + eZContentClass::definition(), null, + array( + 'version' => eZContentClass::VERSION_STATUS_DEFINED, + 'is_container' => 1 + ) + ); + $classFilterArray = array(); + foreach ( $containerClasses as $c ) + { + $classFilterArray[] = $c->attribute( 'identifier' ); + } + $children = $start->subTree( + array( + 'ClassFilterArray' => $classFilterArray, + 'ClassFilterType' => 'include', + 'Depth' => 1, + 'Limit' => $result['limit'], + 'Offset' => $offset + ) + ); + $count = $start->subTreeCount( + array( + 'ClassFilterArray' => $classFilterArray, + 'ClassFilterType' => 'include', + 'Depth' => 1 + ) + ); + if ( $count > ( $offset + $result['limit'] ) ) + { + $result['has_next'] = true; + } + foreach( $children as $node ) + { + $elt = array(); + $elt['node'] = $node; + $canCreateClassist = $node->canCreateClassList(); + foreach( $canCreateClassist as $c ) + { + if ( $c['id'] == $class->attribute( 'id' ) ) + { + $elt['can_create'] = true; + break; + } + } + if ( !isset( $elt['can_create'] ) ) + { + $elt['can_create'] = false; + } + $childrenContainerCount = $node->subTreeCount( + array( + 'ClassFilterArray' => $classFilterArray, + 'ClassFilterType' => 'include', + 'Depth' => 1 + ) + ); + $elt['has_child'] = ( $childrenContainerCount > 0 ); + $result['items'][] = $elt; + } + return $result; + } + + /** + * Browse AJAX action + * + * @param array $args containing the following values: + * - 0 the parent node id of the elements to display + * - 1 the class id of the element that is going to be created + * - 2 [optional] the offset + * @return array + * @throws InvalidArgumentException if the node or the class cannot be loaded + */ + static function browse( $args ) + { + if ( count( $args ) < 2 ) + { + throw new InvalidArgumentException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', 'Arguments error.' + ) + ); + } + list( $nodeID, $classId ) = $args; + $offset = 0; + if ( isset( $args[2] ) ) + { + $offset = (int) $args[2]; + } + $node = eZContentObjectTreeNode::fetch( $nodeID ); + $class = eZContentClass::fetch( $classId ); + if ( !$node instanceof eZContentObjectTreeNode + || !$class instanceof eZContentClass ) + { + throw new InvalidArgumentException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', 'Arguments error.' + ) + ); + } + else if ( !$node->canRead() ) + { + throw new InvalidArgumentException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', 'Arguments error.' + ) + ); + } + $browseItems = self::getBrowseItems( $node, $class, $offset ); + + $tpl = eZTemplate::factory(); + $tpl->setVariable( 'browse', $browseItems ); + $tpl->setVariable( 'browse_start', $node ); + $tpl->setVariable( 'default_parent_node', array( 'node_id' => 0 ) ); + $tpl->setVariable( 'class', $class ); + + return array( + 'meta_data' => false, + 'html' => $tpl->fetch( 'design:ajaxuploader/browse.tpl' ) + ); + } + + + /** + * Creates the object from the uploaded file and displays the preview of it + * + * @param array $args + * @return array + * @throw RuntimeException if the previously uploaded file cannot be fetched + */ + static function preview( $args ) + { + $http = eZHTTPTool::instance(); + $handler = self::getHandler( $args ); + if ( !$handler->canUpload() ) + { + throw new RuntimeException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', + 'You are not allowed to upload a file.' + ) + ); + } + + $file = $http->postVariable( 'UploadFile', false ); + $fileHandler = eZClusterFileHandler::instance(); + if ( $file === false + || !$fileHandler->fileExists( $file ) + || !$fileHandler->fileFetch( $file ) ) + { + throw new RuntimeException( + ezpI18n::tr( + 'extension/ezjscore/ajaxuploader', 'Unable to retrieve the uploaded file.' + ) + ); + } + else + { + $tmpFile = eZSys::cacheDirectory() . '/' . + eZINI::instance()->variable( 'FileSettings', 'TemporaryDir' ) . '/' . + str_replace( + array( '/', '\\' ), '_', + $http->postVariable( 'UploadOriginalFilename' ) + ); + eZFile::rename( $file, $tmpFile, true ); + $fileHandler->fileDelete( $file ); + $fileHandler->fileDeleteLocal( $file ); + } + + $contentObject = $handler->createObject( + $tmpFile, + $http->postVariable( 'UploadLocation', false ), + $http->postVariable( 'UploadName', '' ) + ); + unlink( $tmpFile ); + + $tpl = eZTemplate::factory(); + $tpl->setVariable( 'object', $contentObject ); + return array( + 'meta_data' => $handler->serializeObject( $contentObject ), + 'html' => $tpl->fetch( 'design:ajaxuploader/preview.tpl' ) + ); + } +} +?> diff --git a/classes/ezjscserverfunctionsjs.php b/classes/ezjscserverfunctionsjs.php new file mode 100644 index 0000000..5f24279 --- /dev/null +++ b/classes/ezjscserverfunctionsjs.php @@ -0,0 +1,649 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/* + * Some ezjscServerFunctions + */ + +class ezjscServerFunctionsJs extends ezjscServerFunctions +{ + /** + * Example function for returning time stamp + first function argument if present + * + * @param array $args + * @return int|string + */ + public static function time( $args ) + { + if ( $args && isset( $args[0] ) ) + return htmlspecialchars( $args[0] ) . '_' . time(); + return time(); + } + + /** + * Figures out where to load yui2 files from and prepends them to $packerFiles + * + * @param array $args + * @param array $packerFiles ByRef list of files to pack (by ezjscPacker) + * @return string Empty string, this function only modifies $packerFiles + */ + public static function yui2( $args, &$packerFiles ) + { + $ezjscoreIni = eZINI::instance( 'ezjscore.ini' ); + if ( $ezjscoreIni->variable( 'eZJSCore', 'LoadFromCDN' ) === 'enabled' ) + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'ExternalScripts' ); + $packerFiles = array_merge( array( $scriptFiles['yui2'], 'ezjsc::yui2conf' ), $packerFiles ); + } + else + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'LocalScripts' ); + $scriptBases = $ezjscoreIni->variable( 'eZJSCore', 'LocalScriptBasePath' ); + $packerFiles = array_merge( array( $scriptFiles['yui2'], 'ezjsc::yui2conf::' . $scriptBases['yui2'] ), $packerFiles ); + } + return ''; + } + + /** + * Yui2 config as requested by {@link ezjscServerFunctionsJs::yui2()} + * + * @param array $args First value is base bath if set + * @return string YUI 2.0 JavaScript config string + */ + public static function yui2conf( $args ) + { + if ( isset( $args[0] ) ) + { + return 'var YUI2_config = { + base: \'' . self::getDesignFile( $args[0] ) . '\', + loadOptional: true + }; + var YUILoader = new YAHOO.util.YUILoader(YUI2_config);'; + } + + return 'var YUI2_config = { + loadOptional: true, + combine: true + }; + var YUILoader = new YAHOO.util.YUILoader(YUI2_config);'; + } + + /** + * Figures out where to load yui3 files from and prepends them to $packerFiles + * + * @param array $args + * @param array $packerFiles ByRef list of files to pack (by ezjscPacker) + * @return string Empty string, this function only modifies $packerFiles + */ + public static function yui3( $args, &$packerFiles ) + { + $ezjscoreIni = eZINI::instance( 'ezjscore.ini' ); + if ( $ezjscoreIni->variable( 'eZJSCore', 'LoadFromCDN' ) === 'enabled' ) + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'ExternalScripts' ); + $packerFiles = array_merge( array( $scriptFiles['yui3'], 'ezjsc::yui3conf' ), $packerFiles ); + } + else + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'LocalScripts' ); + $scriptBases = $ezjscoreIni->variable( 'eZJSCore', 'LocalScriptBasePath' ); + $packerFiles = array_merge( array( $scriptFiles['yui3'], 'ezjsc::yui3conf::' . $scriptBases['yui3'] ), $packerFiles ); + } + return ''; + } + + /** + * Yui3 config as requested by {@link ezjscServerFunctionsJs::yui3()} + * + * @param array $args First value is base bath if set + * @return string YUI 3.0 JavaScript config string + */ + public static function yui3conf( $args ) + { + $options = eZINI::instance( 'ezjscore.ini' )->variable( 'YUI3', 'LoaderOptions' ); + + if ( isset( $args[0] ) ) + { + $options['base'] = self::getDesignFile( $args[0] ); + if ( !isset( $options['combine'] ) ) + { + $options['combine'] = false; + } + } + if ( !isset( $options['modules'] ) ) + { + $options['modules'] = new stdClass; + } + + return 'var YUI3_config = ' . json_encode( $options ) . ';'; + } + + /** + * Generates the JavaScript needed to do server calls directly from JavaScript in yui3.0 + * + * @param array $args + * @return string YUI 3.0 JavaScript plugin string + */ + public static function yui3io( $args ) + { + $rootUrl = self::getIndexDir(); + return " +YUI( YUI3_config ).add('io-ez', function( Y ) +{ + var _rootUrl = '$rootUrl', _serverUrl = _rootUrl + 'ezjscore/', _seperator = '@SEPERATOR$', _configBak, + _prefUrl = _rootUrl + 'user/preferences'; + + // (static) Y.io.ez() uses Y.io() + // + // @param string callArgs + // @param object|undefined c Same format as second parameter of Y.io() + function _ez( callArgs, c ) + { + callArgs = callArgs.join !== undefined ? callArgs.join( _seperator ) : callArgs; + var url = _serverUrl + 'call/'; + + // Merge configuration object + if ( c === undefined ) + c = {on:{}, data: '', headers: {}, method: 'POST'}; + else + c = Y.merge( {on:{}, data: '', headers: {}, method: 'POST'}, c ); + + var _token = '', _tokenNode = document.getElementById('ezxform_token_js'); + if ( _tokenNode ) _token = '&ezxform_token=' + _tokenNode.getAttribute('title'); + + // Append function arguments as post param if method is POST + if ( c.method === 'POST' ) + c.data += ( c.data ? '&' : '' ) + 'ezjscServer_function_arguments=' + callArgs + _token; + else + url += encodeURIComponent( callArgs ); + + // force json transport + c.headers.Accept = 'application/json,text/javascript,*/*'; + + // backup user success call + if ( c.on.success !== undefined ) + c.on.successCallback = c.on.success; + + c.on.success = _ioezSuccess; + _configBak = c; + + return Y.io( url, c ); + } + + function _ioezSuccess( id, o ) + { + if ( o.responseJSON === undefined ) + { + // create new object to avoid error in ie6 (and do not use Y.merge since it fails in ff) + var returnObject = {'responseJSON': Y.JSON.parse( o.responseText ), + 'readyState': o.readyState, + 'responseText': o.responseText, + 'responseXML': o.responseXML, + 'status': o.status, + 'statusText': o.statusText + }; + } + else + { + var returnObject = o; + } + + var c = _configBak; + if ( c.on.successCallback !== undefined ) + { + if ( c.arguments !== undefined ) + c.on.successCallback( id, returnObject, c.arguments ); + else + c.on.successCallback( id, returnObject, null ); + } + else if ( window.console !== undefined ) + { + if ( returnObject.responseJSON.error_text ) + window.console.error( 'Y.ez(): ' + returnObject.responseJSON.error_text ); + else + window.console.log( 'Y.ez(): ' + returnObject.responseJSON.content ); + } + _configBak.on.success = _configBak.on.successCallback; + _configBak.on.successCallback = undefined; + } + + _ez.url = _serverUrl; + _ez.root_url = _rootUrl; + _ez.seperator = _seperator; + Y.io.ez = _ez; + Y.io.ez.setPreference = function( name, value ) + { + var c = {on:{}, data:'', headers: {}, method: 'POST'}, + _tokenNode = document.getElementById( 'ezxform_token_js' ); + + c.data = 'Function=set_and_exit&Key=' + encodeURIComponent( name ) + '&Value=' + encodeURIComponent( value ); + if ( _tokenNode ) + c.data += '&ezxform_token=' + _tokenNode.getAttribute( 'title' ); + return Y.io( _prefUrl, c ); + } +}, '3.0.0' ,{requires:['io-base', 'json-parse']}); + "; + } + + /** + * Figures out where to load jQuery files from and prepends them to $packerFiles + * + * @param array $args + * @param array $packerFiles ByRef list of files to pack (by ezjscPacker) + * @return string Empty string, this function only modifies $packerFiles + */ + public static function jquery( $args, &$packerFiles ) + { + $ezjscoreIni = eZINI::instance( 'ezjscore.ini' ); + if ( $ezjscoreIni->variable( 'eZJSCore', 'LoadFromCDN' ) === 'enabled' ) + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'ExternalScripts' ); + $packerFiles = array_merge( array( $scriptFiles['jquery'] ), $packerFiles ); + } + else + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'LocalScripts' ); + $packerFiles = array_merge( array( $scriptFiles['jquery'] ), $packerFiles ); + } + return ''; + } + + /** + * Figures out where to load jQueryUI files from and prepends them to $packerFiles + * + * @param array $args + * @param array $packerFiles ByRef list of files to pack (by ezjscPacker) + * @return string Empty string, this function only modifies $packerFiles + */ + public static function jqueryUI( $args, &$packerFiles ) + { + $ezjscoreIni = eZINI::instance( 'ezjscore.ini' ); + if ( $ezjscoreIni->variable( 'eZJSCore', 'LoadFromCDN' ) === 'enabled' ) + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'ExternalScripts' ); + $packerFiles = array_merge( array( $scriptFiles['jqueryUI'] ), $packerFiles ); + } + else + { + $scriptFiles = $ezjscoreIni->variable( 'eZJSCore', 'LocalScripts' ); + $packerFiles = array_merge( array( $scriptFiles['jqueryUI'] ), $packerFiles ); + } + return ''; + } + + /** + * Generates the JavaScript needed to do server calls directly from JavaScript in jQuery + * + * @param array $args + * @return string jQuery JavaScript plugin string + */ + public static function jqueryio( $args ) + { + $rootUrl = self::getIndexDir(); + return " +(function($) { + var _rootUrl = '$rootUrl', _serverUrl = _rootUrl + 'ezjscore/', _seperator = '@SEPERATOR$', + _prefUrl = _rootUrl + 'user/preferences'; + + // FIX: Ajax is broken on IE8 / IE7 on jQuery 1.4.x as it's trying to use the broken window.XMLHttpRequest object + if ( window.XMLHttpRequest && window.ActiveXObject ) + $.ajaxSettings.xhr = function() { try { return new window.ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {} }; + + // (static) jQuery.ez() uses jQuery.post() (Or jQuery.get() if post paramer is false) + // + // @param string callArgs + // @param object|array|string|false post Optional post values, uses get request if false or undefined + // @param function Optional callBack + function _ez( callArgs, post, callBack ) + { + callArgs = callArgs.join !== undefined ? callArgs.join( _seperator ) : callArgs; + var url = _serverUrl + 'call/'; + if ( post ) + { + var _token = '', _tokenNode = document.getElementById('ezxform_token_js'); + if ( _tokenNode ) _token = _tokenNode.getAttribute('title'); + if ( post.join !== undefined )// support serializeArray() format + { + post.push( { 'name': 'ezjscServer_function_arguments', 'value': callArgs } ); + post.push( { 'name': 'ezxform_token', 'value': _token } ); + } + else if ( typeof(post) === 'string' )// string + { + post += ( post ? '&' : '' ) + 'ezjscServer_function_arguments=' + callArgs + '&ezxform_token=' + _token; + } + else // object + { + post['ezjscServer_function_arguments'] = callArgs; + post['ezxform_token'] = _token; + } + return $.post( url, post, callBack, 'json' ); + } + return $.get( url + encodeURIComponent( callArgs ), {}, callBack, 'json' ); + }; + _ez.url = _serverUrl; + _ez.root_url = _rootUrl; + _ez.seperator = _seperator; + $.ez = _ez; + + $.ez.setPreference = function( name, value ) + { + var param = {'Function': 'set_and_exit', 'Key': name, 'Value': value}; + _tokenNode = document.getElementById( 'ezxform_token_js' ); + if ( _tokenNode ) + param.ezxform_token = _tokenNode.getAttribute( 'title' ); + + return $.post( _prefUrl, param ); + }; + + // Method version, for loading response into elements + // NB: Does not use json (not possible with .load), so ezjscore/call will return string + function _ezLoad( callArgs, post, selector, callBack ) + { + callArgs = callArgs.join !== undefined ? callArgs.join( _seperator ) : callArgs; + var url = _serverUrl + 'call/'; + if ( post ) + { + post['ezjscServer_function_arguments'] = callArgs; + post['ezxform_token'] = jQuery('#ezxform_token_js').attr('title'); + } + else + url += encodeURIComponent( callArgs ); + + return this.load( url + ( selector ? ' ' + selector : '' ), post, callBack ); + }; + $.fn.ez = _ezLoad; +})(jQuery); + "; + } + + /** + * Returns search results based on given post params + * + * @param mixed $args Only used if post parameter is not set + * 0 => SearchStr + * 1 => SearchOffset + * 2 => SearchLimit (10 by default, max 50) + * @return array + */ + public static function search( $args ) + { + $http = eZHTTPTool::instance(); + + if ( $http->hasPostVariable( 'SearchStr' ) ) + $searchStr = trim( $http->postVariable( 'SearchStr' ) ); + else if ( isset( $args[0] ) ) + $searchStr = trim( $args[0] ); + + if ( $http->hasPostVariable( 'SearchOffset' )) + $searchOffset = (int) $http->postVariable( 'SearchOffset' ); + else if ( isset( $args[1] ) ) + $searchOffset = (int) $args[1]; + else + $searchOffset = 0; + + if ( $http->hasPostVariable( 'SearchLimit' )) + $searchLimit = (int) $http->postVariable( 'SearchLimit' ); + else if ( isset( $args[2] ) ) + $searchLimit = (int) $args[2]; + else + $searchLimit = 10; + + // Do not allow to search for more then x items at a time + $ini = eZINI::instance(); + $maximumSearchLimit = (int) $ini->variable( 'SearchSettings', 'MaximumSearchLimit' ); + if ( $searchLimit > $maximumSearchLimit ) + $searchLimit = $maximumSearchLimit; + + // Prepare node encoding parameters + $encodeParams = array(); + if ( self::hasPostValue( $http, 'EncodingLoadImages' ) ) + $encodeParams['loadImages'] = true; + + if ( self::hasPostValue( $http, 'EncodingFetchChildrenCount' ) ) + $encodeParams['fetchChildrenCount'] = true; + + if ( self::hasPostValue( $http, 'EncodingFetchSection' ) ) + $encodeParams['fetchSection'] = true; + + if ( self::hasPostValue( $http, 'EncodingFormatDate' ) ) + $encodeParams['formatDate'] = $http->postVariable( 'EncodingFormatDate' ); + + if ( self::hasPostValue( $http, 'EncodingDataMap' ) ) + $encodeParams['dataMap'] = $http->postVariable( 'EncodingDataMap' ); + + // Prepare search parameters + $params = array( 'SearchOffset' => $searchOffset, + 'SearchLimit' => $searchLimit, + 'SortArray' => array( 'published', 0 ), // Legacy search engine uses SortArray + 'SortBy' => array( 'published' => 'desc' ) // eZ Find search method implementation uses SortBy + ); + + if ( self::hasPostValue( $http, 'SearchContentClassAttributeID' ) ) + { + $params['SearchContentClassAttributeID'] = self::makePostArray( $http, 'SearchContentClassAttributeID' ); + } + else if ( self::hasPostValue( $http, 'SearchContentClassID' ) ) + { + $params['SearchContentClassID'] = self::makePostArray( $http, 'SearchContentClassID' ); + } + else if ( self::hasPostValue( $http, 'SearchContentClassIdentifier' ) ) + { + $params['SearchContentClassID'] = eZContentClass::classIDByIdentifier( self::makePostArray( $http, 'SearchContentClassIdentifier' ) ); + } + + if ( self::hasPostValue( $http, 'SearchSubTreeArray' ) ) + { + $params['SearchSubTreeArray'] = self::makePostArray( $http, 'SearchSubTreeArray' ); + } + + if ( self::hasPostValue( $http, 'SearchSectionID' ) ) + { + $params['SearchSectionID'] = self::makePostArray( $http, 'SearchSectionID' ); + } + + if ( self::hasPostValue( $http, 'SearchDate' ) ) + { + $params['SearchDate'] = (int) $http->postVariable( 'SearchDate' ); + } + else if ( self::hasPostValue( $http, 'SearchTimestamp' ) ) + { + $params['SearchTimestamp'] = self::makePostArray( $http, 'SearchTimestamp' ); + if ( !isset( $params['SearchTimestamp'][1] ) ) + $params['SearchTimestamp'] = $params['SearchTimestamp'][0]; + } + + if ( self::hasPostValue( $http, 'EnableSpellCheck' ) || self::hasPostValue( $http, 'enable-spellcheck', '0' ) ) + { + $params['SpellCheck'] = array( true ); + } + + if ( self::hasPostValue( $http, 'GetFacets' ) || self::hasPostValue( $http, 'show-facets', '0' ) ) + { + $params['facet'] = eZFunctionHandler::execute( 'ezfind', 'getDefaultSearchFacets', array() ); + } + + $result = array( 'SearchOffset' => $searchOffset, + 'SearchLimit' => $searchLimit, + 'SearchResultCount' => 0, + 'SearchCount' => 0, + 'SearchResult' => array(), + 'SearchString' => $searchStr, + 'SearchExtras' => array() + ); + + // Possibility to keep track of callback reference for use in js callback function + if ( $http->hasPostVariable( 'CallbackID' ) ) + $result['CallbackID'] = $http->postVariable( 'CallbackID' ); + + // Only search if there is something to search for + if ( $searchStr ) + { + $searchList = eZSearch::search( $searchStr, $params ); + + $result['SearchResultCount'] = $searchList['SearchResult'] !== false ? count( $searchList['SearchResult'] ) : 0; + $result['SearchCount'] = (int) $searchList['SearchCount']; + $result['SearchResult'] = ezjscAjaxContent::nodeEncode( $searchList['SearchResult'], $encodeParams, false ); + + // ezfind stuff + if ( isset( $searchList['SearchExtras'] ) && $searchList['SearchExtras'] instanceof ezfSearchResultInfo ) + { + if ( isset( $params['SpellCheck'] ) ) + $result['SearchExtras']['spellcheck'] = $searchList['SearchExtras']->attribute( 'spellcheck' ); + + + if ( isset( $params['facet'] ) ) + { + $facetInfo = array(); + $retrievedFacets = $searchList['SearchExtras']->attribute( 'facet_fields' ); + $baseSearchUrl = "/content/search/"; + eZURI::transformURI( $baseSearchUrl, false, 'full' ); + + foreach ( $params['facet'] as $key => $defaultFacet ) + { + $facetData = $retrievedFacets[$key]; + $facetInfo[$key] = array( 'name' => $defaultFacet['name'], 'list' => array() ); + if ( $facetData !== null ) + { + foreach ( $facetData['nameList'] as $key2 => $facetName ) + { + if ( $key2 != '' ) + { + $tmp = array( 'value' => $facetName ); + $tmp['url'] = $baseSearchUrl . '?SearchText=' . $searchStr . '&filter[]=' . $facetData['queryLimit'][$key2] . '&activeFacets[' . $defaultFacet['field'] . ':' . $defaultFacet['name'] . ']=' . $facetName; + $tmp['count'] = $facetData['countList'][$key2]; + $facetInfo[$key]['list'][] = $tmp; + } + } + } + } + $result['SearchExtras']['facets'] = $facetInfo; + } + }//$searchList['SearchExtras'] instanceof ezfSearchResultInfo + }// $searchStr + + return $result; + } + + /** + * Creates an array out of a post parameter, return empty array if post parameter is not set. + * Splits string on ',' in case of comma seperated values. + * + * @param eZHTTPTool $http + * @param string $key + * @return array + */ + protected static function makePostArray( eZHTTPTool $http, $key ) + { + if ( $http->hasPostVariable( $key ) && $http->postVariable( $key ) !== '' ) + { + $value = $http->postVariable( $key ); + if ( is_array( $value ) ) + return $value; + elseif( strpos($value, ',') === false ) + return array( $value ); + else + return explode( ',', $value ); + } + return array(); + } + + /** + * Checks if a post variable exitst and has a value + * + * @param eZHTTPTool $http + * @param string $key + * @return bool + */ + protected static function hasPostValue( eZHTTPTool $http, $key, $falseValue = '' ) + { + return $http->hasPostVariable( $key ) && $http->postVariable( $key ) !== $falseValue; + } + + /** + * Reimp + * + * @param string $fn FunctionName to get cache time for + * @return int -1 if function does not support caching, eg: yui3, yui2, jquery & jqueryUI + */ + public static function getCacheTime( $fn ) + { + // Functions that always needs to be executed, since they append other files dynamically + if ( $fn === 'yui3' || $fn === 'yui2' || $fn === 'jquery' || $fn === 'jqueryUI' ) + return -1; + + static $mtime = null; + if ( $mtime === null ) + { + $mtime = filemtime( __FILE__ ); + } + return $mtime; + } + + /** + * Internal function to get current index dir + * + * @return string + */ + protected static function getIndexDir() + { + static $cachedIndexDir = null; + if ( $cachedIndexDir === null ) + { + $cachedIndexDir = eZSys::indexDir() . '/'; + } + return $cachedIndexDir; + } + + /** + * Internal function to get current index dir + * + * @return string + */ + protected static function getDesignFile( $file ) + { + static $bases = null; + static $wwwDir = null; + if ( $bases === null ) + $bases = eZTemplateDesignResource::allDesignBases(); + if ( $wwwDir === null ) + $wwwDir = eZSys::wwwDir() . '/'; + + $triedFiles = array(); + $match = eZTemplateDesignResource::fileMatch( $bases, '', $file, $triedFiles ); + if ( $match === false ) + { + eZDebug::writeWarning( "Could not find: $file", __METHOD__ ); + return false; + } + return $wwwDir . htmlspecialchars( $match['path'] ); + } +} + +?> diff --git a/classes/ezjscserverfunctionsnode.php b/classes/ezjscserverfunctionsnode.php new file mode 100644 index 0000000..b4c49d4 --- /dev/null +++ b/classes/ezjscserverfunctionsnode.php @@ -0,0 +1,256 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/** + * ezjscServerFunctionsNode class definition that provide node fetch functions + * + */ +class ezjscServerFunctionsNode extends ezjscServerFunctions +{ + /** + * Returns a subtree node items for given parent node + * + * Following parameters are supported: + * ezjscnode::subtree::parent_node_id::limit::offset::sort::order + * + * @since 1.2 + * @param mixed $args + * @return array + */ + public static function subTree( $args ) + { + $parentNodeID = isset( $args[0] ) ? $args[0] : null; + $limit = isset( $args[1] ) ? $args[1] : 25; + $offset = isset( $args[2] ) ? $args[2] : 0; + $sort = isset( $args[3] ) ? self::sortMap( $args[3] ) : 'published'; + $order = isset( $args[4] ) ? $args[4] : false; + $objectNameFilter = isset( $args[5] ) ? $args[5] : ''; + + if ( !$parentNodeID ) + { + throw new ezcBaseFunctionalityNotSupportedException( 'Fetch node list', 'Parent node id is not valid' ); + } + + $node = eZContentObjectTreeNode::fetch( $parentNodeID ); + if ( !$node instanceOf eZContentObjectTreeNode ) + { + throw new ezcBaseFunctionalityNotSupportedException( 'Fetch node list', "Parent node '$parentNodeID' is not valid" ); + } + + $ezjscoreIni = eZINI::instance( 'ezjscore.ini' ); + $hardLimit = (int)$ezjscoreIni->variable( 'ezjscServer_ezjscnode', 'HardLimit' ); + + if ( $hardLimit > 0 && $limit > $hardLimit ) + { + $limit = $hardLimit; + } + + $params = array( 'Depth' => 1, + 'Limit' => $limit, + 'Offset' => $offset, + 'SortBy' => array( array( $sort, $order ) ), + 'DepthOperator' => 'eq', + 'ObjectNameFilter' => $objectNameFilter, + 'AsObject' => true ); + + // fetch nodes and total node count + $count = $node->subTreeCount( $params ); + if ( $count ) + { + $nodeArray = $node->subTree( $params ); + } + else + { + $nodeArray = array(); + } + unset( $node );// We have on purpose not checked permission on $node itself, so it should not be used + + // generate json response from node list + if ( $nodeArray ) + { + $list = ezjscAjaxContent::nodeEncode( $nodeArray, array( 'formatDate' => 'shortdatetime', + 'fetchThumbPreview' => true, + 'fetchSection' => true, + 'fetchCreator' => true, + 'fetchClassIcon' => true ), 'raw' ); + } + else + { + $list = array(); + } + + return array( 'parent_node_id' => $parentNodeID, + 'count' => count( $nodeArray ), + 'total_count' => (int)$count, + 'list' => $list, + 'limit' => $limit, + 'offset' => $offset, + 'sort' => $sort, + 'order' => $order ); + } + + /** + * Returns a node data for given object / node id + * + * Following parameters are supported: + * ezjscnode::load::embed_id[::attribute[::load_image_size]] + * + * eg: ezjscnode::load::ezobject_46::image::large + * eg: ezjscnode::load::eznode_44::summary + *eg: ezjscnode::load::44::summary (44 is in this case node id) + * + * @since 1.2 + * @param mixed $args + * @throws InvalidArgumentException + * @return array + */ + public static function load( $args ) + { + $embedObject = false; + if ( isset( $args[0] ) && $args[0] ) + { + $embedType = 'eznode'; + if ( is_numeric( $args[0] ) ) + $embedId = $args[0]; + else + list($embedType, $embedId) = explode('_', $args[0]); + + if ( $embedType === 'eznode' || strcasecmp( $embedType , 'eznode' ) === 0 ) + $embedObject = eZContentObject::fetchByNodeID( $embedId ); + else + $embedObject = eZContentObject::fetch( $embedId ); + } + + if ( !$embedObject instanceof eZContentObject ) + { + throw new InvalidArgumentException( "Argument 1: '$embedType\_$embedId' does not map to a valid content object" ); + } + else if ( !$embedObject->canRead() ) + { + throw new InvalidArgumentException( "Argument 1: '$embedType\_$embedId' is not available" ); + } + + // Params for node to json encoder + $params = array('loadImages' => true); + $params['imagePreGenerateSizes'] = array('small', 'original'); + + // look for attribute parameter ( what attribute we should load ) + if ( isset( $args[1] ) && $args[1] ) + $params['dataMap'] = array( $args[1] ); + + // what image sizes we want returned with full data ( url++ ) + if ( isset( $args[2] ) && $args[2] ) + $params['imagePreGenerateSizes'][] = $args[2]; + + // Simplify and load data in accordance to $params + return ezjscAjaxContent::simplify( $embedObject, $params ); + } + + /** + * Updating priority sorting for given node + * + * @since 1.2 + * @param mixed $args + * @return array + */ + public static function updatePriority( $args ) + { + $http = eZHTTPTool::instance(); + + if ( !$http->hasPostVariable('ContentNodeID') + || !$http->hasPostVariable('PriorityID') + || !$http->hasPostVariable('Priority') ) + { + return array(); + } + + $contentNodeID = $http->postVariable('ContentNodeID'); + $priorityArray = $http->postVariable('Priority'); + $priorityIDArray = $http->postVariable('PriorityID'); + + $contentNode = eZContentObjectTreeNode::fetch( $contentNodeID ); + if ( !$contentNode instanceof eZContentObjectTreeNode ) + { + throw new InvalidArgumentException( "Argument ContentNodeID: '$contentNodeID' does not exist" ); + } + else if ( !$contentNode->canEdit() ) + { + throw new InvalidArgumentException( "Argument ContentNodeIDs: '$contentNodeID' is not available" ); + } + + if ( eZOperationHandler::operationIsAvailable( 'content_updatepriority' ) ) + { + $operationResult = eZOperationHandler::execute( 'content', 'updatepriority', + array( 'node_id' => $contentNodeID, + 'priority' => $priorityArray, + 'priority_id' => $priorityIDArray ), null, true ); + } + else + { + eZContentOperationCollection::updatePriority( $contentNodeID, $priorityArray, $priorityIDArray ); + } + + if ( $http->hasPostVariable( 'ContentObjectID' ) ) + { + $objectID = $http->postVariable( 'ContentObjectID' ); + eZContentCacheManager::clearContentCacheIfNeeded( $objectID ); + } + } + + /** + * A helper function which maps sort keys from encoded JSON node + * to supported values + * + * @since 1.2 + * @param string $sort + * @return string + */ + protected static function sortMap( $sort ) + { + switch ( $sort ) + { + case 'modified_date': + $sortKey = 'modified'; + break; + case 'published_date': + $sortKey = 'published'; + break; + case 'hidden_status_string': + $sortKey = 'visibility'; + break; + default: + $sortKey = $sort; + } + + return $sortKey; + } +} + +?> diff --git a/classes/ezjscserverfunctionspublishingqueue.php b/classes/ezjscserverfunctionspublishingqueue.php new file mode 100644 index 0000000..843ad3c --- /dev/null +++ b/classes/ezjscserverfunctionspublishingqueue.php @@ -0,0 +1,77 @@ + step 2) + if ( $process instanceof ezpContentPublishingProcess ) + { + $return = array(); + $status = $process->attribute( 'status' ) == ezpContentPublishingProcess::STATUS_WORKING ? 'working' : 'finished'; + switch( $process->attribute( 'status' ) ) + { + case ezpContentPublishingProcess::STATUS_WORKING: + $status = 'working'; + break; + + case ezpContentPublishingProcess::STATUS_FINISHED: + $status = 'finished'; + $objectVersion = $process->attribute( 'version' ); + $object = $objectVersion->attribute( 'contentobject' ); + $node = $object->attribute( 'main_node' ); + $uri = $node->attribute( 'url_alias' ); + eZURI::transformURI( $uri ); + $return['node_uri'] = $uri; + break; + + case ezpContentPublishingProcess::STATUS_PENDING: + $status = 'pending'; + break; + + case ezpContentPublishingProcess::STATUS_DEFERRED: + $status = 'deferred'; + $versionViewUri = "content/versionview/{$contentObjectId}/{$version}"; + eZURI::transformURI( $versionViewUri ); + $return['versionview_uri'] = $versionViewUri; + break; + } + $return['status'] = $status; + } + else + { + $version = eZContentObjectVersion::fetchVersion( $version, $contentObjectId ); + if ( !$version ) + throw new ezcBaseFunctionalityNotSupportedException( 'status', 'Object version not found' ); + else + $return = array( 'status' => 'queued' ); + } + + return $return; + } +} +?> \ No newline at end of file diff --git a/classes/ezjscserverrouter.php b/classes/ezjscserverrouter.php new file mode 100644 index 0000000..399cc01 --- /dev/null +++ b/classes/ezjscserverrouter.php @@ -0,0 +1,227 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/* + Perfoms calls to custom functions or templates depending on arguments and ini settings +*/ + + +class ezjscServerRouter +{ + protected $className = null; + protected $functionName = null; + protected $functionArguments = array(); + protected $isTemplateFunction = false; + + protected function __construct( $className, $functionName = 'call', array $functionArguments = array(), $isTemplateFunction = false ) + { + $this->className = $className; + $this->functionName = $functionName; + $this->functionArguments = $functionArguments; + $this->isTemplateFunction = $isTemplateFunction; + } + + /** + * Gets instance of ezjscServerRouter, IF arguments validates and user has access + * + * @param array $arguments + * @param bool $requireIniGroupe Make sure this is true if $arguments comes from user input + * @param bool $checkFunctionExistence + * @return ezjscServerRouter|null + */ + public static function getInstance( $arguments, $requireIniGroupe = true, $checkFunctionExistence = false ) + { + if ( !is_array( $arguments ) || !isset( $arguments[1] ) ) + { + // return null if arguments are invalid + return null; + } + + $className = $callClassName = array_shift( $arguments ); + $functionName = array_shift( $arguments ); + $isTemplateFunction = false; + $permissionFunctions = false; + $permissionPrFunction = false; + $ezjscoreIni = eZINI::instance( 'ezjscore.ini' ); + + if ( $ezjscoreIni->hasGroup( 'ezjscServer_' . $callClassName ) ) + { + // load file if defined, else use autoload + if ( $ezjscoreIni->hasVariable( 'ezjscServer_' . $callClassName, 'File' ) ) + include_once( $ezjscoreIni->variable( 'ezjscServer_' . $callClassName, 'File' ) ); + + if ( $ezjscoreIni->hasVariable( 'ezjscServer_' . $callClassName, 'TemplateFunction' ) ) + $isTemplateFunction = $ezjscoreIni->variable( 'ezjscServer_' . $callClassName, 'TemplateFunction' ) === 'true'; + + // check permissions + if ( $ezjscoreIni->hasVariable( 'ezjscServer_' . $callClassName, 'Functions' ) ) + $permissionFunctions = $ezjscoreIni->variable( 'ezjscServer_' . $callClassName, 'Functions' ); + + // check permissions + if ( $ezjscoreIni->hasVariable( 'ezjscServer_' . $callClassName, 'PermissionPrFunction' ) ) + $permissionPrFunction = $ezjscoreIni->variable( 'ezjscServer_' . $callClassName, 'PermissionPrFunction' ) === 'enabled'; + + // get class name if defined, else use first argument as class name + if ( $ezjscoreIni->hasVariable( 'ezjscServer_' . $callClassName, 'Class' ) ) + $className = $ezjscoreIni->variable( 'ezjscServer_' . $callClassName, 'Class' ); + } + else if ( $requireIniGroupe ) + { + // return null if ini is not defined as a safety measure + // to avoid letting user call all eZ Publish classes + return null; + } + + if ( $checkFunctionExistence && !self::staticHasFunction( $className, $functionName, $isTemplateFunction ) ) + { + return null; + } + + if ( $permissionFunctions !== false ) + { + if ( !self::hasAccess( $permissionFunctions, ( $permissionPrFunction ? $functionName : null ) ) ) + { + return null; + } + } + + return new ezjscServerRouter( $className, $functionName, $arguments, $isTemplateFunction ); + } + + /** + * Gets the name of the current class+function + * + * @return string + */ + public function getName() + { + return $this->className . '::' . $this->functionName; + } + + /** + * Gets the cache time ( modified time ) for use when chaching the response. + * + * @param array $environmentArguments Optionall hash of environment variables + * @return int + */ + public function getCacheTime( $environmentArguments = array() ) + { + if ( $this->isTemplateFunction ) + { + return 0; + } + else if ( method_exists( $this->className, 'getCacheTime' ) ) + { + return call_user_func( array( $this->className, 'getCacheTime' ), $this->functionName ); + } + else + { + return 0; + } + } + + /** + * Checks if current user has access based on $requiredFunctions + * + * @param array $requiredFunctions + * @param null|string $functionName + * @return bool + */ + public static function hasAccess( $requiredFunctions, $functionName = null ) + { + // Build limitation array + $functionName = $functionName !== null ? '_' . $functionName : ''; + $ezjscoreIni = eZINI::instance( 'ezjscore.ini' ); + $ezjscoreFunctionList = $ezjscoreIni->variable( 'ezjscServer', 'FunctionList' ); + $limitationList = array(); + foreach( $requiredFunctions as $requiredFunction ) + { + $permissionName = $requiredFunction . $functionName; + if ( !in_array( $permissionName, $ezjscoreFunctionList ) ) + { + eZDebug::writeWarning( "'$permissionName' is not defined in ezjscore.ini[ezjscServer]FunctionList", __METHOD__ ); + return false; + } + $limitationList[] = $permissionName; + } + return ezjscAccessTemplateFunctions::hasAccessToLimitation( 'ezjscore', 'call', array( 'FunctionList' => $limitationList ) ); + } + + /** + * Checks if function actually exits on the requested ezjscServerFunctions + * + * @return bool + */ + public function hasFunction() + { + return self::staticHasFunction( $this->className, $this->functionName, $this->isTemplateFunction ); + } + + /** + * Checks if function actually exits on the requested ezjscServerFunctions + * + * @return bool + */ + public static function staticHasFunction( $className, $functionName, $isTemplateFunction = false ) + { + if ( $isTemplateFunction ) + { + return true;//@todo: find a way to look for templates + } + else + { + return is_callable( array( $className, $functionName ) ); + } + } + + /** + * Call the defined function on requested ezjscServerFunctions class + * + * @param array $environmentArguments + * @return mixed + */ + public function call( &$environmentArguments = array(), $isPackeStage = false ) + { + if ( $this->isTemplateFunction ) + { + $tpl = eZTemplate::factory(); + $tpl->setVariable( 'arguments', $this->functionArguments ); + $tpl->setVariable( 'environment', $environmentArguments ); + return $tpl->fetch( 'design:' . $this->className . '/' . $this->functionName . '.tpl' ); + } + else + { + return call_user_func_array( array( $this->className, $this->functionName ), array( $this->functionArguments, &$environmentArguments, $isPackeStage ) ); + } + } + +} + +?> diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..5b40c67 --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "name": "aplia/ezjscore", + "description": "eZ Online Editor", + "keywords": ["ezextension", "editor"], + "homepage": "https://github.com/Aplia/ezjscore", + "type": "ezpublish-legacy-extension", + "license": "GPL-2.0", + "require": { + "php": ">=5.3", + "composer/composer": ">=1.0" + } +} \ No newline at end of file diff --git a/design/standard/javascript/jquery-1.10.2.min.js b/design/standard/javascript/jquery-1.10.2.min.js new file mode 100644 index 0000000..ce1b6b6 --- /dev/null +++ b/design/standard/javascript/jquery-1.10.2.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +*/ +(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
t
",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t +}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); +u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("',"," /**"," * Attributes to auto add to the dynamic iframe under the hood"," * @static"," * @property IFRAME_ATTRS"," * @type Object"," */"," IFRAME_ATTRS: {"," border: '0',"," frameBorder: '0',"," marginWidth: '0',"," marginHeight: '0',"," leftMargin: '0',"," topMargin: '0',"," allowTransparency: 'true',"," width: \"100%\","," height: \"99%\""," },"," /**"," * @static"," * @property PAGE_HTML"," * @description The template used to create the page when created dynamically."," * @type String"," */"," PAGE_HTML: '{TITLE}{META}{LINKED_CSS}{EXTRA_CSS}{CONTENT}',",""," /**"," * @static"," * @method getDocType"," * @description Parses document.doctype and generates a DocType to match the parent page, if supported."," * For IE8, it grabs document.all[0].nodeValue and uses that. For IE < 8, it falls back to Frame.DOC_TYPE."," * @return {String} The normalized DocType to apply to the iframe"," */"," getDocType: function() {"," var dt = Y.config.doc.doctype,"," str = Frame.DOC_TYPE;",""," if (dt) {"," str = '';"," } else {"," if (Y.config.doc.all) {"," dt = Y.config.doc.all[0];"," if (dt.nodeType) {"," if (dt.nodeType === 8) {"," if (dt.nodeValue) {"," if (dt.nodeValue.toLowerCase().indexOf('doctype') !== -1) {"," str = '';"," }"," }"," }"," }"," }"," }"," return str;"," },"," /**"," * @static"," * @property DOC_TYPE"," * @description The DOCTYPE to prepend to the new document when created. Should match the one on the page being served."," * @type String"," */"," DOC_TYPE: '',"," /**"," * @static"," * @property META"," * @description The meta-tag for Content-Type to add to the dynamic document"," * @type String"," */"," META: '',"," //META: '',"," /**"," * @static"," * @property NAME"," * @description The name of the class (frame)"," * @type String"," */"," NAME: 'frame',"," /**"," * The namespace on which Frame plugin will reside."," *"," * @property NS"," * @type String"," * @default 'frame'"," * @static"," */"," NS: 'frame',"," ATTRS: {"," /**"," * @attribute title"," * @description The title to give the blank page."," * @type String"," */"," title: {"," value: 'Blank Page'"," },"," /**"," * @attribute dir"," * @description The default text direction for this new frame. Default: ltr"," * @type String"," */"," dir: {"," value: 'ltr'"," },"," /**"," * @attribute lang"," * @description The default language. Default: en-US"," * @type String"," */"," lang: {"," value: 'en-US'"," },"," /**"," * @attribute src"," * @description The src of the iframe/window. Defaults to javascript:;"," * @type String"," */"," src: {"," //Hackish, IE needs the false in the Javascript URL"," value: 'javascript' + ((Y.UA.ie) ? ':false' : ':') + ';'"," },"," /**"," * @attribute designMode"," * @description Should designMode be turned on after creation."," * @writeonce"," * @type Boolean"," */"," designMode: {"," writeOnce: true,"," value: false"," },"," /**"," * @attribute content"," * @description The string to inject into the body of the new frame/window."," * @type String"," */"," content: {"," validator: Lang.isString,"," value: '
',"," setter: '_setHTML',"," getter: '_getHTML'"," },"," /**"," * @attribute basehref"," * @description The base href to use in the iframe."," * @type String"," */"," basehref: {"," value: false,"," getter: '_resolveBaseHref'"," },"," /**"," * @attribute use"," * @description Array of modules to include in the scoped YUI instance at render time. Default: ['none', 'selector-css2']"," * @writeonce"," * @type Array"," */"," use: {"," writeOnce: true,"," value: ['node', 'node-style', 'selector-css3']"," },"," /**"," * @attribute container"," * @description The container to append the iFrame to on render."," * @type String/HTMLElement/Node"," */"," container: {"," value: 'body',"," setter: function(n) {"," return Y.one(n);"," }"," },"," /**"," * @attribute node"," * @description The Node instance of the iframe."," * @type Node"," */"," node: {"," readOnly: true,"," value: null,"," getter: function() {"," return this._iframe;"," }"," },"," /**"," * @attribute id"," * @description Set the id of the new Node. (optional)"," * @type String"," * @writeonce"," */"," id: {"," writeOnce: true,"," getter: function(id) {"," if (!id) {"," id = 'iframe-' + Y.guid();"," }"," return id;"," }"," },"," /**"," * @attribute linkedcss"," * @description An array of url's to external linked style sheets"," * @type String|Array"," */"," linkedcss: {"," validator: '_validateLinkedCSS',"," getter: '_getLinkedCSS',"," setter: '_setLinkedCSS'"," },"," /**"," * @attribute extracss"," * @description A string of CSS to add to the Head of the Editor"," * @type String"," */"," extracss: {"," validator: Lang.isString,"," setter: '_setExtraCSS'"," },"," /**"," * @attribute defaultblock"," * @description The default tag to use for block level items, defaults to: p"," * @type String"," */"," defaultblock: {"," value: 'p'"," }"," }"," });",""," Y.namespace('Plugin');",""," Y.Plugin.Frame = Frame;",""," Y.Frame = Frame;","","","","}, '3.17.2', {\"requires\": [\"base\", \"node\", \"plugin\", \"selector-css3\", \"yui-throttle\"]});","","}());"]}; +} +var __cov_btK7VK24tT3fXwzek1iwcw = __coverage__['build/frame/frame.js']; +__cov_btK7VK24tT3fXwzek1iwcw.s['1']++;YUI.add('frame',function(Y,NAME){__cov_btK7VK24tT3fXwzek1iwcw.f['1']++;__cov_btK7VK24tT3fXwzek1iwcw.s['2']++;var Lang=Y.Lang,EVENT_CONTENT_READY='contentready',HOST='host',Frame=function(){__cov_btK7VK24tT3fXwzek1iwcw.f['2']++;__cov_btK7VK24tT3fXwzek1iwcw.s['3']++;Frame.superclass.constructor.apply(this,arguments);};__cov_btK7VK24tT3fXwzek1iwcw.s['4']++;Y.extend(Frame,Y.Plugin.Base,{_ready:null,_rendered:null,_iframe:null,_instance:null,_create:function(cb){__cov_btK7VK24tT3fXwzek1iwcw.f['3']++;__cov_btK7VK24tT3fXwzek1iwcw.s['5']++;var res,html='',timer,create=this.get('src')===Frame.ATTRS.src.value,extra_css=this.get('extracss')?(__cov_btK7VK24tT3fXwzek1iwcw.b['1'][0]++,''):(__cov_btK7VK24tT3fXwzek1iwcw.b['1'][1]++,'');__cov_btK7VK24tT3fXwzek1iwcw.s['6']++;this._iframe=Y.one(Y.config.doc.createElement('iframe'));__cov_btK7VK24tT3fXwzek1iwcw.s['7']++;this._iframe.setAttrs(Frame.IFRAME_ATTRS);__cov_btK7VK24tT3fXwzek1iwcw.s['8']++;this._iframe.setStyle('visibility','hidden');__cov_btK7VK24tT3fXwzek1iwcw.s['9']++;this._iframe.set('src',this.get('src'));__cov_btK7VK24tT3fXwzek1iwcw.s['10']++;this.get('container').append(this._iframe);__cov_btK7VK24tT3fXwzek1iwcw.s['11']++;this._iframe.set('height','99%');__cov_btK7VK24tT3fXwzek1iwcw.s['12']++;if(create){__cov_btK7VK24tT3fXwzek1iwcw.b['2'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['13']++;html=Y.Lang.sub(Frame.PAGE_HTML,{DIR:this.get('dir'),LANG:this.get('lang'),TITLE:this.get('title'),META:Frame.META,LINKED_CSS:this.get('linkedcss'),CONTENT:this.get('content'),BASE_HREF:this.get('basehref'),DEFAULT_CSS:Frame.DEFAULT_CSS,EXTRA_CSS:extra_css});__cov_btK7VK24tT3fXwzek1iwcw.s['14']++;if(Y.config.doc.compatMode!=='BackCompat'){__cov_btK7VK24tT3fXwzek1iwcw.b['3'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['15']++;html=Frame.getDocType()+'\n'+html;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['3'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['2'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['16']++;res=this._resolveWinDoc();__cov_btK7VK24tT3fXwzek1iwcw.s['17']++;if(html){__cov_btK7VK24tT3fXwzek1iwcw.b['4'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['18']++;res.doc.open();__cov_btK7VK24tT3fXwzek1iwcw.s['19']++;res.doc.write(html);__cov_btK7VK24tT3fXwzek1iwcw.s['20']++;res.doc.close();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['4'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['21']++;if(!res.doc.documentElement){__cov_btK7VK24tT3fXwzek1iwcw.b['5'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['22']++;timer=Y.later(1,this,function(){__cov_btK7VK24tT3fXwzek1iwcw.f['4']++;__cov_btK7VK24tT3fXwzek1iwcw.s['23']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['7'][0]++,res.doc)&&(__cov_btK7VK24tT3fXwzek1iwcw.b['7'][1]++,res.doc.documentElement)){__cov_btK7VK24tT3fXwzek1iwcw.b['6'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['24']++;cb(res);__cov_btK7VK24tT3fXwzek1iwcw.s['25']++;timer.cancel();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['6'][1]++;}},null,true);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['5'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['26']++;cb(res);}},_resolveWinDoc:function(c){__cov_btK7VK24tT3fXwzek1iwcw.f['5']++;__cov_btK7VK24tT3fXwzek1iwcw.s['27']++;var config=c?(__cov_btK7VK24tT3fXwzek1iwcw.b['8'][0]++,c):(__cov_btK7VK24tT3fXwzek1iwcw.b['8'][1]++,{});__cov_btK7VK24tT3fXwzek1iwcw.s['28']++;config.win=Y.Node.getDOMNode(this._iframe.get('contentWindow'));__cov_btK7VK24tT3fXwzek1iwcw.s['29']++;config.doc=Y.Node.getDOMNode(this._iframe.get('contentWindow.document'));__cov_btK7VK24tT3fXwzek1iwcw.s['30']++;if(!config.doc){__cov_btK7VK24tT3fXwzek1iwcw.b['9'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['31']++;config.doc=Y.config.doc;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['9'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['32']++;if(!config.win){__cov_btK7VK24tT3fXwzek1iwcw.b['10'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['33']++;config.win=Y.config.win;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['10'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['34']++;return config;},_onDomEvent:function(e){__cov_btK7VK24tT3fXwzek1iwcw.f['6']++;__cov_btK7VK24tT3fXwzek1iwcw.s['35']++;var xy,node;__cov_btK7VK24tT3fXwzek1iwcw.s['36']++;if(!Y.Node.getDOMNode(this._iframe)){__cov_btK7VK24tT3fXwzek1iwcw.b['11'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['37']++;return;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['11'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['38']++;e.frameX=e.frameY=0;__cov_btK7VK24tT3fXwzek1iwcw.s['39']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['13'][0]++,e.pageX>0)||(__cov_btK7VK24tT3fXwzek1iwcw.b['13'][1]++,e.pageY>0)){__cov_btK7VK24tT3fXwzek1iwcw.b['12'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['40']++;if(e.type.substring(0,3)!=='key'){__cov_btK7VK24tT3fXwzek1iwcw.b['14'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['41']++;node=this._instance.one('win');__cov_btK7VK24tT3fXwzek1iwcw.s['42']++;xy=this._iframe.getXY();__cov_btK7VK24tT3fXwzek1iwcw.s['43']++;e.frameX=xy[0]+e.pageX-node.get('scrollLeft');__cov_btK7VK24tT3fXwzek1iwcw.s['44']++;e.frameY=xy[1]+e.pageY-node.get('scrollTop');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['14'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['12'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['45']++;e.frameTarget=e.target;__cov_btK7VK24tT3fXwzek1iwcw.s['46']++;e.frameCurrentTarget=e.currentTarget;__cov_btK7VK24tT3fXwzek1iwcw.s['47']++;e.frameEvent=e;__cov_btK7VK24tT3fXwzek1iwcw.s['48']++;this.fire('dom:'+e.type,e);},initializer:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['7']++;__cov_btK7VK24tT3fXwzek1iwcw.s['49']++;var host=this.get(HOST);__cov_btK7VK24tT3fXwzek1iwcw.s['50']++;if(host){__cov_btK7VK24tT3fXwzek1iwcw.b['15'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['51']++;host.frame=this;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['15'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['52']++;this.publish('ready',{emitFacade:true,defaultFn:this._defReadyFn});},destructor:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['8']++;__cov_btK7VK24tT3fXwzek1iwcw.s['53']++;var inst=this.getInstance();__cov_btK7VK24tT3fXwzek1iwcw.s['54']++;inst.one('doc').detachAll();__cov_btK7VK24tT3fXwzek1iwcw.s['55']++;inst=null;__cov_btK7VK24tT3fXwzek1iwcw.s['56']++;this._iframe.remove();},_DOMPaste:function(e){__cov_btK7VK24tT3fXwzek1iwcw.f['9']++;__cov_btK7VK24tT3fXwzek1iwcw.s['57']++;var inst=this.getInstance(),data='',win=inst.config.win;__cov_btK7VK24tT3fXwzek1iwcw.s['58']++;if(e._event.originalTarget){__cov_btK7VK24tT3fXwzek1iwcw.b['16'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['59']++;data=e._event.originalTarget;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['16'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['60']++;if(e._event.clipboardData){__cov_btK7VK24tT3fXwzek1iwcw.b['17'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['61']++;data=e._event.clipboardData.getData('Text');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['17'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['62']++;if(win.clipboardData){__cov_btK7VK24tT3fXwzek1iwcw.b['18'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['63']++;data=win.clipboardData.getData('Text');__cov_btK7VK24tT3fXwzek1iwcw.s['64']++;if(data===''){__cov_btK7VK24tT3fXwzek1iwcw.b['19'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['65']++;if(!win.clipboardData.setData('Text',data)){__cov_btK7VK24tT3fXwzek1iwcw.b['20'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['66']++;data=null;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['20'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['19'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['18'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['67']++;e.frameTarget=e.target;__cov_btK7VK24tT3fXwzek1iwcw.s['68']++;e.frameCurrentTarget=e.currentTarget;__cov_btK7VK24tT3fXwzek1iwcw.s['69']++;e.frameEvent=e;__cov_btK7VK24tT3fXwzek1iwcw.s['70']++;if(data){__cov_btK7VK24tT3fXwzek1iwcw.b['21'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['71']++;e.clipboardData={data:data,getData:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['10']++;__cov_btK7VK24tT3fXwzek1iwcw.s['72']++;return data;}};}else{__cov_btK7VK24tT3fXwzek1iwcw.b['21'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['73']++;e.clipboardData=null;}__cov_btK7VK24tT3fXwzek1iwcw.s['74']++;this.fire('dom:paste',e);},_defReadyFn:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['11']++;__cov_btK7VK24tT3fXwzek1iwcw.s['75']++;var inst=this.getInstance();__cov_btK7VK24tT3fXwzek1iwcw.s['76']++;Y.each(Frame.DOM_EVENTS,function(v,k){__cov_btK7VK24tT3fXwzek1iwcw.f['12']++;__cov_btK7VK24tT3fXwzek1iwcw.s['77']++;var fn=Y.bind(this._onDomEvent,this),kfn=(__cov_btK7VK24tT3fXwzek1iwcw.b['23'][0]++,Y.UA.ie)&&(__cov_btK7VK24tT3fXwzek1iwcw.b['23'][1]++,Frame.THROTTLE_TIME>0)?(__cov_btK7VK24tT3fXwzek1iwcw.b['22'][0]++,Y.throttle(fn,Frame.THROTTLE_TIME)):(__cov_btK7VK24tT3fXwzek1iwcw.b['22'][1]++,fn);__cov_btK7VK24tT3fXwzek1iwcw.s['78']++;if(!inst.Node.DOM_EVENTS[k]){__cov_btK7VK24tT3fXwzek1iwcw.b['24'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['79']++;inst.Node.DOM_EVENTS[k]=1;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['24'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['80']++;if(v===1){__cov_btK7VK24tT3fXwzek1iwcw.b['25'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['81']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['27'][0]++,k!=='focus')&&(__cov_btK7VK24tT3fXwzek1iwcw.b['27'][1]++,k!=='blur')&&(__cov_btK7VK24tT3fXwzek1iwcw.b['27'][2]++,k!=='paste')){__cov_btK7VK24tT3fXwzek1iwcw.b['26'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['82']++;if(k.substring(0,3)==='key'){__cov_btK7VK24tT3fXwzek1iwcw.b['28'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['83']++;inst.on(k,kfn,inst.config.doc);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['28'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['84']++;inst.on(k,fn,inst.config.doc);}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['26'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['25'][1]++;}},this);__cov_btK7VK24tT3fXwzek1iwcw.s['85']++;inst.Node.DOM_EVENTS.paste=1;__cov_btK7VK24tT3fXwzek1iwcw.s['86']++;inst.on('paste',Y.bind(this._DOMPaste,this),inst.one('body'));__cov_btK7VK24tT3fXwzek1iwcw.s['87']++;inst.on('focus',Y.bind(this._onDomEvent,this),inst.config.win);__cov_btK7VK24tT3fXwzek1iwcw.s['88']++;inst.on('blur',Y.bind(this._onDomEvent,this),inst.config.win);__cov_btK7VK24tT3fXwzek1iwcw.s['89']++;inst.__use=inst.use;__cov_btK7VK24tT3fXwzek1iwcw.s['90']++;inst.use=Y.bind(this.use,this);__cov_btK7VK24tT3fXwzek1iwcw.s['91']++;this._iframe.setStyles({visibility:'inherit'});__cov_btK7VK24tT3fXwzek1iwcw.s['92']++;inst.one('body').setStyle('display','block');},_fixIECursors:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['13']++;__cov_btK7VK24tT3fXwzek1iwcw.s['93']++;var inst=this.getInstance(),tables=inst.all('table'),brs=inst.all('br'),si;__cov_btK7VK24tT3fXwzek1iwcw.s['94']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['30'][0]++,tables.size())&&(__cov_btK7VK24tT3fXwzek1iwcw.b['30'][1]++,brs.size())){__cov_btK7VK24tT3fXwzek1iwcw.b['29'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['95']++;si=tables.item(0).get('sourceIndex');__cov_btK7VK24tT3fXwzek1iwcw.s['96']++;brs.each(function(n){__cov_btK7VK24tT3fXwzek1iwcw.f['14']++;__cov_btK7VK24tT3fXwzek1iwcw.s['97']++;var p=n.get('parentNode'),c=p.get('children'),b=p.all('>br');__cov_btK7VK24tT3fXwzek1iwcw.s['98']++;if(p.test('div')){__cov_btK7VK24tT3fXwzek1iwcw.b['31'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['99']++;if(c.size()>2){__cov_btK7VK24tT3fXwzek1iwcw.b['32'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['100']++;n.replace(inst.Node.create(''));}else{__cov_btK7VK24tT3fXwzek1iwcw.b['32'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['101']++;if(n.get('sourceIndex')>si){__cov_btK7VK24tT3fXwzek1iwcw.b['33'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['102']++;if(b.size()){__cov_btK7VK24tT3fXwzek1iwcw.b['34'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['103']++;n.replace(inst.Node.create(''));}else{__cov_btK7VK24tT3fXwzek1iwcw.b['34'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['33'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['104']++;if(b.size()>1){__cov_btK7VK24tT3fXwzek1iwcw.b['35'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['105']++;n.replace(inst.Node.create(''));}else{__cov_btK7VK24tT3fXwzek1iwcw.b['35'][1]++;}}}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['31'][1]++;}});}else{__cov_btK7VK24tT3fXwzek1iwcw.b['29'][1]++;}},_onContentReady:function(e){__cov_btK7VK24tT3fXwzek1iwcw.f['15']++;__cov_btK7VK24tT3fXwzek1iwcw.s['106']++;if(!this._ready){__cov_btK7VK24tT3fXwzek1iwcw.b['36'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['107']++;this._ready=true;__cov_btK7VK24tT3fXwzek1iwcw.s['108']++;var inst=this.getInstance(),args=Y.clone(this.get('use'));__cov_btK7VK24tT3fXwzek1iwcw.s['109']++;this.fire('contentready');__cov_btK7VK24tT3fXwzek1iwcw.s['110']++;if(e){__cov_btK7VK24tT3fXwzek1iwcw.b['37'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['111']++;inst.config.doc=Y.Node.getDOMNode(e.target);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['37'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['112']++;args.push(Y.bind(function(){__cov_btK7VK24tT3fXwzek1iwcw.f['16']++;__cov_btK7VK24tT3fXwzek1iwcw.s['113']++;if(inst.EditorSelection){__cov_btK7VK24tT3fXwzek1iwcw.b['38'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['114']++;inst.EditorSelection.DEFAULT_BLOCK_TAG=this.get('defaultblock');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['38'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['115']++;if(this.get('designMode')){__cov_btK7VK24tT3fXwzek1iwcw.b['39'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['116']++;if(Y.UA.ie){__cov_btK7VK24tT3fXwzek1iwcw.b['40'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['117']++;inst.config.doc.body.contentEditable='true';__cov_btK7VK24tT3fXwzek1iwcw.s['118']++;this._ieSetBodyHeight();__cov_btK7VK24tT3fXwzek1iwcw.s['119']++;inst.on('keyup',Y.bind(this._ieSetBodyHeight,this),inst.config.doc);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['40'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['120']++;inst.config.doc.designMode='on';}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['39'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['121']++;this.fire('ready');},this));__cov_btK7VK24tT3fXwzek1iwcw.s['122']++;inst.use.apply(inst,args);__cov_btK7VK24tT3fXwzek1iwcw.s['123']++;inst.one('doc').get('documentElement').addClass('yui-js-enabled');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['36'][1]++;}},_ieHeightCounter:null,_ieSetBodyHeight:function(e){__cov_btK7VK24tT3fXwzek1iwcw.f['17']++;__cov_btK7VK24tT3fXwzek1iwcw.s['124']++;if(!this._ieHeightCounter){__cov_btK7VK24tT3fXwzek1iwcw.b['41'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['125']++;this._ieHeightCounter=0;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['41'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['126']++;this._ieHeightCounter++;__cov_btK7VK24tT3fXwzek1iwcw.s['127']++;var run=false,inst,h,bh;__cov_btK7VK24tT3fXwzek1iwcw.s['128']++;if(!e){__cov_btK7VK24tT3fXwzek1iwcw.b['42'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['129']++;run=true;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['42'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['130']++;if(e){__cov_btK7VK24tT3fXwzek1iwcw.b['43'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['131']++;switch(e.keyCode){case 8:__cov_btK7VK24tT3fXwzek1iwcw.b['44'][0]++;case 13:__cov_btK7VK24tT3fXwzek1iwcw.b['44'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['132']++;run=true;__cov_btK7VK24tT3fXwzek1iwcw.s['133']++;break;}__cov_btK7VK24tT3fXwzek1iwcw.s['134']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['46'][0]++,e.ctrlKey)||(__cov_btK7VK24tT3fXwzek1iwcw.b['46'][1]++,e.shiftKey)){__cov_btK7VK24tT3fXwzek1iwcw.b['45'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['135']++;run=true;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['45'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['43'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['136']++;if(run){__cov_btK7VK24tT3fXwzek1iwcw.b['47'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['137']++;try{__cov_btK7VK24tT3fXwzek1iwcw.s['138']++;inst=this.getInstance();__cov_btK7VK24tT3fXwzek1iwcw.s['139']++;h=this._iframe.get('offsetHeight');__cov_btK7VK24tT3fXwzek1iwcw.s['140']++;bh=inst.config.doc.body.scrollHeight;__cov_btK7VK24tT3fXwzek1iwcw.s['141']++;if(h>bh){__cov_btK7VK24tT3fXwzek1iwcw.b['48'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['142']++;h=h-15+'px';__cov_btK7VK24tT3fXwzek1iwcw.s['143']++;inst.config.doc.body.style.height=h;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['48'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['144']++;inst.config.doc.body.style.height='auto';}}catch(e){__cov_btK7VK24tT3fXwzek1iwcw.s['145']++;if(this._ieHeightCounter<100){__cov_btK7VK24tT3fXwzek1iwcw.b['49'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['146']++;Y.later(200,this,this._ieSetBodyHeight);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['49'][1]++;}}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['47'][1]++;}},_resolveBaseHref:function(href){__cov_btK7VK24tT3fXwzek1iwcw.f['18']++;__cov_btK7VK24tT3fXwzek1iwcw.s['147']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['51'][0]++,!href)||(__cov_btK7VK24tT3fXwzek1iwcw.b['51'][1]++,href==='')){__cov_btK7VK24tT3fXwzek1iwcw.b['50'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['148']++;href=Y.config.doc.location.href;__cov_btK7VK24tT3fXwzek1iwcw.s['149']++;if(href.indexOf('?')!==-1){__cov_btK7VK24tT3fXwzek1iwcw.b['52'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['150']++;href=href.substring(0,href.indexOf('?'));}else{__cov_btK7VK24tT3fXwzek1iwcw.b['52'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['151']++;href=href.substring(0,href.lastIndexOf('/'))+'/';}else{__cov_btK7VK24tT3fXwzek1iwcw.b['50'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['152']++;return href;},_getHTML:function(html){__cov_btK7VK24tT3fXwzek1iwcw.f['19']++;__cov_btK7VK24tT3fXwzek1iwcw.s['153']++;if(this._ready){__cov_btK7VK24tT3fXwzek1iwcw.b['53'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['154']++;var inst=this.getInstance();__cov_btK7VK24tT3fXwzek1iwcw.s['155']++;html=inst.one('body').get('innerHTML');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['53'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['156']++;return html;},_setHTML:function(html){__cov_btK7VK24tT3fXwzek1iwcw.f['20']++;__cov_btK7VK24tT3fXwzek1iwcw.s['157']++;if(this._ready){__cov_btK7VK24tT3fXwzek1iwcw.b['54'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['158']++;var inst=this.getInstance();__cov_btK7VK24tT3fXwzek1iwcw.s['159']++;inst.one('body').set('innerHTML',html);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['54'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['160']++;this.once(EVENT_CONTENT_READY,Y.bind(this._setHTML,this,html));}__cov_btK7VK24tT3fXwzek1iwcw.s['161']++;return html;},_getLinkedCSS:function(urls){__cov_btK7VK24tT3fXwzek1iwcw.f['21']++;__cov_btK7VK24tT3fXwzek1iwcw.s['162']++;if(!Y.Lang.isArray(urls)){__cov_btK7VK24tT3fXwzek1iwcw.b['55'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['163']++;urls=[urls];}else{__cov_btK7VK24tT3fXwzek1iwcw.b['55'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['164']++;var str='';__cov_btK7VK24tT3fXwzek1iwcw.s['165']++;if(!this._ready){__cov_btK7VK24tT3fXwzek1iwcw.b['56'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['166']++;Y.each(urls,function(v){__cov_btK7VK24tT3fXwzek1iwcw.f['22']++;__cov_btK7VK24tT3fXwzek1iwcw.s['167']++;if(v){__cov_btK7VK24tT3fXwzek1iwcw.b['57'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['168']++;str+='';}else{__cov_btK7VK24tT3fXwzek1iwcw.b['57'][1]++;}});}else{__cov_btK7VK24tT3fXwzek1iwcw.b['56'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['169']++;str=urls;}__cov_btK7VK24tT3fXwzek1iwcw.s['170']++;return str;},_setLinkedCSS:function(css){__cov_btK7VK24tT3fXwzek1iwcw.f['23']++;__cov_btK7VK24tT3fXwzek1iwcw.s['171']++;if(this._ready){__cov_btK7VK24tT3fXwzek1iwcw.b['58'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['172']++;var inst=this.getInstance();__cov_btK7VK24tT3fXwzek1iwcw.s['173']++;inst.Get.css(css);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['58'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['174']++;return css;},_setExtraCSS:function(css){__cov_btK7VK24tT3fXwzek1iwcw.f['24']++;__cov_btK7VK24tT3fXwzek1iwcw.s['175']++;if(this._ready){__cov_btK7VK24tT3fXwzek1iwcw.b['59'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['176']++;var inst=this.getInstance(),node=inst.one('#extra_css');__cov_btK7VK24tT3fXwzek1iwcw.s['177']++;if(node){__cov_btK7VK24tT3fXwzek1iwcw.b['60'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['178']++;node.remove();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['60'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['179']++;inst.one('head').append('');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['59'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['180']++;this.once(EVENT_CONTENT_READY,Y.bind(this._setExtraCSS,this,css));}__cov_btK7VK24tT3fXwzek1iwcw.s['181']++;return css;},_instanceLoaded:function(inst){__cov_btK7VK24tT3fXwzek1iwcw.f['25']++;__cov_btK7VK24tT3fXwzek1iwcw.s['182']++;this._instance=inst;__cov_btK7VK24tT3fXwzek1iwcw.s['183']++;this._onContentReady();__cov_btK7VK24tT3fXwzek1iwcw.s['184']++;var doc=this._instance.config.doc;__cov_btK7VK24tT3fXwzek1iwcw.s['185']++;if(this.get('designMode')){__cov_btK7VK24tT3fXwzek1iwcw.b['61'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['186']++;if(!Y.UA.ie){__cov_btK7VK24tT3fXwzek1iwcw.b['62'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['187']++;try{__cov_btK7VK24tT3fXwzek1iwcw.s['188']++;doc.execCommand('styleWithCSS',false,false);__cov_btK7VK24tT3fXwzek1iwcw.s['189']++;doc.execCommand('insertbronreturn',false,false);}catch(err){}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['62'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['61'][1]++;}},use:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['26']++;__cov_btK7VK24tT3fXwzek1iwcw.s['190']++;var inst=this.getInstance(),args=Y.Array(arguments),cb=false;__cov_btK7VK24tT3fXwzek1iwcw.s['191']++;if(Y.Lang.isFunction(args[args.length-1])){__cov_btK7VK24tT3fXwzek1iwcw.b['63'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['192']++;cb=args.pop();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['63'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['193']++;if(cb){__cov_btK7VK24tT3fXwzek1iwcw.b['64'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['194']++;args.push(function(){__cov_btK7VK24tT3fXwzek1iwcw.f['27']++;__cov_btK7VK24tT3fXwzek1iwcw.s['195']++;cb.apply(inst,arguments);});}else{__cov_btK7VK24tT3fXwzek1iwcw.b['64'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['196']++;return inst.__use.apply(inst,args);},delegate:function(type,fn,cont,sel){__cov_btK7VK24tT3fXwzek1iwcw.f['28']++;__cov_btK7VK24tT3fXwzek1iwcw.s['197']++;var inst=this.getInstance();__cov_btK7VK24tT3fXwzek1iwcw.s['198']++;if(!inst){__cov_btK7VK24tT3fXwzek1iwcw.b['65'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['199']++;return false;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['65'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['200']++;if(!sel){__cov_btK7VK24tT3fXwzek1iwcw.b['66'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['201']++;sel=cont;__cov_btK7VK24tT3fXwzek1iwcw.s['202']++;cont='body';}else{__cov_btK7VK24tT3fXwzek1iwcw.b['66'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['203']++;return inst.delegate(type,fn,cont,sel);},getInstance:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['29']++;__cov_btK7VK24tT3fXwzek1iwcw.s['204']++;return this._instance;},render:function(node){__cov_btK7VK24tT3fXwzek1iwcw.f['30']++;__cov_btK7VK24tT3fXwzek1iwcw.s['205']++;if(this._rendered){__cov_btK7VK24tT3fXwzek1iwcw.b['67'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['206']++;return this;}else{__cov_btK7VK24tT3fXwzek1iwcw.b['67'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['207']++;this._rendered=true;__cov_btK7VK24tT3fXwzek1iwcw.s['208']++;if(node){__cov_btK7VK24tT3fXwzek1iwcw.b['68'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['209']++;this.set('container',node);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['68'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['210']++;this._create(Y.bind(function(res){__cov_btK7VK24tT3fXwzek1iwcw.f['31']++;__cov_btK7VK24tT3fXwzek1iwcw.s['211']++;var inst,timer,cb=Y.bind(function(i){__cov_btK7VK24tT3fXwzek1iwcw.f['32']++;__cov_btK7VK24tT3fXwzek1iwcw.s['212']++;this._instanceLoaded(i);},this),args=Y.clone(this.get('use')),config={debug:false,win:res.win,doc:res.doc},fn=Y.bind(function(){__cov_btK7VK24tT3fXwzek1iwcw.f['33']++;__cov_btK7VK24tT3fXwzek1iwcw.s['213']++;config=this._resolveWinDoc(config);__cov_btK7VK24tT3fXwzek1iwcw.s['214']++;inst=YUI(config);__cov_btK7VK24tT3fXwzek1iwcw.s['215']++;inst.host=this.get(HOST);__cov_btK7VK24tT3fXwzek1iwcw.s['216']++;try{__cov_btK7VK24tT3fXwzek1iwcw.s['217']++;inst.use('node-base',cb);__cov_btK7VK24tT3fXwzek1iwcw.s['218']++;if(timer){__cov_btK7VK24tT3fXwzek1iwcw.b['69'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['219']++;clearInterval(timer);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['69'][1]++;}}catch(e){__cov_btK7VK24tT3fXwzek1iwcw.s['220']++;timer=setInterval(function(){__cov_btK7VK24tT3fXwzek1iwcw.f['34']++;__cov_btK7VK24tT3fXwzek1iwcw.s['221']++;fn();},350);}},this);__cov_btK7VK24tT3fXwzek1iwcw.s['222']++;args.push(fn);__cov_btK7VK24tT3fXwzek1iwcw.s['223']++;Y.use.apply(Y,args);},this));__cov_btK7VK24tT3fXwzek1iwcw.s['224']++;return this;},_handleFocus:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['35']++;__cov_btK7VK24tT3fXwzek1iwcw.s['225']++;var inst=this.getInstance(),sel=new inst.EditorSelection(),n,c,b,par;__cov_btK7VK24tT3fXwzek1iwcw.s['226']++;if(sel.anchorNode){__cov_btK7VK24tT3fXwzek1iwcw.b['70'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['227']++;n=sel.anchorNode;__cov_btK7VK24tT3fXwzek1iwcw.s['228']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['72'][0]++,n.test('p'))&&(__cov_btK7VK24tT3fXwzek1iwcw.b['72'][1]++,n.get('innerHTML')==='')){__cov_btK7VK24tT3fXwzek1iwcw.b['71'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['229']++;n=n.get('parentNode');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['71'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['230']++;c=n.get('childNodes');__cov_btK7VK24tT3fXwzek1iwcw.s['231']++;if(c.size()){__cov_btK7VK24tT3fXwzek1iwcw.b['73'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['232']++;if(c.item(0).test('br')){__cov_btK7VK24tT3fXwzek1iwcw.b['74'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['233']++;sel.selectNode(n,true,false);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['74'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['234']++;if(c.item(0).test('p')){__cov_btK7VK24tT3fXwzek1iwcw.b['75'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['235']++;n=c.item(0).one('br.yui-cursor');__cov_btK7VK24tT3fXwzek1iwcw.s['236']++;if(n){__cov_btK7VK24tT3fXwzek1iwcw.b['76'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['237']++;n=n.get('parentNode');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['76'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['238']++;if(!n){__cov_btK7VK24tT3fXwzek1iwcw.b['77'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['239']++;n=c.item(0).get('firstChild');}else{__cov_btK7VK24tT3fXwzek1iwcw.b['77'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['240']++;if(!n){__cov_btK7VK24tT3fXwzek1iwcw.b['78'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['241']++;n=c.item(0);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['78'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['242']++;if(n){__cov_btK7VK24tT3fXwzek1iwcw.b['79'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['243']++;sel.selectNode(n,true,false);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['79'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['75'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['244']++;b=inst.one('br.yui-cursor');__cov_btK7VK24tT3fXwzek1iwcw.s['245']++;if(b){__cov_btK7VK24tT3fXwzek1iwcw.b['80'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['246']++;par=b.get('parentNode');__cov_btK7VK24tT3fXwzek1iwcw.s['247']++;if(par){__cov_btK7VK24tT3fXwzek1iwcw.b['81'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['248']++;sel.selectNode(par,true,false);}else{__cov_btK7VK24tT3fXwzek1iwcw.b['81'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['80'][1]++;}}}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['73'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['70'][1]++;}},_validateLinkedCSS:function(value){__cov_btK7VK24tT3fXwzek1iwcw.f['36']++;__cov_btK7VK24tT3fXwzek1iwcw.s['249']++;return(__cov_btK7VK24tT3fXwzek1iwcw.b['82'][0]++,Lang.isString(value))||(__cov_btK7VK24tT3fXwzek1iwcw.b['82'][1]++,Lang.isArray(value));},focus:function(fn){__cov_btK7VK24tT3fXwzek1iwcw.f['37']++;__cov_btK7VK24tT3fXwzek1iwcw.s['250']++;if((__cov_btK7VK24tT3fXwzek1iwcw.b['84'][0]++,Y.UA.ie)&&(__cov_btK7VK24tT3fXwzek1iwcw.b['84'][1]++,Y.UA.ie<9)){__cov_btK7VK24tT3fXwzek1iwcw.b['83'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['251']++;try{__cov_btK7VK24tT3fXwzek1iwcw.s['252']++;Y.one('win').focus();__cov_btK7VK24tT3fXwzek1iwcw.s['253']++;if(this.getInstance()){__cov_btK7VK24tT3fXwzek1iwcw.b['85'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['254']++;if(this.getInstance().one('win')){__cov_btK7VK24tT3fXwzek1iwcw.b['86'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['255']++;this.getInstance().one('win').focus();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['86'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['85'][1]++;}}catch(ierr){}__cov_btK7VK24tT3fXwzek1iwcw.s['256']++;if(fn===true){__cov_btK7VK24tT3fXwzek1iwcw.b['87'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['257']++;this._handleFocus();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['87'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['258']++;if(Y.Lang.isFunction(fn)){__cov_btK7VK24tT3fXwzek1iwcw.b['88'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['259']++;fn();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['88'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['83'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['260']++;try{__cov_btK7VK24tT3fXwzek1iwcw.s['261']++;Y.one('win').focus();__cov_btK7VK24tT3fXwzek1iwcw.s['262']++;Y.later(100,this,function(){__cov_btK7VK24tT3fXwzek1iwcw.f['38']++;__cov_btK7VK24tT3fXwzek1iwcw.s['263']++;if(this.getInstance()){__cov_btK7VK24tT3fXwzek1iwcw.b['89'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['264']++;if(this.getInstance().one('win')){__cov_btK7VK24tT3fXwzek1iwcw.b['90'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['265']++;this.getInstance().one('win').focus();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['90'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['89'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['266']++;if(fn===true){__cov_btK7VK24tT3fXwzek1iwcw.b['91'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['267']++;this._handleFocus();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['91'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['268']++;if(Y.Lang.isFunction(fn)){__cov_btK7VK24tT3fXwzek1iwcw.b['92'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['269']++;fn();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['92'][1]++;}});}catch(ferr){}}__cov_btK7VK24tT3fXwzek1iwcw.s['270']++;return this;},show:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['39']++;__cov_btK7VK24tT3fXwzek1iwcw.s['271']++;this._iframe.setStyles({position:'static',left:''});__cov_btK7VK24tT3fXwzek1iwcw.s['272']++;if(Y.UA.gecko){__cov_btK7VK24tT3fXwzek1iwcw.b['93'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['273']++;try{__cov_btK7VK24tT3fXwzek1iwcw.s['274']++;if(this.getInstance()){__cov_btK7VK24tT3fXwzek1iwcw.b['94'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['275']++;this.getInstance().config.doc.designMode='on';}else{__cov_btK7VK24tT3fXwzek1iwcw.b['94'][1]++;}}catch(e){}__cov_btK7VK24tT3fXwzek1iwcw.s['276']++;this.focus();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['93'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['277']++;return this;},hide:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['40']++;__cov_btK7VK24tT3fXwzek1iwcw.s['278']++;this._iframe.setStyles({position:'absolute',left:'-999999px'});__cov_btK7VK24tT3fXwzek1iwcw.s['279']++;return this;}},{THROTTLE_TIME:100,DOM_EVENTS:{dblclick:1,click:1,paste:1,mouseup:1,mousedown:1,keyup:1,keydown:1,keypress:1,activate:1,deactivate:1,beforedeactivate:1,focusin:1,focusout:1},DEFAULT_CSS:'body { background-color: #fff; font: 13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a, a:visited, a:hover { color: blue !important; text-decoration: underline !important; cursor: text !important; } img { cursor: pointer !important; border: none; }',IFRAME_ATTRS:{border:'0',frameBorder:'0',marginWidth:'0',marginHeight:'0',leftMargin:'0',topMargin:'0',allowTransparency:'true',width:'100%',height:'99%'},PAGE_HTML:'{TITLE}{META}{LINKED_CSS}{EXTRA_CSS}{CONTENT}',getDocType:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['41']++;__cov_btK7VK24tT3fXwzek1iwcw.s['280']++;var dt=Y.config.doc.doctype,str=Frame.DOC_TYPE;__cov_btK7VK24tT3fXwzek1iwcw.s['281']++;if(dt){__cov_btK7VK24tT3fXwzek1iwcw.b['95'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['282']++;str='';}else{__cov_btK7VK24tT3fXwzek1iwcw.b['95'][1]++;__cov_btK7VK24tT3fXwzek1iwcw.s['283']++;if(Y.config.doc.all){__cov_btK7VK24tT3fXwzek1iwcw.b['98'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['284']++;dt=Y.config.doc.all[0];__cov_btK7VK24tT3fXwzek1iwcw.s['285']++;if(dt.nodeType){__cov_btK7VK24tT3fXwzek1iwcw.b['99'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['286']++;if(dt.nodeType===8){__cov_btK7VK24tT3fXwzek1iwcw.b['100'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['287']++;if(dt.nodeValue){__cov_btK7VK24tT3fXwzek1iwcw.b['101'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['288']++;if(dt.nodeValue.toLowerCase().indexOf('doctype')!==-1){__cov_btK7VK24tT3fXwzek1iwcw.b['102'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['289']++;str='';}else{__cov_btK7VK24tT3fXwzek1iwcw.b['102'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['101'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['100'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['99'][1]++;}}else{__cov_btK7VK24tT3fXwzek1iwcw.b['98'][1]++;}}__cov_btK7VK24tT3fXwzek1iwcw.s['290']++;return str;},DOC_TYPE:'',META:'',NAME:'frame',NS:'frame',ATTRS:{title:{value:'Blank Page'},dir:{value:'ltr'},lang:{value:'en-US'},src:{value:'javascript'+(Y.UA.ie?(__cov_btK7VK24tT3fXwzek1iwcw.b['103'][0]++,':false'):(__cov_btK7VK24tT3fXwzek1iwcw.b['103'][1]++,':'))+';'},designMode:{writeOnce:true,value:false},content:{validator:Lang.isString,value:'
',setter:'_setHTML',getter:'_getHTML'},basehref:{value:false,getter:'_resolveBaseHref'},use:{writeOnce:true,value:['node','node-style','selector-css3']},container:{value:'body',setter:function(n){__cov_btK7VK24tT3fXwzek1iwcw.f['42']++;__cov_btK7VK24tT3fXwzek1iwcw.s['291']++;return Y.one(n);}},node:{readOnly:true,value:null,getter:function(){__cov_btK7VK24tT3fXwzek1iwcw.f['43']++;__cov_btK7VK24tT3fXwzek1iwcw.s['292']++;return this._iframe;}},id:{writeOnce:true,getter:function(id){__cov_btK7VK24tT3fXwzek1iwcw.f['44']++;__cov_btK7VK24tT3fXwzek1iwcw.s['293']++;if(!id){__cov_btK7VK24tT3fXwzek1iwcw.b['104'][0]++;__cov_btK7VK24tT3fXwzek1iwcw.s['294']++;id='iframe-'+Y.guid();}else{__cov_btK7VK24tT3fXwzek1iwcw.b['104'][1]++;}__cov_btK7VK24tT3fXwzek1iwcw.s['295']++;return id;}},linkedcss:{validator:'_validateLinkedCSS',getter:'_getLinkedCSS',setter:'_setLinkedCSS'},extracss:{validator:Lang.isString,setter:'_setExtraCSS'},defaultblock:{value:'p'}}});__cov_btK7VK24tT3fXwzek1iwcw.s['296']++;Y.namespace('Plugin');__cov_btK7VK24tT3fXwzek1iwcw.s['297']++;Y.Plugin.Frame=Frame;__cov_btK7VK24tT3fXwzek1iwcw.s['298']++;Y.Frame=Frame;},'3.17.2',{'requires':['base','node','plugin','selector-css3','yui-throttle']}); diff --git a/design/standard/lib/yui/3.17.2/build/frame/frame-debug.js b/design/standard/lib/yui/3.17.2/build/frame/frame-debug.js new file mode 100644 index 0000000..cb5eb02 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/frame/frame-debug.js @@ -0,0 +1,1083 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('frame', function (Y, NAME) { + + /*jshint maxlen: 500 */ + /** + * Creates a wrapper around an iframe. It loads the content either from a local + * file or from script and creates a local YUI instance bound to that new window and document. + * @class Frame + * @for Frame + * @extends Base + * @constructor + * @module editor + * @submodule frame + */ + + var Lang = Y.Lang, + + EVENT_CONTENT_READY = 'contentready', + + HOST = 'host', + + Frame = function() { + Frame.superclass.constructor.apply(this, arguments); + }; + + + Y.extend(Frame, Y.Plugin.Base, { + /** + * @private + * @property _ready + * @description Internal reference set when the content is ready. + * @type Boolean + */ + _ready: null, + /** + * @private + * @property _rendered + * @description Internal reference set when render is called. + * @type Boolean + */ + _rendered: null, + /** + * @private + * @property _iframe + * @description Internal Node reference to the iFrame or the window + * @type Node + */ + _iframe: null, + /** + * @private + * @property _instance + * @description Internal reference to the YUI instance bound to the iFrame or window + * @type YUI + */ + _instance: null, + /** + * @private + * @method _create + * @description Create the iframe or Window and get references to the Document & Window + * @return {Object} Hash table containing references to the new Document & Window + */ + _create: function(cb) { + var res, html = '', timer, + //if the src attr is different than the default, don't create the document + create = (this.get('src') === Frame.ATTRS.src.value), + extra_css = ((this.get('extracss')) ? '' : ''); + + this._iframe = Y.one(Y.config.doc.createElement('iframe')); + this._iframe.setAttrs(Frame.IFRAME_ATTRS); + + this._iframe.setStyle('visibility', 'hidden'); + this._iframe.set('src', this.get('src')); + this.get('container').append(this._iframe); + this._iframe.set('height', '99%'); + + if (create) { + Y.log('Creating the document from javascript', 'info', 'frame'); + html = Y.Lang.sub(Frame.PAGE_HTML, { + DIR: this.get('dir'), + LANG: this.get('lang'), + TITLE: this.get('title'), + META: Frame.META, + LINKED_CSS: this.get('linkedcss'), + CONTENT: this.get('content'), + BASE_HREF: this.get('basehref'), + DEFAULT_CSS: Frame.DEFAULT_CSS, + EXTRA_CSS: extra_css + }); + if (Y.config.doc.compatMode !== 'BackCompat') { + Y.log('Adding Doctype to frame: ' + Frame.getDocType(), 'info', 'frame'); + + //html = Frame.DOC_TYPE + "\n" + html; + html = Frame.getDocType() + "\n" + html; + } else { + Y.log('DocType skipped because we are in BackCompat Mode.', 'warn', 'frame'); + } + + Y.log('Injecting content into iframe', 'info', 'frame'); + } + + res = this._resolveWinDoc(); + + if (html) { + Y.log('Writing HTML to new document', 'info', 'frame'); + res.doc.open(); + res.doc.write(html); + res.doc.close(); + } + + if (!res.doc.documentElement) { + Y.log('document.documentElement was not found, running timer', 'warn', 'frame'); + timer = Y.later(1, this, function() { + if (res.doc && res.doc.documentElement) { + Y.log('document.documentElement found inside timer', 'info', 'frame'); + cb(res); + timer.cancel(); + } + }, null, true); + } else { + Y.log('document.documentElement found', 'info', 'frame'); + cb(res); + } + + }, + /** + * @private + * @method _resolveWinDoc + * @description Resolves the document and window from an iframe or window instance + * @param {Object} c The YUI Config to add the window and document to + * @return {Object} Object hash of window and document references, if a YUI config was passed, it is returned. + */ + _resolveWinDoc: function(c) { + var config = (c) ? c : {}; + config.win = Y.Node.getDOMNode(this._iframe.get('contentWindow')); + config.doc = Y.Node.getDOMNode(this._iframe.get('contentWindow.document')); + if (!config.doc) { + config.doc = Y.config.doc; + } + if (!config.win) { + config.win = Y.config.win; + } + return config; + }, + /** + * @private + * @method _onDomEvent + * @description Generic handler for all DOM events fired by the iframe or window. This handler + * takes the current EventFacade and augments it to fire on the Frame host. It adds two new properties + * to the EventFacade called frameX and frameY which adds the scroll and xy position of the iframe + * to the original pageX and pageY of the event so external nodes can be positioned over the frame. + * @param {EventFacade} e + */ + _onDomEvent: function(e) { + var xy, node; + + if (!Y.Node.getDOMNode(this._iframe)) { + //The iframe is null for some reason, bail on sending events. + return; + } + + //Y.log('onDOMEvent: ' + e.type, 'info', 'frame'); + e.frameX = e.frameY = 0; + + if (e.pageX > 0 || e.pageY > 0) { + if (e.type.substring(0, 3) !== 'key') { + node = this._instance.one('win'); + xy = this._iframe.getXY(); + e.frameX = xy[0] + e.pageX - node.get('scrollLeft'); + e.frameY = xy[1] + e.pageY - node.get('scrollTop'); + } + } + + e.frameTarget = e.target; + e.frameCurrentTarget = e.currentTarget; + e.frameEvent = e; + + this.fire('dom:' + e.type, e); + }, + initializer: function() { + var host = this.get(HOST); + + if (host) { + host.frame = this; + } + + this.publish('ready', { + emitFacade: true, + defaultFn: this._defReadyFn + }); + }, + destructor: function() { + var inst = this.getInstance(); + + inst.one('doc').detachAll(); + inst = null; + this._iframe.remove(); + }, + /** + * @private + * @method _DOMPaste + * @description Simple pass thru handler for the paste event so we can do content cleanup + * @param {EventFacade} e + */ + _DOMPaste: function(e) { + var inst = this.getInstance(), + data = '', win = inst.config.win; + + if (e._event.originalTarget) { + data = e._event.originalTarget; + } + if (e._event.clipboardData) { + data = e._event.clipboardData.getData('Text'); + } + + if (win.clipboardData) { + data = win.clipboardData.getData('Text'); + if (data === '') { // Could be empty, or failed + // Verify failure + if (!win.clipboardData.setData('Text', data)) { + data = null; + } + } + } + + + e.frameTarget = e.target; + e.frameCurrentTarget = e.currentTarget; + e.frameEvent = e; + + if (data) { + e.clipboardData = { + data: data, + getData: function() { + return data; + } + }; + } else { + Y.log('Failed to collect clipboard data', 'warn', 'frame'); + e.clipboardData = null; + } + + this.fire('dom:paste', e); + }, + /** + * @private + * @method _defReadyFn + * @description Binds DOM events, sets the iframe to visible and fires the ready event + */ + _defReadyFn: function() { + var inst = this.getInstance(); + + Y.each(Frame.DOM_EVENTS, function(v, k) { + var fn = Y.bind(this._onDomEvent, this), + kfn = ((Y.UA.ie && Frame.THROTTLE_TIME > 0) ? Y.throttle(fn, Frame.THROTTLE_TIME) : fn); + + if (!inst.Node.DOM_EVENTS[k]) { + inst.Node.DOM_EVENTS[k] = 1; + } + if (v === 1) { + if (k !== 'focus' && k !== 'blur' && k !== 'paste') { + //Y.log('Adding DOM event to frame: ' + k, 'info', 'frame'); + if (k.substring(0, 3) === 'key') { + //Throttle key events in IE + inst.on(k, kfn, inst.config.doc); + } else { + inst.on(k, fn, inst.config.doc); + } + } + } + }, this); + + inst.Node.DOM_EVENTS.paste = 1; + + inst.on('paste', Y.bind(this._DOMPaste, this), inst.one('body')); + + //Adding focus/blur to the window object + inst.on('focus', Y.bind(this._onDomEvent, this), inst.config.win); + inst.on('blur', Y.bind(this._onDomEvent, this), inst.config.win); + + inst.__use = inst.use; + inst.use = Y.bind(this.use, this); + this._iframe.setStyles({ + visibility: 'inherit' + }); + inst.one('body').setStyle('display', 'block'); + }, + /** + * It appears that having a BR tag anywhere in the source "below" a table with a percentage width (in IE 7 & 8) + * if there is any TEXTINPUT's outside the iframe, the cursor will rapidly flickr and the CPU would occasionally + * spike. This method finds all
's below the sourceIndex of the first table. Does some checks to see if they + * can be modified and replaces then with a so the layout will remain in tact, but the flickering will + * no longer happen. + * @method _fixIECursors + * @private + */ + _fixIECursors: function() { + var inst = this.getInstance(), + tables = inst.all('table'), + brs = inst.all('br'), si; + + if (tables.size() && brs.size()) { + //First Table + si = tables.item(0).get('sourceIndex'); + brs.each(function(n) { + var p = n.get('parentNode'), + c = p.get('children'), b = p.all('>br'); + + if (p.test('div')) { + if (c.size() > 2) { + n.replace(inst.Node.create('')); + } else { + if (n.get('sourceIndex') > si) { + if (b.size()) { + n.replace(inst.Node.create('')); + } + } else { + if (b.size() > 1) { + n.replace(inst.Node.create('')); + } + } + } + } + + }); + } + }, + /** + * @private + * @method _onContentReady + * @description Called once the content is available in the frame/window and calls the final use call + * on the internal instance so that the modules are loaded properly. + */ + _onContentReady: function(e) { + if (!this._ready) { + this._ready = true; + var inst = this.getInstance(), + args = Y.clone(this.get('use')); + + this.fire('contentready'); + + Y.log('On available for body of iframe', 'info', 'frame'); + if (e) { + inst.config.doc = Y.Node.getDOMNode(e.target); + } + //TODO Circle around and deal with CSS loading... + args.push(Y.bind(function() { + Y.log('Callback from final internal use call', 'info', 'frame'); + if (inst.EditorSelection) { + inst.EditorSelection.DEFAULT_BLOCK_TAG = this.get('defaultblock'); + } + //Moved to here so that the iframe is ready before allowing editing.. + if (this.get('designMode')) { + if(Y.UA.ie) { + inst.config.doc.body.contentEditable = 'true'; + this._ieSetBodyHeight(); + inst.on('keyup', Y.bind(this._ieSetBodyHeight, this), inst.config.doc); + } else { + inst.config.doc.designMode = 'on'; + } + } + this.fire('ready'); + }, this)); + Y.log('Calling use on internal instance: ' + args, 'info', 'frame'); + inst.use.apply(inst, args); + + inst.one('doc').get('documentElement').addClass('yui-js-enabled'); + } + }, + _ieHeightCounter: null, + /** + * Internal method to set the height of the body to the height of the document in IE. + * With contenteditable being set, the document becomes unresponsive to clicks, this + * method expands the body to be the height of the document so that doesn't happen. + * @private + * @method _ieSetBodyHeight + */ + _ieSetBodyHeight: function(e) { + if (!this._ieHeightCounter) { + this._ieHeightCounter = 0; + } + this._ieHeightCounter++; + var run = false, inst, h, bh; + if (!e) { + run = true; + } + if (e) { + switch (e.keyCode) { + case 8: + case 13: + run = true; + break; + } + if (e.ctrlKey || e.shiftKey) { + run = true; + } + } + if (run) { + try { + inst = this.getInstance(); + h = this._iframe.get('offsetHeight'); + bh = inst.config.doc.body.scrollHeight; + if (h > bh) { + h = (h - 15) + 'px'; + inst.config.doc.body.style.height = h; + } else { + inst.config.doc.body.style.height = 'auto'; + } + } catch (e) { + if (this._ieHeightCounter < 100) { + Y.later(200, this, this._ieSetBodyHeight); + } else { + Y.log('Failed to set body height in IE', 'error', 'frame'); + } + } + } + }, + /** + * @private + * @method _resolveBaseHref + * @description Resolves the basehref of the page the frame is created on. Only applies to dynamic content. + * @param {String} href The new value to use, if empty it will be resolved from the current url. + * @return {String} + */ + _resolveBaseHref: function(href) { + if (!href || href === '') { + href = Y.config.doc.location.href; + if (href.indexOf('?') !== -1) { //Remove the query string + href = href.substring(0, href.indexOf('?')); + } + href = href.substring(0, href.lastIndexOf('/')) + '/'; + } + return href; + }, + /** + * @private + * @method _getHTML + * @description Get the content from the iframe + * @param {String} html The raw HTML from the body of the iframe. + * @return {String} + */ + _getHTML: function(html) { + if (this._ready) { + var inst = this.getInstance(); + html = inst.one('body').get('innerHTML'); + } + return html; + }, + /** + * @private + * @method _setHTML + * @description Set the content of the iframe + * @param {String} html The raw HTML to set the body of the iframe to. + * @return {String} + */ + _setHTML: function(html) { + if (this._ready) { + var inst = this.getInstance(); + inst.one('body').set('innerHTML', html); + } else { + this.once(EVENT_CONTENT_READY, Y.bind(this._setHTML, this, html)); + } + + return html; + }, + /** + * @private + * @method _getLinkedCSS + * @description Get the linked CSS on the instance. + */ + _getLinkedCSS: function(urls) { + if (!Y.Lang.isArray(urls)) { + urls = [urls]; + } + var str = ''; + if (!this._ready) { + Y.each(urls, function(v) { + if (v) { + str += ''; + } + }); + } else { + str = urls; + } + return str; + }, + /** + * @private + * @method _setLinkedCSS + * @description Sets the linked CSS on the instance.. + */ + _setLinkedCSS: function(css) { + if (this._ready) { + var inst = this.getInstance(); + inst.Get.css(css); + } + return css; + }, + /** + * @private + * @method _setExtraCSS + * @description Set's the extra CSS on the instance.. + */ + _setExtraCSS: function(css) { + if (this._ready) { + var inst = this.getInstance(), + node = inst.one('#extra_css'); + + if (node) { + node.remove(); + } + + inst.one('head').append(''); + } else { + //This needs to be wrapped in a contentready callback for the !_ready state + this.once(EVENT_CONTENT_READY, Y.bind(this._setExtraCSS, this, css)); + } + + return css; + }, + /** + * @private + * @method _instanceLoaded + * @description Called from the first YUI instance that sets up the internal instance. + * This loads the content into the window/frame and attaches the contentready event. + * @param {YUI} inst The internal YUI instance bound to the frame/window + */ + _instanceLoaded: function(inst) { + this._instance = inst; + this._onContentReady(); + + var doc = this._instance.config.doc; + + if (this.get('designMode')) { + if (!Y.UA.ie) { + try { + //Force other browsers into non CSS styling + doc.execCommand('styleWithCSS', false, false); + doc.execCommand('insertbronreturn', false, false); + } catch (err) {} + } + } + }, + //BEGIN PUBLIC METHODS + /** + * @method use + * @description This is a scoped version of the normal YUI.use method & is bound to this frame/window. + * At setup, the inst.use method is mapped to this method. + */ + use: function() { + Y.log('Calling augmented use after ready', 'info', 'frame'); + var inst = this.getInstance(), + args = Y.Array(arguments), + cb = false; + + if (Y.Lang.isFunction(args[args.length - 1])) { + cb = args.pop(); + } + if (cb) { + args.push(function() { + Y.log('Internal callback from augmented use', 'info', 'frame'); + cb.apply(inst, arguments); + + }); + } + + return inst.__use.apply(inst, args); + }, + /** + * @method delegate + * @description A delegate method passed to the instance's delegate method + * @param {String} type The type of event to listen for + * @param {Function} fn The method to attach + * @param {String} cont The container to act as a delegate, if no "sel" passed, the body is assumed as the container. + * @param {String} sel The selector to match in the event (optional) + * @return {EventHandle} The Event handle returned from Y.delegate + */ + delegate: function(type, fn, cont, sel) { + var inst = this.getInstance(); + if (!inst) { + Y.log('Delegate events can not be attached until after the ready event has fired.', 'error', 'iframe'); + return false; + } + if (!sel) { + sel = cont; + cont = 'body'; + } + return inst.delegate(type, fn, cont, sel); + }, + /** + * @method getInstance + * @description Get a reference to the internal YUI instance. + * @return {YUI} The internal YUI instance + */ + getInstance: function() { + return this._instance; + }, + /** + * @method render + * @description Render the iframe into the container config option or open the window. + * @param {String/HTMLElement/Node} node The node to render to + * @return {Frame} + * @chainable + */ + render: function(node) { + if (this._rendered) { + Y.log('Frame already rendered.', 'warn', 'frame'); + return this; + } + this._rendered = true; + if (node) { + this.set('container', node); + } + + this._create(Y.bind(function(res) { + + var inst, timer, + cb = Y.bind(function(i) { + Y.log('Internal instance loaded with node-base', 'info', 'frame'); + this._instanceLoaded(i); + }, this), + args = Y.clone(this.get('use')), + config = { + debug: false, + win: res.win, + doc: res.doc + }, + fn = Y.bind(function() { + Y.log('New Modules Loaded into main instance', 'info', 'frame'); + config = this._resolveWinDoc(config); + inst = YUI(config); + inst.host = this.get(HOST); //Cross reference to Editor + inst.log = Y.log; //Dump the instance logs to the parent instance. + + Y.log('Creating new internal instance with node-base only', 'info', 'frame'); + try { + inst.use('node-base', cb); + if (timer) { + clearInterval(timer); + } + } catch (e) { + timer = setInterval(function() { + Y.log('[TIMER] Internal use call failed, retrying', 'info', 'frame'); + fn(); + }, 350); + Y.log('Internal use call failed, retrying', 'info', 'frame'); + } + }, this); + + args.push(fn); + + Y.log('Adding new modules to main instance: ' + args, 'info', 'frame'); + Y.use.apply(Y, args); + + }, this)); + + return this; + }, + /** + * @private + * @method _handleFocus + * @description Does some tricks on focus to set the proper cursor position. + */ + _handleFocus: function() { + var inst = this.getInstance(), + sel = new inst.EditorSelection(), + n, c, b, par; + + if (sel.anchorNode) { + Y.log('_handleFocus being called..', 'info', 'frame'); + n = sel.anchorNode; + + if (n.test('p') && n.get('innerHTML') === '') { + n = n.get('parentNode'); + } + c = n.get('childNodes'); + + if (c.size()) { + if (c.item(0).test('br')) { + sel.selectNode(n, true, false); + } else if (c.item(0).test('p')) { + n = c.item(0).one('br.yui-cursor'); + if (n) { + n = n.get('parentNode'); + } + if (!n) { + n = c.item(0).get('firstChild'); + } + if (!n) { + n = c.item(0); + } + if (n) { + sel.selectNode(n, true, false); + } + } else { + b = inst.one('br.yui-cursor'); + if (b) { + par = b.get('parentNode'); + if (par) { + sel.selectNode(par, true, false); + } + } + } + } + } + }, + /** + * Validates linkedcss property + * + * @method _validateLinkedCSS + * @private + */ + _validateLinkedCSS: function(value) { + return Lang.isString(value) || Lang.isArray(value); + }, + /** + * @method focus + * @description Set the focus to the iframe + * @param {Function} fn Callback function to execute after focus happens + * @return {Frame} + * @chainable + */ + focus: function(fn) { + if (Y.UA.ie && Y.UA.ie < 9) { + try { + Y.one('win').focus(); + if (this.getInstance()) { + if (this.getInstance().one('win')) { + this.getInstance().one('win').focus(); + } + } + } catch (ierr) { + Y.log('Frame focus failed', 'warn', 'frame'); + } + if (fn === true) { + this._handleFocus(); + } + if (Y.Lang.isFunction(fn)) { + fn(); + } + } else { + try { + Y.one('win').focus(); + Y.later(100, this, function() { + if (this.getInstance()) { + if (this.getInstance().one('win')) { + this.getInstance().one('win').focus(); + } + } + if (fn === true) { + this._handleFocus(); + } + if (Y.Lang.isFunction(fn)) { + fn(); + } + }); + } catch (ferr) { + Y.log('Frame focus failed', 'warn', 'frame'); + } + } + return this; + }, + /** + * @method show + * @description Show the iframe instance + * @return {Frame} + * @chainable + */ + show: function() { + this._iframe.setStyles({ + position: 'static', + left: '' + }); + if (Y.UA.gecko) { + try { + if (this.getInstance()) { + this.getInstance().config.doc.designMode = 'on'; + } + } catch (e) { } + this.focus(); + } + return this; + }, + /** + * @method hide + * @description Hide the iframe instance + * @return {Frame} + * @chainable + */ + hide: function() { + this._iframe.setStyles({ + position: 'absolute', + left: '-999999px' + }); + return this; + } + }, { + /** + * @static + * @property THROTTLE_TIME + * @description The throttle time for key events in IE + * @type Number + * @default 100 + */ + THROTTLE_TIME: 100, + /** + * @static + * @property DOM_EVENTS + * @description The DomEvents that the frame automatically attaches and bubbles + * @type Object + */ + DOM_EVENTS: { + dblclick: 1, + click: 1, + paste: 1, + mouseup: 1, + mousedown: 1, + keyup: 1, + keydown: 1, + keypress: 1, + activate: 1, + deactivate: 1, + beforedeactivate: 1, + focusin: 1, + focusout: 1 + }, + + /** + * @static + * @property DEFAULT_CSS + * @description The default css used when creating the document. + * @type String + */ + DEFAULT_CSS: 'body { background-color: #fff; font: 13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a, a:visited, a:hover { color: blue !important; text-decoration: underline !important; cursor: text !important; } img { cursor: pointer !important; border: none; }', + /** + * The template string used to create the iframe, deprecated to use DOM instead of innerHTML + * @static + * @property HTML + * @type String + * @deprecated + */ + //HTML: '', + /** + * Attributes to auto add to the dynamic iframe under the hood + * @static + * @property IFRAME_ATTRS + * @type Object + */ + IFRAME_ATTRS: { + border: '0', + frameBorder: '0', + marginWidth: '0', + marginHeight: '0', + leftMargin: '0', + topMargin: '0', + allowTransparency: 'true', + width: "100%", + height: "99%" + }, + /** + * @static + * @property PAGE_HTML + * @description The template used to create the page when created dynamically. + * @type String + */ + PAGE_HTML: '{TITLE}{META}{LINKED_CSS}{EXTRA_CSS}{CONTENT}', + + /** + * @static + * @method getDocType + * @description Parses document.doctype and generates a DocType to match the parent page, if supported. + * For IE8, it grabs document.all[0].nodeValue and uses that. For IE < 8, it falls back to Frame.DOC_TYPE. + * @return {String} The normalized DocType to apply to the iframe + */ + getDocType: function() { + var dt = Y.config.doc.doctype, + str = Frame.DOC_TYPE; + + if (dt) { + str = ''; + } else { + if (Y.config.doc.all) { + dt = Y.config.doc.all[0]; + if (dt.nodeType) { + if (dt.nodeType === 8) { + if (dt.nodeValue) { + if (dt.nodeValue.toLowerCase().indexOf('doctype') !== -1) { + str = ''; + } + } + } + } + } + } + return str; + }, + /** + * @static + * @property DOC_TYPE + * @description The DOCTYPE to prepend to the new document when created. Should match the one on the page being served. + * @type String + */ + DOC_TYPE: '', + /** + * @static + * @property META + * @description The meta-tag for Content-Type to add to the dynamic document + * @type String + */ + META: '', + //META: '', + /** + * @static + * @property NAME + * @description The name of the class (frame) + * @type String + */ + NAME: 'frame', + /** + * The namespace on which Frame plugin will reside. + * + * @property NS + * @type String + * @default 'frame' + * @static + */ + NS: 'frame', + ATTRS: { + /** + * @attribute title + * @description The title to give the blank page. + * @type String + */ + title: { + value: 'Blank Page' + }, + /** + * @attribute dir + * @description The default text direction for this new frame. Default: ltr + * @type String + */ + dir: { + value: 'ltr' + }, + /** + * @attribute lang + * @description The default language. Default: en-US + * @type String + */ + lang: { + value: 'en-US' + }, + /** + * @attribute src + * @description The src of the iframe/window. Defaults to javascript:; + * @type String + */ + src: { + //Hackish, IE needs the false in the Javascript URL + value: 'javascript' + ((Y.UA.ie) ? ':false' : ':') + ';' + }, + /** + * @attribute designMode + * @description Should designMode be turned on after creation. + * @writeonce + * @type Boolean + */ + designMode: { + writeOnce: true, + value: false + }, + /** + * @attribute content + * @description The string to inject into the body of the new frame/window. + * @type String + */ + content: { + validator: Lang.isString, + value: '
', + setter: '_setHTML', + getter: '_getHTML' + }, + /** + * @attribute basehref + * @description The base href to use in the iframe. + * @type String + */ + basehref: { + value: false, + getter: '_resolveBaseHref' + }, + /** + * @attribute use + * @description Array of modules to include in the scoped YUI instance at render time. Default: ['none', 'selector-css2'] + * @writeonce + * @type Array + */ + use: { + writeOnce: true, + value: ['node', 'node-style', 'selector-css3'] + }, + /** + * @attribute container + * @description The container to append the iFrame to on render. + * @type String/HTMLElement/Node + */ + container: { + value: 'body', + setter: function(n) { + return Y.one(n); + } + }, + /** + * @attribute node + * @description The Node instance of the iframe. + * @type Node + */ + node: { + readOnly: true, + value: null, + getter: function() { + return this._iframe; + } + }, + /** + * @attribute id + * @description Set the id of the new Node. (optional) + * @type String + * @writeonce + */ + id: { + writeOnce: true, + getter: function(id) { + if (!id) { + id = 'iframe-' + Y.guid(); + } + return id; + } + }, + /** + * @attribute linkedcss + * @description An array of url's to external linked style sheets + * @type String|Array + */ + linkedcss: { + validator: '_validateLinkedCSS', + getter: '_getLinkedCSS', + setter: '_setLinkedCSS' + }, + /** + * @attribute extracss + * @description A string of CSS to add to the Head of the Editor + * @type String + */ + extracss: { + validator: Lang.isString, + setter: '_setExtraCSS' + }, + /** + * @attribute defaultblock + * @description The default tag to use for block level items, defaults to: p + * @type String + */ + defaultblock: { + value: 'p' + } + } + }); + + Y.namespace('Plugin'); + + Y.Plugin.Frame = Frame; + + Y.Frame = Frame; + + + +}, '3.17.2', {"requires": ["base", "node", "plugin", "selector-css3", "yui-throttle"]}); diff --git a/design/standard/lib/yui/3.17.2/build/frame/frame-min.js b/design/standard/lib/yui/3.17.2/build/frame/frame-min.js new file mode 100644 index 0000000..ae52bb6 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/frame/frame-min.js @@ -0,0 +1,9 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("frame",function(e,t){var n=e.Lang,r="contentready",i="host",s=function(){s.superclass.constructor.apply(this,arguments)};e.extend(s,e.Plugin.Base,{_ready:null,_rendered:null,_iframe:null,_instance:null,_create:function(t){var n,r="",i,o=this.get("src")===s.ATTRS.src.value,u=this.get("extracss")?'":"";this._iframe=e.one(e.config.doc.createElement("iframe")),this._iframe.setAttrs(s.IFRAME_ATTRS),this._iframe.setStyle("visibility","hidden"),this._iframe.set("src",this.get("src")),this.get("container").append(this._iframe),this._iframe.set("height","99%"),o&&(r=e.Lang.sub(s.PAGE_HTML,{DIR:this.get("dir"),LANG:this.get("lang"),TITLE:this.get("title"),META:s.META,LINKED_CSS:this.get("linkedcss"),CONTENT:this.get("content"),BASE_HREF:this.get("basehref"),DEFAULT_CSS:s.DEFAULT_CSS,EXTRA_CSS:u}),e.config.doc.compatMode!=="BackCompat"&&(r=s.getDocType()+"\n"+r)),n=this._resolveWinDoc(),r&&(n.doc.open(),n.doc.write(r),n.doc.close()),n.doc.documentElement?t(n):i=e.later(1,this,function(){n.doc&&n.doc.documentElement&&(t(n),i.cancel())},null,!0)},_resolveWinDoc:function(t){var n=t?t:{};return n.win=e.Node.getDOMNode(this._iframe.get("contentWindow")),n.doc=e.Node.getDOMNode(this._iframe.get("contentWindow.document")),n.doc||(n.doc=e.config.doc),n.win||(n.win=e.config.win),n},_onDomEvent:function(t){var n,r;if(!e.Node.getDOMNode(this._iframe))return;t.frameX=t.frameY=0,(t.pageX>0||t.pageY>0)&&t.type.substring(0,3)!=="key"&&(r=this._instance.one("win"),n=this._iframe.getXY(),t.frameX=n[0]+t.pageX-r.get("scrollLeft"),t.frameY=n[1]+t.pageY-r.get("scrollTop")),t.frameTarget=t.target,t.frameCurrentTarget=t.currentTarget,t.frameEvent=t,this.fire("dom:"+t.type,t)},initializer:function(){var e=this.get(i);e&&(e.frame=this),this.publish("ready",{emitFacade:!0,defaultFn:this._defReadyFn})},destructor:function(){var e=this.getInstance();e.one("doc").detachAll(),e=null,this._iframe.remove()},_DOMPaste:function(e){var t=this.getInstance(),n="",r=t.config.win;e._event.originalTarget&&(n=e._event.originalTarget),e._event.clipboardData&&(n=e._event.clipboardData.getData("Text")),r.clipboardData&&(n=r.clipboardData.getData("Text"),n===""&&(r.clipboardData.setData("Text",n)||(n=null))),e.frameTarget=e.target,e.frameCurrentTarget=e.currentTarget,e.frameEvent=e,n?e.clipboardData={data:n,getData:function(){return n}}:e.clipboardData=null,this.fire("dom:paste",e)},_defReadyFn:function(){var t=this.getInstance();e.each(s.DOM_EVENTS,function(n,r){var i=e.bind(this._onDomEvent,this),o=e.UA.ie&&s.THROTTLE_TIME>0?e.throttle(i,s.THROTTLE_TIME):i;t.Node.DOM_EVENTS[r]||(t.Node.DOM_EVENTS[r]=1),n===1&&r!=="focus"&&r!=="blur"&&r!=="paste"&&(r.substring(0,3)==="key"?t.on(r,o,t.config.doc):t.on(r,i,t.config.doc))},this),t.Node.DOM_EVENTS.paste=1,t.on("paste",e.bind(this._DOMPaste,this),t.one("body")),t.on("focus",e.bind(this._onDomEvent,this),t.config.win),t.on("blur",e.bind(this._onDomEvent,this),t.config.win),t.__use=t.use,t.use=e.bind(this.use,this),this._iframe.setStyles({visibility:"inherit"}),t.one("body").setStyle("display","block")},_fixIECursors:function(){var e=this.getInstance(),t=e.all("table"),n=e.all("br"),r;t.size()&&n.size()&&(r=t.item(0).get("sourceIndex"),n.each(function(t){var n=t.get("parentNode"),i=n.get("children"),s=n.all(">br");n.test("div")&&(i.size()>2?t.replace(e.Node.create("")):t.get("sourceIndex")>r?s.size()&&t.replace(e.Node.create("")):s.size()>1&&t.replace(e.Node.create("")))}))},_onContentReady:function(t){if(!this._ready){this._ready=!0;var n=this.getInstance(),r=e.clone(this.get("use"));this.fire("contentready"),t&&(n.config.doc=e.Node.getDOMNode(t.target)),r.push(e.bind(function(){n.EditorSelection&&(n.EditorSelection.DEFAULT_BLOCK_TAG=this.get("defaultblock")),this.get("designMode")&&(e.UA.ie?(n.config.doc.body.contentEditable="true",this._ieSetBodyHeight(),n.on("keyup",e.bind(this._ieSetBodyHeight,this),n.config.doc)):n.config.doc.designMode="on"),this.fire("ready")},this)),n.use.apply(n,r),n.one("doc").get("documentElement").addClass("yui-js-enabled")}},_ieHeightCounter:null,_ieSetBodyHeight:function(t){this._ieHeightCounter||(this._ieHeightCounter=0),this._ieHeightCounter++;var n=!1,r,i,s;t||(n=!0);if(t){switch(t.keyCode){case 8:case 13:n=!0}if(t.ctrlKey||t.shiftKey)n=!0}if(n)try{r=this.getInstance(),i=this._iframe.get("offsetHeight"),s=r.config.doc.body.scrollHeight,i>s?(i=i-15+"px",r.config.doc.body.style.height=i):r.config.doc.body.style.height="auto"}catch(t){this._ieHeightCounter<100&&e.later(200,this,this._ieSetBodyHeight)}},_resolveBaseHref:function(t){if(!t||t==="")t=e.config.doc.location.href,t.indexOf("?")!==-1&&(t=t.substring(0,t.indexOf("?"))),t=t.substring(0,t.lastIndexOf("/"))+"/";return t},_getHTML:function(e){if(this._ready){var t=this.getInstance();e=t.one("body").get("innerHTML")}return e},_setHTML:function(t){if(this._ready){var n=this.getInstance();n.one("body").set("innerHTML",t)}else this.once(r,e.bind(this._setHTML,this,t));return t},_getLinkedCSS:function(t){e.Lang.isArray(t)||(t=[t]);var n="";return this._ready?n=t:e.each(t,function(e){e&&(n+='')}),n},_setLinkedCSS:function(e){if(this._ready){var t=this.getInstance();t.Get.css(e)}return e},_setExtraCSS:function(t){if(this._ready){var n=this.getInstance(),i=n.one("#extra_css");i&&i.remove(),n.one("head").append('")}else this.once(r,e.bind(this._setExtraCSS,this,t));return t},_instanceLoaded:function(t){this._instance=t,this._onContentReady();var n=this._instance.config.doc;if(this.get("designMode")&&!e.UA.ie)try{n.execCommand("styleWithCSS",!1,!1),n.execCommand("insertbronreturn",!1,!1)}catch(r){}},use:function(){var t=this.getInstance(),n=e.Array(arguments),r=!1;return e.Lang.isFunction(n[n.length-1])&&(r=n.pop()),r&&n.push(function(){r.apply(t,arguments)}),t.__use.apply(t,n)},delegate:function(e,t,n,r){var i=this.getInstance();return i?(r||(r=n,n="body"),i.delegate +(e,t,n,r)):!1},getInstance:function(){return this._instance},render:function(t){return this._rendered?this:(this._rendered=!0,t&&this.set("container",t),this._create(e.bind(function(t){var n,r,s=e.bind(function(e){this._instanceLoaded(e)},this),o=e.clone(this.get("use")),u={debug:!1,win:t.win,doc:t.doc},a=e.bind(function(){u=this._resolveWinDoc(u),n=YUI(u),n.host=this.get(i);try{n.use("node-base",s),r&&clearInterval(r)}catch(e){r=setInterval(function(){a()},350)}},this);o.push(a),e.use.apply(e,o)},this)),this)},_handleFocus:function(){var e=this.getInstance(),t=new e.EditorSelection,n,r,i,s;t.anchorNode&&(n=t.anchorNode,n.test("p")&&n.get("innerHTML")===""&&(n=n.get("parentNode")),r=n.get("childNodes"),r.size()&&(r.item(0).test("br")?t.selectNode(n,!0,!1):r.item(0).test("p")?(n=r.item(0).one("br.yui-cursor"),n&&(n=n.get("parentNode")),n||(n=r.item(0).get("firstChild")),n||(n=r.item(0)),n&&t.selectNode(n,!0,!1)):(i=e.one("br.yui-cursor"),i&&(s=i.get("parentNode"),s&&t.selectNode(s,!0,!1)))))},_validateLinkedCSS:function(e){return n.isString(e)||n.isArray(e)},focus:function(t){if(e.UA.ie&&e.UA.ie<9){try{e.one("win").focus(),this.getInstance()&&this.getInstance().one("win")&&this.getInstance().one("win").focus()}catch(n){}t===!0&&this._handleFocus(),e.Lang.isFunction(t)&&t()}else try{e.one("win").focus(),e.later(100,this,function(){this.getInstance()&&this.getInstance().one("win")&&this.getInstance().one("win").focus(),t===!0&&this._handleFocus(),e.Lang.isFunction(t)&&t()})}catch(r){}return this},show:function(){this._iframe.setStyles({position:"static",left:""});if(e.UA.gecko){try{this.getInstance()&&(this.getInstance().config.doc.designMode="on")}catch(t){}this.focus()}return this},hide:function(){return this._iframe.setStyles({position:"absolute",left:"-999999px"}),this}},{THROTTLE_TIME:100,DOM_EVENTS:{dblclick:1,click:1,paste:1,mouseup:1,mousedown:1,keyup:1,keydown:1,keypress:1,activate:1,deactivate:1,beforedeactivate:1,focusin:1,focusout:1},DEFAULT_CSS:"body { background-color: #fff; font: 13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a, a:visited, a:hover { color: blue !important; text-decoration: underline !important; cursor: text !important; } img { cursor: pointer !important; border: none; }",IFRAME_ATTRS:{border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%",height:"99%"},PAGE_HTML:'{TITLE}{META}{LINKED_CSS}{EXTRA_CSS}{CONTENT}',getDocType:function(){var t=e.config.doc.doctype,n=s.DOC_TYPE;return t?n="":e.config.doc.all&&(t=e.config.doc.all[0],t.nodeType&&t.nodeType===8&&t.nodeValue&&t.nodeValue.toLowerCase().indexOf("doctype")!==-1&&(n="")),n},DOC_TYPE:'',META:'',NAME:"frame",NS:"frame",ATTRS:{title:{value:"Blank Page"},dir:{value:"ltr"},lang:{value:"en-US"},src:{value:"javascript"+(e.UA.ie?":false":":")+";"},designMode:{writeOnce:!0,value:!1},content:{validator:n.isString,value:"
",setter:"_setHTML",getter:"_getHTML"},basehref:{value:!1,getter:"_resolveBaseHref"},use:{writeOnce:!0,value:["node","node-style","selector-css3"]},container:{value:"body",setter:function(t){return e.one(t)}},node:{readOnly:!0,value:null,getter:function(){return this._iframe}},id:{writeOnce:!0,getter:function(t){return t||(t="iframe-"+e.guid()),t}},linkedcss:{validator:"_validateLinkedCSS",getter:"_getLinkedCSS",setter:"_setLinkedCSS"},extracss:{validator:n.isString,setter:"_setExtraCSS"},defaultblock:{value:"p"}}}),e.namespace("Plugin"),e.Plugin.Frame=s,e.Frame=s},"3.17.2",{requires:["base","node","plugin","selector-css3","yui-throttle"]}); diff --git a/design/standard/lib/yui/3.17.2/build/frame/frame.js b/design/standard/lib/yui/3.17.2/build/frame/frame.js new file mode 100644 index 0000000..d9bdc55 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/frame/frame.js @@ -0,0 +1,1054 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('frame', function (Y, NAME) { + + /*jshint maxlen: 500 */ + /** + * Creates a wrapper around an iframe. It loads the content either from a local + * file or from script and creates a local YUI instance bound to that new window and document. + * @class Frame + * @for Frame + * @extends Base + * @constructor + * @module editor + * @submodule frame + */ + + var Lang = Y.Lang, + + EVENT_CONTENT_READY = 'contentready', + + HOST = 'host', + + Frame = function() { + Frame.superclass.constructor.apply(this, arguments); + }; + + + Y.extend(Frame, Y.Plugin.Base, { + /** + * @private + * @property _ready + * @description Internal reference set when the content is ready. + * @type Boolean + */ + _ready: null, + /** + * @private + * @property _rendered + * @description Internal reference set when render is called. + * @type Boolean + */ + _rendered: null, + /** + * @private + * @property _iframe + * @description Internal Node reference to the iFrame or the window + * @type Node + */ + _iframe: null, + /** + * @private + * @property _instance + * @description Internal reference to the YUI instance bound to the iFrame or window + * @type YUI + */ + _instance: null, + /** + * @private + * @method _create + * @description Create the iframe or Window and get references to the Document & Window + * @return {Object} Hash table containing references to the new Document & Window + */ + _create: function(cb) { + var res, html = '', timer, + //if the src attr is different than the default, don't create the document + create = (this.get('src') === Frame.ATTRS.src.value), + extra_css = ((this.get('extracss')) ? '' : ''); + + this._iframe = Y.one(Y.config.doc.createElement('iframe')); + this._iframe.setAttrs(Frame.IFRAME_ATTRS); + + this._iframe.setStyle('visibility', 'hidden'); + this._iframe.set('src', this.get('src')); + this.get('container').append(this._iframe); + this._iframe.set('height', '99%'); + + if (create) { + html = Y.Lang.sub(Frame.PAGE_HTML, { + DIR: this.get('dir'), + LANG: this.get('lang'), + TITLE: this.get('title'), + META: Frame.META, + LINKED_CSS: this.get('linkedcss'), + CONTENT: this.get('content'), + BASE_HREF: this.get('basehref'), + DEFAULT_CSS: Frame.DEFAULT_CSS, + EXTRA_CSS: extra_css + }); + if (Y.config.doc.compatMode !== 'BackCompat') { + + //html = Frame.DOC_TYPE + "\n" + html; + html = Frame.getDocType() + "\n" + html; + } else { + } + + } + + res = this._resolveWinDoc(); + + if (html) { + res.doc.open(); + res.doc.write(html); + res.doc.close(); + } + + if (!res.doc.documentElement) { + timer = Y.later(1, this, function() { + if (res.doc && res.doc.documentElement) { + cb(res); + timer.cancel(); + } + }, null, true); + } else { + cb(res); + } + + }, + /** + * @private + * @method _resolveWinDoc + * @description Resolves the document and window from an iframe or window instance + * @param {Object} c The YUI Config to add the window and document to + * @return {Object} Object hash of window and document references, if a YUI config was passed, it is returned. + */ + _resolveWinDoc: function(c) { + var config = (c) ? c : {}; + config.win = Y.Node.getDOMNode(this._iframe.get('contentWindow')); + config.doc = Y.Node.getDOMNode(this._iframe.get('contentWindow.document')); + if (!config.doc) { + config.doc = Y.config.doc; + } + if (!config.win) { + config.win = Y.config.win; + } + return config; + }, + /** + * @private + * @method _onDomEvent + * @description Generic handler for all DOM events fired by the iframe or window. This handler + * takes the current EventFacade and augments it to fire on the Frame host. It adds two new properties + * to the EventFacade called frameX and frameY which adds the scroll and xy position of the iframe + * to the original pageX and pageY of the event so external nodes can be positioned over the frame. + * @param {EventFacade} e + */ + _onDomEvent: function(e) { + var xy, node; + + if (!Y.Node.getDOMNode(this._iframe)) { + //The iframe is null for some reason, bail on sending events. + return; + } + + e.frameX = e.frameY = 0; + + if (e.pageX > 0 || e.pageY > 0) { + if (e.type.substring(0, 3) !== 'key') { + node = this._instance.one('win'); + xy = this._iframe.getXY(); + e.frameX = xy[0] + e.pageX - node.get('scrollLeft'); + e.frameY = xy[1] + e.pageY - node.get('scrollTop'); + } + } + + e.frameTarget = e.target; + e.frameCurrentTarget = e.currentTarget; + e.frameEvent = e; + + this.fire('dom:' + e.type, e); + }, + initializer: function() { + var host = this.get(HOST); + + if (host) { + host.frame = this; + } + + this.publish('ready', { + emitFacade: true, + defaultFn: this._defReadyFn + }); + }, + destructor: function() { + var inst = this.getInstance(); + + inst.one('doc').detachAll(); + inst = null; + this._iframe.remove(); + }, + /** + * @private + * @method _DOMPaste + * @description Simple pass thru handler for the paste event so we can do content cleanup + * @param {EventFacade} e + */ + _DOMPaste: function(e) { + var inst = this.getInstance(), + data = '', win = inst.config.win; + + if (e._event.originalTarget) { + data = e._event.originalTarget; + } + if (e._event.clipboardData) { + data = e._event.clipboardData.getData('Text'); + } + + if (win.clipboardData) { + data = win.clipboardData.getData('Text'); + if (data === '') { // Could be empty, or failed + // Verify failure + if (!win.clipboardData.setData('Text', data)) { + data = null; + } + } + } + + + e.frameTarget = e.target; + e.frameCurrentTarget = e.currentTarget; + e.frameEvent = e; + + if (data) { + e.clipboardData = { + data: data, + getData: function() { + return data; + } + }; + } else { + e.clipboardData = null; + } + + this.fire('dom:paste', e); + }, + /** + * @private + * @method _defReadyFn + * @description Binds DOM events, sets the iframe to visible and fires the ready event + */ + _defReadyFn: function() { + var inst = this.getInstance(); + + Y.each(Frame.DOM_EVENTS, function(v, k) { + var fn = Y.bind(this._onDomEvent, this), + kfn = ((Y.UA.ie && Frame.THROTTLE_TIME > 0) ? Y.throttle(fn, Frame.THROTTLE_TIME) : fn); + + if (!inst.Node.DOM_EVENTS[k]) { + inst.Node.DOM_EVENTS[k] = 1; + } + if (v === 1) { + if (k !== 'focus' && k !== 'blur' && k !== 'paste') { + if (k.substring(0, 3) === 'key') { + //Throttle key events in IE + inst.on(k, kfn, inst.config.doc); + } else { + inst.on(k, fn, inst.config.doc); + } + } + } + }, this); + + inst.Node.DOM_EVENTS.paste = 1; + + inst.on('paste', Y.bind(this._DOMPaste, this), inst.one('body')); + + //Adding focus/blur to the window object + inst.on('focus', Y.bind(this._onDomEvent, this), inst.config.win); + inst.on('blur', Y.bind(this._onDomEvent, this), inst.config.win); + + inst.__use = inst.use; + inst.use = Y.bind(this.use, this); + this._iframe.setStyles({ + visibility: 'inherit' + }); + inst.one('body').setStyle('display', 'block'); + }, + /** + * It appears that having a BR tag anywhere in the source "below" a table with a percentage width (in IE 7 & 8) + * if there is any TEXTINPUT's outside the iframe, the cursor will rapidly flickr and the CPU would occasionally + * spike. This method finds all
's below the sourceIndex of the first table. Does some checks to see if they + * can be modified and replaces then with a so the layout will remain in tact, but the flickering will + * no longer happen. + * @method _fixIECursors + * @private + */ + _fixIECursors: function() { + var inst = this.getInstance(), + tables = inst.all('table'), + brs = inst.all('br'), si; + + if (tables.size() && brs.size()) { + //First Table + si = tables.item(0).get('sourceIndex'); + brs.each(function(n) { + var p = n.get('parentNode'), + c = p.get('children'), b = p.all('>br'); + + if (p.test('div')) { + if (c.size() > 2) { + n.replace(inst.Node.create('')); + } else { + if (n.get('sourceIndex') > si) { + if (b.size()) { + n.replace(inst.Node.create('')); + } + } else { + if (b.size() > 1) { + n.replace(inst.Node.create('')); + } + } + } + } + + }); + } + }, + /** + * @private + * @method _onContentReady + * @description Called once the content is available in the frame/window and calls the final use call + * on the internal instance so that the modules are loaded properly. + */ + _onContentReady: function(e) { + if (!this._ready) { + this._ready = true; + var inst = this.getInstance(), + args = Y.clone(this.get('use')); + + this.fire('contentready'); + + if (e) { + inst.config.doc = Y.Node.getDOMNode(e.target); + } + //TODO Circle around and deal with CSS loading... + args.push(Y.bind(function() { + if (inst.EditorSelection) { + inst.EditorSelection.DEFAULT_BLOCK_TAG = this.get('defaultblock'); + } + //Moved to here so that the iframe is ready before allowing editing.. + if (this.get('designMode')) { + if(Y.UA.ie) { + inst.config.doc.body.contentEditable = 'true'; + this._ieSetBodyHeight(); + inst.on('keyup', Y.bind(this._ieSetBodyHeight, this), inst.config.doc); + } else { + inst.config.doc.designMode = 'on'; + } + } + this.fire('ready'); + }, this)); + inst.use.apply(inst, args); + + inst.one('doc').get('documentElement').addClass('yui-js-enabled'); + } + }, + _ieHeightCounter: null, + /** + * Internal method to set the height of the body to the height of the document in IE. + * With contenteditable being set, the document becomes unresponsive to clicks, this + * method expands the body to be the height of the document so that doesn't happen. + * @private + * @method _ieSetBodyHeight + */ + _ieSetBodyHeight: function(e) { + if (!this._ieHeightCounter) { + this._ieHeightCounter = 0; + } + this._ieHeightCounter++; + var run = false, inst, h, bh; + if (!e) { + run = true; + } + if (e) { + switch (e.keyCode) { + case 8: + case 13: + run = true; + break; + } + if (e.ctrlKey || e.shiftKey) { + run = true; + } + } + if (run) { + try { + inst = this.getInstance(); + h = this._iframe.get('offsetHeight'); + bh = inst.config.doc.body.scrollHeight; + if (h > bh) { + h = (h - 15) + 'px'; + inst.config.doc.body.style.height = h; + } else { + inst.config.doc.body.style.height = 'auto'; + } + } catch (e) { + if (this._ieHeightCounter < 100) { + Y.later(200, this, this._ieSetBodyHeight); + } else { + } + } + } + }, + /** + * @private + * @method _resolveBaseHref + * @description Resolves the basehref of the page the frame is created on. Only applies to dynamic content. + * @param {String} href The new value to use, if empty it will be resolved from the current url. + * @return {String} + */ + _resolveBaseHref: function(href) { + if (!href || href === '') { + href = Y.config.doc.location.href; + if (href.indexOf('?') !== -1) { //Remove the query string + href = href.substring(0, href.indexOf('?')); + } + href = href.substring(0, href.lastIndexOf('/')) + '/'; + } + return href; + }, + /** + * @private + * @method _getHTML + * @description Get the content from the iframe + * @param {String} html The raw HTML from the body of the iframe. + * @return {String} + */ + _getHTML: function(html) { + if (this._ready) { + var inst = this.getInstance(); + html = inst.one('body').get('innerHTML'); + } + return html; + }, + /** + * @private + * @method _setHTML + * @description Set the content of the iframe + * @param {String} html The raw HTML to set the body of the iframe to. + * @return {String} + */ + _setHTML: function(html) { + if (this._ready) { + var inst = this.getInstance(); + inst.one('body').set('innerHTML', html); + } else { + this.once(EVENT_CONTENT_READY, Y.bind(this._setHTML, this, html)); + } + + return html; + }, + /** + * @private + * @method _getLinkedCSS + * @description Get the linked CSS on the instance. + */ + _getLinkedCSS: function(urls) { + if (!Y.Lang.isArray(urls)) { + urls = [urls]; + } + var str = ''; + if (!this._ready) { + Y.each(urls, function(v) { + if (v) { + str += ''; + } + }); + } else { + str = urls; + } + return str; + }, + /** + * @private + * @method _setLinkedCSS + * @description Sets the linked CSS on the instance.. + */ + _setLinkedCSS: function(css) { + if (this._ready) { + var inst = this.getInstance(); + inst.Get.css(css); + } + return css; + }, + /** + * @private + * @method _setExtraCSS + * @description Set's the extra CSS on the instance.. + */ + _setExtraCSS: function(css) { + if (this._ready) { + var inst = this.getInstance(), + node = inst.one('#extra_css'); + + if (node) { + node.remove(); + } + + inst.one('head').append(''); + } else { + //This needs to be wrapped in a contentready callback for the !_ready state + this.once(EVENT_CONTENT_READY, Y.bind(this._setExtraCSS, this, css)); + } + + return css; + }, + /** + * @private + * @method _instanceLoaded + * @description Called from the first YUI instance that sets up the internal instance. + * This loads the content into the window/frame and attaches the contentready event. + * @param {YUI} inst The internal YUI instance bound to the frame/window + */ + _instanceLoaded: function(inst) { + this._instance = inst; + this._onContentReady(); + + var doc = this._instance.config.doc; + + if (this.get('designMode')) { + if (!Y.UA.ie) { + try { + //Force other browsers into non CSS styling + doc.execCommand('styleWithCSS', false, false); + doc.execCommand('insertbronreturn', false, false); + } catch (err) {} + } + } + }, + //BEGIN PUBLIC METHODS + /** + * @method use + * @description This is a scoped version of the normal YUI.use method & is bound to this frame/window. + * At setup, the inst.use method is mapped to this method. + */ + use: function() { + var inst = this.getInstance(), + args = Y.Array(arguments), + cb = false; + + if (Y.Lang.isFunction(args[args.length - 1])) { + cb = args.pop(); + } + if (cb) { + args.push(function() { + cb.apply(inst, arguments); + + }); + } + + return inst.__use.apply(inst, args); + }, + /** + * @method delegate + * @description A delegate method passed to the instance's delegate method + * @param {String} type The type of event to listen for + * @param {Function} fn The method to attach + * @param {String} cont The container to act as a delegate, if no "sel" passed, the body is assumed as the container. + * @param {String} sel The selector to match in the event (optional) + * @return {EventHandle} The Event handle returned from Y.delegate + */ + delegate: function(type, fn, cont, sel) { + var inst = this.getInstance(); + if (!inst) { + return false; + } + if (!sel) { + sel = cont; + cont = 'body'; + } + return inst.delegate(type, fn, cont, sel); + }, + /** + * @method getInstance + * @description Get a reference to the internal YUI instance. + * @return {YUI} The internal YUI instance + */ + getInstance: function() { + return this._instance; + }, + /** + * @method render + * @description Render the iframe into the container config option or open the window. + * @param {String/HTMLElement/Node} node The node to render to + * @return {Frame} + * @chainable + */ + render: function(node) { + if (this._rendered) { + return this; + } + this._rendered = true; + if (node) { + this.set('container', node); + } + + this._create(Y.bind(function(res) { + + var inst, timer, + cb = Y.bind(function(i) { + this._instanceLoaded(i); + }, this), + args = Y.clone(this.get('use')), + config = { + debug: false, + win: res.win, + doc: res.doc + }, + fn = Y.bind(function() { + config = this._resolveWinDoc(config); + inst = YUI(config); + inst.host = this.get(HOST); //Cross reference to Editor + + try { + inst.use('node-base', cb); + if (timer) { + clearInterval(timer); + } + } catch (e) { + timer = setInterval(function() { + fn(); + }, 350); + } + }, this); + + args.push(fn); + + Y.use.apply(Y, args); + + }, this)); + + return this; + }, + /** + * @private + * @method _handleFocus + * @description Does some tricks on focus to set the proper cursor position. + */ + _handleFocus: function() { + var inst = this.getInstance(), + sel = new inst.EditorSelection(), + n, c, b, par; + + if (sel.anchorNode) { + n = sel.anchorNode; + + if (n.test('p') && n.get('innerHTML') === '') { + n = n.get('parentNode'); + } + c = n.get('childNodes'); + + if (c.size()) { + if (c.item(0).test('br')) { + sel.selectNode(n, true, false); + } else if (c.item(0).test('p')) { + n = c.item(0).one('br.yui-cursor'); + if (n) { + n = n.get('parentNode'); + } + if (!n) { + n = c.item(0).get('firstChild'); + } + if (!n) { + n = c.item(0); + } + if (n) { + sel.selectNode(n, true, false); + } + } else { + b = inst.one('br.yui-cursor'); + if (b) { + par = b.get('parentNode'); + if (par) { + sel.selectNode(par, true, false); + } + } + } + } + } + }, + /** + * Validates linkedcss property + * + * @method _validateLinkedCSS + * @private + */ + _validateLinkedCSS: function(value) { + return Lang.isString(value) || Lang.isArray(value); + }, + /** + * @method focus + * @description Set the focus to the iframe + * @param {Function} fn Callback function to execute after focus happens + * @return {Frame} + * @chainable + */ + focus: function(fn) { + if (Y.UA.ie && Y.UA.ie < 9) { + try { + Y.one('win').focus(); + if (this.getInstance()) { + if (this.getInstance().one('win')) { + this.getInstance().one('win').focus(); + } + } + } catch (ierr) { + } + if (fn === true) { + this._handleFocus(); + } + if (Y.Lang.isFunction(fn)) { + fn(); + } + } else { + try { + Y.one('win').focus(); + Y.later(100, this, function() { + if (this.getInstance()) { + if (this.getInstance().one('win')) { + this.getInstance().one('win').focus(); + } + } + if (fn === true) { + this._handleFocus(); + } + if (Y.Lang.isFunction(fn)) { + fn(); + } + }); + } catch (ferr) { + } + } + return this; + }, + /** + * @method show + * @description Show the iframe instance + * @return {Frame} + * @chainable + */ + show: function() { + this._iframe.setStyles({ + position: 'static', + left: '' + }); + if (Y.UA.gecko) { + try { + if (this.getInstance()) { + this.getInstance().config.doc.designMode = 'on'; + } + } catch (e) { } + this.focus(); + } + return this; + }, + /** + * @method hide + * @description Hide the iframe instance + * @return {Frame} + * @chainable + */ + hide: function() { + this._iframe.setStyles({ + position: 'absolute', + left: '-999999px' + }); + return this; + } + }, { + /** + * @static + * @property THROTTLE_TIME + * @description The throttle time for key events in IE + * @type Number + * @default 100 + */ + THROTTLE_TIME: 100, + /** + * @static + * @property DOM_EVENTS + * @description The DomEvents that the frame automatically attaches and bubbles + * @type Object + */ + DOM_EVENTS: { + dblclick: 1, + click: 1, + paste: 1, + mouseup: 1, + mousedown: 1, + keyup: 1, + keydown: 1, + keypress: 1, + activate: 1, + deactivate: 1, + beforedeactivate: 1, + focusin: 1, + focusout: 1 + }, + + /** + * @static + * @property DEFAULT_CSS + * @description The default css used when creating the document. + * @type String + */ + DEFAULT_CSS: 'body { background-color: #fff; font: 13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a, a:visited, a:hover { color: blue !important; text-decoration: underline !important; cursor: text !important; } img { cursor: pointer !important; border: none; }', + /** + * The template string used to create the iframe, deprecated to use DOM instead of innerHTML + * @static + * @property HTML + * @type String + * @deprecated + */ + //HTML: '', + /** + * Attributes to auto add to the dynamic iframe under the hood + * @static + * @property IFRAME_ATTRS + * @type Object + */ + IFRAME_ATTRS: { + border: '0', + frameBorder: '0', + marginWidth: '0', + marginHeight: '0', + leftMargin: '0', + topMargin: '0', + allowTransparency: 'true', + width: "100%", + height: "99%" + }, + /** + * @static + * @property PAGE_HTML + * @description The template used to create the page when created dynamically. + * @type String + */ + PAGE_HTML: '{TITLE}{META}{LINKED_CSS}{EXTRA_CSS}{CONTENT}', + + /** + * @static + * @method getDocType + * @description Parses document.doctype and generates a DocType to match the parent page, if supported. + * For IE8, it grabs document.all[0].nodeValue and uses that. For IE < 8, it falls back to Frame.DOC_TYPE. + * @return {String} The normalized DocType to apply to the iframe + */ + getDocType: function() { + var dt = Y.config.doc.doctype, + str = Frame.DOC_TYPE; + + if (dt) { + str = ''; + } else { + if (Y.config.doc.all) { + dt = Y.config.doc.all[0]; + if (dt.nodeType) { + if (dt.nodeType === 8) { + if (dt.nodeValue) { + if (dt.nodeValue.toLowerCase().indexOf('doctype') !== -1) { + str = ''; + } + } + } + } + } + } + return str; + }, + /** + * @static + * @property DOC_TYPE + * @description The DOCTYPE to prepend to the new document when created. Should match the one on the page being served. + * @type String + */ + DOC_TYPE: '', + /** + * @static + * @property META + * @description The meta-tag for Content-Type to add to the dynamic document + * @type String + */ + META: '', + //META: '', + /** + * @static + * @property NAME + * @description The name of the class (frame) + * @type String + */ + NAME: 'frame', + /** + * The namespace on which Frame plugin will reside. + * + * @property NS + * @type String + * @default 'frame' + * @static + */ + NS: 'frame', + ATTRS: { + /** + * @attribute title + * @description The title to give the blank page. + * @type String + */ + title: { + value: 'Blank Page' + }, + /** + * @attribute dir + * @description The default text direction for this new frame. Default: ltr + * @type String + */ + dir: { + value: 'ltr' + }, + /** + * @attribute lang + * @description The default language. Default: en-US + * @type String + */ + lang: { + value: 'en-US' + }, + /** + * @attribute src + * @description The src of the iframe/window. Defaults to javascript:; + * @type String + */ + src: { + //Hackish, IE needs the false in the Javascript URL + value: 'javascript' + ((Y.UA.ie) ? ':false' : ':') + ';' + }, + /** + * @attribute designMode + * @description Should designMode be turned on after creation. + * @writeonce + * @type Boolean + */ + designMode: { + writeOnce: true, + value: false + }, + /** + * @attribute content + * @description The string to inject into the body of the new frame/window. + * @type String + */ + content: { + validator: Lang.isString, + value: '
', + setter: '_setHTML', + getter: '_getHTML' + }, + /** + * @attribute basehref + * @description The base href to use in the iframe. + * @type String + */ + basehref: { + value: false, + getter: '_resolveBaseHref' + }, + /** + * @attribute use + * @description Array of modules to include in the scoped YUI instance at render time. Default: ['none', 'selector-css2'] + * @writeonce + * @type Array + */ + use: { + writeOnce: true, + value: ['node', 'node-style', 'selector-css3'] + }, + /** + * @attribute container + * @description The container to append the iFrame to on render. + * @type String/HTMLElement/Node + */ + container: { + value: 'body', + setter: function(n) { + return Y.one(n); + } + }, + /** + * @attribute node + * @description The Node instance of the iframe. + * @type Node + */ + node: { + readOnly: true, + value: null, + getter: function() { + return this._iframe; + } + }, + /** + * @attribute id + * @description Set the id of the new Node. (optional) + * @type String + * @writeonce + */ + id: { + writeOnce: true, + getter: function(id) { + if (!id) { + id = 'iframe-' + Y.guid(); + } + return id; + } + }, + /** + * @attribute linkedcss + * @description An array of url's to external linked style sheets + * @type String|Array + */ + linkedcss: { + validator: '_validateLinkedCSS', + getter: '_getLinkedCSS', + setter: '_setLinkedCSS' + }, + /** + * @attribute extracss + * @description A string of CSS to add to the Head of the Editor + * @type String + */ + extracss: { + validator: Lang.isString, + setter: '_setExtraCSS' + }, + /** + * @attribute defaultblock + * @description The default tag to use for block level items, defaults to: p + * @type String + */ + defaultblock: { + value: 'p' + } + } + }); + + Y.namespace('Plugin'); + + Y.Plugin.Frame = Frame; + + Y.Frame = Frame; + + + +}, '3.17.2', {"requires": ["base", "node", "plugin", "selector-css3", "yui-throttle"]}); diff --git a/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-coverage.js b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-coverage.js new file mode 100644 index 0000000..8b7d94c --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/gesture-simulate/gesture-simulate.js']) { + __coverage__['build/gesture-simulate/gesture-simulate.js'] = {"path":"build/gesture-simulate/gesture-simulate.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":0,"254":0,"255":0,"256":0,"257":0,"258":0,"259":0,"260":0,"261":0,"262":0,"263":0,"264":0,"265":0,"266":0,"267":0,"268":0,"269":0,"270":0,"271":0,"272":0,"273":0,"274":0,"275":0,"276":0,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":0,"284":0},"b":{"1":[0,0,0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0,0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0,0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0,0,0],"61":[0,0],"62":[0,0],"63":[0,0],"64":[0,0],"65":[0,0],"66":[0,0],"67":[0,0],"68":[0,0],"69":[0,0],"70":[0,0],"71":[0,0],"72":[0,0],"73":[0,0],"74":[0,0],"75":[0,0],"76":[0,0],"77":[0,0],"78":[0,0],"79":[0,0],"80":[0,0,0,0,0,0],"81":[0,0],"82":[0,0],"83":[0,0],"84":[0,0],"85":[0,0,0,0,0,0,0],"86":[0,0],"87":[0,0],"88":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":28},"end":{"line":1,"column":47}}},"2":{"name":"Simulations","line":83,"loc":{"start":{"line":83,"column":0},"end":{"line":83,"column":27}}},"3":{"name":"(anonymous_3)","line":107,"loc":{"start":{"line":107,"column":15},"end":{"line":107,"column":29}}},"4":{"name":"(anonymous_4)","line":120,"loc":{"start":{"line":120,"column":15},"end":{"line":120,"column":26}}},"5":{"name":"(anonymous_5)","line":160,"loc":{"start":{"line":160,"column":28},"end":{"line":160,"column":44}}},"6":{"name":"(anonymous_6)","line":202,"loc":{"start":{"line":202,"column":12},"end":{"line":202,"column":84}}},"7":{"name":"(anonymous_7)","line":249,"loc":{"start":{"line":249,"column":11},"end":{"line":249,"column":83}}},"8":{"name":"(anonymous_8)","line":324,"loc":{"start":{"line":324,"column":16},"end":{"line":324,"column":27}}},"9":{"name":"(anonymous_9)","line":383,"loc":{"start":{"line":383,"column":20},"end":{"line":383,"column":35}}},"10":{"name":"(anonymous_10)","line":446,"loc":{"start":{"line":446,"column":16},"end":{"line":446,"column":27}}},"11":{"name":"(anonymous_11)","line":528,"loc":{"start":{"line":528,"column":9},"end":{"line":528,"column":49}}},"12":{"name":"(anonymous_12)","line":560,"loc":{"start":{"line":560,"column":21},"end":{"line":560,"column":32}}},"13":{"name":"(anonymous_13)","line":568,"loc":{"start":{"line":568,"column":19},"end":{"line":568,"column":30}}},"14":{"name":"(anonymous_14)","line":592,"loc":{"start":{"line":592,"column":20},"end":{"line":592,"column":31}}},"15":{"name":"(anonymous_15)","line":633,"loc":{"start":{"line":633,"column":11},"end":{"line":633,"column":57}}},"16":{"name":"(anonymous_16)","line":698,"loc":{"start":{"line":698,"column":10},"end":{"line":698,"column":39}}},"17":{"name":"(anonymous_17)","line":753,"loc":{"start":{"line":753,"column":11},"end":{"line":753,"column":40}}},"18":{"name":"(anonymous_18)","line":800,"loc":{"start":{"line":800,"column":16},"end":{"line":800,"column":27}}},"19":{"name":"(anonymous_19)","line":826,"loc":{"start":{"line":826,"column":20},"end":{"line":826,"column":35}}},"20":{"name":"(anonymous_20)","line":856,"loc":{"start":{"line":856,"column":16},"end":{"line":856,"column":27}}},"21":{"name":"(anonymous_21)","line":879,"loc":{"start":{"line":879,"column":16},"end":{"line":879,"column":27}}},"22":{"name":"(anonymous_22)","line":923,"loc":{"start":{"line":923,"column":24},"end":{"line":923,"column":35}}},"23":{"name":"(anonymous_23)","line":942,"loc":{"start":{"line":942,"column":22},"end":{"line":942,"column":44}}},"24":{"name":"(anonymous_24)","line":955,"loc":{"start":{"line":955,"column":36},"end":{"line":955,"column":52}}},"25":{"name":"(anonymous_25)","line":981,"loc":{"start":{"line":981,"column":36},"end":{"line":981,"column":52}}},"26":{"name":"(anonymous_26)","line":1002,"loc":{"start":{"line":1002,"column":33},"end":{"line":1002,"column":45}}},"27":{"name":"(anonymous_27)","line":1022,"loc":{"start":{"line":1022,"column":20},"end":{"line":1022,"column":52}}},"28":{"name":"(anonymous_28)","line":1074,"loc":{"start":{"line":1074,"column":20},"end":{"line":1074,"column":69}}},"29":{"name":"(anonymous_29)","line":1262,"loc":{"start":{"line":1262,"column":26},"end":{"line":1262,"column":60}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1321,"column":77}},"2":{"start":{"line":10,"column":0},"end":{"line":80,"column":17}},"3":{"start":{"line":83,"column":0},"end":{"line":95,"column":1}},"4":{"start":{"line":84,"column":4},"end":{"line":86,"column":5}},"5":{"start":{"line":85,"column":8},"end":{"line":85,"column":46}},"6":{"start":{"line":87,"column":4},"end":{"line":87,"column":21}},"7":{"start":{"line":88,"column":4},"end":{"line":88,"column":42}},"8":{"start":{"line":90,"column":4},"end":{"line":91,"column":31}},"9":{"start":{"line":93,"column":4},"end":{"line":93,"column":43}},"10":{"start":{"line":94,"column":4},"end":{"line":94,"column":43}},"11":{"start":{"line":97,"column":0},"end":{"line":1079,"column":2}},"12":{"start":{"line":108,"column":8},"end":{"line":108,"column":35}},"13":{"start":{"line":121,"column":8},"end":{"line":123,"column":19}},"14":{"start":{"line":126,"column":8},"end":{"line":146,"column":9}},"15":{"start":{"line":127,"column":12},"end":{"line":127,"column":57}},"16":{"start":{"line":129,"column":12},"end":{"line":134,"column":13}},"17":{"start":{"line":130,"column":16},"end":{"line":130,"column":39}},"18":{"start":{"line":133,"column":16},"end":{"line":133,"column":62}},"19":{"start":{"line":136,"column":12},"end":{"line":141,"column":13}},"20":{"start":{"line":137,"column":16},"end":{"line":137,"column":37}},"21":{"start":{"line":140,"column":16},"end":{"line":140,"column":61}},"22":{"start":{"line":143,"column":12},"end":{"line":143,"column":45}},"23":{"start":{"line":144,"column":12},"end":{"line":144,"column":33}},"24":{"start":{"line":145,"column":12},"end":{"line":145,"column":35}},"25":{"start":{"line":148,"column":8},"end":{"line":148,"column":31}},"26":{"start":{"line":162,"column":8},"end":{"line":162,"column":19}},"27":{"start":{"line":164,"column":8},"end":{"line":174,"column":9}},"28":{"start":{"line":165,"column":12},"end":{"line":165,"column":47}},"29":{"start":{"line":167,"column":12},"end":{"line":170,"column":13}},"30":{"start":{"line":168,"column":16},"end":{"line":168,"column":42}},"31":{"start":{"line":169,"column":16},"end":{"line":169,"column":36}},"32":{"start":{"line":172,"column":12},"end":{"line":172,"column":51}},"33":{"start":{"line":173,"column":12},"end":{"line":173,"column":51}},"34":{"start":{"line":176,"column":8},"end":{"line":176,"column":21}},"35":{"start":{"line":203,"column":8},"end":{"line":205,"column":27}},"36":{"start":{"line":207,"column":8},"end":{"line":212,"column":9}},"37":{"start":{"line":208,"column":12},"end":{"line":209,"column":71}},"38":{"start":{"line":210,"column":12},"end":{"line":210,"column":24}},"39":{"start":{"line":211,"column":12},"end":{"line":211,"column":24}},"40":{"start":{"line":215,"column":8},"end":{"line":217,"column":9}},"41":{"start":{"line":216,"column":12},"end":{"line":216,"column":55}},"42":{"start":{"line":219,"column":8},"end":{"line":219,"column":66}},"43":{"start":{"line":250,"column":8},"end":{"line":264,"column":22}},"44":{"start":{"line":266,"column":8},"end":{"line":266,"column":53}},"45":{"start":{"line":268,"column":8},"end":{"line":270,"column":9}},"46":{"start":{"line":269,"column":12},"end":{"line":269,"column":72}},"47":{"start":{"line":272,"column":8},"end":{"line":274,"column":9}},"48":{"start":{"line":273,"column":12},"end":{"line":273,"column":47}},"49":{"start":{"line":276,"column":8},"end":{"line":283,"column":9}},"50":{"start":{"line":277,"column":12},"end":{"line":277,"column":24}},"51":{"start":{"line":279,"column":12},"end":{"line":279,"column":30}},"52":{"start":{"line":280,"column":12},"end":{"line":282,"column":13}},"53":{"start":{"line":281,"column":16},"end":{"line":281,"column":29}},"54":{"start":{"line":285,"column":8},"end":{"line":287,"column":9}},"55":{"start":{"line":286,"column":12},"end":{"line":286,"column":27}},"56":{"start":{"line":289,"column":8},"end":{"line":289,"column":49}},"57":{"start":{"line":290,"column":8},"end":{"line":290,"column":40}},"58":{"start":{"line":293,"column":8},"end":{"line":293,"column":28}},"59":{"start":{"line":294,"column":8},"end":{"line":294,"column":28}},"60":{"start":{"line":296,"column":8},"end":{"line":296,"column":25}},"61":{"start":{"line":297,"column":8},"end":{"line":297,"column":34}},"62":{"start":{"line":300,"column":8},"end":{"line":303,"column":10}},"63":{"start":{"line":304,"column":8},"end":{"line":307,"column":10}},"64":{"start":{"line":310,"column":8},"end":{"line":313,"column":10}},"65":{"start":{"line":314,"column":8},"end":{"line":317,"column":10}},"66":{"start":{"line":319,"column":8},"end":{"line":319,"column":25}},"67":{"start":{"line":320,"column":8},"end":{"line":320,"column":41}},"68":{"start":{"line":323,"column":8},"end":{"line":375,"column":11}},"69":{"start":{"line":325,"column":16},"end":{"line":325,"column":51}},"70":{"start":{"line":328,"column":16},"end":{"line":333,"column":18}},"71":{"start":{"line":334,"column":16},"end":{"line":339,"column":18}},"72":{"start":{"line":340,"column":16},"end":{"line":344,"column":29}},"73":{"start":{"line":347,"column":16},"end":{"line":352,"column":18}},"74":{"start":{"line":354,"column":16},"end":{"line":360,"column":27}},"75":{"start":{"line":362,"column":16},"end":{"line":371,"column":17}},"76":{"start":{"line":367,"column":20},"end":{"line":370,"column":31}},"77":{"start":{"line":378,"column":8},"end":{"line":378,"column":46}},"78":{"start":{"line":379,"column":8},"end":{"line":379,"column":40}},"79":{"start":{"line":380,"column":8},"end":{"line":380,"column":53}},"80":{"start":{"line":381,"column":8},"end":{"line":381,"column":47}},"81":{"start":{"line":383,"column":8},"end":{"line":434,"column":10}},"82":{"start":{"line":384,"column":12},"end":{"line":391,"column":47}},"83":{"start":{"line":394,"column":12},"end":{"line":399,"column":14}},"84":{"start":{"line":400,"column":12},"end":{"line":405,"column":14}},"85":{"start":{"line":406,"column":12},"end":{"line":410,"column":25}},"86":{"start":{"line":413,"column":12},"end":{"line":418,"column":14}},"87":{"start":{"line":420,"column":12},"end":{"line":426,"column":23}},"88":{"start":{"line":428,"column":12},"end":{"line":433,"column":13}},"89":{"start":{"line":429,"column":16},"end":{"line":432,"column":27}},"90":{"start":{"line":436,"column":8},"end":{"line":442,"column":9}},"91":{"start":{"line":437,"column":12},"end":{"line":441,"column":15}},"92":{"start":{"line":445,"column":8},"end":{"line":493,"column":11}},"93":{"start":{"line":447,"column":16},"end":{"line":448,"column":51}},"94":{"start":{"line":451,"column":16},"end":{"line":456,"column":18}},"95":{"start":{"line":457,"column":16},"end":{"line":462,"column":18}},"96":{"start":{"line":463,"column":16},"end":{"line":467,"column":29}},"97":{"start":{"line":470,"column":16},"end":{"line":475,"column":18}},"98":{"start":{"line":477,"column":16},"end":{"line":482,"column":17}},"99":{"start":{"line":478,"column":20},"end":{"line":481,"column":31}},"100":{"start":{"line":484,"column":16},"end":{"line":490,"column":27}},"101":{"start":{"line":495,"column":8},"end":{"line":506,"column":9}},"102":{"start":{"line":496,"column":12},"end":{"line":505,"column":15}},"103":{"start":{"line":508,"column":8},"end":{"line":508,"column":25}},"104":{"start":{"line":529,"column":8},"end":{"line":535,"column":21}},"105":{"start":{"line":537,"column":8},"end":{"line":537,"column":51}},"106":{"start":{"line":539,"column":8},"end":{"line":541,"column":9}},"107":{"start":{"line":540,"column":12},"end":{"line":540,"column":22}},"108":{"start":{"line":543,"column":8},"end":{"line":545,"column":9}},"109":{"start":{"line":544,"column":12},"end":{"line":544,"column":37}},"110":{"start":{"line":547,"column":8},"end":{"line":549,"column":9}},"111":{"start":{"line":548,"column":12},"end":{"line":548,"column":39}},"112":{"start":{"line":551,"column":8},"end":{"line":556,"column":10}},"113":{"start":{"line":558,"column":8},"end":{"line":558,"column":75}},"114":{"start":{"line":560,"column":8},"end":{"line":566,"column":10}},"115":{"start":{"line":561,"column":12},"end":{"line":565,"column":23}},"116":{"start":{"line":568,"column":8},"end":{"line":574,"column":10}},"117":{"start":{"line":569,"column":12},"end":{"line":573,"column":23}},"118":{"start":{"line":576,"column":8},"end":{"line":588,"column":9}},"119":{"start":{"line":577,"column":12},"end":{"line":581,"column":15}},"120":{"start":{"line":583,"column":12},"end":{"line":587,"column":15}},"121":{"start":{"line":590,"column":8},"end":{"line":597,"column":9}},"122":{"start":{"line":591,"column":12},"end":{"line":596,"column":15}},"123":{"start":{"line":593,"column":20},"end":{"line":593,"column":76}},"124":{"start":{"line":599,"column":8},"end":{"line":610,"column":9}},"125":{"start":{"line":600,"column":12},"end":{"line":609,"column":15}},"126":{"start":{"line":612,"column":8},"end":{"line":612,"column":25}},"127":{"start":{"line":634,"column":8},"end":{"line":634,"column":17}},"128":{"start":{"line":636,"column":8},"end":{"line":636,"column":51}},"129":{"start":{"line":638,"column":8},"end":{"line":645,"column":9}},"130":{"start":{"line":639,"column":12},"end":{"line":639,"column":26}},"131":{"start":{"line":641,"column":12},"end":{"line":641,"column":38}},"132":{"start":{"line":642,"column":12},"end":{"line":644,"column":13}},"133":{"start":{"line":643,"column":16},"end":{"line":643,"column":66}},"134":{"start":{"line":647,"column":8},"end":{"line":649,"column":9}},"135":{"start":{"line":648,"column":12},"end":{"line":648,"column":47}},"136":{"start":{"line":651,"column":8},"end":{"line":657,"column":9}},"137":{"start":{"line":652,"column":12},"end":{"line":652,"column":47}},"138":{"start":{"line":654,"column":12},"end":{"line":656,"column":13}},"139":{"start":{"line":655,"column":16},"end":{"line":655,"column":55}},"140":{"start":{"line":664,"column":8},"end":{"line":666,"column":9}},"141":{"start":{"line":665,"column":12},"end":{"line":665,"column":70}},"142":{"start":{"line":668,"column":8},"end":{"line":674,"column":10}},"143":{"start":{"line":676,"column":8},"end":{"line":676,"column":39}},"144":{"start":{"line":699,"column":8},"end":{"line":699,"column":26}},"145":{"start":{"line":701,"column":8},"end":{"line":722,"column":9}},"146":{"start":{"line":702,"column":12},"end":{"line":706,"column":14}},"147":{"start":{"line":709,"column":12},"end":{"line":713,"column":13}},"148":{"start":{"line":710,"column":16},"end":{"line":710,"column":61}},"149":{"start":{"line":712,"column":16},"end":{"line":712,"column":69}},"150":{"start":{"line":715,"column":12},"end":{"line":717,"column":13}},"151":{"start":{"line":716,"column":16},"end":{"line":716,"column":52}},"152":{"start":{"line":719,"column":12},"end":{"line":721,"column":13}},"153":{"start":{"line":720,"column":16},"end":{"line":720,"column":31}},"154":{"start":{"line":724,"column":8},"end":{"line":730,"column":9}},"155":{"start":{"line":725,"column":12},"end":{"line":725,"column":46}},"156":{"start":{"line":727,"column":12},"end":{"line":729,"column":13}},"157":{"start":{"line":728,"column":16},"end":{"line":728,"column":54}},"158":{"start":{"line":732,"column":8},"end":{"line":735,"column":10}},"159":{"start":{"line":737,"column":8},"end":{"line":737,"column":48}},"160":{"start":{"line":754,"column":8},"end":{"line":759,"column":22}},"161":{"start":{"line":761,"column":8},"end":{"line":767,"column":9}},"162":{"start":{"line":762,"column":12},"end":{"line":762,"column":46}},"163":{"start":{"line":764,"column":12},"end":{"line":766,"column":13}},"164":{"start":{"line":765,"column":16},"end":{"line":765,"column":54}},"165":{"start":{"line":769,"column":8},"end":{"line":793,"column":9}},"166":{"start":{"line":770,"column":12},"end":{"line":779,"column":14}},"167":{"start":{"line":781,"column":12},"end":{"line":786,"column":13}},"168":{"start":{"line":782,"column":16},"end":{"line":785,"column":18}},"169":{"start":{"line":787,"column":12},"end":{"line":792,"column":13}},"170":{"start":{"line":788,"column":16},"end":{"line":791,"column":18}},"171":{"start":{"line":795,"column":8},"end":{"line":795,"column":49}},"172":{"start":{"line":796,"column":8},"end":{"line":796,"column":40}},"173":{"start":{"line":799,"column":8},"end":{"line":819,"column":11}},"174":{"start":{"line":801,"column":16},"end":{"line":809,"column":23}},"175":{"start":{"line":811,"column":16},"end":{"line":815,"column":27}},"176":{"start":{"line":822,"column":8},"end":{"line":822,"column":46}},"177":{"start":{"line":823,"column":8},"end":{"line":823,"column":52}},"178":{"start":{"line":824,"column":8},"end":{"line":824,"column":52}},"179":{"start":{"line":826,"column":8},"end":{"line":844,"column":10}},"180":{"start":{"line":827,"column":12},"end":{"line":837,"column":19}},"181":{"start":{"line":839,"column":12},"end":{"line":843,"column":23}},"182":{"start":{"line":846,"column":8},"end":{"line":852,"column":9}},"183":{"start":{"line":847,"column":12},"end":{"line":851,"column":15}},"184":{"start":{"line":855,"column":8},"end":{"line":875,"column":11}},"185":{"start":{"line":857,"column":16},"end":{"line":865,"column":23}},"186":{"start":{"line":867,"column":16},"end":{"line":871,"column":27}},"187":{"start":{"line":878,"column":8},"end":{"line":898,"column":11}},"188":{"start":{"line":880,"column":16},"end":{"line":889,"column":19}},"189":{"start":{"line":891,"column":16},"end":{"line":895,"column":27}},"190":{"start":{"line":900,"column":8},"end":{"line":911,"column":9}},"191":{"start":{"line":901,"column":12},"end":{"line":910,"column":15}},"192":{"start":{"line":913,"column":8},"end":{"line":913,"column":25}},"193":{"start":{"line":924,"column":8},"end":{"line":926,"column":9}},"194":{"start":{"line":925,"column":12},"end":{"line":925,"column":55}},"195":{"start":{"line":928,"column":8},"end":{"line":928,"column":30}},"196":{"start":{"line":949,"column":8},"end":{"line":951,"column":24}},"197":{"start":{"line":953,"column":8},"end":{"line":1008,"column":9}},"198":{"start":{"line":954,"column":12},"end":{"line":1005,"column":13}},"199":{"start":{"line":955,"column":16},"end":{"line":967,"column":19}},"200":{"start":{"line":956,"column":20},"end":{"line":956,"column":65}},"201":{"start":{"line":956,"column":43},"end":{"line":956,"column":64}},"202":{"start":{"line":957,"column":20},"end":{"line":957,"column":55}},"203":{"start":{"line":957,"column":38},"end":{"line":957,"column":54}},"204":{"start":{"line":958,"column":20},"end":{"line":958,"column":55}},"205":{"start":{"line":958,"column":38},"end":{"line":958,"column":54}},"206":{"start":{"line":959,"column":20},"end":{"line":959,"column":59}},"207":{"start":{"line":959,"column":40},"end":{"line":959,"column":58}},"208":{"start":{"line":960,"column":20},"end":{"line":960,"column":59}},"209":{"start":{"line":960,"column":40},"end":{"line":960,"column":58}},"210":{"start":{"line":962,"column":20},"end":{"line":966,"column":55}},"211":{"start":{"line":969,"column":16},"end":{"line":969,"column":78}},"212":{"start":{"line":970,"column":19},"end":{"line":1005,"column":13}},"213":{"start":{"line":971,"column":16},"end":{"line":971,"column":79}},"214":{"start":{"line":980,"column":16},"end":{"line":980,"column":31}},"215":{"start":{"line":981,"column":16},"end":{"line":1000,"column":19}},"216":{"start":{"line":982,"column":20},"end":{"line":982,"column":65}},"217":{"start":{"line":982,"column":43},"end":{"line":982,"column":64}},"218":{"start":{"line":983,"column":20},"end":{"line":983,"column":60}},"219":{"start":{"line":983,"column":41},"end":{"line":983,"column":59}},"220":{"start":{"line":984,"column":20},"end":{"line":984,"column":60}},"221":{"start":{"line":984,"column":41},"end":{"line":984,"column":59}},"222":{"start":{"line":985,"column":20},"end":{"line":985,"column":58}},"223":{"start":{"line":985,"column":41},"end":{"line":985,"column":57}},"224":{"start":{"line":986,"column":20},"end":{"line":986,"column":58}},"225":{"start":{"line":986,"column":41},"end":{"line":986,"column":57}},"226":{"start":{"line":987,"column":20},"end":{"line":987,"column":60}},"227":{"start":{"line":987,"column":41},"end":{"line":987,"column":59}},"228":{"start":{"line":988,"column":20},"end":{"line":988,"column":60}},"229":{"start":{"line":988,"column":41},"end":{"line":988,"column":59}},"230":{"start":{"line":990,"column":20},"end":{"line":999,"column":23}},"231":{"start":{"line":1002,"column":16},"end":{"line":1004,"column":18}},"232":{"start":{"line":1003,"column":20},"end":{"line":1003,"column":40}},"233":{"start":{"line":1007,"column":12},"end":{"line":1007,"column":57}},"234":{"start":{"line":1010,"column":8},"end":{"line":1010,"column":25}},"235":{"start":{"line":1023,"column":8},"end":{"line":1023,"column":20}},"236":{"start":{"line":1025,"column":8},"end":{"line":1063,"column":9}},"237":{"start":{"line":1026,"column":12},"end":{"line":1059,"column":13}},"238":{"start":{"line":1027,"column":16},"end":{"line":1027,"column":56}},"239":{"start":{"line":1031,"column":16},"end":{"line":1058,"column":17}},"240":{"start":{"line":1032,"column":20},"end":{"line":1036,"column":28}},"241":{"start":{"line":1038,"column":20},"end":{"line":1038,"column":39}},"242":{"start":{"line":1039,"column":20},"end":{"line":1039,"column":49}},"243":{"start":{"line":1042,"column":20},"end":{"line":1042,"column":92}},"244":{"start":{"line":1044,"column":20},"end":{"line":1049,"column":29}},"245":{"start":{"line":1051,"column":20},"end":{"line":1051,"column":60}},"246":{"start":{"line":1053,"column":20},"end":{"line":1055,"column":21}},"247":{"start":{"line":1054,"column":24},"end":{"line":1054,"column":71}},"248":{"start":{"line":1057,"column":20},"end":{"line":1057,"column":136}},"249":{"start":{"line":1062,"column":12},"end":{"line":1062,"column":52}},"250":{"start":{"line":1075,"column":8},"end":{"line":1077,"column":61}},"251":{"start":{"line":1084,"column":0},"end":{"line":1084,"column":34}},"252":{"start":{"line":1091,"column":0},"end":{"line":1091,"column":40}},"253":{"start":{"line":1096,"column":0},"end":{"line":1096,"column":44}},"254":{"start":{"line":1262,"column":0},"end":{"line":1318,"column":2}},"255":{"start":{"line":1264,"column":4},"end":{"line":1264,"column":23}},"256":{"start":{"line":1266,"column":4},"end":{"line":1266,"column":44}},"257":{"start":{"line":1267,"column":4},"end":{"line":1267,"column":30}},"258":{"start":{"line":1269,"column":4},"end":{"line":1272,"column":5}},"259":{"start":{"line":1270,"column":8},"end":{"line":1270,"column":21}},"260":{"start":{"line":1271,"column":8},"end":{"line":1271,"column":21}},"261":{"start":{"line":1274,"column":4},"end":{"line":1274,"column":28}},"262":{"start":{"line":1276,"column":4},"end":{"line":1317,"column":5}},"263":{"start":{"line":1277,"column":8},"end":{"line":1314,"column":9}},"264":{"start":{"line":1280,"column":16},"end":{"line":1280,"column":87}},"265":{"start":{"line":1281,"column":16},"end":{"line":1281,"column":22}},"266":{"start":{"line":1283,"column":16},"end":{"line":1283,"column":46}},"267":{"start":{"line":1284,"column":16},"end":{"line":1284,"column":22}},"268":{"start":{"line":1286,"column":16},"end":{"line":1292,"column":17}},"269":{"start":{"line":1287,"column":20},"end":{"line":1287,"column":55}},"270":{"start":{"line":1288,"column":23},"end":{"line":1292,"column":17}},"271":{"start":{"line":1289,"column":20},"end":{"line":1289,"column":59}},"272":{"start":{"line":1290,"column":23},"end":{"line":1292,"column":17}},"273":{"start":{"line":1291,"column":20},"end":{"line":1291,"column":59}},"274":{"start":{"line":1293,"column":16},"end":{"line":1293,"column":60}},"275":{"start":{"line":1294,"column":16},"end":{"line":1294,"column":22}},"276":{"start":{"line":1298,"column":16},"end":{"line":1298,"column":61}},"277":{"start":{"line":1299,"column":16},"end":{"line":1299,"column":22}},"278":{"start":{"line":1301,"column":16},"end":{"line":1302,"column":38}},"279":{"start":{"line":1303,"column":16},"end":{"line":1303,"column":22}},"280":{"start":{"line":1307,"column":16},"end":{"line":1308,"column":71}},"281":{"start":{"line":1309,"column":16},"end":{"line":1309,"column":22}},"282":{"start":{"line":1311,"column":16},"end":{"line":1312,"column":71}},"283":{"start":{"line":1313,"column":16},"end":{"line":1313,"column":22}},"284":{"start":{"line":1316,"column":8},"end":{"line":1316,"column":68}}},"branchMap":{"1":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":23},"end":{"line":13,"column":35}},{"start":{"line":13,"column":40},"end":{"line":13,"column":70}},{"start":{"line":13,"column":76},"end":{"line":13,"column":93}},{"start":{"line":13,"column":97},"end":{"line":13,"column":130}}]},"2":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":99},"end":{"line":13,"column":110}},{"start":{"line":13,"column":114},"end":{"line":13,"column":129}}]},"3":{"line":84,"type":"if","locations":[{"start":{"line":84,"column":4},"end":{"line":84,"column":4}},{"start":{"line":84,"column":4},"end":{"line":84,"column":4}}]},"4":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":8}},{"start":{"line":126,"column":8},"end":{"line":126,"column":8}}]},"5":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":12},"end":{"line":129,"column":12}},{"start":{"line":129,"column":12},"end":{"line":129,"column":12}}]},"6":{"line":136,"type":"if","locations":[{"start":{"line":136,"column":12},"end":{"line":136,"column":12}},{"start":{"line":136,"column":12},"end":{"line":136,"column":12}}]},"7":{"line":164,"type":"if","locations":[{"start":{"line":164,"column":8},"end":{"line":164,"column":8}},{"start":{"line":164,"column":8},"end":{"line":164,"column":8}}]},"8":{"line":164,"type":"binary-expr","locations":[{"start":{"line":164,"column":11},"end":{"line":164,"column":33}},{"start":{"line":164,"column":37},"end":{"line":164,"column":55}}]},"9":{"line":167,"type":"if","locations":[{"start":{"line":167,"column":12},"end":{"line":167,"column":12}},{"start":{"line":167,"column":12},"end":{"line":167,"column":12}}]},"10":{"line":207,"type":"if","locations":[{"start":{"line":207,"column":8},"end":{"line":207,"column":8}},{"start":{"line":207,"column":8},"end":{"line":207,"column":8}}]},"11":{"line":207,"type":"binary-expr","locations":[{"start":{"line":207,"column":11},"end":{"line":207,"column":31}},{"start":{"line":207,"column":35},"end":{"line":207,"column":55}},{"start":{"line":207,"column":59},"end":{"line":207,"column":63}},{"start":{"line":207,"column":67},"end":{"line":207,"column":71}}]},"12":{"line":208,"type":"cond-expr","locations":[{"start":{"line":209,"column":16},"end":{"line":209,"column":41}},{"start":{"line":209,"column":44},"end":{"line":209,"column":70}}]},"13":{"line":215,"type":"if","locations":[{"start":{"line":215,"column":8},"end":{"line":215,"column":8}},{"start":{"line":215,"column":8},"end":{"line":215,"column":8}}]},"14":{"line":268,"type":"if","locations":[{"start":{"line":268,"column":8},"end":{"line":268,"column":8}},{"start":{"line":268,"column":8},"end":{"line":268,"column":8}}]},"15":{"line":268,"type":"binary-expr","locations":[{"start":{"line":268,"column":11},"end":{"line":268,"column":31}},{"start":{"line":268,"column":35},"end":{"line":268,"column":55}},{"start":{"line":268,"column":59},"end":{"line":268,"column":63}},{"start":{"line":268,"column":67},"end":{"line":268,"column":71}}]},"16":{"line":272,"type":"if","locations":[{"start":{"line":272,"column":8},"end":{"line":272,"column":8}},{"start":{"line":272,"column":8},"end":{"line":272,"column":8}}]},"17":{"line":272,"type":"binary-expr","locations":[{"start":{"line":272,"column":11},"end":{"line":272,"column":37}},{"start":{"line":272,"column":41},"end":{"line":272,"column":54}}]},"18":{"line":276,"type":"if","locations":[{"start":{"line":276,"column":8},"end":{"line":276,"column":8}},{"start":{"line":276,"column":8},"end":{"line":276,"column":8}}]},"19":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":8},"end":{"line":285,"column":8}},{"start":{"line":285,"column":8},"end":{"line":285,"column":8}}]},"20":{"line":362,"type":"if","locations":[{"start":{"line":362,"column":16},"end":{"line":362,"column":16}},{"start":{"line":362,"column":16},"end":{"line":362,"column":16}}]},"21":{"line":428,"type":"if","locations":[{"start":{"line":428,"column":12},"end":{"line":428,"column":12}},{"start":{"line":428,"column":12},"end":{"line":428,"column":12}}]},"22":{"line":477,"type":"if","locations":[{"start":{"line":477,"column":16},"end":{"line":477,"column":16}},{"start":{"line":477,"column":16},"end":{"line":477,"column":16}}]},"23":{"line":495,"type":"if","locations":[{"start":{"line":495,"column":8},"end":{"line":495,"column":8}},{"start":{"line":495,"column":8},"end":{"line":495,"column":8}}]},"24":{"line":495,"type":"binary-expr","locations":[{"start":{"line":495,"column":11},"end":{"line":495,"column":13}},{"start":{"line":495,"column":17},"end":{"line":495,"column":38}}]},"25":{"line":539,"type":"if","locations":[{"start":{"line":539,"column":8},"end":{"line":539,"column":8}},{"start":{"line":539,"column":8},"end":{"line":539,"column":8}}]},"26":{"line":539,"type":"binary-expr","locations":[{"start":{"line":539,"column":11},"end":{"line":539,"column":34}},{"start":{"line":539,"column":38},"end":{"line":539,"column":47}}]},"27":{"line":543,"type":"if","locations":[{"start":{"line":543,"column":8},"end":{"line":543,"column":8}},{"start":{"line":543,"column":8},"end":{"line":543,"column":8}}]},"28":{"line":547,"type":"if","locations":[{"start":{"line":547,"column":8},"end":{"line":547,"column":8}},{"start":{"line":547,"column":8},"end":{"line":547,"column":8}}]},"29":{"line":580,"type":"cond-expr","locations":[{"start":{"line":580,"column":36},"end":{"line":580,"column":37}},{"start":{"line":580,"column":40},"end":{"line":580,"column":45}}]},"30":{"line":590,"type":"if","locations":[{"start":{"line":590,"column":8},"end":{"line":590,"column":8}},{"start":{"line":590,"column":8},"end":{"line":590,"column":8}}]},"31":{"line":590,"type":"binary-expr","locations":[{"start":{"line":590,"column":11},"end":{"line":590,"column":20}},{"start":{"line":590,"column":24},"end":{"line":590,"column":39}}]},"32":{"line":599,"type":"if","locations":[{"start":{"line":599,"column":8},"end":{"line":599,"column":8}},{"start":{"line":599,"column":8},"end":{"line":599,"column":8}}]},"33":{"line":599,"type":"binary-expr","locations":[{"start":{"line":599,"column":11},"end":{"line":599,"column":13}},{"start":{"line":599,"column":17},"end":{"line":599,"column":38}}]},"34":{"line":638,"type":"if","locations":[{"start":{"line":638,"column":8},"end":{"line":638,"column":8}},{"start":{"line":638,"column":8},"end":{"line":638,"column":8}}]},"35":{"line":642,"type":"if","locations":[{"start":{"line":642,"column":12},"end":{"line":642,"column":12}},{"start":{"line":642,"column":12},"end":{"line":642,"column":12}}]},"36":{"line":642,"type":"binary-expr","locations":[{"start":{"line":642,"column":15},"end":{"line":642,"column":30}},{"start":{"line":642,"column":34},"end":{"line":642,"column":49}}]},"37":{"line":647,"type":"if","locations":[{"start":{"line":647,"column":8},"end":{"line":647,"column":8}},{"start":{"line":647,"column":8},"end":{"line":647,"column":8}}]},"38":{"line":651,"type":"if","locations":[{"start":{"line":651,"column":8},"end":{"line":651,"column":8}},{"start":{"line":651,"column":8},"end":{"line":651,"column":8}}]},"39":{"line":654,"type":"if","locations":[{"start":{"line":654,"column":12},"end":{"line":654,"column":12}},{"start":{"line":654,"column":12},"end":{"line":654,"column":12}}]},"40":{"line":664,"type":"if","locations":[{"start":{"line":664,"column":8},"end":{"line":664,"column":8}},{"start":{"line":664,"column":8},"end":{"line":664,"column":8}}]},"41":{"line":671,"type":"cond-expr","locations":[{"start":{"line":671,"column":36},"end":{"line":671,"column":53}},{"start":{"line":671,"column":56},"end":{"line":671,"column":64}}]},"42":{"line":672,"type":"cond-expr","locations":[{"start":{"line":672,"column":36},"end":{"line":672,"column":53}},{"start":{"line":672,"column":56},"end":{"line":672,"column":64}}]},"43":{"line":701,"type":"if","locations":[{"start":{"line":701,"column":8},"end":{"line":701,"column":8}},{"start":{"line":701,"column":8},"end":{"line":701,"column":8}}]},"44":{"line":709,"type":"if","locations":[{"start":{"line":709,"column":12},"end":{"line":709,"column":12}},{"start":{"line":709,"column":12},"end":{"line":709,"column":12}}]},"45":{"line":715,"type":"if","locations":[{"start":{"line":715,"column":12},"end":{"line":715,"column":12}},{"start":{"line":715,"column":12},"end":{"line":715,"column":12}}]},"46":{"line":719,"type":"if","locations":[{"start":{"line":719,"column":12},"end":{"line":719,"column":12}},{"start":{"line":719,"column":12},"end":{"line":719,"column":12}}]},"47":{"line":724,"type":"if","locations":[{"start":{"line":724,"column":8},"end":{"line":724,"column":8}},{"start":{"line":724,"column":8},"end":{"line":724,"column":8}}]},"48":{"line":727,"type":"if","locations":[{"start":{"line":727,"column":12},"end":{"line":727,"column":12}},{"start":{"line":727,"column":12},"end":{"line":727,"column":12}}]},"49":{"line":761,"type":"if","locations":[{"start":{"line":761,"column":8},"end":{"line":761,"column":8}},{"start":{"line":761,"column":8},"end":{"line":761,"column":8}}]},"50":{"line":764,"type":"if","locations":[{"start":{"line":764,"column":12},"end":{"line":764,"column":12}},{"start":{"line":764,"column":12},"end":{"line":764,"column":12}}]},"51":{"line":769,"type":"if","locations":[{"start":{"line":769,"column":8},"end":{"line":769,"column":8}},{"start":{"line":769,"column":8},"end":{"line":769,"column":8}}]},"52":{"line":781,"type":"if","locations":[{"start":{"line":781,"column":12},"end":{"line":781,"column":12}},{"start":{"line":781,"column":12},"end":{"line":781,"column":12}}]},"53":{"line":787,"type":"if","locations":[{"start":{"line":787,"column":12},"end":{"line":787,"column":12}},{"start":{"line":787,"column":12},"end":{"line":787,"column":12}}]},"54":{"line":900,"type":"if","locations":[{"start":{"line":900,"column":8},"end":{"line":900,"column":8}},{"start":{"line":900,"column":8},"end":{"line":900,"column":8}}]},"55":{"line":900,"type":"binary-expr","locations":[{"start":{"line":900,"column":11},"end":{"line":900,"column":13}},{"start":{"line":900,"column":17},"end":{"line":900,"column":38}}]},"56":{"line":924,"type":"if","locations":[{"start":{"line":924,"column":8},"end":{"line":924,"column":8}},{"start":{"line":924,"column":8},"end":{"line":924,"column":8}}]},"57":{"line":953,"type":"if","locations":[{"start":{"line":953,"column":8},"end":{"line":953,"column":8}},{"start":{"line":953,"column":8},"end":{"line":953,"column":8}}]},"58":{"line":953,"type":"binary-expr","locations":[{"start":{"line":953,"column":11},"end":{"line":953,"column":24}},{"start":{"line":953,"column":28},"end":{"line":953,"column":55}}]},"59":{"line":954,"type":"if","locations":[{"start":{"line":954,"column":12},"end":{"line":954,"column":12}},{"start":{"line":954,"column":12},"end":{"line":954,"column":12}}]},"60":{"line":954,"type":"binary-expr","locations":[{"start":{"line":954,"column":15},"end":{"line":954,"column":27}},{"start":{"line":954,"column":31},"end":{"line":954,"column":50}},{"start":{"line":954,"column":54},"end":{"line":954,"column":62}},{"start":{"line":954,"column":66},"end":{"line":954,"column":81}}]},"61":{"line":956,"type":"if","locations":[{"start":{"line":956,"column":20},"end":{"line":956,"column":20}},{"start":{"line":956,"column":20},"end":{"line":956,"column":20}}]},"62":{"line":957,"type":"if","locations":[{"start":{"line":957,"column":20},"end":{"line":957,"column":20}},{"start":{"line":957,"column":20},"end":{"line":957,"column":20}}]},"63":{"line":958,"type":"if","locations":[{"start":{"line":958,"column":20},"end":{"line":958,"column":20}},{"start":{"line":958,"column":20},"end":{"line":958,"column":20}}]},"64":{"line":959,"type":"if","locations":[{"start":{"line":959,"column":20},"end":{"line":959,"column":20}},{"start":{"line":959,"column":20},"end":{"line":959,"column":20}}]},"65":{"line":960,"type":"if","locations":[{"start":{"line":960,"column":20},"end":{"line":960,"column":20}},{"start":{"line":960,"column":20},"end":{"line":960,"column":20}}]},"66":{"line":970,"type":"if","locations":[{"start":{"line":970,"column":19},"end":{"line":970,"column":19}},{"start":{"line":970,"column":19},"end":{"line":970,"column":19}}]},"67":{"line":970,"type":"binary-expr","locations":[{"start":{"line":970,"column":22},"end":{"line":970,"column":30}},{"start":{"line":970,"column":34},"end":{"line":970,"column":48}}]},"68":{"line":982,"type":"if","locations":[{"start":{"line":982,"column":20},"end":{"line":982,"column":20}},{"start":{"line":982,"column":20},"end":{"line":982,"column":20}}]},"69":{"line":983,"type":"if","locations":[{"start":{"line":983,"column":20},"end":{"line":983,"column":20}},{"start":{"line":983,"column":20},"end":{"line":983,"column":20}}]},"70":{"line":984,"type":"if","locations":[{"start":{"line":984,"column":20},"end":{"line":984,"column":20}},{"start":{"line":984,"column":20},"end":{"line":984,"column":20}}]},"71":{"line":985,"type":"if","locations":[{"start":{"line":985,"column":20},"end":{"line":985,"column":20}},{"start":{"line":985,"column":20},"end":{"line":985,"column":20}}]},"72":{"line":986,"type":"if","locations":[{"start":{"line":986,"column":20},"end":{"line":986,"column":20}},{"start":{"line":986,"column":20},"end":{"line":986,"column":20}}]},"73":{"line":987,"type":"if","locations":[{"start":{"line":987,"column":20},"end":{"line":987,"column":20}},{"start":{"line":987,"column":20},"end":{"line":987,"column":20}}]},"74":{"line":988,"type":"if","locations":[{"start":{"line":988,"column":20},"end":{"line":988,"column":20}},{"start":{"line":988,"column":20},"end":{"line":988,"column":20}}]},"75":{"line":1025,"type":"if","locations":[{"start":{"line":1025,"column":8},"end":{"line":1025,"column":8}},{"start":{"line":1025,"column":8},"end":{"line":1025,"column":8}}]},"76":{"line":1026,"type":"if","locations":[{"start":{"line":1026,"column":12},"end":{"line":1026,"column":12}},{"start":{"line":1026,"column":12},"end":{"line":1026,"column":12}}]},"77":{"line":1031,"type":"if","locations":[{"start":{"line":1031,"column":16},"end":{"line":1031,"column":16}},{"start":{"line":1031,"column":16},"end":{"line":1031,"column":16}}]},"78":{"line":1042,"type":"cond-expr","locations":[{"start":{"line":1042,"column":51},"end":{"line":1042,"column":73}},{"start":{"line":1042,"column":76},"end":{"line":1042,"column":91}}]},"79":{"line":1053,"type":"if","locations":[{"start":{"line":1053,"column":20},"end":{"line":1053,"column":20}},{"start":{"line":1053,"column":20},"end":{"line":1053,"column":20}}]},"80":{"line":1075,"type":"binary-expr","locations":[{"start":{"line":1075,"column":16},"end":{"line":1075,"column":23}},{"start":{"line":1075,"column":28},"end":{"line":1075,"column":47}},{"start":{"line":1076,"column":13},"end":{"line":1076,"column":26}},{"start":{"line":1076,"column":31},"end":{"line":1076,"column":56}},{"start":{"line":1077,"column":13},"end":{"line":1077,"column":27}},{"start":{"line":1077,"column":32},"end":{"line":1077,"column":58}}]},"81":{"line":1269,"type":"if","locations":[{"start":{"line":1269,"column":4},"end":{"line":1269,"column":4}},{"start":{"line":1269,"column":4},"end":{"line":1269,"column":4}}]},"82":{"line":1269,"type":"binary-expr","locations":[{"start":{"line":1269,"column":7},"end":{"line":1269,"column":10}},{"start":{"line":1269,"column":14},"end":{"line":1269,"column":40}}]},"83":{"line":1274,"type":"binary-expr","locations":[{"start":{"line":1274,"column":14},"end":{"line":1274,"column":21}},{"start":{"line":1274,"column":25},"end":{"line":1274,"column":27}}]},"84":{"line":1276,"type":"if","locations":[{"start":{"line":1276,"column":4},"end":{"line":1276,"column":4}},{"start":{"line":1276,"column":4},"end":{"line":1276,"column":4}}]},"85":{"line":1277,"type":"switch","locations":[{"start":{"line":1279,"column":12},"end":{"line":1281,"column":22}},{"start":{"line":1282,"column":12},"end":{"line":1284,"column":22}},{"start":{"line":1285,"column":12},"end":{"line":1294,"column":22}},{"start":{"line":1297,"column":12},"end":{"line":1299,"column":22}},{"start":{"line":1300,"column":12},"end":{"line":1303,"column":22}},{"start":{"line":1306,"column":12},"end":{"line":1309,"column":22}},{"start":{"line":1310,"column":12},"end":{"line":1313,"column":22}}]},"86":{"line":1286,"type":"if","locations":[{"start":{"line":1286,"column":16},"end":{"line":1286,"column":16}},{"start":{"line":1286,"column":16},"end":{"line":1286,"column":16}}]},"87":{"line":1288,"type":"if","locations":[{"start":{"line":1288,"column":23},"end":{"line":1288,"column":23}},{"start":{"line":1288,"column":23},"end":{"line":1288,"column":23}}]},"88":{"line":1290,"type":"if","locations":[{"start":{"line":1290,"column":23},"end":{"line":1290,"column":23}},{"start":{"line":1290,"column":23},"end":{"line":1290,"column":23}}]}},"code":["(function () { YUI.add('gesture-simulate', function (Y, NAME) {","","/**"," * Simulate high-level user gestures by generating a set of native DOM events."," *"," * @module gesture-simulate"," * @requires event-simulate, async-queue, node-screen"," */","","var NAME = \"gesture-simulate\",",""," // phantomjs check may be temporary, until we determine if it really support touch all the way through, like it claims to (http://code.google.com/p/phantomjs/issues/detail?id=375)"," SUPPORTS_TOUCH = ((Y.config.win && (\"ontouchstart\" in Y.config.win)) && !(Y.UA.phantomjs) && !(Y.UA.chrome && Y.UA.chrome < 6)),",""," gestureNames = {"," tap: 1,"," doubletap: 1,"," press: 1,"," move: 1,"," flick: 1,"," pinch: 1,"," rotate: 1"," },",""," touchEvents = {"," touchstart: 1,"," touchmove: 1,"," touchend: 1,"," touchcancel: 1"," },",""," document = Y.config.doc,"," emptyTouchList,",""," EVENT_INTERVAL = 20, // 20ms"," START_PAGEX, // will be adjusted to the node element center"," START_PAGEY, // will be adjusted to the node element center",""," // defaults that user can override."," DEFAULTS = {"," // tap gestures"," HOLD_TAP: 10, // 10ms"," DELAY_TAP: 10, // 10ms",""," // press gesture"," HOLD_PRESS: 3000, // 3sec"," MIN_HOLD_PRESS: 1000, // 1sec"," MAX_HOLD_PRESS: 60000, // 1min",""," // move gesture"," DISTANCE_MOVE: 200, // 200 pixels"," DURATION_MOVE: 1000, // 1sec"," MAX_DURATION_MOVE: 5000,// 5sec",""," // flick gesture"," MIN_VELOCITY_FLICK: 1.3,"," DISTANCE_FLICK: 200, // 200 pixels"," DURATION_FLICK: 1000, // 1sec"," MAX_DURATION_FLICK: 5000,// 5sec",""," // pinch/rotation"," DURATION_PINCH: 1000 // 1sec"," },",""," TOUCH_START = 'touchstart',"," TOUCH_MOVE = 'touchmove',"," TOUCH_END = 'touchend',",""," GESTURE_START = 'gesturestart',"," GESTURE_CHANGE = 'gesturechange',"," GESTURE_END = 'gestureend',",""," MOUSE_UP = 'mouseup',"," MOUSE_MOVE = 'mousemove',"," MOUSE_DOWN = 'mousedown',"," MOUSE_CLICK = 'click',"," MOUSE_DBLCLICK = 'dblclick',",""," X_AXIS = 'x',"," Y_AXIS = 'y';","","","function Simulations(node) {"," if(!node) {"," Y.error(NAME+': invalid target node');"," }"," this.node = node;"," this.target = Y.Node.getDOMNode(node);",""," var startXY = this.node.getXY(),"," dims = this._getDims();",""," START_PAGEX = startXY[0] + (dims[0])/2;"," START_PAGEY = startXY[1] + (dims[1])/2;","}","","Simulations.prototype = {",""," /**"," * Helper method to convert a degree to a radian."," *"," * @method _toRadian"," * @private"," * @param {Number} deg A degree to be converted to a radian."," * @return {Number} The degree in radian."," */"," _toRadian: function(deg) {"," return deg * (Math.PI/180);"," },",""," /**"," * Helper method to get height/width while accounting for"," * rotation/scale transforms where possible by using the"," * bounding client rectangle height/width instead of the"," * offsetWidth/Height which region uses."," * @method _getDims"," * @private"," * @return {Array} Array with [height, width]"," */"," _getDims : function() {"," var region,"," width,"," height;",""," // Ideally, this should be in DOM somewhere."," if (this.target.getBoundingClientRect) {"," region = this.target.getBoundingClientRect();",""," if (\"height\" in region) {"," height = region.height;"," } else {"," // IE7,8 has getBCR, but no height."," height = Math.abs(region.bottom - region.top);"," }",""," if (\"width\" in region) {"," width = region.width;"," } else {"," // IE7,8 has getBCR, but no width."," width = Math.abs(region.right - region.left);"," }"," } else {"," region = this.node.get(\"region\");"," width = region.width;"," height = region.height;"," }",""," return [width, height];"," },",""," /**"," * Helper method to convert a point relative to the node element into"," * the point in the page coordination."," *"," * @method _calculateDefaultPoint"," * @private"," * @param {Array} point A point relative to the node element."," * @return {Array} The same point in the page coordination."," */"," _calculateDefaultPoint: function(point) {",""," var height;",""," if(!Y.Lang.isArray(point) || point.length === 0) {"," point = [START_PAGEX, START_PAGEY];"," } else {"," if(point.length == 1) {"," height = this._getDims[1];"," point[1] = height/2;"," }"," // convert to page(viewport) coordination"," point[0] = this.node.getX() + point[0];"," point[1] = this.node.getY() + point[1];"," }",""," return point;"," },",""," /**"," * The \"rotate\" and \"pinch\" methods are essencially same with the exact same"," * arguments. Only difference is the required parameters. The rotate method"," * requires \"rotation\" parameter while the pinch method requires \"startRadius\""," * and \"endRadius\" parameters."," *"," * @method rotate"," * @param {Function} cb The callback to execute when the gesture simulation"," * is completed."," * @param {Array} center A center point where the pinch gesture of two fingers"," * should happen. It is relative to the top left corner of the target"," * node element."," * @param {Number} startRadius A radius of start circle where 2 fingers are"," * on when the gesture starts. This is optional. The default is a fourth of"," * either target node width or height whichever is smaller."," * @param {Number} endRadius A radius of end circle where 2 fingers will be on when"," * the pinch or spread gestures are completed. This is optional."," * The default is a fourth of either target node width or height whichever is less."," * @param {Number} duration A duration of the gesture in millisecond."," * @param {Number} start A start angle(0 degree at 12 o'clock) where the"," * gesture should start. Default is 0."," * @param {Number} rotation A rotation in degree. It is required."," */"," rotate: function(cb, center, startRadius, endRadius, duration, start, rotation) {"," var radius,"," r1 = startRadius, // optional"," r2 = endRadius; // optional",""," if(!Y.Lang.isNumber(r1) || !Y.Lang.isNumber(r2) || r1<0 || r2<0) {"," radius = (this.target.offsetWidth < this.target.offsetHeight)?"," this.target.offsetWidth/4 : this.target.offsetHeight/4;"," r1 = radius;"," r2 = radius;"," }",""," // required"," if(!Y.Lang.isNumber(rotation)) {"," Y.error(NAME+'Invalid rotation detected.');"," }",""," this.pinch(cb, center, r1, r2, duration, start, rotation);"," },",""," /**"," * The \"rotate\" and \"pinch\" methods are essencially same with the exact same"," * arguments. Only difference is the required parameters. The rotate method"," * requires \"rotation\" parameter while the pinch method requires \"startRadius\""," * and \"endRadius\" parameters."," *"," * The \"pinch\" gesture can simulate various 2 finger gestures such as pinch,"," * spread and/or rotation. The \"startRadius\" and \"endRadius\" are required."," * If endRadius is larger than startRadius, it becomes a spread gesture"," * otherwise a pinch gesture."," *"," * @method pinch"," * @param {Function} cb The callback to execute when the gesture simulation"," * is completed."," * @param {Array} center A center point where the pinch gesture of two fingers"," * should happen. It is relative to the top left corner of the target"," * node element."," * @param {Number} startRadius A radius of start circle where 2 fingers are"," * on when the gesture starts. This paramenter is required."," * @param {Number} endRadius A radius of end circle where 2 fingers will be on when"," * the pinch or spread gestures are completed. This parameter is required."," * @param {Number} duration A duration of the gesture in millisecond."," * @param {Number} start A start angle(0 degree at 12 o'clock) where the"," * gesture should start. Default is 0."," * @param {Number} rotation If rotation is desired during the pinch or"," * spread gestures, this parameter can be used. Default is 0 degree."," */"," pinch: function(cb, center, startRadius, endRadius, duration, start, rotation) {"," var eventQueue,"," i,"," interval = EVENT_INTERVAL,"," touches,"," id = 0,"," r1 = startRadius, // required"," r2 = endRadius, // required"," radiusPerStep,"," centerX, centerY,"," startScale, endScale, scalePerStep,"," startRot, endRot, rotPerStep,"," path1 = {start: [], end: []}, // paths for 1st and 2nd fingers."," path2 = {start: [], end: []},"," steps,"," touchMove;",""," center = this._calculateDefaultPoint(center);",""," if(!Y.Lang.isNumber(r1) || !Y.Lang.isNumber(r2) || r1<0 || r2<0) {"," Y.error(NAME+'Invalid startRadius and endRadius detected.');"," }",""," if(!Y.Lang.isNumber(duration) || duration <= 0) {"," duration = DEFAULTS.DURATION_PINCH;"," }",""," if(!Y.Lang.isNumber(start)) {"," start = 0.0;"," } else {"," start = start%360;"," while(start < 0) {"," start += 360;"," }"," }",""," if(!Y.Lang.isNumber(rotation)) {"," rotation = 0.0;"," }",""," Y.AsyncQueue.defaults.timeout = interval;"," eventQueue = new Y.AsyncQueue();",""," // range determination"," centerX = center[0];"," centerY = center[1];",""," startRot = start;"," endRot = start + rotation;",""," // 1st finger path"," path1.start = ["," centerX + r1*Math.sin(this._toRadian(startRot)),"," centerY - r1*Math.cos(this._toRadian(startRot))"," ];"," path1.end = ["," centerX + r2*Math.sin(this._toRadian(endRot)),"," centerY - r2*Math.cos(this._toRadian(endRot))"," ];",""," // 2nd finger path"," path2.start = ["," centerX - r1*Math.sin(this._toRadian(startRot)),"," centerY + r1*Math.cos(this._toRadian(startRot))"," ];"," path2.end = ["," centerX - r2*Math.sin(this._toRadian(endRot)),"," centerY + r2*Math.cos(this._toRadian(endRot))"," ];",""," startScale = 1.0;"," endScale = endRadius/startRadius;",""," // touch/gesture start"," eventQueue.add({"," fn: function() {"," var coord1, coord2, coord, touches;",""," // coordinate for each touch object."," coord1 = {"," pageX: path1.start[0],"," pageY: path1.start[1],"," clientX: path1.start[0],"," clientY: path1.start[1]"," };"," coord2 = {"," pageX: path2.start[0],"," pageY: path2.start[1],"," clientX: path2.start[0],"," clientY: path2.start[1]"," };"," touches = this._createTouchList([Y.merge({"," identifier: (id++)"," }, coord1), Y.merge({"," identifier: (id++)"," }, coord2)]);",""," // coordinate for top level event"," coord = {"," pageX: (path1.start[0] + path2.start[0])/2,"," pageY: (path1.start[0] + path2.start[1])/2,"," clientX: (path1.start[0] + path2.start[0])/2,"," clientY: (path1.start[0] + path2.start[1])/2"," };",""," this._simulateEvent(this.target, TOUCH_START, Y.merge({"," touches: touches,"," targetTouches: touches,"," changedTouches: touches,"," scale: startScale,"," rotation: startRot"," }, coord));",""," if(Y.UA.ios >= 2.0) {"," /* gesture starts when the 2nd finger touch starts."," * The implementation will fire 1 touch start event for both fingers,"," * simulating 2 fingers touched on the screen at the same time."," */"," this._simulateEvent(this.target, GESTURE_START, Y.merge({"," scale: startScale,"," rotation: startRot"," }, coord));"," }"," },"," timeout: 0,"," context: this"," });",""," // gesture change"," steps = Math.floor(duration/interval);"," radiusPerStep = (r2 - r1)/steps;"," scalePerStep = (endScale - startScale)/steps;"," rotPerStep = (endRot - startRot)/steps;",""," touchMove = function(step) {"," var radius = r1 + (radiusPerStep)*step,"," px1 = centerX + radius*Math.sin(this._toRadian(startRot + rotPerStep*step)),"," py1 = centerY - radius*Math.cos(this._toRadian(startRot + rotPerStep*step)),"," px2 = centerX - radius*Math.sin(this._toRadian(startRot + rotPerStep*step)),"," py2 = centerY + radius*Math.cos(this._toRadian(startRot + rotPerStep*step)),"," px = (px1+px2)/2,"," py = (py1+py2)/2,"," coord1, coord2, coord, touches;",""," // coordinate for each touch object."," coord1 = {"," pageX: px1,"," pageY: py1,"," clientX: px1,"," clientY: py1"," };"," coord2 = {"," pageX: px2,"," pageY: py2,"," clientX: px2,"," clientY: py2"," };"," touches = this._createTouchList([Y.merge({"," identifier: (id++)"," }, coord1), Y.merge({"," identifier: (id++)"," }, coord2)]);",""," // coordinate for top level event"," coord = {"," pageX: px,"," pageY: py,"," clientX: px,"," clientY: py"," };",""," this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({"," touches: touches,"," targetTouches: touches,"," changedTouches: touches,"," scale: startScale + scalePerStep*step,"," rotation: startRot + rotPerStep*step"," }, coord));",""," if(Y.UA.ios >= 2.0) {"," this._simulateEvent(this.target, GESTURE_CHANGE, Y.merge({"," scale: startScale + scalePerStep*step,"," rotation: startRot + rotPerStep*step"," }, coord));"," }"," };",""," for (i=0; i < steps; i++) {"," eventQueue.add({"," fn: touchMove,"," args: [i],"," context: this"," });"," }",""," // gesture end"," eventQueue.add({"," fn: function() {"," var emptyTouchList = this._getEmptyTouchList(),"," coord1, coord2, coord, touches;",""," // coordinate for each touch object."," coord1 = {"," pageX: path1.end[0],"," pageY: path1.end[1],"," clientX: path1.end[0],"," clientY: path1.end[1]"," };"," coord2 = {"," pageX: path2.end[0],"," pageY: path2.end[1],"," clientX: path2.end[0],"," clientY: path2.end[1]"," };"," touches = this._createTouchList([Y.merge({"," identifier: (id++)"," }, coord1), Y.merge({"," identifier: (id++)"," }, coord2)]);",""," // coordinate for top level event"," coord = {"," pageX: (path1.end[0] + path2.end[0])/2,"," pageY: (path1.end[0] + path2.end[1])/2,"," clientX: (path1.end[0] + path2.end[0])/2,"," clientY: (path1.end[0] + path2.end[1])/2"," };",""," if(Y.UA.ios >= 2.0) {"," this._simulateEvent(this.target, GESTURE_END, Y.merge({"," scale: endScale,"," rotation: endRot"," }, coord));"," }",""," this._simulateEvent(this.target, TOUCH_END, Y.merge({"," touches: emptyTouchList,"," targetTouches: emptyTouchList,"," changedTouches: touches,"," scale: endScale,"," rotation: endRot"," }, coord));"," },"," context: this"," });",""," if(cb && Y.Lang.isFunction(cb)) {"," eventQueue.add({"," fn: cb,",""," // by default, the callback runs the node context where"," // simulateGesture method is called."," context: this.node",""," //TODO: Use args to pass error object as 1st param if there is an error."," //args:"," });"," }",""," eventQueue.run();"," },",""," /**"," * The \"tap\" gesture can be used for various single touch point gestures"," * such as single tap, N number of taps, long press. The default is a single"," * tap."," *"," * @method tap"," * @param {Function} cb The callback to execute when the gesture simulation"," * is completed."," * @param {Array} point A point(relative to the top left corner of the"," * target node element) where the tap gesture should start. The default"," * is the center of the taget node."," * @param {Number} times The number of taps. Default is 1."," * @param {Number} hold The hold time in milliseconds between \"touchstart\" and"," * \"touchend\" event generation. Default is 10ms."," * @param {Number} delay The time gap in millisecond between taps if this"," * gesture has more than 1 tap. Default is 10ms."," */"," tap: function(cb, point, times, hold, delay) {"," var eventQueue = new Y.AsyncQueue(),"," emptyTouchList = this._getEmptyTouchList(),"," touches,"," coord,"," i,"," touchStart,"," touchEnd;",""," point = this._calculateDefaultPoint(point);",""," if(!Y.Lang.isNumber(times) || times < 1) {"," times = 1;"," }",""," if(!Y.Lang.isNumber(hold)) {"," hold = DEFAULTS.HOLD_TAP;"," }",""," if(!Y.Lang.isNumber(delay)) {"," delay = DEFAULTS.DELAY_TAP;"," }",""," coord = {"," pageX: point[0],"," pageY: point[1],"," clientX: point[0],"," clientY: point[1]"," };",""," touches = this._createTouchList([Y.merge({identifier: 0}, coord)]);",""," touchStart = function() {"," this._simulateEvent(this.target, TOUCH_START, Y.merge({"," touches: touches,"," targetTouches: touches,"," changedTouches: touches"," }, coord));"," };",""," touchEnd = function() {"," this._simulateEvent(this.target, TOUCH_END, Y.merge({"," touches: emptyTouchList,"," targetTouches: emptyTouchList,"," changedTouches: touches"," }, coord));"," };",""," for (i=0; i < times; i++) {"," eventQueue.add({"," fn: touchStart,"," context: this,"," timeout: (i === 0)? 0 : delay"," });",""," eventQueue.add({"," fn: touchEnd,"," context: this,"," timeout: hold"," });"," }",""," if(times > 1 && !SUPPORTS_TOUCH) {"," eventQueue.add({"," fn: function() {"," this._simulateEvent(this.target, MOUSE_DBLCLICK, coord);"," },"," context: this"," });"," }",""," if(cb && Y.Lang.isFunction(cb)) {"," eventQueue.add({"," fn: cb,",""," // by default, the callback runs the node context where"," // simulateGesture method is called."," context: this.node",""," //TODO: Use args to pass error object as 1st param if there is an error."," //args:"," });"," }",""," eventQueue.run();"," },",""," /**"," * The \"flick\" gesture is a specialized \"move\" that has some velocity"," * and the movement always runs either x or y axis. The velocity is calculated"," * with \"distance\" and \"duration\" arguments. If the calculated velocity is"," * below than the minimum velocity, the given duration will be ignored and"," * new duration will be created to make a valid flick gesture."," *"," * @method flick"," * @param {Function} cb The callback to execute when the gesture simulation"," * is completed."," * @param {Array} point A point(relative to the top left corner of the"," * target node element) where the flick gesture should start. The default"," * is the center of the taget node."," * @param {String} axis Either \"x\" or \"y\"."," * @param {Number} distance A distance in pixels to flick."," * @param {Number} duration A duration of the gesture in millisecond."," *"," */"," flick: function(cb, point, axis, distance, duration) {"," var path;",""," point = this._calculateDefaultPoint(point);",""," if(!Y.Lang.isString(axis)) {"," axis = X_AXIS;"," } else {"," axis = axis.toLowerCase();"," if(axis !== X_AXIS && axis !== Y_AXIS) {"," Y.error(NAME+'(flick): Only x or y axis allowed');"," }"," }",""," if(!Y.Lang.isNumber(distance)) {"," distance = DEFAULTS.DISTANCE_FLICK;"," }",""," if(!Y.Lang.isNumber(duration)){"," duration = DEFAULTS.DURATION_FLICK; // ms"," } else {"," if(duration > DEFAULTS.MAX_DURATION_FLICK) {"," duration = DEFAULTS.MAX_DURATION_FLICK;"," }"," }",""," /*"," * Check if too slow for a flick."," * Adjust duration if the calculated velocity is less than"," * the minimum velcocity to be claimed as a flick."," */"," if(Math.abs(distance)/duration < DEFAULTS.MIN_VELOCITY_FLICK) {"," duration = Math.abs(distance)/DEFAULTS.MIN_VELOCITY_FLICK;"," }",""," path = {"," start: Y.clone(point),"," end: ["," (axis === X_AXIS) ? point[0]+distance : point[0],"," (axis === Y_AXIS) ? point[1]+distance : point[1]"," ]"," };",""," this._move(cb, path, duration);"," },",""," /**"," * The \"move\" gesture simulate the movement of any direction between"," * the straight line of start and end point for the given duration."," * The path argument is an object with \"point\", \"xdist\" and \"ydist\" properties."," * The \"point\" property is an array with x and y coordinations(relative to the"," * top left corner of the target node element) while \"xdist\" and \"ydist\""," * properties are used for the distance along the x and y axis. A negative"," * distance number can be used to drag either left or up direction."," *"," * If no arguments are given, it will simulate the default move, which"," * is moving 200 pixels from the center of the element to the positive X-axis"," * direction for 1 sec."," *"," * @method move"," * @param {Function} cb The callback to execute when the gesture simulation"," * is completed."," * @param {Object} path An object with \"point\", \"xdist\" and \"ydist\"."," * @param {Number} duration A duration of the gesture in millisecond."," */"," move: function(cb, path, duration) {"," var convertedPath;",""," if(!Y.Lang.isObject(path)) {"," path = {"," point: this._calculateDefaultPoint([]),"," xdist: DEFAULTS.DISTANCE_MOVE,"," ydist: 0"," };"," } else {"," // convert to the page coordination"," if(!Y.Lang.isArray(path.point)) {"," path.point = this._calculateDefaultPoint([]);"," } else {"," path.point = this._calculateDefaultPoint(path.point);"," }",""," if(!Y.Lang.isNumber(path.xdist)) {"," path.xdist = DEFAULTS.DISTANCE_MOVE;"," }",""," if(!Y.Lang.isNumber(path.ydist)) {"," path.ydist = 0;"," }"," }",""," if(!Y.Lang.isNumber(duration)){"," duration = DEFAULTS.DURATION_MOVE; // ms"," } else {"," if(duration > DEFAULTS.MAX_DURATION_MOVE) {"," duration = DEFAULTS.MAX_DURATION_MOVE;"," }"," }",""," convertedPath = {"," start: Y.clone(path.point),"," end: [path.point[0]+path.xdist, path.point[1]+path.ydist]"," };",""," this._move(cb, convertedPath, duration);"," },",""," /**"," * A base method on top of \"move\" and \"flick\" methods. The method takes"," * the path with start/end properties and duration to generate a set of"," * touch events for the movement gesture."," *"," * @method _move"," * @private"," * @param {Function} cb The callback to execute when the gesture simulation"," * is completed."," * @param {Object} path An object with \"start\" and \"end\" properties. Each"," * property should be an array with x and y coordination (e.g. start: [100, 50])"," * @param {Number} duration A duration of the gesture in millisecond."," */"," _move: function(cb, path, duration) {"," var eventQueue,"," i,"," interval = EVENT_INTERVAL,"," steps, stepX, stepY,"," id = 0,"," touchMove;",""," if(!Y.Lang.isNumber(duration)){"," duration = DEFAULTS.DURATION_MOVE; // ms"," } else {"," if(duration > DEFAULTS.MAX_DURATION_MOVE) {"," duration = DEFAULTS.MAX_DURATION_MOVE;"," }"," }",""," if(!Y.Lang.isObject(path)) {"," path = {"," start: ["," START_PAGEX,"," START_PAGEY"," ],"," end: ["," START_PAGEX + DEFAULTS.DISTANCE_MOVE,"," START_PAGEY"," ]"," };"," } else {"," if(!Y.Lang.isArray(path.start)) {"," path.start = ["," START_PAGEX,"," START_PAGEY"," ];"," }"," if(!Y.Lang.isArray(path.end)) {"," path.end = ["," START_PAGEX + DEFAULTS.DISTANCE_MOVE,"," START_PAGEY"," ];"," }"," }",""," Y.AsyncQueue.defaults.timeout = interval;"," eventQueue = new Y.AsyncQueue();",""," // start"," eventQueue.add({"," fn: function() {"," var coord = {"," pageX: path.start[0],"," pageY: path.start[1],"," clientX: path.start[0],"," clientY: path.start[1]"," },"," touches = this._createTouchList(["," Y.merge({identifier: (id++)}, coord)"," ]);",""," this._simulateEvent(this.target, TOUCH_START, Y.merge({"," touches: touches,"," targetTouches: touches,"," changedTouches: touches"," }, coord));"," },"," timeout: 0,"," context: this"," });",""," // move"," steps = Math.floor(duration/interval);"," stepX = (path.end[0] - path.start[0])/steps;"," stepY = (path.end[1] - path.start[1])/steps;",""," touchMove = function(step) {"," var px = path.start[0]+(stepX * step),"," py = path.start[1]+(stepY * step),"," coord = {"," pageX: px,"," pageY: py,"," clientX: px,"," clientY: py"," },"," touches = this._createTouchList(["," Y.merge({identifier: (id++)}, coord)"," ]);",""," this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({"," touches: touches,"," targetTouches: touches,"," changedTouches: touches"," }, coord));"," };",""," for (i=0; i < steps; i++) {"," eventQueue.add({"," fn: touchMove,"," args: [i],"," context: this"," });"," }",""," // last move"," eventQueue.add({"," fn: function() {"," var coord = {"," pageX: path.end[0],"," pageY: path.end[1],"," clientX: path.end[0],"," clientY: path.end[1]"," },"," touches = this._createTouchList(["," Y.merge({identifier: id}, coord)"," ]);",""," this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({"," touches: touches,"," targetTouches: touches,"," changedTouches: touches"," }, coord));"," },"," timeout: 0,"," context: this"," });",""," // end"," eventQueue.add({"," fn: function() {"," var coord = {"," pageX: path.end[0],"," pageY: path.end[1],"," clientX: path.end[0],"," clientY: path.end[1]"," },"," emptyTouchList = this._getEmptyTouchList(),"," touches = this._createTouchList(["," Y.merge({identifier: id}, coord)"," ]);",""," this._simulateEvent(this.target, TOUCH_END, Y.merge({"," touches: emptyTouchList,"," targetTouches: emptyTouchList,"," changedTouches: touches"," }, coord));"," },"," context: this"," });",""," if(cb && Y.Lang.isFunction(cb)) {"," eventQueue.add({"," fn: cb,",""," // by default, the callback runs the node context where"," // simulateGesture method is called."," context: this.node",""," //TODO: Use args to pass error object as 1st param if there is an error."," //args:"," });"," }",""," eventQueue.run();"," },",""," /**"," * Helper method to return a singleton instance of empty touch list."," *"," * @method _getEmptyTouchList"," * @private"," * @return {TouchList | Array} An empty touch list object."," */"," _getEmptyTouchList: function() {"," if(!emptyTouchList) {"," emptyTouchList = this._createTouchList([]);"," }",""," return emptyTouchList;"," },",""," /**"," * Helper method to convert an array with touch points to TouchList object as"," * defined in http://www.w3.org/TR/touch-events/"," *"," * @method _createTouchList"," * @private"," * @param {Array} touchPoints"," * @return {TouchList | Array} If underlaying platform support creating touch list"," * a TouchList object will be returned otherwise a fake Array object"," * will be returned."," */"," _createTouchList: function(touchPoints) {"," /*"," * Android 4.0.3 emulator:"," * Native touch api supported starting in version 4.0 (Ice Cream Sandwich)."," * However the support seems limited. In Android 4.0.3 emulator, I got"," * \"TouchList is not defined\"."," */"," var touches = [],"," touchList,"," self = this;",""," if(!!touchPoints && Y.Lang.isArray(touchPoints)) {"," if(Y.UA.android && Y.UA.android >= 4.0 || Y.UA.ios && Y.UA.ios >= 2.0) {"," Y.each(touchPoints, function(point) {"," if(!point.identifier) {point.identifier = 0;}"," if(!point.pageX) {point.pageX = 0;}"," if(!point.pageY) {point.pageY = 0;}"," if(!point.screenX) {point.screenX = 0;}"," if(!point.screenY) {point.screenY = 0;}",""," touches.push(document.createTouch(Y.config.win,"," self.target,"," point.identifier,"," point.pageX, point.pageY,"," point.screenX, point.screenY));"," });",""," touchList = document.createTouchList.apply(document, touches);"," } else if(Y.UA.ios && Y.UA.ios < 2.0) {"," Y.error(NAME+': No touch event simulation framework present.');"," } else {"," // this will inclide android(Y.UA.android && Y.UA.android < 4.0)"," // and desktops among all others.",""," /*"," * Touch APIs are broken in androids older than 4.0. We will use"," * simulated touch apis for these versions."," */"," touchList = [];"," Y.each(touchPoints, function(point) {"," if(!point.identifier) {point.identifier = 0;}"," if(!point.clientX) {point.clientX = 0;}"," if(!point.clientY) {point.clientY = 0;}"," if(!point.pageX) {point.pageX = 0;}"," if(!point.pageY) {point.pageY = 0;}"," if(!point.screenX) {point.screenX = 0;}"," if(!point.screenY) {point.screenY = 0;}",""," touchList.push({"," target: self.target,"," identifier: point.identifier,"," clientX: point.clientX,"," clientY: point.clientY,"," pageX: point.pageX,"," pageY: point.pageY,"," screenX: point.screenX,"," screenY: point.screenY"," });"," });",""," touchList.item = function(i) {"," return touchList[i];"," };"," }"," } else {"," Y.error(NAME+': Invalid touchPoints passed');"," }",""," return touchList;"," },",""," /**"," * @method _simulateEvent"," * @private"," * @param {HTMLElement} target The DOM element that's the target of the event."," * @param {String} type The type of event or name of the supported gesture to simulate"," * (i.e., \"click\", \"doubletap\", \"flick\")."," * @param {Object} options (Optional) Extra options to copy onto the event object."," * For gestures, options are used to refine the gesture behavior."," */"," _simulateEvent: function(target, type, options) {"," var touches;",""," if (touchEvents[type]) {"," if(SUPPORTS_TOUCH) {"," Y.Event.simulate(target, type, options);"," } else {"," // simulate using mouse events if touch is not applicable on this platform."," // but only single touch event can be simulated."," if(this._isSingleTouch(options.touches, options.targetTouches, options.changedTouches)) {"," type = {"," touchstart: MOUSE_DOWN,"," touchmove: MOUSE_MOVE,"," touchend: MOUSE_UP"," }[type];",""," options.button = 0;"," options.relatedTarget = null; // since we are not using mouseover event.",""," // touchend has none in options.touches."," touches = (type === MOUSE_UP)? options.changedTouches : options.touches;",""," options = Y.mix(options, {"," screenX: touches.item(0).screenX,"," screenY: touches.item(0).screenY,"," clientX: touches.item(0).clientX,"," clientY: touches.item(0).clientY"," }, true);",""," Y.Event.simulate(target, type, options);",""," if(type == MOUSE_UP) {"," Y.Event.simulate(target, MOUSE_CLICK, options);"," }"," } else {"," Y.error(\"_simulateEvent(): Event '\" + type + \"' has multi touch objects that can't be simulated in your platform.\");"," }"," }"," } else {"," // pass thru for all non touch events"," Y.Event.simulate(target, type, options);"," }"," },",""," /**"," * Helper method to check the single touch."," * @method _isSingleTouch"," * @private"," * @param {TouchList} touches"," * @param {TouchList} targetTouches"," * @param {TouchList} changedTouches"," */"," _isSingleTouch: function(touches, targetTouches, changedTouches) {"," return (touches && (touches.length <= 1)) &&"," (targetTouches && (targetTouches.length <= 1)) &&"," (changedTouches && (changedTouches.length <= 1));"," }","};","","/*"," * A gesture simulation class."," */","Y.GestureSimulation = Simulations;","","/*"," * Various simulation default behavior properties. If user override"," * Y.GestureSimulation.defaults, overriden values will be used and this"," * should be done before the gesture simulation."," */","Y.GestureSimulation.defaults = DEFAULTS;","","/*"," * The high level gesture names that YUI knows how to simulate."," */","Y.GestureSimulation.GESTURES = gestureNames;","","/**"," * Simulates the higher user level gesture of the given name on a target."," * This method generates a set of low level touch events(Apple specific gesture"," * events as well for the iOS platforms) asynchronously. Note that gesture"," * simulation is relying on `Y.Event.simulate()` method to generate"," * the touch events under the hood. The `Y.Event.simulate()` method"," * itself is a synchronous method."," *"," * Users are suggested to use `Node.simulateGesture()` method which"," * basically calls this method internally. Supported gestures are `tap`,"," * `doubletap`, `press`, `move`, `flick`, `pinch` and `rotate`."," *"," * The `pinch` gesture is used to simulate the pinching and spreading of two"," * fingers. During a pinch simulation, rotation is also possible. Essentially"," * `pinch` and `rotate` simulations share the same base implementation to allow"," * both pinching and rotation at the same time. The only difference is `pinch`"," * requires `start` and `end` option properties while `rotate` requires `rotation`"," * option property."," *"," * The `pinch` and `rotate` gestures can be described as placing 2 fingers along a"," * circle. Pinching and spreading can be described by start and end circles while"," * rotation occurs on a single circle. If the radius of the start circle is greater"," * than the end circle, the gesture becomes a pinch, otherwise it is a spread spread."," *"," * @example"," *"," * var node = Y.one(\"#target\");"," *"," * // double tap example"," * node.simulateGesture(\"doubletap\", function() {"," * // my callback function"," * });"," *"," * // flick example from the center of the node, move 50 pixels down for 50ms)"," * node.simulateGesture(\"flick\", {"," * axis: y,"," * distance: -100"," * duration: 50"," * }, function() {"," * // my callback function"," * });"," *"," * // simulate rotating a node 75 degrees counter-clockwise"," * node.simulateGesture(\"rotate\", {"," * rotation: -75"," * });"," *"," * // simulate a pinch and a rotation at the same time."," * // fingers start on a circle of radius 100 px, placed at top/bottom"," * // fingers end on a circle of radius 50px, placed at right/left"," * node.simulateGesture(\"pinch\", {"," * r1: 100,"," * r2: 50,"," * start: 0"," * rotation: 90"," * });"," *"," * @method simulateGesture"," * @param {HTMLElement|Node} node The YUI node or HTML element that's the target"," * of the event."," * @param {String} name The name of the supported gesture to simulate. The"," * supported gesture name is one of \"tap\", \"doubletap\", \"press\", \"move\","," * \"flick\", \"pinch\" and \"rotate\"."," * @param {Object} [options] Extra options used to define the gesture behavior:"," *"," * Valid options properties for the `tap` gesture:"," *"," * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates"," * where the tap should be simulated. Default is the center of the node"," * element."," * @param {Number} [options.hold=10] (Optional) The hold time in milliseconds."," * This is the time between `touchstart` and `touchend` event generation."," * @param {Number} [options.times=1] (Optional) Indicates the number of taps."," * @param {Number} [options.delay=10] (Optional) The number of milliseconds"," * before the next tap simulation happens. This is valid only when `times`"," * is more than 1."," *"," * Valid options properties for the `doubletap` gesture:"," *"," * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates"," * where the doubletap should be simulated. Default is the center of the"," * node element."," *"," * Valid options properties for the `press` gesture:"," *"," * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates"," * where the press should be simulated. Default is the center of the node"," * element."," * @param {Number} [options.hold=3000] (Optional) The hold time in milliseconds."," * This is the time between `touchstart` and `touchend` event generation."," * Default is 3000ms (3 seconds)."," *"," * Valid options properties for the `move` gesture:"," *"," * @param {Object} [options.path] (Optional) Indicates the path of the finger"," * movement. It's an object with three optional properties: `point`,"," * `xdist` and `ydist`."," * @param {Array} [options.path.point] A starting point of the gesture."," * Default is the center of the node element."," * @param {Number} [options.path.xdist=200] A distance to move in pixels"," * along the X axis. A negative distance value indicates moving left."," * @param {Number} [options.path.ydist=0] A distance to move in pixels"," * along the Y axis. A negative distance value indicates moving up."," * @param {Number} [options.duration=1000] (Optional) The duration of the"," * gesture in milliseconds."," *"," * Valid options properties for the `flick` gesture:"," *"," * @param {Array} [options.point] (Optional) Indicates the [x, y] coordinates"," * where the flick should be simulated. Default is the center of the"," * node element."," * @param {String} [options.axis='x'] (Optional) Valid values are either"," * \"x\" or \"y\". Indicates axis to move along. The flick can move to one of"," * 4 directions(left, right, up and down)."," * @param {Number} [options.distance=200] (Optional) Distance to move in pixels"," * @param {Number} [options.duration=1000] (Optional) The duration of the"," * gesture in milliseconds. User given value could be automatically"," * adjusted by the framework if it is below the minimum velocity to be"," * a flick gesture."," *"," * Valid options properties for the `pinch` gesture:"," *"," * @param {Array} [options.center] (Optional) The center of the circle where"," * two fingers are placed. Default is the center of the node element."," * @param {Number} [options.r1] (Required) Pixel radius of the start circle"," * where 2 fingers will be on when the gesture starts. The circles are"," * centered at the center of the element."," * @param {Number} [options.r2] (Required) Pixel radius of the end circle"," * when this gesture ends."," * @param {Number} [options.duration=1000] (Optional) The duration of the"," * gesture in milliseconds."," * @param {Number} [options.start=0] (Optional) Starting degree of the first"," * finger. The value is relative to the path of the north. Default is 0"," * (i.e., 12:00 on a clock)."," * @param {Number} [options.rotation=0] (Optional) Degrees to rotate from"," * the starting degree. A negative value means rotation to the"," * counter-clockwise direction."," *"," * Valid options properties for the `rotate` gesture:"," *"," * @param {Array} [options.center] (Optional) The center of the circle where"," * two fingers are placed. Default is the center of the node element."," * @param {Number} [options.r1] (Optional) Pixel radius of the start circle"," * where 2 fingers will be on when the gesture starts. The circles are"," * centered at the center of the element. Default is a fourth of the node"," * element width or height, whichever is smaller."," * @param {Number} [options.r2] (Optional) Pixel radius of the end circle"," * when this gesture ends. Default is a fourth of the node element width or"," * height, whichever is smaller."," * @param {Number} [options.duration=1000] (Optional) The duration of the"," * gesture in milliseconds."," * @param {Number} [options.start=0] (Optional) Starting degree of the first"," * finger. The value is relative to the path of the north. Default is 0"," * (i.e., 12:00 on a clock)."," * @param {Number} [options.rotation] (Required) Degrees to rotate from"," * the starting degree. A negative value means rotation to the"," * counter-clockwise direction."," *"," * @param {Function} [cb] The callback to execute when the asynchronouse gesture"," * simulation is completed."," * @param {Error} cb.err An error object if the simulation is failed."," * @for Event"," * @static"," */","Y.Event.simulateGesture = function(node, name, options, cb) {",""," node = Y.one(node);",""," var sim = new Y.GestureSimulation(node);"," name = name.toLowerCase();",""," if(!cb && Y.Lang.isFunction(options)) {"," cb = options;"," options = {};"," }",""," options = options || {};",""," if (gestureNames[name]) {"," switch(name) {"," // single-touch: point gestures"," case 'tap':"," sim.tap(cb, options.point, options.times, options.hold, options.delay);"," break;"," case 'doubletap':"," sim.tap(cb, options.point, 2);"," break;"," case 'press':"," if(!Y.Lang.isNumber(options.hold)) {"," options.hold = DEFAULTS.HOLD_PRESS;"," } else if(options.hold < DEFAULTS.MIN_HOLD_PRESS) {"," options.hold = DEFAULTS.MIN_HOLD_PRESS;"," } else if(options.hold > DEFAULTS.MAX_HOLD_PRESS) {"," options.hold = DEFAULTS.MAX_HOLD_PRESS;"," }"," sim.tap(cb, options.point, 1, options.hold);"," break;",""," // single-touch: move gestures"," case 'move':"," sim.move(cb, options.path, options.duration);"," break;"," case 'flick':"," sim.flick(cb, options.point, options.axis, options.distance,"," options.duration);"," break;",""," // multi-touch: pinch/rotation gestures"," case 'pinch':"," sim.pinch(cb, options.center, options.r1, options.r2,"," options.duration, options.start, options.rotation);"," break;"," case 'rotate':"," sim.rotate(cb, options.center, options.r1, options.r2,"," options.duration, options.start, options.rotation);"," break;"," }"," } else {"," Y.error(NAME+': Not a supported gesture simulation: '+name);"," }","};","","","}, '3.17.2', {\"requires\": [\"async-queue\", \"event-simulate\", \"node-screen\"]});","","}());"]}; +} +var __cov_Pnir5n5eMyUAdYMTNF7KVA = __coverage__['build/gesture-simulate/gesture-simulate.js']; +__cov_Pnir5n5eMyUAdYMTNF7KVA.s['1']++;YUI.add('gesture-simulate',function(Y,NAME){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['1']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['2']++;var NAME='gesture-simulate',SUPPORTS_TOUCH=(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['1'][0]++,Y.config.win)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['1'][1]++,'ontouchstart'in Y.config.win)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['1'][2]++,!Y.UA.phantomjs)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['1'][3]++,!((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['2'][0]++,Y.UA.chrome)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['2'][1]++,Y.UA.chrome<6))),gestureNames={tap:1,doubletap:1,press:1,move:1,flick:1,pinch:1,rotate:1},touchEvents={touchstart:1,touchmove:1,touchend:1,touchcancel:1},document=Y.config.doc,emptyTouchList,EVENT_INTERVAL=20,START_PAGEX,START_PAGEY,DEFAULTS={HOLD_TAP:10,DELAY_TAP:10,HOLD_PRESS:3000,MIN_HOLD_PRESS:1000,MAX_HOLD_PRESS:60000,DISTANCE_MOVE:200,DURATION_MOVE:1000,MAX_DURATION_MOVE:5000,MIN_VELOCITY_FLICK:1.3,DISTANCE_FLICK:200,DURATION_FLICK:1000,MAX_DURATION_FLICK:5000,DURATION_PINCH:1000},TOUCH_START='touchstart',TOUCH_MOVE='touchmove',TOUCH_END='touchend',GESTURE_START='gesturestart',GESTURE_CHANGE='gesturechange',GESTURE_END='gestureend',MOUSE_UP='mouseup',MOUSE_MOVE='mousemove',MOUSE_DOWN='mousedown',MOUSE_CLICK='click',MOUSE_DBLCLICK='dblclick',X_AXIS='x',Y_AXIS='y';__cov_Pnir5n5eMyUAdYMTNF7KVA.s['3']++;function Simulations(node){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['2']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['4']++;if(!node){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['3'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['5']++;Y.error(NAME+': invalid target node');}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['3'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['6']++;this.node=node;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['7']++;this.target=Y.Node.getDOMNode(node);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['8']++;var startXY=this.node.getXY(),dims=this._getDims();__cov_Pnir5n5eMyUAdYMTNF7KVA.s['9']++;START_PAGEX=startXY[0]+dims[0]/2;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['10']++;START_PAGEY=startXY[1]+dims[1]/2;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['11']++;Simulations.prototype={_toRadian:function(deg){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['3']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['12']++;return deg*(Math.PI/180);},_getDims:function(){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['4']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['13']++;var region,width,height;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['14']++;if(this.target.getBoundingClientRect){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['4'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['15']++;region=this.target.getBoundingClientRect();__cov_Pnir5n5eMyUAdYMTNF7KVA.s['16']++;if('height'in region){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['5'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['17']++;height=region.height;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['5'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['18']++;height=Math.abs(region.bottom-region.top);}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['19']++;if('width'in region){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['6'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['20']++;width=region.width;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['6'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['21']++;width=Math.abs(region.right-region.left);}}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['4'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['22']++;region=this.node.get('region');__cov_Pnir5n5eMyUAdYMTNF7KVA.s['23']++;width=region.width;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['24']++;height=region.height;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['25']++;return[width,height];},_calculateDefaultPoint:function(point){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['5']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['26']++;var height;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['27']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['8'][0]++,!Y.Lang.isArray(point))||(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['8'][1]++,point.length===0)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['7'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['28']++;point=[START_PAGEX,START_PAGEY];}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['7'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['29']++;if(point.length==1){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['9'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['30']++;height=this._getDims[1];__cov_Pnir5n5eMyUAdYMTNF7KVA.s['31']++;point[1]=height/2;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['9'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['32']++;point[0]=this.node.getX()+point[0];__cov_Pnir5n5eMyUAdYMTNF7KVA.s['33']++;point[1]=this.node.getY()+point[1];}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['34']++;return point;},rotate:function(cb,center,startRadius,endRadius,duration,start,rotation){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['6']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['35']++;var radius,r1=startRadius,r2=endRadius;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['36']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['11'][0]++,!Y.Lang.isNumber(r1))||(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['11'][1]++,!Y.Lang.isNumber(r2))||(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['11'][2]++,r1<0)||(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['11'][3]++,r2<0)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['10'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['37']++;radius=this.target.offsetWidth=2){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['20'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['76']++;this._simulateEvent(this.target,GESTURE_START,Y.merge({scale:startScale,rotation:startRot},coord));}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['20'][1]++;}},timeout:0,context:this});__cov_Pnir5n5eMyUAdYMTNF7KVA.s['77']++;steps=Math.floor(duration/ interval);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['78']++;radiusPerStep=(r2-r1)/steps;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['79']++;scalePerStep=(endScale-startScale)/steps;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['80']++;rotPerStep=(endRot-startRot)/steps;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['81']++;touchMove=function(step){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['9']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['82']++;var radius=r1+radiusPerStep*step,px1=centerX+radius*Math.sin(this._toRadian(startRot+rotPerStep*step)),py1=centerY-radius*Math.cos(this._toRadian(startRot+rotPerStep*step)),px2=centerX-radius*Math.sin(this._toRadian(startRot+rotPerStep*step)),py2=centerY+radius*Math.cos(this._toRadian(startRot+rotPerStep*step)),px=(px1+px2)/2,py=(py1+py2)/2,coord1,coord2,coord,touches;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['83']++;coord1={pageX:px1,pageY:py1,clientX:px1,clientY:py1};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['84']++;coord2={pageX:px2,pageY:py2,clientX:px2,clientY:py2};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['85']++;touches=this._createTouchList([Y.merge({identifier:id++},coord1),Y.merge({identifier:id++},coord2)]);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['86']++;coord={pageX:px,pageY:py,clientX:px,clientY:py};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['87']++;this._simulateEvent(this.target,TOUCH_MOVE,Y.merge({touches:touches,targetTouches:touches,changedTouches:touches,scale:startScale+scalePerStep*step,rotation:startRot+rotPerStep*step},coord));__cov_Pnir5n5eMyUAdYMTNF7KVA.s['88']++;if(Y.UA.ios>=2){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['21'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['89']++;this._simulateEvent(this.target,GESTURE_CHANGE,Y.merge({scale:startScale+scalePerStep*step,rotation:startRot+rotPerStep*step},coord));}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['21'][1]++;}};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['90']++;for(i=0;i=2){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['22'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['99']++;this._simulateEvent(this.target,GESTURE_END,Y.merge({scale:endScale,rotation:endRot},coord));}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['22'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['100']++;this._simulateEvent(this.target,TOUCH_END,Y.merge({touches:emptyTouchList,targetTouches:emptyTouchList,changedTouches:touches,scale:endScale,rotation:endRot},coord));},context:this});__cov_Pnir5n5eMyUAdYMTNF7KVA.s['101']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['24'][0]++,cb)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['24'][1]++,Y.Lang.isFunction(cb))){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['23'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['102']++;eventQueue.add({fn:cb,context:this.node});}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['23'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['103']++;eventQueue.run();},tap:function(cb,point,times,hold,delay){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['11']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['104']++;var eventQueue=new Y.AsyncQueue(),emptyTouchList=this._getEmptyTouchList(),touches,coord,i,touchStart,touchEnd;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['105']++;point=this._calculateDefaultPoint(point);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['106']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['26'][0]++,!Y.Lang.isNumber(times))||(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['26'][1]++,times<1)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['25'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['107']++;times=1;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['25'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['108']++;if(!Y.Lang.isNumber(hold)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['27'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['109']++;hold=DEFAULTS.HOLD_TAP;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['27'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['110']++;if(!Y.Lang.isNumber(delay)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['28'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['111']++;delay=DEFAULTS.DELAY_TAP;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['28'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['112']++;coord={pageX:point[0],pageY:point[1],clientX:point[0],clientY:point[1]};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['113']++;touches=this._createTouchList([Y.merge({identifier:0},coord)]);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['114']++;touchStart=function(){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['12']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['115']++;this._simulateEvent(this.target,TOUCH_START,Y.merge({touches:touches,targetTouches:touches,changedTouches:touches},coord));};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['116']++;touchEnd=function(){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['13']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['117']++;this._simulateEvent(this.target,TOUCH_END,Y.merge({touches:emptyTouchList,targetTouches:emptyTouchList,changedTouches:touches},coord));};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['118']++;for(i=0;i1)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['31'][1]++,!SUPPORTS_TOUCH)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['30'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['122']++;eventQueue.add({fn:function(){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['14']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['123']++;this._simulateEvent(this.target,MOUSE_DBLCLICK,coord);},context:this});}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['30'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['124']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['33'][0]++,cb)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['33'][1]++,Y.Lang.isFunction(cb))){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['32'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['125']++;eventQueue.add({fn:cb,context:this.node});}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['32'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['126']++;eventQueue.run();},flick:function(cb,point,axis,distance,duration){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['15']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['127']++;var path;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['128']++;point=this._calculateDefaultPoint(point);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['129']++;if(!Y.Lang.isString(axis)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['34'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['130']++;axis=X_AXIS;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['34'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['131']++;axis=axis.toLowerCase();__cov_Pnir5n5eMyUAdYMTNF7KVA.s['132']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['36'][0]++,axis!==X_AXIS)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['36'][1]++,axis!==Y_AXIS)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['35'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['133']++;Y.error(NAME+'(flick): Only x or y axis allowed');}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['35'][1]++;}}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['134']++;if(!Y.Lang.isNumber(distance)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['37'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['135']++;distance=DEFAULTS.DISTANCE_FLICK;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['37'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['136']++;if(!Y.Lang.isNumber(duration)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['38'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['137']++;duration=DEFAULTS.DURATION_FLICK;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['38'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['138']++;if(duration>DEFAULTS.MAX_DURATION_FLICK){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['39'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['139']++;duration=DEFAULTS.MAX_DURATION_FLICK;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['39'][1]++;}}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['140']++;if(Math.abs(distance)/durationDEFAULTS.MAX_DURATION_MOVE){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['48'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['157']++;duration=DEFAULTS.MAX_DURATION_MOVE;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['48'][1]++;}}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['158']++;convertedPath={start:Y.clone(path.point),end:[path.point[0]+path.xdist,path.point[1]+path.ydist]};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['159']++;this._move(cb,convertedPath,duration);},_move:function(cb,path,duration){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['17']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['160']++;var eventQueue,i,interval=EVENT_INTERVAL,steps,stepX,stepY,id=0,touchMove;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['161']++;if(!Y.Lang.isNumber(duration)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['49'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['162']++;duration=DEFAULTS.DURATION_MOVE;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['49'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['163']++;if(duration>DEFAULTS.MAX_DURATION_MOVE){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['50'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['164']++;duration=DEFAULTS.MAX_DURATION_MOVE;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['50'][1]++;}}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['165']++;if(!Y.Lang.isObject(path)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['51'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['166']++;path={start:[START_PAGEX,START_PAGEY],end:[START_PAGEX+DEFAULTS.DISTANCE_MOVE,START_PAGEY]};}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['51'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['167']++;if(!Y.Lang.isArray(path.start)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['52'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['168']++;path.start=[START_PAGEX,START_PAGEY];}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['52'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['169']++;if(!Y.Lang.isArray(path.end)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['53'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['170']++;path.end=[START_PAGEX+DEFAULTS.DISTANCE_MOVE,START_PAGEY];}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['53'][1]++;}}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['171']++;Y.AsyncQueue.defaults.timeout=interval;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['172']++;eventQueue=new Y.AsyncQueue();__cov_Pnir5n5eMyUAdYMTNF7KVA.s['173']++;eventQueue.add({fn:function(){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['18']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['174']++;var coord={pageX:path.start[0],pageY:path.start[1],clientX:path.start[0],clientY:path.start[1]},touches=this._createTouchList([Y.merge({identifier:id++},coord)]);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['175']++;this._simulateEvent(this.target,TOUCH_START,Y.merge({touches:touches,targetTouches:touches,changedTouches:touches},coord));},timeout:0,context:this});__cov_Pnir5n5eMyUAdYMTNF7KVA.s['176']++;steps=Math.floor(duration/ interval);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['177']++;stepX=(path.end[0]-path.start[0])/steps;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['178']++;stepY=(path.end[1]-path.start[1])/steps;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['179']++;touchMove=function(step){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['19']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['180']++;var px=path.start[0]+stepX*step,py=path.start[1]+stepY*step,coord={pageX:px,pageY:py,clientX:px,clientY:py},touches=this._createTouchList([Y.merge({identifier:id++},coord)]);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['181']++;this._simulateEvent(this.target,TOUCH_MOVE,Y.merge({touches:touches,targetTouches:touches,changedTouches:touches},coord));};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['182']++;for(i=0;i=4)||(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['60'][2]++,Y.UA.ios)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['60'][3]++,Y.UA.ios>=2)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['59'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['199']++;Y.each(touchPoints,function(point){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['24']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['200']++;if(!point.identifier){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['61'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['201']++;point.identifier=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['61'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['202']++;if(!point.pageX){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['62'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['203']++;point.pageX=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['62'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['204']++;if(!point.pageY){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['63'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['205']++;point.pageY=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['63'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['206']++;if(!point.screenX){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['64'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['207']++;point.screenX=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['64'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['208']++;if(!point.screenY){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['65'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['209']++;point.screenY=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['65'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['210']++;touches.push(document.createTouch(Y.config.win,self.target,point.identifier,point.pageX,point.pageY,point.screenX,point.screenY));});__cov_Pnir5n5eMyUAdYMTNF7KVA.s['211']++;touchList=document.createTouchList.apply(document,touches);}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['59'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['212']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['67'][0]++,Y.UA.ios)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['67'][1]++,Y.UA.ios<2)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['66'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['213']++;Y.error(NAME+': No touch event simulation framework present.');}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['66'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['214']++;touchList=[];__cov_Pnir5n5eMyUAdYMTNF7KVA.s['215']++;Y.each(touchPoints,function(point){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['25']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['216']++;if(!point.identifier){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['68'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['217']++;point.identifier=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['68'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['218']++;if(!point.clientX){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['69'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['219']++;point.clientX=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['69'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['220']++;if(!point.clientY){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['70'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['221']++;point.clientY=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['70'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['222']++;if(!point.pageX){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['71'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['223']++;point.pageX=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['71'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['224']++;if(!point.pageY){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['72'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['225']++;point.pageY=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['72'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['226']++;if(!point.screenX){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['73'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['227']++;point.screenX=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['73'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['228']++;if(!point.screenY){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['74'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['229']++;point.screenY=0;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['74'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['230']++;touchList.push({target:self.target,identifier:point.identifier,clientX:point.clientX,clientY:point.clientY,pageX:point.pageX,pageY:point.pageY,screenX:point.screenX,screenY:point.screenY});});__cov_Pnir5n5eMyUAdYMTNF7KVA.s['231']++;touchList.item=function(i){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['26']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['232']++;return touchList[i];};}}}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['57'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['233']++;Y.error(NAME+': Invalid touchPoints passed');}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['234']++;return touchList;},_simulateEvent:function(target,type,options){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['27']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['235']++;var touches;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['236']++;if(touchEvents[type]){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['75'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['237']++;if(SUPPORTS_TOUCH){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['76'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['238']++;Y.Event.simulate(target,type,options);}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['76'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['239']++;if(this._isSingleTouch(options.touches,options.targetTouches,options.changedTouches)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['77'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['240']++;type={touchstart:MOUSE_DOWN,touchmove:MOUSE_MOVE,touchend:MOUSE_UP}[type];__cov_Pnir5n5eMyUAdYMTNF7KVA.s['241']++;options.button=0;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['242']++;options.relatedTarget=null;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['243']++;touches=type===MOUSE_UP?(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['78'][0]++,options.changedTouches):(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['78'][1]++,options.touches);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['244']++;options=Y.mix(options,{screenX:touches.item(0).screenX,screenY:touches.item(0).screenY,clientX:touches.item(0).clientX,clientY:touches.item(0).clientY},true);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['245']++;Y.Event.simulate(target,type,options);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['246']++;if(type==MOUSE_UP){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['79'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['247']++;Y.Event.simulate(target,MOUSE_CLICK,options);}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['79'][1]++;}}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['77'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['248']++;Y.error('_simulateEvent(): Event \''+type+'\' has multi touch objects that can\'t be simulated in your platform.');}}}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['75'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['249']++;Y.Event.simulate(target,type,options);}},_isSingleTouch:function(touches,targetTouches,changedTouches){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['28']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['250']++;return(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['80'][0]++,touches)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['80'][1]++,touches.length<=1)&&((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['80'][2]++,targetTouches)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['80'][3]++,targetTouches.length<=1))&&((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['80'][4]++,changedTouches)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['80'][5]++,changedTouches.length<=1));}};__cov_Pnir5n5eMyUAdYMTNF7KVA.s['251']++;Y.GestureSimulation=Simulations;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['252']++;Y.GestureSimulation.defaults=DEFAULTS;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['253']++;Y.GestureSimulation.GESTURES=gestureNames;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['254']++;Y.Event.simulateGesture=function(node,name,options,cb){__cov_Pnir5n5eMyUAdYMTNF7KVA.f['29']++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['255']++;node=Y.one(node);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['256']++;var sim=new Y.GestureSimulation(node);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['257']++;name=name.toLowerCase();__cov_Pnir5n5eMyUAdYMTNF7KVA.s['258']++;if((__cov_Pnir5n5eMyUAdYMTNF7KVA.b['82'][0]++,!cb)&&(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['82'][1]++,Y.Lang.isFunction(options))){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['81'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['259']++;cb=options;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['260']++;options={};}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['81'][1]++;}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['261']++;options=(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['83'][0]++,options)||(__cov_Pnir5n5eMyUAdYMTNF7KVA.b['83'][1]++,{});__cov_Pnir5n5eMyUAdYMTNF7KVA.s['262']++;if(gestureNames[name]){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['84'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['263']++;switch(name){case'tap':__cov_Pnir5n5eMyUAdYMTNF7KVA.b['85'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['264']++;sim.tap(cb,options.point,options.times,options.hold,options.delay);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['265']++;break;case'doubletap':__cov_Pnir5n5eMyUAdYMTNF7KVA.b['85'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['266']++;sim.tap(cb,options.point,2);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['267']++;break;case'press':__cov_Pnir5n5eMyUAdYMTNF7KVA.b['85'][2]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['268']++;if(!Y.Lang.isNumber(options.hold)){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['86'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['269']++;options.hold=DEFAULTS.HOLD_PRESS;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['86'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['270']++;if(options.holdDEFAULTS.MAX_HOLD_PRESS){__cov_Pnir5n5eMyUAdYMTNF7KVA.b['88'][0]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['273']++;options.hold=DEFAULTS.MAX_HOLD_PRESS;}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['88'][1]++;}}}__cov_Pnir5n5eMyUAdYMTNF7KVA.s['274']++;sim.tap(cb,options.point,1,options.hold);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['275']++;break;case'move':__cov_Pnir5n5eMyUAdYMTNF7KVA.b['85'][3]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['276']++;sim.move(cb,options.path,options.duration);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['277']++;break;case'flick':__cov_Pnir5n5eMyUAdYMTNF7KVA.b['85'][4]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['278']++;sim.flick(cb,options.point,options.axis,options.distance,options.duration);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['279']++;break;case'pinch':__cov_Pnir5n5eMyUAdYMTNF7KVA.b['85'][5]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['280']++;sim.pinch(cb,options.center,options.r1,options.r2,options.duration,options.start,options.rotation);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['281']++;break;case'rotate':__cov_Pnir5n5eMyUAdYMTNF7KVA.b['85'][6]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['282']++;sim.rotate(cb,options.center,options.r1,options.r2,options.duration,options.start,options.rotation);__cov_Pnir5n5eMyUAdYMTNF7KVA.s['283']++;break;}}else{__cov_Pnir5n5eMyUAdYMTNF7KVA.b['84'][1]++;__cov_Pnir5n5eMyUAdYMTNF7KVA.s['284']++;Y.error(NAME+': Not a supported gesture simulation: '+name);}};},'3.17.2',{'requires':['async-queue','event-simulate','node-screen']}); diff --git a/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-debug.js b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-debug.js new file mode 100644 index 0000000..55b8e19 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-debug.js @@ -0,0 +1,1328 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('gesture-simulate', function (Y, NAME) { + +/** + * Simulate high-level user gestures by generating a set of native DOM events. + * + * @module gesture-simulate + * @requires event-simulate, async-queue, node-screen + */ + +var NAME = "gesture-simulate", + + // phantomjs check may be temporary, until we determine if it really support touch all the way through, like it claims to (http://code.google.com/p/phantomjs/issues/detail?id=375) + SUPPORTS_TOUCH = ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.phantomjs) && !(Y.UA.chrome && Y.UA.chrome < 6)), + + gestureNames = { + tap: 1, + doubletap: 1, + press: 1, + move: 1, + flick: 1, + pinch: 1, + rotate: 1 + }, + + touchEvents = { + touchstart: 1, + touchmove: 1, + touchend: 1, + touchcancel: 1 + }, + + document = Y.config.doc, + emptyTouchList, + + EVENT_INTERVAL = 20, // 20ms + START_PAGEX, // will be adjusted to the node element center + START_PAGEY, // will be adjusted to the node element center + + // defaults that user can override. + DEFAULTS = { + // tap gestures + HOLD_TAP: 10, // 10ms + DELAY_TAP: 10, // 10ms + + // press gesture + HOLD_PRESS: 3000, // 3sec + MIN_HOLD_PRESS: 1000, // 1sec + MAX_HOLD_PRESS: 60000, // 1min + + // move gesture + DISTANCE_MOVE: 200, // 200 pixels + DURATION_MOVE: 1000, // 1sec + MAX_DURATION_MOVE: 5000,// 5sec + + // flick gesture + MIN_VELOCITY_FLICK: 1.3, + DISTANCE_FLICK: 200, // 200 pixels + DURATION_FLICK: 1000, // 1sec + MAX_DURATION_FLICK: 5000,// 5sec + + // pinch/rotation + DURATION_PINCH: 1000 // 1sec + }, + + TOUCH_START = 'touchstart', + TOUCH_MOVE = 'touchmove', + TOUCH_END = 'touchend', + + GESTURE_START = 'gesturestart', + GESTURE_CHANGE = 'gesturechange', + GESTURE_END = 'gestureend', + + MOUSE_UP = 'mouseup', + MOUSE_MOVE = 'mousemove', + MOUSE_DOWN = 'mousedown', + MOUSE_CLICK = 'click', + MOUSE_DBLCLICK = 'dblclick', + + X_AXIS = 'x', + Y_AXIS = 'y'; + + +function Simulations(node) { + if(!node) { + Y.error(NAME+': invalid target node'); + } + this.node = node; + this.target = Y.Node.getDOMNode(node); + + var startXY = this.node.getXY(), + dims = this._getDims(); + + START_PAGEX = startXY[0] + (dims[0])/2; + START_PAGEY = startXY[1] + (dims[1])/2; +} + +Simulations.prototype = { + + /** + * Helper method to convert a degree to a radian. + * + * @method _toRadian + * @private + * @param {Number} deg A degree to be converted to a radian. + * @return {Number} The degree in radian. + */ + _toRadian: function(deg) { + return deg * (Math.PI/180); + }, + + /** + * Helper method to get height/width while accounting for + * rotation/scale transforms where possible by using the + * bounding client rectangle height/width instead of the + * offsetWidth/Height which region uses. + * @method _getDims + * @private + * @return {Array} Array with [height, width] + */ + _getDims : function() { + var region, + width, + height; + + // Ideally, this should be in DOM somewhere. + if (this.target.getBoundingClientRect) { + region = this.target.getBoundingClientRect(); + + if ("height" in region) { + height = region.height; + } else { + // IE7,8 has getBCR, but no height. + height = Math.abs(region.bottom - region.top); + } + + if ("width" in region) { + width = region.width; + } else { + // IE7,8 has getBCR, but no width. + width = Math.abs(region.right - region.left); + } + } else { + region = this.node.get("region"); + width = region.width; + height = region.height; + } + + return [width, height]; + }, + + /** + * Helper method to convert a point relative to the node element into + * the point in the page coordination. + * + * @method _calculateDefaultPoint + * @private + * @param {Array} point A point relative to the node element. + * @return {Array} The same point in the page coordination. + */ + _calculateDefaultPoint: function(point) { + + var height; + + if(!Y.Lang.isArray(point) || point.length === 0) { + point = [START_PAGEX, START_PAGEY]; + } else { + if(point.length == 1) { + height = this._getDims[1]; + point[1] = height/2; + } + // convert to page(viewport) coordination + point[0] = this.node.getX() + point[0]; + point[1] = this.node.getY() + point[1]; + } + + return point; + }, + + /** + * The "rotate" and "pinch" methods are essencially same with the exact same + * arguments. Only difference is the required parameters. The rotate method + * requires "rotation" parameter while the pinch method requires "startRadius" + * and "endRadius" parameters. + * + * @method rotate + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} center A center point where the pinch gesture of two fingers + * should happen. It is relative to the top left corner of the target + * node element. + * @param {Number} startRadius A radius of start circle where 2 fingers are + * on when the gesture starts. This is optional. The default is a fourth of + * either target node width or height whichever is smaller. + * @param {Number} endRadius A radius of end circle where 2 fingers will be on when + * the pinch or spread gestures are completed. This is optional. + * The default is a fourth of either target node width or height whichever is less. + * @param {Number} duration A duration of the gesture in millisecond. + * @param {Number} start A start angle(0 degree at 12 o'clock) where the + * gesture should start. Default is 0. + * @param {Number} rotation A rotation in degree. It is required. + */ + rotate: function(cb, center, startRadius, endRadius, duration, start, rotation) { + var radius, + r1 = startRadius, // optional + r2 = endRadius; // optional + + if(!Y.Lang.isNumber(r1) || !Y.Lang.isNumber(r2) || r1<0 || r2<0) { + radius = (this.target.offsetWidth < this.target.offsetHeight)? + this.target.offsetWidth/4 : this.target.offsetHeight/4; + r1 = radius; + r2 = radius; + } + + // required + if(!Y.Lang.isNumber(rotation)) { + Y.error(NAME+'Invalid rotation detected.'); + } + + this.pinch(cb, center, r1, r2, duration, start, rotation); + }, + + /** + * The "rotate" and "pinch" methods are essencially same with the exact same + * arguments. Only difference is the required parameters. The rotate method + * requires "rotation" parameter while the pinch method requires "startRadius" + * and "endRadius" parameters. + * + * The "pinch" gesture can simulate various 2 finger gestures such as pinch, + * spread and/or rotation. The "startRadius" and "endRadius" are required. + * If endRadius is larger than startRadius, it becomes a spread gesture + * otherwise a pinch gesture. + * + * @method pinch + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} center A center point where the pinch gesture of two fingers + * should happen. It is relative to the top left corner of the target + * node element. + * @param {Number} startRadius A radius of start circle where 2 fingers are + * on when the gesture starts. This paramenter is required. + * @param {Number} endRadius A radius of end circle where 2 fingers will be on when + * the pinch or spread gestures are completed. This parameter is required. + * @param {Number} duration A duration of the gesture in millisecond. + * @param {Number} start A start angle(0 degree at 12 o'clock) where the + * gesture should start. Default is 0. + * @param {Number} rotation If rotation is desired during the pinch or + * spread gestures, this parameter can be used. Default is 0 degree. + */ + pinch: function(cb, center, startRadius, endRadius, duration, start, rotation) { + var eventQueue, + i, + interval = EVENT_INTERVAL, + touches, + id = 0, + r1 = startRadius, // required + r2 = endRadius, // required + radiusPerStep, + centerX, centerY, + startScale, endScale, scalePerStep, + startRot, endRot, rotPerStep, + path1 = {start: [], end: []}, // paths for 1st and 2nd fingers. + path2 = {start: [], end: []}, + steps, + touchMove; + + center = this._calculateDefaultPoint(center); + + if(!Y.Lang.isNumber(r1) || !Y.Lang.isNumber(r2) || r1<0 || r2<0) { + Y.error(NAME+'Invalid startRadius and endRadius detected.'); + } + + if(!Y.Lang.isNumber(duration) || duration <= 0) { + duration = DEFAULTS.DURATION_PINCH; + } + + if(!Y.Lang.isNumber(start)) { + start = 0.0; + } else { + start = start%360; + while(start < 0) { + start += 360; + } + } + + if(!Y.Lang.isNumber(rotation)) { + rotation = 0.0; + } + + Y.AsyncQueue.defaults.timeout = interval; + eventQueue = new Y.AsyncQueue(); + + // range determination + centerX = center[0]; + centerY = center[1]; + + startRot = start; + endRot = start + rotation; + + // 1st finger path + path1.start = [ + centerX + r1*Math.sin(this._toRadian(startRot)), + centerY - r1*Math.cos(this._toRadian(startRot)) + ]; + path1.end = [ + centerX + r2*Math.sin(this._toRadian(endRot)), + centerY - r2*Math.cos(this._toRadian(endRot)) + ]; + + // 2nd finger path + path2.start = [ + centerX - r1*Math.sin(this._toRadian(startRot)), + centerY + r1*Math.cos(this._toRadian(startRot)) + ]; + path2.end = [ + centerX - r2*Math.sin(this._toRadian(endRot)), + centerY + r2*Math.cos(this._toRadian(endRot)) + ]; + + startScale = 1.0; + endScale = endRadius/startRadius; + + // touch/gesture start + eventQueue.add({ + fn: function() { + var coord1, coord2, coord, touches; + + // coordinate for each touch object. + coord1 = { + pageX: path1.start[0], + pageY: path1.start[1], + clientX: path1.start[0], + clientY: path1.start[1] + }; + coord2 = { + pageX: path2.start[0], + pageY: path2.start[1], + clientX: path2.start[0], + clientY: path2.start[1] + }; + touches = this._createTouchList([Y.merge({ + identifier: (id++) + }, coord1), Y.merge({ + identifier: (id++) + }, coord2)]); + + // coordinate for top level event + coord = { + pageX: (path1.start[0] + path2.start[0])/2, + pageY: (path1.start[0] + path2.start[1])/2, + clientX: (path1.start[0] + path2.start[0])/2, + clientY: (path1.start[0] + path2.start[1])/2 + }; + + this._simulateEvent(this.target, TOUCH_START, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches, + scale: startScale, + rotation: startRot + }, coord)); + + if(Y.UA.ios >= 2.0) { + /* gesture starts when the 2nd finger touch starts. + * The implementation will fire 1 touch start event for both fingers, + * simulating 2 fingers touched on the screen at the same time. + */ + this._simulateEvent(this.target, GESTURE_START, Y.merge({ + scale: startScale, + rotation: startRot + }, coord)); + } + }, + timeout: 0, + context: this + }); + + // gesture change + steps = Math.floor(duration/interval); + radiusPerStep = (r2 - r1)/steps; + scalePerStep = (endScale - startScale)/steps; + rotPerStep = (endRot - startRot)/steps; + + touchMove = function(step) { + var radius = r1 + (radiusPerStep)*step, + px1 = centerX + radius*Math.sin(this._toRadian(startRot + rotPerStep*step)), + py1 = centerY - radius*Math.cos(this._toRadian(startRot + rotPerStep*step)), + px2 = centerX - radius*Math.sin(this._toRadian(startRot + rotPerStep*step)), + py2 = centerY + radius*Math.cos(this._toRadian(startRot + rotPerStep*step)), + px = (px1+px2)/2, + py = (py1+py2)/2, + coord1, coord2, coord, touches; + + // coordinate for each touch object. + coord1 = { + pageX: px1, + pageY: py1, + clientX: px1, + clientY: py1 + }; + coord2 = { + pageX: px2, + pageY: py2, + clientX: px2, + clientY: py2 + }; + touches = this._createTouchList([Y.merge({ + identifier: (id++) + }, coord1), Y.merge({ + identifier: (id++) + }, coord2)]); + + // coordinate for top level event + coord = { + pageX: px, + pageY: py, + clientX: px, + clientY: py + }; + + this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches, + scale: startScale + scalePerStep*step, + rotation: startRot + rotPerStep*step + }, coord)); + + if(Y.UA.ios >= 2.0) { + this._simulateEvent(this.target, GESTURE_CHANGE, Y.merge({ + scale: startScale + scalePerStep*step, + rotation: startRot + rotPerStep*step + }, coord)); + } + }; + + for (i=0; i < steps; i++) { + eventQueue.add({ + fn: touchMove, + args: [i], + context: this + }); + } + + // gesture end + eventQueue.add({ + fn: function() { + var emptyTouchList = this._getEmptyTouchList(), + coord1, coord2, coord, touches; + + // coordinate for each touch object. + coord1 = { + pageX: path1.end[0], + pageY: path1.end[1], + clientX: path1.end[0], + clientY: path1.end[1] + }; + coord2 = { + pageX: path2.end[0], + pageY: path2.end[1], + clientX: path2.end[0], + clientY: path2.end[1] + }; + touches = this._createTouchList([Y.merge({ + identifier: (id++) + }, coord1), Y.merge({ + identifier: (id++) + }, coord2)]); + + // coordinate for top level event + coord = { + pageX: (path1.end[0] + path2.end[0])/2, + pageY: (path1.end[0] + path2.end[1])/2, + clientX: (path1.end[0] + path2.end[0])/2, + clientY: (path1.end[0] + path2.end[1])/2 + }; + + if(Y.UA.ios >= 2.0) { + this._simulateEvent(this.target, GESTURE_END, Y.merge({ + scale: endScale, + rotation: endRot + }, coord)); + } + + this._simulateEvent(this.target, TOUCH_END, Y.merge({ + touches: emptyTouchList, + targetTouches: emptyTouchList, + changedTouches: touches, + scale: endScale, + rotation: endRot + }, coord)); + }, + context: this + }); + + if(cb && Y.Lang.isFunction(cb)) { + eventQueue.add({ + fn: cb, + + // by default, the callback runs the node context where + // simulateGesture method is called. + context: this.node + + //TODO: Use args to pass error object as 1st param if there is an error. + //args: + }); + } + + eventQueue.run(); + }, + + /** + * The "tap" gesture can be used for various single touch point gestures + * such as single tap, N number of taps, long press. The default is a single + * tap. + * + * @method tap + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} point A point(relative to the top left corner of the + * target node element) where the tap gesture should start. The default + * is the center of the taget node. + * @param {Number} times The number of taps. Default is 1. + * @param {Number} hold The hold time in milliseconds between "touchstart" and + * "touchend" event generation. Default is 10ms. + * @param {Number} delay The time gap in millisecond between taps if this + * gesture has more than 1 tap. Default is 10ms. + */ + tap: function(cb, point, times, hold, delay) { + var eventQueue = new Y.AsyncQueue(), + emptyTouchList = this._getEmptyTouchList(), + touches, + coord, + i, + touchStart, + touchEnd; + + point = this._calculateDefaultPoint(point); + + if(!Y.Lang.isNumber(times) || times < 1) { + times = 1; + } + + if(!Y.Lang.isNumber(hold)) { + hold = DEFAULTS.HOLD_TAP; + } + + if(!Y.Lang.isNumber(delay)) { + delay = DEFAULTS.DELAY_TAP; + } + + coord = { + pageX: point[0], + pageY: point[1], + clientX: point[0], + clientY: point[1] + }; + + touches = this._createTouchList([Y.merge({identifier: 0}, coord)]); + + touchStart = function() { + this._simulateEvent(this.target, TOUCH_START, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }; + + touchEnd = function() { + this._simulateEvent(this.target, TOUCH_END, Y.merge({ + touches: emptyTouchList, + targetTouches: emptyTouchList, + changedTouches: touches + }, coord)); + }; + + for (i=0; i < times; i++) { + eventQueue.add({ + fn: touchStart, + context: this, + timeout: (i === 0)? 0 : delay + }); + + eventQueue.add({ + fn: touchEnd, + context: this, + timeout: hold + }); + } + + if(times > 1 && !SUPPORTS_TOUCH) { + eventQueue.add({ + fn: function() { + this._simulateEvent(this.target, MOUSE_DBLCLICK, coord); + }, + context: this + }); + } + + if(cb && Y.Lang.isFunction(cb)) { + eventQueue.add({ + fn: cb, + + // by default, the callback runs the node context where + // simulateGesture method is called. + context: this.node + + //TODO: Use args to pass error object as 1st param if there is an error. + //args: + }); + } + + eventQueue.run(); + }, + + /** + * The "flick" gesture is a specialized "move" that has some velocity + * and the movement always runs either x or y axis. The velocity is calculated + * with "distance" and "duration" arguments. If the calculated velocity is + * below than the minimum velocity, the given duration will be ignored and + * new duration will be created to make a valid flick gesture. + * + * @method flick + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} point A point(relative to the top left corner of the + * target node element) where the flick gesture should start. The default + * is the center of the taget node. + * @param {String} axis Either "x" or "y". + * @param {Number} distance A distance in pixels to flick. + * @param {Number} duration A duration of the gesture in millisecond. + * + */ + flick: function(cb, point, axis, distance, duration) { + var path; + + point = this._calculateDefaultPoint(point); + + if(!Y.Lang.isString(axis)) { + axis = X_AXIS; + } else { + axis = axis.toLowerCase(); + if(axis !== X_AXIS && axis !== Y_AXIS) { + Y.error(NAME+'(flick): Only x or y axis allowed'); + } + } + + if(!Y.Lang.isNumber(distance)) { + distance = DEFAULTS.DISTANCE_FLICK; + } + + if(!Y.Lang.isNumber(duration)){ + duration = DEFAULTS.DURATION_FLICK; // ms + } else { + if(duration > DEFAULTS.MAX_DURATION_FLICK) { + duration = DEFAULTS.MAX_DURATION_FLICK; + } + } + + /* + * Check if too slow for a flick. + * Adjust duration if the calculated velocity is less than + * the minimum velcocity to be claimed as a flick. + */ + if(Math.abs(distance)/duration < DEFAULTS.MIN_VELOCITY_FLICK) { + duration = Math.abs(distance)/DEFAULTS.MIN_VELOCITY_FLICK; + } + + path = { + start: Y.clone(point), + end: [ + (axis === X_AXIS) ? point[0]+distance : point[0], + (axis === Y_AXIS) ? point[1]+distance : point[1] + ] + }; + + this._move(cb, path, duration); + }, + + /** + * The "move" gesture simulate the movement of any direction between + * the straight line of start and end point for the given duration. + * The path argument is an object with "point", "xdist" and "ydist" properties. + * The "point" property is an array with x and y coordinations(relative to the + * top left corner of the target node element) while "xdist" and "ydist" + * properties are used for the distance along the x and y axis. A negative + * distance number can be used to drag either left or up direction. + * + * If no arguments are given, it will simulate the default move, which + * is moving 200 pixels from the center of the element to the positive X-axis + * direction for 1 sec. + * + * @method move + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Object} path An object with "point", "xdist" and "ydist". + * @param {Number} duration A duration of the gesture in millisecond. + */ + move: function(cb, path, duration) { + var convertedPath; + + if(!Y.Lang.isObject(path)) { + path = { + point: this._calculateDefaultPoint([]), + xdist: DEFAULTS.DISTANCE_MOVE, + ydist: 0 + }; + } else { + // convert to the page coordination + if(!Y.Lang.isArray(path.point)) { + path.point = this._calculateDefaultPoint([]); + } else { + path.point = this._calculateDefaultPoint(path.point); + } + + if(!Y.Lang.isNumber(path.xdist)) { + path.xdist = DEFAULTS.DISTANCE_MOVE; + } + + if(!Y.Lang.isNumber(path.ydist)) { + path.ydist = 0; + } + } + + if(!Y.Lang.isNumber(duration)){ + duration = DEFAULTS.DURATION_MOVE; // ms + } else { + if(duration > DEFAULTS.MAX_DURATION_MOVE) { + duration = DEFAULTS.MAX_DURATION_MOVE; + } + } + + convertedPath = { + start: Y.clone(path.point), + end: [path.point[0]+path.xdist, path.point[1]+path.ydist] + }; + + this._move(cb, convertedPath, duration); + }, + + /** + * A base method on top of "move" and "flick" methods. The method takes + * the path with start/end properties and duration to generate a set of + * touch events for the movement gesture. + * + * @method _move + * @private + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Object} path An object with "start" and "end" properties. Each + * property should be an array with x and y coordination (e.g. start: [100, 50]) + * @param {Number} duration A duration of the gesture in millisecond. + */ + _move: function(cb, path, duration) { + var eventQueue, + i, + interval = EVENT_INTERVAL, + steps, stepX, stepY, + id = 0, + touchMove; + + if(!Y.Lang.isNumber(duration)){ + duration = DEFAULTS.DURATION_MOVE; // ms + } else { + if(duration > DEFAULTS.MAX_DURATION_MOVE) { + duration = DEFAULTS.MAX_DURATION_MOVE; + } + } + + if(!Y.Lang.isObject(path)) { + path = { + start: [ + START_PAGEX, + START_PAGEY + ], + end: [ + START_PAGEX + DEFAULTS.DISTANCE_MOVE, + START_PAGEY + ] + }; + } else { + if(!Y.Lang.isArray(path.start)) { + path.start = [ + START_PAGEX, + START_PAGEY + ]; + } + if(!Y.Lang.isArray(path.end)) { + path.end = [ + START_PAGEX + DEFAULTS.DISTANCE_MOVE, + START_PAGEY + ]; + } + } + + Y.AsyncQueue.defaults.timeout = interval; + eventQueue = new Y.AsyncQueue(); + + // start + eventQueue.add({ + fn: function() { + var coord = { + pageX: path.start[0], + pageY: path.start[1], + clientX: path.start[0], + clientY: path.start[1] + }, + touches = this._createTouchList([ + Y.merge({identifier: (id++)}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_START, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }, + timeout: 0, + context: this + }); + + // move + steps = Math.floor(duration/interval); + stepX = (path.end[0] - path.start[0])/steps; + stepY = (path.end[1] - path.start[1])/steps; + + touchMove = function(step) { + var px = path.start[0]+(stepX * step), + py = path.start[1]+(stepY * step), + coord = { + pageX: px, + pageY: py, + clientX: px, + clientY: py + }, + touches = this._createTouchList([ + Y.merge({identifier: (id++)}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }; + + for (i=0; i < steps; i++) { + eventQueue.add({ + fn: touchMove, + args: [i], + context: this + }); + } + + // last move + eventQueue.add({ + fn: function() { + var coord = { + pageX: path.end[0], + pageY: path.end[1], + clientX: path.end[0], + clientY: path.end[1] + }, + touches = this._createTouchList([ + Y.merge({identifier: id}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }, + timeout: 0, + context: this + }); + + // end + eventQueue.add({ + fn: function() { + var coord = { + pageX: path.end[0], + pageY: path.end[1], + clientX: path.end[0], + clientY: path.end[1] + }, + emptyTouchList = this._getEmptyTouchList(), + touches = this._createTouchList([ + Y.merge({identifier: id}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_END, Y.merge({ + touches: emptyTouchList, + targetTouches: emptyTouchList, + changedTouches: touches + }, coord)); + }, + context: this + }); + + if(cb && Y.Lang.isFunction(cb)) { + eventQueue.add({ + fn: cb, + + // by default, the callback runs the node context where + // simulateGesture method is called. + context: this.node + + //TODO: Use args to pass error object as 1st param if there is an error. + //args: + }); + } + + eventQueue.run(); + }, + + /** + * Helper method to return a singleton instance of empty touch list. + * + * @method _getEmptyTouchList + * @private + * @return {TouchList | Array} An empty touch list object. + */ + _getEmptyTouchList: function() { + if(!emptyTouchList) { + emptyTouchList = this._createTouchList([]); + } + + return emptyTouchList; + }, + + /** + * Helper method to convert an array with touch points to TouchList object as + * defined in http://www.w3.org/TR/touch-events/ + * + * @method _createTouchList + * @private + * @param {Array} touchPoints + * @return {TouchList | Array} If underlaying platform support creating touch list + * a TouchList object will be returned otherwise a fake Array object + * will be returned. + */ + _createTouchList: function(touchPoints) { + /* + * Android 4.0.3 emulator: + * Native touch api supported starting in version 4.0 (Ice Cream Sandwich). + * However the support seems limited. In Android 4.0.3 emulator, I got + * "TouchList is not defined". + */ + var touches = [], + touchList, + self = this; + + if(!!touchPoints && Y.Lang.isArray(touchPoints)) { + if(Y.UA.android && Y.UA.android >= 4.0 || Y.UA.ios && Y.UA.ios >= 2.0) { + Y.each(touchPoints, function(point) { + if(!point.identifier) {point.identifier = 0;} + if(!point.pageX) {point.pageX = 0;} + if(!point.pageY) {point.pageY = 0;} + if(!point.screenX) {point.screenX = 0;} + if(!point.screenY) {point.screenY = 0;} + + touches.push(document.createTouch(Y.config.win, + self.target, + point.identifier, + point.pageX, point.pageY, + point.screenX, point.screenY)); + }); + + touchList = document.createTouchList.apply(document, touches); + } else if(Y.UA.ios && Y.UA.ios < 2.0) { + Y.error(NAME+': No touch event simulation framework present.'); + } else { + // this will inclide android(Y.UA.android && Y.UA.android < 4.0) + // and desktops among all others. + + /* + * Touch APIs are broken in androids older than 4.0. We will use + * simulated touch apis for these versions. + */ + touchList = []; + Y.each(touchPoints, function(point) { + if(!point.identifier) {point.identifier = 0;} + if(!point.clientX) {point.clientX = 0;} + if(!point.clientY) {point.clientY = 0;} + if(!point.pageX) {point.pageX = 0;} + if(!point.pageY) {point.pageY = 0;} + if(!point.screenX) {point.screenX = 0;} + if(!point.screenY) {point.screenY = 0;} + + touchList.push({ + target: self.target, + identifier: point.identifier, + clientX: point.clientX, + clientY: point.clientY, + pageX: point.pageX, + pageY: point.pageY, + screenX: point.screenX, + screenY: point.screenY + }); + }); + + touchList.item = function(i) { + return touchList[i]; + }; + } + } else { + Y.error(NAME+': Invalid touchPoints passed'); + } + + return touchList; + }, + + /** + * @method _simulateEvent + * @private + * @param {HTMLElement} target The DOM element that's the target of the event. + * @param {String} type The type of event or name of the supported gesture to simulate + * (i.e., "click", "doubletap", "flick"). + * @param {Object} options (Optional) Extra options to copy onto the event object. + * For gestures, options are used to refine the gesture behavior. + */ + _simulateEvent: function(target, type, options) { + var touches; + + if (touchEvents[type]) { + if(SUPPORTS_TOUCH) { + Y.Event.simulate(target, type, options); + } else { + // simulate using mouse events if touch is not applicable on this platform. + // but only single touch event can be simulated. + if(this._isSingleTouch(options.touches, options.targetTouches, options.changedTouches)) { + type = { + touchstart: MOUSE_DOWN, + touchmove: MOUSE_MOVE, + touchend: MOUSE_UP + }[type]; + + options.button = 0; + options.relatedTarget = null; // since we are not using mouseover event. + + // touchend has none in options.touches. + touches = (type === MOUSE_UP)? options.changedTouches : options.touches; + + options = Y.mix(options, { + screenX: touches.item(0).screenX, + screenY: touches.item(0).screenY, + clientX: touches.item(0).clientX, + clientY: touches.item(0).clientY + }, true); + + Y.Event.simulate(target, type, options); + + if(type == MOUSE_UP) { + Y.Event.simulate(target, MOUSE_CLICK, options); + } + } else { + Y.error("_simulateEvent(): Event '" + type + "' has multi touch objects that can't be simulated in your platform."); + } + } + } else { + // pass thru for all non touch events + Y.Event.simulate(target, type, options); + } + }, + + /** + * Helper method to check the single touch. + * @method _isSingleTouch + * @private + * @param {TouchList} touches + * @param {TouchList} targetTouches + * @param {TouchList} changedTouches + */ + _isSingleTouch: function(touches, targetTouches, changedTouches) { + return (touches && (touches.length <= 1)) && + (targetTouches && (targetTouches.length <= 1)) && + (changedTouches && (changedTouches.length <= 1)); + } +}; + +/* + * A gesture simulation class. + */ +Y.GestureSimulation = Simulations; + +/* + * Various simulation default behavior properties. If user override + * Y.GestureSimulation.defaults, overriden values will be used and this + * should be done before the gesture simulation. + */ +Y.GestureSimulation.defaults = DEFAULTS; + +/* + * The high level gesture names that YUI knows how to simulate. + */ +Y.GestureSimulation.GESTURES = gestureNames; + +/** + * Simulates the higher user level gesture of the given name on a target. + * This method generates a set of low level touch events(Apple specific gesture + * events as well for the iOS platforms) asynchronously. Note that gesture + * simulation is relying on `Y.Event.simulate()` method to generate + * the touch events under the hood. The `Y.Event.simulate()` method + * itself is a synchronous method. + * + * Users are suggested to use `Node.simulateGesture()` method which + * basically calls this method internally. Supported gestures are `tap`, + * `doubletap`, `press`, `move`, `flick`, `pinch` and `rotate`. + * + * The `pinch` gesture is used to simulate the pinching and spreading of two + * fingers. During a pinch simulation, rotation is also possible. Essentially + * `pinch` and `rotate` simulations share the same base implementation to allow + * both pinching and rotation at the same time. The only difference is `pinch` + * requires `start` and `end` option properties while `rotate` requires `rotation` + * option property. + * + * The `pinch` and `rotate` gestures can be described as placing 2 fingers along a + * circle. Pinching and spreading can be described by start and end circles while + * rotation occurs on a single circle. If the radius of the start circle is greater + * than the end circle, the gesture becomes a pinch, otherwise it is a spread spread. + * + * @example + * + * var node = Y.one("#target"); + * + * // double tap example + * node.simulateGesture("doubletap", function() { + * // my callback function + * }); + * + * // flick example from the center of the node, move 50 pixels down for 50ms) + * node.simulateGesture("flick", { + * axis: y, + * distance: -100 + * duration: 50 + * }, function() { + * // my callback function + * }); + * + * // simulate rotating a node 75 degrees counter-clockwise + * node.simulateGesture("rotate", { + * rotation: -75 + * }); + * + * // simulate a pinch and a rotation at the same time. + * // fingers start on a circle of radius 100 px, placed at top/bottom + * // fingers end on a circle of radius 50px, placed at right/left + * node.simulateGesture("pinch", { + * r1: 100, + * r2: 50, + * start: 0 + * rotation: 90 + * }); + * + * @method simulateGesture + * @param {HTMLElement|Node} node The YUI node or HTML element that's the target + * of the event. + * @param {String} name The name of the supported gesture to simulate. The + * supported gesture name is one of "tap", "doubletap", "press", "move", + * "flick", "pinch" and "rotate". + * @param {Object} [options] Extra options used to define the gesture behavior: + * + * Valid options properties for the `tap` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates + * where the tap should be simulated. Default is the center of the node + * element. + * @param {Number} [options.hold=10] (Optional) The hold time in milliseconds. + * This is the time between `touchstart` and `touchend` event generation. + * @param {Number} [options.times=1] (Optional) Indicates the number of taps. + * @param {Number} [options.delay=10] (Optional) The number of milliseconds + * before the next tap simulation happens. This is valid only when `times` + * is more than 1. + * + * Valid options properties for the `doubletap` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates + * where the doubletap should be simulated. Default is the center of the + * node element. + * + * Valid options properties for the `press` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates + * where the press should be simulated. Default is the center of the node + * element. + * @param {Number} [options.hold=3000] (Optional) The hold time in milliseconds. + * This is the time between `touchstart` and `touchend` event generation. + * Default is 3000ms (3 seconds). + * + * Valid options properties for the `move` gesture: + * + * @param {Object} [options.path] (Optional) Indicates the path of the finger + * movement. It's an object with three optional properties: `point`, + * `xdist` and `ydist`. + * @param {Array} [options.path.point] A starting point of the gesture. + * Default is the center of the node element. + * @param {Number} [options.path.xdist=200] A distance to move in pixels + * along the X axis. A negative distance value indicates moving left. + * @param {Number} [options.path.ydist=0] A distance to move in pixels + * along the Y axis. A negative distance value indicates moving up. + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. + * + * Valid options properties for the `flick` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x, y] coordinates + * where the flick should be simulated. Default is the center of the + * node element. + * @param {String} [options.axis='x'] (Optional) Valid values are either + * "x" or "y". Indicates axis to move along. The flick can move to one of + * 4 directions(left, right, up and down). + * @param {Number} [options.distance=200] (Optional) Distance to move in pixels + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. User given value could be automatically + * adjusted by the framework if it is below the minimum velocity to be + * a flick gesture. + * + * Valid options properties for the `pinch` gesture: + * + * @param {Array} [options.center] (Optional) The center of the circle where + * two fingers are placed. Default is the center of the node element. + * @param {Number} [options.r1] (Required) Pixel radius of the start circle + * where 2 fingers will be on when the gesture starts. The circles are + * centered at the center of the element. + * @param {Number} [options.r2] (Required) Pixel radius of the end circle + * when this gesture ends. + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. + * @param {Number} [options.start=0] (Optional) Starting degree of the first + * finger. The value is relative to the path of the north. Default is 0 + * (i.e., 12:00 on a clock). + * @param {Number} [options.rotation=0] (Optional) Degrees to rotate from + * the starting degree. A negative value means rotation to the + * counter-clockwise direction. + * + * Valid options properties for the `rotate` gesture: + * + * @param {Array} [options.center] (Optional) The center of the circle where + * two fingers are placed. Default is the center of the node element. + * @param {Number} [options.r1] (Optional) Pixel radius of the start circle + * where 2 fingers will be on when the gesture starts. The circles are + * centered at the center of the element. Default is a fourth of the node + * element width or height, whichever is smaller. + * @param {Number} [options.r2] (Optional) Pixel radius of the end circle + * when this gesture ends. Default is a fourth of the node element width or + * height, whichever is smaller. + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. + * @param {Number} [options.start=0] (Optional) Starting degree of the first + * finger. The value is relative to the path of the north. Default is 0 + * (i.e., 12:00 on a clock). + * @param {Number} [options.rotation] (Required) Degrees to rotate from + * the starting degree. A negative value means rotation to the + * counter-clockwise direction. + * + * @param {Function} [cb] The callback to execute when the asynchronouse gesture + * simulation is completed. + * @param {Error} cb.err An error object if the simulation is failed. + * @for Event + * @static + */ +Y.Event.simulateGesture = function(node, name, options, cb) { + + node = Y.one(node); + + var sim = new Y.GestureSimulation(node); + name = name.toLowerCase(); + + if(!cb && Y.Lang.isFunction(options)) { + cb = options; + options = {}; + } + + options = options || {}; + + if (gestureNames[name]) { + switch(name) { + // single-touch: point gestures + case 'tap': + sim.tap(cb, options.point, options.times, options.hold, options.delay); + break; + case 'doubletap': + sim.tap(cb, options.point, 2); + break; + case 'press': + if(!Y.Lang.isNumber(options.hold)) { + options.hold = DEFAULTS.HOLD_PRESS; + } else if(options.hold < DEFAULTS.MIN_HOLD_PRESS) { + options.hold = DEFAULTS.MIN_HOLD_PRESS; + } else if(options.hold > DEFAULTS.MAX_HOLD_PRESS) { + options.hold = DEFAULTS.MAX_HOLD_PRESS; + } + sim.tap(cb, options.point, 1, options.hold); + break; + + // single-touch: move gestures + case 'move': + sim.move(cb, options.path, options.duration); + break; + case 'flick': + sim.flick(cb, options.point, options.axis, options.distance, + options.duration); + break; + + // multi-touch: pinch/rotation gestures + case 'pinch': + sim.pinch(cb, options.center, options.r1, options.r2, + options.duration, options.start, options.rotation); + break; + case 'rotate': + sim.rotate(cb, options.center, options.r1, options.r2, + options.duration, options.start, options.rotation); + break; + } + } else { + Y.error(NAME+': Not a supported gesture simulation: '+name); + } +}; + + +}, '3.17.2', {"requires": ["async-queue", "event-simulate", "node-screen"]}); diff --git a/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-min.js b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-min.js new file mode 100644 index 0000000..7f9e453 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate-min.js @@ -0,0 +1,9 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("gesture-simulate",function(e,t){function T(n){n||e.error(t+": invalid target node"),this.node=n,this.target=e.Node.getDOMNode(n);var r=this.node.getXY(),i=this._getDims();a=r[0]+i[0]/2,f=r[1]+i[1]/2}var t="gesture-simulate",n=e.config.win&&"ontouchstart"in e.config.win&&!e.UA.phantomjs&&!(e.UA.chrome&&e.UA.chrome<6),r={tap:1,doubletap:1,press:1,move:1,flick:1,pinch:1,rotate:1},i={touchstart:1,touchmove:1,touchend:1,touchcancel:1},s=e.config.doc,o,u=20,a,f,l={HOLD_TAP:10,DELAY_TAP:10,HOLD_PRESS:3e3,MIN_HOLD_PRESS:1e3,MAX_HOLD_PRESS:6e4,DISTANCE_MOVE:200,DURATION_MOVE:1e3,MAX_DURATION_MOVE:5e3,MIN_VELOCITY_FLICK:1.3,DISTANCE_FLICK:200,DURATION_FLICK:1e3,MAX_DURATION_FLICK:5e3,DURATION_PINCH:1e3},c="touchstart",h="touchmove",p="touchend",d="gesturestart",v="gesturechange",m="gestureend",g="mouseup",y="mousemove",b="mousedown",w="click",E="dblclick",S="x",x="y";T.prototype={_toRadian:function(e){return e*(Math.PI/180)},_getDims:function(){var e,t,n;return this.target.getBoundingClientRect?(e=this.target.getBoundingClientRect(),"height"in e?n=e.height:n=Math.abs(e.bottom-e.top),"width"in e?t=e.width:t=Math.abs(e.right-e.left)):(e=this.node.get("region"),t=e.width,n=e.height),[t,n]},_calculateDefaultPoint:function(t){var n;return!e.Lang.isArray(t)||t.length===0?t=[a,f]:(t.length==1&&(n=this._getDims[1],t[1]=n/2),t[0]=this.node.getX()+t[0],t[1]=this.node.getY()+t[1]),t},rotate:function(n,r,i,s,o,u,a){var f,l=i,c=s;if(!e.Lang.isNumber(l)||!e.Lang.isNumber(c)||l<0||c<0)f=this.target.offsetWidth=2&&this._simulateEvent(this.target,d,e.merge({scale:k,rotation:O},r))},timeout:0,context:this}),H=Math.floor(o/b),T=(x-S)/H,A=(L-k)/H,_=(M-O)/H,B=function(t){var n=S+T*t,r=N+n*Math.sin(this._toRadian(O+_*t)),i=C-n*Math.cos(this._toRadian(O+_*t)),s=N-n*Math.sin(this._toRadian(O+_*t)),o=C+n*Math.cos(this._toRadian(O+_*t)),u=(r+s)/2,a=(i+o)/2,f,l,c,p;f={pageX:r,pageY:i,clientX:r,clientY:i},l={pageX:s,pageY:o,clientX:s,clientY:o},p=this._createTouchList([e.merge({identifier:E++},f),e.merge({identifier:E++},l)]),c={pageX:u,pageY:a,clientX:u,clientY:a},this._simulateEvent(this.target,h,e.merge({touches:p,targetTouches:p,changedTouches:p,scale:k+A*t,rotation:O+_*t},c)),e.UA.ios>=2&&this._simulateEvent(this.target,v,e.merge({scale:k+A*t,rotation:O+_*t},c))};for(y=0;y=2&&this._simulateEvent(this.target,m,e.merge({scale:L,rotation:M},i)),this._simulateEvent(this.target,p,e.merge({touches:t,targetTouches:t,changedTouches:s,scale:L,rotation:M},i))},context:this}),n&&e.Lang.isFunction(n)&&g.add({fn:n,context:this.node}),g.run()},tap:function(t,r,i,s,o){var u=new e.AsyncQueue,a=this._getEmptyTouchList(),f,h,d,v,m;r=this._calculateDefaultPoint(r);if(!e.Lang.isNumber(i)||i<1)i=1;e.Lang.isNumber(s)||(s=l.HOLD_TAP),e.Lang.isNumber(o)||(o=l.DELAY_TAP),h={pageX:r[0],pageY:r[1],clientX:r[0],clientY:r[1]},f=this._createTouchList([e.merge({identifier:0},h)]),v=function(){this._simulateEvent(this.target,c,e.merge({touches:f,targetTouches:f,changedTouches:f},h))},m=function(){this._simulateEvent(this.target,p,e.merge({touches:a,targetTouches:a,changedTouches:f},h))};for(d=0;d1&&!n&&u.add({fn:function(){this._simulateEvent(this.target,E,h)},context:this}),t&&e.Lang.isFunction(t)&&u.add({fn:t,context:this.node}),u.run()},flick:function(n,r,i,s,o){var u;r=this._calculateDefaultPoint(r),e.Lang.isString(i)?(i=i.toLowerCase(),i!==S&&i!==x&&e.error(t+"(flick): Only x or y axis allowed")):i=S,e.Lang.isNumber(s)||(s=l.DISTANCE_FLICK),e.Lang.isNumber(o)?o>l.MAX_DURATION_FLICK&&(o=l.MAX_DURATION_FLICK):o=l.DURATION_FLICK,Math.abs(s)/ol.MAX_DURATION_MOVE&&(r=l.MAX_DURATION_MOVE):r=l.DURATION_MOVE,i={start:e.clone(n.point),end:[n.point[0]+n.xdist,n.point[1]+n.ydist]},this._move(t,i,r)},_move:function(t,n,r){var i,s,o=u,d,v,m,g=0,y;e.Lang.isNumber(r)?r>l.MAX_DURATION_MOVE&&(r=l.MAX_DURATION_MOVE):r=l.DURATION_MOVE,e.Lang.isObject(n)?(e.Lang.isArray(n.start)||(n.start=[a,f]),e.Lang.isArray(n.end)||(n.end=[a+l.DISTANCE_MOVE,f])):n={start:[a,f],end:[a+l.DISTANCE_MOVE,f]},e.AsyncQueue.defaults.timeout=o,i=new e.AsyncQueue,i.add({fn:function(){var t={pageX:n.start[0],pageY:n.start[1],clientX:n.start[0],clientY:n.start[1]},r=this._createTouchList([e.merge({identifier:g++},t)]);this._simulateEvent(this.target,c,e.merge({touches:r,targetTouches:r,changedTouches:r},t))},timeout:0,context:this}),d=Math.floor(r/o),v=(n.end[0]-n.start[0])/d,m=(n.end[1]-n.start[1])/d,y=function(t){var r=n.start[0]+v*t,i=n.start[1]+m*t,s={pageX:r,pageY:i,clientX:r,clientY:i},o=this._createTouchList([e.merge({identifier:g++},s)]);this._simulateEvent(this.target,h,e.merge({touches:o,targetTouches:o,changedTouches:o},s))};for(s=0;s=4||e.UA.ios&&e.UA.ios>=2?(e.each(n,function(t){t.identifier||(t.identifier=0),t.pageX||(t.pageX=0),t.pageY||(t.pageY=0),t.screenX||(t.screenX=0),t.screenY||(t.screenY=0),r.push(s.createTouch(e.config.win,o.target,t.identifier,t.pageX,t.pageY,t.screenX,t.screenY))}),i=s.createTouchList.apply(s,r)):e.UA.ios&&e.UA.ios<2?e.error(t+": No touch event simulation framework present."):(i=[],e.each(n,function(e){e.identifier||(e.identifier=0),e.clientX||(e.clientX=0),e.clientY||(e.clientY=0),e.pageX||(e.pageX=0),e.pageY||(e.pageY=0),e.screenX||(e.screenX=0),e.screenY||(e.screenY=0),i.push({target:o.target,identifier:e.identifier,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}),i.item=function(e){return i[e]}):e.error(t+": Invalid touchPoints passed"),i},_simulateEvent:function(t,r,s){var o;i[r]?n?e.Event.simulate(t,r,s):this._isSingleTouch(s.touches,s.targetTouches,s.changedTouches)?(r={touchstart:b,touchmove:y,touchend:g}[r],s.button=0,s.relatedTarget=null,o=r===g?s.changedTouches:s.touches,s=e.mix(s,{screenX:o.item(0).screenX,screenY:o.item(0).screenY,clientX:o.item(0).clientX,clientY:o.item(0).clientY},!0),e.Event.simulate(t,r,s),r==g&&e.Event.simulate(t,w,s)):e.error("_simulateEvent(): Event '"+r+"' has multi touch objects that can't be simulated in your platform."):e.Event.simulate(t,r,s)},_isSingleTouch:function(e,t,n){return e&&e.length<=1&&t&&t.length<=1&&n&&n.length<=1}},e.GestureSimulation=T,e.GestureSimulation.defaults=l,e.GestureSimulation.GESTURES=r,e.Event.simulateGesture=function(n,i,s,o){n=e.one(n);var u=new e.GestureSimulation(n);i=i.toLowerCase(),!o&&e.Lang.isFunction(s)&&(o=s,s={}),s=s||{};if(r[i])switch(i){case"tap":u.tap(o,s.point,s.times,s.hold,s.delay);break;case"doubletap":u.tap(o,s.point,2);break;case"press":e.Lang.isNumber(s.hold)?s.holdl.MAX_HOLD_PRESS&&(s.hold=l.MAX_HOLD_PRESS):s.hold=l.HOLD_PRESS,u.tap(o,s.point,1,s.hold);break;case"move":u.move(o,s.path,s.duration);break;case"flick":u.flick(o,s.point,s.axis,s.distance,s.duration);break;case"pinch":u.pinch(o,s.center,s.r1,s.r2,s.duration,s.start,s.rotation);break;case"rotate":u.rotate(o,s.center,s.r1,s.r2,s.duration,s.start,s.rotation)}else e.error(t+": Not a supported gesture simulation: "+i)}},"3.17.2",{requires:["async-queue","event-simulate","node-screen"]}); diff --git a/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate.js b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate.js new file mode 100644 index 0000000..55b8e19 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/gesture-simulate/gesture-simulate.js @@ -0,0 +1,1328 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('gesture-simulate', function (Y, NAME) { + +/** + * Simulate high-level user gestures by generating a set of native DOM events. + * + * @module gesture-simulate + * @requires event-simulate, async-queue, node-screen + */ + +var NAME = "gesture-simulate", + + // phantomjs check may be temporary, until we determine if it really support touch all the way through, like it claims to (http://code.google.com/p/phantomjs/issues/detail?id=375) + SUPPORTS_TOUCH = ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.phantomjs) && !(Y.UA.chrome && Y.UA.chrome < 6)), + + gestureNames = { + tap: 1, + doubletap: 1, + press: 1, + move: 1, + flick: 1, + pinch: 1, + rotate: 1 + }, + + touchEvents = { + touchstart: 1, + touchmove: 1, + touchend: 1, + touchcancel: 1 + }, + + document = Y.config.doc, + emptyTouchList, + + EVENT_INTERVAL = 20, // 20ms + START_PAGEX, // will be adjusted to the node element center + START_PAGEY, // will be adjusted to the node element center + + // defaults that user can override. + DEFAULTS = { + // tap gestures + HOLD_TAP: 10, // 10ms + DELAY_TAP: 10, // 10ms + + // press gesture + HOLD_PRESS: 3000, // 3sec + MIN_HOLD_PRESS: 1000, // 1sec + MAX_HOLD_PRESS: 60000, // 1min + + // move gesture + DISTANCE_MOVE: 200, // 200 pixels + DURATION_MOVE: 1000, // 1sec + MAX_DURATION_MOVE: 5000,// 5sec + + // flick gesture + MIN_VELOCITY_FLICK: 1.3, + DISTANCE_FLICK: 200, // 200 pixels + DURATION_FLICK: 1000, // 1sec + MAX_DURATION_FLICK: 5000,// 5sec + + // pinch/rotation + DURATION_PINCH: 1000 // 1sec + }, + + TOUCH_START = 'touchstart', + TOUCH_MOVE = 'touchmove', + TOUCH_END = 'touchend', + + GESTURE_START = 'gesturestart', + GESTURE_CHANGE = 'gesturechange', + GESTURE_END = 'gestureend', + + MOUSE_UP = 'mouseup', + MOUSE_MOVE = 'mousemove', + MOUSE_DOWN = 'mousedown', + MOUSE_CLICK = 'click', + MOUSE_DBLCLICK = 'dblclick', + + X_AXIS = 'x', + Y_AXIS = 'y'; + + +function Simulations(node) { + if(!node) { + Y.error(NAME+': invalid target node'); + } + this.node = node; + this.target = Y.Node.getDOMNode(node); + + var startXY = this.node.getXY(), + dims = this._getDims(); + + START_PAGEX = startXY[0] + (dims[0])/2; + START_PAGEY = startXY[1] + (dims[1])/2; +} + +Simulations.prototype = { + + /** + * Helper method to convert a degree to a radian. + * + * @method _toRadian + * @private + * @param {Number} deg A degree to be converted to a radian. + * @return {Number} The degree in radian. + */ + _toRadian: function(deg) { + return deg * (Math.PI/180); + }, + + /** + * Helper method to get height/width while accounting for + * rotation/scale transforms where possible by using the + * bounding client rectangle height/width instead of the + * offsetWidth/Height which region uses. + * @method _getDims + * @private + * @return {Array} Array with [height, width] + */ + _getDims : function() { + var region, + width, + height; + + // Ideally, this should be in DOM somewhere. + if (this.target.getBoundingClientRect) { + region = this.target.getBoundingClientRect(); + + if ("height" in region) { + height = region.height; + } else { + // IE7,8 has getBCR, but no height. + height = Math.abs(region.bottom - region.top); + } + + if ("width" in region) { + width = region.width; + } else { + // IE7,8 has getBCR, but no width. + width = Math.abs(region.right - region.left); + } + } else { + region = this.node.get("region"); + width = region.width; + height = region.height; + } + + return [width, height]; + }, + + /** + * Helper method to convert a point relative to the node element into + * the point in the page coordination. + * + * @method _calculateDefaultPoint + * @private + * @param {Array} point A point relative to the node element. + * @return {Array} The same point in the page coordination. + */ + _calculateDefaultPoint: function(point) { + + var height; + + if(!Y.Lang.isArray(point) || point.length === 0) { + point = [START_PAGEX, START_PAGEY]; + } else { + if(point.length == 1) { + height = this._getDims[1]; + point[1] = height/2; + } + // convert to page(viewport) coordination + point[0] = this.node.getX() + point[0]; + point[1] = this.node.getY() + point[1]; + } + + return point; + }, + + /** + * The "rotate" and "pinch" methods are essencially same with the exact same + * arguments. Only difference is the required parameters. The rotate method + * requires "rotation" parameter while the pinch method requires "startRadius" + * and "endRadius" parameters. + * + * @method rotate + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} center A center point where the pinch gesture of two fingers + * should happen. It is relative to the top left corner of the target + * node element. + * @param {Number} startRadius A radius of start circle where 2 fingers are + * on when the gesture starts. This is optional. The default is a fourth of + * either target node width or height whichever is smaller. + * @param {Number} endRadius A radius of end circle where 2 fingers will be on when + * the pinch or spread gestures are completed. This is optional. + * The default is a fourth of either target node width or height whichever is less. + * @param {Number} duration A duration of the gesture in millisecond. + * @param {Number} start A start angle(0 degree at 12 o'clock) where the + * gesture should start. Default is 0. + * @param {Number} rotation A rotation in degree. It is required. + */ + rotate: function(cb, center, startRadius, endRadius, duration, start, rotation) { + var radius, + r1 = startRadius, // optional + r2 = endRadius; // optional + + if(!Y.Lang.isNumber(r1) || !Y.Lang.isNumber(r2) || r1<0 || r2<0) { + radius = (this.target.offsetWidth < this.target.offsetHeight)? + this.target.offsetWidth/4 : this.target.offsetHeight/4; + r1 = radius; + r2 = radius; + } + + // required + if(!Y.Lang.isNumber(rotation)) { + Y.error(NAME+'Invalid rotation detected.'); + } + + this.pinch(cb, center, r1, r2, duration, start, rotation); + }, + + /** + * The "rotate" and "pinch" methods are essencially same with the exact same + * arguments. Only difference is the required parameters. The rotate method + * requires "rotation" parameter while the pinch method requires "startRadius" + * and "endRadius" parameters. + * + * The "pinch" gesture can simulate various 2 finger gestures such as pinch, + * spread and/or rotation. The "startRadius" and "endRadius" are required. + * If endRadius is larger than startRadius, it becomes a spread gesture + * otherwise a pinch gesture. + * + * @method pinch + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} center A center point where the pinch gesture of two fingers + * should happen. It is relative to the top left corner of the target + * node element. + * @param {Number} startRadius A radius of start circle where 2 fingers are + * on when the gesture starts. This paramenter is required. + * @param {Number} endRadius A radius of end circle where 2 fingers will be on when + * the pinch or spread gestures are completed. This parameter is required. + * @param {Number} duration A duration of the gesture in millisecond. + * @param {Number} start A start angle(0 degree at 12 o'clock) where the + * gesture should start. Default is 0. + * @param {Number} rotation If rotation is desired during the pinch or + * spread gestures, this parameter can be used. Default is 0 degree. + */ + pinch: function(cb, center, startRadius, endRadius, duration, start, rotation) { + var eventQueue, + i, + interval = EVENT_INTERVAL, + touches, + id = 0, + r1 = startRadius, // required + r2 = endRadius, // required + radiusPerStep, + centerX, centerY, + startScale, endScale, scalePerStep, + startRot, endRot, rotPerStep, + path1 = {start: [], end: []}, // paths for 1st and 2nd fingers. + path2 = {start: [], end: []}, + steps, + touchMove; + + center = this._calculateDefaultPoint(center); + + if(!Y.Lang.isNumber(r1) || !Y.Lang.isNumber(r2) || r1<0 || r2<0) { + Y.error(NAME+'Invalid startRadius and endRadius detected.'); + } + + if(!Y.Lang.isNumber(duration) || duration <= 0) { + duration = DEFAULTS.DURATION_PINCH; + } + + if(!Y.Lang.isNumber(start)) { + start = 0.0; + } else { + start = start%360; + while(start < 0) { + start += 360; + } + } + + if(!Y.Lang.isNumber(rotation)) { + rotation = 0.0; + } + + Y.AsyncQueue.defaults.timeout = interval; + eventQueue = new Y.AsyncQueue(); + + // range determination + centerX = center[0]; + centerY = center[1]; + + startRot = start; + endRot = start + rotation; + + // 1st finger path + path1.start = [ + centerX + r1*Math.sin(this._toRadian(startRot)), + centerY - r1*Math.cos(this._toRadian(startRot)) + ]; + path1.end = [ + centerX + r2*Math.sin(this._toRadian(endRot)), + centerY - r2*Math.cos(this._toRadian(endRot)) + ]; + + // 2nd finger path + path2.start = [ + centerX - r1*Math.sin(this._toRadian(startRot)), + centerY + r1*Math.cos(this._toRadian(startRot)) + ]; + path2.end = [ + centerX - r2*Math.sin(this._toRadian(endRot)), + centerY + r2*Math.cos(this._toRadian(endRot)) + ]; + + startScale = 1.0; + endScale = endRadius/startRadius; + + // touch/gesture start + eventQueue.add({ + fn: function() { + var coord1, coord2, coord, touches; + + // coordinate for each touch object. + coord1 = { + pageX: path1.start[0], + pageY: path1.start[1], + clientX: path1.start[0], + clientY: path1.start[1] + }; + coord2 = { + pageX: path2.start[0], + pageY: path2.start[1], + clientX: path2.start[0], + clientY: path2.start[1] + }; + touches = this._createTouchList([Y.merge({ + identifier: (id++) + }, coord1), Y.merge({ + identifier: (id++) + }, coord2)]); + + // coordinate for top level event + coord = { + pageX: (path1.start[0] + path2.start[0])/2, + pageY: (path1.start[0] + path2.start[1])/2, + clientX: (path1.start[0] + path2.start[0])/2, + clientY: (path1.start[0] + path2.start[1])/2 + }; + + this._simulateEvent(this.target, TOUCH_START, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches, + scale: startScale, + rotation: startRot + }, coord)); + + if(Y.UA.ios >= 2.0) { + /* gesture starts when the 2nd finger touch starts. + * The implementation will fire 1 touch start event for both fingers, + * simulating 2 fingers touched on the screen at the same time. + */ + this._simulateEvent(this.target, GESTURE_START, Y.merge({ + scale: startScale, + rotation: startRot + }, coord)); + } + }, + timeout: 0, + context: this + }); + + // gesture change + steps = Math.floor(duration/interval); + radiusPerStep = (r2 - r1)/steps; + scalePerStep = (endScale - startScale)/steps; + rotPerStep = (endRot - startRot)/steps; + + touchMove = function(step) { + var radius = r1 + (radiusPerStep)*step, + px1 = centerX + radius*Math.sin(this._toRadian(startRot + rotPerStep*step)), + py1 = centerY - radius*Math.cos(this._toRadian(startRot + rotPerStep*step)), + px2 = centerX - radius*Math.sin(this._toRadian(startRot + rotPerStep*step)), + py2 = centerY + radius*Math.cos(this._toRadian(startRot + rotPerStep*step)), + px = (px1+px2)/2, + py = (py1+py2)/2, + coord1, coord2, coord, touches; + + // coordinate for each touch object. + coord1 = { + pageX: px1, + pageY: py1, + clientX: px1, + clientY: py1 + }; + coord2 = { + pageX: px2, + pageY: py2, + clientX: px2, + clientY: py2 + }; + touches = this._createTouchList([Y.merge({ + identifier: (id++) + }, coord1), Y.merge({ + identifier: (id++) + }, coord2)]); + + // coordinate for top level event + coord = { + pageX: px, + pageY: py, + clientX: px, + clientY: py + }; + + this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches, + scale: startScale + scalePerStep*step, + rotation: startRot + rotPerStep*step + }, coord)); + + if(Y.UA.ios >= 2.0) { + this._simulateEvent(this.target, GESTURE_CHANGE, Y.merge({ + scale: startScale + scalePerStep*step, + rotation: startRot + rotPerStep*step + }, coord)); + } + }; + + for (i=0; i < steps; i++) { + eventQueue.add({ + fn: touchMove, + args: [i], + context: this + }); + } + + // gesture end + eventQueue.add({ + fn: function() { + var emptyTouchList = this._getEmptyTouchList(), + coord1, coord2, coord, touches; + + // coordinate for each touch object. + coord1 = { + pageX: path1.end[0], + pageY: path1.end[1], + clientX: path1.end[0], + clientY: path1.end[1] + }; + coord2 = { + pageX: path2.end[0], + pageY: path2.end[1], + clientX: path2.end[0], + clientY: path2.end[1] + }; + touches = this._createTouchList([Y.merge({ + identifier: (id++) + }, coord1), Y.merge({ + identifier: (id++) + }, coord2)]); + + // coordinate for top level event + coord = { + pageX: (path1.end[0] + path2.end[0])/2, + pageY: (path1.end[0] + path2.end[1])/2, + clientX: (path1.end[0] + path2.end[0])/2, + clientY: (path1.end[0] + path2.end[1])/2 + }; + + if(Y.UA.ios >= 2.0) { + this._simulateEvent(this.target, GESTURE_END, Y.merge({ + scale: endScale, + rotation: endRot + }, coord)); + } + + this._simulateEvent(this.target, TOUCH_END, Y.merge({ + touches: emptyTouchList, + targetTouches: emptyTouchList, + changedTouches: touches, + scale: endScale, + rotation: endRot + }, coord)); + }, + context: this + }); + + if(cb && Y.Lang.isFunction(cb)) { + eventQueue.add({ + fn: cb, + + // by default, the callback runs the node context where + // simulateGesture method is called. + context: this.node + + //TODO: Use args to pass error object as 1st param if there is an error. + //args: + }); + } + + eventQueue.run(); + }, + + /** + * The "tap" gesture can be used for various single touch point gestures + * such as single tap, N number of taps, long press. The default is a single + * tap. + * + * @method tap + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} point A point(relative to the top left corner of the + * target node element) where the tap gesture should start. The default + * is the center of the taget node. + * @param {Number} times The number of taps. Default is 1. + * @param {Number} hold The hold time in milliseconds between "touchstart" and + * "touchend" event generation. Default is 10ms. + * @param {Number} delay The time gap in millisecond between taps if this + * gesture has more than 1 tap. Default is 10ms. + */ + tap: function(cb, point, times, hold, delay) { + var eventQueue = new Y.AsyncQueue(), + emptyTouchList = this._getEmptyTouchList(), + touches, + coord, + i, + touchStart, + touchEnd; + + point = this._calculateDefaultPoint(point); + + if(!Y.Lang.isNumber(times) || times < 1) { + times = 1; + } + + if(!Y.Lang.isNumber(hold)) { + hold = DEFAULTS.HOLD_TAP; + } + + if(!Y.Lang.isNumber(delay)) { + delay = DEFAULTS.DELAY_TAP; + } + + coord = { + pageX: point[0], + pageY: point[1], + clientX: point[0], + clientY: point[1] + }; + + touches = this._createTouchList([Y.merge({identifier: 0}, coord)]); + + touchStart = function() { + this._simulateEvent(this.target, TOUCH_START, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }; + + touchEnd = function() { + this._simulateEvent(this.target, TOUCH_END, Y.merge({ + touches: emptyTouchList, + targetTouches: emptyTouchList, + changedTouches: touches + }, coord)); + }; + + for (i=0; i < times; i++) { + eventQueue.add({ + fn: touchStart, + context: this, + timeout: (i === 0)? 0 : delay + }); + + eventQueue.add({ + fn: touchEnd, + context: this, + timeout: hold + }); + } + + if(times > 1 && !SUPPORTS_TOUCH) { + eventQueue.add({ + fn: function() { + this._simulateEvent(this.target, MOUSE_DBLCLICK, coord); + }, + context: this + }); + } + + if(cb && Y.Lang.isFunction(cb)) { + eventQueue.add({ + fn: cb, + + // by default, the callback runs the node context where + // simulateGesture method is called. + context: this.node + + //TODO: Use args to pass error object as 1st param if there is an error. + //args: + }); + } + + eventQueue.run(); + }, + + /** + * The "flick" gesture is a specialized "move" that has some velocity + * and the movement always runs either x or y axis. The velocity is calculated + * with "distance" and "duration" arguments. If the calculated velocity is + * below than the minimum velocity, the given duration will be ignored and + * new duration will be created to make a valid flick gesture. + * + * @method flick + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Array} point A point(relative to the top left corner of the + * target node element) where the flick gesture should start. The default + * is the center of the taget node. + * @param {String} axis Either "x" or "y". + * @param {Number} distance A distance in pixels to flick. + * @param {Number} duration A duration of the gesture in millisecond. + * + */ + flick: function(cb, point, axis, distance, duration) { + var path; + + point = this._calculateDefaultPoint(point); + + if(!Y.Lang.isString(axis)) { + axis = X_AXIS; + } else { + axis = axis.toLowerCase(); + if(axis !== X_AXIS && axis !== Y_AXIS) { + Y.error(NAME+'(flick): Only x or y axis allowed'); + } + } + + if(!Y.Lang.isNumber(distance)) { + distance = DEFAULTS.DISTANCE_FLICK; + } + + if(!Y.Lang.isNumber(duration)){ + duration = DEFAULTS.DURATION_FLICK; // ms + } else { + if(duration > DEFAULTS.MAX_DURATION_FLICK) { + duration = DEFAULTS.MAX_DURATION_FLICK; + } + } + + /* + * Check if too slow for a flick. + * Adjust duration if the calculated velocity is less than + * the minimum velcocity to be claimed as a flick. + */ + if(Math.abs(distance)/duration < DEFAULTS.MIN_VELOCITY_FLICK) { + duration = Math.abs(distance)/DEFAULTS.MIN_VELOCITY_FLICK; + } + + path = { + start: Y.clone(point), + end: [ + (axis === X_AXIS) ? point[0]+distance : point[0], + (axis === Y_AXIS) ? point[1]+distance : point[1] + ] + }; + + this._move(cb, path, duration); + }, + + /** + * The "move" gesture simulate the movement of any direction between + * the straight line of start and end point for the given duration. + * The path argument is an object with "point", "xdist" and "ydist" properties. + * The "point" property is an array with x and y coordinations(relative to the + * top left corner of the target node element) while "xdist" and "ydist" + * properties are used for the distance along the x and y axis. A negative + * distance number can be used to drag either left or up direction. + * + * If no arguments are given, it will simulate the default move, which + * is moving 200 pixels from the center of the element to the positive X-axis + * direction for 1 sec. + * + * @method move + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Object} path An object with "point", "xdist" and "ydist". + * @param {Number} duration A duration of the gesture in millisecond. + */ + move: function(cb, path, duration) { + var convertedPath; + + if(!Y.Lang.isObject(path)) { + path = { + point: this._calculateDefaultPoint([]), + xdist: DEFAULTS.DISTANCE_MOVE, + ydist: 0 + }; + } else { + // convert to the page coordination + if(!Y.Lang.isArray(path.point)) { + path.point = this._calculateDefaultPoint([]); + } else { + path.point = this._calculateDefaultPoint(path.point); + } + + if(!Y.Lang.isNumber(path.xdist)) { + path.xdist = DEFAULTS.DISTANCE_MOVE; + } + + if(!Y.Lang.isNumber(path.ydist)) { + path.ydist = 0; + } + } + + if(!Y.Lang.isNumber(duration)){ + duration = DEFAULTS.DURATION_MOVE; // ms + } else { + if(duration > DEFAULTS.MAX_DURATION_MOVE) { + duration = DEFAULTS.MAX_DURATION_MOVE; + } + } + + convertedPath = { + start: Y.clone(path.point), + end: [path.point[0]+path.xdist, path.point[1]+path.ydist] + }; + + this._move(cb, convertedPath, duration); + }, + + /** + * A base method on top of "move" and "flick" methods. The method takes + * the path with start/end properties and duration to generate a set of + * touch events for the movement gesture. + * + * @method _move + * @private + * @param {Function} cb The callback to execute when the gesture simulation + * is completed. + * @param {Object} path An object with "start" and "end" properties. Each + * property should be an array with x and y coordination (e.g. start: [100, 50]) + * @param {Number} duration A duration of the gesture in millisecond. + */ + _move: function(cb, path, duration) { + var eventQueue, + i, + interval = EVENT_INTERVAL, + steps, stepX, stepY, + id = 0, + touchMove; + + if(!Y.Lang.isNumber(duration)){ + duration = DEFAULTS.DURATION_MOVE; // ms + } else { + if(duration > DEFAULTS.MAX_DURATION_MOVE) { + duration = DEFAULTS.MAX_DURATION_MOVE; + } + } + + if(!Y.Lang.isObject(path)) { + path = { + start: [ + START_PAGEX, + START_PAGEY + ], + end: [ + START_PAGEX + DEFAULTS.DISTANCE_MOVE, + START_PAGEY + ] + }; + } else { + if(!Y.Lang.isArray(path.start)) { + path.start = [ + START_PAGEX, + START_PAGEY + ]; + } + if(!Y.Lang.isArray(path.end)) { + path.end = [ + START_PAGEX + DEFAULTS.DISTANCE_MOVE, + START_PAGEY + ]; + } + } + + Y.AsyncQueue.defaults.timeout = interval; + eventQueue = new Y.AsyncQueue(); + + // start + eventQueue.add({ + fn: function() { + var coord = { + pageX: path.start[0], + pageY: path.start[1], + clientX: path.start[0], + clientY: path.start[1] + }, + touches = this._createTouchList([ + Y.merge({identifier: (id++)}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_START, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }, + timeout: 0, + context: this + }); + + // move + steps = Math.floor(duration/interval); + stepX = (path.end[0] - path.start[0])/steps; + stepY = (path.end[1] - path.start[1])/steps; + + touchMove = function(step) { + var px = path.start[0]+(stepX * step), + py = path.start[1]+(stepY * step), + coord = { + pageX: px, + pageY: py, + clientX: px, + clientY: py + }, + touches = this._createTouchList([ + Y.merge({identifier: (id++)}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }; + + for (i=0; i < steps; i++) { + eventQueue.add({ + fn: touchMove, + args: [i], + context: this + }); + } + + // last move + eventQueue.add({ + fn: function() { + var coord = { + pageX: path.end[0], + pageY: path.end[1], + clientX: path.end[0], + clientY: path.end[1] + }, + touches = this._createTouchList([ + Y.merge({identifier: id}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_MOVE, Y.merge({ + touches: touches, + targetTouches: touches, + changedTouches: touches + }, coord)); + }, + timeout: 0, + context: this + }); + + // end + eventQueue.add({ + fn: function() { + var coord = { + pageX: path.end[0], + pageY: path.end[1], + clientX: path.end[0], + clientY: path.end[1] + }, + emptyTouchList = this._getEmptyTouchList(), + touches = this._createTouchList([ + Y.merge({identifier: id}, coord) + ]); + + this._simulateEvent(this.target, TOUCH_END, Y.merge({ + touches: emptyTouchList, + targetTouches: emptyTouchList, + changedTouches: touches + }, coord)); + }, + context: this + }); + + if(cb && Y.Lang.isFunction(cb)) { + eventQueue.add({ + fn: cb, + + // by default, the callback runs the node context where + // simulateGesture method is called. + context: this.node + + //TODO: Use args to pass error object as 1st param if there is an error. + //args: + }); + } + + eventQueue.run(); + }, + + /** + * Helper method to return a singleton instance of empty touch list. + * + * @method _getEmptyTouchList + * @private + * @return {TouchList | Array} An empty touch list object. + */ + _getEmptyTouchList: function() { + if(!emptyTouchList) { + emptyTouchList = this._createTouchList([]); + } + + return emptyTouchList; + }, + + /** + * Helper method to convert an array with touch points to TouchList object as + * defined in http://www.w3.org/TR/touch-events/ + * + * @method _createTouchList + * @private + * @param {Array} touchPoints + * @return {TouchList | Array} If underlaying platform support creating touch list + * a TouchList object will be returned otherwise a fake Array object + * will be returned. + */ + _createTouchList: function(touchPoints) { + /* + * Android 4.0.3 emulator: + * Native touch api supported starting in version 4.0 (Ice Cream Sandwich). + * However the support seems limited. In Android 4.0.3 emulator, I got + * "TouchList is not defined". + */ + var touches = [], + touchList, + self = this; + + if(!!touchPoints && Y.Lang.isArray(touchPoints)) { + if(Y.UA.android && Y.UA.android >= 4.0 || Y.UA.ios && Y.UA.ios >= 2.0) { + Y.each(touchPoints, function(point) { + if(!point.identifier) {point.identifier = 0;} + if(!point.pageX) {point.pageX = 0;} + if(!point.pageY) {point.pageY = 0;} + if(!point.screenX) {point.screenX = 0;} + if(!point.screenY) {point.screenY = 0;} + + touches.push(document.createTouch(Y.config.win, + self.target, + point.identifier, + point.pageX, point.pageY, + point.screenX, point.screenY)); + }); + + touchList = document.createTouchList.apply(document, touches); + } else if(Y.UA.ios && Y.UA.ios < 2.0) { + Y.error(NAME+': No touch event simulation framework present.'); + } else { + // this will inclide android(Y.UA.android && Y.UA.android < 4.0) + // and desktops among all others. + + /* + * Touch APIs are broken in androids older than 4.0. We will use + * simulated touch apis for these versions. + */ + touchList = []; + Y.each(touchPoints, function(point) { + if(!point.identifier) {point.identifier = 0;} + if(!point.clientX) {point.clientX = 0;} + if(!point.clientY) {point.clientY = 0;} + if(!point.pageX) {point.pageX = 0;} + if(!point.pageY) {point.pageY = 0;} + if(!point.screenX) {point.screenX = 0;} + if(!point.screenY) {point.screenY = 0;} + + touchList.push({ + target: self.target, + identifier: point.identifier, + clientX: point.clientX, + clientY: point.clientY, + pageX: point.pageX, + pageY: point.pageY, + screenX: point.screenX, + screenY: point.screenY + }); + }); + + touchList.item = function(i) { + return touchList[i]; + }; + } + } else { + Y.error(NAME+': Invalid touchPoints passed'); + } + + return touchList; + }, + + /** + * @method _simulateEvent + * @private + * @param {HTMLElement} target The DOM element that's the target of the event. + * @param {String} type The type of event or name of the supported gesture to simulate + * (i.e., "click", "doubletap", "flick"). + * @param {Object} options (Optional) Extra options to copy onto the event object. + * For gestures, options are used to refine the gesture behavior. + */ + _simulateEvent: function(target, type, options) { + var touches; + + if (touchEvents[type]) { + if(SUPPORTS_TOUCH) { + Y.Event.simulate(target, type, options); + } else { + // simulate using mouse events if touch is not applicable on this platform. + // but only single touch event can be simulated. + if(this._isSingleTouch(options.touches, options.targetTouches, options.changedTouches)) { + type = { + touchstart: MOUSE_DOWN, + touchmove: MOUSE_MOVE, + touchend: MOUSE_UP + }[type]; + + options.button = 0; + options.relatedTarget = null; // since we are not using mouseover event. + + // touchend has none in options.touches. + touches = (type === MOUSE_UP)? options.changedTouches : options.touches; + + options = Y.mix(options, { + screenX: touches.item(0).screenX, + screenY: touches.item(0).screenY, + clientX: touches.item(0).clientX, + clientY: touches.item(0).clientY + }, true); + + Y.Event.simulate(target, type, options); + + if(type == MOUSE_UP) { + Y.Event.simulate(target, MOUSE_CLICK, options); + } + } else { + Y.error("_simulateEvent(): Event '" + type + "' has multi touch objects that can't be simulated in your platform."); + } + } + } else { + // pass thru for all non touch events + Y.Event.simulate(target, type, options); + } + }, + + /** + * Helper method to check the single touch. + * @method _isSingleTouch + * @private + * @param {TouchList} touches + * @param {TouchList} targetTouches + * @param {TouchList} changedTouches + */ + _isSingleTouch: function(touches, targetTouches, changedTouches) { + return (touches && (touches.length <= 1)) && + (targetTouches && (targetTouches.length <= 1)) && + (changedTouches && (changedTouches.length <= 1)); + } +}; + +/* + * A gesture simulation class. + */ +Y.GestureSimulation = Simulations; + +/* + * Various simulation default behavior properties. If user override + * Y.GestureSimulation.defaults, overriden values will be used and this + * should be done before the gesture simulation. + */ +Y.GestureSimulation.defaults = DEFAULTS; + +/* + * The high level gesture names that YUI knows how to simulate. + */ +Y.GestureSimulation.GESTURES = gestureNames; + +/** + * Simulates the higher user level gesture of the given name on a target. + * This method generates a set of low level touch events(Apple specific gesture + * events as well for the iOS platforms) asynchronously. Note that gesture + * simulation is relying on `Y.Event.simulate()` method to generate + * the touch events under the hood. The `Y.Event.simulate()` method + * itself is a synchronous method. + * + * Users are suggested to use `Node.simulateGesture()` method which + * basically calls this method internally. Supported gestures are `tap`, + * `doubletap`, `press`, `move`, `flick`, `pinch` and `rotate`. + * + * The `pinch` gesture is used to simulate the pinching and spreading of two + * fingers. During a pinch simulation, rotation is also possible. Essentially + * `pinch` and `rotate` simulations share the same base implementation to allow + * both pinching and rotation at the same time. The only difference is `pinch` + * requires `start` and `end` option properties while `rotate` requires `rotation` + * option property. + * + * The `pinch` and `rotate` gestures can be described as placing 2 fingers along a + * circle. Pinching and spreading can be described by start and end circles while + * rotation occurs on a single circle. If the radius of the start circle is greater + * than the end circle, the gesture becomes a pinch, otherwise it is a spread spread. + * + * @example + * + * var node = Y.one("#target"); + * + * // double tap example + * node.simulateGesture("doubletap", function() { + * // my callback function + * }); + * + * // flick example from the center of the node, move 50 pixels down for 50ms) + * node.simulateGesture("flick", { + * axis: y, + * distance: -100 + * duration: 50 + * }, function() { + * // my callback function + * }); + * + * // simulate rotating a node 75 degrees counter-clockwise + * node.simulateGesture("rotate", { + * rotation: -75 + * }); + * + * // simulate a pinch and a rotation at the same time. + * // fingers start on a circle of radius 100 px, placed at top/bottom + * // fingers end on a circle of radius 50px, placed at right/left + * node.simulateGesture("pinch", { + * r1: 100, + * r2: 50, + * start: 0 + * rotation: 90 + * }); + * + * @method simulateGesture + * @param {HTMLElement|Node} node The YUI node or HTML element that's the target + * of the event. + * @param {String} name The name of the supported gesture to simulate. The + * supported gesture name is one of "tap", "doubletap", "press", "move", + * "flick", "pinch" and "rotate". + * @param {Object} [options] Extra options used to define the gesture behavior: + * + * Valid options properties for the `tap` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates + * where the tap should be simulated. Default is the center of the node + * element. + * @param {Number} [options.hold=10] (Optional) The hold time in milliseconds. + * This is the time between `touchstart` and `touchend` event generation. + * @param {Number} [options.times=1] (Optional) Indicates the number of taps. + * @param {Number} [options.delay=10] (Optional) The number of milliseconds + * before the next tap simulation happens. This is valid only when `times` + * is more than 1. + * + * Valid options properties for the `doubletap` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates + * where the doubletap should be simulated. Default is the center of the + * node element. + * + * Valid options properties for the `press` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x,y] coordinates + * where the press should be simulated. Default is the center of the node + * element. + * @param {Number} [options.hold=3000] (Optional) The hold time in milliseconds. + * This is the time between `touchstart` and `touchend` event generation. + * Default is 3000ms (3 seconds). + * + * Valid options properties for the `move` gesture: + * + * @param {Object} [options.path] (Optional) Indicates the path of the finger + * movement. It's an object with three optional properties: `point`, + * `xdist` and `ydist`. + * @param {Array} [options.path.point] A starting point of the gesture. + * Default is the center of the node element. + * @param {Number} [options.path.xdist=200] A distance to move in pixels + * along the X axis. A negative distance value indicates moving left. + * @param {Number} [options.path.ydist=0] A distance to move in pixels + * along the Y axis. A negative distance value indicates moving up. + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. + * + * Valid options properties for the `flick` gesture: + * + * @param {Array} [options.point] (Optional) Indicates the [x, y] coordinates + * where the flick should be simulated. Default is the center of the + * node element. + * @param {String} [options.axis='x'] (Optional) Valid values are either + * "x" or "y". Indicates axis to move along. The flick can move to one of + * 4 directions(left, right, up and down). + * @param {Number} [options.distance=200] (Optional) Distance to move in pixels + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. User given value could be automatically + * adjusted by the framework if it is below the minimum velocity to be + * a flick gesture. + * + * Valid options properties for the `pinch` gesture: + * + * @param {Array} [options.center] (Optional) The center of the circle where + * two fingers are placed. Default is the center of the node element. + * @param {Number} [options.r1] (Required) Pixel radius of the start circle + * where 2 fingers will be on when the gesture starts. The circles are + * centered at the center of the element. + * @param {Number} [options.r2] (Required) Pixel radius of the end circle + * when this gesture ends. + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. + * @param {Number} [options.start=0] (Optional) Starting degree of the first + * finger. The value is relative to the path of the north. Default is 0 + * (i.e., 12:00 on a clock). + * @param {Number} [options.rotation=0] (Optional) Degrees to rotate from + * the starting degree. A negative value means rotation to the + * counter-clockwise direction. + * + * Valid options properties for the `rotate` gesture: + * + * @param {Array} [options.center] (Optional) The center of the circle where + * two fingers are placed. Default is the center of the node element. + * @param {Number} [options.r1] (Optional) Pixel radius of the start circle + * where 2 fingers will be on when the gesture starts. The circles are + * centered at the center of the element. Default is a fourth of the node + * element width or height, whichever is smaller. + * @param {Number} [options.r2] (Optional) Pixel radius of the end circle + * when this gesture ends. Default is a fourth of the node element width or + * height, whichever is smaller. + * @param {Number} [options.duration=1000] (Optional) The duration of the + * gesture in milliseconds. + * @param {Number} [options.start=0] (Optional) Starting degree of the first + * finger. The value is relative to the path of the north. Default is 0 + * (i.e., 12:00 on a clock). + * @param {Number} [options.rotation] (Required) Degrees to rotate from + * the starting degree. A negative value means rotation to the + * counter-clockwise direction. + * + * @param {Function} [cb] The callback to execute when the asynchronouse gesture + * simulation is completed. + * @param {Error} cb.err An error object if the simulation is failed. + * @for Event + * @static + */ +Y.Event.simulateGesture = function(node, name, options, cb) { + + node = Y.one(node); + + var sim = new Y.GestureSimulation(node); + name = name.toLowerCase(); + + if(!cb && Y.Lang.isFunction(options)) { + cb = options; + options = {}; + } + + options = options || {}; + + if (gestureNames[name]) { + switch(name) { + // single-touch: point gestures + case 'tap': + sim.tap(cb, options.point, options.times, options.hold, options.delay); + break; + case 'doubletap': + sim.tap(cb, options.point, 2); + break; + case 'press': + if(!Y.Lang.isNumber(options.hold)) { + options.hold = DEFAULTS.HOLD_PRESS; + } else if(options.hold < DEFAULTS.MIN_HOLD_PRESS) { + options.hold = DEFAULTS.MIN_HOLD_PRESS; + } else if(options.hold > DEFAULTS.MAX_HOLD_PRESS) { + options.hold = DEFAULTS.MAX_HOLD_PRESS; + } + sim.tap(cb, options.point, 1, options.hold); + break; + + // single-touch: move gestures + case 'move': + sim.move(cb, options.path, options.duration); + break; + case 'flick': + sim.flick(cb, options.point, options.axis, options.distance, + options.duration); + break; + + // multi-touch: pinch/rotation gestures + case 'pinch': + sim.pinch(cb, options.center, options.r1, options.r2, + options.duration, options.start, options.rotation); + break; + case 'rotate': + sim.rotate(cb, options.center, options.r1, options.r2, + options.duration, options.start, options.rotation); + break; + } + } else { + Y.error(NAME+': Not a supported gesture simulation: '+name); + } +}; + + +}, '3.17.2', {"requires": ["async-queue", "event-simulate", "node-screen"]}); diff --git a/design/standard/lib/yui/3.17.2/build/get-nodejs/get-nodejs-coverage.js b/design/standard/lib/yui/3.17.2/build/get-nodejs/get-nodejs-coverage.js new file mode 100644 index 0000000..36f2880 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/get-nodejs/get-nodejs-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/get-nodejs/get-nodejs.js']) { + __coverage__['build/get-nodejs/get-nodejs.js'] = {"path":"build/get-nodejs/get-nodejs.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":34}}},"2":{"name":"(anonymous_2)","line":15,"loc":{"start":{"line":15,"column":14},"end":{"line":15,"column":40}}},"3":{"name":"(anonymous_3)","line":19,"loc":{"start":{"line":19,"column":18},"end":{"line":19,"column":31}}},"4":{"name":"(anonymous_4)","line":24,"loc":{"start":{"line":24,"column":18},"end":{"line":24,"column":35}}},"5":{"name":"(anonymous_5)","line":33,"loc":{"start":{"line":33,"column":12},"end":{"line":33,"column":23}}},"6":{"name":"(anonymous_6)","line":54,"loc":{"start":{"line":54,"column":18},"end":{"line":54,"column":42}}},"7":{"name":"(anonymous_7)","line":85,"loc":{"start":{"line":85,"column":21},"end":{"line":85,"column":40}}},"8":{"name":"(anonymous_8)","line":95,"loc":{"start":{"line":95,"column":25},"end":{"line":95,"column":56}}},"9":{"name":"(anonymous_9)","line":111,"loc":{"start":{"line":111,"column":45},"end":{"line":111,"column":65}}},"10":{"name":"(anonymous_10)","line":136,"loc":{"start":{"line":136,"column":15},"end":{"line":136,"column":36}}},"11":{"name":"(anonymous_11)","line":138,"loc":{"start":{"line":138,"column":20},"end":{"line":138,"column":31}}},"12":{"name":"(anonymous_12)","line":153,"loc":{"start":{"line":153,"column":32},"end":{"line":153,"column":51}}},"13":{"name":"(anonymous_13)","line":173,"loc":{"start":{"line":173,"column":21},"end":{"line":173,"column":32}}},"14":{"name":"(anonymous_14)","line":184,"loc":{"start":{"line":184,"column":16},"end":{"line":184,"column":32}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":190,"column":16}},"2":{"start":{"line":10,"column":4},"end":{"line":30,"column":10}},"3":{"start":{"line":16,"column":12},"end":{"line":18,"column":13}},"4":{"start":{"line":17,"column":16},"end":{"line":17,"column":46}},"5":{"start":{"line":20,"column":12},"end":{"line":22,"column":13}},"6":{"start":{"line":21,"column":16},"end":{"line":21,"column":41}},"7":{"start":{"line":23,"column":12},"end":{"line":23,"column":42}},"8":{"start":{"line":25,"column":12},"end":{"line":25,"column":29}},"9":{"start":{"line":26,"column":12},"end":{"line":28,"column":13}},"10":{"start":{"line":27,"column":16},"end":{"line":27,"column":45}},"11":{"start":{"line":29,"column":12},"end":{"line":29,"column":32}},"12":{"start":{"line":33,"column":4},"end":{"line":34,"column":6}},"13":{"start":{"line":37,"column":4},"end":{"line":37,"column":48}},"14":{"start":{"line":39,"column":4},"end":{"line":39,"column":26}},"15":{"start":{"line":40,"column":4},"end":{"line":40,"column":26}},"16":{"start":{"line":54,"column":4},"end":{"line":75,"column":6}},"17":{"start":{"line":55,"column":8},"end":{"line":57,"column":9}},"18":{"start":{"line":56,"column":12},"end":{"line":56,"column":33}},"19":{"start":{"line":59,"column":8},"end":{"line":59,"column":42}},"20":{"start":{"line":60,"column":8},"end":{"line":60,"column":27}},"21":{"start":{"line":61,"column":8},"end":{"line":61,"column":63}},"22":{"start":{"line":62,"column":8},"end":{"line":64,"column":9}},"23":{"start":{"line":63,"column":12},"end":{"line":63,"column":47}},"24":{"start":{"line":65,"column":8},"end":{"line":67,"column":19}},"25":{"start":{"line":70,"column":8},"end":{"line":70,"column":31}},"26":{"start":{"line":72,"column":8},"end":{"line":72,"column":26}},"27":{"start":{"line":74,"column":8},"end":{"line":74,"column":22}},"28":{"start":{"line":85,"column":4},"end":{"line":127,"column":6}},"29":{"start":{"line":86,"column":8},"end":{"line":88,"column":24}},"30":{"start":{"line":90,"column":8},"end":{"line":126,"column":9}},"31":{"start":{"line":91,"column":12},"end":{"line":94,"column":14}},"32":{"start":{"line":95,"column":12},"end":{"line":101,"column":15}},"33":{"start":{"line":96,"column":16},"end":{"line":100,"column":17}},"34":{"start":{"line":97,"column":20},"end":{"line":97,"column":33}},"35":{"start":{"line":99,"column":20},"end":{"line":99,"column":47}},"36":{"start":{"line":103,"column":12},"end":{"line":123,"column":13}},"37":{"start":{"line":105,"column":16},"end":{"line":105,"column":102}},"38":{"start":{"line":107,"column":16},"end":{"line":119,"column":17}},"39":{"start":{"line":109,"column":20},"end":{"line":109,"column":54}},"40":{"start":{"line":111,"column":20},"end":{"line":117,"column":23}},"41":{"start":{"line":112,"column":24},"end":{"line":116,"column":25}},"42":{"start":{"line":113,"column":28},"end":{"line":113,"column":41}},"43":{"start":{"line":115,"column":28},"end":{"line":115,"column":54}},"44":{"start":{"line":118,"column":20},"end":{"line":118,"column":27}},"45":{"start":{"line":121,"column":16},"end":{"line":121,"column":29}},"46":{"start":{"line":122,"column":16},"end":{"line":122,"column":23}},"47":{"start":{"line":125,"column":12},"end":{"line":125,"column":38}},"48":{"start":{"line":136,"column":4},"end":{"line":175,"column":6}},"49":{"start":{"line":137,"column":8},"end":{"line":142,"column":14}},"50":{"start":{"line":139,"column":16},"end":{"line":141,"column":17}},"51":{"start":{"line":140,"column":20},"end":{"line":140,"column":34}},"52":{"start":{"line":146,"column":8},"end":{"line":169,"column":9}},"53":{"start":{"line":147,"column":12},"end":{"line":147,"column":26}},"54":{"start":{"line":148,"column":12},"end":{"line":150,"column":13}},"55":{"start":{"line":149,"column":16},"end":{"line":149,"column":30}},"56":{"start":{"line":152,"column":12},"end":{"line":152,"column":43}},"57":{"start":{"line":153,"column":12},"end":{"line":168,"column":15}},"58":{"start":{"line":154,"column":16},"end":{"line":158,"column":17}},"59":{"start":{"line":155,"column":20},"end":{"line":157,"column":22}},"60":{"start":{"line":159,"column":16},"end":{"line":161,"column":17}},"61":{"start":{"line":160,"column":20},"end":{"line":160,"column":71}},"62":{"start":{"line":162,"column":16},"end":{"line":167,"column":17}},"63":{"start":{"line":163,"column":20},"end":{"line":163,"column":39}},"64":{"start":{"line":165,"column":20},"end":{"line":165,"column":24}},"65":{"start":{"line":166,"column":20},"end":{"line":166,"column":28}},"66":{"start":{"line":172,"column":8},"end":{"line":174,"column":10}},"67":{"start":{"line":181,"column":4},"end":{"line":181,"column":28}},"68":{"start":{"line":184,"column":4},"end":{"line":186,"column":6}},"69":{"start":{"line":185,"column":8},"end":{"line":185,"column":17}}},"branchMap":{"1":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":12},"end":{"line":16,"column":12}},{"start":{"line":16,"column":12},"end":{"line":16,"column":12}}]},"2":{"line":20,"type":"if","locations":[{"start":{"line":20,"column":12},"end":{"line":20,"column":12}},{"start":{"line":20,"column":12},"end":{"line":20,"column":12}}]},"3":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":12},"end":{"line":26,"column":12}},{"start":{"line":26,"column":12},"end":{"line":26,"column":12}}]},"4":{"line":55,"type":"if","locations":[{"start":{"line":55,"column":8},"end":{"line":55,"column":8}},{"start":{"line":55,"column":8},"end":{"line":55,"column":8}}]},"5":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":8},"end":{"line":62,"column":8}},{"start":{"line":62,"column":8},"end":{"line":62,"column":8}}]},"6":{"line":90,"type":"if","locations":[{"start":{"line":90,"column":8},"end":{"line":90,"column":8}},{"start":{"line":90,"column":8},"end":{"line":90,"column":8}}]},"7":{"line":96,"type":"if","locations":[{"start":{"line":96,"column":16},"end":{"line":96,"column":16}},{"start":{"line":96,"column":16},"end":{"line":96,"column":16}}]},"8":{"line":107,"type":"if","locations":[{"start":{"line":107,"column":16},"end":{"line":107,"column":16}},{"start":{"line":107,"column":16},"end":{"line":107,"column":16}}]},"9":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":24},"end":{"line":112,"column":24}},{"start":{"line":112,"column":24},"end":{"line":112,"column":24}}]},"10":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":16},"end":{"line":139,"column":16}},{"start":{"line":139,"column":16},"end":{"line":139,"column":16}}]},"11":{"line":148,"type":"if","locations":[{"start":{"line":148,"column":12},"end":{"line":148,"column":12}},{"start":{"line":148,"column":12},"end":{"line":148,"column":12}}]},"12":{"line":154,"type":"if","locations":[{"start":{"line":154,"column":16},"end":{"line":154,"column":16}},{"start":{"line":154,"column":16},"end":{"line":154,"column":16}}]},"13":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":16},"end":{"line":159,"column":16}},{"start":{"line":159,"column":16},"end":{"line":159,"column":16}}]},"14":{"line":160,"type":"binary-expr","locations":[{"start":{"line":160,"column":44},"end":{"line":160,"column":59}},{"start":{"line":160,"column":63},"end":{"line":160,"column":64}}]},"15":{"line":162,"type":"if","locations":[{"start":{"line":162,"column":16},"end":{"line":162,"column":16}},{"start":{"line":162,"column":16},"end":{"line":162,"column":16}}]}},"code":["(function () { YUI.add('get', function (Y, NAME) {",""," /**"," * NodeJS specific Get module used to load remote resources."," * It contains the same signature as the default Get module so there is no code change needed."," * @module get-nodejs"," * @class GetNodeJS"," */",""," var Module = require('module'),",""," path = require('path'),"," fs = require('fs'),"," request = require('request'),"," end = function(cb, msg, result) {"," if (Y.Lang.isFunction(cb.onEnd)) {"," cb.onEnd.call(Y, msg, result);"," }"," }, pass = function(cb) {"," if (Y.Lang.isFunction(cb.onSuccess)) {"," cb.onSuccess.call(Y, cb);"," }"," end(cb, 'success', 'success');"," }, fail = function(cb, er) {"," er.errors = [er];"," if (Y.Lang.isFunction(cb.onFailure)) {"," cb.onFailure.call(Y, er, cb);"," }"," end(cb, er, 'fail');"," };","",""," Y.Get = function() {"," };",""," //Setup the default config base path"," Y.config.base = path.join(__dirname, '../');",""," YUI.require = require;"," YUI.process = process;",""," /**"," * Takes the raw JS files and wraps them to be executed in the YUI context so they can be loaded"," * into the YUI object"," * @method _exec"," * @private"," * @param {String} data The JS to execute"," * @param {String} url The path to the file that was parsed"," * @param {Function} cb The callback to execute when this is completed"," * @param {Error} cb.err=null Error object"," * @param {String} cb.url The URL that was just parsed"," */",""," Y.Get._exec = function(data, url, cb) {"," if (data.charCodeAt(0) === 0xFEFF) {"," data = data.slice(1);"," }",""," var mod = new Module(url, module);"," mod.filename = url;"," mod.paths = Module._nodeModulePaths(path.dirname(url));"," if (typeof YUI._getLoadHook === 'function') {"," data = YUI._getLoadHook(data, url);"," }"," mod._compile('module.exports = function (YUI) {' +"," 'return (function () {'+ data + '\\n;return YUI;}).apply(global);' +"," '};', url);",""," /*global YUI:true */"," YUI = mod.exports(YUI);",""," mod.loaded = true;",""," cb(null, url);"," };",""," /**"," * Fetches the content from a remote URL or a file from disc and passes the content"," * off to `_exec` for parsing"," * @method _include"," * @private"," * @param {String} url The URL/File path to fetch the content from"," * @param {Function} cb The callback to fire once the content has been executed via `_exec`"," */"," Y.Get._include = function (url, cb) {"," var cfg,"," mod,"," self = this;",""," if (url.match(/^https?:\\/\\//)) {"," cfg = {"," url: url,"," timeout: self.timeout"," };"," request(cfg, function (err, response, body) {"," if (err) {"," cb(err, url);"," } else {"," Y.Get._exec(body, url, cb);"," }"," });"," } else {"," try {"," // Try to resolve paths relative to the module that required yui."," url = Module._findPath(url, Module._resolveLookupPaths(url, module.parent.parent)[1]);",""," if (Y.config.useSync) {"," //Needs to be in useSync"," mod = fs.readFileSync(url,'utf8');"," } else {"," fs.readFile(url, 'utf8', function (err, mod) {"," if (err) {"," cb(err, url);"," } else {"," Y.Get._exec(mod, url, cb);"," }"," });"," return;"," }"," } catch (err) {"," cb(err, url);"," return;"," }",""," Y.Get._exec(mod, url, cb);"," }"," };","",""," /**"," * Override for Get.script for loading local or remote YUI modules."," * @method js"," * @param {Array|String} s The URL's to load into this context"," * @param {Object} options Transaction options"," */"," Y.Get.js = function(s, options) {"," var urls = Y.Array(s), url, i, l = urls.length, c= 0,"," check = function() {"," if (c === l) {"," pass(options);"," }"," };","",""," /*jshint loopfunc: true */"," for (i=0; i` nodes, a failed CSS"," request may still be reported as a success because in these browsers"," it can be difficult or impossible to distinguish between success and"," failure for CSS resources.",""," @property {Function} [options.onTimeout] Callback to execute after a"," transaction times out.",""," @property {Number} [options.pollInterval=50] Polling interval (in"," milliseconds) for detecting CSS load completion in browsers that don't"," support the `load` event on `` nodes. This isn't used for"," JavaScript.",""," @property {Number} [options.purgethreshold=20] Number of nodes to insert"," before triggering an automatic purge when `autopurge` is `true`.",""," @property {Number} [options.timeout] Number of milliseconds to wait before"," aborting a transaction. When a timeout occurs, the `onTimeout` callback"," is called, followed by `onFailure` and finally `onEnd`. By default,"," there is no timeout.",""," @property {String} [options.type] Resource type (\"css\" or \"js\"). This option"," is set automatically by the `css()` and `js()` functions and will be"," ignored there, but may be useful when using the `load()` function. If"," not specified, the type will be inferred from the URL, defaulting to"," \"js\" if the URL doesn't contain a recognizable file extension."," **/"," options: {"," attributes: {"," charset: 'utf-8'"," },",""," purgethreshold: 20"," },",""," // -- Protected Properties -------------------------------------------------",""," /**"," Regex that matches a CSS URL. Used to guess the file type when it's not"," specified.",""," @property REGEX_CSS"," @type RegExp"," @final"," @protected"," @static"," @since 3.5.0"," **/"," REGEX_CSS: /\\.css(?:[?;].*)?$/i,",""," /**"," Regex that matches a JS URL. Used to guess the file type when it's not"," specified.",""," @property REGEX_JS"," @type RegExp"," @final"," @protected"," @static"," @since 3.5.0"," **/"," REGEX_JS : /\\.js(?:[?;].*)?$/i,",""," /**"," Contains information about the current environment, such as what script and"," link injection features it supports.",""," This object is created and populated the first time the `_getEnv()` method"," is called.",""," @property _env"," @type Object"," @protected"," @static"," @since 3.5.0"," **/",""," /**"," Mapping of document _yuid strings to or node references so we"," don't have to look the node up each time we want to insert a request node.",""," @property _insertCache"," @type Object"," @protected"," @static"," @since 3.5.0"," **/"," _insertCache: {},",""," /**"," Information about the currently pending transaction, if any.",""," This is actually an object with two properties: `callback`, containing the"," optional callback passed to `css()`, `load()`, or `js()`; and `transaction`,"," containing the actual transaction instance.",""," @property _pending"," @type Object"," @protected"," @static"," @since 3.5.0"," **/"," _pending: null,",""," /**"," HTML nodes eligible to be purged next time autopurge is triggered.",""," @property _purgeNodes"," @type HTMLElement[]"," @protected"," @static"," @since 3.5.0"," **/"," _purgeNodes: [],",""," /**"," Queued transactions and associated callbacks.",""," @property _queue"," @type Object[]"," @protected"," @static"," @since 3.5.0"," **/"," _queue: [],",""," // -- Public Methods -------------------------------------------------------",""," /**"," Aborts the specified transaction.",""," This will cause the transaction's `onFailure` callback to be called and"," will prevent any new script and link nodes from being added to the document,"," but any resources that have already been requested will continue loading"," (there's no safe way to prevent this, unfortunately).",""," *Note:* This method is deprecated as of 3.5.0, and will be removed in a"," future version of YUI. Use the transaction-level `abort()` method instead.",""," @method abort"," @param {Get.Transaction} transaction Transaction to abort."," @deprecated Use the `abort()` method on the transaction instead."," @static"," **/"," abort: function (transaction) {"," var i, id, item, len, pending;","",""," if (!transaction.abort) {"," id = transaction;"," pending = this._pending;"," transaction = null;",""," if (pending && pending.transaction.id === id) {"," transaction = pending.transaction;"," this._pending = null;"," } else {"," for (i = 0, len = this._queue.length; i < len; ++i) {"," item = this._queue[i].transaction;",""," if (item.id === id) {"," transaction = item;"," this._queue.splice(i, 1);"," break;"," }"," }"," }"," }",""," transaction && transaction.abort();"," },",""," /**"," Loads one or more CSS files.",""," The _urls_ parameter may be provided as a URL string, a request object,"," or an array of URL strings and/or request objects.",""," A request object is just an object that contains a `url` property and zero"," or more options that should apply specifically to that request."," Request-specific options take priority over transaction-level options and"," default options.",""," URLs may be relative or absolute, and do not have to have the same origin"," as the current page.",""," The `options` parameter may be omitted completely and a callback passed in"," its place, if desired.",""," @example",""," // Load a single CSS file and log a message on completion."," Y.Get.css('foo.css', function (err) {"," if (err) {"," } else {"," }"," });",""," // Load multiple CSS files and log a message when all have finished"," // loading."," var urls = ['foo.css', 'http://example.com/bar.css', 'baz/quux.css'];",""," Y.Get.css(urls, function (err) {"," if (err) {"," } else {"," }"," });",""," // Specify transaction-level options, which will apply to all requests"," // within the transaction."," Y.Get.css(urls, {"," attributes: {'class': 'my-css'},"," timeout : 5000"," });",""," // Specify per-request options, which override transaction-level and"," // default options."," Y.Get.css(["," {url: 'foo.css', attributes: {id: 'foo'}},"," {url: 'bar.css', attributes: {id: 'bar', charset: 'iso-8859-1'}}"," ]);",""," @method css"," @param {String|Object|Array} urls URL string, request object, or array"," of URLs and/or request objects to load."," @param {Object} [options] Options for this transaction. See the"," `Y.Get.options` property for a complete list of available options."," @param {Function} [callback] Callback function to be called on completion."," This is a general callback and will be called before any more granular"," callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options`"," object.",""," @param {Array|null} callback.err Array of errors that occurred during"," the transaction, or `null` on success."," @param {Get.Transaction} callback.transaction Transaction object.",""," @return {Get.Transaction} Transaction object."," @static"," **/"," css: function (urls, options, callback) {"," return this._load('css', urls, options, callback);"," },",""," /**"," Loads one or more JavaScript resources.",""," The _urls_ parameter may be provided as a URL string, a request object,"," or an array of URL strings and/or request objects.",""," A request object is just an object that contains a `url` property and zero"," or more options that should apply specifically to that request."," Request-specific options take priority over transaction-level options and"," default options.",""," URLs may be relative or absolute, and do not have to have the same origin"," as the current page.",""," The `options` parameter may be omitted completely and a callback passed in"," its place, if desired.",""," Scripts will be executed in the order they're specified unless the `async`"," option is `true`, in which case they'll be loaded in parallel and executed"," in whatever order they finish loading.",""," @example",""," // Load a single JS file and log a message on completion."," Y.Get.js('foo.js', function (err) {"," if (err) {"," } else {"," }"," });",""," // Load multiple JS files, execute them in order, and log a message when"," // all have finished loading."," var urls = ['foo.js', 'http://example.com/bar.js', 'baz/quux.js'];",""," Y.Get.js(urls, function (err) {"," if (err) {"," } else {"," }"," });",""," // Specify transaction-level options, which will apply to all requests"," // within the transaction."," Y.Get.js(urls, {"," attributes: {'class': 'my-js'},"," timeout : 5000"," });",""," // Specify per-request options, which override transaction-level and"," // default options."," Y.Get.js(["," {url: 'foo.js', attributes: {id: 'foo'}},"," {url: 'bar.js', attributes: {id: 'bar', charset: 'iso-8859-1'}}"," ]);",""," @method js"," @param {String|Object|Array} urls URL string, request object, or array"," of URLs and/or request objects to load."," @param {Object} [options] Options for this transaction. See the"," `Y.Get.options` property for a complete list of available options."," @param {Function} [callback] Callback function to be called on completion."," This is a general callback and will be called before any more granular"," callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options`"," object.",""," @param {Array|null} callback.err Array of errors that occurred during"," the transaction, or `null` on success."," @param {Get.Transaction} callback.transaction Transaction object.",""," @return {Get.Transaction} Transaction object."," @since 3.5.0"," @static"," **/"," js: function (urls, options, callback) {"," return this._load('js', urls, options, callback);"," },",""," /**"," Loads one or more CSS and/or JavaScript resources in the same transaction.",""," Use this method when you want to load both CSS and JavaScript in a single"," transaction and be notified when all requested URLs have finished loading,"," regardless of type.",""," Behavior and options are the same as for the `css()` and `js()` methods. If"," a resource type isn't specified in per-request options or transaction-level"," options, Get will guess the file type based on the URL's extension (`.css`"," or `.js`, with or without a following query string). If the file type can't"," be guessed from the URL, a warning will be logged and Get will assume the"," URL is a JavaScript resource.",""," @example",""," // Load both CSS and JS files in a single transaction, and log a message"," // when all files have finished loading."," Y.Get.load(['foo.css', 'bar.js', 'baz.css'], function (err) {"," if (err) {"," } else {"," }"," });",""," @method load"," @param {String|Object|Array} urls URL string, request object, or array"," of URLs and/or request objects to load."," @param {Object} [options] Options for this transaction. See the"," `Y.Get.options` property for a complete list of available options."," @param {Function} [callback] Callback function to be called on completion."," This is a general callback and will be called before any more granular"," callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options`"," object.",""," @param {Array|null} err Array of errors that occurred during the"," transaction, or `null` on success."," @param {Get.Transaction} Transaction object.",""," @return {Get.Transaction} Transaction object."," @since 3.5.0"," @static"," **/"," load: function (urls, options, callback) {"," return this._load(null, urls, options, callback);"," },",""," // -- Protected Methods ----------------------------------------------------",""," /**"," Triggers an automatic purge if the purge threshold has been reached.",""," @method _autoPurge"," @param {Number} threshold Purge threshold to use, in milliseconds."," @protected"," @since 3.5.0"," @static"," **/"," _autoPurge: function (threshold) {"," if (threshold && this._purgeNodes.length >= threshold) {"," this._purge(this._purgeNodes);"," }"," },",""," /**"," Populates the `_env` property with information about the current"," environment.",""," @method _getEnv"," @return {Object} Environment information."," @protected"," @since 3.5.0"," @static"," **/"," _getEnv: function () {"," var doc = Y.config.doc,"," ua = Y.UA;",""," // Note: some of these checks require browser sniffs since it's not"," // feasible to load test files on every pageview just to perform a"," // feature test. I'm sorry if this makes you sad."," return (this._env = {",""," // True if this is a browser that supports disabling async mode on"," // dynamically created script nodes. See"," // https://developer.mozilla.org/En/HTML/Element/Script#Attributes",""," // IE10 doesn't return true for the MDN feature test, so setting it explicitly,"," // because it is async by default, and allows you to disable async by setting it to false"," async: (doc && doc.createElement('script').async === true) || (ua.ie >= 10),",""," // True if this browser fires an event when a dynamically injected"," // link node fails to load. This is currently true for Firefox 9+"," // and WebKit 535.24+"," cssFail: ua.gecko >= 9 || ua.compareVersions(ua.webkit, 535.24) >= 0,",""," // True if this browser fires an event when a dynamically injected"," // link node finishes loading. This is currently true for IE, Opera,"," // Firefox 9+, and WebKit 535.24+. Note that IE versions <9 fire the"," // DOM 0 \"onload\" event, but not \"load\". All versions of IE fire"," // \"onload\"."," // davglass: Seems that Chrome on Android needs this to be false."," cssLoad: ("," (!ua.gecko && !ua.webkit) || ua.gecko >= 9 ||"," ua.compareVersions(ua.webkit, 535.24) >= 0"," ) && !(ua.chrome && ua.chrome <= 18),",""," // True if this browser preserves script execution order while"," // loading scripts in parallel as long as the script node's `async`"," // attribute is set to false to explicitly disable async execution."," preservesScriptOrder: !!(ua.gecko || ua.opera || (ua.ie && ua.ie >= 10))"," });"," },",""," _getTransaction: function (urls, options) {"," var requests = [],"," i, len, req, url;",""," if (!Lang.isArray(urls)) {"," urls = [urls];"," }",""," options = Y.merge(this.options, options);",""," // Clone the attributes object so we don't end up modifying it by ref."," options.attributes = Y.merge(this.options.attributes,"," options.attributes);",""," for (i = 0, len = urls.length; i < len; ++i) {"," url = urls[i];"," req = {attributes: {}};",""," // If `url` is a string, we create a URL object for it, then mix in"," // global options and request-specific options. If it's an object"," // with a \"url\" property, we assume it's a request object containing"," // URL-specific options."," if (typeof url === 'string') {"," req.url = url;"," } else if (url.url) {"," // URL-specific options override both global defaults and"," // request-specific options."," Y.mix(req, url, false, null, 0, true);"," url = url.url; // Make url a string so we can use it later."," } else {"," continue;"," }",""," Y.mix(req, options, false, null, 0, true);",""," // If we didn't get an explicit type for this URL either in the"," // request options or the URL-specific options, try to determine"," // one from the file extension."," if (!req.type) {"," if (this.REGEX_CSS.test(url)) {"," req.type = 'css';"," } else {"," if (!this.REGEX_JS.test(url)) {"," }",""," req.type = 'js';"," }"," }",""," // Mix in type-specific default options, but don't overwrite any"," // options that have already been set."," Y.mix(req, req.type === 'js' ? this.jsOptions : this.cssOptions,"," false, null, 0, true);",""," // Give the node an id attribute if it doesn't already have one."," req.attributes.id || (req.attributes.id = Y.guid());",""," // Backcompat for <3.5.0 behavior."," if (req.win) {"," req.doc = req.win.document;"," } else {"," req.win = req.doc.defaultView || req.doc.parentWindow;"," }",""," if (req.charset) {"," req.attributes.charset = req.charset;"," }",""," requests.push(req);"," }",""," return new Transaction(requests, options);"," },",""," _load: function (type, urls, options, callback) {"," var transaction;",""," // Allow callback as third param."," if (typeof options === 'function') {"," callback = options;"," options = {};"," }",""," options || (options = {});"," options.type = type;",""," options._onFinish = Get._onTransactionFinish;",""," if (!this._env) {"," this._getEnv();"," }",""," transaction = this._getTransaction(urls, options);",""," this._queue.push({"," callback : callback,"," transaction: transaction"," });",""," this._next();",""," return transaction;"," },",""," _onTransactionFinish : function() {"," Get._pending = null;"," Get._next();"," },",""," _next: function () {"," var item;",""," if (this._pending) {"," return;"," }",""," item = this._queue.shift();",""," if (item) {"," this._pending = item;"," item.transaction.execute(item.callback);"," }"," },",""," _purge: function (nodes) {"," var purgeNodes = this._purgeNodes,"," isTransaction = nodes !== purgeNodes,"," index, node;",""," while (node = nodes.pop()) { // assignment"," // Don't purge nodes that haven't finished loading (or errored out),"," // since this can hang the transaction."," if (!node._yuiget_finished) {"," continue;"," }",""," node.parentNode && node.parentNode.removeChild(node);",""," // If this is a transaction-level purge and this node also exists in"," // the Get-level _purgeNodes array, we need to remove it from"," // _purgeNodes to avoid creating a memory leak. The indexOf lookup"," // sucks, but until we get WeakMaps, this is the least troublesome"," // way to do this (we can't just hold onto node ids because they may"," // not be in the same document)."," if (isTransaction) {"," index = Y.Array.indexOf(purgeNodes, node);",""," if (index > -1) {"," purgeNodes.splice(index, 1);"," }"," }"," }"," }","};","","/**","Alias for `js()`.","","@method script","@static","**/","Get.script = Get.js;","","/**","Represents a Get transaction, which may contain requests for one or more JS or","CSS files.","","This class should not be instantiated manually. Instances will be created and","returned as needed by Y.Get's `css()`, `js()`, and `load()` methods.","","@class Get.Transaction","@constructor","@since 3.5.0","**/","Get.Transaction = Transaction = function (requests, options) {"," var self = this;",""," self.id = Transaction._lastId += 1;"," self.data = options.data;"," self.errors = [];"," self.nodes = [];"," self.options = options;"," self.requests = requests;",""," self._callbacks = []; // callbacks to call after execution finishes"," self._queue = [];"," self._reqsWaiting = 0;",""," // Deprecated pre-3.5.0 properties."," self.tId = self.id; // Use `id` instead."," self.win = options.win || Y.config.win;","};","","/**","Arbitrary data object associated with this transaction.","","This object comes from the options passed to `Get.css()`, `Get.js()`, or","`Get.load()`, and will be `undefined` if no data object was specified.","","@property {Object} data","**/","","/**","Array of errors that have occurred during this transaction, if any. Each error","object has the following properties:","`errors.error`: Error message.","`errors.request`: Request object related to the error.","","@since 3.5.0","@property {Object[]} errors","**/","","/**","Numeric id for this transaction, unique among all transactions within the same","YUI sandbox in the current pageview.","","@property {Number} id","@since 3.5.0","**/","","/**","HTMLElement nodes (native ones, not YUI Node instances) that have been inserted","during the current transaction.","","@property {HTMLElement[]} nodes","**/","","/**","Options associated with this transaction.","","See `Get.options` for the full list of available options.","","@property {Object} options","@since 3.5.0","**/","","/**","Request objects contained in this transaction. Each request object represents","one CSS or JS URL that will be (or has been) requested and loaded into the page.","","@property {Object} requests","@since 3.5.0","**/","","/**","Id of the most recent transaction.","","@property _lastId","@type Number","@protected","@static","**/","Transaction._lastId = 0;","","Transaction.prototype = {"," // -- Public Properties ----------------------------------------------------",""," /**"," Current state of this transaction. One of \"new\", \"executing\", or \"done\".",""," @property _state"," @type String"," @protected"," **/"," _state: 'new', // \"new\", \"executing\", or \"done\"",""," // -- Public Methods -------------------------------------------------------",""," /**"," Aborts this transaction.",""," This will cause the transaction's `onFailure` callback to be called and"," will prevent any new script and link nodes from being added to the document,"," but any resources that have already been requested will continue loading"," (there's no safe way to prevent this, unfortunately).",""," @method abort"," @param {String} [msg=\"Aborted.\"] Optional message to use in the `errors`"," array describing why the transaction was aborted."," **/"," abort: function (msg) {"," this._pending = null;"," this._pendingCSS = null;"," this._pollTimer = clearTimeout(this._pollTimer);"," this._queue = [];"," this._reqsWaiting = 0;",""," this.errors.push({error: msg || 'Aborted'});"," this._finish();"," },",""," /**"," Begins execting the transaction.",""," There's usually no reason to call this manually, since Get will call it"," automatically when other pending transactions have finished. If you really"," want to execute your transaction before Get does, you can, but be aware that"," this transaction's scripts may end up executing before the scripts in other"," pending transactions.",""," If the transaction is already executing, the specified callback (if any)"," will be queued and called after execution finishes. If the transaction has"," already finished, the callback will be called immediately (the transaction"," will not be executed again).",""," @method execute"," @param {Function} callback Callback function to execute after all requests"," in the transaction are complete, or after the transaction is aborted."," **/"," execute: function (callback) {"," var self = this,"," requests = self.requests,"," state = self._state,"," i, len, queue, req;",""," if (state === 'done') {"," callback && callback(self.errors.length ? self.errors : null, self);"," return;"," } else {"," callback && self._callbacks.push(callback);",""," if (state === 'executing') {"," return;"," }"," }",""," self._state = 'executing';"," self._queue = queue = [];",""," if (self.options.timeout) {"," self._timeout = setTimeout(function () {"," self.abort('Timeout');"," }, self.options.timeout);"," }",""," self._reqsWaiting = requests.length;",""," for (i = 0, len = requests.length; i < len; ++i) {"," req = requests[i];",""," if (req.async || req.type === 'css') {"," // No need to queue CSS or fully async JS."," self._insert(req);"," } else {"," queue.push(req);"," }"," }",""," self._next();"," },",""," /**"," Manually purges any ` + + +@method template +@param {Function} template Precompiled Handlebars template function. +@return {Function} Compiled template function. +*/ + +// Alias for Y.Handlebars.template(), used by Y.Template. +Handlebars.revive = Handlebars.template; + +// Make Y.Template.Handlebars an alias for Y.Handlebars. +Y.namespace('Template').Handlebars = Handlebars; + + +}, '3.17.2', {"requires": []}); diff --git a/design/standard/lib/yui/3.17.2/build/handlebars-base/handlebars-base-min.js b/design/standard/lib/yui/3.17.2/build/handlebars-base/handlebars-base-min.js new file mode 100644 index 0000000..9d3c314 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/handlebars-base/handlebars-base-min.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("handlebars-base",function(e,t){ +/*! +Handlebars.js - Copyright (C) 2011 Yehuda Katz +https://raw.github.com/wycats/handlebars.js/master/LICENSE +*/ +;var n=e.namespace("Handlebars");n.VERSION="1.0.0",n.COMPILER_REVISION=4,n.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"},n.helpers={},n.partials={};var r=Object.prototype.toString,i="[object Function]",s="[object Object]";n.registerHelper=function(e,t,i){if(r.call(e)===s){if(i||t)throw new n.Exception("Arg not supported with multiple helpers");n.Utils.extend(this.helpers,e)}else i&&(t.not=i),this.helpers[e]=t},n.registerPartial=function(e,t){r.call(e)===s?n.Utils.extend(this.partials,e):this.partials[e]=t},n.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Missing helper: '"+e+"'")}),n.registerHelper("blockHelperMissing",function(e,t){var s=t.inverse||function(){},o=t.fn,u=r.call(e);return u===i&&(e=e.call(this)),e===!0?o(this):e===!1||e==null?s(this):u==="[object Array]"?e.length>0?n.helpers.each(e,t):s(this):o(e)}),n.K=function(){},n.createFrame=Object.create||function(e){n.K.prototype=e;var t=new n.K;return n.K.prototype=null,t},n.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(e,t){if(n.logger.level<=e){var r=n.logger.methodMap[e];typeof console!="undefined"&&console[r]&&console[r].call(console,t)}}},n.log=function(e,t){n.logger.log(e,t)},n.registerHelper("each",function(e,t){var s=t.fn,o=t.inverse,u=0,a="",f,l=r.call(e);l===i&&(e=e.call(this)),t.data&&(f=n.createFrame(t.data));if(e&&typeof e=="object")if(e instanceof Array)for(var c=e.length;u":">",'"':""","'":"'","`":"`"},a=/[&<>"'`]/g,f=/[&<>"'`]/,l=function(e){return u[e]||"&"};n.Utils={extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},escapeExpression:function(e){return e instanceof n.SafeString?e.toString():e==null||e===!1?"":(e=e.toString(),f.test(e)?e.replace(a,l):e)},isEmpty:function(e){return!e&&e!==0?!0:r.call(e)==="[object Array]"&&e.length===0?!0:!1}},n.VM={template:function(e){var t={escapeExpression:n.Utils.escapeExpression,invokePartial:n.VM.invokePartial,programs:[],program:function(e,t,r){var i=this.programs[e];return r?i=n.VM.program(e,t,r):i||(i=this.programs[e]=n.VM.program(e,t)),i},merge:function(e,t){var r=e||t;return e&&t&&(r={},n.Utils.extend(r,t),n.Utils.extend(r,e)),r},programWithDepth:n.VM.programWithDepth,noop:n.VM.noop,compilerInfo:null};return function(r,i){i=i||{};var s=e.call(t,n,r,i.helpers,i.partials,i.data),o=t.compilerInfo||[],u=o[0]||1,a=n.COMPILER_REVISION;if(u!==a){if(u. + +@module handlebars +@main handlebars +@since 3.5.0 +*/ + +/** +Provides basic Handlebars template rendering functionality. Use this module when +you only need to render pre-compiled templates. + +@module handlebars +@submodule handlebars-base +*/ + +/** +Handlebars is a simple template language inspired by Mustache. + +This is a YUI port of the original Handlebars project, which can be found at +. + +@class Handlebars +@since 3.5.0 +*/ +var Handlebars = Y.namespace('Handlebars'); +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +Handlebars.VERSION = "1.0.0"; +Handlebars.COMPILER_REVISION = 4; + +Handlebars.REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '>= 1.0.0' +}; + +Handlebars.helpers = {}; +Handlebars.partials = {}; + +var toString = Object.prototype.toString, + functionType = '[object Function]', + objectType = '[object Object]'; + +Handlebars.registerHelper = function(name, fn, inverse) { + if (toString.call(name) === objectType) { + if (inverse || fn) { throw new Handlebars.Exception('Arg not supported with multiple helpers'); } + Handlebars.Utils.extend(this.helpers, name); + } else { + if (inverse) { fn.not = inverse; } + this.helpers[name] = fn; + } +}; + +Handlebars.registerPartial = function(name, str) { + if (toString.call(name) === objectType) { + Handlebars.Utils.extend(this.partials, name); + } else { + this.partials[name] = str; + } +}; + +Handlebars.registerHelper('helperMissing', function(arg) { + if(arguments.length === 2) { + return undefined; + } else { + throw new Error("Missing helper: '" + arg + "'"); + } +}); + +Handlebars.registerHelper('blockHelperMissing', function(context, options) { + var inverse = options.inverse || function() {}, fn = options.fn; + + var type = toString.call(context); + + if(type === functionType) { context = context.call(this); } + + if(context === true) { + return fn(this); + } else if(context === false || context == null) { + return inverse(this); + } else if(type === "[object Array]") { + if(context.length > 0) { + return Handlebars.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + return fn(context); + } +}); + +Handlebars.K = function() {}; + +Handlebars.createFrame = Object.create || function(object) { + Handlebars.K.prototype = object; + var obj = new Handlebars.K(); + Handlebars.K.prototype = null; + return obj; +}; + +Handlebars.logger = { + DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3, + + methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'}, + + // can be overridden in the host environment + log: function(level, obj) { + if (Handlebars.logger.level <= level) { + var method = Handlebars.logger.methodMap[level]; + if (typeof console !== 'undefined' && console[method]) { + console[method].call(console, obj); + } + } + } +}; + +Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); }; + +Handlebars.registerHelper('each', function(context, options) { + var fn = options.fn, inverse = options.inverse; + var i = 0, ret = "", data; + + var type = toString.call(context); + if(type === functionType) { context = context.call(this); } + + if (options.data) { + data = Handlebars.createFrame(options.data); + } + + if(context && typeof context === 'object') { + if(context instanceof Array){ + for(var j = context.length; i": ">", + '"': """, + "'": "'", + "`": "`" +}; + +var badChars = /[&<>"'`]/g; +var possible = /[&<>"'`]/; + +var escapeChar = function(chr) { + return escape[chr] || "&"; +}; + +Handlebars.Utils = { + extend: function(obj, value) { + for(var key in value) { + if(value.hasOwnProperty(key)) { + obj[key] = value[key]; + } + } + }, + + escapeExpression: function(string) { + // don't escape SafeStrings, since they're already safe + if (string instanceof Handlebars.SafeString) { + return string.toString(); + } else if (string == null || string === false) { + return ""; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = string.toString(); + + if(!possible.test(string)) { return string; } + return string.replace(badChars, escapeChar); + }, + + isEmpty: function(value) { + if (!value && value !== 0) { + return true; + } else if(toString.call(value) === "[object Array]" && value.length === 0) { + return true; + } else { + return false; + } + } +}; +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +Handlebars.VM = { + template: function(templateSpec) { + // Just add water + var container = { + escapeExpression: Handlebars.Utils.escapeExpression, + invokePartial: Handlebars.VM.invokePartial, + programs: [], + program: function(i, fn, data) { + var programWrapper = this.programs[i]; + if(data) { + programWrapper = Handlebars.VM.program(i, fn, data); + } else if (!programWrapper) { + programWrapper = this.programs[i] = Handlebars.VM.program(i, fn); + } + return programWrapper; + }, + merge: function(param, common) { + var ret = param || common; + + if (param && common) { + ret = {}; + Handlebars.Utils.extend(ret, common); + Handlebars.Utils.extend(ret, param); + } + return ret; + }, + programWithDepth: Handlebars.VM.programWithDepth, + noop: Handlebars.VM.noop, + compilerInfo: null + }; + + return function(context, options) { + options = options || {}; + var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data); + + var compilerInfo = container.compilerInfo || [], + compilerRevision = compilerInfo[0] || 1, + currentRevision = Handlebars.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = Handlebars.REVISION_CHANGES[currentRevision], + compilerVersions = Handlebars.REVISION_CHANGES[compilerRevision]; + throw "Template was precompiled with an older version of Handlebars than the current runtime. "+ + "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+")."; + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw "Template was precompiled with a newer version of Handlebars than the current runtime. "+ + "Please update your runtime to a newer version ("+compilerInfo[1]+")."; + } + } + + return result; + }; + }, + + programWithDepth: function(i, fn, data /*, $depth */) { + var args = Array.prototype.slice.call(arguments, 3); + + var program = function(context, options) { + options = options || {}; + + return fn.apply(this, [context, options.data || data].concat(args)); + }; + program.program = i; + program.depth = args.length; + return program; + }, + program: function(i, fn, data) { + var program = function(context, options) { + options = options || {}; + + return fn(context, options.data || data); + }; + program.program = i; + program.depth = 0; + return program; + }, + noop: function() { return ""; }, + invokePartial: function(partial, name, context, helpers, partials, data) { + var options = { helpers: helpers, partials: partials, data: data }; + + if(partial === undefined) { + throw new Handlebars.Exception("The partial " + name + " could not be found"); + } else if(partial instanceof Function) { + return partial(context, options); + } else if (!Handlebars.compile) { + throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode"); + } else { + partials[name] = Handlebars.compile(partial, {data: data !== undefined}); + return partials[name](context, options); + } + } +}; + +Handlebars.template = Handlebars.VM.template; +// This file contains YUI-specific wrapper code and overrides for the +// handlebars-base module. + +Handlebars.VERSION += '-yui'; + +/** +Registers a helper function that will be made available to all templates. + +Helper functions receive the current template context as the `this` object, and +can also receive arguments passed by the template. + +@example + + Y.Handlebars.registerHelper('linkify', function () { + return '' + + Y.Escape.html(this.text) + ''; + }); + + var source = '
    {{#links}}
  • {{{linkify}}}
  • {{/links}}
'; + + Y.Handlebars.render(source, { + links: [ + {url: '/foo', text: 'Foo'}, + {url: '/bar', text: 'Bar'}, + {url: '/baz', text: 'Baz'} + ] + }); + +@method registerHelper +@param {String} name Name of this helper. +@param {Function} fn Helper function. +@param {Boolean} [inverse=false] If `true`, this helper will be considered an + "inverse" helper, like "unless". This means it will only be called if the + expression given in the template evaluates to a false or empty value. +*/ + +/** +Registers a partial that will be made available to all templates. + +A partial is another template that can be used to render part of a larger +template. For example, a website with a common header and footer across all its +pages might use a template for each page, which would call shared partials to +render the headers and footers. + +Partials may be specified as uncompiled template strings or as compiled template +functions. + +@example + + Y.Handlebars.registerPartial('header', '

{{title}}

'); + Y.Handlebars.registerPartial('footer', 'Copyright (c) 2011 by Me.'); + + var source = '{{> header}}

Mustaches are awesome!

{{> footer}}'; + + Y.Handlebars.render(source, {title: 'My Page About Mustaches'}); + +@method registerPartial +@param {String} name Name of this partial. +@param {Function|String} partial Template string or compiled template function. +*/ + +/** +Converts a precompiled template into a renderable template function. + +@example + + + + +@method template +@param {Function} template Precompiled Handlebars template function. +@return {Function} Compiled template function. +*/ + +// Alias for Y.Handlebars.template(), used by Y.Template. +Handlebars.revive = Handlebars.template; + +// Make Y.Template.Handlebars an alias for Y.Handlebars. +Y.namespace('Template').Handlebars = Handlebars; + + +}, '3.17.2', {"requires": []}); diff --git a/design/standard/lib/yui/3.17.2/build/handlebars-compiler/handlebars-compiler-debug.js b/design/standard/lib/yui/3.17.2/build/handlebars-compiler/handlebars-compiler-debug.js new file mode 100644 index 0000000..2ea1938 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/handlebars-compiler/handlebars-compiler-debug.js @@ -0,0 +1,2027 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('handlebars-compiler', function (Y, NAME) { + +/*! +Handlebars.js - Copyright (C) 2011 Yehuda Katz +https://raw.github.com/wycats/handlebars.js/master/LICENSE +*/ +// This file contains code that will be inserted at the beginning of the +// handlebars-compiler module. + +// This is necessary because the Y.Handlebars object is created in the +// handlebars-base module, but the native Handlebars code expects to use a local +// Handlebars reference. +var Handlebars = Y.Handlebars; +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +/* Jison generated parser */ +var handlebars = (function(){ +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"root":3,"program":4,"EOF":5,"simpleInverse":6,"statements":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"params":27,"hash":28,"dataName":29,"param":30,"STRING":31,"INTEGER":32,"BOOLEAN":33,"hashSegments":34,"hashSegment":35,"ID":36,"EQUALS":37,"DATA":38,"pathSegments":39,"SEP":40,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",31:"STRING",32:"INTEGER",33:"BOOLEAN",36:"ID",37:"EQUALS",38:"DATA",40:"SEP"}, +productions_: [0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[27,2],[27,1],[30,1],[30,1],[30,1],[30,1],[30,1],[28,1],[34,2],[34,1],[35,3],[35,3],[35,3],[35,3],[35,3],[26,1],[26,1],[26,1],[29,2],[21,1],[39,3],[39,1]], +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { + +var $0 = $$.length - 1; +switch (yystate) { +case 1: return $$[$0-1]; +break; +case 2: this.$ = new yy.ProgramNode([], $$[$0]); +break; +case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]); +break; +case 4: this.$ = new yy.ProgramNode($$[$0-1], []); +break; +case 5: this.$ = new yy.ProgramNode($$[$0]); +break; +case 6: this.$ = new yy.ProgramNode([], []); +break; +case 7: this.$ = new yy.ProgramNode([]); +break; +case 8: this.$ = [$$[$0]]; +break; +case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; +break; +case 10: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]); +break; +case 11: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]); +break; +case 12: this.$ = $$[$0]; +break; +case 13: this.$ = $$[$0]; +break; +case 14: this.$ = new yy.ContentNode($$[$0]); +break; +case 15: this.$ = new yy.CommentNode($$[$0]); +break; +case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); +break; +case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); +break; +case 18: this.$ = $$[$0-1]; +break; +case 19: + // Parsing out the '&' escape token at this level saves ~500 bytes after min due to the removal of one parser node. + this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], $$[$0-2][2] === '&'); + +break; +case 20: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true); +break; +case 21: this.$ = new yy.PartialNode($$[$0-1]); +break; +case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]); +break; +case 23: +break; +case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]]; +break; +case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null]; +break; +case 26: this.$ = [[$$[$0-1]], $$[$0]]; +break; +case 27: this.$ = [[$$[$0]], null]; +break; +case 28: this.$ = [[$$[$0]], null]; +break; +case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; +break; +case 30: this.$ = [$$[$0]]; +break; +case 31: this.$ = $$[$0]; +break; +case 32: this.$ = new yy.StringNode($$[$0]); +break; +case 33: this.$ = new yy.IntegerNode($$[$0]); +break; +case 34: this.$ = new yy.BooleanNode($$[$0]); +break; +case 35: this.$ = $$[$0]; +break; +case 36: this.$ = new yy.HashNode($$[$0]); +break; +case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; +break; +case 38: this.$ = [$$[$0]]; +break; +case 39: this.$ = [$$[$0-2], $$[$0]]; +break; +case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])]; +break; +case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])]; +break; +case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])]; +break; +case 43: this.$ = [$$[$0-2], $$[$0]]; +break; +case 44: this.$ = new yy.PartialNameNode($$[$0]); +break; +case 45: this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0])); +break; +case 46: this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0])); +break; +case 47: this.$ = new yy.DataNode($$[$0]); +break; +case 48: this.$ = new yy.IdNode($$[$0]); +break; +case 49: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2]; +break; +case 50: this.$ = [{part: $$[$0]}]; +break; +} +}, +table: [{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],25:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],25:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5],22:[1,14],23:[1,15],25:[1,16]},{17:23,18:[1,22],21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],25:[2,8]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{4:30,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{17:31,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:32,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:33,21:24,29:25,36:[1,28],38:[1,27],39:26},{21:35,26:34,31:[1,36],32:[1,37],36:[1,28],39:26},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],25:[1,16]},{17:23,21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,4],7:38,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],25:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{18:[1,39]},{18:[2,27],21:44,24:[2,27],27:40,28:41,29:48,30:42,31:[1,45],32:[1,46],33:[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,28],24:[2,28]},{18:[2,48],24:[2,48],31:[2,48],32:[2,48],33:[2,48],36:[2,48],38:[2,48],40:[1,51]},{21:52,36:[1,28],39:26},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],38:[2,50],40:[2,50]},{10:53,20:[1,54]},{10:55,20:[1,54]},{18:[1,56]},{18:[1,57]},{24:[1,58]},{18:[1,59],21:60,36:[1,28],39:26},{18:[2,44],36:[2,44]},{18:[2,45],36:[2,45]},{18:[2,46],36:[2,46]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,3],22:[1,14],23:[1,15],25:[1,16]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{18:[2,25],21:44,24:[2,25],28:61,29:48,30:62,31:[1,45],32:[1,46],33:[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,26],24:[2,26]},{18:[2,30],24:[2,30],31:[2,30],32:[2,30],33:[2,30],36:[2,30],38:[2,30]},{18:[2,36],24:[2,36],35:63,36:[1,64]},{18:[2,31],24:[2,31],31:[2,31],32:[2,31],33:[2,31],36:[2,31],38:[2,31]},{18:[2,32],24:[2,32],31:[2,32],32:[2,32],33:[2,32],36:[2,32],38:[2,32]},{18:[2,33],24:[2,33],31:[2,33],32:[2,33],33:[2,33],36:[2,33],38:[2,33]},{18:[2,34],24:[2,34],31:[2,34],32:[2,34],33:[2,34],36:[2,34],38:[2,34]},{18:[2,35],24:[2,35],31:[2,35],32:[2,35],33:[2,35],36:[2,35],38:[2,35]},{18:[2,38],24:[2,38],36:[2,38]},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],37:[1,65],38:[2,50],40:[2,50]},{36:[1,66]},{18:[2,47],24:[2,47],31:[2,47],32:[2,47],33:[2,47],36:[2,47],38:[2,47]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{21:67,36:[1,28],39:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,68]},{18:[2,24],24:[2,24]},{18:[2,29],24:[2,29],31:[2,29],32:[2,29],33:[2,29],36:[2,29],38:[2,29]},{18:[2,37],24:[2,37],36:[2,37]},{37:[1,65]},{21:69,29:73,31:[1,70],32:[1,71],33:[1,72],36:[1,28],38:[1,27],39:26},{18:[2,49],24:[2,49],31:[2,49],32:[2,49],33:[2,49],36:[2,49],38:[2,49],40:[2,49]},{18:[1,74]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{18:[2,39],24:[2,39],36:[2,39]},{18:[2,40],24:[2,40],36:[2,40]},{18:[2,41],24:[2,41],36:[2,41]},{18:[2,42],24:[2,42],36:[2,42]},{18:[2,43],24:[2,43],36:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]}], +defaultActions: {17:[2,1]}, +parseError: function parseError(str, hash) { + throw new Error(str); +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") + this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") + this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) + if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) + recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +} +}; +/* Jison generated lexer */ +var lexer = (function(){ +var lexer = ({EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +setInput:function (input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; + if (this.options.ranges) this.yylloc.range = [0,0]; + this.offset = 0; + return this; + }, +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length-len-1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length-1); + this.matched = this.matched.substr(0, this.matched.length-1); + + if (lines.length-1) this.yylineno -= lines.length-1; + var r = this.yylloc.range; + + this.yylloc = {first_line: this.yylloc.first_line, + last_line: this.yylineno+1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, +more:function () { + this._more = true; + return this; + }, +less:function (n) { + this.unput(this.match.slice(n)); + }, +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); + }, +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c+"^"; + }, +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, + match, + tempMatch, + index, + col, + lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i=0;i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = {first_line: this.yylloc.last_line, + last_line: this.yylineno+1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), + {text: "", token: null, line: this.yylineno}); + } + }, +lex:function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, +begin:function begin(condition) { + this.conditionStack.push(condition); + }, +popState:function popState() { + return this.conditionStack.pop(); + }, +_currentRules:function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; + }, +topState:function () { + return this.conditionStack[this.conditionStack.length-2]; + }, +pushState:function begin(condition) { + this.begin(condition); + }}); +lexer.options = {}; +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { + +var YYSTATE=YY_START +switch($avoiding_name_collisions) { +case 0: yy_.yytext = "\\"; return 14; +break; +case 1: + if(yy_.yytext.slice(-1) !== "\\") this.begin("mu"); + if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu"); + if(yy_.yytext) return 14; + +break; +case 2: return 14; +break; +case 3: + if(yy_.yytext.slice(-1) !== "\\") this.popState(); + if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1); + return 14; + +break; +case 4: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15; +break; +case 5: return 25; +break; +case 6: return 16; +break; +case 7: return 20; +break; +case 8: return 19; +break; +case 9: return 19; +break; +case 10: return 23; +break; +case 11: return 22; +break; +case 12: this.popState(); this.begin('com'); +break; +case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15; +break; +case 14: return 22; +break; +case 15: return 37; +break; +case 16: return 36; +break; +case 17: return 36; +break; +case 18: return 40; +break; +case 19: /*ignore whitespace*/ +break; +case 20: this.popState(); return 24; +break; +case 21: this.popState(); return 18; +break; +case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31; +break; +case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31; +break; +case 24: return 38; +break; +case 25: return 33; +break; +case 26: return 33; +break; +case 27: return 32; +break; +case 28: return 36; +break; +case 29: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 36; +break; +case 30: return 'INVALID'; +break; +case 31: return 5; +break; +} +}; +lexer.rules = [/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/]; +lexer.conditions = {"mu":{"rules":[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"inclusive":false},"emu":{"rules":[3],"inclusive":false},"com":{"rules":[4],"inclusive":false},"INITIAL":{"rules":[0,1,2,31],"inclusive":true}}; +return lexer;})() +parser.lexer = lexer; +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +Handlebars.Parser = handlebars; + +Handlebars.parse = function(input) { + + // Just return if an already-compile AST was passed in. + if(input.constructor === Handlebars.AST.ProgramNode) { return input; } + + Handlebars.Parser.yy = Handlebars.AST; + return Handlebars.Parser.parse(input); +}; +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +Handlebars.AST = {}; + +Handlebars.AST.ProgramNode = function(statements, inverse) { + this.type = "program"; + this.statements = statements; + if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); } +}; + +Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) { + this.type = "mustache"; + this.escaped = !unescaped; + this.hash = hash; + + var id = this.id = rawParams[0]; + var params = this.params = rawParams.slice(1); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var eligibleHelper = this.eligibleHelper = id.isSimple; + + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + this.isHelper = eligibleHelper && (params.length || hash); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. +}; + +Handlebars.AST.PartialNode = function(partialName, context) { + this.type = "partial"; + this.partialName = partialName; + this.context = context; +}; + +Handlebars.AST.BlockNode = function(mustache, program, inverse, close) { + var verifyMatch = function(open, close) { + if(open.original !== close.original) { + throw new Handlebars.Exception(open.original + " doesn't match " + close.original); + } + }; + + verifyMatch(mustache.id, close); + this.type = "block"; + this.mustache = mustache; + this.program = program; + this.inverse = inverse; + + if (this.inverse && !this.program) { + this.isInverse = true; + } +}; + +Handlebars.AST.ContentNode = function(string) { + this.type = "content"; + this.string = string; +}; + +Handlebars.AST.HashNode = function(pairs) { + this.type = "hash"; + this.pairs = pairs; +}; + +Handlebars.AST.IdNode = function(parts) { + this.type = "ID"; + + var original = "", + dig = [], + depth = 0; + + for(var i=0,l=parts.length; i 0) { throw new Handlebars.Exception("Invalid path: " + original); } + else if (part === "..") { depth++; } + else { this.isScoped = true; } + } + else { dig.push(part); } + } + + this.original = original; + this.parts = dig; + this.string = dig.join('.'); + this.depth = depth; + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + this.isSimple = parts.length === 1 && !this.isScoped && depth === 0; + + this.stringModeValue = this.string; +}; + +Handlebars.AST.PartialNameNode = function(name) { + this.type = "PARTIAL_NAME"; + this.name = name.original; +}; + +Handlebars.AST.DataNode = function(id) { + this.type = "DATA"; + this.id = id; +}; + +Handlebars.AST.StringNode = function(string) { + this.type = "STRING"; + this.original = + this.string = + this.stringModeValue = string; +}; + +Handlebars.AST.IntegerNode = function(integer) { + this.type = "INTEGER"; + this.original = + this.integer = integer; + this.stringModeValue = Number(integer); +}; + +Handlebars.AST.BooleanNode = function(bool) { + this.type = "BOOLEAN"; + this.bool = bool; + this.stringModeValue = bool === "true"; +}; + +Handlebars.AST.CommentNode = function(comment) { + this.type = "comment"; + this.comment = comment; +}; +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +/*jshint eqnull:true*/ +var Compiler = Handlebars.Compiler = function() {}; +var JavaScriptCompiler = Handlebars.JavaScriptCompiler = function() {}; + +// the foundHelper register will disambiguate helper lookup from finding a +// function in a context. This is necessary for mustache compatibility, which +// requires that context functions in blocks are evaluated by blockHelperMissing, +// and then proceed as if the resulting value was provided to blockHelperMissing. + +Compiler.prototype = { + compiler: Compiler, + + disassemble: function() { + var opcodes = this.opcodes, opcode, out = [], params, param; + + for (var i=0, l=opcodes.length; i 0) { + this.source[1] = this.source[1] + ", " + locals.join(", "); + } + + // Generate minimizer alias mappings + if (!this.isChild) { + for (var alias in this.context.aliases) { + if (this.context.aliases.hasOwnProperty(alias)) { + this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; + } + } + } + + if (this.source[1]) { + this.source[1] = "var " + this.source[1].substring(2) + ";"; + } + + // Merge children + if (!this.isChild) { + this.source[1] += '\n' + this.context.programs.join('\n') + '\n'; + } + + if (!this.environment.isSimple) { + this.source.push("return buffer;"); + } + + var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"]; + + for(var i=0, l=this.environment.depths.list.length; i this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); } + return this.topStackName(); + }, + topStackName: function() { + return "stack" + this.stackSlot; + }, + flushInline: function() { + var inlineStack = this.inlineStack; + if (inlineStack.length) { + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + this.pushStack(entry); + } + } + } + }, + isInline: function() { + return this.inlineStack.length; + }, + + popStack: function(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && (item instanceof Literal)) { + return item.value; + } else { + if (!inline) { + this.stackSlot--; + } + return item; + } + }, + + topStack: function(wrapped) { + var stack = (this.isInline() ? this.inlineStack : this.compileStack), + item = stack[stack.length - 1]; + + if (!wrapped && (item instanceof Literal)) { + return item.value; + } else { + return item; + } + }, + + quotedString: function(str) { + return '"' + str + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\n/g, '\\n') + .replace(/\r/g, '\\r') + .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + setupHelper: function(paramSize, name, missingParams) { + var params = []; + this.setupParams(paramSize, params, missingParams); + var foundHelper = this.nameLookup('helpers', name, 'helper'); + + return { + params: params, + name: foundHelper, + callParams: ["depth0"].concat(params).join(", "), + helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ") + }; + }, + + // the params and contexts arguments are passed in arrays + // to fill in + setupParams: function(paramSize, params, useRegister) { + var options = [], contexts = [], types = [], param, inverse, program; + + options.push("hash:" + this.popStack()); + + inverse = this.popStack(); + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + if (!program) { + this.context.aliases.self = "this"; + program = "self.noop"; + } + + if (!inverse) { + this.context.aliases.self = "this"; + inverse = "self.noop"; + } + + options.push("inverse:" + inverse); + options.push("fn:" + program); + } + + for(var i=0; i "The pie of the day is Maple Custard!" + +@method render +@param {String} string Handlebars template string to render. +@param {Object} context Context object to pass to the template. +@param {Object} [options] Compile/render options. + @param {Object} [options.helpers] Helper functions. + @param {Object} [options.partials] Partials. + @param {Object} [options.data] Data. +@return {String} Rendered template string. +*/ +Handlebars.render = function (string, context, options) { + return Handlebars.compile(string)(context, options); +}; + +// The rest of this file is just API docs for methods defined in Handlebars +// itself. + +/** +Compiles a Handlebars template string into a function. To render the template, +call the function and pass in a context object. + +@example + + var template = Y.Handlebars.compile('The pie of the day is {{pie}}!.'); + template({pie: 'Pecan'}); + // => "The pie of the day is Pecan!" + +@method compile +@param {String} string Handlebars template string to compile. +@param {Object} [options] Compiler options. +@return {Function} Compiled template function. +*/ + +/** +Precompiles a Handlebars template string into a string of JavaScript code. This +can be used to precompile a template at build time or on the server, and the +resulting template can then be rendered at runtime or on the client without +needing to go through a compile step. + +To render a precompiled template, evaluate the code and then pass the resulting +function to `Y.Handlebars.template()` to get back an executable template +function. + +@method precompile +@param {String} string Handlebars template string to compile. +@param {Object} [options] Compiler options. +@return {String} Precompiled template code. +*/ + + +}, '3.17.2', {"requires": ["handlebars-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/handlebars-compiler/handlebars-compiler-min.js b/design/standard/lib/yui/3.17.2/build/handlebars-compiler/handlebars-compiler-min.js new file mode 100644 index 0000000..e8f95a4 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/handlebars-compiler/handlebars-compiler-min.js @@ -0,0 +1,18 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("handlebars-compiler",function(e,t){ +/*! +Handlebars.js - Copyright (C) 2011 Yehuda Katz +https://raw.github.com/wycats/handlebars.js/master/LICENSE +*/ +;var n=e.Handlebars,r=function(){function n(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,simpleInverse:6,statements:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,params:27,hash:28,dataName:29,param:30,STRING:31,INTEGER:32,BOOLEAN:33,hashSegments:34,hashSegment:35,ID:36,EQUALS:37,DATA:38,pathSegments:39,SEP:40,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",31:"STRING",32:"INTEGER",33:"BOOLEAN",36:"ID",37:"EQUALS",38:"DATA",40:"SEP"},productions_:[0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[27,2],[27,1],[30,1],[30,1],[30,1],[30,1],[30,1],[28,1],[34,2],[34,1],[35,3],[35,3],[35,3],[35,3],[35,3],[26,1],[26,1],[26,1],[29,2],[21,1],[39,3],[39,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode([],o[a]);break;case 3:this.$=new i.ProgramNode(o[a-2],o[a]);break;case 4:this.$=new i.ProgramNode(o[a-1],[]);break;case 5:this.$=new i.ProgramNode(o[a]);break;case 6:this.$=new i.ProgramNode([],[]);break;case 7:this.$=new i.ProgramNode([]);break;case 8:this.$=[o[a]];break;case 9:o[a-1].push(o[a]),this.$=o[a-1];break;case 10:this.$=new i.BlockNode(o[a-2],o[a-1].inverse,o[a-1],o[a]);break;case 11:this.$=new i.BlockNode(o[a-2],o[a-1],o[a-1].inverse,o[a]);break;case 12:this.$=o[a];break;case 13:this.$=o[a];break;case 14:this.$=new i.ContentNode(o[a]);break;case 15:this.$=new i.CommentNode(o[a]);break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 18:this.$=o[a-1];break;case 19:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],o[a-2][2]==="&");break;case 20:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 21:this.$=new i.PartialNode(o[a-1]);break;case 22:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 23:break;case 24:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 25:this.$=[[o[a-1]].concat(o[a]),null];break;case 26:this.$=[[o[a-1]],o[a]];break;case 27:this.$=[[o[a]],null];break;case 28:this.$=[[o[a]],null];break;case 29:o[a-1].push(o[a]),this.$=o[a-1];break;case 30:this.$=[o[a]];break;case 31:this.$=o[a];break;case 32:this.$=new i.StringNode(o[a]);break;case 33:this.$=new i.IntegerNode(o[a]);break;case 34:this.$=new i.BooleanNode(o[a]);break;case 35:this.$=o[a];break;case 36:this.$=new i.HashNode(o[a]);break;case 37:o[a-1].push(o[a]),this.$=o[a-1];break;case 38:this.$=[o[a]];break;case 39:this.$=[o[a-2],o[a]];break;case 40:this.$=[o[a-2],new i.StringNode(o[a])];break;case 41:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 42:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 43:this.$=[o[a-2],o[a]];break;case 44:this.$=new i.PartialNameNode(o[a]);break;case 45:this.$=new i.PartialNameNode(new i.StringNode(o[a]));break;case 46:this.$=new i.PartialNameNode(new i.IntegerNode(o[a]));break;case 47:this.$=new i.DataNode(o[a]);break;case 48:this.$=new i.IdNode(o[a]);break;case 49:o[a-2].push({part:o[a],separator:o[a-1]}),this.$=o[a-2];break;case 50:this.$=[{part:o[a]}]}},table:[{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],25:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],25:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5],22:[1,14],23:[1,15],25:[1,16]},{17:23,18:[1,22],21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],25:[2,8]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{4:30,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{17:31,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:32,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:33,21:24,29:25,36:[1,28],38:[1,27],39:26},{21:35,26:34,31:[1,36],32:[1,37],36:[1,28],39:26},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],25:[1,16]},{17:23,21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,4],7:38,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],25:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{18:[1,39]},{18:[2,27],21:44,24:[2,27],27:40,28:41,29:48,30:42,31:[1,45],32:[1,46],33:[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,28],24:[2,28]},{18:[2,48],24:[2,48],31:[2,48],32:[2,48],33:[2,48],36:[2,48],38:[2,48],40:[1,51]},{21:52,36:[1,28],39:26},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],38:[2,50],40:[2,50]},{10:53,20:[1,54]},{10:55,20:[1,54]},{18:[1,56]},{18:[1,57]},{24:[1,58]},{18:[1,59],21:60,36:[1,28],39:26},{18:[2,44],36:[2,44]},{18:[2,45],36:[2,45]},{18:[2,46],36:[2,46]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,3],22:[1,14],23:[1,15],25:[1,16]},{14:[2,17],15:[2,17],16 +:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{18:[2,25],21:44,24:[2,25],28:61,29:48,30:62,31:[1,45],32:[1,46],33:[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,26],24:[2,26]},{18:[2,30],24:[2,30],31:[2,30],32:[2,30],33:[2,30],36:[2,30],38:[2,30]},{18:[2,36],24:[2,36],35:63,36:[1,64]},{18:[2,31],24:[2,31],31:[2,31],32:[2,31],33:[2,31],36:[2,31],38:[2,31]},{18:[2,32],24:[2,32],31:[2,32],32:[2,32],33:[2,32],36:[2,32],38:[2,32]},{18:[2,33],24:[2,33],31:[2,33],32:[2,33],33:[2,33],36:[2,33],38:[2,33]},{18:[2,34],24:[2,34],31:[2,34],32:[2,34],33:[2,34],36:[2,34],38:[2,34]},{18:[2,35],24:[2,35],31:[2,35],32:[2,35],33:[2,35],36:[2,35],38:[2,35]},{18:[2,38],24:[2,38],36:[2,38]},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],37:[1,65],38:[2,50],40:[2,50]},{36:[1,66]},{18:[2,47],24:[2,47],31:[2,47],32:[2,47],33:[2,47],36:[2,47],38:[2,47]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{21:67,36:[1,28],39:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,68]},{18:[2,24],24:[2,24]},{18:[2,29],24:[2,29],31:[2,29],32:[2,29],33:[2,29],36:[2,29],38:[2,29]},{18:[2,37],24:[2,37],36:[2,37]},{37:[1,65]},{21:69,29:73,31:[1,70],32:[1,71],33:[1,72],36:[1,28],38:[1,27],39:26},{18:[2,49],24:[2,49],31:[2,49],32:[2,49],33:[2,49],36:[2,49],38:[2,49],40:[2,49]},{18:[1,74]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{18:[2,39],24:[2,39],36:[2,39]},{18:[2,40],24:[2,40],36:[2,40]},{18:[2,41],24:[2,41],36:[2,41]},{18:[2,42],24:[2,42],36:[2,42]},{18:[2,43],24:[2,43],36:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]}],defaultActions:{17:[2,1]},parseError:function(t,n){throw new Error(t)},parse:function(t){function v(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function m(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var g,y,b,w,E,S,x={},T,N,C,k;for(;;){b=r[r.length-1];if(this.defaultActions[b])w=this.defaultActions[b];else{if(g===null||typeof g=="undefined")g=m();w=o[b]&&o[b][g]}if(typeof w=="undefined"||!w.length||!w[0]){var L="";if(!l){k=[];for(T in o[b])this.terminals_[T]&&T>2&&k.push("'"+this.terminals_[T]+"'");this.lexer.showPosition?L="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[g]||g)+"'":L="Parse error on line "+(a+1)+": Unexpected "+(g==1?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(L,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:p,expected:k})}}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:r.push(g),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(w[1]),g=null,y?(g=y,y=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:N=this.productions_[w[1]][1],x.$=i[i.length-N],x._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},d&&(x._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),S=this.performAction.call(x,u,f,a,this.yy,w[1],i,s);if(typeof S!="undefined")return S;N&&(r=r.slice(0,-1*N*2),i=i.slice(0,-1*N),s=s.slice(0,-1*N)),r.push(this.productions_[w[1]][0]),i.push(x.$),s.push(x._$),C=o[r[r.length-2]][r[r.length-1]],r.push(C);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function( +){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i,s;this._more||(this.yytext="",this.match="");var o=this._currentRules();for(var u=0;ut[0].length)){t=n,r=u;if(!this.options.flex)break}}if(t){s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(e)return e;return}return this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.options={},e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:return n.yytext="\\",14;case 1:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 2:return 14;case 3:return n.yytext.slice(-1)!=="\\"&&this.popState(),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1)),14;case 4:return n.yytext=n.yytext.substr(0,n.yyleng-4),this.popState(),15;case 5:return 25;case 6:return 16;case 7:return 20;case 8:return 19;case 9:return 19;case 10:return 23;case 11:return 22;case 12:this.popState(),this.begin("com");break;case 13:return n.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 14:return 22;case 15:return 37;case 16:return 36;case 17:return 36;case 18:return 40;case 19:break;case 20:return this.popState(),24;case 21:return this.popState(),18;case 22:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),31;case 23:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\'/g,"'"),31;case 24:return 38;case 25:return 33;case 26:return 33;case 27:return 32;case 28:return 36;case 29:return n.yytext=n.yytext.substr(1,n.yyleng-2),36;case 30:return"INVALID";case 31:return 5}},e.rules=[/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:!1},emu:{rules:[3],inclusive:!1},com:{rules:[4],inclusive:!1},INITIAL:{rules:[0,1,2,31],inclusive:!0}},e}();return e.lexer=t,n.prototype=e,e.Parser=n,new n}();n.Parser=r,n.parse=function(e){return e.constructor===n.AST.ProgramNode?e:(n.Parser.yy=n.AST,n.Parser.parse(e))},n.AST={},n.AST.ProgramNode=function(e,t){this.type="program",this.statements=e,t&&(this.inverse=new n.AST.ProgramNode(t))},n.AST.MustacheNode=function(e,t,n){this.type="mustache",this.escaped=!n,this.hash=t;var r=this.id=e[0],i=this.params=e.slice(1),s=this.eligibleHelper=r.isSimple;this.isHelper=s&&(i.length||t)},n.AST.PartialNode=function(e,t){this.type="partial",this.partialName=e,this.context=t},n.AST.BlockNode=function(e,t,r,i){var s=function(e,t){if(e.original!==t.original)throw new n.Exception(e.original+" doesn't match "+t.original)};s(e.id,i),this.type="block",this.mustache=e,this.program=t,this.inverse=r,this.inverse&&!this.program&&(this.isInverse=!0)},n.AST.ContentNode=function(e){this.type="content",this.string=e},n.AST.HashNode=function(e){this.type="hash",this.pairs=e},n.AST.IdNode=function(e){this.type="ID";var t="",r=[],i=0;for(var s=0,o=e.length;s0)throw new n.Exception("Invalid path: "+t);u===".."?i++:this.isScoped=!0}else r.push(u)}this.original=t,this.parts=r,this.string=r.join("."),this.depth=i,this.isSimple=e.length===1&&!this.isScoped&&i===0,this.stringModeValue=this.string},n.AST.PartialNameNode=function(e){this.type="PARTIAL_NAME",this.name=e.original},n.AST.DataNode=function(e){this.type="DATA",this.id=e},n.AST.StringNode=function(e){this.type="STRING",this.original=this.string=this.stringModeValue=e},n.AST.IntegerNode=function(e){this.type="INTEGER",this.original=this.integer=e,this.stringModeValue=Number(e)},n.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e,this.stringModeValue=e==="true"},n.AST.CommentNode=function(e){this.type="comment",this.comment=e};var i=n.Compiler=function(){},s=n.JavaScriptCompiler=function(){};i.prototype={compiler:i,disassemble:function(){var e=this.opcodes,t,n=[],r,i;for(var s=0,o=e.length;sthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;if(e.length){this.inlineStack=[];for(var t=0,n=e.length;t 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) + recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +} +}; +/* Jison generated lexer */ +var lexer = (function(){ +var lexer = ({EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +setInput:function (input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; + if (this.options.ranges) this.yylloc.range = [0,0]; + this.offset = 0; + return this; + }, +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length-len-1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length-1); + this.matched = this.matched.substr(0, this.matched.length-1); + + if (lines.length-1) this.yylineno -= lines.length-1; + var r = this.yylloc.range; + + this.yylloc = {first_line: this.yylloc.first_line, + last_line: this.yylineno+1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, +more:function () { + this._more = true; + return this; + }, +less:function (n) { + this.unput(this.match.slice(n)); + }, +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); + }, +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c+"^"; + }, +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, + match, + tempMatch, + index, + col, + lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i=0;i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = {first_line: this.yylloc.last_line, + last_line: this.yylineno+1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), + {text: "", token: null, line: this.yylineno}); + } + }, +lex:function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, +begin:function begin(condition) { + this.conditionStack.push(condition); + }, +popState:function popState() { + return this.conditionStack.pop(); + }, +_currentRules:function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; + }, +topState:function () { + return this.conditionStack[this.conditionStack.length-2]; + }, +pushState:function begin(condition) { + this.begin(condition); + }}); +lexer.options = {}; +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { + +var YYSTATE=YY_START +switch($avoiding_name_collisions) { +case 0: yy_.yytext = "\\"; return 14; +break; +case 1: + if(yy_.yytext.slice(-1) !== "\\") this.begin("mu"); + if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu"); + if(yy_.yytext) return 14; + +break; +case 2: return 14; +break; +case 3: + if(yy_.yytext.slice(-1) !== "\\") this.popState(); + if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1); + return 14; + +break; +case 4: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15; +break; +case 5: return 25; +break; +case 6: return 16; +break; +case 7: return 20; +break; +case 8: return 19; +break; +case 9: return 19; +break; +case 10: return 23; +break; +case 11: return 22; +break; +case 12: this.popState(); this.begin('com'); +break; +case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15; +break; +case 14: return 22; +break; +case 15: return 37; +break; +case 16: return 36; +break; +case 17: return 36; +break; +case 18: return 40; +break; +case 19: /*ignore whitespace*/ +break; +case 20: this.popState(); return 24; +break; +case 21: this.popState(); return 18; +break; +case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31; +break; +case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31; +break; +case 24: return 38; +break; +case 25: return 33; +break; +case 26: return 33; +break; +case 27: return 32; +break; +case 28: return 36; +break; +case 29: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 36; +break; +case 30: return 'INVALID'; +break; +case 31: return 5; +break; +} +}; +lexer.rules = [/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/]; +lexer.conditions = {"mu":{"rules":[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"inclusive":false},"emu":{"rules":[3],"inclusive":false},"com":{"rules":[4],"inclusive":false},"INITIAL":{"rules":[0,1,2,31],"inclusive":true}}; +return lexer;})() +parser.lexer = lexer; +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +Handlebars.Parser = handlebars; + +Handlebars.parse = function(input) { + + // Just return if an already-compile AST was passed in. + if(input.constructor === Handlebars.AST.ProgramNode) { return input; } + + Handlebars.Parser.yy = Handlebars.AST; + return Handlebars.Parser.parse(input); +}; +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +Handlebars.AST = {}; + +Handlebars.AST.ProgramNode = function(statements, inverse) { + this.type = "program"; + this.statements = statements; + if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); } +}; + +Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) { + this.type = "mustache"; + this.escaped = !unescaped; + this.hash = hash; + + var id = this.id = rawParams[0]; + var params = this.params = rawParams.slice(1); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var eligibleHelper = this.eligibleHelper = id.isSimple; + + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + this.isHelper = eligibleHelper && (params.length || hash); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. +}; + +Handlebars.AST.PartialNode = function(partialName, context) { + this.type = "partial"; + this.partialName = partialName; + this.context = context; +}; + +Handlebars.AST.BlockNode = function(mustache, program, inverse, close) { + var verifyMatch = function(open, close) { + if(open.original !== close.original) { + throw new Handlebars.Exception(open.original + " doesn't match " + close.original); + } + }; + + verifyMatch(mustache.id, close); + this.type = "block"; + this.mustache = mustache; + this.program = program; + this.inverse = inverse; + + if (this.inverse && !this.program) { + this.isInverse = true; + } +}; + +Handlebars.AST.ContentNode = function(string) { + this.type = "content"; + this.string = string; +}; + +Handlebars.AST.HashNode = function(pairs) { + this.type = "hash"; + this.pairs = pairs; +}; + +Handlebars.AST.IdNode = function(parts) { + this.type = "ID"; + + var original = "", + dig = [], + depth = 0; + + for(var i=0,l=parts.length; i 0) { throw new Handlebars.Exception("Invalid path: " + original); } + else if (part === "..") { depth++; } + else { this.isScoped = true; } + } + else { dig.push(part); } + } + + this.original = original; + this.parts = dig; + this.string = dig.join('.'); + this.depth = depth; + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + this.isSimple = parts.length === 1 && !this.isScoped && depth === 0; + + this.stringModeValue = this.string; +}; + +Handlebars.AST.PartialNameNode = function(name) { + this.type = "PARTIAL_NAME"; + this.name = name.original; +}; + +Handlebars.AST.DataNode = function(id) { + this.type = "DATA"; + this.id = id; +}; + +Handlebars.AST.StringNode = function(string) { + this.type = "STRING"; + this.original = + this.string = + this.stringModeValue = string; +}; + +Handlebars.AST.IntegerNode = function(integer) { + this.type = "INTEGER"; + this.original = + this.integer = integer; + this.stringModeValue = Number(integer); +}; + +Handlebars.AST.BooleanNode = function(bool) { + this.type = "BOOLEAN"; + this.bool = bool; + this.stringModeValue = bool === "true"; +}; + +Handlebars.AST.CommentNode = function(comment) { + this.type = "comment"; + this.comment = comment; +}; +/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */ + +/*jshint eqnull:true*/ +var Compiler = Handlebars.Compiler = function() {}; +var JavaScriptCompiler = Handlebars.JavaScriptCompiler = function() {}; + +// the foundHelper register will disambiguate helper lookup from finding a +// function in a context. This is necessary for mustache compatibility, which +// requires that context functions in blocks are evaluated by blockHelperMissing, +// and then proceed as if the resulting value was provided to blockHelperMissing. + +Compiler.prototype = { + compiler: Compiler, + + disassemble: function() { + var opcodes = this.opcodes, opcode, out = [], params, param; + + for (var i=0, l=opcodes.length; i 0) { + this.source[1] = this.source[1] + ", " + locals.join(", "); + } + + // Generate minimizer alias mappings + if (!this.isChild) { + for (var alias in this.context.aliases) { + if (this.context.aliases.hasOwnProperty(alias)) { + this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; + } + } + } + + if (this.source[1]) { + this.source[1] = "var " + this.source[1].substring(2) + ";"; + } + + // Merge children + if (!this.isChild) { + this.source[1] += '\n' + this.context.programs.join('\n') + '\n'; + } + + if (!this.environment.isSimple) { + this.source.push("return buffer;"); + } + + var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"]; + + for(var i=0, l=this.environment.depths.list.length; i this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); } + return this.topStackName(); + }, + topStackName: function() { + return "stack" + this.stackSlot; + }, + flushInline: function() { + var inlineStack = this.inlineStack; + if (inlineStack.length) { + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + this.pushStack(entry); + } + } + } + }, + isInline: function() { + return this.inlineStack.length; + }, + + popStack: function(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && (item instanceof Literal)) { + return item.value; + } else { + if (!inline) { + this.stackSlot--; + } + return item; + } + }, + + topStack: function(wrapped) { + var stack = (this.isInline() ? this.inlineStack : this.compileStack), + item = stack[stack.length - 1]; + + if (!wrapped && (item instanceof Literal)) { + return item.value; + } else { + return item; + } + }, + + quotedString: function(str) { + return '"' + str + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\n/g, '\\n') + .replace(/\r/g, '\\r') + .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + setupHelper: function(paramSize, name, missingParams) { + var params = []; + this.setupParams(paramSize, params, missingParams); + var foundHelper = this.nameLookup('helpers', name, 'helper'); + + return { + params: params, + name: foundHelper, + callParams: ["depth0"].concat(params).join(", "), + helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ") + }; + }, + + // the params and contexts arguments are passed in arrays + // to fill in + setupParams: function(paramSize, params, useRegister) { + var options = [], contexts = [], types = [], param, inverse, program; + + options.push("hash:" + this.popStack()); + + inverse = this.popStack(); + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + if (!program) { + this.context.aliases.self = "this"; + program = "self.noop"; + } + + if (!inverse) { + this.context.aliases.self = "this"; + inverse = "self.noop"; + } + + options.push("inverse:" + inverse); + options.push("fn:" + program); + } + + for(var i=0; i "The pie of the day is Maple Custard!" + +@method render +@param {String} string Handlebars template string to render. +@param {Object} context Context object to pass to the template. +@param {Object} [options] Compile/render options. + @param {Object} [options.helpers] Helper functions. + @param {Object} [options.partials] Partials. + @param {Object} [options.data] Data. +@return {String} Rendered template string. +*/ +Handlebars.render = function (string, context, options) { + return Handlebars.compile(string)(context, options); +}; + +// The rest of this file is just API docs for methods defined in Handlebars +// itself. + +/** +Compiles a Handlebars template string into a function. To render the template, +call the function and pass in a context object. + +@example + + var template = Y.Handlebars.compile('The pie of the day is {{pie}}!.'); + template({pie: 'Pecan'}); + // => "The pie of the day is Pecan!" + +@method compile +@param {String} string Handlebars template string to compile. +@param {Object} [options] Compiler options. +@return {Function} Compiled template function. +*/ + +/** +Precompiles a Handlebars template string into a string of JavaScript code. This +can be used to precompile a template at build time or on the server, and the +resulting template can then be rendered at runtime or on the client without +needing to go through a compile step. + +To render a precompiled template, evaluate the code and then pass the resulting +function to `Y.Handlebars.template()` to get back an executable template +function. + +@method precompile +@param {String} string Handlebars template string to compile. +@param {Object} [options] Compiler options. +@return {String} Precompiled template code. +*/ + + +}, '3.17.2', {"requires": ["handlebars-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/highlight-accentfold/highlight-accentfold-coverage.js b/design/standard/lib/yui/3.17.2/build/highlight-accentfold/highlight-accentfold-coverage.js new file mode 100644 index 0000000..6502fa2 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/highlight-accentfold/highlight-accentfold-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/highlight-accentfold/highlight-accentfold.js']) { + __coverage__['build/highlight-accentfold/highlight-accentfold.js'] = {"path":"build/highlight-accentfold/highlight-accentfold.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":51}}},"2":{"name":"(anonymous_2)","line":36,"loc":{"start":{"line":36,"column":13},"end":{"line":36,"column":51}}},"3":{"name":"(anonymous_3)","line":58,"loc":{"start":{"line":58,"column":22},"end":{"line":58,"column":62}}},"4":{"name":"(anonymous_4)","line":112,"loc":{"start":{"line":112,"column":15},"end":{"line":112,"column":44}}},"5":{"name":"(anonymous_5)","line":128,"loc":{"start":{"line":128,"column":15},"end":{"line":128,"column":44}}},"6":{"name":"(anonymous_6)","line":132,"loc":{"start":{"line":132,"column":20},"end":{"line":132,"column":45}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":144,"column":66}},"2":{"start":{"line":15,"column":0},"end":{"line":141,"column":3}},"3":{"start":{"line":37,"column":8},"end":{"line":40,"column":41}},"4":{"start":{"line":42,"column":8},"end":{"line":75,"column":36}},"5":{"start":{"line":59,"column":16},"end":{"line":59,"column":24}},"6":{"start":{"line":62,"column":16},"end":{"line":64,"column":17}},"7":{"start":{"line":63,"column":20},"end":{"line":63,"column":33}},"8":{"start":{"line":66,"column":16},"end":{"line":66,"column":42}},"9":{"start":{"line":68,"column":16},"end":{"line":71,"column":19}},"10":{"start":{"line":73,"column":16},"end":{"line":73,"column":37}},"11":{"start":{"line":80,"column":8},"end":{"line":80,"column":84}},"12":{"start":{"line":84,"column":8},"end":{"line":86,"column":9}},"13":{"start":{"line":85,"column":12},"end":{"line":85,"column":54}},"14":{"start":{"line":89,"column":8},"end":{"line":97,"column":9}},"15":{"start":{"line":90,"column":12},"end":{"line":90,"column":47}},"16":{"start":{"line":92,"column":12},"end":{"line":94,"column":13}},"17":{"start":{"line":93,"column":16},"end":{"line":93,"column":72}},"18":{"start":{"line":96,"column":12},"end":{"line":96,"column":31}},"19":{"start":{"line":99,"column":8},"end":{"line":99,"column":32}},"20":{"start":{"line":113,"column":8},"end":{"line":113,"column":72}},"21":{"start":{"line":129,"column":8},"end":{"line":129,"column":43}},"22":{"start":{"line":131,"column":8},"end":{"line":139,"column":11}},"23":{"start":{"line":133,"column":16},"end":{"line":135,"column":17}},"24":{"start":{"line":134,"column":20},"end":{"line":134,"column":73}},"25":{"start":{"line":137,"column":16},"end":{"line":137,"column":41}}},"branchMap":{"1":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":16},"end":{"line":62,"column":16}},{"start":{"line":62,"column":16},"end":{"line":62,"column":16}}]},"2":{"line":62,"type":"binary-expr","locations":[{"start":{"line":62,"column":20},"end":{"line":62,"column":22}},{"start":{"line":62,"column":26},"end":{"line":62,"column":52}}]},"3":{"line":75,"type":"binary-expr","locations":[{"start":{"line":75,"column":11},"end":{"line":75,"column":18}},{"start":{"line":75,"column":22},"end":{"line":75,"column":34}}]},"4":{"line":84,"type":"if","locations":[{"start":{"line":84,"column":8},"end":{"line":84,"column":8}},{"start":{"line":84,"column":8},"end":{"line":84,"column":8}}]},"5":{"line":92,"type":"if","locations":[{"start":{"line":92,"column":12},"end":{"line":92,"column":12}},{"start":{"line":92,"column":12},"end":{"line":92,"column":12}}]},"6":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":16},"end":{"line":133,"column":16}},{"start":{"line":133,"column":16},"end":{"line":133,"column":16}}]}},"code":["(function () { YUI.add('highlight-accentfold', function (Y, NAME) {","","/**","Adds accent-folding highlighters to `Y.Highlight`.","","@module highlight","@submodule highlight-accentfold","**/","","/**","@class Highlight","@static","**/","","var AccentFold = Y.Text.AccentFold,"," Escape = Y.Escape,",""," EMPTY_OBJECT = {},","","Highlight = Y.mix(Y.Highlight, {"," // -- Public Static Methods ------------------------------------------------",""," /**"," Accent-folding version of `all()`.",""," @method allFold"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings that should be"," highlighted."," @param {Object} [options] Options object."," @param {Boolean} [options.startsWith=false] If `true`, matches must be"," anchored to the beginning of the string."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," allFold: function (haystack, needles, options) {"," var template = Highlight._TEMPLATE,"," results = [],"," startPos = 0,"," chunk, i, len, match, result;",""," options = Y.merge({"," // This tells Highlight.all() not to escape HTML, in order to ensure"," // usable match offsets. The output of all() is discarded, and we"," // perform our own escaping before returning the highlighted string."," escapeHTML: false,",""," // While the highlight regex operates on the accent-folded strings,"," // this replacer will highlight the matched positions in the"," // original string."," //"," // Note: this implementation doesn't handle multi-character folds,"," // like \"æ\" -> \"ae\". Doing so correctly would be prohibitively"," // expensive both in terms of code size and runtime performance, so"," // I've chosen to take the pragmatic route and just not do it at"," // all. This is one of many reasons why accent folding is best done"," // on the server."," replacer: function (match, p1, foldedNeedle, pos) {"," var len;",""," // Ignore matches inside HTML entities."," if (p1 && !(/\\s/).test(foldedNeedle)) {"," return match;"," }",""," len = foldedNeedle.length;",""," results.push(["," haystack.substring(startPos, pos), // substring between previous match and this match"," haystack.substr(pos, len) // match to be highlighted"," ]);",""," startPos = pos + len;"," }"," }, options || EMPTY_OBJECT);",""," // Run the highlighter on the folded strings. We don't care about the"," // output; our replacer function will build the canonical highlighted"," // string, with original accented characters."," Highlight.all(AccentFold.fold(haystack), AccentFold.fold(needles), options);",""," // Tack on the remainder of the haystack that wasn't highlighted, if"," // any."," if (startPos < haystack.length) {"," results.push([haystack.substr(startPos)]);"," }",""," // Highlight and escape the string."," for (i = 0, len = results.length; i < len; ++i) {"," chunk = Escape.html(results[i][0]);",""," if ((match = results[i][1])) {"," chunk += template.replace(/\\{s\\}/g, Escape.html(match));"," }",""," results[i] = chunk;"," }",""," return results.join('');"," },",""," /**"," Accent-folding version of `start()`.",""," @method startFold"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings that should be"," highlighted."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," startFold: function (haystack, needles) {"," return Highlight.allFold(haystack, needles, {startsWith: true});"," },",""," /**"," Accent-folding version of `words()`.",""," @method wordsFold"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings containing words"," that should be highlighted. If a string is passed, it will be split"," into words; if an array is passed, it is assumed to have already been"," split."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," wordsFold: function (haystack, needles) {"," var template = Highlight._TEMPLATE;",""," return Highlight.words(haystack, AccentFold.fold(needles), {"," mapper: function (word, needles) {"," if (needles.hasOwnProperty(AccentFold.fold(word))) {"," return template.replace(/\\{s\\}/g, Escape.html(word));"," }",""," return Escape.html(word);"," }"," });"," }","});","","","}, '3.17.2', {\"requires\": [\"highlight-base\", \"text-accentfold\"]});","","}());"]}; +} +var __cov_oQgMSDYk8Uh6TIT7xBYemQ = __coverage__['build/highlight-accentfold/highlight-accentfold.js']; +__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['1']++;YUI.add('highlight-accentfold',function(Y,NAME){__cov_oQgMSDYk8Uh6TIT7xBYemQ.f['1']++;__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['2']++;var AccentFold=Y.Text.AccentFold,Escape=Y.Escape,EMPTY_OBJECT={},Highlight=Y.mix(Y.Highlight,{allFold:function(haystack,needles,options){__cov_oQgMSDYk8Uh6TIT7xBYemQ.f['2']++;__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['3']++;var template=Highlight._TEMPLATE,results=[],startPos=0,chunk,i,len,match,result;__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['4']++;options=Y.merge({escapeHTML:false,replacer:function(match,p1,foldedNeedle,pos){__cov_oQgMSDYk8Uh6TIT7xBYemQ.f['3']++;__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['5']++;var len;__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['6']++;if((__cov_oQgMSDYk8Uh6TIT7xBYemQ.b['2'][0]++,p1)&&(__cov_oQgMSDYk8Uh6TIT7xBYemQ.b['2'][1]++,!/\s/.test(foldedNeedle))){__cov_oQgMSDYk8Uh6TIT7xBYemQ.b['1'][0]++;__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['7']++;return match;}else{__cov_oQgMSDYk8Uh6TIT7xBYemQ.b['1'][1]++;}__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['8']++;len=foldedNeedle.length;__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['9']++;results.push([haystack.substring(startPos,pos),haystack.substr(pos,len)]);__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['10']++;startPos=pos+len;}},(__cov_oQgMSDYk8Uh6TIT7xBYemQ.b['3'][0]++,options)||(__cov_oQgMSDYk8Uh6TIT7xBYemQ.b['3'][1]++,EMPTY_OBJECT));__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['11']++;Highlight.all(AccentFold.fold(haystack),AccentFold.fold(needles),options);__cov_oQgMSDYk8Uh6TIT7xBYemQ.s['12']++;if(startPos "ae". Doing so correctly would be prohibitively + // expensive both in terms of code size and runtime performance, so + // I've chosen to take the pragmatic route and just not do it at + // all. This is one of many reasons why accent folding is best done + // on the server. + replacer: function (match, p1, foldedNeedle, pos) { + var len; + + // Ignore matches inside HTML entities. + if (p1 && !(/\s/).test(foldedNeedle)) { + return match; + } + + len = foldedNeedle.length; + + results.push([ + haystack.substring(startPos, pos), // substring between previous match and this match + haystack.substr(pos, len) // match to be highlighted + ]); + + startPos = pos + len; + } + }, options || EMPTY_OBJECT); + + // Run the highlighter on the folded strings. We don't care about the + // output; our replacer function will build the canonical highlighted + // string, with original accented characters. + Highlight.all(AccentFold.fold(haystack), AccentFold.fold(needles), options); + + // Tack on the remainder of the haystack that wasn't highlighted, if + // any. + if (startPos < haystack.length) { + results.push([haystack.substr(startPos)]); + } + + // Highlight and escape the string. + for (i = 0, len = results.length; i < len; ++i) { + chunk = Escape.html(results[i][0]); + + if ((match = results[i][1])) { + chunk += template.replace(/\{s\}/g, Escape.html(match)); + } + + results[i] = chunk; + } + + return results.join(''); + }, + + /** + Accent-folding version of `start()`. + + @method startFold + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + startFold: function (haystack, needles) { + return Highlight.allFold(haystack, needles, {startsWith: true}); + }, + + /** + Accent-folding version of `words()`. + + @method wordsFold + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings containing words + that should be highlighted. If a string is passed, it will be split + into words; if an array is passed, it is assumed to have already been + split. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + wordsFold: function (haystack, needles) { + var template = Highlight._TEMPLATE; + + return Highlight.words(haystack, AccentFold.fold(needles), { + mapper: function (word, needles) { + if (needles.hasOwnProperty(AccentFold.fold(word))) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + } + }); + } +}); + + +}, '3.17.2', {"requires": ["highlight-base", "text-accentfold"]}); diff --git a/design/standard/lib/yui/3.17.2/build/highlight-accentfold/highlight-accentfold-min.js b/design/standard/lib/yui/3.17.2/build/highlight-accentfold/highlight-accentfold-min.js new file mode 100644 index 0000000..0fc9a65 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/highlight-accentfold/highlight-accentfold-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("highlight-accentfold",function(e,t){var n=e.Text.AccentFold,r=e.Escape,i={},s=e.mix(e.Highlight,{allFold:function(t,o,u){var a=s._TEMPLATE,f=[],l=0,c,h,p,d,v;u=e.merge({escapeHTML:!1,replacer:function(e,n,r,i){var s;if(n&&!/\s/.test(r))return e;s=r.length,f.push([t.substring(l,i),t.substr(i,s)]),l=i+s}},u||i),s.all(n.fold(t),n.fold(o),u),l "ae". Doing so correctly would be prohibitively + // expensive both in terms of code size and runtime performance, so + // I've chosen to take the pragmatic route and just not do it at + // all. This is one of many reasons why accent folding is best done + // on the server. + replacer: function (match, p1, foldedNeedle, pos) { + var len; + + // Ignore matches inside HTML entities. + if (p1 && !(/\s/).test(foldedNeedle)) { + return match; + } + + len = foldedNeedle.length; + + results.push([ + haystack.substring(startPos, pos), // substring between previous match and this match + haystack.substr(pos, len) // match to be highlighted + ]); + + startPos = pos + len; + } + }, options || EMPTY_OBJECT); + + // Run the highlighter on the folded strings. We don't care about the + // output; our replacer function will build the canonical highlighted + // string, with original accented characters. + Highlight.all(AccentFold.fold(haystack), AccentFold.fold(needles), options); + + // Tack on the remainder of the haystack that wasn't highlighted, if + // any. + if (startPos < haystack.length) { + results.push([haystack.substr(startPos)]); + } + + // Highlight and escape the string. + for (i = 0, len = results.length; i < len; ++i) { + chunk = Escape.html(results[i][0]); + + if ((match = results[i][1])) { + chunk += template.replace(/\{s\}/g, Escape.html(match)); + } + + results[i] = chunk; + } + + return results.join(''); + }, + + /** + Accent-folding version of `start()`. + + @method startFold + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + startFold: function (haystack, needles) { + return Highlight.allFold(haystack, needles, {startsWith: true}); + }, + + /** + Accent-folding version of `words()`. + + @method wordsFold + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings containing words + that should be highlighted. If a string is passed, it will be split + into words; if an array is passed, it is assumed to have already been + split. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + wordsFold: function (haystack, needles) { + var template = Highlight._TEMPLATE; + + return Highlight.words(haystack, AccentFold.fold(needles), { + mapper: function (word, needles) { + if (needles.hasOwnProperty(AccentFold.fold(word))) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + } + }); + } +}); + + +}, '3.17.2', {"requires": ["highlight-base", "text-accentfold"]}); diff --git a/design/standard/lib/yui/3.17.2/build/highlight-base/highlight-base-coverage.js b/design/standard/lib/yui/3.17.2/build/highlight-base/highlight-base-coverage.js new file mode 100644 index 0000000..51696c9 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/highlight-base/highlight-base-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/highlight-base/highlight-base.js']) { + __coverage__['build/highlight-base/highlight-base.js'] = {"path":"build/highlight-base/highlight-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":45}}},"2":{"name":"(anonymous_2)","line":75,"loc":{"start":{"line":75,"column":15},"end":{"line":75,"column":40}}},"3":{"name":"(anonymous_3)","line":133,"loc":{"start":{"line":133,"column":9},"end":{"line":133,"column":47}}},"4":{"name":"(anonymous_4)","line":188,"loc":{"start":{"line":188,"column":13},"end":{"line":188,"column":51}}},"5":{"name":"(anonymous_5)","line":208,"loc":{"start":{"line":208,"column":11},"end":{"line":208,"column":49}}},"6":{"name":"(anonymous_6)","line":223,"loc":{"start":{"line":223,"column":15},"end":{"line":223,"column":44}}},"7":{"name":"(anonymous_7)","line":247,"loc":{"start":{"line":247,"column":11},"end":{"line":247,"column":49}}},"8":{"name":"(anonymous_8)","line":269,"loc":{"start":{"line":269,"column":35},"end":{"line":269,"column":60}}},"9":{"name":"(anonymous_9)","line":284,"loc":{"start":{"line":284,"column":33},"end":{"line":284,"column":49}}},"10":{"name":"(anonymous_10)","line":301,"loc":{"start":{"line":301,"column":15},"end":{"line":301,"column":44}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":312,"column":93}},"2":{"start":{"line":27,"column":0},"end":{"line":307,"column":2}},"3":{"start":{"line":79,"column":9},"end":{"line":80,"column":62}},"4":{"start":{"line":134,"column":8},"end":{"line":135,"column":49}},"5":{"start":{"line":137,"column":8},"end":{"line":139,"column":9}},"6":{"start":{"line":138,"column":12},"end":{"line":138,"column":35}},"7":{"start":{"line":142,"column":8},"end":{"line":142,"column":48}},"8":{"start":{"line":143,"column":8},"end":{"line":143,"column":82}},"9":{"start":{"line":144,"column":8},"end":{"line":144,"column":59}},"10":{"start":{"line":145,"column":8},"end":{"line":145,"column":58}},"11":{"start":{"line":150,"column":8},"end":{"line":156,"column":9}},"12":{"start":{"line":151,"column":12},"end":{"line":151,"column":32}},"13":{"start":{"line":153,"column":12},"end":{"line":155,"column":13}},"14":{"start":{"line":154,"column":16},"end":{"line":154,"column":84}},"15":{"start":{"line":159,"column":8},"end":{"line":161,"column":9}},"16":{"start":{"line":160,"column":12},"end":{"line":160,"column":45}},"17":{"start":{"line":164,"column":8},"end":{"line":166,"column":9}},"18":{"start":{"line":165,"column":12},"end":{"line":165,"column":28}},"19":{"start":{"line":168,"column":8},"end":{"line":174,"column":10}},"20":{"start":{"line":189,"column":8},"end":{"line":190,"column":73}},"21":{"start":{"line":209,"column":8},"end":{"line":210,"column":70}},"22":{"start":{"line":227,"column":8},"end":{"line":227,"column":73}},"23":{"start":{"line":248,"column":8},"end":{"line":251,"column":18}},"24":{"start":{"line":253,"column":8},"end":{"line":255,"column":9}},"25":{"start":{"line":254,"column":12},"end":{"line":254,"column":35}},"26":{"start":{"line":257,"column":8},"end":{"line":257,"column":48}},"27":{"start":{"line":260,"column":8},"end":{"line":264,"column":10}},"28":{"start":{"line":269,"column":8},"end":{"line":275,"column":10}},"29":{"start":{"line":270,"column":12},"end":{"line":272,"column":13}},"30":{"start":{"line":271,"column":16},"end":{"line":271,"column":69}},"31":{"start":{"line":274,"column":12},"end":{"line":274,"column":37}},"32":{"start":{"line":279,"column":8},"end":{"line":282,"column":11}},"33":{"start":{"line":284,"column":8},"end":{"line":286,"column":20}},"34":{"start":{"line":285,"column":12},"end":{"line":285,"column":41}},"35":{"start":{"line":305,"column":8},"end":{"line":305,"column":73}},"36":{"start":{"line":309,"column":0},"end":{"line":309,"column":24}}},"branchMap":{"1":{"line":79,"type":"cond-expr","locations":[{"start":{"line":79,"column":41},"end":{"line":79,"column":46}},{"start":{"line":80,"column":20},"end":{"line":80,"column":61}}]},"2":{"line":79,"type":"binary-expr","locations":[{"start":{"line":79,"column":16},"end":{"line":79,"column":18}},{"start":{"line":79,"column":22},"end":{"line":79,"column":38}}]},"3":{"line":137,"type":"if","locations":[{"start":{"line":137,"column":8},"end":{"line":137,"column":8}},{"start":{"line":137,"column":8},"end":{"line":137,"column":8}}]},"4":{"line":143,"type":"cond-expr","locations":[{"start":{"line":143,"column":40},"end":{"line":143,"column":62}},{"start":{"line":143,"column":65},"end":{"line":143,"column":81}}]},"5":{"line":144,"type":"binary-expr","locations":[{"start":{"line":144,"column":19},"end":{"line":144,"column":35}},{"start":{"line":144,"column":39},"end":{"line":144,"column":58}}]},"6":{"line":145,"type":"cond-expr","locations":[{"start":{"line":145,"column":38},"end":{"line":145,"column":45}},{"start":{"line":145,"column":48},"end":{"line":145,"column":57}}]},"7":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":12},"end":{"line":153,"column":12}},{"start":{"line":153,"column":12},"end":{"line":153,"column":12}}]},"8":{"line":154,"type":"cond-expr","locations":[{"start":{"line":154,"column":53},"end":{"line":154,"column":72}},{"start":{"line":154,"column":75},"end":{"line":154,"column":81}}]},"9":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":8},"end":{"line":159,"column":8}},{"start":{"line":159,"column":8},"end":{"line":159,"column":8}}]},"10":{"line":164,"type":"if","locations":[{"start":{"line":164,"column":8},"end":{"line":164,"column":8}},{"start":{"line":164,"column":8},"end":{"line":164,"column":8}}]},"11":{"line":171,"type":"cond-expr","locations":[{"start":{"line":171,"column":40},"end":{"line":171,"column":43}},{"start":{"line":171,"column":46},"end":{"line":171,"column":50}}]},"12":{"line":190,"type":"binary-expr","locations":[{"start":{"line":190,"column":24},"end":{"line":190,"column":31}},{"start":{"line":190,"column":35},"end":{"line":190,"column":47}}]},"13":{"line":210,"type":"binary-expr","locations":[{"start":{"line":210,"column":24},"end":{"line":210,"column":31}},{"start":{"line":210,"column":35},"end":{"line":210,"column":47}}]},"14":{"line":253,"type":"if","locations":[{"start":{"line":253,"column":8},"end":{"line":253,"column":8}},{"start":{"line":253,"column":8},"end":{"line":253,"column":8}}]},"15":{"line":261,"type":"cond-expr","locations":[{"start":{"line":261,"column":31},"end":{"line":261,"column":38}},{"start":{"line":261,"column":41},"end":{"line":263,"column":14}}]},"16":{"line":269,"type":"binary-expr","locations":[{"start":{"line":269,"column":17},"end":{"line":269,"column":31}},{"start":{"line":269,"column":35},"end":{"line":275,"column":9}}]},"17":{"line":270,"type":"if","locations":[{"start":{"line":270,"column":12},"end":{"line":270,"column":12}},{"start":{"line":270,"column":12},"end":{"line":270,"column":12}}]},"18":{"line":270,"type":"cond-expr","locations":[{"start":{"line":270,"column":55},"end":{"line":270,"column":59}},{"start":{"line":270,"column":62},"end":{"line":270,"column":80}}]}},"code":["(function () { YUI.add('highlight-base', function (Y, NAME) {","","/**","Provides methods for highlighting strings within other strings by wrapping","them in HTML.","","@module highlight","@submodule highlight-base","@main","@since 3.3.0","**/","","/**","Provides methods for highlighting strings within other strings by wrapping","them in HTML.","","The highlight methods first escape any special HTML characters in the input","strings and then highlight the appropriate substrings by wrapping them in a","`` element. The `` element is used rather than","`` in accordance with HTML5's definition of `` as being purely","presentational, which is exactly what highlighting is.","","@class Highlight","@static","**/","","var YArray = Y.Array,"," Escape = Y.Escape,"," WordBreak = Y.Text.WordBreak,",""," isArray = Y.Lang.isArray,",""," EMPTY_OBJECT = {},",""," // Regex string that captures zero or one unclosed HTML entities. Used in"," // the static regex template properties below. The entity matching is"," // intentionally loose here, since there's a world of complexity involved in"," // doing strict matching for this use case."," UNCLOSED_ENTITY = '(&[^;\\\\s]*)?',","","Highlight = {"," // -- Protected Static Properties ------------------------------------------",""," /**"," Regular expression template for highlighting a match that occurs anywhere"," in a string. The placeholder `%needles` will be replaced with a list of"," needles to match, joined by `|` characters.",""," This regex should have two capturing subpatterns:",""," 1. Zero or one unclosed HTML entity (e.g. \"&\" without a \";\" at the"," end)."," 2. The `%needles` placeholder.",""," The first subpattern match is used to emulate a negative lookbehind"," assertion in order to prevent highlighting inside HTML entities.",""," @property _REGEX"," @type String"," @protected"," @static"," @final"," **/"," _REGEX: UNCLOSED_ENTITY + '(%needles)',",""," /**"," Regex replacer function or string for normal matches.",""," @property _REPLACER"," @type Function|String"," @protected"," @static"," @final"," **/"," _REPLACER: function (match, p1, p2) {"," // Mimicking a negative lookbehind assertion to prevent matches inside"," // HTML entities. Hat tip to Steven Levithan for the technique:"," // http://blog.stevenlevithan.com/archives/mimic-lookbehind-javascript"," return p1 && !(/\\s/).test(p2) ? match :"," Highlight._TEMPLATE.replace(/\\{s\\}/g, p2);"," },",""," /**"," Regular expression template for highlighting start-of-string matches"," (i.e., only matches that occur at the beginning of a string). The"," placeholder `%needles` will be replaced with a list of needles to match,"," joined by `|` characters.",""," See `_REGEX` for a description of the capturing subpatterns this regex"," string should contain.",""," @property _START_REGEX"," @type String"," @protected"," @static"," @final"," */"," _START_REGEX: '^' + UNCLOSED_ENTITY + '(%needles)',",""," /**"," Highlight template which will be used as a replacement for matched"," substrings. The placeholder `{s}` will be replaced with the matched"," substring.",""," @property _TEMPLATE"," @type String"," @default '{s}'"," @protected"," @static"," @final"," **/"," _TEMPLATE: '{s}',",""," // -- Public Static Methods ------------------------------------------------",""," /**"," Highlights all occurrences in the _haystack_ string of the items in the"," _needles_ array, regardless of where they occur. The returned string will"," have all HTML characters escaped except for the highlighting markup.",""," @method all"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings that should be"," highlighted."," @param {Object} [options] Options object."," @param {Boolean} [options.caseSensitive=false] If `true`, matching will"," be case-sensitive."," @param {Boolean} [options.startsWith=false] If `true`, matches must be"," anchored to the beginning of the string."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," all: function (haystack, needles, options) {"," var validNeedles = [],"," esc, i, len, needle, regex, replacer;",""," if (!options) {"," options = EMPTY_OBJECT;"," }",""," // TODO: document options.replacer"," esc = options.escapeHTML !== false;"," regex = options.startsWith ? Highlight._START_REGEX : Highlight._REGEX;"," replacer = options.replacer || Highlight._REPLACER;"," needles = isArray(needles) ? needles : [needles];",""," // Escape HTML characters and special regular expression characters in"," // the needles so they can be used in a regex and matched against the"," // escaped haystack."," for (i = 0, len = needles.length; i < len; ++i) {"," needle = needles[i];",""," if (needle) {"," validNeedles.push(Escape.regex(esc ? Escape.html(needle) : needle));"," }"," }",""," // Escape HTML characters in the haystack to prevent HTML injection."," if (esc) {"," haystack = Escape.html(haystack);"," }",""," // No point continuing if there are no needles."," if (!validNeedles.length) {"," return haystack;"," }",""," return haystack.replace("," new RegExp("," regex.replace('%needles', validNeedles.join('|')),"," options.caseSensitive ? 'g' : 'gi'"," ),"," replacer"," );"," },",""," /**"," Same as `all()`, but case-sensitive by default.",""," @method allCase"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings that should be"," highlighted."," @param {Object} [options] Options object. See `all()` for details."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," allCase: function (haystack, needles, options) {"," return Highlight.all(haystack, needles,"," Y.merge(options || EMPTY_OBJECT, {caseSensitive: true}));"," },",""," /**"," Highlights _needles_ that occur at the start of _haystack_. The returned"," string will have all HTML characters escaped except for the highlighting"," markup.",""," @method start"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings that should be"," highlighted."," @param {Object} [options] Options object."," @param {Boolean} [options.caseSensitive=false] If `true`, matching will"," be case-sensitive."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," start: function (haystack, needles, options) {"," return Highlight.all(haystack, needles,"," Y.merge(options || EMPTY_OBJECT, {startsWith: true}));"," },",""," /**"," Same as `start()`, but case-sensitive by default.",""," @method startCase"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings that should be"," highlighted."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," startCase: function (haystack, needles) {"," // No options passthru for now, since it would be redundant. If start()"," // ever supports more options than caseSensitive, then we'll start"," // passing the options through."," return Highlight.start(haystack, needles, {caseSensitive: true});"," },",""," /**"," Highlights complete words in the _haystack_ string that are also in the"," _needles_ array. The returned string will have all HTML characters escaped"," except for the highlighting markup.",""," @method words"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings containing words"," that should be highlighted. If a string is passed, it will be split"," into words; if an array is passed, it is assumed to have already been"," split."," @param {Object} [options] Options object."," @param {Boolean} [options.caseSensitive=false] If `true`, matching will"," be case-sensitive."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," words: function (haystack, needles, options) {"," var caseSensitive,"," mapper,"," template = Highlight._TEMPLATE,"," words;",""," if (!options) {"," options = EMPTY_OBJECT;"," }",""," caseSensitive = !!options.caseSensitive;",""," // Convert needles to a hash for faster lookups."," needles = YArray.hash("," isArray(needles) ? needles : WordBreak.getUniqueWords(needles, {"," ignoreCase: !caseSensitive"," })"," );",""," // The default word mapping function can be overridden with a custom"," // one. This is used to implement accent-folded highlighting in the"," // highlight-accentfold module."," mapper = options.mapper || function (word, needles) {"," if (needles.hasOwnProperty(caseSensitive ? word : word.toLowerCase())) {"," return template.replace(/\\{s\\}/g, Escape.html(word));"," }",""," return Escape.html(word);"," };",""," // Split the haystack into an array of words, including punctuation and"," // whitespace so we can rebuild the string later."," words = WordBreak.getWords(haystack, {"," includePunctuation: true,"," includeWhitespace : true"," });",""," return YArray.map(words, function (word) {"," return mapper(word, needles);"," }).join('');"," },",""," /**"," Same as `words()`, but case-sensitive by default.",""," @method wordsCase"," @param {String} haystack String to apply highlighting to."," @param {String|String[]} needles String or array of strings containing words"," that should be highlighted. If a string is passed, it will be split"," into words; if an array is passed, it is assumed to have already been"," split."," @return {String} Escaped and highlighted copy of _haystack_."," @static"," **/"," wordsCase: function (haystack, needles) {"," // No options passthru for now, since it would be redundant. If words()"," // ever supports more options than caseSensitive, then we'll start"," // passing the options through."," return Highlight.words(haystack, needles, {caseSensitive: true});"," }","};","","Y.Highlight = Highlight;","","","}, '3.17.2', {\"requires\": [\"array-extras\", \"classnamemanager\", \"escape\", \"text-wordbreak\"]});","","}());"]}; +} +var __cov_AdQ9MoDQpQP1PbVvbcCIOA = __coverage__['build/highlight-base/highlight-base.js']; +__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['1']++;YUI.add('highlight-base',function(Y,NAME){__cov_AdQ9MoDQpQP1PbVvbcCIOA.f['1']++;__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['2']++;var YArray=Y.Array,Escape=Y.Escape,WordBreak=Y.Text.WordBreak,isArray=Y.Lang.isArray,EMPTY_OBJECT={},UNCLOSED_ENTITY='(&[^;\\s]*)?',Highlight={_REGEX:UNCLOSED_ENTITY+'(%needles)',_REPLACER:function(match,p1,p2){__cov_AdQ9MoDQpQP1PbVvbcCIOA.f['2']++;__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['3']++;return(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['2'][0]++,p1)&&(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['2'][1]++,!/\s/.test(p2))?(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['1'][0]++,match):(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['1'][1]++,Highlight._TEMPLATE.replace(/\{s\}/g,p2));},_START_REGEX:'^'+UNCLOSED_ENTITY+'(%needles)',_TEMPLATE:'{s}',all:function(haystack,needles,options){__cov_AdQ9MoDQpQP1PbVvbcCIOA.f['3']++;__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['4']++;var validNeedles=[],esc,i,len,needle,regex,replacer;__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['5']++;if(!options){__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['3'][0]++;__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['6']++;options=EMPTY_OBJECT;}else{__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['3'][1]++;}__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['7']++;esc=options.escapeHTML!==false;__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['8']++;regex=options.startsWith?(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['4'][0]++,Highlight._START_REGEX):(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['4'][1]++,Highlight._REGEX);__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['9']++;replacer=(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['5'][0]++,options.replacer)||(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['5'][1]++,Highlight._REPLACER);__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['10']++;needles=isArray(needles)?(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['6'][0]++,needles):(__cov_AdQ9MoDQpQP1PbVvbcCIOA.b['6'][1]++,[needles]);__cov_AdQ9MoDQpQP1PbVvbcCIOA.s['11']++;for(i=0,len=needles.length;i` element. The `` element is used rather than +`` in accordance with HTML5's definition of `` as being purely +presentational, which is exactly what highlighting is. + +@class Highlight +@static +**/ + +var YArray = Y.Array, + Escape = Y.Escape, + WordBreak = Y.Text.WordBreak, + + isArray = Y.Lang.isArray, + + EMPTY_OBJECT = {}, + + // Regex string that captures zero or one unclosed HTML entities. Used in + // the static regex template properties below. The entity matching is + // intentionally loose here, since there's a world of complexity involved in + // doing strict matching for this use case. + UNCLOSED_ENTITY = '(&[^;\\s]*)?', + +Highlight = { + // -- Protected Static Properties ------------------------------------------ + + /** + Regular expression template for highlighting a match that occurs anywhere + in a string. The placeholder `%needles` will be replaced with a list of + needles to match, joined by `|` characters. + + This regex should have two capturing subpatterns: + + 1. Zero or one unclosed HTML entity (e.g. "&" without a ";" at the + end). + 2. The `%needles` placeholder. + + The first subpattern match is used to emulate a negative lookbehind + assertion in order to prevent highlighting inside HTML entities. + + @property _REGEX + @type String + @protected + @static + @final + **/ + _REGEX: UNCLOSED_ENTITY + '(%needles)', + + /** + Regex replacer function or string for normal matches. + + @property _REPLACER + @type Function|String + @protected + @static + @final + **/ + _REPLACER: function (match, p1, p2) { + // Mimicking a negative lookbehind assertion to prevent matches inside + // HTML entities. Hat tip to Steven Levithan for the technique: + // http://blog.stevenlevithan.com/archives/mimic-lookbehind-javascript + return p1 && !(/\s/).test(p2) ? match : + Highlight._TEMPLATE.replace(/\{s\}/g, p2); + }, + + /** + Regular expression template for highlighting start-of-string matches + (i.e., only matches that occur at the beginning of a string). The + placeholder `%needles` will be replaced with a list of needles to match, + joined by `|` characters. + + See `_REGEX` for a description of the capturing subpatterns this regex + string should contain. + + @property _START_REGEX + @type String + @protected + @static + @final + */ + _START_REGEX: '^' + UNCLOSED_ENTITY + '(%needles)', + + /** + Highlight template which will be used as a replacement for matched + substrings. The placeholder `{s}` will be replaced with the matched + substring. + + @property _TEMPLATE + @type String + @default '{s}' + @protected + @static + @final + **/ + _TEMPLATE: '{s}', + + // -- Public Static Methods ------------------------------------------------ + + /** + Highlights all occurrences in the _haystack_ string of the items in the + _needles_ array, regardless of where they occur. The returned string will + have all HTML characters escaped except for the highlighting markup. + + @method all + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @param {Object} [options] Options object. + @param {Boolean} [options.caseSensitive=false] If `true`, matching will + be case-sensitive. + @param {Boolean} [options.startsWith=false] If `true`, matches must be + anchored to the beginning of the string. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + all: function (haystack, needles, options) { + var validNeedles = [], + esc, i, len, needle, regex, replacer; + + if (!options) { + options = EMPTY_OBJECT; + } + + // TODO: document options.replacer + esc = options.escapeHTML !== false; + regex = options.startsWith ? Highlight._START_REGEX : Highlight._REGEX; + replacer = options.replacer || Highlight._REPLACER; + needles = isArray(needles) ? needles : [needles]; + + // Escape HTML characters and special regular expression characters in + // the needles so they can be used in a regex and matched against the + // escaped haystack. + for (i = 0, len = needles.length; i < len; ++i) { + needle = needles[i]; + + if (needle) { + validNeedles.push(Escape.regex(esc ? Escape.html(needle) : needle)); + } + } + + // Escape HTML characters in the haystack to prevent HTML injection. + if (esc) { + haystack = Escape.html(haystack); + } + + // No point continuing if there are no needles. + if (!validNeedles.length) { + return haystack; + } + + return haystack.replace( + new RegExp( + regex.replace('%needles', validNeedles.join('|')), + options.caseSensitive ? 'g' : 'gi' + ), + replacer + ); + }, + + /** + Same as `all()`, but case-sensitive by default. + + @method allCase + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @param {Object} [options] Options object. See `all()` for details. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + allCase: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {caseSensitive: true})); + }, + + /** + Highlights _needles_ that occur at the start of _haystack_. The returned + string will have all HTML characters escaped except for the highlighting + markup. + + @method start + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @param {Object} [options] Options object. + @param {Boolean} [options.caseSensitive=false] If `true`, matching will + be case-sensitive. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + start: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {startsWith: true})); + }, + + /** + Same as `start()`, but case-sensitive by default. + + @method startCase + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + startCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If start() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.start(haystack, needles, {caseSensitive: true}); + }, + + /** + Highlights complete words in the _haystack_ string that are also in the + _needles_ array. The returned string will have all HTML characters escaped + except for the highlighting markup. + + @method words + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings containing words + that should be highlighted. If a string is passed, it will be split + into words; if an array is passed, it is assumed to have already been + split. + @param {Object} [options] Options object. + @param {Boolean} [options.caseSensitive=false] If `true`, matching will + be case-sensitive. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + words: function (haystack, needles, options) { + var caseSensitive, + mapper, + template = Highlight._TEMPLATE, + words; + + if (!options) { + options = EMPTY_OBJECT; + } + + caseSensitive = !!options.caseSensitive; + + // Convert needles to a hash for faster lookups. + needles = YArray.hash( + isArray(needles) ? needles : WordBreak.getUniqueWords(needles, { + ignoreCase: !caseSensitive + }) + ); + + // The default word mapping function can be overridden with a custom + // one. This is used to implement accent-folded highlighting in the + // highlight-accentfold module. + mapper = options.mapper || function (word, needles) { + if (needles.hasOwnProperty(caseSensitive ? word : word.toLowerCase())) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + }; + + // Split the haystack into an array of words, including punctuation and + // whitespace so we can rebuild the string later. + words = WordBreak.getWords(haystack, { + includePunctuation: true, + includeWhitespace : true + }); + + return YArray.map(words, function (word) { + return mapper(word, needles); + }).join(''); + }, + + /** + Same as `words()`, but case-sensitive by default. + + @method wordsCase + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings containing words + that should be highlighted. If a string is passed, it will be split + into words; if an array is passed, it is assumed to have already been + split. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + wordsCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If words() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.words(haystack, needles, {caseSensitive: true}); + } +}; + +Y.Highlight = Highlight; + + +}, '3.17.2', {"requires": ["array-extras", "classnamemanager", "escape", "text-wordbreak"]}); diff --git a/design/standard/lib/yui/3.17.2/build/highlight-base/highlight-base-min.js b/design/standard/lib/yui/3.17.2/build/highlight-base/highlight-base-min.js new file mode 100644 index 0000000..d9778a1 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/highlight-base/highlight-base-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("highlight-base",function(e,t){var n=e.Array,r=e.Escape,i=e.Text.WordBreak,s=e.Lang.isArray,o={},u="(&[^;\\s]*)?",a={_REGEX:u+"(%needles)",_REPLACER:function(e,t,n){return t&&!/\s/.test(n)?e:a._TEMPLATE.replace(/\{s\}/g,n)},_START_REGEX:"^"+u+"(%needles)",_TEMPLATE:'{s}',all:function(e,t,n){var i=[],u,f,l,c,h,p;n||(n=o),u=n.escapeHTML!==!1,h=n.startsWith?a._START_REGEX:a._REGEX,p=n.replacer||a._REPLACER,t=s(t)?t:[t];for(f=0,l=t.length;f` element. The `` element is used rather than +`` in accordance with HTML5's definition of `` as being purely +presentational, which is exactly what highlighting is. + +@class Highlight +@static +**/ + +var YArray = Y.Array, + Escape = Y.Escape, + WordBreak = Y.Text.WordBreak, + + isArray = Y.Lang.isArray, + + EMPTY_OBJECT = {}, + + // Regex string that captures zero or one unclosed HTML entities. Used in + // the static regex template properties below. The entity matching is + // intentionally loose here, since there's a world of complexity involved in + // doing strict matching for this use case. + UNCLOSED_ENTITY = '(&[^;\\s]*)?', + +Highlight = { + // -- Protected Static Properties ------------------------------------------ + + /** + Regular expression template for highlighting a match that occurs anywhere + in a string. The placeholder `%needles` will be replaced with a list of + needles to match, joined by `|` characters. + + This regex should have two capturing subpatterns: + + 1. Zero or one unclosed HTML entity (e.g. "&" without a ";" at the + end). + 2. The `%needles` placeholder. + + The first subpattern match is used to emulate a negative lookbehind + assertion in order to prevent highlighting inside HTML entities. + + @property _REGEX + @type String + @protected + @static + @final + **/ + _REGEX: UNCLOSED_ENTITY + '(%needles)', + + /** + Regex replacer function or string for normal matches. + + @property _REPLACER + @type Function|String + @protected + @static + @final + **/ + _REPLACER: function (match, p1, p2) { + // Mimicking a negative lookbehind assertion to prevent matches inside + // HTML entities. Hat tip to Steven Levithan for the technique: + // http://blog.stevenlevithan.com/archives/mimic-lookbehind-javascript + return p1 && !(/\s/).test(p2) ? match : + Highlight._TEMPLATE.replace(/\{s\}/g, p2); + }, + + /** + Regular expression template for highlighting start-of-string matches + (i.e., only matches that occur at the beginning of a string). The + placeholder `%needles` will be replaced with a list of needles to match, + joined by `|` characters. + + See `_REGEX` for a description of the capturing subpatterns this regex + string should contain. + + @property _START_REGEX + @type String + @protected + @static + @final + */ + _START_REGEX: '^' + UNCLOSED_ENTITY + '(%needles)', + + /** + Highlight template which will be used as a replacement for matched + substrings. The placeholder `{s}` will be replaced with the matched + substring. + + @property _TEMPLATE + @type String + @default '{s}' + @protected + @static + @final + **/ + _TEMPLATE: '{s}', + + // -- Public Static Methods ------------------------------------------------ + + /** + Highlights all occurrences in the _haystack_ string of the items in the + _needles_ array, regardless of where they occur. The returned string will + have all HTML characters escaped except for the highlighting markup. + + @method all + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @param {Object} [options] Options object. + @param {Boolean} [options.caseSensitive=false] If `true`, matching will + be case-sensitive. + @param {Boolean} [options.startsWith=false] If `true`, matches must be + anchored to the beginning of the string. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + all: function (haystack, needles, options) { + var validNeedles = [], + esc, i, len, needle, regex, replacer; + + if (!options) { + options = EMPTY_OBJECT; + } + + // TODO: document options.replacer + esc = options.escapeHTML !== false; + regex = options.startsWith ? Highlight._START_REGEX : Highlight._REGEX; + replacer = options.replacer || Highlight._REPLACER; + needles = isArray(needles) ? needles : [needles]; + + // Escape HTML characters and special regular expression characters in + // the needles so they can be used in a regex and matched against the + // escaped haystack. + for (i = 0, len = needles.length; i < len; ++i) { + needle = needles[i]; + + if (needle) { + validNeedles.push(Escape.regex(esc ? Escape.html(needle) : needle)); + } + } + + // Escape HTML characters in the haystack to prevent HTML injection. + if (esc) { + haystack = Escape.html(haystack); + } + + // No point continuing if there are no needles. + if (!validNeedles.length) { + return haystack; + } + + return haystack.replace( + new RegExp( + regex.replace('%needles', validNeedles.join('|')), + options.caseSensitive ? 'g' : 'gi' + ), + replacer + ); + }, + + /** + Same as `all()`, but case-sensitive by default. + + @method allCase + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @param {Object} [options] Options object. See `all()` for details. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + allCase: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {caseSensitive: true})); + }, + + /** + Highlights _needles_ that occur at the start of _haystack_. The returned + string will have all HTML characters escaped except for the highlighting + markup. + + @method start + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @param {Object} [options] Options object. + @param {Boolean} [options.caseSensitive=false] If `true`, matching will + be case-sensitive. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + start: function (haystack, needles, options) { + return Highlight.all(haystack, needles, + Y.merge(options || EMPTY_OBJECT, {startsWith: true})); + }, + + /** + Same as `start()`, but case-sensitive by default. + + @method startCase + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings that should be + highlighted. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + startCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If start() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.start(haystack, needles, {caseSensitive: true}); + }, + + /** + Highlights complete words in the _haystack_ string that are also in the + _needles_ array. The returned string will have all HTML characters escaped + except for the highlighting markup. + + @method words + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings containing words + that should be highlighted. If a string is passed, it will be split + into words; if an array is passed, it is assumed to have already been + split. + @param {Object} [options] Options object. + @param {Boolean} [options.caseSensitive=false] If `true`, matching will + be case-sensitive. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + words: function (haystack, needles, options) { + var caseSensitive, + mapper, + template = Highlight._TEMPLATE, + words; + + if (!options) { + options = EMPTY_OBJECT; + } + + caseSensitive = !!options.caseSensitive; + + // Convert needles to a hash for faster lookups. + needles = YArray.hash( + isArray(needles) ? needles : WordBreak.getUniqueWords(needles, { + ignoreCase: !caseSensitive + }) + ); + + // The default word mapping function can be overridden with a custom + // one. This is used to implement accent-folded highlighting in the + // highlight-accentfold module. + mapper = options.mapper || function (word, needles) { + if (needles.hasOwnProperty(caseSensitive ? word : word.toLowerCase())) { + return template.replace(/\{s\}/g, Escape.html(word)); + } + + return Escape.html(word); + }; + + // Split the haystack into an array of words, including punctuation and + // whitespace so we can rebuild the string later. + words = WordBreak.getWords(haystack, { + includePunctuation: true, + includeWhitespace : true + }); + + return YArray.map(words, function (word) { + return mapper(word, needles); + }).join(''); + }, + + /** + Same as `words()`, but case-sensitive by default. + + @method wordsCase + @param {String} haystack String to apply highlighting to. + @param {String|String[]} needles String or array of strings containing words + that should be highlighted. If a string is passed, it will be split + into words; if an array is passed, it is assumed to have already been + split. + @return {String} Escaped and highlighted copy of _haystack_. + @static + **/ + wordsCase: function (haystack, needles) { + // No options passthru for now, since it would be redundant. If words() + // ever supports more options than caseSensitive, then we'll start + // passing the options through. + return Highlight.words(haystack, needles, {caseSensitive: true}); + } +}; + +Y.Highlight = Highlight; + + +}, '3.17.2', {"requires": ["array-extras", "classnamemanager", "escape", "text-wordbreak"]}); diff --git a/design/standard/lib/yui/3.17.2/build/history-base/history-base-coverage.js b/design/standard/lib/yui/3.17.2/build/history-base/history-base-coverage.js new file mode 100644 index 0000000..11d10dd --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/history-base/history-base-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/history-base/history-base.js']) { + __coverage__['build/history-base/history-base.js'] = {"path":"build/history-base/history-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0},"b":{"1":[0,0],"2":[0,0,0,0,0,0,0],"3":[0,0,0,0],"4":[0,0],"5":[0,0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"HistoryBase","line":57,"loc":{"start":{"line":57,"column":0},"end":{"line":57,"column":23}}},"3":{"name":"_isSimpleObject","line":83,"loc":{"start":{"line":83,"column":0},"end":{"line":83,"column":32}}},"4":{"name":"(anonymous_4)","line":168,"loc":{"start":{"line":168,"column":11},"end":{"line":168,"column":29}}},"5":{"name":"(anonymous_5)","line":295,"loc":{"start":{"line":295,"column":9},"end":{"line":295,"column":21}}},"6":{"name":"(anonymous_6)","line":315,"loc":{"start":{"line":315,"column":14},"end":{"line":315,"column":45}}},"7":{"name":"(anonymous_7)","line":331,"loc":{"start":{"line":331,"column":9},"end":{"line":331,"column":24}}},"8":{"name":"(anonymous_8)","line":353,"loc":{"start":{"line":353,"column":13},"end":{"line":353,"column":25}}},"9":{"name":"(anonymous_9)","line":371,"loc":{"start":{"line":371,"column":18},"end":{"line":371,"column":49}}},"10":{"name":"(anonymous_10)","line":392,"loc":{"start":{"line":392,"column":13},"end":{"line":392,"column":44}}},"11":{"name":"(anonymous_11)","line":416,"loc":{"start":{"line":416,"column":17},"end":{"line":416,"column":50}}},"12":{"name":"(anonymous_12)","line":428,"loc":{"start":{"line":428,"column":34},"end":{"line":428,"column":56}}},"13":{"name":"(anonymous_13)","line":432,"loc":{"start":{"line":432,"column":34},"end":{"line":432,"column":56}}},"14":{"name":"(anonymous_14)","line":448,"loc":{"start":{"line":448,"column":22},"end":{"line":448,"column":49}}},"15":{"name":"(anonymous_15)","line":506,"loc":{"start":{"line":506,"column":22},"end":{"line":506,"column":49}}},"16":{"name":"(anonymous_16)","line":559,"loc":{"start":{"line":559,"column":21},"end":{"line":559,"column":55}}},"17":{"name":"(anonymous_17)","line":570,"loc":{"start":{"line":570,"column":31},"end":{"line":570,"column":54}}},"18":{"name":"(anonymous_18)","line":584,"loc":{"start":{"line":584,"column":32},"end":{"line":584,"column":56}}},"19":{"name":"(anonymous_19)","line":617,"loc":{"start":{"line":617,"column":17},"end":{"line":617,"column":42}}},"20":{"name":"(anonymous_20)","line":632,"loc":{"start":{"line":632,"column":18},"end":{"line":632,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":640,"column":53}},"2":{"start":{"line":43,"column":0},"end":{"line":55,"column":32}},"3":{"start":{"line":57,"column":0},"end":{"line":59,"column":1}},"4":{"start":{"line":58,"column":4},"end":{"line":58,"column":38}},"5":{"start":{"line":61,"column":0},"end":{"line":66,"column":3}},"6":{"start":{"line":68,"column":0},"end":{"line":70,"column":1}},"7":{"start":{"line":69,"column":4},"end":{"line":69,"column":26}},"8":{"start":{"line":83,"column":0},"end":{"line":85,"column":1}},"9":{"start":{"line":84,"column":4},"end":{"line":84,"column":41}},"10":{"start":{"line":96,"column":0},"end":{"line":96,"column":33}},"11":{"start":{"line":107,"column":0},"end":{"line":107,"column":30}},"12":{"start":{"line":118,"column":0},"end":{"line":118,"column":38}},"13":{"start":{"line":131,"column":0},"end":{"line":133,"column":48}},"14":{"start":{"line":154,"column":0},"end":{"line":155,"column":34}},"15":{"start":{"line":157,"column":0},"end":{"line":635,"column":9}},"16":{"start":{"line":169,"column":8},"end":{"line":169,"column":25}},"17":{"start":{"line":180,"column":8},"end":{"line":180,"column":45}},"18":{"start":{"line":190,"column":9},"end":{"line":190,"column":37}},"19":{"start":{"line":204,"column":8},"end":{"line":205,"column":44}},"20":{"start":{"line":254,"column":8},"end":{"line":257,"column":11}},"21":{"start":{"line":260,"column":8},"end":{"line":262,"column":9}},"22":{"start":{"line":261,"column":12},"end":{"line":261,"column":39}},"23":{"start":{"line":296,"column":8},"end":{"line":296,"column":46}},"24":{"start":{"line":297,"column":8},"end":{"line":297,"column":30}},"25":{"start":{"line":298,"column":8},"end":{"line":298,"column":46}},"26":{"start":{"line":316,"column":8},"end":{"line":316,"column":23}},"27":{"start":{"line":317,"column":8},"end":{"line":317,"column":27}},"28":{"start":{"line":318,"column":8},"end":{"line":318,"column":53}},"29":{"start":{"line":332,"column":8},"end":{"line":333,"column":46}},"30":{"start":{"line":335,"column":8},"end":{"line":339,"column":9}},"31":{"start":{"line":336,"column":12},"end":{"line":336,"column":77}},"32":{"start":{"line":338,"column":12},"end":{"line":338,"column":61}},"33":{"start":{"line":354,"column":8},"end":{"line":354,"column":46}},"34":{"start":{"line":355,"column":8},"end":{"line":355,"column":34}},"35":{"start":{"line":356,"column":8},"end":{"line":356,"column":46}},"36":{"start":{"line":372,"column":8},"end":{"line":372,"column":23}},"37":{"start":{"line":373,"column":8},"end":{"line":373,"column":27}},"38":{"start":{"line":374,"column":8},"end":{"line":374,"column":57}},"39":{"start":{"line":393,"column":8},"end":{"line":393,"column":80}},"40":{"start":{"line":395,"column":8},"end":{"line":398,"column":9}},"41":{"start":{"line":397,"column":12},"end":{"line":397,"column":53}},"42":{"start":{"line":400,"column":8},"end":{"line":400,"column":50}},"43":{"start":{"line":401,"column":8},"end":{"line":401,"column":20}},"44":{"start":{"line":418,"column":8},"end":{"line":425,"column":11}},"45":{"start":{"line":428,"column":8},"end":{"line":430,"column":17}},"46":{"start":{"line":429,"column":12},"end":{"line":429,"column":51}},"47":{"start":{"line":432,"column":8},"end":{"line":434,"column":17}},"48":{"start":{"line":433,"column":12},"end":{"line":433,"column":51}},"49":{"start":{"line":489,"column":8},"end":{"line":493,"column":11}},"50":{"start":{"line":540,"column":8},"end":{"line":543,"column":11}},"51":{"start":{"line":560,"column":8},"end":{"line":563,"column":27}},"52":{"start":{"line":565,"column":8},"end":{"line":565,"column":36}},"53":{"start":{"line":566,"column":8},"end":{"line":566,"column":36}},"54":{"start":{"line":568,"column":8},"end":{"line":593,"column":9}},"55":{"start":{"line":570,"column":12},"end":{"line":581,"column":21}},"56":{"start":{"line":571,"column":16},"end":{"line":571,"column":45}},"57":{"start":{"line":573,"column":16},"end":{"line":580,"column":17}},"58":{"start":{"line":574,"column":20},"end":{"line":577,"column":22}},"59":{"start":{"line":579,"column":20},"end":{"line":579,"column":37}},"60":{"start":{"line":584,"column":12},"end":{"line":590,"column":21}},"61":{"start":{"line":585,"column":16},"end":{"line":589,"column":17}},"62":{"start":{"line":586,"column":20},"end":{"line":586,"column":41}},"63":{"start":{"line":587,"column":20},"end":{"line":587,"column":43}},"64":{"start":{"line":588,"column":20},"end":{"line":588,"column":37}},"65":{"start":{"line":592,"column":12},"end":{"line":592,"column":47}},"66":{"start":{"line":595,"column":8},"end":{"line":602,"column":9}},"67":{"start":{"line":596,"column":12},"end":{"line":601,"column":24}},"68":{"start":{"line":620,"column":8},"end":{"line":620,"column":42}},"69":{"start":{"line":633,"column":8},"end":{"line":633,"column":54}},"70":{"start":{"line":637,"column":0},"end":{"line":637,"column":28}}},"branchMap":{"1":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":0},"end":{"line":68,"column":0}},{"start":{"line":68,"column":0},"end":{"line":68,"column":0}}]},"2":{"line":131,"type":"binary-expr","locations":[{"start":{"line":131,"column":23},"end":{"line":131,"column":34}},{"start":{"line":131,"column":38},"end":{"line":131,"column":59}},{"start":{"line":132,"column":8},"end":{"line":132,"column":32}},{"start":{"line":132,"column":37},"end":{"line":132,"column":56}},{"start":{"line":132,"column":60},"end":{"line":132,"column":75}},{"start":{"line":133,"column":9},"end":{"line":133,"column":22}},{"start":{"line":133,"column":26},"end":{"line":133,"column":45}}]},"3":{"line":154,"type":"binary-expr","locations":[{"start":{"line":154,"column":32},"end":{"line":154,"column":53}},{"start":{"line":154,"column":57},"end":{"line":154,"column":78}},{"start":{"line":155,"column":9},"end":{"line":155,"column":17}},{"start":{"line":155,"column":21},"end":{"line":155,"column":32}}]},"4":{"line":180,"type":"binary-expr","locations":[{"start":{"line":180,"column":32},"end":{"line":180,"column":38}},{"start":{"line":180,"column":42},"end":{"line":180,"column":44}}]},"5":{"line":204,"type":"binary-expr","locations":[{"start":{"line":204,"column":44},"end":{"line":204,"column":62}},{"start":{"line":205,"column":16},"end":{"line":205,"column":35}},{"start":{"line":205,"column":39},"end":{"line":205,"column":43}}]},"6":{"line":260,"type":"if","locations":[{"start":{"line":260,"column":8},"end":{"line":260,"column":8}},{"start":{"line":260,"column":8},"end":{"line":260,"column":8}}]},"7":{"line":335,"type":"if","locations":[{"start":{"line":335,"column":8},"end":{"line":335,"column":8}},{"start":{"line":335,"column":8},"end":{"line":335,"column":8}}]},"8":{"line":336,"type":"cond-expr","locations":[{"start":{"line":336,"column":54},"end":{"line":336,"column":64}},{"start":{"line":336,"column":67},"end":{"line":336,"column":76}}]},"9":{"line":336,"type":"binary-expr","locations":[{"start":{"line":336,"column":19},"end":{"line":336,"column":27}},{"start":{"line":336,"column":31},"end":{"line":336,"column":51}}]},"10":{"line":338,"type":"cond-expr","locations":[{"start":{"line":338,"column":30},"end":{"line":338,"column":52}},{"start":{"line":338,"column":55},"end":{"line":338,"column":60}}]},"11":{"line":393,"type":"cond-expr","locations":[{"start":{"line":393,"column":28},"end":{"line":393,"column":61}},{"start":{"line":393,"column":64},"end":{"line":393,"column":79}}]},"12":{"line":395,"type":"if","locations":[{"start":{"line":395,"column":8},"end":{"line":395,"column":8}},{"start":{"line":395,"column":8},"end":{"line":395,"column":8}}]},"13":{"line":395,"type":"binary-expr","locations":[{"start":{"line":395,"column":12},"end":{"line":395,"column":25}},{"start":{"line":395,"column":29},"end":{"line":395,"column":51}},{"start":{"line":396,"column":16},"end":{"line":396,"column":49}}]},"14":{"line":565,"type":"binary-expr","locations":[{"start":{"line":565,"column":8},"end":{"line":565,"column":16}},{"start":{"line":565,"column":21},"end":{"line":565,"column":34}}]},"15":{"line":566,"type":"binary-expr","locations":[{"start":{"line":566,"column":8},"end":{"line":566,"column":15}},{"start":{"line":566,"column":21},"end":{"line":566,"column":34}}]},"16":{"line":568,"type":"if","locations":[{"start":{"line":568,"column":8},"end":{"line":568,"column":8}},{"start":{"line":568,"column":8},"end":{"line":568,"column":8}}]},"17":{"line":568,"type":"binary-expr","locations":[{"start":{"line":568,"column":12},"end":{"line":568,"column":37}},{"start":{"line":568,"column":41},"end":{"line":568,"column":67}}]},"18":{"line":573,"type":"if","locations":[{"start":{"line":573,"column":16},"end":{"line":573,"column":16}},{"start":{"line":573,"column":16},"end":{"line":573,"column":16}}]},"19":{"line":585,"type":"if","locations":[{"start":{"line":585,"column":16},"end":{"line":585,"column":16}},{"start":{"line":585,"column":16},"end":{"line":585,"column":16}}]},"20":{"line":585,"type":"binary-expr","locations":[{"start":{"line":585,"column":20},"end":{"line":585,"column":44}},{"start":{"line":585,"column":48},"end":{"line":585,"column":70}}]},"21":{"line":595,"type":"if","locations":[{"start":{"line":595,"column":8},"end":{"line":595,"column":8}},{"start":{"line":595,"column":8},"end":{"line":595,"column":8}}]},"22":{"line":595,"type":"binary-expr","locations":[{"start":{"line":595,"column":12},"end":{"line":595,"column":21}},{"start":{"line":595,"column":25},"end":{"line":595,"column":35}}]},"23":{"line":620,"type":"binary-expr","locations":[{"start":{"line":620,"column":27},"end":{"line":620,"column":35}},{"start":{"line":620,"column":39},"end":{"line":620,"column":41}}]}},"code":["(function () { YUI.add('history-base', function (Y, NAME) {","","/**"," * Provides browser history management functionality using a simple"," * add/replace/get paradigm. This can be used to ensure that the browser's back"," * and forward buttons work as the user expects and to provide bookmarkable URLs"," * that return the user to the current application state, even in an Ajax"," * application that doesn't perform full-page refreshes."," *"," * @module history"," * @main history"," * @since 3.2.0"," */","","/**"," * Provides global state management backed by an object, but with no browser"," * history integration. For actual browser history integration and back/forward"," * support, use the history-html5 or history-hash modules."," *"," * @module history"," * @submodule history-base"," * @class HistoryBase"," * @uses EventTarget"," * @constructor"," * @param {Object} config (optional) configuration object, which may contain"," * zero or more of the following properties:"," *"," *
"," *
force (Boolean)
"," *
"," * If `true`, a `history:change` event will be fired whenever the URL"," * changes, even if there is no associated state change. Default is `false`."," *
"," *"," *
initialState (Object)
"," *
"," * Initial state to set, as an object hash of key/value pairs. This will be"," * merged into the current global state."," *
"," *
"," */","","var Lang = Y.Lang,"," Obj = Y.Object,"," GlobalEnv = YUI.namespace('Env.History'),"," YArray = Y.Array,",""," doc = Y.config.doc,"," docMode = doc.documentMode,"," win = Y.config.win,",""," DEFAULT_OPTIONS = {merge: true},"," EVT_CHANGE = 'change',"," SRC_ADD = 'add',"," SRC_REPLACE = 'replace';","","function HistoryBase() {"," this._init.apply(this, arguments);","}","","Y.augment(HistoryBase, Y.EventTarget, null, null, {"," emitFacade : true,"," prefix : 'history',"," preventable: false,"," queueable : true","});","","if (!GlobalEnv._state) {"," GlobalEnv._state = {};","}","","// -- Private Methods ----------------------------------------------------------","","/**"," * Returns true if value is a simple object and not a"," * function or an array."," *"," * @method _isSimpleObject"," * @param {mixed} value"," * @return {Boolean}"," * @private"," */","function _isSimpleObject(value) {"," return Lang.type(value) === 'object';","}","","// -- Public Static Properties -------------------------------------------------","","/**"," * Name of this component."," *"," * @property NAME"," * @type String"," * @static"," */","HistoryBase.NAME = 'historyBase';","","/**"," * Constant used to identify state changes originating from the"," * add() method."," *"," * @property SRC_ADD"," * @type String"," * @static"," * @final"," */","HistoryBase.SRC_ADD = SRC_ADD;","","/**"," * Constant used to identify state changes originating from the"," * replace() method."," *"," * @property SRC_REPLACE"," * @type String"," * @static"," * @final"," */","HistoryBase.SRC_REPLACE = SRC_REPLACE;","","/**"," * Whether or not this browser supports the HTML5 History API."," *"," * @property html5"," * @type Boolean"," * @static"," */","","// All HTML5-capable browsers except Gecko 2+ (Firefox 4+) correctly return","// true for 'onpopstate' in win. In order to support Gecko 2, we fall back to a","// UA sniff for now. (current as of Firefox 4.0b2)","HistoryBase.html5 = !!(win.history && win.history.pushState &&"," win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2) &&"," (!Y.UA.android || Y.UA.android >= 2.4));","","/**"," * Whether or not this browser supports the window.onhashchange"," * event natively. Note that even if this is true, you may"," * still want to use HistoryHash's synthetic hashchange event"," * since it normalizes implementation differences and fixes spec violations"," * across various browsers."," *"," * @property nativeHashChange"," * @type Boolean"," * @static"," */","","// Most browsers that support hashchange expose it on the window. Opera 10.6+","// exposes it on the document (but you can still attach to it on the window).","//","// IE8 supports the hashchange event, but only in IE8 Standards","// Mode. However, IE8 in IE7 compatibility mode still defines the","// event but never fires it, so we can't just detect the event. We also can't","// just UA sniff for IE8, since other browsers support this event as well.","HistoryBase.nativeHashChange = ('onhashchange' in win || 'onhashchange' in doc) &&"," (!docMode || docMode > 7);","","Y.mix(HistoryBase.prototype, {"," // -- Initialization -------------------------------------------------------",""," /**"," * Initializes this HistoryBase instance. This method is called by the"," * constructor."," *"," * @method _init"," * @param {Object} config configuration object"," * @protected"," */"," _init: function (config) {"," var initialState;",""," /**"," * Configuration object provided by the user on instantiation, or an"," * empty object if one wasn't provided."," *"," * @property _config"," * @type Object"," * @default {}"," * @protected"," */"," config = this._config = config || {};",""," /**"," * If `true`, a `history:change` event will be fired whenever the URL"," * changes, even if there is no associated state change."," *"," * @property force"," * @type Boolean"," * @default false"," */"," this.force = !!config.force;",""," /**"," * Resolved initial state: a merge of the user-supplied initial state"," * (if any) and any initial state provided by a subclass. This may"," * differ from _config.initialState. If neither the config"," * nor a subclass supplies an initial state, this property will be"," * null."," *"," * @property _initialState"," * @type Object|null"," * @default {}"," * @protected"," */"," initialState = this._initialState = this._initialState ||"," config.initialState || null;",""," /**"," * Fired when the state changes. To be notified of all state changes"," * regardless of the History or YUI instance that generated them,"," * subscribe to this event on Y.Global. If you would rather"," * be notified only about changes generated by this specific History"," * instance, subscribe to this event on the instance."," *"," * @event history:change"," * @param {EventFacade} e Event facade with the following additional"," * properties:"," *"," *
"," *
changed (Object)
"," *
"," * Object hash of state items that have been added or changed. The"," * key is the item key, and the value is an object containing"," * newVal and prevVal properties"," * representing the values of the item both before and after the"," * change. If the item was newly added, prevVal will be"," * undefined."," *
"," *"," *
newVal (Object)
"," *
"," * Object hash of key/value pairs of all state items after the"," * change."," *
"," *"," *
prevVal (Object)
"," *
"," * Object hash of key/value pairs of all state items before the"," * change."," *
"," *"," *
removed (Object)
"," *
"," * Object hash of key/value pairs of state items that have been"," * removed. Values are the old values prior to removal."," *
"," *"," *
src (String)
"," *
"," * The source of the event. This can be used to selectively ignore"," * events generated by certain sources."," *
"," *
"," */"," this.publish(EVT_CHANGE, {"," broadcast: 2,"," defaultFn: this._defChangeFn"," });",""," // If initialState was provided, merge it into the current state."," if (initialState) {"," this.replace(initialState);"," }"," },",""," // -- Public Methods -------------------------------------------------------",""," /**"," * Adds a state entry with new values for the specified keys. By default,"," * the new state will be merged into the existing state, and new values will"," * override existing values. Specifying a null or"," * undefined value will cause that key to be removed from the"," * new state entry."," *"," * @method add"," * @param {Object} state Object hash of key/value pairs."," * @param {Object} options (optional) Zero or more of the following options:"," *
"," *
merge (Boolean)
"," *
"," *

"," * If true (the default), the new state will be merged"," * into the existing state. New values will override existing values,"," * and null or undefined values will be"," * removed from the state."," *

"," *"," *

"," * If false, the existing state will be discarded as a"," * whole and the new state will take its place."," *

"," *
"," *
"," * @chainable"," */"," add: function () {"," var args = YArray(arguments, 0, true);"," args.unshift(SRC_ADD);"," return this._change.apply(this, args);"," },",""," /**"," * Adds a state entry with a new value for a single key. By default, the new"," * value will be merged into the existing state values, and will override an"," * existing value with the same key if there is one. Specifying a"," * null or undefined value will cause the key to"," * be removed from the new state entry."," *"," * @method addValue"," * @param {String} key State parameter key."," * @param {String} value New value."," * @param {Object} options (optional) Zero or more options. See"," * add() for a list of supported options."," * @chainable"," */"," addValue: function (key, value, options) {"," var state = {};"," state[key] = value;"," return this._change(SRC_ADD, state, options);"," },",""," /**"," * Returns the current value of the state parameter specified by key,"," * or an object hash of key/value pairs for all current state parameters if"," * no key is specified."," *"," * @method get"," * @param {String} key (optional) State parameter key."," * @return {Object|String} Value of the specified state parameter, or an"," * object hash of key/value pairs for all current state parameters."," */"," get: function (key) {"," var state = GlobalEnv._state,"," isObject = _isSimpleObject(state);",""," if (key) {"," return isObject && Obj.owns(state, key) ? state[key] : undefined;"," } else {"," return isObject ? Y.mix({}, state, true) : state; // mix provides a fast shallow clone."," }"," },",""," /**"," * Same as add() except that a new browser history entry will"," * not be created. Instead, the current history entry will be replaced with"," * the new state."," *"," * @method replace"," * @param {Object} state Object hash of key/value pairs."," * @param {Object} options (optional) Zero or more options. See"," * add() for a list of supported options."," * @chainable"," */"," replace: function () {"," var args = YArray(arguments, 0, true);"," args.unshift(SRC_REPLACE);"," return this._change.apply(this, args);"," },",""," /**"," * Same as addValue() except that a new browser history entry"," * will not be created. Instead, the current history entry will be replaced"," * with the new state."," *"," * @method replaceValue"," * @param {String} key State parameter key."," * @param {String} value New value."," * @param {Object} options (optional) Zero or more options. See"," * add() for a list of supported options."," * @chainable"," */"," replaceValue: function (key, value, options) {"," var state = {};"," state[key] = value;"," return this._change(SRC_REPLACE, state, options);"," },",""," // -- Protected Methods ----------------------------------------------------",""," /**"," * Changes the state. This method provides a common implementation shared by"," * the public methods for changing state."," *"," * @method _change"," * @param {String} src Source of the change, for inclusion in event facades"," * to facilitate filtering."," * @param {Object} state Object hash of key/value pairs."," * @param {Object} options (optional) Zero or more options. See"," * add() for a list of supported options."," * @protected"," * @chainable"," */"," _change: function (src, state, options) {"," options = options ? Y.merge(DEFAULT_OPTIONS, options) : DEFAULT_OPTIONS;",""," if (options.merge && _isSimpleObject(state) &&"," _isSimpleObject(GlobalEnv._state)) {"," state = Y.merge(GlobalEnv._state, state);"," }",""," this._resolveChanges(src, state, options);"," return this;"," },",""," /**"," * Called by _resolveChanges() when the state has changed. This method takes"," * care of actually firing the necessary events."," *"," * @method _fireEvents"," * @param {String} src Source of the changes, for inclusion in event facades"," * to facilitate filtering."," * @param {Object} changes Resolved changes."," * @param {Object} options Zero or more options. See add() for"," * a list of supported options."," * @protected"," */"," _fireEvents: function (src, changes, options) {"," // Fire the global change event."," this.fire(EVT_CHANGE, {"," _options: options,"," changed : changes.changed,"," newVal : changes.newState,"," prevVal : changes.prevState,"," removed : changes.removed,"," src : src"," });",""," // Fire change/remove events for individual items."," Obj.each(changes.changed, function (value, key) {"," this._fireChangeEvent(src, key, value);"," }, this);",""," Obj.each(changes.removed, function (value, key) {"," this._fireRemoveEvent(src, key, value);"," }, this);"," },",""," /**"," * Fires a dynamic \"[key]Change\" event."," *"," * @method _fireChangeEvent"," * @param {String} src source of the change, for inclusion in event facades"," * to facilitate filtering"," * @param {String} key key of the item that was changed"," * @param {Object} value object hash containing newVal and"," * prevVal properties for the changed item"," * @protected"," */"," _fireChangeEvent: function (src, key, value) {"," /**"," *

"," * Dynamic event fired when an individual history item is added or"," * changed. The name of this event depends on the name of the key that"," * changed. To listen to change events for a key named \"foo\", subscribe"," * to the fooChange event; for a key named \"bar\", subscribe"," * to barChange, etc."," *

"," *"," *

"," * Key-specific events are only fired for instance-level changes; that"," * is, changes that were made via the same History instance on which the"," * event is subscribed. To be notified of changes made by other History"," * instances, subscribe to the global history:change event."," *

"," *"," * @event [key]Change"," * @param {EventFacade} e Event facade with the following additional"," * properties:"," *"," *
"," *
newVal (mixed)
"," *
"," * The new value of the item after the change."," *
"," *"," *
prevVal (mixed)
"," *
"," * The previous value of the item before the change, or"," * undefined if the item was just added and has no"," * previous value."," *
"," *"," *
src (String)
"," *
"," * The source of the event. This can be used to selectively ignore"," * events generated by certain sources."," *
"," *
"," */"," this.fire(key + 'Change', {"," newVal : value.newVal,"," prevVal: value.prevVal,"," src : src"," });"," },",""," /**"," * Fires a dynamic \"[key]Remove\" event."," *"," * @method _fireRemoveEvent"," * @param {String} src source of the change, for inclusion in event facades"," * to facilitate filtering"," * @param {String} key key of the item that was removed"," * @param {mixed} value value of the item prior to its removal"," * @protected"," */"," _fireRemoveEvent: function (src, key, value) {"," /**"," *

"," * Dynamic event fired when an individual history item is removed. The"," * name of this event depends on the name of the key that was removed."," * To listen to remove events for a key named \"foo\", subscribe to the"," * fooRemove event; for a key named \"bar\", subscribe to"," * barRemove, etc."," *

"," *"," *

"," * Key-specific events are only fired for instance-level changes; that"," * is, changes that were made via the same History instance on which the"," * event is subscribed. To be notified of changes made by other History"," * instances, subscribe to the global history:change event."," *

"," *"," * @event [key]Remove"," * @param {EventFacade} e Event facade with the following additional"," * properties:"," *"," *
"," *
prevVal (mixed)
"," *
"," * The value of the item before it was removed."," *
"," *"," *
src (String)
"," *
"," * The source of the event. This can be used to selectively ignore"," * events generated by certain sources."," *
"," *
"," */"," this.fire(key + 'Remove', {"," prevVal: value,"," src : src"," });"," },",""," /**"," * Resolves the changes (if any) between newState and the current"," * state and fires appropriate events if things have changed."," *"," * @method _resolveChanges"," * @param {String} src source of the changes, for inclusion in event facades"," * to facilitate filtering"," * @param {Object} newState object hash of key/value pairs representing the"," * new state"," * @param {Object} options Zero or more options. See add() for"," * a list of supported options."," * @protected"," */"," _resolveChanges: function (src, newState, options) {"," var changed = {},"," isChanged,"," prevState = GlobalEnv._state,"," removed = {};",""," newState || (newState = {});"," options || (options = {});",""," if (_isSimpleObject(newState) && _isSimpleObject(prevState)) {"," // Figure out what was added or changed."," Obj.each(newState, function (newVal, key) {"," var prevVal = prevState[key];",""," if (newVal !== prevVal) {"," changed[key] = {"," newVal : newVal,"," prevVal: prevVal"," };",""," isChanged = true;"," }"," }, this);",""," // Figure out what was removed."," Obj.each(prevState, function (prevVal, key) {"," if (!Obj.owns(newState, key) || newState[key] === null) {"," delete newState[key];"," removed[key] = prevVal;"," isChanged = true;"," }"," }, this);"," } else {"," isChanged = newState !== prevState;"," }",""," if (isChanged || this.force) {"," this._fireEvents(src, {"," changed : changed,"," newState : newState,"," prevState: prevState,"," removed : removed"," }, options);"," }"," },",""," /**"," * Stores the specified state. Don't call this method directly; go through"," * _resolveChanges() to ensure that changes are resolved and all events are"," * fired properly."," *"," * @method _storeState"," * @param {String} src source of the changes"," * @param {Object} newState new state to store"," * @param {Object} options Zero or more options. See add() for"," * a list of supported options."," * @protected"," */"," _storeState: function (src, newState) {"," // Note: the src and options params aren't used here, but they are used"," // by subclasses."," GlobalEnv._state = newState || {};"," },",""," // -- Protected Event Handlers ---------------------------------------------",""," /**"," * Default history:change event handler."," *"," * @method _defChangeFn"," * @param {EventFacade} e state change event facade"," * @protected"," */"," _defChangeFn: function (e) {"," this._storeState(e.src, e.newVal, e._options);"," }","}, true);","","Y.HistoryBase = HistoryBase;","","","}, '3.17.2', {\"requires\": [\"event-custom-complex\"]});","","}());"]}; +} +var __cov_tUpnrk9X1lAU31qwSqNljg = __coverage__['build/history-base/history-base.js']; +__cov_tUpnrk9X1lAU31qwSqNljg.s['1']++;YUI.add('history-base',function(Y,NAME){__cov_tUpnrk9X1lAU31qwSqNljg.f['1']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['2']++;var Lang=Y.Lang,Obj=Y.Object,GlobalEnv=YUI.namespace('Env.History'),YArray=Y.Array,doc=Y.config.doc,docMode=doc.documentMode,win=Y.config.win,DEFAULT_OPTIONS={merge:true},EVT_CHANGE='change',SRC_ADD='add',SRC_REPLACE='replace';__cov_tUpnrk9X1lAU31qwSqNljg.s['3']++;function HistoryBase(){__cov_tUpnrk9X1lAU31qwSqNljg.f['2']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['4']++;this._init.apply(this,arguments);}__cov_tUpnrk9X1lAU31qwSqNljg.s['5']++;Y.augment(HistoryBase,Y.EventTarget,null,null,{emitFacade:true,prefix:'history',preventable:false,queueable:true});__cov_tUpnrk9X1lAU31qwSqNljg.s['6']++;if(!GlobalEnv._state){__cov_tUpnrk9X1lAU31qwSqNljg.b['1'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['7']++;GlobalEnv._state={};}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['1'][1]++;}__cov_tUpnrk9X1lAU31qwSqNljg.s['8']++;function _isSimpleObject(value){__cov_tUpnrk9X1lAU31qwSqNljg.f['3']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['9']++;return Lang.type(value)==='object';}__cov_tUpnrk9X1lAU31qwSqNljg.s['10']++;HistoryBase.NAME='historyBase';__cov_tUpnrk9X1lAU31qwSqNljg.s['11']++;HistoryBase.SRC_ADD=SRC_ADD;__cov_tUpnrk9X1lAU31qwSqNljg.s['12']++;HistoryBase.SRC_REPLACE=SRC_REPLACE;__cov_tUpnrk9X1lAU31qwSqNljg.s['13']++;HistoryBase.html5=!!((__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][0]++,win.history)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][1]++,win.history.pushState)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][2]++,win.history.replaceState)&&((__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][3]++,'onpopstate'in win)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][4]++,Y.UA.gecko>=2))&&((__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][5]++,!Y.UA.android)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][6]++,Y.UA.android>=2.4)));__cov_tUpnrk9X1lAU31qwSqNljg.s['14']++;HistoryBase.nativeHashChange=((__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][0]++,'onhashchange'in win)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][1]++,'onhashchange'in doc))&&((__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][2]++,!docMode)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][3]++,docMode>7));__cov_tUpnrk9X1lAU31qwSqNljg.s['15']++;Y.mix(HistoryBase.prototype,{_init:function(config){__cov_tUpnrk9X1lAU31qwSqNljg.f['4']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['16']++;var initialState;__cov_tUpnrk9X1lAU31qwSqNljg.s['17']++;config=this._config=(__cov_tUpnrk9X1lAU31qwSqNljg.b['4'][0]++,config)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['4'][1]++,{});__cov_tUpnrk9X1lAU31qwSqNljg.s['18']++;this.force=!!config.force;__cov_tUpnrk9X1lAU31qwSqNljg.s['19']++;initialState=this._initialState=(__cov_tUpnrk9X1lAU31qwSqNljg.b['5'][0]++,this._initialState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['5'][1]++,config.initialState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['5'][2]++,null);__cov_tUpnrk9X1lAU31qwSqNljg.s['20']++;this.publish(EVT_CHANGE,{broadcast:2,defaultFn:this._defChangeFn});__cov_tUpnrk9X1lAU31qwSqNljg.s['21']++;if(initialState){__cov_tUpnrk9X1lAU31qwSqNljg.b['6'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['22']++;this.replace(initialState);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['6'][1]++;}},add:function(){__cov_tUpnrk9X1lAU31qwSqNljg.f['5']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['23']++;var args=YArray(arguments,0,true);__cov_tUpnrk9X1lAU31qwSqNljg.s['24']++;args.unshift(SRC_ADD);__cov_tUpnrk9X1lAU31qwSqNljg.s['25']++;return this._change.apply(this,args);},addValue:function(key,value,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['6']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['26']++;var state={};__cov_tUpnrk9X1lAU31qwSqNljg.s['27']++;state[key]=value;__cov_tUpnrk9X1lAU31qwSqNljg.s['28']++;return this._change(SRC_ADD,state,options);},get:function(key){__cov_tUpnrk9X1lAU31qwSqNljg.f['7']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['29']++;var state=GlobalEnv._state,isObject=_isSimpleObject(state);__cov_tUpnrk9X1lAU31qwSqNljg.s['30']++;if(key){__cov_tUpnrk9X1lAU31qwSqNljg.b['7'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['31']++;return(__cov_tUpnrk9X1lAU31qwSqNljg.b['9'][0]++,isObject)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['9'][1]++,Obj.owns(state,key))?(__cov_tUpnrk9X1lAU31qwSqNljg.b['8'][0]++,state[key]):(__cov_tUpnrk9X1lAU31qwSqNljg.b['8'][1]++,undefined);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['7'][1]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['32']++;return isObject?(__cov_tUpnrk9X1lAU31qwSqNljg.b['10'][0]++,Y.mix({},state,true)):(__cov_tUpnrk9X1lAU31qwSqNljg.b['10'][1]++,state);}},replace:function(){__cov_tUpnrk9X1lAU31qwSqNljg.f['8']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['33']++;var args=YArray(arguments,0,true);__cov_tUpnrk9X1lAU31qwSqNljg.s['34']++;args.unshift(SRC_REPLACE);__cov_tUpnrk9X1lAU31qwSqNljg.s['35']++;return this._change.apply(this,args);},replaceValue:function(key,value,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['9']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['36']++;var state={};__cov_tUpnrk9X1lAU31qwSqNljg.s['37']++;state[key]=value;__cov_tUpnrk9X1lAU31qwSqNljg.s['38']++;return this._change(SRC_REPLACE,state,options);},_change:function(src,state,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['10']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['39']++;options=options?(__cov_tUpnrk9X1lAU31qwSqNljg.b['11'][0]++,Y.merge(DEFAULT_OPTIONS,options)):(__cov_tUpnrk9X1lAU31qwSqNljg.b['11'][1]++,DEFAULT_OPTIONS);__cov_tUpnrk9X1lAU31qwSqNljg.s['40']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['13'][0]++,options.merge)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['13'][1]++,_isSimpleObject(state))&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['13'][2]++,_isSimpleObject(GlobalEnv._state))){__cov_tUpnrk9X1lAU31qwSqNljg.b['12'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['41']++;state=Y.merge(GlobalEnv._state,state);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['12'][1]++;}__cov_tUpnrk9X1lAU31qwSqNljg.s['42']++;this._resolveChanges(src,state,options);__cov_tUpnrk9X1lAU31qwSqNljg.s['43']++;return this;},_fireEvents:function(src,changes,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['11']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['44']++;this.fire(EVT_CHANGE,{_options:options,changed:changes.changed,newVal:changes.newState,prevVal:changes.prevState,removed:changes.removed,src:src});__cov_tUpnrk9X1lAU31qwSqNljg.s['45']++;Obj.each(changes.changed,function(value,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['12']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['46']++;this._fireChangeEvent(src,key,value);},this);__cov_tUpnrk9X1lAU31qwSqNljg.s['47']++;Obj.each(changes.removed,function(value,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['13']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['48']++;this._fireRemoveEvent(src,key,value);},this);},_fireChangeEvent:function(src,key,value){__cov_tUpnrk9X1lAU31qwSqNljg.f['14']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['49']++;this.fire(key+'Change',{newVal:value.newVal,prevVal:value.prevVal,src:src});},_fireRemoveEvent:function(src,key,value){__cov_tUpnrk9X1lAU31qwSqNljg.f['15']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['50']++;this.fire(key+'Remove',{prevVal:value,src:src});},_resolveChanges:function(src,newState,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['16']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['51']++;var changed={},isChanged,prevState=GlobalEnv._state,removed={};__cov_tUpnrk9X1lAU31qwSqNljg.s['52']++;(__cov_tUpnrk9X1lAU31qwSqNljg.b['14'][0]++,newState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['14'][1]++,newState={});__cov_tUpnrk9X1lAU31qwSqNljg.s['53']++;(__cov_tUpnrk9X1lAU31qwSqNljg.b['15'][0]++,options)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['15'][1]++,options={});__cov_tUpnrk9X1lAU31qwSqNljg.s['54']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['17'][0]++,_isSimpleObject(newState))&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['17'][1]++,_isSimpleObject(prevState))){__cov_tUpnrk9X1lAU31qwSqNljg.b['16'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['55']++;Obj.each(newState,function(newVal,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['17']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['56']++;var prevVal=prevState[key];__cov_tUpnrk9X1lAU31qwSqNljg.s['57']++;if(newVal!==prevVal){__cov_tUpnrk9X1lAU31qwSqNljg.b['18'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['58']++;changed[key]={newVal:newVal,prevVal:prevVal};__cov_tUpnrk9X1lAU31qwSqNljg.s['59']++;isChanged=true;}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['18'][1]++;}},this);__cov_tUpnrk9X1lAU31qwSqNljg.s['60']++;Obj.each(prevState,function(prevVal,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['18']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['61']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['20'][0]++,!Obj.owns(newState,key))||(__cov_tUpnrk9X1lAU31qwSqNljg.b['20'][1]++,newState[key]===null)){__cov_tUpnrk9X1lAU31qwSqNljg.b['19'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['62']++;delete newState[key];__cov_tUpnrk9X1lAU31qwSqNljg.s['63']++;removed[key]=prevVal;__cov_tUpnrk9X1lAU31qwSqNljg.s['64']++;isChanged=true;}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['19'][1]++;}},this);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['16'][1]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['65']++;isChanged=newState!==prevState;}__cov_tUpnrk9X1lAU31qwSqNljg.s['66']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['22'][0]++,isChanged)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['22'][1]++,this.force)){__cov_tUpnrk9X1lAU31qwSqNljg.b['21'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['67']++;this._fireEvents(src,{changed:changed,newState:newState,prevState:prevState,removed:removed},options);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['21'][1]++;}},_storeState:function(src,newState){__cov_tUpnrk9X1lAU31qwSqNljg.f['19']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['68']++;GlobalEnv._state=(__cov_tUpnrk9X1lAU31qwSqNljg.b['23'][0]++,newState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['23'][1]++,{});},_defChangeFn:function(e){__cov_tUpnrk9X1lAU31qwSqNljg.f['20']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['69']++;this._storeState(e.src,e.newVal,e._options);}},true);__cov_tUpnrk9X1lAU31qwSqNljg.s['70']++;Y.HistoryBase=HistoryBase;},'3.17.2',{'requires':['event-custom-complex']}); diff --git a/design/standard/lib/yui/3.17.2/build/history-base/history-base-debug.js b/design/standard/lib/yui/3.17.2/build/history-base/history-base-debug.js new file mode 100644 index 0000000..0215d93 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/history-base/history-base-debug.js @@ -0,0 +1,647 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('history-base', function (Y, NAME) { + +/** + * Provides browser history management functionality using a simple + * add/replace/get paradigm. This can be used to ensure that the browser's back + * and forward buttons work as the user expects and to provide bookmarkable URLs + * that return the user to the current application state, even in an Ajax + * application that doesn't perform full-page refreshes. + * + * @module history + * @main history + * @since 3.2.0 + */ + +/** + * Provides global state management backed by an object, but with no browser + * history integration. For actual browser history integration and back/forward + * support, use the history-html5 or history-hash modules. + * + * @module history + * @submodule history-base + * @class HistoryBase + * @uses EventTarget + * @constructor + * @param {Object} config (optional) configuration object, which may contain + * zero or more of the following properties: + * + *
+ *
force (Boolean)
+ *
+ * If `true`, a `history:change` event will be fired whenever the URL + * changes, even if there is no associated state change. Default is `false`. + *
+ * + *
initialState (Object)
+ *
+ * Initial state to set, as an object hash of key/value pairs. This will be + * merged into the current global state. + *
+ *
+ */ + +var Lang = Y.Lang, + Obj = Y.Object, + GlobalEnv = YUI.namespace('Env.History'), + YArray = Y.Array, + + doc = Y.config.doc, + docMode = doc.documentMode, + win = Y.config.win, + + DEFAULT_OPTIONS = {merge: true}, + EVT_CHANGE = 'change', + SRC_ADD = 'add', + SRC_REPLACE = 'replace'; + +function HistoryBase() { + this._init.apply(this, arguments); +} + +Y.augment(HistoryBase, Y.EventTarget, null, null, { + emitFacade : true, + prefix : 'history', + preventable: false, + queueable : true +}); + +if (!GlobalEnv._state) { + GlobalEnv._state = {}; +} + +// -- Private Methods ---------------------------------------------------------- + +/** + * Returns true if value is a simple object and not a + * function or an array. + * + * @method _isSimpleObject + * @param {mixed} value + * @return {Boolean} + * @private + */ +function _isSimpleObject(value) { + return Lang.type(value) === 'object'; +} + +// -- Public Static Properties ------------------------------------------------- + +/** + * Name of this component. + * + * @property NAME + * @type String + * @static + */ +HistoryBase.NAME = 'historyBase'; + +/** + * Constant used to identify state changes originating from the + * add() method. + * + * @property SRC_ADD + * @type String + * @static + * @final + */ +HistoryBase.SRC_ADD = SRC_ADD; + +/** + * Constant used to identify state changes originating from the + * replace() method. + * + * @property SRC_REPLACE + * @type String + * @static + * @final + */ +HistoryBase.SRC_REPLACE = SRC_REPLACE; + +/** + * Whether or not this browser supports the HTML5 History API. + * + * @property html5 + * @type Boolean + * @static + */ + +// All HTML5-capable browsers except Gecko 2+ (Firefox 4+) correctly return +// true for 'onpopstate' in win. In order to support Gecko 2, we fall back to a +// UA sniff for now. (current as of Firefox 4.0b2) +HistoryBase.html5 = !!(win.history && win.history.pushState && + win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2) && + (!Y.UA.android || Y.UA.android >= 2.4)); + +/** + * Whether or not this browser supports the window.onhashchange + * event natively. Note that even if this is true, you may + * still want to use HistoryHash's synthetic hashchange event + * since it normalizes implementation differences and fixes spec violations + * across various browsers. + * + * @property nativeHashChange + * @type Boolean + * @static + */ + +// Most browsers that support hashchange expose it on the window. Opera 10.6+ +// exposes it on the document (but you can still attach to it on the window). +// +// IE8 supports the hashchange event, but only in IE8 Standards +// Mode. However, IE8 in IE7 compatibility mode still defines the +// event but never fires it, so we can't just detect the event. We also can't +// just UA sniff for IE8, since other browsers support this event as well. +HistoryBase.nativeHashChange = ('onhashchange' in win || 'onhashchange' in doc) && + (!docMode || docMode > 7); + +Y.mix(HistoryBase.prototype, { + // -- Initialization ------------------------------------------------------- + + /** + * Initializes this HistoryBase instance. This method is called by the + * constructor. + * + * @method _init + * @param {Object} config configuration object + * @protected + */ + _init: function (config) { + var initialState; + + /** + * Configuration object provided by the user on instantiation, or an + * empty object if one wasn't provided. + * + * @property _config + * @type Object + * @default {} + * @protected + */ + config = this._config = config || {}; + + /** + * If `true`, a `history:change` event will be fired whenever the URL + * changes, even if there is no associated state change. + * + * @property force + * @type Boolean + * @default false + */ + this.force = !!config.force; + + /** + * Resolved initial state: a merge of the user-supplied initial state + * (if any) and any initial state provided by a subclass. This may + * differ from _config.initialState. If neither the config + * nor a subclass supplies an initial state, this property will be + * null. + * + * @property _initialState + * @type Object|null + * @default {} + * @protected + */ + initialState = this._initialState = this._initialState || + config.initialState || null; + + /** + * Fired when the state changes. To be notified of all state changes + * regardless of the History or YUI instance that generated them, + * subscribe to this event on Y.Global. If you would rather + * be notified only about changes generated by this specific History + * instance, subscribe to this event on the instance. + * + * @event history:change + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
+ *
changed (Object)
+ *
+ * Object hash of state items that have been added or changed. The + * key is the item key, and the value is an object containing + * newVal and prevVal properties + * representing the values of the item both before and after the + * change. If the item was newly added, prevVal will be + * undefined. + *
+ * + *
newVal (Object)
+ *
+ * Object hash of key/value pairs of all state items after the + * change. + *
+ * + *
prevVal (Object)
+ *
+ * Object hash of key/value pairs of all state items before the + * change. + *
+ * + *
removed (Object)
+ *
+ * Object hash of key/value pairs of state items that have been + * removed. Values are the old values prior to removal. + *
+ * + *
src (String)
+ *
+ * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
+ *
+ */ + this.publish(EVT_CHANGE, { + broadcast: 2, + defaultFn: this._defChangeFn + }); + + // If initialState was provided, merge it into the current state. + if (initialState) { + this.replace(initialState); + } + }, + + // -- Public Methods ------------------------------------------------------- + + /** + * Adds a state entry with new values for the specified keys. By default, + * the new state will be merged into the existing state, and new values will + * override existing values. Specifying a null or + * undefined value will cause that key to be removed from the + * new state entry. + * + * @method add + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more of the following options: + *
+ *
merge (Boolean)
+ *
+ *

+ * If true (the default), the new state will be merged + * into the existing state. New values will override existing values, + * and null or undefined values will be + * removed from the state. + *

+ * + *

+ * If false, the existing state will be discarded as a + * whole and the new state will take its place. + *

+ *
+ *
+ * @chainable + */ + add: function () { + var args = YArray(arguments, 0, true); + args.unshift(SRC_ADD); + return this._change.apply(this, args); + }, + + /** + * Adds a state entry with a new value for a single key. By default, the new + * value will be merged into the existing state values, and will override an + * existing value with the same key if there is one. Specifying a + * null or undefined value will cause the key to + * be removed from the new state entry. + * + * @method addValue + * @param {String} key State parameter key. + * @param {String} value New value. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + addValue: function (key, value, options) { + var state = {}; + state[key] = value; + return this._change(SRC_ADD, state, options); + }, + + /** + * Returns the current value of the state parameter specified by key, + * or an object hash of key/value pairs for all current state parameters if + * no key is specified. + * + * @method get + * @param {String} key (optional) State parameter key. + * @return {Object|String} Value of the specified state parameter, or an + * object hash of key/value pairs for all current state parameters. + */ + get: function (key) { + var state = GlobalEnv._state, + isObject = _isSimpleObject(state); + + if (key) { + return isObject && Obj.owns(state, key) ? state[key] : undefined; + } else { + return isObject ? Y.mix({}, state, true) : state; // mix provides a fast shallow clone. + } + }, + + /** + * Same as add() except that a new browser history entry will + * not be created. Instead, the current history entry will be replaced with + * the new state. + * + * @method replace + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + replace: function () { + var args = YArray(arguments, 0, true); + args.unshift(SRC_REPLACE); + return this._change.apply(this, args); + }, + + /** + * Same as addValue() except that a new browser history entry + * will not be created. Instead, the current history entry will be replaced + * with the new state. + * + * @method replaceValue + * @param {String} key State parameter key. + * @param {String} value New value. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + replaceValue: function (key, value, options) { + var state = {}; + state[key] = value; + return this._change(SRC_REPLACE, state, options); + }, + + // -- Protected Methods ---------------------------------------------------- + + /** + * Changes the state. This method provides a common implementation shared by + * the public methods for changing state. + * + * @method _change + * @param {String} src Source of the change, for inclusion in event facades + * to facilitate filtering. + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @protected + * @chainable + */ + _change: function (src, state, options) { + options = options ? Y.merge(DEFAULT_OPTIONS, options) : DEFAULT_OPTIONS; + + if (options.merge && _isSimpleObject(state) && + _isSimpleObject(GlobalEnv._state)) { + state = Y.merge(GlobalEnv._state, state); + } + + this._resolveChanges(src, state, options); + return this; + }, + + /** + * Called by _resolveChanges() when the state has changed. This method takes + * care of actually firing the necessary events. + * + * @method _fireEvents + * @param {String} src Source of the changes, for inclusion in event facades + * to facilitate filtering. + * @param {Object} changes Resolved changes. + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _fireEvents: function (src, changes, options) { + // Fire the global change event. + this.fire(EVT_CHANGE, { + _options: options, + changed : changes.changed, + newVal : changes.newState, + prevVal : changes.prevState, + removed : changes.removed, + src : src + }); + + // Fire change/remove events for individual items. + Obj.each(changes.changed, function (value, key) { + this._fireChangeEvent(src, key, value); + }, this); + + Obj.each(changes.removed, function (value, key) { + this._fireRemoveEvent(src, key, value); + }, this); + }, + + /** + * Fires a dynamic "[key]Change" event. + * + * @method _fireChangeEvent + * @param {String} src source of the change, for inclusion in event facades + * to facilitate filtering + * @param {String} key key of the item that was changed + * @param {Object} value object hash containing newVal and + * prevVal properties for the changed item + * @protected + */ + _fireChangeEvent: function (src, key, value) { + /** + *

+ * Dynamic event fired when an individual history item is added or + * changed. The name of this event depends on the name of the key that + * changed. To listen to change events for a key named "foo", subscribe + * to the fooChange event; for a key named "bar", subscribe + * to barChange, etc. + *

+ * + *

+ * Key-specific events are only fired for instance-level changes; that + * is, changes that were made via the same History instance on which the + * event is subscribed. To be notified of changes made by other History + * instances, subscribe to the global history:change event. + *

+ * + * @event [key]Change + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
+ *
newVal (mixed)
+ *
+ * The new value of the item after the change. + *
+ * + *
prevVal (mixed)
+ *
+ * The previous value of the item before the change, or + * undefined if the item was just added and has no + * previous value. + *
+ * + *
src (String)
+ *
+ * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
+ *
+ */ + this.fire(key + 'Change', { + newVal : value.newVal, + prevVal: value.prevVal, + src : src + }); + }, + + /** + * Fires a dynamic "[key]Remove" event. + * + * @method _fireRemoveEvent + * @param {String} src source of the change, for inclusion in event facades + * to facilitate filtering + * @param {String} key key of the item that was removed + * @param {mixed} value value of the item prior to its removal + * @protected + */ + _fireRemoveEvent: function (src, key, value) { + /** + *

+ * Dynamic event fired when an individual history item is removed. The + * name of this event depends on the name of the key that was removed. + * To listen to remove events for a key named "foo", subscribe to the + * fooRemove event; for a key named "bar", subscribe to + * barRemove, etc. + *

+ * + *

+ * Key-specific events are only fired for instance-level changes; that + * is, changes that were made via the same History instance on which the + * event is subscribed. To be notified of changes made by other History + * instances, subscribe to the global history:change event. + *

+ * + * @event [key]Remove + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
+ *
prevVal (mixed)
+ *
+ * The value of the item before it was removed. + *
+ * + *
src (String)
+ *
+ * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
+ *
+ */ + this.fire(key + 'Remove', { + prevVal: value, + src : src + }); + }, + + /** + * Resolves the changes (if any) between newState and the current + * state and fires appropriate events if things have changed. + * + * @method _resolveChanges + * @param {String} src source of the changes, for inclusion in event facades + * to facilitate filtering + * @param {Object} newState object hash of key/value pairs representing the + * new state + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _resolveChanges: function (src, newState, options) { + var changed = {}, + isChanged, + prevState = GlobalEnv._state, + removed = {}; + + newState || (newState = {}); + options || (options = {}); + + if (_isSimpleObject(newState) && _isSimpleObject(prevState)) { + // Figure out what was added or changed. + Obj.each(newState, function (newVal, key) { + var prevVal = prevState[key]; + + if (newVal !== prevVal) { + changed[key] = { + newVal : newVal, + prevVal: prevVal + }; + + isChanged = true; + } + }, this); + + // Figure out what was removed. + Obj.each(prevState, function (prevVal, key) { + if (!Obj.owns(newState, key) || newState[key] === null) { + delete newState[key]; + removed[key] = prevVal; + isChanged = true; + } + }, this); + } else { + isChanged = newState !== prevState; + } + + if (isChanged || this.force) { + this._fireEvents(src, { + changed : changed, + newState : newState, + prevState: prevState, + removed : removed + }, options); + } + }, + + /** + * Stores the specified state. Don't call this method directly; go through + * _resolveChanges() to ensure that changes are resolved and all events are + * fired properly. + * + * @method _storeState + * @param {String} src source of the changes + * @param {Object} newState new state to store + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _storeState: function (src, newState) { + // Note: the src and options params aren't used here, but they are used + // by subclasses. + GlobalEnv._state = newState || {}; + }, + + // -- Protected Event Handlers --------------------------------------------- + + /** + * Default history:change event handler. + * + * @method _defChangeFn + * @param {EventFacade} e state change event facade + * @protected + */ + _defChangeFn: function (e) { + this._storeState(e.src, e.newVal, e._options); + } +}, true); + +Y.HistoryBase = HistoryBase; + + +}, '3.17.2', {"requires": ["event-custom-complex"]}); diff --git a/design/standard/lib/yui/3.17.2/build/history-base/history-base-min.js b/design/standard/lib/yui/3.17.2/build/history-base/history-base-min.js new file mode 100644 index 0000000..1f9047c --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/history-base/history-base-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("history-base",function(e,t){function p(){this._init.apply(this,arguments)}function d(e){return n.type(e)==="object"}var n=e.Lang,r=e.Object,i=YUI.namespace("Env.History"),s=e.Array,o=e.config.doc,u=o.documentMode,a=e.config.win,f={merge:!0},l="change",c="add",h="replace";e.augment(p,e.EventTarget,null,null,{emitFacade:!0,prefix:"history",preventable:!1,queueable:!0}),i._state||(i._state={}),p.NAME="historyBase",p.SRC_ADD=c,p.SRC_REPLACE=h,p.html5=!!(a.history&&a.history.pushState&&a.history.replaceState&&("onpopstate"in a||e.UA.gecko>=2)&&(!e.UA.android||e.UA.android>=2.4)),p.nativeHashChange=("onhashchange"in a||"onhashchange"in o)&&(!u||u>7),e.mix(p.prototype,{_init:function(e){var t;e=this._config=e||{},this.force=!!e.force,t=this._initialState=this._initialState||e.initialState||null,this.publish(l,{broadcast:2,defaultFn:this._defChangeFn}),t&&this.replace(t)},add:function(){var e=s(arguments,0,!0);return e.unshift(c),this._change.apply(this,e)},addValue:function(e,t,n){var r={};return r[e]=t,this._change(c,r,n)},get:function(t){var n=i._state,s=d(n);return t?s&&r.owns(n,t)?n[t]:undefined:s?e.mix({},n,!0):n},replace:function(){var e=s(arguments,0,!0);return e.unshift(h),this._change.apply(this,e)},replaceValue:function(e,t,n){var r={};return r[e]=t,this._change(h,r,n)},_change:function(t,n,r){return r=r?e.merge(f,r):f,r.merge&&d(n)&&d(i._state)&&(n=e.merge(i._state,n)),this._resolveChanges(t,n,r),this},_fireEvents:function(e,t,n){this.fire(l,{_options:n,changed:t.changed,newVal:t.newState,prevVal:t.prevState,removed:t.removed,src:e}),r.each(t.changed,function(t,n){this._fireChangeEvent(e,n,t)},this),r.each(t.removed,function(t,n){this._fireRemoveEvent(e,n,t)},this)},_fireChangeEvent:function(e,t,n){this.fire(t+"Change",{newVal:n.newVal,prevVal:n.prevVal,src:e})},_fireRemoveEvent:function(e,t,n){this.fire(t+"Remove",{prevVal:n,src:e})},_resolveChanges:function(e,t,n){var s={},o,u=i._state,a={};t||(t={}),n||(n={}),d(t)&&d(u)?(r.each(t,function(e,t){var n=u[t];e!==n&&(s[t]={newVal:e,prevVal:n},o=!0)},this),r.each(u,function(e,n){if(!r.owns(t,n)||t[n]===null)delete t[n],a[n]=e,o=!0},this)):o=t!==u,(o||this.force)&&this._fireEvents(e,{changed:s,newState:t,prevState:u,removed:a},n)},_storeState:function(e,t){i._state=t||{}},_defChangeFn:function(e){this._storeState(e.src,e.newVal,e._options)}},!0),e.HistoryBase=p},"3.17.2",{requires:["event-custom-complex"]}); diff --git a/design/standard/lib/yui/3.17.2/build/history-base/history-base.js b/design/standard/lib/yui/3.17.2/build/history-base/history-base.js new file mode 100644 index 0000000..0215d93 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/history-base/history-base.js @@ -0,0 +1,647 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('history-base', function (Y, NAME) { + +/** + * Provides browser history management functionality using a simple + * add/replace/get paradigm. This can be used to ensure that the browser's back + * and forward buttons work as the user expects and to provide bookmarkable URLs + * that return the user to the current application state, even in an Ajax + * application that doesn't perform full-page refreshes. + * + * @module history + * @main history + * @since 3.2.0 + */ + +/** + * Provides global state management backed by an object, but with no browser + * history integration. For actual browser history integration and back/forward + * support, use the history-html5 or history-hash modules. + * + * @module history + * @submodule history-base + * @class HistoryBase + * @uses EventTarget + * @constructor + * @param {Object} config (optional) configuration object, which may contain + * zero or more of the following properties: + * + *
+ *
force (Boolean)
+ *
+ * If `true`, a `history:change` event will be fired whenever the URL + * changes, even if there is no associated state change. Default is `false`. + *
+ * + *
initialState (Object)
+ *
+ * Initial state to set, as an object hash of key/value pairs. This will be + * merged into the current global state. + *
+ *
+ */ + +var Lang = Y.Lang, + Obj = Y.Object, + GlobalEnv = YUI.namespace('Env.History'), + YArray = Y.Array, + + doc = Y.config.doc, + docMode = doc.documentMode, + win = Y.config.win, + + DEFAULT_OPTIONS = {merge: true}, + EVT_CHANGE = 'change', + SRC_ADD = 'add', + SRC_REPLACE = 'replace'; + +function HistoryBase() { + this._init.apply(this, arguments); +} + +Y.augment(HistoryBase, Y.EventTarget, null, null, { + emitFacade : true, + prefix : 'history', + preventable: false, + queueable : true +}); + +if (!GlobalEnv._state) { + GlobalEnv._state = {}; +} + +// -- Private Methods ---------------------------------------------------------- + +/** + * Returns true if value is a simple object and not a + * function or an array. + * + * @method _isSimpleObject + * @param {mixed} value + * @return {Boolean} + * @private + */ +function _isSimpleObject(value) { + return Lang.type(value) === 'object'; +} + +// -- Public Static Properties ------------------------------------------------- + +/** + * Name of this component. + * + * @property NAME + * @type String + * @static + */ +HistoryBase.NAME = 'historyBase'; + +/** + * Constant used to identify state changes originating from the + * add() method. + * + * @property SRC_ADD + * @type String + * @static + * @final + */ +HistoryBase.SRC_ADD = SRC_ADD; + +/** + * Constant used to identify state changes originating from the + * replace() method. + * + * @property SRC_REPLACE + * @type String + * @static + * @final + */ +HistoryBase.SRC_REPLACE = SRC_REPLACE; + +/** + * Whether or not this browser supports the HTML5 History API. + * + * @property html5 + * @type Boolean + * @static + */ + +// All HTML5-capable browsers except Gecko 2+ (Firefox 4+) correctly return +// true for 'onpopstate' in win. In order to support Gecko 2, we fall back to a +// UA sniff for now. (current as of Firefox 4.0b2) +HistoryBase.html5 = !!(win.history && win.history.pushState && + win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2) && + (!Y.UA.android || Y.UA.android >= 2.4)); + +/** + * Whether or not this browser supports the window.onhashchange + * event natively. Note that even if this is true, you may + * still want to use HistoryHash's synthetic hashchange event + * since it normalizes implementation differences and fixes spec violations + * across various browsers. + * + * @property nativeHashChange + * @type Boolean + * @static + */ + +// Most browsers that support hashchange expose it on the window. Opera 10.6+ +// exposes it on the document (but you can still attach to it on the window). +// +// IE8 supports the hashchange event, but only in IE8 Standards +// Mode. However, IE8 in IE7 compatibility mode still defines the +// event but never fires it, so we can't just detect the event. We also can't +// just UA sniff for IE8, since other browsers support this event as well. +HistoryBase.nativeHashChange = ('onhashchange' in win || 'onhashchange' in doc) && + (!docMode || docMode > 7); + +Y.mix(HistoryBase.prototype, { + // -- Initialization ------------------------------------------------------- + + /** + * Initializes this HistoryBase instance. This method is called by the + * constructor. + * + * @method _init + * @param {Object} config configuration object + * @protected + */ + _init: function (config) { + var initialState; + + /** + * Configuration object provided by the user on instantiation, or an + * empty object if one wasn't provided. + * + * @property _config + * @type Object + * @default {} + * @protected + */ + config = this._config = config || {}; + + /** + * If `true`, a `history:change` event will be fired whenever the URL + * changes, even if there is no associated state change. + * + * @property force + * @type Boolean + * @default false + */ + this.force = !!config.force; + + /** + * Resolved initial state: a merge of the user-supplied initial state + * (if any) and any initial state provided by a subclass. This may + * differ from _config.initialState. If neither the config + * nor a subclass supplies an initial state, this property will be + * null. + * + * @property _initialState + * @type Object|null + * @default {} + * @protected + */ + initialState = this._initialState = this._initialState || + config.initialState || null; + + /** + * Fired when the state changes. To be notified of all state changes + * regardless of the History or YUI instance that generated them, + * subscribe to this event on Y.Global. If you would rather + * be notified only about changes generated by this specific History + * instance, subscribe to this event on the instance. + * + * @event history:change + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
+ *
changed (Object)
+ *
+ * Object hash of state items that have been added or changed. The + * key is the item key, and the value is an object containing + * newVal and prevVal properties + * representing the values of the item both before and after the + * change. If the item was newly added, prevVal will be + * undefined. + *
+ * + *
newVal (Object)
+ *
+ * Object hash of key/value pairs of all state items after the + * change. + *
+ * + *
prevVal (Object)
+ *
+ * Object hash of key/value pairs of all state items before the + * change. + *
+ * + *
removed (Object)
+ *
+ * Object hash of key/value pairs of state items that have been + * removed. Values are the old values prior to removal. + *
+ * + *
src (String)
+ *
+ * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
+ *
+ */ + this.publish(EVT_CHANGE, { + broadcast: 2, + defaultFn: this._defChangeFn + }); + + // If initialState was provided, merge it into the current state. + if (initialState) { + this.replace(initialState); + } + }, + + // -- Public Methods ------------------------------------------------------- + + /** + * Adds a state entry with new values for the specified keys. By default, + * the new state will be merged into the existing state, and new values will + * override existing values. Specifying a null or + * undefined value will cause that key to be removed from the + * new state entry. + * + * @method add + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more of the following options: + *
+ *
merge (Boolean)
+ *
+ *

+ * If true (the default), the new state will be merged + * into the existing state. New values will override existing values, + * and null or undefined values will be + * removed from the state. + *

+ * + *

+ * If false, the existing state will be discarded as a + * whole and the new state will take its place. + *

+ *
+ *
+ * @chainable + */ + add: function () { + var args = YArray(arguments, 0, true); + args.unshift(SRC_ADD); + return this._change.apply(this, args); + }, + + /** + * Adds a state entry with a new value for a single key. By default, the new + * value will be merged into the existing state values, and will override an + * existing value with the same key if there is one. Specifying a + * null or undefined value will cause the key to + * be removed from the new state entry. + * + * @method addValue + * @param {String} key State parameter key. + * @param {String} value New value. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + addValue: function (key, value, options) { + var state = {}; + state[key] = value; + return this._change(SRC_ADD, state, options); + }, + + /** + * Returns the current value of the state parameter specified by key, + * or an object hash of key/value pairs for all current state parameters if + * no key is specified. + * + * @method get + * @param {String} key (optional) State parameter key. + * @return {Object|String} Value of the specified state parameter, or an + * object hash of key/value pairs for all current state parameters. + */ + get: function (key) { + var state = GlobalEnv._state, + isObject = _isSimpleObject(state); + + if (key) { + return isObject && Obj.owns(state, key) ? state[key] : undefined; + } else { + return isObject ? Y.mix({}, state, true) : state; // mix provides a fast shallow clone. + } + }, + + /** + * Same as add() except that a new browser history entry will + * not be created. Instead, the current history entry will be replaced with + * the new state. + * + * @method replace + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + replace: function () { + var args = YArray(arguments, 0, true); + args.unshift(SRC_REPLACE); + return this._change.apply(this, args); + }, + + /** + * Same as addValue() except that a new browser history entry + * will not be created. Instead, the current history entry will be replaced + * with the new state. + * + * @method replaceValue + * @param {String} key State parameter key. + * @param {String} value New value. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @chainable + */ + replaceValue: function (key, value, options) { + var state = {}; + state[key] = value; + return this._change(SRC_REPLACE, state, options); + }, + + // -- Protected Methods ---------------------------------------------------- + + /** + * Changes the state. This method provides a common implementation shared by + * the public methods for changing state. + * + * @method _change + * @param {String} src Source of the change, for inclusion in event facades + * to facilitate filtering. + * @param {Object} state Object hash of key/value pairs. + * @param {Object} options (optional) Zero or more options. See + * add() for a list of supported options. + * @protected + * @chainable + */ + _change: function (src, state, options) { + options = options ? Y.merge(DEFAULT_OPTIONS, options) : DEFAULT_OPTIONS; + + if (options.merge && _isSimpleObject(state) && + _isSimpleObject(GlobalEnv._state)) { + state = Y.merge(GlobalEnv._state, state); + } + + this._resolveChanges(src, state, options); + return this; + }, + + /** + * Called by _resolveChanges() when the state has changed. This method takes + * care of actually firing the necessary events. + * + * @method _fireEvents + * @param {String} src Source of the changes, for inclusion in event facades + * to facilitate filtering. + * @param {Object} changes Resolved changes. + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _fireEvents: function (src, changes, options) { + // Fire the global change event. + this.fire(EVT_CHANGE, { + _options: options, + changed : changes.changed, + newVal : changes.newState, + prevVal : changes.prevState, + removed : changes.removed, + src : src + }); + + // Fire change/remove events for individual items. + Obj.each(changes.changed, function (value, key) { + this._fireChangeEvent(src, key, value); + }, this); + + Obj.each(changes.removed, function (value, key) { + this._fireRemoveEvent(src, key, value); + }, this); + }, + + /** + * Fires a dynamic "[key]Change" event. + * + * @method _fireChangeEvent + * @param {String} src source of the change, for inclusion in event facades + * to facilitate filtering + * @param {String} key key of the item that was changed + * @param {Object} value object hash containing newVal and + * prevVal properties for the changed item + * @protected + */ + _fireChangeEvent: function (src, key, value) { + /** + *

+ * Dynamic event fired when an individual history item is added or + * changed. The name of this event depends on the name of the key that + * changed. To listen to change events for a key named "foo", subscribe + * to the fooChange event; for a key named "bar", subscribe + * to barChange, etc. + *

+ * + *

+ * Key-specific events are only fired for instance-level changes; that + * is, changes that were made via the same History instance on which the + * event is subscribed. To be notified of changes made by other History + * instances, subscribe to the global history:change event. + *

+ * + * @event [key]Change + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
+ *
newVal (mixed)
+ *
+ * The new value of the item after the change. + *
+ * + *
prevVal (mixed)
+ *
+ * The previous value of the item before the change, or + * undefined if the item was just added and has no + * previous value. + *
+ * + *
src (String)
+ *
+ * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
+ *
+ */ + this.fire(key + 'Change', { + newVal : value.newVal, + prevVal: value.prevVal, + src : src + }); + }, + + /** + * Fires a dynamic "[key]Remove" event. + * + * @method _fireRemoveEvent + * @param {String} src source of the change, for inclusion in event facades + * to facilitate filtering + * @param {String} key key of the item that was removed + * @param {mixed} value value of the item prior to its removal + * @protected + */ + _fireRemoveEvent: function (src, key, value) { + /** + *

+ * Dynamic event fired when an individual history item is removed. The + * name of this event depends on the name of the key that was removed. + * To listen to remove events for a key named "foo", subscribe to the + * fooRemove event; for a key named "bar", subscribe to + * barRemove, etc. + *

+ * + *

+ * Key-specific events are only fired for instance-level changes; that + * is, changes that were made via the same History instance on which the + * event is subscribed. To be notified of changes made by other History + * instances, subscribe to the global history:change event. + *

+ * + * @event [key]Remove + * @param {EventFacade} e Event facade with the following additional + * properties: + * + *
+ *
prevVal (mixed)
+ *
+ * The value of the item before it was removed. + *
+ * + *
src (String)
+ *
+ * The source of the event. This can be used to selectively ignore + * events generated by certain sources. + *
+ *
+ */ + this.fire(key + 'Remove', { + prevVal: value, + src : src + }); + }, + + /** + * Resolves the changes (if any) between newState and the current + * state and fires appropriate events if things have changed. + * + * @method _resolveChanges + * @param {String} src source of the changes, for inclusion in event facades + * to facilitate filtering + * @param {Object} newState object hash of key/value pairs representing the + * new state + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _resolveChanges: function (src, newState, options) { + var changed = {}, + isChanged, + prevState = GlobalEnv._state, + removed = {}; + + newState || (newState = {}); + options || (options = {}); + + if (_isSimpleObject(newState) && _isSimpleObject(prevState)) { + // Figure out what was added or changed. + Obj.each(newState, function (newVal, key) { + var prevVal = prevState[key]; + + if (newVal !== prevVal) { + changed[key] = { + newVal : newVal, + prevVal: prevVal + }; + + isChanged = true; + } + }, this); + + // Figure out what was removed. + Obj.each(prevState, function (prevVal, key) { + if (!Obj.owns(newState, key) || newState[key] === null) { + delete newState[key]; + removed[key] = prevVal; + isChanged = true; + } + }, this); + } else { + isChanged = newState !== prevState; + } + + if (isChanged || this.force) { + this._fireEvents(src, { + changed : changed, + newState : newState, + prevState: prevState, + removed : removed + }, options); + } + }, + + /** + * Stores the specified state. Don't call this method directly; go through + * _resolveChanges() to ensure that changes are resolved and all events are + * fired properly. + * + * @method _storeState + * @param {String} src source of the changes + * @param {Object} newState new state to store + * @param {Object} options Zero or more options. See add() for + * a list of supported options. + * @protected + */ + _storeState: function (src, newState) { + // Note: the src and options params aren't used here, but they are used + // by subclasses. + GlobalEnv._state = newState || {}; + }, + + // -- Protected Event Handlers --------------------------------------------- + + /** + * Default history:change event handler. + * + * @method _defChangeFn + * @param {EventFacade} e state change event facade + * @protected + */ + _defChangeFn: function (e) { + this._storeState(e.src, e.newVal, e._options); + } +}, true); + +Y.HistoryBase = HistoryBase; + + +}, '3.17.2', {"requires": ["event-custom-complex"]}); diff --git a/design/standard/lib/yui/3.17.2/build/history-hash-ie/history-hash-ie-coverage.js b/design/standard/lib/yui/3.17.2/build/history-hash-ie/history-hash-ie-coverage.js new file mode 100644 index 0000000..66a9fa5 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/history-hash-ie/history-hash-ie-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/history-hash-ie/history-hash-ie.js']) { + __coverage__['build/history-hash-ie/history-hash-ie.js'] = {"path":"build/history-hash-ie/history-hash-ie.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":46}}},"2":{"name":"(anonymous_2)","line":32,"loc":{"start":{"line":32,"column":32},"end":{"line":32,"column":44}}},"3":{"name":"(anonymous_3)","line":55,"loc":{"start":{"line":55,"column":32},"end":{"line":55,"column":57}}},"4":{"name":"(anonymous_4)","line":75,"loc":{"start":{"line":75,"column":25},"end":{"line":75,"column":37}}},"5":{"name":"(anonymous_5)","line":113,"loc":{"start":{"line":113,"column":31},"end":{"line":113,"column":44}}},"6":{"name":"(anonymous_6)","line":122,"loc":{"start":{"line":122,"column":30},"end":{"line":122,"column":42}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":134,"column":58}},"2":{"start":{"line":16,"column":0},"end":{"line":131,"column":1}},"3":{"start":{"line":17,"column":4},"end":{"line":22,"column":30}},"4":{"start":{"line":32,"column":4},"end":{"line":42,"column":6}},"5":{"start":{"line":33,"column":8},"end":{"line":35,"column":9}},"6":{"start":{"line":34,"column":12},"end":{"line":34,"column":22}},"7":{"start":{"line":37,"column":8},"end":{"line":38,"column":66}},"8":{"start":{"line":40,"column":8},"end":{"line":41,"column":52}},"9":{"start":{"line":55,"column":4},"end":{"line":70,"column":6}},"10":{"start":{"line":56,"column":8},"end":{"line":57,"column":61}},"11":{"start":{"line":59,"column":8},"end":{"line":61,"column":9}},"12":{"start":{"line":60,"column":12},"end":{"line":60,"column":19}},"13":{"start":{"line":64,"column":8},"end":{"line":69,"column":9}},"14":{"start":{"line":65,"column":12},"end":{"line":65,"column":79}},"15":{"start":{"line":67,"column":12},"end":{"line":67,"column":37}},"16":{"start":{"line":68,"column":12},"end":{"line":68,"column":39}},"17":{"start":{"line":72,"column":4},"end":{"line":72,"column":88}},"18":{"start":{"line":74,"column":4},"end":{"line":130,"column":5}},"19":{"start":{"line":75,"column":8},"end":{"line":129,"column":11}},"20":{"start":{"line":76,"column":12},"end":{"line":76,"column":52}},"21":{"start":{"line":96,"column":12},"end":{"line":98,"column":15}},"22":{"start":{"line":104,"column":12},"end":{"line":104,"column":61}},"23":{"start":{"line":109,"column":12},"end":{"line":109,"column":58}},"24":{"start":{"line":113,"column":12},"end":{"line":119,"column":20}},"25":{"start":{"line":114,"column":16},"end":{"line":114,"column":40}},"26":{"start":{"line":116,"column":16},"end":{"line":118,"column":17}},"27":{"start":{"line":117,"column":20},"end":{"line":117,"column":59}},"28":{"start":{"line":122,"column":12},"end":{"line":128,"column":27}},"29":{"start":{"line":123,"column":16},"end":{"line":123,"column":61}},"30":{"start":{"line":125,"column":16},"end":{"line":127,"column":17}},"31":{"start":{"line":126,"column":20},"end":{"line":126,"column":52}}},"branchMap":{"1":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":0},"end":{"line":16,"column":0}},{"start":{"line":16,"column":0},"end":{"line":16,"column":0}}]},"2":{"line":16,"type":"binary-expr","locations":[{"start":{"line":16,"column":4},"end":{"line":16,"column":11}},{"start":{"line":16,"column":15},"end":{"line":16,"column":46}}]},"3":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":8},"end":{"line":33,"column":8}},{"start":{"line":33,"column":8},"end":{"line":33,"column":8}}]},"4":{"line":33,"type":"binary-expr","locations":[{"start":{"line":33,"column":12},"end":{"line":33,"column":19}},{"start":{"line":33,"column":23},"end":{"line":33,"column":44}}]},"5":{"line":40,"type":"cond-expr","locations":[{"start":{"line":41,"column":20},"end":{"line":41,"column":44}},{"start":{"line":41,"column":47},"end":{"line":41,"column":51}}]},"6":{"line":40,"type":"binary-expr","locations":[{"start":{"line":40,"column":15},"end":{"line":40,"column":21}},{"start":{"line":40,"column":25},"end":{"line":40,"column":51}}]},"7":{"line":56,"type":"binary-expr","locations":[{"start":{"line":56,"column":29},"end":{"line":56,"column":35}},{"start":{"line":56,"column":39},"end":{"line":56,"column":59}},{"start":{"line":56,"column":63},"end":{"line":56,"column":92}}]},"8":{"line":57,"type":"binary-expr","locations":[{"start":{"line":57,"column":29},"end":{"line":57,"column":38}},{"start":{"line":57,"column":42},"end":{"line":57,"column":60}}]},"9":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":8},"end":{"line":59,"column":8}},{"start":{"line":59,"column":8},"end":{"line":59,"column":8}}]},"10":{"line":59,"type":"binary-expr","locations":[{"start":{"line":59,"column":12},"end":{"line":59,"column":22}},{"start":{"line":59,"column":26},"end":{"line":59,"column":41}}]},"11":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":8},"end":{"line":64,"column":8}},{"start":{"line":64,"column":8},"end":{"line":64,"column":8}}]},"12":{"line":65,"type":"cond-expr","locations":[{"start":{"line":65,"column":60},"end":{"line":65,"column":64}},{"start":{"line":65,"column":67},"end":{"line":65,"column":77}}]},"13":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":4},"end":{"line":74,"column":4}},{"start":{"line":74,"column":4},"end":{"line":74,"column":4}}]},"14":{"line":109,"type":"binary-expr","locations":[{"start":{"line":109,"column":38},"end":{"line":109,"column":49}},{"start":{"line":109,"column":53},"end":{"line":109,"column":56}}]},"15":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":16},"end":{"line":116,"column":16}},{"start":{"line":116,"column":16},"end":{"line":116,"column":16}}]},"16":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":16},"end":{"line":125,"column":16}},{"start":{"line":125,"column":16},"end":{"line":125,"column":16}}]}},"code":["(function () { YUI.add('history-hash-ie', function (Y, NAME) {","","/**"," * Improves IE6/7 support in history-hash by using a hidden iframe to create"," * entries in IE's browser history. This module is only needed if IE6/7 support"," * is necessary; it's not needed for any other browser."," *"," * @module history"," * @submodule history-hash-ie"," * @since 3.2.0"," */","","// Combination of a UA sniff to ensure this is IE (or a browser that wants us to","// treat it like IE) and feature detection for native hashchange support (false","// for IE < 8 or IE8/9 in IE7 mode).","if (Y.UA.ie && !Y.HistoryBase.nativeHashChange) {"," var Do = Y.Do,"," GlobalEnv = YUI.namespace('Env.HistoryHash'),"," HistoryHash = Y.HistoryHash,",""," iframe = GlobalEnv._iframe,"," win = Y.config.win;",""," /**"," * Gets the raw (not decoded) current location hash from the IE iframe,"," * minus the preceding '#' character and the hashPrefix (if one is set)."," *"," * @method getIframeHash"," * @return {String} current iframe hash"," * @static"," */"," HistoryHash.getIframeHash = function () {"," if (!iframe || !iframe.contentWindow) {"," return '';"," }",""," var prefix = HistoryHash.hashPrefix,"," hash = iframe.contentWindow.location.hash.substr(1);",""," return prefix && hash.indexOf(prefix) === 0 ?"," hash.replace(prefix, '') : hash;"," };",""," /**"," * Updates the history iframe with the specified hash."," *"," * @method _updateIframe"," * @param {String} hash location hash"," * @param {Boolean} replace (optional) if true, the current"," * history state will be replaced without adding a new history entry"," * @protected"," * @static"," * @for HistoryHash"," */"," HistoryHash._updateIframe = function (hash, replace) {"," var iframeDoc = iframe && iframe.contentWindow && iframe.contentWindow.document,"," iframeLocation = iframeDoc && iframeDoc.location;",""," if (!iframeDoc || !iframeLocation) {"," return;"," }","",""," if (replace) {"," iframeLocation.replace(hash.charAt(0) === '#' ? hash : '#' + hash);"," } else {"," iframeDoc.open().close();"," iframeLocation.hash = hash;"," }"," };",""," Do.before(HistoryHash._updateIframe, HistoryHash, 'replaceHash', HistoryHash, true);",""," if (!iframe) {"," Y.on('domready', function () {"," var lastUrlHash = HistoryHash.getHash();",""," // Create a hidden iframe to store history state, following the"," // iframe-hiding recommendations from"," // http://www.paciellogroup.com/blog/?p=604."," //"," // This iframe will allow history navigation within the current page"," // context. After navigating to another page, all but the most"," // recent history state will be lost."," //"," // Earlier versions of the YUI History Utility attempted to work"," // around this limitation by having the iframe load a static"," // resource. This workaround was extremely fragile and tended to"," // break frequently (and silently) since it was entirely dependent"," // on IE's inconsistent handling of iframe history."," //"," // Since this workaround didn't work much of the time anyway and"," // added significant complexity, it has been removed, and IE6 and 7"," // now get slightly degraded history support.",""," iframe = GlobalEnv._iframe = Y.Node.getDOMNode(Y.Node.create("," '';","","","NodeMenuNav.ATTRS = {","","\t/**","\t* Boolean indicating if use of the WAI-ARIA Roles and States should be","\t* enabled for the menu.","\t*","\t* @attribute useARIA","\t* @readOnly","\t* @writeOnce","\t* @default true","\t* @type boolean","\t*/","\tuseARIA: {","","\t\tvalue: true,","\t\twriteOnce: true,","\t\tlazyAdd: false,","\t\tsetter: function (value) {","","\t\t\tvar oMenu = this.get(HOST),","\t\t\t\toMenuLabel,","\t\t\t\toMenuToggle,","\t\t\t\toSubmenu,","\t\t\t\tsID;","","\t\t\tif (value) {","","\t\t\t\toMenu.set(ROLE, MENU);","","\t\t\t\toMenu.all(\"ul,li,\" + MENU_CONTENT_SELECTOR).set(ROLE, PRESENTATION);","","\t\t\t\toMenu.all((PERIOD + getClassName(MENUITEM, CONTENT))).set(ROLE, MENUITEM);","","\t\t\t\toMenu.all((PERIOD + CSS_MENU_LABEL)).each(function (node) {","","\t\t\t\t\toMenuLabel = node;","\t\t\t\t\toMenuToggle = node.one(MENU_TOGGLE_SELECTOR);","","\t\t\t\t\tif (oMenuToggle) {","\t\t\t\t\t\toMenuToggle.set(ROLE, PRESENTATION);","\t\t\t\t\t\toMenuLabel = oMenuToggle.previous();","\t\t\t\t\t}","","\t\t\t\t\toMenuLabel.set(ROLE, MENUITEM);","\t\t\t\t\toMenuLabel.set(\"aria-haspopup\", true);","","\t\t\t\t\toSubmenu = node.next();","","\t\t\t\t\tif (oSubmenu) {","","\t\t\t\t\t\toSubmenu.set(ROLE, MENU);","","\t\t\t\t\t\toMenuLabel = oSubmenu.previous();","\t\t\t\t\t\toMenuToggle = oMenuLabel.one(MENU_TOGGLE_SELECTOR);","","\t\t\t\t\t\tif (oMenuToggle) {","\t\t\t\t\t\t\toMenuLabel = oMenuToggle;","\t\t\t\t\t\t}","","\t\t\t\t\t\tsID = Y.stamp(oMenuLabel);","","\t\t\t\t\t\tif (!oMenuLabel.get(ID)) {","\t\t\t\t\t\t\toMenuLabel.set(ID, sID);","\t\t\t\t\t\t}","","\t\t\t\t\t\toSubmenu.set(\"aria-labelledby\", sID);","\t\t\t\t\t\toSubmenu.set(ARIA_HIDDEN, true);","","\t\t\t\t\t}","","\t\t\t\t});","","\t\t\t}","","\t\t}","","\t},","","","\t/**","\t* Boolean indicating if submenus are automatically made visible when the","\t* user mouses over the menu's items.","\t*","\t* @attribute autoSubmenuDisplay","\t* @readOnly","\t* @writeOnce","\t* @default true","\t* @type boolean","\t*/","\tautoSubmenuDisplay: {","","\t\tvalue: true,","\t\twriteOnce: true","","\t},","","","\t/**","\t* Number indicating the time (in milliseconds) that should expire before a","\t* submenu is made visible when the user mouses over the menu's label.","\t*","\t* @attribute submenuShowDelay","\t* @readOnly","\t* @writeOnce","\t* @default 250","\t* @type Number","\t*/","\tsubmenuShowDelay: {","","\t\tvalue: 250,","\t\twriteOnce: true","","\t},","","","\t/**","\t* Number indicating the time (in milliseconds) that should expire before a","\t* submenu is hidden when the user mouses out of a menu label heading in the","\t* direction of a submenu.","\t*","\t* @attribute submenuHideDelay","\t* @readOnly","\t* @writeOnce","\t* @default 250","\t* @type Number","\t*/","\tsubmenuHideDelay: {","","\t\tvalue: 250,","\t\twriteOnce: true","","\t},","","","\t/**","\t* Number indicating the time (in milliseconds) that should expire before a","\t* submenu is hidden when the user mouses out of it.","\t*","\t* @attribute mouseOutHideDelay","\t* @readOnly","\t* @writeOnce","\t* @default 750","\t* @type Number","\t*/","\tmouseOutHideDelay: {","","\t\tvalue: 750,","\t\twriteOnce: true","","\t}","","};","","","Y.extend(NodeMenuNav, Y.Plugin.Base, {","","\t//\tProtected properties","","\t/**","\t* @property _rootMenu","\t* @description Node instance representing the root menu in the menu.","\t* @default null","\t* @protected","\t* @type Node","\t*/","\t_rootMenu: null,","","","\t/**","\t* @property _activeItem","\t* @description Node instance representing the menu's active descendent:","\t* the menuitem or menu label the user is currently interacting with.","\t* @default null","\t* @protected","\t* @type Node","\t*/","\t_activeItem: null,","","","\t/**","\t* @property _activeMenu","\t* @description Node instance representing the menu that is the parent of","\t* the menu's active descendent.","\t* @default null","\t* @protected","\t* @type Node","\t*/","\t_activeMenu: null,","","","\t/**","\t* @property _hasFocus","\t* @description Boolean indicating if the menu has focus.","\t* @default false","\t* @protected","\t* @type Boolean","\t*/","\t_hasFocus: false,","","","\t//\tIn gecko-based browsers a mouseover and mouseout event will fire even","\t//\tif a DOM element moves out from under the mouse without the user","\t//\tactually moving the mouse. This bug affects NodeMenuNav because the","\t//\tuser can hit the Esc key to hide a menu, and if the mouse is over the","\t//\tmenu when the user presses Esc, the _onMenuMouseOut handler will be","\t//\tcalled. To fix this bug the following flag (_blockMouseEvent) is used","\t// to block the code in the _onMenuMouseOut handler from executing.","","\t/**","\t* @property _blockMouseEvent","\t* @description Boolean indicating whether or not to handle the","\t* \"mouseover\" event.","\t* @default false","\t* @protected","\t* @type Boolean","\t*/","\t_blockMouseEvent: false,","","","\t/**","\t* @property _currentMouseX","\t* @description Number representing the current x coordinate of the mouse","\t* inside the menu.","\t* @default 0","\t* @protected","\t* @type Number","\t*/","\t_currentMouseX: 0,","","","\t/**","\t* @property _movingToSubmenu","\t* @description Boolean indicating if the mouse is moving from a menu","\t* label to its corresponding submenu.","\t* @default false","\t* @protected","\t* @type Boolean","\t*/","\t_movingToSubmenu: false,","","","\t/**","\t* @property _showSubmenuTimer","\t* @description Timer used to show a submenu.","\t* @default null","\t* @protected","\t* @type Object","\t*/","\t_showSubmenuTimer: null,","","","\t/**","\t* @property _hideSubmenuTimer","\t* @description Timer used to hide a submenu.","\t* @default null","\t* @protected","\t* @type Object","\t*/","\t_hideSubmenuTimer: null,","","","\t/**","\t* @property _hideAllSubmenusTimer","\t* @description Timer used to hide a all submenus.","\t* @default null","\t* @protected","\t* @type Object","\t*/","\t_hideAllSubmenusTimer: null,","","","\t/**","\t* @property _firstItem","\t* @description Node instance representing the first item (menuitem or menu","\t* label) in the root menu of a menu.","\t* @default null","\t* @protected","\t* @type Node","\t*/","\t_firstItem: null,","","","\t//\tPublic methods","",""," initializer: function (config) {","","\t\tvar menuNav = this,","\t\t\toRootMenu = this.get(HOST),","\t\t\taHandlers = [],","\t\t\toDoc;","","","\t\tif (oRootMenu) {","","\t\t\tmenuNav._rootMenu = oRootMenu;","","\t\t\toRootMenu.all(\"ul:first-child\").addClass(FIRST_OF_TYPE);","","\t\t\t//\tHide all visible submenus","","\t\t\toRootMenu.all(MENU_SELECTOR).addClass(CSS_MENU_HIDDEN);","","","\t\t\t//\tWire up all event handlers","","\t\t\taHandlers.push(oRootMenu.on(\"mouseover\", menuNav._onMouseOver, menuNav));","\t\t\taHandlers.push(oRootMenu.on(\"mouseout\", menuNav._onMouseOut, menuNav));","\t\t\taHandlers.push(oRootMenu.on(\"mousemove\", menuNav._onMouseMove, menuNav));","\t\t\taHandlers.push(oRootMenu.on(MOUSEDOWN, menuNav._toggleSubmenuDisplay, menuNav));","\t\t\taHandlers.push(Y.on(\"key\", menuNav._toggleSubmenuDisplay, oRootMenu, \"down:13\", menuNav));","\t\t\taHandlers.push(oRootMenu.on(CLICK, menuNav._toggleSubmenuDisplay, menuNav));","\t\t\taHandlers.push(oRootMenu.on(\"keypress\", menuNav._onKeyPress, menuNav));","\t\t\taHandlers.push(oRootMenu.on(KEYDOWN, menuNav._onKeyDown, menuNav));","","\t\t\toDoc = oRootMenu.get(\"ownerDocument\");","","\t\t aHandlers.push(oDoc.on(MOUSEDOWN, menuNav._onDocMouseDown, menuNav));","\t\t\taHandlers.push(oDoc.on(\"focus\", menuNav._onDocFocus, menuNav));","","\t\t\tthis._eventHandlers = aHandlers;","","\t\t\tmenuNav._initFocusManager();","","\t\t}","",""," },","","\tdestructor: function () {","","\t\tvar aHandlers = this._eventHandlers;","","\t\tif (aHandlers) {","","\t\t\tY.Array.each(aHandlers, function (handle) {","\t\t\t\thandle.detach();","\t\t\t});","","\t\t\tthis._eventHandlers = null;","","\t\t}","","\t\tthis.get(HOST).unplug(\"focusManager\");",""," },","","","","\t//\tProtected methods","","\t/**","\t* @method _isRoot","\t* @description Returns a boolean indicating if the specified menu is the","\t* root menu in the menu.","\t* @protected","\t* @param {Node} menu Node instance representing a menu.","\t* @return {Boolean} Boolean indicating if the specified menu is the root","\t* menu in the menu.","\t*/","\t_isRoot: function (menu) {","","\t\treturn this._rootMenu.compareTo(menu);","","\t},","","","\t/**","\t* @method _getTopmostSubmenu","\t* @description Returns the topmost submenu of a submenu hierarchy.","\t* @protected","\t* @param {Node} menu Node instance representing a menu.","\t* @return {Node} Node instance representing a menu.","\t*/","\t_getTopmostSubmenu: function (menu) {","","\t\tvar menuNav = this,","\t\t\toMenu = getParentMenu(menu),","\t\t\treturnVal;","","","\t\tif (!oMenu) {","\t\t\treturnVal = menu;","\t\t}","\t\telse if (menuNav._isRoot(oMenu)) {","\t\t\treturnVal = menu;","\t\t}","\t\telse {","\t\t\treturnVal = menuNav._getTopmostSubmenu(oMenu);","\t\t}","","\t\treturn returnVal;","","\t},","","","\t/**","\t* @method _clearActiveItem","\t* @description Clears the menu's active descendent.","\t* @protected","\t*/","\t_clearActiveItem: function () {","","\t\tvar menuNav = this,","\t\t\toActiveItem = menuNav._activeItem;","","\t\tif (oActiveItem) {","\t\t\toActiveItem.removeClass(getActiveClass(oActiveItem));","\t\t}","","\t\tmenuNav._activeItem = null;","","\t},","","","\t/**","\t* @method _setActiveItem","\t* @description Sets the specified menuitem or menu label as the menu's","\t* active descendent.","\t* @protected","\t* @param {Node} item Node instance representing a menuitem or menu label.","\t*/","\t_setActiveItem: function (item) {","","\t\tvar menuNav = this;","","\t\tif (item) {","","\t\t\tmenuNav._clearActiveItem();","","\t\t\titem.addClass(getActiveClass(item));","","\t\t\tmenuNav._activeItem = item;","","\t\t}","","\t},","","","\t/**","\t* @method _focusItem","\t* @description Focuses the specified menuitem or menu label.","\t* @protected","\t* @param {Node} item Node instance representing a menuitem or menu label.","\t*/","\t_focusItem: function (item) {","","\t\tvar menuNav = this,","\t\t\toMenu,","\t\t\toItem;","","\t\tif (item && menuNav._hasFocus) {","","\t\t\toMenu = getParentMenu(item);","\t\t\toItem = getItemAnchor(item);","","\t\t\tif (oMenu && !oMenu.compareTo(menuNav._activeMenu)) {","\t\t\t\tmenuNav._activeMenu = oMenu;","\t\t\t\tmenuNav._initFocusManager();","\t\t\t}","","\t\t\tmenuNav._focusManager.focus(oItem);","","\t\t}","","\t},","","","\t/**","\t* @method _showMenu","\t* @description Shows the specified menu.","\t* @protected","\t* @param {Node} menu Node instance representing a menu.","\t*/","\t_showMenu: function (menu) {","","\t\tvar oParentMenu = getParentMenu(menu),","\t\t\toLI = menu.get(PARENT_NODE),","\t\t\taXY = oLI.getXY();","","","\t\tif (this.get(USE_ARIA)) {","\t\t\tmenu.set(ARIA_HIDDEN, false);","\t\t}","","","\t\tif (isHorizontalMenu(oParentMenu)) {","\t\t\taXY[1] = aXY[1] + oLI.get(OFFSET_HEIGHT);","\t\t}","\t\telse {","\t\t\taXY[0] = aXY[0] + oLI.get(OFFSET_WIDTH);","\t\t}","","\t\tmenu.setXY(aXY);","","\t\tif (UA.ie && UA.ie < 8) {","","\t\t\tif (UA.ie === 6 && !menu.hasIFrameShim) {","","\t\t\t\tmenu.appendChild(Y.Node.create(NodeMenuNav.SHIM_TEMPLATE));","\t\t\t\tmenu.hasIFrameShim = true;","","\t\t\t}","","\t\t\t//\tClear previous values for height and width","","\t\t\tmenu.setStyles({ height: EMPTY_STRING, width: EMPTY_STRING });","","\t\t\t//\tSet the width and height of the menu's bounding box - this is","\t\t\t//\tnecessary for IE 6 so that the CSS for the ';__cov_uXsvbG6iHwlIdkz5gTULFg.s['72']++;NodeMenuNav.ATTRS={useARIA:{value:true,writeOnce:true,lazyAdd:false,setter:function(value){__cov_uXsvbG6iHwlIdkz5gTULFg.f['21']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['73']++;var oMenu=this.get(HOST),oMenuLabel,oMenuToggle,oSubmenu,sID;__cov_uXsvbG6iHwlIdkz5gTULFg.s['74']++;if(value){__cov_uXsvbG6iHwlIdkz5gTULFg.b['18'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['75']++;oMenu.set(ROLE,MENU);__cov_uXsvbG6iHwlIdkz5gTULFg.s['76']++;oMenu.all('ul,li,'+MENU_CONTENT_SELECTOR).set(ROLE,PRESENTATION);__cov_uXsvbG6iHwlIdkz5gTULFg.s['77']++;oMenu.all(PERIOD+getClassName(MENUITEM,CONTENT)).set(ROLE,MENUITEM);__cov_uXsvbG6iHwlIdkz5gTULFg.s['78']++;oMenu.all(PERIOD+CSS_MENU_LABEL).each(function(node){__cov_uXsvbG6iHwlIdkz5gTULFg.f['22']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['79']++;oMenuLabel=node;__cov_uXsvbG6iHwlIdkz5gTULFg.s['80']++;oMenuToggle=node.one(MENU_TOGGLE_SELECTOR);__cov_uXsvbG6iHwlIdkz5gTULFg.s['81']++;if(oMenuToggle){__cov_uXsvbG6iHwlIdkz5gTULFg.b['19'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['82']++;oMenuToggle.set(ROLE,PRESENTATION);__cov_uXsvbG6iHwlIdkz5gTULFg.s['83']++;oMenuLabel=oMenuToggle.previous();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['19'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['84']++;oMenuLabel.set(ROLE,MENUITEM);__cov_uXsvbG6iHwlIdkz5gTULFg.s['85']++;oMenuLabel.set('aria-haspopup',true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['86']++;oSubmenu=node.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['87']++;if(oSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['20'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['88']++;oSubmenu.set(ROLE,MENU);__cov_uXsvbG6iHwlIdkz5gTULFg.s['89']++;oMenuLabel=oSubmenu.previous();__cov_uXsvbG6iHwlIdkz5gTULFg.s['90']++;oMenuToggle=oMenuLabel.one(MENU_TOGGLE_SELECTOR);__cov_uXsvbG6iHwlIdkz5gTULFg.s['91']++;if(oMenuToggle){__cov_uXsvbG6iHwlIdkz5gTULFg.b['21'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['92']++;oMenuLabel=oMenuToggle;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['21'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['93']++;sID=Y.stamp(oMenuLabel);__cov_uXsvbG6iHwlIdkz5gTULFg.s['94']++;if(!oMenuLabel.get(ID)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['22'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['95']++;oMenuLabel.set(ID,sID);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['22'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['96']++;oSubmenu.set('aria-labelledby',sID);__cov_uXsvbG6iHwlIdkz5gTULFg.s['97']++;oSubmenu.set(ARIA_HIDDEN,true);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['20'][1]++;}});}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['18'][1]++;}}},autoSubmenuDisplay:{value:true,writeOnce:true},submenuShowDelay:{value:250,writeOnce:true},submenuHideDelay:{value:250,writeOnce:true},mouseOutHideDelay:{value:750,writeOnce:true}};__cov_uXsvbG6iHwlIdkz5gTULFg.s['98']++;Y.extend(NodeMenuNav,Y.Plugin.Base,{_rootMenu:null,_activeItem:null,_activeMenu:null,_hasFocus:false,_blockMouseEvent:false,_currentMouseX:0,_movingToSubmenu:false,_showSubmenuTimer:null,_hideSubmenuTimer:null,_hideAllSubmenusTimer:null,_firstItem:null,initializer:function(config){__cov_uXsvbG6iHwlIdkz5gTULFg.f['23']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['99']++;var menuNav=this,oRootMenu=this.get(HOST),aHandlers=[],oDoc;__cov_uXsvbG6iHwlIdkz5gTULFg.s['100']++;if(oRootMenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['23'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['101']++;menuNav._rootMenu=oRootMenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['102']++;oRootMenu.all('ul:first-child').addClass(FIRST_OF_TYPE);__cov_uXsvbG6iHwlIdkz5gTULFg.s['103']++;oRootMenu.all(MENU_SELECTOR).addClass(CSS_MENU_HIDDEN);__cov_uXsvbG6iHwlIdkz5gTULFg.s['104']++;aHandlers.push(oRootMenu.on('mouseover',menuNav._onMouseOver,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['105']++;aHandlers.push(oRootMenu.on('mouseout',menuNav._onMouseOut,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['106']++;aHandlers.push(oRootMenu.on('mousemove',menuNav._onMouseMove,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['107']++;aHandlers.push(oRootMenu.on(MOUSEDOWN,menuNav._toggleSubmenuDisplay,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['108']++;aHandlers.push(Y.on('key',menuNav._toggleSubmenuDisplay,oRootMenu,'down:13',menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['109']++;aHandlers.push(oRootMenu.on(CLICK,menuNav._toggleSubmenuDisplay,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['110']++;aHandlers.push(oRootMenu.on('keypress',menuNav._onKeyPress,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['111']++;aHandlers.push(oRootMenu.on(KEYDOWN,menuNav._onKeyDown,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['112']++;oDoc=oRootMenu.get('ownerDocument');__cov_uXsvbG6iHwlIdkz5gTULFg.s['113']++;aHandlers.push(oDoc.on(MOUSEDOWN,menuNav._onDocMouseDown,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['114']++;aHandlers.push(oDoc.on('focus',menuNav._onDocFocus,menuNav));__cov_uXsvbG6iHwlIdkz5gTULFg.s['115']++;this._eventHandlers=aHandlers;__cov_uXsvbG6iHwlIdkz5gTULFg.s['116']++;menuNav._initFocusManager();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['23'][1]++;}},destructor:function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['24']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['117']++;var aHandlers=this._eventHandlers;__cov_uXsvbG6iHwlIdkz5gTULFg.s['118']++;if(aHandlers){__cov_uXsvbG6iHwlIdkz5gTULFg.b['24'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['119']++;Y.Array.each(aHandlers,function(handle){__cov_uXsvbG6iHwlIdkz5gTULFg.f['25']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['120']++;handle.detach();});__cov_uXsvbG6iHwlIdkz5gTULFg.s['121']++;this._eventHandlers=null;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['24'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['122']++;this.get(HOST).unplug('focusManager');},_isRoot:function(menu){__cov_uXsvbG6iHwlIdkz5gTULFg.f['26']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['123']++;return this._rootMenu.compareTo(menu);},_getTopmostSubmenu:function(menu){__cov_uXsvbG6iHwlIdkz5gTULFg.f['27']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['124']++;var menuNav=this,oMenu=getParentMenu(menu),returnVal;__cov_uXsvbG6iHwlIdkz5gTULFg.s['125']++;if(!oMenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['25'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['126']++;returnVal=menu;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['25'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['127']++;if(menuNav._isRoot(oMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['26'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['128']++;returnVal=menu;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['26'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['129']++;returnVal=menuNav._getTopmostSubmenu(oMenu);}}__cov_uXsvbG6iHwlIdkz5gTULFg.s['130']++;return returnVal;},_clearActiveItem:function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['28']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['131']++;var menuNav=this,oActiveItem=menuNav._activeItem;__cov_uXsvbG6iHwlIdkz5gTULFg.s['132']++;if(oActiveItem){__cov_uXsvbG6iHwlIdkz5gTULFg.b['27'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['133']++;oActiveItem.removeClass(getActiveClass(oActiveItem));}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['27'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['134']++;menuNav._activeItem=null;},_setActiveItem:function(item){__cov_uXsvbG6iHwlIdkz5gTULFg.f['29']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['135']++;var menuNav=this;__cov_uXsvbG6iHwlIdkz5gTULFg.s['136']++;if(item){__cov_uXsvbG6iHwlIdkz5gTULFg.b['28'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['137']++;menuNav._clearActiveItem();__cov_uXsvbG6iHwlIdkz5gTULFg.s['138']++;item.addClass(getActiveClass(item));__cov_uXsvbG6iHwlIdkz5gTULFg.s['139']++;menuNav._activeItem=item;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['28'][1]++;}},_focusItem:function(item){__cov_uXsvbG6iHwlIdkz5gTULFg.f['30']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['140']++;var menuNav=this,oMenu,oItem;__cov_uXsvbG6iHwlIdkz5gTULFg.s['141']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['30'][0]++,item)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['30'][1]++,menuNav._hasFocus)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['29'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['142']++;oMenu=getParentMenu(item);__cov_uXsvbG6iHwlIdkz5gTULFg.s['143']++;oItem=getItemAnchor(item);__cov_uXsvbG6iHwlIdkz5gTULFg.s['144']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['32'][0]++,oMenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['32'][1]++,!oMenu.compareTo(menuNav._activeMenu))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['31'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['145']++;menuNav._activeMenu=oMenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['146']++;menuNav._initFocusManager();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['31'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['147']++;menuNav._focusManager.focus(oItem);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['29'][1]++;}},_showMenu:function(menu){__cov_uXsvbG6iHwlIdkz5gTULFg.f['31']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['148']++;var oParentMenu=getParentMenu(menu),oLI=menu.get(PARENT_NODE),aXY=oLI.getXY();__cov_uXsvbG6iHwlIdkz5gTULFg.s['149']++;if(this.get(USE_ARIA)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['33'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['150']++;menu.set(ARIA_HIDDEN,false);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['33'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['151']++;if(isHorizontalMenu(oParentMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['34'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['152']++;aXY[1]=aXY[1]+oLI.get(OFFSET_HEIGHT);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['34'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['153']++;aXY[0]=aXY[0]+oLI.get(OFFSET_WIDTH);}__cov_uXsvbG6iHwlIdkz5gTULFg.s['154']++;menu.setXY(aXY);__cov_uXsvbG6iHwlIdkz5gTULFg.s['155']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['36'][0]++,UA.ie)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['36'][1]++,UA.ie<8)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['35'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['156']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['38'][0]++,UA.ie===6)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['38'][1]++,!menu.hasIFrameShim)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['37'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['157']++;menu.appendChild(Y.Node.create(NodeMenuNav.SHIM_TEMPLATE));__cov_uXsvbG6iHwlIdkz5gTULFg.s['158']++;menu.hasIFrameShim=true;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['37'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['159']++;menu.setStyles({height:EMPTY_STRING,width:EMPTY_STRING});__cov_uXsvbG6iHwlIdkz5gTULFg.s['160']++;menu.setStyles({height:menu.get(OFFSET_HEIGHT)+PX,width:menu.get(OFFSET_WIDTH)+PX});}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['35'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['161']++;menu.previous().addClass(CSS_MENU_LABEL_MENUVISIBLE);__cov_uXsvbG6iHwlIdkz5gTULFg.s['162']++;menu.removeClass(CSS_MENU_HIDDEN);},_hideMenu:function(menu,activateAndFocusLabel){__cov_uXsvbG6iHwlIdkz5gTULFg.f['32']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['163']++;var menuNav=this,oLabel=menu.previous(),oActiveItem;__cov_uXsvbG6iHwlIdkz5gTULFg.s['164']++;oLabel.removeClass(CSS_MENU_LABEL_MENUVISIBLE);__cov_uXsvbG6iHwlIdkz5gTULFg.s['165']++;if(activateAndFocusLabel){__cov_uXsvbG6iHwlIdkz5gTULFg.b['39'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['166']++;menuNav._focusItem(oLabel);__cov_uXsvbG6iHwlIdkz5gTULFg.s['167']++;menuNav._setActiveItem(oLabel);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['39'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['168']++;oActiveItem=menu.one(PERIOD+CSS_MENUITEM_ACTIVE);__cov_uXsvbG6iHwlIdkz5gTULFg.s['169']++;if(oActiveItem){__cov_uXsvbG6iHwlIdkz5gTULFg.b['40'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['170']++;oActiveItem.removeClass(CSS_MENUITEM_ACTIVE);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['40'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['171']++;menu.setStyles({left:EMPTY_STRING,top:EMPTY_STRING});__cov_uXsvbG6iHwlIdkz5gTULFg.s['172']++;menu.addClass(CSS_MENU_HIDDEN);__cov_uXsvbG6iHwlIdkz5gTULFg.s['173']++;if(menuNav.get(USE_ARIA)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['41'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['174']++;menu.set(ARIA_HIDDEN,true);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['41'][1]++;}},_hideAllSubmenus:function(menu){__cov_uXsvbG6iHwlIdkz5gTULFg.f['33']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['175']++;var menuNav=this;__cov_uXsvbG6iHwlIdkz5gTULFg.s['176']++;menu.all(MENU_SELECTOR).each(Y.bind(function(submenuNode){__cov_uXsvbG6iHwlIdkz5gTULFg.f['34']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['177']++;menuNav._hideMenu(submenuNode);},menuNav));},_cancelShowSubmenuTimer:function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['35']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['178']++;var menuNav=this,oShowSubmenuTimer=menuNav._showSubmenuTimer;__cov_uXsvbG6iHwlIdkz5gTULFg.s['179']++;if(oShowSubmenuTimer){__cov_uXsvbG6iHwlIdkz5gTULFg.b['42'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['180']++;oShowSubmenuTimer.cancel();__cov_uXsvbG6iHwlIdkz5gTULFg.s['181']++;menuNav._showSubmenuTimer=null;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['42'][1]++;}},_cancelHideSubmenuTimer:function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['36']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['182']++;var menuNav=this,oHideSubmenuTimer=menuNav._hideSubmenuTimer;__cov_uXsvbG6iHwlIdkz5gTULFg.s['183']++;if(oHideSubmenuTimer){__cov_uXsvbG6iHwlIdkz5gTULFg.b['43'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['184']++;oHideSubmenuTimer.cancel();__cov_uXsvbG6iHwlIdkz5gTULFg.s['185']++;menuNav._hideSubmenuTimer=null;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['43'][1]++;}},_initFocusManager:function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['37']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['186']++;var menuNav=this,oRootMenu=menuNav._rootMenu,oMenu=(__cov_uXsvbG6iHwlIdkz5gTULFg.b['44'][0]++,menuNav._activeMenu)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['44'][1]++,oRootMenu),sSelectorBase=menuNav._isRoot(oMenu)?(__cov_uXsvbG6iHwlIdkz5gTULFg.b['45'][0]++,EMPTY_STRING):(__cov_uXsvbG6iHwlIdkz5gTULFg.b['45'][1]++,'#'+oMenu.get('id')),oFocusManager=menuNav._focusManager,sKeysVal,sDescendantSelector,sQuery;__cov_uXsvbG6iHwlIdkz5gTULFg.s['187']++;if(isHorizontalMenu(oMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['46'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['188']++;sDescendantSelector=sSelectorBase+STANDARD_QUERY+','+sSelectorBase+EXTENDED_QUERY;__cov_uXsvbG6iHwlIdkz5gTULFg.s['189']++;sKeysVal={next:'down:39',previous:'down:37'};}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['46'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['190']++;sDescendantSelector=sSelectorBase+STANDARD_QUERY;__cov_uXsvbG6iHwlIdkz5gTULFg.s['191']++;sKeysVal={next:'down:40',previous:'down:38'};}__cov_uXsvbG6iHwlIdkz5gTULFg.s['192']++;if(!oFocusManager){__cov_uXsvbG6iHwlIdkz5gTULFg.b['47'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['193']++;oRootMenu.plug(Y.Plugin.NodeFocusManager,{descendants:sDescendantSelector,keys:sKeysVal,circular:true});__cov_uXsvbG6iHwlIdkz5gTULFg.s['194']++;oFocusManager=oRootMenu.focusManager;__cov_uXsvbG6iHwlIdkz5gTULFg.s['195']++;sQuery='#'+oRootMenu.get('id')+MENU_SELECTOR+' a,'+MENU_TOGGLE_SELECTOR;__cov_uXsvbG6iHwlIdkz5gTULFg.s['196']++;oRootMenu.all(sQuery).set('tabIndex',-1);__cov_uXsvbG6iHwlIdkz5gTULFg.s['197']++;oFocusManager.on(ACTIVE_DESCENDANT_CHANGE,this._onActiveDescendantChange,oFocusManager,this);__cov_uXsvbG6iHwlIdkz5gTULFg.s['198']++;oFocusManager.after(ACTIVE_DESCENDANT_CHANGE,this._afterActiveDescendantChange,oFocusManager,this);__cov_uXsvbG6iHwlIdkz5gTULFg.s['199']++;menuNav._focusManager=oFocusManager;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['47'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['200']++;oFocusManager.set(ACTIVE_DESCENDANT,-1);__cov_uXsvbG6iHwlIdkz5gTULFg.s['201']++;oFocusManager.set(DESCENDANTS,sDescendantSelector);__cov_uXsvbG6iHwlIdkz5gTULFg.s['202']++;oFocusManager.set('keys',sKeysVal);}},_onActiveDescendantChange:function(event,menuNav){__cov_uXsvbG6iHwlIdkz5gTULFg.f['38']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['203']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['49'][0]++,event.src===UI)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['49'][1]++,menuNav._activeMenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['49'][2]++,!menuNav._movingToSubmenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['48'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['204']++;menuNav._hideAllSubmenus(menuNav._activeMenu);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['48'][1]++;}},_afterActiveDescendantChange:function(event,menuNav){__cov_uXsvbG6iHwlIdkz5gTULFg.f['39']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['205']++;var oItem;__cov_uXsvbG6iHwlIdkz5gTULFg.s['206']++;if(event.src===UI){__cov_uXsvbG6iHwlIdkz5gTULFg.b['50'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['207']++;oItem=getItem(this.get(DESCENDANTS).item(event.newVal),true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['208']++;menuNav._setActiveItem(oItem);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['50'][1]++;}},_onDocFocus:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['40']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['209']++;var menuNav=this,oActiveItem=menuNav._activeItem,oTarget=event.target,oMenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['210']++;if(menuNav._rootMenu.contains(oTarget)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['51'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['211']++;if(menuNav._hasFocus){__cov_uXsvbG6iHwlIdkz5gTULFg.b['52'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['212']++;oMenu=getParentMenu(oTarget);__cov_uXsvbG6iHwlIdkz5gTULFg.s['213']++;if(!menuNav._activeMenu.compareTo(oMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['53'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['214']++;menuNav._activeMenu=oMenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['215']++;menuNav._initFocusManager();__cov_uXsvbG6iHwlIdkz5gTULFg.s['216']++;menuNav._focusManager.set(ACTIVE_DESCENDANT,oTarget);__cov_uXsvbG6iHwlIdkz5gTULFg.s['217']++;menuNav._setActiveItem(getItem(oTarget,true));}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['53'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['52'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['218']++;menuNav._hasFocus=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['219']++;oActiveItem=getItem(oTarget,true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['220']++;if(oActiveItem){__cov_uXsvbG6iHwlIdkz5gTULFg.b['54'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['221']++;menuNav._setActiveItem(oActiveItem);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['54'][1]++;}}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['51'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['222']++;menuNav._clearActiveItem();__cov_uXsvbG6iHwlIdkz5gTULFg.s['223']++;menuNav._cancelShowSubmenuTimer();__cov_uXsvbG6iHwlIdkz5gTULFg.s['224']++;menuNav._hideAllSubmenus(menuNav._rootMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['225']++;menuNav._activeMenu=menuNav._rootMenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['226']++;menuNav._initFocusManager();__cov_uXsvbG6iHwlIdkz5gTULFg.s['227']++;menuNav._focusManager.set(ACTIVE_DESCENDANT,0);__cov_uXsvbG6iHwlIdkz5gTULFg.s['228']++;menuNav._hasFocus=false;}},_onMenuMouseOver:function(menu,event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['41']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['229']++;var menuNav=this,oHideAllSubmenusTimer=menuNav._hideAllSubmenusTimer;__cov_uXsvbG6iHwlIdkz5gTULFg.s['230']++;if(oHideAllSubmenusTimer){__cov_uXsvbG6iHwlIdkz5gTULFg.b['55'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['231']++;oHideAllSubmenusTimer.cancel();__cov_uXsvbG6iHwlIdkz5gTULFg.s['232']++;menuNav._hideAllSubmenusTimer=null;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['55'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['233']++;menuNav._cancelHideSubmenuTimer();__cov_uXsvbG6iHwlIdkz5gTULFg.s['234']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['57'][0]++,menu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['57'][1]++,!menu.compareTo(menuNav._activeMenu))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['56'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['235']++;menuNav._activeMenu=menu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['236']++;if(menuNav._hasFocus){__cov_uXsvbG6iHwlIdkz5gTULFg.b['58'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['237']++;menuNav._initFocusManager();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['58'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['56'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['238']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['60'][0]++,menuNav._movingToSubmenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['60'][1]++,isHorizontalMenu(menu))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['59'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['239']++;menuNav._movingToSubmenu=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['59'][1]++;}},_hideAndFocusLabel:function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['42']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['240']++;var menuNav=this,oActiveMenu=menuNav._activeMenu,oSubmenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['241']++;menuNav._hideAllSubmenus(menuNav._rootMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['242']++;if(oActiveMenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['61'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['243']++;oSubmenu=menuNav._getTopmostSubmenu(oActiveMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['244']++;menuNav._focusItem(oSubmenu.previous());}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['61'][1]++;}},_onMenuMouseOut:function(menu,event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['43']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['245']++;var menuNav=this,oActiveMenu=menuNav._activeMenu,oRelatedTarget=event.relatedTarget,oActiveItem=menuNav._activeItem,oParentMenu,oMenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['246']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['63'][0]++,oActiveMenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['63'][1]++,!oActiveMenu.contains(oRelatedTarget))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['62'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['247']++;oParentMenu=getParentMenu(oActiveMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['248']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['65'][0]++,oParentMenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['65'][1]++,!oParentMenu.contains(oRelatedTarget))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['64'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['249']++;if(menuNav.get(MOUSEOUT_HIDE_DELAY)>0){__cov_uXsvbG6iHwlIdkz5gTULFg.b['66'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['250']++;menuNav._cancelShowSubmenuTimer();__cov_uXsvbG6iHwlIdkz5gTULFg.s['251']++;menuNav._hideAllSubmenusTimer=later(menuNav.get(MOUSEOUT_HIDE_DELAY),menuNav,menuNav._hideAndFocusLabel);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['66'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['64'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['252']++;if(oActiveItem){__cov_uXsvbG6iHwlIdkz5gTULFg.b['67'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['253']++;oMenu=getParentMenu(oActiveItem);__cov_uXsvbG6iHwlIdkz5gTULFg.s['254']++;if(!menuNav._isRoot(oMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['68'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['255']++;menuNav._focusItem(oMenu.previous());}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['68'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['67'][1]++;}}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['62'][1]++;}},_onMenuLabelMouseOver:function(menuLabel,event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['44']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['256']++;var menuNav=this,oActiveMenu=menuNav._activeMenu,bIsRoot=menuNav._isRoot(oActiveMenu),bUseAutoSubmenuDisplay=(__cov_uXsvbG6iHwlIdkz5gTULFg.b['69'][0]++,menuNav.get(AUTO_SUBMENU_DISPLAY))&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['69'][1]++,bIsRoot)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['69'][2]++,!bIsRoot),submenuShowDelay=menuNav.get('submenuShowDelay'),oSubmenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['257']++;var showSubmenu=function(delay){__cov_uXsvbG6iHwlIdkz5gTULFg.f['45']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['258']++;menuNav._cancelHideSubmenuTimer();__cov_uXsvbG6iHwlIdkz5gTULFg.s['259']++;menuNav._cancelShowSubmenuTimer();__cov_uXsvbG6iHwlIdkz5gTULFg.s['260']++;if(!hasVisibleSubmenu(menuLabel)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['70'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['261']++;oSubmenu=menuLabel.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['262']++;if(oSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['71'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['263']++;menuNav._hideAllSubmenus(oActiveMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['264']++;menuNav._showSubmenuTimer=later(delay,menuNav,menuNav._showMenu,oSubmenu);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['71'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['70'][1]++;}};__cov_uXsvbG6iHwlIdkz5gTULFg.s['265']++;menuNav._focusItem(menuLabel);__cov_uXsvbG6iHwlIdkz5gTULFg.s['266']++;menuNav._setActiveItem(menuLabel);__cov_uXsvbG6iHwlIdkz5gTULFg.s['267']++;if(bUseAutoSubmenuDisplay){__cov_uXsvbG6iHwlIdkz5gTULFg.b['72'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['268']++;if(menuNav._movingToSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['73'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['269']++;menuNav._hoverTimer=later(submenuShowDelay,menuNav,function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['46']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['270']++;showSubmenu(0);});}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['73'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['271']++;showSubmenu(submenuShowDelay);}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['72'][1]++;}},_onMenuLabelMouseOut:function(menuLabel,event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['47']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['272']++;var menuNav=this,bIsRoot=menuNav._isRoot(menuNav._activeMenu),bUseAutoSubmenuDisplay=(__cov_uXsvbG6iHwlIdkz5gTULFg.b['74'][0]++,menuNav.get(AUTO_SUBMENU_DISPLAY))&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['74'][1]++,bIsRoot)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['74'][2]++,!bIsRoot),oRelatedTarget=event.relatedTarget,oSubmenu=menuLabel.next(),hoverTimer=menuNav._hoverTimer;__cov_uXsvbG6iHwlIdkz5gTULFg.s['273']++;if(hoverTimer){__cov_uXsvbG6iHwlIdkz5gTULFg.b['75'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['274']++;hoverTimer.cancel();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['75'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['275']++;menuNav._clearActiveItem();__cov_uXsvbG6iHwlIdkz5gTULFg.s['276']++;if(bUseAutoSubmenuDisplay){__cov_uXsvbG6iHwlIdkz5gTULFg.b['76'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['277']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['78'][0]++,menuNav._movingToSubmenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['78'][1]++,!menuNav._showSubmenuTimer)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['78'][2]++,oSubmenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['77'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['278']++;menuNav._hideSubmenuTimer=later(menuNav.get('submenuHideDelay'),menuNav,menuNav._hideMenu,oSubmenu);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['77'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['279']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['80'][0]++,!menuNav._movingToSubmenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['80'][1]++,oSubmenu)&&((__cov_uXsvbG6iHwlIdkz5gTULFg.b['80'][2]++,!oRelatedTarget)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['80'][3]++,oRelatedTarget)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['80'][4]++,!oSubmenu.contains(oRelatedTarget))&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['80'][5]++,!oRelatedTarget.compareTo(oSubmenu)))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['79'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['280']++;menuNav._cancelShowSubmenuTimer();__cov_uXsvbG6iHwlIdkz5gTULFg.s['281']++;menuNav._hideMenu(oSubmenu);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['79'][1]++;}}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['76'][1]++;}},_onMenuItemMouseOver:function(menuItem,event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['48']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['282']++;var menuNav=this,oActiveMenu=menuNav._activeMenu,bIsRoot=menuNav._isRoot(oActiveMenu),bUseAutoSubmenuDisplay=(__cov_uXsvbG6iHwlIdkz5gTULFg.b['81'][0]++,menuNav.get(AUTO_SUBMENU_DISPLAY))&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['81'][1]++,bIsRoot)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['81'][2]++,!bIsRoot);__cov_uXsvbG6iHwlIdkz5gTULFg.s['283']++;menuNav._focusItem(menuItem);__cov_uXsvbG6iHwlIdkz5gTULFg.s['284']++;menuNav._setActiveItem(menuItem);__cov_uXsvbG6iHwlIdkz5gTULFg.s['285']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['83'][0]++,bUseAutoSubmenuDisplay)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['83'][1]++,!menuNav._movingToSubmenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['82'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['286']++;menuNav._hideAllSubmenus(oActiveMenu);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['82'][1]++;}},_onMenuItemMouseOut:function(menuItem,event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['49']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['287']++;this._clearActiveItem();},_onVerticalMenuKeyDown:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['50']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['288']++;var menuNav=this,oActiveMenu=menuNav._activeMenu,oRootMenu=menuNav._rootMenu,oTarget=event.target,bPreventDefault=false,nKeyCode=event.keyCode,oSubmenu,oParentMenu,oLI,oItem;__cov_uXsvbG6iHwlIdkz5gTULFg.s['289']++;switch(nKeyCode){case 37:__cov_uXsvbG6iHwlIdkz5gTULFg.b['84'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['290']++;oParentMenu=getParentMenu(oActiveMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['291']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['86'][0]++,oParentMenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['86'][1]++,isHorizontalMenu(oParentMenu))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['85'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['292']++;menuNav._hideMenu(oActiveMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['293']++;oLI=getPreviousSibling(oActiveMenu.get(PARENT_NODE));__cov_uXsvbG6iHwlIdkz5gTULFg.s['294']++;oItem=getItem(oLI);__cov_uXsvbG6iHwlIdkz5gTULFg.s['295']++;if(oItem){__cov_uXsvbG6iHwlIdkz5gTULFg.b['87'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['296']++;if(isMenuLabel(oItem)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['88'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['297']++;oSubmenu=oItem.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['298']++;if(oSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['89'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['299']++;menuNav._showMenu(oSubmenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['300']++;menuNav._focusItem(getFirstItem(oSubmenu));__cov_uXsvbG6iHwlIdkz5gTULFg.s['301']++;menuNav._setActiveItem(getFirstItem(oSubmenu));}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['89'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['302']++;menuNav._focusItem(oItem);__cov_uXsvbG6iHwlIdkz5gTULFg.s['303']++;menuNav._setActiveItem(oItem);}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['88'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['304']++;menuNav._focusItem(oItem);__cov_uXsvbG6iHwlIdkz5gTULFg.s['305']++;menuNav._setActiveItem(oItem);}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['87'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['85'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['306']++;if(!menuNav._isRoot(oActiveMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['90'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['307']++;menuNav._hideMenu(oActiveMenu,true);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['90'][1]++;}}__cov_uXsvbG6iHwlIdkz5gTULFg.s['308']++;bPreventDefault=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['309']++;break;case 39:__cov_uXsvbG6iHwlIdkz5gTULFg.b['84'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['310']++;if(isMenuLabel(oTarget)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['91'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['311']++;oSubmenu=oTarget.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['312']++;if(oSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['92'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['313']++;menuNav._showMenu(oSubmenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['314']++;menuNav._focusItem(getFirstItem(oSubmenu));__cov_uXsvbG6iHwlIdkz5gTULFg.s['315']++;menuNav._setActiveItem(getFirstItem(oSubmenu));}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['92'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['91'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['316']++;if(isHorizontalMenu(oRootMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['93'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['317']++;oSubmenu=menuNav._getTopmostSubmenu(oActiveMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['318']++;oLI=getNextSibling(oSubmenu.get(PARENT_NODE));__cov_uXsvbG6iHwlIdkz5gTULFg.s['319']++;oItem=getItem(oLI);__cov_uXsvbG6iHwlIdkz5gTULFg.s['320']++;menuNav._hideAllSubmenus(oRootMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['321']++;if(oItem){__cov_uXsvbG6iHwlIdkz5gTULFg.b['94'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['322']++;if(isMenuLabel(oItem)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['95'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['323']++;oSubmenu=oItem.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['324']++;if(oSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['96'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['325']++;menuNav._showMenu(oSubmenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['326']++;menuNav._focusItem(getFirstItem(oSubmenu));__cov_uXsvbG6iHwlIdkz5gTULFg.s['327']++;menuNav._setActiveItem(getFirstItem(oSubmenu));}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['96'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['328']++;menuNav._focusItem(oItem);__cov_uXsvbG6iHwlIdkz5gTULFg.s['329']++;menuNav._setActiveItem(oItem);}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['95'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['330']++;menuNav._focusItem(oItem);__cov_uXsvbG6iHwlIdkz5gTULFg.s['331']++;menuNav._setActiveItem(oItem);}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['94'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['93'][1]++;}}__cov_uXsvbG6iHwlIdkz5gTULFg.s['332']++;bPreventDefault=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['333']++;break;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['334']++;if(bPreventDefault){__cov_uXsvbG6iHwlIdkz5gTULFg.b['97'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['335']++;event.preventDefault();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['97'][1]++;}},_onHorizontalMenuKeyDown:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['51']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['336']++;var menuNav=this,oActiveMenu=menuNav._activeMenu,oTarget=event.target,oFocusedItem=getItem(oTarget,true),bPreventDefault=false,nKeyCode=event.keyCode,oSubmenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['337']++;if(nKeyCode===40){__cov_uXsvbG6iHwlIdkz5gTULFg.b['98'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['338']++;menuNav._hideAllSubmenus(oActiveMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['339']++;if(isMenuLabel(oFocusedItem)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['99'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['340']++;oSubmenu=oFocusedItem.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['341']++;if(oSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['100'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['342']++;menuNav._showMenu(oSubmenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['343']++;menuNav._focusItem(getFirstItem(oSubmenu));__cov_uXsvbG6iHwlIdkz5gTULFg.s['344']++;menuNav._setActiveItem(getFirstItem(oSubmenu));}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['100'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['345']++;bPreventDefault=true;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['99'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['98'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['346']++;if(bPreventDefault){__cov_uXsvbG6iHwlIdkz5gTULFg.b['101'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['347']++;event.preventDefault();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['101'][1]++;}},_onMouseMove:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['52']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['348']++;var menuNav=this;__cov_uXsvbG6iHwlIdkz5gTULFg.s['349']++;later(10,menuNav,function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['53']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['350']++;menuNav._currentMouseX=event.pageX;});},_onMouseOver:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['54']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['351']++;var menuNav=this,oTarget,oMenu,oMenuLabel,oParentMenu,oMenuItem;__cov_uXsvbG6iHwlIdkz5gTULFg.s['352']++;if(menuNav._blockMouseEvent){__cov_uXsvbG6iHwlIdkz5gTULFg.b['102'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['353']++;menuNav._blockMouseEvent=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['102'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['354']++;oTarget=event.target;__cov_uXsvbG6iHwlIdkz5gTULFg.s['355']++;oMenu=getMenu(oTarget,true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['356']++;oMenuLabel=getMenuLabel(oTarget,true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['357']++;oMenuItem=getMenuItem(oTarget,true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['358']++;if(handleMouseOverForNode(oMenu,oTarget)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['103'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['359']++;menuNav._onMenuMouseOver(oMenu,event);__cov_uXsvbG6iHwlIdkz5gTULFg.s['360']++;oMenu[HANDLED_MOUSEOVER]=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['361']++;oMenu[HANDLED_MOUSEOUT]=false;__cov_uXsvbG6iHwlIdkz5gTULFg.s['362']++;oParentMenu=getParentMenu(oMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['363']++;if(oParentMenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['104'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['364']++;oParentMenu[HANDLED_MOUSEOUT]=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['365']++;oParentMenu[HANDLED_MOUSEOVER]=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['104'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['103'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['366']++;if(handleMouseOverForNode(oMenuLabel,oTarget)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['105'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['367']++;menuNav._onMenuLabelMouseOver(oMenuLabel,event);__cov_uXsvbG6iHwlIdkz5gTULFg.s['368']++;oMenuLabel[HANDLED_MOUSEOVER]=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['369']++;oMenuLabel[HANDLED_MOUSEOUT]=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['105'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['370']++;if(handleMouseOverForNode(oMenuItem,oTarget)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['106'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['371']++;menuNav._onMenuItemMouseOver(oMenuItem,event);__cov_uXsvbG6iHwlIdkz5gTULFg.s['372']++;oMenuItem[HANDLED_MOUSEOVER]=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['373']++;oMenuItem[HANDLED_MOUSEOUT]=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['106'][1]++;}}},_onMouseOut:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['55']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['374']++;var menuNav=this,oActiveMenu=menuNav._activeMenu,bMovingToSubmenu=false,oTarget,oRelatedTarget,oMenu,oMenuLabel,oSubmenu,oMenuItem;__cov_uXsvbG6iHwlIdkz5gTULFg.s['375']++;menuNav._movingToSubmenu=(__cov_uXsvbG6iHwlIdkz5gTULFg.b['107'][0]++,oActiveMenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['107'][1]++,!isHorizontalMenu(oActiveMenu))&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['107'][2]++,event.pageX-5>menuNav._currentMouseX);__cov_uXsvbG6iHwlIdkz5gTULFg.s['376']++;oTarget=event.target;__cov_uXsvbG6iHwlIdkz5gTULFg.s['377']++;oRelatedTarget=event.relatedTarget;__cov_uXsvbG6iHwlIdkz5gTULFg.s['378']++;oMenu=getMenu(oTarget,true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['379']++;oMenuLabel=getMenuLabel(oTarget,true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['380']++;oMenuItem=getMenuItem(oTarget,true);__cov_uXsvbG6iHwlIdkz5gTULFg.s['381']++;if(handleMouseOutForNode(oMenuLabel,oRelatedTarget)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['108'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['382']++;menuNav._onMenuLabelMouseOut(oMenuLabel,event);__cov_uXsvbG6iHwlIdkz5gTULFg.s['383']++;oMenuLabel[HANDLED_MOUSEOUT]=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['384']++;oMenuLabel[HANDLED_MOUSEOVER]=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['108'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['385']++;if(handleMouseOutForNode(oMenuItem,oRelatedTarget)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['109'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['386']++;menuNav._onMenuItemMouseOut(oMenuItem,event);__cov_uXsvbG6iHwlIdkz5gTULFg.s['387']++;oMenuItem[HANDLED_MOUSEOUT]=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['388']++;oMenuItem[HANDLED_MOUSEOVER]=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['109'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['389']++;if(oMenuLabel){__cov_uXsvbG6iHwlIdkz5gTULFg.b['110'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['390']++;oSubmenu=oMenuLabel.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['391']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['112'][0]++,oSubmenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['112'][1]++,oRelatedTarget)&&((__cov_uXsvbG6iHwlIdkz5gTULFg.b['112'][2]++,oRelatedTarget.compareTo(oSubmenu))||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['112'][3]++,oSubmenu.contains(oRelatedTarget)))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['111'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['392']++;bMovingToSubmenu=true;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['111'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['110'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['393']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['114'][0]++,handleMouseOutForNode(oMenu,oRelatedTarget))||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['114'][1]++,bMovingToSubmenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['113'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['394']++;menuNav._onMenuMouseOut(oMenu,event);__cov_uXsvbG6iHwlIdkz5gTULFg.s['395']++;oMenu[HANDLED_MOUSEOUT]=true;__cov_uXsvbG6iHwlIdkz5gTULFg.s['396']++;oMenu[HANDLED_MOUSEOVER]=false;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['113'][1]++;}},_toggleSubmenuDisplay:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['56']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['397']++;var menuNav=this,oTarget=event.target,oMenuLabel=getMenuLabel(oTarget,true),sType=event.type,oAnchor,oSubmenu,sHref,nHashPos,nLen,sId;__cov_uXsvbG6iHwlIdkz5gTULFg.s['398']++;if(oMenuLabel){__cov_uXsvbG6iHwlIdkz5gTULFg.b['115'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['399']++;oAnchor=isAnchor(oTarget)?(__cov_uXsvbG6iHwlIdkz5gTULFg.b['116'][0]++,oTarget):(__cov_uXsvbG6iHwlIdkz5gTULFg.b['116'][1]++,oTarget.ancestor(isAnchor));__cov_uXsvbG6iHwlIdkz5gTULFg.s['400']++;if(oAnchor){__cov_uXsvbG6iHwlIdkz5gTULFg.b['117'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['401']++;sHref=oAnchor.getAttribute('href',2);__cov_uXsvbG6iHwlIdkz5gTULFg.s['402']++;nHashPos=sHref.indexOf('#');__cov_uXsvbG6iHwlIdkz5gTULFg.s['403']++;nLen=sHref.length;__cov_uXsvbG6iHwlIdkz5gTULFg.s['404']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['119'][0]++,nHashPos===0)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['119'][1]++,nLen>1)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['118'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['405']++;sId=sHref.substr(1,nLen);__cov_uXsvbG6iHwlIdkz5gTULFg.s['406']++;oSubmenu=oMenuLabel.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['407']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['121'][0]++,oSubmenu)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['121'][1]++,oSubmenu.get(ID)===sId)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['120'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['408']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['123'][0]++,sType===MOUSEDOWN)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['123'][1]++,sType===KEYDOWN)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['122'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['409']++;if(((__cov_uXsvbG6iHwlIdkz5gTULFg.b['125'][0]++,UA.opera)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['125'][1]++,UA.gecko)||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['125'][2]++,UA.ie))&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['125'][3]++,sType===KEYDOWN)&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['125'][4]++,!menuNav._preventClickHandle)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['124'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['410']++;menuNav._preventClickHandle=menuNav._rootMenu.on('click',function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['57']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['411']++;event.preventDefault();__cov_uXsvbG6iHwlIdkz5gTULFg.s['412']++;menuNav._preventClickHandle.detach();__cov_uXsvbG6iHwlIdkz5gTULFg.s['413']++;menuNav._preventClickHandle=null;});}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['124'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['414']++;if(sType==MOUSEDOWN){__cov_uXsvbG6iHwlIdkz5gTULFg.b['126'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['415']++;event.preventDefault();__cov_uXsvbG6iHwlIdkz5gTULFg.s['416']++;event.stopImmediatePropagation();__cov_uXsvbG6iHwlIdkz5gTULFg.s['417']++;menuNav._hasFocus=true;}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['126'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['418']++;if(menuNav._isRoot(getParentMenu(oTarget))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['127'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['419']++;if(hasVisibleSubmenu(oMenuLabel)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['128'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['420']++;menuNav._hideMenu(oSubmenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['421']++;menuNav._focusItem(oMenuLabel);__cov_uXsvbG6iHwlIdkz5gTULFg.s['422']++;menuNav._setActiveItem(oMenuLabel);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['128'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['423']++;menuNav._hideAllSubmenus(menuNav._rootMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['424']++;menuNav._showMenu(oSubmenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['425']++;menuNav._focusItem(getFirstItem(oSubmenu));__cov_uXsvbG6iHwlIdkz5gTULFg.s['426']++;menuNav._setActiveItem(getFirstItem(oSubmenu));}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['127'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['427']++;if(menuNav._activeItem==oMenuLabel){__cov_uXsvbG6iHwlIdkz5gTULFg.b['129'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['428']++;menuNav._showMenu(oSubmenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['429']++;menuNav._focusItem(getFirstItem(oSubmenu));__cov_uXsvbG6iHwlIdkz5gTULFg.s['430']++;menuNav._setActiveItem(getFirstItem(oSubmenu));}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['129'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['431']++;if(!oMenuLabel._clickHandle){__cov_uXsvbG6iHwlIdkz5gTULFg.b['130'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['432']++;oMenuLabel._clickHandle=oMenuLabel.on('click',function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['58']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['433']++;menuNav._hideAllSubmenus(menuNav._rootMenu);__cov_uXsvbG6iHwlIdkz5gTULFg.s['434']++;menuNav._hasFocus=false;__cov_uXsvbG6iHwlIdkz5gTULFg.s['435']++;menuNav._clearActiveItem();__cov_uXsvbG6iHwlIdkz5gTULFg.s['436']++;oMenuLabel._clickHandle.detach();__cov_uXsvbG6iHwlIdkz5gTULFg.s['437']++;oMenuLabel._clickHandle=null;});}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['130'][1]++;}}}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['122'][1]++;}__cov_uXsvbG6iHwlIdkz5gTULFg.s['438']++;if(sType===CLICK){__cov_uXsvbG6iHwlIdkz5gTULFg.b['131'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['439']++;event.preventDefault();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['131'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['120'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['118'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['117'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['115'][1]++;}},_onKeyPress:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['59']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['440']++;switch(event.keyCode){case 37:__cov_uXsvbG6iHwlIdkz5gTULFg.b['132'][0]++;case 38:__cov_uXsvbG6iHwlIdkz5gTULFg.b['132'][1]++;case 39:__cov_uXsvbG6iHwlIdkz5gTULFg.b['132'][2]++;case 40:__cov_uXsvbG6iHwlIdkz5gTULFg.b['132'][3]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['441']++;event.preventDefault();__cov_uXsvbG6iHwlIdkz5gTULFg.s['442']++;break;}},_onKeyDown:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['60']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['443']++;var menuNav=this,oActiveItem=menuNav._activeItem,oTarget=event.target,oActiveMenu=getParentMenu(oTarget),oSubmenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['444']++;if(oActiveMenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['133'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['445']++;menuNav._activeMenu=oActiveMenu;__cov_uXsvbG6iHwlIdkz5gTULFg.s['446']++;if(isHorizontalMenu(oActiveMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['134'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['447']++;menuNav._onHorizontalMenuKeyDown(event);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['134'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['448']++;menuNav._onVerticalMenuKeyDown(event);}__cov_uXsvbG6iHwlIdkz5gTULFg.s['449']++;if(event.keyCode===27){__cov_uXsvbG6iHwlIdkz5gTULFg.b['135'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['450']++;if(!menuNav._isRoot(oActiveMenu)){__cov_uXsvbG6iHwlIdkz5gTULFg.b['136'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['451']++;if(UA.opera){__cov_uXsvbG6iHwlIdkz5gTULFg.b['137'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['452']++;later(0,menuNav,function(){__cov_uXsvbG6iHwlIdkz5gTULFg.f['61']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['453']++;menuNav._hideMenu(oActiveMenu,true);});}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['137'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['454']++;menuNav._hideMenu(oActiveMenu,true);}__cov_uXsvbG6iHwlIdkz5gTULFg.s['455']++;event.stopPropagation();__cov_uXsvbG6iHwlIdkz5gTULFg.s['456']++;menuNav._blockMouseEvent=UA.gecko?(__cov_uXsvbG6iHwlIdkz5gTULFg.b['138'][0]++,true):(__cov_uXsvbG6iHwlIdkz5gTULFg.b['138'][1]++,false);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['136'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['457']++;if(oActiveItem){__cov_uXsvbG6iHwlIdkz5gTULFg.b['139'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['458']++;if((__cov_uXsvbG6iHwlIdkz5gTULFg.b['141'][0]++,isMenuLabel(oActiveItem))&&(__cov_uXsvbG6iHwlIdkz5gTULFg.b['141'][1]++,hasVisibleSubmenu(oActiveItem))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['140'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['459']++;oSubmenu=oActiveItem.next();__cov_uXsvbG6iHwlIdkz5gTULFg.s['460']++;if(oSubmenu){__cov_uXsvbG6iHwlIdkz5gTULFg.b['142'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['461']++;menuNav._hideMenu(oSubmenu);}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['142'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['140'][1]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['462']++;menuNav._focusManager.blur();__cov_uXsvbG6iHwlIdkz5gTULFg.s['463']++;menuNav._clearActiveItem();__cov_uXsvbG6iHwlIdkz5gTULFg.s['464']++;menuNav._hasFocus=false;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['139'][1]++;}}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['135'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['133'][1]++;}},_onDocMouseDown:function(event){__cov_uXsvbG6iHwlIdkz5gTULFg.f['62']++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['465']++;var menuNav=this,oRoot=menuNav._rootMenu,oTarget=event.target;__cov_uXsvbG6iHwlIdkz5gTULFg.s['466']++;if(!((__cov_uXsvbG6iHwlIdkz5gTULFg.b['144'][0]++,oRoot.compareTo(oTarget))||(__cov_uXsvbG6iHwlIdkz5gTULFg.b['144'][1]++,oRoot.contains(oTarget)))){__cov_uXsvbG6iHwlIdkz5gTULFg.b['143'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['467']++;menuNav._hideAllSubmenus(oRoot);__cov_uXsvbG6iHwlIdkz5gTULFg.s['468']++;if(UA.webkit){__cov_uXsvbG6iHwlIdkz5gTULFg.b['145'][0]++;__cov_uXsvbG6iHwlIdkz5gTULFg.s['469']++;menuNav._hasFocus=false;__cov_uXsvbG6iHwlIdkz5gTULFg.s['470']++;menuNav._clearActiveItem();}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['145'][1]++;}}else{__cov_uXsvbG6iHwlIdkz5gTULFg.b['143'][1]++;}}});__cov_uXsvbG6iHwlIdkz5gTULFg.s['471']++;Y.namespace('Plugin');__cov_uXsvbG6iHwlIdkz5gTULFg.s['472']++;Y.Plugin.NodeMenuNav=NodeMenuNav;},'3.17.2',{'requires':['node','classnamemanager','plugin','node-focusmanager'],'skinnable':true}); diff --git a/design/standard/lib/yui/3.17.2/build/node-menunav/node-menunav-debug.js b/design/standard/lib/yui/3.17.2/build/node-menunav/node-menunav-debug.js new file mode 100644 index 0000000..8215fad --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/node-menunav/node-menunav-debug.js @@ -0,0 +1,2196 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('node-menunav', function (Y, NAME) { + +/** +*

The MenuNav Node Plugin makes it easy to transform existing list-based +* markup into traditional, drop down navigational menus that are both accessible +* and easy to customize, and only require a small set of dependencies.

+* +* +*

To use the MenuNav Node Plugin, simply pass a reference to the plugin to a +* Node instance's plug method.

+* +*

+* +* <script type="text/javascript">
+*
+* // Call the "use" method, passing in "node-menunav". This will
+* // load the script and CSS for the MenuNav Node Plugin and all of
+* // the required dependencies.
+*
+* YUI().use("node-menunav", function(Y) {
+*
+* // Use the "contentready" event to initialize the menu when
+* // the subtree of element representing the root menu
+* // (<div id="menu-1">) is ready to be scripted.
+*
+* Y.on("contentready", function () {
+*
+* // The scope of the callback will be a Node instance
+* // representing the root menu (<div id="menu-1">).
+* // Therefore, since "this" represents a Node instance, it
+* // is possible to just call "this.plug" passing in a
+* // reference to the MenuNav Node Plugin.
+*
+* this.plug(Y.Plugin.NodeMenuNav);
+*
+* }, "#menu-1");
+*
+* });
+*
+* </script>
+*
+*

+* +*

The MenuNav Node Plugin has several configuration properties that can be +* set via an object literal that is passed as a second argument to a Node +* instance's plug method. +*

+* +*

+* +* <script type="text/javascript">
+*
+* // Call the "use" method, passing in "node-menunav". This will
+* // load the script and CSS for the MenuNav Node Plugin and all of
+* // the required dependencies.
+*
+* YUI().use("node-menunav", function(Y) {
+*
+* // Use the "contentready" event to initialize the menu when
+* // the subtree of element representing the root menu
+* // (<div id="menu-1">) is ready to be scripted.
+*
+* Y.on("contentready", function () {
+*
+* // The scope of the callback will be a Node instance
+* // representing the root menu (<div id="menu-1">).
+* // Therefore, since "this" represents a Node instance, it
+* // is possible to just call "this.plug" passing in a
+* // reference to the MenuNav Node Plugin.
+*
+* this.plug(Y.Plugin.NodeMenuNav, { mouseOutHideDelay: 1000 }); +*

+* }, "#menu-1");
+*
+* });
+*
+* </script>
+*
+*

+* +DEPRECATED. The MenuNav Node Plugin has been deprecated as of YUI 3.9.0. This module will be removed from the library in a future version. If you require functionality similar to the one provided by this module, consider taking a look at the various modules in the YUI Gallery . + +@module node-menunav +@deprecated 3.9.0 +*/ + + + // Util shortcuts + +var UA = Y.UA, + later = Y.later, + getClassName = Y.ClassNameManager.getClassName, + + + + // Frequently used strings + + MENU = "menu", + MENUITEM = "menuitem", + HIDDEN = "hidden", + PARENT_NODE = "parentNode", + CHILDREN = "children", + OFFSET_HEIGHT = "offsetHeight", + OFFSET_WIDTH = "offsetWidth", + PX = "px", + ID = "id", + PERIOD = ".", + HANDLED_MOUSEOUT = "handledMouseOut", + HANDLED_MOUSEOVER = "handledMouseOver", + ACTIVE = "active", + LABEL = "label", + LOWERCASE_A = "a", + MOUSEDOWN = "mousedown", + KEYDOWN = "keydown", + CLICK = "click", + EMPTY_STRING = "", + FIRST_OF_TYPE = "first-of-type", + ROLE = "role", + PRESENTATION = "presentation", + DESCENDANTS = "descendants", + UI = "UI", + ACTIVE_DESCENDANT = "activeDescendant", + USE_ARIA = "useARIA", + ARIA_HIDDEN = "aria-hidden", + CONTENT = "content", + HOST = "host", + ACTIVE_DESCENDANT_CHANGE = ACTIVE_DESCENDANT + "Change", + + + // Attribute keys + + AUTO_SUBMENU_DISPLAY = "autoSubmenuDisplay", + MOUSEOUT_HIDE_DELAY = "mouseOutHideDelay", + + + // CSS class names + + CSS_MENU = getClassName(MENU), + CSS_MENU_HIDDEN = getClassName(MENU, HIDDEN), + CSS_MENU_HORIZONTAL = getClassName(MENU, "horizontal"), + CSS_MENU_LABEL = getClassName(MENU, LABEL), + CSS_MENU_LABEL_ACTIVE = getClassName(MENU, LABEL, ACTIVE), + CSS_MENU_LABEL_MENUVISIBLE = getClassName(MENU, LABEL, (MENU + "visible")), + CSS_MENUITEM = getClassName(MENUITEM), + CSS_MENUITEM_ACTIVE = getClassName(MENUITEM, ACTIVE), + + + // CSS selectors + + MENU_SELECTOR = PERIOD + CSS_MENU, + MENU_TOGGLE_SELECTOR = (PERIOD + getClassName(MENU, "toggle")), + MENU_CONTENT_SELECTOR = PERIOD + getClassName(MENU, CONTENT), + MENU_LABEL_SELECTOR = PERIOD + CSS_MENU_LABEL, + + STANDARD_QUERY = ">" + MENU_CONTENT_SELECTOR + ">ul>li>a", + EXTENDED_QUERY = ">" + MENU_CONTENT_SELECTOR + ">ul>li>" + MENU_LABEL_SELECTOR + ">a:first-child"; + +// Utility functions + + +var getPreviousSibling = function (node) { + + var oPrevious = node.previous(), + oChildren; + + if (!oPrevious) { + oChildren = node.get(PARENT_NODE).get(CHILDREN); + oPrevious = oChildren.item(oChildren.size() - 1); + } + + + return oPrevious; + +}; + + +var getNextSibling = function (node) { + + var oNext = node.next(); + + if (!oNext) { + oNext = node.get(PARENT_NODE).get(CHILDREN).item(0); + } + + return oNext; + +}; + + +var isAnchor = function (node) { + + var bReturnVal = false; + + if (node) { + bReturnVal = node.get("nodeName").toLowerCase() === LOWERCASE_A; + } + + return bReturnVal; + +}; + + +var isMenuItem = function (node) { + + return node.hasClass(CSS_MENUITEM); + +}; + + +var isMenuLabel = function (node) { + + return node.hasClass(CSS_MENU_LABEL); + +}; + + +var isHorizontalMenu = function (menu) { + + return menu.hasClass(CSS_MENU_HORIZONTAL); + +}; + + +var hasVisibleSubmenu = function (menuLabel) { + + return menuLabel.hasClass(CSS_MENU_LABEL_MENUVISIBLE); + +}; + + +var getItemAnchor = function (node) { + + return isAnchor(node) ? node : node.one(LOWERCASE_A); + +}; + + +var getNodeWithClass = function (node, className, searchAncestors) { + + var oItem; + + if (node) { + + if (node.hasClass(className)) { + oItem = node; + } + + if (!oItem && searchAncestors) { + oItem = node.ancestor((PERIOD + className)); + } + + } + + return oItem; + +}; + + +var getParentMenu = function (node) { + + return node.ancestor(MENU_SELECTOR); + +}; + + +var getMenu = function (node, searchAncestors) { + + return getNodeWithClass(node, CSS_MENU, searchAncestors); + +}; + + +var getMenuItem = function (node, searchAncestors) { + + var oItem; + + if (node) { + oItem = getNodeWithClass(node, CSS_MENUITEM, searchAncestors); + } + + return oItem; + +}; + + +var getMenuLabel = function (node, searchAncestors) { + + var oItem; + + if (node) { + + if (searchAncestors) { + oItem = getNodeWithClass(node, CSS_MENU_LABEL, searchAncestors); + } + else { + oItem = getNodeWithClass(node, CSS_MENU_LABEL) || + node.one((PERIOD + CSS_MENU_LABEL)); + } + + } + + return oItem; + +}; + + +var getItem = function (node, searchAncestors) { + + var oItem; + + if (node) { + oItem = getMenuItem(node, searchAncestors) || + getMenuLabel(node, searchAncestors); + } + + return oItem; + +}; + + +var getFirstItem = function (menu) { + + return getItem(menu.one("li")); + +}; + + +var getActiveClass = function (node) { + + return isMenuItem(node) ? CSS_MENUITEM_ACTIVE : CSS_MENU_LABEL_ACTIVE; + +}; + + +var handleMouseOverForNode = function (node, target) { + + return node && !node[HANDLED_MOUSEOVER] && + (node.compareTo(target) || node.contains(target)); + +}; + + +var handleMouseOutForNode = function (node, relatedTarget) { + + return node && !node[HANDLED_MOUSEOUT] && + (!node.compareTo(relatedTarget) && !node.contains(relatedTarget)); + +}; + +/** +* The NodeMenuNav class is a plugin for a Node instance. The class is used via +* the plug method of Node and +* should not be instantiated directly. +* @namespace plugin +* @class NodeMenuNav +*/ +var NodeMenuNav = function () { + + NodeMenuNav.superclass.constructor.apply(this, arguments); + +}; + +NodeMenuNav.NAME = "nodeMenuNav"; +NodeMenuNav.NS = "menuNav"; + + +/** +* @property SHIM_TEMPLATE_TITLE +* @description String representing the value for the title +* attribute for the shim used to prevent <select> elements +* from poking through menus in IE 6. +* @default "Menu Stacking Shim" +* @type String +*/ +NodeMenuNav.SHIM_TEMPLATE_TITLE = "Menu Stacking Shim"; + + +/** +* @property SHIM_TEMPLATE +* @description String representing the HTML used to create the +* <iframe> shim used to prevent +* <select> elements from poking through menus in IE 6. +* @default "<iframe frameborder="0" tabindex="-1" +* class="yui-shim" title="Menu Stacking Shim" +* src="javascript:false;"></iframe>" +* @type String +*/ + +// '; + + +NodeMenuNav.ATTRS = { + + /** + * Boolean indicating if use of the WAI-ARIA Roles and States should be + * enabled for the menu. + * + * @attribute useARIA + * @readOnly + * @writeOnce + * @default true + * @type boolean + */ + useARIA: { + + value: true, + writeOnce: true, + lazyAdd: false, + setter: function (value) { + + var oMenu = this.get(HOST), + oMenuLabel, + oMenuToggle, + oSubmenu, + sID; + + if (value) { + + oMenu.set(ROLE, MENU); + + oMenu.all("ul,li," + MENU_CONTENT_SELECTOR).set(ROLE, PRESENTATION); + + oMenu.all((PERIOD + getClassName(MENUITEM, CONTENT))).set(ROLE, MENUITEM); + + oMenu.all((PERIOD + CSS_MENU_LABEL)).each(function (node) { + + oMenuLabel = node; + oMenuToggle = node.one(MENU_TOGGLE_SELECTOR); + + if (oMenuToggle) { + oMenuToggle.set(ROLE, PRESENTATION); + oMenuLabel = oMenuToggle.previous(); + } + + oMenuLabel.set(ROLE, MENUITEM); + oMenuLabel.set("aria-haspopup", true); + + oSubmenu = node.next(); + + if (oSubmenu) { + + oSubmenu.set(ROLE, MENU); + + oMenuLabel = oSubmenu.previous(); + oMenuToggle = oMenuLabel.one(MENU_TOGGLE_SELECTOR); + + if (oMenuToggle) { + oMenuLabel = oMenuToggle; + } + + sID = Y.stamp(oMenuLabel); + + if (!oMenuLabel.get(ID)) { + oMenuLabel.set(ID, sID); + } + + oSubmenu.set("aria-labelledby", sID); + oSubmenu.set(ARIA_HIDDEN, true); + + } + + }); + + } + + } + + }, + + + /** + * Boolean indicating if submenus are automatically made visible when the + * user mouses over the menu's items. + * + * @attribute autoSubmenuDisplay + * @readOnly + * @writeOnce + * @default true + * @type boolean + */ + autoSubmenuDisplay: { + + value: true, + writeOnce: true + + }, + + + /** + * Number indicating the time (in milliseconds) that should expire before a + * submenu is made visible when the user mouses over the menu's label. + * + * @attribute submenuShowDelay + * @readOnly + * @writeOnce + * @default 250 + * @type Number + */ + submenuShowDelay: { + + value: 250, + writeOnce: true + + }, + + + /** + * Number indicating the time (in milliseconds) that should expire before a + * submenu is hidden when the user mouses out of a menu label heading in the + * direction of a submenu. + * + * @attribute submenuHideDelay + * @readOnly + * @writeOnce + * @default 250 + * @type Number + */ + submenuHideDelay: { + + value: 250, + writeOnce: true + + }, + + + /** + * Number indicating the time (in milliseconds) that should expire before a + * submenu is hidden when the user mouses out of it. + * + * @attribute mouseOutHideDelay + * @readOnly + * @writeOnce + * @default 750 + * @type Number + */ + mouseOutHideDelay: { + + value: 750, + writeOnce: true + + } + +}; + + +Y.extend(NodeMenuNav, Y.Plugin.Base, { + + // Protected properties + + /** + * @property _rootMenu + * @description Node instance representing the root menu in the menu. + * @default null + * @protected + * @type Node + */ + _rootMenu: null, + + + /** + * @property _activeItem + * @description Node instance representing the menu's active descendent: + * the menuitem or menu label the user is currently interacting with. + * @default null + * @protected + * @type Node + */ + _activeItem: null, + + + /** + * @property _activeMenu + * @description Node instance representing the menu that is the parent of + * the menu's active descendent. + * @default null + * @protected + * @type Node + */ + _activeMenu: null, + + + /** + * @property _hasFocus + * @description Boolean indicating if the menu has focus. + * @default false + * @protected + * @type Boolean + */ + _hasFocus: false, + + + // In gecko-based browsers a mouseover and mouseout event will fire even + // if a DOM element moves out from under the mouse without the user + // actually moving the mouse. This bug affects NodeMenuNav because the + // user can hit the Esc key to hide a menu, and if the mouse is over the + // menu when the user presses Esc, the _onMenuMouseOut handler will be + // called. To fix this bug the following flag (_blockMouseEvent) is used + // to block the code in the _onMenuMouseOut handler from executing. + + /** + * @property _blockMouseEvent + * @description Boolean indicating whether or not to handle the + * "mouseover" event. + * @default false + * @protected + * @type Boolean + */ + _blockMouseEvent: false, + + + /** + * @property _currentMouseX + * @description Number representing the current x coordinate of the mouse + * inside the menu. + * @default 0 + * @protected + * @type Number + */ + _currentMouseX: 0, + + + /** + * @property _movingToSubmenu + * @description Boolean indicating if the mouse is moving from a menu + * label to its corresponding submenu. + * @default false + * @protected + * @type Boolean + */ + _movingToSubmenu: false, + + + /** + * @property _showSubmenuTimer + * @description Timer used to show a submenu. + * @default null + * @protected + * @type Object + */ + _showSubmenuTimer: null, + + + /** + * @property _hideSubmenuTimer + * @description Timer used to hide a submenu. + * @default null + * @protected + * @type Object + */ + _hideSubmenuTimer: null, + + + /** + * @property _hideAllSubmenusTimer + * @description Timer used to hide a all submenus. + * @default null + * @protected + * @type Object + */ + _hideAllSubmenusTimer: null, + + + /** + * @property _firstItem + * @description Node instance representing the first item (menuitem or menu + * label) in the root menu of a menu. + * @default null + * @protected + * @type Node + */ + _firstItem: null, + + + // Public methods + + + initializer: function (config) { + + var menuNav = this, + oRootMenu = this.get(HOST), + aHandlers = [], + oDoc; + + Y.log("WARNING: Node-MenuNav is a deprecated module as of YUI 3.9.0. This module will be removed from a later version of the library.", "warn"); + + if (oRootMenu) { + + menuNav._rootMenu = oRootMenu; + + oRootMenu.all("ul:first-child").addClass(FIRST_OF_TYPE); + + // Hide all visible submenus + + oRootMenu.all(MENU_SELECTOR).addClass(CSS_MENU_HIDDEN); + + + // Wire up all event handlers + + aHandlers.push(oRootMenu.on("mouseover", menuNav._onMouseOver, menuNav)); + aHandlers.push(oRootMenu.on("mouseout", menuNav._onMouseOut, menuNav)); + aHandlers.push(oRootMenu.on("mousemove", menuNav._onMouseMove, menuNav)); + aHandlers.push(oRootMenu.on(MOUSEDOWN, menuNav._toggleSubmenuDisplay, menuNav)); + aHandlers.push(Y.on("key", menuNav._toggleSubmenuDisplay, oRootMenu, "down:13", menuNav)); + aHandlers.push(oRootMenu.on(CLICK, menuNav._toggleSubmenuDisplay, menuNav)); + aHandlers.push(oRootMenu.on("keypress", menuNav._onKeyPress, menuNav)); + aHandlers.push(oRootMenu.on(KEYDOWN, menuNav._onKeyDown, menuNav)); + + oDoc = oRootMenu.get("ownerDocument"); + + aHandlers.push(oDoc.on(MOUSEDOWN, menuNav._onDocMouseDown, menuNav)); + aHandlers.push(oDoc.on("focus", menuNav._onDocFocus, menuNav)); + + this._eventHandlers = aHandlers; + + menuNav._initFocusManager(); + + } + + + }, + + destructor: function () { + + var aHandlers = this._eventHandlers; + + if (aHandlers) { + + Y.Array.each(aHandlers, function (handle) { + handle.detach(); + }); + + this._eventHandlers = null; + + } + + this.get(HOST).unplug("focusManager"); + + }, + + + + // Protected methods + + /** + * @method _isRoot + * @description Returns a boolean indicating if the specified menu is the + * root menu in the menu. + * @protected + * @param {Node} menu Node instance representing a menu. + * @return {Boolean} Boolean indicating if the specified menu is the root + * menu in the menu. + */ + _isRoot: function (menu) { + + return this._rootMenu.compareTo(menu); + + }, + + + /** + * @method _getTopmostSubmenu + * @description Returns the topmost submenu of a submenu hierarchy. + * @protected + * @param {Node} menu Node instance representing a menu. + * @return {Node} Node instance representing a menu. + */ + _getTopmostSubmenu: function (menu) { + + var menuNav = this, + oMenu = getParentMenu(menu), + returnVal; + + + if (!oMenu) { + returnVal = menu; + } + else if (menuNav._isRoot(oMenu)) { + returnVal = menu; + } + else { + returnVal = menuNav._getTopmostSubmenu(oMenu); + } + + return returnVal; + + }, + + + /** + * @method _clearActiveItem + * @description Clears the menu's active descendent. + * @protected + */ + _clearActiveItem: function () { + + var menuNav = this, + oActiveItem = menuNav._activeItem; + + if (oActiveItem) { + oActiveItem.removeClass(getActiveClass(oActiveItem)); + } + + menuNav._activeItem = null; + + }, + + + /** + * @method _setActiveItem + * @description Sets the specified menuitem or menu label as the menu's + * active descendent. + * @protected + * @param {Node} item Node instance representing a menuitem or menu label. + */ + _setActiveItem: function (item) { + + var menuNav = this; + + if (item) { + + menuNav._clearActiveItem(); + + item.addClass(getActiveClass(item)); + + menuNav._activeItem = item; + + } + + }, + + + /** + * @method _focusItem + * @description Focuses the specified menuitem or menu label. + * @protected + * @param {Node} item Node instance representing a menuitem or menu label. + */ + _focusItem: function (item) { + + var menuNav = this, + oMenu, + oItem; + + if (item && menuNav._hasFocus) { + + oMenu = getParentMenu(item); + oItem = getItemAnchor(item); + + if (oMenu && !oMenu.compareTo(menuNav._activeMenu)) { + menuNav._activeMenu = oMenu; + menuNav._initFocusManager(); + } + + menuNav._focusManager.focus(oItem); + + } + + }, + + + /** + * @method _showMenu + * @description Shows the specified menu. + * @protected + * @param {Node} menu Node instance representing a menu. + */ + _showMenu: function (menu) { + + var oParentMenu = getParentMenu(menu), + oLI = menu.get(PARENT_NODE), + aXY = oLI.getXY(); + + + if (this.get(USE_ARIA)) { + menu.set(ARIA_HIDDEN, false); + } + + + if (isHorizontalMenu(oParentMenu)) { + aXY[1] = aXY[1] + oLI.get(OFFSET_HEIGHT); + } + else { + aXY[0] = aXY[0] + oLI.get(OFFSET_WIDTH); + } + + menu.setXY(aXY); + + if (UA.ie && UA.ie < 8) { + + if (UA.ie === 6 && !menu.hasIFrameShim) { + + menu.appendChild(Y.Node.create(NodeMenuNav.SHIM_TEMPLATE)); + menu.hasIFrameShim = true; + + } + + // Clear previous values for height and width + + menu.setStyles({ height: EMPTY_STRING, width: EMPTY_STRING }); + + // Set the width and height of the menu's bounding box - this is + // necessary for IE 6 so that the CSS for the ',vt.ATTRS={useARIA:{value:!0,writeOnce:!0,lazyAdd:!1,setter:function(t){var n=this.get(D),r,u,a,f;t&&(n.set(N,s),n.all("ul,li,"+$).set(N,C),n.all(d+i(o,_)).set(N,o),n.all(d+q).each(function(t){r=t,u=t.one(V),u&&(u.set(N,C),r=u.previous()),r.set(N,o),r.set("aria-haspopup",!0),a=t.next(),a&&(a.set(N,s),r=a.previous(),u=r.one(V),u&&(r=u),f=e.stamp(r),r.get(p)||r.set(p,f),a.set("aria-labelledby",f),a.set(M,!0))}))}},autoSubmenuDisplay:{value:!0,writeOnce:!0},submenuShowDelay:{value:250,writeOnce:!0},submenuHideDelay:{value:250,writeOnce:!0},mouseOutHideDelay:{value:750,writeOnce:!0}},e.extend(vt,e.Plugin.Base,{_rootMenu:null,_activeItem:null,_activeMenu:null,_hasFocus:!1,_blockMouseEvent:!1,_currentMouseX:0,_movingToSubmenu:!1,_showSubmenuTimer:null,_hideSubmenuTimer:null,_hideAllSubmenusTimer:null,_firstItem:null,initializer:function(t){var n=this,r=this.get(D),i=[],s;r&&(n._rootMenu=r,r.all("ul:first-child").addClass(T),r.all(X).addClass(F),i.push(r.on("mouseover",n._onMouseOver,n)),i.push(r.on("mouseout",n._onMouseOut,n)),i.push(r.on("mousemove",n._onMouseMove,n)),i.push(r.on(w,n._toggleSubmenuDisplay,n)),i.push(e.on("key",n._toggleSubmenuDisplay,r,"down:13",n)),i.push(r.on(S,n._toggleSubmenuDisplay,n)),i.push(r.on("keypress",n._onKeyPress,n)),i.push(r.on(E,n._onKeyDown,n)),s=r.get("ownerDocument"),i.push(s.on(w,n._onDocMouseDown,n)),i.push(s.on("focus",n._onDocFocus,n)),this._eventHandlers=i,n._initFocusManager())},destructor:function(){var t=this._eventHandlers;t&&(e.Array.each(t,function(e){e.detach()}),this._eventHandlers=null),this.get(D).unplug("focusManager")},_isRoot:function(e){return this._rootMenu.compareTo(e)},_getTopmostSubmenu:function(e){var t=this,n=ot(e),r;return n?t._isRoot(n)?r=e:r=t._getTopmostSubmenu(n):r=e,r},_clearActiveItem:function(){var e=this,t=e._activeItem;t&&t.removeClass(ht(t)),e._activeItem=null},_setActiveItem:function(e){var t=this;e&&(t._clearActiveItem(),e.addClass(ht(e)),t._activeItem=e)},_focusItem:function(e){var t=this,n,r;e&&t._hasFocus&&(n=ot(e),r=it(e),n&&!n.compareTo(t._activeMenu)&&(t._activeMenu=n,t._initFocusManager()),t._focusManager.focus(r))},_showMenu:function(t){var r=ot(t),i=t.get(a),s=i.getXY();this.get(O)&&t.set(M,!1),nt(r)?s[1]=s[1]+i.get(l):s[0]=s[0]+i.get(c),t.setXY(s),n.ie&&n.ie<8&&(n.ie===6&&!t.hasIFrameShim&&(t.appendChild(e.Node.create(vt.SHIM_TEMPLATE)),t.hasIFrameShim=!0),t.setStyles({height:x,width:x}),t.setStyles({height:t.get(l)+h,width:t.get(c)+h})),t.previous().addClass(U),t.removeClass(F)},_hideMenu:function(e,t){var n=this,r=e.previous(),i;r.removeClass(U),t&&(n._focusItem(r),n._setActiveItem(r)),i=e.one(d+W),i&&i.removeClass(W),e.setStyles({left:x,top:x}),e.addClass(F),n.get(O)&&e.set(M,!0)},_hideAllSubmenus:function(t){var n=this;t.all(X).each(e.bind(function(e){n._hideMenu(e)},n))},_cancelShowSubmenuTimer:function(){var e=this,t=e._showSubmenuTimer;t&&(t.cancel(),e._showSubmenuTimer=null)},_cancelHideSubmenuTimer:function(){var e=this,t=e._hideSubmenuTimer;t&&(t.cancel(),e._hideSubmenuTimer=null)},_initFocusManager:function(){var t=this,n=t._rootMenu,r=t._activeMenu||n,i=t._isRoot(r)?x:"#"+r.get("id"),s=t._focusManager,o,u,a;nt(r)?(u=i+K+","+i+Q,o={next:"down:39",previous:"down:37"}):(u=i+K,o={next:"down:40",previous:"down:38"}),s?(s.set(A,-1),s.set(k,u),s.set("keys",o)):(n.plug(e.Plugin.NodeFocusManager,{descendants:u,keys:o,circular:!0}),s=n.focusManager,a="#"+n.get("id")+X+" a,"+V,n.all(a).set("tabIndex",-1),s.on(P,this._onActiveDescendantChange,s,this),s.after(P,this._afterActiveDescendantChange,s,this),t._focusManager=s)},_onActiveDescendantChange:function(e,t){e.src===L&&t._activeMenu&&!t._movingToSubmenu&&t._hideAllSubmenus(t._activeMenu)},_afterActiveDescendantChange:function(e,t){var n;e.src===L&&(n=lt(this.get(k).item(e.newVal),!0),t._setActiveItem(n))},_onDocFocus:function(e){var t=this,n=t._activeItem,r=e.target,i;t._rootMenu.contains(r)?t._hasFocus?(i=ot(r),t._activeMenu.compareTo(i)||(t._activeMenu=i,t._initFocusManager(),t._focusManager.set(A,r),t._setActiveItem(lt(r,!0)))):(t._hasFocus=!0 +,n=lt(r,!0),n&&t._setActiveItem(n)):(t._clearActiveItem(),t._cancelShowSubmenuTimer(),t._hideAllSubmenus(t._rootMenu),t._activeMenu=t._rootMenu,t._initFocusManager(),t._focusManager.set(A,0),t._hasFocus=!1)},_onMenuMouseOver:function(e,t){var n=this,r=n._hideAllSubmenusTimer;r&&(r.cancel(),n._hideAllSubmenusTimer=null),n._cancelHideSubmenuTimer(),e&&!e.compareTo(n._activeMenu)&&(n._activeMenu=e,n._hasFocus&&n._initFocusManager()),n._movingToSubmenu&&nt(e)&&(n._movingToSubmenu=!1)},_hideAndFocusLabel:function(){var e=this,t=e._activeMenu,n;e._hideAllSubmenus(e._rootMenu),t&&(n=e._getTopmostSubmenu(t),e._focusItem(n.previous()))},_onMenuMouseOut:function(e,t){var n=this,i=n._activeMenu,s=t.relatedTarget,o=n._activeItem,u,a;i&&!i.contains(s)&&(u=ot(i),u&&!u.contains(s)?n.get(B)>0&&(n._cancelShowSubmenuTimer(),n._hideAllSubmenusTimer=r(n.get(B),n,n._hideAndFocusLabel)):o&&(a=ot(o),n._isRoot(a)||n._focusItem(a.previous())))},_onMenuLabelMouseOver:function(e,t){var n=this,i=n._activeMenu,s=n._isRoot(i),o=n.get(H)&&s||!s,u=n.get("submenuShowDelay"),a,f=function(t){n._cancelHideSubmenuTimer(),n._cancelShowSubmenuTimer(),rt(e)||(a=e.next(),a&&(n._hideAllSubmenus(i),n._showSubmenuTimer=r(t,n,n._showMenu,a)))};n._focusItem(e),n._setActiveItem(e),o&&(n._movingToSubmenu?n._hoverTimer=r(u,n,function(){f(0)}):f(u))},_onMenuLabelMouseOut:function(e,t){var n=this,i=n._isRoot(n._activeMenu),s=n.get(H)&&i||!i,o=t.relatedTarget,u=e.next(),a=n._hoverTimer;a&&a.cancel(),n._clearActiveItem(),s&&(n._movingToSubmenu&&!n._showSubmenuTimer&&u?n._hideSubmenuTimer=r(n.get("submenuHideDelay"),n,n._hideMenu,u):!n._movingToSubmenu&&u&&(!o||o&&!u.contains(o)&&!o.compareTo(u))&&(n._cancelShowSubmenuTimer(),n._hideMenu(u)))},_onMenuItemMouseOver:function(e,t){var n=this,r=n._activeMenu,i=n._isRoot(r),s=n.get(H)&&i||!i;n._focusItem(e),n._setActiveItem(e),s&&!n._movingToSubmenu&&n._hideAllSubmenus(r)},_onMenuItemMouseOut:function(e,t){this._clearActiveItem()},_onVerticalMenuKeyDown:function(e){var t=this,n=t._activeMenu,r=t._rootMenu,i=e.target,s=!1,o=e.keyCode,u,f,l,c;switch(o){case 37:f=ot(n),f&&nt(f)?(t._hideMenu(n),l=G(n.get(a)),c=lt(l),c&&(tt(c)?(u=c.next(),u?(t._showMenu(u),t._focusItem(ct(u)),t._setActiveItem(ct(u))):(t._focusItem(c),t._setActiveItem(c))):(t._focusItem(c),t._setActiveItem(c)))):t._isRoot(n)||t._hideMenu(n,!0),s=!0;break;case 39:tt(i)?(u=i.next(),u&&(t._showMenu(u),t._focusItem(ct(u)),t._setActiveItem(ct(u)))):nt(r)&&(u=t._getTopmostSubmenu(n),l=Y(u.get(a)),c=lt(l),t._hideAllSubmenus(r),c&&(tt(c)?(u=c.next(),u?(t._showMenu(u),t._focusItem(ct(u)),t._setActiveItem(ct(u))):(t._focusItem(c),t._setActiveItem(c))):(t._focusItem(c),t._setActiveItem(c)))),s=!0}s&&e.preventDefault()},_onHorizontalMenuKeyDown:function(e){var t=this,n=t._activeMenu,r=e.target,i=lt(r,!0),s=!1,o=e.keyCode,u;o===40&&(t._hideAllSubmenus(n),tt(i)&&(u=i.next(),u&&(t._showMenu(u),t._focusItem(ct(u)),t._setActiveItem(ct(u))),s=!0)),s&&e.preventDefault()},_onMouseMove:function(e){var t=this;r(10,t,function(){t._currentMouseX=e.pageX})},_onMouseOver:function(e){var t=this,n,r,i,s,o;t._blockMouseEvent?t._blockMouseEvent=!1:(n=e.target,r=ut(n,!0),i=ft(n,!0),o=at(n,!0),pt(r,n)&&(t._onMenuMouseOver(r,e),r[m]=!0,r[v]=!1,s=ot(r),s&&(s[v]=!0,s[m]=!1)),pt(i,n)&&(t._onMenuLabelMouseOver(i,e),i[m]=!0,i[v]=!1),pt(o,n)&&(t._onMenuItemMouseOver(o,e),o[m]=!0,o[v]=!1))},_onMouseOut:function(e){var t=this,n=t._activeMenu,r=!1,i,s,o,u,a,f;t._movingToSubmenu=n&&!nt(n)&&e.pageX-5>t._currentMouseX,i=e.target,s=e.relatedTarget,o=ut(i,!0),u=ft(i,!0),f=at(i,!0),dt(u,s)&&(t._onMenuLabelMouseOut(u,e),u[v]=!0,u[m]=!1),dt(f,s)&&(t._onMenuItemMouseOut(f,e),f[v]=!0,f[m]=!1),u&&(a=u.next(),a&&s&&(s.compareTo(a)||a.contains(s))&&(r=!0));if(dt(o,s)||r)t._onMenuMouseOut(o,e),o[v]=!0,o[m]=!1},_toggleSubmenuDisplay:function(e){var t=this,r=e.target,i=ft(r,!0),s=e.type,o,u,a,f,l,c;if(i){o=Z(r)?r:r.ancestor(Z);if(o){a=o.getAttribute("href",2),f=a.indexOf("#"),l=a.length;if(f===0&&l>1){c=a.substr(1,l),u=i.next();if(u&&u.get(p)===c){if(s===w||s===E)(n.opera||n.gecko||n.ie)&&s===E&&!t._preventClickHandle&&(t._preventClickHandle=t._rootMenu.on("click",function(e){e.preventDefault(),t._preventClickHandle.detach(),t._preventClickHandle=null})),s==w&&(e.preventDefault(),e.stopImmediatePropagation(),t._hasFocus=!0),t._isRoot(ot(r))?rt(i)?(t._hideMenu(u),t._focusItem(i),t._setActiveItem(i)):(t._hideAllSubmenus(t._rootMenu),t._showMenu(u),t._focusItem(ct(u)),t._setActiveItem(ct(u))):t._activeItem==i?(t._showMenu(u),t._focusItem(ct(u)),t._setActiveItem(ct(u))):i._clickHandle||(i._clickHandle=i.on("click",function(){t._hideAllSubmenus(t._rootMenu),t._hasFocus=!1,t._clearActiveItem(),i._clickHandle.detach(),i._clickHandle=null}));s===S&&e.preventDefault()}}}}},_onKeyPress:function(e){switch(e.keyCode){case 37:case 38:case 39:case 40:e.preventDefault()}},_onKeyDown:function(e){var t=this,i=t._activeItem,s=e.target,o=ot(s),u;o&&(t._activeMenu=o,nt(o)?t._onHorizontalMenuKeyDown(e):t._onVerticalMenuKeyDown(e),e.keyCode===27&&(t._isRoot(o)?i&&(tt(i)&&rt(i)?(u=i.next(),u&&t._hideMenu(u)):(t._focusManager.blur(),t._clearActiveItem(),t._hasFocus=!1)):(n.opera?r(0,t,function(){t._hideMenu(o,!0)}):t._hideMenu(o,!0),e.stopPropagation(),t._blockMouseEvent=n.gecko?!0:!1)))},_onDocMouseDown:function(e){var t=this,r=t._rootMenu,i=e.target;!r.compareTo(i)&&!r.contains(i)&&(t._hideAllSubmenus(r),n.webkit&&(t._hasFocus=!1,t._clearActiveItem()))}}),e.namespace("Plugin"),e.Plugin.NodeMenuNav=vt},"3.17.2",{requires:["node","classnamemanager","plugin","node-focusmanager"],skinnable:!0}); diff --git a/design/standard/lib/yui/3.17.2/build/node-menunav/node-menunav.js b/design/standard/lib/yui/3.17.2/build/node-menunav/node-menunav.js new file mode 100644 index 0000000..0e6e9df --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/node-menunav/node-menunav.js @@ -0,0 +1,2195 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('node-menunav', function (Y, NAME) { + +/** +*

The MenuNav Node Plugin makes it easy to transform existing list-based +* markup into traditional, drop down navigational menus that are both accessible +* and easy to customize, and only require a small set of dependencies.

+* +* +*

To use the MenuNav Node Plugin, simply pass a reference to the plugin to a +* Node instance's plug method.

+* +*

+* +* <script type="text/javascript">
+*
+* // Call the "use" method, passing in "node-menunav". This will
+* // load the script and CSS for the MenuNav Node Plugin and all of
+* // the required dependencies.
+*
+* YUI().use("node-menunav", function(Y) {
+*
+* // Use the "contentready" event to initialize the menu when
+* // the subtree of element representing the root menu
+* // (<div id="menu-1">) is ready to be scripted.
+*
+* Y.on("contentready", function () {
+*
+* // The scope of the callback will be a Node instance
+* // representing the root menu (<div id="menu-1">).
+* // Therefore, since "this" represents a Node instance, it
+* // is possible to just call "this.plug" passing in a
+* // reference to the MenuNav Node Plugin.
+*
+* this.plug(Y.Plugin.NodeMenuNav);
+*
+* }, "#menu-1");
+*
+* });
+*
+* </script>
+*
+*

+* +*

The MenuNav Node Plugin has several configuration properties that can be +* set via an object literal that is passed as a second argument to a Node +* instance's plug method. +*

+* +*

+* +* <script type="text/javascript">
+*
+* // Call the "use" method, passing in "node-menunav". This will
+* // load the script and CSS for the MenuNav Node Plugin and all of
+* // the required dependencies.
+*
+* YUI().use("node-menunav", function(Y) {
+*
+* // Use the "contentready" event to initialize the menu when
+* // the subtree of element representing the root menu
+* // (<div id="menu-1">) is ready to be scripted.
+*
+* Y.on("contentready", function () {
+*
+* // The scope of the callback will be a Node instance
+* // representing the root menu (<div id="menu-1">).
+* // Therefore, since "this" represents a Node instance, it
+* // is possible to just call "this.plug" passing in a
+* // reference to the MenuNav Node Plugin.
+*
+* this.plug(Y.Plugin.NodeMenuNav, { mouseOutHideDelay: 1000 }); +*

+* }, "#menu-1");
+*
+* });
+*
+* </script>
+*
+*

+* +DEPRECATED. The MenuNav Node Plugin has been deprecated as of YUI 3.9.0. This module will be removed from the library in a future version. If you require functionality similar to the one provided by this module, consider taking a look at the various modules in the YUI Gallery . + +@module node-menunav +@deprecated 3.9.0 +*/ + + + // Util shortcuts + +var UA = Y.UA, + later = Y.later, + getClassName = Y.ClassNameManager.getClassName, + + + + // Frequently used strings + + MENU = "menu", + MENUITEM = "menuitem", + HIDDEN = "hidden", + PARENT_NODE = "parentNode", + CHILDREN = "children", + OFFSET_HEIGHT = "offsetHeight", + OFFSET_WIDTH = "offsetWidth", + PX = "px", + ID = "id", + PERIOD = ".", + HANDLED_MOUSEOUT = "handledMouseOut", + HANDLED_MOUSEOVER = "handledMouseOver", + ACTIVE = "active", + LABEL = "label", + LOWERCASE_A = "a", + MOUSEDOWN = "mousedown", + KEYDOWN = "keydown", + CLICK = "click", + EMPTY_STRING = "", + FIRST_OF_TYPE = "first-of-type", + ROLE = "role", + PRESENTATION = "presentation", + DESCENDANTS = "descendants", + UI = "UI", + ACTIVE_DESCENDANT = "activeDescendant", + USE_ARIA = "useARIA", + ARIA_HIDDEN = "aria-hidden", + CONTENT = "content", + HOST = "host", + ACTIVE_DESCENDANT_CHANGE = ACTIVE_DESCENDANT + "Change", + + + // Attribute keys + + AUTO_SUBMENU_DISPLAY = "autoSubmenuDisplay", + MOUSEOUT_HIDE_DELAY = "mouseOutHideDelay", + + + // CSS class names + + CSS_MENU = getClassName(MENU), + CSS_MENU_HIDDEN = getClassName(MENU, HIDDEN), + CSS_MENU_HORIZONTAL = getClassName(MENU, "horizontal"), + CSS_MENU_LABEL = getClassName(MENU, LABEL), + CSS_MENU_LABEL_ACTIVE = getClassName(MENU, LABEL, ACTIVE), + CSS_MENU_LABEL_MENUVISIBLE = getClassName(MENU, LABEL, (MENU + "visible")), + CSS_MENUITEM = getClassName(MENUITEM), + CSS_MENUITEM_ACTIVE = getClassName(MENUITEM, ACTIVE), + + + // CSS selectors + + MENU_SELECTOR = PERIOD + CSS_MENU, + MENU_TOGGLE_SELECTOR = (PERIOD + getClassName(MENU, "toggle")), + MENU_CONTENT_SELECTOR = PERIOD + getClassName(MENU, CONTENT), + MENU_LABEL_SELECTOR = PERIOD + CSS_MENU_LABEL, + + STANDARD_QUERY = ">" + MENU_CONTENT_SELECTOR + ">ul>li>a", + EXTENDED_QUERY = ">" + MENU_CONTENT_SELECTOR + ">ul>li>" + MENU_LABEL_SELECTOR + ">a:first-child"; + +// Utility functions + + +var getPreviousSibling = function (node) { + + var oPrevious = node.previous(), + oChildren; + + if (!oPrevious) { + oChildren = node.get(PARENT_NODE).get(CHILDREN); + oPrevious = oChildren.item(oChildren.size() - 1); + } + + + return oPrevious; + +}; + + +var getNextSibling = function (node) { + + var oNext = node.next(); + + if (!oNext) { + oNext = node.get(PARENT_NODE).get(CHILDREN).item(0); + } + + return oNext; + +}; + + +var isAnchor = function (node) { + + var bReturnVal = false; + + if (node) { + bReturnVal = node.get("nodeName").toLowerCase() === LOWERCASE_A; + } + + return bReturnVal; + +}; + + +var isMenuItem = function (node) { + + return node.hasClass(CSS_MENUITEM); + +}; + + +var isMenuLabel = function (node) { + + return node.hasClass(CSS_MENU_LABEL); + +}; + + +var isHorizontalMenu = function (menu) { + + return menu.hasClass(CSS_MENU_HORIZONTAL); + +}; + + +var hasVisibleSubmenu = function (menuLabel) { + + return menuLabel.hasClass(CSS_MENU_LABEL_MENUVISIBLE); + +}; + + +var getItemAnchor = function (node) { + + return isAnchor(node) ? node : node.one(LOWERCASE_A); + +}; + + +var getNodeWithClass = function (node, className, searchAncestors) { + + var oItem; + + if (node) { + + if (node.hasClass(className)) { + oItem = node; + } + + if (!oItem && searchAncestors) { + oItem = node.ancestor((PERIOD + className)); + } + + } + + return oItem; + +}; + + +var getParentMenu = function (node) { + + return node.ancestor(MENU_SELECTOR); + +}; + + +var getMenu = function (node, searchAncestors) { + + return getNodeWithClass(node, CSS_MENU, searchAncestors); + +}; + + +var getMenuItem = function (node, searchAncestors) { + + var oItem; + + if (node) { + oItem = getNodeWithClass(node, CSS_MENUITEM, searchAncestors); + } + + return oItem; + +}; + + +var getMenuLabel = function (node, searchAncestors) { + + var oItem; + + if (node) { + + if (searchAncestors) { + oItem = getNodeWithClass(node, CSS_MENU_LABEL, searchAncestors); + } + else { + oItem = getNodeWithClass(node, CSS_MENU_LABEL) || + node.one((PERIOD + CSS_MENU_LABEL)); + } + + } + + return oItem; + +}; + + +var getItem = function (node, searchAncestors) { + + var oItem; + + if (node) { + oItem = getMenuItem(node, searchAncestors) || + getMenuLabel(node, searchAncestors); + } + + return oItem; + +}; + + +var getFirstItem = function (menu) { + + return getItem(menu.one("li")); + +}; + + +var getActiveClass = function (node) { + + return isMenuItem(node) ? CSS_MENUITEM_ACTIVE : CSS_MENU_LABEL_ACTIVE; + +}; + + +var handleMouseOverForNode = function (node, target) { + + return node && !node[HANDLED_MOUSEOVER] && + (node.compareTo(target) || node.contains(target)); + +}; + + +var handleMouseOutForNode = function (node, relatedTarget) { + + return node && !node[HANDLED_MOUSEOUT] && + (!node.compareTo(relatedTarget) && !node.contains(relatedTarget)); + +}; + +/** +* The NodeMenuNav class is a plugin for a Node instance. The class is used via +* the plug method of Node and +* should not be instantiated directly. +* @namespace plugin +* @class NodeMenuNav +*/ +var NodeMenuNav = function () { + + NodeMenuNav.superclass.constructor.apply(this, arguments); + +}; + +NodeMenuNav.NAME = "nodeMenuNav"; +NodeMenuNav.NS = "menuNav"; + + +/** +* @property SHIM_TEMPLATE_TITLE +* @description String representing the value for the title +* attribute for the shim used to prevent <select> elements +* from poking through menus in IE 6. +* @default "Menu Stacking Shim" +* @type String +*/ +NodeMenuNav.SHIM_TEMPLATE_TITLE = "Menu Stacking Shim"; + + +/** +* @property SHIM_TEMPLATE +* @description String representing the HTML used to create the +* <iframe> shim used to prevent +* <select> elements from poking through menus in IE 6. +* @default "<iframe frameborder="0" tabindex="-1" +* class="yui-shim" title="Menu Stacking Shim" +* src="javascript:false;"></iframe>" +* @type String +*/ + +// '; + + +NodeMenuNav.ATTRS = { + + /** + * Boolean indicating if use of the WAI-ARIA Roles and States should be + * enabled for the menu. + * + * @attribute useARIA + * @readOnly + * @writeOnce + * @default true + * @type boolean + */ + useARIA: { + + value: true, + writeOnce: true, + lazyAdd: false, + setter: function (value) { + + var oMenu = this.get(HOST), + oMenuLabel, + oMenuToggle, + oSubmenu, + sID; + + if (value) { + + oMenu.set(ROLE, MENU); + + oMenu.all("ul,li," + MENU_CONTENT_SELECTOR).set(ROLE, PRESENTATION); + + oMenu.all((PERIOD + getClassName(MENUITEM, CONTENT))).set(ROLE, MENUITEM); + + oMenu.all((PERIOD + CSS_MENU_LABEL)).each(function (node) { + + oMenuLabel = node; + oMenuToggle = node.one(MENU_TOGGLE_SELECTOR); + + if (oMenuToggle) { + oMenuToggle.set(ROLE, PRESENTATION); + oMenuLabel = oMenuToggle.previous(); + } + + oMenuLabel.set(ROLE, MENUITEM); + oMenuLabel.set("aria-haspopup", true); + + oSubmenu = node.next(); + + if (oSubmenu) { + + oSubmenu.set(ROLE, MENU); + + oMenuLabel = oSubmenu.previous(); + oMenuToggle = oMenuLabel.one(MENU_TOGGLE_SELECTOR); + + if (oMenuToggle) { + oMenuLabel = oMenuToggle; + } + + sID = Y.stamp(oMenuLabel); + + if (!oMenuLabel.get(ID)) { + oMenuLabel.set(ID, sID); + } + + oSubmenu.set("aria-labelledby", sID); + oSubmenu.set(ARIA_HIDDEN, true); + + } + + }); + + } + + } + + }, + + + /** + * Boolean indicating if submenus are automatically made visible when the + * user mouses over the menu's items. + * + * @attribute autoSubmenuDisplay + * @readOnly + * @writeOnce + * @default true + * @type boolean + */ + autoSubmenuDisplay: { + + value: true, + writeOnce: true + + }, + + + /** + * Number indicating the time (in milliseconds) that should expire before a + * submenu is made visible when the user mouses over the menu's label. + * + * @attribute submenuShowDelay + * @readOnly + * @writeOnce + * @default 250 + * @type Number + */ + submenuShowDelay: { + + value: 250, + writeOnce: true + + }, + + + /** + * Number indicating the time (in milliseconds) that should expire before a + * submenu is hidden when the user mouses out of a menu label heading in the + * direction of a submenu. + * + * @attribute submenuHideDelay + * @readOnly + * @writeOnce + * @default 250 + * @type Number + */ + submenuHideDelay: { + + value: 250, + writeOnce: true + + }, + + + /** + * Number indicating the time (in milliseconds) that should expire before a + * submenu is hidden when the user mouses out of it. + * + * @attribute mouseOutHideDelay + * @readOnly + * @writeOnce + * @default 750 + * @type Number + */ + mouseOutHideDelay: { + + value: 750, + writeOnce: true + + } + +}; + + +Y.extend(NodeMenuNav, Y.Plugin.Base, { + + // Protected properties + + /** + * @property _rootMenu + * @description Node instance representing the root menu in the menu. + * @default null + * @protected + * @type Node + */ + _rootMenu: null, + + + /** + * @property _activeItem + * @description Node instance representing the menu's active descendent: + * the menuitem or menu label the user is currently interacting with. + * @default null + * @protected + * @type Node + */ + _activeItem: null, + + + /** + * @property _activeMenu + * @description Node instance representing the menu that is the parent of + * the menu's active descendent. + * @default null + * @protected + * @type Node + */ + _activeMenu: null, + + + /** + * @property _hasFocus + * @description Boolean indicating if the menu has focus. + * @default false + * @protected + * @type Boolean + */ + _hasFocus: false, + + + // In gecko-based browsers a mouseover and mouseout event will fire even + // if a DOM element moves out from under the mouse without the user + // actually moving the mouse. This bug affects NodeMenuNav because the + // user can hit the Esc key to hide a menu, and if the mouse is over the + // menu when the user presses Esc, the _onMenuMouseOut handler will be + // called. To fix this bug the following flag (_blockMouseEvent) is used + // to block the code in the _onMenuMouseOut handler from executing. + + /** + * @property _blockMouseEvent + * @description Boolean indicating whether or not to handle the + * "mouseover" event. + * @default false + * @protected + * @type Boolean + */ + _blockMouseEvent: false, + + + /** + * @property _currentMouseX + * @description Number representing the current x coordinate of the mouse + * inside the menu. + * @default 0 + * @protected + * @type Number + */ + _currentMouseX: 0, + + + /** + * @property _movingToSubmenu + * @description Boolean indicating if the mouse is moving from a menu + * label to its corresponding submenu. + * @default false + * @protected + * @type Boolean + */ + _movingToSubmenu: false, + + + /** + * @property _showSubmenuTimer + * @description Timer used to show a submenu. + * @default null + * @protected + * @type Object + */ + _showSubmenuTimer: null, + + + /** + * @property _hideSubmenuTimer + * @description Timer used to hide a submenu. + * @default null + * @protected + * @type Object + */ + _hideSubmenuTimer: null, + + + /** + * @property _hideAllSubmenusTimer + * @description Timer used to hide a all submenus. + * @default null + * @protected + * @type Object + */ + _hideAllSubmenusTimer: null, + + + /** + * @property _firstItem + * @description Node instance representing the first item (menuitem or menu + * label) in the root menu of a menu. + * @default null + * @protected + * @type Node + */ + _firstItem: null, + + + // Public methods + + + initializer: function (config) { + + var menuNav = this, + oRootMenu = this.get(HOST), + aHandlers = [], + oDoc; + + + if (oRootMenu) { + + menuNav._rootMenu = oRootMenu; + + oRootMenu.all("ul:first-child").addClass(FIRST_OF_TYPE); + + // Hide all visible submenus + + oRootMenu.all(MENU_SELECTOR).addClass(CSS_MENU_HIDDEN); + + + // Wire up all event handlers + + aHandlers.push(oRootMenu.on("mouseover", menuNav._onMouseOver, menuNav)); + aHandlers.push(oRootMenu.on("mouseout", menuNav._onMouseOut, menuNav)); + aHandlers.push(oRootMenu.on("mousemove", menuNav._onMouseMove, menuNav)); + aHandlers.push(oRootMenu.on(MOUSEDOWN, menuNav._toggleSubmenuDisplay, menuNav)); + aHandlers.push(Y.on("key", menuNav._toggleSubmenuDisplay, oRootMenu, "down:13", menuNav)); + aHandlers.push(oRootMenu.on(CLICK, menuNav._toggleSubmenuDisplay, menuNav)); + aHandlers.push(oRootMenu.on("keypress", menuNav._onKeyPress, menuNav)); + aHandlers.push(oRootMenu.on(KEYDOWN, menuNav._onKeyDown, menuNav)); + + oDoc = oRootMenu.get("ownerDocument"); + + aHandlers.push(oDoc.on(MOUSEDOWN, menuNav._onDocMouseDown, menuNav)); + aHandlers.push(oDoc.on("focus", menuNav._onDocFocus, menuNav)); + + this._eventHandlers = aHandlers; + + menuNav._initFocusManager(); + + } + + + }, + + destructor: function () { + + var aHandlers = this._eventHandlers; + + if (aHandlers) { + + Y.Array.each(aHandlers, function (handle) { + handle.detach(); + }); + + this._eventHandlers = null; + + } + + this.get(HOST).unplug("focusManager"); + + }, + + + + // Protected methods + + /** + * @method _isRoot + * @description Returns a boolean indicating if the specified menu is the + * root menu in the menu. + * @protected + * @param {Node} menu Node instance representing a menu. + * @return {Boolean} Boolean indicating if the specified menu is the root + * menu in the menu. + */ + _isRoot: function (menu) { + + return this._rootMenu.compareTo(menu); + + }, + + + /** + * @method _getTopmostSubmenu + * @description Returns the topmost submenu of a submenu hierarchy. + * @protected + * @param {Node} menu Node instance representing a menu. + * @return {Node} Node instance representing a menu. + */ + _getTopmostSubmenu: function (menu) { + + var menuNav = this, + oMenu = getParentMenu(menu), + returnVal; + + + if (!oMenu) { + returnVal = menu; + } + else if (menuNav._isRoot(oMenu)) { + returnVal = menu; + } + else { + returnVal = menuNav._getTopmostSubmenu(oMenu); + } + + return returnVal; + + }, + + + /** + * @method _clearActiveItem + * @description Clears the menu's active descendent. + * @protected + */ + _clearActiveItem: function () { + + var menuNav = this, + oActiveItem = menuNav._activeItem; + + if (oActiveItem) { + oActiveItem.removeClass(getActiveClass(oActiveItem)); + } + + menuNav._activeItem = null; + + }, + + + /** + * @method _setActiveItem + * @description Sets the specified menuitem or menu label as the menu's + * active descendent. + * @protected + * @param {Node} item Node instance representing a menuitem or menu label. + */ + _setActiveItem: function (item) { + + var menuNav = this; + + if (item) { + + menuNav._clearActiveItem(); + + item.addClass(getActiveClass(item)); + + menuNav._activeItem = item; + + } + + }, + + + /** + * @method _focusItem + * @description Focuses the specified menuitem or menu label. + * @protected + * @param {Node} item Node instance representing a menuitem or menu label. + */ + _focusItem: function (item) { + + var menuNav = this, + oMenu, + oItem; + + if (item && menuNav._hasFocus) { + + oMenu = getParentMenu(item); + oItem = getItemAnchor(item); + + if (oMenu && !oMenu.compareTo(menuNav._activeMenu)) { + menuNav._activeMenu = oMenu; + menuNav._initFocusManager(); + } + + menuNav._focusManager.focus(oItem); + + } + + }, + + + /** + * @method _showMenu + * @description Shows the specified menu. + * @protected + * @param {Node} menu Node instance representing a menu. + */ + _showMenu: function (menu) { + + var oParentMenu = getParentMenu(menu), + oLI = menu.get(PARENT_NODE), + aXY = oLI.getXY(); + + + if (this.get(USE_ARIA)) { + menu.set(ARIA_HIDDEN, false); + } + + + if (isHorizontalMenu(oParentMenu)) { + aXY[1] = aXY[1] + oLI.get(OFFSET_HEIGHT); + } + else { + aXY[0] = aXY[0] + oLI.get(OFFSET_WIDTH); + } + + menu.setXY(aXY); + + if (UA.ie && UA.ie < 8) { + + if (UA.ie === 6 && !menu.hasIFrameShim) { + + menu.appendChild(Y.Node.create(NodeMenuNav.SHIM_TEMPLATE)); + menu.hasIFrameShim = true; + + } + + // Clear previous values for height and width + + menu.setStyles({ height: EMPTY_STRING, width: EMPTY_STRING }); + + // Set the width and height of the menu's bounding box - this is + // necessary for IE 6 so that the CSS for the ';",""," Shim.prototype = {"," init: function(config) {"," this._host = config.host;"," this.initEvents();"," this.insert();"," this.sync();"," },",""," initEvents: function() {"," this._resizeHandle = this._host.on('resize', this.sync, this);"," },",""," getShim: function() {"," return this._shim || ("," this._shim = Y.Node.create("," Shim.TEMPLATE,"," this._host.get('ownerDocument')"," )"," );"," },",""," insert: function() {"," var node = this._host;"," this._shim = node.insertBefore( this.getShim(),"," node.get('firstChild'));"," },",""," /**"," * Updates the size of the shim to fill its container"," * @method sync"," */"," sync: function() {"," var shim = this._shim,"," node = this._host;",""," if (shim) {"," shim.setAttrs({"," width: node.getStyle('width'),"," height: node.getStyle('height')"," });"," }"," },",""," /**"," * Removes the shim and destroys the plugin"," * @method destroy"," */"," destroy: function() {"," var shim = this._shim;"," if (shim) {"," shim.remove(true);"," }",""," this._resizeHandle.detach();"," }"," };",""," Shim.NAME = 'Shim';"," Shim.NS = 'shim';",""," Y.namespace('Plugin');"," Y.Plugin.Shim = Shim;","","","}, '3.17.2', {\"requires\": [\"node-style\", \"node-pluginhost\"]});","","}());"]}; +} +var __cov_R4W8zUmQ9p7fw_$mChjLrw = __coverage__['build/shim-plugin/shim-plugin.js']; +__cov_R4W8zUmQ9p7fw_$mChjLrw.s['1']++;YUI.add('shim-plugin',function(Y,NAME){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['1']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['2']++;function Shim(config){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['2']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['3']++;this.init(config);}__cov_R4W8zUmQ9p7fw_$mChjLrw.s['4']++;Shim.CLASS_NAME='yui-node-shim';__cov_R4W8zUmQ9p7fw_$mChjLrw.s['5']++;Shim.TEMPLATE='';__cov_R4W8zUmQ9p7fw_$mChjLrw.s['6']++;Shim.prototype={init:function(config){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['3']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['7']++;this._host=config.host;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['8']++;this.initEvents();__cov_R4W8zUmQ9p7fw_$mChjLrw.s['9']++;this.insert();__cov_R4W8zUmQ9p7fw_$mChjLrw.s['10']++;this.sync();},initEvents:function(){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['4']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['11']++;this._resizeHandle=this._host.on('resize',this.sync,this);},getShim:function(){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['5']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['12']++;return(__cov_R4W8zUmQ9p7fw_$mChjLrw.b['1'][0]++,this._shim)||(__cov_R4W8zUmQ9p7fw_$mChjLrw.b['1'][1]++,this._shim=Y.Node.create(Shim.TEMPLATE,this._host.get('ownerDocument')));},insert:function(){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['6']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['13']++;var node=this._host;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['14']++;this._shim=node.insertBefore(this.getShim(),node.get('firstChild'));},sync:function(){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['7']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['15']++;var shim=this._shim,node=this._host;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['16']++;if(shim){__cov_R4W8zUmQ9p7fw_$mChjLrw.b['2'][0]++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['17']++;shim.setAttrs({width:node.getStyle('width'),height:node.getStyle('height')});}else{__cov_R4W8zUmQ9p7fw_$mChjLrw.b['2'][1]++;}},destroy:function(){__cov_R4W8zUmQ9p7fw_$mChjLrw.f['8']++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['18']++;var shim=this._shim;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['19']++;if(shim){__cov_R4W8zUmQ9p7fw_$mChjLrw.b['3'][0]++;__cov_R4W8zUmQ9p7fw_$mChjLrw.s['20']++;shim.remove(true);}else{__cov_R4W8zUmQ9p7fw_$mChjLrw.b['3'][1]++;}__cov_R4W8zUmQ9p7fw_$mChjLrw.s['21']++;this._resizeHandle.detach();}};__cov_R4W8zUmQ9p7fw_$mChjLrw.s['22']++;Shim.NAME='Shim';__cov_R4W8zUmQ9p7fw_$mChjLrw.s['23']++;Shim.NS='shim';__cov_R4W8zUmQ9p7fw_$mChjLrw.s['24']++;Y.namespace('Plugin');__cov_R4W8zUmQ9p7fw_$mChjLrw.s['25']++;Y.Plugin.Shim=Shim;},'3.17.2',{'requires':['node-style','node-pluginhost']}); diff --git a/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin-debug.js b/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin-debug.js new file mode 100644 index 0000000..96663f5 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin-debug.js @@ -0,0 +1,113 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('shim-plugin', function (Y, NAME) { + + /** + * Provides shimming support for Node via a Plugin. + * This fixes SELECT bleedthrough for IE6 & Mac scrollbars + * @module shim-plugin + */ + + /** + * Node plugin which can be used to add shim support. + * + * @class Plugin.Shim + * @param {Object} User configuration object + */ + function Shim(config) { + this.init(config); + } + + /** + * Default class used to mark the shim element + * + * @property CLASS_NAME + * @type String + * @static + * @default "yui-node-shim" + */ + // TODO: use ClassNameManager + Shim.CLASS_NAME = 'yui-node-shim'; + + /** + * Default markup template used to generate the shim element. + * + * @property TEMPLATE + * @type String + * @static + */ + Shim.TEMPLATE = ''; + + Shim.prototype = { + init: function(config) { + this._host = config.host; + this.initEvents(); + this.insert(); + this.sync(); + }, + + initEvents: function() { + this._resizeHandle = this._host.on('resize', this.sync, this); + }, + + getShim: function() { + return this._shim || ( + this._shim = Y.Node.create( + Shim.TEMPLATE, + this._host.get('ownerDocument') + ) + ); + }, + + insert: function() { + var node = this._host; + this._shim = node.insertBefore( this.getShim(), + node.get('firstChild')); + }, + + /** + * Updates the size of the shim to fill its container + * @method sync + */ + sync: function() { + var shim = this._shim, + node = this._host; + + if (shim) { + shim.setAttrs({ + width: node.getStyle('width'), + height: node.getStyle('height') + }); + } + }, + + /** + * Removes the shim and destroys the plugin + * @method destroy + */ + destroy: function() { + var shim = this._shim; + if (shim) { + shim.remove(true); + } + + this._resizeHandle.detach(); + } + }; + + Shim.NAME = 'Shim'; + Shim.NS = 'shim'; + + Y.namespace('Plugin'); + Y.Plugin.Shim = Shim; + + +}, '3.17.2', {"requires": ["node-style", "node-pluginhost"]}); diff --git a/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin-min.js b/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin-min.js new file mode 100644 index 0000000..d01e7ab --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("shim-plugin",function(e,t){function n(e){this.init(e)}n.CLASS_NAME="yui-node-shim",n.TEMPLATE='',n.prototype={init:function(e){this._host=e.host,this.initEvents(),this.insert(),this.sync()},initEvents:function(){this._resizeHandle=this._host.on("resize",this.sync,this)},getShim:function(){return this._shim||(this._shim=e.Node.create(n.TEMPLATE,this._host.get("ownerDocument")))},insert:function(){var e=this._host;this._shim=e.insertBefore(this.getShim(),e.get("firstChild"))},sync:function(){var e=this._shim,t=this._host;e&&e.setAttrs({width:t.getStyle("width"),height:t.getStyle("height")})},destroy:function(){var e=this._shim;e&&e.remove(!0),this._resizeHandle.detach()}},n.NAME="Shim",n.NS="shim",e.namespace("Plugin"),e.Plugin.Shim=n},"3.17.2",{requires:["node-style","node-pluginhost"]}); diff --git a/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin.js b/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin.js new file mode 100644 index 0000000..96663f5 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/shim-plugin/shim-plugin.js @@ -0,0 +1,113 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('shim-plugin', function (Y, NAME) { + + /** + * Provides shimming support for Node via a Plugin. + * This fixes SELECT bleedthrough for IE6 & Mac scrollbars + * @module shim-plugin + */ + + /** + * Node plugin which can be used to add shim support. + * + * @class Plugin.Shim + * @param {Object} User configuration object + */ + function Shim(config) { + this.init(config); + } + + /** + * Default class used to mark the shim element + * + * @property CLASS_NAME + * @type String + * @static + * @default "yui-node-shim" + */ + // TODO: use ClassNameManager + Shim.CLASS_NAME = 'yui-node-shim'; + + /** + * Default markup template used to generate the shim element. + * + * @property TEMPLATE + * @type String + * @static + */ + Shim.TEMPLATE = ''; + + Shim.prototype = { + init: function(config) { + this._host = config.host; + this.initEvents(); + this.insert(); + this.sync(); + }, + + initEvents: function() { + this._resizeHandle = this._host.on('resize', this.sync, this); + }, + + getShim: function() { + return this._shim || ( + this._shim = Y.Node.create( + Shim.TEMPLATE, + this._host.get('ownerDocument') + ) + ); + }, + + insert: function() { + var node = this._host; + this._shim = node.insertBefore( this.getShim(), + node.get('firstChild')); + }, + + /** + * Updates the size of the shim to fill its container + * @method sync + */ + sync: function() { + var shim = this._shim, + node = this._host; + + if (shim) { + shim.setAttrs({ + width: node.getStyle('width'), + height: node.getStyle('height') + }); + } + }, + + /** + * Removes the shim and destroys the plugin + * @method destroy + */ + destroy: function() { + var shim = this._shim; + if (shim) { + shim.remove(true); + } + + this._resizeHandle.detach(); + } + }; + + Shim.NAME = 'Shim'; + Shim.NS = 'shim'; + + Y.namespace('Plugin'); + Y.Plugin.Shim = Shim; + + +}, '3.17.2', {"requires": ["node-style", "node-pluginhost"]}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/rail-x.png new file mode 100644 index 0000000..4cd29b4 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/rail-y.png new file mode 100644 index 0000000..9bcd212 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-base-skin.css new file mode 100644 index 0000000..2682ae7 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-base-skin.css @@ -0,0 +1,98 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-x.png */ + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail, +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail { + height: 35px; + background-position: 0 7px; +} +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb { + height: 35px; + width: 19px; +} + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 13px; + left: -5px; + width: 5px; + top: 7px; +} +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 13px; + right: -5px; + width: 5px; + top: 7px; +} + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -3px; +} +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -43px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-y.png */ + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail, +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail { + width: 35px; + background-position: 7px 0; +} +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb { + width: 35px; + height: 19px; +} + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 13px; + top: -5px; + height: 5px; + left: 7px; +} +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 13px; + bottom: -5px; + height: 5px; + left: 7px; +} + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb-image { + left: -3px; + top: 0; +} +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb-shadow { + left: -43px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-base.css new file mode 100644 index 0000000..52bd5c3 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail,.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail{height:35px;background-position:0 7px}.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb{height:35px;width:19px}.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:13px;left:-5px;width:5px;top:7px}.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:13px;right:-5px;width:5px;top:7px}.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-3px}.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-43px}.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail,.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail{width:35px;background-position:7px 0}.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb{width:35px;height:19px}.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:13px;top:-5px;height:5px;left:7px}.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:13px;bottom:-5px;height:5px;left:7px}.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb-image{left:-3px;top:0}.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb-shadow{left:-43px;opacity:.15;filter:alpha(opacity=15);top:0}#yui3-css-stamp.skin-audio-light-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-skin.css new file mode 100644 index 0000000..2682ae7 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/slider-skin.css @@ -0,0 +1,98 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-x.png */ + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail, +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail { + height: 35px; + background-position: 0 7px; +} +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb { + height: 35px; + width: 19px; +} + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 13px; + left: -5px; + width: 5px; + top: 7px; +} +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 13px; + right: -5px; + width: 5px; + top: 7px; +} + +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -3px; +} +.yui3-skin-audio-light .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -43px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-y.png */ + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail, +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail { + width: 35px; + background-position: 7px 0; +} +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb { + width: 35px; + height: 19px; +} + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 13px; + top: -5px; + height: 5px; + left: 7px; +} +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 13px; + bottom: -5px; + height: 5px; + left: 7px; +} + +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb-image { + left: -3px; + top: 0; +} +.yui3-skin-audio-light .yui3-slider-y .yui3-slider-thumb-shadow { + left: -43px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/thumb-x.png new file mode 100644 index 0000000..f9f69a8 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/thumb-y.png new file mode 100644 index 0000000..20120d3 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio-light/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/rail-x.png new file mode 100644 index 0000000..dc37bb2 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/rail-y.png new file mode 100644 index 0000000..7bb0d90 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-base-skin.css new file mode 100644 index 0000000..f9dd2d5 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-base-skin.css @@ -0,0 +1,98 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-x.png */ + +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail, +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail { + height: 35px; + background-position: 0 7px; +} +.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb { + height: 35px; + width: 19px; +} + +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 13px; + left: -5px; + width: 5px; + top: 7px; +} +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 13px; + right: -5px; + width: 5px; + top: 7px; +} + +.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -3px; +} +.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -43px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-y.png */ + +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail, +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail { + width: 35px; + background-position: 7px 0; +} +.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb { + width: 35px; + height: 19px; +} + +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 13px; + top: -5px; + height: 5px; + left: 7px; +} +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 13px; + bottom: -5px; + height: 5px; + left: 7px; +} + +.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb-image { + left: -3px; + top: 0; +} +.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb-shadow { + left: -43px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-base.css new file mode 100644 index 0000000..81df7a8 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-audio .yui3-slider-x .yui3-slider-rail,.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-audio .yui3-slider-x .yui3-slider-rail{height:35px;background-position:0 7px}.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb{height:35px;width:19px}.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:13px;left:-5px;width:5px;top:7px}.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:13px;right:-5px;width:5px;top:7px}.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-3px}.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-43px}.yui3-skin-audio .yui3-slider-y .yui3-slider-rail,.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-audio .yui3-slider-y .yui3-slider-rail{width:35px;background-position:7px 0}.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb{width:35px;height:19px}.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:13px;top:-5px;height:5px;left:7px}.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:13px;bottom:-5px;height:5px;left:7px}.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb-image{left:-3px;top:0}.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb-shadow{left:-43px;opacity:.15;filter:alpha(opacity=15);top:0}#yui3-css-stamp.skin-audio-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-skin.css new file mode 100644 index 0000000..f9dd2d5 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/slider-skin.css @@ -0,0 +1,98 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-x.png */ + +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail, +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail { + height: 35px; + background-position: 0 7px; +} +.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb { + height: 35px; + width: 19px; +} + +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 13px; + left: -5px; + width: 5px; + top: 7px; +} +.yui3-skin-audio .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 13px; + right: -5px; + width: 5px; + top: 7px; +} + +.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -3px; +} +.yui3-skin-audio .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -43px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/audio/thumb-y.png */ + +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail, +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail { + width: 35px; + background-position: 7px 0; +} +.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb { + width: 35px; + height: 19px; +} + +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 13px; + top: -5px; + height: 5px; + left: 7px; +} +.yui3-skin-audio .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 13px; + bottom: -5px; + height: 5px; + left: 7px; +} + +.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb-image { + left: -3px; + top: 0; +} +.yui3-skin-audio .yui3-slider-y .yui3-slider-thumb-shadow { + left: -43px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/thumb-x.png new file mode 100644 index 0000000..e0fbfb2 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/thumb-y.png new file mode 100644 index 0000000..38dfc3f Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/audio/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x-dots.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x-dots.png new file mode 100644 index 0000000..453fb64 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x-dots.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x-lines.png new file mode 100644 index 0000000..8a3c981 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x.png new file mode 100644 index 0000000..f1aa290 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y-dots.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y-dots.png new file mode 100644 index 0000000..0555b19 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y-dots.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y-lines.png new file mode 100644 index 0000000..178aa85 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y.png new file mode 100644 index 0000000..a47997f Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-base-skin.css new file mode 100644 index 0000000..e297d8b --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-base-skin.css @@ -0,0 +1,98 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-x-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-y-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-base.css new file mode 100644 index 0000000..803b359 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail,.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail{height:25px}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb{height:30px;width:14px}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail,.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail{width:25px}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb{width:30px;height:14px}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0}#yui3-css-stamp.skin-capsule-dark-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-skin.css new file mode 100644 index 0000000..e297d8b --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/slider-skin.css @@ -0,0 +1,98 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-x-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule-dark/thumb-y-line.png */ + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule-dark .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-x-line.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-x-line.png new file mode 100644 index 0000000..bfdbe0d Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-x-line.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-x.png new file mode 100644 index 0000000..abed025 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-y-line.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-y-line.png new file mode 100644 index 0000000..037dca3 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-y-line.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-y.png new file mode 100644 index 0000000..e968ed4 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule-dark/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x-dots.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x-dots.png new file mode 100644 index 0000000..b3f65d4 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x-dots.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x-lines.png new file mode 100644 index 0000000..26374df Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x.png new file mode 100644 index 0000000..f257ec0 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y-dots.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y-dots.png new file mode 100644 index 0000000..798c2ce Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y-dots.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y-lines.png new file mode 100644 index 0000000..798c2ce Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y.png new file mode 100644 index 0000000..d20d3c3 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-base-skin.css new file mode 100644 index 0000000..97f7490 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-base-skin.css @@ -0,0 +1,100 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule/thumb-x-line.png */ + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule/thumb-y-line.png */ + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-base.css new file mode 100644 index 0000000..03b50f9 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail,.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x;background-repeat:repeat-x}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail{height:25px}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb{height:30px;width:14px}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail,.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y;background-repeat:repeat-y}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail{width:25px}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb{width:30px;height:14px}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0}#yui3-css-stamp.skin-capsule-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-skin.css new file mode 100644 index 0000000..97f7490 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/slider-skin.css @@ -0,0 +1,100 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule/thumb-x-line.png */ + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + background-repeat: repeat-x; + /* alternate: rail-x-dots.png */ + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb { + height: 30px; + width: 14px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-capsule .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/capsule/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/capsule/thumb-y-line.png */ + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + background-repeat: repeat-y; + /* alternate: rail-y-dots.png */ + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb { + width: 30px; + height: 14px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-capsule .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-x-line.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-x-line.png new file mode 100644 index 0000000..849a454 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-x-line.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-x.png new file mode 100644 index 0000000..09baa96 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y-line.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y-line.png new file mode 100644 index 0000000..153c65b Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y-line.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y-lines.png new file mode 100644 index 0000000..4421d70 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y.png new file mode 100644 index 0000000..4040ee3 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/capsule/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-x-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-x-lines.png new file mode 100644 index 0000000..4e5a440 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-x-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-x.png new file mode 100644 index 0000000..7079de6 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-y-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-y-lines.png new file mode 100644 index 0000000..af2bc24 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-y-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-y.png new file mode 100644 index 0000000..bc096bc Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-base-skin.css new file mode 100644 index 0000000..faed6ef --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-base-skin.css @@ -0,0 +1,94 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/night/thumb-x.png */ + +.yui3-skin-night .yui3-slider-x .yui3-slider-rail, +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-night .yui3-slider-x .yui3-slider-rail { + height: 25px; +} +.yui3-skin-night .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 21px; +} + +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -5px; + width: 5px; +} +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -5px; + width: 5px; +} + +.yui3-skin-night .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-night .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/night/thumb-y.png */ + +.yui3-skin-night .yui3-slider-y .yui3-slider-rail, +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-night .yui3-slider-y .yui3-slider-rail { + width: 25px; +} +.yui3-skin-night .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 21px; +} + +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -5px; + height: 5px; +} +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -5px; + height: 5px; +} + +.yui3-skin-night .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-night .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-base.css new file mode 100644 index 0000000..9aa9ebb --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-night .yui3-slider-x .yui3-slider-rail,.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-night .yui3-slider-x .yui3-slider-rail{height:25px}.yui3-skin-night .yui3-slider-x .yui3-slider-thumb{height:26px;width:21px}.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-5px;width:5px}.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-5px;width:5px}.yui3-skin-night .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-night .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-night .yui3-slider-y .yui3-slider-rail,.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-night .yui3-slider-y .yui3-slider-rail{width:25px}.yui3-skin-night .yui3-slider-y .yui3-slider-thumb{width:26px;height:21px}.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-5px;height:5px}.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-5px;height:5px}.yui3-skin-night .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-night .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0}#yui3-css-stamp.skin-night-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-skin.css new file mode 100644 index 0000000..c13f108 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/slider-skin.css @@ -0,0 +1,94 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam-dark/thumb-x.png */ + +.yui3-skin-night .yui3-slider-x .yui3-slider-rail, +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-night .yui3-slider-x .yui3-slider-rail { + height: 26px; +} +.yui3-skin-night .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 21px; +} + +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-night .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-night .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-night .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam-dark/thumb-y.png */ + +.yui3-skin-night .yui3-slider-y .yui3-slider-rail, +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-night .yui3-slider-y .yui3-slider-rail { + width: 26px; +} +.yui3-skin-night .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 15px; +} + +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-night .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-night .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-night .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/thumb-x.png new file mode 100644 index 0000000..2045257 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/thumb-y.png new file mode 100644 index 0000000..5ea57f0 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/night/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/rail-x.png new file mode 100644 index 0000000..ce0ee50 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/rail-y.png new file mode 100644 index 0000000..7fedc21 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-base-skin.css new file mode 100644 index 0000000..215c670 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-base-skin.css @@ -0,0 +1,96 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round-dark/thumb-x-grip.png */ + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; + background-position: 0 3px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 24px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -17px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -37px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -7px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -47px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round-dark/thumb-y-grip.png */ + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; + background-position: 3px 0; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 24px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -17px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -37px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-image { + top: 0; + left: -7px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-shadow { + top: 0; + left: -47px; + opacity: 0.15; + filter: alpha(opacity=15); +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-base.css new file mode 100644 index 0000000..7bcf5e3 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail,.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail{height:25px;background-position:0 3px}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb{height:26px;width:24px}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -17px;height:20px;left:-2px;width:5px}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -37px;height:20px;right:-2px;width:5px}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-7px}.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-47px}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail,.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail{width:25px;background-position:3px 0}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb{width:26px;height:24px}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-17px 0;width:20px;top:-2px;height:5px}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-37px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-image{top:0;left:-7px}.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-shadow{top:0;left:-47px;opacity:.15;filter:alpha(opacity=15)}#yui3-css-stamp.skin-round-dark-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-skin.css new file mode 100644 index 0000000..215c670 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/slider-skin.css @@ -0,0 +1,96 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round-dark/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round-dark/thumb-x-grip.png */ + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail { + height: 25px; + background-position: 0 3px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 24px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -17px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -37px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -7px; +} +.yui3-skin-round-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -47px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round-dark/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round-dark/thumb-y-grip.png */ + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail { + width: 25px; + background-position: 3px 0; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 24px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -17px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -37px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-image { + top: 0; + left: -7px; +} +.yui3-skin-round-dark .yui3-slider-y .yui3-slider-thumb-shadow { + top: 0; + left: -47px; + opacity: 0.15; + filter: alpha(opacity=15); +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-x-grip.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-x-grip.png new file mode 100644 index 0000000..858964b Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-x-grip.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-x.png new file mode 100644 index 0000000..df18170 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-y-grip.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-y-grip.png new file mode 100644 index 0000000..2773a4a Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-y-grip.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-y.png new file mode 100644 index 0000000..8ed649c Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round-dark/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/rail-x.png new file mode 100644 index 0000000..62a4e92 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/rail-y.png new file mode 100644 index 0000000..86f0b8c Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-base-skin.css new file mode 100644 index 0000000..f60a223 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-base-skin.css @@ -0,0 +1,96 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round/thumb-x-grip.png */ + +.yui3-skin-round .yui3-slider-x .yui3-slider-rail, +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-round .yui3-slider-x .yui3-slider-rail { + height: 25px; + background-position: 0 3px; +} +.yui3-skin-round .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 24px; +} + +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -17px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -37px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-round .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -7px; +} +.yui3-skin-round .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -47px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round/thumb-y-grip.png */ + +.yui3-skin-round .yui3-slider-y .yui3-slider-rail, +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-round .yui3-slider-y .yui3-slider-rail { + width: 25px; + background-position: 3px 0; +} +.yui3-skin-round .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 24px; +} + +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -17px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -37px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-round .yui3-slider-y .yui3-slider-thumb-image { + top: 0; + left: -8px; +} +.yui3-skin-round .yui3-slider-y .yui3-slider-thumb-shadow { + top: 0; + left: -48px; + opacity: 0.15; + filter: alpha(opacity=15); +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-base.css new file mode 100644 index 0000000..a3cec70 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-round .yui3-slider-x .yui3-slider-rail,.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-round .yui3-slider-x .yui3-slider-rail{height:25px;background-position:0 3px}.yui3-skin-round .yui3-slider-x .yui3-slider-thumb{height:26px;width:24px}.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -17px;height:20px;left:-2px;width:5px}.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -37px;height:20px;right:-2px;width:5px}.yui3-skin-round .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-7px}.yui3-skin-round .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-47px}.yui3-skin-round .yui3-slider-y .yui3-slider-rail,.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-round .yui3-slider-y .yui3-slider-rail{width:25px;background-position:3px 0}.yui3-skin-round .yui3-slider-y .yui3-slider-thumb{width:26px;height:24px}.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-17px 0;width:20px;top:-2px;height:5px}.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-37px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-round .yui3-slider-y .yui3-slider-thumb-image{top:0;left:-8px}.yui3-skin-round .yui3-slider-y .yui3-slider-thumb-shadow{top:0;left:-48px;opacity:.15;filter:alpha(opacity=15)}#yui3-css-stamp.skin-round-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-skin.css new file mode 100644 index 0000000..f60a223 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/slider-skin.css @@ -0,0 +1,96 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round/thumb-x.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round/thumb-x-grip.png */ + +.yui3-skin-round .yui3-slider-x .yui3-slider-rail, +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; +} + +.yui3-skin-round .yui3-slider-x .yui3-slider-rail { + height: 25px; + background-position: 0 3px; +} +.yui3-skin-round .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 24px; +} + +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -17px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-round .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -37px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-round .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -7px; +} +.yui3-skin-round .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -47px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/round/thumb-y.png */ +/* Alternate thumbUrl /build/slider-base/assets/skins/round/thumb-y-grip.png */ + +.yui3-skin-round .yui3-slider-y .yui3-slider-rail, +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; +} + +.yui3-skin-round .yui3-slider-y .yui3-slider-rail { + width: 25px; + background-position: 3px 0; +} +.yui3-skin-round .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 24px; +} + +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -17px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-round .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -37px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-round .yui3-slider-y .yui3-slider-thumb-image { + top: 0; + left: -8px; +} +.yui3-skin-round .yui3-slider-y .yui3-slider-thumb-shadow { + top: 0; + left: -48px; + opacity: 0.15; + filter: alpha(opacity=15); +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-x-grip.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-x-grip.png new file mode 100644 index 0000000..b80b8ac Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-x-grip.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-x.png new file mode 100644 index 0000000..22ac2a5 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-y-grip.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-y-grip.png new file mode 100644 index 0000000..1bf7ff3 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-y-grip.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-y.png new file mode 100644 index 0000000..a8a0c62 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/round/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-x-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-x-lines.png new file mode 100644 index 0000000..39ac404 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-x-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-x.png new file mode 100644 index 0000000..bdbc07c Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-y-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-y-lines.png new file mode 100644 index 0000000..0553faa Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-y-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-y.png new file mode 100644 index 0000000..a291342 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-base-skin.css new file mode 100644 index 0000000..60183f5 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-base-skin.css @@ -0,0 +1,94 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam-dark/thumb-x.png */ + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail { + height: 26px; +} +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 15px; +} + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam-dark/thumb-y.png */ + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail { + width: 26px; +} +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 15px; +} + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-base.css new file mode 100644 index 0000000..ea12b36 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail,.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail{height:26px}.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb{height:26px;width:15px}.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail,.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail{width:26px}.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb{width:26px;height:15px}.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0}#yui3-css-stamp.skin-sam-dark-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-skin.css new file mode 100644 index 0000000..60183f5 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/slider-skin.css @@ -0,0 +1,94 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam-dark/thumb-x.png */ + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail, +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail { + height: 26px; +} +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 15px; +} + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-sam-dark .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam-dark/thumb-y.png */ + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail, +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail { + width: 26px; +} +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 15px; +} + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-sam-dark .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/thumb-x.png new file mode 100644 index 0000000..3526ffc Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/thumb-y.png new file mode 100644 index 0000000..9aad18b Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam-dark/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-x-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-x-lines.png new file mode 100644 index 0000000..45c8428 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-x-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-x.png new file mode 100644 index 0000000..b99e104 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-y-lines.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-y-lines.png new file mode 100644 index 0000000..841c970 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-y-lines.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-y.png new file mode 100644 index 0000000..2bec78a Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/rail-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-base-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-base-skin.css new file mode 100644 index 0000000..db8b4ec --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-base-skin.css @@ -0,0 +1,94 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam/thumb-x.png */ + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail { + height: 26px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 15px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam/thumb-y.png */ + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail { + width: 26px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 15px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-base.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-base.css new file mode 100644 index 0000000..9664d88 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-base.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail{height:26px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb{height:26px;width:15px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail{width:26px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb{width:26px;height:15px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0}#yui3-css-stamp.skin-sam-slider-base{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-skin.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-skin.css new file mode 100644 index 0000000..db8b4ec --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/slider-skin.css @@ -0,0 +1,94 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Horizontal Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam/thumb-x.png */ + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left, +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-image: url(rail-x.png); + background-repeat: repeat-x; + /* alternate: rail-x-lines.png */ +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail { + height: 26px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb { + height: 26px; + width: 15px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left { + background-position: 0 -20px; + height: 20px; + left: -2px; + width: 5px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right { + background-position: 0 -40px; + height: 20px; + right: -2px; + width: 5px; +} + +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image { + left: 0; + top: -10px; +} +.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow { + left: 0; + opacity: 0.15; + filter: alpha(opacity=15); + top: -50px; +} + +/* Vertical Slider */ + +/* Use thumbUrl /build/slider-base/assets/skins/sam/thumb-y.png */ + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top, +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-image: url(rail-y.png); + background-repeat: repeat-y; + /* alternate: rail-y-lines.png */ +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail { + width: 26px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb { + width: 26px; + height: 15px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top { + background-position: -20px 0; + width: 20px; + top: -2px; + height: 5px; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom { + background-position: -40px 0; + width: 20px; + bottom: -2px; + height: 5px; +} + +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image { + left: -10px; + top: 0; +} +.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow { + left: -50px; + opacity: 0.15; + filter: alpha(opacity=15); + top: 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/thumb-x.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/thumb-x.png new file mode 100644 index 0000000..4d4bcbd Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/thumb-x.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/thumb-y.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/thumb-y.png new file mode 100644 index 0000000..0b17a0e Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/skins/sam/thumb-y.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/slider-base-core.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/slider-base-core.css new file mode 100644 index 0000000..cab6ff3 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/slider-base-core.css @@ -0,0 +1,38 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider, +.yui3-slider-rail { + /* xbrowser inline-block styles */ + display: -moz-inline-stack; /* FF2 */ + display: inline-block; + *display: inline; /* IE 7- (with zoom) */ + zoom: 1; + vertical-align: middle; +} + +.yui3-slider-content { + position: relative; + display: block; +} +.yui3-slider-rail { + position: relative; +} + +.yui3-slider-rail-cap-top, +.yui3-slider-rail-cap-left, +.yui3-slider-rail-cap-bottom, +.yui3-slider-rail-cap-right, +.yui3-slider-thumb, +.yui3-slider-thumb-image, +.yui3-slider-thumb-shadow { + position: absolute; +} + +.yui3-slider-thumb { + overflow: hidden; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/slider-core.css b/design/standard/lib/yui/3.17.2/build/slider-base/assets/slider-core.css new file mode 100644 index 0000000..cab6ff3 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/assets/slider-core.css @@ -0,0 +1,38 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-slider, +.yui3-slider-rail { + /* xbrowser inline-block styles */ + display: -moz-inline-stack; /* FF2 */ + display: inline-block; + *display: inline; /* IE 7- (with zoom) */ + zoom: 1; + vertical-align: middle; +} + +.yui3-slider-content { + position: relative; + display: block; +} +.yui3-slider-rail { + position: relative; +} + +.yui3-slider-rail-cap-top, +.yui3-slider-rail-cap-left, +.yui3-slider-rail-cap-bottom, +.yui3-slider-rail-cap-right, +.yui3-slider-thumb, +.yui3-slider-thumb-image, +.yui3-slider-thumb-shadow { + position: absolute; +} + +.yui3-slider-thumb { + overflow: hidden; +} diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong-dark.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong-dark.png new file mode 100644 index 0000000..bc0aa14 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong-dark.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong.png new file mode 100644 index 0000000..670ba1e Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong2-dark.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong2-dark.png new file mode 100644 index 0000000..20f1260 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong2-dark.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong2.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong2.png new file mode 100644 index 0000000..76e34e6 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-x-oblong2.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong-dark.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong-dark.png new file mode 100644 index 0000000..a0eed70 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong-dark.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong.png new file mode 100644 index 0000000..e63c8d7 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong2-dark.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong2-dark.png new file mode 100644 index 0000000..e91ffb7 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong2-dark.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong2.png b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong2.png new file mode 100644 index 0000000..89a4667 Binary files /dev/null and b/design/standard/lib/yui/3.17.2/build/slider-base/assets/thumb-y-oblong2.png differ diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-coverage.js b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-coverage.js new file mode 100644 index 0000000..9843436 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/slider-base/slider-base.js']) { + __coverage__['build/slider-base/slider-base.js'] = {"path":"build/slider-base/slider-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0,0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":42}}},"2":{"name":"SliderBase","line":25,"loc":{"start":{"line":25,"column":0},"end":{"line":25,"column":22}}},"3":{"name":"(anonymous_3)","line":39,"loc":{"start":{"line":39,"column":18},"end":{"line":39,"column":30}}},"4":{"name":"(anonymous_4)","line":100,"loc":{"start":{"line":100,"column":15},"end":{"line":100,"column":27}}},"5":{"name":"(anonymous_5)","line":139,"loc":{"start":{"line":139,"column":16},"end":{"line":139,"column":28}}},"6":{"name":"(anonymous_6)","line":158,"loc":{"start":{"line":158,"column":22},"end":{"line":158,"column":42}}},"7":{"name":"(anonymous_7)","line":170,"loc":{"start":{"line":170,"column":17},"end":{"line":170,"column":29}}},"8":{"name":"(anonymous_8)","line":192,"loc":{"start":{"line":192,"column":20},"end":{"line":192,"column":31}}},"9":{"name":"(anonymous_9)","line":204,"loc":{"start":{"line":204,"column":13},"end":{"line":204,"column":25}}},"10":{"name":"(anonymous_10)","line":239,"loc":{"start":{"line":239,"column":17},"end":{"line":239,"column":27}}},"11":{"name":"(anonymous_11)","line":249,"loc":{"start":{"line":249,"column":17},"end":{"line":249,"column":27}}},"12":{"name":"(anonymous_12)","line":259,"loc":{"start":{"line":259,"column":17},"end":{"line":259,"column":27}}},"13":{"name":"(anonymous_13)","line":269,"loc":{"start":{"line":269,"column":17},"end":{"line":269,"column":27}}},"14":{"name":"(anonymous_14)","line":279,"loc":{"start":{"line":279,"column":16},"end":{"line":279,"column":27}}},"15":{"name":"(anonymous_15)","line":289,"loc":{"start":{"line":289,"column":16},"end":{"line":289,"column":27}}},"16":{"name":"(anonymous_16)","line":303,"loc":{"start":{"line":303,"column":22},"end":{"line":303,"column":34}}},"17":{"name":"(anonymous_17)","line":336,"loc":{"start":{"line":336,"column":22},"end":{"line":336,"column":34}}},"18":{"name":"(anonymous_18)","line":357,"loc":{"start":{"line":357,"column":26},"end":{"line":357,"column":38}}},"19":{"name":"(anonymous_19)","line":381,"loc":{"start":{"line":381,"column":18},"end":{"line":381,"column":30}}},"20":{"name":"(anonymous_20)","line":418,"loc":{"start":{"line":418,"column":21},"end":{"line":418,"column":33}}},"21":{"name":"(anonymous_21)","line":428,"loc":{"start":{"line":428,"column":18},"end":{"line":428,"column":47}}},"22":{"name":"(anonymous_22)","line":447,"loc":{"start":{"line":447,"column":18},"end":{"line":447,"column":33}}},"23":{"name":"(anonymous_23)","line":475,"loc":{"start":{"line":475,"column":16},"end":{"line":475,"column":31}}},"24":{"name":"(anonymous_24)","line":493,"loc":{"start":{"line":493,"column":19},"end":{"line":493,"column":34}}},"25":{"name":"(anonymous_25)","line":521,"loc":{"start":{"line":521,"column":26},"end":{"line":521,"column":41}}},"26":{"name":"(anonymous_26)","line":533,"loc":{"start":{"line":533,"column":24},"end":{"line":533,"column":39}}},"27":{"name":"(anonymous_27)","line":546,"loc":{"start":{"line":546,"column":13},"end":{"line":546,"column":25}}},"28":{"name":"(anonymous_28)","line":569,"loc":{"start":{"line":569,"column":24},"end":{"line":569,"column":36}}},"29":{"name":"(anonymous_29)","line":580,"loc":{"start":{"line":580,"column":15},"end":{"line":580,"column":28}}},"30":{"name":"(anonymous_30)","line":599,"loc":{"start":{"line":599,"column":16},"end":{"line":599,"column":31}}},"31":{"name":"(anonymous_31)","line":619,"loc":{"start":{"line":619,"column":19},"end":{"line":619,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":760,"column":87}},"2":{"start":{"line":11,"column":0},"end":{"line":11,"column":46}},"3":{"start":{"line":25,"column":0},"end":{"line":27,"column":1}},"4":{"start":{"line":26,"column":4},"end":{"line":26,"column":63}},"5":{"start":{"line":29,"column":0},"end":{"line":757,"column":3}},"6":{"start":{"line":50,"column":8},"end":{"line":50,"column":39}},"7":{"start":{"line":63,"column":8},"end":{"line":68,"column":10}},"8":{"start":{"line":88,"column":8},"end":{"line":91,"column":12}},"9":{"start":{"line":101,"column":8},"end":{"line":101,"column":50}},"10":{"start":{"line":110,"column":8},"end":{"line":110,"column":38}},"11":{"start":{"line":112,"column":8},"end":{"line":112,"column":54}},"12":{"start":{"line":121,"column":8},"end":{"line":121,"column":40}},"13":{"start":{"line":123,"column":8},"end":{"line":123,"column":44}},"14":{"start":{"line":125,"column":8},"end":{"line":125,"column":44}},"15":{"start":{"line":128,"column":8},"end":{"line":128,"column":62}},"16":{"start":{"line":140,"column":8},"end":{"line":141,"column":80}},"17":{"start":{"line":143,"column":8},"end":{"line":148,"column":18}},"18":{"start":{"line":159,"column":8},"end":{"line":159,"column":52}},"19":{"start":{"line":171,"column":8},"end":{"line":171,"column":29}},"20":{"start":{"line":173,"column":8},"end":{"line":173,"column":46}},"21":{"start":{"line":175,"column":8},"end":{"line":183,"column":18}},"22":{"start":{"line":193,"column":8},"end":{"line":193,"column":27}},"23":{"start":{"line":207,"column":8},"end":{"line":215,"column":60}},"24":{"start":{"line":217,"column":8},"end":{"line":217,"column":72}},"25":{"start":{"line":218,"column":8},"end":{"line":218,"column":76}},"26":{"start":{"line":219,"column":8},"end":{"line":219,"column":84}},"27":{"start":{"line":222,"column":8},"end":{"line":222,"column":57}},"28":{"start":{"line":224,"column":8},"end":{"line":224,"column":28}},"29":{"start":{"line":226,"column":8},"end":{"line":226,"column":31}},"30":{"start":{"line":228,"column":8},"end":{"line":228,"column":66}},"31":{"start":{"line":229,"column":8},"end":{"line":229,"column":64}},"32":{"start":{"line":240,"column":8},"end":{"line":240,"column":71}},"33":{"start":{"line":250,"column":8},"end":{"line":250,"column":71}},"34":{"start":{"line":260,"column":8},"end":{"line":260,"column":71}},"35":{"start":{"line":270,"column":8},"end":{"line":270,"column":71}},"36":{"start":{"line":280,"column":8},"end":{"line":280,"column":43}},"37":{"start":{"line":290,"column":8},"end":{"line":290,"column":43}},"38":{"start":{"line":304,"column":8},"end":{"line":304,"column":27}},"39":{"start":{"line":305,"column":8},"end":{"line":326,"column":9}},"40":{"start":{"line":306,"column":12},"end":{"line":325,"column":13}},"41":{"start":{"line":308,"column":20},"end":{"line":308,"column":38}},"42":{"start":{"line":309,"column":20},"end":{"line":309,"column":26}},"43":{"start":{"line":311,"column":20},"end":{"line":311,"column":38}},"44":{"start":{"line":312,"column":20},"end":{"line":312,"column":26}},"45":{"start":{"line":314,"column":20},"end":{"line":314,"column":37}},"46":{"start":{"line":315,"column":20},"end":{"line":315,"column":26}},"47":{"start":{"line":317,"column":20},"end":{"line":317,"column":37}},"48":{"start":{"line":318,"column":20},"end":{"line":318,"column":26}},"49":{"start":{"line":320,"column":20},"end":{"line":320,"column":38}},"50":{"start":{"line":321,"column":20},"end":{"line":321,"column":26}},"51":{"start":{"line":323,"column":20},"end":{"line":323,"column":38}},"52":{"start":{"line":324,"column":20},"end":{"line":324,"column":26}},"53":{"start":{"line":337,"column":8},"end":{"line":337,"column":27}},"54":{"start":{"line":338,"column":8},"end":{"line":347,"column":9}},"55":{"start":{"line":339,"column":12},"end":{"line":346,"column":13}},"56":{"start":{"line":341,"column":20},"end":{"line":341,"column":38}},"57":{"start":{"line":342,"column":20},"end":{"line":342,"column":26}},"58":{"start":{"line":344,"column":20},"end":{"line":344,"column":38}},"59":{"start":{"line":345,"column":20},"end":{"line":345,"column":26}},"60":{"start":{"line":358,"column":8},"end":{"line":358,"column":27}},"61":{"start":{"line":359,"column":8},"end":{"line":368,"column":9}},"62":{"start":{"line":360,"column":12},"end":{"line":367,"column":13}},"63":{"start":{"line":362,"column":20},"end":{"line":362,"column":37}},"64":{"start":{"line":363,"column":20},"end":{"line":363,"column":26}},"65":{"start":{"line":365,"column":20},"end":{"line":365,"column":37}},"66":{"start":{"line":366,"column":20},"end":{"line":366,"column":26}},"67":{"start":{"line":382,"column":8},"end":{"line":382,"column":46}},"68":{"start":{"line":385,"column":8},"end":{"line":385,"column":59}},"69":{"start":{"line":394,"column":8},"end":{"line":404,"column":12}},"70":{"start":{"line":407,"column":8},"end":{"line":407,"column":56}},"71":{"start":{"line":429,"column":8},"end":{"line":437,"column":9}},"72":{"start":{"line":430,"column":12},"end":{"line":430,"column":68}},"73":{"start":{"line":433,"column":12},"end":{"line":433,"column":38}},"74":{"start":{"line":434,"column":12},"end":{"line":434,"column":36}},"75":{"start":{"line":436,"column":12},"end":{"line":436,"column":46}},"76":{"start":{"line":462,"column":8},"end":{"line":465,"column":11}},"77":{"start":{"line":476,"column":8},"end":{"line":477,"column":69}},"78":{"start":{"line":479,"column":8},"end":{"line":483,"column":12}},"79":{"start":{"line":508,"column":8},"end":{"line":511,"column":11}},"80":{"start":{"line":522,"column":8},"end":{"line":522,"column":41}},"81":{"start":{"line":534,"column":8},"end":{"line":538,"column":9}},"82":{"start":{"line":535,"column":12},"end":{"line":535,"column":46}},"83":{"start":{"line":537,"column":12},"end":{"line":537,"column":26}},"84":{"start":{"line":547,"column":8},"end":{"line":547,"column":34}},"85":{"start":{"line":549,"column":8},"end":{"line":549,"column":34}},"86":{"start":{"line":554,"column":8},"end":{"line":554,"column":57}},"87":{"start":{"line":555,"column":8},"end":{"line":555,"column":57}},"88":{"start":{"line":557,"column":8},"end":{"line":557,"column":51}},"89":{"start":{"line":581,"column":8},"end":{"line":581,"column":37}},"90":{"start":{"line":583,"column":8},"end":{"line":583,"column":62}},"91":{"start":{"line":600,"column":8},"end":{"line":600,"column":37}},"92":{"start":{"line":602,"column":8},"end":{"line":603,"column":67}},"93":{"start":{"line":605,"column":8},"end":{"line":605,"column":63}},"94":{"start":{"line":620,"column":8},"end":{"line":634,"column":9}},"95":{"start":{"line":621,"column":12},"end":{"line":622,"column":37}},"96":{"start":{"line":626,"column":12},"end":{"line":628,"column":13}},"97":{"start":{"line":627,"column":16},"end":{"line":627,"column":75}},"98":{"start":{"line":631,"column":12},"end":{"line":632,"column":72}}},"branchMap":{"1":{"line":64,"type":"cond-expr","locations":[{"start":{"line":64,"column":45},"end":{"line":64,"column":53}},{"start":{"line":64,"column":56},"end":{"line":64,"column":63}}]},"2":{"line":65,"type":"cond-expr","locations":[{"start":{"line":65,"column":45},"end":{"line":65,"column":50}},{"start":{"line":65,"column":56},"end":{"line":65,"column":62}}]},"3":{"line":66,"type":"cond-expr","locations":[{"start":{"line":66,"column":45},"end":{"line":66,"column":53}},{"start":{"line":66,"column":56},"end":{"line":66,"column":63}}]},"4":{"line":67,"type":"cond-expr","locations":[{"start":{"line":67,"column":45},"end":{"line":67,"column":46}},{"start":{"line":67,"column":49},"end":{"line":67,"column":50}}]},"5":{"line":209,"type":"cond-expr","locations":[{"start":{"line":209,"column":35},"end":{"line":209,"column":42}},{"start":{"line":209,"column":45},"end":{"line":209,"column":53}}]},"6":{"line":305,"type":"if","locations":[{"start":{"line":305,"column":8},"end":{"line":305,"column":8}},{"start":{"line":305,"column":8},"end":{"line":305,"column":8}}]},"7":{"line":306,"type":"switch","locations":[{"start":{"line":307,"column":16},"end":{"line":309,"column":26}},{"start":{"line":310,"column":16},"end":{"line":312,"column":26}},{"start":{"line":313,"column":16},"end":{"line":315,"column":26}},{"start":{"line":316,"column":16},"end":{"line":318,"column":26}},{"start":{"line":319,"column":16},"end":{"line":321,"column":26}},{"start":{"line":322,"column":16},"end":{"line":324,"column":26}}]},"8":{"line":338,"type":"if","locations":[{"start":{"line":338,"column":8},"end":{"line":338,"column":8}},{"start":{"line":338,"column":8},"end":{"line":338,"column":8}}]},"9":{"line":339,"type":"switch","locations":[{"start":{"line":340,"column":16},"end":{"line":342,"column":26}},{"start":{"line":343,"column":16},"end":{"line":345,"column":26}}]},"10":{"line":359,"type":"if","locations":[{"start":{"line":359,"column":8},"end":{"line":359,"column":8}},{"start":{"line":359,"column":8},"end":{"line":359,"column":8}}]},"11":{"line":360,"type":"switch","locations":[{"start":{"line":361,"column":16},"end":{"line":363,"column":26}},{"start":{"line":364,"column":16},"end":{"line":366,"column":26}}]},"12":{"line":429,"type":"if","locations":[{"start":{"line":429,"column":8},"end":{"line":429,"column":8}},{"start":{"line":429,"column":8},"end":{"line":429,"column":8}}]},"13":{"line":433,"type":"binary-expr","locations":[{"start":{"line":433,"column":12},"end":{"line":433,"column":19}},{"start":{"line":433,"column":24},"end":{"line":433,"column":36}}]},"14":{"line":534,"type":"if","locations":[{"start":{"line":534,"column":8},"end":{"line":534,"column":8}},{"start":{"line":534,"column":8},"end":{"line":534,"column":8}}]},"15":{"line":583,"type":"cond-expr","locations":[{"start":{"line":583,"column":44},"end":{"line":583,"column":45}},{"start":{"line":583,"column":48},"end":{"line":583,"column":61}}]},"16":{"line":583,"type":"binary-expr","locations":[{"start":{"line":583,"column":17},"end":{"line":583,"column":26}},{"start":{"line":583,"column":30},"end":{"line":583,"column":39}}]},"17":{"line":603,"type":"binary-expr","locations":[{"start":{"line":603,"column":21},"end":{"line":603,"column":49}},{"start":{"line":603,"column":53},"end":{"line":603,"column":66}}]},"18":{"line":605,"type":"cond-expr","locations":[{"start":{"line":605,"column":30},"end":{"line":605,"column":44}},{"start":{"line":605,"column":49},"end":{"line":605,"column":62}}]},"19":{"line":620,"type":"if","locations":[{"start":{"line":620,"column":8},"end":{"line":620,"column":8}},{"start":{"line":620,"column":8},"end":{"line":620,"column":8}}]},"20":{"line":621,"type":"binary-expr","locations":[{"start":{"line":621,"column":23},"end":{"line":621,"column":41}},{"start":{"line":621,"column":45},"end":{"line":621,"column":50}}]},"21":{"line":626,"type":"if","locations":[{"start":{"line":626,"column":12},"end":{"line":626,"column":12}},{"start":{"line":626,"column":12},"end":{"line":626,"column":12}}]}},"code":["(function () { YUI.add('slider-base', function (Y, NAME) {","","/**"," * Create a sliding value range input visualized as a draggable thumb on a"," * background element."," *"," * @module slider"," * @submodule slider-base"," */","","var INVALID_VALUE = Y.Attribute.INVALID_VALUE;","","/**"," * Create a slider to represent an input control capable of representing a"," * series of intermediate states based on the position of the slider's thumb."," * These states are typically aligned to a value algorithm whereby the thumb"," * position corresponds to a given value. Sliders may be oriented vertically or"," * horizontally, based on the axis configuration."," *"," * @class SliderBase"," * @extends Widget"," * @param config {Object} Configuration object"," * @constructor"," */","function SliderBase() {"," SliderBase.superclass.constructor.apply( this, arguments );","}","","Y.SliderBase = Y.extend( SliderBase, Y.Widget, {",""," // Y.Slider prototype",""," /**"," * Construction logic executed during Slider instantiation."," *"," * @method initializer"," * @protected"," */"," initializer : function () {"," /**"," * The configured axis, stored for fast lookup since it's a writeOnce"," * attribute. This is for use by extension classes. For"," * implementation code, use get( "axis" ) for"," * authoritative source. Never write to this property."," *"," * @property axis"," * @type {String}"," * @protected"," */"," this.axis = this.get( 'axis' );",""," /**"," * Cached fast access map for DOM properties and attributes that"," * pertain to accessing dimensional or positioning information"," * according to the Slider's axis (e.g. "height" vs."," * "width"). Extension classes should add to this collection"," * for axis related strings if necessary."," *"," * @property _key"," * @type {Object}"," * @protected"," */"," this._key = {"," dim : ( this.axis === 'y' ) ? 'height' : 'width',"," minEdge: ( this.axis === 'y' ) ? 'top' : 'left',"," maxEdge: ( this.axis === 'y' ) ? 'bottom' : 'right',"," xyIndex: ( this.axis === 'y' ) ? 1 : 0"," };",""," /**"," * Signals that the thumb has moved. Payload includes the thumb's"," * pixel offset from the top/left edge of the rail, and if triggered by"," * dragging the thumb, the drag:drag event."," *"," * @event thumbMove"," * @param event {Event} The event object for the thumbMove with the"," * following extra properties:"," *
"," *
offset
"," *
Pixel offset from top/left of the slider to the new"," * thumb position
"," *
ddEvent (deprecated)
"," *
drag:drag event from the thumb
"," *
originEvent
"," *
drag:drag event from the thumb
"," *
"," */"," this.publish( 'thumbMove', {"," defaultFn: this._defThumbMoveFn,"," queuable : true"," } );"," },",""," /**"," * Create the DOM structure for the Slider."," *"," * @method renderUI"," * @protected"," */"," renderUI : function () {"," var contentBox = this.get( 'contentBox' );",""," /**"," * The Node instance of the Slider's rail element. Do not write to"," * this property."," *"," * @property rail"," * @type {Node}"," */"," this.rail = this.renderRail();",""," this._uiSetRailLength( this.get( 'length' ) );",""," /**"," * The Node instance of the Slider's thumb element. Do not write to"," * this property."," *"," * @property thumb"," * @type {Node}"," */"," this.thumb = this.renderThumb();",""," this.rail.appendChild( this.thumb );"," // @TODO: insert( contentBox, 'replace' ) or setHTML?"," contentBox.appendChild( this.rail );",""," // "," contentBox.addClass( this.getClassName( this.axis ) );"," },",""," /**"," * Creates the Slider rail DOM subtree for insertion into the Slider's"," * contentBox. Override this method if you want to provide"," * the rail element (presumably from existing markup)."," *"," * @method renderRail"," * @return {Node} the rail node subtree"," */"," renderRail: function () {"," var minCapClass = this.getClassName( 'rail', 'cap', this._key.minEdge ),"," maxCapClass = this.getClassName( 'rail', 'cap', this._key.maxEdge );",""," return Y.Node.create("," Y.Lang.sub( this.RAIL_TEMPLATE, {"," railClass : this.getClassName( 'rail' ),"," railMinCapClass: minCapClass,"," railMaxCapClass: maxCapClass"," } ) );"," },",""," /**"," * Sets the rail length according to the length attribute."," *"," * @method _uiSetRailLength"," * @param length {String} the length to apply to the rail style"," * @protected"," */"," _uiSetRailLength: function ( length ) {"," this.rail.setStyle( this._key.dim, length );"," },",""," /**"," * Creates the Slider thumb DOM subtree for insertion into the Slider's"," * rail. Override this method if you want to provide the thumb element"," * (presumably from existing markup)."," *"," * @method renderThumb"," * @return {Node} the thumb node subtree"," */"," renderThumb: function () {"," this._initThumbUrl();",""," var imageUrl = this.get( 'thumbUrl' );",""," return Y.Node.create("," Y.Lang.sub( this.THUMB_TEMPLATE, {"," thumbClass : this.getClassName( 'thumb' ),"," thumbShadowClass: this.getClassName( 'thumb', 'shadow' ),"," thumbImageClass : this.getClassName( 'thumb', 'image' ),"," thumbShadowUrl : imageUrl,"," thumbImageUrl : imageUrl,"," thumbAriaLabelId: this.getClassName( 'label', Y.guid()) // get unique id for specifying a label for ARIA"," } ) );"," },",""," /**"," * Gives focus to the thumb enabling keyboard access after clicking thumb"," *"," * @method _onThumbClick"," * @protected"," */"," _onThumbClick : function(e){"," this.thumb.focus();"," },","",""," /**"," * Creates the Y.DD.Drag instance used to handle the thumb movement and"," * binds Slider interaction to the configured value model."," *"," * @method bindUI"," * @protected"," */"," bindUI : function () {",""," // Begin keyboard listeners ///////////////////////////////"," var boundingBox = this.get(\"boundingBox\"), //Y.one('body'),"," // Looking for a key event which will fire continously across browsers while the key is held down."," keyEvent = (!Y.UA.opera) ? \"down:\" : \"press:\","," // 38, 40 = arrow up/down, 33, 34 = page up/down, 35 , 36 = end/home"," keyEventSpec = keyEvent + \"38,40,33,34,35,36\","," // 37 , 39 = arrow left/right"," keyLeftRightSpec = keyEvent + \"37,39\","," // 37 , 39 = arrow left/right + meta (command/apple key) for mac"," keyLeftRightSpecMeta = keyEvent + \"37+meta,39+meta\";",""," boundingBox.on(\"key\", this._onDirectionKey, keyEventSpec, this);"," boundingBox.on(\"key\", this._onLeftRightKey, keyLeftRightSpec, this);"," boundingBox.on(\"key\", this._onLeftRightKeyMeta, keyLeftRightSpecMeta, this);"," // End keyboard listeners //////////////////////////////////",""," this.thumb.on('click', this._onThumbClick, this);",""," this._bindThumbDD();",""," this._bindValueLogic();",""," this.after( 'disabledChange', this._afterDisabledChange );"," this.after( 'lengthChange', this._afterLengthChange );",""," },",""," /**"," * increments Slider value by a minor increment"," *"," * @method _incrMinor"," * @protected"," */"," _incrMinor : function(){"," this.set('value', (this.get('value') + this.get('minorStep')));"," },",""," /**"," * decrements Slider value by a minor increment"," *"," * @method _decrMinor"," * @protected"," */"," _decrMinor : function(){"," this.set('value', (this.get('value') - this.get('minorStep')));"," },",""," /**"," * increments Slider value by a major increment"," *"," * @method _incrMajor"," * @protected"," */"," _incrMajor : function(){"," this.set('value', (this.get('value') + this.get('majorStep')));"," },",""," /**"," * decrements Slider value by a major increment"," *"," * @method _decrMajor"," * @protected"," */"," _decrMajor : function(){"," this.set('value', (this.get('value') - this.get('majorStep')));"," },",""," /**"," * sets the Slider value to the min value."," *"," * @method _setToMin"," * @protected"," */"," _setToMin : function(e){"," this.set('value', this.get('min'));"," },",""," /**"," * sets the Slider value to the max value."," *"," * @method _setToMax"," * @protected"," */"," _setToMax : function(e){"," this.set('value', this.get('max'));"," },",""," /**"," * sets the Slider's value in response to key events."," * Left and right keys are in a separate method"," * in case an implementation wants to increment values"," * but needs left and right arrow keys for other purposes."," *"," * @method _onDirectionKey"," * @param e {Event} the key event"," * @protected"," */"," _onDirectionKey : function(e) {"," e.preventDefault();"," if(this.get('disabled') === false){"," switch (e.charCode) {"," case 38: // up"," this._incrMinor();"," break;"," case 40: // down"," this._decrMinor();"," break;"," case 36: // home"," this._setToMin();"," break;"," case 35: // end"," this._setToMax();"," break;"," case 33: // page up"," this._incrMajor();"," break;"," case 34: // page down"," this._decrMajor();"," break;"," }"," }"," },",""," /**"," * sets the Slider's value in response to left or right key events"," *"," * @method _onLeftRightKey"," * @param e {Event} the key event"," * @protected"," */"," _onLeftRightKey : function(e) {"," e.preventDefault();"," if(this.get('disabled') === false){"," switch (e.charCode) {"," case 37: // left"," this._decrMinor();"," break;"," case 39: // right"," this._incrMinor();"," break;"," }"," }"," },",""," /**"," * sets the Slider's value in response to left or right key events when a meta (mac command/apple) key is also pressed"," *"," * @method _onLeftRightKeyMeta"," * @param e {Event} the key event"," * @protected"," */"," _onLeftRightKeyMeta : function(e) {"," e.preventDefault();"," if(this.get('disabled') === false){"," switch (e.charCode) {"," case 37: // left + meta"," this._setToMin();"," break;"," case 39: // right + meta"," this._setToMax();"," break;"," }"," }"," },","","","","",""," /**"," * Makes the thumb draggable and constrains it to the rail."," *"," * @method _bindThumbDD"," * @protected"," */"," _bindThumbDD: function () {"," var config = { constrain: this.rail };",""," // { constrain: rail, stickX: true }"," config[ 'stick' + this.axis.toUpperCase() ] = true;",""," /**"," * The DD.Drag instance linked to the thumb node."," *"," * @property _dd"," * @type {DD.Drag}"," * @protected"," */"," this._dd = new Y.DD.Drag( {"," node : this.thumb,"," bubble : false,"," on : {"," 'drag:start': Y.bind( this._onDragStart, this )"," },"," after : {"," 'drag:drag': Y.bind( this._afterDrag, this ),"," 'drag:end' : Y.bind( this._afterDragEnd, this )"," }"," } );",""," // Constrain the thumb to the rail"," this._dd.plug( Y.Plugin.DDConstrained, config );"," },",""," /**"," * Stub implementation. Override this (presumably in a class extension) to"," * initialize any value logic that depends on the presence of the Drag"," * instance."," *"," * @method _bindValueLogic"," * @protected"," */"," _bindValueLogic: function () {},",""," /**"," * Moves the thumb to pixel offset position along the rail."," *"," * @method _uiMoveThumb"," * @param offset {Number} the pixel offset to set as left or top style"," * @param [options] {Object} Details to send with the `thumbMove` event"," * @protected"," */"," _uiMoveThumb: function ( offset, options ) {"," if ( this.thumb ) {"," this.thumb.setStyle( this._key.minEdge, offset + 'px' );","",""," options || (options = {});"," options.offset = offset;",""," this.fire( 'thumbMove', options );"," }"," },",""," /**"," * Dispatches the slideStart event."," *"," * @method _onDragStart"," * @param e {Event} the drag:start event from the thumb"," * @protected"," */"," _onDragStart: function ( e ) {"," /**"," * Signals the beginning of a thumb drag operation. Payload includes"," * the thumb's drag:start event."," *"," * @event slideStart"," * @param event {Event} The event object for the slideStart with the"," * following extra properties:"," *
"," *
ddEvent (deprecated)
"," *
drag:start event from the thumb
"," *
originEvent
"," *
drag:start event from the thumb
"," *
"," */"," this.fire('slideStart', {"," ddEvent: e, // for backward compatibility"," originEvent: e"," });"," },",""," /**"," * Dispatches the thumbMove event."," *"," * @method _afterDrag"," * @param e {Event} the drag:drag event from the thumb"," * @protected"," */"," _afterDrag: function ( e ) {"," var thumbXY = e.info.xy[ this._key.xyIndex ],"," railXY = e.target.con._regionCache[ this._key.minEdge ];",""," this.fire( 'thumbMove', {"," offset : (thumbXY - railXY),"," ddEvent: e, // for backward compatibility"," originEvent: e"," } );"," },",""," /**"," * Dispatches the slideEnd event."," *"," * @method _afterDragEnd"," * @param e {Event} the drag:end event from the thumb"," * @protected"," */"," _afterDragEnd: function ( e ) {"," /**"," * Signals the end of a thumb drag operation. Payload includes"," * the thumb's drag:end event."," *"," * @event slideEnd"," * @param event {Event} The event object for the slideEnd with the"," * following extra properties:"," *
"," *
ddEvent (deprecated)
"," *
drag:end event from the thumb
"," *
originEvent
"," *
drag:end event from the thumb
"," *
"," */"," this.fire('slideEnd', {"," ddEvent: e,"," originEvent: e"," });"," },",""," /**"," * Locks or unlocks the thumb."," *"," * @method _afterDisabledChange"," * @param e {Event} The disabledChange event object"," * @protected"," */"," _afterDisabledChange: function ( e ) {"," this._dd.set( 'lock', e.newVal );"," },",""," /**"," * Handles changes to the length attribute. By default, it"," * triggers an update to the UI."," *"," * @method _afterLengthChange"," * @param e {Event} The lengthChange event object"," * @protected"," */"," _afterLengthChange: function ( e ) {"," if ( this.get( 'rendered' ) ) {"," this._uiSetRailLength( e.newVal );",""," this.syncUI();"," }"," },",""," /**"," * Synchronizes the DOM state with the attribute settings."," *"," * @method syncUI"," */"," syncUI : function () {"," this._dd.con.resetCache();",""," this._syncThumbPosition();",""," // Forces a reflow of the bounding box to address IE8 inline-block"," // container not expanding correctly. bug 2527905"," //this.get('boundingBox').toggleClass('');"," this.thumb.set('aria-valuemin', this.get('min'));"," this.thumb.set('aria-valuemax', this.get('max'));",""," this._dd.set('lock', this.get('disabled'));"," },",""," /**"," * Stub implementation. Override this (presumably in a class extension) to"," * ensure the thumb is in the correct position according to the value"," * alogorithm."," * instance."," *"," * @method _syncThumbPosition"," * @protected"," */"," _syncThumbPosition: function () {},",""," /**"," * Validates the axis is "x" or "y" (case insensitive)."," * Converts to lower case for storage."," *"," * @method _setAxis"," * @param v {String} proposed value for the axis attribute"," * @return {String} lowercased first character of the input string"," * @protected"," */"," _setAxis : function (v) {"," v = ( v + '' ).toLowerCase();",""," return ( v === 'x' || v === 'y' ) ? v : INVALID_VALUE;"," },",""," /**"," *

Ensures the stored length value is a string with a quantity and unit."," * Unit will be defaulted to "px" if not included. Rejects"," * values less than or equal to 0 and those that don't at least start with"," * a number.

"," *"," *

Currently only pixel lengths are supported.

"," *"," * @method _setLength"," * @param v {String} proposed value for the length attribute"," * @return {String} the sanitized value"," * @protected"," */"," _setLength: function ( v ) {"," v = ( v + '' ).toLowerCase();",""," var length = parseFloat( v, 10 ),"," units = v.replace( /[\\d\\.\\-]/g, '' ) || this.DEF_UNIT;",""," return length > 0 ? ( length + units ) : INVALID_VALUE;"," },",""," /**"," *

Defaults the thumbURL attribute according to the current skin, or"," * "sam" if none can be determined. Horizontal Sliders will have"," * their thumbUrl attribute set to

"," *

"/configured/yui/builddir/slider-base/assets/skins/sam/thumb-x.png"

"," *

And vertical thumbs will get

"," *

"/configured/yui/builddir/slider-base/assets/skins/sam/thumb-y.png"

"," *"," * @method _initThumbUrl"," * @protected"," */"," _initThumbUrl: function () {"," if (!this.get('thumbUrl')) {"," var skin = this.getSkinName() || 'sam',"," base = Y.config.base;",""," // Unfortunate hack to avoid requesting image resources from the"," // combo service. The combo service does not serve images."," if (base.indexOf('http://yui.yahooapis.com/combo') === 0) {"," base = 'http://yui.yahooapis.com/' + Y.version + '/build/';"," }",""," // "," this.set('thumbUrl', base + 'slider-base/assets/skins/' +"," skin + '/thumb-' + this.axis + '.png');",""," }"," },",""," /**"," * Bounding box template that will contain the Slider's DOM subtree. <span>s are used to support inline-block styling."," *"," * @property BOUNDING_TEMPLATE"," * @type {String}"," * @default <span></span>"," */"," BOUNDING_TEMPLATE : '',",""," /**"," * Content box template that will contain the Slider's rail and thumb."," *"," * @property CONTENT_TEMPLATE"," * @type {String}"," * @default <span></span>"," */"," CONTENT_TEMPLATE : '',",""," /**"," * Rail template that will contain the end caps and the thumb."," * {placeholder}s are used for template substitution at render time."," *"," * @property RAIL_TEMPLATE"," * @type {String}"," * @default <span class=\"{railClass}\"><span class=\"{railMinCapClass}\"></span><span class=\"{railMaxCapClass}\"></span></span>"," */"," RAIL_TEMPLATE : '' +"," '' +"," '' +"," '',",""," /**"," * Thumb template that will contain the thumb image and shadow. <img>"," * tags are used instead of background images to avoid a flicker bug in IE."," * {placeholder}s are used for template substitution at render time."," *"," * @property THUMB_TEMPLATE"," * @type {String}"," * @default <span class=\"{thumbClass}\" tabindex=\"-1\"><img src=\"{thumbShadowUrl}\" alt=\"Slider thumb shadow\" class=\"{thumbShadowClass}\"><img src=\"{thumbImageUrl}\" alt=\"Slider thumb\" class=\"{thumbImageClass}\"></span>"," */"," THUMB_TEMPLATE : '' + // keyboard access jeff tabindex=\"-1\""," '' +"," '' +"," ''","","}, {",""," // Y.SliderBase static properties",""," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'sliderBase'"," * @readOnly"," * @protected"," * @static"," */"," NAME : 'sliderBase',",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */"," ATTRS : {",""," /**"," * Axis upon which the Slider's thumb moves. "x" for"," * horizontal, "y" for vertical."," *"," * @attribute axis"," * @type {String}"," * @default "x""," * @writeOnce"," */"," axis : {"," value : 'x',"," writeOnce : true,"," setter : '_setAxis',"," lazyAdd : false"," },",""," /**"," * The length of the rail (exclusive of the end caps if positioned by"," * CSS). This corresponds to the movable range of the thumb."," *"," * @attribute length"," * @type {String | Number} e.g. \"200px\" or 200"," * @default 150px"," */"," length: {"," value: '150px',"," setter: '_setLength'"," },",""," /**"," * Path to the thumb image. This will be used as both the thumb and"," * shadow as a sprite. Defaults at render() to thumb-x.png or"," * thumb-y.png in the skin directory of the current skin."," *"," * @attribute thumbUrl"," * @type {String}"," * @default thumb-x.png or thumb-y.png in the sam skin directory of the"," * current build path for Slider"," */"," thumbUrl: {"," value: null,"," validator: Y.Lang.isString"," }"," }","});","","","}, '3.17.2', {\"requires\": [\"widget\", \"dd-constrain\", \"event-key\"], \"skinnable\": true});","","}());"]}; +} +var __cov_IOALRB5212pW1kRZ4PjHRg = __coverage__['build/slider-base/slider-base.js']; +__cov_IOALRB5212pW1kRZ4PjHRg.s['1']++;YUI.add('slider-base',function(Y,NAME){__cov_IOALRB5212pW1kRZ4PjHRg.f['1']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['2']++;var INVALID_VALUE=Y.Attribute.INVALID_VALUE;__cov_IOALRB5212pW1kRZ4PjHRg.s['3']++;function SliderBase(){__cov_IOALRB5212pW1kRZ4PjHRg.f['2']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['4']++;SliderBase.superclass.constructor.apply(this,arguments);}__cov_IOALRB5212pW1kRZ4PjHRg.s['5']++;Y.SliderBase=Y.extend(SliderBase,Y.Widget,{initializer:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['3']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['6']++;this.axis=this.get('axis');__cov_IOALRB5212pW1kRZ4PjHRg.s['7']++;this._key={dim:this.axis==='y'?(__cov_IOALRB5212pW1kRZ4PjHRg.b['1'][0]++,'height'):(__cov_IOALRB5212pW1kRZ4PjHRg.b['1'][1]++,'width'),minEdge:this.axis==='y'?(__cov_IOALRB5212pW1kRZ4PjHRg.b['2'][0]++,'top'):(__cov_IOALRB5212pW1kRZ4PjHRg.b['2'][1]++,'left'),maxEdge:this.axis==='y'?(__cov_IOALRB5212pW1kRZ4PjHRg.b['3'][0]++,'bottom'):(__cov_IOALRB5212pW1kRZ4PjHRg.b['3'][1]++,'right'),xyIndex:this.axis==='y'?(__cov_IOALRB5212pW1kRZ4PjHRg.b['4'][0]++,1):(__cov_IOALRB5212pW1kRZ4PjHRg.b['4'][1]++,0)};__cov_IOALRB5212pW1kRZ4PjHRg.s['8']++;this.publish('thumbMove',{defaultFn:this._defThumbMoveFn,queuable:true});},renderUI:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['4']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['9']++;var contentBox=this.get('contentBox');__cov_IOALRB5212pW1kRZ4PjHRg.s['10']++;this.rail=this.renderRail();__cov_IOALRB5212pW1kRZ4PjHRg.s['11']++;this._uiSetRailLength(this.get('length'));__cov_IOALRB5212pW1kRZ4PjHRg.s['12']++;this.thumb=this.renderThumb();__cov_IOALRB5212pW1kRZ4PjHRg.s['13']++;this.rail.appendChild(this.thumb);__cov_IOALRB5212pW1kRZ4PjHRg.s['14']++;contentBox.appendChild(this.rail);__cov_IOALRB5212pW1kRZ4PjHRg.s['15']++;contentBox.addClass(this.getClassName(this.axis));},renderRail:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['5']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['16']++;var minCapClass=this.getClassName('rail','cap',this._key.minEdge),maxCapClass=this.getClassName('rail','cap',this._key.maxEdge);__cov_IOALRB5212pW1kRZ4PjHRg.s['17']++;return Y.Node.create(Y.Lang.sub(this.RAIL_TEMPLATE,{railClass:this.getClassName('rail'),railMinCapClass:minCapClass,railMaxCapClass:maxCapClass}));},_uiSetRailLength:function(length){__cov_IOALRB5212pW1kRZ4PjHRg.f['6']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['18']++;this.rail.setStyle(this._key.dim,length);},renderThumb:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['7']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['19']++;this._initThumbUrl();__cov_IOALRB5212pW1kRZ4PjHRg.s['20']++;var imageUrl=this.get('thumbUrl');__cov_IOALRB5212pW1kRZ4PjHRg.s['21']++;return Y.Node.create(Y.Lang.sub(this.THUMB_TEMPLATE,{thumbClass:this.getClassName('thumb'),thumbShadowClass:this.getClassName('thumb','shadow'),thumbImageClass:this.getClassName('thumb','image'),thumbShadowUrl:imageUrl,thumbImageUrl:imageUrl,thumbAriaLabelId:this.getClassName('label',Y.guid())}));},_onThumbClick:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['8']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['22']++;this.thumb.focus();},bindUI:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['9']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['23']++;var boundingBox=this.get('boundingBox'),keyEvent=!Y.UA.opera?(__cov_IOALRB5212pW1kRZ4PjHRg.b['5'][0]++,'down:'):(__cov_IOALRB5212pW1kRZ4PjHRg.b['5'][1]++,'press:'),keyEventSpec=keyEvent+'38,40,33,34,35,36',keyLeftRightSpec=keyEvent+'37,39',keyLeftRightSpecMeta=keyEvent+'37+meta,39+meta';__cov_IOALRB5212pW1kRZ4PjHRg.s['24']++;boundingBox.on('key',this._onDirectionKey,keyEventSpec,this);__cov_IOALRB5212pW1kRZ4PjHRg.s['25']++;boundingBox.on('key',this._onLeftRightKey,keyLeftRightSpec,this);__cov_IOALRB5212pW1kRZ4PjHRg.s['26']++;boundingBox.on('key',this._onLeftRightKeyMeta,keyLeftRightSpecMeta,this);__cov_IOALRB5212pW1kRZ4PjHRg.s['27']++;this.thumb.on('click',this._onThumbClick,this);__cov_IOALRB5212pW1kRZ4PjHRg.s['28']++;this._bindThumbDD();__cov_IOALRB5212pW1kRZ4PjHRg.s['29']++;this._bindValueLogic();__cov_IOALRB5212pW1kRZ4PjHRg.s['30']++;this.after('disabledChange',this._afterDisabledChange);__cov_IOALRB5212pW1kRZ4PjHRg.s['31']++;this.after('lengthChange',this._afterLengthChange);},_incrMinor:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['10']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['32']++;this.set('value',this.get('value')+this.get('minorStep'));},_decrMinor:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['11']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['33']++;this.set('value',this.get('value')-this.get('minorStep'));},_incrMajor:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['12']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['34']++;this.set('value',this.get('value')+this.get('majorStep'));},_decrMajor:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['13']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['35']++;this.set('value',this.get('value')-this.get('majorStep'));},_setToMin:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['14']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['36']++;this.set('value',this.get('min'));},_setToMax:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['15']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['37']++;this.set('value',this.get('max'));},_onDirectionKey:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['16']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['38']++;e.preventDefault();__cov_IOALRB5212pW1kRZ4PjHRg.s['39']++;if(this.get('disabled')===false){__cov_IOALRB5212pW1kRZ4PjHRg.b['6'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['40']++;switch(e.charCode){case 38:__cov_IOALRB5212pW1kRZ4PjHRg.b['7'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['41']++;this._incrMinor();__cov_IOALRB5212pW1kRZ4PjHRg.s['42']++;break;case 40:__cov_IOALRB5212pW1kRZ4PjHRg.b['7'][1]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['43']++;this._decrMinor();__cov_IOALRB5212pW1kRZ4PjHRg.s['44']++;break;case 36:__cov_IOALRB5212pW1kRZ4PjHRg.b['7'][2]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['45']++;this._setToMin();__cov_IOALRB5212pW1kRZ4PjHRg.s['46']++;break;case 35:__cov_IOALRB5212pW1kRZ4PjHRg.b['7'][3]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['47']++;this._setToMax();__cov_IOALRB5212pW1kRZ4PjHRg.s['48']++;break;case 33:__cov_IOALRB5212pW1kRZ4PjHRg.b['7'][4]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['49']++;this._incrMajor();__cov_IOALRB5212pW1kRZ4PjHRg.s['50']++;break;case 34:__cov_IOALRB5212pW1kRZ4PjHRg.b['7'][5]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['51']++;this._decrMajor();__cov_IOALRB5212pW1kRZ4PjHRg.s['52']++;break;}}else{__cov_IOALRB5212pW1kRZ4PjHRg.b['6'][1]++;}},_onLeftRightKey:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['17']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['53']++;e.preventDefault();__cov_IOALRB5212pW1kRZ4PjHRg.s['54']++;if(this.get('disabled')===false){__cov_IOALRB5212pW1kRZ4PjHRg.b['8'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['55']++;switch(e.charCode){case 37:__cov_IOALRB5212pW1kRZ4PjHRg.b['9'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['56']++;this._decrMinor();__cov_IOALRB5212pW1kRZ4PjHRg.s['57']++;break;case 39:__cov_IOALRB5212pW1kRZ4PjHRg.b['9'][1]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['58']++;this._incrMinor();__cov_IOALRB5212pW1kRZ4PjHRg.s['59']++;break;}}else{__cov_IOALRB5212pW1kRZ4PjHRg.b['8'][1]++;}},_onLeftRightKeyMeta:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['18']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['60']++;e.preventDefault();__cov_IOALRB5212pW1kRZ4PjHRg.s['61']++;if(this.get('disabled')===false){__cov_IOALRB5212pW1kRZ4PjHRg.b['10'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['62']++;switch(e.charCode){case 37:__cov_IOALRB5212pW1kRZ4PjHRg.b['11'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['63']++;this._setToMin();__cov_IOALRB5212pW1kRZ4PjHRg.s['64']++;break;case 39:__cov_IOALRB5212pW1kRZ4PjHRg.b['11'][1]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['65']++;this._setToMax();__cov_IOALRB5212pW1kRZ4PjHRg.s['66']++;break;}}else{__cov_IOALRB5212pW1kRZ4PjHRg.b['10'][1]++;}},_bindThumbDD:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['19']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['67']++;var config={constrain:this.rail};__cov_IOALRB5212pW1kRZ4PjHRg.s['68']++;config['stick'+this.axis.toUpperCase()]=true;__cov_IOALRB5212pW1kRZ4PjHRg.s['69']++;this._dd=new Y.DD.Drag({node:this.thumb,bubble:false,on:{'drag:start':Y.bind(this._onDragStart,this)},after:{'drag:drag':Y.bind(this._afterDrag,this),'drag:end':Y.bind(this._afterDragEnd,this)}});__cov_IOALRB5212pW1kRZ4PjHRg.s['70']++;this._dd.plug(Y.Plugin.DDConstrained,config);},_bindValueLogic:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['20']++;},_uiMoveThumb:function(offset,options){__cov_IOALRB5212pW1kRZ4PjHRg.f['21']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['71']++;if(this.thumb){__cov_IOALRB5212pW1kRZ4PjHRg.b['12'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['72']++;this.thumb.setStyle(this._key.minEdge,offset+'px');__cov_IOALRB5212pW1kRZ4PjHRg.s['73']++;(__cov_IOALRB5212pW1kRZ4PjHRg.b['13'][0]++,options)||(__cov_IOALRB5212pW1kRZ4PjHRg.b['13'][1]++,options={});__cov_IOALRB5212pW1kRZ4PjHRg.s['74']++;options.offset=offset;__cov_IOALRB5212pW1kRZ4PjHRg.s['75']++;this.fire('thumbMove',options);}else{__cov_IOALRB5212pW1kRZ4PjHRg.b['12'][1]++;}},_onDragStart:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['22']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['76']++;this.fire('slideStart',{ddEvent:e,originEvent:e});},_afterDrag:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['23']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['77']++;var thumbXY=e.info.xy[this._key.xyIndex],railXY=e.target.con._regionCache[this._key.minEdge];__cov_IOALRB5212pW1kRZ4PjHRg.s['78']++;this.fire('thumbMove',{offset:thumbXY-railXY,ddEvent:e,originEvent:e});},_afterDragEnd:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['24']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['79']++;this.fire('slideEnd',{ddEvent:e,originEvent:e});},_afterDisabledChange:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['25']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['80']++;this._dd.set('lock',e.newVal);},_afterLengthChange:function(e){__cov_IOALRB5212pW1kRZ4PjHRg.f['26']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['81']++;if(this.get('rendered')){__cov_IOALRB5212pW1kRZ4PjHRg.b['14'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['82']++;this._uiSetRailLength(e.newVal);__cov_IOALRB5212pW1kRZ4PjHRg.s['83']++;this.syncUI();}else{__cov_IOALRB5212pW1kRZ4PjHRg.b['14'][1]++;}},syncUI:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['27']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['84']++;this._dd.con.resetCache();__cov_IOALRB5212pW1kRZ4PjHRg.s['85']++;this._syncThumbPosition();__cov_IOALRB5212pW1kRZ4PjHRg.s['86']++;this.thumb.set('aria-valuemin',this.get('min'));__cov_IOALRB5212pW1kRZ4PjHRg.s['87']++;this.thumb.set('aria-valuemax',this.get('max'));__cov_IOALRB5212pW1kRZ4PjHRg.s['88']++;this._dd.set('lock',this.get('disabled'));},_syncThumbPosition:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['28']++;},_setAxis:function(v){__cov_IOALRB5212pW1kRZ4PjHRg.f['29']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['89']++;v=(v+'').toLowerCase();__cov_IOALRB5212pW1kRZ4PjHRg.s['90']++;return(__cov_IOALRB5212pW1kRZ4PjHRg.b['16'][0]++,v==='x')||(__cov_IOALRB5212pW1kRZ4PjHRg.b['16'][1]++,v==='y')?(__cov_IOALRB5212pW1kRZ4PjHRg.b['15'][0]++,v):(__cov_IOALRB5212pW1kRZ4PjHRg.b['15'][1]++,INVALID_VALUE);},_setLength:function(v){__cov_IOALRB5212pW1kRZ4PjHRg.f['30']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['91']++;v=(v+'').toLowerCase();__cov_IOALRB5212pW1kRZ4PjHRg.s['92']++;var length=parseFloat(v,10),units=(__cov_IOALRB5212pW1kRZ4PjHRg.b['17'][0]++,v.replace(/[\d\.\-]/g,''))||(__cov_IOALRB5212pW1kRZ4PjHRg.b['17'][1]++,this.DEF_UNIT);__cov_IOALRB5212pW1kRZ4PjHRg.s['93']++;return length>0?(__cov_IOALRB5212pW1kRZ4PjHRg.b['18'][0]++,length+units):(__cov_IOALRB5212pW1kRZ4PjHRg.b['18'][1]++,INVALID_VALUE);},_initThumbUrl:function(){__cov_IOALRB5212pW1kRZ4PjHRg.f['31']++;__cov_IOALRB5212pW1kRZ4PjHRg.s['94']++;if(!this.get('thumbUrl')){__cov_IOALRB5212pW1kRZ4PjHRg.b['19'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['95']++;var skin=(__cov_IOALRB5212pW1kRZ4PjHRg.b['20'][0]++,this.getSkinName())||(__cov_IOALRB5212pW1kRZ4PjHRg.b['20'][1]++,'sam'),base=Y.config.base;__cov_IOALRB5212pW1kRZ4PjHRg.s['96']++;if(base.indexOf('http://yui.yahooapis.com/combo')===0){__cov_IOALRB5212pW1kRZ4PjHRg.b['21'][0]++;__cov_IOALRB5212pW1kRZ4PjHRg.s['97']++;base='http://yui.yahooapis.com/'+Y.version+'/build/';}else{__cov_IOALRB5212pW1kRZ4PjHRg.b['21'][1]++;}__cov_IOALRB5212pW1kRZ4PjHRg.s['98']++;this.set('thumbUrl',base+'slider-base/assets/skins/'+skin+'/thumb-'+this.axis+'.png');}else{__cov_IOALRB5212pW1kRZ4PjHRg.b['19'][1]++;}},BOUNDING_TEMPLATE:'',CONTENT_TEMPLATE:'',RAIL_TEMPLATE:''+''+''+'',THUMB_TEMPLATE:''+''+''+''},{NAME:'sliderBase',ATTRS:{axis:{value:'x',writeOnce:true,setter:'_setAxis',lazyAdd:false},length:{value:'150px',setter:'_setLength'},thumbUrl:{value:null,validator:Y.Lang.isString}}});},'3.17.2',{'requires':['widget','dd-constrain','event-key'],'skinnable':true}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-debug.js b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-debug.js new file mode 100644 index 0000000..582a654 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-debug.js @@ -0,0 +1,769 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('slider-base', function (Y, NAME) { + +/** + * Create a sliding value range input visualized as a draggable thumb on a + * background element. + * + * @module slider + * @submodule slider-base + */ + +var INVALID_VALUE = Y.Attribute.INVALID_VALUE; + +/** + * Create a slider to represent an input control capable of representing a + * series of intermediate states based on the position of the slider's thumb. + * These states are typically aligned to a value algorithm whereby the thumb + * position corresponds to a given value. Sliders may be oriented vertically or + * horizontally, based on the axis configuration. + * + * @class SliderBase + * @extends Widget + * @param config {Object} Configuration object + * @constructor + */ +function SliderBase() { + SliderBase.superclass.constructor.apply( this, arguments ); +} + +Y.SliderBase = Y.extend( SliderBase, Y.Widget, { + + // Y.Slider prototype + + /** + * Construction logic executed during Slider instantiation. + * + * @method initializer + * @protected + */ + initializer : function () { + /** + * The configured axis, stored for fast lookup since it's a writeOnce + * attribute. This is for use by extension classes. For + * implementation code, use get( "axis" ) for + * authoritative source. Never write to this property. + * + * @property axis + * @type {String} + * @protected + */ + this.axis = this.get( 'axis' ); + + /** + * Cached fast access map for DOM properties and attributes that + * pertain to accessing dimensional or positioning information + * according to the Slider's axis (e.g. "height" vs. + * "width"). Extension classes should add to this collection + * for axis related strings if necessary. + * + * @property _key + * @type {Object} + * @protected + */ + this._key = { + dim : ( this.axis === 'y' ) ? 'height' : 'width', + minEdge: ( this.axis === 'y' ) ? 'top' : 'left', + maxEdge: ( this.axis === 'y' ) ? 'bottom' : 'right', + xyIndex: ( this.axis === 'y' ) ? 1 : 0 + }; + + /** + * Signals that the thumb has moved. Payload includes the thumb's + * pixel offset from the top/left edge of the rail, and if triggered by + * dragging the thumb, the drag:drag event. + * + * @event thumbMove + * @param event {Event} The event object for the thumbMove with the + * following extra properties: + *
+ *
offset
+ *
Pixel offset from top/left of the slider to the new + * thumb position
+ *
ddEvent (deprecated)
+ *
drag:drag event from the thumb
+ *
originEvent
+ *
drag:drag event from the thumb
+ *
+ */ + this.publish( 'thumbMove', { + defaultFn: this._defThumbMoveFn, + queuable : true + } ); + }, + + /** + * Create the DOM structure for the Slider. + * + * @method renderUI + * @protected + */ + renderUI : function () { + var contentBox = this.get( 'contentBox' ); + + /** + * The Node instance of the Slider's rail element. Do not write to + * this property. + * + * @property rail + * @type {Node} + */ + this.rail = this.renderRail(); + + this._uiSetRailLength( this.get( 'length' ) ); + + /** + * The Node instance of the Slider's thumb element. Do not write to + * this property. + * + * @property thumb + * @type {Node} + */ + this.thumb = this.renderThumb(); + + this.rail.appendChild( this.thumb ); + // @TODO: insert( contentBox, 'replace' ) or setHTML? + contentBox.appendChild( this.rail ); + + // + contentBox.addClass( this.getClassName( this.axis ) ); + }, + + /** + * Creates the Slider rail DOM subtree for insertion into the Slider's + * contentBox. Override this method if you want to provide + * the rail element (presumably from existing markup). + * + * @method renderRail + * @return {Node} the rail node subtree + */ + renderRail: function () { + var minCapClass = this.getClassName( 'rail', 'cap', this._key.minEdge ), + maxCapClass = this.getClassName( 'rail', 'cap', this._key.maxEdge ); + + return Y.Node.create( + Y.Lang.sub( this.RAIL_TEMPLATE, { + railClass : this.getClassName( 'rail' ), + railMinCapClass: minCapClass, + railMaxCapClass: maxCapClass + } ) ); + }, + + /** + * Sets the rail length according to the length attribute. + * + * @method _uiSetRailLength + * @param length {String} the length to apply to the rail style + * @protected + */ + _uiSetRailLength: function ( length ) { + this.rail.setStyle( this._key.dim, length ); + }, + + /** + * Creates the Slider thumb DOM subtree for insertion into the Slider's + * rail. Override this method if you want to provide the thumb element + * (presumably from existing markup). + * + * @method renderThumb + * @return {Node} the thumb node subtree + */ + renderThumb: function () { + this._initThumbUrl(); + + var imageUrl = this.get( 'thumbUrl' ); + + return Y.Node.create( + Y.Lang.sub( this.THUMB_TEMPLATE, { + thumbClass : this.getClassName( 'thumb' ), + thumbShadowClass: this.getClassName( 'thumb', 'shadow' ), + thumbImageClass : this.getClassName( 'thumb', 'image' ), + thumbShadowUrl : imageUrl, + thumbImageUrl : imageUrl, + thumbAriaLabelId: this.getClassName( 'label', Y.guid()) // get unique id for specifying a label for ARIA + } ) ); + }, + + /** + * Gives focus to the thumb enabling keyboard access after clicking thumb + * + * @method _onThumbClick + * @protected + */ + _onThumbClick : function(e){ + this.thumb.focus(); + }, + + + /** + * Creates the Y.DD.Drag instance used to handle the thumb movement and + * binds Slider interaction to the configured value model. + * + * @method bindUI + * @protected + */ + bindUI : function () { + + // Begin keyboard listeners /////////////////////////////// + var boundingBox = this.get("boundingBox"), //Y.one('body'), + // Looking for a key event which will fire continously across browsers while the key is held down. + keyEvent = (!Y.UA.opera) ? "down:" : "press:", + // 38, 40 = arrow up/down, 33, 34 = page up/down, 35 , 36 = end/home + keyEventSpec = keyEvent + "38,40,33,34,35,36", + // 37 , 39 = arrow left/right + keyLeftRightSpec = keyEvent + "37,39", + // 37 , 39 = arrow left/right + meta (command/apple key) for mac + keyLeftRightSpecMeta = keyEvent + "37+meta,39+meta"; + + boundingBox.on("key", this._onDirectionKey, keyEventSpec, this); + boundingBox.on("key", this._onLeftRightKey, keyLeftRightSpec, this); + boundingBox.on("key", this._onLeftRightKeyMeta, keyLeftRightSpecMeta, this); + // End keyboard listeners ////////////////////////////////// + + this.thumb.on('click', this._onThumbClick, this); + + this._bindThumbDD(); + + this._bindValueLogic(); + + this.after( 'disabledChange', this._afterDisabledChange ); + this.after( 'lengthChange', this._afterLengthChange ); + + }, + + /** + * increments Slider value by a minor increment + * + * @method _incrMinor + * @protected + */ + _incrMinor : function(){ + this.set('value', (this.get('value') + this.get('minorStep'))); + }, + + /** + * decrements Slider value by a minor increment + * + * @method _decrMinor + * @protected + */ + _decrMinor : function(){ + this.set('value', (this.get('value') - this.get('minorStep'))); + }, + + /** + * increments Slider value by a major increment + * + * @method _incrMajor + * @protected + */ + _incrMajor : function(){ + this.set('value', (this.get('value') + this.get('majorStep'))); + }, + + /** + * decrements Slider value by a major increment + * + * @method _decrMajor + * @protected + */ + _decrMajor : function(){ + this.set('value', (this.get('value') - this.get('majorStep'))); + }, + + /** + * sets the Slider value to the min value. + * + * @method _setToMin + * @protected + */ + _setToMin : function(e){ + this.set('value', this.get('min')); + }, + + /** + * sets the Slider value to the max value. + * + * @method _setToMax + * @protected + */ + _setToMax : function(e){ + this.set('value', this.get('max')); + }, + + /** + * sets the Slider's value in response to key events. + * Left and right keys are in a separate method + * in case an implementation wants to increment values + * but needs left and right arrow keys for other purposes. + * + * @method _onDirectionKey + * @param e {Event} the key event + * @protected + */ + _onDirectionKey : function(e) { + e.preventDefault(); + if(this.get('disabled') === false){ + switch (e.charCode) { + case 38: // up + this._incrMinor(); + break; + case 40: // down + this._decrMinor(); + break; + case 36: // home + this._setToMin(); + break; + case 35: // end + this._setToMax(); + break; + case 33: // page up + this._incrMajor(); + break; + case 34: // page down + this._decrMajor(); + break; + } + } + }, + + /** + * sets the Slider's value in response to left or right key events + * + * @method _onLeftRightKey + * @param e {Event} the key event + * @protected + */ + _onLeftRightKey : function(e) { + e.preventDefault(); + if(this.get('disabled') === false){ + switch (e.charCode) { + case 37: // left + this._decrMinor(); + break; + case 39: // right + this._incrMinor(); + break; + } + } + }, + + /** + * sets the Slider's value in response to left or right key events when a meta (mac command/apple) key is also pressed + * + * @method _onLeftRightKeyMeta + * @param e {Event} the key event + * @protected + */ + _onLeftRightKeyMeta : function(e) { + e.preventDefault(); + if(this.get('disabled') === false){ + switch (e.charCode) { + case 37: // left + meta + this._setToMin(); + break; + case 39: // right + meta + this._setToMax(); + break; + } + } + }, + + + + + + /** + * Makes the thumb draggable and constrains it to the rail. + * + * @method _bindThumbDD + * @protected + */ + _bindThumbDD: function () { + var config = { constrain: this.rail }; + + // { constrain: rail, stickX: true } + config[ 'stick' + this.axis.toUpperCase() ] = true; + + /** + * The DD.Drag instance linked to the thumb node. + * + * @property _dd + * @type {DD.Drag} + * @protected + */ + this._dd = new Y.DD.Drag( { + node : this.thumb, + bubble : false, + on : { + 'drag:start': Y.bind( this._onDragStart, this ) + }, + after : { + 'drag:drag': Y.bind( this._afterDrag, this ), + 'drag:end' : Y.bind( this._afterDragEnd, this ) + } + } ); + + // Constrain the thumb to the rail + this._dd.plug( Y.Plugin.DDConstrained, config ); + }, + + /** + * Stub implementation. Override this (presumably in a class extension) to + * initialize any value logic that depends on the presence of the Drag + * instance. + * + * @method _bindValueLogic + * @protected + */ + _bindValueLogic: function () {}, + + /** + * Moves the thumb to pixel offset position along the rail. + * + * @method _uiMoveThumb + * @param offset {Number} the pixel offset to set as left or top style + * @param [options] {Object} Details to send with the `thumbMove` event + * @protected + */ + _uiMoveThumb: function ( offset, options ) { + if ( this.thumb ) { + this.thumb.setStyle( this._key.minEdge, offset + 'px' ); + + Y.log("Setting thumb " + this._key.minEdge + " to " + offset + "px","info","slider"); + + options || (options = {}); + options.offset = offset; + + this.fire( 'thumbMove', options ); + } + }, + + /** + * Dispatches the slideStart event. + * + * @method _onDragStart + * @param e {Event} the drag:start event from the thumb + * @protected + */ + _onDragStart: function ( e ) { + /** + * Signals the beginning of a thumb drag operation. Payload includes + * the thumb's drag:start event. + * + * @event slideStart + * @param event {Event} The event object for the slideStart with the + * following extra properties: + *
+ *
ddEvent (deprecated)
+ *
drag:start event from the thumb
+ *
originEvent
+ *
drag:start event from the thumb
+ *
+ */ + this.fire('slideStart', { + ddEvent: e, // for backward compatibility + originEvent: e + }); + }, + + /** + * Dispatches the thumbMove event. + * + * @method _afterDrag + * @param e {Event} the drag:drag event from the thumb + * @protected + */ + _afterDrag: function ( e ) { + var thumbXY = e.info.xy[ this._key.xyIndex ], + railXY = e.target.con._regionCache[ this._key.minEdge ]; + + Y.log("Thumb position: " + thumbXY + ", Rail position: " + railXY, "info", "slider"); + this.fire( 'thumbMove', { + offset : (thumbXY - railXY), + ddEvent: e, // for backward compatibility + originEvent: e + } ); + }, + + /** + * Dispatches the slideEnd event. + * + * @method _afterDragEnd + * @param e {Event} the drag:end event from the thumb + * @protected + */ + _afterDragEnd: function ( e ) { + /** + * Signals the end of a thumb drag operation. Payload includes + * the thumb's drag:end event. + * + * @event slideEnd + * @param event {Event} The event object for the slideEnd with the + * following extra properties: + *
+ *
ddEvent (deprecated)
+ *
drag:end event from the thumb
+ *
originEvent
+ *
drag:end event from the thumb
+ *
+ */ + this.fire('slideEnd', { + ddEvent: e, + originEvent: e + }); + }, + + /** + * Locks or unlocks the thumb. + * + * @method _afterDisabledChange + * @param e {Event} The disabledChange event object + * @protected + */ + _afterDisabledChange: function ( e ) { + this._dd.set( 'lock', e.newVal ); + }, + + /** + * Handles changes to the length attribute. By default, it + * triggers an update to the UI. + * + * @method _afterLengthChange + * @param e {Event} The lengthChange event object + * @protected + */ + _afterLengthChange: function ( e ) { + if ( this.get( 'rendered' ) ) { + this._uiSetRailLength( e.newVal ); + + this.syncUI(); + } + }, + + /** + * Synchronizes the DOM state with the attribute settings. + * + * @method syncUI + */ + syncUI : function () { + this._dd.con.resetCache(); + + this._syncThumbPosition(); + + // Forces a reflow of the bounding box to address IE8 inline-block + // container not expanding correctly. bug 2527905 + //this.get('boundingBox').toggleClass(''); + this.thumb.set('aria-valuemin', this.get('min')); + this.thumb.set('aria-valuemax', this.get('max')); + + this._dd.set('lock', this.get('disabled')); + }, + + /** + * Stub implementation. Override this (presumably in a class extension) to + * ensure the thumb is in the correct position according to the value + * alogorithm. + * instance. + * + * @method _syncThumbPosition + * @protected + */ + _syncThumbPosition: function () {}, + + /** + * Validates the axis is "x" or "y" (case insensitive). + * Converts to lower case for storage. + * + * @method _setAxis + * @param v {String} proposed value for the axis attribute + * @return {String} lowercased first character of the input string + * @protected + */ + _setAxis : function (v) { + v = ( v + '' ).toLowerCase(); + + return ( v === 'x' || v === 'y' ) ? v : INVALID_VALUE; + }, + + /** + *

Ensures the stored length value is a string with a quantity and unit. + * Unit will be defaulted to "px" if not included. Rejects + * values less than or equal to 0 and those that don't at least start with + * a number.

+ * + *

Currently only pixel lengths are supported.

+ * + * @method _setLength + * @param v {String} proposed value for the length attribute + * @return {String} the sanitized value + * @protected + */ + _setLength: function ( v ) { + v = ( v + '' ).toLowerCase(); + + var length = parseFloat( v, 10 ), + units = v.replace( /[\d\.\-]/g, '' ) || this.DEF_UNIT; + + return length > 0 ? ( length + units ) : INVALID_VALUE; + }, + + /** + *

Defaults the thumbURL attribute according to the current skin, or + * "sam" if none can be determined. Horizontal Sliders will have + * their thumbUrl attribute set to

+ *

"/configured/yui/builddir/slider-base/assets/skins/sam/thumb-x.png"

+ *

And vertical thumbs will get

+ *

"/configured/yui/builddir/slider-base/assets/skins/sam/thumb-y.png"

+ * + * @method _initThumbUrl + * @protected + */ + _initThumbUrl: function () { + if (!this.get('thumbUrl')) { + var skin = this.getSkinName() || 'sam', + base = Y.config.base; + + // Unfortunate hack to avoid requesting image resources from the + // combo service. The combo service does not serve images. + if (base.indexOf('http://yui.yahooapis.com/combo') === 0) { + base = 'http://yui.yahooapis.com/' + Y.version + '/build/'; + } + + // + this.set('thumbUrl', base + 'slider-base/assets/skins/' + + skin + '/thumb-' + this.axis + '.png'); + + } + }, + + /** + * Bounding box template that will contain the Slider's DOM subtree. <span>s are used to support inline-block styling. + * + * @property BOUNDING_TEMPLATE + * @type {String} + * @default <span></span> + */ + BOUNDING_TEMPLATE : '', + + /** + * Content box template that will contain the Slider's rail and thumb. + * + * @property CONTENT_TEMPLATE + * @type {String} + * @default <span></span> + */ + CONTENT_TEMPLATE : '', + + /** + * Rail template that will contain the end caps and the thumb. + * {placeholder}s are used for template substitution at render time. + * + * @property RAIL_TEMPLATE + * @type {String} + * @default <span class="{railClass}"><span class="{railMinCapClass}"></span><span class="{railMaxCapClass}"></span></span> + */ + RAIL_TEMPLATE : '' + + '' + + '' + + '', + + /** + * Thumb template that will contain the thumb image and shadow. <img> + * tags are used instead of background images to avoid a flicker bug in IE. + * {placeholder}s are used for template substitution at render time. + * + * @property THUMB_TEMPLATE + * @type {String} + * @default <span class="{thumbClass}" tabindex="-1"><img src="{thumbShadowUrl}" alt="Slider thumb shadow" class="{thumbShadowClass}"><img src="{thumbImageUrl}" alt="Slider thumb" class="{thumbImageClass}"></span> + */ + THUMB_TEMPLATE : '' + // keyboard access jeff tabindex="-1" + '' + + '' + + '' + +}, { + + // Y.SliderBase static properties + + /** + * The identity of the widget. + * + * @property NAME + * @type String + * @default 'sliderBase' + * @readOnly + * @protected + * @static + */ + NAME : 'sliderBase', + + /** + * Static property used to define the default attribute configuration of + * the Widget. + * + * @property ATTRS + * @type {Object} + * @protected + * @static + */ + ATTRS : { + + /** + * Axis upon which the Slider's thumb moves. "x" for + * horizontal, "y" for vertical. + * + * @attribute axis + * @type {String} + * @default "x" + * @writeOnce + */ + axis : { + value : 'x', + writeOnce : true, + setter : '_setAxis', + lazyAdd : false + }, + + /** + * The length of the rail (exclusive of the end caps if positioned by + * CSS). This corresponds to the movable range of the thumb. + * + * @attribute length + * @type {String | Number} e.g. "200px" or 200 + * @default 150px + */ + length: { + value: '150px', + setter: '_setLength' + }, + + /** + * Path to the thumb image. This will be used as both the thumb and + * shadow as a sprite. Defaults at render() to thumb-x.png or + * thumb-y.png in the skin directory of the current skin. + * + * @attribute thumbUrl + * @type {String} + * @default thumb-x.png or thumb-y.png in the sam skin directory of the + * current build path for Slider + */ + thumbUrl: { + value: null, + validator: Y.Lang.isString + } + } +}); + + +}, '3.17.2', {"requires": ["widget", "dd-constrain", "event-key"], "skinnable": true}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-min.js b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-min.js new file mode 100644 index 0000000..f5fcd33 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("slider-base",function(e,t){function r(){r.superclass.constructor.apply(this,arguments)}var n=e.Attribute.INVALID_VALUE;e.SliderBase=e.extend(r,e.Widget,{initializer:function(){this.axis=this.get("axis"),this._key={dim:this.axis==="y"?"height":"width",minEdge:this.axis==="y"?"top":"left",maxEdge:this.axis==="y"?"bottom":"right",xyIndex:this.axis==="y"?1:0},this.publish("thumbMove",{defaultFn:this._defThumbMoveFn,queuable:!0})},renderUI:function(){var e=this.get("contentBox");this.rail=this.renderRail(),this._uiSetRailLength(this.get("length")),this.thumb=this.renderThumb(),this.rail.appendChild(this.thumb),e.appendChild(this.rail),e.addClass(this.getClassName(this.axis))},renderRail:function(){var t=this.getClassName("rail","cap",this._key.minEdge),n=this.getClassName("rail","cap",this._key.maxEdge);return e.Node.create(e.Lang.sub(this.RAIL_TEMPLATE,{railClass:this.getClassName("rail"),railMinCapClass:t,railMaxCapClass:n}))},_uiSetRailLength:function(e){this.rail.setStyle(this._key.dim,e)},renderThumb:function(){this._initThumbUrl();var t=this.get("thumbUrl");return e.Node.create(e.Lang.sub(this.THUMB_TEMPLATE,{thumbClass:this.getClassName("thumb"),thumbShadowClass:this.getClassName("thumb","shadow"),thumbImageClass:this.getClassName("thumb","image"),thumbShadowUrl:t,thumbImageUrl:t,thumbAriaLabelId:this.getClassName("label",e.guid())}))},_onThumbClick:function(e){this.thumb.focus()},bindUI:function(){var t=this.get("boundingBox"),n=e.UA.opera?"press:":"down:",r=n+"38,40,33,34,35,36",i=n+"37,39",s=n+"37+meta,39+meta";t.on("key",this._onDirectionKey,r,this),t.on("key",this._onLeftRightKey,i,this),t.on("key",this._onLeftRightKeyMeta,s,this),this.thumb.on("click",this._onThumbClick,this),this._bindThumbDD(),this._bindValueLogic(),this.after("disabledChange",this._afterDisabledChange),this.after("lengthChange",this._afterLengthChange)},_incrMinor:function(){this.set("value",this.get("value")+this.get("minorStep"))},_decrMinor:function(){this.set("value",this.get("value")-this.get("minorStep"))},_incrMajor:function(){this.set("value",this.get("value")+this.get("majorStep"))},_decrMajor:function(){this.set("value",this.get("value")-this.get("majorStep"))},_setToMin:function(e){this.set("value",this.get("min"))},_setToMax:function(e){this.set("value",this.get("max"))},_onDirectionKey:function(e){e.preventDefault();if(this.get("disabled")===!1)switch(e.charCode){case 38:this._incrMinor();break;case 40:this._decrMinor();break;case 36:this._setToMin();break;case 35:this._setToMax();break;case 33:this._incrMajor();break;case 34:this._decrMajor()}},_onLeftRightKey:function(e){e.preventDefault();if(this.get("disabled")===!1)switch(e.charCode){case 37:this._decrMinor();break;case 39:this._incrMinor()}},_onLeftRightKeyMeta:function(e){e.preventDefault();if(this.get("disabled")===!1)switch(e.charCode){case 37:this._setToMin();break;case 39:this._setToMax()}},_bindThumbDD:function(){var t={constrain:this.rail};t["stick"+this.axis.toUpperCase()]=!0,this._dd=new e.DD.Drag({node:this.thumb,bubble:!1,on:{"drag:start":e.bind(this._onDragStart,this)},after:{"drag:drag":e.bind(this._afterDrag,this),"drag:end":e.bind(this._afterDragEnd,this)}}),this._dd.plug(e.Plugin.DDConstrained,t)},_bindValueLogic:function(){},_uiMoveThumb:function(e,t){this.thumb&&(this.thumb.setStyle(this._key.minEdge,e+"px"),t||(t={}),t.offset=e,this.fire("thumbMove",t))},_onDragStart:function(e){this.fire("slideStart",{ddEvent:e,originEvent:e})},_afterDrag:function(e){var t=e.info.xy[this._key.xyIndex],n=e.target.con._regionCache[this._key.minEdge];this.fire("thumbMove",{offset:t-n,ddEvent:e,originEvent:e})},_afterDragEnd:function(e){this.fire("slideEnd",{ddEvent:e,originEvent:e})},_afterDisabledChange:function(e){this._dd.set("lock",e.newVal)},_afterLengthChange:function(e){this.get("rendered")&&(this._uiSetRailLength(e.newVal),this.syncUI())},syncUI:function(){this._dd.con.resetCache(),this._syncThumbPosition(),this.thumb.set("aria-valuemin",this.get("min")),this.thumb.set("aria-valuemax",this.get("max")),this._dd.set("lock",this.get("disabled"))},_syncThumbPosition:function(){},_setAxis:function(e){return e=(e+"").toLowerCase(),e==="x"||e==="y"?e:n},_setLength:function(e){e=(e+"").toLowerCase();var t=parseFloat(e,10),r=e.replace(/[\d\.\-]/g,"")||this.DEF_UNIT;return t>0?t+r:n},_initThumbUrl:function(){if(!this.get("thumbUrl")){var t=this.getSkinName()||"sam",n=e.config.base;n.indexOf("http://yui.yahooapis.com/combo")===0&&(n="http://yui.yahooapis.com/"+e.version+"/build/"),this.set("thumbUrl",n+"slider-base/assets/skins/"+t+"/thumb-"+this.axis+".png")}},BOUNDING_TEMPLATE:"",CONTENT_TEMPLATE:"",RAIL_TEMPLATE:'',THUMB_TEMPLATE:'Slider thumb shadowSlider thumb'},{NAME:"sliderBase",ATTRS:{axis:{value:"x",writeOnce:!0,setter:"_setAxis",lazyAdd:!1},length:{value:"150px",setter:"_setLength"},thumbUrl:{value:null,validator:e.Lang.isString}}})},"3.17.2",{requires:["widget","dd-constrain","event-key"],skinnable:!0}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-base/slider-base.js b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base.js new file mode 100644 index 0000000..e22c769 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-base/slider-base.js @@ -0,0 +1,767 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('slider-base', function (Y, NAME) { + +/** + * Create a sliding value range input visualized as a draggable thumb on a + * background element. + * + * @module slider + * @submodule slider-base + */ + +var INVALID_VALUE = Y.Attribute.INVALID_VALUE; + +/** + * Create a slider to represent an input control capable of representing a + * series of intermediate states based on the position of the slider's thumb. + * These states are typically aligned to a value algorithm whereby the thumb + * position corresponds to a given value. Sliders may be oriented vertically or + * horizontally, based on the axis configuration. + * + * @class SliderBase + * @extends Widget + * @param config {Object} Configuration object + * @constructor + */ +function SliderBase() { + SliderBase.superclass.constructor.apply( this, arguments ); +} + +Y.SliderBase = Y.extend( SliderBase, Y.Widget, { + + // Y.Slider prototype + + /** + * Construction logic executed during Slider instantiation. + * + * @method initializer + * @protected + */ + initializer : function () { + /** + * The configured axis, stored for fast lookup since it's a writeOnce + * attribute. This is for use by extension classes. For + * implementation code, use get( "axis" ) for + * authoritative source. Never write to this property. + * + * @property axis + * @type {String} + * @protected + */ + this.axis = this.get( 'axis' ); + + /** + * Cached fast access map for DOM properties and attributes that + * pertain to accessing dimensional or positioning information + * according to the Slider's axis (e.g. "height" vs. + * "width"). Extension classes should add to this collection + * for axis related strings if necessary. + * + * @property _key + * @type {Object} + * @protected + */ + this._key = { + dim : ( this.axis === 'y' ) ? 'height' : 'width', + minEdge: ( this.axis === 'y' ) ? 'top' : 'left', + maxEdge: ( this.axis === 'y' ) ? 'bottom' : 'right', + xyIndex: ( this.axis === 'y' ) ? 1 : 0 + }; + + /** + * Signals that the thumb has moved. Payload includes the thumb's + * pixel offset from the top/left edge of the rail, and if triggered by + * dragging the thumb, the drag:drag event. + * + * @event thumbMove + * @param event {Event} The event object for the thumbMove with the + * following extra properties: + *
+ *
offset
+ *
Pixel offset from top/left of the slider to the new + * thumb position
+ *
ddEvent (deprecated)
+ *
drag:drag event from the thumb
+ *
originEvent
+ *
drag:drag event from the thumb
+ *
+ */ + this.publish( 'thumbMove', { + defaultFn: this._defThumbMoveFn, + queuable : true + } ); + }, + + /** + * Create the DOM structure for the Slider. + * + * @method renderUI + * @protected + */ + renderUI : function () { + var contentBox = this.get( 'contentBox' ); + + /** + * The Node instance of the Slider's rail element. Do not write to + * this property. + * + * @property rail + * @type {Node} + */ + this.rail = this.renderRail(); + + this._uiSetRailLength( this.get( 'length' ) ); + + /** + * The Node instance of the Slider's thumb element. Do not write to + * this property. + * + * @property thumb + * @type {Node} + */ + this.thumb = this.renderThumb(); + + this.rail.appendChild( this.thumb ); + // @TODO: insert( contentBox, 'replace' ) or setHTML? + contentBox.appendChild( this.rail ); + + // + contentBox.addClass( this.getClassName( this.axis ) ); + }, + + /** + * Creates the Slider rail DOM subtree for insertion into the Slider's + * contentBox. Override this method if you want to provide + * the rail element (presumably from existing markup). + * + * @method renderRail + * @return {Node} the rail node subtree + */ + renderRail: function () { + var minCapClass = this.getClassName( 'rail', 'cap', this._key.minEdge ), + maxCapClass = this.getClassName( 'rail', 'cap', this._key.maxEdge ); + + return Y.Node.create( + Y.Lang.sub( this.RAIL_TEMPLATE, { + railClass : this.getClassName( 'rail' ), + railMinCapClass: minCapClass, + railMaxCapClass: maxCapClass + } ) ); + }, + + /** + * Sets the rail length according to the length attribute. + * + * @method _uiSetRailLength + * @param length {String} the length to apply to the rail style + * @protected + */ + _uiSetRailLength: function ( length ) { + this.rail.setStyle( this._key.dim, length ); + }, + + /** + * Creates the Slider thumb DOM subtree for insertion into the Slider's + * rail. Override this method if you want to provide the thumb element + * (presumably from existing markup). + * + * @method renderThumb + * @return {Node} the thumb node subtree + */ + renderThumb: function () { + this._initThumbUrl(); + + var imageUrl = this.get( 'thumbUrl' ); + + return Y.Node.create( + Y.Lang.sub( this.THUMB_TEMPLATE, { + thumbClass : this.getClassName( 'thumb' ), + thumbShadowClass: this.getClassName( 'thumb', 'shadow' ), + thumbImageClass : this.getClassName( 'thumb', 'image' ), + thumbShadowUrl : imageUrl, + thumbImageUrl : imageUrl, + thumbAriaLabelId: this.getClassName( 'label', Y.guid()) // get unique id for specifying a label for ARIA + } ) ); + }, + + /** + * Gives focus to the thumb enabling keyboard access after clicking thumb + * + * @method _onThumbClick + * @protected + */ + _onThumbClick : function(e){ + this.thumb.focus(); + }, + + + /** + * Creates the Y.DD.Drag instance used to handle the thumb movement and + * binds Slider interaction to the configured value model. + * + * @method bindUI + * @protected + */ + bindUI : function () { + + // Begin keyboard listeners /////////////////////////////// + var boundingBox = this.get("boundingBox"), //Y.one('body'), + // Looking for a key event which will fire continously across browsers while the key is held down. + keyEvent = (!Y.UA.opera) ? "down:" : "press:", + // 38, 40 = arrow up/down, 33, 34 = page up/down, 35 , 36 = end/home + keyEventSpec = keyEvent + "38,40,33,34,35,36", + // 37 , 39 = arrow left/right + keyLeftRightSpec = keyEvent + "37,39", + // 37 , 39 = arrow left/right + meta (command/apple key) for mac + keyLeftRightSpecMeta = keyEvent + "37+meta,39+meta"; + + boundingBox.on("key", this._onDirectionKey, keyEventSpec, this); + boundingBox.on("key", this._onLeftRightKey, keyLeftRightSpec, this); + boundingBox.on("key", this._onLeftRightKeyMeta, keyLeftRightSpecMeta, this); + // End keyboard listeners ////////////////////////////////// + + this.thumb.on('click', this._onThumbClick, this); + + this._bindThumbDD(); + + this._bindValueLogic(); + + this.after( 'disabledChange', this._afterDisabledChange ); + this.after( 'lengthChange', this._afterLengthChange ); + + }, + + /** + * increments Slider value by a minor increment + * + * @method _incrMinor + * @protected + */ + _incrMinor : function(){ + this.set('value', (this.get('value') + this.get('minorStep'))); + }, + + /** + * decrements Slider value by a minor increment + * + * @method _decrMinor + * @protected + */ + _decrMinor : function(){ + this.set('value', (this.get('value') - this.get('minorStep'))); + }, + + /** + * increments Slider value by a major increment + * + * @method _incrMajor + * @protected + */ + _incrMajor : function(){ + this.set('value', (this.get('value') + this.get('majorStep'))); + }, + + /** + * decrements Slider value by a major increment + * + * @method _decrMajor + * @protected + */ + _decrMajor : function(){ + this.set('value', (this.get('value') - this.get('majorStep'))); + }, + + /** + * sets the Slider value to the min value. + * + * @method _setToMin + * @protected + */ + _setToMin : function(e){ + this.set('value', this.get('min')); + }, + + /** + * sets the Slider value to the max value. + * + * @method _setToMax + * @protected + */ + _setToMax : function(e){ + this.set('value', this.get('max')); + }, + + /** + * sets the Slider's value in response to key events. + * Left and right keys are in a separate method + * in case an implementation wants to increment values + * but needs left and right arrow keys for other purposes. + * + * @method _onDirectionKey + * @param e {Event} the key event + * @protected + */ + _onDirectionKey : function(e) { + e.preventDefault(); + if(this.get('disabled') === false){ + switch (e.charCode) { + case 38: // up + this._incrMinor(); + break; + case 40: // down + this._decrMinor(); + break; + case 36: // home + this._setToMin(); + break; + case 35: // end + this._setToMax(); + break; + case 33: // page up + this._incrMajor(); + break; + case 34: // page down + this._decrMajor(); + break; + } + } + }, + + /** + * sets the Slider's value in response to left or right key events + * + * @method _onLeftRightKey + * @param e {Event} the key event + * @protected + */ + _onLeftRightKey : function(e) { + e.preventDefault(); + if(this.get('disabled') === false){ + switch (e.charCode) { + case 37: // left + this._decrMinor(); + break; + case 39: // right + this._incrMinor(); + break; + } + } + }, + + /** + * sets the Slider's value in response to left or right key events when a meta (mac command/apple) key is also pressed + * + * @method _onLeftRightKeyMeta + * @param e {Event} the key event + * @protected + */ + _onLeftRightKeyMeta : function(e) { + e.preventDefault(); + if(this.get('disabled') === false){ + switch (e.charCode) { + case 37: // left + meta + this._setToMin(); + break; + case 39: // right + meta + this._setToMax(); + break; + } + } + }, + + + + + + /** + * Makes the thumb draggable and constrains it to the rail. + * + * @method _bindThumbDD + * @protected + */ + _bindThumbDD: function () { + var config = { constrain: this.rail }; + + // { constrain: rail, stickX: true } + config[ 'stick' + this.axis.toUpperCase() ] = true; + + /** + * The DD.Drag instance linked to the thumb node. + * + * @property _dd + * @type {DD.Drag} + * @protected + */ + this._dd = new Y.DD.Drag( { + node : this.thumb, + bubble : false, + on : { + 'drag:start': Y.bind( this._onDragStart, this ) + }, + after : { + 'drag:drag': Y.bind( this._afterDrag, this ), + 'drag:end' : Y.bind( this._afterDragEnd, this ) + } + } ); + + // Constrain the thumb to the rail + this._dd.plug( Y.Plugin.DDConstrained, config ); + }, + + /** + * Stub implementation. Override this (presumably in a class extension) to + * initialize any value logic that depends on the presence of the Drag + * instance. + * + * @method _bindValueLogic + * @protected + */ + _bindValueLogic: function () {}, + + /** + * Moves the thumb to pixel offset position along the rail. + * + * @method _uiMoveThumb + * @param offset {Number} the pixel offset to set as left or top style + * @param [options] {Object} Details to send with the `thumbMove` event + * @protected + */ + _uiMoveThumb: function ( offset, options ) { + if ( this.thumb ) { + this.thumb.setStyle( this._key.minEdge, offset + 'px' ); + + + options || (options = {}); + options.offset = offset; + + this.fire( 'thumbMove', options ); + } + }, + + /** + * Dispatches the slideStart event. + * + * @method _onDragStart + * @param e {Event} the drag:start event from the thumb + * @protected + */ + _onDragStart: function ( e ) { + /** + * Signals the beginning of a thumb drag operation. Payload includes + * the thumb's drag:start event. + * + * @event slideStart + * @param event {Event} The event object for the slideStart with the + * following extra properties: + *
+ *
ddEvent (deprecated)
+ *
drag:start event from the thumb
+ *
originEvent
+ *
drag:start event from the thumb
+ *
+ */ + this.fire('slideStart', { + ddEvent: e, // for backward compatibility + originEvent: e + }); + }, + + /** + * Dispatches the thumbMove event. + * + * @method _afterDrag + * @param e {Event} the drag:drag event from the thumb + * @protected + */ + _afterDrag: function ( e ) { + var thumbXY = e.info.xy[ this._key.xyIndex ], + railXY = e.target.con._regionCache[ this._key.minEdge ]; + + this.fire( 'thumbMove', { + offset : (thumbXY - railXY), + ddEvent: e, // for backward compatibility + originEvent: e + } ); + }, + + /** + * Dispatches the slideEnd event. + * + * @method _afterDragEnd + * @param e {Event} the drag:end event from the thumb + * @protected + */ + _afterDragEnd: function ( e ) { + /** + * Signals the end of a thumb drag operation. Payload includes + * the thumb's drag:end event. + * + * @event slideEnd + * @param event {Event} The event object for the slideEnd with the + * following extra properties: + *
+ *
ddEvent (deprecated)
+ *
drag:end event from the thumb
+ *
originEvent
+ *
drag:end event from the thumb
+ *
+ */ + this.fire('slideEnd', { + ddEvent: e, + originEvent: e + }); + }, + + /** + * Locks or unlocks the thumb. + * + * @method _afterDisabledChange + * @param e {Event} The disabledChange event object + * @protected + */ + _afterDisabledChange: function ( e ) { + this._dd.set( 'lock', e.newVal ); + }, + + /** + * Handles changes to the length attribute. By default, it + * triggers an update to the UI. + * + * @method _afterLengthChange + * @param e {Event} The lengthChange event object + * @protected + */ + _afterLengthChange: function ( e ) { + if ( this.get( 'rendered' ) ) { + this._uiSetRailLength( e.newVal ); + + this.syncUI(); + } + }, + + /** + * Synchronizes the DOM state with the attribute settings. + * + * @method syncUI + */ + syncUI : function () { + this._dd.con.resetCache(); + + this._syncThumbPosition(); + + // Forces a reflow of the bounding box to address IE8 inline-block + // container not expanding correctly. bug 2527905 + //this.get('boundingBox').toggleClass(''); + this.thumb.set('aria-valuemin', this.get('min')); + this.thumb.set('aria-valuemax', this.get('max')); + + this._dd.set('lock', this.get('disabled')); + }, + + /** + * Stub implementation. Override this (presumably in a class extension) to + * ensure the thumb is in the correct position according to the value + * alogorithm. + * instance. + * + * @method _syncThumbPosition + * @protected + */ + _syncThumbPosition: function () {}, + + /** + * Validates the axis is "x" or "y" (case insensitive). + * Converts to lower case for storage. + * + * @method _setAxis + * @param v {String} proposed value for the axis attribute + * @return {String} lowercased first character of the input string + * @protected + */ + _setAxis : function (v) { + v = ( v + '' ).toLowerCase(); + + return ( v === 'x' || v === 'y' ) ? v : INVALID_VALUE; + }, + + /** + *

Ensures the stored length value is a string with a quantity and unit. + * Unit will be defaulted to "px" if not included. Rejects + * values less than or equal to 0 and those that don't at least start with + * a number.

+ * + *

Currently only pixel lengths are supported.

+ * + * @method _setLength + * @param v {String} proposed value for the length attribute + * @return {String} the sanitized value + * @protected + */ + _setLength: function ( v ) { + v = ( v + '' ).toLowerCase(); + + var length = parseFloat( v, 10 ), + units = v.replace( /[\d\.\-]/g, '' ) || this.DEF_UNIT; + + return length > 0 ? ( length + units ) : INVALID_VALUE; + }, + + /** + *

Defaults the thumbURL attribute according to the current skin, or + * "sam" if none can be determined. Horizontal Sliders will have + * their thumbUrl attribute set to

+ *

"/configured/yui/builddir/slider-base/assets/skins/sam/thumb-x.png"

+ *

And vertical thumbs will get

+ *

"/configured/yui/builddir/slider-base/assets/skins/sam/thumb-y.png"

+ * + * @method _initThumbUrl + * @protected + */ + _initThumbUrl: function () { + if (!this.get('thumbUrl')) { + var skin = this.getSkinName() || 'sam', + base = Y.config.base; + + // Unfortunate hack to avoid requesting image resources from the + // combo service. The combo service does not serve images. + if (base.indexOf('http://yui.yahooapis.com/combo') === 0) { + base = 'http://yui.yahooapis.com/' + Y.version + '/build/'; + } + + // + this.set('thumbUrl', base + 'slider-base/assets/skins/' + + skin + '/thumb-' + this.axis + '.png'); + + } + }, + + /** + * Bounding box template that will contain the Slider's DOM subtree. <span>s are used to support inline-block styling. + * + * @property BOUNDING_TEMPLATE + * @type {String} + * @default <span></span> + */ + BOUNDING_TEMPLATE : '', + + /** + * Content box template that will contain the Slider's rail and thumb. + * + * @property CONTENT_TEMPLATE + * @type {String} + * @default <span></span> + */ + CONTENT_TEMPLATE : '', + + /** + * Rail template that will contain the end caps and the thumb. + * {placeholder}s are used for template substitution at render time. + * + * @property RAIL_TEMPLATE + * @type {String} + * @default <span class="{railClass}"><span class="{railMinCapClass}"></span><span class="{railMaxCapClass}"></span></span> + */ + RAIL_TEMPLATE : '' + + '' + + '' + + '', + + /** + * Thumb template that will contain the thumb image and shadow. <img> + * tags are used instead of background images to avoid a flicker bug in IE. + * {placeholder}s are used for template substitution at render time. + * + * @property THUMB_TEMPLATE + * @type {String} + * @default <span class="{thumbClass}" tabindex="-1"><img src="{thumbShadowUrl}" alt="Slider thumb shadow" class="{thumbShadowClass}"><img src="{thumbImageUrl}" alt="Slider thumb" class="{thumbImageClass}"></span> + */ + THUMB_TEMPLATE : '' + // keyboard access jeff tabindex="-1" + '' + + '' + + '' + +}, { + + // Y.SliderBase static properties + + /** + * The identity of the widget. + * + * @property NAME + * @type String + * @default 'sliderBase' + * @readOnly + * @protected + * @static + */ + NAME : 'sliderBase', + + /** + * Static property used to define the default attribute configuration of + * the Widget. + * + * @property ATTRS + * @type {Object} + * @protected + * @static + */ + ATTRS : { + + /** + * Axis upon which the Slider's thumb moves. "x" for + * horizontal, "y" for vertical. + * + * @attribute axis + * @type {String} + * @default "x" + * @writeOnce + */ + axis : { + value : 'x', + writeOnce : true, + setter : '_setAxis', + lazyAdd : false + }, + + /** + * The length of the rail (exclusive of the end caps if positioned by + * CSS). This corresponds to the movable range of the thumb. + * + * @attribute length + * @type {String | Number} e.g. "200px" or 200 + * @default 150px + */ + length: { + value: '150px', + setter: '_setLength' + }, + + /** + * Path to the thumb image. This will be used as both the thumb and + * shadow as a sprite. Defaults at render() to thumb-x.png or + * thumb-y.png in the skin directory of the current skin. + * + * @attribute thumbUrl + * @type {String} + * @default thumb-x.png or thumb-y.png in the sam skin directory of the + * current build path for Slider + */ + thumbUrl: { + value: null, + validator: Y.Lang.isString + } + } +}); + + +}, '3.17.2', {"requires": ["widget", "dd-constrain", "event-key"], "skinnable": true}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-coverage.js b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-coverage.js new file mode 100644 index 0000000..e0278ca --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/slider-value-range/slider-value-range.js']) { + __coverage__['build/slider-value-range/slider-value-range.js'] = {"path":"build/slider-value-range/slider-value-range.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":49}}},"2":{"name":"SliderValueRange","line":30,"loc":{"start":{"line":30,"column":0},"end":{"line":30,"column":28}}},"3":{"name":"(anonymous_3)","line":55,"loc":{"start":{"line":55,"column":31},"end":{"line":55,"column":43}}},"4":{"name":"(anonymous_4)","line":65,"loc":{"start":{"line":65,"column":25},"end":{"line":65,"column":37}}},"5":{"name":"(anonymous_5)","line":81,"loc":{"start":{"line":81,"column":28},"end":{"line":81,"column":40}}},"6":{"name":"(anonymous_6)","line":95,"loc":{"start":{"line":95,"column":26},"end":{"line":95,"column":38}}},"7":{"name":"(anonymous_7)","line":120,"loc":{"start":{"line":120,"column":25},"end":{"line":120,"column":40}}},"8":{"name":"(anonymous_8)","line":140,"loc":{"start":{"line":140,"column":24},"end":{"line":140,"column":44}}},"9":{"name":"(anonymous_9)","line":157,"loc":{"start":{"line":157,"column":24},"end":{"line":157,"column":43}}},"10":{"name":"(anonymous_10)","line":170,"loc":{"start":{"line":170,"column":18},"end":{"line":170,"column":30}}},"11":{"name":"(anonymous_11)","line":184,"loc":{"start":{"line":184,"column":18},"end":{"line":184,"column":35}}},"12":{"name":"(anonymous_12)","line":197,"loc":{"start":{"line":197,"column":25},"end":{"line":197,"column":40}}},"13":{"name":"(anonymous_13)","line":212,"loc":{"start":{"line":212,"column":25},"end":{"line":212,"column":40}}},"14":{"name":"(anonymous_14)","line":226,"loc":{"start":{"line":226,"column":22},"end":{"line":226,"column":34}}},"15":{"name":"(anonymous_15)","line":246,"loc":{"start":{"line":246,"column":27},"end":{"line":246,"column":42}}},"16":{"name":"(anonymous_16)","line":260,"loc":{"start":{"line":260,"column":22},"end":{"line":260,"column":50}}},"17":{"name":"(anonymous_17)","line":275,"loc":{"start":{"line":275,"column":25},"end":{"line":275,"column":44}}},"18":{"name":"(anonymous_18)","line":288,"loc":{"start":{"line":288,"column":25},"end":{"line":288,"column":44}}},"19":{"name":"(anonymous_19)","line":302,"loc":{"start":{"line":302,"column":22},"end":{"line":302,"column":41}}},"20":{"name":"(anonymous_20)","line":320,"loc":{"start":{"line":320,"column":23},"end":{"line":320,"column":42}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":418,"column":44}},"2":{"start":{"line":13,"column":0},"end":{"line":19,"column":23}},"3":{"start":{"line":30,"column":0},"end":{"line":32,"column":1}},"4":{"start":{"line":31,"column":4},"end":{"line":31,"column":33}},"5":{"start":{"line":34,"column":0},"end":{"line":415,"column":10}},"6":{"start":{"line":66,"column":12},"end":{"line":70,"column":16}},"7":{"start":{"line":82,"column":12},"end":{"line":82,"column":36}},"8":{"start":{"line":84,"column":12},"end":{"line":84,"column":51}},"9":{"start":{"line":96,"column":12},"end":{"line":99,"column":44}},"10":{"start":{"line":105,"column":12},"end":{"line":105,"column":49}},"11":{"start":{"line":106,"column":12},"end":{"line":106,"column":54}},"12":{"start":{"line":108,"column":12},"end":{"line":108,"column":66}},"13":{"start":{"line":122,"column":12},"end":{"line":124,"column":13}},"14":{"start":{"line":123,"column":16},"end":{"line":123,"column":63}},"15":{"start":{"line":142,"column":12},"end":{"line":142,"column":73}},"16":{"start":{"line":144,"column":12},"end":{"line":144,"column":56}},"17":{"start":{"line":158,"column":12},"end":{"line":158,"column":77}},"18":{"start":{"line":160,"column":12},"end":{"line":160,"column":26}},"19":{"start":{"line":171,"column":12},"end":{"line":171,"column":37}},"20":{"start":{"line":185,"column":12},"end":{"line":185,"column":42}},"21":{"start":{"line":198,"column":12},"end":{"line":198,"column":32}},"22":{"start":{"line":200,"column":12},"end":{"line":200,"column":38}},"23":{"start":{"line":213,"column":12},"end":{"line":213,"column":32}},"24":{"start":{"line":215,"column":12},"end":{"line":215,"column":38}},"25":{"start":{"line":227,"column":12},"end":{"line":228,"column":54}},"26":{"start":{"line":230,"column":12},"end":{"line":235,"column":13}},"27":{"start":{"line":234,"column":16},"end":{"line":234,"column":43}},"28":{"start":{"line":247,"column":12},"end":{"line":247,"column":31}},"29":{"start":{"line":248,"column":12},"end":{"line":248,"column":56}},"30":{"start":{"line":261,"column":12},"end":{"line":261,"column":71}},"31":{"start":{"line":262,"column":12},"end":{"line":262,"column":51}},"32":{"start":{"line":263,"column":12},"end":{"line":263,"column":52}},"33":{"start":{"line":276,"column":12},"end":{"line":276,"column":44}},"34":{"start":{"line":289,"column":12},"end":{"line":289,"column":44}},"35":{"start":{"line":303,"column":12},"end":{"line":305,"column":13}},"36":{"start":{"line":304,"column":16},"end":{"line":304,"column":60}},"37":{"start":{"line":306,"column":12},"end":{"line":306,"column":45}},"38":{"start":{"line":321,"column":12},"end":{"line":323,"column":20}},"39":{"start":{"line":326,"column":12},"end":{"line":326,"column":44}},"40":{"start":{"line":327,"column":12},"end":{"line":327,"column":44}},"41":{"start":{"line":328,"column":12},"end":{"line":328,"column":22}},"42":{"start":{"line":330,"column":12},"end":{"line":334,"column":30}}},"branchMap":{"1":{"line":105,"type":"binary-expr","locations":[{"start":{"line":105,"column":21},"end":{"line":105,"column":41}},{"start":{"line":105,"column":45},"end":{"line":105,"column":48}}]},"2":{"line":106,"type":"binary-expr","locations":[{"start":{"line":106,"column":24},"end":{"line":106,"column":47}},{"start":{"line":106,"column":51},"end":{"line":106,"column":53}}]},"3":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":12},"end":{"line":122,"column":12}},{"start":{"line":122,"column":12},"end":{"line":122,"column":12}}]},"4":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":12},"end":{"line":230,"column":12}},{"start":{"line":230,"column":12},"end":{"line":230,"column":12}}]},"5":{"line":303,"type":"if","locations":[{"start":{"line":303,"column":12},"end":{"line":303,"column":12}},{"start":{"line":303,"column":12},"end":{"line":303,"column":12}}]},"6":{"line":326,"type":"cond-expr","locations":[{"start":{"line":326,"column":34},"end":{"line":326,"column":37}},{"start":{"line":326,"column":40},"end":{"line":326,"column":43}}]},"7":{"line":327,"type":"cond-expr","locations":[{"start":{"line":327,"column":34},"end":{"line":327,"column":37}},{"start":{"line":327,"column":40},"end":{"line":327,"column":43}}]},"8":{"line":330,"type":"cond-expr","locations":[{"start":{"line":331,"column":20},"end":{"line":331,"column":23}},{"start":{"line":332,"column":20},"end":{"line":334,"column":29}}]},"9":{"line":332,"type":"cond-expr","locations":[{"start":{"line":333,"column":24},"end":{"line":333,"column":27}},{"start":{"line":334,"column":24},"end":{"line":334,"column":29}}]}},"code":["(function () { YUI.add('slider-value-range', function (Y, NAME) {","","/**"," * Adds value support for Slider as a range of integers between a configured"," * minimum and maximum value. For use with Y.Base.build(..) to"," * add the plumbing to Y.SliderBase."," *"," * @module slider"," * @submodule slider-value-range"," */","","// Constants for compression or performance","var MIN = 'min',"," MAX = 'max',"," VALUE = 'value',","// MINORSTEP = 'minorStep',","// MAJORSTEP = 'majorStep',",""," round = Math.round;","","/**"," * One class of value algorithm that can be built onto SliderBase. By default,"," * values range between 0 and 100, but you can configure these on the"," * built Slider class by setting the min and max"," * configurations. Set the initial value (will cause the thumb to move to the"," * appropriate location on the rail) in configuration as well if appropriate."," *"," * @class SliderValueRange"," */","function SliderValueRange() {"," this._initSliderValueRange();","}","","Y.SliderValueRange = Y.mix( SliderValueRange, {",""," // Prototype properties and methods that will be added onto host class"," prototype: {",""," /**"," * Factor used to translate value -> position -> value."," *"," * @property _factor"," * @type {Number}"," * @protected"," */"," _factor: 1,",""," /**"," * Stub for construction logic. Override if extending this class and"," * you need to set something up during the initializer phase."," *"," * @method _initSliderValueRange"," * @protected"," */"," _initSliderValueRange: function () {},",""," /**"," * Override of stub method in SliderBase that is called at the end of"," * its bindUI stage of render(). Subscribes to internal events to"," * trigger UI and related state updates."," *"," * @method _bindValueLogic"," * @protected"," */"," _bindValueLogic: function () {"," this.after( {"," minChange : this._afterMinChange,"," maxChange : this._afterMaxChange,"," valueChange: this._afterValueChange"," } );"," },",""," /**"," * Move the thumb to appropriate position if necessary. Also resets"," * the cached offsets and recalculates the conversion factor to"," * translate position to value."," *"," * @method _syncThumbPosition"," * @protected"," */"," _syncThumbPosition: function () {"," this._calculateFactor();",""," this._setPosition( this.get( VALUE ) );"," },",""," /**"," * Calculates and caches"," * (range between max and min) / (rail length)"," * for fast runtime calculation of position -> value."," *"," * @method _calculateFactor"," * @protected"," */"," _calculateFactor: function () {"," var length = this.get( 'length' ),"," thumbSize = this.thumb.getStyle( this._key.dim ),"," min = this.get( MIN ),"," max = this.get( MAX );",""," // The default thumb width is based on Sam skin's thumb dimension."," // This attempts to allow for rendering off-DOM, then attaching"," // without the need to call syncUI(). It is still recommended"," // to call syncUI() in these cases though, just to be sure."," length = parseFloat( length ) || 150;"," thumbSize = parseFloat( thumbSize ) || 15;",""," this._factor = ( max - min ) / ( length - thumbSize );",""," },",""," /**"," * Dispatch the new position of the thumb into the value setting"," * operations."," *"," * @method _defThumbMoveFn"," * @param e { EventFacade } The host's thumbMove event"," * @protected"," */"," _defThumbMoveFn: function ( e ) {"," // To prevent set('value', x) from looping back around"," if (e.source !== 'set') {"," this.set(VALUE, this._offsetToValue(e.offset));"," }"," },",""," /**"," *

Converts a pixel position into a value. Calculates current"," * thumb offset from the leading edge of the rail multiplied by the"," * ratio of (max - min) / (constraining dim).

"," *"," *

Override this if you want to use a different value mapping"," * algorithm.

"," *"," * @method _offsetToValue"," * @param offset { Number } X or Y pixel offset"," * @return { mixed } Value corresponding to the provided pixel offset"," * @protected"," */"," _offsetToValue: function ( offset ) {",""," var value = round( offset * this._factor ) + this.get( MIN );",""," return round( this._nearestValue( value ) );"," },",""," /**"," * Converts a value into a pixel offset for use in positioning"," * the thumb according to the reverse of the"," * _offsetToValue( xy ) operation."," *"," * @method _valueToOffset"," * @param val { Number } The value to map to pixel X or Y position"," * @return { Number } The pixel offset"," * @protected"," */"," _valueToOffset: function ( value ) {"," var offset = round( ( value - this.get( MIN ) ) / this._factor );",""," return offset;"," },",""," /**"," * Returns the current value. Override this if you want to introduce"," * output formatting. Otherwise equivalent to slider.get( \"value\" );"," *"," * @method getValue"," * @return {Number}"," */"," getValue: function () {"," return this.get( VALUE );"," },",""," /**"," * Updates the current value. Override this if you want to introduce"," * input value parsing or preprocessing. Otherwise equivalent to"," * slider.set( \"value\", v );"," *"," * @method setValue"," * @param val {Number} The new value"," * @return {Slider}"," * @chainable"," */"," setValue: function ( val ) {"," return this.set( VALUE, val );"," },",""," /**"," * Update position according to new min value. If the new min results"," * in the current value being out of range, the value is set to the"," * closer of min or max."," *"," * @method _afterMinChange"," * @param e { EventFacade } The min attribute change event."," * @protected"," */"," _afterMinChange: function ( e ) {"," this._verifyValue();",""," this._syncThumbPosition();"," },",""," /**"," * Update position according to new max value. If the new max results"," * in the current value being out of range, the value is set to the"," * closer of min or max."," *"," * @method _afterMaxChange"," * @param e { EventFacade } The max attribute change event."," * @protected"," */"," _afterMaxChange: function ( e ) {"," this._verifyValue();",""," this._syncThumbPosition();"," },",""," /**"," * Verifies that the current value is within the min - max range. If"," * not, value is set to either min or max, depending on which is"," * closer."," *"," * @method _verifyValue"," * @protected"," */"," _verifyValue: function () {"," var value = this.get( VALUE ),"," nearest = this._nearestValue( value );",""," if ( value !== nearest ) {"," // @TODO Can/should valueChange, minChange, etc be queued"," // events? To make dd.set( 'min', n ); execute after minChange"," // subscribers before on/after valueChange subscribers."," this.set( VALUE, nearest );"," }"," },",""," /**"," * Propagate change to the thumb position unless the change originated"," * from the thumbMove event."," *"," * @method _afterValueChange"," * @param e { EventFacade } The valueChange event."," * @protected"," */"," _afterValueChange: function ( e ) {"," var val = e.newVal;"," this._setPosition( val, { source: 'set' } );"," },",""," /**"," * Positions the thumb and its ARIA attributes in accordance with the"," * translated value."," *"," * @method _setPosition"," * @param value {Number} Value to translate to a pixel position"," * @param [options] {Object} Details object to pass to `_uiMoveThumb`"," * @protected"," */"," _setPosition: function ( value, options ) {"," this._uiMoveThumb( this._valueToOffset( value ), options );"," this.thumb.set('aria-valuenow', value);"," this.thumb.set('aria-valuetext', value);"," },",""," /**"," * Validates new values assigned to min attribute. Numbers"," * are acceptable. Override this to enforce different rules."," *"," * @method _validateNewMin"," * @param value {Any} Value assigned to min attribute."," * @return {Boolean} True for numbers. False otherwise."," * @protected"," */"," _validateNewMin: function ( value ) {"," return Y.Lang.isNumber( value );"," },",""," /**"," * Validates new values assigned to max attribute. Numbers"," * are acceptable. Override this to enforce different rules."," *"," * @method _validateNewMax"," * @param value { mixed } Value assigned to max attribute."," * @return { Boolean } True for numbers. False otherwise."," * @protected"," */"," _validateNewMax: function ( value ) {"," return Y.Lang.isNumber( value );"," },",""," /**"," * Restricts new values assigned to value attribute to be"," * between the configured min and max."," * Rounds to nearest integer value."," *"," * @method _setNewValue"," * @param value { Number } Value assigned to value attribute"," * @return { Number } Normalized and constrained value"," * @protected"," */"," _setNewValue: function ( value ) {"," if ( Y.Lang.isNumber( value ) ) {"," return round( this._nearestValue( value ) );"," }"," return Y.Attribute.INVALID_VALUE;"," },",""," /**"," * Returns the nearest valid value to the value input. If the provided"," * value is outside the min - max range, accounting for min > max"," * scenarios, the nearest of either min or max is returned. Otherwise,"," * the provided value is returned."," *"," * @method _nearestValue"," * @param value { mixed } Value to test against current min - max range"," * @return { Number } Current min, max, or value if within range"," * @protected"," */"," _nearestValue: function ( value ) {"," var min = this.get( MIN ),"," max = this.get( MAX ),"," tmp;",""," // Account for reverse value range (min > max)"," tmp = ( max > min ) ? max : min;"," min = ( max > min ) ? min : max;"," max = tmp;",""," return ( value < min ) ?"," min :"," ( value > max ) ?"," max :"," value;"," }",""," },",""," /**"," * Attributes that will be added onto host class."," *"," * @property ATTRS"," * @type {Object}"," * @static"," * @protected"," */"," ATTRS: {"," /**"," * The value associated with the farthest top, left position of the"," * rail. Can be greater than the configured max if you"," * want values to increase from right-to-left or bottom-to-top."," *"," * @attribute min"," * @type { Number }"," * @default 0"," */"," min: {"," value : 0,"," validator: '_validateNewMin'"," },",""," /**"," * The value associated with the farthest bottom, right position of"," * the rail. Can be less than the configured min if"," * you want values to increase from right-to-left or bottom-to-top."," *"," * @attribute max"," * @type { Number }"," * @default 100"," */"," max: {"," value : 100,"," validator: '_validateNewMax'"," },",""," /**"," * amount to increment/decrement the Slider value"," * when the arrow up/down/left/right keys are pressed"," *"," * @attribute minorStep"," * @type {Number}"," * @default 1"," */"," minorStep : {"," value: 1"," },",""," /**"," * amount to increment/decrement the Slider value"," * when the page up/down keys are pressed"," *"," * @attribute majorStep"," * @type {Number}"," * @default 10"," */"," majorStep : {"," value: 10"," },",""," /**"," * The value associated with the thumb's current position on the"," * rail. Defaults to the value inferred from the thumb's current"," * position. Specifying value in the constructor will move the"," * thumb to the position that corresponds to the supplied value."," *"," * @attribute value"," * @type { Number }"," * @default (inferred from current thumb position)"," */"," value: {"," value : 0,"," setter: '_setNewValue'"," }"," }","}, true );","","","}, '3.17.2', {\"requires\": [\"slider-base\"]});","","}());"]}; +} +var __cov_hPjVhmdw4NNLE4IFeTii3A = __coverage__['build/slider-value-range/slider-value-range.js']; +__cov_hPjVhmdw4NNLE4IFeTii3A.s['1']++;YUI.add('slider-value-range',function(Y,NAME){__cov_hPjVhmdw4NNLE4IFeTii3A.f['1']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['2']++;var MIN='min',MAX='max',VALUE='value',round=Math.round;__cov_hPjVhmdw4NNLE4IFeTii3A.s['3']++;function SliderValueRange(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['2']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['4']++;this._initSliderValueRange();}__cov_hPjVhmdw4NNLE4IFeTii3A.s['5']++;Y.SliderValueRange=Y.mix(SliderValueRange,{prototype:{_factor:1,_initSliderValueRange:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['3']++;},_bindValueLogic:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['4']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['6']++;this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['5']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['7']++;this._calculateFactor();__cov_hPjVhmdw4NNLE4IFeTii3A.s['8']++;this._setPosition(this.get(VALUE));},_calculateFactor:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['6']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['9']++;var length=this.get('length'),thumbSize=this.thumb.getStyle(this._key.dim),min=this.get(MIN),max=this.get(MAX);__cov_hPjVhmdw4NNLE4IFeTii3A.s['10']++;length=(__cov_hPjVhmdw4NNLE4IFeTii3A.b['1'][0]++,parseFloat(length))||(__cov_hPjVhmdw4NNLE4IFeTii3A.b['1'][1]++,150);__cov_hPjVhmdw4NNLE4IFeTii3A.s['11']++;thumbSize=(__cov_hPjVhmdw4NNLE4IFeTii3A.b['2'][0]++,parseFloat(thumbSize))||(__cov_hPjVhmdw4NNLE4IFeTii3A.b['2'][1]++,15);__cov_hPjVhmdw4NNLE4IFeTii3A.s['12']++;this._factor=(max-min)/(length-thumbSize);},_defThumbMoveFn:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['7']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['13']++;if(e.source!=='set'){__cov_hPjVhmdw4NNLE4IFeTii3A.b['3'][0]++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['14']++;this.set(VALUE,this._offsetToValue(e.offset));}else{__cov_hPjVhmdw4NNLE4IFeTii3A.b['3'][1]++;}},_offsetToValue:function(offset){__cov_hPjVhmdw4NNLE4IFeTii3A.f['8']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['15']++;var value=round(offset*this._factor)+this.get(MIN);__cov_hPjVhmdw4NNLE4IFeTii3A.s['16']++;return round(this._nearestValue(value));},_valueToOffset:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['9']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['17']++;var offset=round((value-this.get(MIN))/this._factor);__cov_hPjVhmdw4NNLE4IFeTii3A.s['18']++;return offset;},getValue:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['10']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['19']++;return this.get(VALUE);},setValue:function(val){__cov_hPjVhmdw4NNLE4IFeTii3A.f['11']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['20']++;return this.set(VALUE,val);},_afterMinChange:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['12']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['21']++;this._verifyValue();__cov_hPjVhmdw4NNLE4IFeTii3A.s['22']++;this._syncThumbPosition();},_afterMaxChange:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['13']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['23']++;this._verifyValue();__cov_hPjVhmdw4NNLE4IFeTii3A.s['24']++;this._syncThumbPosition();},_verifyValue:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['14']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['25']++;var value=this.get(VALUE),nearest=this._nearestValue(value);__cov_hPjVhmdw4NNLE4IFeTii3A.s['26']++;if(value!==nearest){__cov_hPjVhmdw4NNLE4IFeTii3A.b['4'][0]++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['27']++;this.set(VALUE,nearest);}else{__cov_hPjVhmdw4NNLE4IFeTii3A.b['4'][1]++;}},_afterValueChange:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['15']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['28']++;var val=e.newVal;__cov_hPjVhmdw4NNLE4IFeTii3A.s['29']++;this._setPosition(val,{source:'set'});},_setPosition:function(value,options){__cov_hPjVhmdw4NNLE4IFeTii3A.f['16']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['30']++;this._uiMoveThumb(this._valueToOffset(value),options);__cov_hPjVhmdw4NNLE4IFeTii3A.s['31']++;this.thumb.set('aria-valuenow',value);__cov_hPjVhmdw4NNLE4IFeTii3A.s['32']++;this.thumb.set('aria-valuetext',value);},_validateNewMin:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['17']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['33']++;return Y.Lang.isNumber(value);},_validateNewMax:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['18']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['34']++;return Y.Lang.isNumber(value);},_setNewValue:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['19']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['35']++;if(Y.Lang.isNumber(value)){__cov_hPjVhmdw4NNLE4IFeTii3A.b['5'][0]++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['36']++;return round(this._nearestValue(value));}else{__cov_hPjVhmdw4NNLE4IFeTii3A.b['5'][1]++;}__cov_hPjVhmdw4NNLE4IFeTii3A.s['37']++;return Y.Attribute.INVALID_VALUE;},_nearestValue:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['20']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['38']++;var min=this.get(MIN),max=this.get(MAX),tmp;__cov_hPjVhmdw4NNLE4IFeTii3A.s['39']++;tmp=max>min?(__cov_hPjVhmdw4NNLE4IFeTii3A.b['6'][0]++,max):(__cov_hPjVhmdw4NNLE4IFeTii3A.b['6'][1]++,min);__cov_hPjVhmdw4NNLE4IFeTii3A.s['40']++;min=max>min?(__cov_hPjVhmdw4NNLE4IFeTii3A.b['7'][0]++,min):(__cov_hPjVhmdw4NNLE4IFeTii3A.b['7'][1]++,max);__cov_hPjVhmdw4NNLE4IFeTii3A.s['41']++;max=tmp;__cov_hPjVhmdw4NNLE4IFeTii3A.s['42']++;return valuemax?(__cov_hPjVhmdw4NNLE4IFeTii3A.b['9'][0]++,max):(__cov_hPjVhmdw4NNLE4IFeTii3A.b['9'][1]++,value));}},ATTRS:{min:{value:0,validator:'_validateNewMin'},max:{value:100,validator:'_validateNewMax'},minorStep:{value:1},majorStep:{value:10},value:{value:0,setter:'_setNewValue'}}},true);},'3.17.2',{'requires':['slider-base']}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-debug.js b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-debug.js new file mode 100644 index 0000000..4b9779a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-debug.js @@ -0,0 +1,429 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('slider-value-range', function (Y, NAME) { + +/** + * Adds value support for Slider as a range of integers between a configured + * minimum and maximum value. For use with Y.Base.build(..) to + * add the plumbing to Y.SliderBase. + * + * @module slider + * @submodule slider-value-range + */ + +// Constants for compression or performance +var MIN = 'min', + MAX = 'max', + VALUE = 'value', +// MINORSTEP = 'minorStep', +// MAJORSTEP = 'majorStep', + + round = Math.round; + +/** + * One class of value algorithm that can be built onto SliderBase. By default, + * values range between 0 and 100, but you can configure these on the + * built Slider class by setting the min and max + * configurations. Set the initial value (will cause the thumb to move to the + * appropriate location on the rail) in configuration as well if appropriate. + * + * @class SliderValueRange + */ +function SliderValueRange() { + this._initSliderValueRange(); +} + +Y.SliderValueRange = Y.mix( SliderValueRange, { + + // Prototype properties and methods that will be added onto host class + prototype: { + + /** + * Factor used to translate value -> position -> value. + * + * @property _factor + * @type {Number} + * @protected + */ + _factor: 1, + + /** + * Stub for construction logic. Override if extending this class and + * you need to set something up during the initializer phase. + * + * @method _initSliderValueRange + * @protected + */ + _initSliderValueRange: function () {}, + + /** + * Override of stub method in SliderBase that is called at the end of + * its bindUI stage of render(). Subscribes to internal events to + * trigger UI and related state updates. + * + * @method _bindValueLogic + * @protected + */ + _bindValueLogic: function () { + this.after( { + minChange : this._afterMinChange, + maxChange : this._afterMaxChange, + valueChange: this._afterValueChange + } ); + }, + + /** + * Move the thumb to appropriate position if necessary. Also resets + * the cached offsets and recalculates the conversion factor to + * translate position to value. + * + * @method _syncThumbPosition + * @protected + */ + _syncThumbPosition: function () { + this._calculateFactor(); + + this._setPosition( this.get( VALUE ) ); + }, + + /** + * Calculates and caches + * (range between max and min) / (rail length) + * for fast runtime calculation of position -> value. + * + * @method _calculateFactor + * @protected + */ + _calculateFactor: function () { + var length = this.get( 'length' ), + thumbSize = this.thumb.getStyle( this._key.dim ), + min = this.get( MIN ), + max = this.get( MAX ); + + // The default thumb width is based on Sam skin's thumb dimension. + // This attempts to allow for rendering off-DOM, then attaching + // without the need to call syncUI(). It is still recommended + // to call syncUI() in these cases though, just to be sure. + length = parseFloat( length ) || 150; + thumbSize = parseFloat( thumbSize ) || 15; + + this._factor = ( max - min ) / ( length - thumbSize ); + + Y.log("Calculating factor(~" + this._factor.toFixed(3) + " = (max(" + max + ") - min(" + min + ")) / (length(" + length + ") - thumb size(" + thumbSize + "))","info","slider"); + }, + + /** + * Dispatch the new position of the thumb into the value setting + * operations. + * + * @method _defThumbMoveFn + * @param e { EventFacade } The host's thumbMove event + * @protected + */ + _defThumbMoveFn: function ( e ) { + // To prevent set('value', x) from looping back around + if (e.source !== 'set') { + this.set(VALUE, this._offsetToValue(e.offset)); + } + }, + + /** + *

Converts a pixel position into a value. Calculates current + * thumb offset from the leading edge of the rail multiplied by the + * ratio of (max - min) / (constraining dim).

+ * + *

Override this if you want to use a different value mapping + * algorithm.

+ * + * @method _offsetToValue + * @param offset { Number } X or Y pixel offset + * @return { mixed } Value corresponding to the provided pixel offset + * @protected + */ + _offsetToValue: function ( offset ) { + + var value = round( offset * this._factor ) + this.get( MIN ); + + Y.log("Offset: " + offset + " => Value: " + value, "info", "slider"); + return round( this._nearestValue( value ) ); + }, + + /** + * Converts a value into a pixel offset for use in positioning + * the thumb according to the reverse of the + * _offsetToValue( xy ) operation. + * + * @method _valueToOffset + * @param val { Number } The value to map to pixel X or Y position + * @return { Number } The pixel offset + * @protected + */ + _valueToOffset: function ( value ) { + var offset = round( ( value - this.get( MIN ) ) / this._factor ); + + Y.log("Value: " + value + " => Offset: " + offset, "info", "slider"); + return offset; + }, + + /** + * Returns the current value. Override this if you want to introduce + * output formatting. Otherwise equivalent to slider.get( "value" ); + * + * @method getValue + * @return {Number} + */ + getValue: function () { + return this.get( VALUE ); + }, + + /** + * Updates the current value. Override this if you want to introduce + * input value parsing or preprocessing. Otherwise equivalent to + * slider.set( "value", v ); + * + * @method setValue + * @param val {Number} The new value + * @return {Slider} + * @chainable + */ + setValue: function ( val ) { + return this.set( VALUE, val ); + }, + + /** + * Update position according to new min value. If the new min results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMinChange + * @param e { EventFacade } The min attribute change event. + * @protected + */ + _afterMinChange: function ( e ) { + this._verifyValue(); + + this._syncThumbPosition(); + }, + + /** + * Update position according to new max value. If the new max results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMaxChange + * @param e { EventFacade } The max attribute change event. + * @protected + */ + _afterMaxChange: function ( e ) { + this._verifyValue(); + + this._syncThumbPosition(); + }, + + /** + * Verifies that the current value is within the min - max range. If + * not, value is set to either min or max, depending on which is + * closer. + * + * @method _verifyValue + * @protected + */ + _verifyValue: function () { + var value = this.get( VALUE ), + nearest = this._nearestValue( value ); + + if ( value !== nearest ) { + // @TODO Can/should valueChange, minChange, etc be queued + // events? To make dd.set( 'min', n ); execute after minChange + // subscribers before on/after valueChange subscribers. + this.set( VALUE, nearest ); + } + }, + + /** + * Propagate change to the thumb position unless the change originated + * from the thumbMove event. + * + * @method _afterValueChange + * @param e { EventFacade } The valueChange event. + * @protected + */ + _afterValueChange: function ( e ) { + var val = e.newVal; + Y.log("Positioning thumb after set('value',x)","info","slider"); + this._setPosition( val, { source: 'set' } ); + }, + + /** + * Positions the thumb and its ARIA attributes in accordance with the + * translated value. + * + * @method _setPosition + * @param value {Number} Value to translate to a pixel position + * @param [options] {Object} Details object to pass to `_uiMoveThumb` + * @protected + */ + _setPosition: function ( value, options ) { + this._uiMoveThumb( this._valueToOffset( value ), options ); + this.thumb.set('aria-valuenow', value); + this.thumb.set('aria-valuetext', value); + }, + + /** + * Validates new values assigned to min attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMin + * @param value {Any} Value assigned to min attribute. + * @return {Boolean} True for numbers. False otherwise. + * @protected + */ + _validateNewMin: function ( value ) { + return Y.Lang.isNumber( value ); + }, + + /** + * Validates new values assigned to max attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMax + * @param value { mixed } Value assigned to max attribute. + * @return { Boolean } True for numbers. False otherwise. + * @protected + */ + _validateNewMax: function ( value ) { + return Y.Lang.isNumber( value ); + }, + + /** + * Restricts new values assigned to value attribute to be + * between the configured min and max. + * Rounds to nearest integer value. + * + * @method _setNewValue + * @param value { Number } Value assigned to value attribute + * @return { Number } Normalized and constrained value + * @protected + */ + _setNewValue: function ( value ) { + if ( Y.Lang.isNumber( value ) ) { + return round( this._nearestValue( value ) ); + } + return Y.Attribute.INVALID_VALUE; + }, + + /** + * Returns the nearest valid value to the value input. If the provided + * value is outside the min - max range, accounting for min > max + * scenarios, the nearest of either min or max is returned. Otherwise, + * the provided value is returned. + * + * @method _nearestValue + * @param value { mixed } Value to test against current min - max range + * @return { Number } Current min, max, or value if within range + * @protected + */ + _nearestValue: function ( value ) { + var min = this.get( MIN ), + max = this.get( MAX ), + tmp; + + // Account for reverse value range (min > max) + tmp = ( max > min ) ? max : min; + min = ( max > min ) ? min : max; + max = tmp; + + return ( value < min ) ? + min : + ( value > max ) ? + max : + value; + } + + }, + + /** + * Attributes that will be added onto host class. + * + * @property ATTRS + * @type {Object} + * @static + * @protected + */ + ATTRS: { + /** + * The value associated with the farthest top, left position of the + * rail. Can be greater than the configured max if you + * want values to increase from right-to-left or bottom-to-top. + * + * @attribute min + * @type { Number } + * @default 0 + */ + min: { + value : 0, + validator: '_validateNewMin' + }, + + /** + * The value associated with the farthest bottom, right position of + * the rail. Can be less than the configured min if + * you want values to increase from right-to-left or bottom-to-top. + * + * @attribute max + * @type { Number } + * @default 100 + */ + max: { + value : 100, + validator: '_validateNewMax' + }, + + /** + * amount to increment/decrement the Slider value + * when the arrow up/down/left/right keys are pressed + * + * @attribute minorStep + * @type {Number} + * @default 1 + */ + minorStep : { + value: 1 + }, + + /** + * amount to increment/decrement the Slider value + * when the page up/down keys are pressed + * + * @attribute majorStep + * @type {Number} + * @default 10 + */ + majorStep : { + value: 10 + }, + + /** + * The value associated with the thumb's current position on the + * rail. Defaults to the value inferred from the thumb's current + * position. Specifying value in the constructor will move the + * thumb to the position that corresponds to the supplied value. + * + * @attribute value + * @type { Number } + * @default (inferred from current thumb position) + */ + value: { + value : 0, + setter: '_setNewValue' + } + } +}, true ); + + +}, '3.17.2', {"requires": ["slider-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-min.js b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-min.js new file mode 100644 index 0000000..003b20e --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("slider-value-range",function(e,t){function o(){this._initSliderValueRange()}var n="min",r="max",i="value",s=Math.round;e.SliderValueRange=e.mix(o,{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange})},_syncThumbPosition:function(){this._calculateFactor(),this._setPosition(this.get(i))},_calculateFactor:function(){var e=this.get("length"),t=this.thumb.getStyle(this._key.dim),i=this.get(n),s=this.get(r);e=parseFloat(e)||150,t=parseFloat(t)||15,this._factor=(s-i)/(e-t)},_defThumbMoveFn:function(e){e.source!=="set"&&this.set(i,this._offsetToValue(e.offset))},_offsetToValue:function(e){var t=s(e*this._factor)+this.get(n);return s(this._nearestValue(t))},_valueToOffset:function(e){var t=s((e-this.get(n))/this._factor);return t},getValue:function(){return this.get(i)},setValue:function(e){return this.set(i,e)},_afterMinChange:function(e){this._verifyValue(),this._syncThumbPosition()},_afterMaxChange:function(e){this._verifyValue(),this._syncThumbPosition()},_verifyValue:function(){var e=this.get(i),t=this._nearestValue(e);e!==t&&this.set(i,t)},_afterValueChange:function(e){var t=e.newVal;this._setPosition(t,{source:"set"})},_setPosition:function(e,t){this._uiMoveThumb(this._valueToOffset(e),t),this.thumb.set("aria-valuenow",e),this.thumb.set("aria-valuetext",e)},_validateNewMin:function(t){return e.Lang.isNumber(t)},_validateNewMax:function(t){return e.Lang.isNumber(t)},_setNewValue:function(t){return e.Lang.isNumber(t)?s(this._nearestValue(t)):e.Attribute.INVALID_VALUE},_nearestValue:function(e){var t=this.get(n),i=this.get(r),s;return s=i>t?i:t,t=i>t?t:i,i=s,ei?i:e}},ATTRS:{min:{value:0,validator:"_validateNewMin"},max:{value:100,validator:"_validateNewMax"},minorStep:{value:1},majorStep:{value:10},value:{value:0,setter:"_setNewValue"}}},!0)},"3.17.2",{requires:["slider-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range.js b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range.js new file mode 100644 index 0000000..be08149 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/slider-value-range/slider-value-range.js @@ -0,0 +1,425 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('slider-value-range', function (Y, NAME) { + +/** + * Adds value support for Slider as a range of integers between a configured + * minimum and maximum value. For use with Y.Base.build(..) to + * add the plumbing to Y.SliderBase. + * + * @module slider + * @submodule slider-value-range + */ + +// Constants for compression or performance +var MIN = 'min', + MAX = 'max', + VALUE = 'value', +// MINORSTEP = 'minorStep', +// MAJORSTEP = 'majorStep', + + round = Math.round; + +/** + * One class of value algorithm that can be built onto SliderBase. By default, + * values range between 0 and 100, but you can configure these on the + * built Slider class by setting the min and max + * configurations. Set the initial value (will cause the thumb to move to the + * appropriate location on the rail) in configuration as well if appropriate. + * + * @class SliderValueRange + */ +function SliderValueRange() { + this._initSliderValueRange(); +} + +Y.SliderValueRange = Y.mix( SliderValueRange, { + + // Prototype properties and methods that will be added onto host class + prototype: { + + /** + * Factor used to translate value -> position -> value. + * + * @property _factor + * @type {Number} + * @protected + */ + _factor: 1, + + /** + * Stub for construction logic. Override if extending this class and + * you need to set something up during the initializer phase. + * + * @method _initSliderValueRange + * @protected + */ + _initSliderValueRange: function () {}, + + /** + * Override of stub method in SliderBase that is called at the end of + * its bindUI stage of render(). Subscribes to internal events to + * trigger UI and related state updates. + * + * @method _bindValueLogic + * @protected + */ + _bindValueLogic: function () { + this.after( { + minChange : this._afterMinChange, + maxChange : this._afterMaxChange, + valueChange: this._afterValueChange + } ); + }, + + /** + * Move the thumb to appropriate position if necessary. Also resets + * the cached offsets and recalculates the conversion factor to + * translate position to value. + * + * @method _syncThumbPosition + * @protected + */ + _syncThumbPosition: function () { + this._calculateFactor(); + + this._setPosition( this.get( VALUE ) ); + }, + + /** + * Calculates and caches + * (range between max and min) / (rail length) + * for fast runtime calculation of position -> value. + * + * @method _calculateFactor + * @protected + */ + _calculateFactor: function () { + var length = this.get( 'length' ), + thumbSize = this.thumb.getStyle( this._key.dim ), + min = this.get( MIN ), + max = this.get( MAX ); + + // The default thumb width is based on Sam skin's thumb dimension. + // This attempts to allow for rendering off-DOM, then attaching + // without the need to call syncUI(). It is still recommended + // to call syncUI() in these cases though, just to be sure. + length = parseFloat( length ) || 150; + thumbSize = parseFloat( thumbSize ) || 15; + + this._factor = ( max - min ) / ( length - thumbSize ); + + }, + + /** + * Dispatch the new position of the thumb into the value setting + * operations. + * + * @method _defThumbMoveFn + * @param e { EventFacade } The host's thumbMove event + * @protected + */ + _defThumbMoveFn: function ( e ) { + // To prevent set('value', x) from looping back around + if (e.source !== 'set') { + this.set(VALUE, this._offsetToValue(e.offset)); + } + }, + + /** + *

Converts a pixel position into a value. Calculates current + * thumb offset from the leading edge of the rail multiplied by the + * ratio of (max - min) / (constraining dim).

+ * + *

Override this if you want to use a different value mapping + * algorithm.

+ * + * @method _offsetToValue + * @param offset { Number } X or Y pixel offset + * @return { mixed } Value corresponding to the provided pixel offset + * @protected + */ + _offsetToValue: function ( offset ) { + + var value = round( offset * this._factor ) + this.get( MIN ); + + return round( this._nearestValue( value ) ); + }, + + /** + * Converts a value into a pixel offset for use in positioning + * the thumb according to the reverse of the + * _offsetToValue( xy ) operation. + * + * @method _valueToOffset + * @param val { Number } The value to map to pixel X or Y position + * @return { Number } The pixel offset + * @protected + */ + _valueToOffset: function ( value ) { + var offset = round( ( value - this.get( MIN ) ) / this._factor ); + + return offset; + }, + + /** + * Returns the current value. Override this if you want to introduce + * output formatting. Otherwise equivalent to slider.get( "value" ); + * + * @method getValue + * @return {Number} + */ + getValue: function () { + return this.get( VALUE ); + }, + + /** + * Updates the current value. Override this if you want to introduce + * input value parsing or preprocessing. Otherwise equivalent to + * slider.set( "value", v ); + * + * @method setValue + * @param val {Number} The new value + * @return {Slider} + * @chainable + */ + setValue: function ( val ) { + return this.set( VALUE, val ); + }, + + /** + * Update position according to new min value. If the new min results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMinChange + * @param e { EventFacade } The min attribute change event. + * @protected + */ + _afterMinChange: function ( e ) { + this._verifyValue(); + + this._syncThumbPosition(); + }, + + /** + * Update position according to new max value. If the new max results + * in the current value being out of range, the value is set to the + * closer of min or max. + * + * @method _afterMaxChange + * @param e { EventFacade } The max attribute change event. + * @protected + */ + _afterMaxChange: function ( e ) { + this._verifyValue(); + + this._syncThumbPosition(); + }, + + /** + * Verifies that the current value is within the min - max range. If + * not, value is set to either min or max, depending on which is + * closer. + * + * @method _verifyValue + * @protected + */ + _verifyValue: function () { + var value = this.get( VALUE ), + nearest = this._nearestValue( value ); + + if ( value !== nearest ) { + // @TODO Can/should valueChange, minChange, etc be queued + // events? To make dd.set( 'min', n ); execute after minChange + // subscribers before on/after valueChange subscribers. + this.set( VALUE, nearest ); + } + }, + + /** + * Propagate change to the thumb position unless the change originated + * from the thumbMove event. + * + * @method _afterValueChange + * @param e { EventFacade } The valueChange event. + * @protected + */ + _afterValueChange: function ( e ) { + var val = e.newVal; + this._setPosition( val, { source: 'set' } ); + }, + + /** + * Positions the thumb and its ARIA attributes in accordance with the + * translated value. + * + * @method _setPosition + * @param value {Number} Value to translate to a pixel position + * @param [options] {Object} Details object to pass to `_uiMoveThumb` + * @protected + */ + _setPosition: function ( value, options ) { + this._uiMoveThumb( this._valueToOffset( value ), options ); + this.thumb.set('aria-valuenow', value); + this.thumb.set('aria-valuetext', value); + }, + + /** + * Validates new values assigned to min attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMin + * @param value {Any} Value assigned to min attribute. + * @return {Boolean} True for numbers. False otherwise. + * @protected + */ + _validateNewMin: function ( value ) { + return Y.Lang.isNumber( value ); + }, + + /** + * Validates new values assigned to max attribute. Numbers + * are acceptable. Override this to enforce different rules. + * + * @method _validateNewMax + * @param value { mixed } Value assigned to max attribute. + * @return { Boolean } True for numbers. False otherwise. + * @protected + */ + _validateNewMax: function ( value ) { + return Y.Lang.isNumber( value ); + }, + + /** + * Restricts new values assigned to value attribute to be + * between the configured min and max. + * Rounds to nearest integer value. + * + * @method _setNewValue + * @param value { Number } Value assigned to value attribute + * @return { Number } Normalized and constrained value + * @protected + */ + _setNewValue: function ( value ) { + if ( Y.Lang.isNumber( value ) ) { + return round( this._nearestValue( value ) ); + } + return Y.Attribute.INVALID_VALUE; + }, + + /** + * Returns the nearest valid value to the value input. If the provided + * value is outside the min - max range, accounting for min > max + * scenarios, the nearest of either min or max is returned. Otherwise, + * the provided value is returned. + * + * @method _nearestValue + * @param value { mixed } Value to test against current min - max range + * @return { Number } Current min, max, or value if within range + * @protected + */ + _nearestValue: function ( value ) { + var min = this.get( MIN ), + max = this.get( MAX ), + tmp; + + // Account for reverse value range (min > max) + tmp = ( max > min ) ? max : min; + min = ( max > min ) ? min : max; + max = tmp; + + return ( value < min ) ? + min : + ( value > max ) ? + max : + value; + } + + }, + + /** + * Attributes that will be added onto host class. + * + * @property ATTRS + * @type {Object} + * @static + * @protected + */ + ATTRS: { + /** + * The value associated with the farthest top, left position of the + * rail. Can be greater than the configured max if you + * want values to increase from right-to-left or bottom-to-top. + * + * @attribute min + * @type { Number } + * @default 0 + */ + min: { + value : 0, + validator: '_validateNewMin' + }, + + /** + * The value associated with the farthest bottom, right position of + * the rail. Can be less than the configured min if + * you want values to increase from right-to-left or bottom-to-top. + * + * @attribute max + * @type { Number } + * @default 100 + */ + max: { + value : 100, + validator: '_validateNewMax' + }, + + /** + * amount to increment/decrement the Slider value + * when the arrow up/down/left/right keys are pressed + * + * @attribute minorStep + * @type {Number} + * @default 1 + */ + minorStep : { + value: 1 + }, + + /** + * amount to increment/decrement the Slider value + * when the page up/down keys are pressed + * + * @attribute majorStep + * @type {Number} + * @default 10 + */ + majorStep : { + value: 10 + }, + + /** + * The value associated with the thumb's current position on the + * rail. Defaults to the value inferred from the thumb's current + * position. Specifying value in the constructor will move the + * thumb to the position that corresponds to the supplied value. + * + * @attribute value + * @type { Number } + * @default (inferred from current thumb position) + */ + value: { + value : 0, + setter: '_setNewValue' + } + } +}, true ); + + +}, '3.17.2', {"requires": ["slider-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-coverage.js b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-coverage.js new file mode 100644 index 0000000..b628fbe --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/sortable-scroll/sortable-scroll.js']) { + __coverage__['build/sortable-scroll/sortable-scroll.js'] = {"path":"build/sortable-scroll/sortable-scroll.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":46}}},"2":{"name":"(anonymous_2)","line":17,"loc":{"start":{"line":17,"column":21},"end":{"line":17,"column":32}}},"3":{"name":"(anonymous_3)","line":22,"loc":{"start":{"line":22,"column":21},"end":{"line":22,"column":32}}},"4":{"name":"(anonymous_4)","line":27,"loc":{"start":{"line":27,"column":42},"end":{"line":27,"column":54}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":67,"column":54}},"2":{"start":{"line":17,"column":4},"end":{"line":19,"column":6}},"3":{"start":{"line":18,"column":8},"end":{"line":18,"column":65}},"4":{"start":{"line":21,"column":4},"end":{"line":59,"column":7}},"5":{"start":{"line":23,"column":12},"end":{"line":23,"column":40}},"6":{"start":{"line":24,"column":12},"end":{"line":26,"column":15}},"7":{"start":{"line":27,"column":12},"end":{"line":31,"column":15}},"8":{"start":{"line":28,"column":16},"end":{"line":30,"column":17}},"9":{"start":{"line":29,"column":20},"end":{"line":29,"column":88}},"10":{"start":{"line":62,"column":4},"end":{"line":62,"column":28}},"11":{"start":{"line":63,"column":4},"end":{"line":63,"column":41}}},"branchMap":{"1":{"line":28,"type":"if","locations":[{"start":{"line":28,"column":16},"end":{"line":28,"column":16}},{"start":{"line":28,"column":16},"end":{"line":28,"column":16}}]},"2":{"line":28,"type":"binary-expr","locations":[{"start":{"line":28,"column":20},"end":{"line":28,"column":38}},{"start":{"line":28,"column":42},"end":{"line":28,"column":59}}]}},"code":["(function () { YUI.add('sortable-scroll', function (Y, NAME) {","",""," /**"," * Plugin for sortable to handle scrolling lists."," * @module sortable"," * @submodule sortable-scroll"," */"," /**"," * Plugin for sortable to handle scrolling lists."," * @class SortScroll"," * @extends Base"," * @constructor"," * @namespace Plugin"," */",""," var SortScroll = function() {"," SortScroll.superclass.constructor.apply(this, arguments);"," };",""," Y.extend(SortScroll, Y.Base, {"," initializer: function() {"," var host = this.get('host');"," host.plug(Y.Plugin.DDNodeScroll, {"," node: host.get('container')"," });"," host.delegate.on('drop:over', function(e) {"," if (this.dd.nodescroll && e.drag.nodescroll) {"," e.drag.nodescroll.set('parentScroll', Y.one(this.get('container')));"," }"," });"," }"," }, {"," ATTRS: {"," host: {"," value: ''"," }"," },"," /**"," * @property NAME"," * @default SortScroll"," * @readonly"," * @protected"," * @static"," * @description The name of the class."," * @type {String}"," */"," NAME: 'SortScroll',"," /**"," * @property NS"," * @default scroll"," * @readonly"," * @protected"," * @static"," * @description The scroll instance."," * @type {String}"," */"," NS: 'scroll'"," });","",""," Y.namespace('Y.Plugin');"," Y.Plugin.SortableScroll = SortScroll;","","","","}, '3.17.2', {\"requires\": [\"dd-scroll\", \"sortable\"]});","","}());"]}; +} +var __cov_oHJxUCNLEkas15Sa9_k0yA = __coverage__['build/sortable-scroll/sortable-scroll.js']; +__cov_oHJxUCNLEkas15Sa9_k0yA.s['1']++;YUI.add('sortable-scroll',function(Y,NAME){__cov_oHJxUCNLEkas15Sa9_k0yA.f['1']++;__cov_oHJxUCNLEkas15Sa9_k0yA.s['2']++;var SortScroll=function(){__cov_oHJxUCNLEkas15Sa9_k0yA.f['2']++;__cov_oHJxUCNLEkas15Sa9_k0yA.s['3']++;SortScroll.superclass.constructor.apply(this,arguments);};__cov_oHJxUCNLEkas15Sa9_k0yA.s['4']++;Y.extend(SortScroll,Y.Base,{initializer:function(){__cov_oHJxUCNLEkas15Sa9_k0yA.f['3']++;__cov_oHJxUCNLEkas15Sa9_k0yA.s['5']++;var host=this.get('host');__cov_oHJxUCNLEkas15Sa9_k0yA.s['6']++;host.plug(Y.Plugin.DDNodeScroll,{node:host.get('container')});__cov_oHJxUCNLEkas15Sa9_k0yA.s['7']++;host.delegate.on('drop:over',function(e){__cov_oHJxUCNLEkas15Sa9_k0yA.f['4']++;__cov_oHJxUCNLEkas15Sa9_k0yA.s['8']++;if((__cov_oHJxUCNLEkas15Sa9_k0yA.b['2'][0]++,this.dd.nodescroll)&&(__cov_oHJxUCNLEkas15Sa9_k0yA.b['2'][1]++,e.drag.nodescroll)){__cov_oHJxUCNLEkas15Sa9_k0yA.b['1'][0]++;__cov_oHJxUCNLEkas15Sa9_k0yA.s['9']++;e.drag.nodescroll.set('parentScroll',Y.one(this.get('container')));}else{__cov_oHJxUCNLEkas15Sa9_k0yA.b['1'][1]++;}});}},{ATTRS:{host:{value:''}},NAME:'SortScroll',NS:'scroll'});__cov_oHJxUCNLEkas15Sa9_k0yA.s['10']++;Y.namespace('Y.Plugin');__cov_oHJxUCNLEkas15Sa9_k0yA.s['11']++;Y.Plugin.SortableScroll=SortScroll;},'3.17.2',{'requires':['dd-scroll','sortable']}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-debug.js b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-debug.js new file mode 100644 index 0000000..c8e9ee9 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-debug.js @@ -0,0 +1,74 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('sortable-scroll', function (Y, NAME) { + + + /** + * Plugin for sortable to handle scrolling lists. + * @module sortable + * @submodule sortable-scroll + */ + /** + * Plugin for sortable to handle scrolling lists. + * @class SortScroll + * @extends Base + * @constructor + * @namespace Plugin + */ + + var SortScroll = function() { + SortScroll.superclass.constructor.apply(this, arguments); + }; + + Y.extend(SortScroll, Y.Base, { + initializer: function() { + var host = this.get('host'); + host.plug(Y.Plugin.DDNodeScroll, { + node: host.get('container') + }); + host.delegate.on('drop:over', function(e) { + if (this.dd.nodescroll && e.drag.nodescroll) { + e.drag.nodescroll.set('parentScroll', Y.one(this.get('container'))); + } + }); + } + }, { + ATTRS: { + host: { + value: '' + } + }, + /** + * @property NAME + * @default SortScroll + * @readonly + * @protected + * @static + * @description The name of the class. + * @type {String} + */ + NAME: 'SortScroll', + /** + * @property NS + * @default scroll + * @readonly + * @protected + * @static + * @description The scroll instance. + * @type {String} + */ + NS: 'scroll' + }); + + + Y.namespace('Y.Plugin'); + Y.Plugin.SortableScroll = SortScroll; + + + +}, '3.17.2', {"requires": ["dd-scroll", "sortable"]}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-min.js b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-min.js new file mode 100644 index 0000000..424d763 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("sortable-scroll",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)};e.extend(n,e.Base,{initializer:function(){var t=this.get("host");t.plug(e.Plugin.DDNodeScroll,{node:t.get("container")}),t.delegate.on("drop:over",function(t){this.dd.nodescroll&&t.drag.nodescroll&&t.drag.nodescroll.set("parentScroll",e.one(this.get("container")))})}},{ATTRS:{host:{value:""}},NAME:"SortScroll",NS:"scroll"}),e.namespace("Y.Plugin"),e.Plugin.SortableScroll=n},"3.17.2",{requires:["dd-scroll","sortable"]}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll.js b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll.js new file mode 100644 index 0000000..c8e9ee9 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable-scroll/sortable-scroll.js @@ -0,0 +1,74 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('sortable-scroll', function (Y, NAME) { + + + /** + * Plugin for sortable to handle scrolling lists. + * @module sortable + * @submodule sortable-scroll + */ + /** + * Plugin for sortable to handle scrolling lists. + * @class SortScroll + * @extends Base + * @constructor + * @namespace Plugin + */ + + var SortScroll = function() { + SortScroll.superclass.constructor.apply(this, arguments); + }; + + Y.extend(SortScroll, Y.Base, { + initializer: function() { + var host = this.get('host'); + host.plug(Y.Plugin.DDNodeScroll, { + node: host.get('container') + }); + host.delegate.on('drop:over', function(e) { + if (this.dd.nodescroll && e.drag.nodescroll) { + e.drag.nodescroll.set('parentScroll', Y.one(this.get('container'))); + } + }); + } + }, { + ATTRS: { + host: { + value: '' + } + }, + /** + * @property NAME + * @default SortScroll + * @readonly + * @protected + * @static + * @description The name of the class. + * @type {String} + */ + NAME: 'SortScroll', + /** + * @property NS + * @default scroll + * @readonly + * @protected + * @static + * @description The scroll instance. + * @type {String} + */ + NS: 'scroll' + }); + + + Y.namespace('Y.Plugin'); + Y.Plugin.SortableScroll = SortScroll; + + + +}, '3.17.2', {"requires": ["dd-scroll", "sortable"]}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable/sortable-coverage.js b/design/standard/lib/yui/3.17.2/build/sortable/sortable-coverage.js new file mode 100644 index 0000000..0f2f2e6 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable/sortable-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/sortable/sortable.js']) { + __coverage__['build/sortable/sortable.js'] = {"path":"build/sortable/sortable.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0,0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":20},"end":{"line":1,"column":39}}},"2":{"name":"(anonymous_2)","line":16,"loc":{"start":{"line":16,"column":19},"end":{"line":16,"column":30}}},"3":{"name":"(anonymous_3)","line":43,"loc":{"start":{"line":43,"column":21},"end":{"line":43,"column":32}}},"4":{"name":"(anonymous_4)","line":86,"loc":{"start":{"line":86,"column":17},"end":{"line":86,"column":29}}},"5":{"name":"(anonymous_5)","line":101,"loc":{"start":{"line":101,"column":22},"end":{"line":101,"column":34}}},"6":{"name":"(anonymous_6)","line":116,"loc":{"start":{"line":116,"column":21},"end":{"line":116,"column":33}}},"7":{"name":"(anonymous_7)","line":190,"loc":{"start":{"line":190,"column":22},"end":{"line":190,"column":33}}},"8":{"name":"(anonymous_8)","line":205,"loc":{"start":{"line":205,"column":20},"end":{"line":205,"column":31}}},"9":{"name":"(anonymous_9)","line":221,"loc":{"start":{"line":221,"column":14},"end":{"line":221,"column":36}}},"10":{"name":"(anonymous_10)","line":235,"loc":{"start":{"line":235,"column":14},"end":{"line":235,"column":25}}},"11":{"name":"(anonymous_11)","line":239,"loc":{"start":{"line":239,"column":20},"end":{"line":239,"column":31}}},"12":{"name":"(anonymous_12)","line":257,"loc":{"start":{"line":257,"column":14},"end":{"line":257,"column":34}}},"13":{"name":"(anonymous_13)","line":280,"loc":{"start":{"line":280,"column":20},"end":{"line":280,"column":34}}},"14":{"name":"(anonymous_14)","line":290,"loc":{"start":{"line":290,"column":20},"end":{"line":290,"column":34}}},"15":{"name":"(anonymous_15)","line":300,"loc":{"start":{"line":300,"column":21},"end":{"line":300,"column":35}}},"16":{"name":"(anonymous_16)","line":309,"loc":{"start":{"line":309,"column":21},"end":{"line":309,"column":35}}},"17":{"name":"(anonymous_17)","line":319,"loc":{"start":{"line":319,"column":21},"end":{"line":319,"column":40}}},"18":{"name":"(anonymous_18)","line":323,"loc":{"start":{"line":323,"column":27},"end":{"line":323,"column":43}}},"19":{"name":"(anonymous_19)","line":328,"loc":{"start":{"line":328,"column":60},"end":{"line":328,"column":75}}},"20":{"name":"(anonymous_20)","line":416,"loc":{"start":{"line":416,"column":15},"end":{"line":416,"column":36}}},"21":{"name":"(anonymous_21)","line":431,"loc":{"start":{"line":431,"column":21},"end":{"line":431,"column":36}}},"22":{"name":"(anonymous_22)","line":439,"loc":{"start":{"line":439,"column":49},"end":{"line":439,"column":61}}},"23":{"name":"(anonymous_23)","line":453,"loc":{"start":{"line":453,"column":13},"end":{"line":453,"column":29}}},"24":{"name":"(anonymous_24)","line":466,"loc":{"start":{"line":466,"column":15},"end":{"line":466,"column":31}}},"25":{"name":"(anonymous_25)","line":474,"loc":{"start":{"line":474,"column":49},"end":{"line":474,"column":64}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":527,"column":74}},"2":{"start":{"line":16,"column":4},"end":{"line":27,"column":18}},"3":{"start":{"line":17,"column":8},"end":{"line":17,"column":63}},"4":{"start":{"line":30,"column":4},"end":{"line":480,"column":7}},"5":{"start":{"line":44,"column":12},"end":{"line":53,"column":23}},"6":{"start":{"line":55,"column":12},"end":{"line":57,"column":13}},"7":{"start":{"line":56,"column":16},"end":{"line":56,"column":56}},"8":{"start":{"line":58,"column":12},"end":{"line":58,"column":47}},"9":{"start":{"line":60,"column":12},"end":{"line":60,"column":29}},"10":{"start":{"line":62,"column":12},"end":{"line":65,"column":15}},"11":{"start":{"line":67,"column":12},"end":{"line":71,"column":15}},"12":{"start":{"line":72,"column":12},"end":{"line":72,"column":72}},"13":{"start":{"line":74,"column":12},"end":{"line":79,"column":15}},"14":{"start":{"line":81,"column":12},"end":{"line":81,"column":32}},"15":{"start":{"line":82,"column":12},"end":{"line":82,"column":35}},"16":{"start":{"line":87,"column":12},"end":{"line":91,"column":13}},"17":{"start":{"line":88,"column":16},"end":{"line":88,"column":32}},"18":{"start":{"line":89,"column":19},"end":{"line":91,"column":13}},"19":{"start":{"line":90,"column":16},"end":{"line":90,"column":33}},"20":{"start":{"line":93,"column":12},"end":{"line":93,"column":30}},"21":{"start":{"line":102,"column":12},"end":{"line":103,"column":44}},"22":{"start":{"line":105,"column":12},"end":{"line":108,"column":13}},"23":{"start":{"line":107,"column":16},"end":{"line":107,"column":42}},"24":{"start":{"line":117,"column":12},"end":{"line":119,"column":13}},"25":{"start":{"line":118,"column":16},"end":{"line":118,"column":23}},"26":{"start":{"line":120,"column":12},"end":{"line":122,"column":13}},"27":{"start":{"line":121,"column":16},"end":{"line":121,"column":23}},"28":{"start":{"line":124,"column":12},"end":{"line":126,"column":13}},"29":{"start":{"line":125,"column":16},"end":{"line":125,"column":23}},"30":{"start":{"line":127,"column":12},"end":{"line":128,"column":62}},"31":{"start":{"line":130,"column":12},"end":{"line":132,"column":13}},"32":{"start":{"line":131,"column":16},"end":{"line":131,"column":28}},"33":{"start":{"line":133,"column":12},"end":{"line":135,"column":13}},"34":{"start":{"line":134,"column":16},"end":{"line":134,"column":36}},"35":{"start":{"line":136,"column":12},"end":{"line":179,"column":13}},"36":{"start":{"line":138,"column":20},"end":{"line":138,"column":60}},"37":{"start":{"line":139,"column":20},"end":{"line":139,"column":48}},"38":{"start":{"line":140,"column":20},"end":{"line":144,"column":21}},"39":{"start":{"line":141,"column":24},"end":{"line":141,"column":58}},"40":{"start":{"line":143,"column":24},"end":{"line":143,"column":63}},"41":{"start":{"line":145,"column":20},"end":{"line":145,"column":26}},"42":{"start":{"line":147,"column":20},"end":{"line":147,"column":54}},"43":{"start":{"line":148,"column":20},"end":{"line":148,"column":26}},"44":{"start":{"line":151,"column":20},"end":{"line":151,"column":89}},"45":{"start":{"line":153,"column":20},"end":{"line":155,"column":21}},"46":{"start":{"line":154,"column":24},"end":{"line":154,"column":31}},"47":{"start":{"line":157,"column":20},"end":{"line":157,"column":84}},"48":{"start":{"line":160,"column":20},"end":{"line":177,"column":21}},"49":{"start":{"line":161,"column":24},"end":{"line":161,"column":58}},"50":{"start":{"line":163,"column":24},"end":{"line":175,"column":25}},"51":{"start":{"line":165,"column":28},"end":{"line":165,"column":55}},"52":{"start":{"line":166,"column":28},"end":{"line":166,"column":62}},"53":{"start":{"line":168,"column":28},"end":{"line":168,"column":48}},"54":{"start":{"line":169,"column":28},"end":{"line":169,"column":54}},"55":{"start":{"line":170,"column":28},"end":{"line":170,"column":86}},"56":{"start":{"line":171,"column":28},"end":{"line":174,"column":31}},"57":{"start":{"line":176,"column":24},"end":{"line":176,"column":76}},"58":{"start":{"line":178,"column":20},"end":{"line":178,"column":26}},"59":{"start":{"line":181,"column":12},"end":{"line":181,"column":76}},"60":{"start":{"line":182,"column":12},"end":{"line":182,"column":75}},"61":{"start":{"line":191,"column":12},"end":{"line":192,"column":47}},"62":{"start":{"line":193,"column":12},"end":{"line":195,"column":13}},"63":{"start":{"line":194,"column":16},"end":{"line":194,"column":46}},"64":{"start":{"line":196,"column":12},"end":{"line":196,"column":81}},"65":{"start":{"line":197,"column":12},"end":{"line":197,"column":58}},"66":{"start":{"line":206,"column":12},"end":{"line":206,"column":75}},"67":{"start":{"line":207,"column":12},"end":{"line":207,"column":65}},"68":{"start":{"line":208,"column":12},"end":{"line":211,"column":15}},"69":{"start":{"line":212,"column":12},"end":{"line":212,"column":24}},"70":{"start":{"line":223,"column":12},"end":{"line":227,"column":13}},"71":{"start":{"line":224,"column":16},"end":{"line":224,"column":73}},"72":{"start":{"line":226,"column":16},"end":{"line":226,"column":51}},"73":{"start":{"line":228,"column":12},"end":{"line":228,"column":24}},"74":{"start":{"line":236,"column":12},"end":{"line":236,"column":40}},"75":{"start":{"line":237,"column":12},"end":{"line":237,"column":24}},"76":{"start":{"line":240,"column":12},"end":{"line":240,"column":32}},"77":{"start":{"line":241,"column":12},"end":{"line":241,"column":36}},"78":{"start":{"line":242,"column":12},"end":{"line":242,"column":47}},"79":{"start":{"line":258,"column":12},"end":{"line":261,"column":13}},"80":{"start":{"line":259,"column":16},"end":{"line":259,"column":68}},"81":{"start":{"line":260,"column":16},"end":{"line":260,"column":28}},"82":{"start":{"line":262,"column":12},"end":{"line":264,"column":13}},"83":{"start":{"line":263,"column":16},"end":{"line":263,"column":30}},"84":{"start":{"line":265,"column":12},"end":{"line":265,"column":38}},"85":{"start":{"line":266,"column":12},"end":{"line":266,"column":41}},"86":{"start":{"line":268,"column":12},"end":{"line":270,"column":13}},"87":{"start":{"line":269,"column":16},"end":{"line":269,"column":34}},"88":{"start":{"line":272,"column":12},"end":{"line":272,"column":24}},"89":{"start":{"line":281,"column":12},"end":{"line":281,"column":58}},"90":{"start":{"line":282,"column":12},"end":{"line":282,"column":58}},"91":{"start":{"line":291,"column":12},"end":{"line":291,"column":53}},"92":{"start":{"line":292,"column":12},"end":{"line":292,"column":53}},"93":{"start":{"line":301,"column":12},"end":{"line":301,"column":53}},"94":{"start":{"line":310,"column":12},"end":{"line":310,"column":53}},"95":{"start":{"line":320,"column":12},"end":{"line":320,"column":30}},"96":{"start":{"line":322,"column":12},"end":{"line":326,"column":13}},"97":{"start":{"line":323,"column":16},"end":{"line":325,"column":18}},"98":{"start":{"line":324,"column":20},"end":{"line":324,"column":32}},"99":{"start":{"line":328,"column":12},"end":{"line":330,"column":15}},"100":{"start":{"line":329,"column":16},"end":{"line":329,"column":46}},"101":{"start":{"line":331,"column":12},"end":{"line":331,"column":28}},"102":{"start":{"line":417,"column":12},"end":{"line":417,"column":20}},"103":{"start":{"line":418,"column":12},"end":{"line":422,"column":13}},"104":{"start":{"line":419,"column":16},"end":{"line":419,"column":38}},"105":{"start":{"line":421,"column":16},"end":{"line":421,"column":38}},"106":{"start":{"line":423,"column":12},"end":{"line":423,"column":23}},"107":{"start":{"line":432,"column":12},"end":{"line":433,"column":26}},"108":{"start":{"line":434,"column":12},"end":{"line":434,"column":31}},"109":{"start":{"line":435,"column":12},"end":{"line":435,"column":30}},"110":{"start":{"line":436,"column":12},"end":{"line":438,"column":13}},"111":{"start":{"line":437,"column":16},"end":{"line":437,"column":49}},"112":{"start":{"line":439,"column":12},"end":{"line":443,"column":15}},"113":{"start":{"line":440,"column":16},"end":{"line":442,"column":17}},"114":{"start":{"line":441,"column":20},"end":{"line":441,"column":26}},"115":{"start":{"line":444,"column":12},"end":{"line":444,"column":21}},"116":{"start":{"line":454,"column":12},"end":{"line":456,"column":13}},"117":{"start":{"line":455,"column":16},"end":{"line":455,"column":31}},"118":{"start":{"line":457,"column":12},"end":{"line":457,"column":42}},"119":{"start":{"line":467,"column":12},"end":{"line":469,"column":13}},"120":{"start":{"line":468,"column":16},"end":{"line":468,"column":31}},"121":{"start":{"line":470,"column":12},"end":{"line":473,"column":13}},"122":{"start":{"line":471,"column":16},"end":{"line":471,"column":49}},"123":{"start":{"line":472,"column":16},"end":{"line":472,"column":23}},"124":{"start":{"line":474,"column":12},"end":{"line":478,"column":15}},"125":{"start":{"line":475,"column":16},"end":{"line":477,"column":17}},"126":{"start":{"line":476,"column":20},"end":{"line":476,"column":50}},"127":{"start":{"line":482,"column":4},"end":{"line":482,"column":26}}},"branchMap":{"1":{"line":55,"type":"if","locations":[{"start":{"line":55,"column":12},"end":{"line":55,"column":12}},{"start":{"line":55,"column":12},"end":{"line":55,"column":12}}]},"2":{"line":87,"type":"if","locations":[{"start":{"line":87,"column":12},"end":{"line":87,"column":12}},{"start":{"line":87,"column":12},"end":{"line":87,"column":12}}]},"3":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":19},"end":{"line":89,"column":19}},{"start":{"line":89,"column":19},"end":{"line":89,"column":19}}]},"4":{"line":105,"type":"if","locations":[{"start":{"line":105,"column":12},"end":{"line":105,"column":12}},{"start":{"line":105,"column":12},"end":{"line":105,"column":12}}]},"5":{"line":105,"type":"binary-expr","locations":[{"start":{"line":105,"column":16},"end":{"line":105,"column":47}},{"start":{"line":106,"column":16},"end":{"line":106,"column":62}}]},"6":{"line":117,"type":"if","locations":[{"start":{"line":117,"column":12},"end":{"line":117,"column":12}},{"start":{"line":117,"column":12},"end":{"line":117,"column":12}}]},"7":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":12},"end":{"line":120,"column":12}},{"start":{"line":120,"column":12},"end":{"line":120,"column":12}}]},"8":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":12},"end":{"line":124,"column":12}},{"start":{"line":124,"column":12},"end":{"line":124,"column":12}}]},"9":{"line":130,"type":"if","locations":[{"start":{"line":130,"column":12},"end":{"line":130,"column":12}},{"start":{"line":130,"column":12},"end":{"line":130,"column":12}}]},"10":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":12},"end":{"line":133,"column":12}},{"start":{"line":133,"column":12},"end":{"line":133,"column":12}}]},"11":{"line":133,"type":"binary-expr","locations":[{"start":{"line":133,"column":16},"end":{"line":133,"column":20}},{"start":{"line":133,"column":24},"end":{"line":133,"column":43}}]},"12":{"line":136,"type":"switch","locations":[{"start":{"line":137,"column":16},"end":{"line":145,"column":26}},{"start":{"line":146,"column":16},"end":{"line":148,"column":26}},{"start":{"line":149,"column":16},"end":{"line":149,"column":28}},{"start":{"line":150,"column":16},"end":{"line":178,"column":26}}]},"13":{"line":138,"type":"cond-expr","locations":[{"start":{"line":138,"column":40},"end":{"line":138,"column":48}},{"start":{"line":138,"column":51},"end":{"line":138,"column":58}}]},"14":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":20},"end":{"line":140,"column":20}},{"start":{"line":140,"column":20},"end":{"line":140,"column":20}}]},"15":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":20},"end":{"line":153,"column":20}},{"start":{"line":153,"column":20},"end":{"line":153,"column":20}}]},"16":{"line":160,"type":"if","locations":[{"start":{"line":160,"column":20},"end":{"line":160,"column":20}},{"start":{"line":160,"column":20},"end":{"line":160,"column":20}}]},"17":{"line":163,"type":"if","locations":[{"start":{"line":163,"column":24},"end":{"line":163,"column":24}},{"start":{"line":163,"column":24},"end":{"line":163,"column":24}}]},"18":{"line":193,"type":"if","locations":[{"start":{"line":193,"column":12},"end":{"line":193,"column":12}},{"start":{"line":193,"column":12},"end":{"line":193,"column":12}}]},"19":{"line":193,"type":"binary-expr","locations":[{"start":{"line":193,"column":16},"end":{"line":193,"column":24}},{"start":{"line":193,"column":28},"end":{"line":193,"column":49}}]},"20":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":12},"end":{"line":223,"column":12}},{"start":{"line":223,"column":12},"end":{"line":223,"column":12}}]},"21":{"line":223,"type":"binary-expr","locations":[{"start":{"line":223,"column":16},"end":{"line":223,"column":19}},{"start":{"line":223,"column":23},"end":{"line":223,"column":72}}]},"22":{"line":258,"type":"if","locations":[{"start":{"line":258,"column":12},"end":{"line":258,"column":12}},{"start":{"line":258,"column":12},"end":{"line":258,"column":12}}]},"23":{"line":262,"type":"if","locations":[{"start":{"line":262,"column":12},"end":{"line":262,"column":12}},{"start":{"line":262,"column":12},"end":{"line":262,"column":12}}]},"24":{"line":268,"type":"if","locations":[{"start":{"line":268,"column":12},"end":{"line":268,"column":12}},{"start":{"line":268,"column":12},"end":{"line":268,"column":12}}]},"25":{"line":322,"type":"if","locations":[{"start":{"line":322,"column":12},"end":{"line":322,"column":12}},{"start":{"line":322,"column":12},"end":{"line":322,"column":12}}]},"26":{"line":418,"type":"if","locations":[{"start":{"line":418,"column":12},"end":{"line":418,"column":12}},{"start":{"line":418,"column":12},"end":{"line":418,"column":12}}]},"27":{"line":436,"type":"if","locations":[{"start":{"line":436,"column":12},"end":{"line":436,"column":12}},{"start":{"line":436,"column":12},"end":{"line":436,"column":12}}]},"28":{"line":436,"type":"binary-expr","locations":[{"start":{"line":436,"column":15},"end":{"line":436,"column":17}},{"start":{"line":436,"column":21},"end":{"line":436,"column":46}}]},"29":{"line":440,"type":"if","locations":[{"start":{"line":440,"column":16},"end":{"line":440,"column":16}},{"start":{"line":440,"column":16},"end":{"line":440,"column":16}}]},"30":{"line":454,"type":"if","locations":[{"start":{"line":454,"column":12},"end":{"line":454,"column":12}},{"start":{"line":454,"column":12},"end":{"line":454,"column":12}}]},"31":{"line":467,"type":"if","locations":[{"start":{"line":467,"column":12},"end":{"line":467,"column":12}},{"start":{"line":467,"column":12},"end":{"line":467,"column":12}}]},"32":{"line":470,"type":"if","locations":[{"start":{"line":470,"column":12},"end":{"line":470,"column":12}},{"start":{"line":470,"column":12},"end":{"line":470,"column":12}}]},"33":{"line":470,"type":"binary-expr","locations":[{"start":{"line":470,"column":16},"end":{"line":470,"column":18}},{"start":{"line":470,"column":22},"end":{"line":470,"column":47}}]},"34":{"line":475,"type":"if","locations":[{"start":{"line":475,"column":16},"end":{"line":475,"column":16}},{"start":{"line":475,"column":16},"end":{"line":475,"column":16}}]}},"code":["(function () { YUI.add('sortable', function (Y, NAME) {","",""," /**"," * The class allows you to create a Drag & Drop reordered list."," * @module sortable"," */"," /**"," * The class allows you to create a Drag & Drop reordered list."," * @class Sortable"," * @extends Base"," * @constructor"," */","",""," var Sortable = function() {"," Sortable.superclass.constructor.apply(this, arguments);"," },"," CURRENT_NODE = 'currentNode',"," OPACITY_NODE = 'opacityNode',"," CONT = 'container',"," ID = 'id',"," ZINDEX = 'zIndex',"," OPACITY = 'opacity',"," PARENT_NODE = 'parentNode',"," NODES = 'nodes',"," NODE = 'node';","",""," Y.extend(Sortable, Y.Base, {"," /**"," * @property delegate"," * @type DD.Delegate"," * @description A reference to the DD.Delegate instance."," */"," delegate: null,"," /**"," * @property drop"," * @type DD.Drop"," * @description A reference to the DD.Drop instance"," */"," drop: null,"," initializer: function() {"," var id = 'sortable-' + Y.guid(),"," delConfig = {"," container: this.get(CONT),"," nodes: this.get(NODES),"," target: true,"," invalid: this.get('invalid'),"," dragConfig: {"," groups: [ id ]"," }"," }, del;",""," if (this.get('handles')) {"," delConfig.handles = this.get('handles');"," }"," del = new Y.DD.Delegate(delConfig);",""," this.set(ID, id);",""," del.dd.plug(Y.Plugin.DDProxy, {"," moveOnEnd: false,"," cloneNode: true"," });",""," this.drop = new Y.DD.Drop({"," node: this.get(CONT),"," bubbleTarget: del,"," groups: del.dd.get('groups')"," });"," this.drop.on('drop:enter', Y.bind(this._onDropEnter, this));",""," del.on({"," 'drag:start': Y.bind(this._onDragStart, this),"," 'drag:end': Y.bind(this._onDragEnd, this),"," 'drag:over': Y.bind(this._onDragOver, this),"," 'drag:drag': Y.bind(this._onDrag, this)"," });",""," this.delegate = del;"," Sortable.reg(this, id);"," },"," _up: null,"," _y: null,"," _onDrag: function(e) {"," if (e.pageY < this._y) {"," this._up = true;"," } else if (e.pageY > this._y) {"," this._up = false;"," }",""," this._y = e.pageY;"," },"," /**"," * @private"," * @method _onDropEnter"," * @param Event e The Event Object"," * @description Handles the DropEnter event to append a new node to a target."," */"," _onDropEnter: function(e) {"," var dropNode = e.drop.get(NODE),"," dragNode = e.drag.get(NODE);",""," if (!dropNode.test(this.get(NODES)) &&"," !dragNode.get(PARENT_NODE).compareTo(dropNode)) {"," dropNode.append(dragNode);"," }"," },"," /**"," * @private"," * @method _onDragOver"," * @param Event e The Event Object"," * @description Handles the DragOver event that moves the object in the list or to another list."," */"," _onDragOver: function(e) {"," if (!e.drop.get(NODE).test(this.get(NODES))) {"," return;"," }"," if (e.drag.get(NODE) === e.drop.get(NODE)) {"," return;"," }"," // is drop a child of drag?"," if (e.drag.get(NODE).contains(e.drop.get(NODE))) {"," return;"," }"," var same = false, dir, oldNode, newNode, dropsort, dropNode,"," moveType = this.get('moveType').toLowerCase();",""," if (e.drag.get(NODE).get(PARENT_NODE).contains(e.drop.get(NODE))) {"," same = true;"," }"," if (same && moveType === 'move') {"," moveType = 'insert';"," }"," switch (moveType) {"," case 'insert':"," dir = ((this._up) ? 'before' : 'after');"," dropNode = e.drop.get(NODE);"," if (Y.Sortable._test(dropNode, this.get(CONT))) {"," dropNode.append(e.drag.get(NODE));"," } else {"," dropNode.insert(e.drag.get(NODE), dir);"," }"," break;"," case 'swap':"," Y.DD.DDM.swapNode(e.drag, e.drop);"," break;"," case 'move':"," case 'copy':"," dropsort = Y.Sortable.getSortable(e.drop.get(NODE).get(PARENT_NODE));",""," if (!dropsort) {"," return;"," }",""," Y.DD.DDM.getDrop(e.drag.get(NODE)).addToGroup(dropsort.get(ID));",""," //Same List"," if (same) {"," Y.DD.DDM.swapNode(e.drag, e.drop);"," } else {"," if (this.get('moveType') === 'copy') {"," //New List"," oldNode = e.drag.get(NODE);"," newNode = oldNode.cloneNode(true);",""," newNode.set(ID, '');"," e.drag.set(NODE, newNode);"," dropsort.delegate.createDrop(newNode, [dropsort.get(ID)]);"," oldNode.setStyles({"," top: '',"," left: ''"," });"," }"," e.drop.get(NODE).insert(e.drag.get(NODE), 'before');"," }"," break;"," }",""," this.fire(moveType, { same: same, drag: e.drag, drop: e.drop });"," this.fire('moved', { same: same, drag: e.drag, drop: e.drop });"," },"," /**"," * @private"," * @method _onDragStart"," * @param Event e The Event Object"," * @description Handles the DragStart event and initializes some settings."," */"," _onDragStart: function() {"," var del = this.delegate,"," lastNode = del.get('lastNode');"," if (lastNode && lastNode.getDOMNode()) {"," lastNode.setStyle(ZINDEX, '');"," }"," del.get(this.get(OPACITY_NODE)).setStyle(OPACITY, this.get(OPACITY));"," del.get(CURRENT_NODE).setStyle(ZINDEX, '999');"," },"," /**"," * @private"," * @method _onDragEnd"," * @param Event e The Event Object"," * @description Handles the DragEnd event that cleans up the settings in the drag:start event."," */"," _onDragEnd: function() {"," this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY, 1);"," this.delegate.get(CURRENT_NODE).setStyle(ZINDEX, '');"," this.delegate.get(CURRENT_NODE).setStyles({"," top: '',"," left: ''"," });"," this.sync();"," },"," /**"," * @method plug"," * @param Class cls The class to plug"," * @param Object config The class config"," * @description Passthrough to the DD.Delegate.ddplug method"," * @chainable"," */"," plug: function(cls, config) {"," //I don't like this.. Not at all, need to discuss with the team"," if (cls && cls.NAME.substring(0, 4).toLowerCase() === 'sort') {"," this.constructor.superclass.plug.call(this, cls, config);"," } else {"," this.delegate.dd.plug(cls, config);"," }"," return this;"," },"," /**"," * @method sync"," * @description Passthrough to the DD.Delegate syncTargets method."," * @chainable"," */"," sync: function() {"," this.delegate.syncTargets();"," return this;"," },"," destructor: function() {"," this.drop.destroy();"," this.delegate.destroy();"," Sortable.unreg(this, this.get(ID));"," },"," /**"," * @method join"," * @param Sortable sel The Sortable list to join with"," * @param String type The type of join to do: full, inner, outer, none. Default: full"," * @description Join this Sortable with another Sortable instance."," *
    "," *
  • full: Exchange nodes with both lists.
  • "," *
  • inner: Items can go into this list from the joined list.
  • "," *
  • outer: Items can go out of the joined list into this list.
  • "," *
  • none: Removes the join.
  • "," *
"," * @chainable"," */"," join: function(sel, type) {"," if (!(sel instanceof Y.Sortable)) {"," Y.error('Sortable: join needs a Sortable Instance');"," return this;"," }"," if (!type) {"," type = 'full';"," }"," type = type.toLowerCase();"," var method = '_join_' + type;",""," if (this[method]) {"," this[method](sel);"," }",""," return this;"," },"," /**"," * @private"," * @method _join_none"," * @param Sortable sel The Sortable to remove the join from"," * @description Removes the join with the passed Sortable."," */"," _join_none: function(sel) {"," this.delegate.dd.removeFromGroup(sel.get(ID));"," sel.delegate.dd.removeFromGroup(this.get(ID));"," },"," /**"," * @private"," * @method _join_full"," * @param Sortable sel The Sortable list to join with"," * @description Joins both of the Sortables together."," */"," _join_full: function(sel) {"," this.delegate.dd.addToGroup(sel.get(ID));"," sel.delegate.dd.addToGroup(this.get(ID));"," },"," /**"," * @private"," * @method _join_outer"," * @param Sortable sel The Sortable list to join with"," * @description Allows this Sortable to accept items from the passed Sortable."," */"," _join_outer: function(sel) {"," this.delegate.dd.addToGroup(sel.get(ID));"," },"," /**"," * @private"," * @method _join_inner"," * @param Sortable sel The Sortable list to join with"," * @description Allows this Sortable to give items to the passed Sortable."," */"," _join_inner: function(sel) {"," sel.delegate.dd.addToGroup(this.get(ID));"," },"," /**"," * A custom callback to allow a user to extract some sort of id or any other data"," * from the node to use in the \"ordering list\" and then that data should be returned from the callback."," * @method getOrdering"," * @param Function callback"," * @return Array"," */"," getOrdering: function(callback) {"," var ordering = [];",""," if (!Y.Lang.isFunction(callback)) {"," callback = function (node) {"," return node;"," };"," }",""," Y.one(this.get(CONT)).all(this.get(NODES)).each(function(node) {"," ordering.push(callback(node));"," });"," return ordering;"," }"," }, {"," NAME: 'sortable',"," ATTRS: {"," /**"," * @attribute handles"," * @description Drag handles to pass on to the internal DD.Delegate instance."," * @type Array"," */"," handles: {"," value: false"," },"," /**"," * @attribute container"," * @description A selector query to get the container to listen for mousedown events on. All \"nodes\" should be a child of this container."," * @type String"," */"," container: {"," value: 'body'"," },"," /**"," * @attribute nodes"," * @description A selector query to get the children of the \"container\" to make draggable elements from."," * @type String"," */"," nodes: {"," value: '.dd-draggable'"," },"," /**"," * @attribute opacity"," * @description The opacity to change the proxy item to when dragging."," * @type String"," */"," opacity: {"," value: '.75'"," },"," /**"," * @attribute opacityNode"," * @description The node to set opacity on when dragging (dragNode or currentNode). Default: currentNode."," * @type String"," */"," opacityNode: {"," value: 'currentNode'"," },"," /**"," * @attribute id"," * @description The id of this Sortable, used to get a reference to this Sortable list from another list."," * @type String"," */"," id: {"," value: null"," },"," /**"," * @attribute moveType"," * @description How should an item move to another list: insert, swap, move, copy. Default: insert"," * @type String"," */"," moveType: {"," value: 'insert'"," },"," /**"," * @attribute invalid"," * @description A selector string to test if a list item is invalid and not sortable"," * @type String"," */"," invalid: {"," value: ''"," }"," },"," /**"," * @static"," * @property _sortables"," * @private"," * @type Object"," * @description Hash map of all Sortables on the page."," */"," _sortables: {},"," /**"," * @static"," * @method _test"," * @param {Node} node The node instance to test."," * @param {String|Node} test The node instance or selector string to test against."," * @description Test a Node or a selector for the container"," */"," _test: function(node, test) {"," var ret;"," if (test instanceof Y.Node) {"," ret = (test === node);"," } else {"," ret = node.test(test);"," }"," return ret;"," },"," /**"," * @static"," * @method getSortable"," * @param {String|Node} node The node instance or selector string to use to find a Sortable instance."," * @description Get a Sortable instance back from a node reference or a selector string."," */"," getSortable: function(node) {"," var s = null,"," id = null;"," node = Y.one(node);"," id = node.get(ID);"," if(id && Y.Sortable._sortables[id]) {"," return Y.Sortable._sortables[id];"," }"," Y.Object.each(Y.Sortable._sortables, function(v) {"," if (Y.Sortable._test(node, v.get(CONT))) {"," s = v;"," }"," });"," return s;"," },"," /**"," * @static"," * @method reg"," * @param Sortable s A Sortable instance."," * @param String id (optional) The id of the sortable instance."," * @description Register a Sortable instance with the singleton to allow lookups later."," */"," reg: function(s, id) {"," if (!id) {"," id = s.get(ID);"," }"," Y.Sortable._sortables[id] = s;"," },"," /**"," * @static"," * @method unreg"," * @param Sortable s A Sortable instance."," * @param String id (optional) The id of the sortable instance."," * @description Unregister a Sortable instance with the singleton."," */"," unreg: function(s, id) {"," if (!id) {"," id = s.get(ID);"," }"," if (id && Y.Sortable._sortables[id]) {"," delete Y.Sortable._sortables[id];"," return;"," }"," Y.Object.each(Y.Sortable._sortables, function(v, k) {"," if (v === s) {"," delete Sortable._sortables[k];"," }"," });"," }"," });",""," Y.Sortable = Sortable;",""," /**"," * @event copy"," * @description A Sortable node was moved with a copy."," * @param {EventFacade} event An Event Facade object"," * @param {Boolean} event.same Moved to the same list."," * @param {DD.Drag} event.drag The drag instance."," * @param {DD.Drop} event.drop The drop instance."," */"," /**"," * @event move"," * @description A Sortable node was moved with a move."," * @param {EventFacade} event An Event Facade object with the following specific property added:"," * @param {Boolean} event.same Moved to the same list."," * @param {DD.Drag} event.drag The drag instance."," * @param {DD.Drop} event.drop The drop instance."," */"," /**"," * @event insert"," * @description A Sortable node was moved with an insert."," * @param {EventFacade} event An Event Facade object with the following specific property added:"," * @param {Boolean} event.same Moved to the same list."," * @param {DD.Drag} event.drag The drag instance."," * @param {DD.Drop} event.drop The drop instance."," */"," /**"," * @event swap"," * @description A Sortable node was moved with a swap."," * @param {EventFacade} event An Event Facade object with the following specific property added:"," * @param {Boolean} event.same Moved to the same list."," * @param {DD.Drag} event.drag The drag instance."," * @param {DD.Drop} event.drop The drop instance."," */"," /**"," * @event moved"," * @description A Sortable node was moved."," * @param {EventFacade} event An Event Facade object with the following specific property added:"," * @param {Boolean} event.same Moved to the same list."," * @param {DD.Drag} event.drag The drag instance."," * @param {DD.Drop} event.drop The drop instance."," */","","","","}, '3.17.2', {\"requires\": [\"dd-delegate\", \"dd-drop-plugin\", \"dd-proxy\"]});","","}());"]}; +} +var __cov_cWknOFtrFZo1Tv0J0Rh61g = __coverage__['build/sortable/sortable.js']; +__cov_cWknOFtrFZo1Tv0J0Rh61g.s['1']++;YUI.add('sortable',function(Y,NAME){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['1']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['2']++;var Sortable=function(){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['2']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['3']++;Sortable.superclass.constructor.apply(this,arguments);},CURRENT_NODE='currentNode',OPACITY_NODE='opacityNode',CONT='container',ID='id',ZINDEX='zIndex',OPACITY='opacity',PARENT_NODE='parentNode',NODES='nodes',NODE='node';__cov_cWknOFtrFZo1Tv0J0Rh61g.s['4']++;Y.extend(Sortable,Y.Base,{delegate:null,drop:null,initializer:function(){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['3']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['5']++;var id='sortable-'+Y.guid(),delConfig={container:this.get(CONT),nodes:this.get(NODES),target:true,invalid:this.get('invalid'),dragConfig:{groups:[id]}},del;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['6']++;if(this.get('handles')){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['1'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['7']++;delConfig.handles=this.get('handles');}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['1'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['8']++;del=new Y.DD.Delegate(delConfig);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['9']++;this.set(ID,id);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['10']++;del.dd.plug(Y.Plugin.DDProxy,{moveOnEnd:false,cloneNode:true});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['11']++;this.drop=new Y.DD.Drop({node:this.get(CONT),bubbleTarget:del,groups:del.dd.get('groups')});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['12']++;this.drop.on('drop:enter',Y.bind(this._onDropEnter,this));__cov_cWknOFtrFZo1Tv0J0Rh61g.s['13']++;del.on({'drag:start':Y.bind(this._onDragStart,this),'drag:end':Y.bind(this._onDragEnd,this),'drag:over':Y.bind(this._onDragOver,this),'drag:drag':Y.bind(this._onDrag,this)});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['14']++;this.delegate=del;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['15']++;Sortable.reg(this,id);},_up:null,_y:null,_onDrag:function(e){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['4']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['16']++;if(e.pageYthis._y){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['3'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['19']++;this._up=false;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['3'][1]++;}}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['20']++;this._y=e.pageY;},_onDropEnter:function(e){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['5']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['21']++;var dropNode=e.drop.get(NODE),dragNode=e.drag.get(NODE);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['22']++;if((__cov_cWknOFtrFZo1Tv0J0Rh61g.b['5'][0]++,!dropNode.test(this.get(NODES)))&&(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['5'][1]++,!dragNode.get(PARENT_NODE).compareTo(dropNode))){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['4'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['23']++;dropNode.append(dragNode);}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['4'][1]++;}},_onDragOver:function(e){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['6']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['24']++;if(!e.drop.get(NODE).test(this.get(NODES))){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['6'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['25']++;return;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['6'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['26']++;if(e.drag.get(NODE)===e.drop.get(NODE)){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['7'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['27']++;return;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['7'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['28']++;if(e.drag.get(NODE).contains(e.drop.get(NODE))){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['8'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['29']++;return;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['8'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['30']++;var same=false,dir,oldNode,newNode,dropsort,dropNode,moveType=this.get('moveType').toLowerCase();__cov_cWknOFtrFZo1Tv0J0Rh61g.s['31']++;if(e.drag.get(NODE).get(PARENT_NODE).contains(e.drop.get(NODE))){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['9'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['32']++;same=true;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['9'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['33']++;if((__cov_cWknOFtrFZo1Tv0J0Rh61g.b['11'][0]++,same)&&(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['11'][1]++,moveType==='move')){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['10'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['34']++;moveType='insert';}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['10'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['35']++;switch(moveType){case'insert':__cov_cWknOFtrFZo1Tv0J0Rh61g.b['12'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['36']++;dir=this._up?(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['13'][0]++,'before'):(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['13'][1]++,'after');__cov_cWknOFtrFZo1Tv0J0Rh61g.s['37']++;dropNode=e.drop.get(NODE);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['38']++;if(Y.Sortable._test(dropNode,this.get(CONT))){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['14'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['39']++;dropNode.append(e.drag.get(NODE));}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['14'][1]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['40']++;dropNode.insert(e.drag.get(NODE),dir);}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['41']++;break;case'swap':__cov_cWknOFtrFZo1Tv0J0Rh61g.b['12'][1]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['42']++;Y.DD.DDM.swapNode(e.drag,e.drop);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['43']++;break;case'move':__cov_cWknOFtrFZo1Tv0J0Rh61g.b['12'][2]++;case'copy':__cov_cWknOFtrFZo1Tv0J0Rh61g.b['12'][3]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['44']++;dropsort=Y.Sortable.getSortable(e.drop.get(NODE).get(PARENT_NODE));__cov_cWknOFtrFZo1Tv0J0Rh61g.s['45']++;if(!dropsort){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['15'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['46']++;return;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['15'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['47']++;Y.DD.DDM.getDrop(e.drag.get(NODE)).addToGroup(dropsort.get(ID));__cov_cWknOFtrFZo1Tv0J0Rh61g.s['48']++;if(same){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['16'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['49']++;Y.DD.DDM.swapNode(e.drag,e.drop);}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['16'][1]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['50']++;if(this.get('moveType')==='copy'){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['17'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['51']++;oldNode=e.drag.get(NODE);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['52']++;newNode=oldNode.cloneNode(true);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['53']++;newNode.set(ID,'');__cov_cWknOFtrFZo1Tv0J0Rh61g.s['54']++;e.drag.set(NODE,newNode);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['55']++;dropsort.delegate.createDrop(newNode,[dropsort.get(ID)]);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['56']++;oldNode.setStyles({top:'',left:''});}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['17'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['57']++;e.drop.get(NODE).insert(e.drag.get(NODE),'before');}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['58']++;break;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['59']++;this.fire(moveType,{same:same,drag:e.drag,drop:e.drop});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['60']++;this.fire('moved',{same:same,drag:e.drag,drop:e.drop});},_onDragStart:function(){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['7']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['61']++;var del=this.delegate,lastNode=del.get('lastNode');__cov_cWknOFtrFZo1Tv0J0Rh61g.s['62']++;if((__cov_cWknOFtrFZo1Tv0J0Rh61g.b['19'][0]++,lastNode)&&(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['19'][1]++,lastNode.getDOMNode())){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['18'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['63']++;lastNode.setStyle(ZINDEX,'');}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['18'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['64']++;del.get(this.get(OPACITY_NODE)).setStyle(OPACITY,this.get(OPACITY));__cov_cWknOFtrFZo1Tv0J0Rh61g.s['65']++;del.get(CURRENT_NODE).setStyle(ZINDEX,'999');},_onDragEnd:function(){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['8']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['66']++;this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY,1);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['67']++;this.delegate.get(CURRENT_NODE).setStyle(ZINDEX,'');__cov_cWknOFtrFZo1Tv0J0Rh61g.s['68']++;this.delegate.get(CURRENT_NODE).setStyles({top:'',left:''});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['69']++;this.sync();},plug:function(cls,config){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['9']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['70']++;if((__cov_cWknOFtrFZo1Tv0J0Rh61g.b['21'][0]++,cls)&&(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['21'][1]++,cls.NAME.substring(0,4).toLowerCase()==='sort')){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['20'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['71']++;this.constructor.superclass.plug.call(this,cls,config);}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['20'][1]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['72']++;this.delegate.dd.plug(cls,config);}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['73']++;return this;},sync:function(){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['10']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['74']++;this.delegate.syncTargets();__cov_cWknOFtrFZo1Tv0J0Rh61g.s['75']++;return this;},destructor:function(){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['11']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['76']++;this.drop.destroy();__cov_cWknOFtrFZo1Tv0J0Rh61g.s['77']++;this.delegate.destroy();__cov_cWknOFtrFZo1Tv0J0Rh61g.s['78']++;Sortable.unreg(this,this.get(ID));},join:function(sel,type){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['12']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['79']++;if(!(sel instanceof Y.Sortable)){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['22'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['80']++;Y.error('Sortable: join needs a Sortable Instance');__cov_cWknOFtrFZo1Tv0J0Rh61g.s['81']++;return this;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['22'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['82']++;if(!type){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['23'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['83']++;type='full';}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['23'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['84']++;type=type.toLowerCase();__cov_cWknOFtrFZo1Tv0J0Rh61g.s['85']++;var method='_join_'+type;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['86']++;if(this[method]){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['24'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['87']++;this[method](sel);}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['24'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['88']++;return this;},_join_none:function(sel){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['13']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['89']++;this.delegate.dd.removeFromGroup(sel.get(ID));__cov_cWknOFtrFZo1Tv0J0Rh61g.s['90']++;sel.delegate.dd.removeFromGroup(this.get(ID));},_join_full:function(sel){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['14']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['91']++;this.delegate.dd.addToGroup(sel.get(ID));__cov_cWknOFtrFZo1Tv0J0Rh61g.s['92']++;sel.delegate.dd.addToGroup(this.get(ID));},_join_outer:function(sel){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['15']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['93']++;this.delegate.dd.addToGroup(sel.get(ID));},_join_inner:function(sel){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['16']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['94']++;sel.delegate.dd.addToGroup(this.get(ID));},getOrdering:function(callback){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['17']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['95']++;var ordering=[];__cov_cWknOFtrFZo1Tv0J0Rh61g.s['96']++;if(!Y.Lang.isFunction(callback)){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['25'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['97']++;callback=function(node){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['18']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['98']++;return node;};}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['25'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['99']++;Y.one(this.get(CONT)).all(this.get(NODES)).each(function(node){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['19']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['100']++;ordering.push(callback(node));});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['101']++;return ordering;}},{NAME:'sortable',ATTRS:{handles:{value:false},container:{value:'body'},nodes:{value:'.dd-draggable'},opacity:{value:'.75'},opacityNode:{value:'currentNode'},id:{value:null},moveType:{value:'insert'},invalid:{value:''}},_sortables:{},_test:function(node,test){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['20']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['102']++;var ret;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['103']++;if(test instanceof Y.Node){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['26'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['104']++;ret=test===node;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['26'][1]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['105']++;ret=node.test(test);}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['106']++;return ret;},getSortable:function(node){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['21']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['107']++;var s=null,id=null;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['108']++;node=Y.one(node);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['109']++;id=node.get(ID);__cov_cWknOFtrFZo1Tv0J0Rh61g.s['110']++;if((__cov_cWknOFtrFZo1Tv0J0Rh61g.b['28'][0]++,id)&&(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['28'][1]++,Y.Sortable._sortables[id])){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['27'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['111']++;return Y.Sortable._sortables[id];}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['27'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['112']++;Y.Object.each(Y.Sortable._sortables,function(v){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['22']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['113']++;if(Y.Sortable._test(node,v.get(CONT))){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['29'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['114']++;s=v;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['29'][1]++;}});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['115']++;return s;},reg:function(s,id){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['23']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['116']++;if(!id){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['30'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['117']++;id=s.get(ID);}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['30'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['118']++;Y.Sortable._sortables[id]=s;},unreg:function(s,id){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['24']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['119']++;if(!id){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['31'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['120']++;id=s.get(ID);}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['31'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['121']++;if((__cov_cWknOFtrFZo1Tv0J0Rh61g.b['33'][0]++,id)&&(__cov_cWknOFtrFZo1Tv0J0Rh61g.b['33'][1]++,Y.Sortable._sortables[id])){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['32'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['122']++;delete Y.Sortable._sortables[id];__cov_cWknOFtrFZo1Tv0J0Rh61g.s['123']++;return;}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['32'][1]++;}__cov_cWknOFtrFZo1Tv0J0Rh61g.s['124']++;Y.Object.each(Y.Sortable._sortables,function(v,k){__cov_cWknOFtrFZo1Tv0J0Rh61g.f['25']++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['125']++;if(v===s){__cov_cWknOFtrFZo1Tv0J0Rh61g.b['34'][0]++;__cov_cWknOFtrFZo1Tv0J0Rh61g.s['126']++;delete Sortable._sortables[k];}else{__cov_cWknOFtrFZo1Tv0J0Rh61g.b['34'][1]++;}});}});__cov_cWknOFtrFZo1Tv0J0Rh61g.s['127']++;Y.Sortable=Sortable;},'3.17.2',{'requires':['dd-delegate','dd-drop-plugin','dd-proxy']}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable/sortable-debug.js b/design/standard/lib/yui/3.17.2/build/sortable/sortable-debug.js new file mode 100644 index 0000000..d153b0d --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable/sortable-debug.js @@ -0,0 +1,535 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('sortable', function (Y, NAME) { + + + /** + * The class allows you to create a Drag & Drop reordered list. + * @module sortable + */ + /** + * The class allows you to create a Drag & Drop reordered list. + * @class Sortable + * @extends Base + * @constructor + */ + + + var Sortable = function() { + Sortable.superclass.constructor.apply(this, arguments); + }, + CURRENT_NODE = 'currentNode', + OPACITY_NODE = 'opacityNode', + CONT = 'container', + ID = 'id', + ZINDEX = 'zIndex', + OPACITY = 'opacity', + PARENT_NODE = 'parentNode', + NODES = 'nodes', + NODE = 'node'; + + + Y.extend(Sortable, Y.Base, { + /** + * @property delegate + * @type DD.Delegate + * @description A reference to the DD.Delegate instance. + */ + delegate: null, + /** + * @property drop + * @type DD.Drop + * @description A reference to the DD.Drop instance + */ + drop: null, + initializer: function() { + var id = 'sortable-' + Y.guid(), + delConfig = { + container: this.get(CONT), + nodes: this.get(NODES), + target: true, + invalid: this.get('invalid'), + dragConfig: { + groups: [ id ] + } + }, del; + + if (this.get('handles')) { + delConfig.handles = this.get('handles'); + } + del = new Y.DD.Delegate(delConfig); + + this.set(ID, id); + + del.dd.plug(Y.Plugin.DDProxy, { + moveOnEnd: false, + cloneNode: true + }); + + this.drop = new Y.DD.Drop({ + node: this.get(CONT), + bubbleTarget: del, + groups: del.dd.get('groups') + }); + this.drop.on('drop:enter', Y.bind(this._onDropEnter, this)); + + del.on({ + 'drag:start': Y.bind(this._onDragStart, this), + 'drag:end': Y.bind(this._onDragEnd, this), + 'drag:over': Y.bind(this._onDragOver, this), + 'drag:drag': Y.bind(this._onDrag, this) + }); + + this.delegate = del; + Sortable.reg(this, id); + }, + _up: null, + _y: null, + _onDrag: function(e) { + if (e.pageY < this._y) { + this._up = true; + } else if (e.pageY > this._y) { + this._up = false; + } + + this._y = e.pageY; + }, + /** + * @private + * @method _onDropEnter + * @param Event e The Event Object + * @description Handles the DropEnter event to append a new node to a target. + */ + _onDropEnter: function(e) { + var dropNode = e.drop.get(NODE), + dragNode = e.drag.get(NODE); + + if (!dropNode.test(this.get(NODES)) && + !dragNode.get(PARENT_NODE).compareTo(dropNode)) { + dropNode.append(dragNode); + } + }, + /** + * @private + * @method _onDragOver + * @param Event e The Event Object + * @description Handles the DragOver event that moves the object in the list or to another list. + */ + _onDragOver: function(e) { + if (!e.drop.get(NODE).test(this.get(NODES))) { + return; + } + if (e.drag.get(NODE) === e.drop.get(NODE)) { + return; + } + // is drop a child of drag? + if (e.drag.get(NODE).contains(e.drop.get(NODE))) { + return; + } + var same = false, dir, oldNode, newNode, dropsort, dropNode, + moveType = this.get('moveType').toLowerCase(); + + if (e.drag.get(NODE).get(PARENT_NODE).contains(e.drop.get(NODE))) { + same = true; + } + if (same && moveType === 'move') { + moveType = 'insert'; + } + switch (moveType) { + case 'insert': + dir = ((this._up) ? 'before' : 'after'); + dropNode = e.drop.get(NODE); + if (Y.Sortable._test(dropNode, this.get(CONT))) { + dropNode.append(e.drag.get(NODE)); + } else { + dropNode.insert(e.drag.get(NODE), dir); + } + break; + case 'swap': + Y.DD.DDM.swapNode(e.drag, e.drop); + break; + case 'move': + case 'copy': + dropsort = Y.Sortable.getSortable(e.drop.get(NODE).get(PARENT_NODE)); + + if (!dropsort) { + Y.log('No delegate parent found', 'error', 'sortable'); + return; + } + + Y.DD.DDM.getDrop(e.drag.get(NODE)).addToGroup(dropsort.get(ID)); + + //Same List + if (same) { + Y.DD.DDM.swapNode(e.drag, e.drop); + } else { + if (this.get('moveType') === 'copy') { + //New List + oldNode = e.drag.get(NODE); + newNode = oldNode.cloneNode(true); + + newNode.set(ID, ''); + e.drag.set(NODE, newNode); + dropsort.delegate.createDrop(newNode, [dropsort.get(ID)]); + oldNode.setStyles({ + top: '', + left: '' + }); + } + e.drop.get(NODE).insert(e.drag.get(NODE), 'before'); + } + break; + } + + this.fire(moveType, { same: same, drag: e.drag, drop: e.drop }); + this.fire('moved', { same: same, drag: e.drag, drop: e.drop }); + }, + /** + * @private + * @method _onDragStart + * @param Event e The Event Object + * @description Handles the DragStart event and initializes some settings. + */ + _onDragStart: function() { + var del = this.delegate, + lastNode = del.get('lastNode'); + if (lastNode && lastNode.getDOMNode()) { + lastNode.setStyle(ZINDEX, ''); + } + del.get(this.get(OPACITY_NODE)).setStyle(OPACITY, this.get(OPACITY)); + del.get(CURRENT_NODE).setStyle(ZINDEX, '999'); + }, + /** + * @private + * @method _onDragEnd + * @param Event e The Event Object + * @description Handles the DragEnd event that cleans up the settings in the drag:start event. + */ + _onDragEnd: function() { + this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY, 1); + this.delegate.get(CURRENT_NODE).setStyle(ZINDEX, ''); + this.delegate.get(CURRENT_NODE).setStyles({ + top: '', + left: '' + }); + this.sync(); + }, + /** + * @method plug + * @param Class cls The class to plug + * @param Object config The class config + * @description Passthrough to the DD.Delegate.ddplug method + * @chainable + */ + plug: function(cls, config) { + //I don't like this.. Not at all, need to discuss with the team + if (cls && cls.NAME.substring(0, 4).toLowerCase() === 'sort') { + this.constructor.superclass.plug.call(this, cls, config); + } else { + this.delegate.dd.plug(cls, config); + } + return this; + }, + /** + * @method sync + * @description Passthrough to the DD.Delegate syncTargets method. + * @chainable + */ + sync: function() { + this.delegate.syncTargets(); + return this; + }, + destructor: function() { + this.drop.destroy(); + this.delegate.destroy(); + Sortable.unreg(this, this.get(ID)); + }, + /** + * @method join + * @param Sortable sel The Sortable list to join with + * @param String type The type of join to do: full, inner, outer, none. Default: full + * @description Join this Sortable with another Sortable instance. + *
    + *
  • full: Exchange nodes with both lists.
  • + *
  • inner: Items can go into this list from the joined list.
  • + *
  • outer: Items can go out of the joined list into this list.
  • + *
  • none: Removes the join.
  • + *
+ * @chainable + */ + join: function(sel, type) { + if (!(sel instanceof Y.Sortable)) { + Y.error('Sortable: join needs a Sortable Instance'); + return this; + } + if (!type) { + type = 'full'; + } + type = type.toLowerCase(); + var method = '_join_' + type; + + if (this[method]) { + this[method](sel); + } + + return this; + }, + /** + * @private + * @method _join_none + * @param Sortable sel The Sortable to remove the join from + * @description Removes the join with the passed Sortable. + */ + _join_none: function(sel) { + this.delegate.dd.removeFromGroup(sel.get(ID)); + sel.delegate.dd.removeFromGroup(this.get(ID)); + }, + /** + * @private + * @method _join_full + * @param Sortable sel The Sortable list to join with + * @description Joins both of the Sortables together. + */ + _join_full: function(sel) { + this.delegate.dd.addToGroup(sel.get(ID)); + sel.delegate.dd.addToGroup(this.get(ID)); + }, + /** + * @private + * @method _join_outer + * @param Sortable sel The Sortable list to join with + * @description Allows this Sortable to accept items from the passed Sortable. + */ + _join_outer: function(sel) { + this.delegate.dd.addToGroup(sel.get(ID)); + }, + /** + * @private + * @method _join_inner + * @param Sortable sel The Sortable list to join with + * @description Allows this Sortable to give items to the passed Sortable. + */ + _join_inner: function(sel) { + sel.delegate.dd.addToGroup(this.get(ID)); + }, + /** + * A custom callback to allow a user to extract some sort of id or any other data + * from the node to use in the "ordering list" and then that data should be returned from the callback. + * @method getOrdering + * @param Function callback + * @return Array + */ + getOrdering: function(callback) { + var ordering = []; + + if (!Y.Lang.isFunction(callback)) { + callback = function (node) { + return node; + }; + } + + Y.one(this.get(CONT)).all(this.get(NODES)).each(function(node) { + ordering.push(callback(node)); + }); + return ordering; + } + }, { + NAME: 'sortable', + ATTRS: { + /** + * @attribute handles + * @description Drag handles to pass on to the internal DD.Delegate instance. + * @type Array + */ + handles: { + value: false + }, + /** + * @attribute container + * @description A selector query to get the container to listen for mousedown events on. All "nodes" should be a child of this container. + * @type String + */ + container: { + value: 'body' + }, + /** + * @attribute nodes + * @description A selector query to get the children of the "container" to make draggable elements from. + * @type String + */ + nodes: { + value: '.dd-draggable' + }, + /** + * @attribute opacity + * @description The opacity to change the proxy item to when dragging. + * @type String + */ + opacity: { + value: '.75' + }, + /** + * @attribute opacityNode + * @description The node to set opacity on when dragging (dragNode or currentNode). Default: currentNode. + * @type String + */ + opacityNode: { + value: 'currentNode' + }, + /** + * @attribute id + * @description The id of this Sortable, used to get a reference to this Sortable list from another list. + * @type String + */ + id: { + value: null + }, + /** + * @attribute moveType + * @description How should an item move to another list: insert, swap, move, copy. Default: insert + * @type String + */ + moveType: { + value: 'insert' + }, + /** + * @attribute invalid + * @description A selector string to test if a list item is invalid and not sortable + * @type String + */ + invalid: { + value: '' + } + }, + /** + * @static + * @property _sortables + * @private + * @type Object + * @description Hash map of all Sortables on the page. + */ + _sortables: {}, + /** + * @static + * @method _test + * @param {Node} node The node instance to test. + * @param {String|Node} test The node instance or selector string to test against. + * @description Test a Node or a selector for the container + */ + _test: function(node, test) { + var ret; + if (test instanceof Y.Node) { + ret = (test === node); + } else { + ret = node.test(test); + } + return ret; + }, + /** + * @static + * @method getSortable + * @param {String|Node} node The node instance or selector string to use to find a Sortable instance. + * @description Get a Sortable instance back from a node reference or a selector string. + */ + getSortable: function(node) { + var s = null, + id = null; + node = Y.one(node); + id = node.get(ID); + if(id && Y.Sortable._sortables[id]) { + return Y.Sortable._sortables[id]; + } + Y.Object.each(Y.Sortable._sortables, function(v) { + if (Y.Sortable._test(node, v.get(CONT))) { + s = v; + } + }); + return s; + }, + /** + * @static + * @method reg + * @param Sortable s A Sortable instance. + * @param String id (optional) The id of the sortable instance. + * @description Register a Sortable instance with the singleton to allow lookups later. + */ + reg: function(s, id) { + if (!id) { + id = s.get(ID); + } + Y.Sortable._sortables[id] = s; + }, + /** + * @static + * @method unreg + * @param Sortable s A Sortable instance. + * @param String id (optional) The id of the sortable instance. + * @description Unregister a Sortable instance with the singleton. + */ + unreg: function(s, id) { + if (!id) { + id = s.get(ID); + } + if (id && Y.Sortable._sortables[id]) { + delete Y.Sortable._sortables[id]; + return; + } + Y.Object.each(Y.Sortable._sortables, function(v, k) { + if (v === s) { + delete Sortable._sortables[k]; + } + }); + } + }); + + Y.Sortable = Sortable; + + /** + * @event copy + * @description A Sortable node was moved with a copy. + * @param {EventFacade} event An Event Facade object + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event move + * @description A Sortable node was moved with a move. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event insert + * @description A Sortable node was moved with an insert. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event swap + * @description A Sortable node was moved with a swap. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event moved + * @description A Sortable node was moved. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + + + +}, '3.17.2', {"requires": ["dd-delegate", "dd-drop-plugin", "dd-proxy"]}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable/sortable-min.js b/design/standard/lib/yui/3.17.2/build/sortable/sortable-min.js new file mode 100644 index 0000000..7845bc1 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable/sortable-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("sortable",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="currentNode",i="opacityNode",s="container",o="id",u="zIndex",a="opacity",f="parentNode",l="nodes",c="node";e.extend(n,e.Base,{delegate:null,drop:null,initializer:function(){var t="sortable-"+e.guid(),r={container:this.get(s),nodes:this.get(l),target:!0,invalid:this.get("invalid"),dragConfig:{groups:[t]}},i;this.get("handles")&&(r.handles=this.get("handles")),i=new e.DD.Delegate(r),this.set(o,t),i.dd.plug(e.Plugin.DDProxy,{moveOnEnd:!1,cloneNode:!0}),this.drop=new e.DD.Drop({node:this.get(s),bubbleTarget:i,groups:i.dd.get("groups")}),this.drop.on("drop:enter",e.bind(this._onDropEnter,this)),i.on({"drag:start":e.bind(this._onDragStart,this),"drag:end":e.bind(this._onDragEnd,this),"drag:over":e.bind(this._onDragOver,this),"drag:drag":e.bind(this._onDrag,this)}),this.delegate=i,n.reg(this,t)},_up:null,_y:null,_onDrag:function(e){e.pageYthis._y&&(this._up=!1),this._y=e.pageY},_onDropEnter:function(e){var t=e.drop.get(c),n=e.drag.get(c);!t.test(this.get(l))&&!n.get(f).compareTo(t)&&t.append(n)},_onDragOver:function(t){if(!t.drop.get(c).test(this.get(l)))return;if(t.drag.get(c)===t.drop.get(c))return;if(t.drag.get(c).contains(t.drop.get(c)))return;var n=!1,r,i,u,a,h,p=this.get("moveType").toLowerCase();t.drag.get(c).get(f).contains(t.drop.get(c))&&(n=!0),n&&p==="move"&&(p="insert");switch(p){case"insert":r=this._up?"before":"after",h=t.drop.get(c),e.Sortable._test(h,this.get(s))?h.append(t.drag.get(c)):h.insert(t.drag.get(c),r);break;case"swap":e.DD.DDM.swapNode(t.drag,t.drop);break;case"move":case"copy":a=e.Sortable.getSortable(t.drop.get(c).get(f));if(!a)return;e.DD.DDM.getDrop(t.drag.get(c)).addToGroup(a.get(o)),n?e.DD.DDM.swapNode(t.drag,t.drop):(this.get("moveType")==="copy"&&(i=t.drag.get(c),u=i.cloneNode(!0),u.set(o,""),t.drag.set(c,u),a.delegate.createDrop(u,[a.get(o)]),i.setStyles({top:"",left:""})),t.drop.get(c).insert(t.drag.get(c),"before"))}this.fire(p,{same:n,drag:t.drag,drop:t.drop}),this.fire("moved",{same:n,drag:t.drag,drop:t.drop})},_onDragStart:function(){var e=this.delegate,t=e.get("lastNode");t&&t.getDOMNode()&&t.setStyle(u,""),e.get(this.get(i)).setStyle(a,this.get(a)),e.get(r).setStyle(u,"999")},_onDragEnd:function(){this.delegate.get(this.get(i)).setStyle(a,1),this.delegate.get(r).setStyle(u,""),this.delegate.get(r).setStyles({top:"",left:""}),this.sync()},plug:function(e,t){return e&&e.NAME.substring(0,4).toLowerCase()==="sort"?this.constructor.superclass.plug.call(this,e,t):this.delegate.dd.plug(e,t),this},sync:function(){return this.delegate.syncTargets(),this},destructor:function(){this.drop.destroy(),this.delegate.destroy(),n.unreg(this,this.get(o))},join:function(t,n){if(t instanceof e.Sortable){n||(n="full"),n=n.toLowerCase();var r="_join_"+n;return this[r]&&this[r](t),this}return e.error("Sortable: join needs a Sortable Instance"),this},_join_none:function(e){this.delegate.dd.removeFromGroup(e.get(o)),e.delegate.dd.removeFromGroup(this.get(o))},_join_full:function(e){this.delegate.dd.addToGroup(e.get(o)),e.delegate.dd.addToGroup(this.get(o))},_join_outer:function(e){this.delegate.dd.addToGroup(e.get(o))},_join_inner:function(e){e.delegate.dd.addToGroup(this.get(o))},getOrdering:function(t){var n=[];return e.Lang.isFunction(t)||(t=function(e){return e}),e.one(this.get(s)).all(this.get(l)).each(function(e){n.push(t(e))}),n}},{NAME:"sortable",ATTRS:{handles:{value:!1},container:{value:"body"},nodes:{value:".dd-draggable"},opacity:{value:".75"},opacityNode:{value:"currentNode"},id:{value:null},moveType:{value:"insert"},invalid:{value:""}},_sortables:{},_test:function(t,n){var r;return n instanceof e.Node?r=n===t:r=t.test(n),r},getSortable:function(t){var n=null,r=null;return t=e.one(t),r=t.get(o),r&&e.Sortable._sortables[r]?e.Sortable._sortables[r]:(e.Object.each(e.Sortable._sortables,function(r){e.Sortable._test(t,r.get(s))&&(n=r)}),n)},reg:function(t,n){n||(n=t.get(o)),e.Sortable._sortables[n]=t},unreg:function(t,r){r||(r=t.get(o));if(r&&e.Sortable._sortables[r]){delete e.Sortable._sortables[r];return}e.Object.each(e.Sortable._sortables,function(e,r){e===t&&delete n._sortables[r]})}}),e.Sortable=n},"3.17.2",{requires:["dd-delegate","dd-drop-plugin","dd-proxy"]}); diff --git a/design/standard/lib/yui/3.17.2/build/sortable/sortable.js b/design/standard/lib/yui/3.17.2/build/sortable/sortable.js new file mode 100644 index 0000000..daf1899 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/sortable/sortable.js @@ -0,0 +1,534 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('sortable', function (Y, NAME) { + + + /** + * The class allows you to create a Drag & Drop reordered list. + * @module sortable + */ + /** + * The class allows you to create a Drag & Drop reordered list. + * @class Sortable + * @extends Base + * @constructor + */ + + + var Sortable = function() { + Sortable.superclass.constructor.apply(this, arguments); + }, + CURRENT_NODE = 'currentNode', + OPACITY_NODE = 'opacityNode', + CONT = 'container', + ID = 'id', + ZINDEX = 'zIndex', + OPACITY = 'opacity', + PARENT_NODE = 'parentNode', + NODES = 'nodes', + NODE = 'node'; + + + Y.extend(Sortable, Y.Base, { + /** + * @property delegate + * @type DD.Delegate + * @description A reference to the DD.Delegate instance. + */ + delegate: null, + /** + * @property drop + * @type DD.Drop + * @description A reference to the DD.Drop instance + */ + drop: null, + initializer: function() { + var id = 'sortable-' + Y.guid(), + delConfig = { + container: this.get(CONT), + nodes: this.get(NODES), + target: true, + invalid: this.get('invalid'), + dragConfig: { + groups: [ id ] + } + }, del; + + if (this.get('handles')) { + delConfig.handles = this.get('handles'); + } + del = new Y.DD.Delegate(delConfig); + + this.set(ID, id); + + del.dd.plug(Y.Plugin.DDProxy, { + moveOnEnd: false, + cloneNode: true + }); + + this.drop = new Y.DD.Drop({ + node: this.get(CONT), + bubbleTarget: del, + groups: del.dd.get('groups') + }); + this.drop.on('drop:enter', Y.bind(this._onDropEnter, this)); + + del.on({ + 'drag:start': Y.bind(this._onDragStart, this), + 'drag:end': Y.bind(this._onDragEnd, this), + 'drag:over': Y.bind(this._onDragOver, this), + 'drag:drag': Y.bind(this._onDrag, this) + }); + + this.delegate = del; + Sortable.reg(this, id); + }, + _up: null, + _y: null, + _onDrag: function(e) { + if (e.pageY < this._y) { + this._up = true; + } else if (e.pageY > this._y) { + this._up = false; + } + + this._y = e.pageY; + }, + /** + * @private + * @method _onDropEnter + * @param Event e The Event Object + * @description Handles the DropEnter event to append a new node to a target. + */ + _onDropEnter: function(e) { + var dropNode = e.drop.get(NODE), + dragNode = e.drag.get(NODE); + + if (!dropNode.test(this.get(NODES)) && + !dragNode.get(PARENT_NODE).compareTo(dropNode)) { + dropNode.append(dragNode); + } + }, + /** + * @private + * @method _onDragOver + * @param Event e The Event Object + * @description Handles the DragOver event that moves the object in the list or to another list. + */ + _onDragOver: function(e) { + if (!e.drop.get(NODE).test(this.get(NODES))) { + return; + } + if (e.drag.get(NODE) === e.drop.get(NODE)) { + return; + } + // is drop a child of drag? + if (e.drag.get(NODE).contains(e.drop.get(NODE))) { + return; + } + var same = false, dir, oldNode, newNode, dropsort, dropNode, + moveType = this.get('moveType').toLowerCase(); + + if (e.drag.get(NODE).get(PARENT_NODE).contains(e.drop.get(NODE))) { + same = true; + } + if (same && moveType === 'move') { + moveType = 'insert'; + } + switch (moveType) { + case 'insert': + dir = ((this._up) ? 'before' : 'after'); + dropNode = e.drop.get(NODE); + if (Y.Sortable._test(dropNode, this.get(CONT))) { + dropNode.append(e.drag.get(NODE)); + } else { + dropNode.insert(e.drag.get(NODE), dir); + } + break; + case 'swap': + Y.DD.DDM.swapNode(e.drag, e.drop); + break; + case 'move': + case 'copy': + dropsort = Y.Sortable.getSortable(e.drop.get(NODE).get(PARENT_NODE)); + + if (!dropsort) { + return; + } + + Y.DD.DDM.getDrop(e.drag.get(NODE)).addToGroup(dropsort.get(ID)); + + //Same List + if (same) { + Y.DD.DDM.swapNode(e.drag, e.drop); + } else { + if (this.get('moveType') === 'copy') { + //New List + oldNode = e.drag.get(NODE); + newNode = oldNode.cloneNode(true); + + newNode.set(ID, ''); + e.drag.set(NODE, newNode); + dropsort.delegate.createDrop(newNode, [dropsort.get(ID)]); + oldNode.setStyles({ + top: '', + left: '' + }); + } + e.drop.get(NODE).insert(e.drag.get(NODE), 'before'); + } + break; + } + + this.fire(moveType, { same: same, drag: e.drag, drop: e.drop }); + this.fire('moved', { same: same, drag: e.drag, drop: e.drop }); + }, + /** + * @private + * @method _onDragStart + * @param Event e The Event Object + * @description Handles the DragStart event and initializes some settings. + */ + _onDragStart: function() { + var del = this.delegate, + lastNode = del.get('lastNode'); + if (lastNode && lastNode.getDOMNode()) { + lastNode.setStyle(ZINDEX, ''); + } + del.get(this.get(OPACITY_NODE)).setStyle(OPACITY, this.get(OPACITY)); + del.get(CURRENT_NODE).setStyle(ZINDEX, '999'); + }, + /** + * @private + * @method _onDragEnd + * @param Event e The Event Object + * @description Handles the DragEnd event that cleans up the settings in the drag:start event. + */ + _onDragEnd: function() { + this.delegate.get(this.get(OPACITY_NODE)).setStyle(OPACITY, 1); + this.delegate.get(CURRENT_NODE).setStyle(ZINDEX, ''); + this.delegate.get(CURRENT_NODE).setStyles({ + top: '', + left: '' + }); + this.sync(); + }, + /** + * @method plug + * @param Class cls The class to plug + * @param Object config The class config + * @description Passthrough to the DD.Delegate.ddplug method + * @chainable + */ + plug: function(cls, config) { + //I don't like this.. Not at all, need to discuss with the team + if (cls && cls.NAME.substring(0, 4).toLowerCase() === 'sort') { + this.constructor.superclass.plug.call(this, cls, config); + } else { + this.delegate.dd.plug(cls, config); + } + return this; + }, + /** + * @method sync + * @description Passthrough to the DD.Delegate syncTargets method. + * @chainable + */ + sync: function() { + this.delegate.syncTargets(); + return this; + }, + destructor: function() { + this.drop.destroy(); + this.delegate.destroy(); + Sortable.unreg(this, this.get(ID)); + }, + /** + * @method join + * @param Sortable sel The Sortable list to join with + * @param String type The type of join to do: full, inner, outer, none. Default: full + * @description Join this Sortable with another Sortable instance. + *
    + *
  • full: Exchange nodes with both lists.
  • + *
  • inner: Items can go into this list from the joined list.
  • + *
  • outer: Items can go out of the joined list into this list.
  • + *
  • none: Removes the join.
  • + *
+ * @chainable + */ + join: function(sel, type) { + if (!(sel instanceof Y.Sortable)) { + Y.error('Sortable: join needs a Sortable Instance'); + return this; + } + if (!type) { + type = 'full'; + } + type = type.toLowerCase(); + var method = '_join_' + type; + + if (this[method]) { + this[method](sel); + } + + return this; + }, + /** + * @private + * @method _join_none + * @param Sortable sel The Sortable to remove the join from + * @description Removes the join with the passed Sortable. + */ + _join_none: function(sel) { + this.delegate.dd.removeFromGroup(sel.get(ID)); + sel.delegate.dd.removeFromGroup(this.get(ID)); + }, + /** + * @private + * @method _join_full + * @param Sortable sel The Sortable list to join with + * @description Joins both of the Sortables together. + */ + _join_full: function(sel) { + this.delegate.dd.addToGroup(sel.get(ID)); + sel.delegate.dd.addToGroup(this.get(ID)); + }, + /** + * @private + * @method _join_outer + * @param Sortable sel The Sortable list to join with + * @description Allows this Sortable to accept items from the passed Sortable. + */ + _join_outer: function(sel) { + this.delegate.dd.addToGroup(sel.get(ID)); + }, + /** + * @private + * @method _join_inner + * @param Sortable sel The Sortable list to join with + * @description Allows this Sortable to give items to the passed Sortable. + */ + _join_inner: function(sel) { + sel.delegate.dd.addToGroup(this.get(ID)); + }, + /** + * A custom callback to allow a user to extract some sort of id or any other data + * from the node to use in the "ordering list" and then that data should be returned from the callback. + * @method getOrdering + * @param Function callback + * @return Array + */ + getOrdering: function(callback) { + var ordering = []; + + if (!Y.Lang.isFunction(callback)) { + callback = function (node) { + return node; + }; + } + + Y.one(this.get(CONT)).all(this.get(NODES)).each(function(node) { + ordering.push(callback(node)); + }); + return ordering; + } + }, { + NAME: 'sortable', + ATTRS: { + /** + * @attribute handles + * @description Drag handles to pass on to the internal DD.Delegate instance. + * @type Array + */ + handles: { + value: false + }, + /** + * @attribute container + * @description A selector query to get the container to listen for mousedown events on. All "nodes" should be a child of this container. + * @type String + */ + container: { + value: 'body' + }, + /** + * @attribute nodes + * @description A selector query to get the children of the "container" to make draggable elements from. + * @type String + */ + nodes: { + value: '.dd-draggable' + }, + /** + * @attribute opacity + * @description The opacity to change the proxy item to when dragging. + * @type String + */ + opacity: { + value: '.75' + }, + /** + * @attribute opacityNode + * @description The node to set opacity on when dragging (dragNode or currentNode). Default: currentNode. + * @type String + */ + opacityNode: { + value: 'currentNode' + }, + /** + * @attribute id + * @description The id of this Sortable, used to get a reference to this Sortable list from another list. + * @type String + */ + id: { + value: null + }, + /** + * @attribute moveType + * @description How should an item move to another list: insert, swap, move, copy. Default: insert + * @type String + */ + moveType: { + value: 'insert' + }, + /** + * @attribute invalid + * @description A selector string to test if a list item is invalid and not sortable + * @type String + */ + invalid: { + value: '' + } + }, + /** + * @static + * @property _sortables + * @private + * @type Object + * @description Hash map of all Sortables on the page. + */ + _sortables: {}, + /** + * @static + * @method _test + * @param {Node} node The node instance to test. + * @param {String|Node} test The node instance or selector string to test against. + * @description Test a Node or a selector for the container + */ + _test: function(node, test) { + var ret; + if (test instanceof Y.Node) { + ret = (test === node); + } else { + ret = node.test(test); + } + return ret; + }, + /** + * @static + * @method getSortable + * @param {String|Node} node The node instance or selector string to use to find a Sortable instance. + * @description Get a Sortable instance back from a node reference or a selector string. + */ + getSortable: function(node) { + var s = null, + id = null; + node = Y.one(node); + id = node.get(ID); + if(id && Y.Sortable._sortables[id]) { + return Y.Sortable._sortables[id]; + } + Y.Object.each(Y.Sortable._sortables, function(v) { + if (Y.Sortable._test(node, v.get(CONT))) { + s = v; + } + }); + return s; + }, + /** + * @static + * @method reg + * @param Sortable s A Sortable instance. + * @param String id (optional) The id of the sortable instance. + * @description Register a Sortable instance with the singleton to allow lookups later. + */ + reg: function(s, id) { + if (!id) { + id = s.get(ID); + } + Y.Sortable._sortables[id] = s; + }, + /** + * @static + * @method unreg + * @param Sortable s A Sortable instance. + * @param String id (optional) The id of the sortable instance. + * @description Unregister a Sortable instance with the singleton. + */ + unreg: function(s, id) { + if (!id) { + id = s.get(ID); + } + if (id && Y.Sortable._sortables[id]) { + delete Y.Sortable._sortables[id]; + return; + } + Y.Object.each(Y.Sortable._sortables, function(v, k) { + if (v === s) { + delete Sortable._sortables[k]; + } + }); + } + }); + + Y.Sortable = Sortable; + + /** + * @event copy + * @description A Sortable node was moved with a copy. + * @param {EventFacade} event An Event Facade object + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event move + * @description A Sortable node was moved with a move. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event insert + * @description A Sortable node was moved with an insert. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event swap + * @description A Sortable node was moved with a swap. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + /** + * @event moved + * @description A Sortable node was moved. + * @param {EventFacade} event An Event Facade object with the following specific property added: + * @param {Boolean} event.same Moved to the same list. + * @param {DD.Drag} event.drag The drag instance. + * @param {DD.Drop} event.drop The drop instance. + */ + + + +}, '3.17.2', {"requires": ["dd-delegate", "dd-drop-plugin", "dd-proxy"]}); diff --git a/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-coverage.js b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-coverage.js new file mode 100644 index 0000000..5b783f7 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/stylesheet/stylesheet.js']) { + __coverage__['build/stylesheet/stylesheet.js'] = {"path":"build/stylesheet/stylesheet.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0,0,0],"61":[0,0],"62":[0,0],"63":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":41}}},"2":{"name":"(anonymous_2)","line":26,"loc":{"start":{"line":26,"column":4},"end":{"line":26,"column":21}}},"3":{"name":"(anonymous_3)","line":27,"loc":{"start":{"line":27,"column":4},"end":{"line":27,"column":21}}},"4":{"name":"(anonymous_4)","line":35,"loc":{"start":{"line":35,"column":4},"end":{"line":35,"column":26}}},"5":{"name":"(anonymous_5)","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":58,"column":26}}},"6":{"name":"StyleSheet","line":107,"loc":{"start":{"line":107,"column":0},"end":{"line":107,"column":32}}},"7":{"name":"(anonymous_7)","line":186,"loc":{"start":{"line":186,"column":8},"end":{"line":186,"column":21}}},"8":{"name":"(anonymous_8)","line":187,"loc":{"start":{"line":187,"column":8},"end":{"line":187,"column":21}}},"9":{"name":"(anonymous_9)","line":192,"loc":{"start":{"line":192,"column":8},"end":{"line":192,"column":29}}},"10":{"name":"(anonymous_10)","line":193,"loc":{"start":{"line":193,"column":8},"end":{"line":193,"column":29}}},"11":{"name":"(anonymous_11)","line":227,"loc":{"start":{"line":227,"column":16},"end":{"line":227,"column":28}}},"12":{"name":"(anonymous_12)","line":236,"loc":{"start":{"line":236,"column":17},"end":{"line":236,"column":29}}},"13":{"name":"(anonymous_13)","line":246,"loc":{"start":{"line":246,"column":18},"end":{"line":246,"column":30}}},"14":{"name":"(anonymous_14)","line":254,"loc":{"start":{"line":254,"column":20},"end":{"line":254,"column":32}}},"15":{"name":"(anonymous_15)","line":274,"loc":{"start":{"line":274,"column":14},"end":{"line":274,"column":33}}},"16":{"name":"(anonymous_16)","line":335,"loc":{"start":{"line":335,"column":16},"end":{"line":335,"column":35}}},"17":{"name":"(anonymous_17)","line":392,"loc":{"start":{"line":392,"column":21},"end":{"line":392,"column":36}}},"18":{"name":"(anonymous_18)","line":416,"loc":{"start":{"line":416,"column":13},"end":{"line":416,"column":33}}},"19":{"name":"(anonymous_19)","line":475,"loc":{"start":{"line":475,"column":8},"end":{"line":475,"column":32}}},"20":{"name":"(anonymous_20)","line":495,"loc":{"start":{"line":495,"column":15},"end":{"line":495,"column":37}}},"21":{"name":"(anonymous_21)","line":516,"loc":{"start":{"line":516,"column":22},"end":{"line":516,"column":37}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":638,"column":41}},"2":{"start":{"line":9,"column":0},"end":{"line":21,"column":17}},"3":{"start":{"line":25,"column":0},"end":{"line":27,"column":47}},"4":{"start":{"line":26,"column":23},"end":{"line":26,"column":45}},"5":{"start":{"line":27,"column":23},"end":{"line":27,"column":44}},"6":{"start":{"line":32,"column":0},"end":{"line":32,"column":37}},"7":{"start":{"line":33,"column":0},"end":{"line":33,"column":27}},"8":{"start":{"line":34,"column":0},"end":{"line":69,"column":6}},"9":{"start":{"line":36,"column":8},"end":{"line":36,"column":14}},"10":{"start":{"line":37,"column":8},"end":{"line":39,"column":9}},"11":{"start":{"line":38,"column":12},"end":{"line":38,"column":29}},"12":{"start":{"line":40,"column":8},"end":{"line":56,"column":9}},"13":{"start":{"line":41,"column":12},"end":{"line":55,"column":13}},"14":{"start":{"line":43,"column":32},"end":{"line":43,"column":53}},"15":{"start":{"line":43,"column":54},"end":{"line":43,"column":60}},"16":{"start":{"line":45,"column":20},"end":{"line":47,"column":45}},"17":{"start":{"line":48,"column":20},"end":{"line":48,"column":26}},"18":{"start":{"line":50,"column":20},"end":{"line":54,"column":21}},"19":{"start":{"line":51,"column":24},"end":{"line":53,"column":25}},"20":{"start":{"line":52,"column":28},"end":{"line":52,"column":45}},"21":{"start":{"line":59,"column":8},"end":{"line":61,"column":9}},"22":{"start":{"line":60,"column":12},"end":{"line":60,"column":29}},"23":{"start":{"line":62,"column":8},"end":{"line":68,"column":9}},"24":{"start":{"line":63,"column":12},"end":{"line":67,"column":13}},"25":{"start":{"line":64,"column":16},"end":{"line":64,"column":37}},"26":{"start":{"line":66,"column":16},"end":{"line":66,"column":36}},"27":{"start":{"line":107,"column":0},"end":{"line":414,"column":1}},"28":{"start":{"line":108,"column":4},"end":{"line":115,"column":16}},"29":{"start":{"line":118,"column":4},"end":{"line":120,"column":5}},"30":{"start":{"line":119,"column":8},"end":{"line":119,"column":41}},"31":{"start":{"line":123,"column":4},"end":{"line":140,"column":5}},"32":{"start":{"line":124,"column":8},"end":{"line":134,"column":9}},"33":{"start":{"line":125,"column":12},"end":{"line":125,"column":30}},"34":{"start":{"line":126,"column":15},"end":{"line":134,"column":9}},"35":{"start":{"line":127,"column":12},"end":{"line":127,"column":24}},"36":{"start":{"line":129,"column":15},"end":{"line":134,"column":9}},"37":{"start":{"line":130,"column":12},"end":{"line":132,"column":13}},"38":{"start":{"line":131,"column":16},"end":{"line":131,"column":36}},"39":{"start":{"line":133,"column":12},"end":{"line":133,"column":62}},"40":{"start":{"line":137,"column":8},"end":{"line":139,"column":9}},"41":{"start":{"line":138,"column":12},"end":{"line":138,"column":41}},"42":{"start":{"line":144,"column":4},"end":{"line":147,"column":5}},"43":{"start":{"line":145,"column":8},"end":{"line":145,"column":40}},"44":{"start":{"line":146,"column":8},"end":{"line":146,"column":31}},"45":{"start":{"line":149,"column":4},"end":{"line":162,"column":5}},"46":{"start":{"line":151,"column":8},"end":{"line":161,"column":9}},"47":{"start":{"line":154,"column":12},"end":{"line":158,"column":13}},"48":{"start":{"line":155,"column":16},"end":{"line":155,"column":47}},"49":{"start":{"line":157,"column":16},"end":{"line":157,"column":57}},"50":{"start":{"line":159,"column":15},"end":{"line":161,"column":9}},"51":{"start":{"line":160,"column":12},"end":{"line":160,"column":24}},"52":{"start":{"line":165,"column":4},"end":{"line":171,"column":5}},"53":{"start":{"line":166,"column":8},"end":{"line":166,"column":73}},"54":{"start":{"line":170,"column":8},"end":{"line":170,"column":31}},"55":{"start":{"line":177,"column":4},"end":{"line":177,"column":42}},"56":{"start":{"line":181,"column":4},"end":{"line":181,"column":67}},"57":{"start":{"line":185,"column":4},"end":{"line":187,"column":46}},"58":{"start":{"line":186,"column":23},"end":{"line":186,"column":43}},"59":{"start":{"line":187,"column":23},"end":{"line":187,"column":43}},"60":{"start":{"line":191,"column":4},"end":{"line":193,"column":59}},"61":{"start":{"line":192,"column":31},"end":{"line":192,"column":68}},"62":{"start":{"line":193,"column":31},"end":{"line":193,"column":56}},"63":{"start":{"line":199,"column":4},"end":{"line":209,"column":5}},"64":{"start":{"line":200,"column":8},"end":{"line":200,"column":31}},"65":{"start":{"line":201,"column":8},"end":{"line":201,"column":29}},"66":{"start":{"line":203,"column":8},"end":{"line":208,"column":9}},"67":{"start":{"line":204,"column":12},"end":{"line":204,"column":65}},"68":{"start":{"line":205,"column":12},"end":{"line":205,"column":27}},"69":{"start":{"line":207,"column":12},"end":{"line":207,"column":30}},"70":{"start":{"line":212,"column":4},"end":{"line":212,"column":44}},"71":{"start":{"line":215,"column":4},"end":{"line":217,"column":5}},"72":{"start":{"line":216,"column":8},"end":{"line":216,"column":39}},"73":{"start":{"line":220,"column":4},"end":{"line":412,"column":7}},"74":{"start":{"line":227,"column":30},"end":{"line":227,"column":51}},"75":{"start":{"line":236,"column":31},"end":{"line":236,"column":54}},"76":{"start":{"line":236,"column":55},"end":{"line":236,"column":67}},"77":{"start":{"line":246,"column":32},"end":{"line":246,"column":54}},"78":{"start":{"line":246,"column":55},"end":{"line":246,"column":67}},"79":{"start":{"line":254,"column":34},"end":{"line":254,"column":57}},"80":{"start":{"line":275,"column":12},"end":{"line":277,"column":20}},"81":{"start":{"line":280,"column":12},"end":{"line":285,"column":13}},"82":{"start":{"line":281,"column":16},"end":{"line":283,"column":17}},"83":{"start":{"line":282,"column":20},"end":{"line":282,"column":44}},"84":{"start":{"line":284,"column":16},"end":{"line":284,"column":28}},"85":{"start":{"line":288,"column":12},"end":{"line":290,"column":13}},"86":{"start":{"line":289,"column":16},"end":{"line":289,"column":28}},"87":{"start":{"line":295,"column":12},"end":{"line":311,"column":13}},"88":{"start":{"line":296,"column":16},"end":{"line":296,"column":82}},"89":{"start":{"line":298,"column":16},"end":{"line":298,"column":43}},"90":{"start":{"line":299,"column":16},"end":{"line":299,"column":48}},"91":{"start":{"line":303,"column":16},"end":{"line":310,"column":17}},"92":{"start":{"line":304,"column":20},"end":{"line":304,"column":47}},"93":{"start":{"line":309,"column":20},"end":{"line":309,"column":55}},"94":{"start":{"line":312,"column":12},"end":{"line":312,"column":24}},"95":{"start":{"line":336,"column":12},"end":{"line":339,"column":25}},"96":{"start":{"line":343,"column":12},"end":{"line":348,"column":13}},"97":{"start":{"line":344,"column":16},"end":{"line":346,"column":17}},"98":{"start":{"line":345,"column":20},"end":{"line":345,"column":46}},"99":{"start":{"line":347,"column":16},"end":{"line":347,"column":28}},"100":{"start":{"line":350,"column":12},"end":{"line":376,"column":13}},"101":{"start":{"line":351,"column":16},"end":{"line":364,"column":17}},"102":{"start":{"line":352,"column":20},"end":{"line":352,"column":39}},"103":{"start":{"line":354,"column":20},"end":{"line":354,"column":61}},"104":{"start":{"line":355,"column":20},"end":{"line":357,"column":21}},"105":{"start":{"line":356,"column":24},"end":{"line":356,"column":59}},"106":{"start":{"line":359,"column":20},"end":{"line":363,"column":21}},"107":{"start":{"line":360,"column":24},"end":{"line":360,"column":65}},"108":{"start":{"line":362,"column":24},"end":{"line":362,"column":38}},"109":{"start":{"line":366,"column":16},"end":{"line":375,"column":17}},"110":{"start":{"line":367,"column":20},"end":{"line":367,"column":42}},"111":{"start":{"line":368,"column":20},"end":{"line":374,"column":21}},"112":{"start":{"line":369,"column":24},"end":{"line":373,"column":25}},"113":{"start":{"line":370,"column":28},"end":{"line":370,"column":49}},"114":{"start":{"line":371,"column":28},"end":{"line":371,"column":43}},"115":{"start":{"line":372,"column":28},"end":{"line":372,"column":34}},"116":{"start":{"line":377,"column":12},"end":{"line":377,"column":24}},"117":{"start":{"line":393,"column":12},"end":{"line":393,"column":36}},"118":{"start":{"line":395,"column":12},"end":{"line":410,"column":13}},"119":{"start":{"line":398,"column":16},"end":{"line":398,"column":57}},"120":{"start":{"line":400,"column":16},"end":{"line":400,"column":56}},"121":{"start":{"line":402,"column":16},"end":{"line":402,"column":25}},"122":{"start":{"line":403,"column":16},"end":{"line":408,"column":17}},"123":{"start":{"line":404,"column":20},"end":{"line":407,"column":21}},"124":{"start":{"line":405,"column":24},"end":{"line":405,"column":50}},"125":{"start":{"line":406,"column":24},"end":{"line":406,"column":80}},"126":{"start":{"line":409,"column":16},"end":{"line":409,"column":38}},"127":{"start":{"line":416,"column":0},"end":{"line":453,"column":2}},"128":{"start":{"line":417,"column":4},"end":{"line":419,"column":13}},"129":{"start":{"line":427,"column":4},"end":{"line":433,"column":5}},"130":{"start":{"line":428,"column":8},"end":{"line":428,"column":44}},"131":{"start":{"line":430,"column":8},"end":{"line":430,"column":33}},"132":{"start":{"line":431,"column":8},"end":{"line":431,"column":30}},"133":{"start":{"line":432,"column":8},"end":{"line":432,"column":44}},"134":{"start":{"line":435,"column":4},"end":{"line":439,"column":5}},"135":{"start":{"line":436,"column":8},"end":{"line":436,"column":27}},"136":{"start":{"line":437,"column":8},"end":{"line":437,"column":30}},"137":{"start":{"line":437,"column":31},"end":{"line":437,"column":51}},"138":{"start":{"line":437,"column":52},"end":{"line":437,"column":70}},"139":{"start":{"line":438,"column":8},"end":{"line":438,"column":27}},"140":{"start":{"line":441,"column":4},"end":{"line":451,"column":5}},"141":{"start":{"line":442,"column":8},"end":{"line":450,"column":9}},"142":{"start":{"line":443,"column":12},"end":{"line":449,"column":13}},"143":{"start":{"line":446,"column":16},"end":{"line":446,"column":52}},"144":{"start":{"line":452,"column":4},"end":{"line":452,"column":31}},"145":{"start":{"line":455,"column":0},"end":{"line":545,"column":8}},"146":{"start":{"line":476,"column":12},"end":{"line":481,"column":13}},"147":{"start":{"line":477,"column":16},"end":{"line":479,"column":25}},"148":{"start":{"line":480,"column":16},"end":{"line":480,"column":35}},"149":{"start":{"line":482,"column":12},"end":{"line":482,"column":43}},"150":{"start":{"line":496,"column":8},"end":{"line":497,"column":59}},"151":{"start":{"line":517,"column":8},"end":{"line":517,"column":26}},"152":{"start":{"line":519,"column":8},"end":{"line":541,"column":9}},"153":{"start":{"line":521,"column":12},"end":{"line":538,"column":13}},"154":{"start":{"line":524,"column":16},"end":{"line":537,"column":53}},"155":{"start":{"line":540,"column":12},"end":{"line":540,"column":35}},"156":{"start":{"line":543,"column":8},"end":{"line":543,"column":21}},"157":{"start":{"line":547,"column":0},"end":{"line":547,"column":26}}},"branchMap":{"1":{"line":15,"type":"cond-expr","locations":[{"start":{"line":15,"column":46},"end":{"line":15,"column":56}},{"start":{"line":15,"column":59},"end":{"line":15,"column":71}}]},"2":{"line":25,"type":"cond-expr","locations":[{"start":{"line":26,"column":4},"end":{"line":26,"column":47}},{"start":{"line":27,"column":4},"end":{"line":27,"column":46}}]},"3":{"line":34,"type":"cond-expr","locations":[{"start":{"line":35,"column":4},"end":{"line":57,"column":5}},{"start":{"line":58,"column":4},"end":{"line":69,"column":5}}]},"4":{"line":37,"type":"if","locations":[{"start":{"line":37,"column":8},"end":{"line":37,"column":8}},{"start":{"line":37,"column":8},"end":{"line":37,"column":8}}]},"5":{"line":37,"type":"binary-expr","locations":[{"start":{"line":37,"column":12},"end":{"line":37,"column":30}},{"start":{"line":37,"column":34},"end":{"line":37,"column":73}}]},"6":{"line":40,"type":"if","locations":[{"start":{"line":40,"column":8},"end":{"line":40,"column":8}},{"start":{"line":40,"column":8},"end":{"line":40,"column":8}}]},"7":{"line":41,"type":"switch","locations":[{"start":{"line":42,"column":16},"end":{"line":42,"column":29}},{"start":{"line":43,"column":16},"end":{"line":43,"column":60}},{"start":{"line":44,"column":16},"end":{"line":48,"column":26}},{"start":{"line":49,"column":16},"end":{"line":54,"column":21}}]},"8":{"line":51,"type":"if","locations":[{"start":{"line":51,"column":24},"end":{"line":51,"column":24}},{"start":{"line":51,"column":24},"end":{"line":51,"column":24}}]},"9":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":8},"end":{"line":59,"column":8}},{"start":{"line":59,"column":8},"end":{"line":59,"column":8}}]},"10":{"line":59,"type":"binary-expr","locations":[{"start":{"line":59,"column":12},"end":{"line":59,"column":30}},{"start":{"line":59,"column":34},"end":{"line":59,"column":73}}]},"11":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":8},"end":{"line":62,"column":8}},{"start":{"line":62,"column":8},"end":{"line":62,"column":8}}]},"12":{"line":63,"type":"if","locations":[{"start":{"line":63,"column":12},"end":{"line":63,"column":12}},{"start":{"line":63,"column":12},"end":{"line":63,"column":12}}]},"13":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":4},"end":{"line":118,"column":4}},{"start":{"line":118,"column":4},"end":{"line":118,"column":4}}]},"14":{"line":123,"type":"if","locations":[{"start":{"line":123,"column":4},"end":{"line":123,"column":4}},{"start":{"line":123,"column":4},"end":{"line":123,"column":4}}]},"15":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":8},"end":{"line":124,"column":8}},{"start":{"line":124,"column":8},"end":{"line":124,"column":8}}]},"16":{"line":124,"type":"binary-expr","locations":[{"start":{"line":124,"column":12},"end":{"line":124,"column":18}},{"start":{"line":124,"column":22},"end":{"line":124,"column":44}}]},"17":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":15},"end":{"line":126,"column":15}},{"start":{"line":126,"column":15},"end":{"line":126,"column":15}}]},"18":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":15},"end":{"line":129,"column":15}},{"start":{"line":129,"column":15},"end":{"line":129,"column":15}}]},"19":{"line":130,"type":"if","locations":[{"start":{"line":130,"column":12},"end":{"line":130,"column":12}},{"start":{"line":130,"column":12},"end":{"line":130,"column":12}}]},"20":{"line":130,"type":"binary-expr","locations":[{"start":{"line":130,"column":16},"end":{"line":130,"column":20}},{"start":{"line":130,"column":24},"end":{"line":130,"column":36}}]},"21":{"line":137,"type":"if","locations":[{"start":{"line":137,"column":8},"end":{"line":137,"column":8}},{"start":{"line":137,"column":8},"end":{"line":137,"column":8}}]},"22":{"line":137,"type":"binary-expr","locations":[{"start":{"line":137,"column":12},"end":{"line":137,"column":16}},{"start":{"line":137,"column":20},"end":{"line":137,"column":41}}]},"23":{"line":144,"type":"if","locations":[{"start":{"line":144,"column":4},"end":{"line":144,"column":4}},{"start":{"line":144,"column":4},"end":{"line":144,"column":4}}]},"24":{"line":144,"type":"binary-expr","locations":[{"start":{"line":144,"column":8},"end":{"line":144,"column":13}},{"start":{"line":144,"column":17},"end":{"line":144,"column":57}}]},"25":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":4},"end":{"line":149,"column":4}},{"start":{"line":149,"column":4},"end":{"line":149,"column":4}}]},"26":{"line":151,"type":"if","locations":[{"start":{"line":151,"column":8},"end":{"line":151,"column":8}},{"start":{"line":151,"column":8},"end":{"line":151,"column":8}}]},"27":{"line":154,"type":"if","locations":[{"start":{"line":154,"column":12},"end":{"line":154,"column":12}},{"start":{"line":154,"column":12},"end":{"line":154,"column":12}}]},"28":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":15},"end":{"line":159,"column":15}},{"start":{"line":159,"column":15},"end":{"line":159,"column":15}}]},"29":{"line":165,"type":"if","locations":[{"start":{"line":165,"column":4},"end":{"line":165,"column":4}},{"start":{"line":165,"column":4},"end":{"line":165,"column":4}}]},"30":{"line":165,"type":"binary-expr","locations":[{"start":{"line":165,"column":8},"end":{"line":165,"column":24}},{"start":{"line":165,"column":28},"end":{"line":165,"column":77}}]},"31":{"line":166,"type":"binary-expr","locations":[{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},{"start":{"line":166,"column":38},"end":{"line":166,"column":39}}]},"32":{"line":177,"type":"binary-expr","locations":[{"start":{"line":177,"column":12},"end":{"line":177,"column":22}},{"start":{"line":177,"column":26},"end":{"line":177,"column":41}}]},"33":{"line":181,"type":"cond-expr","locations":[{"start":{"line":181,"column":46},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":66}}]},"34":{"line":181,"type":"binary-expr","locations":[{"start":{"line":181,"column":13},"end":{"line":181,"column":18}},{"start":{"line":181,"column":23},"end":{"line":181,"column":42}}]},"35":{"line":185,"type":"cond-expr","locations":[{"start":{"line":186,"column":8},"end":{"line":186,"column":45}},{"start":{"line":187,"column":8},"end":{"line":187,"column":45}}]},"36":{"line":191,"type":"cond-expr","locations":[{"start":{"line":192,"column":8},"end":{"line":192,"column":70}},{"start":{"line":193,"column":8},"end":{"line":193,"column":58}}]},"37":{"line":203,"type":"if","locations":[{"start":{"line":203,"column":8},"end":{"line":203,"column":8}},{"start":{"line":203,"column":8},"end":{"line":203,"column":8}}]},"38":{"line":215,"type":"if","locations":[{"start":{"line":215,"column":4},"end":{"line":215,"column":4}},{"start":{"line":215,"column":4},"end":{"line":215,"column":4}}]},"39":{"line":280,"type":"if","locations":[{"start":{"line":280,"column":12},"end":{"line":280,"column":12}},{"start":{"line":280,"column":12},"end":{"line":280,"column":12}}]},"40":{"line":288,"type":"if","locations":[{"start":{"line":288,"column":12},"end":{"line":288,"column":12}},{"start":{"line":288,"column":12},"end":{"line":288,"column":12}}]},"41":{"line":295,"type":"if","locations":[{"start":{"line":295,"column":12},"end":{"line":295,"column":12}},{"start":{"line":295,"column":12},"end":{"line":295,"column":12}}]},"42":{"line":303,"type":"if","locations":[{"start":{"line":303,"column":16},"end":{"line":303,"column":16}},{"start":{"line":303,"column":16},"end":{"line":303,"column":16}}]},"43":{"line":343,"type":"if","locations":[{"start":{"line":343,"column":12},"end":{"line":343,"column":12}},{"start":{"line":343,"column":12},"end":{"line":343,"column":12}}]},"44":{"line":350,"type":"if","locations":[{"start":{"line":350,"column":12},"end":{"line":350,"column":12}},{"start":{"line":350,"column":12},"end":{"line":350,"column":12}}]},"45":{"line":351,"type":"if","locations":[{"start":{"line":351,"column":16},"end":{"line":351,"column":16}},{"start":{"line":351,"column":16},"end":{"line":351,"column":16}}]},"46":{"line":359,"type":"if","locations":[{"start":{"line":359,"column":20},"end":{"line":359,"column":20}},{"start":{"line":359,"column":20},"end":{"line":359,"column":20}}]},"47":{"line":366,"type":"if","locations":[{"start":{"line":366,"column":16},"end":{"line":366,"column":16}},{"start":{"line":366,"column":16},"end":{"line":366,"column":16}}]},"48":{"line":369,"type":"if","locations":[{"start":{"line":369,"column":24},"end":{"line":369,"column":24}},{"start":{"line":369,"column":24},"end":{"line":369,"column":24}}]},"49":{"line":395,"type":"if","locations":[{"start":{"line":395,"column":12},"end":{"line":395,"column":12}},{"start":{"line":395,"column":12},"end":{"line":395,"column":12}}]},"50":{"line":400,"type":"cond-expr","locations":[{"start":{"line":400,"column":30},"end":{"line":400,"column":48}},{"start":{"line":400,"column":51},"end":{"line":400,"column":55}}]},"51":{"line":404,"type":"if","locations":[{"start":{"line":404,"column":20},"end":{"line":404,"column":20}},{"start":{"line":404,"column":20},"end":{"line":404,"column":20}}]},"52":{"line":417,"type":"binary-expr","locations":[{"start":{"line":417,"column":15},"end":{"line":417,"column":29}},{"start":{"line":417,"column":33},"end":{"line":417,"column":45}},{"start":{"line":417,"column":49},"end":{"line":417,"column":59}}]},"53":{"line":428,"type":"binary-expr","locations":[{"start":{"line":428,"column":30},"end":{"line":428,"column":34}},{"start":{"line":428,"column":38},"end":{"line":428,"column":43}}]},"54":{"line":432,"type":"binary-expr","locations":[{"start":{"line":432,"column":30},"end":{"line":432,"column":34}},{"start":{"line":432,"column":38},"end":{"line":432,"column":43}}]},"55":{"line":435,"type":"if","locations":[{"start":{"line":435,"column":4},"end":{"line":435,"column":4}},{"start":{"line":435,"column":4},"end":{"line":435,"column":4}}]},"56":{"line":435,"type":"binary-expr","locations":[{"start":{"line":435,"column":8},"end":{"line":435,"column":9}},{"start":{"line":435,"column":13},"end":{"line":435,"column":28}}]},"57":{"line":442,"type":"if","locations":[{"start":{"line":442,"column":8},"end":{"line":442,"column":8}},{"start":{"line":442,"column":8},"end":{"line":442,"column":8}}]},"58":{"line":470,"type":"cond-expr","locations":[{"start":{"line":470,"column":44},"end":{"line":470,"column":54}},{"start":{"line":475,"column":8},"end":{"line":483,"column":9}}]},"59":{"line":476,"type":"if","locations":[{"start":{"line":476,"column":12},"end":{"line":476,"column":12}},{"start":{"line":476,"column":12},"end":{"line":476,"column":12}}]},"60":{"line":496,"type":"binary-expr","locations":[{"start":{"line":496,"column":18},"end":{"line":496,"column":22}},{"start":{"line":496,"column":26},"end":{"line":496,"column":53}},{"start":{"line":497,"column":18},"end":{"line":497,"column":31}},{"start":{"line":497,"column":36},"end":{"line":497,"column":56}}]},"61":{"line":519,"type":"if","locations":[{"start":{"line":519,"column":8},"end":{"line":519,"column":8}},{"start":{"line":519,"column":8},"end":{"line":519,"column":8}}]},"62":{"line":519,"type":"binary-expr","locations":[{"start":{"line":519,"column":12},"end":{"line":519,"column":15}},{"start":{"line":519,"column":19},"end":{"line":519,"column":32}}]},"63":{"line":521,"type":"if","locations":[{"start":{"line":521,"column":12},"end":{"line":521,"column":12}},{"start":{"line":521,"column":12},"end":{"line":521,"column":12}}]}},"code":["(function () { YUI.add('stylesheet', function (Y, NAME) {","","/**"," * The StyleSheet component is a module for creating and modifying CSS"," * stylesheets."," *"," * @module stylesheet"," */","var d = Y.config.doc,"," p = d.createElement('p'), // Have to hold the node (see notes)"," workerStyle = p.style, // worker style collection"," isString = Y.Lang.isString,"," selectors = {},"," sheets = {},"," floatAttr = ('cssFloat' in workerStyle) ? 'cssFloat' : 'styleFloat',"," _toCssText,"," _unsetOpacity,"," _unsetProperty,"," OPACITY = 'opacity',"," FLOAT = 'float',"," EMPTY = '';","","// Normalizes the removal of an assigned style for opacity. IE uses the filter","// property.","_unsetOpacity = (OPACITY in workerStyle) ?"," function (style) { style.opacity = EMPTY; } :"," function (style) { style.filter = EMPTY; };","","// Normalizes the removal of an assigned style for a given property. Expands","// shortcut properties if necessary and handles the various names for the float","// property.","workerStyle.border = \"1px solid red\";","workerStyle.border = EMPTY; // IE doesn't unset child properties","_unsetProperty = workerStyle.borderLeft ?"," function (style,prop) {"," var p;"," if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) {"," prop = floatAttr;"," }"," if (isString(style[prop])) {"," switch (prop) {"," case OPACITY:"," case 'filter' : _unsetOpacity(style); break;"," case 'font' :"," style.font = style.fontStyle = style.fontVariant ="," style.fontWeight = style.fontSize = style.lineHeight ="," style.fontFamily = EMPTY;"," break;"," default :"," for (p in style) {"," if (p.indexOf(prop) === 0) {"," style[p] = EMPTY;"," }"," }"," }"," }"," } :"," function (style,prop) {"," if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) {"," prop = floatAttr;"," }"," if (isString(style[prop])) {"," if (prop === OPACITY) {"," _unsetOpacity(style);"," } else {"," style[prop] = EMPTY;"," }"," }"," };","","/**"," * Create an instance of StyleSheet to encapsulate a css stylesheet."," * The constructor can be called using function or constructor syntax."," *
var sheet = Y.StyleSheet(..);
"," * or"," *
var sheet = new Y.StyleSheet(..);
"," *"," * The first parameter passed can be any of the following things:"," *
    "," *
  • The desired string name to register a new empty sheet
  • "," *
  • The string name of an existing StyleSheet instance
  • "," *
  • The unique guid generated for an existing StyleSheet instance
  • "," *
  • The id of an existing <link> or <style> node
  • "," *
  • The node reference for an existing <link> or <style> node
  • "," *
  • The Y.Node instance wrapping an existing <link> or <style> node
  • "," *
  • A chunk of css text to create a new stylesheet from
  • "," *
"," *"," *

If a string is passed, StyleSheet will first look in its static name"," * registry for an existing sheet, then in the DOM for an element with that id."," * If neither are found and the string contains the { character, it will be"," * used as a the initial cssText for a new StyleSheet. Otherwise, a new empty"," * StyleSheet is created, assigned the string value as a name, and registered"," * statically by that name.

"," *"," *

The optional second parameter is a string name to register the sheet as."," * This param is largely useful when providing a node id/ref or chunk of css"," * text to create a populated instance.

"," *"," * @class StyleSheet"," * @constructor"," * @param seed {String|HTMLElement|Node} a style or link node, its id, or a"," * name or guid of a StyleSheet, or a string of css text"," * @param name {String} (optional) name to register instance for future static"," * access"," */","function StyleSheet(seed, name) {"," var head,"," node,"," sheet,"," cssRules = {},"," _rules,"," _insertRule,"," _deleteRule,"," i,r,sel;",""," // Factory or constructor"," if (!(Y.instanceOf(this, StyleSheet))) {"," return new StyleSheet(seed,name);"," }",""," // Extract the DOM node from Node instances"," if (seed) {"," if (Y.Node && seed instanceof Y.Node) {"," node = seed._node;"," } else if (seed.nodeName) {"," node = seed;"," // capture the DOM node if the string is an id"," } else if (isString(seed)) {"," if (seed && sheets[seed]) {"," return sheets[seed];"," }"," node = d.getElementById(seed.replace(/^#/,EMPTY));"," }",""," // Check for the StyleSheet in the static registry"," if (node && sheets[Y.stamp(node)]) {"," return sheets[Y.stamp(node)];"," }"," }","",""," // Create a style node if necessary"," if (!node || !/^(?:style|link)$/i.test(node.nodeName)) {"," node = d.createElement('style');"," node.type = 'text/css';"," }",""," if (isString(seed)) {"," // Create entire sheet from seed cssText"," if (seed.indexOf('{') != -1) {"," // Not a load-time fork because low run-time impact and IE fails"," // test for s.styleSheet at page load time (oddly)"," if (node.styleSheet) {"," node.styleSheet.cssText = seed;"," } else {"," node.appendChild(d.createTextNode(seed));"," }"," } else if (!name) {"," name = seed;"," }"," }",""," // Make sure the node is attached to the appropriate head element"," if (!node.parentNode || node.parentNode.nodeName.toLowerCase() !== 'head') {"," head = (node.ownerDocument || d).getElementsByTagName('head')[0];"," // styleSheet isn't available on the style node in FF2 until appended"," // to the head element. style nodes appended to body do not affect"," // change in Safari."," head.appendChild(node);"," }",""," // Begin setting up private aliases to the important moving parts"," // 1. The stylesheet object"," // IE stores StyleSheet under the \"styleSheet\" property"," // Safari doesn't populate sheet for xdomain link elements"," sheet = node.sheet || node.styleSheet;",""," // 2. The style rules collection"," // IE stores the rules collection under the \"rules\" property"," _rules = sheet && ('cssRules' in sheet) ? 'cssRules' : 'rules';",""," // 3. The method to remove a rule from the stylesheet"," // IE supports removeRule"," _deleteRule = ('deleteRule' in sheet) ?"," function (i) { sheet.deleteRule(i); } :"," function (i) { sheet.removeRule(i); };",""," // 4. The method to add a new rule to the stylesheet"," // IE supports addRule with different signature"," _insertRule = ('insertRule' in sheet) ?"," function (sel,css,i) { sheet.insertRule(sel+' {'+css+'}',i); } :"," function (sel,css,i) { sheet.addRule(sel,css,i); };",""," // 5. Initialize the cssRules map from the node"," // xdomain link nodes forbid access to the cssRules collection, so this"," // will throw an error."," // TODO: research alternate stylesheet, @media"," for (i = sheet[_rules].length - 1; i >= 0; --i) {"," r = sheet[_rules][i];"," sel = r.selectorText;",""," if (cssRules[sel]) {"," cssRules[sel].style.cssText += ';' + r.style.cssText;"," _deleteRule(i);"," } else {"," cssRules[sel] = r;"," }"," }",""," // Cache the instance by the generated Id"," StyleSheet.register(Y.stamp(node),this);",""," // Register the instance by name if provided or defaulted from seed"," if (name) {"," StyleSheet.register(name,this);"," }",""," // Public API"," Y.mix(this,{"," /**"," * Get the unique stamp for this StyleSheet instance"," *"," * @method getId"," * @return {Number} the static id"," */"," getId : function () { return Y.stamp(node); },",""," /**"," * Enable all the rules in the sheet"," *"," * @method enable"," * @return {StyleSheet}"," * @chainable"," */"," enable : function () { sheet.disabled = false; return this; },",""," /**"," * Disable all the rules in the sheet. Rules may be changed while the"," * StyleSheet is disabled."," *"," * @method disable"," * @return {StyleSheet}"," * @chainable"," */"," disable : function () { sheet.disabled = true; return this; },",""," /**"," * Returns false if the StyleSheet is disabled. Otherwise true."," *"," * @method isEnabled"," * @return {Boolean}"," */"," isEnabled : function () { return !sheet.disabled; },",""," /**"," *

Set style properties for a provided selector string."," * If the selector includes commas, it will be split into individual"," * selectors and applied accordingly. If the selector string does not"," * have a corresponding rule in the sheet, it will be added.

"," *"," *

The object properties in the second parameter must be the JavaScript"," * names of style properties. E.g. fontSize rather than font-size.

"," *"," *

The float style property will be set by any of "float","," * "styleFloat", or "cssFloat".

"," *"," * @method set"," * @param sel {String} the selector string to apply the changes to"," * @param css {Object} Object literal of style properties and new values"," * @return {StyleSheet}"," * @chainable"," */"," set : function (sel,css) {"," var rule = cssRules[sel],"," multi = sel.split(/\\s*,\\s*/),i,"," idx;",""," // IE's addRule doesn't support multiple comma delimited selectors"," if (multi.length > 1) {"," for (i = multi.length - 1; i >= 0; --i) {"," this.set(multi[i], css);"," }"," return this;"," }",""," // Some selector values can cause IE to hang"," if (!StyleSheet.isValidSelector(sel)) {"," return this;"," }",""," // Opera throws an error if there's a syntax error in assigned"," // cssText. Avoid this using a worker style collection, then"," // assigning the resulting cssText."," if (rule) {"," rule.style.cssText = StyleSheet.toCssText(css,rule.style.cssText);"," } else {"," idx = sheet[_rules].length;"," css = StyleSheet.toCssText(css);",""," // IE throws an error when attempting to addRule(sel,'',n)"," // which would crop up if no, or only invalid values are used"," if (css) {"," _insertRule(sel, css, idx);",""," // Safari replaces the rules collection, but maintains the"," // rule instances in the new collection when rules are"," // added/removed"," cssRules[sel] = sheet[_rules][idx];"," }"," }"," return this;"," },",""," /**"," *

Unset style properties for a provided selector string, removing"," * their effect from the style cascade.

"," *"," *

If the selector includes commas, it will be split into individual"," * selectors and applied accordingly. If there are no properties"," * remaining in the rule after unsetting, the rule is removed.

"," *"," *

The style property or properties in the second parameter must be the"," * JavaScript style property names. E.g. fontSize rather than font-size.

"," *"," *

The float style property will be unset by any of "float","," * "styleFloat", or "cssFloat".

"," *"," * @method unset"," * @param sel {String} the selector string to apply the changes to"," * @param css {String|Array} style property name or Array of names"," * @return {StyleSheet}"," * @chainable"," */"," unset : function (sel,css) {"," var rule = cssRules[sel],"," multi = sel.split(/\\s*,\\s*/),"," remove = !css,"," rules, i;",""," // IE's addRule doesn't support multiple comma delimited selectors"," // so rules are mapped internally by atomic selectors"," if (multi.length > 1) {"," for (i = multi.length - 1; i >= 0; --i) {"," this.unset(multi[i], css);"," }"," return this;"," }",""," if (rule) {"," if (!remove) {"," css = Y.Array(css);",""," workerStyle.cssText = rule.style.cssText;"," for (i = css.length - 1; i >= 0; --i) {"," _unsetProperty(workerStyle,css[i]);"," }",""," if (workerStyle.cssText) {"," rule.style.cssText = workerStyle.cssText;"," } else {"," remove = true;"," }"," }",""," if (remove) { // remove the rule altogether"," rules = sheet[_rules];"," for (i = rules.length - 1; i >= 0; --i) {"," if (rules[i] === rule) {"," delete cssRules[sel];"," _deleteRule(i);"," break;"," }"," }"," }"," }"," return this;"," },",""," /**"," * Get the current cssText for a rule or the entire sheet. If the"," * selector param is supplied, only the cssText for that rule will be"," * returned, if found. If the selector string targets multiple"," * selectors separated by commas, the cssText of the first rule only"," * will be returned. If no selector string, the stylesheet's full"," * cssText will be returned."," *"," * @method getCssText"," * @param sel {String} Selector string"," * @return {String}"," */"," getCssText : function (sel) {"," var rule, css, selector;",""," if (isString(sel)) {"," // IE's addRule doesn't support multiple comma delimited"," // selectors so rules are mapped internally by atomic selectors"," rule = cssRules[sel.split(/\\s*,\\s*/)[0]];",""," return rule ? rule.style.cssText : null;"," } else {"," css = [];"," for (selector in cssRules) {"," if (cssRules.hasOwnProperty(selector)) {"," rule = cssRules[selector];"," css.push(rule.selectorText+\" {\"+rule.style.cssText+\"}\");"," }"," }"," return css.join(\"\\n\");"," }"," }"," });","","}","","_toCssText = function (css,base) {"," var f = css.styleFloat || css.cssFloat || css[FLOAT],"," trim = Y.Lang.trim,"," prop;",""," // A very difficult to repro/isolate IE 9 beta (and Platform Preview 7) bug"," // was reduced to this line throwing the error:"," // \"Invalid this pointer used as target for method call\""," // It appears that the style collection is corrupted. The error is"," // catchable, so in a best effort to work around it, replace the"," // p and workerStyle and try the assignment again."," try {"," workerStyle.cssText = base || EMPTY;"," } catch (e) {"," p = d.createElement('p');"," workerStyle = p.style;"," workerStyle.cssText = base || EMPTY;"," }",""," if (f && !css[floatAttr]) {"," css = Y.merge(css);"," delete css.styleFloat; delete css.cssFloat; delete css[FLOAT];"," css[floatAttr] = f;"," }",""," for (prop in css) {"," if (css.hasOwnProperty(prop)) {"," try {"," // IE throws Invalid Value errors and doesn't like whitespace"," // in values ala ' red' or 'red '"," workerStyle[prop] = trim(css[prop]);"," }"," catch (ex) {"," }"," }"," }"," return workerStyle.cssText;","};","","Y.mix(StyleSheet, {"," /**"," *

Converts an object literal of style properties and values into a string"," * of css text. This can then be assigned to el.style.cssText.

"," *"," *

The optional second parameter is a cssText string representing the"," * starting state of the style prior to alterations. This is most often"," * extracted from the eventual target's current el.style.cssText.

"," *"," * @method toCssText"," * @param css {Object} object literal of style properties and values"," * @param cssText {String} (optional) starting cssText value"," * @return {String} the resulting cssText string"," * @static"," */"," toCssText : ((OPACITY in workerStyle) ? _toCssText :"," // Wrap IE's toCssText to catch opacity. The copy/merge is to preserve"," // the input object's integrity, but if float and opacity are set, the"," // input will be copied twice in IE. Is there a way to avoid this"," // without increasing the byte count?"," function (css, cssText) {"," if (OPACITY in css) {"," css = Y.merge(css,{"," filter: 'alpha(opacity='+(css.opacity*100)+')'"," });"," delete css.opacity;"," }"," return _toCssText(css,cssText);"," }),",""," /**"," * Registers a StyleSheet instance in the static registry by the given name"," *"," * @method register"," * @param name {String} the name to assign the StyleSheet in the registry"," * @param sheet {StyleSheet} The StyleSheet instance"," * @return {Boolean} false if no name or sheet is not a StyleSheet"," * instance. true otherwise."," * @static"," */"," register : function (name,sheet) {"," return !!(name && sheet instanceof StyleSheet &&"," !sheets[name] && (sheets[name] = sheet));"," },",""," /**"," *

Determines if a selector string is safe to use. Used internally"," * in set to prevent IE from locking up when attempting to add a rule for a"," * "bad selector".

"," *"," *

Bad selectors are considered to be any string containing unescaped"," * `~!@$%^&()+=|{}[];'\"?< or space. Also forbidden are . or # followed by"," * anything other than an alphanumeric. Additionally -abc or .-abc or"," * #_abc or '# ' all fail. There are likely more failure cases, so"," * please file a bug if you encounter one.

"," *"," * @method isValidSelector"," * @param sel {String} the selector string"," * @return {Boolean}"," * @static"," */"," isValidSelector : function (sel) {"," var valid = false;",""," if (sel && isString(sel)) {",""," if (!selectors.hasOwnProperty(sel)) {"," // TEST: there should be nothing but white-space left after"," // these destructive regexs"," selectors[sel] = !/\\S/.test("," // combinators"," sel.replace(/\\s+|\\s*[+~>]\\s*/g,' ')."," // attribute selectors (contents not validated)"," replace(/([^ ])\\[.*?\\]/g,'$1')."," // pseudo-class|element selectors (contents of parens"," // such as :nth-of-type(2) or :not(...) not validated)"," replace(/([^ ])::?[a-z][a-z\\-]+[a-z](?:\\(.*?\\))?/ig,'$1')."," // element tags"," replace(/(?:^| )[a-z0-6]+/ig,' ')."," // escaped characters"," replace(/\\\\./g,EMPTY)."," // class and id identifiers"," replace(/[.#]\\w[\\w\\-]*/g,EMPTY));"," }",""," valid = selectors[sel];"," }",""," return valid;"," }","},true);","","Y.StyleSheet = StyleSheet;","","/*","","NOTES"," * Style node must be added to the head element. Safari does not honor styles"," applied to StyleSheet objects on style nodes in the body."," * StyleSheet object is created on the style node when the style node is added"," to the head element in Firefox 2 (and maybe 3?)"," * The cssRules collection is replaced after insertRule/deleteRule calls in"," Safari 3.1. Existing Rules are used in the new collection, so the collection"," cannot be cached, but the rules can be."," * Opera requires that the index be passed with insertRule."," * Same-domain restrictions prevent modifying StyleSheet objects attached to"," link elements with remote href (or \"about:blank\" or \"javascript:false\")"," * Same-domain restrictions prevent reading StyleSheet cssRules/rules"," collection of link elements with remote href (or \"about:blank\" or"," \"javascript:false\")"," * Same-domain restrictions result in Safari not populating node.sheet property"," for link elements with remote href (et.al)"," * IE names StyleSheet related properties and methods differently (see code)"," * IE converts tag names to upper case in the Rule's selectorText"," * IE converts empty string assignment to complex properties to value settings"," for all child properties. E.g. style.background = '' sets non-'' values on"," style.backgroundPosition, style.backgroundColor, etc. All else clear"," style.background and all child properties."," * IE assignment style.filter = '' will result in style.cssText == 'FILTER:'"," * All browsers support Rule.style.cssText as a read/write property, leaving"," only opacity needing to be accounted for."," * Benchmarks of style.property = value vs style.cssText += 'property: value'"," indicate cssText is slightly slower for single property assignment. For"," multiple property assignment, cssText speed stays relatively the same where"," style.property speed decreases linearly by the number of properties set."," Exception being Opera 9.27, where style.property is always faster than"," style.cssText."," * Opera 9.5b throws a syntax error when assigning cssText with a syntax error."," * Opera 9.5 doesn't honor rule.style.cssText = ''. Previous style persists."," You have to remove the rule altogether."," * Stylesheet properties set with !important will trump inline style set on an"," element or in el.style.property."," * Creating a worker style collection like document.createElement('p').style;"," will fail after a time in FF (~5secs of inactivity). Property assignments"," will not alter the property or cssText. It may be the generated node is"," garbage collected and the style collection becomes inert (speculation)."," * IE locks up when attempting to add a rule with a selector including at least"," characters {[]}~`!@%^&*()+=|? (unescaped) and leading _ or -"," such as addRule('-foo','{ color: red }') or addRule('._abc','{...}')"," * IE's addRule doesn't support comma separated selectors such as"," addRule('.foo, .bar','{..}')"," * IE throws an error on valid values with leading/trailing white space."," * When creating an entire sheet at once, only FF2/3 & Opera allow creating a"," style node, setting its innerHTML and appending to head."," * When creating an entire sheet at once, Safari requires the style node to be"," created with content in innerHTML of another element."," * When creating an entire sheet at once, IE requires the style node content to"," be set via node.styleSheet.cssText"," * When creating an entire sheet at once in IE, styleSheet.cssText can't be"," written until node.type = 'text/css'; is performed."," * When creating an entire sheet at once in IE, load-time fork on"," var styleNode = d.createElement('style'); _method = styleNode.styleSheet ?.."," fails (falsey). During run-time, the test for .styleSheet works fine"," * Setting complex properties in cssText will SOMETIMES allow child properties"," to be unset"," set unset FF2 FF3 S3.1 IE6 IE7 Op9.27 Op9.5"," ---------- ----------------- --- --- ---- --- --- ------ -----"," border -top NO NO YES YES YES YES YES"," -top-color NO NO YES YES YES"," -color NO NO NO NO NO"," background -color NO NO YES YES YES"," -position NO NO YES YES YES"," -position-x NO NO NO NO NO"," font line-height YES YES NO NO NO NO YES"," -style YES YES NO YES YES"," -size YES YES NO YES YES"," -size-adjust ??? ??? n/a n/a n/a ??? ???"," padding -top NO NO YES YES YES"," margin -top NO NO YES YES YES"," list-style -type YES YES YES YES YES"," -position YES YES YES YES YES"," overflow -x NO NO YES n/a YES",""," ??? - unsetting font-size-adjust has the same effect as unsetting font-size"," * FireFox and WebKit populate rule.cssText as \"SELECTOR { CSSTEXT }\", but"," Opera and IE do not."," * IE6 and IE7 silently ignore the { and } if passed into addRule('.foo','{"," color:#000}',0). IE8 does not and creates an empty rule."," * IE6-8 addRule('.foo','',n) throws an error. Must supply *some* cssText","*/","","","","}, '3.17.2', {\"requires\": [\"yui-base\"]});","","}());"]}; +} +var __cov_rcVbjLUekBYscC_iqj5R5w = __coverage__['build/stylesheet/stylesheet.js']; +__cov_rcVbjLUekBYscC_iqj5R5w.s['1']++;YUI.add('stylesheet',function(Y,NAME){__cov_rcVbjLUekBYscC_iqj5R5w.f['1']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['2']++;var d=Y.config.doc,p=d.createElement('p'),workerStyle=p.style,isString=Y.Lang.isString,selectors={},sheets={},floatAttr='cssFloat'in workerStyle?(__cov_rcVbjLUekBYscC_iqj5R5w.b['1'][0]++,'cssFloat'):(__cov_rcVbjLUekBYscC_iqj5R5w.b['1'][1]++,'styleFloat'),_toCssText,_unsetOpacity,_unsetProperty,OPACITY='opacity',FLOAT='float',EMPTY='';__cov_rcVbjLUekBYscC_iqj5R5w.s['3']++;_unsetOpacity=OPACITY in workerStyle?(__cov_rcVbjLUekBYscC_iqj5R5w.b['2'][0]++,function(style){__cov_rcVbjLUekBYscC_iqj5R5w.f['2']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['4']++;style.opacity=EMPTY;}):(__cov_rcVbjLUekBYscC_iqj5R5w.b['2'][1]++,function(style){__cov_rcVbjLUekBYscC_iqj5R5w.f['3']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['5']++;style.filter=EMPTY;});__cov_rcVbjLUekBYscC_iqj5R5w.s['6']++;workerStyle.border='1px solid red';__cov_rcVbjLUekBYscC_iqj5R5w.s['7']++;workerStyle.border=EMPTY;__cov_rcVbjLUekBYscC_iqj5R5w.s['8']++;_unsetProperty=workerStyle.borderLeft?(__cov_rcVbjLUekBYscC_iqj5R5w.b['3'][0]++,function(style,prop){__cov_rcVbjLUekBYscC_iqj5R5w.f['4']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['9']++;var p;__cov_rcVbjLUekBYscC_iqj5R5w.s['10']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['5'][0]++,prop!==floatAttr)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['5'][1]++,prop.toLowerCase().indexOf(FLOAT)!=-1)){__cov_rcVbjLUekBYscC_iqj5R5w.b['4'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['11']++;prop=floatAttr;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['4'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['12']++;if(isString(style[prop])){__cov_rcVbjLUekBYscC_iqj5R5w.b['6'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['13']++;switch(prop){case OPACITY:__cov_rcVbjLUekBYscC_iqj5R5w.b['7'][0]++;case'filter':__cov_rcVbjLUekBYscC_iqj5R5w.b['7'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['14']++;_unsetOpacity(style);__cov_rcVbjLUekBYscC_iqj5R5w.s['15']++;break;case'font':__cov_rcVbjLUekBYscC_iqj5R5w.b['7'][2]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['16']++;style.font=style.fontStyle=style.fontVariant=style.fontWeight=style.fontSize=style.lineHeight=style.fontFamily=EMPTY;__cov_rcVbjLUekBYscC_iqj5R5w.s['17']++;break;default:__cov_rcVbjLUekBYscC_iqj5R5w.b['7'][3]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['18']++;for(p in style){__cov_rcVbjLUekBYscC_iqj5R5w.s['19']++;if(p.indexOf(prop)===0){__cov_rcVbjLUekBYscC_iqj5R5w.b['8'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['20']++;style[p]=EMPTY;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['8'][1]++;}}}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['6'][1]++;}}):(__cov_rcVbjLUekBYscC_iqj5R5w.b['3'][1]++,function(style,prop){__cov_rcVbjLUekBYscC_iqj5R5w.f['5']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['21']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['10'][0]++,prop!==floatAttr)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['10'][1]++,prop.toLowerCase().indexOf(FLOAT)!=-1)){__cov_rcVbjLUekBYscC_iqj5R5w.b['9'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['22']++;prop=floatAttr;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['9'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['23']++;if(isString(style[prop])){__cov_rcVbjLUekBYscC_iqj5R5w.b['11'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['24']++;if(prop===OPACITY){__cov_rcVbjLUekBYscC_iqj5R5w.b['12'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['25']++;_unsetOpacity(style);}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['12'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['26']++;style[prop]=EMPTY;}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['11'][1]++;}});__cov_rcVbjLUekBYscC_iqj5R5w.s['27']++;function StyleSheet(seed,name){__cov_rcVbjLUekBYscC_iqj5R5w.f['6']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['28']++;var head,node,sheet,cssRules={},_rules,_insertRule,_deleteRule,i,r,sel;__cov_rcVbjLUekBYscC_iqj5R5w.s['29']++;if(!Y.instanceOf(this,StyleSheet)){__cov_rcVbjLUekBYscC_iqj5R5w.b['13'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['30']++;return new StyleSheet(seed,name);}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['13'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['31']++;if(seed){__cov_rcVbjLUekBYscC_iqj5R5w.b['14'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['32']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['16'][0]++,Y.Node)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['16'][1]++,seed instanceof Y.Node)){__cov_rcVbjLUekBYscC_iqj5R5w.b['15'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['33']++;node=seed._node;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['15'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['34']++;if(seed.nodeName){__cov_rcVbjLUekBYscC_iqj5R5w.b['17'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['35']++;node=seed;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['17'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['36']++;if(isString(seed)){__cov_rcVbjLUekBYscC_iqj5R5w.b['18'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['37']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['20'][0]++,seed)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['20'][1]++,sheets[seed])){__cov_rcVbjLUekBYscC_iqj5R5w.b['19'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['38']++;return sheets[seed];}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['19'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['39']++;node=d.getElementById(seed.replace(/^#/,EMPTY));}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['18'][1]++;}}}__cov_rcVbjLUekBYscC_iqj5R5w.s['40']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['22'][0]++,node)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['22'][1]++,sheets[Y.stamp(node)])){__cov_rcVbjLUekBYscC_iqj5R5w.b['21'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['41']++;return sheets[Y.stamp(node)];}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['21'][1]++;}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['14'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['42']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['24'][0]++,!node)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['24'][1]++,!/^(?:style|link)$/i.test(node.nodeName))){__cov_rcVbjLUekBYscC_iqj5R5w.b['23'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['43']++;node=d.createElement('style');__cov_rcVbjLUekBYscC_iqj5R5w.s['44']++;node.type='text/css';}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['23'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['45']++;if(isString(seed)){__cov_rcVbjLUekBYscC_iqj5R5w.b['25'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['46']++;if(seed.indexOf('{')!=-1){__cov_rcVbjLUekBYscC_iqj5R5w.b['26'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['47']++;if(node.styleSheet){__cov_rcVbjLUekBYscC_iqj5R5w.b['27'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['48']++;node.styleSheet.cssText=seed;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['27'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['49']++;node.appendChild(d.createTextNode(seed));}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['26'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['50']++;if(!name){__cov_rcVbjLUekBYscC_iqj5R5w.b['28'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['51']++;name=seed;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['28'][1]++;}}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['25'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['52']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['30'][0]++,!node.parentNode)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['30'][1]++,node.parentNode.nodeName.toLowerCase()!=='head')){__cov_rcVbjLUekBYscC_iqj5R5w.b['29'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['53']++;head=((__cov_rcVbjLUekBYscC_iqj5R5w.b['31'][0]++,node.ownerDocument)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['31'][1]++,d)).getElementsByTagName('head')[0];__cov_rcVbjLUekBYscC_iqj5R5w.s['54']++;head.appendChild(node);}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['29'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['55']++;sheet=(__cov_rcVbjLUekBYscC_iqj5R5w.b['32'][0]++,node.sheet)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['32'][1]++,node.styleSheet);__cov_rcVbjLUekBYscC_iqj5R5w.s['56']++;_rules=(__cov_rcVbjLUekBYscC_iqj5R5w.b['34'][0]++,sheet)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['34'][1]++,'cssRules'in sheet)?(__cov_rcVbjLUekBYscC_iqj5R5w.b['33'][0]++,'cssRules'):(__cov_rcVbjLUekBYscC_iqj5R5w.b['33'][1]++,'rules');__cov_rcVbjLUekBYscC_iqj5R5w.s['57']++;_deleteRule='deleteRule'in sheet?(__cov_rcVbjLUekBYscC_iqj5R5w.b['35'][0]++,function(i){__cov_rcVbjLUekBYscC_iqj5R5w.f['7']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['58']++;sheet.deleteRule(i);}):(__cov_rcVbjLUekBYscC_iqj5R5w.b['35'][1]++,function(i){__cov_rcVbjLUekBYscC_iqj5R5w.f['8']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['59']++;sheet.removeRule(i);});__cov_rcVbjLUekBYscC_iqj5R5w.s['60']++;_insertRule='insertRule'in sheet?(__cov_rcVbjLUekBYscC_iqj5R5w.b['36'][0]++,function(sel,css,i){__cov_rcVbjLUekBYscC_iqj5R5w.f['9']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['61']++;sheet.insertRule(sel+' {'+css+'}',i);}):(__cov_rcVbjLUekBYscC_iqj5R5w.b['36'][1]++,function(sel,css,i){__cov_rcVbjLUekBYscC_iqj5R5w.f['10']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['62']++;sheet.addRule(sel,css,i);});__cov_rcVbjLUekBYscC_iqj5R5w.s['63']++;for(i=sheet[_rules].length-1;i>=0;--i){__cov_rcVbjLUekBYscC_iqj5R5w.s['64']++;r=sheet[_rules][i];__cov_rcVbjLUekBYscC_iqj5R5w.s['65']++;sel=r.selectorText;__cov_rcVbjLUekBYscC_iqj5R5w.s['66']++;if(cssRules[sel]){__cov_rcVbjLUekBYscC_iqj5R5w.b['37'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['67']++;cssRules[sel].style.cssText+=';'+r.style.cssText;__cov_rcVbjLUekBYscC_iqj5R5w.s['68']++;_deleteRule(i);}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['37'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['69']++;cssRules[sel]=r;}}__cov_rcVbjLUekBYscC_iqj5R5w.s['70']++;StyleSheet.register(Y.stamp(node),this);__cov_rcVbjLUekBYscC_iqj5R5w.s['71']++;if(name){__cov_rcVbjLUekBYscC_iqj5R5w.b['38'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['72']++;StyleSheet.register(name,this);}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['38'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['73']++;Y.mix(this,{getId:function(){__cov_rcVbjLUekBYscC_iqj5R5w.f['11']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['74']++;return Y.stamp(node);},enable:function(){__cov_rcVbjLUekBYscC_iqj5R5w.f['12']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['75']++;sheet.disabled=false;__cov_rcVbjLUekBYscC_iqj5R5w.s['76']++;return this;},disable:function(){__cov_rcVbjLUekBYscC_iqj5R5w.f['13']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['77']++;sheet.disabled=true;__cov_rcVbjLUekBYscC_iqj5R5w.s['78']++;return this;},isEnabled:function(){__cov_rcVbjLUekBYscC_iqj5R5w.f['14']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['79']++;return!sheet.disabled;},set:function(sel,css){__cov_rcVbjLUekBYscC_iqj5R5w.f['15']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['80']++;var rule=cssRules[sel],multi=sel.split(/\s*,\s*/),i,idx;__cov_rcVbjLUekBYscC_iqj5R5w.s['81']++;if(multi.length>1){__cov_rcVbjLUekBYscC_iqj5R5w.b['39'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['82']++;for(i=multi.length-1;i>=0;--i){__cov_rcVbjLUekBYscC_iqj5R5w.s['83']++;this.set(multi[i],css);}__cov_rcVbjLUekBYscC_iqj5R5w.s['84']++;return this;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['39'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['85']++;if(!StyleSheet.isValidSelector(sel)){__cov_rcVbjLUekBYscC_iqj5R5w.b['40'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['86']++;return this;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['40'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['87']++;if(rule){__cov_rcVbjLUekBYscC_iqj5R5w.b['41'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['88']++;rule.style.cssText=StyleSheet.toCssText(css,rule.style.cssText);}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['41'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['89']++;idx=sheet[_rules].length;__cov_rcVbjLUekBYscC_iqj5R5w.s['90']++;css=StyleSheet.toCssText(css);__cov_rcVbjLUekBYscC_iqj5R5w.s['91']++;if(css){__cov_rcVbjLUekBYscC_iqj5R5w.b['42'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['92']++;_insertRule(sel,css,idx);__cov_rcVbjLUekBYscC_iqj5R5w.s['93']++;cssRules[sel]=sheet[_rules][idx];}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['42'][1]++;}}__cov_rcVbjLUekBYscC_iqj5R5w.s['94']++;return this;},unset:function(sel,css){__cov_rcVbjLUekBYscC_iqj5R5w.f['16']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['95']++;var rule=cssRules[sel],multi=sel.split(/\s*,\s*/),remove=!css,rules,i;__cov_rcVbjLUekBYscC_iqj5R5w.s['96']++;if(multi.length>1){__cov_rcVbjLUekBYscC_iqj5R5w.b['43'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['97']++;for(i=multi.length-1;i>=0;--i){__cov_rcVbjLUekBYscC_iqj5R5w.s['98']++;this.unset(multi[i],css);}__cov_rcVbjLUekBYscC_iqj5R5w.s['99']++;return this;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['43'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['100']++;if(rule){__cov_rcVbjLUekBYscC_iqj5R5w.b['44'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['101']++;if(!remove){__cov_rcVbjLUekBYscC_iqj5R5w.b['45'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['102']++;css=Y.Array(css);__cov_rcVbjLUekBYscC_iqj5R5w.s['103']++;workerStyle.cssText=rule.style.cssText;__cov_rcVbjLUekBYscC_iqj5R5w.s['104']++;for(i=css.length-1;i>=0;--i){__cov_rcVbjLUekBYscC_iqj5R5w.s['105']++;_unsetProperty(workerStyle,css[i]);}__cov_rcVbjLUekBYscC_iqj5R5w.s['106']++;if(workerStyle.cssText){__cov_rcVbjLUekBYscC_iqj5R5w.b['46'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['107']++;rule.style.cssText=workerStyle.cssText;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['46'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['108']++;remove=true;}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['45'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['109']++;if(remove){__cov_rcVbjLUekBYscC_iqj5R5w.b['47'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['110']++;rules=sheet[_rules];__cov_rcVbjLUekBYscC_iqj5R5w.s['111']++;for(i=rules.length-1;i>=0;--i){__cov_rcVbjLUekBYscC_iqj5R5w.s['112']++;if(rules[i]===rule){__cov_rcVbjLUekBYscC_iqj5R5w.b['48'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['113']++;delete cssRules[sel];__cov_rcVbjLUekBYscC_iqj5R5w.s['114']++;_deleteRule(i);__cov_rcVbjLUekBYscC_iqj5R5w.s['115']++;break;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['48'][1]++;}}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['47'][1]++;}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['44'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['116']++;return this;},getCssText:function(sel){__cov_rcVbjLUekBYscC_iqj5R5w.f['17']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['117']++;var rule,css,selector;__cov_rcVbjLUekBYscC_iqj5R5w.s['118']++;if(isString(sel)){__cov_rcVbjLUekBYscC_iqj5R5w.b['49'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['119']++;rule=cssRules[sel.split(/\s*,\s*/)[0]];__cov_rcVbjLUekBYscC_iqj5R5w.s['120']++;return rule?(__cov_rcVbjLUekBYscC_iqj5R5w.b['50'][0]++,rule.style.cssText):(__cov_rcVbjLUekBYscC_iqj5R5w.b['50'][1]++,null);}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['49'][1]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['121']++;css=[];__cov_rcVbjLUekBYscC_iqj5R5w.s['122']++;for(selector in cssRules){__cov_rcVbjLUekBYscC_iqj5R5w.s['123']++;if(cssRules.hasOwnProperty(selector)){__cov_rcVbjLUekBYscC_iqj5R5w.b['51'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['124']++;rule=cssRules[selector];__cov_rcVbjLUekBYscC_iqj5R5w.s['125']++;css.push(rule.selectorText+' {'+rule.style.cssText+'}');}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['51'][1]++;}}__cov_rcVbjLUekBYscC_iqj5R5w.s['126']++;return css.join('\n');}}});}__cov_rcVbjLUekBYscC_iqj5R5w.s['127']++;_toCssText=function(css,base){__cov_rcVbjLUekBYscC_iqj5R5w.f['18']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['128']++;var f=(__cov_rcVbjLUekBYscC_iqj5R5w.b['52'][0]++,css.styleFloat)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['52'][1]++,css.cssFloat)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['52'][2]++,css[FLOAT]),trim=Y.Lang.trim,prop;__cov_rcVbjLUekBYscC_iqj5R5w.s['129']++;try{__cov_rcVbjLUekBYscC_iqj5R5w.s['130']++;workerStyle.cssText=(__cov_rcVbjLUekBYscC_iqj5R5w.b['53'][0]++,base)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['53'][1]++,EMPTY);}catch(e){__cov_rcVbjLUekBYscC_iqj5R5w.s['131']++;p=d.createElement('p');__cov_rcVbjLUekBYscC_iqj5R5w.s['132']++;workerStyle=p.style;__cov_rcVbjLUekBYscC_iqj5R5w.s['133']++;workerStyle.cssText=(__cov_rcVbjLUekBYscC_iqj5R5w.b['54'][0]++,base)||(__cov_rcVbjLUekBYscC_iqj5R5w.b['54'][1]++,EMPTY);}__cov_rcVbjLUekBYscC_iqj5R5w.s['134']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['56'][0]++,f)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['56'][1]++,!css[floatAttr])){__cov_rcVbjLUekBYscC_iqj5R5w.b['55'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['135']++;css=Y.merge(css);__cov_rcVbjLUekBYscC_iqj5R5w.s['136']++;delete css.styleFloat;__cov_rcVbjLUekBYscC_iqj5R5w.s['137']++;delete css.cssFloat;__cov_rcVbjLUekBYscC_iqj5R5w.s['138']++;delete css[FLOAT];__cov_rcVbjLUekBYscC_iqj5R5w.s['139']++;css[floatAttr]=f;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['55'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['140']++;for(prop in css){__cov_rcVbjLUekBYscC_iqj5R5w.s['141']++;if(css.hasOwnProperty(prop)){__cov_rcVbjLUekBYscC_iqj5R5w.b['57'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['142']++;try{__cov_rcVbjLUekBYscC_iqj5R5w.s['143']++;workerStyle[prop]=trim(css[prop]);}catch(ex){}}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['57'][1]++;}}__cov_rcVbjLUekBYscC_iqj5R5w.s['144']++;return workerStyle.cssText;};__cov_rcVbjLUekBYscC_iqj5R5w.s['145']++;Y.mix(StyleSheet,{toCssText:OPACITY in workerStyle?(__cov_rcVbjLUekBYscC_iqj5R5w.b['58'][0]++,_toCssText):(__cov_rcVbjLUekBYscC_iqj5R5w.b['58'][1]++,function(css,cssText){__cov_rcVbjLUekBYscC_iqj5R5w.f['19']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['146']++;if(OPACITY in css){__cov_rcVbjLUekBYscC_iqj5R5w.b['59'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['147']++;css=Y.merge(css,{filter:'alpha(opacity='+css.opacity*100+')'});__cov_rcVbjLUekBYscC_iqj5R5w.s['148']++;delete css.opacity;}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['59'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['149']++;return _toCssText(css,cssText);}),register:function(name,sheet){__cov_rcVbjLUekBYscC_iqj5R5w.f['20']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['150']++;return!!((__cov_rcVbjLUekBYscC_iqj5R5w.b['60'][0]++,name)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['60'][1]++,sheet instanceof StyleSheet)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['60'][2]++,!sheets[name])&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['60'][3]++,sheets[name]=sheet));},isValidSelector:function(sel){__cov_rcVbjLUekBYscC_iqj5R5w.f['21']++;__cov_rcVbjLUekBYscC_iqj5R5w.s['151']++;var valid=false;__cov_rcVbjLUekBYscC_iqj5R5w.s['152']++;if((__cov_rcVbjLUekBYscC_iqj5R5w.b['62'][0]++,sel)&&(__cov_rcVbjLUekBYscC_iqj5R5w.b['62'][1]++,isString(sel))){__cov_rcVbjLUekBYscC_iqj5R5w.b['61'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['153']++;if(!selectors.hasOwnProperty(sel)){__cov_rcVbjLUekBYscC_iqj5R5w.b['63'][0]++;__cov_rcVbjLUekBYscC_iqj5R5w.s['154']++;selectors[sel]=!/\S/.test(sel.replace(/\s+|\s*[+~>]\s*/g,' ').replace(/([^ ])\[.*?\]/g,'$1').replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/gi,'$1').replace(/(?:^| )[a-z0-6]+/gi,' ').replace(/\\./g,EMPTY).replace(/[.#]\w[\w\-]*/g,EMPTY));}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['63'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['155']++;valid=selectors[sel];}else{__cov_rcVbjLUekBYscC_iqj5R5w.b['61'][1]++;}__cov_rcVbjLUekBYscC_iqj5R5w.s['156']++;return valid;}},true);__cov_rcVbjLUekBYscC_iqj5R5w.s['157']++;Y.StyleSheet=StyleSheet;},'3.17.2',{'requires':['yui-base']}); diff --git a/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-debug.js b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-debug.js new file mode 100644 index 0000000..04fb49b --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-debug.js @@ -0,0 +1,649 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('stylesheet', function (Y, NAME) { + +/** + * The StyleSheet component is a module for creating and modifying CSS + * stylesheets. + * + * @module stylesheet + */ +var d = Y.config.doc, + p = d.createElement('p'), // Have to hold the node (see notes) + workerStyle = p.style, // worker style collection + isString = Y.Lang.isString, + selectors = {}, + sheets = {}, + floatAttr = ('cssFloat' in workerStyle) ? 'cssFloat' : 'styleFloat', + _toCssText, + _unsetOpacity, + _unsetProperty, + OPACITY = 'opacity', + FLOAT = 'float', + EMPTY = ''; + +// Normalizes the removal of an assigned style for opacity. IE uses the filter +// property. +_unsetOpacity = (OPACITY in workerStyle) ? + function (style) { style.opacity = EMPTY; } : + function (style) { style.filter = EMPTY; }; + +// Normalizes the removal of an assigned style for a given property. Expands +// shortcut properties if necessary and handles the various names for the float +// property. +workerStyle.border = "1px solid red"; +workerStyle.border = EMPTY; // IE doesn't unset child properties +_unsetProperty = workerStyle.borderLeft ? + function (style,prop) { + var p; + if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) { + prop = floatAttr; + } + if (isString(style[prop])) { + switch (prop) { + case OPACITY: + case 'filter' : _unsetOpacity(style); break; + case 'font' : + style.font = style.fontStyle = style.fontVariant = + style.fontWeight = style.fontSize = style.lineHeight = + style.fontFamily = EMPTY; + break; + default : + for (p in style) { + if (p.indexOf(prop) === 0) { + style[p] = EMPTY; + } + } + } + } + } : + function (style,prop) { + if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) { + prop = floatAttr; + } + if (isString(style[prop])) { + if (prop === OPACITY) { + _unsetOpacity(style); + } else { + style[prop] = EMPTY; + } + } + }; + +/** + * Create an instance of StyleSheet to encapsulate a css stylesheet. + * The constructor can be called using function or constructor syntax. + *
var sheet = Y.StyleSheet(..);
+ * or + *
var sheet = new Y.StyleSheet(..);
+ * + * The first parameter passed can be any of the following things: + *
    + *
  • The desired string name to register a new empty sheet
  • + *
  • The string name of an existing StyleSheet instance
  • + *
  • The unique guid generated for an existing StyleSheet instance
  • + *
  • The id of an existing <link> or <style> node
  • + *
  • The node reference for an existing <link> or <style> node
  • + *
  • The Y.Node instance wrapping an existing <link> or <style> node
  • + *
  • A chunk of css text to create a new stylesheet from
  • + *
+ * + *

If a string is passed, StyleSheet will first look in its static name + * registry for an existing sheet, then in the DOM for an element with that id. + * If neither are found and the string contains the { character, it will be + * used as a the initial cssText for a new StyleSheet. Otherwise, a new empty + * StyleSheet is created, assigned the string value as a name, and registered + * statically by that name.

+ * + *

The optional second parameter is a string name to register the sheet as. + * This param is largely useful when providing a node id/ref or chunk of css + * text to create a populated instance.

+ * + * @class StyleSheet + * @constructor + * @param seed {String|HTMLElement|Node} a style or link node, its id, or a + * name or guid of a StyleSheet, or a string of css text + * @param name {String} (optional) name to register instance for future static + * access + */ +function StyleSheet(seed, name) { + var head, + node, + sheet, + cssRules = {}, + _rules, + _insertRule, + _deleteRule, + i,r,sel; + + // Factory or constructor + if (!(Y.instanceOf(this, StyleSheet))) { + return new StyleSheet(seed,name); + } + + // Extract the DOM node from Node instances + if (seed) { + if (Y.Node && seed instanceof Y.Node) { + node = seed._node; + } else if (seed.nodeName) { + node = seed; + // capture the DOM node if the string is an id + } else if (isString(seed)) { + if (seed && sheets[seed]) { + return sheets[seed]; + } + node = d.getElementById(seed.replace(/^#/,EMPTY)); + } + + // Check for the StyleSheet in the static registry + if (node && sheets[Y.stamp(node)]) { + return sheets[Y.stamp(node)]; + } + } + + + // Create a style node if necessary + if (!node || !/^(?:style|link)$/i.test(node.nodeName)) { + node = d.createElement('style'); + node.type = 'text/css'; + } + + if (isString(seed)) { + // Create entire sheet from seed cssText + if (seed.indexOf('{') != -1) { + // Not a load-time fork because low run-time impact and IE fails + // test for s.styleSheet at page load time (oddly) + if (node.styleSheet) { + node.styleSheet.cssText = seed; + } else { + node.appendChild(d.createTextNode(seed)); + } + } else if (!name) { + name = seed; + } + } + + // Make sure the node is attached to the appropriate head element + if (!node.parentNode || node.parentNode.nodeName.toLowerCase() !== 'head') { + head = (node.ownerDocument || d).getElementsByTagName('head')[0]; + // styleSheet isn't available on the style node in FF2 until appended + // to the head element. style nodes appended to body do not affect + // change in Safari. + head.appendChild(node); + } + + // Begin setting up private aliases to the important moving parts + // 1. The stylesheet object + // IE stores StyleSheet under the "styleSheet" property + // Safari doesn't populate sheet for xdomain link elements + sheet = node.sheet || node.styleSheet; + + // 2. The style rules collection + // IE stores the rules collection under the "rules" property + _rules = sheet && ('cssRules' in sheet) ? 'cssRules' : 'rules'; + + // 3. The method to remove a rule from the stylesheet + // IE supports removeRule + _deleteRule = ('deleteRule' in sheet) ? + function (i) { sheet.deleteRule(i); } : + function (i) { sheet.removeRule(i); }; + + // 4. The method to add a new rule to the stylesheet + // IE supports addRule with different signature + _insertRule = ('insertRule' in sheet) ? + function (sel,css,i) { sheet.insertRule(sel+' {'+css+'}',i); } : + function (sel,css,i) { sheet.addRule(sel,css,i); }; + + // 5. Initialize the cssRules map from the node + // xdomain link nodes forbid access to the cssRules collection, so this + // will throw an error. + // TODO: research alternate stylesheet, @media + for (i = sheet[_rules].length - 1; i >= 0; --i) { + r = sheet[_rules][i]; + sel = r.selectorText; + + if (cssRules[sel]) { + cssRules[sel].style.cssText += ';' + r.style.cssText; + _deleteRule(i); + } else { + cssRules[sel] = r; + } + } + + // Cache the instance by the generated Id + StyleSheet.register(Y.stamp(node),this); + + // Register the instance by name if provided or defaulted from seed + if (name) { + StyleSheet.register(name,this); + } + + // Public API + Y.mix(this,{ + /** + * Get the unique stamp for this StyleSheet instance + * + * @method getId + * @return {Number} the static id + */ + getId : function () { return Y.stamp(node); }, + + /** + * Enable all the rules in the sheet + * + * @method enable + * @return {StyleSheet} + * @chainable + */ + enable : function () { sheet.disabled = false; return this; }, + + /** + * Disable all the rules in the sheet. Rules may be changed while the + * StyleSheet is disabled. + * + * @method disable + * @return {StyleSheet} + * @chainable + */ + disable : function () { sheet.disabled = true; return this; }, + + /** + * Returns false if the StyleSheet is disabled. Otherwise true. + * + * @method isEnabled + * @return {Boolean} + */ + isEnabled : function () { return !sheet.disabled; }, + + /** + *

Set style properties for a provided selector string. + * If the selector includes commas, it will be split into individual + * selectors and applied accordingly. If the selector string does not + * have a corresponding rule in the sheet, it will be added.

+ * + *

The object properties in the second parameter must be the JavaScript + * names of style properties. E.g. fontSize rather than font-size.

+ * + *

The float style property will be set by any of "float", + * "styleFloat", or "cssFloat".

+ * + * @method set + * @param sel {String} the selector string to apply the changes to + * @param css {Object} Object literal of style properties and new values + * @return {StyleSheet} + * @chainable + */ + set : function (sel,css) { + var rule = cssRules[sel], + multi = sel.split(/\s*,\s*/),i, + idx; + + // IE's addRule doesn't support multiple comma delimited selectors + if (multi.length > 1) { + for (i = multi.length - 1; i >= 0; --i) { + this.set(multi[i], css); + } + return this; + } + + // Some selector values can cause IE to hang + if (!StyleSheet.isValidSelector(sel)) { + Y.log("Invalid selector '"+sel+"' passed to set (ignoring).",'error','StyleSheet'); + return this; + } + + // Opera throws an error if there's a syntax error in assigned + // cssText. Avoid this using a worker style collection, then + // assigning the resulting cssText. + if (rule) { + rule.style.cssText = StyleSheet.toCssText(css,rule.style.cssText); + } else { + idx = sheet[_rules].length; + css = StyleSheet.toCssText(css); + + // IE throws an error when attempting to addRule(sel,'',n) + // which would crop up if no, or only invalid values are used + if (css) { + _insertRule(sel, css, idx); + + // Safari replaces the rules collection, but maintains the + // rule instances in the new collection when rules are + // added/removed + cssRules[sel] = sheet[_rules][idx]; + } + } + return this; + }, + + /** + *

Unset style properties for a provided selector string, removing + * their effect from the style cascade.

+ * + *

If the selector includes commas, it will be split into individual + * selectors and applied accordingly. If there are no properties + * remaining in the rule after unsetting, the rule is removed.

+ * + *

The style property or properties in the second parameter must be the + * JavaScript style property names. E.g. fontSize rather than font-size.

+ * + *

The float style property will be unset by any of "float", + * "styleFloat", or "cssFloat".

+ * + * @method unset + * @param sel {String} the selector string to apply the changes to + * @param css {String|Array} style property name or Array of names + * @return {StyleSheet} + * @chainable + */ + unset : function (sel,css) { + var rule = cssRules[sel], + multi = sel.split(/\s*,\s*/), + remove = !css, + rules, i; + + // IE's addRule doesn't support multiple comma delimited selectors + // so rules are mapped internally by atomic selectors + if (multi.length > 1) { + for (i = multi.length - 1; i >= 0; --i) { + this.unset(multi[i], css); + } + return this; + } + + if (rule) { + if (!remove) { + css = Y.Array(css); + + workerStyle.cssText = rule.style.cssText; + for (i = css.length - 1; i >= 0; --i) { + _unsetProperty(workerStyle,css[i]); + } + + if (workerStyle.cssText) { + rule.style.cssText = workerStyle.cssText; + } else { + remove = true; + } + } + + if (remove) { // remove the rule altogether + rules = sheet[_rules]; + for (i = rules.length - 1; i >= 0; --i) { + if (rules[i] === rule) { + delete cssRules[sel]; + _deleteRule(i); + break; + } + } + } + } + return this; + }, + + /** + * Get the current cssText for a rule or the entire sheet. If the + * selector param is supplied, only the cssText for that rule will be + * returned, if found. If the selector string targets multiple + * selectors separated by commas, the cssText of the first rule only + * will be returned. If no selector string, the stylesheet's full + * cssText will be returned. + * + * @method getCssText + * @param sel {String} Selector string + * @return {String} + */ + getCssText : function (sel) { + var rule, css, selector; + + if (isString(sel)) { + // IE's addRule doesn't support multiple comma delimited + // selectors so rules are mapped internally by atomic selectors + rule = cssRules[sel.split(/\s*,\s*/)[0]]; + + return rule ? rule.style.cssText : null; + } else { + css = []; + for (selector in cssRules) { + if (cssRules.hasOwnProperty(selector)) { + rule = cssRules[selector]; + css.push(rule.selectorText+" {"+rule.style.cssText+"}"); + } + } + return css.join("\n"); + } + } + }); + +} + +_toCssText = function (css,base) { + var f = css.styleFloat || css.cssFloat || css[FLOAT], + trim = Y.Lang.trim, + prop; + + // A very difficult to repro/isolate IE 9 beta (and Platform Preview 7) bug + // was reduced to this line throwing the error: + // "Invalid this pointer used as target for method call" + // It appears that the style collection is corrupted. The error is + // catchable, so in a best effort to work around it, replace the + // p and workerStyle and try the assignment again. + try { + workerStyle.cssText = base || EMPTY; + } catch (e) { + Y.log("Worker style collection corrupted. Replacing.", "warn", "StyleSheet"); + p = d.createElement('p'); + workerStyle = p.style; + workerStyle.cssText = base || EMPTY; + } + + if (f && !css[floatAttr]) { + css = Y.merge(css); + delete css.styleFloat; delete css.cssFloat; delete css[FLOAT]; + css[floatAttr] = f; + } + + for (prop in css) { + if (css.hasOwnProperty(prop)) { + try { + // IE throws Invalid Value errors and doesn't like whitespace + // in values ala ' red' or 'red ' + workerStyle[prop] = trim(css[prop]); + } + catch (ex) { + Y.log('Error assigning property "'+prop+'" to "'+css[prop]+ + "\" (ignored):\n"+ex.message,'warn','StyleSheet'); + } + } + } + return workerStyle.cssText; +}; + +Y.mix(StyleSheet, { + /** + *

Converts an object literal of style properties and values into a string + * of css text. This can then be assigned to el.style.cssText.

+ * + *

The optional second parameter is a cssText string representing the + * starting state of the style prior to alterations. This is most often + * extracted from the eventual target's current el.style.cssText.

+ * + * @method toCssText + * @param css {Object} object literal of style properties and values + * @param cssText {String} (optional) starting cssText value + * @return {String} the resulting cssText string + * @static + */ + toCssText : ((OPACITY in workerStyle) ? _toCssText : + // Wrap IE's toCssText to catch opacity. The copy/merge is to preserve + // the input object's integrity, but if float and opacity are set, the + // input will be copied twice in IE. Is there a way to avoid this + // without increasing the byte count? + function (css, cssText) { + if (OPACITY in css) { + css = Y.merge(css,{ + filter: 'alpha(opacity='+(css.opacity*100)+')' + }); + delete css.opacity; + } + return _toCssText(css,cssText); + }), + + /** + * Registers a StyleSheet instance in the static registry by the given name + * + * @method register + * @param name {String} the name to assign the StyleSheet in the registry + * @param sheet {StyleSheet} The StyleSheet instance + * @return {Boolean} false if no name or sheet is not a StyleSheet + * instance. true otherwise. + * @static + */ + register : function (name,sheet) { + return !!(name && sheet instanceof StyleSheet && + !sheets[name] && (sheets[name] = sheet)); + }, + + /** + *

Determines if a selector string is safe to use. Used internally + * in set to prevent IE from locking up when attempting to add a rule for a + * "bad selector".

+ * + *

Bad selectors are considered to be any string containing unescaped + * `~!@$%^&()+=|{}[];'"?< or space. Also forbidden are . or # followed by + * anything other than an alphanumeric. Additionally -abc or .-abc or + * #_abc or '# ' all fail. There are likely more failure cases, so + * please file a bug if you encounter one.

+ * + * @method isValidSelector + * @param sel {String} the selector string + * @return {Boolean} + * @static + */ + isValidSelector : function (sel) { + var valid = false; + + if (sel && isString(sel)) { + + if (!selectors.hasOwnProperty(sel)) { + // TEST: there should be nothing but white-space left after + // these destructive regexs + selectors[sel] = !/\S/.test( + // combinators + sel.replace(/\s+|\s*[+~>]\s*/g,' '). + // attribute selectors (contents not validated) + replace(/([^ ])\[.*?\]/g,'$1'). + // pseudo-class|element selectors (contents of parens + // such as :nth-of-type(2) or :not(...) not validated) + replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,'$1'). + // element tags + replace(/(?:^| )[a-z0-6]+/ig,' '). + // escaped characters + replace(/\\./g,EMPTY). + // class and id identifiers + replace(/[.#]\w[\w\-]*/g,EMPTY)); + } + + valid = selectors[sel]; + } + + return valid; + } +},true); + +Y.StyleSheet = StyleSheet; + +/* + +NOTES + * Style node must be added to the head element. Safari does not honor styles + applied to StyleSheet objects on style nodes in the body. + * StyleSheet object is created on the style node when the style node is added + to the head element in Firefox 2 (and maybe 3?) + * The cssRules collection is replaced after insertRule/deleteRule calls in + Safari 3.1. Existing Rules are used in the new collection, so the collection + cannot be cached, but the rules can be. + * Opera requires that the index be passed with insertRule. + * Same-domain restrictions prevent modifying StyleSheet objects attached to + link elements with remote href (or "about:blank" or "javascript:false") + * Same-domain restrictions prevent reading StyleSheet cssRules/rules + collection of link elements with remote href (or "about:blank" or + "javascript:false") + * Same-domain restrictions result in Safari not populating node.sheet property + for link elements with remote href (et.al) + * IE names StyleSheet related properties and methods differently (see code) + * IE converts tag names to upper case in the Rule's selectorText + * IE converts empty string assignment to complex properties to value settings + for all child properties. E.g. style.background = '' sets non-'' values on + style.backgroundPosition, style.backgroundColor, etc. All else clear + style.background and all child properties. + * IE assignment style.filter = '' will result in style.cssText == 'FILTER:' + * All browsers support Rule.style.cssText as a read/write property, leaving + only opacity needing to be accounted for. + * Benchmarks of style.property = value vs style.cssText += 'property: value' + indicate cssText is slightly slower for single property assignment. For + multiple property assignment, cssText speed stays relatively the same where + style.property speed decreases linearly by the number of properties set. + Exception being Opera 9.27, where style.property is always faster than + style.cssText. + * Opera 9.5b throws a syntax error when assigning cssText with a syntax error. + * Opera 9.5 doesn't honor rule.style.cssText = ''. Previous style persists. + You have to remove the rule altogether. + * Stylesheet properties set with !important will trump inline style set on an + element or in el.style.property. + * Creating a worker style collection like document.createElement('p').style; + will fail after a time in FF (~5secs of inactivity). Property assignments + will not alter the property or cssText. It may be the generated node is + garbage collected and the style collection becomes inert (speculation). + * IE locks up when attempting to add a rule with a selector including at least + characters {[]}~`!@%^&*()+=|? (unescaped) and leading _ or - + such as addRule('-foo','{ color: red }') or addRule('._abc','{...}') + * IE's addRule doesn't support comma separated selectors such as + addRule('.foo, .bar','{..}') + * IE throws an error on valid values with leading/trailing white space. + * When creating an entire sheet at once, only FF2/3 & Opera allow creating a + style node, setting its innerHTML and appending to head. + * When creating an entire sheet at once, Safari requires the style node to be + created with content in innerHTML of another element. + * When creating an entire sheet at once, IE requires the style node content to + be set via node.styleSheet.cssText + * When creating an entire sheet at once in IE, styleSheet.cssText can't be + written until node.type = 'text/css'; is performed. + * When creating an entire sheet at once in IE, load-time fork on + var styleNode = d.createElement('style'); _method = styleNode.styleSheet ?.. + fails (falsey). During run-time, the test for .styleSheet works fine + * Setting complex properties in cssText will SOMETIMES allow child properties + to be unset + set unset FF2 FF3 S3.1 IE6 IE7 Op9.27 Op9.5 + ---------- ----------------- --- --- ---- --- --- ------ ----- + border -top NO NO YES YES YES YES YES + -top-color NO NO YES YES YES + -color NO NO NO NO NO + background -color NO NO YES YES YES + -position NO NO YES YES YES + -position-x NO NO NO NO NO + font line-height YES YES NO NO NO NO YES + -style YES YES NO YES YES + -size YES YES NO YES YES + -size-adjust ??? ??? n/a n/a n/a ??? ??? + padding -top NO NO YES YES YES + margin -top NO NO YES YES YES + list-style -type YES YES YES YES YES + -position YES YES YES YES YES + overflow -x NO NO YES n/a YES + + ??? - unsetting font-size-adjust has the same effect as unsetting font-size + * FireFox and WebKit populate rule.cssText as "SELECTOR { CSSTEXT }", but + Opera and IE do not. + * IE6 and IE7 silently ignore the { and } if passed into addRule('.foo','{ + color:#000}',0). IE8 does not and creates an empty rule. + * IE6-8 addRule('.foo','',n) throws an error. Must supply *some* cssText +*/ + + + +}, '3.17.2', {"requires": ["yui-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-min.js b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-min.js new file mode 100644 index 0000000..28bdb84 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("stylesheet",function(e,t){function v(t,r){var o,a,f,l={},h,p,m,g,y,b;if(!e.instanceOf(this,v))return new v(t,r);if(t){if(e.Node&&t instanceof e.Node)a=t._node;else if(t.nodeName)a=t;else if(s(t)){if(t&&u[t])return u[t];a=n.getElementById(t.replace(/^#/,d))}if(a&&u[e.stamp(a)])return u[e.stamp(a)]}if(!a||!/^(?:style|link)$/i.test(a.nodeName))a=n.createElement("style"),a.type="text/css";s(t)&&(t.indexOf("{")!=-1?a.styleSheet?a.styleSheet.cssText=t:a.appendChild(n.createTextNode(t)):r||(r=t));if(!a.parentNode||a.parentNode.nodeName.toLowerCase()!=="head")o=(a.ownerDocument||n).getElementsByTagName("head")[0],o.appendChild(a);f=a.sheet||a.styleSheet,h=f&&"cssRules"in f?"cssRules":"rules",m="deleteRule"in f?function(e){f.deleteRule(e)}:function(e){f.removeRule(e)},p="insertRule"in f?function(e,t,n){f.insertRule(e+" {"+t+"}",n)}:function(e,t,n){f.addRule(e,t,n)};for(g=f[h].length-1;g>=0;--g)y=f[h][g],b=y.selectorText,l[b]?(l[b].style.cssText+=";"+y.style.cssText,m(g)):l[b]=y;v.register(e.stamp(a),this),r&&v.register(r,this),e.mix(this,{getId:function(){return e.stamp(a)},enable:function(){return f.disabled=!1,this},disable:function(){return f.disabled=!0,this},isEnabled:function(){return!f.disabled},set:function(e,t){var n=l[e],r=e.split(/\s*,\s*/),i,s;if(r.length>1){for(i=r.length-1;i>=0;--i)this.set(r[i],t);return this}return v.isValidSelector(e)?(n?n.style.cssText=v.toCssText(t,n.style.cssText):(s=f[h].length,t=v.toCssText(t),t&&(p(e,t,s),l[e]=f[h][s])),this):this},unset:function(t,n){var r=l[t],s=t.split(/\s*,\s*/),o=!n,u,a;if(s.length>1){for(a=s.length-1;a>=0;--a)this.unset(s[a],n);return this}if(r){if(!o){n=e.Array(n),i.cssText=r.style.cssText;for(a=n.length-1;a>=0;--a)c(i,n[a]);i.cssText?r.style.cssText=i.cssText:o=!0}if(o){u=f[h];for(a=u.length-1;a>=0;--a)if(u[a]===r){delete l[t],m(a);break}}}return this},getCssText:function(e){var t,n,r;if(s(e))return t=l[e.split(/\s*,\s*/)[0]],t?t.style.cssText:null;n=[];for(r in l)l.hasOwnProperty(r)&&(t=l[r],n.push(t.selectorText+" {"+t.style.cssText+"}"));return n.join("\n")}})}var n=e.config.doc,r=n.createElement("p"),i=r.style,s=e.Lang.isString,o={},u={},a="cssFloat"in i?"cssFloat":"styleFloat",f,l,c,h="opacity",p="float",d="";l=h in i?function(e){e.opacity=d}:function(e){e.filter=d},i.border="1px solid red",i.border=d,c=i.borderLeft?function(e,t){var n;t!==a&&t.toLowerCase().indexOf(p)!=-1&&(t=a);if(s(e[t]))switch(t){case h:case"filter":l(e);break;case"font":e.font=e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=e.lineHeight=e.fontFamily=d;break;default:for(n in e)n.indexOf(t)===0&&(e[n]=d)}}:function(e,t){t!==a&&t.toLowerCase().indexOf(p)!=-1&&(t=a),s(e[t])&&(t===h?l(e):e[t]=d)},f=function(t,s){var o=t.styleFloat||t.cssFloat||t[p],u=e.Lang.trim,f;try{i.cssText=s||d}catch(l){r=n.createElement("p"),i=r.style,i.cssText=s||d}o&&!t[a]&&(t=e.merge(t),delete t.styleFloat,delete t.cssFloat,delete t[p],t[a]=o);for(f in t)if(t.hasOwnProperty(f))try{i[f]=u(t[f])}catch(c){}return i.cssText},e.mix(v,{toCssText:h in i?f:function(t,n){return h in t&&(t=e.merge(t,{filter:"alpha(opacity="+t.opacity*100+")"}),delete t.opacity),f(t,n)},register:function(e,t){return!!(e&&t instanceof v&&!u[e]&&(u[e]=t))},isValidSelector:function(e){var t=!1;return e&&s(e)&&(o.hasOwnProperty(e)||(o[e]=!/\S/.test(e.replace(/\s+|\s*[+~>]\s*/g," ").replace(/([^ ])\[.*?\]/g,"$1").replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,"$1").replace(/(?:^| )[a-z0-6]+/ig," ").replace(/\\./g,d).replace(/[.#]\w[\w\-]*/g,d))),t=o[e]),t}},!0),e.StyleSheet=v},"3.17.2",{requires:["yui-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet.js b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet.js new file mode 100644 index 0000000..c2ef029 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/stylesheet/stylesheet.js @@ -0,0 +1,645 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('stylesheet', function (Y, NAME) { + +/** + * The StyleSheet component is a module for creating and modifying CSS + * stylesheets. + * + * @module stylesheet + */ +var d = Y.config.doc, + p = d.createElement('p'), // Have to hold the node (see notes) + workerStyle = p.style, // worker style collection + isString = Y.Lang.isString, + selectors = {}, + sheets = {}, + floatAttr = ('cssFloat' in workerStyle) ? 'cssFloat' : 'styleFloat', + _toCssText, + _unsetOpacity, + _unsetProperty, + OPACITY = 'opacity', + FLOAT = 'float', + EMPTY = ''; + +// Normalizes the removal of an assigned style for opacity. IE uses the filter +// property. +_unsetOpacity = (OPACITY in workerStyle) ? + function (style) { style.opacity = EMPTY; } : + function (style) { style.filter = EMPTY; }; + +// Normalizes the removal of an assigned style for a given property. Expands +// shortcut properties if necessary and handles the various names for the float +// property. +workerStyle.border = "1px solid red"; +workerStyle.border = EMPTY; // IE doesn't unset child properties +_unsetProperty = workerStyle.borderLeft ? + function (style,prop) { + var p; + if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) { + prop = floatAttr; + } + if (isString(style[prop])) { + switch (prop) { + case OPACITY: + case 'filter' : _unsetOpacity(style); break; + case 'font' : + style.font = style.fontStyle = style.fontVariant = + style.fontWeight = style.fontSize = style.lineHeight = + style.fontFamily = EMPTY; + break; + default : + for (p in style) { + if (p.indexOf(prop) === 0) { + style[p] = EMPTY; + } + } + } + } + } : + function (style,prop) { + if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) { + prop = floatAttr; + } + if (isString(style[prop])) { + if (prop === OPACITY) { + _unsetOpacity(style); + } else { + style[prop] = EMPTY; + } + } + }; + +/** + * Create an instance of StyleSheet to encapsulate a css stylesheet. + * The constructor can be called using function or constructor syntax. + *
var sheet = Y.StyleSheet(..);
+ * or + *
var sheet = new Y.StyleSheet(..);
+ * + * The first parameter passed can be any of the following things: + *
    + *
  • The desired string name to register a new empty sheet
  • + *
  • The string name of an existing StyleSheet instance
  • + *
  • The unique guid generated for an existing StyleSheet instance
  • + *
  • The id of an existing <link> or <style> node
  • + *
  • The node reference for an existing <link> or <style> node
  • + *
  • The Y.Node instance wrapping an existing <link> or <style> node
  • + *
  • A chunk of css text to create a new stylesheet from
  • + *
+ * + *

If a string is passed, StyleSheet will first look in its static name + * registry for an existing sheet, then in the DOM for an element with that id. + * If neither are found and the string contains the { character, it will be + * used as a the initial cssText for a new StyleSheet. Otherwise, a new empty + * StyleSheet is created, assigned the string value as a name, and registered + * statically by that name.

+ * + *

The optional second parameter is a string name to register the sheet as. + * This param is largely useful when providing a node id/ref or chunk of css + * text to create a populated instance.

+ * + * @class StyleSheet + * @constructor + * @param seed {String|HTMLElement|Node} a style or link node, its id, or a + * name or guid of a StyleSheet, or a string of css text + * @param name {String} (optional) name to register instance for future static + * access + */ +function StyleSheet(seed, name) { + var head, + node, + sheet, + cssRules = {}, + _rules, + _insertRule, + _deleteRule, + i,r,sel; + + // Factory or constructor + if (!(Y.instanceOf(this, StyleSheet))) { + return new StyleSheet(seed,name); + } + + // Extract the DOM node from Node instances + if (seed) { + if (Y.Node && seed instanceof Y.Node) { + node = seed._node; + } else if (seed.nodeName) { + node = seed; + // capture the DOM node if the string is an id + } else if (isString(seed)) { + if (seed && sheets[seed]) { + return sheets[seed]; + } + node = d.getElementById(seed.replace(/^#/,EMPTY)); + } + + // Check for the StyleSheet in the static registry + if (node && sheets[Y.stamp(node)]) { + return sheets[Y.stamp(node)]; + } + } + + + // Create a style node if necessary + if (!node || !/^(?:style|link)$/i.test(node.nodeName)) { + node = d.createElement('style'); + node.type = 'text/css'; + } + + if (isString(seed)) { + // Create entire sheet from seed cssText + if (seed.indexOf('{') != -1) { + // Not a load-time fork because low run-time impact and IE fails + // test for s.styleSheet at page load time (oddly) + if (node.styleSheet) { + node.styleSheet.cssText = seed; + } else { + node.appendChild(d.createTextNode(seed)); + } + } else if (!name) { + name = seed; + } + } + + // Make sure the node is attached to the appropriate head element + if (!node.parentNode || node.parentNode.nodeName.toLowerCase() !== 'head') { + head = (node.ownerDocument || d).getElementsByTagName('head')[0]; + // styleSheet isn't available on the style node in FF2 until appended + // to the head element. style nodes appended to body do not affect + // change in Safari. + head.appendChild(node); + } + + // Begin setting up private aliases to the important moving parts + // 1. The stylesheet object + // IE stores StyleSheet under the "styleSheet" property + // Safari doesn't populate sheet for xdomain link elements + sheet = node.sheet || node.styleSheet; + + // 2. The style rules collection + // IE stores the rules collection under the "rules" property + _rules = sheet && ('cssRules' in sheet) ? 'cssRules' : 'rules'; + + // 3. The method to remove a rule from the stylesheet + // IE supports removeRule + _deleteRule = ('deleteRule' in sheet) ? + function (i) { sheet.deleteRule(i); } : + function (i) { sheet.removeRule(i); }; + + // 4. The method to add a new rule to the stylesheet + // IE supports addRule with different signature + _insertRule = ('insertRule' in sheet) ? + function (sel,css,i) { sheet.insertRule(sel+' {'+css+'}',i); } : + function (sel,css,i) { sheet.addRule(sel,css,i); }; + + // 5. Initialize the cssRules map from the node + // xdomain link nodes forbid access to the cssRules collection, so this + // will throw an error. + // TODO: research alternate stylesheet, @media + for (i = sheet[_rules].length - 1; i >= 0; --i) { + r = sheet[_rules][i]; + sel = r.selectorText; + + if (cssRules[sel]) { + cssRules[sel].style.cssText += ';' + r.style.cssText; + _deleteRule(i); + } else { + cssRules[sel] = r; + } + } + + // Cache the instance by the generated Id + StyleSheet.register(Y.stamp(node),this); + + // Register the instance by name if provided or defaulted from seed + if (name) { + StyleSheet.register(name,this); + } + + // Public API + Y.mix(this,{ + /** + * Get the unique stamp for this StyleSheet instance + * + * @method getId + * @return {Number} the static id + */ + getId : function () { return Y.stamp(node); }, + + /** + * Enable all the rules in the sheet + * + * @method enable + * @return {StyleSheet} + * @chainable + */ + enable : function () { sheet.disabled = false; return this; }, + + /** + * Disable all the rules in the sheet. Rules may be changed while the + * StyleSheet is disabled. + * + * @method disable + * @return {StyleSheet} + * @chainable + */ + disable : function () { sheet.disabled = true; return this; }, + + /** + * Returns false if the StyleSheet is disabled. Otherwise true. + * + * @method isEnabled + * @return {Boolean} + */ + isEnabled : function () { return !sheet.disabled; }, + + /** + *

Set style properties for a provided selector string. + * If the selector includes commas, it will be split into individual + * selectors and applied accordingly. If the selector string does not + * have a corresponding rule in the sheet, it will be added.

+ * + *

The object properties in the second parameter must be the JavaScript + * names of style properties. E.g. fontSize rather than font-size.

+ * + *

The float style property will be set by any of "float", + * "styleFloat", or "cssFloat".

+ * + * @method set + * @param sel {String} the selector string to apply the changes to + * @param css {Object} Object literal of style properties and new values + * @return {StyleSheet} + * @chainable + */ + set : function (sel,css) { + var rule = cssRules[sel], + multi = sel.split(/\s*,\s*/),i, + idx; + + // IE's addRule doesn't support multiple comma delimited selectors + if (multi.length > 1) { + for (i = multi.length - 1; i >= 0; --i) { + this.set(multi[i], css); + } + return this; + } + + // Some selector values can cause IE to hang + if (!StyleSheet.isValidSelector(sel)) { + return this; + } + + // Opera throws an error if there's a syntax error in assigned + // cssText. Avoid this using a worker style collection, then + // assigning the resulting cssText. + if (rule) { + rule.style.cssText = StyleSheet.toCssText(css,rule.style.cssText); + } else { + idx = sheet[_rules].length; + css = StyleSheet.toCssText(css); + + // IE throws an error when attempting to addRule(sel,'',n) + // which would crop up if no, or only invalid values are used + if (css) { + _insertRule(sel, css, idx); + + // Safari replaces the rules collection, but maintains the + // rule instances in the new collection when rules are + // added/removed + cssRules[sel] = sheet[_rules][idx]; + } + } + return this; + }, + + /** + *

Unset style properties for a provided selector string, removing + * their effect from the style cascade.

+ * + *

If the selector includes commas, it will be split into individual + * selectors and applied accordingly. If there are no properties + * remaining in the rule after unsetting, the rule is removed.

+ * + *

The style property or properties in the second parameter must be the + * JavaScript style property names. E.g. fontSize rather than font-size.

+ * + *

The float style property will be unset by any of "float", + * "styleFloat", or "cssFloat".

+ * + * @method unset + * @param sel {String} the selector string to apply the changes to + * @param css {String|Array} style property name or Array of names + * @return {StyleSheet} + * @chainable + */ + unset : function (sel,css) { + var rule = cssRules[sel], + multi = sel.split(/\s*,\s*/), + remove = !css, + rules, i; + + // IE's addRule doesn't support multiple comma delimited selectors + // so rules are mapped internally by atomic selectors + if (multi.length > 1) { + for (i = multi.length - 1; i >= 0; --i) { + this.unset(multi[i], css); + } + return this; + } + + if (rule) { + if (!remove) { + css = Y.Array(css); + + workerStyle.cssText = rule.style.cssText; + for (i = css.length - 1; i >= 0; --i) { + _unsetProperty(workerStyle,css[i]); + } + + if (workerStyle.cssText) { + rule.style.cssText = workerStyle.cssText; + } else { + remove = true; + } + } + + if (remove) { // remove the rule altogether + rules = sheet[_rules]; + for (i = rules.length - 1; i >= 0; --i) { + if (rules[i] === rule) { + delete cssRules[sel]; + _deleteRule(i); + break; + } + } + } + } + return this; + }, + + /** + * Get the current cssText for a rule or the entire sheet. If the + * selector param is supplied, only the cssText for that rule will be + * returned, if found. If the selector string targets multiple + * selectors separated by commas, the cssText of the first rule only + * will be returned. If no selector string, the stylesheet's full + * cssText will be returned. + * + * @method getCssText + * @param sel {String} Selector string + * @return {String} + */ + getCssText : function (sel) { + var rule, css, selector; + + if (isString(sel)) { + // IE's addRule doesn't support multiple comma delimited + // selectors so rules are mapped internally by atomic selectors + rule = cssRules[sel.split(/\s*,\s*/)[0]]; + + return rule ? rule.style.cssText : null; + } else { + css = []; + for (selector in cssRules) { + if (cssRules.hasOwnProperty(selector)) { + rule = cssRules[selector]; + css.push(rule.selectorText+" {"+rule.style.cssText+"}"); + } + } + return css.join("\n"); + } + } + }); + +} + +_toCssText = function (css,base) { + var f = css.styleFloat || css.cssFloat || css[FLOAT], + trim = Y.Lang.trim, + prop; + + // A very difficult to repro/isolate IE 9 beta (and Platform Preview 7) bug + // was reduced to this line throwing the error: + // "Invalid this pointer used as target for method call" + // It appears that the style collection is corrupted. The error is + // catchable, so in a best effort to work around it, replace the + // p and workerStyle and try the assignment again. + try { + workerStyle.cssText = base || EMPTY; + } catch (e) { + p = d.createElement('p'); + workerStyle = p.style; + workerStyle.cssText = base || EMPTY; + } + + if (f && !css[floatAttr]) { + css = Y.merge(css); + delete css.styleFloat; delete css.cssFloat; delete css[FLOAT]; + css[floatAttr] = f; + } + + for (prop in css) { + if (css.hasOwnProperty(prop)) { + try { + // IE throws Invalid Value errors and doesn't like whitespace + // in values ala ' red' or 'red ' + workerStyle[prop] = trim(css[prop]); + } + catch (ex) { + } + } + } + return workerStyle.cssText; +}; + +Y.mix(StyleSheet, { + /** + *

Converts an object literal of style properties and values into a string + * of css text. This can then be assigned to el.style.cssText.

+ * + *

The optional second parameter is a cssText string representing the + * starting state of the style prior to alterations. This is most often + * extracted from the eventual target's current el.style.cssText.

+ * + * @method toCssText + * @param css {Object} object literal of style properties and values + * @param cssText {String} (optional) starting cssText value + * @return {String} the resulting cssText string + * @static + */ + toCssText : ((OPACITY in workerStyle) ? _toCssText : + // Wrap IE's toCssText to catch opacity. The copy/merge is to preserve + // the input object's integrity, but if float and opacity are set, the + // input will be copied twice in IE. Is there a way to avoid this + // without increasing the byte count? + function (css, cssText) { + if (OPACITY in css) { + css = Y.merge(css,{ + filter: 'alpha(opacity='+(css.opacity*100)+')' + }); + delete css.opacity; + } + return _toCssText(css,cssText); + }), + + /** + * Registers a StyleSheet instance in the static registry by the given name + * + * @method register + * @param name {String} the name to assign the StyleSheet in the registry + * @param sheet {StyleSheet} The StyleSheet instance + * @return {Boolean} false if no name or sheet is not a StyleSheet + * instance. true otherwise. + * @static + */ + register : function (name,sheet) { + return !!(name && sheet instanceof StyleSheet && + !sheets[name] && (sheets[name] = sheet)); + }, + + /** + *

Determines if a selector string is safe to use. Used internally + * in set to prevent IE from locking up when attempting to add a rule for a + * "bad selector".

+ * + *

Bad selectors are considered to be any string containing unescaped + * `~!@$%^&()+=|{}[];'"?< or space. Also forbidden are . or # followed by + * anything other than an alphanumeric. Additionally -abc or .-abc or + * #_abc or '# ' all fail. There are likely more failure cases, so + * please file a bug if you encounter one.

+ * + * @method isValidSelector + * @param sel {String} the selector string + * @return {Boolean} + * @static + */ + isValidSelector : function (sel) { + var valid = false; + + if (sel && isString(sel)) { + + if (!selectors.hasOwnProperty(sel)) { + // TEST: there should be nothing but white-space left after + // these destructive regexs + selectors[sel] = !/\S/.test( + // combinators + sel.replace(/\s+|\s*[+~>]\s*/g,' '). + // attribute selectors (contents not validated) + replace(/([^ ])\[.*?\]/g,'$1'). + // pseudo-class|element selectors (contents of parens + // such as :nth-of-type(2) or :not(...) not validated) + replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,'$1'). + // element tags + replace(/(?:^| )[a-z0-6]+/ig,' '). + // escaped characters + replace(/\\./g,EMPTY). + // class and id identifiers + replace(/[.#]\w[\w\-]*/g,EMPTY)); + } + + valid = selectors[sel]; + } + + return valid; + } +},true); + +Y.StyleSheet = StyleSheet; + +/* + +NOTES + * Style node must be added to the head element. Safari does not honor styles + applied to StyleSheet objects on style nodes in the body. + * StyleSheet object is created on the style node when the style node is added + to the head element in Firefox 2 (and maybe 3?) + * The cssRules collection is replaced after insertRule/deleteRule calls in + Safari 3.1. Existing Rules are used in the new collection, so the collection + cannot be cached, but the rules can be. + * Opera requires that the index be passed with insertRule. + * Same-domain restrictions prevent modifying StyleSheet objects attached to + link elements with remote href (or "about:blank" or "javascript:false") + * Same-domain restrictions prevent reading StyleSheet cssRules/rules + collection of link elements with remote href (or "about:blank" or + "javascript:false") + * Same-domain restrictions result in Safari not populating node.sheet property + for link elements with remote href (et.al) + * IE names StyleSheet related properties and methods differently (see code) + * IE converts tag names to upper case in the Rule's selectorText + * IE converts empty string assignment to complex properties to value settings + for all child properties. E.g. style.background = '' sets non-'' values on + style.backgroundPosition, style.backgroundColor, etc. All else clear + style.background and all child properties. + * IE assignment style.filter = '' will result in style.cssText == 'FILTER:' + * All browsers support Rule.style.cssText as a read/write property, leaving + only opacity needing to be accounted for. + * Benchmarks of style.property = value vs style.cssText += 'property: value' + indicate cssText is slightly slower for single property assignment. For + multiple property assignment, cssText speed stays relatively the same where + style.property speed decreases linearly by the number of properties set. + Exception being Opera 9.27, where style.property is always faster than + style.cssText. + * Opera 9.5b throws a syntax error when assigning cssText with a syntax error. + * Opera 9.5 doesn't honor rule.style.cssText = ''. Previous style persists. + You have to remove the rule altogether. + * Stylesheet properties set with !important will trump inline style set on an + element or in el.style.property. + * Creating a worker style collection like document.createElement('p').style; + will fail after a time in FF (~5secs of inactivity). Property assignments + will not alter the property or cssText. It may be the generated node is + garbage collected and the style collection becomes inert (speculation). + * IE locks up when attempting to add a rule with a selector including at least + characters {[]}~`!@%^&*()+=|? (unescaped) and leading _ or - + such as addRule('-foo','{ color: red }') or addRule('._abc','{...}') + * IE's addRule doesn't support comma separated selectors such as + addRule('.foo, .bar','{..}') + * IE throws an error on valid values with leading/trailing white space. + * When creating an entire sheet at once, only FF2/3 & Opera allow creating a + style node, setting its innerHTML and appending to head. + * When creating an entire sheet at once, Safari requires the style node to be + created with content in innerHTML of another element. + * When creating an entire sheet at once, IE requires the style node content to + be set via node.styleSheet.cssText + * When creating an entire sheet at once in IE, styleSheet.cssText can't be + written until node.type = 'text/css'; is performed. + * When creating an entire sheet at once in IE, load-time fork on + var styleNode = d.createElement('style'); _method = styleNode.styleSheet ?.. + fails (falsey). During run-time, the test for .styleSheet works fine + * Setting complex properties in cssText will SOMETIMES allow child properties + to be unset + set unset FF2 FF3 S3.1 IE6 IE7 Op9.27 Op9.5 + ---------- ----------------- --- --- ---- --- --- ------ ----- + border -top NO NO YES YES YES YES YES + -top-color NO NO YES YES YES + -color NO NO NO NO NO + background -color NO NO YES YES YES + -position NO NO YES YES YES + -position-x NO NO NO NO NO + font line-height YES YES NO NO NO NO YES + -style YES YES NO YES YES + -size YES YES NO YES YES + -size-adjust ??? ??? n/a n/a n/a ??? ??? + padding -top NO NO YES YES YES + margin -top NO NO YES YES YES + list-style -type YES YES YES YES YES + -position YES YES YES YES YES + overflow -x NO NO YES n/a YES + + ??? - unsetting font-size-adjust has the same effect as unsetting font-size + * FireFox and WebKit populate rule.cssText as "SELECTOR { CSSTEXT }", but + Opera and IE do not. + * IE6 and IE7 silently ignore the { and } if passed into addRule('.foo','{ + color:#000}',0). IE8 does not and creates an empty rule. + * IE6-8 addRule('.foo','',n) throws an error. Must supply *some* cssText +*/ + + + +}, '3.17.2', {"requires": ["yui-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/substitute/substitute-coverage.js b/design/standard/lib/yui/3.17.2/build/substitute/substitute-coverage.js new file mode 100644 index 0000000..361c193 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/substitute/substitute-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/substitute/substitute.js']) { + __coverage__['build/substitute/substitute.js'] = {"path":"build/substitute/substitute.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0]},"f":{"1":0,"2":0,"3":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":41}}},"2":{"name":"(anonymous_2)","line":83,"loc":{"start":{"line":83,"column":17},"end":{"line":83,"column":44}}},"3":{"name":"(anonymous_3)","line":157,"loc":{"start":{"line":157,"column":25},"end":{"line":157,"column":48}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":170,"column":63}},"2":{"start":{"line":11,"column":4},"end":{"line":163,"column":3}},"3":{"start":{"line":84,"column":8},"end":{"line":85,"column":28}},"4":{"start":{"line":87,"column":8},"end":{"line":153,"column":3}},"5":{"start":{"line":88,"column":12},"end":{"line":88,"column":44}},"6":{"start":{"line":89,"column":12},"end":{"line":91,"column":13}},"7":{"start":{"line":90,"column":16},"end":{"line":90,"column":22}},"8":{"start":{"line":92,"column":12},"end":{"line":92,"column":37}},"9":{"start":{"line":93,"column":12},"end":{"line":95,"column":13}},"10":{"start":{"line":94,"column":16},"end":{"line":94,"column":22}},"11":{"start":{"line":98,"column":12},"end":{"line":98,"column":42}},"12":{"start":{"line":99,"column":12},"end":{"line":99,"column":24}},"13":{"start":{"line":100,"column":12},"end":{"line":100,"column":24}},"14":{"start":{"line":101,"column":12},"end":{"line":101,"column":35}},"15":{"start":{"line":102,"column":12},"end":{"line":105,"column":13}},"16":{"start":{"line":103,"column":16},"end":{"line":103,"column":44}},"17":{"start":{"line":104,"column":16},"end":{"line":104,"column":42}},"18":{"start":{"line":108,"column":12},"end":{"line":108,"column":23}},"19":{"start":{"line":111,"column":12},"end":{"line":113,"column":13}},"20":{"start":{"line":112,"column":16},"end":{"line":112,"column":36}},"21":{"start":{"line":115,"column":12},"end":{"line":146,"column":13}},"22":{"start":{"line":116,"column":16},"end":{"line":139,"column":17}},"23":{"start":{"line":117,"column":20},"end":{"line":117,"column":37}},"24":{"start":{"line":119,"column":20},"end":{"line":138,"column":21}},"25":{"start":{"line":120,"column":24},"end":{"line":120,"column":58}},"26":{"start":{"line":122,"column":24},"end":{"line":122,"column":42}},"27":{"start":{"line":125,"column":24},"end":{"line":125,"column":50}},"28":{"start":{"line":126,"column":24},"end":{"line":128,"column":25}},"29":{"start":{"line":127,"column":28},"end":{"line":127,"column":53}},"30":{"start":{"line":132,"column":24},"end":{"line":137,"column":25}},"31":{"start":{"line":134,"column":28},"end":{"line":134,"column":62}},"32":{"start":{"line":136,"column":28},"end":{"line":136,"column":45}},"33":{"start":{"line":140,"column":10},"end":{"line":146,"column":13}},"34":{"start":{"line":142,"column":16},"end":{"line":142,"column":47}},"35":{"start":{"line":143,"column":5},"end":{"line":143,"column":23}},"36":{"start":{"line":148,"column":12},"end":{"line":148,"column":59}},"37":{"start":{"line":150,"column":3},"end":{"line":152,"column":4}},"38":{"start":{"line":151,"column":4},"end":{"line":151,"column":17}},"39":{"start":{"line":156,"column":2},"end":{"line":162,"column":2}},"40":{"start":{"line":158,"column":4},"end":{"line":158,"column":52}},"41":{"start":{"line":165,"column":4},"end":{"line":165,"column":30}},"42":{"start":{"line":166,"column":4},"end":{"line":166,"column":30}}},"branchMap":{"1":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":12},"end":{"line":89,"column":12}},{"start":{"line":89,"column":12},"end":{"line":89,"column":12}}]},"2":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":12},"end":{"line":93,"column":12}},{"start":{"line":93,"column":12},"end":{"line":93,"column":12}}]},"3":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":12},"end":{"line":102,"column":12}},{"start":{"line":102,"column":12},"end":{"line":102,"column":12}}]},"4":{"line":111,"type":"if","locations":[{"start":{"line":111,"column":12},"end":{"line":111,"column":12}},{"start":{"line":111,"column":12},"end":{"line":111,"column":12}}]},"5":{"line":115,"type":"if","locations":[{"start":{"line":115,"column":12},"end":{"line":115,"column":12}},{"start":{"line":115,"column":12},"end":{"line":115,"column":12}}]},"6":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":16},"end":{"line":116,"column":16}},{"start":{"line":116,"column":16},"end":{"line":116,"column":16}}]},"7":{"line":119,"type":"if","locations":[{"start":{"line":119,"column":20},"end":{"line":119,"column":20}},{"start":{"line":119,"column":20},"end":{"line":119,"column":20}}]},"8":{"line":122,"type":"binary-expr","locations":[{"start":{"line":122,"column":31},"end":{"line":122,"column":35}},{"start":{"line":122,"column":39},"end":{"line":122,"column":41}}]},"9":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":24},"end":{"line":126,"column":24}},{"start":{"line":126,"column":24},"end":{"line":126,"column":24}}]},"10":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":24},"end":{"line":132,"column":24}},{"start":{"line":132,"column":24},"end":{"line":132,"column":24}}]},"11":{"line":132,"type":"binary-expr","locations":[{"start":{"line":132,"column":28},"end":{"line":132,"column":68}},{"start":{"line":133,"column":28},"end":{"line":133,"column":37}}]},"12":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":10},"end":{"line":140,"column":10}},{"start":{"line":140,"column":10},"end":{"line":140,"column":10}}]},"13":{"line":150,"type":"if","locations":[{"start":{"line":150,"column":3},"end":{"line":150,"column":3}},{"start":{"line":150,"column":3},"end":{"line":150,"column":3}}]}},"code":["(function () { YUI.add('substitute', function (Y, NAME) {","","/**"," * String variable substitution and string formatting."," * If included, the substitute method is added to the YUI instance."," *"," * @module substitute"," * @deprecated"," */",""," var L = Y.Lang, DUMP = 'dump', SPACE = ' ', LBRACE = '{', RBRACE = '}',","\t\tsavedRegExp = /(~-(\\d+)-~)/g, lBraceRegExp = /\\{LBRACE\\}/g, rBraceRegExp = /\\{RBRACE\\}/g,",""," /**"," * The following methods are added to the YUI instance"," *"," * Use `Y.Lang.sub` or `Y.Template` instead."," * @class YUI~substitute"," * @deprecated"," */","","/**","Use `Y.Lang.sub` or `Y.Template` instead.","","","","Does `{placeholder}` substitution on a string. The object passed as the","second parameter provides values to replace the `{placeholder}`s.","{placeholder} token names must match property names of the object. For","example","","`var greeting = Y.substitute(\"Hello, {who}!\", { who: \"World\" });`","","`{placeholder}` tokens that are undefined on the object map will be left in","tact (leaving unsightly \"{placeholder}\"s in the output string). If your","replacement strings *should* include curly braces, use `{LBRACE}` and","`{RBRACE}` in your object map string value.","","If a function is passed as a third argument, it will be called for each","{placeholder} found. The {placeholder} name is passed as the first value","and the value from the object map is passed as the second. If the","{placeholder} contains a space, the first token will be used to identify","the object map property and the remainder will be passed as a third","argument to the function. See below for an example.","","If the value in the object map for a given {placeholder} is an object and","the `dump` module is loaded, the replacement value will be the string","result of calling `Y.dump(...)` with the object as input. Include a","numeric second token in the {placeholder} to configure the depth of the call","to `Y.dump(...)`, e.g. \"{someObject 2}\". See the","`dump` method for details.",""," @method substitute"," @deprecated"," @param {string} s The string that will be modified."," @param {object} o An object containing the replacement values."," @param {function} f An optional function that can be used to"," process each match. It receives the key,"," value, and any extra metadata included with"," the key inside of the braces."," @param {boolean} recurse if true, the replacement will be recursive,"," letting you have replacement tokens in replacement text."," The default is false."," @return {string} the substituted string.",""," @example",""," function getAttrVal(key, value, name) {"," // Return a string describing the named attribute and its value if"," // the first token is @. Otherwise, return the value from the"," // replacement object."," if (key === \"@\") {"," value += name + \" Value: \" + myObject.get(name);"," }"," return value;"," }",""," // Assuming myObject.set('foo', 'flowers'),"," // => \"Attr: foo Value: flowers\""," var attrVal = Y.substitute(\"{@ foo}\", { \"@\": \"Attr: \" }, getAttrVal);"," **/",""," substitute = function(s, o, f, recurse) {"," var i, j, k, key, v, meta, saved = [], token, dump,"," lidx = s.length;",""," for (;;) {"," i = s.lastIndexOf(LBRACE, lidx);"," if (i < 0) {"," break;"," }"," j = s.indexOf(RBRACE, i);"," if (i + 1 >= j) {"," break;"," }",""," //Extract key and meta info"," token = s.substring(i + 1, j);"," key = token;"," meta = null;"," k = key.indexOf(SPACE);"," if (k > -1) {"," meta = key.substring(k + 1);"," key = key.substring(0, k);"," }",""," // lookup the value"," v = o[key];",""," // if a substitution function was provided, execute it"," if (f) {"," v = f(key, v, meta);"," }",""," if (L.isObject(v)) {"," if (!Y.dump) {"," v = v.toString();"," } else {"," if (L.isArray(v)) {"," v = Y.dump(v, parseInt(meta, 10));"," } else {"," meta = meta || '';",""," // look for the keyword 'dump', if found force obj dump"," dump = meta.indexOf(DUMP);"," if (dump > -1) {"," meta = meta.substring(4);"," }",""," // use the toString if it is not the Object toString"," // and the 'dump' meta info was not found"," if (v.toString === Object.prototype.toString ||"," dump > -1) {"," v = Y.dump(v, parseInt(meta, 10));"," } else {"," v = v.toString();"," }"," }"," }","\t\t\t} else if (L.isUndefined(v)) {"," // This {block} has no replace string. Save it for later."," v = '~-' + saved.length + '-~';","\t\t\t\t\tsaved.push(token);",""," // break;"," }",""," s = s.substring(0, i) + v + s.substring(j + 1);","","\t\t\tif (!recurse) {","\t\t\t\tlidx = i - 1;","\t\t\t}","\t\t}","\t\t// restore saved {block}s and escaped braces","","\t\treturn s","\t\t\t.replace(savedRegExp, function (str, p1, p2) {","\t\t\t\treturn LBRACE + saved[parseInt(p2,10)] + RBRACE;","\t\t\t})","\t\t\t.replace(lBraceRegExp, LBRACE)","\t\t\t.replace(rBraceRegExp, RBRACE)","\t\t;","\t};",""," Y.substitute = substitute;"," L.substitute = substitute;","","","","}, '3.17.2', {\"requires\": [\"yui-base\"], \"optional\": [\"dump\"]});","","}());"]}; +} +var __cov_oLm$TbFLOpaTkU0hcoHyAA = __coverage__['build/substitute/substitute.js']; +__cov_oLm$TbFLOpaTkU0hcoHyAA.s['1']++;YUI.add('substitute',function(Y,NAME){__cov_oLm$TbFLOpaTkU0hcoHyAA.f['1']++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['2']++;var L=Y.Lang,DUMP='dump',SPACE=' ',LBRACE='{',RBRACE='}',savedRegExp=/(~-(\d+)-~)/g,lBraceRegExp=/\{LBRACE\}/g,rBraceRegExp=/\{RBRACE\}/g,substitute=function(s,o,f,recurse){__cov_oLm$TbFLOpaTkU0hcoHyAA.f['2']++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['3']++;var i,j,k,key,v,meta,saved=[],token,dump,lidx=s.length;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['4']++;for(;;){__cov_oLm$TbFLOpaTkU0hcoHyAA.s['5']++;i=s.lastIndexOf(LBRACE,lidx);__cov_oLm$TbFLOpaTkU0hcoHyAA.s['6']++;if(i<0){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['1'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['7']++;break;}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['1'][1]++;}__cov_oLm$TbFLOpaTkU0hcoHyAA.s['8']++;j=s.indexOf(RBRACE,i);__cov_oLm$TbFLOpaTkU0hcoHyAA.s['9']++;if(i+1>=j){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['2'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['10']++;break;}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['2'][1]++;}__cov_oLm$TbFLOpaTkU0hcoHyAA.s['11']++;token=s.substring(i+1,j);__cov_oLm$TbFLOpaTkU0hcoHyAA.s['12']++;key=token;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['13']++;meta=null;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['14']++;k=key.indexOf(SPACE);__cov_oLm$TbFLOpaTkU0hcoHyAA.s['15']++;if(k>-1){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['3'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['16']++;meta=key.substring(k+1);__cov_oLm$TbFLOpaTkU0hcoHyAA.s['17']++;key=key.substring(0,k);}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['3'][1]++;}__cov_oLm$TbFLOpaTkU0hcoHyAA.s['18']++;v=o[key];__cov_oLm$TbFLOpaTkU0hcoHyAA.s['19']++;if(f){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['4'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['20']++;v=f(key,v,meta);}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['4'][1]++;}__cov_oLm$TbFLOpaTkU0hcoHyAA.s['21']++;if(L.isObject(v)){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['5'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['22']++;if(!Y.dump){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['6'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['23']++;v=v.toString();}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['6'][1]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['24']++;if(L.isArray(v)){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['7'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['25']++;v=Y.dump(v,parseInt(meta,10));}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['7'][1]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['26']++;meta=(__cov_oLm$TbFLOpaTkU0hcoHyAA.b['8'][0]++,meta)||(__cov_oLm$TbFLOpaTkU0hcoHyAA.b['8'][1]++,'');__cov_oLm$TbFLOpaTkU0hcoHyAA.s['27']++;dump=meta.indexOf(DUMP);__cov_oLm$TbFLOpaTkU0hcoHyAA.s['28']++;if(dump>-1){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['9'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['29']++;meta=meta.substring(4);}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['9'][1]++;}__cov_oLm$TbFLOpaTkU0hcoHyAA.s['30']++;if((__cov_oLm$TbFLOpaTkU0hcoHyAA.b['11'][0]++,v.toString===Object.prototype.toString)||(__cov_oLm$TbFLOpaTkU0hcoHyAA.b['11'][1]++,dump>-1)){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['10'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['31']++;v=Y.dump(v,parseInt(meta,10));}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['10'][1]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['32']++;v=v.toString();}}}}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['5'][1]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['33']++;if(L.isUndefined(v)){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['12'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['34']++;v='~-'+saved.length+'-~';__cov_oLm$TbFLOpaTkU0hcoHyAA.s['35']++;saved.push(token);}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['12'][1]++;}}__cov_oLm$TbFLOpaTkU0hcoHyAA.s['36']++;s=s.substring(0,i)+v+s.substring(j+1);__cov_oLm$TbFLOpaTkU0hcoHyAA.s['37']++;if(!recurse){__cov_oLm$TbFLOpaTkU0hcoHyAA.b['13'][0]++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['38']++;lidx=i-1;}else{__cov_oLm$TbFLOpaTkU0hcoHyAA.b['13'][1]++;}}__cov_oLm$TbFLOpaTkU0hcoHyAA.s['39']++;return s.replace(savedRegExp,function(str,p1,p2){__cov_oLm$TbFLOpaTkU0hcoHyAA.f['3']++;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['40']++;return LBRACE+saved[parseInt(p2,10)]+RBRACE;}).replace(lBraceRegExp,LBRACE).replace(rBraceRegExp,RBRACE);;};__cov_oLm$TbFLOpaTkU0hcoHyAA.s['41']++;Y.substitute=substitute;__cov_oLm$TbFLOpaTkU0hcoHyAA.s['42']++;L.substitute=substitute;},'3.17.2',{'requires':['yui-base'],'optional':['dump']}); diff --git a/design/standard/lib/yui/3.17.2/build/substitute/substitute-debug.js b/design/standard/lib/yui/3.17.2/build/substitute/substitute-debug.js new file mode 100644 index 0000000..61a7669 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/substitute/substitute-debug.js @@ -0,0 +1,177 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('substitute', function (Y, NAME) { + +/** + * String variable substitution and string formatting. + * If included, the substitute method is added to the YUI instance. + * + * @module substitute + * @deprecated + */ + + var L = Y.Lang, DUMP = 'dump', SPACE = ' ', LBRACE = '{', RBRACE = '}', + savedRegExp = /(~-(\d+)-~)/g, lBraceRegExp = /\{LBRACE\}/g, rBraceRegExp = /\{RBRACE\}/g, + + /** + * The following methods are added to the YUI instance + * + * Use `Y.Lang.sub` or `Y.Template` instead. + * @class YUI~substitute + * @deprecated + */ + +/** +Use `Y.Lang.sub` or `Y.Template` instead. + + + +Does `{placeholder}` substitution on a string. The object passed as the +second parameter provides values to replace the `{placeholder}`s. +{placeholder} token names must match property names of the object. For +example + +`var greeting = Y.substitute("Hello, {who}!", { who: "World" });` + +`{placeholder}` tokens that are undefined on the object map will be left in +tact (leaving unsightly "{placeholder}"s in the output string). If your +replacement strings *should* include curly braces, use `{LBRACE}` and +`{RBRACE}` in your object map string value. + +If a function is passed as a third argument, it will be called for each +{placeholder} found. The {placeholder} name is passed as the first value +and the value from the object map is passed as the second. If the +{placeholder} contains a space, the first token will be used to identify +the object map property and the remainder will be passed as a third +argument to the function. See below for an example. + +If the value in the object map for a given {placeholder} is an object and +the `dump` module is loaded, the replacement value will be the string +result of calling `Y.dump(...)` with the object as input. Include a +numeric second token in the {placeholder} to configure the depth of the call +to `Y.dump(...)`, e.g. "{someObject 2}". See the +`dump` method for details. + + @method substitute + @deprecated + @param {string} s The string that will be modified. + @param {object} o An object containing the replacement values. + @param {function} f An optional function that can be used to + process each match. It receives the key, + value, and any extra metadata included with + the key inside of the braces. + @param {boolean} recurse if true, the replacement will be recursive, + letting you have replacement tokens in replacement text. + The default is false. + @return {string} the substituted string. + + @example + + function getAttrVal(key, value, name) { + // Return a string describing the named attribute and its value if + // the first token is @. Otherwise, return the value from the + // replacement object. + if (key === "@") { + value += name + " Value: " + myObject.get(name); + } + return value; + } + + // Assuming myObject.set('foo', 'flowers'), + // => "Attr: foo Value: flowers" + var attrVal = Y.substitute("{@ foo}", { "@": "Attr: " }, getAttrVal); + **/ + + substitute = function(s, o, f, recurse) { + var i, j, k, key, v, meta, saved = [], token, dump, + lidx = s.length; + + for (;;) { + i = s.lastIndexOf(LBRACE, lidx); + if (i < 0) { + break; + } + j = s.indexOf(RBRACE, i); + if (i + 1 >= j) { + break; + } + + //Extract key and meta info + token = s.substring(i + 1, j); + key = token; + meta = null; + k = key.indexOf(SPACE); + if (k > -1) { + meta = key.substring(k + 1); + key = key.substring(0, k); + } + + // lookup the value + v = o[key]; + + // if a substitution function was provided, execute it + if (f) { + v = f(key, v, meta); + } + + if (L.isObject(v)) { + if (!Y.dump) { + v = v.toString(); + } else { + if (L.isArray(v)) { + v = Y.dump(v, parseInt(meta, 10)); + } else { + meta = meta || ''; + + // look for the keyword 'dump', if found force obj dump + dump = meta.indexOf(DUMP); + if (dump > -1) { + meta = meta.substring(4); + } + + // use the toString if it is not the Object toString + // and the 'dump' meta info was not found + if (v.toString === Object.prototype.toString || + dump > -1) { + v = Y.dump(v, parseInt(meta, 10)); + } else { + v = v.toString(); + } + } + } + } else if (L.isUndefined(v)) { + // This {block} has no replace string. Save it for later. + v = '~-' + saved.length + '-~'; + saved.push(token); + + // break; + } + + s = s.substring(0, i) + v + s.substring(j + 1); + + if (!recurse) { + lidx = i - 1; + } + } + // restore saved {block}s and escaped braces + + return s + .replace(savedRegExp, function (str, p1, p2) { + return LBRACE + saved[parseInt(p2,10)] + RBRACE; + }) + .replace(lBraceRegExp, LBRACE) + .replace(rBraceRegExp, RBRACE) + ; + }; + + Y.substitute = substitute; + L.substitute = substitute; + + + +}, '3.17.2', {"requires": ["yui-base"], "optional": ["dump"]}); diff --git a/design/standard/lib/yui/3.17.2/build/substitute/substitute-min.js b/design/standard/lib/yui/3.17.2/build/substitute/substitute-min.js new file mode 100644 index 0000000..7d557cb --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/substitute/substitute-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("substitute",function(e,t){var n=e.Lang,r="dump",i=" ",s="{",o="}",u=/(~-(\d+)-~)/g,a=/\{LBRACE\}/g,f=/\{RBRACE\}/g,l=function(t,l,c,h){var p,d,v,m,g,y,b=[],w,E,S=t.length;for(;;){p=t.lastIndexOf(s,S);if(p<0)break;d=t.indexOf(o,p);if(p+1>=d)break;w=t.substring(p+1,d),m=w,y=null,v=m.indexOf(i),v>-1&&(y=m.substring(v+1),m=m.substring(0,v)),g=l[m],c&&(g=c(m,g,y)),n.isObject(g)?e.dump?n.isArray(g)?g=e.dump(g,parseInt(y,10)):(y=y||"",E=y.indexOf(r),E>-1&&(y=y.substring(4)),g.toString===Object.prototype.toString||E>-1?g=e.dump(g,parseInt(y,10)):g=g.toString()):g=g.toString():n.isUndefined(g)&&(g="~-"+b.length+"-~",b.push(w)),t=t.substring(0,p)+g+t.substring(d+1),h||(S=p-1)}return t.replace(u,function(e,t,n){return s+b[parseInt(n,10)]+o}).replace(a,s).replace(f,o)};e.substitute=l,n.substitute=l},"3.17.2",{requires:["yui-base"],optional:["dump"]}); diff --git a/design/standard/lib/yui/3.17.2/build/substitute/substitute.js b/design/standard/lib/yui/3.17.2/build/substitute/substitute.js new file mode 100644 index 0000000..61a7669 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/substitute/substitute.js @@ -0,0 +1,177 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('substitute', function (Y, NAME) { + +/** + * String variable substitution and string formatting. + * If included, the substitute method is added to the YUI instance. + * + * @module substitute + * @deprecated + */ + + var L = Y.Lang, DUMP = 'dump', SPACE = ' ', LBRACE = '{', RBRACE = '}', + savedRegExp = /(~-(\d+)-~)/g, lBraceRegExp = /\{LBRACE\}/g, rBraceRegExp = /\{RBRACE\}/g, + + /** + * The following methods are added to the YUI instance + * + * Use `Y.Lang.sub` or `Y.Template` instead. + * @class YUI~substitute + * @deprecated + */ + +/** +Use `Y.Lang.sub` or `Y.Template` instead. + + + +Does `{placeholder}` substitution on a string. The object passed as the +second parameter provides values to replace the `{placeholder}`s. +{placeholder} token names must match property names of the object. For +example + +`var greeting = Y.substitute("Hello, {who}!", { who: "World" });` + +`{placeholder}` tokens that are undefined on the object map will be left in +tact (leaving unsightly "{placeholder}"s in the output string). If your +replacement strings *should* include curly braces, use `{LBRACE}` and +`{RBRACE}` in your object map string value. + +If a function is passed as a third argument, it will be called for each +{placeholder} found. The {placeholder} name is passed as the first value +and the value from the object map is passed as the second. If the +{placeholder} contains a space, the first token will be used to identify +the object map property and the remainder will be passed as a third +argument to the function. See below for an example. + +If the value in the object map for a given {placeholder} is an object and +the `dump` module is loaded, the replacement value will be the string +result of calling `Y.dump(...)` with the object as input. Include a +numeric second token in the {placeholder} to configure the depth of the call +to `Y.dump(...)`, e.g. "{someObject 2}". See the +`dump` method for details. + + @method substitute + @deprecated + @param {string} s The string that will be modified. + @param {object} o An object containing the replacement values. + @param {function} f An optional function that can be used to + process each match. It receives the key, + value, and any extra metadata included with + the key inside of the braces. + @param {boolean} recurse if true, the replacement will be recursive, + letting you have replacement tokens in replacement text. + The default is false. + @return {string} the substituted string. + + @example + + function getAttrVal(key, value, name) { + // Return a string describing the named attribute and its value if + // the first token is @. Otherwise, return the value from the + // replacement object. + if (key === "@") { + value += name + " Value: " + myObject.get(name); + } + return value; + } + + // Assuming myObject.set('foo', 'flowers'), + // => "Attr: foo Value: flowers" + var attrVal = Y.substitute("{@ foo}", { "@": "Attr: " }, getAttrVal); + **/ + + substitute = function(s, o, f, recurse) { + var i, j, k, key, v, meta, saved = [], token, dump, + lidx = s.length; + + for (;;) { + i = s.lastIndexOf(LBRACE, lidx); + if (i < 0) { + break; + } + j = s.indexOf(RBRACE, i); + if (i + 1 >= j) { + break; + } + + //Extract key and meta info + token = s.substring(i + 1, j); + key = token; + meta = null; + k = key.indexOf(SPACE); + if (k > -1) { + meta = key.substring(k + 1); + key = key.substring(0, k); + } + + // lookup the value + v = o[key]; + + // if a substitution function was provided, execute it + if (f) { + v = f(key, v, meta); + } + + if (L.isObject(v)) { + if (!Y.dump) { + v = v.toString(); + } else { + if (L.isArray(v)) { + v = Y.dump(v, parseInt(meta, 10)); + } else { + meta = meta || ''; + + // look for the keyword 'dump', if found force obj dump + dump = meta.indexOf(DUMP); + if (dump > -1) { + meta = meta.substring(4); + } + + // use the toString if it is not the Object toString + // and the 'dump' meta info was not found + if (v.toString === Object.prototype.toString || + dump > -1) { + v = Y.dump(v, parseInt(meta, 10)); + } else { + v = v.toString(); + } + } + } + } else if (L.isUndefined(v)) { + // This {block} has no replace string. Save it for later. + v = '~-' + saved.length + '-~'; + saved.push(token); + + // break; + } + + s = s.substring(0, i) + v + s.substring(j + 1); + + if (!recurse) { + lidx = i - 1; + } + } + // restore saved {block}s and escaped braces + + return s + .replace(savedRegExp, function (str, p1, p2) { + return LBRACE + saved[parseInt(p2,10)] + RBRACE; + }) + .replace(lBraceRegExp, LBRACE) + .replace(rBraceRegExp, RBRACE) + ; + }; + + Y.substitute = substitute; + L.substitute = substitute; + + + +}, '3.17.2', {"requires": ["yui-base"], "optional": ["dump"]}); diff --git a/design/standard/lib/yui/3.17.2/build/swf/swf-coverage.js b/design/standard/lib/yui/3.17.2/build/swf/swf-coverage.js new file mode 100644 index 0000000..f7b6dd8 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/swf/swf-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/swf/swf.js']) { + __coverage__['build/swf/swf.js'] = {"path":"build/swf/swf.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0,0],"4":[0,0],"5":[0,0],"6":[0,0,0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":34}}},"2":{"name":"SWF","line":54,"loc":{"start":{"line":54,"column":0},"end":{"line":54,"column":86}}},"3":{"name":"(anonymous_3)","line":146,"loc":{"start":{"line":146,"column":19},"end":{"line":146,"column":43}}},"4":{"name":"(anonymous_4)","line":157,"loc":{"start":{"line":157,"column":19},"end":{"line":157,"column":35}}},"5":{"name":"(anonymous_5)","line":175,"loc":{"start":{"line":175,"column":13},"end":{"line":176,"column":4}}},"6":{"name":"(anonymous_6)","line":193,"loc":{"start":{"line":193,"column":14},"end":{"line":194,"column":4}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":204,"column":76}},"2":{"start":{"line":11,"column":4},"end":{"line":24,"column":216}},"3":{"start":{"line":54,"column":0},"end":{"line":127,"column":1}},"4":{"start":{"line":56,"column":4},"end":{"line":56,"column":32}},"5":{"start":{"line":59,"column":4},"end":{"line":59,"column":23}},"6":{"start":{"line":60,"column":4},"end":{"line":60,"column":40}},"7":{"start":{"line":62,"column":4},"end":{"line":62,"column":44}},"8":{"start":{"line":64,"column":4},"end":{"line":64,"column":58}},"9":{"start":{"line":66,"column":4},"end":{"line":66,"column":59}},"10":{"start":{"line":67,"column":4},"end":{"line":67,"column":170}},"11":{"start":{"line":68,"column":4},"end":{"line":68,"column":69}},"12":{"start":{"line":69,"column":4},"end":{"line":69,"column":108}},"13":{"start":{"line":70,"column":4},"end":{"line":70,"column":69}},"14":{"start":{"line":71,"column":4},"end":{"line":71,"column":31}},"15":{"start":{"line":72,"column":4},"end":{"line":72,"column":13}},"16":{"start":{"line":73,"column":4},"end":{"line":73,"column":149}},"17":{"start":{"line":75,"column":4},"end":{"line":75,"column":33}},"18":{"start":{"line":76,"column":4},"end":{"line":126,"column":5}},"19":{"start":{"line":77,"column":8},"end":{"line":77,"column":41}},"20":{"start":{"line":78,"column":8},"end":{"line":82,"column":9}},"21":{"start":{"line":79,"column":12},"end":{"line":79,"column":56}},"22":{"start":{"line":81,"column":12},"end":{"line":81,"column":91}},"23":{"start":{"line":84,"column":8},"end":{"line":84,"column":19}},"24":{"start":{"line":85,"column":8},"end":{"line":85,"column":19}},"25":{"start":{"line":87,"column":8},"end":{"line":87,"column":61}},"26":{"start":{"line":89,"column":8},"end":{"line":91,"column":9}},"27":{"start":{"line":90,"column":12},"end":{"line":90,"column":87}},"28":{"start":{"line":93,"column":8},"end":{"line":97,"column":9}},"29":{"start":{"line":94,"column":12},"end":{"line":96,"column":13}},"30":{"start":{"line":95,"column":16},"end":{"line":95,"column":148}},"31":{"start":{"line":99,"column":8},"end":{"line":104,"column":9}},"32":{"start":{"line":100,"column":12},"end":{"line":100,"column":57}},"33":{"start":{"line":101,"column":12},"end":{"line":103,"column":13}},"34":{"start":{"line":102,"column":16},"end":{"line":102,"column":108}},"35":{"start":{"line":106,"column":8},"end":{"line":108,"column":9}},"36":{"start":{"line":107,"column":12},"end":{"line":107,"column":84}},"37":{"start":{"line":110,"column":8},"end":{"line":110,"column":33}},"38":{"start":{"line":112,"column":8},"end":{"line":112,"column":45}},"39":{"start":{"line":114,"column":8},"end":{"line":114,"column":40}},"40":{"start":{"line":122,"column":8},"end":{"line":122,"column":23}},"41":{"start":{"line":123,"column":8},"end":{"line":123,"column":41}},"42":{"start":{"line":124,"column":8},"end":{"line":124,"column":59}},"43":{"start":{"line":125,"column":8},"end":{"line":125,"column":46}},"44":{"start":{"line":136,"column":0},"end":{"line":136,"column":38}},"45":{"start":{"line":146,"column":0},"end":{"line":148,"column":2}},"46":{"start":{"line":147,"column":4},"end":{"line":147,"column":47}},"47":{"start":{"line":150,"column":0},"end":{"line":197,"column":2}},"48":{"start":{"line":158,"column":8},"end":{"line":164,"column":9}},"49":{"start":{"line":159,"column":12},"end":{"line":159,"column":54}},"50":{"start":{"line":160,"column":12},"end":{"line":160,"column":41}},"51":{"start":{"line":161,"column":15},"end":{"line":164,"column":9}},"52":{"start":{"line":163,"column":12},"end":{"line":163,"column":41}},"53":{"start":{"line":177,"column":4},"end":{"line":179,"column":5}},"54":{"start":{"line":178,"column":10},"end":{"line":178,"column":19}},"55":{"start":{"line":180,"column":8},"end":{"line":184,"column":9}},"56":{"start":{"line":181,"column":8},"end":{"line":181,"column":67}},"57":{"start":{"line":183,"column":8},"end":{"line":183,"column":20}},"58":{"start":{"line":195,"column":8},"end":{"line":195,"column":33}},"59":{"start":{"line":199,"column":0},"end":{"line":199,"column":30}},"60":{"start":{"line":201,"column":0},"end":{"line":201,"column":12}}},"branchMap":{"1":{"line":62,"type":"binary-expr","locations":[{"start":{"line":62,"column":24},"end":{"line":62,"column":37}},{"start":{"line":62,"column":41},"end":{"line":62,"column":43}}]},"2":{"line":64,"type":"binary-expr","locations":[{"start":{"line":64,"column":23},"end":{"line":64,"column":44}},{"start":{"line":64,"column":48},"end":{"line":64,"column":57}}]},"3":{"line":69,"type":"binary-expr","locations":[{"start":{"line":69,"column":31},"end":{"line":69,"column":48}},{"start":{"line":69,"column":52},"end":{"line":69,"column":72}},{"start":{"line":69,"column":76},"end":{"line":69,"column":107}}]},"4":{"line":70,"type":"cond-expr","locations":[{"start":{"line":70,"column":42},"end":{"line":70,"column":61}},{"start":{"line":70,"column":62},"end":{"line":70,"column":68}}]},"5":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":4},"end":{"line":76,"column":4}},{"start":{"line":76,"column":4},"end":{"line":76,"column":4}}]},"6":{"line":76,"type":"binary-expr","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":16}},{"start":{"line":76,"column":21},"end":{"line":76,"column":40}},{"start":{"line":76,"column":44},"end":{"line":76,"column":64}},{"start":{"line":76,"column":69},"end":{"line":76,"column":77}}]},"7":{"line":78,"type":"if","locations":[{"start":{"line":78,"column":8},"end":{"line":78,"column":8}},{"start":{"line":78,"column":8},"end":{"line":78,"column":8}}]},"8":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":8},"end":{"line":89,"column":8}},{"start":{"line":89,"column":8},"end":{"line":89,"column":8}}]},"9":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":94,"column":12}},{"start":{"line":94,"column":12},"end":{"line":94,"column":12}}]},"10":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":12},"end":{"line":101,"column":12}},{"start":{"line":101,"column":12},"end":{"line":101,"column":12}}]},"11":{"line":106,"type":"if","locations":[{"start":{"line":106,"column":8},"end":{"line":106,"column":8}},{"start":{"line":106,"column":8},"end":{"line":106,"column":8}}]},"12":{"line":136,"type":"binary-expr","locations":[{"start":{"line":136,"column":17},"end":{"line":136,"column":31}},{"start":{"line":136,"column":35},"end":{"line":136,"column":37}}]},"13":{"line":158,"type":"if","locations":[{"start":{"line":158,"column":8},"end":{"line":158,"column":8}},{"start":{"line":158,"column":8},"end":{"line":158,"column":8}}]},"14":{"line":161,"type":"if","locations":[{"start":{"line":161,"column":15},"end":{"line":161,"column":15}},{"start":{"line":161,"column":15},"end":{"line":161,"column":15}}]},"15":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":4},"end":{"line":177,"column":4}},{"start":{"line":177,"column":4},"end":{"line":177,"column":4}}]},"16":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":8},"end":{"line":180,"column":8}},{"start":{"line":180,"column":8},"end":{"line":180,"column":8}}]}},"code":["(function () { YUI.add('swf', function (Y, NAME) {","","/**"," * Embed a Flash applications in a standard manner and communicate with it"," * via External Interface."," * @module swf"," * @deprecated The swf module is deprecated and will not be replaced. YUI has"," * no plans for providing a utility for embedding Flash into HTML pages. "," */",""," var Event = Y.Event,"," SWFDetect = Y.SWFDetect,"," Lang = Y.Lang,"," uA = Y.UA,"," Node = Y.Node,"," Escape = Y.Escape,",""," // private"," FLASH_CID = \"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\","," FLASH_TYPE = \"application/x-shockwave-flash\","," FLASH_VER = \"10.0.22\","," EXPRESS_INSTALL_URL = \"http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?\" + Math.random(),"," EVENT_HANDLER = \"SWF.eventHandler\","," possibleAttributes = {align:\"\", allowFullScreen:\"\", allowNetworking:\"\", allowScriptAccess:\"\", base:\"\", bgcolor:\"\", loop:\"\", menu:\"\", name:\"\", play: \"\", quality:\"\", salign:\"\", scale:\"\", tabindex:\"\", wmode:\"\"};",""," /**"," * The SWF utility is a tool for embedding Flash applications in HTML pages."," * @module swf"," * @title SWF Utility"," * @requires event-custom, node, swfdetect"," */",""," /**"," * Creates the SWF instance and keeps the configuration data"," *"," * @class SWF"," * @deprecated"," * @uses Y.Event.Target"," * @constructor"," * @param {String|HTMLElement} id The id of the element, or the element itself that the SWF will be inserted into."," * The width and height of the SWF will be set to the width and height of this container element."," * @param {String} swfURL The URL of the SWF to be embedded into the page."," * @param {Object} p_oAttributes (optional) Configuration parameters for the Flash application and values for Flashvars"," * to be passed to the SWF. The p_oAttributes object allows the following additional properties:"," *
"," *
version : String
"," *
The minimum version of Flash required on the user's machine.
"," *
fixedAttributes : Object
"," *
An object literal containing one or more of the following String keys and their values: align,"," * allowFullScreen, allowNetworking, allowScriptAccess, base, bgcolor, menu, name, quality, salign, scale,"," * tabindex, wmode. event from the thumb
"," *
"," */","function SWF (p_oElement /*:String*/, swfURL /*:String*/, p_oAttributes /*:Object*/ ) {",""," this._id = Y.guid(\"yuiswf\");","",""," var _id = this._id;"," var oElement = Node.one(p_oElement);",""," var p_oAttributes = p_oAttributes || {};",""," var flashVersion = p_oAttributes.version || FLASH_VER;",""," var flashVersionSplit = (flashVersion + '').split(\".\");"," var isFlashVersionRight = SWFDetect.isFlashVersionAtLeast(parseInt(flashVersionSplit[0], 10), parseInt(flashVersionSplit[1], 10), parseInt(flashVersionSplit[2], 10));"," var canExpressInstall = (SWFDetect.isFlashVersionAtLeast(8,0,0));"," var shouldExpressInstall = canExpressInstall && !isFlashVersionRight && p_oAttributes.useExpressInstall;"," var flashURL = (shouldExpressInstall)?EXPRESS_INSTALL_URL:swfURL;"," var objstring = '';",""," if (uA.ie) {"," objstring += '';"," }",""," for (var attribute in p_oAttributes.fixedAttributes) {"," if (possibleAttributes.hasOwnProperty(attribute)) {"," objstring += '';"," }"," }",""," for (var flashvar in p_oAttributes.flashVars) {"," var fvar = p_oAttributes.flashVars[flashvar];"," if (Lang.isString(fvar)) {"," flashvarstring += \"&\" + Escape.html(flashvar) + \"=\" + Escape.html(encodeURIComponent(fvar));"," }"," }",""," if (flashvarstring) {"," objstring += '';"," }",""," objstring += \"\";"," //using innerHTML as setHTML/setContent causes some issues with ExternalInterface for IE versions of the player"," oElement.set(\"innerHTML\", objstring);",""," this._swf = Node.one(\"#\" + _id);"," } else {"," /**"," * Fired when the Flash player version on the user's machine is"," * below the required value."," *"," * @event wrongflashversion"," */"," var event = {};"," event.type = \"wrongflashversion\";"," this.publish(\"wrongflashversion\", {fireOnce:true});"," this.fire(\"wrongflashversion\", event);"," }","}","","/**"," * @private"," * The static collection of all instances of the SWFs on the page."," * @property _instances"," * @type Object"," */","","SWF._instances = SWF._instances || {};","","/**"," * @private"," * Handles an event coming from within the SWF and delegate it"," * to a specific instance of SWF."," * @method eventHandler"," * @param swfid {String} the id of the SWF dispatching the event"," * @param event {Object} the event being transmitted."," */","SWF.eventHandler = function (swfid, event) {"," SWF._instances[swfid]._eventHandler(event);","};","","SWF.prototype = {"," /**"," * @private"," * Propagates a specific event from Flash to JS."," * @method _eventHandler"," * @param event {Object} The event to be propagated from Flash."," */"," _eventHandler: function(event) {"," if (event.type === \"swfReady\") {"," this.publish(\"swfReady\", {fireOnce:true});"," this.fire(\"swfReady\", event);"," } else if(event.type === \"log\") {"," } else {"," this.fire(event.type, event);"," }"," },",""," /**"," * Calls a specific function exposed by the SWF's"," * ExternalInterface."," * @method callSWF"," * @param func {String} the name of the function to call"," * @param args {Array} the set of arguments to pass to the function."," */",""," callSWF: function (func, args)"," {"," if (!args) {"," args= [];"," }"," if (this._swf._node[func]) {"," return(this._swf._node[func].apply(this._swf._node, args));"," } else {"," return null;"," }"," },",""," /**"," * Public accessor to the unique name of the SWF instance."," *"," * @method toString"," * @return {String} Unique name of the SWF instance."," */"," toString: function()"," {"," return \"SWF \" + this._id;"," }","};","","Y.augment(SWF, Y.EventTarget);","","Y.SWF = SWF;","","","}, '3.17.2', {\"requires\": [\"event-custom\", \"node\", \"swfdetect\", \"escape\"]});","","}());"]}; +} +var __cov_luKNXPi9xmOpoiqYDUCxtw = __coverage__['build/swf/swf.js']; +__cov_luKNXPi9xmOpoiqYDUCxtw.s['1']++;YUI.add('swf',function(Y,NAME){__cov_luKNXPi9xmOpoiqYDUCxtw.f['1']++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['2']++;var Event=Y.Event,SWFDetect=Y.SWFDetect,Lang=Y.Lang,uA=Y.UA,Node=Y.Node,Escape=Y.Escape,FLASH_CID='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',FLASH_TYPE='application/x-shockwave-flash',FLASH_VER='10.0.22',EXPRESS_INSTALL_URL='http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?'+Math.random(),EVENT_HANDLER='SWF.eventHandler',possibleAttributes={align:'',allowFullScreen:'',allowNetworking:'',allowScriptAccess:'',base:'',bgcolor:'',loop:'',menu:'',name:'',play:'',quality:'',salign:'',scale:'',tabindex:'',wmode:''};__cov_luKNXPi9xmOpoiqYDUCxtw.s['3']++;function SWF(p_oElement,swfURL,p_oAttributes){__cov_luKNXPi9xmOpoiqYDUCxtw.f['2']++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['4']++;this._id=Y.guid('yuiswf');__cov_luKNXPi9xmOpoiqYDUCxtw.s['5']++;var _id=this._id;__cov_luKNXPi9xmOpoiqYDUCxtw.s['6']++;var oElement=Node.one(p_oElement);__cov_luKNXPi9xmOpoiqYDUCxtw.s['7']++;var p_oAttributes=(__cov_luKNXPi9xmOpoiqYDUCxtw.b['1'][0]++,p_oAttributes)||(__cov_luKNXPi9xmOpoiqYDUCxtw.b['1'][1]++,{});__cov_luKNXPi9xmOpoiqYDUCxtw.s['8']++;var flashVersion=(__cov_luKNXPi9xmOpoiqYDUCxtw.b['2'][0]++,p_oAttributes.version)||(__cov_luKNXPi9xmOpoiqYDUCxtw.b['2'][1]++,FLASH_VER);__cov_luKNXPi9xmOpoiqYDUCxtw.s['9']++;var flashVersionSplit=(flashVersion+'').split('.');__cov_luKNXPi9xmOpoiqYDUCxtw.s['10']++;var isFlashVersionRight=SWFDetect.isFlashVersionAtLeast(parseInt(flashVersionSplit[0],10),parseInt(flashVersionSplit[1],10),parseInt(flashVersionSplit[2],10));__cov_luKNXPi9xmOpoiqYDUCxtw.s['11']++;var canExpressInstall=SWFDetect.isFlashVersionAtLeast(8,0,0);__cov_luKNXPi9xmOpoiqYDUCxtw.s['12']++;var shouldExpressInstall=(__cov_luKNXPi9xmOpoiqYDUCxtw.b['3'][0]++,canExpressInstall)&&(__cov_luKNXPi9xmOpoiqYDUCxtw.b['3'][1]++,!isFlashVersionRight)&&(__cov_luKNXPi9xmOpoiqYDUCxtw.b['3'][2]++,p_oAttributes.useExpressInstall);__cov_luKNXPi9xmOpoiqYDUCxtw.s['13']++;var flashURL=shouldExpressInstall?(__cov_luKNXPi9xmOpoiqYDUCxtw.b['4'][0]++,EXPRESS_INSTALL_URL):(__cov_luKNXPi9xmOpoiqYDUCxtw.b['4'][1]++,swfURL);__cov_luKNXPi9xmOpoiqYDUCxtw.s['14']++;var objstring='';__cov_luKNXPi9xmOpoiqYDUCxtw.s['26']++;if(uA.ie){__cov_luKNXPi9xmOpoiqYDUCxtw.b['8'][0]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['27']++;objstring+='';}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['8'][1]++;}__cov_luKNXPi9xmOpoiqYDUCxtw.s['28']++;for(var attribute in p_oAttributes.fixedAttributes){__cov_luKNXPi9xmOpoiqYDUCxtw.s['29']++;if(possibleAttributes.hasOwnProperty(attribute)){__cov_luKNXPi9xmOpoiqYDUCxtw.b['9'][0]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['30']++;objstring+='';}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['9'][1]++;}}__cov_luKNXPi9xmOpoiqYDUCxtw.s['31']++;for(var flashvar in p_oAttributes.flashVars){__cov_luKNXPi9xmOpoiqYDUCxtw.s['32']++;var fvar=p_oAttributes.flashVars[flashvar];__cov_luKNXPi9xmOpoiqYDUCxtw.s['33']++;if(Lang.isString(fvar)){__cov_luKNXPi9xmOpoiqYDUCxtw.b['10'][0]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['34']++;flashvarstring+='&'+Escape.html(flashvar)+'='+Escape.html(encodeURIComponent(fvar));}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['10'][1]++;}}__cov_luKNXPi9xmOpoiqYDUCxtw.s['35']++;if(flashvarstring){__cov_luKNXPi9xmOpoiqYDUCxtw.b['11'][0]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['36']++;objstring+='';}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['11'][1]++;}__cov_luKNXPi9xmOpoiqYDUCxtw.s['37']++;objstring+='';__cov_luKNXPi9xmOpoiqYDUCxtw.s['38']++;oElement.set('innerHTML',objstring);__cov_luKNXPi9xmOpoiqYDUCxtw.s['39']++;this._swf=Node.one('#'+_id);}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['5'][1]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['40']++;var event={};__cov_luKNXPi9xmOpoiqYDUCxtw.s['41']++;event.type='wrongflashversion';__cov_luKNXPi9xmOpoiqYDUCxtw.s['42']++;this.publish('wrongflashversion',{fireOnce:true});__cov_luKNXPi9xmOpoiqYDUCxtw.s['43']++;this.fire('wrongflashversion',event);}}__cov_luKNXPi9xmOpoiqYDUCxtw.s['44']++;SWF._instances=(__cov_luKNXPi9xmOpoiqYDUCxtw.b['12'][0]++,SWF._instances)||(__cov_luKNXPi9xmOpoiqYDUCxtw.b['12'][1]++,{});__cov_luKNXPi9xmOpoiqYDUCxtw.s['45']++;SWF.eventHandler=function(swfid,event){__cov_luKNXPi9xmOpoiqYDUCxtw.f['3']++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['46']++;SWF._instances[swfid]._eventHandler(event);};__cov_luKNXPi9xmOpoiqYDUCxtw.s['47']++;SWF.prototype={_eventHandler:function(event){__cov_luKNXPi9xmOpoiqYDUCxtw.f['4']++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['48']++;if(event.type==='swfReady'){__cov_luKNXPi9xmOpoiqYDUCxtw.b['13'][0]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['49']++;this.publish('swfReady',{fireOnce:true});__cov_luKNXPi9xmOpoiqYDUCxtw.s['50']++;this.fire('swfReady',event);}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['13'][1]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['51']++;if(event.type==='log'){__cov_luKNXPi9xmOpoiqYDUCxtw.b['14'][0]++;}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['14'][1]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['52']++;this.fire(event.type,event);}}},callSWF:function(func,args){__cov_luKNXPi9xmOpoiqYDUCxtw.f['5']++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['53']++;if(!args){__cov_luKNXPi9xmOpoiqYDUCxtw.b['15'][0]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['54']++;args=[];}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['15'][1]++;}__cov_luKNXPi9xmOpoiqYDUCxtw.s['55']++;if(this._swf._node[func]){__cov_luKNXPi9xmOpoiqYDUCxtw.b['16'][0]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['56']++;return this._swf._node[func].apply(this._swf._node,args);}else{__cov_luKNXPi9xmOpoiqYDUCxtw.b['16'][1]++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['57']++;return null;}},toString:function(){__cov_luKNXPi9xmOpoiqYDUCxtw.f['6']++;__cov_luKNXPi9xmOpoiqYDUCxtw.s['58']++;return'SWF '+this._id;}};__cov_luKNXPi9xmOpoiqYDUCxtw.s['59']++;Y.augment(SWF,Y.EventTarget);__cov_luKNXPi9xmOpoiqYDUCxtw.s['60']++;Y.SWF=SWF;},'3.17.2',{'requires':['event-custom','node','swfdetect','escape']}); diff --git a/design/standard/lib/yui/3.17.2/build/swf/swf-debug.js b/design/standard/lib/yui/3.17.2/build/swf/swf-debug.js new file mode 100644 index 0000000..75d450b --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/swf/swf-debug.js @@ -0,0 +1,213 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('swf', function (Y, NAME) { + +/** + * Embed a Flash applications in a standard manner and communicate with it + * via External Interface. + * @module swf + * @deprecated The swf module is deprecated and will not be replaced. YUI has + * no plans for providing a utility for embedding Flash into HTML pages. + */ + + var Event = Y.Event, + SWFDetect = Y.SWFDetect, + Lang = Y.Lang, + uA = Y.UA, + Node = Y.Node, + Escape = Y.Escape, + + // private + FLASH_CID = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", + FLASH_TYPE = "application/x-shockwave-flash", + FLASH_VER = "10.0.22", + EXPRESS_INSTALL_URL = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random(), + EVENT_HANDLER = "SWF.eventHandler", + possibleAttributes = {align:"", allowFullScreen:"", allowNetworking:"", allowScriptAccess:"", base:"", bgcolor:"", loop:"", menu:"", name:"", play: "", quality:"", salign:"", scale:"", tabindex:"", wmode:""}; + + /** + * The SWF utility is a tool for embedding Flash applications in HTML pages. + * @module swf + * @title SWF Utility + * @requires event-custom, node, swfdetect + */ + + /** + * Creates the SWF instance and keeps the configuration data + * + * @class SWF + * @deprecated + * @uses Y.Event.Target + * @constructor + * @param {String|HTMLElement} id The id of the element, or the element itself that the SWF will be inserted into. + * The width and height of the SWF will be set to the width and height of this container element. + * @param {String} swfURL The URL of the SWF to be embedded into the page. + * @param {Object} p_oAttributes (optional) Configuration parameters for the Flash application and values for Flashvars + * to be passed to the SWF. The p_oAttributes object allows the following additional properties: + *
+ *
version : String
+ *
The minimum version of Flash required on the user's machine.
+ *
fixedAttributes : Object
+ *
An object literal containing one or more of the following String keys and their values: align, + * allowFullScreen, allowNetworking, allowScriptAccess, base, bgcolor, menu, name, quality, salign, scale, + * tabindex, wmode. event from the thumb
+ *
+ */ +Y.log("The swf module is deprecated as of v3.13.0. YUI has no plans for providing a utility for embedding Flash into HTML pages.", "warn"); +function SWF (p_oElement /*:String*/, swfURL /*:String*/, p_oAttributes /*:Object*/ ) { + + this._id = Y.guid("yuiswf"); + + + var _id = this._id; + var oElement = Node.one(p_oElement); + + var p_oAttributes = p_oAttributes || {}; + + var flashVersion = p_oAttributes.version || FLASH_VER; + + var flashVersionSplit = (flashVersion + '').split("."); + var isFlashVersionRight = SWFDetect.isFlashVersionAtLeast(parseInt(flashVersionSplit[0], 10), parseInt(flashVersionSplit[1], 10), parseInt(flashVersionSplit[2], 10)); + var canExpressInstall = (SWFDetect.isFlashVersionAtLeast(8,0,0)); + var shouldExpressInstall = canExpressInstall && !isFlashVersionRight && p_oAttributes.useExpressInstall; + var flashURL = (shouldExpressInstall)?EXPRESS_INSTALL_URL:swfURL; + var objstring = ''; + + if (uA.ie) { + objstring += ''; + } + + for (var attribute in p_oAttributes.fixedAttributes) { + if (possibleAttributes.hasOwnProperty(attribute)) { + objstring += ''; + } + } + + for (var flashvar in p_oAttributes.flashVars) { + var fvar = p_oAttributes.flashVars[flashvar]; + if (Lang.isString(fvar)) { + flashvarstring += "&" + Escape.html(flashvar) + "=" + Escape.html(encodeURIComponent(fvar)); + } + } + + if (flashvarstring) { + objstring += ''; + } + + objstring += ""; + //using innerHTML as setHTML/setContent causes some issues with ExternalInterface for IE versions of the player + oElement.set("innerHTML", objstring); + + this._swf = Node.one("#" + _id); + } else { + /** + * Fired when the Flash player version on the user's machine is + * below the required value. + * + * @event wrongflashversion + */ + var event = {}; + event.type = "wrongflashversion"; + this.publish("wrongflashversion", {fireOnce:true}); + this.fire("wrongflashversion", event); + } +} + +/** + * @private + * The static collection of all instances of the SWFs on the page. + * @property _instances + * @type Object + */ + +SWF._instances = SWF._instances || {}; + +/** + * @private + * Handles an event coming from within the SWF and delegate it + * to a specific instance of SWF. + * @method eventHandler + * @param swfid {String} the id of the SWF dispatching the event + * @param event {Object} the event being transmitted. + */ +SWF.eventHandler = function (swfid, event) { + SWF._instances[swfid]._eventHandler(event); +}; + +SWF.prototype = { + /** + * @private + * Propagates a specific event from Flash to JS. + * @method _eventHandler + * @param event {Object} The event to be propagated from Flash. + */ + _eventHandler: function(event) { + if (event.type === "swfReady") { + this.publish("swfReady", {fireOnce:true}); + this.fire("swfReady", event); + } else if(event.type === "log") { + Y.log(event.message, event.category, this.toString()); + } else { + this.fire(event.type, event); + } + }, + + /** + * Calls a specific function exposed by the SWF's + * ExternalInterface. + * @method callSWF + * @param func {String} the name of the function to call + * @param args {Array} the set of arguments to pass to the function. + */ + + callSWF: function (func, args) + { + if (!args) { + args= []; + } + if (this._swf._node[func]) { + return(this._swf._node[func].apply(this._swf._node, args)); + } else { + return null; + } + }, + + /** + * Public accessor to the unique name of the SWF instance. + * + * @method toString + * @return {String} Unique name of the SWF instance. + */ + toString: function() + { + return "SWF " + this._id; + } +}; + +Y.augment(SWF, Y.EventTarget); + +Y.SWF = SWF; + + +}, '3.17.2', {"requires": ["event-custom", "node", "swfdetect", "escape"]}); diff --git a/design/standard/lib/yui/3.17.2/build/swf/swf-min.js b/design/standard/lib/yui/3.17.2/build/swf/swf-min.js new file mode 100644 index 0000000..9fb3151 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/swf/swf-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("swf",function(e,t){function d(t,n,d){this._id=e.guid("yuiswf");var v=this._id,m=o.one(t),d=d||{},g=d.version||l,y=(g+"").split("."),b=r.isFlashVersionAtLeast(parseInt(y[0],10),parseInt(y[1],10),parseInt(y[2],10)),w=r.isFlashVersionAtLeast(8,0,0),E=w&&!b&&d.useExpressInstall,S=E?c:n,x="',s.ie&&(x+='');for(var k in d.fixedAttributes)p.hasOwnProperty(k)&&(x+='');for(var L in d.flashVars){var A=d.flashVars[L];i.isString(A)&&(C+="&"+u.html(L)+"="+u.html(encodeURIComponent(A)))}C&&(x+=''),x+="",m.set("innerHTML",x),this._swf=o.one("#"+v)}else{var O={};O.type="wrongflashversion",this.publish("wrongflashversion",{fireOnce:!0}),this.fire("wrongflashversion",O)}}var n=e.Event,r=e.SWFDetect,i=e.Lang,s=e.UA,o=e.Node,u=e.Escape,a="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",f="application/x-shockwave-flash",l="10.0.22",c="http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+Math.random(),h="SWF.eventHandler",p={align:"",allowFullScreen:"",allowNetworking:"",allowScriptAccess:"",base:"",bgcolor:"",loop:"",menu:"",name:"",play:"",quality:"",salign:"",scale:"",tabindex:"",wmode:""};d._instances=d._instances||{},d.eventHandler=function(e,t){d._instances[e]._eventHandler(t)},d.prototype={_eventHandler:function(e){e.type==="swfReady"?(this.publish("swfReady",{fireOnce:!0}),this.fire("swfReady",e)):e.type!=="log"&&this.fire(e.type,e)},callSWF:function(e,t){return t||(t=[]),this._swf._node[e]?this._swf._node[e].apply(this._swf._node,t):null},toString:function(){return"SWF "+this._id}},e.augment(d,e.EventTarget),e.SWF=d},"3.17.2",{requires:["event-custom","node","swfdetect","escape"]}); diff --git a/design/standard/lib/yui/3.17.2/build/swf/swf.js b/design/standard/lib/yui/3.17.2/build/swf/swf.js new file mode 100644 index 0000000..7f89b5a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/swf/swf.js @@ -0,0 +1,211 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('swf', function (Y, NAME) { + +/** + * Embed a Flash applications in a standard manner and communicate with it + * via External Interface. + * @module swf + * @deprecated The swf module is deprecated and will not be replaced. YUI has + * no plans for providing a utility for embedding Flash into HTML pages. + */ + + var Event = Y.Event, + SWFDetect = Y.SWFDetect, + Lang = Y.Lang, + uA = Y.UA, + Node = Y.Node, + Escape = Y.Escape, + + // private + FLASH_CID = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", + FLASH_TYPE = "application/x-shockwave-flash", + FLASH_VER = "10.0.22", + EXPRESS_INSTALL_URL = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random(), + EVENT_HANDLER = "SWF.eventHandler", + possibleAttributes = {align:"", allowFullScreen:"", allowNetworking:"", allowScriptAccess:"", base:"", bgcolor:"", loop:"", menu:"", name:"", play: "", quality:"", salign:"", scale:"", tabindex:"", wmode:""}; + + /** + * The SWF utility is a tool for embedding Flash applications in HTML pages. + * @module swf + * @title SWF Utility + * @requires event-custom, node, swfdetect + */ + + /** + * Creates the SWF instance and keeps the configuration data + * + * @class SWF + * @deprecated + * @uses Y.Event.Target + * @constructor + * @param {String|HTMLElement} id The id of the element, or the element itself that the SWF will be inserted into. + * The width and height of the SWF will be set to the width and height of this container element. + * @param {String} swfURL The URL of the SWF to be embedded into the page. + * @param {Object} p_oAttributes (optional) Configuration parameters for the Flash application and values for Flashvars + * to be passed to the SWF. The p_oAttributes object allows the following additional properties: + *
+ *
version : String
+ *
The minimum version of Flash required on the user's machine.
+ *
fixedAttributes : Object
+ *
An object literal containing one or more of the following String keys and their values: align, + * allowFullScreen, allowNetworking, allowScriptAccess, base, bgcolor, menu, name, quality, salign, scale, + * tabindex, wmode. event from the thumb
+ *
+ */ +function SWF (p_oElement /*:String*/, swfURL /*:String*/, p_oAttributes /*:Object*/ ) { + + this._id = Y.guid("yuiswf"); + + + var _id = this._id; + var oElement = Node.one(p_oElement); + + var p_oAttributes = p_oAttributes || {}; + + var flashVersion = p_oAttributes.version || FLASH_VER; + + var flashVersionSplit = (flashVersion + '').split("."); + var isFlashVersionRight = SWFDetect.isFlashVersionAtLeast(parseInt(flashVersionSplit[0], 10), parseInt(flashVersionSplit[1], 10), parseInt(flashVersionSplit[2], 10)); + var canExpressInstall = (SWFDetect.isFlashVersionAtLeast(8,0,0)); + var shouldExpressInstall = canExpressInstall && !isFlashVersionRight && p_oAttributes.useExpressInstall; + var flashURL = (shouldExpressInstall)?EXPRESS_INSTALL_URL:swfURL; + var objstring = ''; + + if (uA.ie) { + objstring += ''; + } + + for (var attribute in p_oAttributes.fixedAttributes) { + if (possibleAttributes.hasOwnProperty(attribute)) { + objstring += ''; + } + } + + for (var flashvar in p_oAttributes.flashVars) { + var fvar = p_oAttributes.flashVars[flashvar]; + if (Lang.isString(fvar)) { + flashvarstring += "&" + Escape.html(flashvar) + "=" + Escape.html(encodeURIComponent(fvar)); + } + } + + if (flashvarstring) { + objstring += ''; + } + + objstring += ""; + //using innerHTML as setHTML/setContent causes some issues with ExternalInterface for IE versions of the player + oElement.set("innerHTML", objstring); + + this._swf = Node.one("#" + _id); + } else { + /** + * Fired when the Flash player version on the user's machine is + * below the required value. + * + * @event wrongflashversion + */ + var event = {}; + event.type = "wrongflashversion"; + this.publish("wrongflashversion", {fireOnce:true}); + this.fire("wrongflashversion", event); + } +} + +/** + * @private + * The static collection of all instances of the SWFs on the page. + * @property _instances + * @type Object + */ + +SWF._instances = SWF._instances || {}; + +/** + * @private + * Handles an event coming from within the SWF and delegate it + * to a specific instance of SWF. + * @method eventHandler + * @param swfid {String} the id of the SWF dispatching the event + * @param event {Object} the event being transmitted. + */ +SWF.eventHandler = function (swfid, event) { + SWF._instances[swfid]._eventHandler(event); +}; + +SWF.prototype = { + /** + * @private + * Propagates a specific event from Flash to JS. + * @method _eventHandler + * @param event {Object} The event to be propagated from Flash. + */ + _eventHandler: function(event) { + if (event.type === "swfReady") { + this.publish("swfReady", {fireOnce:true}); + this.fire("swfReady", event); + } else if(event.type === "log") { + } else { + this.fire(event.type, event); + } + }, + + /** + * Calls a specific function exposed by the SWF's + * ExternalInterface. + * @method callSWF + * @param func {String} the name of the function to call + * @param args {Array} the set of arguments to pass to the function. + */ + + callSWF: function (func, args) + { + if (!args) { + args= []; + } + if (this._swf._node[func]) { + return(this._swf._node[func].apply(this._swf._node, args)); + } else { + return null; + } + }, + + /** + * Public accessor to the unique name of the SWF instance. + * + * @method toString + * @return {String} Unique name of the SWF instance. + */ + toString: function() + { + return "SWF " + this._id; + } +}; + +Y.augment(SWF, Y.EventTarget); + +Y.SWF = SWF; + + +}, '3.17.2', {"requires": ["event-custom", "node", "swfdetect", "escape"]}); diff --git a/design/standard/lib/yui/3.17.2/build/swfdetect/swfdetect-coverage.js b/design/standard/lib/yui/3.17.2/build/swfdetect/swfdetect-coverage.js new file mode 100644 index 0000000..51a7839 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/swfdetect/swfdetect-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/swfdetect/swfdetect.js']) { + __coverage__['build/swfdetect/swfdetect.js'] = {"path":"build/swfdetect/swfdetect.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":40}}},"2":{"name":"makeInt","line":15,"loc":{"start":{"line":15,"column":0},"end":{"line":15,"column":20}}},"3":{"name":"parseFlashVersion","line":19,"loc":{"start":{"line":19,"column":0},"end":{"line":19,"column":38}}},"4":{"name":"(anonymous_4)","line":82,"loc":{"start":{"line":82,"column":22},"end":{"line":82,"column":34}}},"5":{"name":"(anonymous_5)","line":95,"loc":{"start":{"line":95,"column":28},"end":{"line":95,"column":72}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":115,"column":41}},"2":{"start":{"line":9,"column":0},"end":{"line":13,"column":24}},"3":{"start":{"line":15,"column":0},"end":{"line":17,"column":1}},"4":{"start":{"line":16,"column":4},"end":{"line":16,"column":27}},"5":{"start":{"line":19,"column":0},"end":{"line":31,"column":1}},"6":{"start":{"line":20,"column":4},"end":{"line":22,"column":5}},"7":{"start":{"line":21,"column":8},"end":{"line":21,"column":36}},"8":{"start":{"line":24,"column":4},"end":{"line":26,"column":5}},"9":{"start":{"line":25,"column":8},"end":{"line":25,"column":36}},"10":{"start":{"line":28,"column":4},"end":{"line":30,"column":5}},"11":{"start":{"line":29,"column":8},"end":{"line":29,"column":34}},"12":{"start":{"line":33,"column":0},"end":{"line":62,"column":1}},"13":{"start":{"line":34,"column":3},"end":{"line":39,"column":4}},"14":{"start":{"line":35,"column":6},"end":{"line":38,"column":7}},"15":{"start":{"line":36,"column":9},"end":{"line":36,"column":92}},"16":{"start":{"line":37,"column":9},"end":{"line":37,"column":31}},"17":{"start":{"line":41,"column":5},"end":{"line":62,"column":1}},"18":{"start":{"line":42,"column":4},"end":{"line":53,"column":5}},"19":{"start":{"line":44,"column":8},"end":{"line":44,"column":54}},"20":{"start":{"line":45,"column":8},"end":{"line":45,"column":41}},"21":{"start":{"line":49,"column":8},"end":{"line":52,"column":9}},"22":{"start":{"line":51,"column":12},"end":{"line":51,"column":26}},"23":{"start":{"line":54,"column":4},"end":{"line":61,"column":5}},"24":{"start":{"line":55,"column":4},"end":{"line":60,"column":19}},"25":{"start":{"line":57,"column":8},"end":{"line":57,"column":46}},"26":{"start":{"line":58,"column":8},"end":{"line":58,"column":79}},"27":{"start":{"line":59,"column":8},"end":{"line":59,"column":30}},"28":{"start":{"line":73,"column":0},"end":{"line":112,"column":2}},"29":{"start":{"line":83,"column":8},"end":{"line":83,"column":97}},"30":{"start":{"line":96,"column":8},"end":{"line":98,"column":46}},"31":{"start":{"line":100,"column":8},"end":{"line":100,"column":46}},"32":{"start":{"line":101,"column":8},"end":{"line":101,"column":46}},"33":{"start":{"line":102,"column":8},"end":{"line":102,"column":44}},"34":{"start":{"line":104,"column":8},"end":{"line":109,"column":9}},"35":{"start":{"line":105,"column":12},"end":{"line":107,"column":13}},"36":{"start":{"line":106,"column":16},"end":{"line":106,"column":41}},"37":{"start":{"line":108,"column":12},"end":{"line":108,"column":40}},"38":{"start":{"line":110,"column":8},"end":{"line":110,"column":36}}},"branchMap":{"1":{"line":20,"type":"if","locations":[{"start":{"line":20,"column":4},"end":{"line":20,"column":4}},{"start":{"line":20,"column":4},"end":{"line":20,"column":4}}]},"2":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":4},"end":{"line":24,"column":4}},{"start":{"line":24,"column":4},"end":{"line":24,"column":4}}]},"3":{"line":28,"type":"if","locations":[{"start":{"line":28,"column":4},"end":{"line":28,"column":4}},{"start":{"line":28,"column":4},"end":{"line":28,"column":4}}]},"4":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":0},"end":{"line":33,"column":0}},{"start":{"line":33,"column":0},"end":{"line":33,"column":0}}]},"5":{"line":33,"type":"binary-expr","locations":[{"start":{"line":33,"column":4},"end":{"line":33,"column":12}},{"start":{"line":33,"column":16},"end":{"line":33,"column":25}},{"start":{"line":33,"column":29},"end":{"line":33,"column":37}}]},"6":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":3},"end":{"line":34,"column":3}},{"start":{"line":34,"column":3},"end":{"line":34,"column":3}}]},"7":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":6},"end":{"line":35,"column":6}},{"start":{"line":35,"column":6},"end":{"line":35,"column":6}}]},"8":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":5},"end":{"line":41,"column":5}},{"start":{"line":41,"column":5},"end":{"line":41,"column":5}}]},"9":{"line":49,"type":"if","locations":[{"start":{"line":49,"column":8},"end":{"line":49,"column":8}},{"start":{"line":49,"column":8},"end":{"line":49,"column":8}}]},"10":{"line":54,"type":"if","locations":[{"start":{"line":54,"column":4},"end":{"line":54,"column":4}},{"start":{"line":54,"column":4},"end":{"line":54,"column":4}}]},"11":{"line":100,"type":"binary-expr","locations":[{"start":{"line":100,"column":29},"end":{"line":100,"column":39}},{"start":{"line":100,"column":43},"end":{"line":100,"column":44}}]},"12":{"line":101,"type":"binary-expr","locations":[{"start":{"line":101,"column":29},"end":{"line":101,"column":39}},{"start":{"line":101,"column":43},"end":{"line":101,"column":44}}]},"13":{"line":102,"type":"binary-expr","locations":[{"start":{"line":102,"column":29},"end":{"line":102,"column":37}},{"start":{"line":102,"column":41},"end":{"line":102,"column":42}}]},"14":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":8},"end":{"line":104,"column":8}},{"start":{"line":104,"column":8},"end":{"line":104,"column":8}}]},"15":{"line":105,"type":"if","locations":[{"start":{"line":105,"column":12},"end":{"line":105,"column":12}},{"start":{"line":105,"column":12},"end":{"line":105,"column":12}}]}},"code":["(function () { YUI.add('swfdetect', function (Y, NAME) {","","/**"," * Utility for Flash version detection"," * @module swfdetect"," */","","// Shortcuts and helper methods","var version = 0,"," uA = Y.UA,"," lG = Y.Lang,"," sF = \"ShockwaveFlash\","," mF, eP, vS, ax6, ax;","","function makeInt(n) {"," return parseInt(n, 10);","}","","function parseFlashVersion (flashVer) {"," if (lG.isNumber(makeInt(flashVer[0]))) {"," uA.flashMajor = flashVer[0];"," }",""," if (lG.isNumber(makeInt(flashVer[1]))) {"," uA.flashMinor = flashVer[1];"," }",""," if (lG.isNumber(makeInt(flashVer[2]))) {"," uA.flashRev = flashVer[2];"," }","}","","if (uA.gecko || uA.webkit || uA.opera) {"," if ((mF = navigator.mimeTypes['application/x-shockwave-flash'])) {"," if ((eP = mF.enabledPlugin)) {"," vS = eP.description.replace(/\\s[rd]/g, '.').replace(/[A-Za-z\\s]+/g, '').split('.');"," parseFlashVersion(vS);"," }"," }","}","else if(uA.ie) {"," try"," {"," ax6 = new ActiveXObject(sF + \".\" + sF + \".6\");"," ax6.AllowScriptAccess = \"always\";"," }"," catch (e)"," {"," if(ax6 !== null)"," {"," version = 6.0;"," }"," }"," if (version === 0) {"," try"," {"," ax = new ActiveXObject(sF + \".\" + sF);"," vS = ax.GetVariable(\"$version\").replace(/[A-Za-z\\s]+/g, '').split(',');"," parseFlashVersion(vS);"," } catch (e2) {}"," }","}","","/** Create a calendar view to represent a single or multiple"," * month range of dates, rendered as a grid with date and"," * weekday labels."," *"," * @class SWFDetect"," * @constructor"," */","","","Y.SWFDetect = {",""," /**"," * Returns the version of either the Flash Player plugin (in Mozilla/WebKit/Opera browsers),"," * or the Flash Player ActiveX control (in IE), as a String of the form \"MM.mm.rr\", where"," * MM is the major version, mm is the minor version, and rr is the revision."," * @method getFlashVersion"," */",""," getFlashVersion : function () {"," return (String(uA.flashMajor) + \".\" + String(uA.flashMinor) + \".\" + String(uA.flashRev));"," },",""," /**"," * Checks whether the version of the Flash player installed on the user's machine is greater"," * than or equal to the one specified. If it is, this method returns true; it is false otherwise."," * @method isFlashVersionAtLeast"," * @return {Boolean} Whether the Flash player version is greater than or equal to the one specified."," * @param flashMajor {Number} The Major version of the Flash player to compare against."," * @param flashMinor {Number} The Minor version of the Flash player to compare against."," * @param flashRev {Number} The Revision version of the Flash player to compare against."," */"," isFlashVersionAtLeast : function (flashMajor, flashMinor, flashRev) {"," var uaMajor = makeInt(uA.flashMajor),"," uaMinor = makeInt(uA.flashMinor),"," uaRev = makeInt(uA.flashRev);",""," flashMajor = makeInt(flashMajor || 0);"," flashMinor = makeInt(flashMinor || 0);"," flashRev = makeInt(flashRev || 0);",""," if (flashMajor === uaMajor) {"," if (flashMinor === uaMinor) {"," return flashRev <= uaRev;"," }"," return flashMinor < uaMinor;"," }"," return flashMajor < uaMajor;"," }","};","","","}, '3.17.2', {\"requires\": [\"yui-base\"]});","","}());"]}; +} +var __cov_CtD3jn9dRl5rmO3OjmnVXg = __coverage__['build/swfdetect/swfdetect.js']; +__cov_CtD3jn9dRl5rmO3OjmnVXg.s['1']++;YUI.add('swfdetect',function(Y,NAME){__cov_CtD3jn9dRl5rmO3OjmnVXg.f['1']++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['2']++;var version=0,uA=Y.UA,lG=Y.Lang,sF='ShockwaveFlash',mF,eP,vS,ax6,ax;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['3']++;function makeInt(n){__cov_CtD3jn9dRl5rmO3OjmnVXg.f['2']++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['4']++;return parseInt(n,10);}__cov_CtD3jn9dRl5rmO3OjmnVXg.s['5']++;function parseFlashVersion(flashVer){__cov_CtD3jn9dRl5rmO3OjmnVXg.f['3']++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['6']++;if(lG.isNumber(makeInt(flashVer[0]))){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['1'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['7']++;uA.flashMajor=flashVer[0];}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['1'][1]++;}__cov_CtD3jn9dRl5rmO3OjmnVXg.s['8']++;if(lG.isNumber(makeInt(flashVer[1]))){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['2'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['9']++;uA.flashMinor=flashVer[1];}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['2'][1]++;}__cov_CtD3jn9dRl5rmO3OjmnVXg.s['10']++;if(lG.isNumber(makeInt(flashVer[2]))){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['3'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['11']++;uA.flashRev=flashVer[2];}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['3'][1]++;}}__cov_CtD3jn9dRl5rmO3OjmnVXg.s['12']++;if((__cov_CtD3jn9dRl5rmO3OjmnVXg.b['5'][0]++,uA.gecko)||(__cov_CtD3jn9dRl5rmO3OjmnVXg.b['5'][1]++,uA.webkit)||(__cov_CtD3jn9dRl5rmO3OjmnVXg.b['5'][2]++,uA.opera)){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['4'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['13']++;if(mF=navigator.mimeTypes['application/x-shockwave-flash']){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['6'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['14']++;if(eP=mF.enabledPlugin){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['7'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['15']++;vS=eP.description.replace(/\s[rd]/g,'.').replace(/[A-Za-z\s]+/g,'').split('.');__cov_CtD3jn9dRl5rmO3OjmnVXg.s['16']++;parseFlashVersion(vS);}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['7'][1]++;}}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['6'][1]++;}}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['4'][1]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['17']++;if(uA.ie){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['8'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['18']++;try{__cov_CtD3jn9dRl5rmO3OjmnVXg.s['19']++;ax6=new ActiveXObject(sF+'.'+sF+'.6');__cov_CtD3jn9dRl5rmO3OjmnVXg.s['20']++;ax6.AllowScriptAccess='always';}catch(e){__cov_CtD3jn9dRl5rmO3OjmnVXg.s['21']++;if(ax6!==null){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['9'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['22']++;version=6;}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['9'][1]++;}}__cov_CtD3jn9dRl5rmO3OjmnVXg.s['23']++;if(version===0){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['10'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['24']++;try{__cov_CtD3jn9dRl5rmO3OjmnVXg.s['25']++;ax=new ActiveXObject(sF+'.'+sF);__cov_CtD3jn9dRl5rmO3OjmnVXg.s['26']++;vS=ax.GetVariable('$version').replace(/[A-Za-z\s]+/g,'').split(',');__cov_CtD3jn9dRl5rmO3OjmnVXg.s['27']++;parseFlashVersion(vS);}catch(e2){}}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['10'][1]++;}}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['8'][1]++;}}__cov_CtD3jn9dRl5rmO3OjmnVXg.s['28']++;Y.SWFDetect={getFlashVersion:function(){__cov_CtD3jn9dRl5rmO3OjmnVXg.f['4']++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['29']++;return String(uA.flashMajor)+'.'+String(uA.flashMinor)+'.'+String(uA.flashRev);},isFlashVersionAtLeast:function(flashMajor,flashMinor,flashRev){__cov_CtD3jn9dRl5rmO3OjmnVXg.f['5']++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['30']++;var uaMajor=makeInt(uA.flashMajor),uaMinor=makeInt(uA.flashMinor),uaRev=makeInt(uA.flashRev);__cov_CtD3jn9dRl5rmO3OjmnVXg.s['31']++;flashMajor=makeInt((__cov_CtD3jn9dRl5rmO3OjmnVXg.b['11'][0]++,flashMajor)||(__cov_CtD3jn9dRl5rmO3OjmnVXg.b['11'][1]++,0));__cov_CtD3jn9dRl5rmO3OjmnVXg.s['32']++;flashMinor=makeInt((__cov_CtD3jn9dRl5rmO3OjmnVXg.b['12'][0]++,flashMinor)||(__cov_CtD3jn9dRl5rmO3OjmnVXg.b['12'][1]++,0));__cov_CtD3jn9dRl5rmO3OjmnVXg.s['33']++;flashRev=makeInt((__cov_CtD3jn9dRl5rmO3OjmnVXg.b['13'][0]++,flashRev)||(__cov_CtD3jn9dRl5rmO3OjmnVXg.b['13'][1]++,0));__cov_CtD3jn9dRl5rmO3OjmnVXg.s['34']++;if(flashMajor===uaMajor){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['14'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['35']++;if(flashMinor===uaMinor){__cov_CtD3jn9dRl5rmO3OjmnVXg.b['15'][0]++;__cov_CtD3jn9dRl5rmO3OjmnVXg.s['36']++;return flashRev<=uaRev;}else{__cov_CtD3jn9dRl5rmO3OjmnVXg.b['15'][1]++;}__cov_CtD3jn9dRl5rmO3OjmnVXg.s['37']++;return flashMinor ul',"," tab: '> ul > li',"," tabLabel: '> ul > li > a',"," tabviewPanel: '> div',"," tabPanel: '> div > div',"," selectedTab: '> ul > ' + DOT + TabviewBase._classNames.selectedTab,"," selectedPanel: '> div ' + DOT + TabviewBase._classNames.selectedPanel","};","","Y.mix(TabviewBase.prototype, {"," init: function(config) {"," config = config || EMPTY_OBJ;"," this._node = config.host || Y.one(config.node);",""," this.refresh();"," },",""," initClassNames: function(index) {"," var _classNames = Y.TabviewBase._classNames;",""," Y.Object.each(Y.TabviewBase._queries, function(query, name) {"," // this === tabview._node"," if (_classNames[name]) {"," var result = this.all(query);",""," if (index !== undefined) {"," result = result.item(index);"," }",""," if (result) {"," result.addClass(_classNames[name]);"," }"," }"," }, this._node);",""," this._node.addClass(_classNames.tabview);"," },",""," _select: function(index) {"," var _classNames = Y.TabviewBase._classNames,"," _queries = Y.TabviewBase._queries,"," node = this._node,"," oldItem = node.one(_queries.selectedTab),"," oldContent = node.one(_queries.selectedPanel),"," newItem = node.all(_queries.tab).item(index),"," newContent = node.all(_queries.tabPanel).item(index);",""," if (oldItem) {"," oldItem.removeClass(_classNames.selectedTab);"," }",""," if (oldContent) {"," oldContent.removeClass(_classNames.selectedPanel);"," }",""," if (newItem) {"," newItem.addClass(_classNames.selectedTab);"," }",""," if (newContent) {"," newContent.addClass(_classNames.selectedPanel);"," }"," },",""," initState: function() {"," var _queries = Y.TabviewBase._queries,"," node = this._node,"," activeNode = node.one(_queries.selectedTab),"," activeIndex = activeNode ?"," node.all(_queries.tab).indexOf(activeNode) : 0;",""," this._select(activeIndex);"," },",""," // collapse extra space between list-items"," _scrubTextNodes: function() {"," this._node.one(Y.TabviewBase._queries.tabviewList).get('childNodes').each(function(node) {"," if (node.get('nodeType') === 3) { // text node"," node.remove();"," }"," });"," },",""," // base renderer only enlivens existing markup"," refresh: function() {"," this._scrubTextNodes();"," this.initClassNames();"," this.initState();"," this.initEvents();"," },",""," tabEventName: 'click',",""," initEvents: function() {"," // TODO: detach prefix for delegate?"," // this._node.delegate('tabview|' + this.tabEventName),"," this._node.delegate(this.tabEventName,"," this.onTabEvent,"," Y.TabviewBase._queries.tab,"," this"," );"," },",""," onTabEvent: function(e) {"," e.preventDefault();"," this._select(this._node.all(Y.TabviewBase._queries.tab).indexOf(e.currentTarget));"," },",""," destroy: function() {"," this._node.detach(this.tabEventName);"," }","});","","Y.TabviewBase = TabviewBase;","","","}, '3.17.2', {\"requires\": [\"node-event-delegate\", \"classnamemanager\"]});","","}());"]}; +} +var __cov_dlpEYNgH$_x24F0fhVKX$A = __coverage__['build/tabview-base/tabview-base.js']; +__cov_dlpEYNgH$_x24F0fhVKX$A.s['1']++;YUI.add('tabview-base',function(Y,NAME){__cov_dlpEYNgH$_x24F0fhVKX$A.f['1']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['2']++;var getClassName=Y.ClassNameManager.getClassName,TABVIEW='tabview',TAB='tab',PANEL='panel',SELECTED='selected',EMPTY_OBJ={},DOT='.',TabviewBase=function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['2']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['3']++;this.init.apply(this,arguments);};__cov_dlpEYNgH$_x24F0fhVKX$A.s['4']++;TabviewBase.NAME='tabviewBase';__cov_dlpEYNgH$_x24F0fhVKX$A.s['5']++;TabviewBase._classNames={tabview:getClassName(TABVIEW),tabviewPanel:getClassName(TABVIEW,PANEL),tabviewList:getClassName(TABVIEW,'list'),tab:getClassName(TAB),tabLabel:getClassName(TAB,'label'),tabPanel:getClassName(TAB,PANEL),selectedTab:getClassName(TAB,SELECTED),selectedPanel:getClassName(TAB,PANEL,SELECTED)};__cov_dlpEYNgH$_x24F0fhVKX$A.s['6']++;TabviewBase._queries={tabview:DOT+TabviewBase._classNames.tabview,tabviewList:'> ul',tab:'> ul > li',tabLabel:'> ul > li > a',tabviewPanel:'> div',tabPanel:'> div > div',selectedTab:'> ul > '+DOT+TabviewBase._classNames.selectedTab,selectedPanel:'> div '+DOT+TabviewBase._classNames.selectedPanel};__cov_dlpEYNgH$_x24F0fhVKX$A.s['7']++;Y.mix(TabviewBase.prototype,{init:function(config){__cov_dlpEYNgH$_x24F0fhVKX$A.f['3']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['8']++;config=(__cov_dlpEYNgH$_x24F0fhVKX$A.b['1'][0]++,config)||(__cov_dlpEYNgH$_x24F0fhVKX$A.b['1'][1]++,EMPTY_OBJ);__cov_dlpEYNgH$_x24F0fhVKX$A.s['9']++;this._node=(__cov_dlpEYNgH$_x24F0fhVKX$A.b['2'][0]++,config.host)||(__cov_dlpEYNgH$_x24F0fhVKX$A.b['2'][1]++,Y.one(config.node));__cov_dlpEYNgH$_x24F0fhVKX$A.s['10']++;this.refresh();},initClassNames:function(index){__cov_dlpEYNgH$_x24F0fhVKX$A.f['4']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['11']++;var _classNames=Y.TabviewBase._classNames;__cov_dlpEYNgH$_x24F0fhVKX$A.s['12']++;Y.Object.each(Y.TabviewBase._queries,function(query,name){__cov_dlpEYNgH$_x24F0fhVKX$A.f['5']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['13']++;if(_classNames[name]){__cov_dlpEYNgH$_x24F0fhVKX$A.b['3'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['14']++;var result=this.all(query);__cov_dlpEYNgH$_x24F0fhVKX$A.s['15']++;if(index!==undefined){__cov_dlpEYNgH$_x24F0fhVKX$A.b['4'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['16']++;result=result.item(index);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['4'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['17']++;if(result){__cov_dlpEYNgH$_x24F0fhVKX$A.b['5'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['18']++;result.addClass(_classNames[name]);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['5'][1]++;}}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['3'][1]++;}},this._node);__cov_dlpEYNgH$_x24F0fhVKX$A.s['19']++;this._node.addClass(_classNames.tabview);},_select:function(index){__cov_dlpEYNgH$_x24F0fhVKX$A.f['6']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['20']++;var _classNames=Y.TabviewBase._classNames,_queries=Y.TabviewBase._queries,node=this._node,oldItem=node.one(_queries.selectedTab),oldContent=node.one(_queries.selectedPanel),newItem=node.all(_queries.tab).item(index),newContent=node.all(_queries.tabPanel).item(index);__cov_dlpEYNgH$_x24F0fhVKX$A.s['21']++;if(oldItem){__cov_dlpEYNgH$_x24F0fhVKX$A.b['6'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['22']++;oldItem.removeClass(_classNames.selectedTab);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['6'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['23']++;if(oldContent){__cov_dlpEYNgH$_x24F0fhVKX$A.b['7'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['24']++;oldContent.removeClass(_classNames.selectedPanel);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['7'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['25']++;if(newItem){__cov_dlpEYNgH$_x24F0fhVKX$A.b['8'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['26']++;newItem.addClass(_classNames.selectedTab);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['8'][1]++;}__cov_dlpEYNgH$_x24F0fhVKX$A.s['27']++;if(newContent){__cov_dlpEYNgH$_x24F0fhVKX$A.b['9'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['28']++;newContent.addClass(_classNames.selectedPanel);}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['9'][1]++;}},initState:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['7']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['29']++;var _queries=Y.TabviewBase._queries,node=this._node,activeNode=node.one(_queries.selectedTab),activeIndex=activeNode?(__cov_dlpEYNgH$_x24F0fhVKX$A.b['10'][0]++,node.all(_queries.tab).indexOf(activeNode)):(__cov_dlpEYNgH$_x24F0fhVKX$A.b['10'][1]++,0);__cov_dlpEYNgH$_x24F0fhVKX$A.s['30']++;this._select(activeIndex);},_scrubTextNodes:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['8']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['31']++;this._node.one(Y.TabviewBase._queries.tabviewList).get('childNodes').each(function(node){__cov_dlpEYNgH$_x24F0fhVKX$A.f['9']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['32']++;if(node.get('nodeType')===3){__cov_dlpEYNgH$_x24F0fhVKX$A.b['11'][0]++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['33']++;node.remove();}else{__cov_dlpEYNgH$_x24F0fhVKX$A.b['11'][1]++;}});},refresh:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['10']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['34']++;this._scrubTextNodes();__cov_dlpEYNgH$_x24F0fhVKX$A.s['35']++;this.initClassNames();__cov_dlpEYNgH$_x24F0fhVKX$A.s['36']++;this.initState();__cov_dlpEYNgH$_x24F0fhVKX$A.s['37']++;this.initEvents();},tabEventName:'click',initEvents:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['11']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['38']++;this._node.delegate(this.tabEventName,this.onTabEvent,Y.TabviewBase._queries.tab,this);},onTabEvent:function(e){__cov_dlpEYNgH$_x24F0fhVKX$A.f['12']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['39']++;e.preventDefault();__cov_dlpEYNgH$_x24F0fhVKX$A.s['40']++;this._select(this._node.all(Y.TabviewBase._queries.tab).indexOf(e.currentTarget));},destroy:function(){__cov_dlpEYNgH$_x24F0fhVKX$A.f['13']++;__cov_dlpEYNgH$_x24F0fhVKX$A.s['41']++;this._node.detach(this.tabEventName);}});__cov_dlpEYNgH$_x24F0fhVKX$A.s['42']++;Y.TabviewBase=TabviewBase;},'3.17.2',{'requires':['node-event-delegate','classnamemanager']}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base-debug.js b/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base-debug.js new file mode 100644 index 0000000..450e0ea --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base-debug.js @@ -0,0 +1,151 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('tabview-base', function (Y, NAME) { + +var getClassName = Y.ClassNameManager.getClassName, + TABVIEW = 'tabview', + TAB = 'tab', + PANEL = 'panel', + SELECTED = 'selected', + EMPTY_OBJ = {}, + DOT = '.', + + TabviewBase = function() { + this.init.apply(this, arguments); + }; + +TabviewBase.NAME = 'tabviewBase'; +TabviewBase._classNames = { + tabview: getClassName(TABVIEW), + tabviewPanel: getClassName(TABVIEW, PANEL), + tabviewList: getClassName(TABVIEW, 'list'), + tab: getClassName(TAB), + tabLabel: getClassName(TAB, 'label'), + tabPanel: getClassName(TAB, PANEL), + selectedTab: getClassName(TAB, SELECTED), + selectedPanel: getClassName(TAB, PANEL, SELECTED) +}; +TabviewBase._queries = { + tabview: DOT + TabviewBase._classNames.tabview, + tabviewList: '> ul', + tab: '> ul > li', + tabLabel: '> ul > li > a', + tabviewPanel: '> div', + tabPanel: '> div > div', + selectedTab: '> ul > ' + DOT + TabviewBase._classNames.selectedTab, + selectedPanel: '> div ' + DOT + TabviewBase._classNames.selectedPanel +}; + +Y.mix(TabviewBase.prototype, { + init: function(config) { + config = config || EMPTY_OBJ; + this._node = config.host || Y.one(config.node); + + this.refresh(); + }, + + initClassNames: function(index) { + var _classNames = Y.TabviewBase._classNames; + + Y.Object.each(Y.TabviewBase._queries, function(query, name) { + // this === tabview._node + if (_classNames[name]) { + var result = this.all(query); + + if (index !== undefined) { + result = result.item(index); + } + + if (result) { + result.addClass(_classNames[name]); + } + } + }, this._node); + + this._node.addClass(_classNames.tabview); + }, + + _select: function(index) { + var _classNames = Y.TabviewBase._classNames, + _queries = Y.TabviewBase._queries, + node = this._node, + oldItem = node.one(_queries.selectedTab), + oldContent = node.one(_queries.selectedPanel), + newItem = node.all(_queries.tab).item(index), + newContent = node.all(_queries.tabPanel).item(index); + + if (oldItem) { + oldItem.removeClass(_classNames.selectedTab); + } + + if (oldContent) { + oldContent.removeClass(_classNames.selectedPanel); + } + + if (newItem) { + newItem.addClass(_classNames.selectedTab); + } + + if (newContent) { + newContent.addClass(_classNames.selectedPanel); + } + }, + + initState: function() { + var _queries = Y.TabviewBase._queries, + node = this._node, + activeNode = node.one(_queries.selectedTab), + activeIndex = activeNode ? + node.all(_queries.tab).indexOf(activeNode) : 0; + + this._select(activeIndex); + }, + + // collapse extra space between list-items + _scrubTextNodes: function() { + this._node.one(Y.TabviewBase._queries.tabviewList).get('childNodes').each(function(node) { + if (node.get('nodeType') === 3) { // text node + node.remove(); + } + }); + }, + + // base renderer only enlivens existing markup + refresh: function() { + this._scrubTextNodes(); + this.initClassNames(); + this.initState(); + this.initEvents(); + }, + + tabEventName: 'click', + + initEvents: function() { + // TODO: detach prefix for delegate? + // this._node.delegate('tabview|' + this.tabEventName), + this._node.delegate(this.tabEventName, + this.onTabEvent, + Y.TabviewBase._queries.tab, + this + ); + }, + + onTabEvent: function(e) { + e.preventDefault(); + this._select(this._node.all(Y.TabviewBase._queries.tab).indexOf(e.currentTarget)); + }, + + destroy: function() { + this._node.detach(this.tabEventName); + } +}); + +Y.TabviewBase = TabviewBase; + + +}, '3.17.2', {"requires": ["node-event-delegate", "classnamemanager"]}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base-min.js b/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base-min.js new file mode 100644 index 0000000..79e3a12 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("tabview-base",function(e,t){var n=e.ClassNameManager.getClassName,r="tabview",i="tab",s="panel",o="selected",u={},a=".",f=function(){this.init.apply(this,arguments)};f.NAME="tabviewBase",f._classNames={tabview:n(r),tabviewPanel:n(r,s),tabviewList:n(r,"list"),tab:n(i),tabLabel:n(i,"label"),tabPanel:n(i,s),selectedTab:n(i,o),selectedPanel:n(i,s,o)},f._queries={tabview:a+f._classNames.tabview,tabviewList:"> ul",tab:"> ul > li",tabLabel:"> ul > li > a",tabviewPanel:"> div",tabPanel:"> div > div",selectedTab:"> ul > "+a+f._classNames.selectedTab,selectedPanel:"> div "+a+f._classNames.selectedPanel},e.mix(f.prototype,{init:function(t){t=t||u,this._node=t.host||e.one(t.node),this.refresh()},initClassNames:function(t){var n=e.TabviewBase._classNames;e.Object.each(e.TabviewBase._queries,function(e,r){if(n[r]){var i=this.all(e);t!==undefined&&(i=i.item(t)),i&&i.addClass(n[r])}},this._node),this._node.addClass(n.tabview)},_select:function(t){var n=e.TabviewBase._classNames,r=e.TabviewBase._queries,i=this._node,s=i.one(r.selectedTab),o=i.one(r.selectedPanel),u=i.all(r.tab).item(t),a=i.all(r.tabPanel).item(t);s&&s.removeClass(n.selectedTab),o&&o.removeClass(n.selectedPanel),u&&u.addClass(n.selectedTab),a&&a.addClass(n.selectedPanel)},initState:function(){var t=e.TabviewBase._queries,n=this._node,r=n.one(t.selectedTab),i=r?n.all(t.tab).indexOf(r):0;this._select(i)},_scrubTextNodes:function(){this._node.one(e.TabviewBase._queries.tabviewList).get("childNodes").each(function(e){e.get("nodeType")===3&&e.remove()})},refresh:function(){this._scrubTextNodes(),this.initClassNames(),this.initState(),this.initEvents()},tabEventName:"click",initEvents:function(){this._node.delegate(this.tabEventName,this.onTabEvent,e.TabviewBase._queries.tab,this)},onTabEvent:function(t){t.preventDefault(),this._select(this._node.all(e.TabviewBase._queries.tab).indexOf(t.currentTarget))},destroy:function(){this._node.detach(this.tabEventName)}}),e.TabviewBase=f},"3.17.2",{requires:["node-event-delegate","classnamemanager"]}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base.js b/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base.js new file mode 100644 index 0000000..450e0ea --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview-base/tabview-base.js @@ -0,0 +1,151 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('tabview-base', function (Y, NAME) { + +var getClassName = Y.ClassNameManager.getClassName, + TABVIEW = 'tabview', + TAB = 'tab', + PANEL = 'panel', + SELECTED = 'selected', + EMPTY_OBJ = {}, + DOT = '.', + + TabviewBase = function() { + this.init.apply(this, arguments); + }; + +TabviewBase.NAME = 'tabviewBase'; +TabviewBase._classNames = { + tabview: getClassName(TABVIEW), + tabviewPanel: getClassName(TABVIEW, PANEL), + tabviewList: getClassName(TABVIEW, 'list'), + tab: getClassName(TAB), + tabLabel: getClassName(TAB, 'label'), + tabPanel: getClassName(TAB, PANEL), + selectedTab: getClassName(TAB, SELECTED), + selectedPanel: getClassName(TAB, PANEL, SELECTED) +}; +TabviewBase._queries = { + tabview: DOT + TabviewBase._classNames.tabview, + tabviewList: '> ul', + tab: '> ul > li', + tabLabel: '> ul > li > a', + tabviewPanel: '> div', + tabPanel: '> div > div', + selectedTab: '> ul > ' + DOT + TabviewBase._classNames.selectedTab, + selectedPanel: '> div ' + DOT + TabviewBase._classNames.selectedPanel +}; + +Y.mix(TabviewBase.prototype, { + init: function(config) { + config = config || EMPTY_OBJ; + this._node = config.host || Y.one(config.node); + + this.refresh(); + }, + + initClassNames: function(index) { + var _classNames = Y.TabviewBase._classNames; + + Y.Object.each(Y.TabviewBase._queries, function(query, name) { + // this === tabview._node + if (_classNames[name]) { + var result = this.all(query); + + if (index !== undefined) { + result = result.item(index); + } + + if (result) { + result.addClass(_classNames[name]); + } + } + }, this._node); + + this._node.addClass(_classNames.tabview); + }, + + _select: function(index) { + var _classNames = Y.TabviewBase._classNames, + _queries = Y.TabviewBase._queries, + node = this._node, + oldItem = node.one(_queries.selectedTab), + oldContent = node.one(_queries.selectedPanel), + newItem = node.all(_queries.tab).item(index), + newContent = node.all(_queries.tabPanel).item(index); + + if (oldItem) { + oldItem.removeClass(_classNames.selectedTab); + } + + if (oldContent) { + oldContent.removeClass(_classNames.selectedPanel); + } + + if (newItem) { + newItem.addClass(_classNames.selectedTab); + } + + if (newContent) { + newContent.addClass(_classNames.selectedPanel); + } + }, + + initState: function() { + var _queries = Y.TabviewBase._queries, + node = this._node, + activeNode = node.one(_queries.selectedTab), + activeIndex = activeNode ? + node.all(_queries.tab).indexOf(activeNode) : 0; + + this._select(activeIndex); + }, + + // collapse extra space between list-items + _scrubTextNodes: function() { + this._node.one(Y.TabviewBase._queries.tabviewList).get('childNodes').each(function(node) { + if (node.get('nodeType') === 3) { // text node + node.remove(); + } + }); + }, + + // base renderer only enlivens existing markup + refresh: function() { + this._scrubTextNodes(); + this.initClassNames(); + this.initState(); + this.initEvents(); + }, + + tabEventName: 'click', + + initEvents: function() { + // TODO: detach prefix for delegate? + // this._node.delegate('tabview|' + this.tabEventName), + this._node.delegate(this.tabEventName, + this.onTabEvent, + Y.TabviewBase._queries.tab, + this + ); + }, + + onTabEvent: function(e) { + e.preventDefault(); + this._select(this._node.all(Y.TabviewBase._queries.tab).indexOf(e.currentTarget)); + }, + + destroy: function() { + this._node.detach(this.tabEventName); + } +}); + +Y.TabviewBase = TabviewBase; + + +}, '3.17.2', {"requires": ["node-event-delegate", "classnamemanager"]}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-coverage.js b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-coverage.js new file mode 100644 index 0000000..59dd8fe --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/tabview-plugin/tabview-plugin.js']) { + __coverage__['build/tabview-plugin/tabview-plugin.js'] = {"path":"build/tabview-plugin/tabview-plugin.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0},"b":{},"f":{"1":0,"2":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":45}}},"2":{"name":"TabviewPlugin","line":3,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":16,"column":45}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":1}},"3":{"start":{"line":4,"column":4},"end":{"line":4,"column":64}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":37}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":26}},"6":{"start":{"line":10,"column":0},"end":{"line":10,"column":39}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":22}},"8":{"start":{"line":13,"column":0},"end":{"line":13,"column":33}}},"branchMap":{},"code":["(function () { YUI.add('tabview-plugin', function (Y, NAME) {","","function TabviewPlugin() {"," TabviewPlugin.superclass.constructor.apply(this, arguments);","}","","TabviewPlugin.NAME = 'tabviewPlugin';","TabviewPlugin.NS = 'tabs';","","Y.extend(TabviewPlugin, Y.TabviewBase);","","Y.namespace('Plugin');","Y.Plugin.Tabview = TabviewPlugin;","","","}, '3.17.2', {\"requires\": [\"tabview-base\"]});","","}());"]}; +} +var __cov_TykcRjcoZP68PMc273vocw = __coverage__['build/tabview-plugin/tabview-plugin.js']; +__cov_TykcRjcoZP68PMc273vocw.s['1']++;YUI.add('tabview-plugin',function(Y,NAME){__cov_TykcRjcoZP68PMc273vocw.f['1']++;__cov_TykcRjcoZP68PMc273vocw.s['2']++;function TabviewPlugin(){__cov_TykcRjcoZP68PMc273vocw.f['2']++;__cov_TykcRjcoZP68PMc273vocw.s['3']++;TabviewPlugin.superclass.constructor.apply(this,arguments);}__cov_TykcRjcoZP68PMc273vocw.s['4']++;TabviewPlugin.NAME='tabviewPlugin';__cov_TykcRjcoZP68PMc273vocw.s['5']++;TabviewPlugin.NS='tabs';__cov_TykcRjcoZP68PMc273vocw.s['6']++;Y.extend(TabviewPlugin,Y.TabviewBase);__cov_TykcRjcoZP68PMc273vocw.s['7']++;Y.namespace('Plugin');__cov_TykcRjcoZP68PMc273vocw.s['8']++;Y.Plugin.Tabview=TabviewPlugin;},'3.17.2',{'requires':['tabview-base']}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-debug.js b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-debug.js new file mode 100644 index 0000000..c16e6ec --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-debug.js @@ -0,0 +1,23 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('tabview-plugin', function (Y, NAME) { + +function TabviewPlugin() { + TabviewPlugin.superclass.constructor.apply(this, arguments); +} + +TabviewPlugin.NAME = 'tabviewPlugin'; +TabviewPlugin.NS = 'tabs'; + +Y.extend(TabviewPlugin, Y.TabviewBase); + +Y.namespace('Plugin'); +Y.Plugin.Tabview = TabviewPlugin; + + +}, '3.17.2', {"requires": ["tabview-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-min.js b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-min.js new file mode 100644 index 0000000..b9abb0e --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("tabview-plugin",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}n.NAME="tabviewPlugin",n.NS="tabs",e.extend(n,e.TabviewBase),e.namespace("Plugin"),e.Plugin.Tabview=n},"3.17.2",{requires:["tabview-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin.js b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin.js new file mode 100644 index 0000000..c16e6ec --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview-plugin/tabview-plugin.js @@ -0,0 +1,23 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('tabview-plugin', function (Y, NAME) { + +function TabviewPlugin() { + TabviewPlugin.superclass.constructor.apply(this, arguments); +} + +TabviewPlugin.NAME = 'tabviewPlugin'; +TabviewPlugin.NS = 'tabs'; + +Y.extend(TabviewPlugin, Y.TabviewBase); + +Y.namespace('Plugin'); +Y.Plugin.Tabview = TabviewPlugin; + + +}, '3.17.2', {"requires": ["tabview-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/night/tabview-skin.css b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/night/tabview-skin.css new file mode 100644 index 0000000..cc10f8b --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/night/tabview-skin.css @@ -0,0 +1,96 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-skin-night .yui3-tabview-panel{ + background-color:#333333; + color:#808080; + padding:1px; +} +.yui3-skin-night .yui3-tab-panel p{ + margin:10px; +} +.yui3-skin-night .yui3-tabview-list { + background-color:#0f0f0f; + border-top:1px solid #000; + text-align:center; + height:46px; + background: -moz-linear-gradient( + 0% 100% 90deg, + #0f0f0f 0%, + #1e1e1e 96%, + #292929 100% + ); + background: -webkit-gradient( + linear, + left bottom, + left top, + from(#0f0f0f), + color-stop(0.96, #1e1e1e), + to(#292929) + ); +} + +.yui3-skin-night .yui3-tabview-list li { + margin-top:8px; +} +.yui3-skin-night .yui3-tabview-list li a{ + border:solid 1px #0c0c0c; + border-right-style:none; + + -moz-box-shadow: 0 1px #222222; + -webkit-box-shadow: 0 1px #222222; + box-shadow: 0 1px #222222; + + text-shadow: 0 -1px 0 rgba(0,0,0,0.7); + font-size:85%; + text-align:center; + color: #fff; + padding: 6px 28px; + background-color:#555658; + background: -moz-linear-gradient( + 0% 100% 90deg, + #343536 0%, + #555658 96%, + #3E3F41 100% + ); + background: -webkit-gradient( + linear, + left bottom, + left top, + from(#343536), + color-stop(0.96, #555658), + to(#3E3F41) + ); +} +.yui3-skin-night .yui3-tabview-list li.yui3-tab-selected a { + background-color:#2B2D2D; + background: -moz-linear-gradient( + 0% 100% 90deg, + #242526 0%, + #3b3c3d 96%, + #2C2D2F 100% + ); + background: -webkit-gradient( + linear, + left bottom, + left top, + from(#242526), + color-stop(0.96, #3b3c3d), + to(#2C2D2F) + ); +} +.yui3-skin-night .yui3-tabview-list li:first-child a{ + -moz-border-radius:6px 0 0 6px; + -webkit-border-radius:6px 0 0 6px; + border-radius:6px 0 0 6px; +} +.yui3-skin-night .yui3-tabview-list li:last-child a{ + border-right-style:solid; + -moz-border-radius:0 6px 6px 0; + -webkit-border-radius:0 6px 6px 0; + border-radius:0 6px 6px 0; +} diff --git a/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/night/tabview.css b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/night/tabview.css new file mode 100644 index 0000000..82eafa1 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/night/tabview.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-tab-panel{display:none}.yui3-tab-panel-selected{display:block}.yui3-tabview-list,.yui3-tab{margin:0;padding:0;list-style:none}.yui3-tabview{position:relative}.yui3-tabview,.yui3-tabview-list,.yui3-tabview-panel,.yui3-tab,.yui3-tab-panel{zoom:1}.yui3-tab{display:inline-block;*display:inline;vertical-align:bottom;cursor:pointer}.yui3-tab-label{display:block;display:inline-block;padding:6px 10px;position:relative;text-decoration:none;vertical-align:bottom}.yui3-skin-night .yui3-tabview-panel{background-color:#333;color:#808080;padding:1px}.yui3-skin-night .yui3-tab-panel p{margin:10px}.yui3-skin-night .yui3-tabview-list{background-color:#0f0f0f;border-top:1px solid #000;text-align:center;height:46px;background:-moz-linear-gradient(0% 100% 90deg,#0f0f0f 0,#1e1e1e 96%,#292929 100%);background:-webkit-gradient(linear,left bottom,left top,from(#0f0f0f),color-stop(0.96,#1e1e1e),to(#292929))}.yui3-skin-night .yui3-tabview-list li{margin-top:8px}.yui3-skin-night .yui3-tabview-list li a{border:solid 1px #0c0c0c;border-right-style:none;-moz-box-shadow:0 1px #222;-webkit-box-shadow:0 1px #222;box-shadow:0 1px #222;text-shadow:0 -1px 0 rgba(0,0,0,0.7);font-size:85%;text-align:center;color:#fff;padding:6px 28px;background-color:#555658;background:-moz-linear-gradient(0% 100% 90deg,#343536 0,#555658 96%,#3e3f41 100%);background:-webkit-gradient(linear,left bottom,left top,from(#343536),color-stop(0.96,#555658),to(#3e3f41))}.yui3-skin-night .yui3-tabview-list li.yui3-tab-selected a{background-color:#2b2d2d;background:-moz-linear-gradient(0% 100% 90deg,#242526 0,#3b3c3d 96%,#2c2d2f 100%);background:-webkit-gradient(linear,left bottom,left top,from(#242526),color-stop(0.96,#3b3c3d),to(#2c2d2f))}.yui3-skin-night .yui3-tabview-list li:first-child a{-moz-border-radius:6px 0 0 6px;-webkit-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.yui3-skin-night .yui3-tabview-list li:last-child a{border-right-style:solid;-moz-border-radius:0 6px 6px 0;-webkit-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}#yui3-css-stamp.skin-night-tabview{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/sam/tabview-skin.css b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/sam/tabview-skin.css new file mode 100644 index 0000000..5d4cee4 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/sam/tabview-skin.css @@ -0,0 +1,65 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* .yui-navset defaults to .yui-navset-top */ +.yui3-skin-sam .yui3-tabview-list { + border:solid #2647a0; /* color between tab list and content */ + border-width:0 0 5px; + zoom:1; +} + +.yui3-skin-sam .yui3-tab { + margin:0 0.2em 0 0; + padding:1px 0 0; /* gecko: make room for overflow */ + zoom:1; +} + +.yui3-skin-sam .yui3-tab-selected { + margin-bottom:-1px; /* for overlap (mapped to tabview-list border-width) */ +} + +.yui3-skin-sam .yui3-tab-label { + background:#d8d8d8 url(../../../../assets/skins/sam/sprite.png) repeat-x; /* tab background */ + border:solid #a3a3a3; + border-width: 1px 1px 0 1px; + color:#000; + cursor:pointer; + font-size:85%; + padding:0.3em .75em; + text-decoration:none; +} + +.yui3-skin-sam .yui3-tab-label:hover, +.yui3-skin-sam .yui3-tab-label:focus { + background:#bfdaff url(../../../../assets/skins/sam/sprite.png) repeat-x left -1300px; /* hovered tab background */ + outline:0; +} + +.yui3-skin-sam .yui3-tab-selected .yui3-tab-label, +.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:focus, +.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:hover { /* no hover effect for selected */ + background:#2647a0 url(../../../../assets/skins/sam/sprite.png) repeat-x left -1400px; /* selected tab background */ + color:#fff; +} + +.yui3-skin-sam .yui3-tab-selected .yui3-tab-label { + padding:0.4em 0.75em; /* raise selected tab */ +} + +.yui3-skin-sam .yui3-tab-selected .yui3-tab-label { + border-color:#243356; /* selected tab border color */ +} + +.yui3-skin-sam .yui3-tabview-panel { + background:#edf5ff; /* content background color */ +} + +.yui3-skin-sam .yui3-tabview-panel { + border:1px solid #808080; /* content border */ + border-top-color:#243356; /* different border color */ + padding:0.25em 0.5em; /* content padding */ +} diff --git a/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/sam/tabview.css b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/sam/tabview.css new file mode 100644 index 0000000..7e45d23 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/assets/skins/sam/tabview.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-tab-panel{display:none}.yui3-tab-panel-selected{display:block}.yui3-tabview-list,.yui3-tab{margin:0;padding:0;list-style:none}.yui3-tabview{position:relative}.yui3-tabview,.yui3-tabview-list,.yui3-tabview-panel,.yui3-tab,.yui3-tab-panel{zoom:1}.yui3-tab{display:inline-block;*display:inline;vertical-align:bottom;cursor:pointer}.yui3-tab-label{display:block;display:inline-block;padding:6px 10px;position:relative;text-decoration:none;vertical-align:bottom}.yui3-skin-sam .yui3-tabview-list{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui3-skin-sam .yui3-tab{margin:0 .2em 0 0;padding:1px 0 0;zoom:1}.yui3-skin-sam .yui3-tab-selected{margin-bottom:-1px}.yui3-skin-sam .yui3-tab-label{background:#d8d8d8 url(../../../../assets/skins/sam/sprite.png) repeat-x;border:solid #a3a3a3;border-width:1px 1px 0 1px;color:#000;cursor:pointer;font-size:85%;padding:.3em .75em;text-decoration:none}.yui3-skin-sam .yui3-tab-label:hover,.yui3-skin-sam .yui3-tab-label:focus{background:#bfdaff url(../../../../assets/skins/sam/sprite.png) repeat-x left -1300px;outline:0}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:focus,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:hover{background:#2647a0 url(../../../../assets/skins/sam/sprite.png) repeat-x left -1400px;color:#fff}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{padding:.4em .75em}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{border-color:#243356}.yui3-skin-sam .yui3-tabview-panel{background:#edf5ff}.yui3-skin-sam .yui3-tabview-panel{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}#yui3-css-stamp.skin-sam-tabview{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/tabview/assets/tabview-core.css b/design/standard/lib/yui/3.17.2/build/tabview/assets/tabview-core.css new file mode 100644 index 0000000..81573e7 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/assets/tabview-core.css @@ -0,0 +1,49 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-tab-panel { + display:none; +} + +.yui3-tab-panel-selected { + display:block; +} + +.yui3-tabview-list, +.yui3-tab { + margin:0; + padding:0; + list-style:none; +} + +.yui3-tabview { + position:relative; /* contain absolute positioned tabs (left/right) */ +} + +.yui3-tabview, +.yui3-tabview-list, +.yui3-tabview-panel, +.yui3-tab, +.yui3-tab-panel { /* IE: kill space between horizontal tabs */ + zoom:1; +} + +.yui3-tab { + display:inline-block; + *display:inline; /* IE */ + vertical-align:bottom; /* safari: for overlap */ + cursor:pointer; +} + +.yui3-tab-label { + display:block; + display:inline-block; + padding: 6px 10px; + position:relative; /* IE: to allow overlap */ + text-decoration: none; + vertical-align:bottom; /* safari: for overlap */ +} diff --git a/design/standard/lib/yui/3.17.2/build/tabview/tabview-coverage.js b/design/standard/lib/yui/3.17.2/build/tabview/tabview-coverage.js new file mode 100644 index 0000000..343dd94 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/tabview-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/tabview/tabview.js']) { + __coverage__['build/tabview/tabview.js'] = {"path":"build/tabview/tabview.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":38}}},"2":{"name":"(anonymous_2)","line":22,"loc":{"start":{"line":22,"column":22},"end":{"line":22,"column":33}}},"3":{"name":"(anonymous_3)","line":26,"loc":{"start":{"line":26,"column":25},"end":{"line":26,"column":36}}},"4":{"name":"(anonymous_4)","line":34,"loc":{"start":{"line":34,"column":26},"end":{"line":34,"column":37}}},"5":{"name":"(anonymous_5)","line":42,"loc":{"start":{"line":42,"column":24},"end":{"line":42,"column":36}}},"6":{"name":"(anonymous_6)","line":56,"loc":{"start":{"line":56,"column":15},"end":{"line":56,"column":36}}},"7":{"name":"(anonymous_7)","line":67,"loc":{"start":{"line":67,"column":12},"end":{"line":67,"column":23}}},"8":{"name":"(anonymous_8)","line":84,"loc":{"start":{"line":84,"column":14},"end":{"line":84,"column":25}}},"9":{"name":"(anonymous_9)","line":93,"loc":{"start":{"line":93,"column":22},"end":{"line":93,"column":33}}},"10":{"name":"(anonymous_10)","line":97,"loc":{"start":{"line":97,"column":18},"end":{"line":97,"column":32}}},"11":{"name":"(anonymous_11)","line":110,"loc":{"start":{"line":110,"column":20},"end":{"line":110,"column":41}}},"12":{"name":"(anonymous_12)","line":117,"loc":{"start":{"line":117,"column":21},"end":{"line":117,"column":42}}},"13":{"name":"(anonymous_13)","line":124,"loc":{"start":{"line":124,"column":17},"end":{"line":124,"column":38}}},"14":{"name":"(anonymous_14)","line":137,"loc":{"start":{"line":137,"column":22},"end":{"line":137,"column":40}}},"15":{"name":"(anonymous_15)","line":154,"loc":{"start":{"line":154,"column":20},"end":{"line":154,"column":35}}},"16":{"name":"(anonymous_16)","line":166,"loc":{"start":{"line":166,"column":20},"end":{"line":166,"column":35}}},"17":{"name":"(anonymous_17)","line":184,"loc":{"start":{"line":184,"column":18},"end":{"line":184,"column":36}}},"18":{"name":"(anonymous_18)","line":187,"loc":{"start":{"line":187,"column":19},"end":{"line":187,"column":37}}},"19":{"name":"(anonymous_19)","line":216,"loc":{"start":{"line":216,"column":25},"end":{"line":216,"column":44}}},"20":{"name":"(anonymous_20)","line":220,"loc":{"start":{"line":220,"column":29},"end":{"line":220,"column":45}}},"21":{"name":"(anonymous_21)","line":224,"loc":{"start":{"line":224,"column":24},"end":{"line":224,"column":36}}},"22":{"name":"(anonymous_22)","line":232,"loc":{"start":{"line":232,"column":15},"end":{"line":232,"column":26}}},"23":{"name":"(anonymous_23)","line":252,"loc":{"start":{"line":252,"column":12},"end":{"line":252,"column":23}}},"24":{"name":"(anonymous_24)","line":262,"loc":{"start":{"line":262,"column":12},"end":{"line":262,"column":23}}},"25":{"name":"(anonymous_25)","line":267,"loc":{"start":{"line":267,"column":14},"end":{"line":267,"column":25}}},"26":{"name":"(anonymous_26)","line":272,"loc":{"start":{"line":272,"column":18},"end":{"line":272,"column":29}}},"27":{"name":"(anonymous_27)","line":277,"loc":{"start":{"line":277,"column":10},"end":{"line":277,"column":21}}},"28":{"name":"(anonymous_28)","line":291,"loc":{"start":{"line":291,"column":13},"end":{"line":291,"column":24}}},"29":{"name":"(anonymous_29)","line":296,"loc":{"start":{"line":296,"column":17},"end":{"line":296,"column":29}}},"30":{"name":"(anonymous_30)","line":305,"loc":{"start":{"line":305,"column":17},"end":{"line":305,"column":28}}},"31":{"name":"(anonymous_31)","line":311,"loc":{"start":{"line":311,"column":21},"end":{"line":311,"column":32}}},"32":{"name":"(anonymous_32)","line":315,"loc":{"start":{"line":315,"column":21},"end":{"line":315,"column":37}}},"33":{"name":"(anonymous_33)","line":323,"loc":{"start":{"line":323,"column":23},"end":{"line":323,"column":41}}},"34":{"name":"(anonymous_34)","line":331,"loc":{"start":{"line":331,"column":23},"end":{"line":331,"column":34}}},"35":{"name":"(anonymous_35)","line":336,"loc":{"start":{"line":336,"column":26},"end":{"line":336,"column":37}}},"36":{"name":"(anonymous_36)","line":398,"loc":{"start":{"line":398,"column":20},"end":{"line":398,"column":35}}},"37":{"name":"(anonymous_37)","line":416,"loc":{"start":{"line":416,"column":18},"end":{"line":416,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":436,"column":3}},"2":{"start":{"line":9,"column":0},"end":{"line":195,"column":3}},"3":{"start":{"line":23,"column":8},"end":{"line":23,"column":54}},"4":{"start":{"line":27,"column":8},"end":{"line":27,"column":53}},"5":{"start":{"line":29,"column":8},"end":{"line":29,"column":61}},"6":{"start":{"line":31,"column":8},"end":{"line":31,"column":20}},"7":{"start":{"line":35,"column":8},"end":{"line":35,"column":54}},"8":{"start":{"line":37,"column":8},"end":{"line":37,"column":62}},"9":{"start":{"line":39,"column":8},"end":{"line":39,"column":20}},"10":{"start":{"line":43,"column":8},"end":{"line":44,"column":46}},"11":{"start":{"line":46,"column":8},"end":{"line":51,"column":9}},"12":{"start":{"line":47,"column":12},"end":{"line":47,"column":57}},"13":{"start":{"line":48,"column":12},"end":{"line":50,"column":13}},"14":{"start":{"line":49,"column":16},"end":{"line":49,"column":45}},"15":{"start":{"line":53,"column":8},"end":{"line":53,"column":54}},"16":{"start":{"line":57,"column":8},"end":{"line":57,"column":73}},"17":{"start":{"line":59,"column":8},"end":{"line":64,"column":9}},"18":{"start":{"line":60,"column":12},"end":{"line":63,"column":15}},"19":{"start":{"line":72,"column":8},"end":{"line":77,"column":23}},"20":{"start":{"line":79,"column":8},"end":{"line":79,"column":52}},"21":{"start":{"line":80,"column":8},"end":{"line":80,"column":54}},"22":{"start":{"line":81,"column":8},"end":{"line":81,"column":59}},"23":{"start":{"line":85,"column":8},"end":{"line":85,"column":48}},"24":{"start":{"line":86,"column":8},"end":{"line":86,"column":40}},"25":{"start":{"line":87,"column":8},"end":{"line":87,"column":41}},"26":{"start":{"line":88,"column":8},"end":{"line":88,"column":55}},"27":{"start":{"line":89,"column":8},"end":{"line":89,"column":37}},"28":{"start":{"line":90,"column":8},"end":{"line":90,"column":35}},"29":{"start":{"line":95,"column":8},"end":{"line":95,"column":62}},"30":{"start":{"line":97,"column":8},"end":{"line":102,"column":11}},"31":{"start":{"line":98,"column":12},"end":{"line":101,"column":13}},"32":{"start":{"line":99,"column":16},"end":{"line":99,"column":32}},"33":{"start":{"line":100,"column":16},"end":{"line":100,"column":28}},"34":{"start":{"line":103,"column":8},"end":{"line":107,"column":9}},"35":{"start":{"line":105,"column":12},"end":{"line":105,"column":45}},"36":{"start":{"line":106,"column":12},"end":{"line":106,"column":41}},"37":{"start":{"line":111,"column":8},"end":{"line":111,"column":40}},"38":{"start":{"line":112,"column":8},"end":{"line":114,"column":9}},"39":{"start":{"line":113,"column":12},"end":{"line":113,"column":36}},"40":{"start":{"line":118,"column":8},"end":{"line":118,"column":41}},"41":{"start":{"line":119,"column":8},"end":{"line":121,"column":9}},"42":{"start":{"line":120,"column":12},"end":{"line":120,"column":36}},"43":{"start":{"line":125,"column":8},"end":{"line":130,"column":27}},"44":{"start":{"line":132,"column":8},"end":{"line":145,"column":9}},"45":{"start":{"line":133,"column":12},"end":{"line":133,"column":43}},"46":{"start":{"line":134,"column":12},"end":{"line":134,"column":77}},"47":{"start":{"line":135,"column":12},"end":{"line":135,"column":77}},"48":{"start":{"line":137,"column":12},"end":{"line":144,"column":15}},"49":{"start":{"line":138,"column":16},"end":{"line":138,"column":65}},"50":{"start":{"line":139,"column":16},"end":{"line":143,"column":19}},"51":{"start":{"line":155,"column":16},"end":{"line":155,"column":35}},"52":{"start":{"line":156,"column":16},"end":{"line":158,"column":17}},"53":{"start":{"line":157,"column":20},"end":{"line":157,"column":73}},"54":{"start":{"line":159,"column":16},"end":{"line":159,"column":28}},"55":{"start":{"line":167,"column":16},"end":{"line":167,"column":35}},"56":{"start":{"line":168,"column":16},"end":{"line":170,"column":17}},"57":{"start":{"line":169,"column":20},"end":{"line":169,"column":74}},"58":{"start":{"line":171,"column":16},"end":{"line":171,"column":28}},"59":{"start":{"line":185,"column":12},"end":{"line":185,"column":67}},"60":{"start":{"line":188,"column":12},"end":{"line":188,"column":68}},"61":{"start":{"line":198,"column":0},"end":{"line":198,"column":56}},"62":{"start":{"line":199,"column":0},"end":{"line":199,"column":58}},"63":{"start":{"line":201,"column":0},"end":{"line":201,"column":20}},"64":{"start":{"line":211,"column":0},"end":{"line":423,"column":3}},"65":{"start":{"line":217,"column":8},"end":{"line":217,"column":93}},"66":{"start":{"line":221,"column":7},"end":{"line":221,"column":46}},"67":{"start":{"line":225,"column":8},"end":{"line":229,"column":9}},"68":{"start":{"line":226,"column":12},"end":{"line":226,"column":27}},"69":{"start":{"line":228,"column":12},"end":{"line":228,"column":24}},"70":{"start":{"line":233,"column":8},"end":{"line":235,"column":42}},"71":{"start":{"line":237,"column":8},"end":{"line":240,"column":9}},"72":{"start":{"line":238,"column":12},"end":{"line":238,"column":26}},"73":{"start":{"line":239,"column":12},"end":{"line":239,"column":33}},"74":{"start":{"line":242,"column":8},"end":{"line":242,"column":34}},"75":{"start":{"line":243,"column":8},"end":{"line":243,"column":61}},"76":{"start":{"line":246,"column":8},"end":{"line":249,"column":11}},"77":{"start":{"line":253,"column":8},"end":{"line":253,"column":52}},"78":{"start":{"line":255,"column":8},"end":{"line":255,"column":58}},"79":{"start":{"line":256,"column":8},"end":{"line":256,"column":62}},"80":{"start":{"line":257,"column":8},"end":{"line":257,"column":45}},"81":{"start":{"line":258,"column":8},"end":{"line":258,"column":49}},"82":{"start":{"line":259,"column":8},"end":{"line":259,"column":55}},"83":{"start":{"line":263,"column":7},"end":{"line":263,"column":66}},"84":{"start":{"line":264,"column":7},"end":{"line":264,"column":59}},"85":{"start":{"line":268,"column":8},"end":{"line":268,"column":28}},"86":{"start":{"line":269,"column":8},"end":{"line":269,"column":25}},"87":{"start":{"line":273,"column":8},"end":{"line":274,"column":48}},"88":{"start":{"line":278,"column":8},"end":{"line":280,"column":44}},"89":{"start":{"line":282,"column":8},"end":{"line":284,"column":9}},"90":{"start":{"line":283,"column":12},"end":{"line":283,"column":54}},"91":{"start":{"line":286,"column":8},"end":{"line":288,"column":9}},"92":{"start":{"line":287,"column":12},"end":{"line":287,"column":53}},"93":{"start":{"line":292,"column":8},"end":{"line":292,"column":41}},"94":{"start":{"line":293,"column":8},"end":{"line":293,"column":39}},"95":{"start":{"line":297,"column":9},"end":{"line":302,"column":10}},"96":{"start":{"line":300,"column":13},"end":{"line":300,"column":41}},"97":{"start":{"line":301,"column":13},"end":{"line":301,"column":41}},"98":{"start":{"line":306,"column":7},"end":{"line":308,"column":10}},"99":{"start":{"line":312,"column":8},"end":{"line":312,"column":48}},"100":{"start":{"line":316,"column":8},"end":{"line":316,"column":47}},"101":{"start":{"line":317,"column":8},"end":{"line":319,"column":9}},"102":{"start":{"line":318,"column":12},"end":{"line":318,"column":37}},"103":{"start":{"line":320,"column":8},"end":{"line":320,"column":21}},"104":{"start":{"line":324,"column":8},"end":{"line":324,"column":42}},"105":{"start":{"line":325,"column":8},"end":{"line":327,"column":9}},"106":{"start":{"line":326,"column":12},"end":{"line":326,"column":35}},"107":{"start":{"line":328,"column":8},"end":{"line":328,"column":23}},"108":{"start":{"line":332,"column":8},"end":{"line":332,"column":47}},"109":{"start":{"line":337,"column":8},"end":{"line":341,"column":18}},"110":{"start":{"line":343,"column":8},"end":{"line":343,"column":38}},"111":{"start":{"line":345,"column":8},"end":{"line":350,"column":9}},"112":{"start":{"line":346,"column":12},"end":{"line":346,"column":32}},"113":{"start":{"line":347,"column":12},"end":{"line":349,"column":13}},"114":{"start":{"line":348,"column":16},"end":{"line":348,"column":53}},"115":{"start":{"line":353,"column":8},"end":{"line":356,"column":9}},"116":{"start":{"line":354,"column":12},"end":{"line":355,"column":61}},"117":{"start":{"line":358,"column":8},"end":{"line":361,"column":9}},"118":{"start":{"line":359,"column":12},"end":{"line":359,"column":55}},"119":{"start":{"line":360,"column":12},"end":{"line":360,"column":49}},"120":{"start":{"line":362,"column":8},"end":{"line":362,"column":21}},"121":{"start":{"line":399,"column":16},"end":{"line":399,"column":35}},"122":{"start":{"line":400,"column":16},"end":{"line":402,"column":17}},"123":{"start":{"line":401,"column":20},"end":{"line":401,"column":70}},"124":{"start":{"line":403,"column":16},"end":{"line":403,"column":28}},"125":{"start":{"line":417,"column":12},"end":{"line":418,"column":30}},"126":{"start":{"line":419,"column":12},"end":{"line":419,"column":23}}},"branchMap":{"1":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":8},"end":{"line":46,"column":8}},{"start":{"line":46,"column":8},"end":{"line":46,"column":8}}]},"2":{"line":47,"type":"binary-expr","locations":[{"start":{"line":47,"column":24},"end":{"line":47,"column":40}},{"start":{"line":47,"column":44},"end":{"line":47,"column":56}}]},"3":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":12},"end":{"line":48,"column":12}},{"start":{"line":48,"column":12},"end":{"line":48,"column":12}}]},"4":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":8},"end":{"line":59,"column":8}},{"start":{"line":59,"column":8},"end":{"line":59,"column":8}}]},"5":{"line":95,"type":"binary-expr","locations":[{"start":{"line":95,"column":24},"end":{"line":95,"column":45}},{"start":{"line":95,"column":49},"end":{"line":95,"column":61}}]},"6":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":12},"end":{"line":98,"column":12}},{"start":{"line":98,"column":12},"end":{"line":98,"column":12}}]},"7":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":8},"end":{"line":103,"column":8}},{"start":{"line":103,"column":8},"end":{"line":103,"column":8}}]},"8":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":8},"end":{"line":112,"column":8}},{"start":{"line":112,"column":8},"end":{"line":112,"column":8}}]},"9":{"line":119,"type":"if","locations":[{"start":{"line":119,"column":8},"end":{"line":119,"column":8}},{"start":{"line":119,"column":8},"end":{"line":119,"column":8}}]},"10":{"line":129,"type":"cond-expr","locations":[{"start":{"line":129,"column":35},"end":{"line":129,"column":72}},{"start":{"line":129,"column":75},"end":{"line":129,"column":79}}]},"11":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":8},"end":{"line":132,"column":8}},{"start":{"line":132,"column":8},"end":{"line":132,"column":8}}]},"12":{"line":138,"type":"cond-expr","locations":[{"start":{"line":138,"column":43},"end":{"line":138,"column":57}},{"start":{"line":138,"column":60},"end":{"line":138,"column":64}}]},"13":{"line":156,"type":"if","locations":[{"start":{"line":156,"column":16},"end":{"line":156,"column":16}},{"start":{"line":156,"column":16},"end":{"line":156,"column":16}}]},"14":{"line":168,"type":"if","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":16}},{"start":{"line":168,"column":16},"end":{"line":168,"column":16}}]},"15":{"line":225,"type":"if","locations":[{"start":{"line":225,"column":8},"end":{"line":225,"column":8}},{"start":{"line":225,"column":8},"end":{"line":225,"column":8}}]},"16":{"line":237,"type":"if","locations":[{"start":{"line":237,"column":8},"end":{"line":237,"column":8}},{"start":{"line":237,"column":8},"end":{"line":237,"column":8}}]},"17":{"line":282,"type":"if","locations":[{"start":{"line":282,"column":8},"end":{"line":282,"column":8}},{"start":{"line":282,"column":8},"end":{"line":282,"column":8}}]},"18":{"line":286,"type":"if","locations":[{"start":{"line":286,"column":8},"end":{"line":286,"column":8}},{"start":{"line":286,"column":8},"end":{"line":286,"column":8}}]},"19":{"line":297,"type":"if","locations":[{"start":{"line":297,"column":9},"end":{"line":297,"column":9}},{"start":{"line":297,"column":9},"end":{"line":297,"column":9}}]},"20":{"line":317,"type":"if","locations":[{"start":{"line":317,"column":8},"end":{"line":317,"column":8}},{"start":{"line":317,"column":8},"end":{"line":317,"column":8}}]},"21":{"line":325,"type":"if","locations":[{"start":{"line":325,"column":8},"end":{"line":325,"column":8}},{"start":{"line":325,"column":8},"end":{"line":325,"column":8}}]},"22":{"line":338,"type":"binary-expr","locations":[{"start":{"line":338,"column":19},"end":{"line":338,"column":53}},{"start":{"line":338,"column":57},"end":{"line":338,"column":59}}]},"23":{"line":345,"type":"if","locations":[{"start":{"line":345,"column":8},"end":{"line":345,"column":8}},{"start":{"line":345,"column":8},"end":{"line":345,"column":8}}]},"24":{"line":347,"type":"if","locations":[{"start":{"line":347,"column":12},"end":{"line":347,"column":12}},{"start":{"line":347,"column":12},"end":{"line":347,"column":12}}]},"25":{"line":353,"type":"if","locations":[{"start":{"line":353,"column":8},"end":{"line":353,"column":8}},{"start":{"line":353,"column":8},"end":{"line":353,"column":8}}]},"26":{"line":353,"type":"binary-expr","locations":[{"start":{"line":353,"column":12},"end":{"line":353,"column":18}},{"start":{"line":353,"column":22},"end":{"line":353,"column":28}}]},"27":{"line":358,"type":"if","locations":[{"start":{"line":358,"column":8},"end":{"line":358,"column":8}},{"start":{"line":358,"column":8},"end":{"line":358,"column":8}}]},"28":{"line":400,"type":"if","locations":[{"start":{"line":400,"column":16},"end":{"line":400,"column":16}},{"start":{"line":400,"column":16},"end":{"line":400,"column":16}}]},"29":{"line":417,"type":"cond-expr","locations":[{"start":{"line":418,"column":24},"end":{"line":418,"column":25}},{"start":{"line":418,"column":28},"end":{"line":418,"column":29}}]}},"code":["(function () { YUI.add('tabview', function (Y, NAME) {","","/**"," * The TabView module"," *"," * @module tabview"," */","","var DOT = '.',",""," /**"," * Provides a tabbed widget interface"," * @param config {Object} Object literal specifying tabview configuration properties."," *"," * @class TabView"," * @constructor"," * @extends Widget"," * @uses WidgetParent"," */"," TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], {",""," _afterChildAdded: function() {"," this.get('contentBox').focusManager.refresh();"," },",""," _defListNodeValueFn: function() {"," var node = Y.Node.create(this.LIST_TEMPLATE);",""," node.addClass(Y.TabviewBase._classNames.tabviewList);",""," return node;"," },",""," _defPanelNodeValueFn: function() {"," var node = Y.Node.create(this.PANEL_TEMPLATE);",""," node.addClass(Y.TabviewBase._classNames.tabviewPanel);",""," return node;"," },",""," _afterChildRemoved: function(e) { // update the selected tab when removed"," var i = e.index,"," selection = this.get('selection');",""," if (!selection) { // select previous item if selection removed"," selection = this.item(i - 1) || this.item(0);"," if (selection) {"," selection.set('selected', 1);"," }"," }",""," this.get('contentBox').focusManager.refresh();"," },",""," _initAria: function(contentBox) {"," var tablist = contentBox.one(Y.TabviewBase._queries.tabviewList);",""," if (tablist) {"," tablist.setAttrs({"," //'aria-labelledby':"," role: 'tablist'"," });"," }"," },",""," bindUI: function() {"," // Use the Node Focus Manager to add keyboard support:"," // Pressing the left and right arrow keys will move focus"," // among each of the tabs.",""," this.get('contentBox').plug(Y.Plugin.NodeFocusManager, {"," descendants: DOT + Y.TabviewBase._classNames.tabLabel,"," keys: { next: 'down:39', // Right arrow"," previous: 'down:37' }, // Left arrow"," circular: true"," });",""," this.after('render', this._setDefSelection);"," this.after('addChild', this._afterChildAdded);"," this.after('removeChild', this._afterChildRemoved);"," },",""," renderUI: function() {"," var contentBox = this.get('contentBox');"," this._renderListBox(contentBox);"," this._renderPanelBox(contentBox);"," this._childrenContainer = this.get('listNode');"," this._renderTabs(contentBox);"," this._initAria(contentBox);"," },",""," _setDefSelection: function() {"," // If no tab is selected, select the first tab."," var selection = this.get('selection') || this.item(0);",""," this.some(function(tab) {"," if (tab.get('selected')) {"," selection = tab;"," return true;"," }"," });"," if (selection) {"," // TODO: why both needed? (via widgetParent/Child)?"," this.set('selection', selection);"," selection.set('selected', 1);"," }"," },",""," _renderListBox: function(contentBox) {"," var node = this.get('listNode');"," if (!node.inDoc()) {"," contentBox.append(node);"," }"," },",""," _renderPanelBox: function(contentBox) {"," var node = this.get('panelNode');"," if (!node.inDoc()) {"," contentBox.append(node);"," }"," },",""," _renderTabs: function(contentBox) {"," var _classNames = Y.TabviewBase._classNames,"," _queries = Y.TabviewBase._queries,"," tabs = contentBox.all(_queries.tab),"," panelNode = this.get('panelNode'),"," panels = (panelNode) ? this.get('panelNode').get('children') : null,"," tabview = this;",""," if (tabs) { // add classNames and fill in Tab fields from markup when possible"," tabs.addClass(_classNames.tab);"," contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel);"," contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel);",""," tabs.each(function(node, i) {"," var panelNode = (panels) ? panels.item(i) : null;"," tabview.add({"," boundingBox: node,"," contentBox: node.one(DOT + _classNames.tabLabel),"," panelNode: panelNode"," });"," });"," }"," }","}, {"," ATTRS: {"," defaultChildType: {"," value: 'Tab'"," },",""," listNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(Y.TabviewBase._classNames.tabviewList);"," }"," return node;"," },",""," valueFn: '_defListNodeValueFn'"," },",""," panelNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(Y.TabviewBase._classNames.tabviewPanel);"," }"," return node;"," },",""," valueFn: '_defPanelNodeValueFn'"," },",""," tabIndex: {"," value: null"," //validator: '_validTabIndex'"," }"," },",""," HTML_PARSER: {"," listNode: function(srcNode) {"," return srcNode.one(Y.TabviewBase._queries.tabviewList);"," },"," panelNode: function(srcNode) {"," return srcNode.one(Y.TabviewBase._queries.tabviewPanel);"," }"," },",""," // Static for legacy support."," LIST_TEMPLATE: '
    ',"," PANEL_TEMPLATE: '
    '","});","","// Map to static values by default.","TabView.prototype.LIST_TEMPLATE = TabView.LIST_TEMPLATE;","TabView.prototype.PANEL_TEMPLATE = TabView.PANEL_TEMPLATE;","","Y.TabView = TabView;","/**"," * Provides Tab instances for use with TabView"," * @param config {Object} Object literal specifying tabview configuration properties."," *"," * @class Tab"," * @constructor"," * @extends Widget"," * @uses WidgetChild"," */","Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], {"," BOUNDING_TEMPLATE: '
  • ',"," CONTENT_TEMPLATE: '',"," PANEL_TEMPLATE: '
    ',",""," _uiSetSelectedPanel: function(selected) {"," this.get('panelNode').toggleClass(Y.TabviewBase._classNames.selectedPanel, selected);"," },",""," _afterTabSelectedChange: function(event) {"," this._uiSetSelectedPanel(event.newVal);"," },",""," _afterParentChange: function(e) {"," if (!e.newVal) {"," this._remove();"," } else {"," this._add();"," }"," },",""," _initAria: function() {"," var anchor = this.get('contentBox'),"," id = anchor.get('id'),"," panel = this.get('panelNode');",""," if (!id) {"," id = Y.guid();"," anchor.set('id', id);"," }"," // Apply the ARIA roles, states and properties to each tab"," anchor.set('role', 'tab');"," anchor.get('parentNode').set('role', 'presentation');",""," // Apply the ARIA roles, states and properties to each panel"," panel.setAttrs({"," role: 'tabpanel',"," 'aria-labelledby': id"," });"," },",""," syncUI: function() {"," var _classNames = Y.TabviewBase._classNames;",""," this.get('boundingBox').addClass(_classNames.tab);"," this.get('contentBox').addClass(_classNames.tabLabel);"," this.set('label', this.get('label'));"," this.set('content', this.get('content'));"," this._uiSetSelectedPanel(this.get('selected'));"," },",""," bindUI: function() {"," this.after('selectedChange', this._afterTabSelectedChange);"," this.after('parentChange', this._afterParentChange);"," },",""," renderUI: function() {"," this._renderPanel();"," this._initAria();"," },",""," _renderPanel: function() {"," this.get('parent').get('panelNode')"," .appendChild(this.get('panelNode'));"," },",""," _add: function() {"," var parent = this.get('parent').get('contentBox'),"," list = parent.get('listNode'),"," panel = parent.get('panelNode');",""," if (list) {"," list.appendChild(this.get('boundingBox'));"," }",""," if (panel) {"," panel.appendChild(this.get('panelNode'));"," }"," },",""," _remove: function() {"," this.get('boundingBox').remove();"," this.get('panelNode').remove();"," },",""," _onActivate: function(e) {"," if (e.target === this) {"," // Prevent the browser from navigating to the URL specified by the"," // anchor's href attribute."," e.domEvent.preventDefault();"," e.target.set('selected', 1);"," }"," },",""," initializer: function() {"," this.publish(this.get('triggerEvent'), {"," defaultFn: this._onActivate"," });"," },",""," _defLabelGetter: function() {"," return this.get('contentBox').getHTML();"," },",""," _defLabelSetter: function(label) {"," var labelNode = this.get('contentBox');"," if (labelNode.getHTML() !== label) { // Avoid rewriting existing label."," labelNode.setHTML(label);"," }"," return label;"," },",""," _defContentSetter: function(content) {"," var panel = this.get('panelNode');"," if (panel.getHTML() !== content) { // Avoid rewriting existing content."," panel.setHTML(content);"," }"," return content;"," },",""," _defContentGetter: function() {"," return this.get('panelNode').getHTML();"," },",""," // find panel by ID mapping from label href"," _defPanelNodeValueFn: function() {"," var _classNames = Y.TabviewBase._classNames,"," href = this.get('contentBox').get('href') || '',"," parent = this.get('parent'),"," hashIndex = href.indexOf('#'),"," panel;",""," href = href.substr(hashIndex);",""," if (href.charAt(0) === '#') { // in-page nav, find by ID"," panel = Y.one(href);"," if (panel) {"," panel.addClass(_classNames.tabPanel);"," }"," }",""," // use the one found by id, or else try matching indices"," if (!panel && parent) {"," panel = parent.get('panelNode')"," .get('children').item(this.get('index'));"," }",""," if (!panel) { // create if none found"," panel = Y.Node.create(this.PANEL_TEMPLATE);"," panel.addClass(_classNames.tabPanel);"," }"," return panel;"," }","}, {"," ATTRS: {"," /**"," * @attribute triggerEvent"," * @default \"click\""," * @type String"," */"," triggerEvent: {"," value: 'click'"," },",""," /**"," * @attribute label"," * @type HTML"," */"," label: {"," setter: '_defLabelSetter',"," getter: '_defLabelGetter'"," },",""," /**"," * @attribute content"," * @type HTML"," */"," content: {"," setter: '_defContentSetter',"," getter: '_defContentGetter'"," },",""," /**"," * @attribute panelNode"," * @type Y.Node"," */"," panelNode: {"," setter: function(node) {"," node = Y.one(node);"," if (node) {"," node.addClass(Y.TabviewBase._classNames.tabPanel);"," }"," return node;"," },"," valueFn: '_defPanelNodeValueFn'"," },",""," tabIndex: {"," value: null,"," validator: '_validTabIndex'"," }",""," },",""," HTML_PARSER: {"," selected: function() {"," var ret = (this.get('boundingBox').hasClass(Y.TabviewBase._classNames.selectedTab)) ?"," 1 : 0;"," return ret;"," }"," }","","});","","","}, '3.17.2', {"," \"requires\": ["," \"widget\","," \"widget-parent\","," \"widget-child\","," \"tabview-base\","," \"node-pluginhost\","," \"node-focusmanager\""," ],"," \"skinnable\": true","});","","}());"]}; +} +var __cov_LLv1qbws4G61$tdRLo6nQQ = __coverage__['build/tabview/tabview.js']; +__cov_LLv1qbws4G61$tdRLo6nQQ.s['1']++;YUI.add('tabview',function(Y,NAME){__cov_LLv1qbws4G61$tdRLo6nQQ.f['1']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['2']++;var DOT='.',TabView=Y.Base.create('tabView',Y.Widget,[Y.WidgetParent],{_afterChildAdded:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['2']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['3']++;this.get('contentBox').focusManager.refresh();},_defListNodeValueFn:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['3']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['4']++;var node=Y.Node.create(this.LIST_TEMPLATE);__cov_LLv1qbws4G61$tdRLo6nQQ.s['5']++;node.addClass(Y.TabviewBase._classNames.tabviewList);__cov_LLv1qbws4G61$tdRLo6nQQ.s['6']++;return node;},_defPanelNodeValueFn:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['4']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['7']++;var node=Y.Node.create(this.PANEL_TEMPLATE);__cov_LLv1qbws4G61$tdRLo6nQQ.s['8']++;node.addClass(Y.TabviewBase._classNames.tabviewPanel);__cov_LLv1qbws4G61$tdRLo6nQQ.s['9']++;return node;},_afterChildRemoved:function(e){__cov_LLv1qbws4G61$tdRLo6nQQ.f['5']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['10']++;var i=e.index,selection=this.get('selection');__cov_LLv1qbws4G61$tdRLo6nQQ.s['11']++;if(!selection){__cov_LLv1qbws4G61$tdRLo6nQQ.b['1'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['12']++;selection=(__cov_LLv1qbws4G61$tdRLo6nQQ.b['2'][0]++,this.item(i-1))||(__cov_LLv1qbws4G61$tdRLo6nQQ.b['2'][1]++,this.item(0));__cov_LLv1qbws4G61$tdRLo6nQQ.s['13']++;if(selection){__cov_LLv1qbws4G61$tdRLo6nQQ.b['3'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['14']++;selection.set('selected',1);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['3'][1]++;}}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['1'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['15']++;this.get('contentBox').focusManager.refresh();},_initAria:function(contentBox){__cov_LLv1qbws4G61$tdRLo6nQQ.f['6']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['16']++;var tablist=contentBox.one(Y.TabviewBase._queries.tabviewList);__cov_LLv1qbws4G61$tdRLo6nQQ.s['17']++;if(tablist){__cov_LLv1qbws4G61$tdRLo6nQQ.b['4'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['18']++;tablist.setAttrs({role:'tablist'});}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['4'][1]++;}},bindUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['7']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['19']++;this.get('contentBox').plug(Y.Plugin.NodeFocusManager,{descendants:DOT+Y.TabviewBase._classNames.tabLabel,keys:{next:'down:39',previous:'down:37'},circular:true});__cov_LLv1qbws4G61$tdRLo6nQQ.s['20']++;this.after('render',this._setDefSelection);__cov_LLv1qbws4G61$tdRLo6nQQ.s['21']++;this.after('addChild',this._afterChildAdded);__cov_LLv1qbws4G61$tdRLo6nQQ.s['22']++;this.after('removeChild',this._afterChildRemoved);},renderUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['8']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['23']++;var contentBox=this.get('contentBox');__cov_LLv1qbws4G61$tdRLo6nQQ.s['24']++;this._renderListBox(contentBox);__cov_LLv1qbws4G61$tdRLo6nQQ.s['25']++;this._renderPanelBox(contentBox);__cov_LLv1qbws4G61$tdRLo6nQQ.s['26']++;this._childrenContainer=this.get('listNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['27']++;this._renderTabs(contentBox);__cov_LLv1qbws4G61$tdRLo6nQQ.s['28']++;this._initAria(contentBox);},_setDefSelection:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['9']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['29']++;var selection=(__cov_LLv1qbws4G61$tdRLo6nQQ.b['5'][0]++,this.get('selection'))||(__cov_LLv1qbws4G61$tdRLo6nQQ.b['5'][1]++,this.item(0));__cov_LLv1qbws4G61$tdRLo6nQQ.s['30']++;this.some(function(tab){__cov_LLv1qbws4G61$tdRLo6nQQ.f['10']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['31']++;if(tab.get('selected')){__cov_LLv1qbws4G61$tdRLo6nQQ.b['6'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['32']++;selection=tab;__cov_LLv1qbws4G61$tdRLo6nQQ.s['33']++;return true;}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['6'][1]++;}});__cov_LLv1qbws4G61$tdRLo6nQQ.s['34']++;if(selection){__cov_LLv1qbws4G61$tdRLo6nQQ.b['7'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['35']++;this.set('selection',selection);__cov_LLv1qbws4G61$tdRLo6nQQ.s['36']++;selection.set('selected',1);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['7'][1]++;}},_renderListBox:function(contentBox){__cov_LLv1qbws4G61$tdRLo6nQQ.f['11']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['37']++;var node=this.get('listNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['38']++;if(!node.inDoc()){__cov_LLv1qbws4G61$tdRLo6nQQ.b['8'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['39']++;contentBox.append(node);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['8'][1]++;}},_renderPanelBox:function(contentBox){__cov_LLv1qbws4G61$tdRLo6nQQ.f['12']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['40']++;var node=this.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['41']++;if(!node.inDoc()){__cov_LLv1qbws4G61$tdRLo6nQQ.b['9'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['42']++;contentBox.append(node);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['9'][1]++;}},_renderTabs:function(contentBox){__cov_LLv1qbws4G61$tdRLo6nQQ.f['13']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['43']++;var _classNames=Y.TabviewBase._classNames,_queries=Y.TabviewBase._queries,tabs=contentBox.all(_queries.tab),panelNode=this.get('panelNode'),panels=panelNode?(__cov_LLv1qbws4G61$tdRLo6nQQ.b['10'][0]++,this.get('panelNode').get('children')):(__cov_LLv1qbws4G61$tdRLo6nQQ.b['10'][1]++,null),tabview=this;__cov_LLv1qbws4G61$tdRLo6nQQ.s['44']++;if(tabs){__cov_LLv1qbws4G61$tdRLo6nQQ.b['11'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['45']++;tabs.addClass(_classNames.tab);__cov_LLv1qbws4G61$tdRLo6nQQ.s['46']++;contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel);__cov_LLv1qbws4G61$tdRLo6nQQ.s['47']++;contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel);__cov_LLv1qbws4G61$tdRLo6nQQ.s['48']++;tabs.each(function(node,i){__cov_LLv1qbws4G61$tdRLo6nQQ.f['14']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['49']++;var panelNode=panels?(__cov_LLv1qbws4G61$tdRLo6nQQ.b['12'][0]++,panels.item(i)):(__cov_LLv1qbws4G61$tdRLo6nQQ.b['12'][1]++,null);__cov_LLv1qbws4G61$tdRLo6nQQ.s['50']++;tabview.add({boundingBox:node,contentBox:node.one(DOT+_classNames.tabLabel),panelNode:panelNode});});}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['11'][1]++;}}},{ATTRS:{defaultChildType:{value:'Tab'},listNode:{setter:function(node){__cov_LLv1qbws4G61$tdRLo6nQQ.f['15']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['51']++;node=Y.one(node);__cov_LLv1qbws4G61$tdRLo6nQQ.s['52']++;if(node){__cov_LLv1qbws4G61$tdRLo6nQQ.b['13'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['53']++;node.addClass(Y.TabviewBase._classNames.tabviewList);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['13'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['54']++;return node;},valueFn:'_defListNodeValueFn'},panelNode:{setter:function(node){__cov_LLv1qbws4G61$tdRLo6nQQ.f['16']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['55']++;node=Y.one(node);__cov_LLv1qbws4G61$tdRLo6nQQ.s['56']++;if(node){__cov_LLv1qbws4G61$tdRLo6nQQ.b['14'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['57']++;node.addClass(Y.TabviewBase._classNames.tabviewPanel);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['14'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['58']++;return node;},valueFn:'_defPanelNodeValueFn'},tabIndex:{value:null}},HTML_PARSER:{listNode:function(srcNode){__cov_LLv1qbws4G61$tdRLo6nQQ.f['17']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['59']++;return srcNode.one(Y.TabviewBase._queries.tabviewList);},panelNode:function(srcNode){__cov_LLv1qbws4G61$tdRLo6nQQ.f['18']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['60']++;return srcNode.one(Y.TabviewBase._queries.tabviewPanel);}},LIST_TEMPLATE:'
      ',PANEL_TEMPLATE:'
      '});__cov_LLv1qbws4G61$tdRLo6nQQ.s['61']++;TabView.prototype.LIST_TEMPLATE=TabView.LIST_TEMPLATE;__cov_LLv1qbws4G61$tdRLo6nQQ.s['62']++;TabView.prototype.PANEL_TEMPLATE=TabView.PANEL_TEMPLATE;__cov_LLv1qbws4G61$tdRLo6nQQ.s['63']++;Y.TabView=TabView;__cov_LLv1qbws4G61$tdRLo6nQQ.s['64']++;Y.Tab=Y.Base.create('tab',Y.Widget,[Y.WidgetChild],{BOUNDING_TEMPLATE:'
    • ',CONTENT_TEMPLATE:'',PANEL_TEMPLATE:'
      ',_uiSetSelectedPanel:function(selected){__cov_LLv1qbws4G61$tdRLo6nQQ.f['19']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['65']++;this.get('panelNode').toggleClass(Y.TabviewBase._classNames.selectedPanel,selected);},_afterTabSelectedChange:function(event){__cov_LLv1qbws4G61$tdRLo6nQQ.f['20']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['66']++;this._uiSetSelectedPanel(event.newVal);},_afterParentChange:function(e){__cov_LLv1qbws4G61$tdRLo6nQQ.f['21']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['67']++;if(!e.newVal){__cov_LLv1qbws4G61$tdRLo6nQQ.b['15'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['68']++;this._remove();}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['15'][1]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['69']++;this._add();}},_initAria:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['22']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['70']++;var anchor=this.get('contentBox'),id=anchor.get('id'),panel=this.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['71']++;if(!id){__cov_LLv1qbws4G61$tdRLo6nQQ.b['16'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['72']++;id=Y.guid();__cov_LLv1qbws4G61$tdRLo6nQQ.s['73']++;anchor.set('id',id);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['16'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['74']++;anchor.set('role','tab');__cov_LLv1qbws4G61$tdRLo6nQQ.s['75']++;anchor.get('parentNode').set('role','presentation');__cov_LLv1qbws4G61$tdRLo6nQQ.s['76']++;panel.setAttrs({role:'tabpanel','aria-labelledby':id});},syncUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['23']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['77']++;var _classNames=Y.TabviewBase._classNames;__cov_LLv1qbws4G61$tdRLo6nQQ.s['78']++;this.get('boundingBox').addClass(_classNames.tab);__cov_LLv1qbws4G61$tdRLo6nQQ.s['79']++;this.get('contentBox').addClass(_classNames.tabLabel);__cov_LLv1qbws4G61$tdRLo6nQQ.s['80']++;this.set('label',this.get('label'));__cov_LLv1qbws4G61$tdRLo6nQQ.s['81']++;this.set('content',this.get('content'));__cov_LLv1qbws4G61$tdRLo6nQQ.s['82']++;this._uiSetSelectedPanel(this.get('selected'));},bindUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['24']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['83']++;this.after('selectedChange',this._afterTabSelectedChange);__cov_LLv1qbws4G61$tdRLo6nQQ.s['84']++;this.after('parentChange',this._afterParentChange);},renderUI:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['25']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['85']++;this._renderPanel();__cov_LLv1qbws4G61$tdRLo6nQQ.s['86']++;this._initAria();},_renderPanel:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['26']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['87']++;this.get('parent').get('panelNode').appendChild(this.get('panelNode'));},_add:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['27']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['88']++;var parent=this.get('parent').get('contentBox'),list=parent.get('listNode'),panel=parent.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['89']++;if(list){__cov_LLv1qbws4G61$tdRLo6nQQ.b['17'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['90']++;list.appendChild(this.get('boundingBox'));}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['17'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['91']++;if(panel){__cov_LLv1qbws4G61$tdRLo6nQQ.b['18'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['92']++;panel.appendChild(this.get('panelNode'));}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['18'][1]++;}},_remove:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['28']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['93']++;this.get('boundingBox').remove();__cov_LLv1qbws4G61$tdRLo6nQQ.s['94']++;this.get('panelNode').remove();},_onActivate:function(e){__cov_LLv1qbws4G61$tdRLo6nQQ.f['29']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['95']++;if(e.target===this){__cov_LLv1qbws4G61$tdRLo6nQQ.b['19'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['96']++;e.domEvent.preventDefault();__cov_LLv1qbws4G61$tdRLo6nQQ.s['97']++;e.target.set('selected',1);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['19'][1]++;}},initializer:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['30']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['98']++;this.publish(this.get('triggerEvent'),{defaultFn:this._onActivate});},_defLabelGetter:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['31']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['99']++;return this.get('contentBox').getHTML();},_defLabelSetter:function(label){__cov_LLv1qbws4G61$tdRLo6nQQ.f['32']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['100']++;var labelNode=this.get('contentBox');__cov_LLv1qbws4G61$tdRLo6nQQ.s['101']++;if(labelNode.getHTML()!==label){__cov_LLv1qbws4G61$tdRLo6nQQ.b['20'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['102']++;labelNode.setHTML(label);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['20'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['103']++;return label;},_defContentSetter:function(content){__cov_LLv1qbws4G61$tdRLo6nQQ.f['33']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['104']++;var panel=this.get('panelNode');__cov_LLv1qbws4G61$tdRLo6nQQ.s['105']++;if(panel.getHTML()!==content){__cov_LLv1qbws4G61$tdRLo6nQQ.b['21'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['106']++;panel.setHTML(content);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['21'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['107']++;return content;},_defContentGetter:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['34']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['108']++;return this.get('panelNode').getHTML();},_defPanelNodeValueFn:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['35']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['109']++;var _classNames=Y.TabviewBase._classNames,href=(__cov_LLv1qbws4G61$tdRLo6nQQ.b['22'][0]++,this.get('contentBox').get('href'))||(__cov_LLv1qbws4G61$tdRLo6nQQ.b['22'][1]++,''),parent=this.get('parent'),hashIndex=href.indexOf('#'),panel;__cov_LLv1qbws4G61$tdRLo6nQQ.s['110']++;href=href.substr(hashIndex);__cov_LLv1qbws4G61$tdRLo6nQQ.s['111']++;if(href.charAt(0)==='#'){__cov_LLv1qbws4G61$tdRLo6nQQ.b['23'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['112']++;panel=Y.one(href);__cov_LLv1qbws4G61$tdRLo6nQQ.s['113']++;if(panel){__cov_LLv1qbws4G61$tdRLo6nQQ.b['24'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['114']++;panel.addClass(_classNames.tabPanel);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['24'][1]++;}}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['23'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['115']++;if((__cov_LLv1qbws4G61$tdRLo6nQQ.b['26'][0]++,!panel)&&(__cov_LLv1qbws4G61$tdRLo6nQQ.b['26'][1]++,parent)){__cov_LLv1qbws4G61$tdRLo6nQQ.b['25'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['116']++;panel=parent.get('panelNode').get('children').item(this.get('index'));}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['25'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['117']++;if(!panel){__cov_LLv1qbws4G61$tdRLo6nQQ.b['27'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['118']++;panel=Y.Node.create(this.PANEL_TEMPLATE);__cov_LLv1qbws4G61$tdRLo6nQQ.s['119']++;panel.addClass(_classNames.tabPanel);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['27'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['120']++;return panel;}},{ATTRS:{triggerEvent:{value:'click'},label:{setter:'_defLabelSetter',getter:'_defLabelGetter'},content:{setter:'_defContentSetter',getter:'_defContentGetter'},panelNode:{setter:function(node){__cov_LLv1qbws4G61$tdRLo6nQQ.f['36']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['121']++;node=Y.one(node);__cov_LLv1qbws4G61$tdRLo6nQQ.s['122']++;if(node){__cov_LLv1qbws4G61$tdRLo6nQQ.b['28'][0]++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['123']++;node.addClass(Y.TabviewBase._classNames.tabPanel);}else{__cov_LLv1qbws4G61$tdRLo6nQQ.b['28'][1]++;}__cov_LLv1qbws4G61$tdRLo6nQQ.s['124']++;return node;},valueFn:'_defPanelNodeValueFn'},tabIndex:{value:null,validator:'_validTabIndex'}},HTML_PARSER:{selected:function(){__cov_LLv1qbws4G61$tdRLo6nQQ.f['37']++;__cov_LLv1qbws4G61$tdRLo6nQQ.s['125']++;var ret=this.get('boundingBox').hasClass(Y.TabviewBase._classNames.selectedTab)?(__cov_LLv1qbws4G61$tdRLo6nQQ.b['29'][0]++,1):(__cov_LLv1qbws4G61$tdRLo6nQQ.b['29'][1]++,0);__cov_LLv1qbws4G61$tdRLo6nQQ.s['126']++;return ret;}}});},'3.17.2',{'requires':['widget','widget-parent','widget-child','tabview-base','node-pluginhost','node-focusmanager'],'skinnable':true}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview/tabview-debug.js b/design/standard/lib/yui/3.17.2/build/tabview/tabview-debug.js new file mode 100644 index 0000000..2c4e4a1 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/tabview-debug.js @@ -0,0 +1,443 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('tabview', function (Y, NAME) { + +/** + * The TabView module + * + * @module tabview + */ + +var DOT = '.', + + /** + * Provides a tabbed widget interface + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class TabView + * @constructor + * @extends Widget + * @uses WidgetParent + */ + TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], { + + _afterChildAdded: function() { + this.get('contentBox').focusManager.refresh(); + }, + + _defListNodeValueFn: function() { + var node = Y.Node.create(this.LIST_TEMPLATE); + + node.addClass(Y.TabviewBase._classNames.tabviewList); + + return node; + }, + + _defPanelNodeValueFn: function() { + var node = Y.Node.create(this.PANEL_TEMPLATE); + + node.addClass(Y.TabviewBase._classNames.tabviewPanel); + + return node; + }, + + _afterChildRemoved: function(e) { // update the selected tab when removed + var i = e.index, + selection = this.get('selection'); + + if (!selection) { // select previous item if selection removed + selection = this.item(i - 1) || this.item(0); + if (selection) { + selection.set('selected', 1); + } + } + + this.get('contentBox').focusManager.refresh(); + }, + + _initAria: function(contentBox) { + var tablist = contentBox.one(Y.TabviewBase._queries.tabviewList); + + if (tablist) { + tablist.setAttrs({ + //'aria-labelledby': + role: 'tablist' + }); + } + }, + + bindUI: function() { + // Use the Node Focus Manager to add keyboard support: + // Pressing the left and right arrow keys will move focus + // among each of the tabs. + + this.get('contentBox').plug(Y.Plugin.NodeFocusManager, { + descendants: DOT + Y.TabviewBase._classNames.tabLabel, + keys: { next: 'down:39', // Right arrow + previous: 'down:37' }, // Left arrow + circular: true + }); + + this.after('render', this._setDefSelection); + this.after('addChild', this._afterChildAdded); + this.after('removeChild', this._afterChildRemoved); + }, + + renderUI: function() { + var contentBox = this.get('contentBox'); + this._renderListBox(contentBox); + this._renderPanelBox(contentBox); + this._childrenContainer = this.get('listNode'); + this._renderTabs(contentBox); + this._initAria(contentBox); + }, + + _setDefSelection: function() { + // If no tab is selected, select the first tab. + var selection = this.get('selection') || this.item(0); + + this.some(function(tab) { + if (tab.get('selected')) { + selection = tab; + return true; + } + }); + if (selection) { + // TODO: why both needed? (via widgetParent/Child)? + this.set('selection', selection); + selection.set('selected', 1); + } + }, + + _renderListBox: function(contentBox) { + var node = this.get('listNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderPanelBox: function(contentBox) { + var node = this.get('panelNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderTabs: function(contentBox) { + var _classNames = Y.TabviewBase._classNames, + _queries = Y.TabviewBase._queries, + tabs = contentBox.all(_queries.tab), + panelNode = this.get('panelNode'), + panels = (panelNode) ? this.get('panelNode').get('children') : null, + tabview = this; + + if (tabs) { // add classNames and fill in Tab fields from markup when possible + tabs.addClass(_classNames.tab); + contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel); + contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel); + + tabs.each(function(node, i) { + var panelNode = (panels) ? panels.item(i) : null; + tabview.add({ + boundingBox: node, + contentBox: node.one(DOT + _classNames.tabLabel), + panelNode: panelNode + }); + }); + } + } +}, { + ATTRS: { + defaultChildType: { + value: 'Tab' + }, + + listNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(Y.TabviewBase._classNames.tabviewList); + } + return node; + }, + + valueFn: '_defListNodeValueFn' + }, + + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(Y.TabviewBase._classNames.tabviewPanel); + } + return node; + }, + + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null + //validator: '_validTabIndex' + } + }, + + HTML_PARSER: { + listNode: function(srcNode) { + return srcNode.one(Y.TabviewBase._queries.tabviewList); + }, + panelNode: function(srcNode) { + return srcNode.one(Y.TabviewBase._queries.tabviewPanel); + } + }, + + // Static for legacy support. + LIST_TEMPLATE: '
        ', + PANEL_TEMPLATE: '
        ' +}); + +// Map to static values by default. +TabView.prototype.LIST_TEMPLATE = TabView.LIST_TEMPLATE; +TabView.prototype.PANEL_TEMPLATE = TabView.PANEL_TEMPLATE; + +Y.TabView = TabView; +/** + * Provides Tab instances for use with TabView + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class Tab + * @constructor + * @extends Widget + * @uses WidgetChild + */ +Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], { + BOUNDING_TEMPLATE: '
      • ', + CONTENT_TEMPLATE: '', + PANEL_TEMPLATE: '
        ', + + _uiSetSelectedPanel: function(selected) { + this.get('panelNode').toggleClass(Y.TabviewBase._classNames.selectedPanel, selected); + }, + + _afterTabSelectedChange: function(event) { + this._uiSetSelectedPanel(event.newVal); + }, + + _afterParentChange: function(e) { + if (!e.newVal) { + this._remove(); + } else { + this._add(); + } + }, + + _initAria: function() { + var anchor = this.get('contentBox'), + id = anchor.get('id'), + panel = this.get('panelNode'); + + if (!id) { + id = Y.guid(); + anchor.set('id', id); + } + // Apply the ARIA roles, states and properties to each tab + anchor.set('role', 'tab'); + anchor.get('parentNode').set('role', 'presentation'); + + // Apply the ARIA roles, states and properties to each panel + panel.setAttrs({ + role: 'tabpanel', + 'aria-labelledby': id + }); + }, + + syncUI: function() { + var _classNames = Y.TabviewBase._classNames; + + this.get('boundingBox').addClass(_classNames.tab); + this.get('contentBox').addClass(_classNames.tabLabel); + this.set('label', this.get('label')); + this.set('content', this.get('content')); + this._uiSetSelectedPanel(this.get('selected')); + }, + + bindUI: function() { + this.after('selectedChange', this._afterTabSelectedChange); + this.after('parentChange', this._afterParentChange); + }, + + renderUI: function() { + this._renderPanel(); + this._initAria(); + }, + + _renderPanel: function() { + this.get('parent').get('panelNode') + .appendChild(this.get('panelNode')); + }, + + _add: function() { + var parent = this.get('parent').get('contentBox'), + list = parent.get('listNode'), + panel = parent.get('panelNode'); + + if (list) { + list.appendChild(this.get('boundingBox')); + } + + if (panel) { + panel.appendChild(this.get('panelNode')); + } + }, + + _remove: function() { + this.get('boundingBox').remove(); + this.get('panelNode').remove(); + }, + + _onActivate: function(e) { + if (e.target === this) { + // Prevent the browser from navigating to the URL specified by the + // anchor's href attribute. + e.domEvent.preventDefault(); + e.target.set('selected', 1); + } + }, + + initializer: function() { + this.publish(this.get('triggerEvent'), { + defaultFn: this._onActivate + }); + }, + + _defLabelGetter: function() { + return this.get('contentBox').getHTML(); + }, + + _defLabelSetter: function(label) { + var labelNode = this.get('contentBox'); + if (labelNode.getHTML() !== label) { // Avoid rewriting existing label. + labelNode.setHTML(label); + } + return label; + }, + + _defContentSetter: function(content) { + var panel = this.get('panelNode'); + if (panel.getHTML() !== content) { // Avoid rewriting existing content. + panel.setHTML(content); + } + return content; + }, + + _defContentGetter: function() { + return this.get('panelNode').getHTML(); + }, + + // find panel by ID mapping from label href + _defPanelNodeValueFn: function() { + var _classNames = Y.TabviewBase._classNames, + href = this.get('contentBox').get('href') || '', + parent = this.get('parent'), + hashIndex = href.indexOf('#'), + panel; + + href = href.substr(hashIndex); + + if (href.charAt(0) === '#') { // in-page nav, find by ID + panel = Y.one(href); + if (panel) { + panel.addClass(_classNames.tabPanel); + } + } + + // use the one found by id, or else try matching indices + if (!panel && parent) { + panel = parent.get('panelNode') + .get('children').item(this.get('index')); + } + + if (!panel) { // create if none found + panel = Y.Node.create(this.PANEL_TEMPLATE); + panel.addClass(_classNames.tabPanel); + } + return panel; + } +}, { + ATTRS: { + /** + * @attribute triggerEvent + * @default "click" + * @type String + */ + triggerEvent: { + value: 'click' + }, + + /** + * @attribute label + * @type HTML + */ + label: { + setter: '_defLabelSetter', + getter: '_defLabelGetter' + }, + + /** + * @attribute content + * @type HTML + */ + content: { + setter: '_defContentSetter', + getter: '_defContentGetter' + }, + + /** + * @attribute panelNode + * @type Y.Node + */ + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(Y.TabviewBase._classNames.tabPanel); + } + return node; + }, + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null, + validator: '_validTabIndex' + } + + }, + + HTML_PARSER: { + selected: function() { + var ret = (this.get('boundingBox').hasClass(Y.TabviewBase._classNames.selectedTab)) ? + 1 : 0; + return ret; + } + } + +}); + + +}, '3.17.2', { + "requires": [ + "widget", + "widget-parent", + "widget-child", + "tabview-base", + "node-pluginhost", + "node-focusmanager" + ], + "skinnable": true +}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview/tabview-min.js b/design/standard/lib/yui/3.17.2/build/tabview/tabview-min.js new file mode 100644 index 0000000..c501e04 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/tabview-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("tabview",function(e,t){var n=".",r=e.Base.create("tabView",e.Widget,[e.WidgetParent],{_afterChildAdded:function(){this.get("contentBox").focusManager.refresh()},_defListNodeValueFn:function(){var t=e.Node.create(this.LIST_TEMPLATE);return t.addClass(e.TabviewBase._classNames.tabviewList),t},_defPanelNodeValueFn:function(){var t=e.Node.create(this.PANEL_TEMPLATE);return t.addClass(e.TabviewBase._classNames.tabviewPanel),t},_afterChildRemoved:function(e){var t=e.index,n=this.get("selection");n||(n=this.item(t-1)||this.item(0),n&&n.set("selected",1)),this.get("contentBox").focusManager.refresh()},_initAria:function(t){var n=t.one(e.TabviewBase._queries.tabviewList);n&&n.setAttrs({role:"tablist"})},bindUI:function(){this.get("contentBox").plug(e.Plugin.NodeFocusManager,{descendants:n+e.TabviewBase._classNames.tabLabel,keys:{next:"down:39",previous:"down:37"},circular:!0}),this.after("render",this._setDefSelection),this.after("addChild",this._afterChildAdded),this.after("removeChild",this._afterChildRemoved)},renderUI:function(){var e=this.get("contentBox");this._renderListBox(e),this._renderPanelBox(e),this._childrenContainer=this.get("listNode"),this._renderTabs(e),this._initAria(e)},_setDefSelection:function(){var e=this.get("selection")||this.item(0);this.some(function(t){if(t.get("selected"))return e=t,!0}),e&&(this.set("selection",e),e.set("selected",1))},_renderListBox:function(e){var t=this.get("listNode");t.inDoc()||e.append(t)},_renderPanelBox:function(e){var t=this.get("panelNode");t.inDoc()||e.append(t)},_renderTabs:function(t){var r=e.TabviewBase._classNames,i=e.TabviewBase._queries,s=t.all(i.tab),o=this.get("panelNode"),u=o?this.get("panelNode").get("children"):null,a=this;s&&(s.addClass(r.tab),t.all(i.tabLabel).addClass(r.tabLabel),t.all(i.tabPanel).addClass(r.tabPanel),s.each(function(e,t){var i=u?u.item(t):null;a.add({boundingBox:e,contentBox:e.one(n+r.tabLabel),panelNode:i})}))}},{ATTRS:{defaultChildType:{value:"Tab"},listNode:{setter:function(t){return t=e.one(t),t&&t.addClass(e.TabviewBase._classNames.tabviewList),t},valueFn:"_defListNodeValueFn"},panelNode:{setter:function(t){return t=e.one(t),t&&t.addClass(e.TabviewBase._classNames.tabviewPanel),t},valueFn:"_defPanelNodeValueFn"},tabIndex:{value:null}},HTML_PARSER:{listNode:function(t){return t.one(e.TabviewBase._queries.tabviewList)},panelNode:function(t){return t.one(e.TabviewBase._queries.tabviewPanel)}},LIST_TEMPLATE:"
          ",PANEL_TEMPLATE:"
          "});r.prototype.LIST_TEMPLATE=r.LIST_TEMPLATE,r.prototype.PANEL_TEMPLATE=r.PANEL_TEMPLATE,e.TabView=r,e.Tab=e.Base.create("tab",e.Widget,[e.WidgetChild],{BOUNDING_TEMPLATE:"
        • ",CONTENT_TEMPLATE:"",PANEL_TEMPLATE:"
          ",_uiSetSelectedPanel:function(t){this.get("panelNode").toggleClass(e.TabviewBase._classNames.selectedPanel,t)},_afterTabSelectedChange:function(e){this._uiSetSelectedPanel(e.newVal)},_afterParentChange:function(e){e.newVal?this._add():this._remove()},_initAria:function(){var t=this.get("contentBox"),n=t.get("id"),r=this.get("panelNode");n||(n=e.guid(),t.set("id",n)),t.set("role","tab"),t.get("parentNode").set("role","presentation"),r.setAttrs({role:"tabpanel","aria-labelledby":n})},syncUI:function(){var t=e.TabviewBase._classNames;this.get("boundingBox").addClass(t.tab),this.get("contentBox").addClass(t.tabLabel),this.set("label",this.get("label")),this.set("content",this.get("content")),this._uiSetSelectedPanel(this.get("selected"))},bindUI:function(){this.after("selectedChange",this._afterTabSelectedChange),this.after("parentChange",this._afterParentChange)},renderUI:function(){this._renderPanel(),this._initAria()},_renderPanel:function(){this.get("parent").get("panelNode").appendChild(this.get("panelNode"))},_add:function(){var e=this.get("parent").get("contentBox"),t=e.get("listNode"),n=e.get("panelNode");t&&t.appendChild(this.get("boundingBox")),n&&n.appendChild(this.get("panelNode"))},_remove:function(){this.get("boundingBox").remove(),this.get("panelNode").remove()},_onActivate:function(e){e.target===this&&(e.domEvent.preventDefault(),e.target.set("selected",1))},initializer:function(){this.publish(this.get("triggerEvent"),{defaultFn:this._onActivate})},_defLabelGetter:function(){return this.get("contentBox").getHTML()},_defLabelSetter:function(e){var t=this.get("contentBox");return t.getHTML()!==e&&t.setHTML(e),e},_defContentSetter:function(e){var t=this.get("panelNode");return t.getHTML()!==e&&t.setHTML(e),e},_defContentGetter:function(){return this.get("panelNode").getHTML()},_defPanelNodeValueFn:function(){var t=e.TabviewBase._classNames,n=this.get("contentBox").get("href")||"",r=this.get("parent"),i=n.indexOf("#"),s;return n=n.substr(i),n.charAt(0)==="#"&&(s=e.one(n),s&&s.addClass(t.tabPanel)),!s&&r&&(s=r.get("panelNode").get("children").item(this.get("index"))),s||(s=e.Node.create(this.PANEL_TEMPLATE),s.addClass(t.tabPanel)),s}},{ATTRS:{triggerEvent:{value:"click"},label:{setter:"_defLabelSetter",getter:"_defLabelGetter"},content:{setter:"_defContentSetter",getter:"_defContentGetter"},panelNode:{setter:function(t){return t=e.one(t),t&&t.addClass(e.TabviewBase._classNames.tabPanel),t},valueFn:"_defPanelNodeValueFn"},tabIndex:{value:null,validator:"_validTabIndex"}},HTML_PARSER:{selected:function(){var t=this.get("boundingBox").hasClass(e.TabviewBase._classNames.selectedTab)?1:0;return t}}})},"3.17.2",{requires:["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],skinnable:!0}); diff --git a/design/standard/lib/yui/3.17.2/build/tabview/tabview.js b/design/standard/lib/yui/3.17.2/build/tabview/tabview.js new file mode 100644 index 0000000..2c4e4a1 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/tabview/tabview.js @@ -0,0 +1,443 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('tabview', function (Y, NAME) { + +/** + * The TabView module + * + * @module tabview + */ + +var DOT = '.', + + /** + * Provides a tabbed widget interface + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class TabView + * @constructor + * @extends Widget + * @uses WidgetParent + */ + TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], { + + _afterChildAdded: function() { + this.get('contentBox').focusManager.refresh(); + }, + + _defListNodeValueFn: function() { + var node = Y.Node.create(this.LIST_TEMPLATE); + + node.addClass(Y.TabviewBase._classNames.tabviewList); + + return node; + }, + + _defPanelNodeValueFn: function() { + var node = Y.Node.create(this.PANEL_TEMPLATE); + + node.addClass(Y.TabviewBase._classNames.tabviewPanel); + + return node; + }, + + _afterChildRemoved: function(e) { // update the selected tab when removed + var i = e.index, + selection = this.get('selection'); + + if (!selection) { // select previous item if selection removed + selection = this.item(i - 1) || this.item(0); + if (selection) { + selection.set('selected', 1); + } + } + + this.get('contentBox').focusManager.refresh(); + }, + + _initAria: function(contentBox) { + var tablist = contentBox.one(Y.TabviewBase._queries.tabviewList); + + if (tablist) { + tablist.setAttrs({ + //'aria-labelledby': + role: 'tablist' + }); + } + }, + + bindUI: function() { + // Use the Node Focus Manager to add keyboard support: + // Pressing the left and right arrow keys will move focus + // among each of the tabs. + + this.get('contentBox').plug(Y.Plugin.NodeFocusManager, { + descendants: DOT + Y.TabviewBase._classNames.tabLabel, + keys: { next: 'down:39', // Right arrow + previous: 'down:37' }, // Left arrow + circular: true + }); + + this.after('render', this._setDefSelection); + this.after('addChild', this._afterChildAdded); + this.after('removeChild', this._afterChildRemoved); + }, + + renderUI: function() { + var contentBox = this.get('contentBox'); + this._renderListBox(contentBox); + this._renderPanelBox(contentBox); + this._childrenContainer = this.get('listNode'); + this._renderTabs(contentBox); + this._initAria(contentBox); + }, + + _setDefSelection: function() { + // If no tab is selected, select the first tab. + var selection = this.get('selection') || this.item(0); + + this.some(function(tab) { + if (tab.get('selected')) { + selection = tab; + return true; + } + }); + if (selection) { + // TODO: why both needed? (via widgetParent/Child)? + this.set('selection', selection); + selection.set('selected', 1); + } + }, + + _renderListBox: function(contentBox) { + var node = this.get('listNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderPanelBox: function(contentBox) { + var node = this.get('panelNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderTabs: function(contentBox) { + var _classNames = Y.TabviewBase._classNames, + _queries = Y.TabviewBase._queries, + tabs = contentBox.all(_queries.tab), + panelNode = this.get('panelNode'), + panels = (panelNode) ? this.get('panelNode').get('children') : null, + tabview = this; + + if (tabs) { // add classNames and fill in Tab fields from markup when possible + tabs.addClass(_classNames.tab); + contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel); + contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel); + + tabs.each(function(node, i) { + var panelNode = (panels) ? panels.item(i) : null; + tabview.add({ + boundingBox: node, + contentBox: node.one(DOT + _classNames.tabLabel), + panelNode: panelNode + }); + }); + } + } +}, { + ATTRS: { + defaultChildType: { + value: 'Tab' + }, + + listNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(Y.TabviewBase._classNames.tabviewList); + } + return node; + }, + + valueFn: '_defListNodeValueFn' + }, + + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(Y.TabviewBase._classNames.tabviewPanel); + } + return node; + }, + + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null + //validator: '_validTabIndex' + } + }, + + HTML_PARSER: { + listNode: function(srcNode) { + return srcNode.one(Y.TabviewBase._queries.tabviewList); + }, + panelNode: function(srcNode) { + return srcNode.one(Y.TabviewBase._queries.tabviewPanel); + } + }, + + // Static for legacy support. + LIST_TEMPLATE: '
            ', + PANEL_TEMPLATE: '
            ' +}); + +// Map to static values by default. +TabView.prototype.LIST_TEMPLATE = TabView.LIST_TEMPLATE; +TabView.prototype.PANEL_TEMPLATE = TabView.PANEL_TEMPLATE; + +Y.TabView = TabView; +/** + * Provides Tab instances for use with TabView + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class Tab + * @constructor + * @extends Widget + * @uses WidgetChild + */ +Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], { + BOUNDING_TEMPLATE: '
          • ', + CONTENT_TEMPLATE: '', + PANEL_TEMPLATE: '
            ', + + _uiSetSelectedPanel: function(selected) { + this.get('panelNode').toggleClass(Y.TabviewBase._classNames.selectedPanel, selected); + }, + + _afterTabSelectedChange: function(event) { + this._uiSetSelectedPanel(event.newVal); + }, + + _afterParentChange: function(e) { + if (!e.newVal) { + this._remove(); + } else { + this._add(); + } + }, + + _initAria: function() { + var anchor = this.get('contentBox'), + id = anchor.get('id'), + panel = this.get('panelNode'); + + if (!id) { + id = Y.guid(); + anchor.set('id', id); + } + // Apply the ARIA roles, states and properties to each tab + anchor.set('role', 'tab'); + anchor.get('parentNode').set('role', 'presentation'); + + // Apply the ARIA roles, states and properties to each panel + panel.setAttrs({ + role: 'tabpanel', + 'aria-labelledby': id + }); + }, + + syncUI: function() { + var _classNames = Y.TabviewBase._classNames; + + this.get('boundingBox').addClass(_classNames.tab); + this.get('contentBox').addClass(_classNames.tabLabel); + this.set('label', this.get('label')); + this.set('content', this.get('content')); + this._uiSetSelectedPanel(this.get('selected')); + }, + + bindUI: function() { + this.after('selectedChange', this._afterTabSelectedChange); + this.after('parentChange', this._afterParentChange); + }, + + renderUI: function() { + this._renderPanel(); + this._initAria(); + }, + + _renderPanel: function() { + this.get('parent').get('panelNode') + .appendChild(this.get('panelNode')); + }, + + _add: function() { + var parent = this.get('parent').get('contentBox'), + list = parent.get('listNode'), + panel = parent.get('panelNode'); + + if (list) { + list.appendChild(this.get('boundingBox')); + } + + if (panel) { + panel.appendChild(this.get('panelNode')); + } + }, + + _remove: function() { + this.get('boundingBox').remove(); + this.get('panelNode').remove(); + }, + + _onActivate: function(e) { + if (e.target === this) { + // Prevent the browser from navigating to the URL specified by the + // anchor's href attribute. + e.domEvent.preventDefault(); + e.target.set('selected', 1); + } + }, + + initializer: function() { + this.publish(this.get('triggerEvent'), { + defaultFn: this._onActivate + }); + }, + + _defLabelGetter: function() { + return this.get('contentBox').getHTML(); + }, + + _defLabelSetter: function(label) { + var labelNode = this.get('contentBox'); + if (labelNode.getHTML() !== label) { // Avoid rewriting existing label. + labelNode.setHTML(label); + } + return label; + }, + + _defContentSetter: function(content) { + var panel = this.get('panelNode'); + if (panel.getHTML() !== content) { // Avoid rewriting existing content. + panel.setHTML(content); + } + return content; + }, + + _defContentGetter: function() { + return this.get('panelNode').getHTML(); + }, + + // find panel by ID mapping from label href + _defPanelNodeValueFn: function() { + var _classNames = Y.TabviewBase._classNames, + href = this.get('contentBox').get('href') || '', + parent = this.get('parent'), + hashIndex = href.indexOf('#'), + panel; + + href = href.substr(hashIndex); + + if (href.charAt(0) === '#') { // in-page nav, find by ID + panel = Y.one(href); + if (panel) { + panel.addClass(_classNames.tabPanel); + } + } + + // use the one found by id, or else try matching indices + if (!panel && parent) { + panel = parent.get('panelNode') + .get('children').item(this.get('index')); + } + + if (!panel) { // create if none found + panel = Y.Node.create(this.PANEL_TEMPLATE); + panel.addClass(_classNames.tabPanel); + } + return panel; + } +}, { + ATTRS: { + /** + * @attribute triggerEvent + * @default "click" + * @type String + */ + triggerEvent: { + value: 'click' + }, + + /** + * @attribute label + * @type HTML + */ + label: { + setter: '_defLabelSetter', + getter: '_defLabelGetter' + }, + + /** + * @attribute content + * @type HTML + */ + content: { + setter: '_defContentSetter', + getter: '_defContentGetter' + }, + + /** + * @attribute panelNode + * @type Y.Node + */ + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(Y.TabviewBase._classNames.tabPanel); + } + return node; + }, + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null, + validator: '_validTabIndex' + } + + }, + + HTML_PARSER: { + selected: function() { + var ret = (this.get('boundingBox').hasClass(Y.TabviewBase._classNames.selectedTab)) ? + 1 : 0; + return ret; + } + } + +}); + + +}, '3.17.2', { + "requires": [ + "widget", + "widget-parent", + "widget-child", + "tabview-base", + "node-pluginhost", + "node-focusmanager" + ], + "skinnable": true +}); diff --git a/design/standard/lib/yui/3.17.2/build/template-base/template-base-coverage.js b/design/standard/lib/yui/3.17.2/build/template-base/template-base-coverage.js new file mode 100644 index 0000000..6dfb73a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-base/template-base-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/template-base/template-base.js']) { + __coverage__['build/template-base/template-base.js'] = {"path":"build/template-base/template-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":44}}},"2":{"name":"Template","line":54,"loc":{"start":{"line":54,"column":0},"end":{"line":54,"column":36}}},"3":{"name":"(anonymous_3)","line":127,"loc":{"start":{"line":127,"column":20},"end":{"line":127,"column":54}}},"4":{"name":"(anonymous_4)","line":144,"loc":{"start":{"line":144,"column":15},"end":{"line":144,"column":39}}},"5":{"name":"(anonymous_5)","line":177,"loc":{"start":{"line":177,"column":18},"end":{"line":177,"column":57}}},"6":{"name":"(anonymous_6)","line":202,"loc":{"start":{"line":202,"column":13},"end":{"line":202,"column":38}}},"7":{"name":"(anonymous_7)","line":218,"loc":{"start":{"line":218,"column":16},"end":{"line":218,"column":41}}},"8":{"name":"(anonymous_8)","line":235,"loc":{"start":{"line":235,"column":12},"end":{"line":235,"column":43}}},"9":{"name":"(anonymous_9)","line":257,"loc":{"start":{"line":257,"column":12},"end":{"line":257,"column":44}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":272,"column":41}},"2":{"start":{"line":54,"column":0},"end":{"line":74,"column":1}},"3":{"start":{"line":61,"column":4},"end":{"line":61,"column":29}},"4":{"start":{"line":69,"column":4},"end":{"line":69,"column":45}},"5":{"start":{"line":71,"column":4},"end":{"line":73,"column":5}},"6":{"start":{"line":72,"column":8},"end":{"line":72,"column":46}},"7":{"start":{"line":85,"column":0},"end":{"line":85,"column":24}},"8":{"start":{"line":127,"column":0},"end":{"line":130,"column":2}},"9":{"start":{"line":128,"column":4},"end":{"line":128,"column":48}},"10":{"start":{"line":129,"column":4},"end":{"line":129,"column":20}},"11":{"start":{"line":144,"column":0},"end":{"line":177,"column":0}},"12":{"start":{"line":145,"column":4},"end":{"line":145,"column":44}},"13":{"start":{"line":177,"column":0},"end":{"line":188,"column":2}},"14":{"start":{"line":178,"column":4},"end":{"line":179,"column":22}},"15":{"start":{"line":181,"column":4},"end":{"line":185,"column":5}},"16":{"start":{"line":182,"column":8},"end":{"line":182,"column":41}},"17":{"start":{"line":184,"column":8},"end":{"line":184,"column":65}},"18":{"start":{"line":187,"column":4},"end":{"line":187,"column":18}},"19":{"start":{"line":190,"column":0},"end":{"line":263,"column":2}},"20":{"start":{"line":203,"column":8},"end":{"line":203,"column":76}},"21":{"start":{"line":204,"column":8},"end":{"line":204,"column":50}},"22":{"start":{"line":219,"column":8},"end":{"line":219,"column":76}},"23":{"start":{"line":220,"column":8},"end":{"line":220,"column":53}},"24":{"start":{"line":236,"column":8},"end":{"line":236,"column":76}},"25":{"start":{"line":238,"column":8},"end":{"line":240,"column":9}},"26":{"start":{"line":239,"column":12},"end":{"line":239,"column":59}},"27":{"start":{"line":242,"column":8},"end":{"line":242,"column":65}},"28":{"start":{"line":258,"column":8},"end":{"line":258,"column":76}},"29":{"start":{"line":260,"column":8},"end":{"line":261,"column":28}},"30":{"start":{"line":269,"column":0},"end":{"line":269,"column":65}}},"branchMap":{"1":{"line":69,"type":"binary-expr","locations":[{"start":{"line":69,"column":18},"end":{"line":69,"column":24}},{"start":{"line":69,"column":28},"end":{"line":69,"column":44}}]},"2":{"line":71,"type":"if","locations":[{"start":{"line":71,"column":4},"end":{"line":71,"column":4}},{"start":{"line":71,"column":4},"end":{"line":71,"column":4}}]},"3":{"line":181,"type":"if","locations":[{"start":{"line":181,"column":4},"end":{"line":181,"column":4}},{"start":{"line":181,"column":4},"end":{"line":181,"column":4}}]},"4":{"line":203,"type":"cond-expr","locations":[{"start":{"line":203,"column":28},"end":{"line":203,"column":59}},{"start":{"line":203,"column":62},"end":{"line":203,"column":75}}]},"5":{"line":219,"type":"cond-expr","locations":[{"start":{"line":219,"column":28},"end":{"line":219,"column":59}},{"start":{"line":219,"column":62},"end":{"line":219,"column":75}}]},"6":{"line":236,"type":"cond-expr","locations":[{"start":{"line":236,"column":28},"end":{"line":236,"column":59}},{"start":{"line":236,"column":62},"end":{"line":236,"column":75}}]},"7":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":8},"end":{"line":238,"column":8}},{"start":{"line":238,"column":8},"end":{"line":238,"column":8}}]},"8":{"line":258,"type":"cond-expr","locations":[{"start":{"line":258,"column":28},"end":{"line":258,"column":59}},{"start":{"line":258,"column":62},"end":{"line":258,"column":75}}]},"9":{"line":260,"type":"cond-expr","locations":[{"start":{"line":260,"column":36},"end":{"line":260,"column":76}},{"start":{"line":261,"column":16},"end":{"line":261,"column":27}}]},"10":{"line":269,"type":"cond-expr","locations":[{"start":{"line":269,"column":26},"end":{"line":269,"column":53}},{"start":{"line":269,"column":56},"end":{"line":269,"column":64}}]}},"code":["(function () { YUI.add('template-base', function (Y, NAME) {","","/**","Virtual rollup of the `template-base` and `template-micro` modules.","","@module template","@main template","@since 3.8.0","**/","","/**","Provides a generic API for using template engines such as Handlebars and","`Y.Template.Micro`.","","@module template","@submodule template-base","@since 3.8.0","**/","","/**","Provides a generic API for using template engines such as Handlebars and","`Y.Template.Micro`.","","### Examples","","Using with `Y.Template.Micro` (the default template engine):",""," YUI().use('template', function (Y) {"," var micro = new Y.Template(),"," html = micro.render('<%= data.message %>', {message: 'hello!'});",""," // ..."," });","","Using with Handlebars:",""," YUI().use('template-base', 'handlebars', function (Y) {"," var handlebars = new Y.Template(Y.Handlebars),"," html = handlebars.render('{{message}}', {message: 'hello!'});",""," // ..."," });","","@class Template","@param {Mixed} [engine=Y.Template.Micro] Template engine to use, such as"," `Y.Template.Micro` or `Y.Handlebars`. Defaults to `Y.Template.Micro` if not"," specified.","@param {Object} [defaults] Default options to use when instance methods are"," invoked.","@constructor","@since 3.8.0","**/","","function Template(engine, defaults) {"," /**"," Default options.",""," @property {Object} defaults"," @since 3.8.1"," **/"," this.defaults = defaults;",""," /**"," Template engine class.",""," @property {Mixed} engine"," @since 3.8.0"," **/"," this.engine = engine || Y.Template.Micro;",""," if (!this.engine) {"," Y.error('No template engine loaded.');"," }","}","","/**","Registry that maps template names to revived template functions.","","@property _registry","@type Object","@static","@protected","@since 3.12.0","**/","Template._registry = {};","","/**","Registers a pre-compiled template into the central template registry with a","given template string, allowing that template to be called and rendered by","that name using the `Y.Template.render()` static method.","","For example, given the following simple Handlebars template, in `foo.hbs`:","@example","

            {{tagline}}

            ","","It can be precompiled using the Handlebars CLI, and added into a YUI module","in the following way. Alternatively, `locator` can be used to automate this","process for you:","@example"," YUI.add('templates-foo', function (Y) {",""," var engine = new Y.Template(Y.Handlebars),"," precompiled;",""," precompiled = // Long precompiled template function here //",""," Y.Template.register('foo', engine.revive(precompiled));",""," }, '0.0.1', {requires: ['template-base', 'handlebars-base']});","","See the `Y.Template#render` method to see how a registered template is used.","","@method register","@param {String} templateName The template name.","@param {Function} template The function that returns the rendered string. The"," function should take the following parameters. If a pre-compiled template"," does not accept these parameters, it is up to the developer to normalize it."," @param {Object} [template.data] Data object to provide when rendering the"," template."," @param {Object} [template.options] Options to pass along to the template"," engine. See template engine docs for options supported by each engine.","@return {Function} revivedTemplate This is the same function as in `template`,"," and is done to maintain compatibility with the `Y.Template#revive()` method.","@static","@since 3.12.0","**/","Template.register = function (templateName, template) {"," Template._registry[templateName] = template;"," return template;","};","","/**","Returns the registered template function, given the template name. If an","unregistered template is accessed, this will return `undefined`.","","@method get","@param {String} templateName The template name.","@return {Function} revivedTemplate The revived template function, or `undefined`"," if it has not been registered.","@static","@since 3.12.0","**/","","Template.get = function (templateName) {"," return Template._registry[templateName];","}","","/**","Renders a template into a string, given the registered template name and data","to be interpolated. The template name must have been registered previously with","`register()`.","","Once the template has been registered and built into a YUI module, it can be","listed as a dependency for any other YUI module. Continuing from the above","example, the registered template can be used in the following way:","","@example"," YUI.add('bar', function (Y) {",""," var html = Y.Template.render('foo', {"," tagline: '\"bar\" is now template language agnostic'"," });",""," }, '0.0.1', {requires: ['template-base', 'templates-foo']});","","The template can now be used without having to know which specific rendering","engine generated it.","","@method render","@param {String} templateName The abstracted name to reference the template.","@param {Object} [data] The data to be interpolated into the template.","@param {Object} [options] Any additional options to be passed into the template.","@return {String} output The rendered result.","@static","@since 3.12.0","**/","Template.render = function (templateName, data, options) {"," var template = Template._registry[templateName],"," result = '';",""," if (template) {"," result = template(data, options);"," } else {"," Y.error('Unregistered template: \"' + templateName + '\"');"," }",""," return result;","};","","Template.prototype = {"," /**"," Compiles a template with the current template engine and returns a compiled"," template function.",""," @method compile"," @param {String} text Template text to compile."," @param {Object} [options] Options to pass along to the template engine. See"," template engine docs for options supported by each engine."," @return {Function} Compiled template function."," @since 3.8.0"," **/"," compile: function (text, options) {"," options = options ? Y.merge(this.defaults, options) : this.defaults;"," return this.engine.compile(text, options);"," },",""," /**"," Precompiles a template with the current template engine and returns a string"," containing JavaScript source code for the precompiled template.",""," @method precompile"," @param {String} text Template text to compile."," @param {Object} [options] Options to pass along to the template engine. See"," template engine docs for options supported by each engine."," @return {String} Source code for the precompiled template."," @since 3.8.0"," **/"," precompile: function (text, options) {"," options = options ? Y.merge(this.defaults, options) : this.defaults;"," return this.engine.precompile(text, options);"," },",""," /**"," Compiles and renders a template with the current template engine in a single"," step, and returns the rendered result.",""," @method render"," @param {String} text Template text to render."," @param {Object} data Data object to provide when rendering the template."," @param {Object} [options] Options to pass along to the template engine. See"," template engine docs for options supported by each engine."," @return {String} Rendered result."," @since 3.8.0"," **/"," render: function (text, data, options) {"," options = options ? Y.merge(this.defaults, options) : this.defaults;",""," if (this.engine.render) {"," return this.engine.render(text, data, options);"," }",""," return this.engine.compile(text, options)(data, options);"," },",""," /**"," Revives a precompiled template function into an executable template function"," using the current template engine. The precompiled code must already have"," been evaluated; this method won't evaluate it for you.",""," @method revive"," @param {Function} precompiled Precompiled template function."," @param {Object} [options] Options to pass along to the template engine. See"," template engine docs for options supported by each engine."," @return {Function} Compiled template function."," @since 3.8.0"," **/"," revive: function (precompiled, options) {"," options = options ? Y.merge(this.defaults, options) : this.defaults;",""," return this.engine.revive ? this.engine.revive(precompiled, options) :"," precompiled;"," }","};","","// Copy existing namespaced properties from Y.Template to the Template function","// if Y.Template already exists, then make the function the new Y.Template.","// This ensures that other modules can safely add stuff to the Y.Template","// namespace even if they're loaded before this one.","Y.Template = Y.Template ? Y.mix(Template, Y.Template) : Template;","","","}, '3.17.2', {\"requires\": [\"yui-base\"]});","","}());"]}; +} +var __cov_BkMB1MG_jJsU4nnvMLlbFw = __coverage__['build/template-base/template-base.js']; +__cov_BkMB1MG_jJsU4nnvMLlbFw.s['1']++;YUI.add('template-base',function(Y,NAME){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['1']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['2']++;function Template(engine,defaults){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['2']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['3']++;this.defaults=defaults;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['4']++;this.engine=(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['1'][0]++,engine)||(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['1'][1]++,Y.Template.Micro);__cov_BkMB1MG_jJsU4nnvMLlbFw.s['5']++;if(!this.engine){__cov_BkMB1MG_jJsU4nnvMLlbFw.b['2'][0]++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['6']++;Y.error('No template engine loaded.');}else{__cov_BkMB1MG_jJsU4nnvMLlbFw.b['2'][1]++;}}__cov_BkMB1MG_jJsU4nnvMLlbFw.s['7']++;Template._registry={};__cov_BkMB1MG_jJsU4nnvMLlbFw.s['8']++;Template.register=function(templateName,template){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['3']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['9']++;Template._registry[templateName]=template;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['10']++;return template;};__cov_BkMB1MG_jJsU4nnvMLlbFw.s['11']++;Template.get=function(templateName){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['4']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['12']++;return Template._registry[templateName];};__cov_BkMB1MG_jJsU4nnvMLlbFw.s['13']++;Template.render=function(templateName,data,options){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['5']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['14']++;var template=Template._registry[templateName],result='';__cov_BkMB1MG_jJsU4nnvMLlbFw.s['15']++;if(template){__cov_BkMB1MG_jJsU4nnvMLlbFw.b['3'][0]++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['16']++;result=template(data,options);}else{__cov_BkMB1MG_jJsU4nnvMLlbFw.b['3'][1]++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['17']++;Y.error('Unregistered template: "'+templateName+'"');}__cov_BkMB1MG_jJsU4nnvMLlbFw.s['18']++;return result;};__cov_BkMB1MG_jJsU4nnvMLlbFw.s['19']++;Template.prototype={compile:function(text,options){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['6']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['20']++;options=options?(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['4'][0]++,Y.merge(this.defaults,options)):(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['4'][1]++,this.defaults);__cov_BkMB1MG_jJsU4nnvMLlbFw.s['21']++;return this.engine.compile(text,options);},precompile:function(text,options){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['7']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['22']++;options=options?(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['5'][0]++,Y.merge(this.defaults,options)):(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['5'][1]++,this.defaults);__cov_BkMB1MG_jJsU4nnvMLlbFw.s['23']++;return this.engine.precompile(text,options);},render:function(text,data,options){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['8']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['24']++;options=options?(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['6'][0]++,Y.merge(this.defaults,options)):(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['6'][1]++,this.defaults);__cov_BkMB1MG_jJsU4nnvMLlbFw.s['25']++;if(this.engine.render){__cov_BkMB1MG_jJsU4nnvMLlbFw.b['7'][0]++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['26']++;return this.engine.render(text,data,options);}else{__cov_BkMB1MG_jJsU4nnvMLlbFw.b['7'][1]++;}__cov_BkMB1MG_jJsU4nnvMLlbFw.s['27']++;return this.engine.compile(text,options)(data,options);},revive:function(precompiled,options){__cov_BkMB1MG_jJsU4nnvMLlbFw.f['9']++;__cov_BkMB1MG_jJsU4nnvMLlbFw.s['28']++;options=options?(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['8'][0]++,Y.merge(this.defaults,options)):(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['8'][1]++,this.defaults);__cov_BkMB1MG_jJsU4nnvMLlbFw.s['29']++;return this.engine.revive?(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['9'][0]++,this.engine.revive(precompiled,options)):(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['9'][1]++,precompiled);}};__cov_BkMB1MG_jJsU4nnvMLlbFw.s['30']++;Y.Template=Y.Template?(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['10'][0]++,Y.mix(Template,Y.Template)):(__cov_BkMB1MG_jJsU4nnvMLlbFw.b['10'][1]++,Template);},'3.17.2',{'requires':['yui-base']}); diff --git a/design/standard/lib/yui/3.17.2/build/template-base/template-base-debug.js b/design/standard/lib/yui/3.17.2/build/template-base/template-base-debug.js new file mode 100644 index 0000000..8fd3254 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-base/template-base-debug.js @@ -0,0 +1,279 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('template-base', function (Y, NAME) { + +/** +Virtual rollup of the `template-base` and `template-micro` modules. + +@module template +@main template +@since 3.8.0 +**/ + +/** +Provides a generic API for using template engines such as Handlebars and +`Y.Template.Micro`. + +@module template +@submodule template-base +@since 3.8.0 +**/ + +/** +Provides a generic API for using template engines such as Handlebars and +`Y.Template.Micro`. + +### Examples + +Using with `Y.Template.Micro` (the default template engine): + + YUI().use('template', function (Y) { + var micro = new Y.Template(), + html = micro.render('<%= data.message %>', {message: 'hello!'}); + + // ... + }); + +Using with Handlebars: + + YUI().use('template-base', 'handlebars', function (Y) { + var handlebars = new Y.Template(Y.Handlebars), + html = handlebars.render('{{message}}', {message: 'hello!'}); + + // ... + }); + +@class Template +@param {Mixed} [engine=Y.Template.Micro] Template engine to use, such as + `Y.Template.Micro` or `Y.Handlebars`. Defaults to `Y.Template.Micro` if not + specified. +@param {Object} [defaults] Default options to use when instance methods are + invoked. +@constructor +@since 3.8.0 +**/ + +function Template(engine, defaults) { + /** + Default options. + + @property {Object} defaults + @since 3.8.1 + **/ + this.defaults = defaults; + + /** + Template engine class. + + @property {Mixed} engine + @since 3.8.0 + **/ + this.engine = engine || Y.Template.Micro; + + if (!this.engine) { + Y.error('No template engine loaded.'); + } +} + +/** +Registry that maps template names to revived template functions. + +@property _registry +@type Object +@static +@protected +@since 3.12.0 +**/ +Template._registry = {}; + +/** +Registers a pre-compiled template into the central template registry with a +given template string, allowing that template to be called and rendered by +that name using the `Y.Template.render()` static method. + +For example, given the following simple Handlebars template, in `foo.hbs`: +@example +

            {{tagline}}

            + +It can be precompiled using the Handlebars CLI, and added into a YUI module +in the following way. Alternatively, `locator` can be used to automate this +process for you: +@example + YUI.add('templates-foo', function (Y) { + + var engine = new Y.Template(Y.Handlebars), + precompiled; + + precompiled = // Long precompiled template function here // + + Y.Template.register('foo', engine.revive(precompiled)); + + }, '0.0.1', {requires: ['template-base', 'handlebars-base']}); + +See the `Y.Template#render` method to see how a registered template is used. + +@method register +@param {String} templateName The template name. +@param {Function} template The function that returns the rendered string. The + function should take the following parameters. If a pre-compiled template + does not accept these parameters, it is up to the developer to normalize it. + @param {Object} [template.data] Data object to provide when rendering the + template. + @param {Object} [template.options] Options to pass along to the template + engine. See template engine docs for options supported by each engine. +@return {Function} revivedTemplate This is the same function as in `template`, + and is done to maintain compatibility with the `Y.Template#revive()` method. +@static +@since 3.12.0 +**/ +Template.register = function (templateName, template) { + Template._registry[templateName] = template; + return template; +}; + +/** +Returns the registered template function, given the template name. If an +unregistered template is accessed, this will return `undefined`. + +@method get +@param {String} templateName The template name. +@return {Function} revivedTemplate The revived template function, or `undefined` + if it has not been registered. +@static +@since 3.12.0 +**/ + +Template.get = function (templateName) { + return Template._registry[templateName]; +} + +/** +Renders a template into a string, given the registered template name and data +to be interpolated. The template name must have been registered previously with +`register()`. + +Once the template has been registered and built into a YUI module, it can be +listed as a dependency for any other YUI module. Continuing from the above +example, the registered template can be used in the following way: + +@example + YUI.add('bar', function (Y) { + + var html = Y.Template.render('foo', { + tagline: '"bar" is now template language agnostic' + }); + + }, '0.0.1', {requires: ['template-base', 'templates-foo']}); + +The template can now be used without having to know which specific rendering +engine generated it. + +@method render +@param {String} templateName The abstracted name to reference the template. +@param {Object} [data] The data to be interpolated into the template. +@param {Object} [options] Any additional options to be passed into the template. +@return {String} output The rendered result. +@static +@since 3.12.0 +**/ +Template.render = function (templateName, data, options) { + var template = Template._registry[templateName], + result = ''; + + if (template) { + result = template(data, options); + } else { + Y.error('Unregistered template: "' + templateName + '"'); + } + + return result; +}; + +Template.prototype = { + /** + Compiles a template with the current template engine and returns a compiled + template function. + + @method compile + @param {String} text Template text to compile. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {Function} Compiled template function. + @since 3.8.0 + **/ + compile: function (text, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + return this.engine.compile(text, options); + }, + + /** + Precompiles a template with the current template engine and returns a string + containing JavaScript source code for the precompiled template. + + @method precompile + @param {String} text Template text to compile. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {String} Source code for the precompiled template. + @since 3.8.0 + **/ + precompile: function (text, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + return this.engine.precompile(text, options); + }, + + /** + Compiles and renders a template with the current template engine in a single + step, and returns the rendered result. + + @method render + @param {String} text Template text to render. + @param {Object} data Data object to provide when rendering the template. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {String} Rendered result. + @since 3.8.0 + **/ + render: function (text, data, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + + if (this.engine.render) { + return this.engine.render(text, data, options); + } + + return this.engine.compile(text, options)(data, options); + }, + + /** + Revives a precompiled template function into an executable template function + using the current template engine. The precompiled code must already have + been evaluated; this method won't evaluate it for you. + + @method revive + @param {Function} precompiled Precompiled template function. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {Function} Compiled template function. + @since 3.8.0 + **/ + revive: function (precompiled, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + + return this.engine.revive ? this.engine.revive(precompiled, options) : + precompiled; + } +}; + +// Copy existing namespaced properties from Y.Template to the Template function +// if Y.Template already exists, then make the function the new Y.Template. +// This ensures that other modules can safely add stuff to the Y.Template +// namespace even if they're loaded before this one. +Y.Template = Y.Template ? Y.mix(Template, Y.Template) : Template; + + +}, '3.17.2', {"requires": ["yui-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/template-base/template-base-min.js b/design/standard/lib/yui/3.17.2/build/template-base/template-base-min.js new file mode 100644 index 0000000..5ba12d1 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-base/template-base-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("template-base",function(e,t){function n(t,n){this.defaults=n,this.engine=t||e.Template.Micro,this.engine||e.error("No template engine loaded.")}n._registry={},n.register=function(e,t){return n._registry[e]=t,t},n.get=function(e){return n._registry[e]},n.render=function(t,r,i){var s=n._registry[t],o="";return s?o=s(r,i):e.error('Unregistered template: "'+t+'"'),o},n.prototype={compile:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.compile(t,n)},precompile:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.precompile(t,n)},render:function(t,n,r){return r=r?e.merge(this.defaults,r):this.defaults,this.engine.render?this.engine.render(t,n,r):this.engine.compile(t,r)(n,r)},revive:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.revive?this.engine.revive(t,n):t}},e.Template=e.Template?e.mix(n,e.Template):n},"3.17.2",{requires:["yui-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/template-base/template-base.js b/design/standard/lib/yui/3.17.2/build/template-base/template-base.js new file mode 100644 index 0000000..8fd3254 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-base/template-base.js @@ -0,0 +1,279 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('template-base', function (Y, NAME) { + +/** +Virtual rollup of the `template-base` and `template-micro` modules. + +@module template +@main template +@since 3.8.0 +**/ + +/** +Provides a generic API for using template engines such as Handlebars and +`Y.Template.Micro`. + +@module template +@submodule template-base +@since 3.8.0 +**/ + +/** +Provides a generic API for using template engines such as Handlebars and +`Y.Template.Micro`. + +### Examples + +Using with `Y.Template.Micro` (the default template engine): + + YUI().use('template', function (Y) { + var micro = new Y.Template(), + html = micro.render('<%= data.message %>', {message: 'hello!'}); + + // ... + }); + +Using with Handlebars: + + YUI().use('template-base', 'handlebars', function (Y) { + var handlebars = new Y.Template(Y.Handlebars), + html = handlebars.render('{{message}}', {message: 'hello!'}); + + // ... + }); + +@class Template +@param {Mixed} [engine=Y.Template.Micro] Template engine to use, such as + `Y.Template.Micro` or `Y.Handlebars`. Defaults to `Y.Template.Micro` if not + specified. +@param {Object} [defaults] Default options to use when instance methods are + invoked. +@constructor +@since 3.8.0 +**/ + +function Template(engine, defaults) { + /** + Default options. + + @property {Object} defaults + @since 3.8.1 + **/ + this.defaults = defaults; + + /** + Template engine class. + + @property {Mixed} engine + @since 3.8.0 + **/ + this.engine = engine || Y.Template.Micro; + + if (!this.engine) { + Y.error('No template engine loaded.'); + } +} + +/** +Registry that maps template names to revived template functions. + +@property _registry +@type Object +@static +@protected +@since 3.12.0 +**/ +Template._registry = {}; + +/** +Registers a pre-compiled template into the central template registry with a +given template string, allowing that template to be called and rendered by +that name using the `Y.Template.render()` static method. + +For example, given the following simple Handlebars template, in `foo.hbs`: +@example +

            {{tagline}}

            + +It can be precompiled using the Handlebars CLI, and added into a YUI module +in the following way. Alternatively, `locator` can be used to automate this +process for you: +@example + YUI.add('templates-foo', function (Y) { + + var engine = new Y.Template(Y.Handlebars), + precompiled; + + precompiled = // Long precompiled template function here // + + Y.Template.register('foo', engine.revive(precompiled)); + + }, '0.0.1', {requires: ['template-base', 'handlebars-base']}); + +See the `Y.Template#render` method to see how a registered template is used. + +@method register +@param {String} templateName The template name. +@param {Function} template The function that returns the rendered string. The + function should take the following parameters. If a pre-compiled template + does not accept these parameters, it is up to the developer to normalize it. + @param {Object} [template.data] Data object to provide when rendering the + template. + @param {Object} [template.options] Options to pass along to the template + engine. See template engine docs for options supported by each engine. +@return {Function} revivedTemplate This is the same function as in `template`, + and is done to maintain compatibility with the `Y.Template#revive()` method. +@static +@since 3.12.0 +**/ +Template.register = function (templateName, template) { + Template._registry[templateName] = template; + return template; +}; + +/** +Returns the registered template function, given the template name. If an +unregistered template is accessed, this will return `undefined`. + +@method get +@param {String} templateName The template name. +@return {Function} revivedTemplate The revived template function, or `undefined` + if it has not been registered. +@static +@since 3.12.0 +**/ + +Template.get = function (templateName) { + return Template._registry[templateName]; +} + +/** +Renders a template into a string, given the registered template name and data +to be interpolated. The template name must have been registered previously with +`register()`. + +Once the template has been registered and built into a YUI module, it can be +listed as a dependency for any other YUI module. Continuing from the above +example, the registered template can be used in the following way: + +@example + YUI.add('bar', function (Y) { + + var html = Y.Template.render('foo', { + tagline: '"bar" is now template language agnostic' + }); + + }, '0.0.1', {requires: ['template-base', 'templates-foo']}); + +The template can now be used without having to know which specific rendering +engine generated it. + +@method render +@param {String} templateName The abstracted name to reference the template. +@param {Object} [data] The data to be interpolated into the template. +@param {Object} [options] Any additional options to be passed into the template. +@return {String} output The rendered result. +@static +@since 3.12.0 +**/ +Template.render = function (templateName, data, options) { + var template = Template._registry[templateName], + result = ''; + + if (template) { + result = template(data, options); + } else { + Y.error('Unregistered template: "' + templateName + '"'); + } + + return result; +}; + +Template.prototype = { + /** + Compiles a template with the current template engine and returns a compiled + template function. + + @method compile + @param {String} text Template text to compile. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {Function} Compiled template function. + @since 3.8.0 + **/ + compile: function (text, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + return this.engine.compile(text, options); + }, + + /** + Precompiles a template with the current template engine and returns a string + containing JavaScript source code for the precompiled template. + + @method precompile + @param {String} text Template text to compile. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {String} Source code for the precompiled template. + @since 3.8.0 + **/ + precompile: function (text, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + return this.engine.precompile(text, options); + }, + + /** + Compiles and renders a template with the current template engine in a single + step, and returns the rendered result. + + @method render + @param {String} text Template text to render. + @param {Object} data Data object to provide when rendering the template. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {String} Rendered result. + @since 3.8.0 + **/ + render: function (text, data, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + + if (this.engine.render) { + return this.engine.render(text, data, options); + } + + return this.engine.compile(text, options)(data, options); + }, + + /** + Revives a precompiled template function into an executable template function + using the current template engine. The precompiled code must already have + been evaluated; this method won't evaluate it for you. + + @method revive + @param {Function} precompiled Precompiled template function. + @param {Object} [options] Options to pass along to the template engine. See + template engine docs for options supported by each engine. + @return {Function} Compiled template function. + @since 3.8.0 + **/ + revive: function (precompiled, options) { + options = options ? Y.merge(this.defaults, options) : this.defaults; + + return this.engine.revive ? this.engine.revive(precompiled, options) : + precompiled; + } +}; + +// Copy existing namespaced properties from Y.Template to the Template function +// if Y.Template already exists, then make the function the new Y.Template. +// This ensures that other modules can safely add stuff to the Y.Template +// namespace even if they're loaded before this one. +Y.Template = Y.Template ? Y.mix(Template, Y.Template) : Template; + + +}, '3.17.2', {"requires": ["yui-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-coverage.js b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-coverage.js new file mode 100644 index 0000000..2e52a13 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/template-micro/template-micro.js']) { + __coverage__['build/template-micro/template-micro.js'] = {"path":"build/template-micro/template-micro.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":45}}},"2":{"name":"(anonymous_2)","line":117,"loc":{"start":{"line":117,"column":16},"end":{"line":117,"column":41}}},"3":{"name":"(anonymous_3)","line":148,"loc":{"start":{"line":148,"column":36},"end":{"line":148,"column":59}}},"4":{"name":"(anonymous_4)","line":152,"loc":{"start":{"line":152,"column":40},"end":{"line":152,"column":63}}},"5":{"name":"(anonymous_5)","line":156,"loc":{"start":{"line":156,"column":31},"end":{"line":156,"column":54}}},"6":{"name":"(anonymous_6)","line":160,"loc":{"start":{"line":160,"column":39},"end":{"line":160,"column":56}}},"7":{"name":"(anonymous_7)","line":165,"loc":{"start":{"line":165,"column":39},"end":{"line":165,"column":63}}},"8":{"name":"(anonymous_8)","line":201,"loc":{"start":{"line":201,"column":19},"end":{"line":201,"column":44}}},"9":{"name":"(anonymous_9)","line":225,"loc":{"start":{"line":225,"column":15},"end":{"line":225,"column":46}}},"10":{"name":"(anonymous_10)","line":241,"loc":{"start":{"line":241,"column":15},"end":{"line":241,"column":38}}},"11":{"name":"(anonymous_11)","line":242,"loc":{"start":{"line":242,"column":11},"end":{"line":242,"column":27}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":249,"column":39}},"2":{"start":{"line":27,"column":0},"end":{"line":27,"column":42}},"3":{"start":{"line":50,"column":0},"end":{"line":65,"column":2}},"4":{"start":{"line":117,"column":0},"end":{"line":181,"column":2}},"5":{"start":{"line":120,"column":4},"end":{"line":123,"column":15}},"6":{"start":{"line":125,"column":4},"end":{"line":125,"column":46}},"7":{"start":{"line":138,"column":4},"end":{"line":172,"column":25}},"8":{"start":{"line":149,"column":12},"end":{"line":149,"column":90}},"9":{"start":{"line":153,"column":12},"end":{"line":153,"column":94}},"10":{"start":{"line":157,"column":12},"end":{"line":157,"column":89}},"11":{"start":{"line":161,"column":12},"end":{"line":161,"column":54}},"12":{"start":{"line":166,"column":12},"end":{"line":166,"column":47}},"13":{"start":{"line":175,"column":4},"end":{"line":177,"column":5}},"14":{"start":{"line":176,"column":8},"end":{"line":176,"column":61}},"15":{"start":{"line":180,"column":4},"end":{"line":180,"column":64}},"16":{"start":{"line":201,"column":0},"end":{"line":206,"column":2}},"17":{"start":{"line":202,"column":4},"end":{"line":202,"column":30}},"18":{"start":{"line":203,"column":4},"end":{"line":203,"column":30}},"19":{"start":{"line":205,"column":4},"end":{"line":205,"column":39}},"20":{"start":{"line":225,"column":0},"end":{"line":227,"column":2}},"21":{"start":{"line":226,"column":4},"end":{"line":226,"column":45}},"22":{"start":{"line":241,"column":0},"end":{"line":246,"column":2}},"23":{"start":{"line":242,"column":4},"end":{"line":245,"column":6}},"24":{"start":{"line":243,"column":8},"end":{"line":243,"column":28}},"25":{"start":{"line":244,"column":8},"end":{"line":244,"column":62}}},"branchMap":{"1":{"line":161,"type":"binary-expr","locations":[{"start":{"line":161,"column":19},"end":{"line":161,"column":47}},{"start":{"line":161,"column":51},"end":{"line":161,"column":53}}]},"2":{"line":175,"type":"if","locations":[{"start":{"line":175,"column":4},"end":{"line":175,"column":4}},{"start":{"line":175,"column":4},"end":{"line":175,"column":4}}]},"3":{"line":202,"type":"binary-expr","locations":[{"start":{"line":202,"column":4},"end":{"line":202,"column":11}},{"start":{"line":202,"column":16},"end":{"line":202,"column":28}}]},"4":{"line":243,"type":"binary-expr","locations":[{"start":{"line":243,"column":8},"end":{"line":243,"column":12}},{"start":{"line":243,"column":17},"end":{"line":243,"column":26}}]}},"code":["(function () { YUI.add('template-micro', function (Y, NAME) {","","/*jshint expr:true */","","/**","Adds the `Y.Template.Micro` template engine, which provides fast, simple","string-based micro-templating similar to ERB or Underscore templates.","","@module template","@submodule template-micro","@since 3.8.0","**/","","/**","Fast, simple string-based micro-templating engine similar to ERB or Underscore","templates.","","@class Template.Micro","@static","@since 3.8.0","**/","","// This code was heavily inspired by Underscore.js's _.template() method","// (written by Jeremy Ashkenas), which was in turn inspired by John Resig's","// micro-templating implementation.","","var Micro = Y.namespace('Template.Micro');","","/**","Default options for `Y.Template.Micro`.","","@property {Object} options",""," @param {RegExp} [options.code] Regex that matches code blocks like"," `<% ... %>`."," @param {RegExp} [options.escapedOutput] Regex that matches escaped output"," tags like `<%= ... %>`."," @param {RegExp} [options.rawOutput] Regex that matches raw output tags like"," `<%== ... %>`."," @param {RegExp} [options.stringEscape] Regex that matches characters that"," need to be escaped inside single-quoted JavaScript string literals."," @param {Object} [options.stringReplace] Hash that maps characters matched by"," `stringEscape` to the strings they should be replaced with. If you add"," a character to the `stringEscape` regex, you need to add it here too or"," it will be replaced with an empty string.","","@static","@since 3.8.0","**/","Micro.options = {"," code : /<%([\\s\\S]+?)%>/g,"," escapedOutput: /<%=([\\s\\S]+?)%>/g,"," rawOutput : /<%==([\\s\\S]+?)%>/g,"," stringEscape : /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g,",""," stringReplace: {"," '\\\\' : '\\\\\\\\',"," \"'\" : \"\\\\'\","," '\\r' : '\\\\r',"," '\\n' : '\\\\n',"," '\\t' : '\\\\t',"," '\\u2028': '\\\\u2028',"," '\\u2029': '\\\\u2029'"," }","};","","/**","Compiles a template string into a JavaScript function. Pass a data object to the","function to render the template using the given data and get back a rendered","string.","","Within a template, use `<%= ... %>` to output the value of an expression (where","`...` is the JavaScript expression or data variable to evaluate). The output","will be HTML-escaped by default. To output a raw value without escaping, use","`<%== ... %>`, but be careful not to do this with untrusted user input.","","To execute arbitrary JavaScript code within the template without rendering its","output, use `<% ... %>`, where `...` is the code to be executed. This allows the","use of if/else blocks, loops, function calls, etc., although it's recommended","that you avoid embedding anything beyond basic flow control logic in your","templates.","","Properties of the data object passed to a template function are made available","on a `data` variable within the scope of the template. So, if you pass in","the object `{message: 'hello!'}`, you can print the value of the `message`","property using `<%= data.message %>`.","","@example",""," YUI().use('template-micro', function (Y) {"," var template = '
              \">' +"," '<% Y.Array.each(data.items, function (item) { %>' +"," '
            • <%= item %>
            • ' +"," '<% }); %>' +"," '
            ';",""," // Compile the template into a function."," var compiled = Y.Template.Micro.compile(template);",""," // Render the template to HTML, passing in the data to use."," var html = compiled({"," classNames: {list: 'demo'},"," items : ['one', 'two', 'three', 'four']"," });"," });","","@method compile","@param {String} text Template text to compile.","@param {Object} [options] Options. If specified, these options will override the"," default options defined in `Y.Template.Micro.options`. See the documentation"," for that property for details on which options are available.","@return {Function} Compiled template function. Execute this function and pass in"," a data object to render the template with the given data.","@static","@since 3.8.0","**/","Micro.compile = function (text, options) {"," /*jshint evil:true */",""," var blocks = [],"," tokenClose = \"\\uffff\","," tokenOpen = \"\\ufffe\","," source;",""," options = Y.merge(Micro.options, options);",""," // Parse the input text into a string of JavaScript code, with placeholders"," // for code blocks. Text outside of code blocks will be escaped for safe"," // usage within a double-quoted string literal."," //"," // $b is a blank string, used to avoid creating lots of string objects."," //"," // $v is a function that returns the supplied value if the value is truthy"," // or the number 0, or returns an empty string if the value is falsy and not"," // 0."," //"," // $t is the template string."," source = \"var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t='\" +",""," // U+FFFE and U+FFFF are guaranteed to represent non-characters, so no"," // valid UTF-8 string should ever contain them. That means we can freely"," // strip them out of the input text (just to be safe) and then use them"," // for our own nefarious purposes as token placeholders!"," //"," // See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters"," text.replace(/\\ufffe|\\uffff/g, '')",""," .replace(options.rawOutput, function (match, code) {"," return tokenOpen + (blocks.push(\"'+\\n$v(\" + code + \")+\\n'\") - 1) + tokenClose;"," })",""," .replace(options.escapedOutput, function (match, code) {"," return tokenOpen + (blocks.push(\"'+\\n$e($v(\" + code + \"))+\\n'\") - 1) + tokenClose;"," })",""," .replace(options.code, function (match, code) {"," return tokenOpen + (blocks.push(\"';\\n\" + code + \"\\n$t+='\") - 1) + tokenClose;"," })",""," .replace(options.stringEscape, function (match) {"," return options.stringReplace[match] || '';"," })",""," // Replace the token placeholders with code."," .replace(/\\ufffe(\\d+)\\uffff/g, function (match, index) {"," return blocks[parseInt(index, 10)];"," })",""," // Remove noop string concatenations that have been left behind."," .replace(/\\n\\$t\\+='';\\n/g, '\\n') +",""," \"';\\nreturn $t;\";",""," // If compile() was called from precompile(), return precompiled source."," if (options.precompile) {"," return \"function (Y, $e, data) {\\n\" + source + \"\\n}\";"," }",""," // Otherwise, return an executable function."," return this.revive(new Function('Y', '$e', 'data', source));","};","","/**","Precompiles the given template text into a string of JavaScript source code that","can be evaluated later in another context (or on another machine) to render the","template.","","A common use case is to precompile templates at build time or on the server,","then evaluate the code on the client to render a template. The client only needs","to revive and render the template, avoiding the work of the compilation step.","","@method precompile","@param {String} text Template text to precompile.","@param {Object} [options] Options. If specified, these options will override the"," default options defined in `Y.Template.Micro.options`. See the documentation"," for that property for details on which options are available.","@return {String} Source code for the precompiled template.","@static","@since 3.8.0","**/","Micro.precompile = function (text, options) {"," options || (options = {});"," options.precompile = true;",""," return this.compile(text, options);","};","","/**","Compiles and renders the given template text in a single step.","","This can be useful for single-use templates, but if you plan to render the same","template multiple times, it's much better to use `compile()` to compile it once,","then simply call the compiled function multiple times to avoid recompiling.","","@method render","@param {String} text Template text to render.","@param {Object} data Data to pass to the template.","@param {Object} [options] Options. If specified, these options will override the"," default options defined in `Y.Template.Micro.options`. See the documentation"," for that property for details on which options are available.","@return {String} Rendered result.","@static","@since 3.8.0","**/","Micro.render = function (text, data, options) {"," return this.compile(text, options)(data);","};","","/**","Revives a precompiled template function into a normal compiled template function","that can be called to render the template. The precompiled function must already","have been evaluated to a function -- you can't pass raw JavaScript code to","`revive()`.","","@method revive","@param {Function} precompiled Precompiled template function.","@return {Function} Revived template function, ready to be rendered.","@static","@since 3.8.0","**/","Micro.revive = function (precompiled) {"," return function (data) {"," data || (data = {});"," return precompiled.call(data, Y, Y.Escape.html, data);"," };","};","","","}, '3.17.2', {\"requires\": [\"escape\"]});","","}());"]}; +} +var __cov_KTkvPcKaiXgfHYkTLSzbTA = __coverage__['build/template-micro/template-micro.js']; +__cov_KTkvPcKaiXgfHYkTLSzbTA.s['1']++;YUI.add('template-micro',function(Y,NAME){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['1']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['2']++;var Micro=Y.namespace('Template.Micro');__cov_KTkvPcKaiXgfHYkTLSzbTA.s['3']++;Micro.options={code:/<%([\s\S]+?)%>/g,escapedOutput:/<%=([\s\S]+?)%>/g,rawOutput:/<%==([\s\S]+?)%>/g,stringEscape:/\\|'|\r|\n|\t|\u2028|\u2029/g,stringReplace:{'\\':'\\\\','\'':'\\\'','\r':'\\r','\n':'\\n','\t':'\\t','\u2028':'\\u2028','\u2029':'\\u2029'}};__cov_KTkvPcKaiXgfHYkTLSzbTA.s['4']++;Micro.compile=function(text,options){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['2']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['5']++;var blocks=[],tokenClose='\uffff',tokenOpen='\ufffe',source;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['6']++;options=Y.merge(Micro.options,options);__cov_KTkvPcKaiXgfHYkTLSzbTA.s['7']++;source='var $b=\'\', $v=function (v){return v || v === 0 ? v : $b;}, $t=\''+text.replace(/\ufffe|\uffff/g,'').replace(options.rawOutput,function(match,code){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['3']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['8']++;return tokenOpen+(blocks.push('\'+\n$v('+code+')+\n\'')-1)+tokenClose;}).replace(options.escapedOutput,function(match,code){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['4']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['9']++;return tokenOpen+(blocks.push('\'+\n$e($v('+code+'))+\n\'')-1)+tokenClose;}).replace(options.code,function(match,code){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['5']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['10']++;return tokenOpen+(blocks.push('\';\n'+code+'\n$t+=\'')-1)+tokenClose;}).replace(options.stringEscape,function(match){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['6']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['11']++;return(__cov_KTkvPcKaiXgfHYkTLSzbTA.b['1'][0]++,options.stringReplace[match])||(__cov_KTkvPcKaiXgfHYkTLSzbTA.b['1'][1]++,'');}).replace(/\ufffe(\d+)\uffff/g,function(match,index){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['7']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['12']++;return blocks[parseInt(index,10)];}).replace(/\n\$t\+='';\n/g,'\n')+'\';\nreturn $t;';__cov_KTkvPcKaiXgfHYkTLSzbTA.s['13']++;if(options.precompile){__cov_KTkvPcKaiXgfHYkTLSzbTA.b['2'][0]++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['14']++;return'function (Y, $e, data) {\n'+source+'\n}';}else{__cov_KTkvPcKaiXgfHYkTLSzbTA.b['2'][1]++;}__cov_KTkvPcKaiXgfHYkTLSzbTA.s['15']++;return this.revive(new Function('Y','$e','data',source));};__cov_KTkvPcKaiXgfHYkTLSzbTA.s['16']++;Micro.precompile=function(text,options){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['8']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['17']++;(__cov_KTkvPcKaiXgfHYkTLSzbTA.b['3'][0]++,options)||(__cov_KTkvPcKaiXgfHYkTLSzbTA.b['3'][1]++,options={});__cov_KTkvPcKaiXgfHYkTLSzbTA.s['18']++;options.precompile=true;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['19']++;return this.compile(text,options);};__cov_KTkvPcKaiXgfHYkTLSzbTA.s['20']++;Micro.render=function(text,data,options){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['9']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['21']++;return this.compile(text,options)(data);};__cov_KTkvPcKaiXgfHYkTLSzbTA.s['22']++;Micro.revive=function(precompiled){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['10']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['23']++;return function(data){__cov_KTkvPcKaiXgfHYkTLSzbTA.f['11']++;__cov_KTkvPcKaiXgfHYkTLSzbTA.s['24']++;(__cov_KTkvPcKaiXgfHYkTLSzbTA.b['4'][0]++,data)||(__cov_KTkvPcKaiXgfHYkTLSzbTA.b['4'][1]++,data={});__cov_KTkvPcKaiXgfHYkTLSzbTA.s['25']++;return precompiled.call(data,Y,Y.Escape.html,data);};};},'3.17.2',{'requires':['escape']}); diff --git a/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-debug.js b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-debug.js new file mode 100644 index 0000000..7550d7a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-debug.js @@ -0,0 +1,256 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('template-micro', function (Y, NAME) { + +/*jshint expr:true */ + +/** +Adds the `Y.Template.Micro` template engine, which provides fast, simple +string-based micro-templating similar to ERB or Underscore templates. + +@module template +@submodule template-micro +@since 3.8.0 +**/ + +/** +Fast, simple string-based micro-templating engine similar to ERB or Underscore +templates. + +@class Template.Micro +@static +@since 3.8.0 +**/ + +// This code was heavily inspired by Underscore.js's _.template() method +// (written by Jeremy Ashkenas), which was in turn inspired by John Resig's +// micro-templating implementation. + +var Micro = Y.namespace('Template.Micro'); + +/** +Default options for `Y.Template.Micro`. + +@property {Object} options + + @param {RegExp} [options.code] Regex that matches code blocks like + `<% ... %>`. + @param {RegExp} [options.escapedOutput] Regex that matches escaped output + tags like `<%= ... %>`. + @param {RegExp} [options.rawOutput] Regex that matches raw output tags like + `<%== ... %>`. + @param {RegExp} [options.stringEscape] Regex that matches characters that + need to be escaped inside single-quoted JavaScript string literals. + @param {Object} [options.stringReplace] Hash that maps characters matched by + `stringEscape` to the strings they should be replaced with. If you add + a character to the `stringEscape` regex, you need to add it here too or + it will be replaced with an empty string. + +@static +@since 3.8.0 +**/ +Micro.options = { + code : /<%([\s\S]+?)%>/g, + escapedOutput: /<%=([\s\S]+?)%>/g, + rawOutput : /<%==([\s\S]+?)%>/g, + stringEscape : /\\|'|\r|\n|\t|\u2028|\u2029/g, + + stringReplace: { + '\\' : '\\\\', + "'" : "\\'", + '\r' : '\\r', + '\n' : '\\n', + '\t' : '\\t', + '\u2028': '\\u2028', + '\u2029': '\\u2029' + } +}; + +/** +Compiles a template string into a JavaScript function. Pass a data object to the +function to render the template using the given data and get back a rendered +string. + +Within a template, use `<%= ... %>` to output the value of an expression (where +`...` is the JavaScript expression or data variable to evaluate). The output +will be HTML-escaped by default. To output a raw value without escaping, use +`<%== ... %>`, but be careful not to do this with untrusted user input. + +To execute arbitrary JavaScript code within the template without rendering its +output, use `<% ... %>`, where `...` is the code to be executed. This allows the +use of if/else blocks, loops, function calls, etc., although it's recommended +that you avoid embedding anything beyond basic flow control logic in your +templates. + +Properties of the data object passed to a template function are made available +on a `data` variable within the scope of the template. So, if you pass in +the object `{message: 'hello!'}`, you can print the value of the `message` +property using `<%= data.message %>`. + +@example + + YUI().use('template-micro', function (Y) { + var template = '
              ' + + '<% Y.Array.each(data.items, function (item) { %>' + + '
            • <%= item %>
            • ' + + '<% }); %>' + + '
            '; + + // Compile the template into a function. + var compiled = Y.Template.Micro.compile(template); + + // Render the template to HTML, passing in the data to use. + var html = compiled({ + classNames: {list: 'demo'}, + items : ['one', 'two', 'three', 'four'] + }); + }); + +@method compile +@param {String} text Template text to compile. +@param {Object} [options] Options. If specified, these options will override the + default options defined in `Y.Template.Micro.options`. See the documentation + for that property for details on which options are available. +@return {Function} Compiled template function. Execute this function and pass in + a data object to render the template with the given data. +@static +@since 3.8.0 +**/ +Micro.compile = function (text, options) { + /*jshint evil:true */ + + var blocks = [], + tokenClose = "\uffff", + tokenOpen = "\ufffe", + source; + + options = Y.merge(Micro.options, options); + + // Parse the input text into a string of JavaScript code, with placeholders + // for code blocks. Text outside of code blocks will be escaped for safe + // usage within a double-quoted string literal. + // + // $b is a blank string, used to avoid creating lots of string objects. + // + // $v is a function that returns the supplied value if the value is truthy + // or the number 0, or returns an empty string if the value is falsy and not + // 0. + // + // $t is the template string. + source = "var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t='" + + + // U+FFFE and U+FFFF are guaranteed to represent non-characters, so no + // valid UTF-8 string should ever contain them. That means we can freely + // strip them out of the input text (just to be safe) and then use them + // for our own nefarious purposes as token placeholders! + // + // See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters + text.replace(/\ufffe|\uffff/g, '') + + .replace(options.rawOutput, function (match, code) { + return tokenOpen + (blocks.push("'+\n$v(" + code + ")+\n'") - 1) + tokenClose; + }) + + .replace(options.escapedOutput, function (match, code) { + return tokenOpen + (blocks.push("'+\n$e($v(" + code + "))+\n'") - 1) + tokenClose; + }) + + .replace(options.code, function (match, code) { + return tokenOpen + (blocks.push("';\n" + code + "\n$t+='") - 1) + tokenClose; + }) + + .replace(options.stringEscape, function (match) { + return options.stringReplace[match] || ''; + }) + + // Replace the token placeholders with code. + .replace(/\ufffe(\d+)\uffff/g, function (match, index) { + return blocks[parseInt(index, 10)]; + }) + + // Remove noop string concatenations that have been left behind. + .replace(/\n\$t\+='';\n/g, '\n') + + + "';\nreturn $t;"; + + // If compile() was called from precompile(), return precompiled source. + if (options.precompile) { + return "function (Y, $e, data) {\n" + source + "\n}"; + } + + // Otherwise, return an executable function. + return this.revive(new Function('Y', '$e', 'data', source)); +}; + +/** +Precompiles the given template text into a string of JavaScript source code that +can be evaluated later in another context (or on another machine) to render the +template. + +A common use case is to precompile templates at build time or on the server, +then evaluate the code on the client to render a template. The client only needs +to revive and render the template, avoiding the work of the compilation step. + +@method precompile +@param {String} text Template text to precompile. +@param {Object} [options] Options. If specified, these options will override the + default options defined in `Y.Template.Micro.options`. See the documentation + for that property for details on which options are available. +@return {String} Source code for the precompiled template. +@static +@since 3.8.0 +**/ +Micro.precompile = function (text, options) { + options || (options = {}); + options.precompile = true; + + return this.compile(text, options); +}; + +/** +Compiles and renders the given template text in a single step. + +This can be useful for single-use templates, but if you plan to render the same +template multiple times, it's much better to use `compile()` to compile it once, +then simply call the compiled function multiple times to avoid recompiling. + +@method render +@param {String} text Template text to render. +@param {Object} data Data to pass to the template. +@param {Object} [options] Options. If specified, these options will override the + default options defined in `Y.Template.Micro.options`. See the documentation + for that property for details on which options are available. +@return {String} Rendered result. +@static +@since 3.8.0 +**/ +Micro.render = function (text, data, options) { + return this.compile(text, options)(data); +}; + +/** +Revives a precompiled template function into a normal compiled template function +that can be called to render the template. The precompiled function must already +have been evaluated to a function -- you can't pass raw JavaScript code to +`revive()`. + +@method revive +@param {Function} precompiled Precompiled template function. +@return {Function} Revived template function, ready to be rendered. +@static +@since 3.8.0 +**/ +Micro.revive = function (precompiled) { + return function (data) { + data || (data = {}); + return precompiled.call(data, Y, Y.Escape.html, data); + }; +}; + + +}, '3.17.2', {"requires": ["escape"]}); diff --git a/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-min.js b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-min.js new file mode 100644 index 0000000..843bf12 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("template-micro",function(e,t){var n=e.namespace("Template.Micro");n.options={code:/<%([\s\S]+?)%>/g,escapedOutput:/<%=([\s\S]+?)%>/g,rawOutput:/<%==([\s\S]+?)%>/g,stringEscape:/\\|'|\r|\n|\t|\u2028|\u2029/g,stringReplace:{"\\":"\\\\","'":"\\'","\r":"\\r","\n":"\\n"," ":"\\t","\u2028":"\\u2028","\u2029":"\\u2029"}},n.compile=function(t,r){var i=[],s="\uffff",o="\ufffe",u;return r=e.merge(n.options,r),u="var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t='"+t.replace(/\ufffe|\uffff/g,"").replace(r.rawOutput,function(e,t){return o+(i.push("'+\n$v("+t+")+\n'")-1)+s}).replace(r.escapedOutput,function(e,t){return o+(i.push("'+\n$e($v("+t+"))+\n'")-1)+s}).replace(r.code,function(e,t){return o+(i.push("';\n"+t+"\n$t+='")-1)+s}).replace(r.stringEscape,function(e){return r.stringReplace[e]||""}).replace(/\ufffe(\d+)\uffff/g,function(e,t){return i[parseInt(t,10)]}).replace(/\n\$t\+='';\n/g,"\n")+"';\nreturn $t;",r.precompile?"function (Y, $e, data) {\n"+u+"\n}":this.revive(new Function("Y","$e","data",u))},n.precompile=function(e,t){return t||(t={}),t.precompile=!0,this.compile(e,t)},n.render=function(e,t,n){return this.compile(e,n)(t)},n.revive=function(t){return function(n){return n||(n={}),t.call(n,e,e.Escape.html,n)}}},"3.17.2",{requires:["escape"]}); diff --git a/design/standard/lib/yui/3.17.2/build/template-micro/template-micro.js b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro.js new file mode 100644 index 0000000..7550d7a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/template-micro/template-micro.js @@ -0,0 +1,256 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('template-micro', function (Y, NAME) { + +/*jshint expr:true */ + +/** +Adds the `Y.Template.Micro` template engine, which provides fast, simple +string-based micro-templating similar to ERB or Underscore templates. + +@module template +@submodule template-micro +@since 3.8.0 +**/ + +/** +Fast, simple string-based micro-templating engine similar to ERB or Underscore +templates. + +@class Template.Micro +@static +@since 3.8.0 +**/ + +// This code was heavily inspired by Underscore.js's _.template() method +// (written by Jeremy Ashkenas), which was in turn inspired by John Resig's +// micro-templating implementation. + +var Micro = Y.namespace('Template.Micro'); + +/** +Default options for `Y.Template.Micro`. + +@property {Object} options + + @param {RegExp} [options.code] Regex that matches code blocks like + `<% ... %>`. + @param {RegExp} [options.escapedOutput] Regex that matches escaped output + tags like `<%= ... %>`. + @param {RegExp} [options.rawOutput] Regex that matches raw output tags like + `<%== ... %>`. + @param {RegExp} [options.stringEscape] Regex that matches characters that + need to be escaped inside single-quoted JavaScript string literals. + @param {Object} [options.stringReplace] Hash that maps characters matched by + `stringEscape` to the strings they should be replaced with. If you add + a character to the `stringEscape` regex, you need to add it here too or + it will be replaced with an empty string. + +@static +@since 3.8.0 +**/ +Micro.options = { + code : /<%([\s\S]+?)%>/g, + escapedOutput: /<%=([\s\S]+?)%>/g, + rawOutput : /<%==([\s\S]+?)%>/g, + stringEscape : /\\|'|\r|\n|\t|\u2028|\u2029/g, + + stringReplace: { + '\\' : '\\\\', + "'" : "\\'", + '\r' : '\\r', + '\n' : '\\n', + '\t' : '\\t', + '\u2028': '\\u2028', + '\u2029': '\\u2029' + } +}; + +/** +Compiles a template string into a JavaScript function. Pass a data object to the +function to render the template using the given data and get back a rendered +string. + +Within a template, use `<%= ... %>` to output the value of an expression (where +`...` is the JavaScript expression or data variable to evaluate). The output +will be HTML-escaped by default. To output a raw value without escaping, use +`<%== ... %>`, but be careful not to do this with untrusted user input. + +To execute arbitrary JavaScript code within the template without rendering its +output, use `<% ... %>`, where `...` is the code to be executed. This allows the +use of if/else blocks, loops, function calls, etc., although it's recommended +that you avoid embedding anything beyond basic flow control logic in your +templates. + +Properties of the data object passed to a template function are made available +on a `data` variable within the scope of the template. So, if you pass in +the object `{message: 'hello!'}`, you can print the value of the `message` +property using `<%= data.message %>`. + +@example + + YUI().use('template-micro', function (Y) { + var template = '
              ' + + '<% Y.Array.each(data.items, function (item) { %>' + + '
            • <%= item %>
            • ' + + '<% }); %>' + + '
            '; + + // Compile the template into a function. + var compiled = Y.Template.Micro.compile(template); + + // Render the template to HTML, passing in the data to use. + var html = compiled({ + classNames: {list: 'demo'}, + items : ['one', 'two', 'three', 'four'] + }); + }); + +@method compile +@param {String} text Template text to compile. +@param {Object} [options] Options. If specified, these options will override the + default options defined in `Y.Template.Micro.options`. See the documentation + for that property for details on which options are available. +@return {Function} Compiled template function. Execute this function and pass in + a data object to render the template with the given data. +@static +@since 3.8.0 +**/ +Micro.compile = function (text, options) { + /*jshint evil:true */ + + var blocks = [], + tokenClose = "\uffff", + tokenOpen = "\ufffe", + source; + + options = Y.merge(Micro.options, options); + + // Parse the input text into a string of JavaScript code, with placeholders + // for code blocks. Text outside of code blocks will be escaped for safe + // usage within a double-quoted string literal. + // + // $b is a blank string, used to avoid creating lots of string objects. + // + // $v is a function that returns the supplied value if the value is truthy + // or the number 0, or returns an empty string if the value is falsy and not + // 0. + // + // $t is the template string. + source = "var $b='', $v=function (v){return v || v === 0 ? v : $b;}, $t='" + + + // U+FFFE and U+FFFF are guaranteed to represent non-characters, so no + // valid UTF-8 string should ever contain them. That means we can freely + // strip them out of the input text (just to be safe) and then use them + // for our own nefarious purposes as token placeholders! + // + // See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Noncharacters + text.replace(/\ufffe|\uffff/g, '') + + .replace(options.rawOutput, function (match, code) { + return tokenOpen + (blocks.push("'+\n$v(" + code + ")+\n'") - 1) + tokenClose; + }) + + .replace(options.escapedOutput, function (match, code) { + return tokenOpen + (blocks.push("'+\n$e($v(" + code + "))+\n'") - 1) + tokenClose; + }) + + .replace(options.code, function (match, code) { + return tokenOpen + (blocks.push("';\n" + code + "\n$t+='") - 1) + tokenClose; + }) + + .replace(options.stringEscape, function (match) { + return options.stringReplace[match] || ''; + }) + + // Replace the token placeholders with code. + .replace(/\ufffe(\d+)\uffff/g, function (match, index) { + return blocks[parseInt(index, 10)]; + }) + + // Remove noop string concatenations that have been left behind. + .replace(/\n\$t\+='';\n/g, '\n') + + + "';\nreturn $t;"; + + // If compile() was called from precompile(), return precompiled source. + if (options.precompile) { + return "function (Y, $e, data) {\n" + source + "\n}"; + } + + // Otherwise, return an executable function. + return this.revive(new Function('Y', '$e', 'data', source)); +}; + +/** +Precompiles the given template text into a string of JavaScript source code that +can be evaluated later in another context (or on another machine) to render the +template. + +A common use case is to precompile templates at build time or on the server, +then evaluate the code on the client to render a template. The client only needs +to revive and render the template, avoiding the work of the compilation step. + +@method precompile +@param {String} text Template text to precompile. +@param {Object} [options] Options. If specified, these options will override the + default options defined in `Y.Template.Micro.options`. See the documentation + for that property for details on which options are available. +@return {String} Source code for the precompiled template. +@static +@since 3.8.0 +**/ +Micro.precompile = function (text, options) { + options || (options = {}); + options.precompile = true; + + return this.compile(text, options); +}; + +/** +Compiles and renders the given template text in a single step. + +This can be useful for single-use templates, but if you plan to render the same +template multiple times, it's much better to use `compile()` to compile it once, +then simply call the compiled function multiple times to avoid recompiling. + +@method render +@param {String} text Template text to render. +@param {Object} data Data to pass to the template. +@param {Object} [options] Options. If specified, these options will override the + default options defined in `Y.Template.Micro.options`. See the documentation + for that property for details on which options are available. +@return {String} Rendered result. +@static +@since 3.8.0 +**/ +Micro.render = function (text, data, options) { + return this.compile(text, options)(data); +}; + +/** +Revives a precompiled template function into a normal compiled template function +that can be called to render the template. The precompiled function must already +have been evaluated to a function -- you can't pass raw JavaScript code to +`revive()`. + +@method revive +@param {Function} precompiled Precompiled template function. +@return {Function} Revived template function, ready to be rendered. +@static +@since 3.8.0 +**/ +Micro.revive = function (precompiled) { + return function (data) { + data || (data = {}); + return precompiled.call(data, Y, Y.Escape.html, data); + }; +}; + + +}, '3.17.2', {"requires": ["escape"]}); diff --git a/design/standard/lib/yui/3.17.2/build/test-console/assets/skins/sam/test-console-skin.css b/design/standard/lib/yui/3.17.2/build/test-console/assets/skins/sam/test-console-skin.css new file mode 100644 index 0000000..0c7d21e --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test-console/assets/skins/sam/test-console-skin.css @@ -0,0 +1,65 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +/* Reset base Console skin styles */ +.yui3-skin-sam .yui3-testconsole .yui3-console-content, +.yui3-skin-sam .yui3-testconsole .yui3-console-bd, +.yui3-skin-sam .yui3-testconsole .yui3-console-entry, +.yui3-skin-sam .yui3-testconsole .yui3-console-ft, +.yui3-skin-sam .yui3-testconsole .yui3-console-ft .yui3-console-filters-categories, +.yui3-skin-sam .yui3-testconsole .yui3-console-ft .yui3-console-filters-sources, +.yui3-skin-sam .yui3-testconsole .yui3-console-hd { + background: none; + border: none; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} + +.yui3-skin-sam .yui3-testconsole-content, +.yui3-skin-sam .yui3-testconsole .yui3-console-bd { + color: #333; + font: 13px/1.4 Helvetica, 'DejaVu Sans', 'Bitstream Vera Sans', Arial, sans-serif; +} + +.yui3-skin-sam .yui3-testconsole-content { + border: 1px solid #afafaf; +} + +.yui3-skin-sam .yui3-testconsole .yui3-console-entry { + border-bottom: 1px solid #eaeaea; + font-family: Menlo, Inconsolata, Consolas, 'DejaVu Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 11px; +} + +.yui3-skin-sam .yui3-testconsole .yui3-console-ft { + border-top: 1px solid; +} + +.yui3-skin-sam .yui3-testconsole .yui3-console-hd { + border-bottom: 1px solid; + *zoom: 1; +} + +.yui3-skin-sam .yui3-testconsole.yui3-console-collapsed .yui3-console-hd { + border: none; +} + +.yui3-skin-sam .yui3-testconsole .yui3-console-ft, +.yui3-skin-sam .yui3-testconsole .yui3-console-hd { + border-color: #cfcfcf; +} + +.yui3-skin-sam .yui3-testconsole .yui3-testconsole-entry-fail { + background-color: #FFE0E0; + border-bottom-color: #FFC5C4; +} + +.yui3-skin-sam .yui3-testconsole .yui3-testconsole-entry-pass { + background-color: #ECFFEA; + border-bottom-color: #D1FFCC; +} diff --git a/design/standard/lib/yui/3.17.2/build/test-console/assets/skins/sam/test-console.css b/design/standard/lib/yui/3.17.2/build/test-console/assets/skins/sam/test-console.css new file mode 100644 index 0000000..9a992bd --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test-console/assets/skins/sam/test-console.css @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-testconsole .yui3-console-entry{min-height:inherit;padding:5px}.yui3-testconsole .yui3-console-controls{display:none}.yui3-skin-sam .yui3-testconsole .yui3-console-content,.yui3-skin-sam .yui3-testconsole .yui3-console-bd,.yui3-skin-sam .yui3-testconsole .yui3-console-entry,.yui3-skin-sam .yui3-testconsole .yui3-console-ft,.yui3-skin-sam .yui3-testconsole .yui3-console-ft .yui3-console-filters-categories,.yui3-skin-sam .yui3-testconsole .yui3-console-ft .yui3-console-filters-sources,.yui3-skin-sam .yui3-testconsole .yui3-console-hd{background:0;border:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.yui3-skin-sam .yui3-testconsole-content,.yui3-skin-sam .yui3-testconsole .yui3-console-bd{color:#333;font:13px/1.4 Helvetica,'DejaVu Sans','Bitstream Vera Sans',Arial,sans-serif}.yui3-skin-sam .yui3-testconsole-content{border:1px solid #afafaf}.yui3-skin-sam .yui3-testconsole .yui3-console-entry{border-bottom:1px solid #eaeaea;font-family:Menlo,Inconsolata,Consolas,'DejaVu Mono','Bitstream Vera Sans Mono',monospace;font-size:11px}.yui3-skin-sam .yui3-testconsole .yui3-console-ft{border-top:1px solid}.yui3-skin-sam .yui3-testconsole .yui3-console-hd{border-bottom:1px solid;*zoom:1}.yui3-skin-sam .yui3-testconsole.yui3-console-collapsed .yui3-console-hd{border:0}.yui3-skin-sam .yui3-testconsole .yui3-console-ft,.yui3-skin-sam .yui3-testconsole .yui3-console-hd{border-color:#cfcfcf}.yui3-skin-sam .yui3-testconsole .yui3-testconsole-entry-fail{background-color:#ffe0e0;border-bottom-color:#ffc5c4}.yui3-skin-sam .yui3-testconsole .yui3-testconsole-entry-pass{background-color:#ecffea;border-bottom-color:#d1ffcc}#yui3-css-stamp.skin-sam-test-console{display:none} diff --git a/design/standard/lib/yui/3.17.2/build/test-console/assets/test-console-core.css b/design/standard/lib/yui/3.17.2/build/test-console/assets/test-console-core.css new file mode 100644 index 0000000..118aa18 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test-console/assets/test-console-core.css @@ -0,0 +1,15 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +.yui3-testconsole .yui3-console-entry { + min-height: inherit; + padding: 5px; +} + +.yui3-testconsole .yui3-console-controls { + display: none; +} diff --git a/design/standard/lib/yui/3.17.2/build/test-console/test-console-coverage.js b/design/standard/lib/yui/3.17.2/build/test-console/test-console-coverage.js new file mode 100644 index 0000000..2f4af7a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test-console/test-console-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/test-console/test-console.js']) { + __coverage__['build/test-console/test-console.js'] = {"path":"build/test-console/test-console.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0},"b":{"1":[0,0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"TestConsole","line":33,"loc":{"start":{"line":33,"column":0},"end":{"line":33,"column":23}}},"3":{"name":"(anonymous_3)","line":38,"loc":{"start":{"line":38,"column":17},"end":{"line":38,"column":35}}},"4":{"name":"(anonymous_4)","line":66,"loc":{"start":{"line":66,"column":17},"end":{"line":66,"column":32}}},"5":{"name":"(anonymous_5)","line":84,"loc":{"start":{"line":84,"column":26},"end":{"line":84,"column":46}}},"6":{"name":"(anonymous_6)","line":100,"loc":{"start":{"line":100,"column":32},"end":{"line":100,"column":47}}},"7":{"name":"(anonymous_7)","line":123,"loc":{"start":{"line":123,"column":19},"end":{"line":123,"column":31}}},"8":{"name":"(anonymous_8)","line":153,"loc":{"start":{"line":153,"column":28},"end":{"line":153,"column":52}}},"9":{"name":"(anonymous_9)","line":160,"loc":{"start":{"line":160,"column":38},"end":{"line":160,"column":59}}},"10":{"name":"(anonymous_10)","line":177,"loc":{"start":{"line":177,"column":14},"end":{"line":177,"column":40}}},"11":{"name":"(anonymous_11)","line":192,"loc":{"start":{"line":192,"column":26},"end":{"line":192,"column":60}}},"12":{"name":"(anonymous_12)","line":196,"loc":{"start":{"line":196,"column":29},"end":{"line":196,"column":43}}},"13":{"name":"(anonymous_13)","line":211,"loc":{"start":{"line":211,"column":26},"end":{"line":211,"column":50}}},"14":{"name":"(anonymous_14)","line":215,"loc":{"start":{"line":215,"column":29},"end":{"line":215,"column":49}}},"15":{"name":"(anonymous_15)","line":216,"loc":{"start":{"line":216,"column":51},"end":{"line":216,"column":66}}},"16":{"name":"(anonymous_16)","line":228,"loc":{"start":{"line":228,"column":19},"end":{"line":228,"column":39}}},"17":{"name":"(anonymous_17)","line":232,"loc":{"start":{"line":232,"column":32},"end":{"line":232,"column":61}}},"18":{"name":"(anonymous_18)","line":241,"loc":{"start":{"line":241,"column":72},"end":{"line":241,"column":86}}},"19":{"name":"(anonymous_19)","line":254,"loc":{"start":{"line":254,"column":20},"end":{"line":254,"column":31}}},"20":{"name":"(anonymous_20)","line":267,"loc":{"start":{"line":267,"column":14},"end":{"line":267,"column":27}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":307,"column":91}},"2":{"start":{"line":33,"column":0},"end":{"line":35,"column":1}},"3":{"start":{"line":34,"column":4},"end":{"line":34,"column":62}},"4":{"start":{"line":37,"column":0},"end":{"line":304,"column":3}},"5":{"start":{"line":39,"column":8},"end":{"line":39,"column":40}},"6":{"start":{"line":41,"column":8},"end":{"line":54,"column":11}},"7":{"start":{"line":56,"column":8},"end":{"line":56,"column":72}},"8":{"start":{"line":67,"column":8},"end":{"line":68,"column":24}},"9":{"start":{"line":70,"column":8},"end":{"line":72,"column":9}},"10":{"start":{"line":71,"column":12},"end":{"line":71,"column":23}},"11":{"start":{"line":74,"column":8},"end":{"line":76,"column":9}},"12":{"start":{"line":75,"column":12},"end":{"line":75,"column":23}},"13":{"start":{"line":77,"column":8},"end":{"line":77,"column":19}},"14":{"start":{"line":85,"column":8},"end":{"line":98,"column":23}},"15":{"start":{"line":100,"column":8},"end":{"line":110,"column":11}},"16":{"start":{"line":101,"column":12},"end":{"line":101,"column":49}},"17":{"start":{"line":102,"column":12},"end":{"line":102,"column":46}},"18":{"start":{"line":103,"column":12},"end":{"line":103,"column":69}},"19":{"start":{"line":104,"column":12},"end":{"line":104,"column":84}},"20":{"start":{"line":106,"column":12},"end":{"line":106,"column":57}},"21":{"start":{"line":107,"column":12},"end":{"line":107,"column":54}},"22":{"start":{"line":108,"column":12},"end":{"line":108,"column":81}},"23":{"start":{"line":109,"column":12},"end":{"line":109,"column":96}},"24":{"start":{"line":113,"column":8},"end":{"line":113,"column":154}},"25":{"start":{"line":114,"column":8},"end":{"line":114,"column":173}},"26":{"start":{"line":116,"column":8},"end":{"line":116,"column":67}},"27":{"start":{"line":124,"column":8},"end":{"line":145,"column":10}},"28":{"start":{"line":154,"column":8},"end":{"line":156,"column":20}},"29":{"start":{"line":158,"column":8},"end":{"line":168,"column":9}},"30":{"start":{"line":159,"column":12},"end":{"line":159,"column":42}},"31":{"start":{"line":160,"column":12},"end":{"line":167,"column":15}},"32":{"start":{"line":161,"column":16},"end":{"line":163,"column":44}},"33":{"start":{"line":164,"column":16},"end":{"line":166,"column":17}},"34":{"start":{"line":165,"column":20},"end":{"line":165,"column":42}},"35":{"start":{"line":178,"column":8},"end":{"line":178,"column":30}},"36":{"start":{"line":179,"column":8},"end":{"line":182,"column":9}},"37":{"start":{"line":180,"column":12},"end":{"line":180,"column":51}},"38":{"start":{"line":181,"column":12},"end":{"line":181,"column":45}},"39":{"start":{"line":183,"column":8},"end":{"line":183,"column":19}},"40":{"start":{"line":193,"column":8},"end":{"line":194,"column":43}},"41":{"start":{"line":196,"column":8},"end":{"line":201,"column":11}},"42":{"start":{"line":197,"column":12},"end":{"line":197,"column":27}},"43":{"start":{"line":198,"column":12},"end":{"line":200,"column":13}},"44":{"start":{"line":199,"column":16},"end":{"line":199,"column":33}},"45":{"start":{"line":202,"column":8},"end":{"line":202,"column":56}},"46":{"start":{"line":203,"column":8},"end":{"line":203,"column":19}},"47":{"start":{"line":212,"column":8},"end":{"line":213,"column":43}},"48":{"start":{"line":215,"column":8},"end":{"line":219,"column":11}},"49":{"start":{"line":216,"column":12},"end":{"line":216,"column":87}},"50":{"start":{"line":216,"column":68},"end":{"line":216,"column":83}},"51":{"start":{"line":217,"column":12},"end":{"line":217,"column":41}},"52":{"start":{"line":218,"column":12},"end":{"line":218,"column":42}},"53":{"start":{"line":220,"column":8},"end":{"line":220,"column":56}},"54":{"start":{"line":221,"column":8},"end":{"line":221,"column":19}},"55":{"start":{"line":229,"column":8},"end":{"line":230,"column":39}},"56":{"start":{"line":232,"column":8},"end":{"line":245,"column":11}},"57":{"start":{"line":233,"column":12},"end":{"line":233,"column":43}},"58":{"start":{"line":235,"column":12},"end":{"line":235,"column":54}},"59":{"start":{"line":236,"column":12},"end":{"line":236,"column":69}},"60":{"start":{"line":237,"column":12},"end":{"line":237,"column":73}},"61":{"start":{"line":238,"column":12},"end":{"line":238,"column":74}},"62":{"start":{"line":239,"column":12},"end":{"line":239,"column":67}},"63":{"start":{"line":240,"column":12},"end":{"line":240,"column":32}},"64":{"start":{"line":241,"column":12},"end":{"line":243,"column":15}},"65":{"start":{"line":242,"column":16},"end":{"line":242,"column":115}},"66":{"start":{"line":246,"column":8},"end":{"line":246,"column":44}},"67":{"start":{"line":255,"column":8},"end":{"line":255,"column":51}},"68":{"start":{"line":256,"column":8},"end":{"line":258,"column":9}},"69":{"start":{"line":257,"column":12},"end":{"line":257,"column":19}},"70":{"start":{"line":259,"column":8},"end":{"line":263,"column":9}},"71":{"start":{"line":260,"column":12},"end":{"line":260,"column":41}},"72":{"start":{"line":262,"column":12},"end":{"line":262,"column":48}},"73":{"start":{"line":268,"column":8},"end":{"line":268,"column":28}},"74":{"start":{"line":270,"column":8},"end":{"line":275,"column":9}},"75":{"start":{"line":272,"column":12},"end":{"line":272,"column":36}},"76":{"start":{"line":273,"column":15},"end":{"line":275,"column":9}},"77":{"start":{"line":274,"column":12},"end":{"line":274,"column":31}}},"branchMap":{"1":{"line":47,"type":"binary-expr","locations":[{"start":{"line":47,"column":16},"end":{"line":47,"column":22}},{"start":{"line":47,"column":26},"end":{"line":47,"column":40}},{"start":{"line":47,"column":45},"end":{"line":47,"column":47}}]},"2":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":70,"column":8}},{"start":{"line":70,"column":8},"end":{"line":70,"column":8}}]},"3":{"line":70,"type":"binary-expr","locations":[{"start":{"line":70,"column":12},"end":{"line":70,"column":39}},{"start":{"line":70,"column":43},"end":{"line":70,"column":74}}]},"4":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":8},"end":{"line":74,"column":8}},{"start":{"line":74,"column":8},"end":{"line":74,"column":8}}]},"5":{"line":74,"type":"binary-expr","locations":[{"start":{"line":74,"column":12},"end":{"line":74,"column":32}},{"start":{"line":74,"column":36},"end":{"line":74,"column":60}}]},"6":{"line":158,"type":"if","locations":[{"start":{"line":158,"column":8},"end":{"line":158,"column":8}},{"start":{"line":158,"column":8},"end":{"line":158,"column":8}}]},"7":{"line":164,"type":"if","locations":[{"start":{"line":164,"column":16},"end":{"line":164,"column":16}},{"start":{"line":164,"column":16},"end":{"line":164,"column":16}}]},"8":{"line":164,"type":"binary-expr","locations":[{"start":{"line":164,"column":20},"end":{"line":164,"column":50}},{"start":{"line":164,"column":54},"end":{"line":164,"column":69}}]},"9":{"line":179,"type":"if","locations":[{"start":{"line":179,"column":8},"end":{"line":179,"column":8}},{"start":{"line":179,"column":8},"end":{"line":179,"column":8}}]},"10":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":12},"end":{"line":198,"column":12}},{"start":{"line":198,"column":12},"end":{"line":198,"column":12}}]},"11":{"line":256,"type":"if","locations":[{"start":{"line":256,"column":8},"end":{"line":256,"column":8}},{"start":{"line":256,"column":8},"end":{"line":256,"column":8}}]},"12":{"line":259,"type":"if","locations":[{"start":{"line":259,"column":8},"end":{"line":259,"column":8}},{"start":{"line":259,"column":8},"end":{"line":259,"column":8}}]},"13":{"line":270,"type":"if","locations":[{"start":{"line":270,"column":8},"end":{"line":270,"column":8}},{"start":{"line":270,"column":8},"end":{"line":270,"column":8}}]},"14":{"line":270,"type":"binary-expr","locations":[{"start":{"line":270,"column":12},"end":{"line":270,"column":35}},{"start":{"line":271,"column":19},"end":{"line":271,"column":75}}]},"15":{"line":273,"type":"if","locations":[{"start":{"line":273,"column":15},"end":{"line":273,"column":15}},{"start":{"line":273,"column":15},"end":{"line":273,"column":15}}]},"16":{"line":301,"type":"cond-expr","locations":[{"start":{"line":301,"column":44},"end":{"line":301,"column":50}},{"start":{"line":301,"column":53},"end":{"line":301,"column":62}}]},"17":{"line":301,"type":"binary-expr","locations":[{"start":{"line":301,"column":19},"end":{"line":301,"column":26}},{"start":{"line":301,"column":30},"end":{"line":301,"column":41}}]}},"code":["(function () { YUI.add('test-console', function (Y, NAME) {","","/**","Provides a specialized log console widget that's pre-configured to display YUI","Test output with no extra configuration.","","@example","","
            ",""," ","","@module test-console","@namespace Test","@class Console","@extends Console","@constructor","","@param {Object} [config] Config attributes."," @param {Object} [config.filters] Category filter configuration.","","@since 3.5.0","**/","","function TestConsole() {"," TestConsole.superclass.constructor.apply(this, arguments);","}","","Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, {"," initializer: function (config) {"," this.on('entry', this._onEntry);",""," this.plug(Y.Plugin.ConsoleFilters, {"," category: Y.merge({"," info : true,"," pass : false,"," fail : true,"," status: false"," }, (config && config.filters) || {}),",""," defaultVisibility: false,",""," source: {"," TestRunner: true"," }"," });",""," Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this));"," },",""," // -- Protected Coverage Parser ---------------------------------------------"," /**"," * Scans the coverage data to determine if it's an Istanbul coverage object."," * @method _isIstanbul"," * @param {Object} json The coverage data to scan"," * @return {Boolean} True if this is Istanbul Coverage"," */"," _isIstanbul: function(json) {"," var first = Y.Object.keys(json)[0],"," ret = false;",""," if (json[first].s !== undefined && json[first].fnMap !== undefined) {"," ret = true;"," }",""," if (json.s !== undefined && json.fnMap !== undefined) {"," ret = true;"," }"," return ret;"," },"," /**"," * Parses and logs a summary of YUITest coverage data."," * @method parseYUITest"," * @param {Object} coverage The YUITest Coverage JSON data"," */"," parseYUITestCoverage: function (coverage) {"," var cov = {"," lines: {"," hit: 0,"," miss: 0,"," total: 0,"," percent: 0"," },"," functions: {"," hit: 0,"," miss: 0,"," total: 0,"," percent: 0"," }"," }, coverageLog;",""," Y.Object.each(coverage, function(info) {"," cov.lines.total += info.coveredLines;"," cov.lines.hit += info.calledLines;"," cov.lines.miss += (info.coveredLines - info.calledLines);"," cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100);",""," cov.functions.total += info.coveredFunctions;"," cov.functions.hit += info.calledFunctions;"," cov.functions.miss += (info.coveredFunctions - info.calledFunctions);"," cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100);"," });","",""," coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\\n';"," coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%';",""," this.log('Coverage: ' + coverageLog, 'info', 'TestRunner');"," },"," /**"," * Generates a generic summary object used for Istanbul conversions."," * @method _blankSummary"," * @return {Object} Generic summary object"," */"," _blankSummary: function () {"," return {"," lines: {"," total: 0,"," covered: 0,"," pct: 'Unknown'"," },"," statements: {"," total: 0,"," covered: 0,"," pct: 'Unknown'"," },"," functions: {"," total: 0,"," covered: 0,"," pct: 'Unknown'"," },"," branches: {"," total: 0,"," covered: 0,"," pct: 'Unknown'"," }"," };"," },"," /**"," * Calculates line numbers from statement coverage"," * @method _addDerivedInfoForFile"," * @private"," * @param {Object} fileCoverage JSON coverage data"," */"," _addDerivedInfoForFile: function (fileCoverage) {"," var statementMap = fileCoverage.statementMap,"," statements = fileCoverage.s,"," lineMap;",""," if (!fileCoverage.l) {"," fileCoverage.l = lineMap = {};"," Y.Object.each(statements, function (value, st) {"," var line = statementMap[st].start.line,"," count = statements[st],"," prevVal = lineMap[line];"," if (typeof prevVal === 'undefined' || prevVal < count) {"," lineMap[line] = count;"," }"," });"," }"," },"," /**"," * Generic percent calculator"," * @method _percent"," * @param {Number} covered The covered amount"," * @param {Number} total The total"," * @private"," */"," _percent: function (covered, total) {"," var tmp, pct = 100.00;"," if (total > 0) {"," tmp = 1000 * 100 * covered / total + 5;"," pct = Math.floor(tmp / 10) / 100;"," }"," return pct;"," },"," /**"," * Summarize simple properties in the coverage data"," * @method _computSimpleTotals"," * @private"," * @param {Object} fileCoverage JSON coverage data"," * @param {String} property The property to summarize"," */"," _computeSimpleTotals: function (fileCoverage, property) {"," var stats = fileCoverage[property],"," ret = { total: 0, covered: 0 };",""," Y.Object.each(stats, function(val) {"," ret.total += 1;"," if (val) {"," ret.covered += 1;"," }"," });"," ret.pct = this._percent(ret.covered, ret.total);"," return ret;"," },"," /**"," * Noramlizes branch data from Istanbul"," * @method _computeBranchTotals"," * @private"," * @param {Object} fileCoverage JSON coverage data"," */"," _computeBranchTotals: function (fileCoverage) {"," var stats = fileCoverage.b,"," ret = { total: 0, covered: 0 };",""," Y.Object.each(stats, function (branches) {"," var covered = Y.Array.filter(branches, function (num) { return num > 0; });"," ret.total += branches.length;"," ret.covered += covered.length;"," });"," ret.pct = this._percent(ret.covered, ret.total);"," return ret;"," },"," /**"," * Takes an Istanbul coverage object, normalizes it and prints a log with a summary"," * @method parseInstanbul"," * @param {Object} coverage The coverage object to normalize and log"," */"," parseIstanbul: function (coverage) {"," var self = this,"," str = 'Coverage Report:\\n';",""," Y.Object.each(coverage, function(fileCoverage, file) {"," var ret = self._blankSummary();",""," self._addDerivedInfoForFile(fileCoverage);"," ret.lines = self._computeSimpleTotals(fileCoverage, 'l');"," ret.functions = self._computeSimpleTotals(fileCoverage, 'f');"," ret.statements = self._computeSimpleTotals(fileCoverage, 's');"," ret.branches = self._computeBranchTotals(fileCoverage);"," str += file + ':\\n';"," Y.Array.each(['lines','functions','statements','branches'], function(key) {"," str += ' ' + key +': ' + ret[key].covered + '/' + ret[key].total + ' : ' + ret[key].pct + '%\\n';"," });",""," });"," this.log(str, 'info', 'TestRunner');",""," },"," /**"," * Parses YUITest or Istanbul coverage results if they are available and logs them."," * @method _parseCoverage"," * @private"," */"," _parseCoverage: function() {"," var coverage = Y.Test.Runner.getCoverage();"," if (!coverage) {"," return;"," }"," if (this._isIstanbul(coverage)) {"," this.parseIstanbul(coverage);"," } else {"," this.parseYUITestCoverage(coverage);"," }"," },",""," // -- Protected Event Handlers ---------------------------------------------"," _onEntry: function (e) {"," var msg = e.message;",""," if (msg.category === 'info'"," && /\\s(?:case|suite)\\s|yuitests\\d+|began/.test(msg.message)) {"," msg.category = 'status';"," } else if (msg.category === 'fail') {"," this.printBuffer();"," }"," }","}, {"," NAME: 'testConsole',",""," ATTRS: {"," entryTemplate: {"," value:"," '
            ' +"," '
            {message}
            ' +"," '
            '"," },",""," height: {"," value: '350px'"," },",""," newestOnTop: {"," value: false"," },",""," style: {"," value: 'block'"," },",""," width: {"," value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit'"," }"," }","});","","","}, '3.17.2', {\"requires\": [\"console-filters\", \"test\", \"array-extras\"], \"skinnable\": true});","","}());"]}; +} +var __cov_MvaSoWigy9KT6gyhkkqrYQ = __coverage__['build/test-console/test-console.js']; +__cov_MvaSoWigy9KT6gyhkkqrYQ.s['1']++;YUI.add('test-console',function(Y,NAME){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['1']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['2']++;function TestConsole(){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['2']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['3']++;TestConsole.superclass.constructor.apply(this,arguments);}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['4']++;Y.namespace('Test').Console=Y.extend(TestConsole,Y.Console,{initializer:function(config){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['3']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['5']++;this.on('entry',this._onEntry);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['6']++;this.plug(Y.Plugin.ConsoleFilters,{category:Y.merge({info:true,pass:false,fail:true,status:false},(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['1'][0]++,config)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['1'][1]++,config.filters)||(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['1'][2]++,{})),defaultVisibility:false,source:{TestRunner:true}});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['7']++;Y.Test.Runner.on('complete',Y.bind(this._parseCoverage,this));},_isIstanbul:function(json){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['4']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['8']++;var first=Y.Object.keys(json)[0],ret=false;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['9']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['3'][0]++,json[first].s!==undefined)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['3'][1]++,json[first].fnMap!==undefined)){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['2'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['10']++;ret=true;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['2'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['11']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['5'][0]++,json.s!==undefined)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['5'][1]++,json.fnMap!==undefined)){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['4'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['12']++;ret=true;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['4'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['13']++;return ret;},parseYUITestCoverage:function(coverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['5']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['14']++;var cov={lines:{hit:0,miss:0,total:0,percent:0},functions:{hit:0,miss:0,total:0,percent:0}},coverageLog;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['15']++;Y.Object.each(coverage,function(info){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['6']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['16']++;cov.lines.total+=info.coveredLines;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['17']++;cov.lines.hit+=info.calledLines;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['18']++;cov.lines.miss+=info.coveredLines-info.calledLines;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['19']++;cov.lines.percent=Math.floor(cov.lines.hit/cov.lines.total*100);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['20']++;cov.functions.total+=info.coveredFunctions;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['21']++;cov.functions.hit+=info.calledFunctions;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['22']++;cov.functions.miss+=info.coveredFunctions-info.calledFunctions;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['23']++;cov.functions.percent=Math.floor(cov.functions.hit/cov.functions.total*100);});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['24']++;coverageLog='Lines: Hit:'+cov.lines.hit+' Missed:'+cov.lines.miss+' Total:'+cov.lines.total+' Percent:'+cov.lines.percent+'%\n';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['25']++;coverageLog+='Functions: Hit:'+cov.functions.hit+' Missed:'+cov.functions.miss+' Total:'+cov.functions.total+' Percent:'+cov.functions.percent+'%';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['26']++;this.log('Coverage: '+coverageLog,'info','TestRunner');},_blankSummary:function(){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['7']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['27']++;return{lines:{total:0,covered:0,pct:'Unknown'},statements:{total:0,covered:0,pct:'Unknown'},functions:{total:0,covered:0,pct:'Unknown'},branches:{total:0,covered:0,pct:'Unknown'}};},_addDerivedInfoForFile:function(fileCoverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['8']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['28']++;var statementMap=fileCoverage.statementMap,statements=fileCoverage.s,lineMap;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['29']++;if(!fileCoverage.l){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['6'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['30']++;fileCoverage.l=lineMap={};__cov_MvaSoWigy9KT6gyhkkqrYQ.s['31']++;Y.Object.each(statements,function(value,st){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['9']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['32']++;var line=statementMap[st].start.line,count=statements[st],prevVal=lineMap[line];__cov_MvaSoWigy9KT6gyhkkqrYQ.s['33']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['8'][0]++,typeof prevVal==='undefined')||(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['8'][1]++,prevVal0){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['9'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['37']++;tmp=1000*100*covered/total+5;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['38']++;pct=Math.floor(tmp/10)/100;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['9'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['39']++;return pct;},_computeSimpleTotals:function(fileCoverage,property){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['11']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['40']++;var stats=fileCoverage[property],ret={total:0,covered:0};__cov_MvaSoWigy9KT6gyhkkqrYQ.s['41']++;Y.Object.each(stats,function(val){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['12']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['42']++;ret.total+=1;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['43']++;if(val){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['10'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['44']++;ret.covered+=1;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['10'][1]++;}});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['45']++;ret.pct=this._percent(ret.covered,ret.total);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['46']++;return ret;},_computeBranchTotals:function(fileCoverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['13']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['47']++;var stats=fileCoverage.b,ret={total:0,covered:0};__cov_MvaSoWigy9KT6gyhkkqrYQ.s['48']++;Y.Object.each(stats,function(branches){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['14']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['49']++;var covered=Y.Array.filter(branches,function(num){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['15']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['50']++;return num>0;});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['51']++;ret.total+=branches.length;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['52']++;ret.covered+=covered.length;});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['53']++;ret.pct=this._percent(ret.covered,ret.total);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['54']++;return ret;},parseIstanbul:function(coverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['16']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['55']++;var self=this,str='Coverage Report:\n';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['56']++;Y.Object.each(coverage,function(fileCoverage,file){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['17']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['57']++;var ret=self._blankSummary();__cov_MvaSoWigy9KT6gyhkkqrYQ.s['58']++;self._addDerivedInfoForFile(fileCoverage);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['59']++;ret.lines=self._computeSimpleTotals(fileCoverage,'l');__cov_MvaSoWigy9KT6gyhkkqrYQ.s['60']++;ret.functions=self._computeSimpleTotals(fileCoverage,'f');__cov_MvaSoWigy9KT6gyhkkqrYQ.s['61']++;ret.statements=self._computeSimpleTotals(fileCoverage,'s');__cov_MvaSoWigy9KT6gyhkkqrYQ.s['62']++;ret.branches=self._computeBranchTotals(fileCoverage);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['63']++;str+=file+':\n';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['64']++;Y.Array.each(['lines','functions','statements','branches'],function(key){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['18']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['65']++;str+=' '+key+': '+ret[key].covered+'/'+ret[key].total+' : '+ret[key].pct+'%\n';});});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['66']++;this.log(str,'info','TestRunner');},_parseCoverage:function(){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['19']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['67']++;var coverage=Y.Test.Runner.getCoverage();__cov_MvaSoWigy9KT6gyhkkqrYQ.s['68']++;if(!coverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['11'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['69']++;return;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['11'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['70']++;if(this._isIstanbul(coverage)){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['12'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['71']++;this.parseIstanbul(coverage);}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['12'][1]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['72']++;this.parseYUITestCoverage(coverage);}},_onEntry:function(e){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['20']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['73']++;var msg=e.message;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['74']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['14'][0]++,msg.category==='info')&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['14'][1]++,/\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message))){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['13'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['75']++;msg.category='status';}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['13'][1]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['76']++;if(msg.category==='fail'){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['15'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['77']++;this.printBuffer();}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['15'][1]++;}}}},{NAME:'testConsole',ATTRS:{entryTemplate:{value:'
            '+'
            {message}
            '+'
            '},height:{value:'350px'},newestOnTop:{value:false},style:{value:'block'},width:{value:(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['17'][0]++,Y.UA.ie)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['17'][1]++,Y.UA.ie<9)?(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['16'][0]++,'100%'):(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['16'][1]++,'inherit')}}});},'3.17.2',{'requires':['console-filters','test','array-extras'],'skinnable':true}); diff --git a/design/standard/lib/yui/3.17.2/build/test-console/test-console-debug.js b/design/standard/lib/yui/3.17.2/build/test-console/test-console-debug.js new file mode 100644 index 0000000..56f18f6 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test-console/test-console-debug.js @@ -0,0 +1,314 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('test-console', function (Y, NAME) { + +/** +Provides a specialized log console widget that's pre-configured to display YUI +Test output with no extra configuration. + +@example + +
            + + + +@module test-console +@namespace Test +@class Console +@extends Console +@constructor + +@param {Object} [config] Config attributes. + @param {Object} [config.filters] Category filter configuration. + +@since 3.5.0 +**/ + +function TestConsole() { + TestConsole.superclass.constructor.apply(this, arguments); +} + +Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, { + initializer: function (config) { + this.on('entry', this._onEntry); + + this.plug(Y.Plugin.ConsoleFilters, { + category: Y.merge({ + info : true, + pass : false, + fail : true, + status: false + }, (config && config.filters) || {}), + + defaultVisibility: false, + + source: { + TestRunner: true + } + }); + + Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this)); + }, + + // -- Protected Coverage Parser --------------------------------------------- + /** + * Scans the coverage data to determine if it's an Istanbul coverage object. + * @method _isIstanbul + * @param {Object} json The coverage data to scan + * @return {Boolean} True if this is Istanbul Coverage + */ + _isIstanbul: function(json) { + var first = Y.Object.keys(json)[0], + ret = false; + + if (json[first].s !== undefined && json[first].fnMap !== undefined) { + ret = true; + } + + if (json.s !== undefined && json.fnMap !== undefined) { + ret = true; + } + return ret; + }, + /** + * Parses and logs a summary of YUITest coverage data. + * @method parseYUITest + * @param {Object} coverage The YUITest Coverage JSON data + */ + parseYUITestCoverage: function (coverage) { + var cov = { + lines: { + hit: 0, + miss: 0, + total: 0, + percent: 0 + }, + functions: { + hit: 0, + miss: 0, + total: 0, + percent: 0 + } + }, coverageLog; + + Y.Object.each(coverage, function(info) { + cov.lines.total += info.coveredLines; + cov.lines.hit += info.calledLines; + cov.lines.miss += (info.coveredLines - info.calledLines); + cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100); + + cov.functions.total += info.coveredFunctions; + cov.functions.hit += info.calledFunctions; + cov.functions.miss += (info.coveredFunctions - info.calledFunctions); + cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100); + }); + + + coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\n'; + coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%'; + + this.log('Coverage: ' + coverageLog, 'info', 'TestRunner'); + }, + /** + * Generates a generic summary object used for Istanbul conversions. + * @method _blankSummary + * @return {Object} Generic summary object + */ + _blankSummary: function () { + return { + lines: { + total: 0, + covered: 0, + pct: 'Unknown' + }, + statements: { + total: 0, + covered: 0, + pct: 'Unknown' + }, + functions: { + total: 0, + covered: 0, + pct: 'Unknown' + }, + branches: { + total: 0, + covered: 0, + pct: 'Unknown' + } + }; + }, + /** + * Calculates line numbers from statement coverage + * @method _addDerivedInfoForFile + * @private + * @param {Object} fileCoverage JSON coverage data + */ + _addDerivedInfoForFile: function (fileCoverage) { + var statementMap = fileCoverage.statementMap, + statements = fileCoverage.s, + lineMap; + + if (!fileCoverage.l) { + fileCoverage.l = lineMap = {}; + Y.Object.each(statements, function (value, st) { + var line = statementMap[st].start.line, + count = statements[st], + prevVal = lineMap[line]; + if (typeof prevVal === 'undefined' || prevVal < count) { + lineMap[line] = count; + } + }); + } + }, + /** + * Generic percent calculator + * @method _percent + * @param {Number} covered The covered amount + * @param {Number} total The total + * @private + */ + _percent: function (covered, total) { + var tmp, pct = 100.00; + if (total > 0) { + tmp = 1000 * 100 * covered / total + 5; + pct = Math.floor(tmp / 10) / 100; + } + return pct; + }, + /** + * Summarize simple properties in the coverage data + * @method _computSimpleTotals + * @private + * @param {Object} fileCoverage JSON coverage data + * @param {String} property The property to summarize + */ + _computeSimpleTotals: function (fileCoverage, property) { + var stats = fileCoverage[property], + ret = { total: 0, covered: 0 }; + + Y.Object.each(stats, function(val) { + ret.total += 1; + if (val) { + ret.covered += 1; + } + }); + ret.pct = this._percent(ret.covered, ret.total); + return ret; + }, + /** + * Noramlizes branch data from Istanbul + * @method _computeBranchTotals + * @private + * @param {Object} fileCoverage JSON coverage data + */ + _computeBranchTotals: function (fileCoverage) { + var stats = fileCoverage.b, + ret = { total: 0, covered: 0 }; + + Y.Object.each(stats, function (branches) { + var covered = Y.Array.filter(branches, function (num) { return num > 0; }); + ret.total += branches.length; + ret.covered += covered.length; + }); + ret.pct = this._percent(ret.covered, ret.total); + return ret; + }, + /** + * Takes an Istanbul coverage object, normalizes it and prints a log with a summary + * @method parseInstanbul + * @param {Object} coverage The coverage object to normalize and log + */ + parseIstanbul: function (coverage) { + var self = this, + str = 'Coverage Report:\n'; + + Y.Object.each(coverage, function(fileCoverage, file) { + var ret = self._blankSummary(); + + self._addDerivedInfoForFile(fileCoverage); + ret.lines = self._computeSimpleTotals(fileCoverage, 'l'); + ret.functions = self._computeSimpleTotals(fileCoverage, 'f'); + ret.statements = self._computeSimpleTotals(fileCoverage, 's'); + ret.branches = self._computeBranchTotals(fileCoverage); + str += file + ':\n'; + Y.Array.each(['lines','functions','statements','branches'], function(key) { + str += ' ' + key +': ' + ret[key].covered + '/' + ret[key].total + ' : ' + ret[key].pct + '%\n'; + }); + + }); + this.log(str, 'info', 'TestRunner'); + + }, + /** + * Parses YUITest or Istanbul coverage results if they are available and logs them. + * @method _parseCoverage + * @private + */ + _parseCoverage: function() { + var coverage = Y.Test.Runner.getCoverage(); + if (!coverage) { + return; + } + if (this._isIstanbul(coverage)) { + this.parseIstanbul(coverage); + } else { + this.parseYUITestCoverage(coverage); + } + }, + + // -- Protected Event Handlers --------------------------------------------- + _onEntry: function (e) { + var msg = e.message; + + if (msg.category === 'info' + && /\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message)) { + msg.category = 'status'; + } else if (msg.category === 'fail') { + this.printBuffer(); + } + } +}, { + NAME: 'testConsole', + + ATTRS: { + entryTemplate: { + value: + '
            ' + + '
            {message}
            ' + + '
            ' + }, + + height: { + value: '350px' + }, + + newestOnTop: { + value: false + }, + + style: { + value: 'block' + }, + + width: { + value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit' + } + } +}); + + +}, '3.17.2', {"requires": ["console-filters", "test", "array-extras"], "skinnable": true}); diff --git a/design/standard/lib/yui/3.17.2/build/test-console/test-console-min.js b/design/standard/lib/yui/3.17.2/build/test-console/test-console-min.js new file mode 100644 index 0000000..bc1d785 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test-console/test-console-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("test-console",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}e.namespace("Test").Console=e.extend(n,e.Console,{initializer:function(t){this.on("entry",this._onEntry),this.plug(e.Plugin.ConsoleFilters,{category:e.merge({info:!0,pass:!1,fail:!0,status:!1},t&&t.filters||{}),defaultVisibility:!1,source:{TestRunner:!0}}),e.Test.Runner.on("complete",e.bind(this._parseCoverage,this))},_isIstanbul:function(t){var n=e.Object.keys(t)[0],r=!1;return t[n].s!==undefined&&t[n].fnMap!==undefined&&(r=!0),t.s!==undefined&&t.fnMap!==undefined&&(r=!0),r},parseYUITestCoverage:function(t){var n={lines:{hit:0,miss:0,total:0,percent:0},functions:{hit:0,miss:0,total:0,percent:0}},r;e.Object.each(t,function(e){n.lines.total+=e.coveredLines,n.lines.hit+=e.calledLines,n.lines.miss+=e.coveredLines-e.calledLines,n.lines.percent=Math.floor(n.lines.hit/n.lines.total*100),n.functions.total+=e.coveredFunctions,n.functions.hit+=e.calledFunctions,n.functions.miss+=e.coveredFunctions-e.calledFunctions,n.functions.percent=Math.floor(n.functions.hit/n.functions.total*100)}),r="Lines: Hit:"+n.lines.hit+" Missed:"+n.lines.miss+" Total:"+n.lines.total+" Percent:"+n.lines.percent+"%\n",r+="Functions: Hit:"+n.functions.hit+" Missed:"+n.functions.miss+" Total:"+n.functions.total+" Percent:"+n.functions.percent+"%",this.log("Coverage: "+r,"info","TestRunner")},_blankSummary:function(){return{lines:{total:0,covered:0,pct:"Unknown"},statements:{total:0,covered:0,pct:"Unknown"},functions:{total:0,covered:0,pct:"Unknown"},branches:{total:0,covered:0,pct:"Unknown"}}},_addDerivedInfoForFile:function(t){var n=t.statementMap,r=t.s,i;t.l||(t.l=i={},e.Object.each(r,function(e,t){var s=n[t].start.line,o=r[t],u=i[s];if(typeof u=="undefined"||u0&&(n=1e5*e/t+5,r=Math.floor(n/10)/100),r},_computeSimpleTotals:function(t,n){var r=t[n],i={total:0,covered:0};return e.Object.each(r,function(e){i.total+=1,e&&(i.covered+=1)}),i.pct=this._percent(i.covered,i.total),i},_computeBranchTotals:function(t){var n=t.b,r={total:0,covered:0};return e.Object.each(n,function(t){var n=e.Array.filter(t,function(e){return e>0});r.total+=t.length,r.covered+=n.length}),r.pct=this._percent(r.covered,r.total),r},parseIstanbul:function(t){var n=this,r="Coverage Report:\n";e.Object.each(t,function(t,i){var s=n._blankSummary();n._addDerivedInfoForFile(t),s.lines=n._computeSimpleTotals(t,"l"),s.functions=n._computeSimpleTotals(t,"f"),s.statements=n._computeSimpleTotals(t,"s"),s.branches=n._computeBranchTotals(t),r+=i+":\n",e.Array.each(["lines","functions","statements","branches"],function(e){r+=" "+e+": "+s[e].covered+"/"+s[e].total+" : "+s[e].pct+"%\n"})}),this.log(r,"info","TestRunner")},_parseCoverage:function(){var t=e.Test.Runner.getCoverage();if(!t)return;this._isIstanbul(t)?this.parseIstanbul(t):this.parseYUITestCoverage(t)},_onEntry:function(e){var t=e.message;t.category==="info"&&/\s(?:case|suite)\s|yuitests\d+|began/.test(t.message)?t.category="status":t.category==="fail"&&this.printBuffer()}},{NAME:"testConsole",ATTRS:{entryTemplate:{value:'
            {message}
            '},height:{value:"350px"},newestOnTop:{value:!1},style:{value:"block"},width:{value:e.UA.ie&&e.UA.ie<9?"100%":"inherit"}}})},"3.17.2",{requires:["console-filters","test","array-extras"],skinnable:!0}); diff --git a/design/standard/lib/yui/3.17.2/build/test-console/test-console.js b/design/standard/lib/yui/3.17.2/build/test-console/test-console.js new file mode 100644 index 0000000..56f18f6 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test-console/test-console.js @@ -0,0 +1,314 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('test-console', function (Y, NAME) { + +/** +Provides a specialized log console widget that's pre-configured to display YUI +Test output with no extra configuration. + +@example + +
            + + + +@module test-console +@namespace Test +@class Console +@extends Console +@constructor + +@param {Object} [config] Config attributes. + @param {Object} [config.filters] Category filter configuration. + +@since 3.5.0 +**/ + +function TestConsole() { + TestConsole.superclass.constructor.apply(this, arguments); +} + +Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, { + initializer: function (config) { + this.on('entry', this._onEntry); + + this.plug(Y.Plugin.ConsoleFilters, { + category: Y.merge({ + info : true, + pass : false, + fail : true, + status: false + }, (config && config.filters) || {}), + + defaultVisibility: false, + + source: { + TestRunner: true + } + }); + + Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this)); + }, + + // -- Protected Coverage Parser --------------------------------------------- + /** + * Scans the coverage data to determine if it's an Istanbul coverage object. + * @method _isIstanbul + * @param {Object} json The coverage data to scan + * @return {Boolean} True if this is Istanbul Coverage + */ + _isIstanbul: function(json) { + var first = Y.Object.keys(json)[0], + ret = false; + + if (json[first].s !== undefined && json[first].fnMap !== undefined) { + ret = true; + } + + if (json.s !== undefined && json.fnMap !== undefined) { + ret = true; + } + return ret; + }, + /** + * Parses and logs a summary of YUITest coverage data. + * @method parseYUITest + * @param {Object} coverage The YUITest Coverage JSON data + */ + parseYUITestCoverage: function (coverage) { + var cov = { + lines: { + hit: 0, + miss: 0, + total: 0, + percent: 0 + }, + functions: { + hit: 0, + miss: 0, + total: 0, + percent: 0 + } + }, coverageLog; + + Y.Object.each(coverage, function(info) { + cov.lines.total += info.coveredLines; + cov.lines.hit += info.calledLines; + cov.lines.miss += (info.coveredLines - info.calledLines); + cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100); + + cov.functions.total += info.coveredFunctions; + cov.functions.hit += info.calledFunctions; + cov.functions.miss += (info.coveredFunctions - info.calledFunctions); + cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100); + }); + + + coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\n'; + coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%'; + + this.log('Coverage: ' + coverageLog, 'info', 'TestRunner'); + }, + /** + * Generates a generic summary object used for Istanbul conversions. + * @method _blankSummary + * @return {Object} Generic summary object + */ + _blankSummary: function () { + return { + lines: { + total: 0, + covered: 0, + pct: 'Unknown' + }, + statements: { + total: 0, + covered: 0, + pct: 'Unknown' + }, + functions: { + total: 0, + covered: 0, + pct: 'Unknown' + }, + branches: { + total: 0, + covered: 0, + pct: 'Unknown' + } + }; + }, + /** + * Calculates line numbers from statement coverage + * @method _addDerivedInfoForFile + * @private + * @param {Object} fileCoverage JSON coverage data + */ + _addDerivedInfoForFile: function (fileCoverage) { + var statementMap = fileCoverage.statementMap, + statements = fileCoverage.s, + lineMap; + + if (!fileCoverage.l) { + fileCoverage.l = lineMap = {}; + Y.Object.each(statements, function (value, st) { + var line = statementMap[st].start.line, + count = statements[st], + prevVal = lineMap[line]; + if (typeof prevVal === 'undefined' || prevVal < count) { + lineMap[line] = count; + } + }); + } + }, + /** + * Generic percent calculator + * @method _percent + * @param {Number} covered The covered amount + * @param {Number} total The total + * @private + */ + _percent: function (covered, total) { + var tmp, pct = 100.00; + if (total > 0) { + tmp = 1000 * 100 * covered / total + 5; + pct = Math.floor(tmp / 10) / 100; + } + return pct; + }, + /** + * Summarize simple properties in the coverage data + * @method _computSimpleTotals + * @private + * @param {Object} fileCoverage JSON coverage data + * @param {String} property The property to summarize + */ + _computeSimpleTotals: function (fileCoverage, property) { + var stats = fileCoverage[property], + ret = { total: 0, covered: 0 }; + + Y.Object.each(stats, function(val) { + ret.total += 1; + if (val) { + ret.covered += 1; + } + }); + ret.pct = this._percent(ret.covered, ret.total); + return ret; + }, + /** + * Noramlizes branch data from Istanbul + * @method _computeBranchTotals + * @private + * @param {Object} fileCoverage JSON coverage data + */ + _computeBranchTotals: function (fileCoverage) { + var stats = fileCoverage.b, + ret = { total: 0, covered: 0 }; + + Y.Object.each(stats, function (branches) { + var covered = Y.Array.filter(branches, function (num) { return num > 0; }); + ret.total += branches.length; + ret.covered += covered.length; + }); + ret.pct = this._percent(ret.covered, ret.total); + return ret; + }, + /** + * Takes an Istanbul coverage object, normalizes it and prints a log with a summary + * @method parseInstanbul + * @param {Object} coverage The coverage object to normalize and log + */ + parseIstanbul: function (coverage) { + var self = this, + str = 'Coverage Report:\n'; + + Y.Object.each(coverage, function(fileCoverage, file) { + var ret = self._blankSummary(); + + self._addDerivedInfoForFile(fileCoverage); + ret.lines = self._computeSimpleTotals(fileCoverage, 'l'); + ret.functions = self._computeSimpleTotals(fileCoverage, 'f'); + ret.statements = self._computeSimpleTotals(fileCoverage, 's'); + ret.branches = self._computeBranchTotals(fileCoverage); + str += file + ':\n'; + Y.Array.each(['lines','functions','statements','branches'], function(key) { + str += ' ' + key +': ' + ret[key].covered + '/' + ret[key].total + ' : ' + ret[key].pct + '%\n'; + }); + + }); + this.log(str, 'info', 'TestRunner'); + + }, + /** + * Parses YUITest or Istanbul coverage results if they are available and logs them. + * @method _parseCoverage + * @private + */ + _parseCoverage: function() { + var coverage = Y.Test.Runner.getCoverage(); + if (!coverage) { + return; + } + if (this._isIstanbul(coverage)) { + this.parseIstanbul(coverage); + } else { + this.parseYUITestCoverage(coverage); + } + }, + + // -- Protected Event Handlers --------------------------------------------- + _onEntry: function (e) { + var msg = e.message; + + if (msg.category === 'info' + && /\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message)) { + msg.category = 'status'; + } else if (msg.category === 'fail') { + this.printBuffer(); + } + } +}, { + NAME: 'testConsole', + + ATTRS: { + entryTemplate: { + value: + '
            ' + + '
            {message}
            ' + + '
            ' + }, + + height: { + value: '350px' + }, + + newestOnTop: { + value: false + }, + + style: { + value: 'block' + }, + + width: { + value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit' + } + } +}); + + +}, '3.17.2', {"requires": ["console-filters", "test", "array-extras"], "skinnable": true}); diff --git a/design/standard/lib/yui/3.17.2/build/test/test-coverage.js b/design/standard/lib/yui/3.17.2/build/test/test-coverage.js new file mode 100644 index 0000000..8afc838 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/test/test-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/test/test.js']) { + __coverage__['build/test/test.js'] = {"path":"build/test/test.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":0,"254":0,"255":0,"256":0,"257":0,"258":0,"259":0,"260":0,"261":0,"262":0,"263":0,"264":0,"265":0,"266":0,"267":0,"268":0,"269":0,"270":0,"271":0,"272":0,"273":0,"274":0,"275":0,"276":0,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":0,"284":0,"285":0,"286":0,"287":0,"288":0,"289":0,"290":0,"291":0,"292":0,"293":0,"294":0,"295":0,"296":0,"297":0,"298":0,"299":0,"300":0,"301":0,"302":0,"303":0,"304":0,"305":0,"306":0,"307":0,"308":0,"309":0,"310":0,"311":0,"312":0,"313":0,"314":0,"315":0,"316":0,"317":0,"318":0,"319":0,"320":0,"321":0,"322":0,"323":0,"324":0,"325":0,"326":0,"327":0,"328":0,"329":0,"330":0,"331":0,"332":0,"333":0,"334":0,"335":0,"336":0,"337":0,"338":0,"339":0,"340":0,"341":0,"342":0,"343":0,"344":0,"345":0,"346":0,"347":0,"348":0,"349":0,"350":0,"351":0,"352":0,"353":0,"354":0,"355":0,"356":0,"357":0,"358":0,"359":0,"360":0,"361":0,"362":0,"363":0,"364":0,"365":0,"366":0,"367":0,"368":0,"369":0,"370":0,"371":0,"372":0,"373":0,"374":0,"375":0,"376":0,"377":0,"378":0,"379":0,"380":0,"381":0,"382":0,"383":0,"384":0,"385":0,"386":0,"387":0,"388":0,"389":0,"390":0,"391":0,"392":0,"393":0,"394":0,"395":0,"396":0,"397":0,"398":0,"399":0,"400":0,"401":0,"402":0,"403":0,"404":0,"405":0,"406":0,"407":0,"408":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"415":0,"416":0,"417":0,"418":0,"419":0,"420":0,"421":0,"422":0,"423":0,"424":0,"425":0,"426":0,"427":0,"428":0,"429":0,"430":0,"431":0,"432":0,"433":0,"434":0,"435":0,"436":0,"437":0,"438":0,"439":0,"440":0,"441":0,"442":0,"443":0,"444":0,"445":0,"446":0,"447":0,"448":0,"449":0,"450":0,"451":0,"452":0,"453":0,"454":0,"455":0,"456":0,"457":0,"458":0,"459":0,"460":0,"461":0,"462":0,"463":0,"464":0,"465":0,"466":0,"467":0,"468":0,"469":0,"470":0,"471":0,"472":0,"473":0,"474":0,"475":0,"476":0,"477":0,"478":0,"479":0,"480":0,"481":0,"482":0,"483":0,"484":0,"485":0,"486":0,"487":0,"488":0,"489":0,"490":0,"491":0,"492":0,"493":0,"494":0,"495":0,"496":0,"497":0,"498":0,"499":0,"500":0,"501":0,"502":0,"503":0,"504":0,"505":0,"506":0,"507":0,"508":0,"509":0,"510":0,"511":0,"512":0,"513":0,"514":0,"515":0,"516":0,"517":0,"518":0,"519":0,"520":0,"521":0,"522":0,"523":0,"524":0,"525":0,"526":0,"527":0,"528":0,"529":0,"530":0,"531":0,"532":0,"533":0,"534":0,"535":0,"536":0,"537":0,"538":0,"539":0,"540":0,"541":0,"542":0,"543":0,"544":0,"545":0,"546":0,"547":0,"548":0,"549":0,"550":0,"551":0,"552":0,"553":0,"554":0,"555":0,"556":0,"557":0,"558":0,"559":0,"560":0,"561":0,"562":0,"563":0,"564":0,"565":0,"566":0,"567":0,"568":0,"569":0,"570":0,"571":0,"572":0,"573":0,"574":0,"575":0,"576":0,"577":0,"578":0,"579":0,"580":0,"581":0,"582":0,"583":0,"584":0,"585":0,"586":0,"587":0,"588":0,"589":0,"590":0,"591":0,"592":0,"593":0,"594":0,"595":0,"596":0,"597":0,"598":0,"599":0,"600":0,"601":0,"602":0,"603":0,"604":0,"605":0,"606":0,"607":0,"608":0,"609":0,"610":0,"611":0,"612":0,"613":0,"614":0,"615":0,"616":0,"617":0,"618":0,"619":0,"620":0,"621":0,"622":0,"623":0,"624":0,"625":0,"626":0,"627":0,"628":0,"629":0,"630":0,"631":0,"632":0,"633":0,"634":0,"635":0,"636":0,"637":0,"638":0,"639":0,"640":0,"641":0,"642":0,"643":0,"644":0,"645":0,"646":0,"647":0,"648":0,"649":0,"650":0,"651":0,"652":0,"653":0,"654":0,"655":0,"656":0,"657":0,"658":0,"659":0,"660":0,"661":0,"662":0,"663":0,"664":0,"665":0,"666":0,"667":0,"668":0,"669":0,"670":0,"671":0,"672":0,"673":0,"674":0,"675":0,"676":0,"677":0,"678":0,"679":0,"680":0,"681":0,"682":0,"683":0,"684":0,"685":0,"686":0,"687":0,"688":0,"689":0,"690":0,"691":0,"692":0,"693":0,"694":0,"695":0,"696":0,"697":0,"698":0,"699":0,"700":0,"701":0,"702":0,"703":0,"704":0,"705":0,"706":0,"707":0,"708":0,"709":0,"710":0,"711":0,"712":0,"713":0,"714":0,"715":0,"716":0,"717":0,"718":0,"719":0,"720":0,"721":0,"722":0,"723":0,"724":0,"725":0,"726":0,"727":0,"728":0,"729":0,"730":0,"731":0,"732":0,"733":0,"734":0,"735":0,"736":0,"737":0,"738":0,"739":0,"740":0,"741":0,"742":0,"743":0,"744":0,"745":0,"746":0,"747":0,"748":0,"749":0,"750":0,"751":0,"752":0,"753":0,"754":0,"755":0,"756":0,"757":0,"758":0,"759":0,"760":0,"761":0,"762":0,"763":0,"764":0,"765":0,"766":0,"767":0,"768":0,"769":0,"770":0,"771":0,"772":0,"773":0,"774":0,"775":0,"776":0,"777":0,"778":0,"779":0,"780":0,"781":0,"782":0,"783":0,"784":0,"785":0,"786":0,"787":0,"788":0,"789":0,"790":0,"791":0,"792":0,"793":0,"794":0,"795":0,"796":0,"797":0,"798":0,"799":0,"800":0,"801":0,"802":0,"803":0,"804":0,"805":0,"806":0,"807":0,"808":0,"809":0,"810":0,"811":0,"812":0,"813":0,"814":0,"815":0,"816":0,"817":0,"818":0,"819":0,"820":0,"821":0,"822":0,"823":0,"824":0,"825":0,"826":0,"827":0,"828":0,"829":0,"830":0,"831":0,"832":0,"833":0,"834":0,"835":0,"836":0,"837":0,"838":0,"839":0,"840":0,"841":0,"842":0,"843":0,"844":0,"845":0,"846":0,"847":0,"848":0,"849":0,"850":0,"851":0,"852":0,"853":0,"854":0,"855":0,"856":0,"857":0,"858":0,"859":0,"860":0,"861":0,"862":0,"863":0,"864":0,"865":0,"866":0,"867":0,"868":0,"869":0,"870":0,"871":0,"872":0,"873":0,"874":0,"875":0,"876":0,"877":0,"878":0,"879":0,"880":0,"881":0,"882":0,"883":0,"884":0,"885":0,"886":0,"887":0,"888":0,"889":0,"890":0,"891":0,"892":0,"893":0,"894":0,"895":0,"896":0,"897":0,"898":0,"899":0,"900":0,"901":0,"902":0,"903":0,"904":0,"905":0,"906":0,"907":0,"908":0,"909":0,"910":0,"911":0,"912":0,"913":0,"914":0,"915":0,"916":0,"917":0,"918":0,"919":0,"920":0,"921":0,"922":0,"923":0,"924":0,"925":0,"926":0,"927":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0,0,0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0,0],"35":[0,0,0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0,0],"41":[0,0],"42":[0,0],"43":[0,0,0],"44":[0,0],"45":[0,0],"46":[0,0,0],"47":[0,0,0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0,0],"53":[0,0],"54":[0,0],"55":[0,0,0],"56":[0,0],"57":[0,0],"58":[0,0,0],"59":[0,0],"60":[0,0],"61":[0,0],"62":[0,0],"63":[0,0],"64":[0,0],"65":[0,0],"66":[0,0],"67":[0,0],"68":[0,0],"69":[0,0],"70":[0,0],"71":[0,0],"72":[0,0],"73":[0,0,0],"74":[0,0],"75":[0,0],"76":[0,0],"77":[0,0],"78":[0,0],"79":[0,0],"80":[0,0],"81":[0,0],"82":[0,0],"83":[0,0],"84":[0,0],"85":[0,0],"86":[0,0,0],"87":[0,0],"88":[0,0],"89":[0,0],"90":[0,0],"91":[0,0],"92":[0,0],"93":[0,0],"94":[0,0],"95":[0,0],"96":[0,0],"97":[0,0],"98":[0,0],"99":[0,0],"100":[0,0],"101":[0,0],"102":[0,0],"103":[0,0],"104":[0,0],"105":[0,0],"106":[0,0],"107":[0,0],"108":[0,0],"109":[0,0],"110":[0,0],"111":[0,0],"112":[0,0],"113":[0,0],"114":[0,0],"115":[0,0],"116":[0,0],"117":[0,0],"118":[0,0],"119":[0,0],"120":[0,0],"121":[0,0],"122":[0,0],"123":[0,0],"124":[0,0],"125":[0,0],"126":[0,0],"127":[0,0],"128":[0,0],"129":[0,0],"130":[0,0,0],"131":[0,0],"132":[0,0],"133":[0,0],"134":[0,0],"135":[0,0],"136":[0,0],"137":[0,0],"138":[0,0],"139":[0,0],"140":[0,0],"141":[0,0],"142":[0,0],"143":[0,0],"144":[0,0],"145":[0,0],"146":[0,0],"147":[0,0,0],"148":[0,0],"149":[0,0],"150":[0,0],"151":[0,0],"152":[0,0],"153":[0,0],"154":[0,0],"155":[0,0],"156":[0,0],"157":[0,0],"158":[0,0],"159":[0,0],"160":[0,0],"161":[0,0],"162":[0,0],"163":[0,0],"164":[0,0],"165":[0,0],"166":[0,0],"167":[0,0],"168":[0,0],"169":[0,0],"170":[0,0],"171":[0,0],"172":[0,0],"173":[0,0],"174":[0,0],"175":[0,0],"176":[0,0],"177":[0,0],"178":[0,0],"179":[0,0],"180":[0,0],"181":[0,0],"182":[0,0],"183":[0,0],"184":[0,0],"185":[0,0],"186":[0,0],"187":[0,0],"188":[0,0],"189":[0,0],"190":[0,0],"191":[0,0],"192":[0,0],"193":[0,0],"194":[0,0],"195":[0,0],"196":[0,0],"197":[0,0],"198":[0,0],"199":[0,0],"200":[0,0],"201":[0,0,0],"202":[0,0],"203":[0,0],"204":[0,0],"205":[0,0],"206":[0,0],"207":[0,0],"208":[0,0],"209":[0,0],"210":[0,0],"211":[0,0],"212":[0,0],"213":[0,0],"214":[0,0],"215":[0,0],"216":[0,0],"217":[0,0],"218":[0,0],"219":[0,0],"220":[0,0],"221":[0,0],"222":[0,0],"223":[0,0],"224":[0,0],"225":[0,0],"226":[0,0],"227":[0,0],"228":[0,0],"229":[0,0],"230":[0,0],"231":[0,0],"232":[0,0],"233":[0,0],"234":[0,0],"235":[0,0],"236":[0,0],"237":[0,0],"238":[0,0],"239":[0,0],"240":[0,0],"241":[0,0],"242":[0,0],"243":[0,0],"244":[0,0],"245":[0,0],"246":[0,0],"247":[0,0],"248":[0,0],"249":[0,0],"250":[0,0],"251":[0,0],"252":[0,0],"253":[0,0],"254":[0,0],"255":[0,0],"256":[0,0],"257":[0,0],"258":[0,0],"259":[0,0],"260":[0,0],"261":[0,0],"262":[0,0],"263":[0,0,0,0,0,0,0,0,0,0],"264":[0,0],"265":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":35}}},"2":{"name":"(anonymous_2)","line":23,"loc":{"start":{"line":23,"column":14},"end":{"line":23,"column":28}}},"3":{"name":"(anonymous_3)","line":46,"loc":{"start":{"line":46,"column":22},"end":{"line":46,"column":32}}},"4":{"name":"(anonymous_4)","line":74,"loc":{"start":{"line":74,"column":12},"end":{"line":74,"column":36}}},"5":{"name":"(anonymous_5)","line":89,"loc":{"start":{"line":89,"column":15},"end":{"line":89,"column":39}}},"6":{"name":"(anonymous_6)","line":99,"loc":{"start":{"line":99,"column":10},"end":{"line":99,"column":25}}},"7":{"name":"(anonymous_7)","line":125,"loc":{"start":{"line":125,"column":12},"end":{"line":125,"column":36}}},"8":{"name":"(anonymous_8)","line":144,"loc":{"start":{"line":144,"column":17},"end":{"line":144,"column":41}}},"9":{"name":"(anonymous_9)","line":160,"loc":{"start":{"line":160,"column":20},"end":{"line":160,"column":36}}},"10":{"name":"(anonymous_10)","line":205,"loc":{"start":{"line":205,"column":10},"end":{"line":205,"column":32}}},"11":{"name":"(anonymous_11)","line":220,"loc":{"start":{"line":220,"column":12},"end":{"line":220,"column":24}}},"12":{"name":"(anonymous_12)","line":227,"loc":{"start":{"line":227,"column":14},"end":{"line":227,"column":26}}},"13":{"name":"(anonymous_13)","line":243,"loc":{"start":{"line":243,"column":19},"end":{"line":243,"column":39}}},"14":{"name":"(anonymous_14)","line":282,"loc":{"start":{"line":282,"column":32},"end":{"line":282,"column":44}}},"15":{"name":"(anonymous_15)","line":298,"loc":{"start":{"line":298,"column":14},"end":{"line":298,"column":24}}},"16":{"name":"(anonymous_16)","line":308,"loc":{"start":{"line":308,"column":13},"end":{"line":308,"column":32}}},"17":{"name":"(anonymous_17)","line":321,"loc":{"start":{"line":321,"column":11},"end":{"line":321,"column":36}}},"18":{"name":"(anonymous_18)","line":359,"loc":{"start":{"line":359,"column":10},"end":{"line":359,"column":39}}},"19":{"name":"(anonymous_19)","line":362,"loc":{"start":{"line":362,"column":15},"end":{"line":362,"column":27}}},"20":{"name":"(anonymous_20)","line":367,"loc":{"start":{"line":367,"column":24},"end":{"line":367,"column":36}}},"21":{"name":"(anonymous_21)","line":390,"loc":{"start":{"line":390,"column":13},"end":{"line":390,"column":63}}},"22":{"name":"(anonymous_22)","line":409,"loc":{"start":{"line":409,"column":18},"end":{"line":409,"column":30}}},"23":{"name":"(anonymous_23)","line":437,"loc":{"start":{"line":437,"column":13},"end":{"line":437,"column":42}}},"24":{"name":"(anonymous_24)","line":449,"loc":{"start":{"line":449,"column":10},"end":{"line":449,"column":29}}},"25":{"name":"(anonymous_25)","line":462,"loc":{"start":{"line":462,"column":10},"end":{"line":462,"column":20}}},"26":{"name":"(anonymous_26)","line":471,"loc":{"start":{"line":471,"column":13},"end":{"line":471,"column":23}}},"27":{"name":"(anonymous_27)","line":479,"loc":{"start":{"line":479,"column":12},"end":{"line":479,"column":24}}},"28":{"name":"(anonymous_28)","line":487,"loc":{"start":{"line":487,"column":14},"end":{"line":487,"column":26}}},"29":{"name":"(anonymous_29)","line":498,"loc":{"start":{"line":498,"column":21},"end":{"line":498,"column":31}}},"30":{"name":"xmlEscape","line":506,"loc":{"start":{"line":506,"column":4},"end":{"line":506,"column":28}}},"31":{"name":"(anonymous_31)","line":508,"loc":{"start":{"line":508,"column":40},"end":{"line":508,"column":55}}},"32":{"name":"(anonymous_32)","line":530,"loc":{"start":{"line":530,"column":14},"end":{"line":530,"column":32}}},"33":{"name":"(anonymous_33)","line":541,"loc":{"start":{"line":541,"column":13},"end":{"line":541,"column":31}}},"34":{"name":"serializeToXML","line":543,"loc":{"start":{"line":543,"column":12},"end":{"line":543,"column":44}}},"35":{"name":"(anonymous_35)","line":580,"loc":{"start":{"line":580,"column":18},"end":{"line":580,"column":36}}},"36":{"name":"serializeToJUnitXML","line":582,"loc":{"start":{"line":582,"column":12},"end":{"line":582,"column":49}}},"37":{"name":"(anonymous_37)","line":657,"loc":{"start":{"line":657,"column":13},"end":{"line":657,"column":31}}},"38":{"name":"serializeToTAP","line":661,"loc":{"start":{"line":661,"column":12},"end":{"line":661,"column":44}}},"39":{"name":"(anonymous_39)","line":746,"loc":{"start":{"line":746,"column":23},"end":{"line":746,"column":45}}},"40":{"name":"(anonymous_40)","line":798,"loc":{"start":{"line":798,"column":19},"end":{"line":798,"column":41}}},"41":{"name":"(anonymous_41)","line":806,"loc":{"start":{"line":806,"column":22},"end":{"line":806,"column":32}}},"42":{"name":"(anonymous_42)","line":815,"loc":{"start":{"line":815,"column":18},"end":{"line":815,"column":29}}},"43":{"name":"(anonymous_43)","line":832,"loc":{"start":{"line":832,"column":17},"end":{"line":832,"column":34}}},"44":{"name":"(anonymous_44)","line":906,"loc":{"start":{"line":906,"column":25},"end":{"line":906,"column":35}}},"45":{"name":"inGroups","line":915,"loc":{"start":{"line":915,"column":8},"end":{"line":915,"column":45}}},"46":{"name":"TestNode","line":939,"loc":{"start":{"line":939,"column":8},"end":{"line":939,"column":37}}},"47":{"name":"(anonymous_47)","line":1002,"loc":{"start":{"line":1002,"column":26},"end":{"line":1002,"column":47}}},"48":{"name":"TestRunner","line":1023,"loc":{"start":{"line":1023,"column":8},"end":{"line":1023,"column":29}}},"49":{"name":"(anonymous_49)","line":1218,"loc":{"start":{"line":1218,"column":36},"end":{"line":1218,"column":67}}},"50":{"name":"(anonymous_50)","line":1242,"loc":{"start":{"line":1242,"column":38},"end":{"line":1242,"column":71}}},"51":{"name":"(anonymous_51)","line":1265,"loc":{"start":{"line":1265,"column":29},"end":{"line":1265,"column":41}}},"52":{"name":"(anonymous_52)","line":1292,"loc":{"start":{"line":1292,"column":40},"end":{"line":1292,"column":56}}},"53":{"name":"(anonymous_53)","line":1326,"loc":{"start":{"line":1326,"column":20},"end":{"line":1326,"column":32}}},"54":{"name":"(anonymous_54)","line":1369,"loc":{"start":{"line":1369,"column":32},"end":{"line":1369,"column":70}}},"55":{"name":"(anonymous_55)","line":1403,"loc":{"start":{"line":1403,"column":19},"end":{"line":1403,"column":31}}},"56":{"name":"(anonymous_56)","line":1450,"loc":{"start":{"line":1450,"column":39},"end":{"line":1450,"column":49}}},"57":{"name":"(anonymous_57)","line":1463,"loc":{"start":{"line":1463,"column":26},"end":{"line":1463,"column":45}}},"58":{"name":"(anonymous_58)","line":1537,"loc":{"start":{"line":1537,"column":69},"end":{"line":1537,"column":79}}},"59":{"name":"(anonymous_59)","line":1621,"loc":{"start":{"line":1621,"column":31},"end":{"line":1621,"column":41}}},"60":{"name":"(anonymous_60)","line":1642,"loc":{"start":{"line":1642,"column":26},"end":{"line":1642,"column":41}}},"61":{"name":"(anonymous_61)","line":1645,"loc":{"start":{"line":1645,"column":37},"end":{"line":1645,"column":47}}},"62":{"name":"(anonymous_62)","line":1661,"loc":{"start":{"line":1661,"column":23},"end":{"line":1661,"column":39}}},"63":{"name":"(anonymous_63)","line":1691,"loc":{"start":{"line":1691,"column":35},"end":{"line":1691,"column":45}}},"64":{"name":"(anonymous_64)","line":1721,"loc":{"start":{"line":1721,"column":21},"end":{"line":1721,"column":31}}},"65":{"name":"(anonymous_65)","line":1731,"loc":{"start":{"line":1731,"column":21},"end":{"line":1731,"column":35}}},"66":{"name":"(anonymous_66)","line":1745,"loc":{"start":{"line":1745,"column":18},"end":{"line":1745,"column":40}}},"67":{"name":"(anonymous_67)","line":1755,"loc":{"start":{"line":1755,"column":20},"end":{"line":1755,"column":32}}},"68":{"name":"(anonymous_68)","line":1765,"loc":{"start":{"line":1765,"column":23},"end":{"line":1765,"column":34}}},"69":{"name":"(anonymous_69)","line":1775,"loc":{"start":{"line":1775,"column":23},"end":{"line":1775,"column":33}}},"70":{"name":"(anonymous_70)","line":1788,"loc":{"start":{"line":1788,"column":24},"end":{"line":1788,"column":40}}},"71":{"name":"(anonymous_71)","line":1810,"loc":{"start":{"line":1810,"column":25},"end":{"line":1810,"column":42}}},"72":{"name":"(anonymous_72)","line":1840,"loc":{"start":{"line":1840,"column":22},"end":{"line":1840,"column":32}}},"73":{"name":"(anonymous_73)","line":1845,"loc":{"start":{"line":1845,"column":23},"end":{"line":1845,"column":33}}},"74":{"name":"(anonymous_74)","line":1860,"loc":{"start":{"line":1860,"column":21},"end":{"line":1860,"column":40}}},"75":{"name":"(anonymous_75)","line":1862,"loc":{"start":{"line":1862,"column":48},"end":{"line":1862,"column":58}}},"76":{"name":"(anonymous_76)","line":1877,"loc":{"start":{"line":1877,"column":18},"end":{"line":1877,"column":37}}},"77":{"name":"(anonymous_77)","line":1935,"loc":{"start":{"line":1935,"column":14},"end":{"line":1935,"column":40}}},"78":{"name":"(anonymous_78)","line":1958,"loc":{"start":{"line":1958,"column":11},"end":{"line":1958,"column":38}}},"79":{"name":"(anonymous_79)","line":1980,"loc":{"start":{"line":1980,"column":15},"end":{"line":1981,"column":36}}},"80":{"name":"(anonymous_80)","line":2000,"loc":{"start":{"line":2000,"column":20},"end":{"line":2001,"column":36}}},"81":{"name":"(anonymous_81)","line":2021,"loc":{"start":{"line":2021,"column":20},"end":{"line":2022,"column":36}}},"82":{"name":"(anonymous_82)","line":2045,"loc":{"start":{"line":2045,"column":21},"end":{"line":2046,"column":36}}},"83":{"name":"(anonymous_83)","line":2065,"loc":{"start":{"line":2065,"column":26},"end":{"line":2066,"column":36}}},"84":{"name":"(anonymous_84)","line":2087,"loc":{"start":{"line":2087,"column":26},"end":{"line":2088,"column":36}}},"85":{"name":"(anonymous_85)","line":2112,"loc":{"start":{"line":2112,"column":14},"end":{"line":2112,"column":58}}},"86":{"name":"(anonymous_86)","line":2141,"loc":{"start":{"line":2141,"column":20},"end":{"line":2142,"column":36}}},"87":{"name":"(anonymous_87)","line":2177,"loc":{"start":{"line":2177,"column":25},"end":{"line":2178,"column":48}}},"88":{"name":"(anonymous_88)","line":2207,"loc":{"start":{"line":2207,"column":14},"end":{"line":2207,"column":41}}},"89":{"name":"(anonymous_89)","line":2221,"loc":{"start":{"line":2221,"column":17},"end":{"line":2221,"column":44}}},"90":{"name":"(anonymous_90)","line":2239,"loc":{"start":{"line":2239,"column":19},"end":{"line":2240,"column":35}}},"91":{"name":"(anonymous_91)","line":2268,"loc":{"start":{"line":2268,"column":18},"end":{"line":2268,"column":62}}},"92":{"name":"(anonymous_92)","line":2293,"loc":{"start":{"line":2293,"column":14},"end":{"line":2293,"column":52}}},"93":{"name":"(anonymous_93)","line":2346,"loc":{"start":{"line":2346,"column":21},"end":{"line":2346,"column":62}}},"94":{"name":"(anonymous_94)","line":2360,"loc":{"start":{"line":2360,"column":15},"end":{"line":2360,"column":25}}},"95":{"name":"(anonymous_95)","line":2370,"loc":{"start":{"line":2370,"column":16},"end":{"line":2370,"column":26}}},"96":{"name":"(anonymous_96)","line":2380,"loc":{"start":{"line":2380,"column":12},"end":{"line":2380,"column":22}}},"97":{"name":"(anonymous_97)","line":2394,"loc":{"start":{"line":2394,"column":11},"end":{"line":2394,"column":30}}},"98":{"name":"(anonymous_98)","line":2403,"loc":{"start":{"line":2403,"column":11},"end":{"line":2403,"column":30}}},"99":{"name":"(anonymous_99)","line":2420,"loc":{"start":{"line":2420,"column":15},"end":{"line":2420,"column":52}}},"100":{"name":"(anonymous_100)","line":2436,"loc":{"start":{"line":2436,"column":18},"end":{"line":2437,"column":34}}},"101":{"name":"(anonymous_101)","line":2453,"loc":{"start":{"line":2453,"column":17},"end":{"line":2453,"column":56}}},"102":{"name":"(anonymous_102)","line":2469,"loc":{"start":{"line":2469,"column":14},"end":{"line":2469,"column":51}}},"103":{"name":"(anonymous_103)","line":2488,"loc":{"start":{"line":2488,"column":14},"end":{"line":2488,"column":41}}},"104":{"name":"(anonymous_104)","line":2503,"loc":{"start":{"line":2503,"column":13},"end":{"line":2503,"column":40}}},"105":{"name":"(anonymous_105)","line":2522,"loc":{"start":{"line":2522,"column":12},"end":{"line":2522,"column":38}}},"106":{"name":"(anonymous_106)","line":2536,"loc":{"start":{"line":2536,"column":15},"end":{"line":2536,"column":41}}},"107":{"name":"(anonymous_107)","line":2551,"loc":{"start":{"line":2551,"column":16},"end":{"line":2551,"column":43}}},"108":{"name":"(anonymous_108)","line":2566,"loc":{"start":{"line":2566,"column":21},"end":{"line":2566,"column":48}}},"109":{"name":"(anonymous_109)","line":2581,"loc":{"start":{"line":2581,"column":13},"end":{"line":2581,"column":40}}},"110":{"name":"(anonymous_110)","line":2596,"loc":{"start":{"line":2596,"column":18},"end":{"line":2596,"column":45}}},"111":{"name":"(anonymous_111)","line":2614,"loc":{"start":{"line":2614,"column":14},"end":{"line":2614,"column":41}}},"112":{"name":"(anonymous_112)","line":2634,"loc":{"start":{"line":2634,"column":16},"end":{"line":2634,"column":43}}},"113":{"name":"(anonymous_113)","line":2648,"loc":{"start":{"line":2648,"column":17},"end":{"line":2648,"column":44}}},"114":{"name":"(anonymous_114)","line":2665,"loc":{"start":{"line":2665,"column":19},"end":{"line":2665,"column":56}}},"115":{"name":"(anonymous_115)","line":2679,"loc":{"start":{"line":2679,"column":15},"end":{"line":2679,"column":42}}},"116":{"name":"(anonymous_116)","line":2693,"loc":{"start":{"line":2693,"column":15},"end":{"line":2693,"column":42}}},"117":{"name":"(anonymous_117)","line":2707,"loc":{"start":{"line":2707,"column":15},"end":{"line":2707,"column":42}}},"118":{"name":"(anonymous_118)","line":2722,"loc":{"start":{"line":2722,"column":15},"end":{"line":2722,"column":60}}},"119":{"name":"(anonymous_119)","line":2747,"loc":{"start":{"line":2747,"column":17},"end":{"line":2747,"column":57}}},"120":{"name":"(anonymous_120)","line":2804,"loc":{"start":{"line":2804,"column":25},"end":{"line":2804,"column":43}}},"121":{"name":"(anonymous_121)","line":2832,"loc":{"start":{"line":2832,"column":17},"end":{"line":2832,"column":29}}},"122":{"name":"(anonymous_122)","line":2841,"loc":{"start":{"line":2841,"column":15},"end":{"line":2841,"column":27}}},"123":{"name":"(anonymous_123)","line":2860,"loc":{"start":{"line":2860,"column":28},"end":{"line":2860,"column":64}}},"124":{"name":"(anonymous_124)","line":2900,"loc":{"start":{"line":2900,"column":49},"end":{"line":2900,"column":59}}},"125":{"name":"(anonymous_125)","line":2921,"loc":{"start":{"line":2921,"column":10},"end":{"line":2921,"column":28}}},"126":{"name":"(anonymous_126)","line":2935,"loc":{"start":{"line":2935,"column":16},"end":{"line":2935,"column":34}}},"127":{"name":"(anonymous_127)","line":2969,"loc":{"start":{"line":2969,"column":20},"end":{"line":2969,"column":56}}},"128":{"name":"(anonymous_128)","line":3005,"loc":{"start":{"line":3005,"column":20},"end":{"line":3005,"column":56}}},"129":{"name":"(anonymous_129)","line":3043,"loc":{"start":{"line":3043,"column":15},"end":{"line":3043,"column":33}}},"130":{"name":"f","line":3054,"loc":{"start":{"line":3054,"column":8},"end":{"line":3054,"column":20}}},"131":{"name":"(anonymous_131)","line":3065,"loc":{"start":{"line":3065,"column":29},"end":{"line":3065,"column":43}}},"132":{"name":"(anonymous_132)","line":3066,"loc":{"start":{"line":3066,"column":27},"end":{"line":3066,"column":37}}},"133":{"name":"(anonymous_133)","line":3097,"loc":{"start":{"line":3097,"column":22},"end":{"line":3097,"column":73}}},"134":{"name":"(anonymous_134)","line":3111,"loc":{"start":{"line":3111,"column":37},"end":{"line":3111,"column":47}}},"135":{"name":"(anonymous_135)","line":3129,"loc":{"start":{"line":3129,"column":25},"end":{"line":3129,"column":35}}},"136":{"name":"(anonymous_136)","line":3154,"loc":{"start":{"line":3154,"column":25},"end":{"line":3154,"column":35}}},"137":{"name":"(anonymous_137)","line":3176,"loc":{"start":{"line":3176,"column":22},"end":{"line":3176,"column":36}}},"138":{"name":"(anonymous_138)","line":3206,"loc":{"start":{"line":3206,"column":21},"end":{"line":3206,"column":60}}},"139":{"name":"(anonymous_139)","line":3208,"loc":{"start":{"line":3208,"column":22},"end":{"line":3208,"column":37}}},"140":{"name":"(anonymous_140)","line":3225,"loc":{"start":{"line":3225,"column":51},"end":{"line":3225,"column":61}}},"141":{"name":"(anonymous_141)","line":3287,"loc":{"start":{"line":3287,"column":14},"end":{"line":3287,"column":50}}},"142":{"name":"(anonymous_142)","line":3317,"loc":{"start":{"line":3317,"column":12},"end":{"line":3317,"column":53}}},"143":{"name":"(anonymous_143)","line":3330,"loc":{"start":{"line":3330,"column":13},"end":{"line":3330,"column":52}}},"144":{"name":"(anonymous_144)","line":3342,"loc":{"start":{"line":3342,"column":17},"end":{"line":3342,"column":58}}},"145":{"name":"(anonymous_145)","line":3357,"loc":{"start":{"line":3357,"column":18},"end":{"line":3357,"column":57}}},"146":{"name":"(anonymous_146)","line":3374,"loc":{"start":{"line":3374,"column":13},"end":{"line":3374,"column":54}}},"147":{"name":"(anonymous_147)","line":3389,"loc":{"start":{"line":3389,"column":14},"end":{"line":3389,"column":53}}},"148":{"name":"(anonymous_148)","line":3405,"loc":{"start":{"line":3405,"column":17},"end":{"line":3405,"column":44}}},"149":{"name":"(anonymous_149)","line":3423,"loc":{"start":{"line":3423,"column":23},"end":{"line":3423,"column":64}}},"150":{"name":"(anonymous_150)","line":3438,"loc":{"start":{"line":3438,"column":24},"end":{"line":3438,"column":63}}},"151":{"name":"(anonymous_151)","line":3457,"loc":{"start":{"line":3457,"column":18},"end":{"line":3457,"column":32}}},"152":{"name":"(anonymous_152)","line":3514,"loc":{"start":{"line":3514,"column":36},"end":{"line":3514,"column":53}}},"153":{"name":"(anonymous_153)","line":3532,"loc":{"start":{"line":3532,"column":22},"end":{"line":3532,"column":40}}},"154":{"name":"(anonymous_154)","line":3562,"loc":{"start":{"line":3562,"column":21},"end":{"line":3562,"column":39}}},"155":{"name":"(anonymous_155)","line":3594,"loc":{"start":{"line":3594,"column":26},"end":{"line":3594,"column":42}}},"156":{"name":"(anonymous_156)","line":3641,"loc":{"start":{"line":3641,"column":26},"end":{"line":3641,"column":56}}},"157":{"name":"(anonymous_157)","line":3674,"loc":{"start":{"line":3674,"column":47},"end":{"line":3674,"column":57}}},"158":{"name":"(anonymous_158)","line":3689,"loc":{"start":{"line":3689,"column":15},"end":{"line":3689,"column":41}}},"159":{"name":"(anonymous_159)","line":3709,"loc":{"start":{"line":3709,"column":23},"end":{"line":3709,"column":44}}},"160":{"name":"(anonymous_160)","line":3728,"loc":{"start":{"line":3728,"column":35},"end":{"line":3728,"column":71}}},"161":{"name":"(anonymous_161)","line":3742,"loc":{"start":{"line":3742,"column":11},"end":{"line":3742,"column":39}}},"162":{"name":"(anonymous_162)","line":3760,"loc":{"start":{"line":3760,"column":31},"end":{"line":3760,"column":42}}},"163":{"name":"(anonymous_163)","line":3764,"loc":{"start":{"line":3764,"column":30},"end":{"line":3764,"column":41}}},"164":{"name":"(anonymous_164)","line":3784,"loc":{"start":{"line":3784,"column":19},"end":{"line":3784,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3869,"column":81}},"2":{"start":{"line":16,"column":0},"end":{"line":3714,"column":1}},"3":{"start":{"line":17,"column":4},"end":{"line":17,"column":25}},"4":{"start":{"line":21,"column":4},"end":{"line":26,"column":6}},"5":{"start":{"line":24,"column":12},"end":{"line":24,"column":31}},"6":{"start":{"line":28,"column":0},"end":{"line":28,"column":20}},"7":{"start":{"line":32,"column":0},"end":{"line":32,"column":26}},"8":{"start":{"line":33,"column":0},"end":{"line":33,"column":24}},"9":{"start":{"line":34,"column":0},"end":{"line":37,"column":2}},"10":{"start":{"line":46,"column":0},"end":{"line":57,"column":2}},"11":{"start":{"line":55,"column":4},"end":{"line":55,"column":24}},"12":{"start":{"line":59,"column":0},"end":{"line":148,"column":2}},"13":{"start":{"line":75,"column":8},"end":{"line":77,"column":9}},"14":{"start":{"line":76,"column":12},"end":{"line":76,"column":38}},"15":{"start":{"line":79,"column":8},"end":{"line":79,"column":44}},"16":{"start":{"line":90,"column":8},"end":{"line":90,"column":43}},"17":{"start":{"line":100,"column":8},"end":{"line":102,"column":9}},"18":{"start":{"line":101,"column":12},"end":{"line":101,"column":36}},"19":{"start":{"line":103,"column":8},"end":{"line":105,"column":9}},"20":{"start":{"line":104,"column":12},"end":{"line":104,"column":32}},"21":{"start":{"line":107,"column":8},"end":{"line":109,"column":9}},"22":{"start":{"line":108,"column":12},"end":{"line":108,"column":69}},"23":{"start":{"line":111,"column":8},"end":{"line":116,"column":9}},"24":{"start":{"line":112,"column":12},"end":{"line":112,"column":54}},"25":{"start":{"line":113,"column":12},"end":{"line":115,"column":13}},"26":{"start":{"line":114,"column":16},"end":{"line":114,"column":46}},"27":{"start":{"line":126,"column":8},"end":{"line":134,"column":9}},"28":{"start":{"line":127,"column":12},"end":{"line":127,"column":48}},"29":{"start":{"line":128,"column":12},"end":{"line":133,"column":13}},"30":{"start":{"line":129,"column":16},"end":{"line":132,"column":17}},"31":{"start":{"line":130,"column":20},"end":{"line":130,"column":42}},"32":{"start":{"line":131,"column":20},"end":{"line":131,"column":26}},"33":{"start":{"line":145,"column":8},"end":{"line":145,"column":43}},"34":{"start":{"line":160,"column":0},"end":{"line":193,"column":2}},"35":{"start":{"line":167,"column":4},"end":{"line":167,"column":19}},"36":{"start":{"line":175,"column":4},"end":{"line":175,"column":20}},"37":{"start":{"line":178,"column":4},"end":{"line":186,"column":5}},"38":{"start":{"line":179,"column":8},"end":{"line":179,"column":25}},"39":{"start":{"line":180,"column":11},"end":{"line":186,"column":5}},"40":{"start":{"line":181,"column":8},"end":{"line":185,"column":9}},"41":{"start":{"line":182,"column":12},"end":{"line":184,"column":13}},"42":{"start":{"line":183,"column":16},"end":{"line":183,"column":40}},"43":{"start":{"line":189,"column":4},"end":{"line":191,"column":5}},"44":{"start":{"line":190,"column":8},"end":{"line":190,"column":47}},"45":{"start":{"line":195,"column":0},"end":{"line":230,"column":2}},"46":{"start":{"line":206,"column":8},"end":{"line":208,"column":9}},"47":{"start":{"line":207,"column":12},"end":{"line":207,"column":40}},"48":{"start":{"line":209,"column":8},"end":{"line":209,"column":20}},"49":{"start":{"line":243,"column":0},"end":{"line":262,"column":2}},"50":{"start":{"line":250,"column":4},"end":{"line":250,"column":22}},"51":{"start":{"line":253,"column":4},"end":{"line":255,"column":5}},"52":{"start":{"line":254,"column":8},"end":{"line":254,"column":36}},"53":{"start":{"line":258,"column":4},"end":{"line":260,"column":5}},"54":{"start":{"line":259,"column":8},"end":{"line":259,"column":46}},"55":{"start":{"line":272,"column":0},"end":{"line":272,"column":38}},"56":{"start":{"line":282,"column":0},"end":{"line":284,"column":2}},"57":{"start":{"line":283,"column":5},"end":{"line":283,"column":78}},"58":{"start":{"line":286,"column":0},"end":{"line":490,"column":2}},"59":{"start":{"line":299,"column":8},"end":{"line":299,"column":79}},"60":{"start":{"line":309,"column":8},"end":{"line":309,"column":43}},"61":{"start":{"line":322,"column":8},"end":{"line":324,"column":46}},"62":{"start":{"line":326,"column":8},"end":{"line":328,"column":9}},"63":{"start":{"line":327,"column":12},"end":{"line":327,"column":52}},"64":{"start":{"line":330,"column":8},"end":{"line":330,"column":47}},"65":{"start":{"line":360,"column":8},"end":{"line":360,"column":24}},"66":{"start":{"line":361,"column":8},"end":{"line":361,"column":67}},"67":{"start":{"line":362,"column":8},"end":{"line":370,"column":10}},"68":{"start":{"line":363,"column":12},"end":{"line":363,"column":33}},"69":{"start":{"line":364,"column":12},"end":{"line":366,"column":13}},"70":{"start":{"line":365,"column":16},"end":{"line":365,"column":31}},"71":{"start":{"line":367,"column":12},"end":{"line":369,"column":15}},"72":{"start":{"line":368,"column":16},"end":{"line":368,"column":46}},"73":{"start":{"line":391,"column":8},"end":{"line":392,"column":20}},"74":{"start":{"line":394,"column":8},"end":{"line":397,"column":9}},"75":{"start":{"line":396,"column":12},"end":{"line":396,"column":67}},"76":{"start":{"line":399,"column":8},"end":{"line":401,"column":9}},"77":{"start":{"line":400,"column":12},"end":{"line":400,"column":52}},"78":{"start":{"line":403,"column":8},"end":{"line":403,"column":42}},"79":{"start":{"line":405,"column":8},"end":{"line":407,"column":9}},"80":{"start":{"line":406,"column":12},"end":{"line":406,"column":28}},"81":{"start":{"line":409,"column":8},"end":{"line":423,"column":22}},"82":{"start":{"line":410,"column":12},"end":{"line":410,"column":20}},"83":{"start":{"line":412,"column":12},"end":{"line":422,"column":13}},"84":{"start":{"line":413,"column":16},"end":{"line":413,"column":35}},"85":{"start":{"line":415,"column":16},"end":{"line":415,"column":36}},"86":{"start":{"line":417,"column":16},"end":{"line":421,"column":17}},"87":{"start":{"line":418,"column":20},"end":{"line":418,"column":52}},"88":{"start":{"line":420,"column":20},"end":{"line":420,"column":79}},"89":{"start":{"line":438,"column":8},"end":{"line":438,"column":36}},"90":{"start":{"line":439,"column":8},"end":{"line":441,"column":9}},"91":{"start":{"line":440,"column":12},"end":{"line":440,"column":106}},"92":{"start":{"line":450,"column":8},"end":{"line":450,"column":37}},"93":{"start":{"line":498,"column":0},"end":{"line":734,"column":4}},"94":{"start":{"line":506,"column":4},"end":{"line":518,"column":5}},"95":{"start":{"line":508,"column":8},"end":{"line":516,"column":11}},"96":{"start":{"line":509,"column":12},"end":{"line":515,"column":13}},"97":{"start":{"line":510,"column":28},"end":{"line":510,"column":42}},"98":{"start":{"line":511,"column":28},"end":{"line":511,"column":42}},"99":{"start":{"line":512,"column":28},"end":{"line":512,"column":44}},"100":{"start":{"line":513,"column":28},"end":{"line":513,"column":44}},"101":{"start":{"line":514,"column":28},"end":{"line":514,"column":43}},"102":{"start":{"line":521,"column":4},"end":{"line":733,"column":6}},"103":{"start":{"line":531,"column":12},"end":{"line":531,"column":56}},"104":{"start":{"line":543,"column":12},"end":{"line":566,"column":13}},"105":{"start":{"line":544,"column":16},"end":{"line":544,"column":91}},"106":{"start":{"line":546,"column":16},"end":{"line":548,"column":17}},"107":{"start":{"line":547,"column":20},"end":{"line":547,"column":68}},"108":{"start":{"line":550,"column":16},"end":{"line":561,"column":17}},"109":{"start":{"line":551,"column":20},"end":{"line":551,"column":112}},"110":{"start":{"line":553,"column":20},"end":{"line":553,"column":167}},"111":{"start":{"line":554,"column":20},"end":{"line":560,"column":21}},"112":{"start":{"line":555,"column":24},"end":{"line":559,"column":25}},"113":{"start":{"line":556,"column":28},"end":{"line":558,"column":29}},"114":{"start":{"line":557,"column":32},"end":{"line":557,"column":69}},"115":{"start":{"line":563,"column":16},"end":{"line":563,"column":49}},"116":{"start":{"line":565,"column":16},"end":{"line":565,"column":27}},"117":{"start":{"line":568,"column":12},"end":{"line":568,"column":90}},"118":{"start":{"line":582,"column":12},"end":{"line":644,"column":13}},"119":{"start":{"line":583,"column":16},"end":{"line":583,"column":29}},"120":{"start":{"line":585,"column":16},"end":{"line":640,"column":17}},"121":{"start":{"line":588,"column":24},"end":{"line":594,"column":25}},"122":{"start":{"line":589,"column":28},"end":{"line":589,"column":129}},"123":{"start":{"line":590,"column":28},"end":{"line":592,"column":29}},"124":{"start":{"line":591,"column":32},"end":{"line":591,"column":143}},"125":{"start":{"line":593,"column":28},"end":{"line":593,"column":48}},"126":{"start":{"line":595,"column":24},"end":{"line":595,"column":30}},"127":{"start":{"line":600,"column":24},"end":{"line":600,"column":194}},"128":{"start":{"line":602,"column":24},"end":{"line":608,"column":25}},"129":{"start":{"line":603,"column":28},"end":{"line":607,"column":29}},"130":{"start":{"line":604,"column":32},"end":{"line":606,"column":33}},"131":{"start":{"line":605,"column":36},"end":{"line":605,"column":78}},"132":{"start":{"line":610,"column":24},"end":{"line":610,"column":46}},"133":{"start":{"line":611,"column":24},"end":{"line":611,"column":30}},"134":{"start":{"line":615,"column":24},"end":{"line":621,"column":25}},"135":{"start":{"line":616,"column":28},"end":{"line":620,"column":29}},"136":{"start":{"line":617,"column":32},"end":{"line":619,"column":33}},"137":{"start":{"line":618,"column":36},"end":{"line":618,"column":78}},"138":{"start":{"line":622,"column":24},"end":{"line":622,"column":30}},"139":{"start":{"line":627,"column":24},"end":{"line":627,"column":45}},"140":{"start":{"line":629,"column":24},"end":{"line":635,"column":25}},"141":{"start":{"line":630,"column":28},"end":{"line":634,"column":29}},"142":{"start":{"line":631,"column":32},"end":{"line":633,"column":33}},"143":{"start":{"line":632,"column":36},"end":{"line":632,"column":78}},"144":{"start":{"line":637,"column":24},"end":{"line":637,"column":47}},"145":{"start":{"line":642,"column":16},"end":{"line":642,"column":27}},"146":{"start":{"line":646,"column":12},"end":{"line":646,"column":95}},"147":{"start":{"line":659,"column":12},"end":{"line":659,"column":35}},"148":{"start":{"line":661,"column":12},"end":{"line":728,"column":13}},"149":{"start":{"line":662,"column":16},"end":{"line":662,"column":30}},"150":{"start":{"line":664,"column":16},"end":{"line":724,"column":17}},"151":{"start":{"line":667,"column":24},"end":{"line":678,"column":25}},"152":{"start":{"line":669,"column":28},"end":{"line":669,"column":85}},"153":{"start":{"line":671,"column":28},"end":{"line":673,"column":29}},"154":{"start":{"line":672,"column":32},"end":{"line":672,"column":79}},"155":{"start":{"line":675,"column":28},"end":{"line":675,"column":41}},"156":{"start":{"line":677,"column":28},"end":{"line":677,"column":74}},"157":{"start":{"line":679,"column":24},"end":{"line":679,"column":30}},"158":{"start":{"line":683,"column":24},"end":{"line":683,"column":128}},"159":{"start":{"line":685,"column":24},"end":{"line":691,"column":25}},"160":{"start":{"line":686,"column":28},"end":{"line":690,"column":29}},"161":{"start":{"line":687,"column":32},"end":{"line":689,"column":33}},"162":{"start":{"line":688,"column":36},"end":{"line":688,"column":74}},"163":{"start":{"line":693,"column":24},"end":{"line":693,"column":71}},"164":{"start":{"line":696,"column":24},"end":{"line":696,"column":30}},"165":{"start":{"line":700,"column":24},"end":{"line":700,"column":129}},"166":{"start":{"line":702,"column":24},"end":{"line":708,"column":25}},"167":{"start":{"line":703,"column":28},"end":{"line":707,"column":29}},"168":{"start":{"line":704,"column":32},"end":{"line":706,"column":33}},"169":{"start":{"line":705,"column":36},"end":{"line":705,"column":74}},"170":{"start":{"line":710,"column":24},"end":{"line":710,"column":72}},"171":{"start":{"line":711,"column":24},"end":{"line":711,"column":30}},"172":{"start":{"line":715,"column":24},"end":{"line":721,"column":25}},"173":{"start":{"line":716,"column":28},"end":{"line":720,"column":29}},"174":{"start":{"line":717,"column":32},"end":{"line":719,"column":33}},"175":{"start":{"line":718,"column":36},"end":{"line":718,"column":74}},"176":{"start":{"line":726,"column":16},"end":{"line":726,"column":28}},"177":{"start":{"line":730,"column":12},"end":{"line":730,"column":74}},"178":{"start":{"line":746,"column":4},"end":{"line":785,"column":6}},"179":{"start":{"line":753,"column":8},"end":{"line":753,"column":23}},"180":{"start":{"line":760,"column":8},"end":{"line":760,"column":55}},"181":{"start":{"line":768,"column":8},"end":{"line":768,"column":36}},"182":{"start":{"line":776,"column":8},"end":{"line":776,"column":26}},"183":{"start":{"line":784,"column":8},"end":{"line":784,"column":28}},"184":{"start":{"line":787,"column":4},"end":{"line":896,"column":6}},"185":{"start":{"line":799,"column":12},"end":{"line":799,"column":39}},"186":{"start":{"line":807,"column":12},"end":{"line":807,"column":40}},"187":{"start":{"line":816,"column":12},"end":{"line":819,"column":13}},"188":{"start":{"line":817,"column":16},"end":{"line":817,"column":62}},"189":{"start":{"line":818,"column":16},"end":{"line":818,"column":34}},"190":{"start":{"line":820,"column":12},"end":{"line":823,"column":13}},"191":{"start":{"line":821,"column":16},"end":{"line":821,"column":66}},"192":{"start":{"line":822,"column":16},"end":{"line":822,"column":36}},"193":{"start":{"line":824,"column":12},"end":{"line":824,"column":32}},"194":{"start":{"line":835,"column":12},"end":{"line":858,"column":13}},"195":{"start":{"line":836,"column":16},"end":{"line":836,"column":60}},"196":{"start":{"line":837,"column":16},"end":{"line":837,"column":43}},"197":{"start":{"line":838,"column":16},"end":{"line":838,"column":55}},"198":{"start":{"line":839,"column":16},"end":{"line":839,"column":55}},"199":{"start":{"line":840,"column":16},"end":{"line":840,"column":41}},"200":{"start":{"line":841,"column":16},"end":{"line":841,"column":54}},"201":{"start":{"line":844,"column":16},"end":{"line":849,"column":17}},"202":{"start":{"line":845,"column":20},"end":{"line":845,"column":95}},"203":{"start":{"line":847,"column":20},"end":{"line":847,"column":68}},"204":{"start":{"line":848,"column":20},"end":{"line":848,"column":56}},"205":{"start":{"line":851,"column":16},"end":{"line":851,"column":54}},"206":{"start":{"line":852,"column":16},"end":{"line":852,"column":57}},"207":{"start":{"line":853,"column":16},"end":{"line":853,"column":57}},"208":{"start":{"line":854,"column":16},"end":{"line":854,"column":43}},"209":{"start":{"line":855,"column":16},"end":{"line":855,"column":56}},"210":{"start":{"line":857,"column":16},"end":{"line":857,"column":52}},"211":{"start":{"line":861,"column":12},"end":{"line":861,"column":41}},"212":{"start":{"line":864,"column":12},"end":{"line":866,"column":13}},"213":{"start":{"line":865,"column":16},"end":{"line":865,"column":61}},"214":{"start":{"line":869,"column":12},"end":{"line":869,"column":56}},"215":{"start":{"line":870,"column":12},"end":{"line":870,"column":57}},"216":{"start":{"line":871,"column":12},"end":{"line":871,"column":67}},"217":{"start":{"line":874,"column":12},"end":{"line":883,"column":13}},"218":{"start":{"line":875,"column":16},"end":{"line":875,"column":47}},"219":{"start":{"line":876,"column":16},"end":{"line":882,"column":17}},"220":{"start":{"line":877,"column":20},"end":{"line":877,"column":64}},"221":{"start":{"line":878,"column":20},"end":{"line":878,"column":42}},"222":{"start":{"line":879,"column":20},"end":{"line":879,"column":38}},"223":{"start":{"line":880,"column":20},"end":{"line":880,"column":40}},"224":{"start":{"line":881,"column":20},"end":{"line":881,"column":50}},"225":{"start":{"line":886,"column":12},"end":{"line":886,"column":40}},"226":{"start":{"line":887,"column":12},"end":{"line":887,"column":42}},"227":{"start":{"line":888,"column":12},"end":{"line":888,"column":42}},"228":{"start":{"line":890,"column":12},"end":{"line":892,"column":13}},"229":{"start":{"line":891,"column":16},"end":{"line":891,"column":36}},"230":{"start":{"line":906,"column":4},"end":{"line":1909,"column":8}},"231":{"start":{"line":915,"column":8},"end":{"line":928,"column":9}},"232":{"start":{"line":916,"column":12},"end":{"line":927,"column":13}},"233":{"start":{"line":917,"column":16},"end":{"line":917,"column":28}},"234":{"start":{"line":919,"column":16},"end":{"line":925,"column":17}},"235":{"start":{"line":920,"column":20},"end":{"line":924,"column":21}},"236":{"start":{"line":921,"column":24},"end":{"line":923,"column":25}},"237":{"start":{"line":922,"column":28},"end":{"line":922,"column":40}},"238":{"start":{"line":926,"column":16},"end":{"line":926,"column":29}},"239":{"start":{"line":939,"column":8},"end":{"line":992,"column":9}},"240":{"start":{"line":946,"column":12},"end":{"line":946,"column":41}},"241":{"start":{"line":953,"column":12},"end":{"line":953,"column":35}},"242":{"start":{"line":960,"column":12},"end":{"line":960,"column":34}},"243":{"start":{"line":967,"column":12},"end":{"line":967,"column":31}},"244":{"start":{"line":974,"column":12},"end":{"line":974,"column":29}},"245":{"start":{"line":981,"column":12},"end":{"line":981,"column":49}},"246":{"start":{"line":984,"column":12},"end":{"line":990,"column":13}},"247":{"start":{"line":985,"column":16},"end":{"line":985,"column":48}},"248":{"start":{"line":986,"column":16},"end":{"line":986,"column":52}},"249":{"start":{"line":987,"column":19},"end":{"line":990,"column":13}},"250":{"start":{"line":988,"column":16},"end":{"line":988,"column":47}},"251":{"start":{"line":989,"column":16},"end":{"line":989,"column":52}},"252":{"start":{"line":994,"column":8},"end":{"line":1013,"column":10}},"253":{"start":{"line":1003,"column":16},"end":{"line":1003,"column":52}},"254":{"start":{"line":1004,"column":16},"end":{"line":1009,"column":17}},"255":{"start":{"line":1005,"column":20},"end":{"line":1005,"column":60}},"256":{"start":{"line":1007,"column":20},"end":{"line":1007,"column":47}},"257":{"start":{"line":1008,"column":20},"end":{"line":1008,"column":42}},"258":{"start":{"line":1010,"column":16},"end":{"line":1010,"column":35}},"259":{"start":{"line":1011,"column":16},"end":{"line":1011,"column":28}},"260":{"start":{"line":1023,"column":8},"end":{"line":1113,"column":9}},"261":{"start":{"line":1026,"column":12},"end":{"line":1026,"column":43}},"262":{"start":{"line":1035,"column":12},"end":{"line":1035,"column":81}},"263":{"start":{"line":1044,"column":12},"end":{"line":1044,"column":29}},"264":{"start":{"line":1053,"column":12},"end":{"line":1053,"column":30}},"265":{"start":{"line":1062,"column":12},"end":{"line":1062,"column":29}},"266":{"start":{"line":1072,"column":12},"end":{"line":1072,"column":34}},"267":{"start":{"line":1081,"column":12},"end":{"line":1081,"column":34}},"268":{"start":{"line":1091,"column":12},"end":{"line":1091,"column":37}},"269":{"start":{"line":1100,"column":12},"end":{"line":1100,"column":33}},"270":{"start":{"line":1111,"column":12},"end":{"line":1111,"column":30}},"271":{"start":{"line":1115,"column":8},"end":{"line":1905,"column":11}},"272":{"start":{"line":1221,"column":16},"end":{"line":1223,"column":29}},"273":{"start":{"line":1226,"column":16},"end":{"line":1230,"column":17}},"274":{"start":{"line":1227,"column":20},"end":{"line":1229,"column":21}},"275":{"start":{"line":1228,"column":24},"end":{"line":1228,"column":47}},"276":{"start":{"line":1245,"column":16},"end":{"line":1245,"column":61}},"277":{"start":{"line":1248,"column":16},"end":{"line":1254,"column":17}},"278":{"start":{"line":1249,"column":20},"end":{"line":1253,"column":21}},"279":{"start":{"line":1250,"column":24},"end":{"line":1250,"column":79}},"280":{"start":{"line":1251,"column":27},"end":{"line":1253,"column":21}},"281":{"start":{"line":1252,"column":24},"end":{"line":1252,"column":78}},"282":{"start":{"line":1267,"column":16},"end":{"line":1267,"column":60}},"283":{"start":{"line":1271,"column":16},"end":{"line":1277,"column":17}},"284":{"start":{"line":1272,"column":20},"end":{"line":1276,"column":21}},"285":{"start":{"line":1273,"column":24},"end":{"line":1273,"column":92}},"286":{"start":{"line":1274,"column":27},"end":{"line":1276,"column":21}},"287":{"start":{"line":1275,"column":24},"end":{"line":1275,"column":91}},"288":{"start":{"line":1293,"column":16},"end":{"line":1293,"column":31}},"289":{"start":{"line":1295,"column":16},"end":{"line":1312,"column":17}},"290":{"start":{"line":1296,"column":20},"end":{"line":1296,"column":45}},"291":{"start":{"line":1298,"column":20},"end":{"line":1301,"column":21}},"292":{"start":{"line":1299,"column":24},"end":{"line":1299,"column":65}},"293":{"start":{"line":1300,"column":24},"end":{"line":1300,"column":80}},"294":{"start":{"line":1303,"column":20},"end":{"line":1311,"column":21}},"295":{"start":{"line":1304,"column":24},"end":{"line":1304,"column":73}},"296":{"start":{"line":1305,"column":24},"end":{"line":1305,"column":75}},"297":{"start":{"line":1306,"column":24},"end":{"line":1306,"column":126}},"298":{"start":{"line":1307,"column":27},"end":{"line":1311,"column":21}},"299":{"start":{"line":1308,"column":24},"end":{"line":1308,"column":72}},"300":{"start":{"line":1309,"column":24},"end":{"line":1309,"column":75}},"301":{"start":{"line":1310,"column":24},"end":{"line":1310,"column":124}},"302":{"start":{"line":1328,"column":16},"end":{"line":1353,"column":17}},"303":{"start":{"line":1329,"column":20},"end":{"line":1329,"column":43}},"304":{"start":{"line":1330,"column":23},"end":{"line":1353,"column":17}},"305":{"start":{"line":1331,"column":20},"end":{"line":1331,"column":53}},"306":{"start":{"line":1332,"column":23},"end":{"line":1353,"column":17}},"307":{"start":{"line":1333,"column":20},"end":{"line":1333,"column":47}},"308":{"start":{"line":1335,"column":20},"end":{"line":1338,"column":21}},"309":{"start":{"line":1336,"column":24},"end":{"line":1336,"column":66}},"310":{"start":{"line":1337,"column":24},"end":{"line":1337,"column":53}},"311":{"start":{"line":1340,"column":20},"end":{"line":1340,"column":62}},"312":{"start":{"line":1342,"column":20},"end":{"line":1352,"column":21}},"313":{"start":{"line":1343,"column":24},"end":{"line":1343,"column":58}},"314":{"start":{"line":1344,"column":24},"end":{"line":1344,"column":84}},"315":{"start":{"line":1345,"column":24},"end":{"line":1345,"column":85}},"316":{"start":{"line":1346,"column":24},"end":{"line":1346,"column":62}},"317":{"start":{"line":1347,"column":24},"end":{"line":1347,"column":46}},"318":{"start":{"line":1348,"column":24},"end":{"line":1348,"column":92}},"319":{"start":{"line":1349,"column":24},"end":{"line":1349,"column":41}},"320":{"start":{"line":1350,"column":27},"end":{"line":1352,"column":21}},"321":{"start":{"line":1351,"column":24},"end":{"line":1351,"column":51}},"322":{"start":{"line":1355,"column":16},"end":{"line":1355,"column":33}},"323":{"start":{"line":1370,"column":16},"end":{"line":1371,"column":55}},"324":{"start":{"line":1372,"column":16},"end":{"line":1390,"column":17}},"325":{"start":{"line":1373,"column":20},"end":{"line":1378,"column":21}},"326":{"start":{"line":1374,"column":24},"end":{"line":1374,"column":73}},"327":{"start":{"line":1375,"column":24},"end":{"line":1375,"column":36}},"328":{"start":{"line":1377,"column":24},"end":{"line":1377,"column":62}},"329":{"start":{"line":1380,"column":20},"end":{"line":1380,"column":42}},"330":{"start":{"line":1381,"column":20},"end":{"line":1381,"column":37}},"331":{"start":{"line":1382,"column":20},"end":{"line":1382,"column":50}},"332":{"start":{"line":1383,"column":20},"end":{"line":1387,"column":21}},"333":{"start":{"line":1384,"column":24},"end":{"line":1384,"column":52}},"334":{"start":{"line":1386,"column":24},"end":{"line":1386,"column":52}},"335":{"start":{"line":1389,"column":20},"end":{"line":1389,"column":37}},"336":{"start":{"line":1392,"column":16},"end":{"line":1392,"column":29}},"337":{"start":{"line":1406,"column":16},"end":{"line":1406,"column":39}},"338":{"start":{"line":1409,"column":16},"end":{"line":1409,"column":40}},"339":{"start":{"line":1411,"column":16},"end":{"line":1460,"column":17}},"340":{"start":{"line":1414,"column":20},"end":{"line":1414,"column":41}},"341":{"start":{"line":1417,"column":20},"end":{"line":1417,"column":44}},"342":{"start":{"line":1419,"column":20},"end":{"line":1419,"column":53}},"343":{"start":{"line":1422,"column":20},"end":{"line":1458,"column":21}},"344":{"start":{"line":1423,"column":24},"end":{"line":1446,"column":25}},"345":{"start":{"line":1424,"column":28},"end":{"line":1424,"column":100}},"346":{"start":{"line":1425,"column":28},"end":{"line":1425,"column":53}},"347":{"start":{"line":1426,"column":28},"end":{"line":1426,"column":74}},"348":{"start":{"line":1427,"column":31},"end":{"line":1446,"column":25}},"349":{"start":{"line":1428,"column":28},"end":{"line":1428,"column":98}},"350":{"start":{"line":1429,"column":28},"end":{"line":1429,"column":53}},"351":{"start":{"line":1443,"column":28},"end":{"line":1445,"column":29}},"352":{"start":{"line":1444,"column":32},"end":{"line":1444,"column":39}},"353":{"start":{"line":1449,"column":24},"end":{"line":1455,"column":25}},"354":{"start":{"line":1450,"column":28},"end":{"line":1452,"column":34}},"355":{"start":{"line":1451,"column":32},"end":{"line":1451,"column":58}},"356":{"start":{"line":1454,"column":28},"end":{"line":1454,"column":40}},"357":{"start":{"line":1457,"column":24},"end":{"line":1457,"column":44}},"358":{"start":{"line":1466,"column":16},"end":{"line":1466,"column":37}},"359":{"start":{"line":1469,"column":16},"end":{"line":1469,"column":38}},"360":{"start":{"line":1472,"column":16},"end":{"line":1477,"column":17}},"361":{"start":{"line":1476,"column":20},"end":{"line":1476,"column":27}},"362":{"start":{"line":1479,"column":16},"end":{"line":1479,"column":47}},"363":{"start":{"line":1480,"column":16},"end":{"line":1480,"column":54}},"364":{"start":{"line":1483,"column":16},"end":{"line":1486,"column":17}},"365":{"start":{"line":1484,"column":20},"end":{"line":1484,"column":54}},"366":{"start":{"line":1485,"column":20},"end":{"line":1485,"column":47}},"367":{"start":{"line":1489,"column":16},"end":{"line":1490,"column":76}},"368":{"start":{"line":1491,"column":16},"end":{"line":1491,"column":75}},"369":{"start":{"line":1494,"column":16},"end":{"line":1494,"column":35}},"370":{"start":{"line":1495,"column":16},"end":{"line":1495,"column":33}},"371":{"start":{"line":1498,"column":16},"end":{"line":1585,"column":17}},"372":{"start":{"line":1501,"column":20},"end":{"line":1501,"column":58}},"373":{"start":{"line":1504,"column":20},"end":{"line":1514,"column":21}},"374":{"start":{"line":1505,"column":24},"end":{"line":1505,"column":81}},"375":{"start":{"line":1508,"column":26},"end":{"line":1514,"column":21}},"376":{"start":{"line":1509,"column":24},"end":{"line":1509,"column":57}},"377":{"start":{"line":1510,"column":24},"end":{"line":1510,"column":38}},"378":{"start":{"line":1511,"column":27},"end":{"line":1514,"column":21}},"379":{"start":{"line":1512,"column":24},"end":{"line":1512,"column":58}},"380":{"start":{"line":1513,"column":24},"end":{"line":1513,"column":38}},"381":{"start":{"line":1519,"column":20},"end":{"line":1522,"column":21}},"382":{"start":{"line":1520,"column":24},"end":{"line":1520,"column":58}},"383":{"start":{"line":1521,"column":24},"end":{"line":1521,"column":51}},"384":{"start":{"line":1525,"column":20},"end":{"line":1583,"column":21}},"385":{"start":{"line":1526,"column":24},"end":{"line":1529,"column":25}},"386":{"start":{"line":1527,"column":28},"end":{"line":1527,"column":43}},"387":{"start":{"line":1528,"column":28},"end":{"line":1528,"column":42}},"388":{"start":{"line":1530,"column":27},"end":{"line":1583,"column":21}},"389":{"start":{"line":1532,"column":24},"end":{"line":1545,"column":25}},"390":{"start":{"line":1533,"column":28},"end":{"line":1544,"column":29}},"391":{"start":{"line":1536,"column":32},"end":{"line":1543,"column":33}},"392":{"start":{"line":1537,"column":36},"end":{"line":1539,"column":53}},"393":{"start":{"line":1538,"column":40},"end":{"line":1538,"column":87}},"394":{"start":{"line":1540,"column":36},"end":{"line":1540,"column":57}},"395":{"start":{"line":1542,"column":36},"end":{"line":1542,"column":109}},"396":{"start":{"line":1547,"column":24},"end":{"line":1547,"column":31}},"397":{"start":{"line":1551,"column":24},"end":{"line":1582,"column":25}},"398":{"start":{"line":1552,"column":28},"end":{"line":1552,"column":72}},"399":{"start":{"line":1553,"column":28},"end":{"line":1553,"column":42}},"400":{"start":{"line":1556,"column":28},"end":{"line":1580,"column":29}},"401":{"start":{"line":1559,"column":32},"end":{"line":1562,"column":33}},"402":{"start":{"line":1560,"column":36},"end":{"line":1560,"column":80}},"403":{"start":{"line":1561,"column":36},"end":{"line":1561,"column":50}},"404":{"start":{"line":1563,"column":35},"end":{"line":1580,"column":29}},"405":{"start":{"line":1566,"column":32},"end":{"line":1569,"column":33}},"406":{"start":{"line":1567,"column":36},"end":{"line":1567,"column":80}},"407":{"start":{"line":1568,"column":36},"end":{"line":1568,"column":50}},"408":{"start":{"line":1571,"column":35},"end":{"line":1580,"column":29}},"409":{"start":{"line":1574,"column":32},"end":{"line":1578,"column":33}},"410":{"start":{"line":1576,"column":36},"end":{"line":1576,"column":80}},"411":{"start":{"line":1577,"column":36},"end":{"line":1577,"column":50}},"412":{"start":{"line":1588,"column":16},"end":{"line":1592,"column":17}},"413":{"start":{"line":1589,"column":20},"end":{"line":1589,"column":116}},"414":{"start":{"line":1591,"column":20},"end":{"line":1591,"column":102}},"415":{"start":{"line":1595,"column":16},"end":{"line":1595,"column":72}},"416":{"start":{"line":1598,"column":16},"end":{"line":1598,"column":40}},"417":{"start":{"line":1601,"column":16},"end":{"line":1601,"column":58}},"418":{"start":{"line":1604,"column":16},"end":{"line":1610,"column":18}},"419":{"start":{"line":1612,"column":16},"end":{"line":1616,"column":17}},"420":{"start":{"line":1613,"column":20},"end":{"line":1613,"column":49}},"421":{"start":{"line":1615,"column":20},"end":{"line":1615,"column":49}},"422":{"start":{"line":1617,"column":16},"end":{"line":1617,"column":44}},"423":{"start":{"line":1620,"column":16},"end":{"line":1626,"column":17}},"424":{"start":{"line":1621,"column":20},"end":{"line":1623,"column":26}},"425":{"start":{"line":1622,"column":24},"end":{"line":1622,"column":50}},"426":{"start":{"line":1625,"column":20},"end":{"line":1625,"column":32}},"427":{"start":{"line":1644,"column":16},"end":{"line":1650,"column":17}},"428":{"start":{"line":1645,"column":20},"end":{"line":1647,"column":23}},"429":{"start":{"line":1646,"column":24},"end":{"line":1646,"column":36}},"430":{"start":{"line":1649,"column":20},"end":{"line":1649,"column":32}},"431":{"start":{"line":1664,"column":16},"end":{"line":1671,"column":78}},"432":{"start":{"line":1674,"column":16},"end":{"line":1708,"column":17}},"433":{"start":{"line":1677,"column":20},"end":{"line":1682,"column":22}},"434":{"start":{"line":1684,"column":20},"end":{"line":1684,"column":50}},"435":{"start":{"line":1685,"column":20},"end":{"line":1685,"column":48}},"436":{"start":{"line":1687,"column":20},"end":{"line":1687,"column":105}},"437":{"start":{"line":1690,"column":20},"end":{"line":1696,"column":21}},"438":{"start":{"line":1691,"column":24},"end":{"line":1693,"column":30}},"439":{"start":{"line":1692,"column":28},"end":{"line":1692,"column":54}},"440":{"start":{"line":1695,"column":24},"end":{"line":1695,"column":36}},"441":{"start":{"line":1701,"column":20},"end":{"line":1701,"column":45}},"442":{"start":{"line":1704,"column":20},"end":{"line":1704,"column":73}},"443":{"start":{"line":1707,"column":20},"end":{"line":1707,"column":43}},"444":{"start":{"line":1722,"column":16},"end":{"line":1722,"column":45}},"445":{"start":{"line":1732,"column":16},"end":{"line":1732,"column":45}},"446":{"start":{"line":1746,"column":16},"end":{"line":1746,"column":49}},"447":{"start":{"line":1747,"column":16},"end":{"line":1747,"column":28}},"448":{"start":{"line":1756,"column":16},"end":{"line":1756,"column":85}},"449":{"start":{"line":1766,"column":16},"end":{"line":1766,"column":37}},"450":{"start":{"line":1776,"column":16},"end":{"line":1776,"column":37}},"451":{"start":{"line":1789,"column":16},"end":{"line":1797,"column":17}},"452":{"start":{"line":1790,"column":20},"end":{"line":1794,"column":21}},"453":{"start":{"line":1791,"column":24},"end":{"line":1791,"column":57}},"454":{"start":{"line":1793,"column":24},"end":{"line":1793,"column":49}},"455":{"start":{"line":1796,"column":20},"end":{"line":1796,"column":32}},"456":{"start":{"line":1811,"column":16},"end":{"line":1811,"column":37}},"457":{"start":{"line":1812,"column":16},"end":{"line":1814,"column":17}},"458":{"start":{"line":1813,"column":20},"end":{"line":1813,"column":50}},"459":{"start":{"line":1815,"column":16},"end":{"line":1817,"column":17}},"460":{"start":{"line":1816,"column":20},"end":{"line":1816,"column":45}},"461":{"start":{"line":1818,"column":16},"end":{"line":1826,"column":17}},"462":{"start":{"line":1819,"column":20},"end":{"line":1823,"column":21}},"463":{"start":{"line":1820,"column":24},"end":{"line":1820,"column":49}},"464":{"start":{"line":1822,"column":24},"end":{"line":1822,"column":41}},"465":{"start":{"line":1825,"column":20},"end":{"line":1825,"column":32}},"466":{"start":{"line":1841,"column":16},"end":{"line":1843,"column":35}},"467":{"start":{"line":1845,"column":16},"end":{"line":1850,"column":18}},"468":{"start":{"line":1846,"column":20},"end":{"line":1848,"column":21}},"469":{"start":{"line":1847,"column":24},"end":{"line":1847,"column":54}},"470":{"start":{"line":1849,"column":20},"end":{"line":1849,"column":32}},"471":{"start":{"line":1861,"column":16},"end":{"line":1865,"column":17}},"472":{"start":{"line":1862,"column":20},"end":{"line":1862,"column":62}},"473":{"start":{"line":1864,"column":20},"end":{"line":1864,"column":71}},"474":{"start":{"line":1879,"column":16},"end":{"line":1879,"column":40}},"475":{"start":{"line":1882,"column":16},"end":{"line":1883,"column":46}},"476":{"start":{"line":1887,"column":16},"end":{"line":1889,"column":17}},"477":{"start":{"line":1888,"column":20},"end":{"line":1888,"column":65}},"478":{"start":{"line":1892,"column":16},"end":{"line":1892,"column":111}},"479":{"start":{"line":1895,"column":16},"end":{"line":1895,"column":40}},"480":{"start":{"line":1896,"column":16},"end":{"line":1896,"column":37}},"481":{"start":{"line":1897,"column":16},"end":{"line":1897,"column":49}},"482":{"start":{"line":1900,"column":16},"end":{"line":1900,"column":48}},"483":{"start":{"line":1903,"column":16},"end":{"line":1903,"column":30}},"484":{"start":{"line":1907,"column":8},"end":{"line":1907,"column":32}},"485":{"start":{"line":1920,"column":0},"end":{"line":2311,"column":2}},"486":{"start":{"line":1936,"column":8},"end":{"line":1945,"column":9}},"487":{"start":{"line":1937,"column":12},"end":{"line":1937,"column":44}},"488":{"start":{"line":1939,"column":12},"end":{"line":1943,"column":13}},"489":{"start":{"line":1940,"column":16},"end":{"line":1942,"column":17}},"490":{"start":{"line":1941,"column":20},"end":{"line":1941,"column":29}},"491":{"start":{"line":1944,"column":12},"end":{"line":1944,"column":22}},"492":{"start":{"line":1959,"column":8},"end":{"line":1968,"column":9}},"493":{"start":{"line":1960,"column":12},"end":{"line":1960,"column":42}},"494":{"start":{"line":1962,"column":12},"end":{"line":1966,"column":13}},"495":{"start":{"line":1963,"column":16},"end":{"line":1965,"column":17}},"496":{"start":{"line":1964,"column":20},"end":{"line":1964,"column":32}},"497":{"start":{"line":1967,"column":12},"end":{"line":1967,"column":25}},"498":{"start":{"line":1983,"column":8},"end":{"line":1983,"column":36}},"499":{"start":{"line":1985,"column":8},"end":{"line":1987,"column":9}},"500":{"start":{"line":1986,"column":12},"end":{"line":1986,"column":161}},"501":{"start":{"line":2002,"column":8},"end":{"line":2002,"column":36}},"502":{"start":{"line":2005,"column":8},"end":{"line":2009,"column":9}},"503":{"start":{"line":2006,"column":12},"end":{"line":2008,"column":13}},"504":{"start":{"line":2007,"column":16},"end":{"line":2007,"column":173}},"505":{"start":{"line":2024,"column":8},"end":{"line":2024,"column":36}},"506":{"start":{"line":2026,"column":8},"end":{"line":2028,"column":9}},"507":{"start":{"line":2027,"column":12},"end":{"line":2027,"column":99}},"508":{"start":{"line":2030,"column":8},"end":{"line":2032,"column":9}},"509":{"start":{"line":2031,"column":12},"end":{"line":2031,"column":119}},"510":{"start":{"line":2048,"column":8},"end":{"line":2048,"column":36}},"511":{"start":{"line":2050,"column":8},"end":{"line":2052,"column":9}},"512":{"start":{"line":2051,"column":12},"end":{"line":2051,"column":116}},"513":{"start":{"line":2068,"column":8},"end":{"line":2068,"column":36}},"514":{"start":{"line":2070,"column":8},"end":{"line":2074,"column":9}},"515":{"start":{"line":2071,"column":12},"end":{"line":2073,"column":13}},"516":{"start":{"line":2072,"column":16},"end":{"line":2072,"column":120}},"517":{"start":{"line":2090,"column":8},"end":{"line":2090,"column":36}},"518":{"start":{"line":2093,"column":8},"end":{"line":2095,"column":9}},"519":{"start":{"line":2094,"column":12},"end":{"line":2094,"column":105}},"520":{"start":{"line":2097,"column":8},"end":{"line":2099,"column":9}},"521":{"start":{"line":2098,"column":12},"end":{"line":2098,"column":116}},"522":{"start":{"line":2114,"column":8},"end":{"line":2114,"column":36}},"523":{"start":{"line":2117,"column":8},"end":{"line":2124,"column":9}},"524":{"start":{"line":2118,"column":12},"end":{"line":2123,"column":13}},"525":{"start":{"line":2119,"column":16},"end":{"line":2121,"column":17}},"526":{"start":{"line":2120,"column":20},"end":{"line":2120,"column":153}},"527":{"start":{"line":2122,"column":16},"end":{"line":2122,"column":23}},"528":{"start":{"line":2127,"column":8},"end":{"line":2127,"column":120}},"529":{"start":{"line":2144,"column":8},"end":{"line":2144,"column":36}},"530":{"start":{"line":2147,"column":8},"end":{"line":2149,"column":9}},"531":{"start":{"line":2148,"column":12},"end":{"line":2148,"column":101}},"532":{"start":{"line":2152,"column":8},"end":{"line":2154,"column":9}},"533":{"start":{"line":2153,"column":12},"end":{"line":2153,"column":172}},"534":{"start":{"line":2157,"column":8},"end":{"line":2161,"column":9}},"535":{"start":{"line":2158,"column":12},"end":{"line":2160,"column":13}},"536":{"start":{"line":2159,"column":16},"end":{"line":2159,"column":163}},"537":{"start":{"line":2180,"column":8},"end":{"line":2180,"column":36}},"538":{"start":{"line":2183,"column":8},"end":{"line":2185,"column":9}},"539":{"start":{"line":2184,"column":12},"end":{"line":2184,"column":104}},"540":{"start":{"line":2188,"column":8},"end":{"line":2190,"column":9}},"541":{"start":{"line":2189,"column":12},"end":{"line":2189,"column":166}},"542":{"start":{"line":2193,"column":8},"end":{"line":2197,"column":9}},"543":{"start":{"line":2194,"column":12},"end":{"line":2196,"column":13}},"544":{"start":{"line":2195,"column":16},"end":{"line":2195,"column":168}},"545":{"start":{"line":2208,"column":8},"end":{"line":2208,"column":36}},"546":{"start":{"line":2209,"column":8},"end":{"line":2211,"column":9}},"547":{"start":{"line":2210,"column":12},"end":{"line":2210,"column":98}},"548":{"start":{"line":2222,"column":8},"end":{"line":2222,"column":36}},"549":{"start":{"line":2223,"column":8},"end":{"line":2225,"column":9}},"550":{"start":{"line":2224,"column":12},"end":{"line":2224,"column":102}},"551":{"start":{"line":2242,"column":8},"end":{"line":2242,"column":36}},"552":{"start":{"line":2245,"column":8},"end":{"line":2247,"column":9}},"553":{"start":{"line":2246,"column":12},"end":{"line":2246,"column":166}},"554":{"start":{"line":2250,"column":8},"end":{"line":2254,"column":9}},"555":{"start":{"line":2251,"column":12},"end":{"line":2253,"column":13}},"556":{"start":{"line":2252,"column":16},"end":{"line":2252,"column":166}},"557":{"start":{"line":2271,"column":8},"end":{"line":2278,"column":9}},"558":{"start":{"line":2272,"column":12},"end":{"line":2277,"column":13}},"559":{"start":{"line":2273,"column":16},"end":{"line":2275,"column":17}},"560":{"start":{"line":2274,"column":20},"end":{"line":2274,"column":153}},"561":{"start":{"line":2276,"column":16},"end":{"line":2276,"column":23}},"562":{"start":{"line":2281,"column":8},"end":{"line":2281,"column":101}},"563":{"start":{"line":2295,"column":8},"end":{"line":2295,"column":36}},"564":{"start":{"line":2297,"column":8},"end":{"line":2299,"column":9}},"565":{"start":{"line":2298,"column":12},"end":{"line":2298,"column":91}},"566":{"start":{"line":2301,"column":8},"end":{"line":2303,"column":9}},"567":{"start":{"line":2302,"column":12},"end":{"line":2302,"column":94}},"568":{"start":{"line":2305,"column":8},"end":{"line":2308,"column":9}},"569":{"start":{"line":2306,"column":12},"end":{"line":2306,"column":92}},"570":{"start":{"line":2307,"column":12},"end":{"line":2307,"column":41}},"571":{"start":{"line":2322,"column":0},"end":{"line":2792,"column":2}},"572":{"start":{"line":2347,"column":8},"end":{"line":2351,"column":9}},"573":{"start":{"line":2348,"column":12},"end":{"line":2348,"column":70}},"574":{"start":{"line":2350,"column":12},"end":{"line":2350,"column":34}},"575":{"start":{"line":2361,"column":8},"end":{"line":2361,"column":29}},"576":{"start":{"line":2371,"column":8},"end":{"line":2371,"column":24}},"577":{"start":{"line":2381,"column":8},"end":{"line":2381,"column":26}},"578":{"start":{"line":2395,"column":8},"end":{"line":2395,"column":103}},"579":{"start":{"line":2404,"column":8},"end":{"line":2404,"column":36}},"580":{"start":{"line":2421,"column":8},"end":{"line":2421,"column":36}},"581":{"start":{"line":2422,"column":8},"end":{"line":2424,"column":9}},"582":{"start":{"line":2423,"column":12},"end":{"line":2423,"column":133}},"583":{"start":{"line":2438,"column":8},"end":{"line":2438,"column":36}},"584":{"start":{"line":2439,"column":8},"end":{"line":2441,"column":9}},"585":{"start":{"line":2440,"column":12},"end":{"line":2440,"column":129}},"586":{"start":{"line":2454,"column":8},"end":{"line":2454,"column":36}},"587":{"start":{"line":2455,"column":8},"end":{"line":2457,"column":9}},"588":{"start":{"line":2456,"column":12},"end":{"line":2456,"column":132}},"589":{"start":{"line":2470,"column":8},"end":{"line":2470,"column":36}},"590":{"start":{"line":2471,"column":8},"end":{"line":2473,"column":9}},"591":{"start":{"line":2472,"column":12},"end":{"line":2472,"column":136}},"592":{"start":{"line":2489,"column":8},"end":{"line":2489,"column":36}},"593":{"start":{"line":2490,"column":8},"end":{"line":2492,"column":9}},"594":{"start":{"line":2491,"column":12},"end":{"line":2491,"column":129}},"595":{"start":{"line":2504,"column":8},"end":{"line":2504,"column":36}},"596":{"start":{"line":2505,"column":8},"end":{"line":2507,"column":9}},"597":{"start":{"line":2506,"column":12},"end":{"line":2506,"column":127}},"598":{"start":{"line":2523,"column":8},"end":{"line":2523,"column":36}},"599":{"start":{"line":2524,"column":8},"end":{"line":2526,"column":9}},"600":{"start":{"line":2525,"column":12},"end":{"line":2525,"column":125}},"601":{"start":{"line":2537,"column":8},"end":{"line":2537,"column":36}},"602":{"start":{"line":2538,"column":8},"end":{"line":2540,"column":9}},"603":{"start":{"line":2539,"column":12},"end":{"line":2539,"column":120}},"604":{"start":{"line":2552,"column":8},"end":{"line":2552,"column":36}},"605":{"start":{"line":2553,"column":8},"end":{"line":2555,"column":9}},"606":{"start":{"line":2554,"column":12},"end":{"line":2554,"column":122}},"607":{"start":{"line":2567,"column":8},"end":{"line":2567,"column":36}},"608":{"start":{"line":2568,"column":8},"end":{"line":2570,"column":9}},"609":{"start":{"line":2569,"column":12},"end":{"line":2569,"column":131}},"610":{"start":{"line":2582,"column":8},"end":{"line":2582,"column":36}},"611":{"start":{"line":2583,"column":8},"end":{"line":2585,"column":9}},"612":{"start":{"line":2584,"column":12},"end":{"line":2584,"column":127}},"613":{"start":{"line":2597,"column":8},"end":{"line":2597,"column":36}},"614":{"start":{"line":2598,"column":8},"end":{"line":2600,"column":9}},"615":{"start":{"line":2599,"column":12},"end":{"line":2599,"column":137}},"616":{"start":{"line":2615,"column":8},"end":{"line":2615,"column":36}},"617":{"start":{"line":2616,"column":8},"end":{"line":2616,"column":31}},"618":{"start":{"line":2617,"column":8},"end":{"line":2621,"column":9}},"619":{"start":{"line":2618,"column":12},"end":{"line":2618,"column":48}},"620":{"start":{"line":2620,"column":12},"end":{"line":2620,"column":84}},"621":{"start":{"line":2622,"column":8},"end":{"line":2624,"column":9}},"622":{"start":{"line":2623,"column":12},"end":{"line":2623,"column":123}},"623":{"start":{"line":2635,"column":8},"end":{"line":2635,"column":36}},"624":{"start":{"line":2636,"column":8},"end":{"line":2638,"column":9}},"625":{"start":{"line":2637,"column":12},"end":{"line":2637,"column":124}},"626":{"start":{"line":2649,"column":8},"end":{"line":2649,"column":36}},"627":{"start":{"line":2650,"column":8},"end":{"line":2652,"column":9}},"628":{"start":{"line":2651,"column":12},"end":{"line":2651,"column":125}},"629":{"start":{"line":2666,"column":8},"end":{"line":2666,"column":36}},"630":{"start":{"line":2667,"column":8},"end":{"line":2669,"column":9}},"631":{"start":{"line":2668,"column":12},"end":{"line":2668,"column":151}},"632":{"start":{"line":2680,"column":8},"end":{"line":2680,"column":36}},"633":{"start":{"line":2681,"column":8},"end":{"line":2683,"column":9}},"634":{"start":{"line":2682,"column":12},"end":{"line":2682,"column":123}},"635":{"start":{"line":2694,"column":8},"end":{"line":2694,"column":36}},"636":{"start":{"line":2695,"column":8},"end":{"line":2697,"column":9}},"637":{"start":{"line":2696,"column":12},"end":{"line":2696,"column":124}},"638":{"start":{"line":2708,"column":8},"end":{"line":2708,"column":36}},"639":{"start":{"line":2709,"column":8},"end":{"line":2711,"column":9}},"640":{"start":{"line":2710,"column":12},"end":{"line":2710,"column":123}},"641":{"start":{"line":2723,"column":8},"end":{"line":2723,"column":36}},"642":{"start":{"line":2724,"column":8},"end":{"line":2726,"column":9}},"643":{"start":{"line":2725,"column":12},"end":{"line":2725,"column":171}},"644":{"start":{"line":2748,"column":8},"end":{"line":2748,"column":36}},"645":{"start":{"line":2749,"column":8},"end":{"line":2749,"column":26}},"646":{"start":{"line":2751,"column":8},"end":{"line":2786,"column":9}},"647":{"start":{"line":2752,"column":12},"end":{"line":2752,"column":21}},"648":{"start":{"line":2756,"column":12},"end":{"line":2779,"column":13}},"649":{"start":{"line":2759,"column":16},"end":{"line":2761,"column":17}},"650":{"start":{"line":2760,"column":20},"end":{"line":2760,"column":33}},"651":{"start":{"line":2762,"column":19},"end":{"line":2779,"column":13}},"652":{"start":{"line":2765,"column":16},"end":{"line":2767,"column":17}},"653":{"start":{"line":2766,"column":20},"end":{"line":2766,"column":33}},"654":{"start":{"line":2769,"column":19},"end":{"line":2779,"column":13}},"655":{"start":{"line":2772,"column":16},"end":{"line":2775,"column":17}},"656":{"start":{"line":2774,"column":20},"end":{"line":2774,"column":33}},"657":{"start":{"line":2778,"column":16},"end":{"line":2778,"column":29}},"658":{"start":{"line":2781,"column":12},"end":{"line":2785,"column":13}},"659":{"start":{"line":2782,"column":16},"end":{"line":2782,"column":58}},"660":{"start":{"line":2784,"column":16},"end":{"line":2784,"column":23}},"661":{"start":{"line":2789,"column":8},"end":{"line":2789,"column":115}},"662":{"start":{"line":2804,"column":0},"end":{"line":2819,"column":2}},"663":{"start":{"line":2811,"column":4},"end":{"line":2811,"column":27}},"664":{"start":{"line":2818,"column":4},"end":{"line":2818,"column":31}},"665":{"start":{"line":2821,"column":0},"end":{"line":2845,"column":2}},"666":{"start":{"line":2833,"column":8},"end":{"line":2833,"column":28}},"667":{"start":{"line":2842,"column":8},"end":{"line":2842,"column":52}},"668":{"start":{"line":2860,"column":0},"end":{"line":2886,"column":2}},"669":{"start":{"line":2863,"column":4},"end":{"line":2863,"column":47}},"670":{"start":{"line":2870,"column":4},"end":{"line":2870,"column":29}},"671":{"start":{"line":2877,"column":4},"end":{"line":2877,"column":25}},"672":{"start":{"line":2884,"column":4},"end":{"line":2884,"column":36}},"673":{"start":{"line":2889,"column":0},"end":{"line":2889,"column":65}},"674":{"start":{"line":2892,"column":0},"end":{"line":2892,"column":76}},"675":{"start":{"line":2900,"column":0},"end":{"line":2903,"column":2}},"676":{"start":{"line":2901,"column":4},"end":{"line":2902,"column":75}},"677":{"start":{"line":2911,"column":0},"end":{"line":2947,"column":2}},"678":{"start":{"line":2922,"column":8},"end":{"line":2922,"column":53}},"679":{"start":{"line":2937,"column":8},"end":{"line":2937,"column":24}},"680":{"start":{"line":2938,"column":8},"end":{"line":2942,"column":9}},"681":{"start":{"line":2939,"column":12},"end":{"line":2941,"column":13}},"682":{"start":{"line":2940,"column":16},"end":{"line":2940,"column":52}},"683":{"start":{"line":2944,"column":8},"end":{"line":2944,"column":53}},"684":{"start":{"line":2959,"column":0},"end":{"line":3033,"column":2}},"685":{"start":{"line":2970,"column":8},"end":{"line":2970,"column":36}},"686":{"start":{"line":2971,"column":8},"end":{"line":2994,"column":9}},"687":{"start":{"line":2972,"column":12},"end":{"line":2972,"column":25}},"688":{"start":{"line":2975,"column":12},"end":{"line":2977,"column":13}},"689":{"start":{"line":2976,"column":16},"end":{"line":2976,"column":47}},"690":{"start":{"line":2980,"column":12},"end":{"line":2982,"column":13}},"691":{"start":{"line":2981,"column":16},"end":{"line":2981,"column":48}},"692":{"start":{"line":2985,"column":12},"end":{"line":2987,"column":13}},"693":{"start":{"line":2986,"column":16},"end":{"line":2986,"column":55}},"694":{"start":{"line":2989,"column":12},"end":{"line":2991,"column":13}},"695":{"start":{"line":2990,"column":16},"end":{"line":2990,"column":115}},"696":{"start":{"line":2993,"column":12},"end":{"line":2993,"column":120}},"697":{"start":{"line":3006,"column":8},"end":{"line":3006,"column":36}},"698":{"start":{"line":3007,"column":8},"end":{"line":3030,"column":9}},"699":{"start":{"line":3008,"column":12},"end":{"line":3008,"column":25}},"700":{"start":{"line":3011,"column":12},"end":{"line":3013,"column":13}},"701":{"start":{"line":3012,"column":16},"end":{"line":3012,"column":47}},"702":{"start":{"line":3016,"column":12},"end":{"line":3018,"column":13}},"703":{"start":{"line":3017,"column":16},"end":{"line":3017,"column":49}},"704":{"start":{"line":3021,"column":12},"end":{"line":3023,"column":13}},"705":{"start":{"line":3022,"column":16},"end":{"line":3022,"column":49}},"706":{"start":{"line":3025,"column":12},"end":{"line":3027,"column":13}},"707":{"start":{"line":3026,"column":16},"end":{"line":3026,"column":115}},"708":{"start":{"line":3029,"column":12},"end":{"line":3029,"column":120}},"709":{"start":{"line":3043,"column":0},"end":{"line":3076,"column":2}},"710":{"start":{"line":3046,"column":4},"end":{"line":3046,"column":30}},"711":{"start":{"line":3048,"column":4},"end":{"line":3049,"column":13}},"712":{"start":{"line":3053,"column":4},"end":{"line":3059,"column":5}},"713":{"start":{"line":3054,"column":8},"end":{"line":3054,"column":22}},"714":{"start":{"line":3055,"column":8},"end":{"line":3055,"column":31}},"715":{"start":{"line":3056,"column":8},"end":{"line":3056,"column":23}},"716":{"start":{"line":3058,"column":8},"end":{"line":3058,"column":18}},"717":{"start":{"line":3062,"column":4},"end":{"line":3072,"column":5}},"718":{"start":{"line":3063,"column":8},"end":{"line":3071,"column":9}},"719":{"start":{"line":3064,"column":12},"end":{"line":3070,"column":13}},"720":{"start":{"line":3065,"column":16},"end":{"line":3069,"column":24}},"721":{"start":{"line":3066,"column":20},"end":{"line":3068,"column":22}},"722":{"start":{"line":3067,"column":24},"end":{"line":3067,"column":108}},"723":{"start":{"line":3075,"column":4},"end":{"line":3075,"column":16}},"724":{"start":{"line":3097,"column":0},"end":{"line":3167,"column":2}},"725":{"start":{"line":3100,"column":4},"end":{"line":3102,"column":5}},"726":{"start":{"line":3101,"column":8},"end":{"line":3101,"column":33}},"727":{"start":{"line":3105,"column":4},"end":{"line":3166,"column":5}},"728":{"start":{"line":3106,"column":8},"end":{"line":3113,"column":14}},"729":{"start":{"line":3116,"column":8},"end":{"line":3116,"column":48}},"730":{"start":{"line":3117,"column":8},"end":{"line":3117,"column":42}},"731":{"start":{"line":3118,"column":8},"end":{"line":3118,"column":40}},"732":{"start":{"line":3121,"column":8},"end":{"line":3125,"column":9}},"733":{"start":{"line":3122,"column":13},"end":{"line":3124,"column":13}},"734":{"start":{"line":3123,"column":16},"end":{"line":3123,"column":134}},"735":{"start":{"line":3128,"column":8},"end":{"line":3162,"column":9}},"736":{"start":{"line":3129,"column":12},"end":{"line":3150,"column":14}},"737":{"start":{"line":3130,"column":16},"end":{"line":3145,"column":17}},"738":{"start":{"line":3131,"column":20},"end":{"line":3131,"column":50}},"739":{"start":{"line":3132,"column":20},"end":{"line":3132,"column":138}},"740":{"start":{"line":3133,"column":20},"end":{"line":3135,"column":21}},"741":{"start":{"line":3134,"column":24},"end":{"line":3134,"column":53}},"742":{"start":{"line":3137,"column":20},"end":{"line":3137,"column":59}},"743":{"start":{"line":3139,"column":20},"end":{"line":3141,"column":21}},"744":{"start":{"line":3140,"column":24},"end":{"line":3140,"column":36}},"745":{"start":{"line":3144,"column":20},"end":{"line":3144,"column":56}},"746":{"start":{"line":3149,"column":16},"end":{"line":3149,"column":82}},"747":{"start":{"line":3154,"column":12},"end":{"line":3161,"column":14}},"748":{"start":{"line":3155,"column":16},"end":{"line":3160,"column":17}},"749":{"start":{"line":3156,"column":20},"end":{"line":3156,"column":94}},"750":{"start":{"line":3159,"column":20},"end":{"line":3159,"column":56}},"751":{"start":{"line":3163,"column":11},"end":{"line":3166,"column":5}},"752":{"start":{"line":3165,"column":8},"end":{"line":3165,"column":64}},"753":{"start":{"line":3176,"column":0},"end":{"line":3194,"column":2}},"754":{"start":{"line":3177,"column":4},"end":{"line":3193,"column":5}},"755":{"start":{"line":3179,"column":8},"end":{"line":3188,"column":9}},"756":{"start":{"line":3180,"column":12},"end":{"line":3187,"column":13}},"757":{"start":{"line":3181,"column":16},"end":{"line":3181,"column":60}},"758":{"start":{"line":3182,"column":16},"end":{"line":3186,"column":17}},"759":{"start":{"line":3183,"column":20},"end":{"line":3183,"column":179}},"760":{"start":{"line":3184,"column":23},"end":{"line":3186,"column":17}},"761":{"start":{"line":3185,"column":20},"end":{"line":3185,"column":165}},"762":{"start":{"line":3192,"column":8},"end":{"line":3192,"column":44}},"763":{"start":{"line":3206,"column":0},"end":{"line":3217,"column":2}},"764":{"start":{"line":3207,"column":4},"end":{"line":3216,"column":5}},"765":{"start":{"line":3208,"column":8},"end":{"line":3213,"column":10}},"766":{"start":{"line":3209,"column":12},"end":{"line":3209,"column":53}},"767":{"start":{"line":3210,"column":12},"end":{"line":3210,"column":29}},"768":{"start":{"line":3211,"column":12},"end":{"line":3211,"column":31}},"769":{"start":{"line":3212,"column":12},"end":{"line":3212,"column":37}},"770":{"start":{"line":3215,"column":8},"end":{"line":3215,"column":69}},"771":{"start":{"line":3225,"column":0},"end":{"line":3225,"column":65}},"772":{"start":{"line":3233,"column":0},"end":{"line":3233,"column":77}},"773":{"start":{"line":3241,"column":0},"end":{"line":3241,"column":76}},"774":{"start":{"line":3249,"column":0},"end":{"line":3249,"column":76}},"775":{"start":{"line":3257,"column":0},"end":{"line":3257,"column":76}},"776":{"start":{"line":3265,"column":0},"end":{"line":3265,"column":78}},"777":{"start":{"line":3275,"column":0},"end":{"line":3446,"column":2}},"778":{"start":{"line":3288,"column":8},"end":{"line":3288,"column":36}},"779":{"start":{"line":3290,"column":8},"end":{"line":3291,"column":53}},"780":{"start":{"line":3294,"column":8},"end":{"line":3296,"column":9}},"781":{"start":{"line":3295,"column":12},"end":{"line":3295,"column":156}},"782":{"start":{"line":3299,"column":8},"end":{"line":3305,"column":9}},"783":{"start":{"line":3300,"column":12},"end":{"line":3304,"column":13}},"784":{"start":{"line":3301,"column":16},"end":{"line":3303,"column":17}},"785":{"start":{"line":3302,"column":20},"end":{"line":3302,"column":173}},"786":{"start":{"line":3318,"column":8},"end":{"line":3318,"column":78}},"787":{"start":{"line":3331,"column":8},"end":{"line":3331,"column":77}},"788":{"start":{"line":3343,"column":8},"end":{"line":3343,"column":36}},"789":{"start":{"line":3344,"column":8},"end":{"line":3346,"column":9}},"790":{"start":{"line":3345,"column":12},"end":{"line":3345,"column":137}},"791":{"start":{"line":3358,"column":8},"end":{"line":3358,"column":36}},"792":{"start":{"line":3359,"column":8},"end":{"line":3363,"column":9}},"793":{"start":{"line":3360,"column":12},"end":{"line":3362,"column":13}},"794":{"start":{"line":3361,"column":16},"end":{"line":3361,"column":142}},"795":{"start":{"line":3375,"column":8},"end":{"line":3375,"column":36}},"796":{"start":{"line":3376,"column":8},"end":{"line":3378,"column":9}},"797":{"start":{"line":3377,"column":12},"end":{"line":3377,"column":137}},"798":{"start":{"line":3390,"column":8},"end":{"line":3390,"column":36}},"799":{"start":{"line":3391,"column":8},"end":{"line":3395,"column":9}},"800":{"start":{"line":3392,"column":12},"end":{"line":3394,"column":13}},"801":{"start":{"line":3393,"column":16},"end":{"line":3393,"column":142}},"802":{"start":{"line":3406,"column":8},"end":{"line":3406,"column":36}},"803":{"start":{"line":3407,"column":8},"end":{"line":3407,"column":55}},"804":{"start":{"line":3409,"column":8},"end":{"line":3411,"column":9}},"805":{"start":{"line":3410,"column":12},"end":{"line":3410,"column":133}},"806":{"start":{"line":3424,"column":8},"end":{"line":3424,"column":36}},"807":{"start":{"line":3425,"column":8},"end":{"line":3427,"column":9}},"808":{"start":{"line":3426,"column":12},"end":{"line":3426,"column":128}},"809":{"start":{"line":3439,"column":8},"end":{"line":3439,"column":36}},"810":{"start":{"line":3440,"column":8},"end":{"line":3444,"column":9}},"811":{"start":{"line":3441,"column":12},"end":{"line":3443,"column":13}},"812":{"start":{"line":3442,"column":16},"end":{"line":3442,"column":133}},"813":{"start":{"line":3457,"column":0},"end":{"line":3507,"column":2}},"814":{"start":{"line":3464,"column":4},"end":{"line":3464,"column":21}},"815":{"start":{"line":3471,"column":4},"end":{"line":3471,"column":20}},"816":{"start":{"line":3478,"column":4},"end":{"line":3478,"column":20}},"817":{"start":{"line":3485,"column":4},"end":{"line":3485,"column":20}},"818":{"start":{"line":3492,"column":4},"end":{"line":3492,"column":21}},"819":{"start":{"line":3499,"column":4},"end":{"line":3499,"column":19}},"820":{"start":{"line":3506,"column":4},"end":{"line":3506,"column":22}},"821":{"start":{"line":3514,"column":0},"end":{"line":3520,"column":2}},"822":{"start":{"line":3515,"column":4},"end":{"line":3515,"column":34}},"823":{"start":{"line":3516,"column":4},"end":{"line":3516,"column":34}},"824":{"start":{"line":3517,"column":4},"end":{"line":3517,"column":36}},"825":{"start":{"line":3518,"column":4},"end":{"line":3518,"column":32}},"826":{"start":{"line":3519,"column":4},"end":{"line":3519,"column":34}},"827":{"start":{"line":3532,"column":0},"end":{"line":3544,"column":2}},"828":{"start":{"line":3535,"column":4},"end":{"line":3535,"column":102}},"829":{"start":{"line":3542,"column":4},"end":{"line":3542,"column":30}},"830":{"start":{"line":3547,"column":0},"end":{"line":3547,"column":61}},"831":{"start":{"line":3550,"column":0},"end":{"line":3550,"column":64}},"832":{"start":{"line":3562,"column":0},"end":{"line":3574,"column":2}},"833":{"start":{"line":3565,"column":4},"end":{"line":3565,"column":86}},"834":{"start":{"line":3572,"column":4},"end":{"line":3572,"column":29}},"835":{"start":{"line":3577,"column":0},"end":{"line":3577,"column":60}},"836":{"start":{"line":3580,"column":0},"end":{"line":3580,"column":62}},"837":{"start":{"line":3594,"column":0},"end":{"line":3620,"column":2}},"838":{"start":{"line":3597,"column":4},"end":{"line":3597,"column":76}},"839":{"start":{"line":3604,"column":4},"end":{"line":3604,"column":23}},"840":{"start":{"line":3611,"column":4},"end":{"line":3611,"column":34}},"841":{"start":{"line":3618,"column":4},"end":{"line":3618,"column":29}},"842":{"start":{"line":3623,"column":0},"end":{"line":3623,"column":65}},"843":{"start":{"line":3626,"column":0},"end":{"line":3626,"column":72}},"844":{"start":{"line":3641,"column":0},"end":{"line":3660,"column":2}},"845":{"start":{"line":3644,"column":4},"end":{"line":3644,"column":47}},"846":{"start":{"line":3651,"column":4},"end":{"line":3651,"column":33}},"847":{"start":{"line":3658,"column":4},"end":{"line":3658,"column":34}},"848":{"start":{"line":3663,"column":0},"end":{"line":3663,"column":65}},"849":{"start":{"line":3666,"column":0},"end":{"line":3666,"column":72}},"850":{"start":{"line":3674,"column":0},"end":{"line":3676,"column":2}},"851":{"start":{"line":3675,"column":4},"end":{"line":3675,"column":102}},"852":{"start":{"line":3689,"column":0},"end":{"line":3704,"column":2}},"853":{"start":{"line":3696,"column":4},"end":{"line":3696,"column":67}},"854":{"start":{"line":3703,"column":4},"end":{"line":3703,"column":56}},"855":{"start":{"line":3708,"column":0},"end":{"line":3708,"column":17}},"856":{"start":{"line":3709,"column":0},"end":{"line":3712,"column":3}},"857":{"start":{"line":3710,"column":4},"end":{"line":3710,"column":40}},"858":{"start":{"line":3711,"column":4},"end":{"line":3711,"column":24}},"859":{"start":{"line":3716,"column":0},"end":{"line":3716,"column":26}},"860":{"start":{"line":3717,"column":0},"end":{"line":3717,"column":39}},"861":{"start":{"line":3718,"column":0},"end":{"line":3718,"column":54}},"862":{"start":{"line":3719,"column":0},"end":{"line":3719,"column":50}},"863":{"start":{"line":3720,"column":0},"end":{"line":3720,"column":21}},"864":{"start":{"line":3721,"column":0},"end":{"line":3721,"column":37}},"865":{"start":{"line":3722,"column":0},"end":{"line":3722,"column":35}},"866":{"start":{"line":3723,"column":0},"end":{"line":3723,"column":33}},"867":{"start":{"line":3724,"column":0},"end":{"line":3724,"column":41}},"868":{"start":{"line":3726,"column":0},"end":{"line":3726,"column":53}},"869":{"start":{"line":3728,"column":0},"end":{"line":3730,"column":2}},"870":{"start":{"line":3729,"column":4},"end":{"line":3729,"column":81}},"871":{"start":{"line":3742,"column":0},"end":{"line":3747,"column":2}},"872":{"start":{"line":3743,"column":4},"end":{"line":3743,"column":26}},"873":{"start":{"line":3744,"column":4},"end":{"line":3746,"column":5}},"874":{"start":{"line":3745,"column":8},"end":{"line":3745,"column":88}},"875":{"start":{"line":3756,"column":0},"end":{"line":3756,"column":23}},"876":{"start":{"line":3758,"column":0},"end":{"line":3758,"column":45}},"877":{"start":{"line":3760,"column":0},"end":{"line":3762,"column":2}},"878":{"start":{"line":3761,"column":4},"end":{"line":3761,"column":31}},"879":{"start":{"line":3764,"column":0},"end":{"line":3766,"column":2}},"880":{"start":{"line":3765,"column":4},"end":{"line":3765,"column":30}},"881":{"start":{"line":3768,"column":0},"end":{"line":3768,"column":34}},"882":{"start":{"line":3769,"column":0},"end":{"line":3769,"column":26}},"883":{"start":{"line":3771,"column":0},"end":{"line":3771,"column":40}},"884":{"start":{"line":3774,"column":0},"end":{"line":3866,"column":1}},"885":{"start":{"line":3776,"column":4},"end":{"line":3778,"column":5}},"886":{"start":{"line":3777,"column":8},"end":{"line":3777,"column":39}},"887":{"start":{"line":3780,"column":4},"end":{"line":3780,"column":25}},"888":{"start":{"line":3784,"column":4},"end":{"line":3855,"column":6}},"889":{"start":{"line":3787,"column":8},"end":{"line":3787,"column":25}},"890":{"start":{"line":3788,"column":8},"end":{"line":3788,"column":29}},"891":{"start":{"line":3790,"column":8},"end":{"line":3850,"column":9}},"892":{"start":{"line":3792,"column":16},"end":{"line":3792,"column":78}},"893":{"start":{"line":3793,"column":16},"end":{"line":3793,"column":37}},"894":{"start":{"line":3794,"column":16},"end":{"line":3794,"column":22}},"895":{"start":{"line":3797,"column":16},"end":{"line":3801,"column":35}},"896":{"start":{"line":3802,"column":16},"end":{"line":3802,"column":37}},"897":{"start":{"line":3803,"column":16},"end":{"line":3803,"column":22}},"898":{"start":{"line":3806,"column":16},"end":{"line":3806,"column":84}},"899":{"start":{"line":3807,"column":16},"end":{"line":3807,"column":37}},"900":{"start":{"line":3808,"column":16},"end":{"line":3808,"column":22}},"901":{"start":{"line":3811,"column":16},"end":{"line":3811,"column":56}},"902":{"start":{"line":3812,"column":16},"end":{"line":3812,"column":39}},"903":{"start":{"line":3813,"column":16},"end":{"line":3813,"column":22}},"904":{"start":{"line":3816,"column":16},"end":{"line":3816,"column":55}},"905":{"start":{"line":3817,"column":16},"end":{"line":3817,"column":37}},"906":{"start":{"line":3818,"column":16},"end":{"line":3818,"column":22}},"907":{"start":{"line":3821,"column":16},"end":{"line":3821,"column":81}},"908":{"start":{"line":3822,"column":16},"end":{"line":3822,"column":37}},"909":{"start":{"line":3823,"column":16},"end":{"line":3823,"column":22}},"910":{"start":{"line":3826,"column":16},"end":{"line":3830,"column":35}},"911":{"start":{"line":3831,"column":16},"end":{"line":3831,"column":37}},"912":{"start":{"line":3832,"column":16},"end":{"line":3832,"column":22}},"913":{"start":{"line":3835,"column":16},"end":{"line":3835,"column":79}},"914":{"start":{"line":3836,"column":16},"end":{"line":3836,"column":37}},"915":{"start":{"line":3837,"column":16},"end":{"line":3837,"column":22}},"916":{"start":{"line":3840,"column":16},"end":{"line":3844,"column":35}},"917":{"start":{"line":3845,"column":16},"end":{"line":3845,"column":37}},"918":{"start":{"line":3846,"column":16},"end":{"line":3846,"column":22}},"919":{"start":{"line":3848,"column":16},"end":{"line":3848,"column":59}},"920":{"start":{"line":3849,"column":16},"end":{"line":3849,"column":37}},"921":{"start":{"line":3852,"column":8},"end":{"line":3854,"column":9}},"922":{"start":{"line":3853,"column":12},"end":{"line":3853,"column":54}},"923":{"start":{"line":3857,"column":4},"end":{"line":3857,"column":16}},"924":{"start":{"line":3859,"column":4},"end":{"line":3864,"column":5}},"925":{"start":{"line":3860,"column":8},"end":{"line":3860,"column":32}},"926":{"start":{"line":3861,"column":8},"end":{"line":3863,"column":9}},"927":{"start":{"line":3862,"column":12},"end":{"line":3862,"column":52}}},"branchMap":{"1":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":0},"end":{"line":16,"column":0}},{"start":{"line":16,"column":0},"end":{"line":16,"column":0}}]},"2":{"line":75,"type":"if","locations":[{"start":{"line":75,"column":8},"end":{"line":75,"column":8}},{"start":{"line":75,"column":8},"end":{"line":75,"column":8}}]},"3":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":8},"end":{"line":100,"column":8}},{"start":{"line":100,"column":8},"end":{"line":100,"column":8}}]},"4":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":8},"end":{"line":103,"column":8}},{"start":{"line":103,"column":8},"end":{"line":103,"column":8}}]},"5":{"line":107,"type":"if","locations":[{"start":{"line":107,"column":8},"end":{"line":107,"column":8}},{"start":{"line":107,"column":8},"end":{"line":107,"column":8}}]},"6":{"line":111,"type":"if","locations":[{"start":{"line":111,"column":8},"end":{"line":111,"column":8}},{"start":{"line":111,"column":8},"end":{"line":111,"column":8}}]},"7":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":8}},{"start":{"line":126,"column":8},"end":{"line":126,"column":8}}]},"8":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":16},"end":{"line":129,"column":16}},{"start":{"line":129,"column":16},"end":{"line":129,"column":16}}]},"9":{"line":178,"type":"if","locations":[{"start":{"line":178,"column":4},"end":{"line":178,"column":4}},{"start":{"line":178,"column":4},"end":{"line":178,"column":4}}]},"10":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":11},"end":{"line":180,"column":11}},{"start":{"line":180,"column":11},"end":{"line":180,"column":11}}]},"11":{"line":182,"type":"if","locations":[{"start":{"line":182,"column":12},"end":{"line":182,"column":12}},{"start":{"line":182,"column":12},"end":{"line":182,"column":12}}]},"12":{"line":189,"type":"if","locations":[{"start":{"line":189,"column":4},"end":{"line":189,"column":4}},{"start":{"line":189,"column":4},"end":{"line":189,"column":4}}]},"13":{"line":189,"type":"binary-expr","locations":[{"start":{"line":189,"column":8},"end":{"line":189,"column":24}},{"start":{"line":189,"column":28},"end":{"line":189,"column":38}}]},"14":{"line":206,"type":"if","locations":[{"start":{"line":206,"column":8},"end":{"line":206,"column":8}},{"start":{"line":206,"column":8},"end":{"line":206,"column":8}}]},"15":{"line":206,"type":"binary-expr","locations":[{"start":{"line":206,"column":12},"end":{"line":206,"column":51}},{"start":{"line":206,"column":55},"end":{"line":206,"column":93}}]},"16":{"line":258,"type":"if","locations":[{"start":{"line":258,"column":4},"end":{"line":258,"column":4}},{"start":{"line":258,"column":4},"end":{"line":258,"column":4}}]},"17":{"line":322,"type":"cond-expr","locations":[{"start":{"line":322,"column":48},"end":{"line":322,"column":55}},{"start":{"line":323,"column":16},"end":{"line":324,"column":45}}]},"18":{"line":323,"type":"cond-expr","locations":[{"start":{"line":323,"column":48},"end":{"line":323,"column":53}},{"start":{"line":324,"column":16},"end":{"line":324,"column":45}}]},"19":{"line":326,"type":"if","locations":[{"start":{"line":326,"column":8},"end":{"line":326,"column":8}},{"start":{"line":326,"column":8},"end":{"line":326,"column":8}}]},"20":{"line":361,"type":"cond-expr","locations":[{"start":{"line":361,"column":42},"end":{"line":361,"column":54}},{"start":{"line":361,"column":57},"end":{"line":361,"column":66}}]},"21":{"line":364,"type":"if","locations":[{"start":{"line":364,"column":12},"end":{"line":364,"column":12}},{"start":{"line":364,"column":12},"end":{"line":364,"column":12}}]},"22":{"line":394,"type":"if","locations":[{"start":{"line":394,"column":8},"end":{"line":394,"column":8}},{"start":{"line":394,"column":8},"end":{"line":394,"column":8}}]},"23":{"line":394,"type":"binary-expr","locations":[{"start":{"line":394,"column":13},"end":{"line":394,"column":44}},{"start":{"line":395,"column":13},"end":{"line":395,"column":42}}]},"24":{"line":399,"type":"if","locations":[{"start":{"line":399,"column":8},"end":{"line":399,"column":8}},{"start":{"line":399,"column":8},"end":{"line":399,"column":8}}]},"25":{"line":405,"type":"if","locations":[{"start":{"line":405,"column":8},"end":{"line":405,"column":8}},{"start":{"line":405,"column":8},"end":{"line":405,"column":8}}]},"26":{"line":412,"type":"if","locations":[{"start":{"line":412,"column":12},"end":{"line":412,"column":12}},{"start":{"line":412,"column":12},"end":{"line":412,"column":12}}]},"27":{"line":417,"type":"if","locations":[{"start":{"line":417,"column":16},"end":{"line":417,"column":16}},{"start":{"line":417,"column":16},"end":{"line":417,"column":16}}]},"28":{"line":439,"type":"if","locations":[{"start":{"line":439,"column":8},"end":{"line":439,"column":8}},{"start":{"line":439,"column":8},"end":{"line":439,"column":8}}]},"29":{"line":509,"type":"switch","locations":[{"start":{"line":510,"column":16},"end":{"line":510,"column":42}},{"start":{"line":511,"column":16},"end":{"line":511,"column":42}},{"start":{"line":512,"column":16},"end":{"line":512,"column":44}},{"start":{"line":513,"column":16},"end":{"line":513,"column":44}},{"start":{"line":514,"column":16},"end":{"line":514,"column":43}}]},"30":{"line":546,"type":"if","locations":[{"start":{"line":546,"column":16},"end":{"line":546,"column":16}},{"start":{"line":546,"column":16},"end":{"line":546,"column":16}}]},"31":{"line":550,"type":"if","locations":[{"start":{"line":550,"column":16},"end":{"line":550,"column":16}},{"start":{"line":550,"column":16},"end":{"line":550,"column":16}}]},"32":{"line":555,"type":"if","locations":[{"start":{"line":555,"column":24},"end":{"line":555,"column":24}},{"start":{"line":555,"column":24},"end":{"line":555,"column":24}}]},"33":{"line":556,"type":"if","locations":[{"start":{"line":556,"column":28},"end":{"line":556,"column":28}},{"start":{"line":556,"column":28},"end":{"line":556,"column":28}}]},"34":{"line":556,"type":"binary-expr","locations":[{"start":{"line":556,"column":32},"end":{"line":556,"column":45}},{"start":{"line":556,"column":49},"end":{"line":556,"column":81}},{"start":{"line":556,"column":85},"end":{"line":556,"column":118}}]},"35":{"line":585,"type":"switch","locations":[{"start":{"line":587,"column":20},"end":{"line":595,"column":30}},{"start":{"line":598,"column":20},"end":{"line":611,"column":30}},{"start":{"line":614,"column":20},"end":{"line":622,"column":30}},{"start":{"line":625,"column":20},"end":{"line":637,"column":47}}]},"36":{"line":588,"type":"if","locations":[{"start":{"line":588,"column":24},"end":{"line":588,"column":24}},{"start":{"line":588,"column":24},"end":{"line":588,"column":24}}]},"37":{"line":590,"type":"if","locations":[{"start":{"line":590,"column":28},"end":{"line":590,"column":28}},{"start":{"line":590,"column":28},"end":{"line":590,"column":28}}]},"38":{"line":603,"type":"if","locations":[{"start":{"line":603,"column":28},"end":{"line":603,"column":28}},{"start":{"line":603,"column":28},"end":{"line":603,"column":28}}]},"39":{"line":604,"type":"if","locations":[{"start":{"line":604,"column":32},"end":{"line":604,"column":32}},{"start":{"line":604,"column":32},"end":{"line":604,"column":32}}]},"40":{"line":604,"type":"binary-expr","locations":[{"start":{"line":604,"column":36},"end":{"line":604,"column":49}},{"start":{"line":604,"column":53},"end":{"line":604,"column":85}},{"start":{"line":604,"column":89},"end":{"line":604,"column":122}}]},"41":{"line":616,"type":"if","locations":[{"start":{"line":616,"column":28},"end":{"line":616,"column":28}},{"start":{"line":616,"column":28},"end":{"line":616,"column":28}}]},"42":{"line":617,"type":"if","locations":[{"start":{"line":617,"column":32},"end":{"line":617,"column":32}},{"start":{"line":617,"column":32},"end":{"line":617,"column":32}}]},"43":{"line":617,"type":"binary-expr","locations":[{"start":{"line":617,"column":36},"end":{"line":617,"column":49}},{"start":{"line":617,"column":53},"end":{"line":617,"column":85}},{"start":{"line":617,"column":89},"end":{"line":617,"column":122}}]},"44":{"line":630,"type":"if","locations":[{"start":{"line":630,"column":28},"end":{"line":630,"column":28}},{"start":{"line":630,"column":28},"end":{"line":630,"column":28}}]},"45":{"line":631,"type":"if","locations":[{"start":{"line":631,"column":32},"end":{"line":631,"column":32}},{"start":{"line":631,"column":32},"end":{"line":631,"column":32}}]},"46":{"line":631,"type":"binary-expr","locations":[{"start":{"line":631,"column":36},"end":{"line":631,"column":49}},{"start":{"line":631,"column":53},"end":{"line":631,"column":85}},{"start":{"line":631,"column":89},"end":{"line":631,"column":122}}]},"47":{"line":664,"type":"switch","locations":[{"start":{"line":666,"column":20},"end":{"line":679,"column":30}},{"start":{"line":681,"column":20},"end":{"line":696,"column":30}},{"start":{"line":698,"column":20},"end":{"line":711,"column":30}},{"start":{"line":713,"column":20},"end":{"line":721,"column":25}}]},"48":{"line":667,"type":"if","locations":[{"start":{"line":667,"column":24},"end":{"line":667,"column":24}},{"start":{"line":667,"column":24},"end":{"line":667,"column":24}}]},"49":{"line":671,"type":"if","locations":[{"start":{"line":671,"column":28},"end":{"line":671,"column":28}},{"start":{"line":671,"column":28},"end":{"line":671,"column":28}}]},"50":{"line":686,"type":"if","locations":[{"start":{"line":686,"column":28},"end":{"line":686,"column":28}},{"start":{"line":686,"column":28},"end":{"line":686,"column":28}}]},"51":{"line":687,"type":"if","locations":[{"start":{"line":687,"column":32},"end":{"line":687,"column":32}},{"start":{"line":687,"column":32},"end":{"line":687,"column":32}}]},"52":{"line":687,"type":"binary-expr","locations":[{"start":{"line":687,"column":36},"end":{"line":687,"column":49}},{"start":{"line":687,"column":53},"end":{"line":687,"column":85}},{"start":{"line":687,"column":89},"end":{"line":687,"column":122}}]},"53":{"line":703,"type":"if","locations":[{"start":{"line":703,"column":28},"end":{"line":703,"column":28}},{"start":{"line":703,"column":28},"end":{"line":703,"column":28}}]},"54":{"line":704,"type":"if","locations":[{"start":{"line":704,"column":32},"end":{"line":704,"column":32}},{"start":{"line":704,"column":32},"end":{"line":704,"column":32}}]},"55":{"line":704,"type":"binary-expr","locations":[{"start":{"line":704,"column":36},"end":{"line":704,"column":49}},{"start":{"line":704,"column":53},"end":{"line":704,"column":85}},{"start":{"line":704,"column":89},"end":{"line":704,"column":122}}]},"56":{"line":716,"type":"if","locations":[{"start":{"line":716,"column":28},"end":{"line":716,"column":28}},{"start":{"line":716,"column":28},"end":{"line":716,"column":28}}]},"57":{"line":717,"type":"if","locations":[{"start":{"line":717,"column":32},"end":{"line":717,"column":32}},{"start":{"line":717,"column":32},"end":{"line":717,"column":32}}]},"58":{"line":717,"type":"binary-expr","locations":[{"start":{"line":717,"column":36},"end":{"line":717,"column":49}},{"start":{"line":717,"column":53},"end":{"line":717,"column":85}},{"start":{"line":717,"column":89},"end":{"line":717,"column":122}}]},"59":{"line":760,"type":"binary-expr","locations":[{"start":{"line":760,"column":22},"end":{"line":760,"column":28}},{"start":{"line":760,"column":32},"end":{"line":760,"column":54}}]},"60":{"line":816,"type":"if","locations":[{"start":{"line":816,"column":12},"end":{"line":816,"column":12}},{"start":{"line":816,"column":12},"end":{"line":816,"column":12}}]},"61":{"line":820,"type":"if","locations":[{"start":{"line":820,"column":12},"end":{"line":820,"column":12}},{"start":{"line":820,"column":12},"end":{"line":820,"column":12}}]},"62":{"line":835,"type":"if","locations":[{"start":{"line":835,"column":12},"end":{"line":835,"column":12}},{"start":{"line":835,"column":12},"end":{"line":835,"column":12}}]},"63":{"line":876,"type":"if","locations":[{"start":{"line":876,"column":16},"end":{"line":876,"column":16}},{"start":{"line":876,"column":16},"end":{"line":876,"column":16}}]},"64":{"line":876,"type":"binary-expr","locations":[{"start":{"line":876,"column":20},"end":{"line":876,"column":53}},{"start":{"line":876,"column":58},"end":{"line":876,"column":84}}]},"65":{"line":890,"type":"if","locations":[{"start":{"line":890,"column":12},"end":{"line":890,"column":12}},{"start":{"line":890,"column":12},"end":{"line":890,"column":12}}]},"66":{"line":916,"type":"if","locations":[{"start":{"line":916,"column":12},"end":{"line":916,"column":12}},{"start":{"line":916,"column":12},"end":{"line":916,"column":12}}]},"67":{"line":919,"type":"if","locations":[{"start":{"line":919,"column":16},"end":{"line":919,"column":16}},{"start":{"line":919,"column":16},"end":{"line":919,"column":16}}]},"68":{"line":921,"type":"if","locations":[{"start":{"line":921,"column":24},"end":{"line":921,"column":24}},{"start":{"line":921,"column":24},"end":{"line":921,"column":24}}]},"69":{"line":984,"type":"if","locations":[{"start":{"line":984,"column":12},"end":{"line":984,"column":12}},{"start":{"line":984,"column":12},"end":{"line":984,"column":12}}]},"70":{"line":987,"type":"if","locations":[{"start":{"line":987,"column":19},"end":{"line":987,"column":19}},{"start":{"line":987,"column":19},"end":{"line":987,"column":19}}]},"71":{"line":1004,"type":"if","locations":[{"start":{"line":1004,"column":16},"end":{"line":1004,"column":16}},{"start":{"line":1004,"column":16},"end":{"line":1004,"column":16}}]},"72":{"line":1227,"type":"if","locations":[{"start":{"line":1227,"column":20},"end":{"line":1227,"column":20}},{"start":{"line":1227,"column":20},"end":{"line":1227,"column":20}}]},"73":{"line":1227,"type":"binary-expr","locations":[{"start":{"line":1227,"column":25},"end":{"line":1227,"column":51}},{"start":{"line":1227,"column":55},"end":{"line":1227,"column":77}},{"start":{"line":1227,"column":82},"end":{"line":1227,"column":117}}]},"74":{"line":1249,"type":"if","locations":[{"start":{"line":1249,"column":20},"end":{"line":1249,"column":20}},{"start":{"line":1249,"column":20},"end":{"line":1249,"column":20}}]},"75":{"line":1251,"type":"if","locations":[{"start":{"line":1251,"column":27},"end":{"line":1251,"column":27}},{"start":{"line":1251,"column":27},"end":{"line":1251,"column":27}}]},"76":{"line":1272,"type":"if","locations":[{"start":{"line":1272,"column":20},"end":{"line":1272,"column":20}},{"start":{"line":1272,"column":20},"end":{"line":1272,"column":20}}]},"77":{"line":1274,"type":"if","locations":[{"start":{"line":1274,"column":27},"end":{"line":1274,"column":27}},{"start":{"line":1274,"column":27},"end":{"line":1274,"column":27}}]},"78":{"line":1295,"type":"if","locations":[{"start":{"line":1295,"column":16},"end":{"line":1295,"column":16}},{"start":{"line":1295,"column":16},"end":{"line":1295,"column":16}}]},"79":{"line":1295,"type":"binary-expr","locations":[{"start":{"line":1295,"column":20},"end":{"line":1295,"column":24}},{"start":{"line":1295,"column":29},"end":{"line":1295,"column":63}}]},"80":{"line":1298,"type":"if","locations":[{"start":{"line":1298,"column":20},"end":{"line":1298,"column":20}},{"start":{"line":1298,"column":20},"end":{"line":1298,"column":20}}]},"81":{"line":1303,"type":"if","locations":[{"start":{"line":1303,"column":20},"end":{"line":1303,"column":20}},{"start":{"line":1303,"column":20},"end":{"line":1303,"column":20}}]},"82":{"line":1307,"type":"if","locations":[{"start":{"line":1307,"column":27},"end":{"line":1307,"column":27}},{"start":{"line":1307,"column":27},"end":{"line":1307,"column":27}}]},"83":{"line":1328,"type":"if","locations":[{"start":{"line":1328,"column":16},"end":{"line":1328,"column":16}},{"start":{"line":1328,"column":16},"end":{"line":1328,"column":16}}]},"84":{"line":1330,"type":"if","locations":[{"start":{"line":1330,"column":23},"end":{"line":1330,"column":23}},{"start":{"line":1330,"column":23},"end":{"line":1330,"column":23}}]},"85":{"line":1332,"type":"if","locations":[{"start":{"line":1332,"column":23},"end":{"line":1332,"column":23}},{"start":{"line":1332,"column":23},"end":{"line":1332,"column":23}}]},"86":{"line":1335,"type":"binary-expr","locations":[{"start":{"line":1335,"column":27},"end":{"line":1335,"column":36}},{"start":{"line":1335,"column":40},"end":{"line":1335,"column":55}},{"start":{"line":1335,"column":59},"end":{"line":1335,"column":83}}]},"87":{"line":1342,"type":"if","locations":[{"start":{"line":1342,"column":20},"end":{"line":1342,"column":20}},{"start":{"line":1342,"column":20},"end":{"line":1342,"column":20}}]},"88":{"line":1350,"type":"if","locations":[{"start":{"line":1350,"column":27},"end":{"line":1350,"column":27}},{"start":{"line":1350,"column":27},"end":{"line":1350,"column":27}}]},"89":{"line":1373,"type":"if","locations":[{"start":{"line":1373,"column":20},"end":{"line":1373,"column":20}},{"start":{"line":1373,"column":20},"end":{"line":1373,"column":20}}]},"90":{"line":1373,"type":"binary-expr","locations":[{"start":{"line":1373,"column":24},"end":{"line":1373,"column":34}},{"start":{"line":1373,"column":38},"end":{"line":1373,"column":71}}]},"91":{"line":1383,"type":"if","locations":[{"start":{"line":1383,"column":20},"end":{"line":1383,"column":20}},{"start":{"line":1383,"column":20},"end":{"line":1383,"column":20}}]},"92":{"line":1411,"type":"if","locations":[{"start":{"line":1411,"column":16},"end":{"line":1411,"column":16}},{"start":{"line":1411,"column":16},"end":{"line":1411,"column":16}}]},"93":{"line":1422,"type":"if","locations":[{"start":{"line":1422,"column":20},"end":{"line":1422,"column":20}},{"start":{"line":1422,"column":20},"end":{"line":1422,"column":20}}]},"94":{"line":1422,"type":"binary-expr","locations":[{"start":{"line":1422,"column":24},"end":{"line":1422,"column":53}},{"start":{"line":1422,"column":57},"end":{"line":1422,"column":76}}]},"95":{"line":1423,"type":"if","locations":[{"start":{"line":1423,"column":24},"end":{"line":1423,"column":24}},{"start":{"line":1423,"column":24},"end":{"line":1423,"column":24}}]},"96":{"line":1427,"type":"if","locations":[{"start":{"line":1427,"column":31},"end":{"line":1427,"column":31}},{"start":{"line":1427,"column":31},"end":{"line":1427,"column":31}}]},"97":{"line":1443,"type":"if","locations":[{"start":{"line":1443,"column":28},"end":{"line":1443,"column":28}},{"start":{"line":1443,"column":28},"end":{"line":1443,"column":28}}]},"98":{"line":1449,"type":"if","locations":[{"start":{"line":1449,"column":24},"end":{"line":1449,"column":24}},{"start":{"line":1449,"column":24},"end":{"line":1449,"column":24}}]},"99":{"line":1472,"type":"if","locations":[{"start":{"line":1472,"column":16},"end":{"line":1472,"column":16}},{"start":{"line":1472,"column":16},"end":{"line":1472,"column":16}}]},"100":{"line":1483,"type":"if","locations":[{"start":{"line":1483,"column":16},"end":{"line":1483,"column":16}},{"start":{"line":1483,"column":16},"end":{"line":1483,"column":16}}]},"101":{"line":1489,"type":"binary-expr","locations":[{"start":{"line":1489,"column":33},"end":{"line":1489,"column":64}},{"start":{"line":1490,"column":36},"end":{"line":1490,"column":75}}]},"102":{"line":1490,"type":"binary-expr","locations":[{"start":{"line":1490,"column":37},"end":{"line":1490,"column":58}},{"start":{"line":1490,"column":62},"end":{"line":1490,"column":64}}]},"103":{"line":1491,"type":"binary-expr","locations":[{"start":{"line":1491,"column":35},"end":{"line":1491,"column":57}},{"start":{"line":1491,"column":61},"end":{"line":1491,"column":63}}]},"104":{"line":1504,"type":"if","locations":[{"start":{"line":1504,"column":20},"end":{"line":1504,"column":20}},{"start":{"line":1504,"column":20},"end":{"line":1504,"column":20}}]},"105":{"line":1504,"type":"binary-expr","locations":[{"start":{"line":1504,"column":23},"end":{"line":1504,"column":54}},{"start":{"line":1504,"column":58},"end":{"line":1504,"column":76}}]},"106":{"line":1508,"type":"if","locations":[{"start":{"line":1508,"column":26},"end":{"line":1508,"column":26}},{"start":{"line":1508,"column":26},"end":{"line":1508,"column":26}}]},"107":{"line":1511,"type":"if","locations":[{"start":{"line":1511,"column":27},"end":{"line":1511,"column":27}},{"start":{"line":1511,"column":27},"end":{"line":1511,"column":27}}]},"108":{"line":1519,"type":"if","locations":[{"start":{"line":1519,"column":20},"end":{"line":1519,"column":20}},{"start":{"line":1519,"column":20},"end":{"line":1519,"column":20}}]},"109":{"line":1525,"type":"if","locations":[{"start":{"line":1525,"column":20},"end":{"line":1525,"column":20}},{"start":{"line":1525,"column":20},"end":{"line":1525,"column":20}}]},"110":{"line":1526,"type":"if","locations":[{"start":{"line":1526,"column":24},"end":{"line":1526,"column":24}},{"start":{"line":1526,"column":24},"end":{"line":1526,"column":24}}]},"111":{"line":1530,"type":"if","locations":[{"start":{"line":1530,"column":27},"end":{"line":1530,"column":27}},{"start":{"line":1530,"column":27},"end":{"line":1530,"column":27}}]},"112":{"line":1532,"type":"if","locations":[{"start":{"line":1532,"column":24},"end":{"line":1532,"column":24}},{"start":{"line":1532,"column":24},"end":{"line":1532,"column":24}}]},"113":{"line":1533,"type":"if","locations":[{"start":{"line":1533,"column":28},"end":{"line":1533,"column":28}},{"start":{"line":1533,"column":28},"end":{"line":1533,"column":28}}]},"114":{"line":1536,"type":"if","locations":[{"start":{"line":1536,"column":32},"end":{"line":1536,"column":32}},{"start":{"line":1536,"column":32},"end":{"line":1536,"column":32}}]},"115":{"line":1551,"type":"if","locations":[{"start":{"line":1551,"column":24},"end":{"line":1551,"column":24}},{"start":{"line":1551,"column":24},"end":{"line":1551,"column":24}}]},"116":{"line":1556,"type":"if","locations":[{"start":{"line":1556,"column":28},"end":{"line":1556,"column":28}},{"start":{"line":1556,"column":28},"end":{"line":1556,"column":28}}]},"117":{"line":1559,"type":"if","locations":[{"start":{"line":1559,"column":32},"end":{"line":1559,"column":32}},{"start":{"line":1559,"column":32},"end":{"line":1559,"column":32}}]},"118":{"line":1563,"type":"if","locations":[{"start":{"line":1563,"column":35},"end":{"line":1563,"column":35}},{"start":{"line":1563,"column":35},"end":{"line":1563,"column":35}}]},"119":{"line":1566,"type":"if","locations":[{"start":{"line":1566,"column":32},"end":{"line":1566,"column":32}},{"start":{"line":1566,"column":32},"end":{"line":1566,"column":32}}]},"120":{"line":1571,"type":"if","locations":[{"start":{"line":1571,"column":35},"end":{"line":1571,"column":35}},{"start":{"line":1571,"column":35},"end":{"line":1571,"column":35}}]},"121":{"line":1571,"type":"binary-expr","locations":[{"start":{"line":1571,"column":39},"end":{"line":1571,"column":69}},{"start":{"line":1571,"column":73},"end":{"line":1571,"column":93}}]},"122":{"line":1574,"type":"if","locations":[{"start":{"line":1574,"column":32},"end":{"line":1574,"column":32}},{"start":{"line":1574,"column":32},"end":{"line":1574,"column":32}}]},"123":{"line":1574,"type":"binary-expr","locations":[{"start":{"line":1574,"column":36},"end":{"line":1574,"column":80}},{"start":{"line":1575,"column":40},"end":{"line":1575,"column":77}}]},"124":{"line":1588,"type":"if","locations":[{"start":{"line":1588,"column":16},"end":{"line":1588,"column":16}},{"start":{"line":1588,"column":16},"end":{"line":1588,"column":16}}]},"125":{"line":1605,"type":"cond-expr","locations":[{"start":{"line":1605,"column":37},"end":{"line":1605,"column":43}},{"start":{"line":1605,"column":46},"end":{"line":1605,"column":52}}]},"126":{"line":1606,"type":"cond-expr","locations":[{"start":{"line":1606,"column":37},"end":{"line":1606,"column":55}},{"start":{"line":1606,"column":58},"end":{"line":1606,"column":71}}]},"127":{"line":1612,"type":"if","locations":[{"start":{"line":1612,"column":16},"end":{"line":1612,"column":16}},{"start":{"line":1612,"column":16},"end":{"line":1612,"column":16}}]},"128":{"line":1620,"type":"if","locations":[{"start":{"line":1620,"column":16},"end":{"line":1620,"column":16}},{"start":{"line":1620,"column":16},"end":{"line":1620,"column":16}}]},"129":{"line":1644,"type":"if","locations":[{"start":{"line":1644,"column":16},"end":{"line":1644,"column":16}},{"start":{"line":1644,"column":16},"end":{"line":1644,"column":16}}]},"130":{"line":1669,"type":"binary-expr","locations":[{"start":{"line":1669,"column":35},"end":{"line":1669,"column":68}},{"start":{"line":1670,"column":36},"end":{"line":1670,"column":76}},{"start":{"line":1671,"column":36},"end":{"line":1671,"column":77}}]},"131":{"line":1671,"type":"binary-expr","locations":[{"start":{"line":1671,"column":37},"end":{"line":1671,"column":60}},{"start":{"line":1671,"column":64},"end":{"line":1671,"column":66}}]},"132":{"line":1674,"type":"if","locations":[{"start":{"line":1674,"column":16},"end":{"line":1674,"column":16}},{"start":{"line":1674,"column":16},"end":{"line":1674,"column":16}}]},"133":{"line":1681,"type":"cond-expr","locations":[{"start":{"line":1681,"column":66},"end":{"line":1681,"column":87}},{"start":{"line":1681,"column":90},"end":{"line":1681,"column":98}}]},"134":{"line":1690,"type":"if","locations":[{"start":{"line":1690,"column":20},"end":{"line":1690,"column":20}},{"start":{"line":1690,"column":20},"end":{"line":1690,"column":20}}]},"135":{"line":1789,"type":"if","locations":[{"start":{"line":1789,"column":16},"end":{"line":1789,"column":16}},{"start":{"line":1789,"column":16},"end":{"line":1789,"column":16}}]},"136":{"line":1789,"type":"binary-expr","locations":[{"start":{"line":1789,"column":20},"end":{"line":1789,"column":34}},{"start":{"line":1789,"column":38},"end":{"line":1789,"column":55}}]},"137":{"line":1790,"type":"if","locations":[{"start":{"line":1790,"column":20},"end":{"line":1790,"column":20}},{"start":{"line":1790,"column":20},"end":{"line":1790,"column":20}}]},"138":{"line":1812,"type":"if","locations":[{"start":{"line":1812,"column":16},"end":{"line":1812,"column":16}},{"start":{"line":1812,"column":16},"end":{"line":1812,"column":16}}]},"139":{"line":1815,"type":"if","locations":[{"start":{"line":1815,"column":16},"end":{"line":1815,"column":16}},{"start":{"line":1815,"column":16},"end":{"line":1815,"column":16}}]},"140":{"line":1818,"type":"if","locations":[{"start":{"line":1818,"column":16},"end":{"line":1818,"column":16}},{"start":{"line":1818,"column":16},"end":{"line":1818,"column":16}}]},"141":{"line":1818,"type":"binary-expr","locations":[{"start":{"line":1818,"column":20},"end":{"line":1818,"column":34}},{"start":{"line":1818,"column":38},"end":{"line":1818,"column":66}}]},"142":{"line":1819,"type":"if","locations":[{"start":{"line":1819,"column":20},"end":{"line":1819,"column":20}},{"start":{"line":1819,"column":20},"end":{"line":1819,"column":20}}]},"143":{"line":1861,"type":"if","locations":[{"start":{"line":1861,"column":16},"end":{"line":1861,"column":16}},{"start":{"line":1861,"column":16},"end":{"line":1861,"column":16}}]},"144":{"line":1862,"type":"binary-expr","locations":[{"start":{"line":1862,"column":37},"end":{"line":1862,"column":44}},{"start":{"line":1862,"column":48},"end":{"line":1862,"column":60}}]},"145":{"line":1879,"type":"binary-expr","locations":[{"start":{"line":1879,"column":26},"end":{"line":1879,"column":33}},{"start":{"line":1879,"column":37},"end":{"line":1879,"column":39}}]},"146":{"line":1887,"type":"if","locations":[{"start":{"line":1887,"column":16},"end":{"line":1887,"column":16}},{"start":{"line":1887,"column":16},"end":{"line":1887,"column":16}}]},"147":{"line":1887,"type":"binary-expr","locations":[{"start":{"line":1887,"column":20},"end":{"line":1887,"column":28}},{"start":{"line":1887,"column":32},"end":{"line":1887,"column":66}},{"start":{"line":1887,"column":70},"end":{"line":1887,"column":124}}]},"148":{"line":1892,"type":"cond-expr","locations":[{"start":{"line":1892,"column":69},"end":{"line":1892,"column":105}},{"start":{"line":1892,"column":108},"end":{"line":1892,"column":110}}]},"149":{"line":1936,"type":"if","locations":[{"start":{"line":1936,"column":8},"end":{"line":1936,"column":8}},{"start":{"line":1936,"column":8},"end":{"line":1936,"column":8}}]},"150":{"line":1940,"type":"if","locations":[{"start":{"line":1940,"column":16},"end":{"line":1940,"column":16}},{"start":{"line":1940,"column":16},"end":{"line":1940,"column":16}}]},"151":{"line":1959,"type":"if","locations":[{"start":{"line":1959,"column":8},"end":{"line":1959,"column":8}},{"start":{"line":1959,"column":8},"end":{"line":1959,"column":8}}]},"152":{"line":1963,"type":"if","locations":[{"start":{"line":1963,"column":16},"end":{"line":1963,"column":16}},{"start":{"line":1963,"column":16},"end":{"line":1963,"column":16}}]},"153":{"line":1985,"type":"if","locations":[{"start":{"line":1985,"column":8},"end":{"line":1985,"column":8}},{"start":{"line":1985,"column":8},"end":{"line":1985,"column":8}}]},"154":{"line":2006,"type":"if","locations":[{"start":{"line":2006,"column":12},"end":{"line":2006,"column":12}},{"start":{"line":2006,"column":12},"end":{"line":2006,"column":12}}]},"155":{"line":2026,"type":"if","locations":[{"start":{"line":2026,"column":8},"end":{"line":2026,"column":8}},{"start":{"line":2026,"column":8},"end":{"line":2026,"column":8}}]},"156":{"line":2030,"type":"if","locations":[{"start":{"line":2030,"column":8},"end":{"line":2030,"column":8}},{"start":{"line":2030,"column":8},"end":{"line":2030,"column":8}}]},"157":{"line":2050,"type":"if","locations":[{"start":{"line":2050,"column":8},"end":{"line":2050,"column":8}},{"start":{"line":2050,"column":8},"end":{"line":2050,"column":8}}]},"158":{"line":2071,"type":"if","locations":[{"start":{"line":2071,"column":12},"end":{"line":2071,"column":12}},{"start":{"line":2071,"column":12},"end":{"line":2071,"column":12}}]},"159":{"line":2093,"type":"if","locations":[{"start":{"line":2093,"column":8},"end":{"line":2093,"column":8}},{"start":{"line":2093,"column":8},"end":{"line":2093,"column":8}}]},"160":{"line":2097,"type":"if","locations":[{"start":{"line":2097,"column":8},"end":{"line":2097,"column":8}},{"start":{"line":2097,"column":8},"end":{"line":2097,"column":8}}]},"161":{"line":2118,"type":"if","locations":[{"start":{"line":2118,"column":12},"end":{"line":2118,"column":12}},{"start":{"line":2118,"column":12},"end":{"line":2118,"column":12}}]},"162":{"line":2119,"type":"if","locations":[{"start":{"line":2119,"column":16},"end":{"line":2119,"column":16}},{"start":{"line":2119,"column":16},"end":{"line":2119,"column":16}}]},"163":{"line":2147,"type":"if","locations":[{"start":{"line":2147,"column":8},"end":{"line":2147,"column":8}},{"start":{"line":2147,"column":8},"end":{"line":2147,"column":8}}]},"164":{"line":2147,"type":"binary-expr","locations":[{"start":{"line":2147,"column":12},"end":{"line":2147,"column":39}},{"start":{"line":2147,"column":43},"end":{"line":2147,"column":68}}]},"165":{"line":2152,"type":"if","locations":[{"start":{"line":2152,"column":8},"end":{"line":2152,"column":8}},{"start":{"line":2152,"column":8},"end":{"line":2152,"column":8}}]},"166":{"line":2158,"type":"if","locations":[{"start":{"line":2158,"column":12},"end":{"line":2158,"column":12}},{"start":{"line":2158,"column":12},"end":{"line":2158,"column":12}}]},"167":{"line":2183,"type":"if","locations":[{"start":{"line":2183,"column":8},"end":{"line":2183,"column":8}},{"start":{"line":2183,"column":8},"end":{"line":2183,"column":8}}]},"168":{"line":2188,"type":"if","locations":[{"start":{"line":2188,"column":8},"end":{"line":2188,"column":8}},{"start":{"line":2188,"column":8},"end":{"line":2188,"column":8}}]},"169":{"line":2194,"type":"if","locations":[{"start":{"line":2194,"column":12},"end":{"line":2194,"column":12}},{"start":{"line":2194,"column":12},"end":{"line":2194,"column":12}}]},"170":{"line":2209,"type":"if","locations":[{"start":{"line":2209,"column":8},"end":{"line":2209,"column":8}},{"start":{"line":2209,"column":8},"end":{"line":2209,"column":8}}]},"171":{"line":2223,"type":"if","locations":[{"start":{"line":2223,"column":8},"end":{"line":2223,"column":8}},{"start":{"line":2223,"column":8},"end":{"line":2223,"column":8}}]},"172":{"line":2245,"type":"if","locations":[{"start":{"line":2245,"column":8},"end":{"line":2245,"column":8}},{"start":{"line":2245,"column":8},"end":{"line":2245,"column":8}}]},"173":{"line":2251,"type":"if","locations":[{"start":{"line":2251,"column":12},"end":{"line":2251,"column":12}},{"start":{"line":2251,"column":12},"end":{"line":2251,"column":12}}]},"174":{"line":2272,"type":"if","locations":[{"start":{"line":2272,"column":12},"end":{"line":2272,"column":12}},{"start":{"line":2272,"column":12},"end":{"line":2272,"column":12}}]},"175":{"line":2273,"type":"if","locations":[{"start":{"line":2273,"column":16},"end":{"line":2273,"column":16}},{"start":{"line":2273,"column":16},"end":{"line":2273,"column":16}}]},"176":{"line":2297,"type":"if","locations":[{"start":{"line":2297,"column":8},"end":{"line":2297,"column":8}},{"start":{"line":2297,"column":8},"end":{"line":2297,"column":8}}]},"177":{"line":2301,"type":"if","locations":[{"start":{"line":2301,"column":8},"end":{"line":2301,"column":8}},{"start":{"line":2301,"column":8},"end":{"line":2301,"column":8}}]},"178":{"line":2301,"type":"binary-expr","locations":[{"start":{"line":2301,"column":12},"end":{"line":2301,"column":38}},{"start":{"line":2301,"column":42},"end":{"line":2301,"column":72}}]},"179":{"line":2305,"type":"if","locations":[{"start":{"line":2305,"column":8},"end":{"line":2305,"column":8}},{"start":{"line":2305,"column":8},"end":{"line":2305,"column":8}}]},"180":{"line":2347,"type":"if","locations":[{"start":{"line":2347,"column":8},"end":{"line":2347,"column":8}},{"start":{"line":2347,"column":8},"end":{"line":2347,"column":8}}]},"181":{"line":2347,"type":"binary-expr","locations":[{"start":{"line":2347,"column":12},"end":{"line":2347,"column":44}},{"start":{"line":2347,"column":48},"end":{"line":2347,"column":72}}]},"182":{"line":2422,"type":"if","locations":[{"start":{"line":2422,"column":8},"end":{"line":2422,"column":8}},{"start":{"line":2422,"column":8},"end":{"line":2422,"column":8}}]},"183":{"line":2439,"type":"if","locations":[{"start":{"line":2439,"column":8},"end":{"line":2439,"column":8}},{"start":{"line":2439,"column":8},"end":{"line":2439,"column":8}}]},"184":{"line":2455,"type":"if","locations":[{"start":{"line":2455,"column":8},"end":{"line":2455,"column":8}},{"start":{"line":2455,"column":8},"end":{"line":2455,"column":8}}]},"185":{"line":2471,"type":"if","locations":[{"start":{"line":2471,"column":8},"end":{"line":2471,"column":8}},{"start":{"line":2471,"column":8},"end":{"line":2471,"column":8}}]},"186":{"line":2490,"type":"if","locations":[{"start":{"line":2490,"column":8},"end":{"line":2490,"column":8}},{"start":{"line":2490,"column":8},"end":{"line":2490,"column":8}}]},"187":{"line":2505,"type":"if","locations":[{"start":{"line":2505,"column":8},"end":{"line":2505,"column":8}},{"start":{"line":2505,"column":8},"end":{"line":2505,"column":8}}]},"188":{"line":2524,"type":"if","locations":[{"start":{"line":2524,"column":8},"end":{"line":2524,"column":8}},{"start":{"line":2524,"column":8},"end":{"line":2524,"column":8}}]},"189":{"line":2538,"type":"if","locations":[{"start":{"line":2538,"column":8},"end":{"line":2538,"column":8}},{"start":{"line":2538,"column":8},"end":{"line":2538,"column":8}}]},"190":{"line":2553,"type":"if","locations":[{"start":{"line":2553,"column":8},"end":{"line":2553,"column":8}},{"start":{"line":2553,"column":8},"end":{"line":2553,"column":8}}]},"191":{"line":2568,"type":"if","locations":[{"start":{"line":2568,"column":8},"end":{"line":2568,"column":8}},{"start":{"line":2568,"column":8},"end":{"line":2568,"column":8}}]},"192":{"line":2583,"type":"if","locations":[{"start":{"line":2583,"column":8},"end":{"line":2583,"column":8}},{"start":{"line":2583,"column":8},"end":{"line":2583,"column":8}}]},"193":{"line":2598,"type":"if","locations":[{"start":{"line":2598,"column":8},"end":{"line":2598,"column":8}},{"start":{"line":2598,"column":8},"end":{"line":2598,"column":8}}]},"194":{"line":2617,"type":"if","locations":[{"start":{"line":2617,"column":8},"end":{"line":2617,"column":8}},{"start":{"line":2617,"column":8},"end":{"line":2617,"column":8}}]},"195":{"line":2622,"type":"if","locations":[{"start":{"line":2622,"column":8},"end":{"line":2622,"column":8}},{"start":{"line":2622,"column":8},"end":{"line":2622,"column":8}}]},"196":{"line":2636,"type":"if","locations":[{"start":{"line":2636,"column":8},"end":{"line":2636,"column":8}},{"start":{"line":2636,"column":8},"end":{"line":2636,"column":8}}]},"197":{"line":2650,"type":"if","locations":[{"start":{"line":2650,"column":8},"end":{"line":2650,"column":8}},{"start":{"line":2650,"column":8},"end":{"line":2650,"column":8}}]},"198":{"line":2667,"type":"if","locations":[{"start":{"line":2667,"column":8},"end":{"line":2667,"column":8}},{"start":{"line":2667,"column":8},"end":{"line":2667,"column":8}}]},"199":{"line":2681,"type":"if","locations":[{"start":{"line":2681,"column":8},"end":{"line":2681,"column":8}},{"start":{"line":2681,"column":8},"end":{"line":2681,"column":8}}]},"200":{"line":2695,"type":"if","locations":[{"start":{"line":2695,"column":8},"end":{"line":2695,"column":8}},{"start":{"line":2695,"column":8},"end":{"line":2695,"column":8}}]},"201":{"line":2695,"type":"binary-expr","locations":[{"start":{"line":2695,"column":12},"end":{"line":2695,"column":19}},{"start":{"line":2695,"column":24},"end":{"line":2695,"column":49}},{"start":{"line":2695,"column":53},"end":{"line":2695,"column":80}}]},"202":{"line":2709,"type":"if","locations":[{"start":{"line":2709,"column":8},"end":{"line":2709,"column":8}},{"start":{"line":2709,"column":8},"end":{"line":2709,"column":8}}]},"203":{"line":2724,"type":"if","locations":[{"start":{"line":2724,"column":8},"end":{"line":2724,"column":8}},{"start":{"line":2724,"column":8},"end":{"line":2724,"column":8}}]},"204":{"line":2756,"type":"if","locations":[{"start":{"line":2756,"column":12},"end":{"line":2756,"column":12}},{"start":{"line":2756,"column":12},"end":{"line":2756,"column":12}}]},"205":{"line":2759,"type":"if","locations":[{"start":{"line":2759,"column":16},"end":{"line":2759,"column":16}},{"start":{"line":2759,"column":16},"end":{"line":2759,"column":16}}]},"206":{"line":2762,"type":"if","locations":[{"start":{"line":2762,"column":19},"end":{"line":2762,"column":19}},{"start":{"line":2762,"column":19},"end":{"line":2762,"column":19}}]},"207":{"line":2765,"type":"if","locations":[{"start":{"line":2765,"column":16},"end":{"line":2765,"column":16}},{"start":{"line":2765,"column":16},"end":{"line":2765,"column":16}}]},"208":{"line":2769,"type":"if","locations":[{"start":{"line":2769,"column":19},"end":{"line":2769,"column":19}},{"start":{"line":2769,"column":19},"end":{"line":2769,"column":19}}]},"209":{"line":2769,"type":"binary-expr","locations":[{"start":{"line":2769,"column":23},"end":{"line":2769,"column":55}},{"start":{"line":2769,"column":59},"end":{"line":2769,"column":81}}]},"210":{"line":2772,"type":"if","locations":[{"start":{"line":2772,"column":16},"end":{"line":2772,"column":16}},{"start":{"line":2772,"column":16},"end":{"line":2772,"column":16}}]},"211":{"line":2772,"type":"binary-expr","locations":[{"start":{"line":2772,"column":20},"end":{"line":2772,"column":66}},{"start":{"line":2773,"column":24},"end":{"line":2773,"column":63}}]},"212":{"line":2781,"type":"if","locations":[{"start":{"line":2781,"column":12},"end":{"line":2781,"column":12}},{"start":{"line":2781,"column":12},"end":{"line":2781,"column":12}}]},"213":{"line":2939,"type":"if","locations":[{"start":{"line":2939,"column":12},"end":{"line":2939,"column":12}},{"start":{"line":2939,"column":12},"end":{"line":2939,"column":12}}]},"214":{"line":2971,"type":"if","locations":[{"start":{"line":2971,"column":8},"end":{"line":2971,"column":8}},{"start":{"line":2971,"column":8},"end":{"line":2971,"column":8}}]},"215":{"line":2971,"type":"binary-expr","locations":[{"start":{"line":2971,"column":12},"end":{"line":2971,"column":36}},{"start":{"line":2971,"column":40},"end":{"line":2971,"column":62}}]},"216":{"line":2975,"type":"if","locations":[{"start":{"line":2975,"column":12},"end":{"line":2975,"column":12}},{"start":{"line":2975,"column":12},"end":{"line":2975,"column":12}}]},"217":{"line":2980,"type":"if","locations":[{"start":{"line":2980,"column":12},"end":{"line":2980,"column":12}},{"start":{"line":2980,"column":12},"end":{"line":2980,"column":12}}]},"218":{"line":2985,"type":"if","locations":[{"start":{"line":2985,"column":12},"end":{"line":2985,"column":12}},{"start":{"line":2985,"column":12},"end":{"line":2985,"column":12}}]},"219":{"line":2989,"type":"if","locations":[{"start":{"line":2989,"column":12},"end":{"line":2989,"column":12}},{"start":{"line":2989,"column":12},"end":{"line":2989,"column":12}}]},"220":{"line":3007,"type":"if","locations":[{"start":{"line":3007,"column":8},"end":{"line":3007,"column":8}},{"start":{"line":3007,"column":8},"end":{"line":3007,"column":8}}]},"221":{"line":3007,"type":"binary-expr","locations":[{"start":{"line":3007,"column":12},"end":{"line":3007,"column":36}},{"start":{"line":3007,"column":40},"end":{"line":3007,"column":62}}]},"222":{"line":3011,"type":"if","locations":[{"start":{"line":3011,"column":12},"end":{"line":3011,"column":12}},{"start":{"line":3011,"column":12},"end":{"line":3011,"column":12}}]},"223":{"line":3016,"type":"if","locations":[{"start":{"line":3016,"column":12},"end":{"line":3016,"column":12}},{"start":{"line":3016,"column":12},"end":{"line":3016,"column":12}}]},"224":{"line":3021,"type":"if","locations":[{"start":{"line":3021,"column":12},"end":{"line":3021,"column":12}},{"start":{"line":3021,"column":12},"end":{"line":3021,"column":12}}]},"225":{"line":3025,"type":"if","locations":[{"start":{"line":3025,"column":12},"end":{"line":3025,"column":12}},{"start":{"line":3025,"column":12},"end":{"line":3025,"column":12}}]},"226":{"line":3046,"type":"binary-expr","locations":[{"start":{"line":3046,"column":15},"end":{"line":3046,"column":23}},{"start":{"line":3046,"column":27},"end":{"line":3046,"column":29}}]},"227":{"line":3063,"type":"if","locations":[{"start":{"line":3063,"column":8},"end":{"line":3063,"column":8}},{"start":{"line":3063,"column":8},"end":{"line":3063,"column":8}}]},"228":{"line":3064,"type":"if","locations":[{"start":{"line":3064,"column":12},"end":{"line":3064,"column":12}},{"start":{"line":3064,"column":12},"end":{"line":3064,"column":12}}]},"229":{"line":3100,"type":"if","locations":[{"start":{"line":3100,"column":4},"end":{"line":3100,"column":4}},{"start":{"line":3100,"column":4},"end":{"line":3100,"column":4}}]},"230":{"line":3105,"type":"if","locations":[{"start":{"line":3105,"column":4},"end":{"line":3105,"column":4}},{"start":{"line":3105,"column":4},"end":{"line":3105,"column":4}}]},"231":{"line":3107,"type":"binary-expr","locations":[{"start":{"line":3107,"column":19},"end":{"line":3107,"column":35}},{"start":{"line":3107,"column":39},"end":{"line":3107,"column":41}}]},"232":{"line":3109,"type":"cond-expr","locations":[{"start":{"line":3109,"column":69},"end":{"line":3109,"column":90}},{"start":{"line":3109,"column":93},"end":{"line":3109,"column":94}}]},"233":{"line":3111,"type":"binary-expr","locations":[{"start":{"line":3111,"column":18},"end":{"line":3111,"column":33}},{"start":{"line":3111,"column":37},"end":{"line":3111,"column":49}}]},"234":{"line":3122,"type":"if","locations":[{"start":{"line":3122,"column":13},"end":{"line":3122,"column":13}},{"start":{"line":3122,"column":13},"end":{"line":3122,"column":13}}]},"235":{"line":3128,"type":"if","locations":[{"start":{"line":3128,"column":8},"end":{"line":3128,"column":8}},{"start":{"line":3128,"column":8},"end":{"line":3128,"column":8}}]},"236":{"line":3139,"type":"if","locations":[{"start":{"line":3139,"column":20},"end":{"line":3139,"column":20}},{"start":{"line":3139,"column":20},"end":{"line":3139,"column":20}}]},"237":{"line":3149,"type":"cond-expr","locations":[{"start":{"line":3149,"column":63},"end":{"line":3149,"column":69}},{"start":{"line":3149,"column":72},"end":{"line":3149,"column":81}}]},"238":{"line":3163,"type":"if","locations":[{"start":{"line":3163,"column":11},"end":{"line":3163,"column":11}},{"start":{"line":3163,"column":11},"end":{"line":3163,"column":11}}]},"239":{"line":3180,"type":"if","locations":[{"start":{"line":3180,"column":12},"end":{"line":3180,"column":12}},{"start":{"line":3180,"column":12},"end":{"line":3180,"column":12}}]},"240":{"line":3182,"type":"if","locations":[{"start":{"line":3182,"column":16},"end":{"line":3182,"column":16}},{"start":{"line":3182,"column":16},"end":{"line":3182,"column":16}}]},"241":{"line":3184,"type":"if","locations":[{"start":{"line":3184,"column":23},"end":{"line":3184,"column":23}},{"start":{"line":3184,"column":23},"end":{"line":3184,"column":23}}]},"242":{"line":3207,"type":"if","locations":[{"start":{"line":3207,"column":4},"end":{"line":3207,"column":4}},{"start":{"line":3207,"column":4},"end":{"line":3207,"column":4}}]},"243":{"line":3209,"type":"binary-expr","locations":[{"start":{"line":3209,"column":33},"end":{"line":3209,"column":45}},{"start":{"line":3209,"column":49},"end":{"line":3209,"column":51}}]},"244":{"line":3294,"type":"if","locations":[{"start":{"line":3294,"column":8},"end":{"line":3294,"column":8}},{"start":{"line":3294,"column":8},"end":{"line":3294,"column":8}}]},"245":{"line":3300,"type":"if","locations":[{"start":{"line":3300,"column":12},"end":{"line":3300,"column":12}},{"start":{"line":3300,"column":12},"end":{"line":3300,"column":12}}]},"246":{"line":3301,"type":"if","locations":[{"start":{"line":3301,"column":16},"end":{"line":3301,"column":16}},{"start":{"line":3301,"column":16},"end":{"line":3301,"column":16}}]},"247":{"line":3344,"type":"if","locations":[{"start":{"line":3344,"column":8},"end":{"line":3344,"column":8}},{"start":{"line":3344,"column":8},"end":{"line":3344,"column":8}}]},"248":{"line":3344,"type":"binary-expr","locations":[{"start":{"line":3344,"column":14},"end":{"line":3344,"column":36}},{"start":{"line":3344,"column":40},"end":{"line":3344,"column":76}}]},"249":{"line":3360,"type":"if","locations":[{"start":{"line":3360,"column":12},"end":{"line":3360,"column":12}},{"start":{"line":3360,"column":12},"end":{"line":3360,"column":12}}]},"250":{"line":3360,"type":"binary-expr","locations":[{"start":{"line":3360,"column":18},"end":{"line":3360,"column":40}},{"start":{"line":3360,"column":44},"end":{"line":3360,"column":81}}]},"251":{"line":3376,"type":"if","locations":[{"start":{"line":3376,"column":8},"end":{"line":3376,"column":8}},{"start":{"line":3376,"column":8},"end":{"line":3376,"column":8}}]},"252":{"line":3392,"type":"if","locations":[{"start":{"line":3392,"column":12},"end":{"line":3392,"column":12}},{"start":{"line":3392,"column":12},"end":{"line":3392,"column":12}}]},"253":{"line":3409,"type":"if","locations":[{"start":{"line":3409,"column":8},"end":{"line":3409,"column":8}},{"start":{"line":3409,"column":8},"end":{"line":3409,"column":8}}]},"254":{"line":3425,"type":"if","locations":[{"start":{"line":3425,"column":8},"end":{"line":3425,"column":8}},{"start":{"line":3425,"column":8},"end":{"line":3425,"column":8}}]},"255":{"line":3441,"type":"if","locations":[{"start":{"line":3441,"column":12},"end":{"line":3441,"column":12}},{"start":{"line":3441,"column":12},"end":{"line":3441,"column":12}}]},"256":{"line":3535,"type":"binary-expr","locations":[{"start":{"line":3535,"column":38},"end":{"line":3535,"column":45}},{"start":{"line":3535,"column":49},"end":{"line":3535,"column":100}}]},"257":{"line":3565,"type":"binary-expr","locations":[{"start":{"line":3565,"column":38},"end":{"line":3565,"column":45}},{"start":{"line":3565,"column":49},"end":{"line":3565,"column":84}}]},"258":{"line":3696,"type":"cond-expr","locations":[{"start":{"line":3696,"column":51},"end":{"line":3696,"column":58}},{"start":{"line":3696,"column":61},"end":{"line":3696,"column":65}}]},"259":{"line":3703,"type":"cond-expr","locations":[{"start":{"line":3703,"column":45},"end":{"line":3703,"column":50}},{"start":{"line":3703,"column":53},"end":{"line":3703,"column":54}}]},"260":{"line":3744,"type":"if","locations":[{"start":{"line":3744,"column":4},"end":{"line":3744,"column":4}},{"start":{"line":3744,"column":4},"end":{"line":3744,"column":4}}]},"261":{"line":3774,"type":"if","locations":[{"start":{"line":3774,"column":0},"end":{"line":3774,"column":0}},{"start":{"line":3774,"column":0},"end":{"line":3774,"column":0}}]},"262":{"line":3776,"type":"if","locations":[{"start":{"line":3776,"column":4},"end":{"line":3776,"column":4}},{"start":{"line":3776,"column":4},"end":{"line":3776,"column":4}}]},"263":{"line":3790,"type":"switch","locations":[{"start":{"line":3791,"column":12},"end":{"line":3794,"column":22}},{"start":{"line":3796,"column":12},"end":{"line":3803,"column":22}},{"start":{"line":3805,"column":12},"end":{"line":3808,"column":22}},{"start":{"line":3810,"column":12},"end":{"line":3813,"column":22}},{"start":{"line":3815,"column":12},"end":{"line":3818,"column":22}},{"start":{"line":3820,"column":12},"end":{"line":3823,"column":22}},{"start":{"line":3825,"column":12},"end":{"line":3832,"column":22}},{"start":{"line":3834,"column":12},"end":{"line":3837,"column":22}},{"start":{"line":3839,"column":12},"end":{"line":3846,"column":22}},{"start":{"line":3847,"column":12},"end":{"line":3849,"column":37}}]},"264":{"line":3852,"type":"if","locations":[{"start":{"line":3852,"column":8},"end":{"line":3852,"column":8}},{"start":{"line":3852,"column":8},"end":{"line":3852,"column":8}}]},"265":{"line":3861,"type":"if","locations":[{"start":{"line":3861,"column":8},"end":{"line":3861,"column":8}},{"start":{"line":3861,"column":8},"end":{"line":3861,"column":8}}]}},"code":["(function () { YUI.add('test', function (Y, NAME) {","","","","/**"," * YUI Test Framework"," * @module test"," * @main test"," */","","/*"," * The root namespace for YUI Test."," */","","//So we only ever have one YUITest object that's shared","if (YUI.YUITest) {"," Y.Test = YUI.YUITest;","} else { //Ends after the YUITest definitions",""," //Make this global for back compat"," YUITest = {"," version: \"3.17.2\","," guid: function(pre) {"," return Y.guid(pre);"," }"," };","","Y.namespace('Test');","","","//Using internal YUI methods here","YUITest.Object = Y.Object;","YUITest.Array = Y.Array;","YUITest.Util = {"," mix: Y.mix,"," JSON: Y.JSON","};","","/**"," * Simple custom event implementation."," * @namespace Test"," * @module test"," * @class EventTarget"," * @constructor"," */","YUITest.EventTarget = function(){",""," /**"," * Event handlers for the various events."," * @type Object"," * @private"," * @property _handlers"," * @static"," */"," this._handlers = {};","","};","","YUITest.EventTarget.prototype = {",""," //restore prototype"," constructor: YUITest.EventTarget,",""," //-------------------------------------------------------------------------"," // Event Handling"," //-------------------------------------------------------------------------",""," /**"," * Adds a listener for a given event type."," * @param {String} type The type of event to add a listener for."," * @param {Function} listener The function to call when the event occurs."," * @method attach"," */"," attach: function(type, listener){"," if (typeof this._handlers[type] == \"undefined\"){"," this._handlers[type] = [];"," }",""," this._handlers[type].push(listener);"," },",""," /**"," * Adds a listener for a given event type."," * @param {String} type The type of event to add a listener for."," * @param {Function} listener The function to call when the event occurs."," * @method subscribe"," * @deprecated"," */"," subscribe: function(type, listener){"," this.attach.apply(this, arguments);"," },",""," /**"," * Fires an event based on the passed-in object."," * @param {Object|String} event An object with at least a 'type' attribute"," * or a string indicating the event name."," * @method fire"," */"," fire: function(event){"," if (typeof event == \"string\"){"," event = { type: event };"," }"," if (!event.target){"," event.target = this;"," }",""," if (!event.type){"," throw new Error(\"Event object missing 'type' property.\");"," }",""," if (this._handlers[event.type] instanceof Array){"," var handlers = this._handlers[event.type];"," for (var i=0, len=handlers.length; i < len; i++){"," handlers[i].call(this, event);"," }"," }"," },",""," /**"," * Removes a listener for a given event type."," * @param {String} type The type of event to remove a listener from."," * @param {Function} listener The function to remove from the event."," * @method detach"," */"," detach: function(type, listener){"," if (this._handlers[type] instanceof Array){"," var handlers = this._handlers[type];"," for (var i=0, len=handlers.length; i < len; i++){"," if (handlers[i] === listener){"," handlers.splice(i, 1);"," break;"," }"," }"," }"," },",""," /**"," * Removes a listener for a given event type."," * @param {String} type The type of event to remove a listener from."," * @param {Function} listener The function to remove from the event."," * @method unsubscribe"," * @deprecated"," */"," unsubscribe: function(type, listener){"," this.detach.apply(this, arguments);"," }","","};","","","/**"," * A test suite that can contain a collection of TestCase and TestSuite objects."," * @param {String||Object} data The name of the test suite or an object containing"," * a name property as well as setUp and tearDown methods."," * @namespace Test"," * @module test"," * @class TestSuite"," * @constructor"," */","YUITest.TestSuite = function (data) {",""," /**"," * The name of the test suite."," * @type String"," * @property name"," */"," this.name = \"\";",""," /**"," * Array of test suites and test cases."," * @type Array"," * @property items"," * @private"," */"," this.items = [];",""," //initialize the properties"," if (typeof data == \"string\"){"," this.name = data;"," } else if (data instanceof Object){"," for (var prop in data){"," if (data.hasOwnProperty(prop)){"," this[prop] = data[prop];"," }"," }"," }",""," //double-check name"," if (this.name === \"\" || !this.name) {"," this.name = YUITest.guid(\"testSuite_\");"," }","","};","","YUITest.TestSuite.prototype = {",""," //restore constructor"," constructor: YUITest.TestSuite,",""," /**"," * Adds a test suite or test case to the test suite."," * @param {Test.TestSuite||YUITest.TestCase} testObject The test suite or test case to add."," * @method add"," */"," add : function (testObject) {"," if (testObject instanceof YUITest.TestSuite || testObject instanceof YUITest.TestCase) {"," this.items.push(testObject);"," }"," return this;"," },",""," //-------------------------------------------------------------------------"," // Stub Methods"," //-------------------------------------------------------------------------",""," /**"," * Function to run before each test is executed."," * @method setUp"," */"," setUp : function () {"," },",""," /**"," * Function to run after each test is executed."," * @method tearDown"," */"," tearDown: function () {"," }","","};","/**"," * Test case containing various tests to run."," * @param template An object containing any number of test methods, other methods,"," * an optional name, and anything else the test case needs."," * @module test"," * @class TestCase"," * @namespace Test"," * @constructor"," */","","","","YUITest.TestCase = function (template) {",""," /*"," * Special rules for the test case. Possible subobjects"," * are fail, for tests that should fail, and error, for"," * tests that should throw an error."," */"," this._should = {};",""," //copy over all properties from the template to this object"," for (var prop in template) {"," this[prop] = template[prop];"," }",""," //check for a valid name"," if (typeof this.name != \"string\") {"," this.name = YUITest.guid(\"testCase_\");"," }","","};","","/**","Default delay for a test failure when `wait()` is called without a _delay_.","","@property DEFAULT_WAIT","@type {Number}","@default 10000","@static","**/","YUITest.TestCase.DEFAULT_WAIT = 10000;","","/**","Calls `YUITest.Assert.fail()` with a message indicating `wait()` was called,","but `resume()` was never called."," ","@method _waitTimeout","@static","@protected","**/","YUITest.TestCase._waitTimeout = function () {"," YUITest.Assert.fail(\"Timeout: wait() called but resume() never called.\");","};","","YUITest.TestCase.prototype = {",""," //restore constructor"," constructor: YUITest.TestCase,",""," /**"," * Method to call from an async init method to"," * restart the test case. When called, returns a function"," * that should be called when tests are ready to continue."," * @method callback"," * @return {Function} The function to call as a callback."," */"," callback: function(){"," return YUITest.TestRunner.callback.apply(YUITest.TestRunner,arguments);"," },",""," /**"," * Resumes a paused test and runs the given function."," * @param {Function} segment (Optional) The function to run."," * If omitted, the test automatically passes."," * @method resume"," */"," resume : function (segment) {"," YUITest.TestRunner.resume(segment);"," },",""," /**"," * Causes the test case to wait a specified amount of time and then"," * continue executing the given code."," * @param {Function} segment (Optional) The function to run after the delay."," * If omitted, the TestRunner will wait until resume() is called."," * @param {Number} delay (Optional) The number of milliseconds to wait before running"," * the function. If omitted, defaults to `DEFAULT_WAIT` ms (10s)."," * @method wait"," */"," wait : function (segment, delay){"," delay = (typeof segment === 'number') ? segment :"," (typeof delay === 'number') ? delay :"," YUITest.TestCase.DEFAULT_WAIT;",""," if (typeof segment !== 'function') {"," segment = YUITest.TestCase._waitTimeout;"," }",""," throw new YUITest.Wait(segment, delay);"," },",""," /**"," Creates a callback that automatically resumes the test. Parameters as passed"," on to the callback.",""," @method next"," @param {Function} callback Callback to call after resuming the test."," @param {Object} [context] The value of `this` inside the callback."," If not given, the original context of the function will be used."," @return {Function} wrapped callback that resumes the test."," @example"," ```"," // using test.resume()"," Y.jsonp(uri, function (response) {"," test.resume(function () {"," Y.Assert.isObject(response);"," });"," });"," test.wait();",""," // using test.next()"," Y.jsonp(uri, test.next(function (response) {"," Y.Assert.isObject(response);"," }));"," test.wait();"," ```"," **/"," next: function (callback, context) {"," var self = this;"," context = arguments.length >= 2 ? arguments[1] : undefined;"," return function () {"," var args = arguments;"," if (context === undefined) {"," context = this;"," }"," self.resume(function () {"," callback.apply(context, args);"," });"," };"," },",""," /**"," Delays the current test until _condition_ returns a truthy value. If"," _condition_ fails to return a truthy value before _timeout_ milliseconds"," have passed, the test fails. Default _timeout_ is 10s."," "," _condition_ will be executed every _increment_ milliseconds (default 100)."," "," @method waitFor"," @param {Function} condition Function executed to indicate whether to"," execute _segment_"," @param {Function} segment Function to check the success or failure of this"," test"," @param {Number} [timeout=10000] Maximum number of milliseconds to wait for"," _condition_ to return true"," @param {Number} [increment=100] Milliseconds to wait before checking"," _condition_"," **/"," waitFor: function (condition, segment, timeout, increment) {"," var self = this,"," endTime;"," "," if ((typeof condition !== 'function') ||"," (typeof segment !== 'function')) {"," self.fail('waitFor() called with invalid parameters.');"," }"," "," if (typeof timeout !== 'number') {"," timeout = YUITest.TestCase.DEFAULT_WAIT;"," }"," "," endTime = (+new Date()) + timeout;"," "," if (typeof increment !== 'number') {"," increment = 100;"," }"," "," self.wait(function () {"," var now;",""," if (condition.call(self)) {"," segment.call(self);"," } else {"," now = (+new Date());"," "," if (now > endTime) {"," YUITest.TestCase._waitTimeout();"," } else {"," self.waitFor(condition, segment, endTime - now, increment);"," }"," }"," }, increment);"," },",""," //-------------------------------------------------------------------------"," // Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a given condition is true. If not, then a YUITest.AssertionError object is thrown"," * and the test fails."," * @method assert"," * @param {Boolean} condition The condition to test."," * @param {String} message The message to display if the assertion fails."," */"," assert : function (condition, message){"," YUITest.Assert._increment();"," if (!condition){"," throw new YUITest.AssertionError(YUITest.Assert._formatMessage(message, \"Assertion failed.\"));"," }"," },",""," /**"," * Forces an assertion error to occur. Shortcut for YUITest.Assert.fail()."," * @method fail"," * @param {String} message (Optional) The message to display with the failure."," */"," fail: function (message) {"," YUITest.Assert.fail(message);"," },",""," //-------------------------------------------------------------------------"," // Stub Methods"," //-------------------------------------------------------------------------",""," /**"," * Function to run once before tests start to run."," * This executes before the first call to setUp()."," * @method init"," */"," init: function(){"," //noop"," },",""," /**"," * Function to run once after tests finish running."," * This executes after the last call to tearDown()."," * @method destroy"," */"," destroy: function(){"," //noop"," },",""," /**"," * Function to run before each test is executed."," * @method setUp"," */"," setUp : function () {"," //noop"," },",""," /**"," * Function to run after each test is executed."," * @method tearDown"," */"," tearDown: function () {"," //noop"," }","};","/**"," * An object object containing test result formatting methods."," * @namespace Test"," * @module test"," * @class TestFormat"," * @static"," */","YUITest.TestFormat = function(){",""," /* (intentionally not documented)"," * Basic XML escaping method. Replaces quotes, less-than, greater-than,"," * apostrophe, and ampersand characters with their corresponding entities."," * @param {String} text The text to encode."," * @return {String} The XML-escaped text."," */"," function xmlEscape(text){",""," return text.replace(/[<>\"'&]/g, function(value){"," switch(value){"," case \"<\": return \"<\";"," case \">\": return \">\";"," case \"\\\"\": return \""\";"," case \"'\": return \"'\";"," case \"&\": return \"&\";"," }"," });",""," }","",""," return {",""," /**"," * Returns test results formatted as a JSON string. Requires JSON utility."," * @param {Object} result The results object created by TestRunner."," * @return {String} A JSON-formatted string of results."," * @method JSON"," * @static"," */"," JSON: function(results) {"," return YUITest.Util.JSON.stringify(results);"," },",""," /**"," * Returns test results formatted as an XML string."," * @param {Object} result The results object created by TestRunner."," * @return {String} An XML-formatted string of results."," * @method XML"," * @static"," */"," XML: function(results) {",""," function serializeToXML(results){"," var xml = \"<\" + results.type + \" name=\\\"\" + xmlEscape(results.name) + \"\\\"\";",""," if (typeof(results.duration)==\"number\"){"," xml += \" duration=\\\"\" + results.duration + \"\\\"\";"," }",""," if (results.type == \"test\"){"," xml += \" result=\\\"\" + results.result + \"\\\" message=\\\"\" + xmlEscape(results.message) + \"\\\">\";"," } else {"," xml += \" passed=\\\"\" + results.passed + \"\\\" failed=\\\"\" + results.failed + \"\\\" ignored=\\\"\" + results.ignored + \"\\\" total=\\\"\" + results.total + \"\\\">\";"," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," xml += serializeToXML(results[prop]);"," }"," }"," }"," }",""," xml += \"\";",""," return xml;"," }",""," return \"\" + serializeToXML(results);",""," },","",""," /**"," * Returns test results formatted in JUnit XML format."," * @param {Object} result The results object created by TestRunner."," * @return {String} An XML-formatted string of results."," * @method JUnitXML"," * @static"," */"," JUnitXML: function(results) {",""," function serializeToJUnitXML(results){"," var xml = \"\";",""," switch (results.type){"," //equivalent to testcase in JUnit"," case \"test\":"," if (results.result != \"ignore\"){"," xml = \"\";"," if (results.result == \"fail\"){"," xml += \"\";"," }"," xml+= \"\";"," }"," break;",""," //equivalent to testsuite in JUnit"," case \"testcase\":",""," xml = \"\";",""," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," xml += serializeToJUnitXML(results[prop]);"," }"," }"," }",""," xml += \"\";"," break;",""," //no JUnit equivalent, don't output anything"," case \"testsuite\":"," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," xml += serializeToJUnitXML(results[prop]);"," }"," }"," }"," break;",""," //top-level, equivalent to testsuites in JUnit"," case \"report\":",""," xml = \"\";",""," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," xml += serializeToJUnitXML(results[prop]);"," }"," }"," }",""," xml += \"\";",""," //no default"," }",""," return xml;",""," }",""," return \"\" + serializeToJUnitXML(results);"," },",""," /**"," * Returns test results formatted in TAP format."," * For more information, see Test Anything Protocol."," * @param {Object} result The results object created by TestRunner."," * @return {String} A TAP-formatted string of results."," * @method TAP"," * @static"," */"," TAP: function(results) {",""," var currentTestNum = 1;",""," function serializeToTAP(results){"," var text = \"\";",""," switch (results.type){",""," case \"test\":"," if (results.result != \"ignore\"){",""," text = \"ok \" + (currentTestNum++) + \" - \" + results.name;",""," if (results.result == \"fail\"){"," text = \"not \" + text + \" - \" + results.message;"," }",""," text += \"\\n\";"," } else {"," text = \"#Ignored test \" + results.name + \"\\n\";"," }"," break;",""," case \"testcase\":",""," text = \"#Begin testcase \" + results.name + \"(\" + results.failed + \" failed of \" + results.total + \")\\n\";",""," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," text += serializeToTAP(results[prop]);"," }"," }"," }",""," text += \"#End testcase \" + results.name + \"\\n\";","",""," break;",""," case \"testsuite\":",""," text = \"#Begin testsuite \" + results.name + \"(\" + results.failed + \" failed of \" + results.total + \")\\n\";",""," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," text += serializeToTAP(results[prop]);"," }"," }"," }",""," text += \"#End testsuite \" + results.name + \"\\n\";"," break;",""," case \"report\":",""," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," text += serializeToTAP(results[prop]);"," }"," }"," }",""," //no default"," }",""," return text;",""," }",""," return \"1..\" + results.total + \"\\n\" + serializeToTAP(results);"," }",""," };","}();",""," /**"," * An object capable of sending test results to a server."," * @param {String} url The URL to submit the results to."," * @param {Function} format (Optiona) A function that outputs the results in a specific format."," * Default is YUITest.TestFormat.XML."," * @constructor"," * @namespace Test"," * @module test"," * @class Reporter"," */"," YUITest.Reporter = function(url, format) {",""," /**"," * The URL to submit the data to."," * @type String"," * @property url"," */"," this.url = url;",""," /**"," * The formatting function to call when submitting the data."," * @type Function"," * @property format"," */"," this.format = format || YUITest.TestFormat.XML;",""," /**"," * Extra fields to submit with the request."," * @type Object"," * @property _fields"," * @private"," */"," this._fields = new Object();",""," /**"," * The form element used to submit the results."," * @type HTMLFormElement"," * @property _form"," * @private"," */"," this._form = null;",""," /**"," * Iframe used as a target for form submission."," * @type HTMLIFrameElement"," * @property _iframe"," * @private"," */"," this._iframe = null;"," };",""," YUITest.Reporter.prototype = {",""," //restore missing constructor"," constructor: YUITest.Reporter,",""," /**"," * Adds a field to the form that submits the results."," * @param {String} name The name of the field."," * @param {Any} value The value of the field."," * @method addField"," */"," addField : function (name, value){"," this._fields[name] = value;"," },",""," /**"," * Removes all previous defined fields."," * @method clearFields"," */"," clearFields : function(){"," this._fields = new Object();"," },",""," /**"," * Cleans up the memory associated with the TestReporter, removing DOM elements"," * that were created."," * @method destroy"," */"," destroy : function() {"," if (this._form){"," this._form.parentNode.removeChild(this._form);"," this._form = null;"," }"," if (this._iframe){"," this._iframe.parentNode.removeChild(this._iframe);"," this._iframe = null;"," }"," this._fields = null;"," },",""," /**"," * Sends the report to the server."," * @param {Object} results The results object created by TestRunner."," * @method report"," */"," report : function(results){",""," //if the form hasn't been created yet, create it"," if (!this._form){"," this._form = document.createElement(\"form\");"," this._form.method = \"post\";"," this._form.style.visibility = \"hidden\";"," this._form.style.position = \"absolute\";"," this._form.style.top = 0;"," document.body.appendChild(this._form);",""," //IE won't let you assign a name using the DOM, must do it the hacky way"," try {"," this._iframe = document.createElement(\"';",""," Stack.prototype = {",""," initializer : function() {"," this._stackNode = this.get(BOUNDING_BOX);"," this._stackHandles = {};",""," // WIDGET METHOD OVERLAP"," Y.after(this._renderUIStack, this, RENDER_UI);"," Y.after(this._syncUIStack, this, SYNC_UI);"," Y.after(this._bindUIStack, this, BIND_UI);"," },",""," /**"," * Synchronizes the UI to match the Widgets stack state. This method in"," * invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure."," *"," * @method _syncUIStack"," * @protected"," */"," _syncUIStack: function() {"," this._uiSetShim(this.get(SHIM));"," this._uiSetZIndex(this.get(ZINDEX));"," },",""," /**"," * Binds event listeners responsible for updating the UI state in response to"," * Widget stack related state changes."," *

            "," * This method is invoked after bindUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *

            "," * @method _bindUIStack"," * @protected"," */"," _bindUIStack: function() {"," this.after(ShimChange, this._afterShimChange);"," this.after(ZIndexChange, this._afterZIndexChange);"," },",""," /**"," * Creates/Initializes the DOM to support stackability."," *

            "," * This method in invoked after renderUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *

            "," * @method _renderUIStack"," * @protected"," */"," _renderUIStack: function() {"," this._stackNode.addClass(Stack.STACKED_CLASS_NAME);"," },",""," /**"," Parses a `zIndex` attribute value from this widget's `srcNode`.",""," @method _parseZIndex"," @param {Node} srcNode The node to parse a `zIndex` value from."," @return {Mixed} The parsed `zIndex` value."," @protected"," **/"," _parseZIndex: function (srcNode) {"," var zIndex;",""," // Prefers how WebKit handles `z-index` which better matches the"," // spec:"," //"," // * http://www.w3.org/TR/CSS2/visuren.html#z-index"," // * https://bugs.webkit.org/show_bug.cgi?id=15562"," //"," // When a node isn't rendered in the document, and/or when a"," // node is not positioned, then it doesn't have a context to derive"," // a valid `z-index` value from."," if (!srcNode.inDoc() || srcNode.getStyle('position') === 'static') {"," zIndex = 'auto';"," } else {"," // Uses `getComputedStyle()` because it has greater accuracy in"," // more browsers than `getStyle()` does for `z-index`."," zIndex = srcNode.getComputedStyle('zIndex');"," }",""," // This extension adds a stacking context to widgets, therefore a"," // `srcNode` witout a stacking context (i.e. \"auto\") will return"," // `null` from this DOM parser. This way the widget's default or"," // user provided value for `zIndex` will be used."," return zIndex === 'auto' ? null : zIndex;"," },",""," /**"," * Default setter for zIndex attribute changes. Normalizes zIndex values to"," * numbers, converting non-numerical values to 0."," *"," * @method _setZIndex"," * @protected"," * @param {String | Number} zIndex"," * @return {Number} Normalized zIndex"," */"," _setZIndex: function(zIndex) {"," if (L.isString(zIndex)) {"," zIndex = parseInt(zIndex, 10);"," }"," if (!L.isNumber(zIndex)) {"," zIndex = 0;"," }"," return zIndex;"," },",""," /**"," * Default attribute change listener for the shim attribute, responsible"," * for updating the UI, in response to attribute changes."," *"," * @method _afterShimChange"," * @protected"," * @param {EventFacade} e The event facade for the attribute change"," */"," _afterShimChange : function(e) {"," this._uiSetShim(e.newVal);"," },",""," /**"," * Default attribute change listener for the zIndex attribute, responsible"," * for updating the UI, in response to attribute changes."," *"," * @method _afterZIndexChange"," * @protected"," * @param {EventFacade} e The event facade for the attribute change"," */"," _afterZIndexChange : function(e) {"," this._uiSetZIndex(e.newVal);"," },",""," /**"," * Updates the UI to reflect the zIndex value passed in."," *"," * @method _uiSetZIndex"," * @protected"," * @param {number} zIndex The zindex to be reflected in the UI"," */"," _uiSetZIndex: function (zIndex) {"," this._stackNode.setStyle(ZINDEX, zIndex);"," },",""," /**"," * Updates the UI to enable/disable the shim. If the widget is not currently visible,"," * creation of the shim is deferred until it is made visible, for performance reasons."," *"," * @method _uiSetShim"," * @protected"," * @param {boolean} enable If true, creates/renders the shim, if false, removes it."," */"," _uiSetShim: function (enable) {"," if (enable) {"," // Lazy creation"," if (this.get(VISIBLE)) {"," this._renderShim();"," } else {"," this._renderShimDeferred();"," }",""," // Eagerly attach resize handlers"," //"," // Required because of Event stack behavior, commit ref: cd8dddc"," // Should be revisted after Ticket #2531067 is resolved."," if (UA.ie == 6) {"," this._addShimResizeHandlers();"," }"," } else {"," this._destroyShim();"," }"," },",""," /**"," * Sets up change handlers for the visible attribute, to defer shim creation/rendering"," * until the Widget is made visible."," *"," * @method _renderShimDeferred"," * @private"," */"," _renderShimDeferred : function() {",""," this._stackHandles[SHIM_DEFERRED] = this._stackHandles[SHIM_DEFERRED] || [];",""," var handles = this._stackHandles[SHIM_DEFERRED],"," createBeforeVisible = function(e) {"," if (e.newVal) {"," this._renderShim();"," }"," };",""," handles.push(this.on(VisibleChange, createBeforeVisible));"," // Depending how how Ticket #2531067 is resolved, a reversal of"," // commit ref: cd8dddc could lead to a more elagent solution, with"," // the addition of this line here:"," //"," // handles.push(this.after(VisibleChange, this.sizeShim));"," },",""," /**"," * Sets up event listeners to resize the shim when the size of the Widget changes."," *

            "," * NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to"," * resize the shim purely through CSS, when the Widget does not have an explicit width/height"," * set."," *

            "," * @method _addShimResizeHandlers"," * @private"," */"," _addShimResizeHandlers : function() {",""," this._stackHandles[SHIM_RESIZE] = this._stackHandles[SHIM_RESIZE] || [];",""," var sizeShim = this.sizeShim,"," handles = this._stackHandles[SHIM_RESIZE];",""," handles.push(this.after(VisibleChange, sizeShim));"," handles.push(this.after(WidthChange, sizeShim));"," handles.push(this.after(HeightChange, sizeShim));"," handles.push(this.after(ContentUpdate, sizeShim));"," },",""," /**"," * Detaches any handles stored for the provided key"," *"," * @method _detachStackHandles"," * @param String handleKey The key defining the group of handles which should be detached"," * @private"," */"," _detachStackHandles : function(handleKey) {"," var handles = this._stackHandles[handleKey],"," handle;",""," if (handles && handles.length > 0) {"," while((handle = handles.pop())) {"," handle.detach();"," }"," }"," },",""," /**"," * Creates the shim element and adds it to the DOM"," *"," * @method _renderShim"," * @private"," */"," _renderShim : function() {"," var shimEl = this._shimNode,"," stackEl = this._stackNode;",""," if (!shimEl) {"," shimEl = this._shimNode = this._getShimTemplate();"," stackEl.insertBefore(shimEl, stackEl.get(FIRST_CHILD));",""," this._detachStackHandles(SHIM_DEFERRED);"," this.sizeShim();"," }"," },",""," /**"," * Removes the shim from the DOM, and detaches any related event"," * listeners."," *"," * @method _destroyShim"," * @private"," */"," _destroyShim : function() {"," if (this._shimNode) {"," this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);"," this._shimNode = null;",""," this._detachStackHandles(SHIM_DEFERRED);"," this._detachStackHandles(SHIM_RESIZE);"," }"," },",""," /**"," * For IE6, synchronizes the size and position of iframe shim to that of"," * Widget bounding box which it is protecting. For all other browsers,"," * this method does not do anything."," *"," * @method sizeShim"," */"," sizeShim: function () {"," var shim = this._shimNode,"," node = this._stackNode;",""," if (shim && UA.ie === 6 && this.get(VISIBLE)) {"," shim.setStyle(WIDTH, node.get(OFFSET_WIDTH) + PX);"," shim.setStyle(HEIGHT, node.get(OFFSET_HEIGHT) + PX);"," }"," },",""," /**"," * Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance."," *"," * @method _getShimTemplate"," * @private"," * @return {Node} node A new shim Node instance."," */"," _getShimTemplate : function() {"," return Node.create(Stack.SHIM_TEMPLATE, this._stackNode.get(OWNER_DOCUMENT));"," }"," };",""," Y.WidgetStack = Stack;","","","}, '3.17.2', {\"requires\": [\"base-build\", \"widget\"], \"skinnable\": true});","","}());"]}; +} +var __cov_W4NzUIXIxRimGbjWtpefzw = __coverage__['build/widget-stack/widget-stack.js']; +__cov_W4NzUIXIxRimGbjWtpefzw.s['1']++;YUI.add('widget-stack',function(Y,NAME){__cov_W4NzUIXIxRimGbjWtpefzw.f['1']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['2']++;var L=Y.Lang,UA=Y.UA,Node=Y.Node,Widget=Y.Widget,ZINDEX='zIndex',SHIM='shim',VISIBLE='visible',BOUNDING_BOX='boundingBox',RENDER_UI='renderUI',BIND_UI='bindUI',SYNC_UI='syncUI',OFFSET_WIDTH='offsetWidth',OFFSET_HEIGHT='offsetHeight',PARENT_NODE='parentNode',FIRST_CHILD='firstChild',OWNER_DOCUMENT='ownerDocument',WIDTH='width',HEIGHT='height',PX='px',SHIM_DEFERRED='shimdeferred',SHIM_RESIZE='shimresize',VisibleChange='visibleChange',WidthChange='widthChange',HeightChange='heightChange',ShimChange='shimChange',ZIndexChange='zIndexChange',ContentUpdate='contentUpdate',STACKED='stacked';__cov_W4NzUIXIxRimGbjWtpefzw.s['3']++;function Stack(config){__cov_W4NzUIXIxRimGbjWtpefzw.f['2']++;}__cov_W4NzUIXIxRimGbjWtpefzw.s['4']++;Stack.ATTRS={shim:{value:UA.ie==6},zIndex:{value:0,setter:'_setZIndex'}};__cov_W4NzUIXIxRimGbjWtpefzw.s['5']++;Stack.HTML_PARSER={zIndex:function(srcNode){__cov_W4NzUIXIxRimGbjWtpefzw.f['3']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['6']++;return this._parseZIndex(srcNode);}};__cov_W4NzUIXIxRimGbjWtpefzw.s['7']++;Stack.SHIM_CLASS_NAME=Widget.getClassName(SHIM);__cov_W4NzUIXIxRimGbjWtpefzw.s['8']++;Stack.STACKED_CLASS_NAME=Widget.getClassName(STACKED);__cov_W4NzUIXIxRimGbjWtpefzw.s['9']++;Stack.SHIM_TEMPLATE='';__cov_W4NzUIXIxRimGbjWtpefzw.s['10']++;Stack.prototype={initializer:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['4']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['11']++;this._stackNode=this.get(BOUNDING_BOX);__cov_W4NzUIXIxRimGbjWtpefzw.s['12']++;this._stackHandles={};__cov_W4NzUIXIxRimGbjWtpefzw.s['13']++;Y.after(this._renderUIStack,this,RENDER_UI);__cov_W4NzUIXIxRimGbjWtpefzw.s['14']++;Y.after(this._syncUIStack,this,SYNC_UI);__cov_W4NzUIXIxRimGbjWtpefzw.s['15']++;Y.after(this._bindUIStack,this,BIND_UI);},_syncUIStack:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['5']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['16']++;this._uiSetShim(this.get(SHIM));__cov_W4NzUIXIxRimGbjWtpefzw.s['17']++;this._uiSetZIndex(this.get(ZINDEX));},_bindUIStack:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['6']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['18']++;this.after(ShimChange,this._afterShimChange);__cov_W4NzUIXIxRimGbjWtpefzw.s['19']++;this.after(ZIndexChange,this._afterZIndexChange);},_renderUIStack:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['7']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['20']++;this._stackNode.addClass(Stack.STACKED_CLASS_NAME);},_parseZIndex:function(srcNode){__cov_W4NzUIXIxRimGbjWtpefzw.f['8']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['21']++;var zIndex;__cov_W4NzUIXIxRimGbjWtpefzw.s['22']++;if((__cov_W4NzUIXIxRimGbjWtpefzw.b['2'][0]++,!srcNode.inDoc())||(__cov_W4NzUIXIxRimGbjWtpefzw.b['2'][1]++,srcNode.getStyle('position')==='static')){__cov_W4NzUIXIxRimGbjWtpefzw.b['1'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['23']++;zIndex='auto';}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['1'][1]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['24']++;zIndex=srcNode.getComputedStyle('zIndex');}__cov_W4NzUIXIxRimGbjWtpefzw.s['25']++;return zIndex==='auto'?(__cov_W4NzUIXIxRimGbjWtpefzw.b['3'][0]++,null):(__cov_W4NzUIXIxRimGbjWtpefzw.b['3'][1]++,zIndex);},_setZIndex:function(zIndex){__cov_W4NzUIXIxRimGbjWtpefzw.f['9']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['26']++;if(L.isString(zIndex)){__cov_W4NzUIXIxRimGbjWtpefzw.b['4'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['27']++;zIndex=parseInt(zIndex,10);}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['4'][1]++;}__cov_W4NzUIXIxRimGbjWtpefzw.s['28']++;if(!L.isNumber(zIndex)){__cov_W4NzUIXIxRimGbjWtpefzw.b['5'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['29']++;zIndex=0;}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['5'][1]++;}__cov_W4NzUIXIxRimGbjWtpefzw.s['30']++;return zIndex;},_afterShimChange:function(e){__cov_W4NzUIXIxRimGbjWtpefzw.f['10']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['31']++;this._uiSetShim(e.newVal);},_afterZIndexChange:function(e){__cov_W4NzUIXIxRimGbjWtpefzw.f['11']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['32']++;this._uiSetZIndex(e.newVal);},_uiSetZIndex:function(zIndex){__cov_W4NzUIXIxRimGbjWtpefzw.f['12']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['33']++;this._stackNode.setStyle(ZINDEX,zIndex);},_uiSetShim:function(enable){__cov_W4NzUIXIxRimGbjWtpefzw.f['13']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['34']++;if(enable){__cov_W4NzUIXIxRimGbjWtpefzw.b['6'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['35']++;if(this.get(VISIBLE)){__cov_W4NzUIXIxRimGbjWtpefzw.b['7'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['36']++;this._renderShim();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['7'][1]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['37']++;this._renderShimDeferred();}__cov_W4NzUIXIxRimGbjWtpefzw.s['38']++;if(UA.ie==6){__cov_W4NzUIXIxRimGbjWtpefzw.b['8'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['39']++;this._addShimResizeHandlers();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['8'][1]++;}}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['6'][1]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['40']++;this._destroyShim();}},_renderShimDeferred:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['14']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['41']++;this._stackHandles[SHIM_DEFERRED]=(__cov_W4NzUIXIxRimGbjWtpefzw.b['9'][0]++,this._stackHandles[SHIM_DEFERRED])||(__cov_W4NzUIXIxRimGbjWtpefzw.b['9'][1]++,[]);__cov_W4NzUIXIxRimGbjWtpefzw.s['42']++;var handles=this._stackHandles[SHIM_DEFERRED],createBeforeVisible=function(e){__cov_W4NzUIXIxRimGbjWtpefzw.f['15']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['43']++;if(e.newVal){__cov_W4NzUIXIxRimGbjWtpefzw.b['10'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['44']++;this._renderShim();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['10'][1]++;}};__cov_W4NzUIXIxRimGbjWtpefzw.s['45']++;handles.push(this.on(VisibleChange,createBeforeVisible));},_addShimResizeHandlers:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['16']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['46']++;this._stackHandles[SHIM_RESIZE]=(__cov_W4NzUIXIxRimGbjWtpefzw.b['11'][0]++,this._stackHandles[SHIM_RESIZE])||(__cov_W4NzUIXIxRimGbjWtpefzw.b['11'][1]++,[]);__cov_W4NzUIXIxRimGbjWtpefzw.s['47']++;var sizeShim=this.sizeShim,handles=this._stackHandles[SHIM_RESIZE];__cov_W4NzUIXIxRimGbjWtpefzw.s['48']++;handles.push(this.after(VisibleChange,sizeShim));__cov_W4NzUIXIxRimGbjWtpefzw.s['49']++;handles.push(this.after(WidthChange,sizeShim));__cov_W4NzUIXIxRimGbjWtpefzw.s['50']++;handles.push(this.after(HeightChange,sizeShim));__cov_W4NzUIXIxRimGbjWtpefzw.s['51']++;handles.push(this.after(ContentUpdate,sizeShim));},_detachStackHandles:function(handleKey){__cov_W4NzUIXIxRimGbjWtpefzw.f['17']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['52']++;var handles=this._stackHandles[handleKey],handle;__cov_W4NzUIXIxRimGbjWtpefzw.s['53']++;if((__cov_W4NzUIXIxRimGbjWtpefzw.b['13'][0]++,handles)&&(__cov_W4NzUIXIxRimGbjWtpefzw.b['13'][1]++,handles.length>0)){__cov_W4NzUIXIxRimGbjWtpefzw.b['12'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['54']++;while(handle=handles.pop()){__cov_W4NzUIXIxRimGbjWtpefzw.s['55']++;handle.detach();}}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['12'][1]++;}},_renderShim:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['18']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['56']++;var shimEl=this._shimNode,stackEl=this._stackNode;__cov_W4NzUIXIxRimGbjWtpefzw.s['57']++;if(!shimEl){__cov_W4NzUIXIxRimGbjWtpefzw.b['14'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['58']++;shimEl=this._shimNode=this._getShimTemplate();__cov_W4NzUIXIxRimGbjWtpefzw.s['59']++;stackEl.insertBefore(shimEl,stackEl.get(FIRST_CHILD));__cov_W4NzUIXIxRimGbjWtpefzw.s['60']++;this._detachStackHandles(SHIM_DEFERRED);__cov_W4NzUIXIxRimGbjWtpefzw.s['61']++;this.sizeShim();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['14'][1]++;}},_destroyShim:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['19']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['62']++;if(this._shimNode){__cov_W4NzUIXIxRimGbjWtpefzw.b['15'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['63']++;this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);__cov_W4NzUIXIxRimGbjWtpefzw.s['64']++;this._shimNode=null;__cov_W4NzUIXIxRimGbjWtpefzw.s['65']++;this._detachStackHandles(SHIM_DEFERRED);__cov_W4NzUIXIxRimGbjWtpefzw.s['66']++;this._detachStackHandles(SHIM_RESIZE);}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['15'][1]++;}},sizeShim:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['20']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['67']++;var shim=this._shimNode,node=this._stackNode;__cov_W4NzUIXIxRimGbjWtpefzw.s['68']++;if((__cov_W4NzUIXIxRimGbjWtpefzw.b['17'][0]++,shim)&&(__cov_W4NzUIXIxRimGbjWtpefzw.b['17'][1]++,UA.ie===6)&&(__cov_W4NzUIXIxRimGbjWtpefzw.b['17'][2]++,this.get(VISIBLE))){__cov_W4NzUIXIxRimGbjWtpefzw.b['16'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['69']++;shim.setStyle(WIDTH,node.get(OFFSET_WIDTH)+PX);__cov_W4NzUIXIxRimGbjWtpefzw.s['70']++;shim.setStyle(HEIGHT,node.get(OFFSET_HEIGHT)+PX);}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['16'][1]++;}},_getShimTemplate:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['21']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['71']++;return Node.create(Stack.SHIM_TEMPLATE,this._stackNode.get(OWNER_DOCUMENT));}};__cov_W4NzUIXIxRimGbjWtpefzw.s['72']++;Y.WidgetStack=Stack;},'3.17.2',{'requires':['base-build','widget'],'skinnable':true}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack-debug.js b/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack-debug.js new file mode 100644 index 0000000..d8ad2ee --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack-debug.js @@ -0,0 +1,447 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('widget-stack', function (Y, NAME) { + +/** + * Provides stackable (z-index) support for Widgets through an extension. + * + * @module widget-stack + */ + var L = Y.Lang, + UA = Y.UA, + Node = Y.Node, + Widget = Y.Widget, + + ZINDEX = "zIndex", + SHIM = "shim", + VISIBLE = "visible", + + BOUNDING_BOX = "boundingBox", + + RENDER_UI = "renderUI", + BIND_UI = "bindUI", + SYNC_UI = "syncUI", + + OFFSET_WIDTH = "offsetWidth", + OFFSET_HEIGHT = "offsetHeight", + PARENT_NODE = "parentNode", + FIRST_CHILD = "firstChild", + OWNER_DOCUMENT = "ownerDocument", + + WIDTH = "width", + HEIGHT = "height", + PX = "px", + + // HANDLE KEYS + SHIM_DEFERRED = "shimdeferred", + SHIM_RESIZE = "shimresize", + + // Events + VisibleChange = "visibleChange", + WidthChange = "widthChange", + HeightChange = "heightChange", + ShimChange = "shimChange", + ZIndexChange = "zIndexChange", + ContentUpdate = "contentUpdate", + + // CSS + STACKED = "stacked"; + + /** + * Widget extension, which can be used to add stackable (z-index) support to the + * base Widget class along with a shimming solution, through the + * Base.build method. + * + * @class WidgetStack + * @param {Object} User configuration object + */ + function Stack(config) {} + + // Static Properties + /** + * Static property used to define the default attribute + * configuration introduced by WidgetStack. + * + * @property ATTRS + * @type Object + * @static + */ + Stack.ATTRS = { + /** + * @attribute shim + * @type boolean + * @default false, for all browsers other than IE6, for which a shim is enabled by default. + * + * @description Boolean flag to indicate whether or not a shim should be added to the Widgets + * boundingBox, to protect it from select box bleedthrough. + */ + shim: { + value: (UA.ie == 6) + }, + + /** + * @attribute zIndex + * @type number + * @default 0 + * @description The z-index to apply to the Widgets boundingBox. Non-numerical values for + * zIndex will be converted to 0 + */ + zIndex: { + value : 0, + setter: '_setZIndex' + } + }; + + /** + * The HTML parsing rules for the WidgetStack class. + * + * @property HTML_PARSER + * @static + * @type Object + */ + Stack.HTML_PARSER = { + zIndex: function (srcNode) { + return this._parseZIndex(srcNode); + } + }; + + /** + * Default class used to mark the shim element + * + * @property SHIM_CLASS_NAME + * @type String + * @static + * @default "yui3-widget-shim" + */ + Stack.SHIM_CLASS_NAME = Widget.getClassName(SHIM); + + /** + * Default class used to mark the boundingBox of a stacked widget. + * + * @property STACKED_CLASS_NAME + * @type String + * @static + * @default "yui3-widget-stacked" + */ + Stack.STACKED_CLASS_NAME = Widget.getClassName(STACKED); + + /** + * Default markup template used to generate the shim element. + * + * @property SHIM_TEMPLATE + * @type String + * @static + */ + Stack.SHIM_TEMPLATE = ''; + + Stack.prototype = { + + initializer : function() { + this._stackNode = this.get(BOUNDING_BOX); + this._stackHandles = {}; + + // WIDGET METHOD OVERLAP + Y.after(this._renderUIStack, this, RENDER_UI); + Y.after(this._syncUIStack, this, SYNC_UI); + Y.after(this._bindUIStack, this, BIND_UI); + }, + + /** + * Synchronizes the UI to match the Widgets stack state. This method in + * invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure. + * + * @method _syncUIStack + * @protected + */ + _syncUIStack: function() { + this._uiSetShim(this.get(SHIM)); + this._uiSetZIndex(this.get(ZINDEX)); + }, + + /** + * Binds event listeners responsible for updating the UI state in response to + * Widget stack related state changes. + *

            + * This method is invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _bindUIStack + * @protected + */ + _bindUIStack: function() { + this.after(ShimChange, this._afterShimChange); + this.after(ZIndexChange, this._afterZIndexChange); + }, + + /** + * Creates/Initializes the DOM to support stackability. + *

            + * This method in invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _renderUIStack + * @protected + */ + _renderUIStack: function() { + this._stackNode.addClass(Stack.STACKED_CLASS_NAME); + }, + + /** + Parses a `zIndex` attribute value from this widget's `srcNode`. + + @method _parseZIndex + @param {Node} srcNode The node to parse a `zIndex` value from. + @return {Mixed} The parsed `zIndex` value. + @protected + **/ + _parseZIndex: function (srcNode) { + var zIndex; + + // Prefers how WebKit handles `z-index` which better matches the + // spec: + // + // * http://www.w3.org/TR/CSS2/visuren.html#z-index + // * https://bugs.webkit.org/show_bug.cgi?id=15562 + // + // When a node isn't rendered in the document, and/or when a + // node is not positioned, then it doesn't have a context to derive + // a valid `z-index` value from. + if (!srcNode.inDoc() || srcNode.getStyle('position') === 'static') { + zIndex = 'auto'; + } else { + // Uses `getComputedStyle()` because it has greater accuracy in + // more browsers than `getStyle()` does for `z-index`. + zIndex = srcNode.getComputedStyle('zIndex'); + } + + // This extension adds a stacking context to widgets, therefore a + // `srcNode` witout a stacking context (i.e. "auto") will return + // `null` from this DOM parser. This way the widget's default or + // user provided value for `zIndex` will be used. + return zIndex === 'auto' ? null : zIndex; + }, + + /** + * Default setter for zIndex attribute changes. Normalizes zIndex values to + * numbers, converting non-numerical values to 0. + * + * @method _setZIndex + * @protected + * @param {String | Number} zIndex + * @return {Number} Normalized zIndex + */ + _setZIndex: function(zIndex) { + if (L.isString(zIndex)) { + zIndex = parseInt(zIndex, 10); + } + if (!L.isNumber(zIndex)) { + zIndex = 0; + } + return zIndex; + }, + + /** + * Default attribute change listener for the shim attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterShimChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterShimChange : function(e) { + this._uiSetShim(e.newVal); + }, + + /** + * Default attribute change listener for the zIndex attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterZIndexChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterZIndexChange : function(e) { + this._uiSetZIndex(e.newVal); + }, + + /** + * Updates the UI to reflect the zIndex value passed in. + * + * @method _uiSetZIndex + * @protected + * @param {number} zIndex The zindex to be reflected in the UI + */ + _uiSetZIndex: function (zIndex) { + this._stackNode.setStyle(ZINDEX, zIndex); + }, + + /** + * Updates the UI to enable/disable the shim. If the widget is not currently visible, + * creation of the shim is deferred until it is made visible, for performance reasons. + * + * @method _uiSetShim + * @protected + * @param {boolean} enable If true, creates/renders the shim, if false, removes it. + */ + _uiSetShim: function (enable) { + if (enable) { + // Lazy creation + if (this.get(VISIBLE)) { + this._renderShim(); + } else { + this._renderShimDeferred(); + } + + // Eagerly attach resize handlers + // + // Required because of Event stack behavior, commit ref: cd8dddc + // Should be revisted after Ticket #2531067 is resolved. + if (UA.ie == 6) { + this._addShimResizeHandlers(); + } + } else { + this._destroyShim(); + } + }, + + /** + * Sets up change handlers for the visible attribute, to defer shim creation/rendering + * until the Widget is made visible. + * + * @method _renderShimDeferred + * @private + */ + _renderShimDeferred : function() { + + this._stackHandles[SHIM_DEFERRED] = this._stackHandles[SHIM_DEFERRED] || []; + + var handles = this._stackHandles[SHIM_DEFERRED], + createBeforeVisible = function(e) { + if (e.newVal) { + this._renderShim(); + } + }; + + handles.push(this.on(VisibleChange, createBeforeVisible)); + // Depending how how Ticket #2531067 is resolved, a reversal of + // commit ref: cd8dddc could lead to a more elagent solution, with + // the addition of this line here: + // + // handles.push(this.after(VisibleChange, this.sizeShim)); + }, + + /** + * Sets up event listeners to resize the shim when the size of the Widget changes. + *

            + * NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to + * resize the shim purely through CSS, when the Widget does not have an explicit width/height + * set. + *

            + * @method _addShimResizeHandlers + * @private + */ + _addShimResizeHandlers : function() { + + this._stackHandles[SHIM_RESIZE] = this._stackHandles[SHIM_RESIZE] || []; + + var sizeShim = this.sizeShim, + handles = this._stackHandles[SHIM_RESIZE]; + + handles.push(this.after(VisibleChange, sizeShim)); + handles.push(this.after(WidthChange, sizeShim)); + handles.push(this.after(HeightChange, sizeShim)); + handles.push(this.after(ContentUpdate, sizeShim)); + }, + + /** + * Detaches any handles stored for the provided key + * + * @method _detachStackHandles + * @param String handleKey The key defining the group of handles which should be detached + * @private + */ + _detachStackHandles : function(handleKey) { + var handles = this._stackHandles[handleKey], + handle; + + if (handles && handles.length > 0) { + while((handle = handles.pop())) { + handle.detach(); + } + } + }, + + /** + * Creates the shim element and adds it to the DOM + * + * @method _renderShim + * @private + */ + _renderShim : function() { + var shimEl = this._shimNode, + stackEl = this._stackNode; + + if (!shimEl) { + shimEl = this._shimNode = this._getShimTemplate(); + stackEl.insertBefore(shimEl, stackEl.get(FIRST_CHILD)); + + this._detachStackHandles(SHIM_DEFERRED); + this.sizeShim(); + } + }, + + /** + * Removes the shim from the DOM, and detaches any related event + * listeners. + * + * @method _destroyShim + * @private + */ + _destroyShim : function() { + if (this._shimNode) { + this._shimNode.get(PARENT_NODE).removeChild(this._shimNode); + this._shimNode = null; + + this._detachStackHandles(SHIM_DEFERRED); + this._detachStackHandles(SHIM_RESIZE); + } + }, + + /** + * For IE6, synchronizes the size and position of iframe shim to that of + * Widget bounding box which it is protecting. For all other browsers, + * this method does not do anything. + * + * @method sizeShim + */ + sizeShim: function () { + var shim = this._shimNode, + node = this._stackNode; + + if (shim && UA.ie === 6 && this.get(VISIBLE)) { + shim.setStyle(WIDTH, node.get(OFFSET_WIDTH) + PX); + shim.setStyle(HEIGHT, node.get(OFFSET_HEIGHT) + PX); + } + }, + + /** + * Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance. + * + * @method _getShimTemplate + * @private + * @return {Node} node A new shim Node instance. + */ + _getShimTemplate : function() { + return Node.create(Stack.SHIM_TEMPLATE, this._stackNode.get(OWNER_DOCUMENT)); + } + }; + + Y.WidgetStack = Stack; + + +}, '3.17.2', {"requires": ["base-build", "widget"], "skinnable": true}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack-min.js b/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack-min.js new file mode 100644 index 0000000..1258006 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("widget-stack",function(e,t){function O(e){}var n=e.Lang,r=e.UA,i=e.Node,s=e.Widget,o="zIndex",u="shim",a="visible",f="boundingBox",l="renderUI",c="bindUI",h="syncUI",p="offsetWidth",d="offsetHeight",v="parentNode",m="firstChild",g="ownerDocument",y="width",b="height",w="px",E="shimdeferred",S="shimresize",x="visibleChange",T="widthChange",N="heightChange",C="shimChange",k="zIndexChange",L="contentUpdate",A="stacked";O.ATTRS={shim:{value:r.ie==6},zIndex:{value:0,setter:"_setZIndex"}},O.HTML_PARSER={zIndex:function(e){return this._parseZIndex(e)}},O.SHIM_CLASS_NAME=s.getClassName(u),O.STACKED_CLASS_NAME=s.getClassName(A),O.SHIM_TEMPLATE='',O.prototype={initializer:function(){this._stackNode=this.get(f),this._stackHandles={},e.after(this._renderUIStack,this,l),e.after(this._syncUIStack,this,h),e.after(this._bindUIStack,this,c)},_syncUIStack:function(){this._uiSetShim(this.get(u)),this._uiSetZIndex(this.get(o))},_bindUIStack:function(){this.after(C,this._afterShimChange),this.after(k,this._afterZIndexChange)},_renderUIStack:function(){this._stackNode.addClass(O.STACKED_CLASS_NAME)},_parseZIndex:function(e){var t;return!e.inDoc()||e.getStyle("position")==="static"?t="auto":t=e.getComputedStyle("zIndex"),t==="auto"?null:t},_setZIndex:function(e){return n.isString(e)&&(e=parseInt(e,10)),n.isNumber(e)||(e=0),e},_afterShimChange:function(e){this._uiSetShim(e.newVal)},_afterZIndexChange:function(e){this._uiSetZIndex(e.newVal)},_uiSetZIndex:function(e){this._stackNode.setStyle(o,e)},_uiSetShim:function(e){e?(this.get(a)?this._renderShim():this._renderShimDeferred(),r.ie==6&&this._addShimResizeHandlers()):this._destroyShim()},_renderShimDeferred:function(){this._stackHandles[E]=this._stackHandles[E]||[];var e=this._stackHandles[E],t=function(e){e.newVal&&this._renderShim()};e.push(this.on(x,t))},_addShimResizeHandlers:function(){this._stackHandles[S]=this._stackHandles[S]||[];var e=this.sizeShim,t=this._stackHandles[S];t.push(this.after(x,e)),t.push(this.after(T,e)),t.push(this.after(N,e)),t.push(this.after(L,e))},_detachStackHandles:function(e){var t=this._stackHandles[e],n;if(t&&t.length>0)while(n=t.pop())n.detach()},_renderShim:function(){var e=this._shimNode,t=this._stackNode;e||(e=this._shimNode=this._getShimTemplate(),t.insertBefore(e,t.get(m)),this._detachStackHandles(E),this.sizeShim())},_destroyShim:function(){this._shimNode&&(this._shimNode.get(v).removeChild(this._shimNode),this._shimNode=null,this._detachStackHandles(E),this._detachStackHandles(S))},sizeShim:function(){var e=this._shimNode,t=this._stackNode;e&&r.ie===6&&this.get(a)&&(e.setStyle(y,t.get(p)+w),e.setStyle(b,t.get(d)+w))},_getShimTemplate:function(){return i.create(O.SHIM_TEMPLATE,this._stackNode.get(g))}},e.WidgetStack=O},"3.17.2",{requires:["base-build","widget"],skinnable:!0}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack.js b/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack.js new file mode 100644 index 0000000..d8ad2ee --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-stack/widget-stack.js @@ -0,0 +1,447 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('widget-stack', function (Y, NAME) { + +/** + * Provides stackable (z-index) support for Widgets through an extension. + * + * @module widget-stack + */ + var L = Y.Lang, + UA = Y.UA, + Node = Y.Node, + Widget = Y.Widget, + + ZINDEX = "zIndex", + SHIM = "shim", + VISIBLE = "visible", + + BOUNDING_BOX = "boundingBox", + + RENDER_UI = "renderUI", + BIND_UI = "bindUI", + SYNC_UI = "syncUI", + + OFFSET_WIDTH = "offsetWidth", + OFFSET_HEIGHT = "offsetHeight", + PARENT_NODE = "parentNode", + FIRST_CHILD = "firstChild", + OWNER_DOCUMENT = "ownerDocument", + + WIDTH = "width", + HEIGHT = "height", + PX = "px", + + // HANDLE KEYS + SHIM_DEFERRED = "shimdeferred", + SHIM_RESIZE = "shimresize", + + // Events + VisibleChange = "visibleChange", + WidthChange = "widthChange", + HeightChange = "heightChange", + ShimChange = "shimChange", + ZIndexChange = "zIndexChange", + ContentUpdate = "contentUpdate", + + // CSS + STACKED = "stacked"; + + /** + * Widget extension, which can be used to add stackable (z-index) support to the + * base Widget class along with a shimming solution, through the + * Base.build method. + * + * @class WidgetStack + * @param {Object} User configuration object + */ + function Stack(config) {} + + // Static Properties + /** + * Static property used to define the default attribute + * configuration introduced by WidgetStack. + * + * @property ATTRS + * @type Object + * @static + */ + Stack.ATTRS = { + /** + * @attribute shim + * @type boolean + * @default false, for all browsers other than IE6, for which a shim is enabled by default. + * + * @description Boolean flag to indicate whether or not a shim should be added to the Widgets + * boundingBox, to protect it from select box bleedthrough. + */ + shim: { + value: (UA.ie == 6) + }, + + /** + * @attribute zIndex + * @type number + * @default 0 + * @description The z-index to apply to the Widgets boundingBox. Non-numerical values for + * zIndex will be converted to 0 + */ + zIndex: { + value : 0, + setter: '_setZIndex' + } + }; + + /** + * The HTML parsing rules for the WidgetStack class. + * + * @property HTML_PARSER + * @static + * @type Object + */ + Stack.HTML_PARSER = { + zIndex: function (srcNode) { + return this._parseZIndex(srcNode); + } + }; + + /** + * Default class used to mark the shim element + * + * @property SHIM_CLASS_NAME + * @type String + * @static + * @default "yui3-widget-shim" + */ + Stack.SHIM_CLASS_NAME = Widget.getClassName(SHIM); + + /** + * Default class used to mark the boundingBox of a stacked widget. + * + * @property STACKED_CLASS_NAME + * @type String + * @static + * @default "yui3-widget-stacked" + */ + Stack.STACKED_CLASS_NAME = Widget.getClassName(STACKED); + + /** + * Default markup template used to generate the shim element. + * + * @property SHIM_TEMPLATE + * @type String + * @static + */ + Stack.SHIM_TEMPLATE = ''; + + Stack.prototype = { + + initializer : function() { + this._stackNode = this.get(BOUNDING_BOX); + this._stackHandles = {}; + + // WIDGET METHOD OVERLAP + Y.after(this._renderUIStack, this, RENDER_UI); + Y.after(this._syncUIStack, this, SYNC_UI); + Y.after(this._bindUIStack, this, BIND_UI); + }, + + /** + * Synchronizes the UI to match the Widgets stack state. This method in + * invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure. + * + * @method _syncUIStack + * @protected + */ + _syncUIStack: function() { + this._uiSetShim(this.get(SHIM)); + this._uiSetZIndex(this.get(ZINDEX)); + }, + + /** + * Binds event listeners responsible for updating the UI state in response to + * Widget stack related state changes. + *

            + * This method is invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _bindUIStack + * @protected + */ + _bindUIStack: function() { + this.after(ShimChange, this._afterShimChange); + this.after(ZIndexChange, this._afterZIndexChange); + }, + + /** + * Creates/Initializes the DOM to support stackability. + *

            + * This method in invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _renderUIStack + * @protected + */ + _renderUIStack: function() { + this._stackNode.addClass(Stack.STACKED_CLASS_NAME); + }, + + /** + Parses a `zIndex` attribute value from this widget's `srcNode`. + + @method _parseZIndex + @param {Node} srcNode The node to parse a `zIndex` value from. + @return {Mixed} The parsed `zIndex` value. + @protected + **/ + _parseZIndex: function (srcNode) { + var zIndex; + + // Prefers how WebKit handles `z-index` which better matches the + // spec: + // + // * http://www.w3.org/TR/CSS2/visuren.html#z-index + // * https://bugs.webkit.org/show_bug.cgi?id=15562 + // + // When a node isn't rendered in the document, and/or when a + // node is not positioned, then it doesn't have a context to derive + // a valid `z-index` value from. + if (!srcNode.inDoc() || srcNode.getStyle('position') === 'static') { + zIndex = 'auto'; + } else { + // Uses `getComputedStyle()` because it has greater accuracy in + // more browsers than `getStyle()` does for `z-index`. + zIndex = srcNode.getComputedStyle('zIndex'); + } + + // This extension adds a stacking context to widgets, therefore a + // `srcNode` witout a stacking context (i.e. "auto") will return + // `null` from this DOM parser. This way the widget's default or + // user provided value for `zIndex` will be used. + return zIndex === 'auto' ? null : zIndex; + }, + + /** + * Default setter for zIndex attribute changes. Normalizes zIndex values to + * numbers, converting non-numerical values to 0. + * + * @method _setZIndex + * @protected + * @param {String | Number} zIndex + * @return {Number} Normalized zIndex + */ + _setZIndex: function(zIndex) { + if (L.isString(zIndex)) { + zIndex = parseInt(zIndex, 10); + } + if (!L.isNumber(zIndex)) { + zIndex = 0; + } + return zIndex; + }, + + /** + * Default attribute change listener for the shim attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterShimChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterShimChange : function(e) { + this._uiSetShim(e.newVal); + }, + + /** + * Default attribute change listener for the zIndex attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterZIndexChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterZIndexChange : function(e) { + this._uiSetZIndex(e.newVal); + }, + + /** + * Updates the UI to reflect the zIndex value passed in. + * + * @method _uiSetZIndex + * @protected + * @param {number} zIndex The zindex to be reflected in the UI + */ + _uiSetZIndex: function (zIndex) { + this._stackNode.setStyle(ZINDEX, zIndex); + }, + + /** + * Updates the UI to enable/disable the shim. If the widget is not currently visible, + * creation of the shim is deferred until it is made visible, for performance reasons. + * + * @method _uiSetShim + * @protected + * @param {boolean} enable If true, creates/renders the shim, if false, removes it. + */ + _uiSetShim: function (enable) { + if (enable) { + // Lazy creation + if (this.get(VISIBLE)) { + this._renderShim(); + } else { + this._renderShimDeferred(); + } + + // Eagerly attach resize handlers + // + // Required because of Event stack behavior, commit ref: cd8dddc + // Should be revisted after Ticket #2531067 is resolved. + if (UA.ie == 6) { + this._addShimResizeHandlers(); + } + } else { + this._destroyShim(); + } + }, + + /** + * Sets up change handlers for the visible attribute, to defer shim creation/rendering + * until the Widget is made visible. + * + * @method _renderShimDeferred + * @private + */ + _renderShimDeferred : function() { + + this._stackHandles[SHIM_DEFERRED] = this._stackHandles[SHIM_DEFERRED] || []; + + var handles = this._stackHandles[SHIM_DEFERRED], + createBeforeVisible = function(e) { + if (e.newVal) { + this._renderShim(); + } + }; + + handles.push(this.on(VisibleChange, createBeforeVisible)); + // Depending how how Ticket #2531067 is resolved, a reversal of + // commit ref: cd8dddc could lead to a more elagent solution, with + // the addition of this line here: + // + // handles.push(this.after(VisibleChange, this.sizeShim)); + }, + + /** + * Sets up event listeners to resize the shim when the size of the Widget changes. + *

            + * NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to + * resize the shim purely through CSS, when the Widget does not have an explicit width/height + * set. + *

            + * @method _addShimResizeHandlers + * @private + */ + _addShimResizeHandlers : function() { + + this._stackHandles[SHIM_RESIZE] = this._stackHandles[SHIM_RESIZE] || []; + + var sizeShim = this.sizeShim, + handles = this._stackHandles[SHIM_RESIZE]; + + handles.push(this.after(VisibleChange, sizeShim)); + handles.push(this.after(WidthChange, sizeShim)); + handles.push(this.after(HeightChange, sizeShim)); + handles.push(this.after(ContentUpdate, sizeShim)); + }, + + /** + * Detaches any handles stored for the provided key + * + * @method _detachStackHandles + * @param String handleKey The key defining the group of handles which should be detached + * @private + */ + _detachStackHandles : function(handleKey) { + var handles = this._stackHandles[handleKey], + handle; + + if (handles && handles.length > 0) { + while((handle = handles.pop())) { + handle.detach(); + } + } + }, + + /** + * Creates the shim element and adds it to the DOM + * + * @method _renderShim + * @private + */ + _renderShim : function() { + var shimEl = this._shimNode, + stackEl = this._stackNode; + + if (!shimEl) { + shimEl = this._shimNode = this._getShimTemplate(); + stackEl.insertBefore(shimEl, stackEl.get(FIRST_CHILD)); + + this._detachStackHandles(SHIM_DEFERRED); + this.sizeShim(); + } + }, + + /** + * Removes the shim from the DOM, and detaches any related event + * listeners. + * + * @method _destroyShim + * @private + */ + _destroyShim : function() { + if (this._shimNode) { + this._shimNode.get(PARENT_NODE).removeChild(this._shimNode); + this._shimNode = null; + + this._detachStackHandles(SHIM_DEFERRED); + this._detachStackHandles(SHIM_RESIZE); + } + }, + + /** + * For IE6, synchronizes the size and position of iframe shim to that of + * Widget bounding box which it is protecting. For all other browsers, + * this method does not do anything. + * + * @method sizeShim + */ + sizeShim: function () { + var shim = this._shimNode, + node = this._stackNode; + + if (shim && UA.ie === 6 && this.get(VISIBLE)) { + shim.setStyle(WIDTH, node.get(OFFSET_WIDTH) + PX); + shim.setStyle(HEIGHT, node.get(OFFSET_HEIGHT) + PX); + } + }, + + /** + * Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance. + * + * @method _getShimTemplate + * @private + * @return {Node} node A new shim Node instance. + */ + _getShimTemplate : function() { + return Node.create(Stack.SHIM_TEMPLATE, this._stackNode.get(OWNER_DOCUMENT)); + } + }; + + Y.WidgetStack = Stack; + + +}, '3.17.2', {"requires": ["base-build", "widget"], "skinnable": true}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-coverage.js b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-coverage.js new file mode 100644 index 0000000..6542816 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/widget-stdmod/widget-stdmod.js']) { + __coverage__['build/widget-stdmod/widget-stdmod.js'] = {"path":"build/widget-stdmod/widget-stdmod.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0,0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":44}}},"2":{"name":"StdMod","line":62,"loc":{"start":{"line":62,"column":4},"end":{"line":62,"column":28}}},"3":{"name":"(anonymous_3)","line":187,"loc":{"start":{"line":187,"column":23},"end":{"line":187,"column":37}}},"4":{"name":"(anonymous_4)","line":201,"loc":{"start":{"line":201,"column":23},"end":{"line":201,"column":44}}},"5":{"name":"(anonymous_5)","line":205,"loc":{"start":{"line":205,"column":21},"end":{"line":205,"column":42}}},"6":{"name":"(anonymous_6)","line":209,"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":45}}},"7":{"name":"(anonymous_7)","line":252,"loc":{"start":{"line":252,"column":22},"end":{"line":252,"column":33}}},"8":{"name":"(anonymous_8)","line":269,"loc":{"start":{"line":269,"column":24},"end":{"line":269,"column":35}}},"9":{"name":"(anonymous_9)","line":296,"loc":{"start":{"line":296,"column":26},"end":{"line":296,"column":37}}},"10":{"name":"(anonymous_10)","line":307,"loc":{"start":{"line":307,"column":32},"end":{"line":307,"column":43}}},"11":{"name":"(anonymous_11)","line":323,"loc":{"start":{"line":323,"column":24},"end":{"line":323,"column":35}}},"12":{"name":"(anonymous_12)","line":341,"loc":{"start":{"line":341,"column":29},"end":{"line":341,"column":41}}},"13":{"name":"(anonymous_13)","line":355,"loc":{"start":{"line":355,"column":27},"end":{"line":355,"column":39}}},"14":{"name":"(anonymous_14)","line":369,"loc":{"start":{"line":369,"column":29},"end":{"line":369,"column":41}}},"15":{"name":"(anonymous_15)","line":383,"loc":{"start":{"line":383,"column":32},"end":{"line":383,"column":45}}},"16":{"name":"(anonymous_16)","line":397,"loc":{"start":{"line":397,"column":30},"end":{"line":397,"column":44}}},"17":{"name":"(anonymous_17)","line":410,"loc":{"start":{"line":410,"column":27},"end":{"line":410,"column":49}}},"18":{"name":"(anonymous_18)","line":433,"loc":{"start":{"line":433,"column":22},"end":{"line":433,"column":33}}},"19":{"name":"(anonymous_19)","line":455,"loc":{"start":{"line":455,"column":23},"end":{"line":455,"column":57}}},"20":{"name":"(anonymous_20)","line":477,"loc":{"start":{"line":477,"column":24},"end":{"line":477,"column":42}}},"21":{"name":"(anonymous_21)","line":499,"loc":{"start":{"line":499,"column":23},"end":{"line":499,"column":41}}},"22":{"name":"(anonymous_22)","line":516,"loc":{"start":{"line":516,"column":31},"end":{"line":516,"column":74}}},"23":{"name":"(anonymous_23)","line":544,"loc":{"start":{"line":544,"column":29},"end":{"line":544,"column":47}}},"24":{"name":"(anonymous_24)","line":561,"loc":{"start":{"line":561,"column":28},"end":{"line":561,"column":60}}},"25":{"name":"(anonymous_25)","line":587,"loc":{"start":{"line":587,"column":28},"end":{"line":587,"column":43}}},"26":{"name":"(anonymous_26)","line":610,"loc":{"start":{"line":610,"column":28},"end":{"line":610,"column":46}}},"27":{"name":"(anonymous_27)","line":623,"loc":{"start":{"line":623,"column":27},"end":{"line":623,"column":45}}},"28":{"name":"(anonymous_28)","line":650,"loc":{"start":{"line":650,"column":35},"end":{"line":650,"column":66}}},"29":{"name":"(anonymous_29)","line":667,"loc":{"start":{"line":667,"column":28},"end":{"line":667,"column":46}}},"30":{"name":"(anonymous_30)","line":683,"loc":{"start":{"line":683,"column":27},"end":{"line":683,"column":61}}},"31":{"name":"(anonymous_31)","line":705,"loc":{"start":{"line":705,"column":24},"end":{"line":705,"column":55}}},"32":{"name":"(anonymous_32)","line":732,"loc":{"start":{"line":732,"column":21},"end":{"line":732,"column":36}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":780,"column":53}},"2":{"start":{"line":8,"column":4},"end":{"line":49,"column":29}},"3":{"start":{"line":62,"column":4},"end":{"line":62,"column":30}},"4":{"start":{"line":71,"column":4},"end":{"line":71,"column":27}},"5":{"start":{"line":80,"column":4},"end":{"line":80,"column":23}},"6":{"start":{"line":89,"column":4},"end":{"line":89,"column":27}},"7":{"start":{"line":101,"column":4},"end":{"line":101,"column":27}},"8":{"start":{"line":113,"column":4},"end":{"line":113,"column":29}},"9":{"start":{"line":124,"column":4},"end":{"line":124,"column":31}},"10":{"start":{"line":126,"column":4},"end":{"line":132,"column":49}},"11":{"start":{"line":142,"column":4},"end":{"line":191,"column":6}},"12":{"start":{"line":188,"column":17},"end":{"line":188,"column":54}},"13":{"start":{"line":200,"column":4},"end":{"line":212,"column":6}},"14":{"start":{"line":202,"column":12},"end":{"line":202,"column":53}},"15":{"start":{"line":206,"column":12},"end":{"line":206,"column":51}},"16":{"start":{"line":210,"column":12},"end":{"line":210,"column":53}},"17":{"start":{"line":223,"column":4},"end":{"line":227,"column":6}},"18":{"start":{"line":244,"column":4},"end":{"line":248,"column":6}},"19":{"start":{"line":250,"column":4},"end":{"line":775,"column":6}},"20":{"start":{"line":253,"column":12},"end":{"line":253,"column":53}},"21":{"start":{"line":255,"column":12},"end":{"line":255,"column":59}},"22":{"start":{"line":256,"column":12},"end":{"line":256,"column":55}},"23":{"start":{"line":257,"column":12},"end":{"line":257,"column":55}},"24":{"start":{"line":270,"column":12},"end":{"line":270,"column":50}},"25":{"start":{"line":272,"column":12},"end":{"line":274,"column":13}},"26":{"start":{"line":273,"column":16},"end":{"line":273,"column":72}},"27":{"start":{"line":276,"column":12},"end":{"line":278,"column":13}},"28":{"start":{"line":277,"column":16},"end":{"line":277,"column":68}},"29":{"start":{"line":280,"column":12},"end":{"line":282,"column":13}},"30":{"start":{"line":281,"column":16},"end":{"line":281,"column":72}},"31":{"start":{"line":284,"column":12},"end":{"line":284,"column":57}},"32":{"start":{"line":297,"column":12},"end":{"line":297,"column":67}},"33":{"start":{"line":298,"column":12},"end":{"line":298,"column":41}},"34":{"start":{"line":302,"column":12},"end":{"line":302,"column":62}},"35":{"start":{"line":303,"column":12},"end":{"line":303,"column":58}},"36":{"start":{"line":304,"column":12},"end":{"line":304,"column":62}},"37":{"start":{"line":308,"column":12},"end":{"line":308,"column":88}},"38":{"start":{"line":308,"column":55},"end":{"line":308,"column":86}},"39":{"start":{"line":309,"column":12},"end":{"line":309,"column":84}},"40":{"start":{"line":309,"column":53},"end":{"line":309,"column":82}},"41":{"start":{"line":310,"column":12},"end":{"line":310,"column":88}},"42":{"start":{"line":310,"column":55},"end":{"line":310,"column":86}},"43":{"start":{"line":328,"column":12},"end":{"line":328,"column":70}},"44":{"start":{"line":329,"column":12},"end":{"line":329,"column":55}},"45":{"start":{"line":330,"column":12},"end":{"line":330,"column":56}},"46":{"start":{"line":342,"column":12},"end":{"line":344,"column":13}},"47":{"start":{"line":343,"column":16},"end":{"line":343,"column":74}},"48":{"start":{"line":356,"column":12},"end":{"line":358,"column":13}},"49":{"start":{"line":357,"column":16},"end":{"line":357,"column":72}},"50":{"start":{"line":370,"column":12},"end":{"line":372,"column":13}},"51":{"start":{"line":371,"column":16},"end":{"line":371,"column":74}},"52":{"start":{"line":384,"column":12},"end":{"line":384,"column":44}},"53":{"start":{"line":398,"column":12},"end":{"line":398,"column":94}},"54":{"start":{"line":411,"column":12},"end":{"line":411,"column":59}},"55":{"start":{"line":412,"column":12},"end":{"line":412,"column":46}},"56":{"start":{"line":414,"column":12},"end":{"line":416,"column":13}},"57":{"start":{"line":415,"column":16},"end":{"line":415,"column":49}},"58":{"start":{"line":418,"column":12},"end":{"line":420,"column":13}},"59":{"start":{"line":419,"column":16},"end":{"line":419,"column":46}},"60":{"start":{"line":422,"column":12},"end":{"line":422,"column":31}},"61":{"start":{"line":434,"column":12},"end":{"line":439,"column":13}},"62":{"start":{"line":435,"column":16},"end":{"line":435,"column":46}},"63":{"start":{"line":436,"column":16},"end":{"line":438,"column":17}},"64":{"start":{"line":437,"column":20},"end":{"line":437,"column":79}},"65":{"start":{"line":457,"column":12},"end":{"line":465,"column":13}},"66":{"start":{"line":458,"column":16},"end":{"line":458,"column":61}},"67":{"start":{"line":460,"column":16},"end":{"line":460,"column":61}},"68":{"start":{"line":462,"column":16},"end":{"line":462,"column":94}},"69":{"start":{"line":464,"column":16},"end":{"line":464,"column":43}},"70":{"start":{"line":466,"column":12},"end":{"line":466,"column":37}},"71":{"start":{"line":479,"column":12},"end":{"line":480,"column":63}},"72":{"start":{"line":482,"column":12},"end":{"line":484,"column":13}},"73":{"start":{"line":483,"column":16},"end":{"line":483,"column":63}},"74":{"start":{"line":486,"column":12},"end":{"line":486,"column":72}},"75":{"start":{"line":488,"column":12},"end":{"line":488,"column":54}},"76":{"start":{"line":489,"column":12},"end":{"line":489,"column":47}},"77":{"start":{"line":500,"column":12},"end":{"line":500,"column":58}},"78":{"start":{"line":501,"column":12},"end":{"line":504,"column":13}},"79":{"start":{"line":502,"column":16},"end":{"line":502,"column":41}},"80":{"start":{"line":503,"column":16},"end":{"line":503,"column":51}},"81":{"start":{"line":517,"column":12},"end":{"line":517,"column":49}},"82":{"start":{"line":519,"column":12},"end":{"line":532,"column":13}},"83":{"start":{"line":520,"column":16},"end":{"line":520,"column":52}},"84":{"start":{"line":522,"column":16},"end":{"line":531,"column":17}},"85":{"start":{"line":523,"column":20},"end":{"line":523,"column":61}},"86":{"start":{"line":525,"column":20},"end":{"line":525,"column":64}},"87":{"start":{"line":526,"column":20},"end":{"line":530,"column":21}},"88":{"start":{"line":527,"column":24},"end":{"line":527,"column":69}},"89":{"start":{"line":529,"column":24},"end":{"line":529,"column":60}},"90":{"start":{"line":545,"column":12},"end":{"line":545,"column":96}},"91":{"start":{"line":564,"column":12},"end":{"line":573,"column":13}},"92":{"start":{"line":566,"column":20},"end":{"line":566,"column":30}},"93":{"start":{"line":567,"column":20},"end":{"line":567,"column":26}},"94":{"start":{"line":569,"column":20},"end":{"line":569,"column":38}},"95":{"start":{"line":570,"column":20},"end":{"line":570,"column":26}},"96":{"start":{"line":572,"column":20},"end":{"line":572,"column":43}},"97":{"start":{"line":575,"column":12},"end":{"line":575,"column":41}},"98":{"start":{"line":588,"column":12},"end":{"line":589,"column":49}},"99":{"start":{"line":591,"column":12},"end":{"line":596,"column":13}},"100":{"start":{"line":592,"column":16},"end":{"line":592,"column":56}},"101":{"start":{"line":593,"column":16},"end":{"line":595,"column":17}},"102":{"start":{"line":594,"column":20},"end":{"line":594,"column":70}},"103":{"start":{"line":598,"column":12},"end":{"line":598,"column":26}},"104":{"start":{"line":611,"column":12},"end":{"line":611,"column":90}},"105":{"start":{"line":625,"column":12},"end":{"line":625,"column":56}},"106":{"start":{"line":627,"column":12},"end":{"line":635,"column":13}},"107":{"start":{"line":628,"column":16},"end":{"line":631,"column":17}},"108":{"start":{"line":629,"column":20},"end":{"line":629,"column":44}},"109":{"start":{"line":630,"column":20},"end":{"line":630,"column":87}},"110":{"start":{"line":632,"column":16},"end":{"line":632,"column":65}},"111":{"start":{"line":634,"column":16},"end":{"line":634,"column":45}},"112":{"start":{"line":637,"column":12},"end":{"line":637,"column":24}},"113":{"start":{"line":651,"column":12},"end":{"line":651,"column":44}},"114":{"start":{"line":652,"column":12},"end":{"line":656,"column":13}},"115":{"start":{"line":653,"column":16},"end":{"line":653,"column":96}},"116":{"start":{"line":654,"column":16},"end":{"line":654,"column":90}},"117":{"start":{"line":655,"column":16},"end":{"line":655,"column":96}},"118":{"start":{"line":668,"column":12},"end":{"line":668,"column":103}},"119":{"start":{"line":685,"column":12},"end":{"line":685,"column":80}},"120":{"start":{"line":706,"column":12},"end":{"line":706,"column":59}},"121":{"start":{"line":708,"column":12},"end":{"line":710,"column":13}},"122":{"start":{"line":709,"column":16},"end":{"line":709,"column":51}},"123":{"start":{"line":712,"column":12},"end":{"line":712,"column":24}},"124":{"start":{"line":733,"column":12},"end":{"line":773,"column":13}},"125":{"start":{"line":734,"column":16},"end":{"line":741,"column":38}},"126":{"start":{"line":743,"column":16},"end":{"line":752,"column":17}},"127":{"start":{"line":744,"column":20},"end":{"line":744,"column":48}},"128":{"start":{"line":745,"column":20},"end":{"line":751,"column":21}},"129":{"start":{"line":746,"column":24},"end":{"line":750,"column":25}},"130":{"start":{"line":747,"column":28},"end":{"line":747,"column":73}},"131":{"start":{"line":749,"column":28},"end":{"line":749,"column":45}},"132":{"start":{"line":754,"column":16},"end":{"line":772,"column":17}},"133":{"start":{"line":755,"column":20},"end":{"line":758,"column":21}},"134":{"start":{"line":757,"column":24},"end":{"line":757,"column":51}},"135":{"start":{"line":760,"column":20},"end":{"line":764,"column":88}},"136":{"start":{"line":766,"column":20},"end":{"line":771,"column":21}},"137":{"start":{"line":767,"column":24},"end":{"line":767,"column":61}},"138":{"start":{"line":768,"column":24},"end":{"line":770,"column":25}},"139":{"start":{"line":769,"column":28},"end":{"line":769,"column":63}},"140":{"start":{"line":777,"column":4},"end":{"line":777,"column":28}}},"branchMap":{"1":{"line":272,"type":"if","locations":[{"start":{"line":272,"column":12},"end":{"line":272,"column":12}},{"start":{"line":272,"column":12},"end":{"line":272,"column":12}}]},"2":{"line":272,"type":"binary-expr","locations":[{"start":{"line":272,"column":16},"end":{"line":272,"column":29}},{"start":{"line":272,"column":33},"end":{"line":272,"column":62}}]},"3":{"line":276,"type":"if","locations":[{"start":{"line":276,"column":12},"end":{"line":276,"column":12}},{"start":{"line":276,"column":12},"end":{"line":276,"column":12}}]},"4":{"line":276,"type":"binary-expr","locations":[{"start":{"line":276,"column":16},"end":{"line":276,"column":29}},{"start":{"line":276,"column":33},"end":{"line":276,"column":60}}]},"5":{"line":280,"type":"if","locations":[{"start":{"line":280,"column":12},"end":{"line":280,"column":12}},{"start":{"line":280,"column":12},"end":{"line":280,"column":12}}]},"6":{"line":280,"type":"binary-expr","locations":[{"start":{"line":280,"column":16},"end":{"line":280,"column":29}},{"start":{"line":280,"column":33},"end":{"line":280,"column":62}}]},"7":{"line":308,"type":"if","locations":[{"start":{"line":308,"column":12},"end":{"line":308,"column":12}},{"start":{"line":308,"column":12},"end":{"line":308,"column":12}}]},"8":{"line":309,"type":"if","locations":[{"start":{"line":309,"column":12},"end":{"line":309,"column":12}},{"start":{"line":309,"column":12},"end":{"line":309,"column":12}}]},"9":{"line":310,"type":"if","locations":[{"start":{"line":310,"column":12},"end":{"line":310,"column":12}},{"start":{"line":310,"column":12},"end":{"line":310,"column":12}}]},"10":{"line":342,"type":"if","locations":[{"start":{"line":342,"column":12},"end":{"line":342,"column":12}},{"start":{"line":342,"column":12},"end":{"line":342,"column":12}}]},"11":{"line":356,"type":"if","locations":[{"start":{"line":356,"column":12},"end":{"line":356,"column":12}},{"start":{"line":356,"column":12},"end":{"line":356,"column":12}}]},"12":{"line":370,"type":"if","locations":[{"start":{"line":370,"column":12},"end":{"line":370,"column":12}},{"start":{"line":370,"column":12},"end":{"line":370,"column":12}}]},"13":{"line":398,"type":"binary-expr","locations":[{"start":{"line":398,"column":19},"end":{"line":398,"column":23}},{"start":{"line":398,"column":27},"end":{"line":398,"column":45}},{"start":{"line":398,"column":49},"end":{"line":398,"column":69}},{"start":{"line":398,"column":73},"end":{"line":398,"column":93}}]},"14":{"line":414,"type":"if","locations":[{"start":{"line":414,"column":12},"end":{"line":414,"column":12}},{"start":{"line":414,"column":12},"end":{"line":414,"column":12}}]},"15":{"line":414,"type":"binary-expr","locations":[{"start":{"line":414,"column":16},"end":{"line":414,"column":24}},{"start":{"line":414,"column":28},"end":{"line":414,"column":49}}]},"16":{"line":418,"type":"if","locations":[{"start":{"line":418,"column":12},"end":{"line":418,"column":12}},{"start":{"line":418,"column":12},"end":{"line":418,"column":12}}]},"17":{"line":434,"type":"if","locations":[{"start":{"line":434,"column":12},"end":{"line":434,"column":12}},{"start":{"line":434,"column":12},"end":{"line":434,"column":12}}]},"18":{"line":436,"type":"if","locations":[{"start":{"line":436,"column":16},"end":{"line":436,"column":16}},{"start":{"line":436,"column":16},"end":{"line":436,"column":16}}]},"19":{"line":436,"type":"binary-expr","locations":[{"start":{"line":436,"column":20},"end":{"line":436,"column":35}},{"start":{"line":436,"column":39},"end":{"line":436,"column":53}}]},"20":{"line":457,"type":"if","locations":[{"start":{"line":457,"column":12},"end":{"line":457,"column":12}},{"start":{"line":457,"column":12},"end":{"line":457,"column":12}}]},"21":{"line":482,"type":"if","locations":[{"start":{"line":482,"column":12},"end":{"line":482,"column":12}},{"start":{"line":482,"column":12},"end":{"line":482,"column":12}}]},"22":{"line":501,"type":"if","locations":[{"start":{"line":501,"column":12},"end":{"line":501,"column":12}},{"start":{"line":501,"column":12},"end":{"line":501,"column":12}}]},"23":{"line":519,"type":"if","locations":[{"start":{"line":519,"column":12},"end":{"line":519,"column":12}},{"start":{"line":519,"column":12},"end":{"line":519,"column":12}}]},"24":{"line":519,"type":"binary-expr","locations":[{"start":{"line":519,"column":16},"end":{"line":519,"column":38}},{"start":{"line":519,"column":42},"end":{"line":519,"column":45}}]},"25":{"line":522,"type":"if","locations":[{"start":{"line":522,"column":16},"end":{"line":522,"column":16}},{"start":{"line":522,"column":16},"end":{"line":522,"column":16}}]},"26":{"line":526,"type":"if","locations":[{"start":{"line":526,"column":20},"end":{"line":526,"column":20}},{"start":{"line":526,"column":20},"end":{"line":526,"column":20}}]},"27":{"line":564,"type":"switch","locations":[{"start":{"line":565,"column":16},"end":{"line":567,"column":26}},{"start":{"line":568,"column":16},"end":{"line":570,"column":26}},{"start":{"line":571,"column":16},"end":{"line":572,"column":43}}]},"28":{"line":588,"type":"cond-expr","locations":[{"start":{"line":588,"column":34},"end":{"line":588,"column":57}},{"start":{"line":588,"column":60},"end":{"line":588,"column":61}}]},"29":{"line":591,"type":"if","locations":[{"start":{"line":591,"column":12},"end":{"line":591,"column":12}},{"start":{"line":591,"column":12},"end":{"line":591,"column":12}}]},"30":{"line":591,"type":"binary-expr","locations":[{"start":{"line":591,"column":16},"end":{"line":591,"column":20}},{"start":{"line":591,"column":24},"end":{"line":591,"column":46}}]},"31":{"line":593,"type":"if","locations":[{"start":{"line":593,"column":16},"end":{"line":593,"column":16}},{"start":{"line":593,"column":16},"end":{"line":593,"column":16}}]},"32":{"line":627,"type":"if","locations":[{"start":{"line":627,"column":12},"end":{"line":627,"column":12}},{"start":{"line":627,"column":12},"end":{"line":627,"column":12}}]},"33":{"line":628,"type":"if","locations":[{"start":{"line":628,"column":16},"end":{"line":628,"column":16}},{"start":{"line":628,"column":16},"end":{"line":628,"column":16}}]},"34":{"line":652,"type":"if","locations":[{"start":{"line":652,"column":12},"end":{"line":652,"column":12}},{"start":{"line":652,"column":12},"end":{"line":652,"column":12}}]},"35":{"line":653,"type":"binary-expr","locations":[{"start":{"line":653,"column":41},"end":{"line":653,"column":65}},{"start":{"line":653,"column":70},"end":{"line":653,"column":94}}]},"36":{"line":654,"type":"binary-expr","locations":[{"start":{"line":654,"column":39},"end":{"line":654,"column":61}},{"start":{"line":654,"column":66},"end":{"line":654,"column":88}}]},"37":{"line":655,"type":"binary-expr","locations":[{"start":{"line":655,"column":41},"end":{"line":655,"column":65}},{"start":{"line":655,"column":70},"end":{"line":655,"column":94}}]},"38":{"line":668,"type":"cond-expr","locations":[{"start":{"line":668,"column":51},"end":{"line":668,"column":95}},{"start":{"line":668,"column":98},"end":{"line":668,"column":102}}]},"39":{"line":706,"type":"binary-expr","locations":[{"start":{"line":706,"column":23},"end":{"line":706,"column":50}},{"start":{"line":706,"column":54},"end":{"line":706,"column":58}}]},"40":{"line":708,"type":"if","locations":[{"start":{"line":708,"column":12},"end":{"line":708,"column":12}},{"start":{"line":708,"column":12},"end":{"line":708,"column":12}}]},"41":{"line":708,"type":"binary-expr","locations":[{"start":{"line":708,"column":16},"end":{"line":708,"column":21}},{"start":{"line":708,"column":25},"end":{"line":708,"column":36}}]},"42":{"line":733,"type":"if","locations":[{"start":{"line":733,"column":12},"end":{"line":733,"column":12}},{"start":{"line":733,"column":12},"end":{"line":733,"column":12}}]},"43":{"line":745,"type":"if","locations":[{"start":{"line":745,"column":20},"end":{"line":745,"column":20}},{"start":{"line":745,"column":20},"end":{"line":745,"column":20}}]},"44":{"line":746,"type":"if","locations":[{"start":{"line":746,"column":24},"end":{"line":746,"column":24}},{"start":{"line":746,"column":24},"end":{"line":746,"column":24}}]},"45":{"line":754,"type":"if","locations":[{"start":{"line":754,"column":16},"end":{"line":754,"column":16}},{"start":{"line":754,"column":16},"end":{"line":754,"column":16}}]},"46":{"line":755,"type":"if","locations":[{"start":{"line":755,"column":20},"end":{"line":755,"column":20}},{"start":{"line":755,"column":20},"end":{"line":755,"column":20}}]},"47":{"line":755,"type":"binary-expr","locations":[{"start":{"line":755,"column":24},"end":{"line":755,"column":29}},{"start":{"line":755,"column":33},"end":{"line":755,"column":41}}]},"48":{"line":766,"type":"if","locations":[{"start":{"line":766,"column":20},"end":{"line":766,"column":20}},{"start":{"line":766,"column":20},"end":{"line":766,"column":20}}]},"49":{"line":768,"type":"if","locations":[{"start":{"line":768,"column":24},"end":{"line":768,"column":24}},{"start":{"line":768,"column":24},"end":{"line":768,"column":24}}]}},"code":["(function () { YUI.add('widget-stdmod', function (Y, NAME) {","","/**"," * Provides standard module support for Widgets through an extension."," *"," * @module widget-stdmod"," */"," var L = Y.Lang,"," Node = Y.Node,"," UA = Y.UA,"," Widget = Y.Widget,",""," EMPTY = \"\","," HD = \"hd\","," BD = \"bd\","," FT = \"ft\","," HEADER = \"header\","," BODY = \"body\","," FOOTER = \"footer\","," FILL_HEIGHT = \"fillHeight\","," STDMOD = \"stdmod\",",""," NODE_SUFFIX = \"Node\","," CONTENT_SUFFIX = \"Content\",",""," FIRST_CHILD = \"firstChild\","," CHILD_NODES = \"childNodes\","," OWNER_DOCUMENT = \"ownerDocument\",",""," CONTENT_BOX = \"contentBox\",",""," HEIGHT = \"height\","," OFFSET_HEIGHT = \"offsetHeight\","," AUTO = \"auto\",",""," HeaderChange = \"headerContentChange\","," BodyChange = \"bodyContentChange\","," FooterChange = \"footerContentChange\","," FillHeightChange = \"fillHeightChange\","," HeightChange = \"heightChange\","," ContentUpdate = \"contentUpdate\",",""," RENDERUI = \"renderUI\","," BINDUI = \"bindUI\","," SYNCUI = \"syncUI\",",""," APPLY_PARSED_CONFIG = \"_applyParsedConfig\",",""," UI = Y.Widget.UI_SRC;",""," /**"," * Widget extension, which can be used to add Standard Module support to the"," * base Widget class, through the Base.build"," * method."," *

            "," * The extension adds header, body and footer sections to the Widget's content box and"," * provides the corresponding methods and attributes to modify the contents of these sections."," *

            "," * @class WidgetStdMod"," * @param {Object} The user configuration object"," */"," function StdMod(config) {}",""," /**"," * Constant used to refer the the standard module header, in methods which expect a section specifier"," *"," * @property HEADER"," * @static"," * @type String"," */"," StdMod.HEADER = HEADER;",""," /**"," * Constant used to refer the the standard module body, in methods which expect a section specifier"," *"," * @property BODY"," * @static"," * @type String"," */"," StdMod.BODY = BODY;",""," /**"," * Constant used to refer the the standard module footer, in methods which expect a section specifier"," *"," * @property FOOTER"," * @static"," * @type String"," */"," StdMod.FOOTER = FOOTER;",""," /**"," * Constant used to specify insertion position, when adding content to sections of the standard module in"," * methods which expect a \"where\" argument."," *

            "," * Inserts new content before the sections existing content."," *

            "," * @property AFTER"," * @static"," * @type String"," */"," StdMod.AFTER = \"after\";",""," /**"," * Constant used to specify insertion position, when adding content to sections of the standard module in"," * methods which expect a \"where\" argument."," *

            "," * Inserts new content before the sections existing content."," *

            "," * @property BEFORE"," * @static"," * @type String"," */"," StdMod.BEFORE = \"before\";"," /**"," * Constant used to specify insertion position, when adding content to sections of the standard module in"," * methods which expect a \"where\" argument."," *

            "," * Replaces the sections existing content, with new content."," *

            "," * @property REPLACE"," * @static"," * @type String"," */"," StdMod.REPLACE = \"replace\";",""," var STD_HEADER = StdMod.HEADER,"," STD_BODY = StdMod.BODY,"," STD_FOOTER = StdMod.FOOTER,",""," HEADER_CONTENT = STD_HEADER + CONTENT_SUFFIX,"," FOOTER_CONTENT = STD_FOOTER + CONTENT_SUFFIX,"," BODY_CONTENT = STD_BODY + CONTENT_SUFFIX;",""," /**"," * Static property used to define the default attribute"," * configuration introduced by WidgetStdMod."," *"," * @property ATTRS"," * @type Object"," * @static"," */"," StdMod.ATTRS = {",""," /**"," * @attribute headerContent"," * @type HTML"," * @default undefined"," * @description The content to be added to the header section. This will replace any existing content"," * in the header. If you want to append, or insert new content, use the setStdModContent method."," */"," headerContent: {"," value:null"," },",""," /**"," * @attribute footerContent"," * @type HTML"," * @default undefined"," * @description The content to be added to the footer section. This will replace any existing content"," * in the footer. If you want to append, or insert new content, use the setStdModContent method."," */"," footerContent: {"," value:null"," },",""," /**"," * @attribute bodyContent"," * @type HTML"," * @default undefined"," * @description The content to be added to the body section. This will replace any existing content"," * in the body. If you want to append, or insert new content, use the setStdModContent method."," */"," bodyContent: {"," value:null"," },",""," /**"," * @attribute fillHeight"," * @type {String}"," * @default WidgetStdMod.BODY"," * @description The section (WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER) which should be resized to fill the height of the standard module, when a"," * height is set on the Widget. If a height is not set on the widget, then all sections are sized based on"," * their content."," */"," fillHeight: {"," value: StdMod.BODY,"," validator: function(val) {"," return this._validateFillHeight(val);"," }"," }"," };",""," /**"," * The HTML parsing rules for the WidgetStdMod class."," *"," * @property HTML_PARSER"," * @static"," * @type Object"," */"," StdMod.HTML_PARSER = {"," headerContent: function(contentBox) {"," return this._parseStdModHTML(STD_HEADER);"," },",""," bodyContent: function(contentBox) {"," return this._parseStdModHTML(STD_BODY);"," },",""," footerContent : function(contentBox) {"," return this._parseStdModHTML(STD_FOOTER);"," }"," };",""," /**"," * Static hash of default class names used for the header,"," * body and footer sections of the standard module, keyed by"," * the section identifier (WidgetStdMod.STD_HEADER, WidgetStdMod.STD_BODY, WidgetStdMod.STD_FOOTER)"," *"," * @property SECTION_CLASS_NAMES"," * @static"," * @type Object"," */"," StdMod.SECTION_CLASS_NAMES = {"," header: Widget.getClassName(HD),"," body: Widget.getClassName(BD),"," footer: Widget.getClassName(FT)"," };",""," /**"," * The template HTML strings for each of the standard module sections. Section entries are keyed by the section constants,"," * WidgetStdMod.HEADER, WidgetStdMod.BODY, WidgetStdMod.FOOTER, and contain the HTML to be added for each section."," * e.g."," *
            ","     *    {","     *       header : '<div class=\"yui-widget-hd\"></div>',","     *       body : '<div class=\"yui-widget-bd\"></div>',","     *       footer : '<div class=\"yui-widget-ft\"></div>'","     *    }","     * 
            "," * @property TEMPLATES"," * @type Object"," * @static"," */"," StdMod.TEMPLATES = {"," header : '
            ',"," body : '
            ',"," footer : '
            '"," };",""," StdMod.prototype = {",""," initializer : function() {"," this._stdModNode = this.get(CONTENT_BOX);",""," Y.before(this._renderUIStdMod, this, RENDERUI);"," Y.before(this._bindUIStdMod, this, BINDUI);"," Y.before(this._syncUIStdMod, this, SYNCUI);"," },",""," /**"," * Synchronizes the UI to match the Widgets standard module state."," *

            "," * This method is invoked after syncUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *

            "," * @method _syncUIStdMod"," * @protected"," */"," _syncUIStdMod : function() {"," var stdModParsed = this._stdModParsed;",""," if (!stdModParsed || !stdModParsed[HEADER_CONTENT]) {"," this._uiSetStdMod(STD_HEADER, this.get(HEADER_CONTENT));"," }",""," if (!stdModParsed || !stdModParsed[BODY_CONTENT]) {"," this._uiSetStdMod(STD_BODY, this.get(BODY_CONTENT));"," }",""," if (!stdModParsed || !stdModParsed[FOOTER_CONTENT]) {"," this._uiSetStdMod(STD_FOOTER, this.get(FOOTER_CONTENT));"," }",""," this._uiSetFillHeight(this.get(FILL_HEIGHT));"," },",""," /**"," * Creates/Initializes the DOM for standard module support."," *

            "," * This method is invoked after renderUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *

            "," * @method _renderUIStdMod"," * @protected"," */"," _renderUIStdMod : function() {"," this._stdModNode.addClass(Widget.getClassName(STDMOD));"," this._renderStdModSections();",""," //This normally goes in bindUI but in order to allow setStdModContent() to work before renderUI"," //stage, these listeners should be set up at the earliest possible time."," this.after(HeaderChange, this._afterHeaderChange);"," this.after(BodyChange, this._afterBodyChange);"," this.after(FooterChange, this._afterFooterChange);"," },",""," _renderStdModSections : function() {"," if (L.isValue(this.get(HEADER_CONTENT))) { this._renderStdMod(STD_HEADER); }"," if (L.isValue(this.get(BODY_CONTENT))) { this._renderStdMod(STD_BODY); }"," if (L.isValue(this.get(FOOTER_CONTENT))) { this._renderStdMod(STD_FOOTER); }"," },",""," /**"," * Binds event listeners responsible for updating the UI state in response to"," * Widget standard module related state changes."," *

            "," * This method is invoked after bindUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *

            "," * @method _bindUIStdMod"," * @protected"," */"," _bindUIStdMod : function() {"," // this.after(HeaderChange, this._afterHeaderChange);"," // this.after(BodyChange, this._afterBodyChange);"," // this.after(FooterChange, this._afterFooterChange);",""," this.after(FillHeightChange, this._afterFillHeightChange);"," this.after(HeightChange, this._fillHeight);"," this.after(ContentUpdate, this._fillHeight);"," },",""," /**"," * Default attribute change listener for the headerContent attribute, responsible"," * for updating the UI, in response to attribute changes."," *"," * @method _afterHeaderChange"," * @protected"," * @param {EventFacade} e The event facade for the attribute change"," */"," _afterHeaderChange : function(e) {"," if (e.src !== UI) {"," this._uiSetStdMod(STD_HEADER, e.newVal, e.stdModPosition);"," }"," },",""," /**"," * Default attribute change listener for the bodyContent attribute, responsible"," * for updating the UI, in response to attribute changes."," *"," * @method _afterBodyChange"," * @protected"," * @param {EventFacade} e The event facade for the attribute change"," */"," _afterBodyChange : function(e) {"," if (e.src !== UI) {"," this._uiSetStdMod(STD_BODY, e.newVal, e.stdModPosition);"," }"," },",""," /**"," * Default attribute change listener for the footerContent attribute, responsible"," * for updating the UI, in response to attribute changes."," *"," * @method _afterFooterChange"," * @protected"," * @param {EventFacade} e The event facade for the attribute change"," */"," _afterFooterChange : function(e) {"," if (e.src !== UI) {"," this._uiSetStdMod(STD_FOOTER, e.newVal, e.stdModPosition);"," }"," },",""," /**"," * Default attribute change listener for the fillHeight attribute, responsible"," * for updating the UI, in response to attribute changes."," *"," * @method _afterFillHeightChange"," * @protected"," * @param {EventFacade} e The event facade for the attribute change"," */"," _afterFillHeightChange: function (e) {"," this._uiSetFillHeight(e.newVal);"," },",""," /**"," * Default validator for the fillHeight attribute. Verifies that the"," * value set is a valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER,"," * or a falsey value if fillHeight is to be disabled."," *"," * @method _validateFillHeight"," * @protected"," * @param {String} val The section which should be setup to fill height, or false/null to disable fillHeight"," * @return true if valid, false if not"," */"," _validateFillHeight : function(val) {"," return !val || val == StdMod.BODY || val == StdMod.HEADER || val == StdMod.FOOTER;"," },",""," /**"," * Updates the rendered UI, to resize the provided section so that the standard module fills out"," * the specified widget height. Note: This method does not check whether or not a height is set"," * on the Widget."," *"," * @method _uiSetFillHeight"," * @protected"," * @param {String} fillSection A valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER"," */"," _uiSetFillHeight : function(fillSection) {"," var fillNode = this.getStdModNode(fillSection);"," var currNode = this._currFillNode;",""," if (currNode && fillNode !== currNode){"," currNode.setStyle(HEIGHT, EMPTY);"," }",""," if (fillNode) {"," this._currFillNode = fillNode;"," }",""," this._fillHeight();"," },",""," /**"," * Updates the rendered UI, to resize the current section specified by the fillHeight attribute, so"," * that the standard module fills out the Widget height. If a height has not been set on Widget,"," * the section is not resized (height is set to \"auto\")."," *"," * @method _fillHeight"," * @private"," */"," _fillHeight : function() {"," if (this.get(FILL_HEIGHT)) {"," var height = this.get(HEIGHT);"," if (height != EMPTY && height != AUTO) {"," this.fillHeight(this.getStdModNode(this.get(FILL_HEIGHT)));"," }"," }"," },",""," /**"," * Updates the rendered UI, adding the provided content (either an HTML string, or node reference),"," * to the specified section. The content is either added before, after or replaces existing content"," * in the section, based on the value of the where argument."," *"," * @method _uiSetStdMod"," * @protected"," *"," * @param {String} section The section to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," * @param {String | Node} content The new content (either as an HTML string, or Node reference) to add to the section"," * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE."," * If not provided, the content will replace existing content in the section."," */"," _uiSetStdMod : function(section, content, where) {"," // Using isValue, so that \"\" is valid content"," if (L.isValue(content)) {"," var node = this.getStdModNode(section, true);",""," this._addStdModContent(node, content, where);",""," this.set(section + CONTENT_SUFFIX, this._getStdModContent(section), {src:UI});"," } else {"," this._eraseStdMod(section);"," }"," this.fire(ContentUpdate);"," },",""," /**"," * Creates the DOM node for the given section, and inserts it into the correct location in the contentBox."," *"," * @method _renderStdMod"," * @protected"," * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," * @return {Node} A reference to the added section node"," */"," _renderStdMod : function(section) {",""," var contentBox = this.get(CONTENT_BOX),"," sectionNode = this._findStdModSection(section);",""," if (!sectionNode) {"," sectionNode = this._getStdModTemplate(section);"," }",""," this._insertStdModSection(contentBox, section, sectionNode);",""," this[section + NODE_SUFFIX] = sectionNode;"," return this[section + NODE_SUFFIX];"," },",""," /**"," * Removes the DOM node for the given section."," *"," * @method _eraseStdMod"," * @protected"," * @param {String} section The section to remove. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," */"," _eraseStdMod : function(section) {"," var sectionNode = this.getStdModNode(section);"," if (sectionNode) {"," sectionNode.remove(true);"," delete this[section + NODE_SUFFIX];"," }"," },",""," /**"," * Helper method to insert the Node for the given section into the correct location in the contentBox."," *"," * @method _insertStdModSection"," * @private"," * @param {Node} contentBox A reference to the Widgets content box."," * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," * @param {Node} sectionNode The Node for the section."," */"," _insertStdModSection : function(contentBox, section, sectionNode) {"," var fc = contentBox.get(FIRST_CHILD);",""," if (section === STD_FOOTER || !fc) {"," contentBox.appendChild(sectionNode);"," } else {"," if (section === STD_HEADER) {"," contentBox.insertBefore(sectionNode, fc);"," } else {"," var footer = this[STD_FOOTER + NODE_SUFFIX];"," if (footer) {"," contentBox.insertBefore(sectionNode, footer);"," } else {"," contentBox.appendChild(sectionNode);"," }"," }"," }"," },",""," /**"," * Gets a new Node reference for the given standard module section, by cloning"," * the stored template node."," *"," * @method _getStdModTemplate"," * @protected"," * @param {String} section The section to create a new node for. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," * @return {Node} The new Node instance for the section"," */"," _getStdModTemplate : function(section) {"," return Node.create(StdMod.TEMPLATES[section], this._stdModNode.get(OWNER_DOCUMENT));"," },",""," /**"," * Helper method to add content to a StdMod section node."," * The content is added either before, after or replaces the existing node content"," * based on the value of the where argument."," *"," * @method _addStdModContent"," * @private"," *"," * @param {Node} node The section Node to be updated."," * @param {Node|NodeList|String} children The new content Node, NodeList or String to be added to section Node provided."," * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE."," * If not provided, the content will replace existing content in the Node."," */"," _addStdModContent : function(node, children, where) {",""," // StdMod where to Node where"," switch (where) {"," case StdMod.BEFORE: // 0 is before fistChild"," where = 0;"," break;"," case StdMod.AFTER: // undefined is appendChild"," where = undefined;"," break;"," default: // replace is replace, not specified is replace"," where = StdMod.REPLACE;"," }",""," node.insert(children, where);"," },",""," /**"," * Helper method to obtain the precise height of the node provided, including padding and border."," * The height could be a sub-pixel value for certain browsers, such as Firefox 3."," *"," * @method _getPreciseHeight"," * @private"," * @param {Node} node The node for which the precise height is required."," * @return {Number} The height of the Node including borders and padding, possibly a float."," */"," _getPreciseHeight : function(node) {"," var height = (node) ? node.get(OFFSET_HEIGHT) : 0,"," getBCR = \"getBoundingClientRect\";",""," if (node && node.hasMethod(getBCR)) {"," var preciseRegion = node.invoke(getBCR);"," if (preciseRegion) {"," height = preciseRegion.bottom - preciseRegion.top;"," }"," }",""," return height;"," },",""," /**"," * Helper method to to find the rendered node for the given section,"," * if it exists."," *"," * @method _findStdModSection"," * @private"," * @param {String} section The section for which the render Node is to be found. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," * @return {Node} The rendered node for the given section, or null if not found."," */"," _findStdModSection: function(section) {"," return this.get(CONTENT_BOX).one(\"> .\" + StdMod.SECTION_CLASS_NAMES[section]);"," },",""," /**"," * Utility method, used by WidgetStdMods HTML_PARSER implementation"," * to extract data for each section from markup."," *"," * @method _parseStdModHTML"," * @private"," * @param {String} section"," * @return {String} Inner HTML string with the contents of the section"," */"," _parseStdModHTML : function(section) {",""," var node = this._findStdModSection(section);",""," if (node) {"," if (!this._stdModParsed) {"," this._stdModParsed = {};"," Y.before(this._applyStdModParsedConfig, this, APPLY_PARSED_CONFIG);"," }"," this._stdModParsed[section + CONTENT_SUFFIX] = 1;",""," return node.get(\"innerHTML\");"," }",""," return null;"," },",""," /**"," * This method is injected before the _applyParsedConfig step in"," * the application of HTML_PARSER, and sets up the state to"," * identify whether or not we should remove the current DOM content"," * or not, based on whether or not the current content attribute value"," * was extracted from the DOM, or provided by the user configuration"," *"," * @method _applyStdModParsedConfig"," * @private"," */"," _applyStdModParsedConfig : function(node, cfg, parsedCfg) {"," var parsed = this._stdModParsed;"," if (parsed) {"," parsed[HEADER_CONTENT] = !(HEADER_CONTENT in cfg) && (HEADER_CONTENT in parsed);"," parsed[BODY_CONTENT] = !(BODY_CONTENT in cfg) && (BODY_CONTENT in parsed);"," parsed[FOOTER_CONTENT] = !(FOOTER_CONTENT in cfg) && (FOOTER_CONTENT in parsed);"," }"," },",""," /**"," * Retrieves the child nodes (content) of a standard module section"," *"," * @method _getStdModContent"," * @private"," * @param {String} section The standard module section whose child nodes are to be retrieved. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," * @return {Node} The child node collection of the standard module section."," */"," _getStdModContent : function(section) {"," return (this[section + NODE_SUFFIX]) ? this[section + NODE_SUFFIX].get(CHILD_NODES) : null;"," },",""," /**"," * Updates the body section of the standard module with the content provided (either an HTML string, or node reference)."," *

            "," * This method can be used instead of the corresponding section content attribute if you'd like to retain the current content of the section,"," * and insert content before or after it, by specifying the where argument."," *

            "," * @method setStdModContent"," * @param {String} section The standard module section whose content is to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER."," * @param {String | Node} content The content to be added, either an HTML string or a Node reference."," * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE."," * If not provided, the content will replace existing content in the section."," */"," setStdModContent : function(section, content, where) {"," //var node = this.getStdModNode(section) || this._renderStdMod(section);"," this.set(section + CONTENT_SUFFIX, content, {stdModPosition:where});"," //this._addStdModContent(node, content, where);"," },",""," /**"," Returns the node reference for the specified `section`.",""," **Note:** The DOM is not queried for the node reference. The reference"," stored by the widget instance is returned if it was set. Passing a"," truthy for `forceCreate` will create the section node if it does not"," already exist.",""," @method getStdModNode"," @param {String} section The section whose node reference is required."," Either `WidgetStdMod.HEADER`, `WidgetStdMod.BODY`, or"," `WidgetStdMod.FOOTER`."," @param {Boolean} forceCreate Whether the section node should be created"," if it does not already exist."," @return {Node} The node reference for the `section`, or null if not set."," **/"," getStdModNode : function(section, forceCreate) {"," var node = this[section + NODE_SUFFIX] || null;",""," if (!node && forceCreate) {"," node = this._renderStdMod(section);"," }",""," return node;"," },",""," /**"," * Sets the height on the provided header, body or footer element to"," * fill out the height of the Widget. It determines the height of the"," * widgets bounding box, based on it's configured height value, and"," * sets the height of the provided section to fill out any"," * space remaining after the other standard module section heights"," * have been accounted for."," *"," *

            NOTE: This method is not designed to work if an explicit"," * height has not been set on the Widget, since for an \"auto\" height Widget,"," * the heights of the header/body/footer will drive the height of the Widget.

            "," *"," * @method fillHeight"," * @param {Node} node The node which should be resized to fill out the height"," * of the Widget bounding box. Should be a standard module section node which belongs"," * to the widget."," */"," fillHeight : function(node) {"," if (node) {"," var contentBox = this.get(CONTENT_BOX),"," stdModNodes = [this.headerNode, this.bodyNode, this.footerNode],"," stdModNode,"," cbContentHeight,"," filled = 0,"," remaining = 0,",""," validNode = false;",""," for (var i = 0, l = stdModNodes.length; i < l; i++) {"," stdModNode = stdModNodes[i];"," if (stdModNode) {"," if (stdModNode !== node) {"," filled += this._getPreciseHeight(stdModNode);"," } else {"," validNode = true;"," }"," }"," }",""," if (validNode) {"," if (UA.ie || UA.opera) {"," // Need to set height to 0, to allow height to be reduced"," node.set(OFFSET_HEIGHT, 0);"," }",""," cbContentHeight = contentBox.get(OFFSET_HEIGHT) -"," parseInt(contentBox.getComputedStyle(\"paddingTop\"), 10) -"," parseInt(contentBox.getComputedStyle(\"paddingBottom\"), 10) -"," parseInt(contentBox.getComputedStyle(\"borderBottomWidth\"), 10) -"," parseInt(contentBox.getComputedStyle(\"borderTopWidth\"), 10);",""," if (L.isNumber(cbContentHeight)) {"," remaining = cbContentHeight - filled;"," if (remaining >= 0) {"," node.set(OFFSET_HEIGHT, remaining);"," }"," }"," }"," }"," }"," };",""," Y.WidgetStdMod = StdMod;","","","}, '3.17.2', {\"requires\": [\"base-build\", \"widget\"]});","","}());"]}; +} +var __cov_L0xpEI6PP2k8xsT6uqbWyQ = __coverage__['build/widget-stdmod/widget-stdmod.js']; +__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['1']++;YUI.add('widget-stdmod',function(Y,NAME){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['1']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['2']++;var L=Y.Lang,Node=Y.Node,UA=Y.UA,Widget=Y.Widget,EMPTY='',HD='hd',BD='bd',FT='ft',HEADER='header',BODY='body',FOOTER='footer',FILL_HEIGHT='fillHeight',STDMOD='stdmod',NODE_SUFFIX='Node',CONTENT_SUFFIX='Content',FIRST_CHILD='firstChild',CHILD_NODES='childNodes',OWNER_DOCUMENT='ownerDocument',CONTENT_BOX='contentBox',HEIGHT='height',OFFSET_HEIGHT='offsetHeight',AUTO='auto',HeaderChange='headerContentChange',BodyChange='bodyContentChange',FooterChange='footerContentChange',FillHeightChange='fillHeightChange',HeightChange='heightChange',ContentUpdate='contentUpdate',RENDERUI='renderUI',BINDUI='bindUI',SYNCUI='syncUI',APPLY_PARSED_CONFIG='_applyParsedConfig',UI=Y.Widget.UI_SRC;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['3']++;function StdMod(config){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['2']++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['4']++;StdMod.HEADER=HEADER;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['5']++;StdMod.BODY=BODY;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['6']++;StdMod.FOOTER=FOOTER;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['7']++;StdMod.AFTER='after';__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['8']++;StdMod.BEFORE='before';__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['9']++;StdMod.REPLACE='replace';__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['10']++;var STD_HEADER=StdMod.HEADER,STD_BODY=StdMod.BODY,STD_FOOTER=StdMod.FOOTER,HEADER_CONTENT=STD_HEADER+CONTENT_SUFFIX,FOOTER_CONTENT=STD_FOOTER+CONTENT_SUFFIX,BODY_CONTENT=STD_BODY+CONTENT_SUFFIX;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['11']++;StdMod.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:StdMod.BODY,validator:function(val){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['3']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['12']++;return this._validateFillHeight(val);}}};__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['13']++;StdMod.HTML_PARSER={headerContent:function(contentBox){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['4']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['14']++;return this._parseStdModHTML(STD_HEADER);},bodyContent:function(contentBox){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['5']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['15']++;return this._parseStdModHTML(STD_BODY);},footerContent:function(contentBox){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['6']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['16']++;return this._parseStdModHTML(STD_FOOTER);}};__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['17']++;StdMod.SECTION_CLASS_NAMES={header:Widget.getClassName(HD),body:Widget.getClassName(BD),footer:Widget.getClassName(FT)};__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['18']++;StdMod.TEMPLATES={header:'
            ',body:'
            ',footer:'
            '};__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['19']++;StdMod.prototype={initializer:function(){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['7']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['20']++;this._stdModNode=this.get(CONTENT_BOX);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['21']++;Y.before(this._renderUIStdMod,this,RENDERUI);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['22']++;Y.before(this._bindUIStdMod,this,BINDUI);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['23']++;Y.before(this._syncUIStdMod,this,SYNCUI);},_syncUIStdMod:function(){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['8']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['24']++;var stdModParsed=this._stdModParsed;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['25']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['2'][0]++,!stdModParsed)||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['2'][1]++,!stdModParsed[HEADER_CONTENT])){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['1'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['26']++;this._uiSetStdMod(STD_HEADER,this.get(HEADER_CONTENT));}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['1'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['27']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['4'][0]++,!stdModParsed)||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['4'][1]++,!stdModParsed[BODY_CONTENT])){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['3'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['28']++;this._uiSetStdMod(STD_BODY,this.get(BODY_CONTENT));}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['3'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['29']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['6'][0]++,!stdModParsed)||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['6'][1]++,!stdModParsed[FOOTER_CONTENT])){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['5'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['30']++;this._uiSetStdMod(STD_FOOTER,this.get(FOOTER_CONTENT));}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['5'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['31']++;this._uiSetFillHeight(this.get(FILL_HEIGHT));},_renderUIStdMod:function(){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['9']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['32']++;this._stdModNode.addClass(Widget.getClassName(STDMOD));__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['33']++;this._renderStdModSections();__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['34']++;this.after(HeaderChange,this._afterHeaderChange);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['35']++;this.after(BodyChange,this._afterBodyChange);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['36']++;this.after(FooterChange,this._afterFooterChange);},_renderStdModSections:function(){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['10']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['37']++;if(L.isValue(this.get(HEADER_CONTENT))){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['7'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['38']++;this._renderStdMod(STD_HEADER);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['7'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['39']++;if(L.isValue(this.get(BODY_CONTENT))){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['8'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['40']++;this._renderStdMod(STD_BODY);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['8'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['41']++;if(L.isValue(this.get(FOOTER_CONTENT))){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['9'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['42']++;this._renderStdMod(STD_FOOTER);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['9'][1]++;}},_bindUIStdMod:function(){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['11']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['43']++;this.after(FillHeightChange,this._afterFillHeightChange);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['44']++;this.after(HeightChange,this._fillHeight);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['45']++;this.after(ContentUpdate,this._fillHeight);},_afterHeaderChange:function(e){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['12']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['46']++;if(e.src!==UI){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['10'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['47']++;this._uiSetStdMod(STD_HEADER,e.newVal,e.stdModPosition);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['10'][1]++;}},_afterBodyChange:function(e){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['13']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['48']++;if(e.src!==UI){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['11'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['49']++;this._uiSetStdMod(STD_BODY,e.newVal,e.stdModPosition);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['11'][1]++;}},_afterFooterChange:function(e){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['14']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['50']++;if(e.src!==UI){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['12'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['51']++;this._uiSetStdMod(STD_FOOTER,e.newVal,e.stdModPosition);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['12'][1]++;}},_afterFillHeightChange:function(e){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['15']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['52']++;this._uiSetFillHeight(e.newVal);},_validateFillHeight:function(val){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['16']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['53']++;return(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['13'][0]++,!val)||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['13'][1]++,val==StdMod.BODY)||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['13'][2]++,val==StdMod.HEADER)||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['13'][3]++,val==StdMod.FOOTER);},_uiSetFillHeight:function(fillSection){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['17']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['54']++;var fillNode=this.getStdModNode(fillSection);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['55']++;var currNode=this._currFillNode;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['56']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['15'][0]++,currNode)&&(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['15'][1]++,fillNode!==currNode)){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['14'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['57']++;currNode.setStyle(HEIGHT,EMPTY);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['14'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['58']++;if(fillNode){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['16'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['59']++;this._currFillNode=fillNode;}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['16'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['60']++;this._fillHeight();},_fillHeight:function(){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['18']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['61']++;if(this.get(FILL_HEIGHT)){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['17'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['62']++;var height=this.get(HEIGHT);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['63']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['19'][0]++,height!=EMPTY)&&(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['19'][1]++,height!=AUTO)){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['18'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['64']++;this.fillHeight(this.getStdModNode(this.get(FILL_HEIGHT)));}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['18'][1]++;}}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['17'][1]++;}},_uiSetStdMod:function(section,content,where){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['19']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['65']++;if(L.isValue(content)){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['20'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['66']++;var node=this.getStdModNode(section,true);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['67']++;this._addStdModContent(node,content,where);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['68']++;this.set(section+CONTENT_SUFFIX,this._getStdModContent(section),{src:UI});}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['20'][1]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['69']++;this._eraseStdMod(section);}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['70']++;this.fire(ContentUpdate);},_renderStdMod:function(section){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['20']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['71']++;var contentBox=this.get(CONTENT_BOX),sectionNode=this._findStdModSection(section);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['72']++;if(!sectionNode){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['21'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['73']++;sectionNode=this._getStdModTemplate(section);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['21'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['74']++;this._insertStdModSection(contentBox,section,sectionNode);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['75']++;this[section+NODE_SUFFIX]=sectionNode;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['76']++;return this[section+NODE_SUFFIX];},_eraseStdMod:function(section){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['21']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['77']++;var sectionNode=this.getStdModNode(section);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['78']++;if(sectionNode){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['22'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['79']++;sectionNode.remove(true);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['80']++;delete this[section+NODE_SUFFIX];}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['22'][1]++;}},_insertStdModSection:function(contentBox,section,sectionNode){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['22']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['81']++;var fc=contentBox.get(FIRST_CHILD);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['82']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['24'][0]++,section===STD_FOOTER)||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['24'][1]++,!fc)){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['23'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['83']++;contentBox.appendChild(sectionNode);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['23'][1]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['84']++;if(section===STD_HEADER){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['25'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['85']++;contentBox.insertBefore(sectionNode,fc);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['25'][1]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['86']++;var footer=this[STD_FOOTER+NODE_SUFFIX];__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['87']++;if(footer){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['26'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['88']++;contentBox.insertBefore(sectionNode,footer);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['26'][1]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['89']++;contentBox.appendChild(sectionNode);}}}},_getStdModTemplate:function(section){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['23']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['90']++;return Node.create(StdMod.TEMPLATES[section],this._stdModNode.get(OWNER_DOCUMENT));},_addStdModContent:function(node,children,where){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['24']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['91']++;switch(where){case StdMod.BEFORE:__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['27'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['92']++;where=0;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['93']++;break;case StdMod.AFTER:__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['27'][1]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['94']++;where=undefined;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['95']++;break;default:__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['27'][2]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['96']++;where=StdMod.REPLACE;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['97']++;node.insert(children,where);},_getPreciseHeight:function(node){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['25']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['98']++;var height=node?(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['28'][0]++,node.get(OFFSET_HEIGHT)):(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['28'][1]++,0),getBCR='getBoundingClientRect';__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['99']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['30'][0]++,node)&&(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['30'][1]++,node.hasMethod(getBCR))){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['29'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['100']++;var preciseRegion=node.invoke(getBCR);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['101']++;if(preciseRegion){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['31'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['102']++;height=preciseRegion.bottom-preciseRegion.top;}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['31'][1]++;}}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['29'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['103']++;return height;},_findStdModSection:function(section){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['26']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['104']++;return this.get(CONTENT_BOX).one('> .'+StdMod.SECTION_CLASS_NAMES[section]);},_parseStdModHTML:function(section){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['27']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['105']++;var node=this._findStdModSection(section);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['106']++;if(node){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['32'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['107']++;if(!this._stdModParsed){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['33'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['108']++;this._stdModParsed={};__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['109']++;Y.before(this._applyStdModParsedConfig,this,APPLY_PARSED_CONFIG);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['33'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['110']++;this._stdModParsed[section+CONTENT_SUFFIX]=1;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['111']++;return node.get('innerHTML');}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['32'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['112']++;return null;},_applyStdModParsedConfig:function(node,cfg,parsedCfg){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['28']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['113']++;var parsed=this._stdModParsed;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['114']++;if(parsed){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['34'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['115']++;parsed[HEADER_CONTENT]=(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['35'][0]++,!(HEADER_CONTENT in cfg))&&(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['35'][1]++,HEADER_CONTENT in parsed);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['116']++;parsed[BODY_CONTENT]=(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['36'][0]++,!(BODY_CONTENT in cfg))&&(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['36'][1]++,BODY_CONTENT in parsed);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['117']++;parsed[FOOTER_CONTENT]=(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['37'][0]++,!(FOOTER_CONTENT in cfg))&&(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['37'][1]++,FOOTER_CONTENT in parsed);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['34'][1]++;}},_getStdModContent:function(section){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['29']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['118']++;return this[section+NODE_SUFFIX]?(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['38'][0]++,this[section+NODE_SUFFIX].get(CHILD_NODES)):(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['38'][1]++,null);},setStdModContent:function(section,content,where){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['30']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['119']++;this.set(section+CONTENT_SUFFIX,content,{stdModPosition:where});},getStdModNode:function(section,forceCreate){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['31']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['120']++;var node=(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['39'][0]++,this[section+NODE_SUFFIX])||(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['39'][1]++,null);__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['121']++;if((__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['41'][0]++,!node)&&(__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['41'][1]++,forceCreate)){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['40'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['122']++;node=this._renderStdMod(section);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['40'][1]++;}__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['123']++;return node;},fillHeight:function(node){__cov_L0xpEI6PP2k8xsT6uqbWyQ.f['32']++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['124']++;if(node){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['42'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['125']++;var contentBox=this.get(CONTENT_BOX),stdModNodes=[this.headerNode,this.bodyNode,this.footerNode],stdModNode,cbContentHeight,filled=0,remaining=0,validNode=false;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['126']++;for(var i=0,l=stdModNodes.length;i=0){__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['49'][0]++;__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['139']++;node.set(OFFSET_HEIGHT,remaining);}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['49'][1]++;}}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['48'][1]++;}}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['45'][1]++;}}else{__cov_L0xpEI6PP2k8xsT6uqbWyQ.b['42'][1]++;}}};__cov_L0xpEI6PP2k8xsT6uqbWyQ.s['140']++;Y.WidgetStdMod=StdMod;},'3.17.2',{'requires':['base-build','widget']}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-debug.js b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-debug.js new file mode 100644 index 0000000..fc78f8a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-debug.js @@ -0,0 +1,787 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('widget-stdmod', function (Y, NAME) { + +/** + * Provides standard module support for Widgets through an extension. + * + * @module widget-stdmod + */ + var L = Y.Lang, + Node = Y.Node, + UA = Y.UA, + Widget = Y.Widget, + + EMPTY = "", + HD = "hd", + BD = "bd", + FT = "ft", + HEADER = "header", + BODY = "body", + FOOTER = "footer", + FILL_HEIGHT = "fillHeight", + STDMOD = "stdmod", + + NODE_SUFFIX = "Node", + CONTENT_SUFFIX = "Content", + + FIRST_CHILD = "firstChild", + CHILD_NODES = "childNodes", + OWNER_DOCUMENT = "ownerDocument", + + CONTENT_BOX = "contentBox", + + HEIGHT = "height", + OFFSET_HEIGHT = "offsetHeight", + AUTO = "auto", + + HeaderChange = "headerContentChange", + BodyChange = "bodyContentChange", + FooterChange = "footerContentChange", + FillHeightChange = "fillHeightChange", + HeightChange = "heightChange", + ContentUpdate = "contentUpdate", + + RENDERUI = "renderUI", + BINDUI = "bindUI", + SYNCUI = "syncUI", + + APPLY_PARSED_CONFIG = "_applyParsedConfig", + + UI = Y.Widget.UI_SRC; + + /** + * Widget extension, which can be used to add Standard Module support to the + * base Widget class, through the Base.build + * method. + *

            + * The extension adds header, body and footer sections to the Widget's content box and + * provides the corresponding methods and attributes to modify the contents of these sections. + *

            + * @class WidgetStdMod + * @param {Object} The user configuration object + */ + function StdMod(config) {} + + /** + * Constant used to refer the the standard module header, in methods which expect a section specifier + * + * @property HEADER + * @static + * @type String + */ + StdMod.HEADER = HEADER; + + /** + * Constant used to refer the the standard module body, in methods which expect a section specifier + * + * @property BODY + * @static + * @type String + */ + StdMod.BODY = BODY; + + /** + * Constant used to refer the the standard module footer, in methods which expect a section specifier + * + * @property FOOTER + * @static + * @type String + */ + StdMod.FOOTER = FOOTER; + + /** + * Constant used to specify insertion position, when adding content to sections of the standard module in + * methods which expect a "where" argument. + *

            + * Inserts new content before the sections existing content. + *

            + * @property AFTER + * @static + * @type String + */ + StdMod.AFTER = "after"; + + /** + * Constant used to specify insertion position, when adding content to sections of the standard module in + * methods which expect a "where" argument. + *

            + * Inserts new content before the sections existing content. + *

            + * @property BEFORE + * @static + * @type String + */ + StdMod.BEFORE = "before"; + /** + * Constant used to specify insertion position, when adding content to sections of the standard module in + * methods which expect a "where" argument. + *

            + * Replaces the sections existing content, with new content. + *

            + * @property REPLACE + * @static + * @type String + */ + StdMod.REPLACE = "replace"; + + var STD_HEADER = StdMod.HEADER, + STD_BODY = StdMod.BODY, + STD_FOOTER = StdMod.FOOTER, + + HEADER_CONTENT = STD_HEADER + CONTENT_SUFFIX, + FOOTER_CONTENT = STD_FOOTER + CONTENT_SUFFIX, + BODY_CONTENT = STD_BODY + CONTENT_SUFFIX; + + /** + * Static property used to define the default attribute + * configuration introduced by WidgetStdMod. + * + * @property ATTRS + * @type Object + * @static + */ + StdMod.ATTRS = { + + /** + * @attribute headerContent + * @type HTML + * @default undefined + * @description The content to be added to the header section. This will replace any existing content + * in the header. If you want to append, or insert new content, use the setStdModContent method. + */ + headerContent: { + value:null + }, + + /** + * @attribute footerContent + * @type HTML + * @default undefined + * @description The content to be added to the footer section. This will replace any existing content + * in the footer. If you want to append, or insert new content, use the setStdModContent method. + */ + footerContent: { + value:null + }, + + /** + * @attribute bodyContent + * @type HTML + * @default undefined + * @description The content to be added to the body section. This will replace any existing content + * in the body. If you want to append, or insert new content, use the setStdModContent method. + */ + bodyContent: { + value:null + }, + + /** + * @attribute fillHeight + * @type {String} + * @default WidgetStdMod.BODY + * @description The section (WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER) which should be resized to fill the height of the standard module, when a + * height is set on the Widget. If a height is not set on the widget, then all sections are sized based on + * their content. + */ + fillHeight: { + value: StdMod.BODY, + validator: function(val) { + return this._validateFillHeight(val); + } + } + }; + + /** + * The HTML parsing rules for the WidgetStdMod class. + * + * @property HTML_PARSER + * @static + * @type Object + */ + StdMod.HTML_PARSER = { + headerContent: function(contentBox) { + return this._parseStdModHTML(STD_HEADER); + }, + + bodyContent: function(contentBox) { + return this._parseStdModHTML(STD_BODY); + }, + + footerContent : function(contentBox) { + return this._parseStdModHTML(STD_FOOTER); + } + }; + + /** + * Static hash of default class names used for the header, + * body and footer sections of the standard module, keyed by + * the section identifier (WidgetStdMod.STD_HEADER, WidgetStdMod.STD_BODY, WidgetStdMod.STD_FOOTER) + * + * @property SECTION_CLASS_NAMES + * @static + * @type Object + */ + StdMod.SECTION_CLASS_NAMES = { + header: Widget.getClassName(HD), + body: Widget.getClassName(BD), + footer: Widget.getClassName(FT) + }; + + /** + * The template HTML strings for each of the standard module sections. Section entries are keyed by the section constants, + * WidgetStdMod.HEADER, WidgetStdMod.BODY, WidgetStdMod.FOOTER, and contain the HTML to be added for each section. + * e.g. + *
            +     *    {
            +     *       header : '<div class="yui-widget-hd"></div>',
            +     *       body : '<div class="yui-widget-bd"></div>',
            +     *       footer : '<div class="yui-widget-ft"></div>'
            +     *    }
            +     * 
            + * @property TEMPLATES + * @type Object + * @static + */ + StdMod.TEMPLATES = { + header : '
            ', + body : '
            ', + footer : '
            ' + }; + + StdMod.prototype = { + + initializer : function() { + this._stdModNode = this.get(CONTENT_BOX); + + Y.before(this._renderUIStdMod, this, RENDERUI); + Y.before(this._bindUIStdMod, this, BINDUI); + Y.before(this._syncUIStdMod, this, SYNCUI); + }, + + /** + * Synchronizes the UI to match the Widgets standard module state. + *

            + * This method is invoked after syncUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _syncUIStdMod + * @protected + */ + _syncUIStdMod : function() { + var stdModParsed = this._stdModParsed; + + if (!stdModParsed || !stdModParsed[HEADER_CONTENT]) { + this._uiSetStdMod(STD_HEADER, this.get(HEADER_CONTENT)); + } + + if (!stdModParsed || !stdModParsed[BODY_CONTENT]) { + this._uiSetStdMod(STD_BODY, this.get(BODY_CONTENT)); + } + + if (!stdModParsed || !stdModParsed[FOOTER_CONTENT]) { + this._uiSetStdMod(STD_FOOTER, this.get(FOOTER_CONTENT)); + } + + this._uiSetFillHeight(this.get(FILL_HEIGHT)); + }, + + /** + * Creates/Initializes the DOM for standard module support. + *

            + * This method is invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _renderUIStdMod + * @protected + */ + _renderUIStdMod : function() { + this._stdModNode.addClass(Widget.getClassName(STDMOD)); + this._renderStdModSections(); + + //This normally goes in bindUI but in order to allow setStdModContent() to work before renderUI + //stage, these listeners should be set up at the earliest possible time. + this.after(HeaderChange, this._afterHeaderChange); + this.after(BodyChange, this._afterBodyChange); + this.after(FooterChange, this._afterFooterChange); + }, + + _renderStdModSections : function() { + if (L.isValue(this.get(HEADER_CONTENT))) { this._renderStdMod(STD_HEADER); } + if (L.isValue(this.get(BODY_CONTENT))) { this._renderStdMod(STD_BODY); } + if (L.isValue(this.get(FOOTER_CONTENT))) { this._renderStdMod(STD_FOOTER); } + }, + + /** + * Binds event listeners responsible for updating the UI state in response to + * Widget standard module related state changes. + *

            + * This method is invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _bindUIStdMod + * @protected + */ + _bindUIStdMod : function() { + // this.after(HeaderChange, this._afterHeaderChange); + // this.after(BodyChange, this._afterBodyChange); + // this.after(FooterChange, this._afterFooterChange); + + this.after(FillHeightChange, this._afterFillHeightChange); + this.after(HeightChange, this._fillHeight); + this.after(ContentUpdate, this._fillHeight); + }, + + /** + * Default attribute change listener for the headerContent attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterHeaderChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterHeaderChange : function(e) { + if (e.src !== UI) { + this._uiSetStdMod(STD_HEADER, e.newVal, e.stdModPosition); + } + }, + + /** + * Default attribute change listener for the bodyContent attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterBodyChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterBodyChange : function(e) { + if (e.src !== UI) { + this._uiSetStdMod(STD_BODY, e.newVal, e.stdModPosition); + } + }, + + /** + * Default attribute change listener for the footerContent attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterFooterChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterFooterChange : function(e) { + if (e.src !== UI) { + this._uiSetStdMod(STD_FOOTER, e.newVal, e.stdModPosition); + } + }, + + /** + * Default attribute change listener for the fillHeight attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterFillHeightChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterFillHeightChange: function (e) { + this._uiSetFillHeight(e.newVal); + }, + + /** + * Default validator for the fillHeight attribute. Verifies that the + * value set is a valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER, + * or a falsey value if fillHeight is to be disabled. + * + * @method _validateFillHeight + * @protected + * @param {String} val The section which should be setup to fill height, or false/null to disable fillHeight + * @return true if valid, false if not + */ + _validateFillHeight : function(val) { + return !val || val == StdMod.BODY || val == StdMod.HEADER || val == StdMod.FOOTER; + }, + + /** + * Updates the rendered UI, to resize the provided section so that the standard module fills out + * the specified widget height. Note: This method does not check whether or not a height is set + * on the Widget. + * + * @method _uiSetFillHeight + * @protected + * @param {String} fillSection A valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER + */ + _uiSetFillHeight : function(fillSection) { + var fillNode = this.getStdModNode(fillSection); + var currNode = this._currFillNode; + + if (currNode && fillNode !== currNode){ + currNode.setStyle(HEIGHT, EMPTY); + } + + if (fillNode) { + this._currFillNode = fillNode; + } + + this._fillHeight(); + }, + + /** + * Updates the rendered UI, to resize the current section specified by the fillHeight attribute, so + * that the standard module fills out the Widget height. If a height has not been set on Widget, + * the section is not resized (height is set to "auto"). + * + * @method _fillHeight + * @private + */ + _fillHeight : function() { + if (this.get(FILL_HEIGHT)) { + var height = this.get(HEIGHT); + if (height != EMPTY && height != AUTO) { + this.fillHeight(this.getStdModNode(this.get(FILL_HEIGHT))); + } + } + }, + + /** + * Updates the rendered UI, adding the provided content (either an HTML string, or node reference), + * to the specified section. The content is either added before, after or replaces existing content + * in the section, based on the value of the where argument. + * + * @method _uiSetStdMod + * @protected + * + * @param {String} section The section to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @param {String | Node} content The new content (either as an HTML string, or Node reference) to add to the section + * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. + * If not provided, the content will replace existing content in the section. + */ + _uiSetStdMod : function(section, content, where) { + // Using isValue, so that "" is valid content + if (L.isValue(content)) { + var node = this.getStdModNode(section, true); + + this._addStdModContent(node, content, where); + + this.set(section + CONTENT_SUFFIX, this._getStdModContent(section), {src:UI}); + } else { + this._eraseStdMod(section); + } + this.fire(ContentUpdate); + }, + + /** + * Creates the DOM node for the given section, and inserts it into the correct location in the contentBox. + * + * @method _renderStdMod + * @protected + * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} A reference to the added section node + */ + _renderStdMod : function(section) { + + var contentBox = this.get(CONTENT_BOX), + sectionNode = this._findStdModSection(section); + + if (!sectionNode) { + sectionNode = this._getStdModTemplate(section); + } + + this._insertStdModSection(contentBox, section, sectionNode); + + this[section + NODE_SUFFIX] = sectionNode; + return this[section + NODE_SUFFIX]; + }, + + /** + * Removes the DOM node for the given section. + * + * @method _eraseStdMod + * @protected + * @param {String} section The section to remove. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + */ + _eraseStdMod : function(section) { + var sectionNode = this.getStdModNode(section); + if (sectionNode) { + sectionNode.remove(true); + delete this[section + NODE_SUFFIX]; + } + }, + + /** + * Helper method to insert the Node for the given section into the correct location in the contentBox. + * + * @method _insertStdModSection + * @private + * @param {Node} contentBox A reference to the Widgets content box. + * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @param {Node} sectionNode The Node for the section. + */ + _insertStdModSection : function(contentBox, section, sectionNode) { + var fc = contentBox.get(FIRST_CHILD); + + if (section === STD_FOOTER || !fc) { + contentBox.appendChild(sectionNode); + } else { + if (section === STD_HEADER) { + contentBox.insertBefore(sectionNode, fc); + } else { + var footer = this[STD_FOOTER + NODE_SUFFIX]; + if (footer) { + contentBox.insertBefore(sectionNode, footer); + } else { + contentBox.appendChild(sectionNode); + } + } + } + }, + + /** + * Gets a new Node reference for the given standard module section, by cloning + * the stored template node. + * + * @method _getStdModTemplate + * @protected + * @param {String} section The section to create a new node for. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} The new Node instance for the section + */ + _getStdModTemplate : function(section) { + return Node.create(StdMod.TEMPLATES[section], this._stdModNode.get(OWNER_DOCUMENT)); + }, + + /** + * Helper method to add content to a StdMod section node. + * The content is added either before, after or replaces the existing node content + * based on the value of the where argument. + * + * @method _addStdModContent + * @private + * + * @param {Node} node The section Node to be updated. + * @param {Node|NodeList|String} children The new content Node, NodeList or String to be added to section Node provided. + * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. + * If not provided, the content will replace existing content in the Node. + */ + _addStdModContent : function(node, children, where) { + + // StdMod where to Node where + switch (where) { + case StdMod.BEFORE: // 0 is before fistChild + where = 0; + break; + case StdMod.AFTER: // undefined is appendChild + where = undefined; + break; + default: // replace is replace, not specified is replace + where = StdMod.REPLACE; + } + + node.insert(children, where); + }, + + /** + * Helper method to obtain the precise height of the node provided, including padding and border. + * The height could be a sub-pixel value for certain browsers, such as Firefox 3. + * + * @method _getPreciseHeight + * @private + * @param {Node} node The node for which the precise height is required. + * @return {Number} The height of the Node including borders and padding, possibly a float. + */ + _getPreciseHeight : function(node) { + var height = (node) ? node.get(OFFSET_HEIGHT) : 0, + getBCR = "getBoundingClientRect"; + + if (node && node.hasMethod(getBCR)) { + var preciseRegion = node.invoke(getBCR); + if (preciseRegion) { + height = preciseRegion.bottom - preciseRegion.top; + } + } + + return height; + }, + + /** + * Helper method to to find the rendered node for the given section, + * if it exists. + * + * @method _findStdModSection + * @private + * @param {String} section The section for which the render Node is to be found. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} The rendered node for the given section, or null if not found. + */ + _findStdModSection: function(section) { + return this.get(CONTENT_BOX).one("> ." + StdMod.SECTION_CLASS_NAMES[section]); + }, + + /** + * Utility method, used by WidgetStdMods HTML_PARSER implementation + * to extract data for each section from markup. + * + * @method _parseStdModHTML + * @private + * @param {String} section + * @return {String} Inner HTML string with the contents of the section + */ + _parseStdModHTML : function(section) { + + var node = this._findStdModSection(section); + + if (node) { + if (!this._stdModParsed) { + this._stdModParsed = {}; + Y.before(this._applyStdModParsedConfig, this, APPLY_PARSED_CONFIG); + } + this._stdModParsed[section + CONTENT_SUFFIX] = 1; + + return node.get("innerHTML"); + } + + return null; + }, + + /** + * This method is injected before the _applyParsedConfig step in + * the application of HTML_PARSER, and sets up the state to + * identify whether or not we should remove the current DOM content + * or not, based on whether or not the current content attribute value + * was extracted from the DOM, or provided by the user configuration + * + * @method _applyStdModParsedConfig + * @private + */ + _applyStdModParsedConfig : function(node, cfg, parsedCfg) { + var parsed = this._stdModParsed; + if (parsed) { + parsed[HEADER_CONTENT] = !(HEADER_CONTENT in cfg) && (HEADER_CONTENT in parsed); + parsed[BODY_CONTENT] = !(BODY_CONTENT in cfg) && (BODY_CONTENT in parsed); + parsed[FOOTER_CONTENT] = !(FOOTER_CONTENT in cfg) && (FOOTER_CONTENT in parsed); + } + }, + + /** + * Retrieves the child nodes (content) of a standard module section + * + * @method _getStdModContent + * @private + * @param {String} section The standard module section whose child nodes are to be retrieved. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} The child node collection of the standard module section. + */ + _getStdModContent : function(section) { + return (this[section + NODE_SUFFIX]) ? this[section + NODE_SUFFIX].get(CHILD_NODES) : null; + }, + + /** + * Updates the body section of the standard module with the content provided (either an HTML string, or node reference). + *

            + * This method can be used instead of the corresponding section content attribute if you'd like to retain the current content of the section, + * and insert content before or after it, by specifying the where argument. + *

            + * @method setStdModContent + * @param {String} section The standard module section whose content is to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @param {String | Node} content The content to be added, either an HTML string or a Node reference. + * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. + * If not provided, the content will replace existing content in the section. + */ + setStdModContent : function(section, content, where) { + //var node = this.getStdModNode(section) || this._renderStdMod(section); + this.set(section + CONTENT_SUFFIX, content, {stdModPosition:where}); + //this._addStdModContent(node, content, where); + }, + + /** + Returns the node reference for the specified `section`. + + **Note:** The DOM is not queried for the node reference. The reference + stored by the widget instance is returned if it was set. Passing a + truthy for `forceCreate` will create the section node if it does not + already exist. + + @method getStdModNode + @param {String} section The section whose node reference is required. + Either `WidgetStdMod.HEADER`, `WidgetStdMod.BODY`, or + `WidgetStdMod.FOOTER`. + @param {Boolean} forceCreate Whether the section node should be created + if it does not already exist. + @return {Node} The node reference for the `section`, or null if not set. + **/ + getStdModNode : function(section, forceCreate) { + var node = this[section + NODE_SUFFIX] || null; + + if (!node && forceCreate) { + node = this._renderStdMod(section); + } + + return node; + }, + + /** + * Sets the height on the provided header, body or footer element to + * fill out the height of the Widget. It determines the height of the + * widgets bounding box, based on it's configured height value, and + * sets the height of the provided section to fill out any + * space remaining after the other standard module section heights + * have been accounted for. + * + *

            NOTE: This method is not designed to work if an explicit + * height has not been set on the Widget, since for an "auto" height Widget, + * the heights of the header/body/footer will drive the height of the Widget.

            + * + * @method fillHeight + * @param {Node} node The node which should be resized to fill out the height + * of the Widget bounding box. Should be a standard module section node which belongs + * to the widget. + */ + fillHeight : function(node) { + if (node) { + var contentBox = this.get(CONTENT_BOX), + stdModNodes = [this.headerNode, this.bodyNode, this.footerNode], + stdModNode, + cbContentHeight, + filled = 0, + remaining = 0, + + validNode = false; + + for (var i = 0, l = stdModNodes.length; i < l; i++) { + stdModNode = stdModNodes[i]; + if (stdModNode) { + if (stdModNode !== node) { + filled += this._getPreciseHeight(stdModNode); + } else { + validNode = true; + } + } + } + + if (validNode) { + if (UA.ie || UA.opera) { + // Need to set height to 0, to allow height to be reduced + node.set(OFFSET_HEIGHT, 0); + } + + cbContentHeight = contentBox.get(OFFSET_HEIGHT) - + parseInt(contentBox.getComputedStyle("paddingTop"), 10) - + parseInt(contentBox.getComputedStyle("paddingBottom"), 10) - + parseInt(contentBox.getComputedStyle("borderBottomWidth"), 10) - + parseInt(contentBox.getComputedStyle("borderTopWidth"), 10); + + if (L.isNumber(cbContentHeight)) { + remaining = cbContentHeight - filled; + if (remaining >= 0) { + node.set(OFFSET_HEIGHT, remaining); + } + } + } + } + } + }; + + Y.WidgetStdMod = StdMod; + + +}, '3.17.2', {"requires": ["base-build", "widget"]}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-min.js b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-min.js new file mode 100644 index 0000000..14d8431 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("widget-stdmod",function(e,t){function H(e){}var n=e.Lang,r=e.Node,i=e.UA,s=e.Widget,o="",u="hd",a="bd",f="ft",l="header",c="body",h="footer",p="fillHeight",d="stdmod",v="Node",m="Content",g="firstChild",y="childNodes",b="ownerDocument",w="contentBox",E="height",S="offsetHeight",x="auto",T="headerContentChange",N="bodyContentChange",C="footerContentChange",k="fillHeightChange",L="heightChange",A="contentUpdate",O="renderUI",M="bindUI",_="syncUI",D="_applyParsedConfig",P=e.Widget.UI_SRC;H.HEADER=l,H.BODY=c,H.FOOTER=h,H.AFTER="after",H.BEFORE="before",H.REPLACE="replace";var B=H.HEADER,j=H.BODY,F=H.FOOTER,I=B+m,q=F+m,R=j+m;H.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:H.BODY,validator:function(e){return this._validateFillHeight(e)}}},H.HTML_PARSER={headerContent:function(e){return this._parseStdModHTML(B)},bodyContent:function(e){return this._parseStdModHTML(j)},footerContent:function(e){return this._parseStdModHTML(F)}},H.SECTION_CLASS_NAMES={header:s.getClassName(u),body:s.getClassName(a),footer:s.getClassName(f)},H.TEMPLATES={header:'
            ',body:'
            ',footer:'
            '},H.prototype={initializer:function(){this._stdModNode=this.get(w),e.before(this._renderUIStdMod,this,O),e.before(this._bindUIStdMod,this,M),e.before(this._syncUIStdMod,this,_)},_syncUIStdMod:function(){var e=this._stdModParsed;(!e||!e[I])&&this._uiSetStdMod(B,this.get(I)),(!e||!e[R])&&this._uiSetStdMod(j,this.get(R)),(!e||!e[q])&&this._uiSetStdMod(F,this.get(q)),this._uiSetFillHeight(this.get(p))},_renderUIStdMod:function(){this._stdModNode.addClass(s.getClassName(d)),this._renderStdModSections(),this.after(T,this._afterHeaderChange),this.after(N,this._afterBodyChange),this.after(C,this._afterFooterChange)},_renderStdModSections:function(){n.isValue(this.get(I))&&this._renderStdMod(B),n.isValue(this.get(R))&&this._renderStdMod(j),n.isValue(this.get(q))&&this._renderStdMod(F)},_bindUIStdMod:function(){this.after(k,this._afterFillHeightChange),this.after(L,this._fillHeight),this.after(A,this._fillHeight)},_afterHeaderChange:function(e){e.src!==P&&this._uiSetStdMod(B,e.newVal,e.stdModPosition)},_afterBodyChange:function(e){e.src!==P&&this._uiSetStdMod(j,e.newVal,e.stdModPosition)},_afterFooterChange:function(e){e.src!==P&&this._uiSetStdMod(F,e.newVal,e.stdModPosition)},_afterFillHeightChange:function(e){this._uiSetFillHeight(e.newVal)},_validateFillHeight:function(e){return!e||e==H.BODY||e==H.HEADER||e==H.FOOTER},_uiSetFillHeight:function(e){var t=this.getStdModNode(e),n=this._currFillNode;n&&t!==n&&n.setStyle(E,o),t&&(this._currFillNode=t),this._fillHeight()},_fillHeight:function(){if(this.get(p)){var e=this.get(E);e!=o&&e!=x&&this.fillHeight(this.getStdModNode(this.get(p)))}},_uiSetStdMod:function(e,t,r){if(n.isValue(t)){var i=this.getStdModNode(e,!0);this._addStdModContent(i,t,r),this.set(e+m,this._getStdModContent(e),{src:P})}else this._eraseStdMod(e);this.fire(A)},_renderStdMod:function(e){var t=this.get(w),n=this._findStdModSection(e);return n||(n=this._getStdModTemplate(e)),this._insertStdModSection(t,e,n),this[e+v]=n,this[e+v]},_eraseStdMod:function(e){var t=this.getStdModNode(e);t&&(t.remove(!0),delete this[e+v])},_insertStdModSection:function(e,t,n){var r=e.get(g);if(t===F||!r)e.appendChild(n);else if(t===B)e.insertBefore(n,r);else{var i=this[F+v];i?e.insertBefore(n,i):e.appendChild(n)}},_getStdModTemplate:function(e){return r.create(H.TEMPLATES[e],this._stdModNode.get(b))},_addStdModContent:function(e,t,n){switch(n){case H.BEFORE:n=0;break;case H.AFTER:n=undefined;break;default:n=H.REPLACE}e.insert(t,n)},_getPreciseHeight:function(e){var t=e?e.get(S):0,n="getBoundingClientRect";if(e&&e.hasMethod(n)){var r=e.invoke(n);r&&(t=r.bottom-r.top)}return t},_findStdModSection:function(e){return this.get(w).one("> ."+H.SECTION_CLASS_NAMES[e])},_parseStdModHTML:function(t){var n=this._findStdModSection(t);return n?(this._stdModParsed||(this._stdModParsed={},e.before(this._applyStdModParsedConfig,this,D)),this._stdModParsed[t+m]=1,n.get("innerHTML")):null},_applyStdModParsedConfig:function(e,t,n){var r=this._stdModParsed;r&&(r[I]=!(I in t)&&I in r,r[R]=!(R in t)&&R in r,r[q]=!(q in t)&&q in r)},_getStdModContent:function(e){return this[e+v]?this[e+v].get(y):null},setStdModContent:function(e,t,n){this.set(e+m,t,{stdModPosition:n})},getStdModNode:function(e,t){var n=this[e+v]||null;return!n&&t&&(n=this._renderStdMod(e)),n},fillHeight:function(e){if(e){var t=this.get(w),r=[this.headerNode,this.bodyNode,this.footerNode],s,o,u=0,a=0,f=!1;for(var l=0,c=r.length;l=0&&e.set(S,a)))}}},e.WidgetStdMod=H},"3.17.2",{requires:["base-build","widget"]}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod.js b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod.js new file mode 100644 index 0000000..fc78f8a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-stdmod/widget-stdmod.js @@ -0,0 +1,787 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('widget-stdmod', function (Y, NAME) { + +/** + * Provides standard module support for Widgets through an extension. + * + * @module widget-stdmod + */ + var L = Y.Lang, + Node = Y.Node, + UA = Y.UA, + Widget = Y.Widget, + + EMPTY = "", + HD = "hd", + BD = "bd", + FT = "ft", + HEADER = "header", + BODY = "body", + FOOTER = "footer", + FILL_HEIGHT = "fillHeight", + STDMOD = "stdmod", + + NODE_SUFFIX = "Node", + CONTENT_SUFFIX = "Content", + + FIRST_CHILD = "firstChild", + CHILD_NODES = "childNodes", + OWNER_DOCUMENT = "ownerDocument", + + CONTENT_BOX = "contentBox", + + HEIGHT = "height", + OFFSET_HEIGHT = "offsetHeight", + AUTO = "auto", + + HeaderChange = "headerContentChange", + BodyChange = "bodyContentChange", + FooterChange = "footerContentChange", + FillHeightChange = "fillHeightChange", + HeightChange = "heightChange", + ContentUpdate = "contentUpdate", + + RENDERUI = "renderUI", + BINDUI = "bindUI", + SYNCUI = "syncUI", + + APPLY_PARSED_CONFIG = "_applyParsedConfig", + + UI = Y.Widget.UI_SRC; + + /** + * Widget extension, which can be used to add Standard Module support to the + * base Widget class, through the Base.build + * method. + *

            + * The extension adds header, body and footer sections to the Widget's content box and + * provides the corresponding methods and attributes to modify the contents of these sections. + *

            + * @class WidgetStdMod + * @param {Object} The user configuration object + */ + function StdMod(config) {} + + /** + * Constant used to refer the the standard module header, in methods which expect a section specifier + * + * @property HEADER + * @static + * @type String + */ + StdMod.HEADER = HEADER; + + /** + * Constant used to refer the the standard module body, in methods which expect a section specifier + * + * @property BODY + * @static + * @type String + */ + StdMod.BODY = BODY; + + /** + * Constant used to refer the the standard module footer, in methods which expect a section specifier + * + * @property FOOTER + * @static + * @type String + */ + StdMod.FOOTER = FOOTER; + + /** + * Constant used to specify insertion position, when adding content to sections of the standard module in + * methods which expect a "where" argument. + *

            + * Inserts new content before the sections existing content. + *

            + * @property AFTER + * @static + * @type String + */ + StdMod.AFTER = "after"; + + /** + * Constant used to specify insertion position, when adding content to sections of the standard module in + * methods which expect a "where" argument. + *

            + * Inserts new content before the sections existing content. + *

            + * @property BEFORE + * @static + * @type String + */ + StdMod.BEFORE = "before"; + /** + * Constant used to specify insertion position, when adding content to sections of the standard module in + * methods which expect a "where" argument. + *

            + * Replaces the sections existing content, with new content. + *

            + * @property REPLACE + * @static + * @type String + */ + StdMod.REPLACE = "replace"; + + var STD_HEADER = StdMod.HEADER, + STD_BODY = StdMod.BODY, + STD_FOOTER = StdMod.FOOTER, + + HEADER_CONTENT = STD_HEADER + CONTENT_SUFFIX, + FOOTER_CONTENT = STD_FOOTER + CONTENT_SUFFIX, + BODY_CONTENT = STD_BODY + CONTENT_SUFFIX; + + /** + * Static property used to define the default attribute + * configuration introduced by WidgetStdMod. + * + * @property ATTRS + * @type Object + * @static + */ + StdMod.ATTRS = { + + /** + * @attribute headerContent + * @type HTML + * @default undefined + * @description The content to be added to the header section. This will replace any existing content + * in the header. If you want to append, or insert new content, use the setStdModContent method. + */ + headerContent: { + value:null + }, + + /** + * @attribute footerContent + * @type HTML + * @default undefined + * @description The content to be added to the footer section. This will replace any existing content + * in the footer. If you want to append, or insert new content, use the setStdModContent method. + */ + footerContent: { + value:null + }, + + /** + * @attribute bodyContent + * @type HTML + * @default undefined + * @description The content to be added to the body section. This will replace any existing content + * in the body. If you want to append, or insert new content, use the setStdModContent method. + */ + bodyContent: { + value:null + }, + + /** + * @attribute fillHeight + * @type {String} + * @default WidgetStdMod.BODY + * @description The section (WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER) which should be resized to fill the height of the standard module, when a + * height is set on the Widget. If a height is not set on the widget, then all sections are sized based on + * their content. + */ + fillHeight: { + value: StdMod.BODY, + validator: function(val) { + return this._validateFillHeight(val); + } + } + }; + + /** + * The HTML parsing rules for the WidgetStdMod class. + * + * @property HTML_PARSER + * @static + * @type Object + */ + StdMod.HTML_PARSER = { + headerContent: function(contentBox) { + return this._parseStdModHTML(STD_HEADER); + }, + + bodyContent: function(contentBox) { + return this._parseStdModHTML(STD_BODY); + }, + + footerContent : function(contentBox) { + return this._parseStdModHTML(STD_FOOTER); + } + }; + + /** + * Static hash of default class names used for the header, + * body and footer sections of the standard module, keyed by + * the section identifier (WidgetStdMod.STD_HEADER, WidgetStdMod.STD_BODY, WidgetStdMod.STD_FOOTER) + * + * @property SECTION_CLASS_NAMES + * @static + * @type Object + */ + StdMod.SECTION_CLASS_NAMES = { + header: Widget.getClassName(HD), + body: Widget.getClassName(BD), + footer: Widget.getClassName(FT) + }; + + /** + * The template HTML strings for each of the standard module sections. Section entries are keyed by the section constants, + * WidgetStdMod.HEADER, WidgetStdMod.BODY, WidgetStdMod.FOOTER, and contain the HTML to be added for each section. + * e.g. + *
            +     *    {
            +     *       header : '<div class="yui-widget-hd"></div>',
            +     *       body : '<div class="yui-widget-bd"></div>',
            +     *       footer : '<div class="yui-widget-ft"></div>'
            +     *    }
            +     * 
            + * @property TEMPLATES + * @type Object + * @static + */ + StdMod.TEMPLATES = { + header : '
            ', + body : '
            ', + footer : '
            ' + }; + + StdMod.prototype = { + + initializer : function() { + this._stdModNode = this.get(CONTENT_BOX); + + Y.before(this._renderUIStdMod, this, RENDERUI); + Y.before(this._bindUIStdMod, this, BINDUI); + Y.before(this._syncUIStdMod, this, SYNCUI); + }, + + /** + * Synchronizes the UI to match the Widgets standard module state. + *

            + * This method is invoked after syncUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _syncUIStdMod + * @protected + */ + _syncUIStdMod : function() { + var stdModParsed = this._stdModParsed; + + if (!stdModParsed || !stdModParsed[HEADER_CONTENT]) { + this._uiSetStdMod(STD_HEADER, this.get(HEADER_CONTENT)); + } + + if (!stdModParsed || !stdModParsed[BODY_CONTENT]) { + this._uiSetStdMod(STD_BODY, this.get(BODY_CONTENT)); + } + + if (!stdModParsed || !stdModParsed[FOOTER_CONTENT]) { + this._uiSetStdMod(STD_FOOTER, this.get(FOOTER_CONTENT)); + } + + this._uiSetFillHeight(this.get(FILL_HEIGHT)); + }, + + /** + * Creates/Initializes the DOM for standard module support. + *

            + * This method is invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _renderUIStdMod + * @protected + */ + _renderUIStdMod : function() { + this._stdModNode.addClass(Widget.getClassName(STDMOD)); + this._renderStdModSections(); + + //This normally goes in bindUI but in order to allow setStdModContent() to work before renderUI + //stage, these listeners should be set up at the earliest possible time. + this.after(HeaderChange, this._afterHeaderChange); + this.after(BodyChange, this._afterBodyChange); + this.after(FooterChange, this._afterFooterChange); + }, + + _renderStdModSections : function() { + if (L.isValue(this.get(HEADER_CONTENT))) { this._renderStdMod(STD_HEADER); } + if (L.isValue(this.get(BODY_CONTENT))) { this._renderStdMod(STD_BODY); } + if (L.isValue(this.get(FOOTER_CONTENT))) { this._renderStdMod(STD_FOOTER); } + }, + + /** + * Binds event listeners responsible for updating the UI state in response to + * Widget standard module related state changes. + *

            + * This method is invoked after bindUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

            + * @method _bindUIStdMod + * @protected + */ + _bindUIStdMod : function() { + // this.after(HeaderChange, this._afterHeaderChange); + // this.after(BodyChange, this._afterBodyChange); + // this.after(FooterChange, this._afterFooterChange); + + this.after(FillHeightChange, this._afterFillHeightChange); + this.after(HeightChange, this._fillHeight); + this.after(ContentUpdate, this._fillHeight); + }, + + /** + * Default attribute change listener for the headerContent attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterHeaderChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterHeaderChange : function(e) { + if (e.src !== UI) { + this._uiSetStdMod(STD_HEADER, e.newVal, e.stdModPosition); + } + }, + + /** + * Default attribute change listener for the bodyContent attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterBodyChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterBodyChange : function(e) { + if (e.src !== UI) { + this._uiSetStdMod(STD_BODY, e.newVal, e.stdModPosition); + } + }, + + /** + * Default attribute change listener for the footerContent attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterFooterChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterFooterChange : function(e) { + if (e.src !== UI) { + this._uiSetStdMod(STD_FOOTER, e.newVal, e.stdModPosition); + } + }, + + /** + * Default attribute change listener for the fillHeight attribute, responsible + * for updating the UI, in response to attribute changes. + * + * @method _afterFillHeightChange + * @protected + * @param {EventFacade} e The event facade for the attribute change + */ + _afterFillHeightChange: function (e) { + this._uiSetFillHeight(e.newVal); + }, + + /** + * Default validator for the fillHeight attribute. Verifies that the + * value set is a valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER, + * or a falsey value if fillHeight is to be disabled. + * + * @method _validateFillHeight + * @protected + * @param {String} val The section which should be setup to fill height, or false/null to disable fillHeight + * @return true if valid, false if not + */ + _validateFillHeight : function(val) { + return !val || val == StdMod.BODY || val == StdMod.HEADER || val == StdMod.FOOTER; + }, + + /** + * Updates the rendered UI, to resize the provided section so that the standard module fills out + * the specified widget height. Note: This method does not check whether or not a height is set + * on the Widget. + * + * @method _uiSetFillHeight + * @protected + * @param {String} fillSection A valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER + */ + _uiSetFillHeight : function(fillSection) { + var fillNode = this.getStdModNode(fillSection); + var currNode = this._currFillNode; + + if (currNode && fillNode !== currNode){ + currNode.setStyle(HEIGHT, EMPTY); + } + + if (fillNode) { + this._currFillNode = fillNode; + } + + this._fillHeight(); + }, + + /** + * Updates the rendered UI, to resize the current section specified by the fillHeight attribute, so + * that the standard module fills out the Widget height. If a height has not been set on Widget, + * the section is not resized (height is set to "auto"). + * + * @method _fillHeight + * @private + */ + _fillHeight : function() { + if (this.get(FILL_HEIGHT)) { + var height = this.get(HEIGHT); + if (height != EMPTY && height != AUTO) { + this.fillHeight(this.getStdModNode(this.get(FILL_HEIGHT))); + } + } + }, + + /** + * Updates the rendered UI, adding the provided content (either an HTML string, or node reference), + * to the specified section. The content is either added before, after or replaces existing content + * in the section, based on the value of the where argument. + * + * @method _uiSetStdMod + * @protected + * + * @param {String} section The section to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @param {String | Node} content The new content (either as an HTML string, or Node reference) to add to the section + * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. + * If not provided, the content will replace existing content in the section. + */ + _uiSetStdMod : function(section, content, where) { + // Using isValue, so that "" is valid content + if (L.isValue(content)) { + var node = this.getStdModNode(section, true); + + this._addStdModContent(node, content, where); + + this.set(section + CONTENT_SUFFIX, this._getStdModContent(section), {src:UI}); + } else { + this._eraseStdMod(section); + } + this.fire(ContentUpdate); + }, + + /** + * Creates the DOM node for the given section, and inserts it into the correct location in the contentBox. + * + * @method _renderStdMod + * @protected + * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} A reference to the added section node + */ + _renderStdMod : function(section) { + + var contentBox = this.get(CONTENT_BOX), + sectionNode = this._findStdModSection(section); + + if (!sectionNode) { + sectionNode = this._getStdModTemplate(section); + } + + this._insertStdModSection(contentBox, section, sectionNode); + + this[section + NODE_SUFFIX] = sectionNode; + return this[section + NODE_SUFFIX]; + }, + + /** + * Removes the DOM node for the given section. + * + * @method _eraseStdMod + * @protected + * @param {String} section The section to remove. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + */ + _eraseStdMod : function(section) { + var sectionNode = this.getStdModNode(section); + if (sectionNode) { + sectionNode.remove(true); + delete this[section + NODE_SUFFIX]; + } + }, + + /** + * Helper method to insert the Node for the given section into the correct location in the contentBox. + * + * @method _insertStdModSection + * @private + * @param {Node} contentBox A reference to the Widgets content box. + * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @param {Node} sectionNode The Node for the section. + */ + _insertStdModSection : function(contentBox, section, sectionNode) { + var fc = contentBox.get(FIRST_CHILD); + + if (section === STD_FOOTER || !fc) { + contentBox.appendChild(sectionNode); + } else { + if (section === STD_HEADER) { + contentBox.insertBefore(sectionNode, fc); + } else { + var footer = this[STD_FOOTER + NODE_SUFFIX]; + if (footer) { + contentBox.insertBefore(sectionNode, footer); + } else { + contentBox.appendChild(sectionNode); + } + } + } + }, + + /** + * Gets a new Node reference for the given standard module section, by cloning + * the stored template node. + * + * @method _getStdModTemplate + * @protected + * @param {String} section The section to create a new node for. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} The new Node instance for the section + */ + _getStdModTemplate : function(section) { + return Node.create(StdMod.TEMPLATES[section], this._stdModNode.get(OWNER_DOCUMENT)); + }, + + /** + * Helper method to add content to a StdMod section node. + * The content is added either before, after or replaces the existing node content + * based on the value of the where argument. + * + * @method _addStdModContent + * @private + * + * @param {Node} node The section Node to be updated. + * @param {Node|NodeList|String} children The new content Node, NodeList or String to be added to section Node provided. + * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. + * If not provided, the content will replace existing content in the Node. + */ + _addStdModContent : function(node, children, where) { + + // StdMod where to Node where + switch (where) { + case StdMod.BEFORE: // 0 is before fistChild + where = 0; + break; + case StdMod.AFTER: // undefined is appendChild + where = undefined; + break; + default: // replace is replace, not specified is replace + where = StdMod.REPLACE; + } + + node.insert(children, where); + }, + + /** + * Helper method to obtain the precise height of the node provided, including padding and border. + * The height could be a sub-pixel value for certain browsers, such as Firefox 3. + * + * @method _getPreciseHeight + * @private + * @param {Node} node The node for which the precise height is required. + * @return {Number} The height of the Node including borders and padding, possibly a float. + */ + _getPreciseHeight : function(node) { + var height = (node) ? node.get(OFFSET_HEIGHT) : 0, + getBCR = "getBoundingClientRect"; + + if (node && node.hasMethod(getBCR)) { + var preciseRegion = node.invoke(getBCR); + if (preciseRegion) { + height = preciseRegion.bottom - preciseRegion.top; + } + } + + return height; + }, + + /** + * Helper method to to find the rendered node for the given section, + * if it exists. + * + * @method _findStdModSection + * @private + * @param {String} section The section for which the render Node is to be found. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} The rendered node for the given section, or null if not found. + */ + _findStdModSection: function(section) { + return this.get(CONTENT_BOX).one("> ." + StdMod.SECTION_CLASS_NAMES[section]); + }, + + /** + * Utility method, used by WidgetStdMods HTML_PARSER implementation + * to extract data for each section from markup. + * + * @method _parseStdModHTML + * @private + * @param {String} section + * @return {String} Inner HTML string with the contents of the section + */ + _parseStdModHTML : function(section) { + + var node = this._findStdModSection(section); + + if (node) { + if (!this._stdModParsed) { + this._stdModParsed = {}; + Y.before(this._applyStdModParsedConfig, this, APPLY_PARSED_CONFIG); + } + this._stdModParsed[section + CONTENT_SUFFIX] = 1; + + return node.get("innerHTML"); + } + + return null; + }, + + /** + * This method is injected before the _applyParsedConfig step in + * the application of HTML_PARSER, and sets up the state to + * identify whether or not we should remove the current DOM content + * or not, based on whether or not the current content attribute value + * was extracted from the DOM, or provided by the user configuration + * + * @method _applyStdModParsedConfig + * @private + */ + _applyStdModParsedConfig : function(node, cfg, parsedCfg) { + var parsed = this._stdModParsed; + if (parsed) { + parsed[HEADER_CONTENT] = !(HEADER_CONTENT in cfg) && (HEADER_CONTENT in parsed); + parsed[BODY_CONTENT] = !(BODY_CONTENT in cfg) && (BODY_CONTENT in parsed); + parsed[FOOTER_CONTENT] = !(FOOTER_CONTENT in cfg) && (FOOTER_CONTENT in parsed); + } + }, + + /** + * Retrieves the child nodes (content) of a standard module section + * + * @method _getStdModContent + * @private + * @param {String} section The standard module section whose child nodes are to be retrieved. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @return {Node} The child node collection of the standard module section. + */ + _getStdModContent : function(section) { + return (this[section + NODE_SUFFIX]) ? this[section + NODE_SUFFIX].get(CHILD_NODES) : null; + }, + + /** + * Updates the body section of the standard module with the content provided (either an HTML string, or node reference). + *

            + * This method can be used instead of the corresponding section content attribute if you'd like to retain the current content of the section, + * and insert content before or after it, by specifying the where argument. + *

            + * @method setStdModContent + * @param {String} section The standard module section whose content is to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER. + * @param {String | Node} content The content to be added, either an HTML string or a Node reference. + * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. + * If not provided, the content will replace existing content in the section. + */ + setStdModContent : function(section, content, where) { + //var node = this.getStdModNode(section) || this._renderStdMod(section); + this.set(section + CONTENT_SUFFIX, content, {stdModPosition:where}); + //this._addStdModContent(node, content, where); + }, + + /** + Returns the node reference for the specified `section`. + + **Note:** The DOM is not queried for the node reference. The reference + stored by the widget instance is returned if it was set. Passing a + truthy for `forceCreate` will create the section node if it does not + already exist. + + @method getStdModNode + @param {String} section The section whose node reference is required. + Either `WidgetStdMod.HEADER`, `WidgetStdMod.BODY`, or + `WidgetStdMod.FOOTER`. + @param {Boolean} forceCreate Whether the section node should be created + if it does not already exist. + @return {Node} The node reference for the `section`, or null if not set. + **/ + getStdModNode : function(section, forceCreate) { + var node = this[section + NODE_SUFFIX] || null; + + if (!node && forceCreate) { + node = this._renderStdMod(section); + } + + return node; + }, + + /** + * Sets the height on the provided header, body or footer element to + * fill out the height of the Widget. It determines the height of the + * widgets bounding box, based on it's configured height value, and + * sets the height of the provided section to fill out any + * space remaining after the other standard module section heights + * have been accounted for. + * + *

            NOTE: This method is not designed to work if an explicit + * height has not been set on the Widget, since for an "auto" height Widget, + * the heights of the header/body/footer will drive the height of the Widget.

            + * + * @method fillHeight + * @param {Node} node The node which should be resized to fill out the height + * of the Widget bounding box. Should be a standard module section node which belongs + * to the widget. + */ + fillHeight : function(node) { + if (node) { + var contentBox = this.get(CONTENT_BOX), + stdModNodes = [this.headerNode, this.bodyNode, this.footerNode], + stdModNode, + cbContentHeight, + filled = 0, + remaining = 0, + + validNode = false; + + for (var i = 0, l = stdModNodes.length; i < l; i++) { + stdModNode = stdModNodes[i]; + if (stdModNode) { + if (stdModNode !== node) { + filled += this._getPreciseHeight(stdModNode); + } else { + validNode = true; + } + } + } + + if (validNode) { + if (UA.ie || UA.opera) { + // Need to set height to 0, to allow height to be reduced + node.set(OFFSET_HEIGHT, 0); + } + + cbContentHeight = contentBox.get(OFFSET_HEIGHT) - + parseInt(contentBox.getComputedStyle("paddingTop"), 10) - + parseInt(contentBox.getComputedStyle("paddingBottom"), 10) - + parseInt(contentBox.getComputedStyle("borderBottomWidth"), 10) - + parseInt(contentBox.getComputedStyle("borderTopWidth"), 10); + + if (L.isNumber(cbContentHeight)) { + remaining = cbContentHeight - filled; + if (remaining >= 0) { + node.set(OFFSET_HEIGHT, remaining); + } + } + } + } + } + }; + + Y.WidgetStdMod = StdMod; + + +}, '3.17.2', {"requires": ["base-build", "widget"]}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-coverage.js b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-coverage.js new file mode 100644 index 0000000..8f87501 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/widget-uievents/widget-uievents.js']) { + __coverage__['build/widget-uievents/widget-uievents.js'] = {"path":"build/widget-uievents/widget-uievents.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":46}}},"2":{"name":"(anonymous_2)","line":30,"loc":{"start":{"line":30,"column":22},"end":{"line":30,"column":33}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":24},"end":{"line":34,"column":45}}},"4":{"name":"(anonymous_4)","line":71,"loc":{"start":{"line":71,"column":21},"end":{"line":71,"column":33}}},"5":{"name":"(anonymous_5)","line":85,"loc":{"start":{"line":85,"column":20},"end":{"line":85,"column":36}}},"6":{"name":"(anonymous_6)","line":97,"loc":{"start":{"line":97,"column":46},"end":{"line":97,"column":61}}},"7":{"name":"(anonymous_7)","line":139,"loc":{"start":{"line":139,"column":20},"end":{"line":139,"column":34}}},"8":{"name":"(anonymous_8)","line":155,"loc":{"start":{"line":155,"column":17},"end":{"line":155,"column":33}}},"9":{"name":"(anonymous_9)","line":187,"loc":{"start":{"line":187,"column":18},"end":{"line":187,"column":34}}},"10":{"name":"(anonymous_10)","line":195,"loc":{"start":{"line":195,"column":31},"end":{"line":195,"column":42}}},"11":{"name":"(anonymous_11)","line":206,"loc":{"start":{"line":206,"column":8},"end":{"line":206,"column":24}}},"12":{"name":"(anonymous_12)","line":215,"loc":{"start":{"line":215,"column":13},"end":{"line":215,"column":37}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":226,"column":67}},"2":{"start":{"line":10,"column":0},"end":{"line":18,"column":56}},"3":{"start":{"line":20,"column":0},"end":{"line":223,"column":9}},"4":{"start":{"line":32,"column":8},"end":{"line":32,"column":45}},"5":{"start":{"line":34,"column":8},"end":{"line":51,"column":11}},"6":{"start":{"line":35,"column":12},"end":{"line":50,"column":13}},"7":{"start":{"line":38,"column":16},"end":{"line":38,"column":50}},"8":{"start":{"line":43,"column":16},"end":{"line":49,"column":17}},"9":{"start":{"line":44,"column":20},"end":{"line":44,"column":41}},"10":{"start":{"line":46,"column":20},"end":{"line":48,"column":21}},"11":{"start":{"line":47,"column":24},"end":{"line":47,"column":44}},"12":{"start":{"line":72,"column":8},"end":{"line":72,"column":38}},"13":{"start":{"line":87,"column":8},"end":{"line":90,"column":19}},"14":{"start":{"line":95,"column":8},"end":{"line":113,"column":9}},"15":{"start":{"line":97,"column":12},"end":{"line":110,"column":46}},"16":{"start":{"line":99,"column":16},"end":{"line":99,"column":52}},"17":{"start":{"line":104,"column":16},"end":{"line":108,"column":17}},"18":{"start":{"line":105,"column":20},"end":{"line":107,"column":21}},"19":{"start":{"line":106,"column":24},"end":{"line":106,"column":65}},"20":{"start":{"line":112,"column":12},"end":{"line":112,"column":68}},"21":{"start":{"line":116,"column":8},"end":{"line":116,"column":42}},"22":{"start":{"line":142,"column":8},"end":{"line":142,"column":111}},"23":{"start":{"line":157,"column":8},"end":{"line":175,"column":9}},"24":{"start":{"line":158,"column":12},"end":{"line":160,"column":26}},"25":{"start":{"line":162,"column":12},"end":{"line":172,"column":13}},"26":{"start":{"line":164,"column":16},"end":{"line":164,"column":63}},"27":{"start":{"line":165,"column":16},"end":{"line":167,"column":17}},"28":{"start":{"line":166,"column":20},"end":{"line":166,"column":84}},"29":{"start":{"line":169,"column":16},"end":{"line":171,"column":17}},"30":{"start":{"line":170,"column":20},"end":{"line":170,"column":38}},"31":{"start":{"line":174,"column":12},"end":{"line":174,"column":29}},"32":{"start":{"line":188,"column":8},"end":{"line":189,"column":48}},"33":{"start":{"line":191,"column":8},"end":{"line":199,"column":9}},"34":{"start":{"line":193,"column":12},"end":{"line":193,"column":53}},"35":{"start":{"line":195,"column":12},"end":{"line":198,"column":15}},"36":{"start":{"line":196,"column":16},"end":{"line":196,"column":43}},"37":{"start":{"line":197,"column":16},"end":{"line":197,"column":52}},"38":{"start":{"line":207,"column":8},"end":{"line":207,"column":32}},"39":{"start":{"line":208,"column":8},"end":{"line":208,"column":59}},"40":{"start":{"line":216,"column":8},"end":{"line":216,"column":43}},"41":{"start":{"line":217,"column":8},"end":{"line":219,"column":9}},"42":{"start":{"line":218,"column":12},"end":{"line":218,"column":37}},"43":{"start":{"line":220,"column":8},"end":{"line":220,"column":64}}},"branchMap":{"1":{"line":18,"type":"binary-expr","locations":[{"start":{"line":18,"column":33},"end":{"line":18,"column":49}},{"start":{"line":18,"column":53},"end":{"line":18,"column":55}}]},"2":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":12}},{"start":{"line":35,"column":12},"end":{"line":35,"column":12}}]},"3":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":16},"end":{"line":43,"column":16}},{"start":{"line":43,"column":16},"end":{"line":43,"column":16}}]},"4":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":20},"end":{"line":46,"column":20}},{"start":{"line":46,"column":20},"end":{"line":46,"column":20}}]},"5":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":8},"end":{"line":95,"column":8}},{"start":{"line":95,"column":8},"end":{"line":95,"column":8}}]},"6":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":16},"end":{"line":104,"column":16}},{"start":{"line":104,"column":16},"end":{"line":104,"column":16}}]},"7":{"line":105,"type":"if","locations":[{"start":{"line":105,"column":20},"end":{"line":105,"column":20}},{"start":{"line":105,"column":20},"end":{"line":105,"column":20}}]},"8":{"line":142,"type":"binary-expr","locations":[{"start":{"line":142,"column":16},"end":{"line":142,"column":58}},{"start":{"line":142,"column":62},"end":{"line":142,"column":109}}]},"9":{"line":157,"type":"if","locations":[{"start":{"line":157,"column":8},"end":{"line":157,"column":8}},{"start":{"line":157,"column":8},"end":{"line":157,"column":8}}]},"10":{"line":162,"type":"if","locations":[{"start":{"line":162,"column":12},"end":{"line":162,"column":12}},{"start":{"line":162,"column":12},"end":{"line":162,"column":12}}]},"11":{"line":165,"type":"if","locations":[{"start":{"line":165,"column":16},"end":{"line":165,"column":16}},{"start":{"line":165,"column":16},"end":{"line":165,"column":16}}]},"12":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":16},"end":{"line":169,"column":16}},{"start":{"line":169,"column":16},"end":{"line":169,"column":16}}]},"13":{"line":189,"type":"binary-expr","locations":[{"start":{"line":189,"column":20},"end":{"line":189,"column":41}},{"start":{"line":189,"column":45},"end":{"line":189,"column":47}}]},"14":{"line":191,"type":"if","locations":[{"start":{"line":191,"column":8},"end":{"line":191,"column":8}},{"start":{"line":191,"column":8},"end":{"line":191,"column":8}}]},"15":{"line":191,"type":"binary-expr","locations":[{"start":{"line":191,"column":12},"end":{"line":191,"column":17}},{"start":{"line":191,"column":21},"end":{"line":191,"column":34}}]},"16":{"line":217,"type":"if","locations":[{"start":{"line":217,"column":8},"end":{"line":217,"column":8}},{"start":{"line":217,"column":8},"end":{"line":217,"column":8}}]},"17":{"line":217,"type":"binary-expr","locations":[{"start":{"line":217,"column":12},"end":{"line":217,"column":17}},{"start":{"line":217,"column":21},"end":{"line":217,"column":27}},{"start":{"line":217,"column":31},"end":{"line":217,"column":47}}]}},"code":["(function () { YUI.add('widget-uievents', function (Y, NAME) {","","/**"," * Support for Widget UI Events (Custom Events fired by the widget, which wrap the underlying DOM events - e.g. widget:click, widget:mousedown)"," *"," * @module widget"," * @submodule widget-uievents"," */","","var BOUNDING_BOX = \"boundingBox\","," Widget = Y.Widget,"," RENDER = \"render\","," L = Y.Lang,"," EVENT_PREFIX_DELIMITER = \":\",",""," // Map of Node instances serving as a delegation containers for a specific"," // event type to Widget instances using that delegation container."," _uievts = Y.Widget._uievts = Y.Widget._uievts || {};","","Y.mix(Widget.prototype, {",""," /**"," * Destructor logic for UI event infrastructure,"," * invoked during Widget destruction."," *"," * @method _destroyUIEvents"," * @for Widget"," * @private"," */"," _destroyUIEvents: function() {",""," var widgetGuid = Y.stamp(this, true);",""," Y.each(_uievts, function (info, key) {"," if (info.instances[widgetGuid]) {"," // Unregister this Widget instance as needing this delegated"," // event listener."," delete info.instances[widgetGuid];",""," // There are no more Widget instances using this delegated"," // event listener, so detach it.",""," if (Y.Object.isEmpty(info.instances)) {"," info.handle.detach();",""," if (_uievts[key]) {"," delete _uievts[key];"," }"," }"," }"," });"," },",""," /**"," * Map of DOM events that should be fired as Custom Events by the"," * Widget instance."," *"," * @property UI_EVENTS"," * @for Widget"," * @type Object"," */"," UI_EVENTS: Y.Node.DOM_EVENTS,",""," /**"," * Returns the node on which to bind delegate listeners."," *"," * @method _getUIEventNode"," * @for Widget"," * @protected"," */"," _getUIEventNode: function () {"," return this.get(BOUNDING_BOX);"," },",""," /**"," * Binds a delegated DOM event listener of the specified type to the"," * Widget's outtermost DOM element to facilitate the firing of a Custom"," * Event of the same type for the Widget instance."," *"," * @method _createUIEvent"," * @for Widget"," * @param type {String} String representing the name of the event"," * @private"," */"," _createUIEvent: function (type) {",""," var uiEvtNode = this._getUIEventNode(),"," key = (Y.stamp(uiEvtNode) + type),"," info = _uievts[key],"," handle;",""," // For each Node instance: Ensure that there is only one delegated"," // event listener used to fire Widget UI events.",""," if (!info) {",""," handle = uiEvtNode.delegate(type, function (evt) {",""," var widget = Widget.getByNode(this);",""," // Widget could be null if node instance belongs to"," // another Y instance.",""," if (widget) {"," if (widget._filterUIEvent(evt)) {"," widget.fire(evt.type, { domEvent: evt });"," }"," }",""," }, \".\" + Y.Widget.getClassName());",""," _uievts[key] = info = { instances: {}, handle: handle };"," }",""," // Register this Widget as using this Node as a delegation container."," info.instances[Y.stamp(this)] = 1;"," },",""," /**"," * This method is used to determine if we should fire"," * the UI Event or not. The default implementation makes sure"," * that for nested delegates (nested unrelated widgets), we don't"," * fire the UI event listener more than once at each level."," *"," *

            For example, without the additional filter, if you have nested"," * widgets, each widget will have a delegate listener. If you"," * click on the inner widget, the inner delegate listener's"," * filter will match once, but the outer will match twice"," * (based on delegate's design) - once for the inner widget,"," * and once for the outer.

            "," *"," * @method _filterUIEvent"," * @for Widget"," * @param {DOMEventFacade} evt"," * @return {boolean} true if it's OK to fire the custom UI event, false if not."," * @private"," *"," */"," _filterUIEvent: function(evt) {"," // Either it's hitting this widget's delegate container (and not some other widget's),"," // or the container it's hitting is handling this widget's ui events."," return (evt.currentTarget.compareTo(evt.container) || evt.container.compareTo(this._getUIEventNode()));"," },",""," /**"," * Determines if the specified event is a UI event."," *"," * @private"," * @method _isUIEvent"," * @for Widget"," * @param type {String} String representing the name of the event"," * @return {String} Event Returns the name of the UI Event, otherwise"," * undefined."," */"," _getUIEvent: function (type) {",""," if (L.isString(type)) {"," var sType = this.parseType(type)[1],"," iDelim,"," returnVal;",""," if (sType) {"," // TODO: Get delimiter from ET, or have ET support this."," iDelim = sType.indexOf(EVENT_PREFIX_DELIMITER);"," if (iDelim > -1) {"," sType = sType.substring(iDelim + EVENT_PREFIX_DELIMITER.length);"," }",""," if (this.UI_EVENTS[sType]) {"," returnVal = sType;"," }"," }",""," return returnVal;"," }"," },",""," /**"," * Sets up infrastructure required to fire a UI event."," *"," * @private"," * @method _initUIEvent"," * @for Widget"," * @param type {String} String representing the name of the event"," * @return {String}"," */"," _initUIEvent: function (type) {"," var sType = this._getUIEvent(type),"," queue = this._uiEvtsInitQueue || {};",""," if (sType && !queue[sType]) {",""," this._uiEvtsInitQueue = queue[sType] = 1;",""," this.after(RENDER, function() {"," this._createUIEvent(sType);"," delete this._uiEvtsInitQueue[sType];"," });"," }"," },",""," // Override of \"on\" from Base to facilitate the firing of Widget events"," // based on DOM events of the same name/type (e.g. \"click\", \"mouseover\")."," // Temporary solution until we have the ability to listen to when"," // someone adds an event listener (bug 2528230)"," on: function (type) {"," this._initUIEvent(type);"," return Widget.superclass.on.apply(this, arguments);"," },",""," // Override of \"publish\" from Base to facilitate the firing of Widget events"," // based on DOM events of the same name/type (e.g. \"click\", \"mouseover\")."," // Temporary solution until we have the ability to listen to when"," // someone publishes an event (bug 2528230)"," publish: function (type, config) {"," var sType = this._getUIEvent(type);"," if (sType && config && config.defaultFn) {"," this._initUIEvent(sType);"," }"," return Widget.superclass.publish.apply(this, arguments);"," }","","}, true); // overwrite existing EventTarget methods","","","}, '3.17.2', {\"requires\": [\"node-event-delegate\", \"widget-base\"]});","","}());"]}; +} +var __cov_OTPtO_9stw89gN1y4UIx6w = __coverage__['build/widget-uievents/widget-uievents.js']; +__cov_OTPtO_9stw89gN1y4UIx6w.s['1']++;YUI.add('widget-uievents',function(Y,NAME){__cov_OTPtO_9stw89gN1y4UIx6w.f['1']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['2']++;var BOUNDING_BOX='boundingBox',Widget=Y.Widget,RENDER='render',L=Y.Lang,EVENT_PREFIX_DELIMITER=':',_uievts=Y.Widget._uievts=(__cov_OTPtO_9stw89gN1y4UIx6w.b['1'][0]++,Y.Widget._uievts)||(__cov_OTPtO_9stw89gN1y4UIx6w.b['1'][1]++,{});__cov_OTPtO_9stw89gN1y4UIx6w.s['3']++;Y.mix(Widget.prototype,{_destroyUIEvents:function(){__cov_OTPtO_9stw89gN1y4UIx6w.f['2']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['4']++;var widgetGuid=Y.stamp(this,true);__cov_OTPtO_9stw89gN1y4UIx6w.s['5']++;Y.each(_uievts,function(info,key){__cov_OTPtO_9stw89gN1y4UIx6w.f['3']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['6']++;if(info.instances[widgetGuid]){__cov_OTPtO_9stw89gN1y4UIx6w.b['2'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['7']++;delete info.instances[widgetGuid];__cov_OTPtO_9stw89gN1y4UIx6w.s['8']++;if(Y.Object.isEmpty(info.instances)){__cov_OTPtO_9stw89gN1y4UIx6w.b['3'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['9']++;info.handle.detach();__cov_OTPtO_9stw89gN1y4UIx6w.s['10']++;if(_uievts[key]){__cov_OTPtO_9stw89gN1y4UIx6w.b['4'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['11']++;delete _uievts[key];}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['4'][1]++;}}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['3'][1]++;}}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['2'][1]++;}});},UI_EVENTS:Y.Node.DOM_EVENTS,_getUIEventNode:function(){__cov_OTPtO_9stw89gN1y4UIx6w.f['4']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['12']++;return this.get(BOUNDING_BOX);},_createUIEvent:function(type){__cov_OTPtO_9stw89gN1y4UIx6w.f['5']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['13']++;var uiEvtNode=this._getUIEventNode(),key=Y.stamp(uiEvtNode)+type,info=_uievts[key],handle;__cov_OTPtO_9stw89gN1y4UIx6w.s['14']++;if(!info){__cov_OTPtO_9stw89gN1y4UIx6w.b['5'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['15']++;handle=uiEvtNode.delegate(type,function(evt){__cov_OTPtO_9stw89gN1y4UIx6w.f['6']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['16']++;var widget=Widget.getByNode(this);__cov_OTPtO_9stw89gN1y4UIx6w.s['17']++;if(widget){__cov_OTPtO_9stw89gN1y4UIx6w.b['6'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['18']++;if(widget._filterUIEvent(evt)){__cov_OTPtO_9stw89gN1y4UIx6w.b['7'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['19']++;widget.fire(evt.type,{domEvent:evt});}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['7'][1]++;}}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['6'][1]++;}},'.'+Y.Widget.getClassName());__cov_OTPtO_9stw89gN1y4UIx6w.s['20']++;_uievts[key]=info={instances:{},handle:handle};}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['5'][1]++;}__cov_OTPtO_9stw89gN1y4UIx6w.s['21']++;info.instances[Y.stamp(this)]=1;},_filterUIEvent:function(evt){__cov_OTPtO_9stw89gN1y4UIx6w.f['7']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['22']++;return(__cov_OTPtO_9stw89gN1y4UIx6w.b['8'][0]++,evt.currentTarget.compareTo(evt.container))||(__cov_OTPtO_9stw89gN1y4UIx6w.b['8'][1]++,evt.container.compareTo(this._getUIEventNode()));},_getUIEvent:function(type){__cov_OTPtO_9stw89gN1y4UIx6w.f['8']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['23']++;if(L.isString(type)){__cov_OTPtO_9stw89gN1y4UIx6w.b['9'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['24']++;var sType=this.parseType(type)[1],iDelim,returnVal;__cov_OTPtO_9stw89gN1y4UIx6w.s['25']++;if(sType){__cov_OTPtO_9stw89gN1y4UIx6w.b['10'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['26']++;iDelim=sType.indexOf(EVENT_PREFIX_DELIMITER);__cov_OTPtO_9stw89gN1y4UIx6w.s['27']++;if(iDelim>-1){__cov_OTPtO_9stw89gN1y4UIx6w.b['11'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['28']++;sType=sType.substring(iDelim+EVENT_PREFIX_DELIMITER.length);}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['11'][1]++;}__cov_OTPtO_9stw89gN1y4UIx6w.s['29']++;if(this.UI_EVENTS[sType]){__cov_OTPtO_9stw89gN1y4UIx6w.b['12'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['30']++;returnVal=sType;}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['12'][1]++;}}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['10'][1]++;}__cov_OTPtO_9stw89gN1y4UIx6w.s['31']++;return returnVal;}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['9'][1]++;}},_initUIEvent:function(type){__cov_OTPtO_9stw89gN1y4UIx6w.f['9']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['32']++;var sType=this._getUIEvent(type),queue=(__cov_OTPtO_9stw89gN1y4UIx6w.b['13'][0]++,this._uiEvtsInitQueue)||(__cov_OTPtO_9stw89gN1y4UIx6w.b['13'][1]++,{});__cov_OTPtO_9stw89gN1y4UIx6w.s['33']++;if((__cov_OTPtO_9stw89gN1y4UIx6w.b['15'][0]++,sType)&&(__cov_OTPtO_9stw89gN1y4UIx6w.b['15'][1]++,!queue[sType])){__cov_OTPtO_9stw89gN1y4UIx6w.b['14'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['34']++;this._uiEvtsInitQueue=queue[sType]=1;__cov_OTPtO_9stw89gN1y4UIx6w.s['35']++;this.after(RENDER,function(){__cov_OTPtO_9stw89gN1y4UIx6w.f['10']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['36']++;this._createUIEvent(sType);__cov_OTPtO_9stw89gN1y4UIx6w.s['37']++;delete this._uiEvtsInitQueue[sType];});}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['14'][1]++;}},on:function(type){__cov_OTPtO_9stw89gN1y4UIx6w.f['11']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['38']++;this._initUIEvent(type);__cov_OTPtO_9stw89gN1y4UIx6w.s['39']++;return Widget.superclass.on.apply(this,arguments);},publish:function(type,config){__cov_OTPtO_9stw89gN1y4UIx6w.f['12']++;__cov_OTPtO_9stw89gN1y4UIx6w.s['40']++;var sType=this._getUIEvent(type);__cov_OTPtO_9stw89gN1y4UIx6w.s['41']++;if((__cov_OTPtO_9stw89gN1y4UIx6w.b['17'][0]++,sType)&&(__cov_OTPtO_9stw89gN1y4UIx6w.b['17'][1]++,config)&&(__cov_OTPtO_9stw89gN1y4UIx6w.b['17'][2]++,config.defaultFn)){__cov_OTPtO_9stw89gN1y4UIx6w.b['16'][0]++;__cov_OTPtO_9stw89gN1y4UIx6w.s['42']++;this._initUIEvent(sType);}else{__cov_OTPtO_9stw89gN1y4UIx6w.b['16'][1]++;}__cov_OTPtO_9stw89gN1y4UIx6w.s['43']++;return Widget.superclass.publish.apply(this,arguments);}},true);},'3.17.2',{'requires':['node-event-delegate','widget-base']}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-debug.js b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-debug.js new file mode 100644 index 0000000..74d5457 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-debug.js @@ -0,0 +1,234 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('widget-uievents', function (Y, NAME) { + +/** + * Support for Widget UI Events (Custom Events fired by the widget, which wrap the underlying DOM events - e.g. widget:click, widget:mousedown) + * + * @module widget + * @submodule widget-uievents + */ + +var BOUNDING_BOX = "boundingBox", + Widget = Y.Widget, + RENDER = "render", + L = Y.Lang, + EVENT_PREFIX_DELIMITER = ":", + + // Map of Node instances serving as a delegation containers for a specific + // event type to Widget instances using that delegation container. + _uievts = Y.Widget._uievts = Y.Widget._uievts || {}; + +Y.mix(Widget.prototype, { + + /** + * Destructor logic for UI event infrastructure, + * invoked during Widget destruction. + * + * @method _destroyUIEvents + * @for Widget + * @private + */ + _destroyUIEvents: function() { + + var widgetGuid = Y.stamp(this, true); + + Y.each(_uievts, function (info, key) { + if (info.instances[widgetGuid]) { + // Unregister this Widget instance as needing this delegated + // event listener. + delete info.instances[widgetGuid]; + + // There are no more Widget instances using this delegated + // event listener, so detach it. + + if (Y.Object.isEmpty(info.instances)) { + info.handle.detach(); + + if (_uievts[key]) { + delete _uievts[key]; + } + } + } + }); + }, + + /** + * Map of DOM events that should be fired as Custom Events by the + * Widget instance. + * + * @property UI_EVENTS + * @for Widget + * @type Object + */ + UI_EVENTS: Y.Node.DOM_EVENTS, + + /** + * Returns the node on which to bind delegate listeners. + * + * @method _getUIEventNode + * @for Widget + * @protected + */ + _getUIEventNode: function () { + return this.get(BOUNDING_BOX); + }, + + /** + * Binds a delegated DOM event listener of the specified type to the + * Widget's outtermost DOM element to facilitate the firing of a Custom + * Event of the same type for the Widget instance. + * + * @method _createUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @private + */ + _createUIEvent: function (type) { + + var uiEvtNode = this._getUIEventNode(), + key = (Y.stamp(uiEvtNode) + type), + info = _uievts[key], + handle; + + // For each Node instance: Ensure that there is only one delegated + // event listener used to fire Widget UI events. + + if (!info) { + + handle = uiEvtNode.delegate(type, function (evt) { + + var widget = Widget.getByNode(this); + + // Widget could be null if node instance belongs to + // another Y instance. + + if (widget) { + if (widget._filterUIEvent(evt)) { + widget.fire(evt.type, { domEvent: evt }); + } + } + + }, "." + Y.Widget.getClassName()); + + _uievts[key] = info = { instances: {}, handle: handle }; + } + + // Register this Widget as using this Node as a delegation container. + info.instances[Y.stamp(this)] = 1; + }, + + /** + * This method is used to determine if we should fire + * the UI Event or not. The default implementation makes sure + * that for nested delegates (nested unrelated widgets), we don't + * fire the UI event listener more than once at each level. + * + *

            For example, without the additional filter, if you have nested + * widgets, each widget will have a delegate listener. If you + * click on the inner widget, the inner delegate listener's + * filter will match once, but the outer will match twice + * (based on delegate's design) - once for the inner widget, + * and once for the outer.

            + * + * @method _filterUIEvent + * @for Widget + * @param {DOMEventFacade} evt + * @return {boolean} true if it's OK to fire the custom UI event, false if not. + * @private + * + */ + _filterUIEvent: function(evt) { + // Either it's hitting this widget's delegate container (and not some other widget's), + // or the container it's hitting is handling this widget's ui events. + return (evt.currentTarget.compareTo(evt.container) || evt.container.compareTo(this._getUIEventNode())); + }, + + /** + * Determines if the specified event is a UI event. + * + * @private + * @method _isUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} Event Returns the name of the UI Event, otherwise + * undefined. + */ + _getUIEvent: function (type) { + + if (L.isString(type)) { + var sType = this.parseType(type)[1], + iDelim, + returnVal; + + if (sType) { + // TODO: Get delimiter from ET, or have ET support this. + iDelim = sType.indexOf(EVENT_PREFIX_DELIMITER); + if (iDelim > -1) { + sType = sType.substring(iDelim + EVENT_PREFIX_DELIMITER.length); + } + + if (this.UI_EVENTS[sType]) { + returnVal = sType; + } + } + + return returnVal; + } + }, + + /** + * Sets up infrastructure required to fire a UI event. + * + * @private + * @method _initUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} + */ + _initUIEvent: function (type) { + var sType = this._getUIEvent(type), + queue = this._uiEvtsInitQueue || {}; + + if (sType && !queue[sType]) { + Y.log("Deferring creation of " + type + " delegate until render.", "info", "widget"); + + this._uiEvtsInitQueue = queue[sType] = 1; + + this.after(RENDER, function() { + this._createUIEvent(sType); + delete this._uiEvtsInitQueue[sType]; + }); + } + }, + + // Override of "on" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone adds an event listener (bug 2528230) + on: function (type) { + this._initUIEvent(type); + return Widget.superclass.on.apply(this, arguments); + }, + + // Override of "publish" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone publishes an event (bug 2528230) + publish: function (type, config) { + var sType = this._getUIEvent(type); + if (sType && config && config.defaultFn) { + this._initUIEvent(sType); + } + return Widget.superclass.publish.apply(this, arguments); + } + +}, true); // overwrite existing EventTarget methods + + +}, '3.17.2', {"requires": ["node-event-delegate", "widget-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-min.js b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-min.js new file mode 100644 index 0000000..d95cbc1 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("widget-uievents",function(e,t){var n="boundingBox",r=e.Widget,i="render",s=e.Lang,o=":",u=e.Widget._uievts=e.Widget._uievts||{};e.mix(r.prototype,{_destroyUIEvents:function(){var t=e.stamp(this,!0);e.each(u,function(n,r){n.instances[t]&&(delete n.instances[t],e.Object.isEmpty(n.instances)&&(n.handle.detach(),u[r]&&delete u[r]))})},UI_EVENTS:e.Node.DOM_EVENTS,_getUIEventNode:function(){return this.get(n)},_createUIEvent:function(t){var n=this._getUIEventNode(),i=e.stamp(n)+t,s=u[i],o;s||(o=n.delegate(t,function(e){var t=r.getByNode(this);t&&t._filterUIEvent(e)&&t.fire(e.type,{domEvent:e})},"."+e.Widget.getClassName()),u[i]=s={instances:{},handle:o}),s.instances[e.stamp(this)]=1},_filterUIEvent:function(e){return e.currentTarget.compareTo(e.container)||e.container.compareTo(this._getUIEventNode())},_getUIEvent:function(e){if(s.isString(e)){var t=this.parseType(e)[1],n,r;return t&&(n=t.indexOf(o),n>-1&&(t=t.substring(n+o.length)),this.UI_EVENTS[t]&&(r=t)),r}},_initUIEvent:function(e){var t=this._getUIEvent(e),n=this._uiEvtsInitQueue||{};t&&!n[t]&&(this._uiEvtsInitQueue=n[t]=1,this.after(i,function(){this._createUIEvent(t),delete this._uiEvtsInitQueue[t]}))},on:function(e){return this._initUIEvent(e),r.superclass.on.apply(this,arguments)},publish:function(e,t){var n=this._getUIEvent(e);return n&&t&&t.defaultFn&&this._initUIEvent(n),r.superclass.publish.apply(this,arguments)}},!0)},"3.17.2",{requires:["node-event-delegate","widget-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents.js b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents.js new file mode 100644 index 0000000..66dd34b --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/widget-uievents/widget-uievents.js @@ -0,0 +1,233 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('widget-uievents', function (Y, NAME) { + +/** + * Support for Widget UI Events (Custom Events fired by the widget, which wrap the underlying DOM events - e.g. widget:click, widget:mousedown) + * + * @module widget + * @submodule widget-uievents + */ + +var BOUNDING_BOX = "boundingBox", + Widget = Y.Widget, + RENDER = "render", + L = Y.Lang, + EVENT_PREFIX_DELIMITER = ":", + + // Map of Node instances serving as a delegation containers for a specific + // event type to Widget instances using that delegation container. + _uievts = Y.Widget._uievts = Y.Widget._uievts || {}; + +Y.mix(Widget.prototype, { + + /** + * Destructor logic for UI event infrastructure, + * invoked during Widget destruction. + * + * @method _destroyUIEvents + * @for Widget + * @private + */ + _destroyUIEvents: function() { + + var widgetGuid = Y.stamp(this, true); + + Y.each(_uievts, function (info, key) { + if (info.instances[widgetGuid]) { + // Unregister this Widget instance as needing this delegated + // event listener. + delete info.instances[widgetGuid]; + + // There are no more Widget instances using this delegated + // event listener, so detach it. + + if (Y.Object.isEmpty(info.instances)) { + info.handle.detach(); + + if (_uievts[key]) { + delete _uievts[key]; + } + } + } + }); + }, + + /** + * Map of DOM events that should be fired as Custom Events by the + * Widget instance. + * + * @property UI_EVENTS + * @for Widget + * @type Object + */ + UI_EVENTS: Y.Node.DOM_EVENTS, + + /** + * Returns the node on which to bind delegate listeners. + * + * @method _getUIEventNode + * @for Widget + * @protected + */ + _getUIEventNode: function () { + return this.get(BOUNDING_BOX); + }, + + /** + * Binds a delegated DOM event listener of the specified type to the + * Widget's outtermost DOM element to facilitate the firing of a Custom + * Event of the same type for the Widget instance. + * + * @method _createUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @private + */ + _createUIEvent: function (type) { + + var uiEvtNode = this._getUIEventNode(), + key = (Y.stamp(uiEvtNode) + type), + info = _uievts[key], + handle; + + // For each Node instance: Ensure that there is only one delegated + // event listener used to fire Widget UI events. + + if (!info) { + + handle = uiEvtNode.delegate(type, function (evt) { + + var widget = Widget.getByNode(this); + + // Widget could be null if node instance belongs to + // another Y instance. + + if (widget) { + if (widget._filterUIEvent(evt)) { + widget.fire(evt.type, { domEvent: evt }); + } + } + + }, "." + Y.Widget.getClassName()); + + _uievts[key] = info = { instances: {}, handle: handle }; + } + + // Register this Widget as using this Node as a delegation container. + info.instances[Y.stamp(this)] = 1; + }, + + /** + * This method is used to determine if we should fire + * the UI Event or not. The default implementation makes sure + * that for nested delegates (nested unrelated widgets), we don't + * fire the UI event listener more than once at each level. + * + *

            For example, without the additional filter, if you have nested + * widgets, each widget will have a delegate listener. If you + * click on the inner widget, the inner delegate listener's + * filter will match once, but the outer will match twice + * (based on delegate's design) - once for the inner widget, + * and once for the outer.

            + * + * @method _filterUIEvent + * @for Widget + * @param {DOMEventFacade} evt + * @return {boolean} true if it's OK to fire the custom UI event, false if not. + * @private + * + */ + _filterUIEvent: function(evt) { + // Either it's hitting this widget's delegate container (and not some other widget's), + // or the container it's hitting is handling this widget's ui events. + return (evt.currentTarget.compareTo(evt.container) || evt.container.compareTo(this._getUIEventNode())); + }, + + /** + * Determines if the specified event is a UI event. + * + * @private + * @method _isUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} Event Returns the name of the UI Event, otherwise + * undefined. + */ + _getUIEvent: function (type) { + + if (L.isString(type)) { + var sType = this.parseType(type)[1], + iDelim, + returnVal; + + if (sType) { + // TODO: Get delimiter from ET, or have ET support this. + iDelim = sType.indexOf(EVENT_PREFIX_DELIMITER); + if (iDelim > -1) { + sType = sType.substring(iDelim + EVENT_PREFIX_DELIMITER.length); + } + + if (this.UI_EVENTS[sType]) { + returnVal = sType; + } + } + + return returnVal; + } + }, + + /** + * Sets up infrastructure required to fire a UI event. + * + * @private + * @method _initUIEvent + * @for Widget + * @param type {String} String representing the name of the event + * @return {String} + */ + _initUIEvent: function (type) { + var sType = this._getUIEvent(type), + queue = this._uiEvtsInitQueue || {}; + + if (sType && !queue[sType]) { + + this._uiEvtsInitQueue = queue[sType] = 1; + + this.after(RENDER, function() { + this._createUIEvent(sType); + delete this._uiEvtsInitQueue[sType]; + }); + } + }, + + // Override of "on" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone adds an event listener (bug 2528230) + on: function (type) { + this._initUIEvent(type); + return Widget.superclass.on.apply(this, arguments); + }, + + // Override of "publish" from Base to facilitate the firing of Widget events + // based on DOM events of the same name/type (e.g. "click", "mouseover"). + // Temporary solution until we have the ability to listen to when + // someone publishes an event (bug 2528230) + publish: function (type, config) { + var sType = this._getUIEvent(type); + if (sType && config && config.defaultFn) { + this._initUIEvent(sType); + } + return Widget.superclass.publish.apply(this, arguments); + } + +}, true); // overwrite existing EventTarget methods + + +}, '3.17.2', {"requires": ["node-event-delegate", "widget-base"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-coverage.js b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-coverage.js new file mode 100644 index 0000000..c821b70 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/yql-jsonp/yql-jsonp.js']) { + __coverage__['build/yql-jsonp/yql-jsonp.js'] = {"path":"build/yql-jsonp/yql-jsonp.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0]},"f":{"1":0,"2":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":40}}},"2":{"name":"(anonymous_2)","line":12,"loc":{"start":{"line":12,"column":31},"end":{"line":12,"column":49}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":29,"column":58}},"2":{"start":{"line":12,"column":0},"end":{"line":25,"column":2}},"3":{"start":{"line":13,"column":4},"end":{"line":15,"column":5}},"4":{"start":{"line":14,"column":8},"end":{"line":14,"column":28}},"5":{"start":{"line":16,"column":4},"end":{"line":24,"column":5}},"6":{"start":{"line":17,"column":8},"end":{"line":17,"column":38}},"7":{"start":{"line":19,"column":8},"end":{"line":19,"column":30}},"8":{"start":{"line":20,"column":8},"end":{"line":22,"column":9}},"9":{"start":{"line":21,"column":12},"end":{"line":21,"column":58}},"10":{"start":{"line":23,"column":8},"end":{"line":23,"column":27}}},"branchMap":{"1":{"line":13,"type":"if","locations":[{"start":{"line":13,"column":4},"end":{"line":13,"column":4}},{"start":{"line":13,"column":4},"end":{"line":13,"column":4}}]},"2":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":4},"end":{"line":16,"column":4}},{"start":{"line":16,"column":4},"end":{"line":16,"column":4}}]},"3":{"line":20,"type":"if","locations":[{"start":{"line":20,"column":8},"end":{"line":20,"column":8}},{"start":{"line":20,"column":8},"end":{"line":20,"column":8}}]},"4":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":12},"end":{"line":20,"column":16}},{"start":{"line":20,"column":20},"end":{"line":20,"column":32}}]}},"code":["(function () { YUI.add('yql-jsonp', function (Y, NAME) {","","/**","* Plugin for YQL to use JSONP to make YQL requests. This is the default method,","* when loaded in nodejs or winjs this will not load. The new module is needed","* to make sure that JSONP is not loaded in the environments that it is not needed.","* @module yql","* @submodule yql-jsonp","*/","","//Over writes Y.YQLRequest._send to use IO instead of JSONP","Y.YQLRequest.prototype._send = function (url, o) {"," if (o.allowCache !== false) {"," o.allowCache = true;"," }"," if (!this._jsonp) {"," this._jsonp = Y.jsonp(url, o);"," } else {"," this._jsonp.url = url;"," if (o.on && o.on.success) {"," this._jsonp._config.on.success = o.on.success;"," }"," this._jsonp.send();"," }","};","","","","}, '3.17.2', {\"requires\": [\"yql\", \"jsonp\", \"jsonp-url\"]});","","}());"]}; +} +var __cov_SUuw0juKc$Q95K7Rgv9V2g = __coverage__['build/yql-jsonp/yql-jsonp.js']; +__cov_SUuw0juKc$Q95K7Rgv9V2g.s['1']++;YUI.add('yql-jsonp',function(Y,NAME){__cov_SUuw0juKc$Q95K7Rgv9V2g.f['1']++;__cov_SUuw0juKc$Q95K7Rgv9V2g.s['2']++;Y.YQLRequest.prototype._send=function(url,o){__cov_SUuw0juKc$Q95K7Rgv9V2g.f['2']++;__cov_SUuw0juKc$Q95K7Rgv9V2g.s['3']++;if(o.allowCache!==false){__cov_SUuw0juKc$Q95K7Rgv9V2g.b['1'][0]++;__cov_SUuw0juKc$Q95K7Rgv9V2g.s['4']++;o.allowCache=true;}else{__cov_SUuw0juKc$Q95K7Rgv9V2g.b['1'][1]++;}__cov_SUuw0juKc$Q95K7Rgv9V2g.s['5']++;if(!this._jsonp){__cov_SUuw0juKc$Q95K7Rgv9V2g.b['2'][0]++;__cov_SUuw0juKc$Q95K7Rgv9V2g.s['6']++;this._jsonp=Y.jsonp(url,o);}else{__cov_SUuw0juKc$Q95K7Rgv9V2g.b['2'][1]++;__cov_SUuw0juKc$Q95K7Rgv9V2g.s['7']++;this._jsonp.url=url;__cov_SUuw0juKc$Q95K7Rgv9V2g.s['8']++;if((__cov_SUuw0juKc$Q95K7Rgv9V2g.b['4'][0]++,o.on)&&(__cov_SUuw0juKc$Q95K7Rgv9V2g.b['4'][1]++,o.on.success)){__cov_SUuw0juKc$Q95K7Rgv9V2g.b['3'][0]++;__cov_SUuw0juKc$Q95K7Rgv9V2g.s['9']++;this._jsonp._config.on.success=o.on.success;}else{__cov_SUuw0juKc$Q95K7Rgv9V2g.b['3'][1]++;}__cov_SUuw0juKc$Q95K7Rgv9V2g.s['10']++;this._jsonp.send();}};},'3.17.2',{'requires':['yql','jsonp','jsonp-url']}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-debug.js b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-debug.js new file mode 100644 index 0000000..00bb205 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-debug.js @@ -0,0 +1,36 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql-jsonp', function (Y, NAME) { + +/** +* Plugin for YQL to use JSONP to make YQL requests. This is the default method, +* when loaded in nodejs or winjs this will not load. The new module is needed +* to make sure that JSONP is not loaded in the environments that it is not needed. +* @module yql +* @submodule yql-jsonp +*/ + +//Over writes Y.YQLRequest._send to use IO instead of JSONP +Y.YQLRequest.prototype._send = function (url, o) { + if (o.allowCache !== false) { + o.allowCache = true; + } + if (!this._jsonp) { + this._jsonp = Y.jsonp(url, o); + } else { + this._jsonp.url = url; + if (o.on && o.on.success) { + this._jsonp._config.on.success = o.on.success; + } + this._jsonp.send(); + } +}; + + + +}, '3.17.2', {"requires": ["yql", "jsonp", "jsonp-url"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-min.js b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-min.js new file mode 100644 index 0000000..cd28e0d --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("yql-jsonp",function(e,t){e.YQLRequest.prototype._send=function(t,n){n.allowCache!==!1&&(n.allowCache=!0),this._jsonp?(this._jsonp.url=t,n.on&&n.on.success&&(this._jsonp._config.on.success=n.on.success),this._jsonp.send()):this._jsonp=e.jsonp(t,n)}},"3.17.2",{requires:["yql","jsonp","jsonp-url"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp.js b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp.js new file mode 100644 index 0000000..00bb205 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-jsonp/yql-jsonp.js @@ -0,0 +1,36 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql-jsonp', function (Y, NAME) { + +/** +* Plugin for YQL to use JSONP to make YQL requests. This is the default method, +* when loaded in nodejs or winjs this will not load. The new module is needed +* to make sure that JSONP is not loaded in the environments that it is not needed. +* @module yql +* @submodule yql-jsonp +*/ + +//Over writes Y.YQLRequest._send to use IO instead of JSONP +Y.YQLRequest.prototype._send = function (url, o) { + if (o.allowCache !== false) { + o.allowCache = true; + } + if (!this._jsonp) { + this._jsonp = Y.jsonp(url, o); + } else { + this._jsonp.url = url; + if (o.on && o.on.success) { + this._jsonp._config.on.success = o.on.success; + } + this._jsonp.send(); + } +}; + + + +}, '3.17.2', {"requires": ["yql", "jsonp", "jsonp-url"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-coverage.js b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-coverage.js new file mode 100644 index 0000000..47ab8ce --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/yql-nodejs/yql-nodejs.js']) { + __coverage__['build/yql-nodejs/yql-nodejs.js'] = {"path":"build/yql-nodejs/yql-nodejs.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0,"2":0,"3":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":41}}},"2":{"name":"(anonymous_2)","line":13,"loc":{"start":{"line":13,"column":31},"end":{"line":13,"column":49}}},"3":{"name":"(anonymous_3)","line":17,"loc":{"start":{"line":17,"column":7},"end":{"line":17,"column":26}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":30,"column":36}},"2":{"start":{"line":10,"column":0},"end":{"line":10,"column":33}},"3":{"start":{"line":13,"column":0},"end":{"line":27,"column":2}},"4":{"start":{"line":14,"column":4},"end":{"line":26,"column":7}},"5":{"start":{"line":18,"column":8},"end":{"line":25,"column":9}},"6":{"start":{"line":20,"column":12},"end":{"line":22,"column":15}},"7":{"start":{"line":24,"column":12},"end":{"line":24,"column":47}}},"branchMap":{"1":{"line":16,"type":"binary-expr","locations":[{"start":{"line":16,"column":17},"end":{"line":16,"column":26}},{"start":{"line":16,"column":31},"end":{"line":16,"column":40}}]},"2":{"line":18,"type":"if","locations":[{"start":{"line":18,"column":8},"end":{"line":18,"column":8}},{"start":{"line":18,"column":8},"end":{"line":18,"column":8}}]}},"code":["(function () { YUI.add('yql-nodejs', function (Y, NAME) {","","/**","* NodeJS plugin for YQL to use native request to make requests instead of JSONP.","* Not required by the user, it's conditionally loaded and should \"just work\".","* @module yql","* @submodule yql-nodejs","*/","","var request = require('request');","","//Over writes Y.YQLRequest._send to use request instead of JSONP","Y.YQLRequest.prototype._send = function (url, o) {"," request(url, {"," method: 'GET',"," timeout: o.timeout || (30 * 1000)"," }, function(err, res) {"," if (err) {"," //The signature that YQL requires"," o.on.success({"," error: err"," });"," } else {"," o.on.success(JSON.parse(res.body));"," }"," });","};","","","}, '3.17.2', {\"requires\": [\"yql\"]});","","}());"]}; +} +var __cov_EgLFkYGu601MZUC_5qJJLg = __coverage__['build/yql-nodejs/yql-nodejs.js']; +__cov_EgLFkYGu601MZUC_5qJJLg.s['1']++;YUI.add('yql-nodejs',function(Y,NAME){__cov_EgLFkYGu601MZUC_5qJJLg.f['1']++;__cov_EgLFkYGu601MZUC_5qJJLg.s['2']++;var request=require('request');__cov_EgLFkYGu601MZUC_5qJJLg.s['3']++;Y.YQLRequest.prototype._send=function(url,o){__cov_EgLFkYGu601MZUC_5qJJLg.f['2']++;__cov_EgLFkYGu601MZUC_5qJJLg.s['4']++;request(url,{method:'GET',timeout:(__cov_EgLFkYGu601MZUC_5qJJLg.b['1'][0]++,o.timeout)||(__cov_EgLFkYGu601MZUC_5qJJLg.b['1'][1]++,30*1000)},function(err,res){__cov_EgLFkYGu601MZUC_5qJJLg.f['3']++;__cov_EgLFkYGu601MZUC_5qJJLg.s['5']++;if(err){__cov_EgLFkYGu601MZUC_5qJJLg.b['2'][0]++;__cov_EgLFkYGu601MZUC_5qJJLg.s['6']++;o.on.success({error:err});}else{__cov_EgLFkYGu601MZUC_5qJJLg.b['2'][1]++;__cov_EgLFkYGu601MZUC_5qJJLg.s['7']++;o.on.success(JSON.parse(res.body));}});};},'3.17.2',{'requires':['yql']}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-debug.js b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-debug.js new file mode 100644 index 0000000..655efd3 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-debug.js @@ -0,0 +1,37 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql-nodejs', function (Y, NAME) { + +/** +* NodeJS plugin for YQL to use native request to make requests instead of JSONP. +* Not required by the user, it's conditionally loaded and should "just work". +* @module yql +* @submodule yql-nodejs +*/ + +var request = require('request'); + +//Over writes Y.YQLRequest._send to use request instead of JSONP +Y.YQLRequest.prototype._send = function (url, o) { + request(url, { + method: 'GET', + timeout: o.timeout || (30 * 1000) + }, function(err, res) { + if (err) { + //The signature that YQL requires + o.on.success({ + error: err + }); + } else { + o.on.success(JSON.parse(res.body)); + } + }); +}; + + +}, '3.17.2', {"requires": ["yql"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-min.js b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-min.js new file mode 100644 index 0000000..fe4dec3 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("yql-nodejs",function(e,t){var n=require("request");e.YQLRequest.prototype._send=function(e,t){n(e,{method:"GET",timeout:t.timeout||3e4},function(e,n){e?t.on.success({error:e}):t.on.success(JSON.parse(n.body))})}},"3.17.2",{requires:["yql"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs.js b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs.js new file mode 100644 index 0000000..655efd3 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-nodejs/yql-nodejs.js @@ -0,0 +1,37 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql-nodejs', function (Y, NAME) { + +/** +* NodeJS plugin for YQL to use native request to make requests instead of JSONP. +* Not required by the user, it's conditionally loaded and should "just work". +* @module yql +* @submodule yql-nodejs +*/ + +var request = require('request'); + +//Over writes Y.YQLRequest._send to use request instead of JSONP +Y.YQLRequest.prototype._send = function (url, o) { + request(url, { + method: 'GET', + timeout: o.timeout || (30 * 1000) + }, function(err, res) { + if (err) { + //The signature that YQL requires + o.on.success({ + error: err + }); + } else { + o.on.success(JSON.parse(res.body)); + } + }); +}; + + +}, '3.17.2', {"requires": ["yql"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-coverage.js b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-coverage.js new file mode 100644 index 0000000..579f7ac --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/yql-winjs/yql-winjs.js']) { + __coverage__['build/yql-winjs/yql-winjs.js'] = {"path":"build/yql-winjs/yql-winjs.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":40}}},"2":{"name":"(anonymous_2)","line":11,"loc":{"start":{"line":11,"column":31},"end":{"line":11,"column":49}}},"3":{"name":"(anonymous_3)","line":16,"loc":{"start":{"line":16,"column":29},"end":{"line":16,"column":41}}},"4":{"name":"(anonymous_4)","line":27,"loc":{"start":{"line":27,"column":23},"end":{"line":27,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":34,"column":36}},"2":{"start":{"line":11,"column":0},"end":{"line":31,"column":2}},"3":{"start":{"line":12,"column":4},"end":{"line":13,"column":14}},"4":{"start":{"line":15,"column":4},"end":{"line":15,"column":31}},"5":{"start":{"line":16,"column":4},"end":{"line":23,"column":6}},"6":{"start":{"line":17,"column":8},"end":{"line":22,"column":9}},"7":{"start":{"line":19,"column":12},"end":{"line":19,"column":32}},"8":{"start":{"line":21,"column":12},"end":{"line":21,"column":55}},"9":{"start":{"line":24,"column":4},"end":{"line":24,"column":15}},"10":{"start":{"line":27,"column":4},"end":{"line":30,"column":27}},"11":{"start":{"line":28,"column":8},"end":{"line":28,"column":20}},"12":{"start":{"line":29,"column":8},"end":{"line":29,"column":39}}},"branchMap":{"1":{"line":17,"type":"if","locations":[{"start":{"line":17,"column":8},"end":{"line":17,"column":8}},{"start":{"line":17,"column":8},"end":{"line":17,"column":8}}]},"2":{"line":30,"type":"binary-expr","locations":[{"start":{"line":30,"column":7},"end":{"line":30,"column":16}},{"start":{"line":30,"column":20},"end":{"line":30,"column":25}}]}},"code":["(function () { YUI.add('yql-winjs', function (Y, NAME) {","","/**","* WinJS plugin for YQL to use native XHR to make requests instead of JSONP.","* Not required by the user, it's conditionally loaded and should \"just work\".","* @module yql","* @submodule yql-winjs","*/","","//Over writes Y.YQLRequest._send to use IO instead of JSONP","Y.YQLRequest.prototype._send = function (url, o) {"," var req = new XMLHttpRequest(),"," timer;",""," req.open('GET', url, true);"," req.onreadystatechange = function () {"," if (req.readyState === 4) { //Complete"," //No status code check here, since the YQL service will return JSON"," clearTimeout(timer);"," //No need to \"call\" this, YQL handles the context"," o.on.success(JSON.parse(req.responseText));"," }"," };"," req.send();",""," //Simple timer to catch no connections"," timer = setTimeout(function() {"," req.abort();"," o.on.timeout('script timeout');"," }, o.timeout || 30000);","};","","","}, '3.17.2', {\"requires\": [\"yql\"]});","","}());"]}; +} +var __cov_O1a$A7VqrNQcpOmwaSWXmQ = __coverage__['build/yql-winjs/yql-winjs.js']; +__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['1']++;YUI.add('yql-winjs',function(Y,NAME){__cov_O1a$A7VqrNQcpOmwaSWXmQ.f['1']++;__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['2']++;Y.YQLRequest.prototype._send=function(url,o){__cov_O1a$A7VqrNQcpOmwaSWXmQ.f['2']++;__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['3']++;var req=new XMLHttpRequest(),timer;__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['4']++;req.open('GET',url,true);__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['5']++;req.onreadystatechange=function(){__cov_O1a$A7VqrNQcpOmwaSWXmQ.f['3']++;__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['6']++;if(req.readyState===4){__cov_O1a$A7VqrNQcpOmwaSWXmQ.b['1'][0]++;__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['7']++;clearTimeout(timer);__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['8']++;o.on.success(JSON.parse(req.responseText));}else{__cov_O1a$A7VqrNQcpOmwaSWXmQ.b['1'][1]++;}};__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['9']++;req.send();__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['10']++;timer=setTimeout(function(){__cov_O1a$A7VqrNQcpOmwaSWXmQ.f['4']++;__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['11']++;req.abort();__cov_O1a$A7VqrNQcpOmwaSWXmQ.s['12']++;o.on.timeout('script timeout');},(__cov_O1a$A7VqrNQcpOmwaSWXmQ.b['2'][0]++,o.timeout)||(__cov_O1a$A7VqrNQcpOmwaSWXmQ.b['2'][1]++,30000));};},'3.17.2',{'requires':['yql']}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-debug.js b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-debug.js new file mode 100644 index 0000000..d085884 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-debug.js @@ -0,0 +1,41 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql-winjs', function (Y, NAME) { + +/** +* WinJS plugin for YQL to use native XHR to make requests instead of JSONP. +* Not required by the user, it's conditionally loaded and should "just work". +* @module yql +* @submodule yql-winjs +*/ + +//Over writes Y.YQLRequest._send to use IO instead of JSONP +Y.YQLRequest.prototype._send = function (url, o) { + var req = new XMLHttpRequest(), + timer; + + req.open('GET', url, true); + req.onreadystatechange = function () { + if (req.readyState === 4) { //Complete + //No status code check here, since the YQL service will return JSON + clearTimeout(timer); + //No need to "call" this, YQL handles the context + o.on.success(JSON.parse(req.responseText)); + } + }; + req.send(); + + //Simple timer to catch no connections + timer = setTimeout(function() { + req.abort(); + o.on.timeout('script timeout'); + }, o.timeout || 30000); +}; + + +}, '3.17.2', {"requires": ["yql"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-min.js b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-min.js new file mode 100644 index 0000000..6f41d7a --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("yql-winjs",function(e,t){e.YQLRequest.prototype._send=function(e,t){var n=new XMLHttpRequest,r;n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState===4&&(clearTimeout(r),t.on.success(JSON.parse(n.responseText)))},n.send(),r=setTimeout(function(){n.abort(),t.on.timeout("script timeout")},t.timeout||3e4)}},"3.17.2",{requires:["yql"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs.js b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs.js new file mode 100644 index 0000000..d085884 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql-winjs/yql-winjs.js @@ -0,0 +1,41 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql-winjs', function (Y, NAME) { + +/** +* WinJS plugin for YQL to use native XHR to make requests instead of JSONP. +* Not required by the user, it's conditionally loaded and should "just work". +* @module yql +* @submodule yql-winjs +*/ + +//Over writes Y.YQLRequest._send to use IO instead of JSONP +Y.YQLRequest.prototype._send = function (url, o) { + var req = new XMLHttpRequest(), + timer; + + req.open('GET', url, true); + req.onreadystatechange = function () { + if (req.readyState === 4) { //Complete + //No status code check here, since the YQL service will return JSON + clearTimeout(timer); + //No need to "call" this, YQL handles the context + o.on.success(JSON.parse(req.responseText)); + } + }; + req.send(); + + //Simple timer to catch no connections + timer = setTimeout(function() { + req.abort(); + o.on.timeout('script timeout'); + }, o.timeout || 30000); +}; + + +}, '3.17.2', {"requires": ["yql"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql/yql-coverage.js b/design/standard/lib/yui/3.17.2/build/yql/yql-coverage.js new file mode 100644 index 0000000..7289f17 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql/yql-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/yql/yql.js']) { + __coverage__['build/yql/yql.js'] = {"path":"build/yql/yql.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":34}}},"2":{"name":"(anonymous_2)","line":16,"loc":{"start":{"line":16,"column":17},"end":{"line":16,"column":56}}},"3":{"name":"(anonymous_3)","line":84,"loc":{"start":{"line":84,"column":15},"end":{"line":84,"column":27}}},"4":{"name":"(anonymous_4)","line":93,"loc":{"start":{"line":93,"column":10},"end":{"line":93,"column":22}}},"5":{"name":"(anonymous_5)","line":96,"loc":{"start":{"line":96,"column":36},"end":{"line":96,"column":52}}},"6":{"name":"(anonymous_6)","line":121,"loc":{"start":{"line":121,"column":11},"end":{"line":121,"column":22}}},"7":{"name":"(anonymous_7)","line":162,"loc":{"start":{"line":162,"column":8},"end":{"line":162,"column":47}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":167,"column":36}},"2":{"start":{"line":16,"column":0},"end":{"line":46,"column":2}},"3":{"start":{"line":18,"column":4},"end":{"line":20,"column":5}},"4":{"start":{"line":19,"column":8},"end":{"line":19,"column":20}},"5":{"start":{"line":21,"column":4},"end":{"line":21,"column":19}},"6":{"start":{"line":23,"column":4},"end":{"line":25,"column":5}},"7":{"start":{"line":24,"column":8},"end":{"line":24,"column":44}},"8":{"start":{"line":26,"column":4},"end":{"line":28,"column":5}},"9":{"start":{"line":27,"column":8},"end":{"line":27,"column":38}},"10":{"start":{"line":30,"column":4},"end":{"line":30,"column":25}},"11":{"start":{"line":32,"column":4},"end":{"line":35,"column":5}},"12":{"start":{"line":33,"column":8},"end":{"line":33,"column":37}},"13":{"start":{"line":34,"column":8},"end":{"line":34,"column":28}},"14":{"start":{"line":37,"column":4},"end":{"line":40,"column":5}},"15":{"start":{"line":38,"column":8},"end":{"line":38,"column":39}},"16":{"start":{"line":39,"column":8},"end":{"line":39,"column":30}},"17":{"start":{"line":42,"column":4},"end":{"line":42,"column":26}},"18":{"start":{"line":43,"column":4},"end":{"line":43,"column":22}},"19":{"start":{"line":44,"column":4},"end":{"line":44,"column":30}},"20":{"start":{"line":48,"column":0},"end":{"line":124,"column":2}},"21":{"start":{"line":85,"column":8},"end":{"line":85,"column":55}},"22":{"start":{"line":94,"column":8},"end":{"line":94,"column":105}},"23":{"start":{"line":96,"column":8},"end":{"line":98,"column":11}},"24":{"start":{"line":97,"column":12},"end":{"line":97,"column":53}},"25":{"start":{"line":100,"column":8},"end":{"line":100,"column":26}},"26":{"start":{"line":102,"column":8},"end":{"line":102,"column":96}},"27":{"start":{"line":104,"column":8},"end":{"line":104,"column":104}},"28":{"start":{"line":106,"column":8},"end":{"line":106,"column":26}},"29":{"start":{"line":107,"column":8},"end":{"line":107,"column":38}},"30":{"start":{"line":109,"column":8},"end":{"line":109,"column":52}},"31":{"start":{"line":111,"column":8},"end":{"line":111,"column":27}},"32":{"start":{"line":112,"column":8},"end":{"line":112,"column":20}},"33":{"start":{"line":131,"column":0},"end":{"line":131,"column":27}},"34":{"start":{"line":137,"column":0},"end":{"line":137,"column":26}},"35":{"start":{"line":143,"column":0},"end":{"line":143,"column":67}},"36":{"start":{"line":149,"column":0},"end":{"line":149,"column":60}},"37":{"start":{"line":151,"column":0},"end":{"line":151,"column":26}},"38":{"start":{"line":162,"column":0},"end":{"line":164,"column":2}},"39":{"start":{"line":163,"column":4},"end":{"line":163,"column":64}}},"branchMap":{"1":{"line":18,"type":"if","locations":[{"start":{"line":18,"column":4},"end":{"line":18,"column":4}},{"start":{"line":18,"column":4},"end":{"line":18,"column":4}}]},"2":{"line":23,"type":"if","locations":[{"start":{"line":23,"column":4},"end":{"line":23,"column":4}},{"start":{"line":23,"column":4},"end":{"line":23,"column":4}}]},"3":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":4},"end":{"line":26,"column":4}},{"start":{"line":26,"column":4},"end":{"line":26,"column":4}}]},"4":{"line":32,"type":"if","locations":[{"start":{"line":32,"column":4},"end":{"line":32,"column":4}},{"start":{"line":32,"column":4},"end":{"line":32,"column":4}}]},"5":{"line":32,"type":"binary-expr","locations":[{"start":{"line":32,"column":8},"end":{"line":32,"column":12}},{"start":{"line":32,"column":16},"end":{"line":32,"column":28}}]},"6":{"line":37,"type":"if","locations":[{"start":{"line":37,"column":4},"end":{"line":37,"column":4}},{"start":{"line":37,"column":4},"end":{"line":37,"column":4}}]},"7":{"line":37,"type":"binary-expr","locations":[{"start":{"line":37,"column":8},"end":{"line":37,"column":14}},{"start":{"line":37,"column":18},"end":{"line":37,"column":32}}]},"8":{"line":94,"type":"cond-expr","locations":[{"start":{"line":94,"column":63},"end":{"line":94,"column":79}},{"start":{"line":94,"column":82},"end":{"line":94,"column":100}}]},"9":{"line":94,"type":"binary-expr","locations":[{"start":{"line":94,"column":29},"end":{"line":94,"column":39}},{"start":{"line":94,"column":43},"end":{"line":94,"column":59}}]},"10":{"line":102,"type":"cond-expr","locations":[{"start":{"line":102,"column":50},"end":{"line":102,"column":65}},{"start":{"line":102,"column":68},"end":{"line":102,"column":89}}]},"11":{"line":102,"type":"binary-expr","locations":[{"start":{"line":102,"column":17},"end":{"line":102,"column":27}},{"start":{"line":102,"column":31},"end":{"line":102,"column":46}}]},"12":{"line":104,"type":"cond-expr","locations":[{"start":{"line":104,"column":51},"end":{"line":104,"column":65}},{"start":{"line":104,"column":68},"end":{"line":104,"column":103}}]},"13":{"line":106,"type":"binary-expr","locations":[{"start":{"line":106,"column":15},"end":{"line":106,"column":19}},{"start":{"line":106,"column":23},"end":{"line":106,"column":25}}]}},"code":["(function () { YUI.add('yql', function (Y, NAME) {","","/**"," * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/)."," * @module yql"," */","/**"," * Utility Class used under the hood by the YQL class"," * @class YQLRequest"," * @constructor"," * @param {String} sql The SQL statement to execute"," * @param {Function/Object} callback The callback to execute after the query (Falls through to JSONP)."," * @param {Object} params An object literal of extra parameters to pass along (optional)."," * @param {Object} opts An object literal of configuration options (optional): proto (http|https), base (url)"," */","var YQLRequest = function (sql, callback, params, opts) {",""," if (!params) {"," params = {};"," }"," params.q = sql;"," //Allow format override.. JSON-P-X"," if (!params.format) {"," params.format = Y.YQLRequest.FORMAT;"," }"," if (!params.env) {"," params.env = Y.YQLRequest.ENV;"," }",""," this._context = this;",""," if (opts && opts.context) {"," this._context = opts.context;"," delete opts.context;"," }",""," if (params && params.context) {"," this._context = params.context;"," delete params.context;"," }",""," this._params = params;"," this._opts = opts;"," this._callback = callback;","","};","","YQLRequest.prototype = {"," /**"," * @private"," * @property _jsonp"," * @description Reference to the JSONP instance used to make the queries"," */"," _jsonp: null,"," /**"," * @private"," * @property _opts"," * @description Holder for the opts argument"," */"," _opts: null,"," /**"," * @private"," * @property _callback"," * @description Holder for the callback argument"," */"," _callback: null,"," /**"," * @private"," * @property _params"," * @description Holder for the params argument"," */"," _params: null,"," /**"," * @private"," * @property _context"," * @description The context to execute the callback in"," */"," _context: null,"," /**"," * @private"," * @method _internal"," * @description Internal Callback Handler"," */"," _internal: function () {"," this._callback.apply(this._context, arguments);"," },"," /**"," * @method send"," * @description The method that executes the YQL Request."," * @chainable"," * @return {YQLRequest}"," */"," send: function () {"," var qs = [], url = ((this._opts && this._opts.proto) ? this._opts.proto : Y.YQLRequest.PROTO), o;",""," Y.Object.each(this._params, function (v, k) {"," qs.push(k + '=' + encodeURIComponent(v));"," });",""," qs = qs.join('&');",""," url += ((this._opts && this._opts.base) ? this._opts.base : Y.YQLRequest.BASE_URL) + qs;",""," o = (!Y.Lang.isFunction(this._callback)) ? this._callback : { on: { success: this._callback } };",""," o.on = o.on || {};"," this._callback = o.on.success;",""," o.on.success = Y.bind(this._internal, this);",""," this._send(url, o);"," return this;"," },"," /**"," * Private method to send the request, overwritten in plugins"," * @method _send"," * @private"," * @param {String} url The URL to request"," * @param {Object} o The config object"," */"," _send: function() {"," //Overwritten in plugins"," }","};","","/**","* @static","* @property FORMAT","* @description Default format to use: json","*/","YQLRequest.FORMAT = 'json';","/**","* @static","* @property PROTO","* @description Default protocol to use: http","*/","YQLRequest.PROTO = 'http';","/**","* @static","* @property BASE_URL","* @description The base URL to query: query.yahooapis.com/v1/public/yql?","*/","YQLRequest.BASE_URL = ':/' + '/query.yahooapis.com/v1/public/yql?';","/**","* @static","* @property ENV","* @description The environment file to load: http://datatables.org/alltables.env","*/","YQLRequest.ENV = 'http:/' + '/datatables.org/alltables.env';","","Y.YQLRequest = YQLRequest;","","/**"," * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/)."," * @class YQL"," * @constructor"," * @param {String} sql The SQL statement to execute"," * @param {Function} callback The callback to execute after the query (optional)."," * @param {Object} params An object literal of extra parameters to pass along (optional)."," * @param {Object} opts An object literal of configuration options (optional): proto (http|https), base (url)"," */","Y.YQL = function (sql, callback, params, opts) {"," return new Y.YQLRequest(sql, callback, params, opts).send();","};","","","}, '3.17.2', {\"requires\": [\"oop\"]});","","}());"]}; +} +var __cov_BdMVl3Nvn7mJmfLt43OYWQ = __coverage__['build/yql/yql.js']; +__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['1']++;YUI.add('yql',function(Y,NAME){__cov_BdMVl3Nvn7mJmfLt43OYWQ.f['1']++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['2']++;var YQLRequest=function(sql,callback,params,opts){__cov_BdMVl3Nvn7mJmfLt43OYWQ.f['2']++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['3']++;if(!params){__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['1'][0]++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['4']++;params={};}else{__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['1'][1]++;}__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['5']++;params.q=sql;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['6']++;if(!params.format){__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['2'][0]++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['7']++;params.format=Y.YQLRequest.FORMAT;}else{__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['2'][1]++;}__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['8']++;if(!params.env){__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['3'][0]++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['9']++;params.env=Y.YQLRequest.ENV;}else{__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['3'][1]++;}__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['10']++;this._context=this;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['11']++;if((__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['5'][0]++,opts)&&(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['5'][1]++,opts.context)){__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['4'][0]++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['12']++;this._context=opts.context;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['13']++;delete opts.context;}else{__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['4'][1]++;}__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['14']++;if((__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['7'][0]++,params)&&(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['7'][1]++,params.context)){__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['6'][0]++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['15']++;this._context=params.context;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['16']++;delete params.context;}else{__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['6'][1]++;}__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['17']++;this._params=params;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['18']++;this._opts=opts;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['19']++;this._callback=callback;};__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['20']++;YQLRequest.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,_context:null,_internal:function(){__cov_BdMVl3Nvn7mJmfLt43OYWQ.f['3']++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['21']++;this._callback.apply(this._context,arguments);},send:function(){__cov_BdMVl3Nvn7mJmfLt43OYWQ.f['4']++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['22']++;var qs=[],url=(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['9'][0]++,this._opts)&&(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['9'][1]++,this._opts.proto)?(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['8'][0]++,this._opts.proto):(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['8'][1]++,Y.YQLRequest.PROTO),o;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['23']++;Y.Object.each(this._params,function(v,k){__cov_BdMVl3Nvn7mJmfLt43OYWQ.f['5']++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['24']++;qs.push(k+'='+encodeURIComponent(v));});__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['25']++;qs=qs.join('&');__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['26']++;url+=((__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['11'][0]++,this._opts)&&(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['11'][1]++,this._opts.base)?(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['10'][0]++,this._opts.base):(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['10'][1]++,Y.YQLRequest.BASE_URL))+qs;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['27']++;o=!Y.Lang.isFunction(this._callback)?(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['12'][0]++,this._callback):(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['12'][1]++,{on:{success:this._callback}});__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['28']++;o.on=(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['13'][0]++,o.on)||(__cov_BdMVl3Nvn7mJmfLt43OYWQ.b['13'][1]++,{});__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['29']++;this._callback=o.on.success;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['30']++;o.on.success=Y.bind(this._internal,this);__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['31']++;this._send(url,o);__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['32']++;return this;},_send:function(){__cov_BdMVl3Nvn7mJmfLt43OYWQ.f['6']++;}};__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['33']++;YQLRequest.FORMAT='json';__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['34']++;YQLRequest.PROTO='http';__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['35']++;YQLRequest.BASE_URL=':/'+'/query.yahooapis.com/v1/public/yql?';__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['36']++;YQLRequest.ENV='http:/'+'/datatables.org/alltables.env';__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['37']++;Y.YQLRequest=YQLRequest;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['38']++;Y.YQL=function(sql,callback,params,opts){__cov_BdMVl3Nvn7mJmfLt43OYWQ.f['7']++;__cov_BdMVl3Nvn7mJmfLt43OYWQ.s['39']++;return new Y.YQLRequest(sql,callback,params,opts).send();};},'3.17.2',{'requires':['oop']}); diff --git a/design/standard/lib/yui/3.17.2/build/yql/yql-debug.js b/design/standard/lib/yui/3.17.2/build/yql/yql-debug.js new file mode 100644 index 0000000..47ac276 --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql/yql-debug.js @@ -0,0 +1,175 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql', function (Y, NAME) { + +/** + * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/). + * @module yql + */ +/** + * Utility Class used under the hood by the YQL class + * @class YQLRequest + * @constructor + * @param {String} sql The SQL statement to execute + * @param {Function/Object} callback The callback to execute after the query (Falls through to JSONP). + * @param {Object} params An object literal of extra parameters to pass along (optional). + * @param {Object} opts An object literal of configuration options (optional): proto (http|https), base (url) + */ +var YQLRequest = function (sql, callback, params, opts) { + + if (!params) { + params = {}; + } + params.q = sql; + //Allow format override.. JSON-P-X + if (!params.format) { + params.format = Y.YQLRequest.FORMAT; + } + if (!params.env) { + params.env = Y.YQLRequest.ENV; + } + + this._context = this; + + if (opts && opts.context) { + this._context = opts.context; + delete opts.context; + } + + if (params && params.context) { + this._context = params.context; + delete params.context; + } + + this._params = params; + this._opts = opts; + this._callback = callback; + +}; + +YQLRequest.prototype = { + /** + * @private + * @property _jsonp + * @description Reference to the JSONP instance used to make the queries + */ + _jsonp: null, + /** + * @private + * @property _opts + * @description Holder for the opts argument + */ + _opts: null, + /** + * @private + * @property _callback + * @description Holder for the callback argument + */ + _callback: null, + /** + * @private + * @property _params + * @description Holder for the params argument + */ + _params: null, + /** + * @private + * @property _context + * @description The context to execute the callback in + */ + _context: null, + /** + * @private + * @method _internal + * @description Internal Callback Handler + */ + _internal: function () { + this._callback.apply(this._context, arguments); + }, + /** + * @method send + * @description The method that executes the YQL Request. + * @chainable + * @return {YQLRequest} + */ + send: function () { + var qs = [], url = ((this._opts && this._opts.proto) ? this._opts.proto : Y.YQLRequest.PROTO), o; + + Y.Object.each(this._params, function (v, k) { + qs.push(k + '=' + encodeURIComponent(v)); + }); + + qs = qs.join('&'); + + url += ((this._opts && this._opts.base) ? this._opts.base : Y.YQLRequest.BASE_URL) + qs; + + o = (!Y.Lang.isFunction(this._callback)) ? this._callback : { on: { success: this._callback } }; + + o.on = o.on || {}; + this._callback = o.on.success; + + o.on.success = Y.bind(this._internal, this); + + Y.log('URL: ' + url, 'info', 'yql'); + this._send(url, o); + return this; + }, + /** + * Private method to send the request, overwritten in plugins + * @method _send + * @private + * @param {String} url The URL to request + * @param {Object} o The config object + */ + _send: function() { + //Overwritten in plugins + } +}; + +/** +* @static +* @property FORMAT +* @description Default format to use: json +*/ +YQLRequest.FORMAT = 'json'; +/** +* @static +* @property PROTO +* @description Default protocol to use: http +*/ +YQLRequest.PROTO = 'http'; +/** +* @static +* @property BASE_URL +* @description The base URL to query: query.yahooapis.com/v1/public/yql? +*/ +YQLRequest.BASE_URL = ':/' + '/query.yahooapis.com/v1/public/yql?'; +/** +* @static +* @property ENV +* @description The environment file to load: http://datatables.org/alltables.env +*/ +YQLRequest.ENV = 'http:/' + '/datatables.org/alltables.env'; + +Y.YQLRequest = YQLRequest; + +/** + * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/). + * @class YQL + * @constructor + * @param {String} sql The SQL statement to execute + * @param {Function} callback The callback to execute after the query (optional). + * @param {Object} params An object literal of extra parameters to pass along (optional). + * @param {Object} opts An object literal of configuration options (optional): proto (http|https), base (url) + */ +Y.YQL = function (sql, callback, params, opts) { + return new Y.YQLRequest(sql, callback, params, opts).send(); +}; + + +}, '3.17.2', {"requires": ["oop"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql/yql-min.js b/design/standard/lib/yui/3.17.2/build/yql/yql-min.js new file mode 100644 index 0000000..3647aec --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql/yql-min.js @@ -0,0 +1,8 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add("yql",function(e,t){var n=function(t,n,r,i){r||(r={}),r.q=t,r.format||(r.format=e.YQLRequest.FORMAT),r.env||(r.env=e.YQLRequest.ENV),this._context=this,i&&i.context&&(this._context=i.context,delete i.context),r&&r.context&&(this._context=r.context,delete r.context),this._params=r,this._opts=i,this._callback=n};n.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,_context:null,_internal:function(){this._callback.apply(this._context,arguments)},send:function(){var t=[],n=this._opts&&this._opts.proto?this._opts.proto:e.YQLRequest.PROTO,r;return e.Object.each(this._params,function(e,n){t.push(n+"="+encodeURIComponent(e))}),t=t.join("&"),n+=(this._opts&&this._opts.base?this._opts.base:e.YQLRequest.BASE_URL)+t,r=e.Lang.isFunction(this._callback)?{on:{success:this._callback}}:this._callback,r.on=r.on||{},this._callback=r.on.success,r.on.success=e.bind(this._internal,this),this._send(n,r),this},_send:function(){}},n.FORMAT="json",n.PROTO="http",n.BASE_URL="://query.yahooapis.com/v1/public/yql?",n.ENV="http://datatables.org/alltables.env",e.YQLRequest=n,e.YQL=function(t,n,r,i){return(new e.YQLRequest(t,n,r,i)).send()}},"3.17.2",{requires:["oop"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yql/yql.js b/design/standard/lib/yui/3.17.2/build/yql/yql.js new file mode 100644 index 0000000..cad340e --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yql/yql.js @@ -0,0 +1,174 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +YUI.add('yql', function (Y, NAME) { + +/** + * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/). + * @module yql + */ +/** + * Utility Class used under the hood by the YQL class + * @class YQLRequest + * @constructor + * @param {String} sql The SQL statement to execute + * @param {Function/Object} callback The callback to execute after the query (Falls through to JSONP). + * @param {Object} params An object literal of extra parameters to pass along (optional). + * @param {Object} opts An object literal of configuration options (optional): proto (http|https), base (url) + */ +var YQLRequest = function (sql, callback, params, opts) { + + if (!params) { + params = {}; + } + params.q = sql; + //Allow format override.. JSON-P-X + if (!params.format) { + params.format = Y.YQLRequest.FORMAT; + } + if (!params.env) { + params.env = Y.YQLRequest.ENV; + } + + this._context = this; + + if (opts && opts.context) { + this._context = opts.context; + delete opts.context; + } + + if (params && params.context) { + this._context = params.context; + delete params.context; + } + + this._params = params; + this._opts = opts; + this._callback = callback; + +}; + +YQLRequest.prototype = { + /** + * @private + * @property _jsonp + * @description Reference to the JSONP instance used to make the queries + */ + _jsonp: null, + /** + * @private + * @property _opts + * @description Holder for the opts argument + */ + _opts: null, + /** + * @private + * @property _callback + * @description Holder for the callback argument + */ + _callback: null, + /** + * @private + * @property _params + * @description Holder for the params argument + */ + _params: null, + /** + * @private + * @property _context + * @description The context to execute the callback in + */ + _context: null, + /** + * @private + * @method _internal + * @description Internal Callback Handler + */ + _internal: function () { + this._callback.apply(this._context, arguments); + }, + /** + * @method send + * @description The method that executes the YQL Request. + * @chainable + * @return {YQLRequest} + */ + send: function () { + var qs = [], url = ((this._opts && this._opts.proto) ? this._opts.proto : Y.YQLRequest.PROTO), o; + + Y.Object.each(this._params, function (v, k) { + qs.push(k + '=' + encodeURIComponent(v)); + }); + + qs = qs.join('&'); + + url += ((this._opts && this._opts.base) ? this._opts.base : Y.YQLRequest.BASE_URL) + qs; + + o = (!Y.Lang.isFunction(this._callback)) ? this._callback : { on: { success: this._callback } }; + + o.on = o.on || {}; + this._callback = o.on.success; + + o.on.success = Y.bind(this._internal, this); + + this._send(url, o); + return this; + }, + /** + * Private method to send the request, overwritten in plugins + * @method _send + * @private + * @param {String} url The URL to request + * @param {Object} o The config object + */ + _send: function() { + //Overwritten in plugins + } +}; + +/** +* @static +* @property FORMAT +* @description Default format to use: json +*/ +YQLRequest.FORMAT = 'json'; +/** +* @static +* @property PROTO +* @description Default protocol to use: http +*/ +YQLRequest.PROTO = 'http'; +/** +* @static +* @property BASE_URL +* @description The base URL to query: query.yahooapis.com/v1/public/yql? +*/ +YQLRequest.BASE_URL = ':/' + '/query.yahooapis.com/v1/public/yql?'; +/** +* @static +* @property ENV +* @description The environment file to load: http://datatables.org/alltables.env +*/ +YQLRequest.ENV = 'http:/' + '/datatables.org/alltables.env'; + +Y.YQLRequest = YQLRequest; + +/** + * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/). + * @class YQL + * @constructor + * @param {String} sql The SQL statement to execute + * @param {Function} callback The callback to execute after the query (optional). + * @param {Object} params An object literal of extra parameters to pass along (optional). + * @param {Object} opts An object literal of configuration options (optional): proto (http|https), base (url) + */ +Y.YQL = function (sql, callback, params, opts) { + return new Y.YQLRequest(sql, callback, params, opts).send(); +}; + + +}, '3.17.2', {"requires": ["oop"]}); diff --git a/design/standard/lib/yui/3.17.2/build/yui-base/yui-base-coverage.js b/design/standard/lib/yui/3.17.2/build/yui-base/yui-base-coverage.js new file mode 100644 index 0000000..5a3448c --- /dev/null +++ b/design/standard/lib/yui/3.17.2/build/yui-base/yui-base-coverage.js @@ -0,0 +1,13 @@ +/* +YUI 3.17.2 (build 9c3c78e) +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } +if (!__coverage__['build/yui-base/yui-base.js']) { + __coverage__['build/yui-base/yui-base.js'] = {"path":"build/yui-base/yui-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":0,"254":0,"255":0,"256":0,"257":0,"258":0,"259":0,"260":0,"261":0,"262":0,"263":0,"264":0,"265":0,"266":0,"267":0,"268":0,"269":0,"270":0,"271":0,"272":0,"273":0,"274":0,"275":0,"276":0,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":0,"284":0,"285":0,"286":0,"287":0,"288":0,"289":0,"290":0,"291":0,"292":0,"293":0,"294":0,"295":0,"296":0,"297":0,"298":0,"299":0,"300":0,"301":0,"302":0,"303":0,"304":0,"305":0,"306":0,"307":0,"308":0,"309":0,"310":0,"311":0,"312":0,"313":0,"314":0,"315":0,"316":0,"317":0,"318":0,"319":0,"320":0,"321":0,"322":0,"323":0,"324":0,"325":0,"326":0,"327":0,"328":0,"329":0,"330":0,"331":0,"332":0,"333":0,"334":0,"335":0,"336":0,"337":0,"338":0,"339":0,"340":0,"341":0,"342":0,"343":0,"344":0,"345":0,"346":0,"347":0,"348":0,"349":0,"350":0,"351":0,"352":0,"353":0,"354":0,"355":0,"356":0,"357":0,"358":0,"359":0,"360":0,"361":0,"362":0,"363":0,"364":0,"365":0,"366":0,"367":0,"368":0,"369":0,"370":0,"371":0,"372":0,"373":0,"374":0,"375":0,"376":0,"377":0,"378":0,"379":0,"380":0,"381":0,"382":0,"383":0,"384":0,"385":0,"386":0,"387":0,"388":0,"389":0,"390":0,"391":0,"392":0,"393":0,"394":0,"395":0,"396":0,"397":0,"398":0,"399":0,"400":0,"401":0,"402":0,"403":0,"404":0,"405":0,"406":0,"407":0,"408":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"415":0,"416":0,"417":0,"418":0,"419":0,"420":0,"421":0,"422":0,"423":0,"424":0,"425":0,"426":0,"427":0,"428":0,"429":0,"430":0,"431":0,"432":0,"433":0,"434":0,"435":0,"436":0,"437":0,"438":0,"439":0,"440":0,"441":0,"442":0,"443":0,"444":0,"445":0,"446":0,"447":0,"448":0,"449":0,"450":0,"451":0,"452":0,"453":0,"454":0,"455":0,"456":0,"457":0,"458":0,"459":0,"460":0,"461":0,"462":0,"463":0,"464":0,"465":0,"466":0,"467":0,"468":0,"469":0,"470":0,"471":0,"472":0,"473":0,"474":0,"475":0,"476":0,"477":0,"478":0,"479":0,"480":0,"481":0,"482":0,"483":0,"484":0,"485":0,"486":0,"487":0,"488":0,"489":0,"490":0,"491":0,"492":0,"493":0,"494":0,"495":0,"496":0,"497":0,"498":0,"499":0,"500":0,"501":0,"502":0,"503":0,"504":0,"505":0,"506":0,"507":0,"508":0,"509":0,"510":0,"511":0,"512":0,"513":0,"514":0,"515":0,"516":0,"517":0,"518":0,"519":0,"520":0,"521":0,"522":0,"523":0,"524":0,"525":0,"526":0,"527":0,"528":0,"529":0,"530":0,"531":0,"532":0,"533":0,"534":0,"535":0,"536":0,"537":0,"538":0,"539":0,"540":0,"541":0,"542":0,"543":0,"544":0,"545":0,"546":0,"547":0,"548":0,"549":0,"550":0,"551":0,"552":0,"553":0,"554":0,"555":0,"556":0,"557":0,"558":0,"559":0,"560":0,"561":0,"562":0,"563":0,"564":0,"565":0,"566":0,"567":0,"568":0,"569":0,"570":0,"571":0,"572":0,"573":0,"574":0,"575":0,"576":0,"577":0,"578":0,"579":0,"580":0,"581":0,"582":0,"583":0,"584":0,"585":0,"586":0,"587":0,"588":0,"589":0,"590":0,"591":0,"592":0,"593":0,"594":0,"595":0,"596":0,"597":0,"598":0,"599":0,"600":0,"601":0,"602":0,"603":0,"604":0,"605":0,"606":0,"607":0,"608":0,"609":0,"610":0,"611":0,"612":0,"613":0,"614":0,"615":0,"616":0,"617":0,"618":0,"619":0,"620":0,"621":0,"622":0,"623":0,"624":0,"625":0,"626":0,"627":0,"628":0,"629":0,"630":0,"631":0,"632":0,"633":0,"634":0,"635":0,"636":0,"637":0,"638":0,"639":0,"640":0,"641":0,"642":0,"643":0,"644":0,"645":0,"646":0,"647":0,"648":0,"649":0,"650":0,"651":0,"652":0,"653":0,"654":0,"655":0,"656":0,"657":0,"658":0,"659":0,"660":0,"661":0,"662":0,"663":0,"664":0,"665":0,"666":0,"667":0,"668":0,"669":0,"670":0,"671":0,"672":0,"673":0,"674":0,"675":0,"676":0,"677":0,"678":0,"679":0,"680":0,"681":0,"682":0,"683":0,"684":0,"685":0,"686":0,"687":0,"688":0,"689":0,"690":0,"691":0,"692":0,"693":0,"694":0,"695":0,"696":0,"697":0,"698":0,"699":0,"700":0,"701":0,"702":0,"703":0,"704":0,"705":0,"706":0,"707":0,"708":0,"709":0,"710":0,"711":0,"712":0,"713":0,"714":0,"715":0,"716":0,"717":0,"718":0,"719":0,"720":0,"721":0,"722":0,"723":0,"724":0,"725":0,"726":0,"727":0,"728":0,"729":0,"730":0,"731":0,"732":0,"733":0,"734":0,"735":0,"736":0,"737":0,"738":0,"739":0,"740":0,"741":0,"742":0,"743":0,"744":0,"745":0,"746":0,"747":0,"748":0,"749":0,"750":0,"751":0,"752":0,"753":0,"754":0,"755":0,"756":0,"757":0,"758":0,"759":0,"760":0,"761":0,"762":0,"763":0,"764":0,"765":0,"766":0,"767":0,"768":0,"769":0,"770":0,"771":0,"772":0,"773":0,"774":0,"775":0,"776":0,"777":0,"778":0,"779":0,"780":0,"781":0,"782":0,"783":0,"784":0,"785":0,"786":0,"787":0,"788":0,"789":0,"790":0,"791":0,"792":0,"793":0,"794":0,"795":0,"796":0,"797":0,"798":0,"799":0,"800":0,"801":0,"802":0,"803":0,"804":0,"805":0,"806":0,"807":0,"808":0,"809":0,"810":0,"811":0,"812":0,"813":0,"814":0,"815":0,"816":0,"817":0,"818":0,"819":0,"820":0,"821":0,"822":0,"823":0,"824":0,"825":0,"826":0,"827":0,"828":0,"829":0,"830":0,"831":0,"832":0,"833":0,"834":0,"835":0,"836":0,"837":0,"838":0,"839":0,"840":0,"841":0,"842":0,"843":0,"844":0,"845":0,"846":0,"847":0,"848":0,"849":0,"850":0,"851":0,"852":0,"853":0,"854":0,"855":0,"856":0,"857":0,"858":0,"859":0,"860":0,"861":0,"862":0,"863":0,"864":0,"865":0,"866":0,"867":0,"868":0,"869":0,"870":0,"871":0,"872":0,"873":0,"874":0,"875":0,"876":0,"877":0,"878":0,"879":0,"880":0,"881":0,"882":0,"883":0,"884":0,"885":0,"886":0,"887":0,"888":0,"889":0,"890":0,"891":0,"892":0},"b":{"1":[0,0],"2":[0,0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0,0],"49":[0,0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0],"61":[0,0,0],"62":[0,0],"63":[0,0],"64":[0,0],"65":[0,0],"66":[0,0],"67":[0,0],"68":[0,0],"69":[0,0],"70":[0,0],"71":[0,0],"72":[0,0],"73":[0,0],"74":[0,0],"75":[0,0],"76":[0,0],"77":[0,0],"78":[0,0],"79":[0,0],"80":[0,0],"81":[0,0],"82":[0,0],"83":[0,0],"84":[0,0],"85":[0,0,0,0,0],"86":[0,0],"87":[0,0],"88":[0,0],"89":[0,0,0],"90":[0,0],"91":[0,0],"92":[0,0],"93":[0,0],"94":[0,0],"95":[0,0],"96":[0,0],"97":[0,0],"98":[0,0],"99":[0,0],"100":[0,0],"101":[0,0,0,0],"102":[0,0],"103":[0,0],"104":[0,0],"105":[0,0],"106":[0,0],"107":[0,0],"108":[0,0],"109":[0,0],"110":[0,0],"111":[0,0],"112":[0,0],"113":[0,0],"114":[0,0],"115":[0,0],"116":[0,0],"117":[0,0],"118":[0,0],"119":[0,0],"120":[0,0],"121":[0,0],"122":[0,0],"123":[0,0],"124":[0,0],"125":[0,0],"126":[0,0],"127":[0,0],"128":[0,0],"129":[0,0],"130":[0,0],"131":[0,0],"132":[0,0],"133":[0,0],"134":[0,0],"135":[0,0],"136":[0,0],"137":[0,0],"138":[0,0],"139":[0,0],"140":[0,0],"141":[0,0],"142":[0,0],"143":[0,0],"144":[0,0],"145":[0,0],"146":[0,0],"147":[0,0],"148":[0,0],"149":[0,0],"150":[0,0],"151":[0,0],"152":[0,0],"153":[0,0],"154":[0,0],"155":[0,0],"156":[0,0],"157":[0,0],"158":[0,0],"159":[0,0],"160":[0,0],"161":[0,0],"162":[0,0],"163":[0,0],"164":[0,0],"165":[0,0],"166":[0,0,0],"167":[0,0],"168":[0,0],"169":[0,0],"170":[0,0],"171":[0,0,0],"172":[0,0],"173":[0,0],"174":[0,0,0],"175":[0,0],"176":[0,0],"177":[0,0],"178":[0,0,0],"179":[0,0],"180":[0,0],"181":[0,0,0,0],"182":[0,0],"183":[0,0],"184":[0,0],"185":[0,0],"186":[0,0],"187":[0,0],"188":[0,0],"189":[0,0],"190":[0,0],"191":[0,0],"192":[0,0],"193":[0,0],"194":[0,0,0],"195":[0,0],"196":[0,0],"197":[0,0],"198":[0,0],"199":[0,0],"200":[0,0],"201":[0,0],"202":[0,0],"203":[0,0],"204":[0,0],"205":[0,0,0],"206":[0,0],"207":[0,0,0],"208":[0,0],"209":[0,0,0,0,0,0],"210":[0,0,0,0],"211":[0,0],"212":[0,0],"213":[0,0],"214":[0,0],"215":[0,0],"216":[0,0],"217":[0,0],"218":[0,0],"219":[0,0],"220":[0,0],"221":[0,0],"222":[0,0,0],"223":[0,0],"224":[0,0],"225":[0,0],"226":[0,0],"227":[0,0],"228":[0,0],"229":[0,0],"230":[0,0],"231":[0,0],"232":[0,0],"233":[0,0],"234":[0,0],"235":[0,0,0],"236":[0,0],"237":[0,0],"238":[0,0],"239":[0,0],"240":[0,0],"241":[0,0],"242":[0,0],"243":[0,0],"244":[0,0],"245":[0,0],"246":[0,0],"247":[0,0],"248":[0,0],"249":[0,0],"250":[0,0],"251":[0,0],"252":[0,0,0,0],"253":[0,0],"254":[0,0],"255":[0,0],"256":[0,0],"257":[0,0],"258":[0,0,0],"259":[0,0],"260":[0,0],"261":[0,0],"262":[0,0],"263":[0,0],"264":[0,0],"265":[0,0],"266":[0,0],"267":[0,0],"268":[0,0],"269":[0,0],"270":[0,0],"271":[0,0],"272":[0,0],"273":[0,0],"274":[0,0],"275":[0,0],"276":[0,0],"277":[0,0,0,0],"278":[0,0],"279":[0,0],"280":[0,0],"281":[0,0],"282":[0,0],"283":[0,0,0,0],"284":[0,0],"285":[0,0],"286":[0,0],"287":[0,0],"288":[0,0],"289":[0,0],"290":[0,0],"291":[0,0],"292":[0,0],"293":[0,0],"294":[0,0],"295":[0,0],"296":[0,0],"297":[0,0],"298":[0,0],"299":[0,0],"300":[0,0],"301":[0,0],"302":[0,0],"303":[0,0],"304":[0,0],"305":[0,0],"306":[0,0],"307":[0,0],"308":[0,0],"309":[0,0],"310":[0,0],"311":[0,0],"312":[0,0],"313":[0,0],"314":[0,0],"315":[0,0,0],"316":[0,0],"317":[0,0],"318":[0,0],"319":[0,0],"320":[0,0],"321":[0,0],"322":[0,0],"323":[0,0],"324":[0,0],"325":[0,0],"326":[0,0],"327":[0,0],"328":[0,0],"329":[0,0],"330":[0,0],"331":[0,0],"332":[0,0],"333":[0,0],"334":[0,0],"335":[0,0],"336":[0,0],"337":[0,0],"338":[0,0],"339":[0,0],"340":[0,0],"341":[0,0],"342":[0,0],"343":[0,0],"344":[0,0],"345":[0,0],"346":[0,0],"347":[0,0],"348":[0,0],"349":[0,0],"350":[0,0],"351":[0,0],"352":[0,0],"353":[0,0],"354":[0,0],"355":[0,0],"356":[0,0,0],"357":[0,0],"358":[0,0],"359":[0,0],"360":[0,0],"361":[0,0],"362":[0,0],"363":[0,0],"364":[0,0],"365":[0,0],"366":[0,0],"367":[0,0],"368":[0,0],"369":[0,0],"370":[0,0],"371":[0,0],"372":[0,0],"373":[0,0],"374":[0,0],"375":[0,0],"376":[0,0],"377":[0,0,0],"378":[0,0],"379":[0,0],"380":[0,0],"381":[0,0],"382":[0,0],"383":[0,0],"384":[0,0,0],"385":[0,0],"386":[0,0,0],"387":[0,0],"388":[0,0],"389":[0,0],"390":[0,0],"391":[0,0],"392":[0,0],"393":[0,0],"394":[0,0],"395":[0,0],"396":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0},"fnMap":{"1":{"name":"(anonymous_1)","line":59,"loc":{"start":{"line":59,"column":14},"end":{"line":59,"column":25}}},"2":{"name":"(anonymous_2)","line":64,"loc":{"start":{"line":64,"column":25},"end":{"line":64,"column":43}}},"3":{"name":"(anonymous_3)","line":156,"loc":{"start":{"line":156,"column":1},"end":{"line":156,"column":12}}},"4":{"name":"(anonymous_4)","line":169,"loc":{"start":{"line":169,"column":15},"end":{"line":169,"column":26}}},"5":{"name":"(anonymous_5)","line":181,"loc":{"start":{"line":181,"column":14},"end":{"line":181,"column":46}}},"6":{"name":"(anonymous_6)","line":188,"loc":{"start":{"line":188,"column":17},"end":{"line":188,"column":49}}},"7":{"name":"(anonymous_7)","line":198,"loc":{"start":{"line":198,"column":22},"end":{"line":198,"column":33}}},"8":{"name":"(anonymous_8)","line":204,"loc":{"start":{"line":204,"column":21},"end":{"line":204,"column":32}}},"9":{"name":"(anonymous_9)","line":211,"loc":{"start":{"line":211,"column":20},"end":{"line":211,"column":35}}},"10":{"name":"(anonymous_10)","line":236,"loc":{"start":{"line":236,"column":18},"end":{"line":236,"column":33}}},"11":{"name":"(anonymous_11)","line":270,"loc":{"start":{"line":270,"column":17},"end":{"line":270,"column":29}}},"12":{"name":"(anonymous_12)","line":317,"loc":{"start":{"line":317,"column":13},"end":{"line":317,"column":25}}},"13":{"name":"(anonymous_13)","line":327,"loc":{"start":{"line":327,"column":11},"end":{"line":327,"column":22}}},"14":{"name":"(anonymous_14)","line":392,"loc":{"start":{"line":392,"column":31},"end":{"line":392,"column":54}}},"15":{"name":"(anonymous_15)","line":416,"loc":{"start":{"line":416,"column":24},"end":{"line":416,"column":42}}},"16":{"name":"(anonymous_16)","line":516,"loc":{"start":{"line":516,"column":12},"end":{"line":516,"column":23}}},"17":{"name":"(anonymous_17)","line":549,"loc":{"start":{"line":549,"column":13},"end":{"line":549,"column":40}}},"18":{"name":"(anonymous_18)","line":618,"loc":{"start":{"line":618,"column":9},"end":{"line":618,"column":46}}},"19":{"name":"(anonymous_19)","line":665,"loc":{"start":{"line":665,"column":13},"end":{"line":665,"column":31}}},"20":{"name":"(anonymous_20)","line":870,"loc":{"start":{"line":870,"column":20},"end":{"line":870,"column":40}}},"21":{"name":"(anonymous_21)","line":881,"loc":{"start":{"line":881,"column":15},"end":{"line":881,"column":26}}},"22":{"name":"(anonymous_22)","line":883,"loc":{"start":{"line":883,"column":24},"end":{"line":883,"column":35}}},"23":{"name":"(anonymous_23)","line":884,"loc":{"start":{"line":884,"column":34},"end":{"line":884,"column":45}}},"24":{"name":"(anonymous_24)","line":955,"loc":{"start":{"line":955,"column":9},"end":{"line":955,"column":20}}},"25":{"name":"(anonymous_25)","line":997,"loc":{"start":{"line":997,"column":25},"end":{"line":997,"column":47}}},"26":{"name":"(anonymous_26)","line":1023,"loc":{"start":{"line":1023,"column":13},"end":{"line":1023,"column":25}}},"27":{"name":"(anonymous_27)","line":1032,"loc":{"start":{"line":1032,"column":22},"end":{"line":1032,"column":35}}},"28":{"name":"(anonymous_28)","line":1073,"loc":{"start":{"line":1073,"column":13},"end":{"line":1073,"column":48}}},"29":{"name":"(anonymous_29)","line":1103,"loc":{"start":{"line":1103,"column":10},"end":{"line":1103,"column":35}}},"30":{"name":"(anonymous_30)","line":1126,"loc":{"start":{"line":1126,"column":22},"end":{"line":1126,"column":44}}},"31":{"name":"(anonymous_31)","line":1190,"loc":{"start":{"line":1190,"column":27},"end":{"line":1190,"column":48}}},"32":{"name":"(anonymous_32)","line":1217,"loc":{"start":{"line":1217,"column":36},"end":{"line":1217,"column":47}}},"33":{"name":"(anonymous_33)","line":1296,"loc":{"start":{"line":1296,"column":25},"end":{"line":1296,"column":36}}},"34":{"name":"(anonymous_34)","line":1365,"loc":{"start":{"line":1365,"column":15},"end":{"line":1365,"column":26}}},"35":{"name":"(anonymous_35)","line":1389,"loc":{"start":{"line":1389,"column":10},"end":{"line":1389,"column":23}}},"36":{"name":"(anonymous_36)","line":1408,"loc":{"start":{"line":1408,"column":11},"end":{"line":1408,"column":33}}},"37":{"name":"(anonymous_37)","line":1434,"loc":{"start":{"line":1434,"column":10},"end":{"line":1434,"column":24}}},"38":{"name":"(anonymous_38)","line":1456,"loc":{"start":{"line":1456,"column":11},"end":{"line":1456,"column":33}}},"39":{"name":"(anonymous_39)","line":1489,"loc":{"start":{"line":1489,"column":13},"end":{"line":1489,"column":24}}},"40":{"name":"(anonymous_40)","line":1557,"loc":{"start":{"line":1557,"column":22},"end":{"line":1557,"column":34}}},"41":{"name":"(anonymous_41)","line":1606,"loc":{"start":{"line":1606,"column":26},"end":{"line":1606,"column":39}}},"42":{"name":"(anonymous_42)","line":1984,"loc":{"start":{"line":1984,"column":20},"end":{"line":1984,"column":39}}},"43":{"name":"(anonymous_43)","line":2060,"loc":{"start":{"line":2060,"column":14},"end":{"line":2060,"column":28}}},"44":{"name":"(anonymous_44)","line":2078,"loc":{"start":{"line":2078,"column":57},"end":{"line":2078,"column":70}}},"45":{"name":"(anonymous_45)","line":2089,"loc":{"start":{"line":2089,"column":14},"end":{"line":2089,"column":26}}},"46":{"name":"(anonymous_46)","line":2100,"loc":{"start":{"line":2100,"column":11},"end":{"line":2100,"column":23}}},"47":{"name":"(anonymous_47)","line":2128,"loc":{"start":{"line":2128,"column":15},"end":{"line":2128,"column":27}}},"48":{"name":"(anonymous_48)","line":2139,"loc":{"start":{"line":2139,"column":11},"end":{"line":2139,"column":23}}},"49":{"name":"(anonymous_49)","line":2150,"loc":{"start":{"line":2150,"column":13},"end":{"line":2150,"column":25}}},"50":{"name":"(anonymous_50)","line":2165,"loc":{"start":{"line":2165,"column":13},"end":{"line":2165,"column":33}}},"51":{"name":"(anonymous_51)","line":2178,"loc":{"start":{"line":2178,"column":13},"end":{"line":2178,"column":29}}},"52":{"name":"(anonymous_52)","line":2189,"loc":{"start":{"line":2189,"column":13},"end":{"line":2189,"column":25}}},"53":{"name":"(anonymous_53)","line":2200,"loc":{"start":{"line":2200,"column":16},"end":{"line":2200,"column":28}}},"54":{"name":"(anonymous_54)","line":2213,"loc":{"start":{"line":2213,"column":12},"end":{"line":2213,"column":24}}},"55":{"name":"(anonymous_55)","line":2237,"loc":{"start":{"line":2237,"column":20},"end":{"line":2237,"column":32}}},"56":{"name":"(anonymous_56)","line":2258,"loc":{"start":{"line":2258,"column":8},"end":{"line":2258,"column":23}}},"57":{"name":"(anonymous_57)","line":2259,"loc":{"start":{"line":2259,"column":43},"end":{"line":2259,"column":65}}},"58":{"name":"(anonymous_58)","line":2272,"loc":{"start":{"line":2272,"column":64},"end":{"line":2272,"column":76}}},"59":{"name":"(anonymous_59)","line":2274,"loc":{"start":{"line":2274,"column":4},"end":{"line":2274,"column":17}}},"60":{"name":"(anonymous_60)","line":2289,"loc":{"start":{"line":2289,"column":76},"end":{"line":2289,"column":89}}},"61":{"name":"(anonymous_61)","line":2291,"loc":{"start":{"line":2291,"column":4},"end":{"line":2291,"column":17}}},"62":{"name":"(anonymous_62)","line":2302,"loc":{"start":{"line":2302,"column":79},"end":{"line":2302,"column":92}}},"63":{"name":"(anonymous_63)","line":2304,"loc":{"start":{"line":2304,"column":4},"end":{"line":2304,"column":17}}},"64":{"name":"(anonymous_64)","line":2335,"loc":{"start":{"line":2335,"column":9},"end":{"line":2335,"column":21}}},"65":{"name":"YArray","line":2376,"loc":{"start":{"line":2376,"column":0},"end":{"line":2376,"column":42}}},"66":{"name":"(anonymous_66)","line":2419,"loc":{"start":{"line":2419,"column":48},"end":{"line":2419,"column":65}}},"67":{"name":"(anonymous_67)","line":2434,"loc":{"start":{"line":2434,"column":4},"end":{"line":2434,"column":21}}},"68":{"name":"(anonymous_68)","line":2466,"loc":{"start":{"line":2466,"column":64},"end":{"line":2466,"column":94}}},"69":{"name":"(anonymous_69)","line":2469,"loc":{"start":{"line":2469,"column":4},"end":{"line":2469,"column":34}}},"70":{"name":"(anonymous_70)","line":2503,"loc":{"start":{"line":2503,"column":14},"end":{"line":2503,"column":38}}},"71":{"name":"(anonymous_71)","line":2531,"loc":{"start":{"line":2531,"column":50},"end":{"line":2531,"column":80}}},"72":{"name":"(anonymous_72)","line":2533,"loc":{"start":{"line":2533,"column":4},"end":{"line":2533,"column":34}}},"73":{"name":"(anonymous_73)","line":2576,"loc":{"start":{"line":2576,"column":21},"end":{"line":2576,"column":37}}},"74":{"name":"(anonymous_74)","line":2596,"loc":{"start":{"line":2596,"column":44},"end":{"line":2596,"column":74}}},"75":{"name":"(anonymous_75)","line":2598,"loc":{"start":{"line":2598,"column":4},"end":{"line":2598,"column":34}}},"76":{"name":"(anonymous_76)","line":2626,"loc":{"start":{"line":2626,"column":14},"end":{"line":2626,"column":29}}},"77":{"name":"Queue","line":2660,"loc":{"start":{"line":2660,"column":0},"end":{"line":2660,"column":17}}},"78":{"name":"(anonymous_78)","line":2672,"loc":{"start":{"line":2672,"column":11},"end":{"line":2672,"column":22}}},"79":{"name":"(anonymous_79)","line":2689,"loc":{"start":{"line":2689,"column":10},"end":{"line":2689,"column":21}}},"80":{"name":"(anonymous_80)","line":2699,"loc":{"start":{"line":2699,"column":10},"end":{"line":2699,"column":21}}},"81":{"name":"(anonymous_81)","line":2710,"loc":{"start":{"line":2710,"column":9},"end":{"line":2710,"column":20}}},"82":{"name":"(anonymous_82)","line":2722,"loc":{"start":{"line":2722,"column":10},"end":{"line":2722,"column":21}}},"83":{"name":"(anonymous_83)","line":2769,"loc":{"start":{"line":2769,"column":11},"end":{"line":2769,"column":45}}},"84":{"name":"(anonymous_84)","line":2773,"loc":{"start":{"line":2773,"column":11},"end":{"line":2773,"column":26}}},"85":{"name":"(anonymous_85)","line":2803,"loc":{"start":{"line":2803,"column":16},"end":{"line":2803,"column":28}}},"86":{"name":"(anonymous_86)","line":2828,"loc":{"start":{"line":2828,"column":10},"end":{"line":2828,"column":22}}},"87":{"name":"(anonymous_87)","line":2882,"loc":{"start":{"line":2882,"column":8},"end":{"line":2882,"column":72}}},"88":{"name":"(anonymous_88)","line":3021,"loc":{"start":{"line":3021,"column":47},"end":{"line":3021,"column":62}}},"89":{"name":"(anonymous_89)","line":3028,"loc":{"start":{"line":3028,"column":5},"end":{"line":3028,"column":17}}},"90":{"name":"F","line":3030,"loc":{"start":{"line":3030,"column":4},"end":{"line":3030,"column":17}}},"91":{"name":"(anonymous_91)","line":3033,"loc":{"start":{"line":3033,"column":11},"end":{"line":3033,"column":26}}},"92":{"name":"(anonymous_92)","line":3083,"loc":{"start":{"line":3083,"column":40},"end":{"line":3083,"column":52}}},"93":{"name":"(anonymous_93)","line":3096,"loc":{"start":{"line":3096,"column":16},"end":{"line":3096,"column":36}}},"94":{"name":"(anonymous_94)","line":3134,"loc":{"start":{"line":3134,"column":73},"end":{"line":3134,"column":88}}},"95":{"name":"(anonymous_95)","line":3186,"loc":{"start":{"line":3186,"column":11},"end":{"line":3186,"column":26}}},"96":{"name":"(anonymous_96)","line":3207,"loc":{"start":{"line":3207,"column":9},"end":{"line":3207,"column":24}}},"97":{"name":"(anonymous_97)","line":3225,"loc":{"start":{"line":3225,"column":13},"end":{"line":3225,"column":35}}},"98":{"name":"(anonymous_98)","line":3249,"loc":{"start":{"line":3249,"column":9},"end":{"line":3249,"column":44}}},"99":{"name":"(anonymous_99)","line":3281,"loc":{"start":{"line":3281,"column":9},"end":{"line":3281,"column":44}}},"100":{"name":"(anonymous_100)","line":3308,"loc":{"start":{"line":3308,"column":13},"end":{"line":3308,"column":31}}},"101":{"name":"(anonymous_101)","line":3338,"loc":{"start":{"line":3338,"column":13},"end":{"line":3338,"column":36}}},"102":{"name":"(anonymous_102)","line":3368,"loc":{"start":{"line":3368,"column":12},"end":{"line":3368,"column":27}}},"103":{"name":"(anonymous_103)","line":3404,"loc":{"start":{"line":3404,"column":18},"end":{"line":3404,"column":34}}},"104":{"name":"(anonymous_104)","line":3406,"loc":{"start":{"line":3406,"column":20},"end":{"line":3406,"column":32}}},"105":{"name":"(anonymous_105)","line":3408,"loc":{"start":{"line":3408,"column":47},"end":{"line":3408,"column":58}}},"106":{"name":"(anonymous_106)","line":3885,"loc":{"start":{"line":3885,"column":23},"end":{"line":3885,"column":39}}}},"statementMap":{"1":{"start":{"line":12,"column":0},"end":{"line":14,"column":1}},"2":{"start":{"line":13,"column":4},"end":{"line":13,"column":19}},"3":{"start":{"line":59,"column":4},"end":{"line":154,"column":6}},"4":{"start":{"line":60,"column":8},"end":{"line":67,"column":70}},"5":{"start":{"line":65,"column":16},"end":{"line":65,"column":70}},"6":{"start":{"line":69,"column":8},"end":{"line":137,"column":9}},"7":{"start":{"line":70,"column":12},"end":{"line":70,"column":26}},"8":{"start":{"line":73,"column":12},"end":{"line":73,"column":22}},"9":{"start":{"line":100,"column":12},"end":{"line":102,"column":13}},"10":{"start":{"line":101,"column":16},"end":{"line":101,"column":48}},"11":{"start":{"line":129,"column":12},"end":{"line":131,"column":13}},"12":{"start":{"line":130,"column":16},"end":{"line":130,"column":37}},"13":{"start":{"line":134,"column":12},"end":{"line":136,"column":13}},"14":{"start":{"line":135,"column":16},"end":{"line":135,"column":27}},"15":{"start":{"line":139,"column":8},"end":{"line":149,"column":9}},"16":{"start":{"line":144,"column":12},"end":{"line":146,"column":13}},"17":{"start":{"line":145,"column":16},"end":{"line":145,"column":39}},"18":{"start":{"line":148,"column":12},"end":{"line":148,"column":23}},"19":{"start":{"line":151,"column":8},"end":{"line":151,"column":34}},"20":{"start":{"line":153,"column":8},"end":{"line":153,"column":17}},"21":{"start":{"line":156,"column":0},"end":{"line":1620,"column":5}},"22":{"start":{"line":158,"column":4},"end":{"line":244,"column":41}},"23":{"start":{"line":182,"column":12},"end":{"line":186,"column":13}},"24":{"start":{"line":183,"column":16},"end":{"line":183,"column":55}},"25":{"start":{"line":184,"column":19},"end":{"line":186,"column":13}},"26":{"start":{"line":185,"column":16},"end":{"line":185,"column":48}},"27":{"start":{"line":189,"column":12},"end":{"line":196,"column":13}},"28":{"start":{"line":191,"column":16},"end":{"line":193,"column":31}},"29":{"start":{"line":192,"column":20},"end":{"line":192,"column":62}},"30":{"start":{"line":194,"column":19},"end":{"line":196,"column":13}},"31":{"start":{"line":195,"column":16},"end":{"line":195,"column":48}},"32":{"start":{"line":199,"column":12},"end":{"line":199,"column":36}},"33":{"start":{"line":200,"column":12},"end":{"line":202,"column":13}},"34":{"start":{"line":201,"column":16},"end":{"line":201,"column":61}},"35":{"start":{"line":205,"column":12},"end":{"line":205,"column":40}},"36":{"start":{"line":206,"column":12},"end":{"line":206,"column":36}},"37":{"start":{"line":207,"column":12},"end":{"line":209,"column":13}},"38":{"start":{"line":208,"column":16},"end":{"line":208,"column":51}},"39":{"start":{"line":212,"column":12},"end":{"line":215,"column":34}},"40":{"start":{"line":217,"column":12},"end":{"line":227,"column":13}},"41":{"start":{"line":219,"column":16},"end":{"line":219,"column":48}},"42":{"start":{"line":220,"column":16},"end":{"line":220,"column":36}},"43":{"start":{"line":221,"column":16},"end":{"line":221,"column":35}},"44":{"start":{"line":222,"column":16},"end":{"line":222,"column":37}},"45":{"start":{"line":223,"column":16},"end":{"line":223,"column":39}},"46":{"start":{"line":225,"column":16},"end":{"line":225,"column":48}},"47":{"start":{"line":226,"column":16},"end":{"line":226,"column":39}},"48":{"start":{"line":228,"column":12},"end":{"line":230,"column":13}},"49":{"start":{"line":229,"column":16},"end":{"line":229,"column":63}},"50":{"start":{"line":231,"column":12},"end":{"line":231,"column":74}},"51":{"start":{"line":233,"column":12},"end":{"line":233,"column":26}},"52":{"start":{"line":237,"column":12},"end":{"line":241,"column":13}},"53":{"start":{"line":238,"column":16},"end":{"line":240,"column":17}},"54":{"start":{"line":239,"column":20},"end":{"line":239,"column":32}},"55":{"start":{"line":248,"column":0},"end":{"line":254,"column":1}},"56":{"start":{"line":249,"column":4},"end":{"line":251,"column":5}},"57":{"start":{"line":250,"column":8},"end":{"line":250,"column":24}},"58":{"start":{"line":252,"column":4},"end":{"line":252,"column":26}},"59":{"start":{"line":253,"column":4},"end":{"line":253,"column":31}},"60":{"start":{"line":256,"column":0},"end":{"line":258,"column":1}},"61":{"start":{"line":257,"column":4},"end":{"line":257,"column":22}},"62":{"start":{"line":260,"column":0},"end":{"line":1511,"column":2}},"63":{"start":{"line":272,"column":8},"end":{"line":272,"column":22}},"64":{"start":{"line":274,"column":8},"end":{"line":281,"column":38}},"65":{"start":{"line":283,"column":8},"end":{"line":301,"column":9}},"66":{"start":{"line":284,"column":12},"end":{"line":300,"column":13}},"67":{"start":{"line":285,"column":16},"end":{"line":285,"column":31}},"68":{"start":{"line":286,"column":16},"end":{"line":299,"column":17}},"69":{"start":{"line":287,"column":20},"end":{"line":287,"column":40}},"70":{"start":{"line":288,"column":23},"end":{"line":299,"column":17}},"71":{"start":{"line":289,"column":20},"end":{"line":289,"column":43}},"72":{"start":{"line":290,"column":23},"end":{"line":299,"column":17}},"73":{"start":{"line":291,"column":20},"end":{"line":291,"column":42}},"74":{"start":{"line":292,"column":23},"end":{"line":299,"column":17}},"75":{"start":{"line":293,"column":20},"end":{"line":293,"column":72}},"76":{"start":{"line":294,"column":20},"end":{"line":294,"column":77}},"77":{"start":{"line":295,"column":23},"end":{"line":299,"column":17}},"78":{"start":{"line":298,"column":20},"end":{"line":298,"column":40}},"79":{"start":{"line":303,"column":8},"end":{"line":305,"column":9}},"80":{"start":{"line":304,"column":12},"end":{"line":304,"column":30}},"81":{"start":{"line":318,"column":8},"end":{"line":318,"column":28}},"82":{"start":{"line":328,"column":8},"end":{"line":332,"column":17}},"83":{"start":{"line":343,"column":8},"end":{"line":343,"column":28}},"84":{"start":{"line":345,"column":8},"end":{"line":465,"column":9}},"85":{"start":{"line":346,"column":12},"end":{"line":437,"column":14}},"86":{"start":{"line":393,"column":20},"end":{"line":394,"column":37}},"87":{"start":{"line":396,"column":20},"end":{"line":412,"column":21}},"88":{"start":{"line":397,"column":24},"end":{"line":397,"column":89}},"89":{"start":{"line":401,"column":24},"end":{"line":401,"column":42}},"90":{"start":{"line":405,"column":24},"end":{"line":407,"column":25}},"91":{"start":{"line":406,"column":28},"end":{"line":406,"column":51}},"92":{"start":{"line":408,"column":24},"end":{"line":411,"column":26}},"93":{"start":{"line":413,"column":20},"end":{"line":413,"column":32}},"94":{"start":{"line":417,"column":28},"end":{"line":419,"column":44}},"95":{"start":{"line":421,"column":28},"end":{"line":431,"column":29}},"96":{"start":{"line":422,"column":32},"end":{"line":422,"column":51}},"97":{"start":{"line":423,"column":32},"end":{"line":430,"column":33}},"98":{"start":{"line":424,"column":36},"end":{"line":424,"column":79}},"99":{"start":{"line":425,"column":36},"end":{"line":429,"column":37}},"100":{"start":{"line":426,"column":40},"end":{"line":426,"column":63}},"101":{"start":{"line":427,"column":40},"end":{"line":427,"column":59}},"102":{"start":{"line":428,"column":40},"end":{"line":428,"column":46}},"103":{"start":{"line":434,"column":28},"end":{"line":434,"column":40}},"104":{"start":{"line":439,"column":12},"end":{"line":439,"column":24}},"105":{"start":{"line":441,"column":12},"end":{"line":441,"column":38}},"106":{"start":{"line":443,"column":12},"end":{"line":460,"column":13}},"107":{"start":{"line":444,"column":16},"end":{"line":444,"column":42}},"108":{"start":{"line":445,"column":16},"end":{"line":446,"column":82}},"109":{"start":{"line":447,"column":19},"end":{"line":460,"column":13}},"110":{"start":{"line":449,"column":16},"end":{"line":449,"column":37}},"111":{"start":{"line":450,"column":16},"end":{"line":450,"column":41}},"112":{"start":{"line":451,"column":16},"end":{"line":451,"column":41}},"113":{"start":{"line":453,"column":16},"end":{"line":457,"column":17}},"114":{"start":{"line":454,"column":20},"end":{"line":456,"column":21}},"115":{"start":{"line":455,"column":24},"end":{"line":455,"column":48}},"116":{"start":{"line":459,"column":16},"end":{"line":459,"column":32}},"117":{"start":{"line":462,"column":12},"end":{"line":462,"column":30}},"118":{"start":{"line":463,"column":12},"end":{"line":463,"column":32}},"119":{"start":{"line":467,"column":8},"end":{"line":467,"column":28}},"120":{"start":{"line":470,"column":8},"end":{"line":481,"column":10}},"121":{"start":{"line":484,"column":8},"end":{"line":495,"column":9}},"122":{"start":{"line":485,"column":12},"end":{"line":485,"column":42}},"123":{"start":{"line":486,"column":12},"end":{"line":486,"column":136}},"124":{"start":{"line":487,"column":12},"end":{"line":487,"column":47}},"125":{"start":{"line":488,"column":12},"end":{"line":492,"column":13}},"126":{"start":{"line":489,"column":16},"end":{"line":489,"column":57}},"127":{"start":{"line":491,"column":16},"end":{"line":491,"column":73}},"128":{"start":{"line":493,"column":15},"end":{"line":495,"column":9}},"129":{"start":{"line":494,"column":12},"end":{"line":494,"column":66}},"130":{"start":{"line":497,"column":8},"end":{"line":497,"column":49}},"131":{"start":{"line":499,"column":8},"end":{"line":499,"column":73}},"132":{"start":{"line":501,"column":8},"end":{"line":503,"column":9}},"133":{"start":{"line":502,"column":12},"end":{"line":502,"column":27}},"134":{"start":{"line":504,"column":8},"end":{"line":504,"column":50}},"135":{"start":{"line":505,"column":8},"end":{"line":505,"column":88}},"136":{"start":{"line":517,"column":8},"end":{"line":520,"column":62}},"137":{"start":{"line":522,"column":8},"end":{"line":526,"column":9}},"138":{"start":{"line":523,"column":12},"end":{"line":525,"column":13}},"139":{"start":{"line":524,"column":16},"end":{"line":524,"column":37}},"140":{"start":{"line":528,"column":8},"end":{"line":528,"column":32}},"141":{"start":{"line":529,"column":8},"end":{"line":529,"column":24}},"142":{"start":{"line":531,"column":8},"end":{"line":533,"column":9}},"143":{"start":{"line":532,"column":12},"end":{"line":532,"column":25}},"144":{"start":{"line":550,"column":8},"end":{"line":553,"column":9}},"145":{"start":{"line":551,"column":12},"end":{"line":551,"column":70}},"146":{"start":{"line":552,"column":12},"end":{"line":552,"column":24}},"147":{"start":{"line":555,"column":8},"end":{"line":555,"column":49}},"148":{"start":{"line":556,"column":8},"end":{"line":566,"column":9}},"149":{"start":{"line":557,"column":12},"end":{"line":557,"column":37}},"150":{"start":{"line":558,"column":12},"end":{"line":558,"column":25}},"151":{"start":{"line":559,"column":12},"end":{"line":564,"column":13}},"152":{"start":{"line":560,"column":16},"end":{"line":560,"column":31}},"153":{"start":{"line":561,"column":16},"end":{"line":563,"column":17}},"154":{"start":{"line":562,"column":20},"end":{"line":562,"column":76}},"155":{"start":{"line":565,"column":12},"end":{"line":565,"column":48}},"156":{"start":{"line":568,"column":8},"end":{"line":568,"column":20}},"157":{"start":{"line":619,"column":8},"end":{"line":619,"column":32}},"158":{"start":{"line":620,"column":8},"end":{"line":630,"column":39}},"159":{"start":{"line":632,"column":8},"end":{"line":632,"column":29}},"160":{"start":{"line":633,"column":8},"end":{"line":633,"column":52}},"161":{"start":{"line":634,"column":8},"end":{"line":634,"column":38}},"162":{"start":{"line":636,"column":8},"end":{"line":650,"column":9}},"163":{"start":{"line":637,"column":12},"end":{"line":649,"column":13}},"164":{"start":{"line":638,"column":16},"end":{"line":638,"column":36}},"165":{"start":{"line":639,"column":16},"end":{"line":648,"column":17}},"166":{"start":{"line":640,"column":20},"end":{"line":640,"column":44}},"167":{"start":{"line":641,"column":20},"end":{"line":641,"column":46}},"168":{"start":{"line":642,"column":20},"end":{"line":647,"column":21}},"169":{"start":{"line":643,"column":24},"end":{"line":643,"column":61}},"170":{"start":{"line":644,"column":24},"end":{"line":646,"column":25}},"171":{"start":{"line":645,"column":28},"end":{"line":645,"column":60}},"172":{"start":{"line":652,"column":8},"end":{"line":652,"column":20}},"173":{"start":{"line":666,"column":8},"end":{"line":678,"column":37}},"174":{"start":{"line":682,"column":8},"end":{"line":697,"column":9}},"175":{"start":{"line":683,"column":12},"end":{"line":683,"column":24}},"176":{"start":{"line":684,"column":12},"end":{"line":684,"column":29}},"177":{"start":{"line":685,"column":12},"end":{"line":685,"column":25}},"178":{"start":{"line":686,"column":12},"end":{"line":696,"column":13}},"179":{"start":{"line":687,"column":16},"end":{"line":695,"column":17}},"180":{"start":{"line":688,"column":20},"end":{"line":694,"column":21}},"181":{"start":{"line":689,"column":24},"end":{"line":689,"column":57}},"182":{"start":{"line":690,"column":24},"end":{"line":690,"column":92}},"183":{"start":{"line":691,"column":24},"end":{"line":693,"column":25}},"184":{"start":{"line":692,"column":28},"end":{"line":692,"column":45}},"185":{"start":{"line":698,"column":8},"end":{"line":698,"column":14}},"186":{"start":{"line":699,"column":8},"end":{"line":699,"column":23}},"187":{"start":{"line":701,"column":8},"end":{"line":854,"column":9}},"188":{"start":{"line":702,"column":12},"end":{"line":853,"column":13}},"189":{"start":{"line":703,"column":16},"end":{"line":703,"column":28}},"190":{"start":{"line":704,"column":16},"end":{"line":704,"column":33}},"191":{"start":{"line":706,"column":16},"end":{"line":709,"column":17}},"192":{"start":{"line":707,"column":20},"end":{"line":707,"column":45}},"193":{"start":{"line":708,"column":20},"end":{"line":708,"column":29}},"194":{"start":{"line":710,"column":16},"end":{"line":852,"column":17}},"195":{"start":{"line":711,"column":20},"end":{"line":711,"column":67}},"196":{"start":{"line":712,"column":20},"end":{"line":715,"column":21}},"197":{"start":{"line":713,"column":24},"end":{"line":713,"column":38}},"198":{"start":{"line":714,"column":24},"end":{"line":714,"column":36}},"199":{"start":{"line":720,"column":20},"end":{"line":726,"column":21}},"200":{"start":{"line":721,"column":24},"end":{"line":725,"column":25}},"201":{"start":{"line":722,"column":28},"end":{"line":722,"column":53}},"202":{"start":{"line":723,"column":28},"end":{"line":723,"column":74}},"203":{"start":{"line":724,"column":28},"end":{"line":724,"column":76}},"204":{"start":{"line":728,"column":20},"end":{"line":728,"column":38}},"205":{"start":{"line":731,"column":20},"end":{"line":736,"column":21}},"206":{"start":{"line":732,"column":24},"end":{"line":735,"column":25}},"207":{"start":{"line":733,"column":28},"end":{"line":733,"column":110}},"208":{"start":{"line":734,"column":28},"end":{"line":734,"column":55}},"209":{"start":{"line":744,"column":20},"end":{"line":746,"column":21}},"210":{"start":{"line":745,"column":24},"end":{"line":745,"column":36}},"211":{"start":{"line":753,"column":20},"end":{"line":763,"column":21}},"212":{"start":{"line":754,"column":24},"end":{"line":754,"column":56}},"213":{"start":{"line":755,"column":24},"end":{"line":755,"column":33}},"214":{"start":{"line":756,"column":24},"end":{"line":756,"column":61}},"215":{"start":{"line":757,"column":24},"end":{"line":761,"column":25}},"216":{"start":{"line":758,"column":28},"end":{"line":760,"column":29}},"217":{"start":{"line":759,"column":32},"end":{"line":759,"column":44}},"218":{"start":{"line":762,"column":24},"end":{"line":762,"column":39}},"219":{"start":{"line":765,"column":20},"end":{"line":765,"column":42}},"220":{"start":{"line":766,"column":20},"end":{"line":766,"column":43}},"221":{"start":{"line":767,"column":20},"end":{"line":767,"column":42}},"222":{"start":{"line":768,"column":20},"end":{"line":768,"column":38}},"223":{"start":{"line":769,"column":20},"end":{"line":769,"column":42}},"224":{"start":{"line":771,"column":20},"end":{"line":774,"column":21}},"225":{"start":{"line":772,"column":24},"end":{"line":772,"column":40}},"226":{"start":{"line":773,"column":24},"end":{"line":773,"column":44}},"227":{"start":{"line":776,"column":20},"end":{"line":786,"column":21}},"228":{"start":{"line":777,"column":24},"end":{"line":777,"column":44}},"229":{"start":{"line":778,"column":24},"end":{"line":785,"column":25}},"230":{"start":{"line":779,"column":28},"end":{"line":784,"column":29}},"231":{"start":{"line":780,"column":32},"end":{"line":782,"column":33}},"232":{"start":{"line":781,"column":36},"end":{"line":781,"column":49}},"233":{"start":{"line":783,"column":32},"end":{"line":783,"column":38}},"234":{"start":{"line":788,"column":20},"end":{"line":797,"column":21}},"235":{"start":{"line":789,"column":24},"end":{"line":796,"column":25}},"236":{"start":{"line":790,"column":28},"end":{"line":795,"column":29}},"237":{"start":{"line":791,"column":32},"end":{"line":793,"column":33}},"238":{"start":{"line":792,"column":36},"end":{"line":792,"column":49}},"239":{"start":{"line":794,"column":32},"end":{"line":794,"column":38}},"240":{"start":{"line":799,"column":20},"end":{"line":837,"column":21}},"241":{"start":{"line":800,"column":24},"end":{"line":800,"column":44}},"242":{"start":{"line":801,"column":24},"end":{"line":812,"column":25}},"243":{"start":{"line":802,"column":28},"end":{"line":802,"column":45}},"244":{"start":{"line":803,"column":28},"end":{"line":803,"column":45}},"245":{"start":{"line":805,"column":28},"end":{"line":805,"column":67}},"246":{"start":{"line":806,"column":28},"end":{"line":811,"column":29}},"247":{"start":{"line":807,"column":32},"end":{"line":807,"column":52}},"248":{"start":{"line":808,"column":32},"end":{"line":810,"column":33}},"249":{"start":{"line":809,"column":36},"end":{"line":809,"column":113}},"250":{"start":{"line":813,"column":24},"end":{"line":822,"column":25}},"251":{"start":{"line":814,"column":28},"end":{"line":814,"column":92}},"252":{"start":{"line":816,"column":28},"end":{"line":821,"column":29}},"253":{"start":{"line":817,"column":32},"end":{"line":817,"column":96}},"254":{"start":{"line":819,"column":32},"end":{"line":819,"column":74}},"255":{"start":{"line":820,"column":32},"end":{"line":820,"column":45}},"256":{"start":{"line":823,"column":24},"end":{"line":836,"column":25}},"257":{"start":{"line":825,"column":28},"end":{"line":825,"column":57}},"258":{"start":{"line":832,"column":28},"end":{"line":832,"column":62}},"259":{"start":{"line":833,"column":28},"end":{"line":835,"column":29}},"260":{"start":{"line":834,"column":32},"end":{"line":834,"column":74}},"261":{"start":{"line":839,"column":20},"end":{"line":848,"column":21}},"262":{"start":{"line":840,"column":24},"end":{"line":847,"column":25}},"263":{"start":{"line":841,"column":28},"end":{"line":846,"column":29}},"264":{"start":{"line":842,"column":32},"end":{"line":844,"column":33}},"265":{"start":{"line":843,"column":36},"end":{"line":843,"column":49}},"266":{"start":{"line":845,"column":32},"end":{"line":845,"column":38}},"267":{"start":{"line":856,"column":8},"end":{"line":856,"column":20}},"268":{"start":{"line":872,"column":8},"end":{"line":873,"column":33}},"269":{"start":{"line":875,"column":8},"end":{"line":875,"column":68}},"270":{"start":{"line":877,"column":8},"end":{"line":879,"column":9}},"271":{"start":{"line":878,"column":12},"end":{"line":878,"column":40}},"272":{"start":{"line":881,"column":8},"end":{"line":889,"column":10}},"273":{"start":{"line":882,"column":12},"end":{"line":882,"column":33}},"274":{"start":{"line":883,"column":12},"end":{"line":888,"column":15}},"275":{"start":{"line":884,"column":16},"end":{"line":887,"column":31}},"276":{"start":{"line":885,"column":20},"end":{"line":885,"column":53}},"277":{"start":{"line":886,"column":20},"end":{"line":886,"column":38}},"278":{"start":{"line":956,"column":8},"end":{"line":962,"column":31}},"279":{"start":{"line":965,"column":8},"end":{"line":972,"column":9}},"280":{"start":{"line":966,"column":12},"end":{"line":966,"column":23}},"281":{"start":{"line":967,"column":12},"end":{"line":969,"column":13}},"282":{"start":{"line":968,"column":16},"end":{"line":968,"column":75}},"283":{"start":{"line":971,"column":12},"end":{"line":971,"column":28}},"284":{"start":{"line":973,"column":8},"end":{"line":975,"column":9}},"285":{"start":{"line":974,"column":12},"end":{"line":974,"column":27}},"286":{"start":{"line":977,"column":8},"end":{"line":991,"column":9}},"287":{"start":{"line":978,"column":12},"end":{"line":983,"column":13}},"288":{"start":{"line":979,"column":16},"end":{"line":982,"column":17}},"289":{"start":{"line":980,"column":20},"end":{"line":980,"column":40}},"290":{"start":{"line":981,"column":20},"end":{"line":981,"column":26}},"291":{"start":{"line":985,"column":12},"end":{"line":990,"column":13}},"292":{"start":{"line":986,"column":16},"end":{"line":987,"column":17}},"293":{"start":{"line":988,"column":16},"end":{"line":988,"column":56}},"294":{"start":{"line":989,"column":16},"end":{"line":989,"column":25}},"295":{"start":{"line":993,"column":8},"end":{"line":1000,"column":9}},"296":{"start":{"line":994,"column":12},"end":{"line":994,"column":55}},"297":{"start":{"line":995,"column":12},"end":{"line":995,"column":46}},"298":{"start":{"line":997,"column":12},"end":{"line":999,"column":15}},"299":{"start":{"line":998,"column":16},"end":{"line":998,"column":52}},"300":{"start":{"line":1002,"column":8},"end":{"line":1002,"column":17}},"301":{"start":{"line":1024,"column":8},"end":{"line":1025,"column":21}},"302":{"start":{"line":1027,"column":8},"end":{"line":1052,"column":9}},"303":{"start":{"line":1028,"column":12},"end":{"line":1028,"column":34}},"304":{"start":{"line":1032,"column":12},"end":{"line":1051,"column":15}},"305":{"start":{"line":1033,"column":16},"end":{"line":1035,"column":37}},"306":{"start":{"line":1038,"column":16},"end":{"line":1042,"column":17}},"307":{"start":{"line":1039,"column":20},"end":{"line":1041,"column":21}},"308":{"start":{"line":1040,"column":24},"end":{"line":1040,"column":65}},"309":{"start":{"line":1050,"column":16},"end":{"line":1050,"column":57}},"310":{"start":{"line":1061,"column":8},"end":{"line":1061,"column":35}},"311":{"start":{"line":1074,"column":8},"end":{"line":1090,"column":9}},"312":{"start":{"line":1075,"column":12},"end":{"line":1075,"column":79}},"313":{"start":{"line":1076,"column":15},"end":{"line":1090,"column":9}},"314":{"start":{"line":1077,"column":12},"end":{"line":1080,"column":13}},"315":{"start":{"line":1078,"column":16},"end":{"line":1078,"column":77}},"316":{"start":{"line":1079,"column":16},"end":{"line":1079,"column":41}},"317":{"start":{"line":1081,"column":12},"end":{"line":1089,"column":13}},"318":{"start":{"line":1082,"column":16},"end":{"line":1082,"column":41}},"319":{"start":{"line":1084,"column":16},"end":{"line":1088,"column":17}},"320":{"start":{"line":1085,"column":20},"end":{"line":1085,"column":45}},"321":{"start":{"line":1087,"column":20},"end":{"line":1087,"column":62}},"322":{"start":{"line":1105,"column":8},"end":{"line":1107,"column":9}},"323":{"start":{"line":1106,"column":12},"end":{"line":1106,"column":39}},"324":{"start":{"line":1109,"column":8},"end":{"line":1235,"column":14}},"325":{"start":{"line":1128,"column":16},"end":{"line":1128,"column":58}},"326":{"start":{"line":1130,"column":16},"end":{"line":1132,"column":17}},"327":{"start":{"line":1131,"column":20},"end":{"line":1131,"column":27}},"328":{"start":{"line":1134,"column":16},"end":{"line":1144,"column":17}},"329":{"start":{"line":1135,"column":20},"end":{"line":1135,"column":39}},"330":{"start":{"line":1136,"column":20},"end":{"line":1142,"column":21}},"331":{"start":{"line":1137,"column":24},"end":{"line":1141,"column":25}},"332":{"start":{"line":1138,"column":28},"end":{"line":1138,"column":64}},"333":{"start":{"line":1140,"column":28},"end":{"line":1140,"column":45}},"334":{"start":{"line":1143,"column":20},"end":{"line":1143,"column":30}},"335":{"start":{"line":1146,"column":16},"end":{"line":1146,"column":35}},"336":{"start":{"line":1148,"column":16},"end":{"line":1186,"column":17}},"337":{"start":{"line":1149,"column":20},"end":{"line":1149,"column":36}},"338":{"start":{"line":1150,"column":20},"end":{"line":1152,"column":21}},"339":{"start":{"line":1151,"column":24},"end":{"line":1151,"column":37}},"340":{"start":{"line":1155,"column":20},"end":{"line":1157,"column":21}},"341":{"start":{"line":1156,"column":24},"end":{"line":1156,"column":33}},"342":{"start":{"line":1159,"column":20},"end":{"line":1159,"column":35}},"343":{"start":{"line":1160,"column":20},"end":{"line":1160,"column":31}},"344":{"start":{"line":1161,"column":20},"end":{"line":1161,"column":31}},"345":{"start":{"line":1163,"column":20},"end":{"line":1175,"column":21}},"346":{"start":{"line":1164,"column":24},"end":{"line":1164,"column":42}},"347":{"start":{"line":1165,"column":24},"end":{"line":1165,"column":49}},"348":{"start":{"line":1166,"column":24},"end":{"line":1166,"column":44}},"349":{"start":{"line":1170,"column":24},"end":{"line":1174,"column":25}},"350":{"start":{"line":1171,"column":28},"end":{"line":1171,"column":47}},"351":{"start":{"line":1173,"column":28},"end":{"line":1173,"column":46}},"352":{"start":{"line":1178,"column":20},"end":{"line":1180,"column":21}},"353":{"start":{"line":1179,"column":24},"end":{"line":1179,"column":37}},"354":{"start":{"line":1183,"column":20},"end":{"line":1185,"column":21}},"355":{"start":{"line":1184,"column":24},"end":{"line":1184,"column":40}},"356":{"start":{"line":1191,"column":16},"end":{"line":1197,"column":41}},"357":{"start":{"line":1199,"column":16},"end":{"line":1199,"column":35}},"358":{"start":{"line":1201,"column":16},"end":{"line":1213,"column":17}},"359":{"start":{"line":1202,"column":20},"end":{"line":1202,"column":42}},"360":{"start":{"line":1203,"column":20},"end":{"line":1203,"column":33}},"361":{"start":{"line":1204,"column":20},"end":{"line":1204,"column":27}},"362":{"start":{"line":1205,"column":20},"end":{"line":1205,"column":34}},"363":{"start":{"line":1206,"column":20},"end":{"line":1206,"column":42}},"364":{"start":{"line":1207,"column":20},"end":{"line":1212,"column":21}},"365":{"start":{"line":1208,"column":24},"end":{"line":1211,"column":25}},"366":{"start":{"line":1210,"column":28},"end":{"line":1210,"column":41}},"367":{"start":{"line":1215,"column":16},"end":{"line":1229,"column":17}},"368":{"start":{"line":1216,"column":20},"end":{"line":1216,"column":38}},"369":{"start":{"line":1217,"column":20},"end":{"line":1221,"column":23}},"370":{"start":{"line":1218,"column":24},"end":{"line":1220,"column":25}},"371":{"start":{"line":1219,"column":28},"end":{"line":1219,"column":64}},"372":{"start":{"line":1223,"column":20},"end":{"line":1225,"column":21}},"373":{"start":{"line":1224,"column":24},"end":{"line":1224,"column":46}},"374":{"start":{"line":1226,"column":20},"end":{"line":1228,"column":21}},"375":{"start":{"line":1227,"column":24},"end":{"line":1227,"column":60}},"376":{"start":{"line":1231,"column":16},"end":{"line":1233,"column":17}},"377":{"start":{"line":1232,"column":20},"end":{"line":1232,"column":56}},"378":{"start":{"line":1239,"column":8},"end":{"line":1251,"column":9}},"379":{"start":{"line":1240,"column":12},"end":{"line":1240,"column":22}},"380":{"start":{"line":1241,"column":12},"end":{"line":1245,"column":13}},"381":{"start":{"line":1242,"column":16},"end":{"line":1244,"column":17}},"382":{"start":{"line":1243,"column":20},"end":{"line":1243,"column":33}},"383":{"start":{"line":1246,"column":12},"end":{"line":1246,"column":34}},"384":{"start":{"line":1247,"column":12},"end":{"line":1249,"column":13}},"385":{"start":{"line":1248,"column":16},"end":{"line":1248,"column":31}},"386":{"start":{"line":1250,"column":12},"end":{"line":1250,"column":21}},"387":{"start":{"line":1253,"column":8},"end":{"line":1255,"column":9}},"388":{"start":{"line":1254,"column":12},"end":{"line":1254,"column":68}},"389":{"start":{"line":1260,"column":8},"end":{"line":1268,"column":9}},"390":{"start":{"line":1261,"column":12},"end":{"line":1261,"column":34}},"391":{"start":{"line":1262,"column":12},"end":{"line":1262,"column":33}},"392":{"start":{"line":1263,"column":12},"end":{"line":1263,"column":43}},"393":{"start":{"line":1264,"column":12},"end":{"line":1264,"column":32}},"394":{"start":{"line":1265,"column":12},"end":{"line":1265,"column":61}},"395":{"start":{"line":1266,"column":12},"end":{"line":1266,"column":33}},"396":{"start":{"line":1267,"column":12},"end":{"line":1267,"column":33}},"397":{"start":{"line":1270,"column":8},"end":{"line":1270,"column":22}},"398":{"start":{"line":1272,"column":8},"end":{"line":1272,"column":29}},"399":{"start":{"line":1275,"column":8},"end":{"line":1278,"column":9}},"400":{"start":{"line":1276,"column":12},"end":{"line":1276,"column":45}},"401":{"start":{"line":1277,"column":12},"end":{"line":1277,"column":33}},"402":{"start":{"line":1282,"column":8},"end":{"line":1320,"column":9}},"403":{"start":{"line":1283,"column":12},"end":{"line":1283,"column":30}},"404":{"start":{"line":1284,"column":12},"end":{"line":1284,"column":34}},"405":{"start":{"line":1285,"column":12},"end":{"line":1285,"column":40}},"406":{"start":{"line":1286,"column":12},"end":{"line":1286,"column":31}},"407":{"start":{"line":1287,"column":12},"end":{"line":1287,"column":31}},"408":{"start":{"line":1288,"column":12},"end":{"line":1288,"column":44}},"409":{"start":{"line":1289,"column":12},"end":{"line":1289,"column":36}},"410":{"start":{"line":1290,"column":12},"end":{"line":1290,"column":58}},"411":{"start":{"line":1292,"column":15},"end":{"line":1320,"column":9}},"412":{"start":{"line":1294,"column":12},"end":{"line":1294,"column":30}},"413":{"start":{"line":1296,"column":12},"end":{"line":1304,"column":14}},"414":{"start":{"line":1297,"column":16},"end":{"line":1297,"column":35}},"415":{"start":{"line":1298,"column":16},"end":{"line":1298,"column":38}},"416":{"start":{"line":1299,"column":16},"end":{"line":1299,"column":40}},"417":{"start":{"line":1300,"column":16},"end":{"line":1300,"column":45}},"418":{"start":{"line":1301,"column":16},"end":{"line":1303,"column":17}},"419":{"start":{"line":1302,"column":20},"end":{"line":1302,"column":43}},"420":{"start":{"line":1306,"column":12},"end":{"line":1313,"column":13}},"421":{"start":{"line":1307,"column":16},"end":{"line":1307,"column":38}},"422":{"start":{"line":1309,"column":16},"end":{"line":1309,"column":44}},"423":{"start":{"line":1310,"column":16},"end":{"line":1312,"column":19}},"424":{"start":{"line":1316,"column":12},"end":{"line":1316,"column":34}},"425":{"start":{"line":1317,"column":12},"end":{"line":1319,"column":13}},"426":{"start":{"line":1318,"column":16},"end":{"line":1318,"column":31}},"427":{"start":{"line":1322,"column":8},"end":{"line":1322,"column":17}},"428":{"start":{"line":1366,"column":8},"end":{"line":1366,"column":47}},"429":{"start":{"line":1368,"column":8},"end":{"line":1381,"column":9}},"430":{"start":{"line":1369,"column":12},"end":{"line":1369,"column":21}},"431":{"start":{"line":1370,"column":12},"end":{"line":1370,"column":23}},"432":{"start":{"line":1371,"column":12},"end":{"line":1380,"column":13}},"433":{"start":{"line":1372,"column":16},"end":{"line":1372,"column":38}},"434":{"start":{"line":1373,"column":16},"end":{"line":1376,"column":17}},"435":{"start":{"line":1374,"column":20},"end":{"line":1374,"column":44}},"436":{"start":{"line":1375,"column":20},"end":{"line":1375,"column":32}},"437":{"start":{"line":1378,"column":16},"end":{"line":1378,"column":38}},"438":{"start":{"line":1379,"column":16},"end":{"line":1379,"column":27}},"439":{"start":{"line":1382,"column":8},"end":{"line":1382,"column":17}},"440":{"start":{"line":1389,"column":25},"end":{"line":1389,"column":37}},"441":{"start":{"line":1411,"column":8},"end":{"line":1411,"column":26}},"442":{"start":{"line":1413,"column":8},"end":{"line":1415,"column":9}},"443":{"start":{"line":1414,"column":12},"end":{"line":1414,"column":55}},"444":{"start":{"line":1417,"column":8},"end":{"line":1421,"column":9}},"445":{"start":{"line":1418,"column":12},"end":{"line":1418,"column":40}},"446":{"start":{"line":1420,"column":12},"end":{"line":1420,"column":44}},"447":{"start":{"line":1423,"column":8},"end":{"line":1423,"column":17}},"448":{"start":{"line":1435,"column":8},"end":{"line":1435,"column":60}},"449":{"start":{"line":1436,"column":8},"end":{"line":1436,"column":39}},"450":{"start":{"line":1457,"column":8},"end":{"line":1457,"column":16}},"451":{"start":{"line":1458,"column":8},"end":{"line":1460,"column":9}},"452":{"start":{"line":1459,"column":12},"end":{"line":1459,"column":21}},"453":{"start":{"line":1464,"column":8},"end":{"line":1468,"column":9}},"454":{"start":{"line":1465,"column":12},"end":{"line":1465,"column":29}},"455":{"start":{"line":1467,"column":12},"end":{"line":1467,"column":56}},"456":{"start":{"line":1470,"column":8},"end":{"line":1479,"column":9}},"457":{"start":{"line":1471,"column":12},"end":{"line":1471,"column":30}},"458":{"start":{"line":1472,"column":12},"end":{"line":1478,"column":13}},"459":{"start":{"line":1473,"column":16},"end":{"line":1477,"column":17}},"460":{"start":{"line":1474,"column":20},"end":{"line":1474,"column":34}},"461":{"start":{"line":1476,"column":20},"end":{"line":1476,"column":31}},"462":{"start":{"line":1480,"column":8},"end":{"line":1480,"column":19}},"463":{"start":{"line":1490,"column":8},"end":{"line":1490,"column":21}},"464":{"start":{"line":1491,"column":8},"end":{"line":1493,"column":9}},"465":{"start":{"line":1492,"column":12},"end":{"line":1492,"column":30}},"466":{"start":{"line":1494,"column":8},"end":{"line":1494,"column":31}},"467":{"start":{"line":1495,"column":8},"end":{"line":1495,"column":21}},"468":{"start":{"line":1496,"column":8},"end":{"line":1496,"column":24}},"469":{"start":{"line":1513,"column":4},"end":{"line":1513,"column":26}},"470":{"start":{"line":1516,"column":4},"end":{"line":1520,"column":5}},"471":{"start":{"line":1517,"column":8},"end":{"line":1519,"column":9}},"472":{"start":{"line":1518,"column":12},"end":{"line":1518,"column":36}},"473":{"start":{"line":1557,"column":4},"end":{"line":1569,"column":6}},"474":{"start":{"line":1558,"column":8},"end":{"line":1560,"column":9}},"475":{"start":{"line":1559,"column":12},"end":{"line":1559,"column":19}},"476":{"start":{"line":1562,"column":8},"end":{"line":1564,"column":9}},"477":{"start":{"line":1563,"column":12},"end":{"line":1563,"column":68}},"478":{"start":{"line":1566,"column":8},"end":{"line":1566,"column":49}},"479":{"start":{"line":1568,"column":8},"end":{"line":1568,"column":39}},"480":{"start":{"line":1572,"column":4},"end":{"line":1572,"column":16}},"481":{"start":{"line":1574,"column":4},"end":{"line":1584,"column":5}},"482":{"start":{"line":1575,"column":8},"end":{"line":1575,"column":50}},"483":{"start":{"line":1580,"column":8},"end":{"line":1580,"column":40}},"484":{"start":{"line":1582,"column":8},"end":{"line":1582,"column":22}},"485":{"start":{"line":1583,"column":8},"end":{"line":1583,"column":21}},"486":{"start":{"line":1586,"column":4},"end":{"line":1586,"column":22}},"487":{"start":{"line":1587,"column":4},"end":{"line":1587,"column":28}},"488":{"start":{"line":1591,"column":4},"end":{"line":1617,"column":5}},"489":{"start":{"line":1592,"column":8},"end":{"line":1592,"column":26}},"490":{"start":{"line":1606,"column":8},"end":{"line":1608,"column":10}},"491":{"start":{"line":1607,"column":12},"end":{"line":1607,"column":34}},"492":{"start":{"line":1616,"column":8},"end":{"line":1616,"column":32}},"493":{"start":{"line":1619,"column":4},"end":{"line":1619,"column":26}},"494":{"start":{"line":1984,"column":0},"end":{"line":3960,"column":80}},"495":{"start":{"line":2006,"column":0},"end":{"line":2031,"column":61}},"496":{"start":{"line":2060,"column":0},"end":{"line":2062,"column":2}},"497":{"start":{"line":2061,"column":4},"end":{"line":2061,"column":71}},"498":{"start":{"line":2078,"column":0},"end":{"line":2080,"column":2}},"499":{"start":{"line":2079,"column":4},"end":{"line":2079,"column":33}},"500":{"start":{"line":2089,"column":0},"end":{"line":2091,"column":2}},"501":{"start":{"line":2090,"column":4},"end":{"line":2090,"column":34}},"502":{"start":{"line":2100,"column":0},"end":{"line":2102,"column":2}},"503":{"start":{"line":2101,"column":4},"end":{"line":2101,"column":80}},"504":{"start":{"line":2128,"column":0},"end":{"line":2130,"column":2}},"505":{"start":{"line":2129,"column":4},"end":{"line":2129,"column":36}},"506":{"start":{"line":2139,"column":0},"end":{"line":2141,"column":2}},"507":{"start":{"line":2140,"column":4},"end":{"line":2140,"column":22}},"508":{"start":{"line":2150,"column":0},"end":{"line":2152,"column":2}},"509":{"start":{"line":2151,"column":4},"end":{"line":2151,"column":48}},"510":{"start":{"line":2165,"column":0},"end":{"line":2169,"column":2}},"511":{"start":{"line":2166,"column":4},"end":{"line":2166,"column":21}},"512":{"start":{"line":2167,"column":4},"end":{"line":2168,"column":70}},"513":{"start":{"line":2178,"column":0},"end":{"line":2180,"column":2}},"514":{"start":{"line":2179,"column":4},"end":{"line":2179,"column":38}},"515":{"start":{"line":2189,"column":0},"end":{"line":2191,"column":2}},"516":{"start":{"line":2190,"column":4},"end":{"line":2190,"column":33}},"517":{"start":{"line":2200,"column":0},"end":{"line":2202,"column":2}},"518":{"start":{"line":2201,"column":4},"end":{"line":2201,"column":36}},"519":{"start":{"line":2213,"column":0},"end":{"line":2227,"column":2}},"520":{"start":{"line":2214,"column":4},"end":{"line":2214,"column":22}},"521":{"start":{"line":2216,"column":4},"end":{"line":2226,"column":5}},"522":{"start":{"line":2218,"column":12},"end":{"line":2218,"column":31}},"523":{"start":{"line":2222,"column":12},"end":{"line":2222,"column":25}},"524":{"start":{"line":2225,"column":12},"end":{"line":2225,"column":23}},"525":{"start":{"line":2237,"column":0},"end":{"line":2239,"column":2}},"526":{"start":{"line":2238,"column":4},"end":{"line":2238,"column":32}},"527":{"start":{"line":2258,"column":0},"end":{"line":2262,"column":2}},"528":{"start":{"line":2259,"column":4},"end":{"line":2261,"column":11}},"529":{"start":{"line":2260,"column":8},"end":{"line":2260,"column":54}},"530":{"start":{"line":2272,"column":0},"end":{"line":2280,"column":2}},"531":{"start":{"line":2273,"column":4},"end":{"line":2273,"column":38}},"532":{"start":{"line":2275,"column":4},"end":{"line":2279,"column":5}},"533":{"start":{"line":2276,"column":8},"end":{"line":2276,"column":40}},"534":{"start":{"line":2278,"column":8},"end":{"line":2278,"column":17}},"535":{"start":{"line":2289,"column":0},"end":{"line":2293,"column":2}},"536":{"start":{"line":2290,"column":4},"end":{"line":2290,"column":24}},"537":{"start":{"line":2292,"column":4},"end":{"line":2292,"column":42}},"538":{"start":{"line":2302,"column":0},"end":{"line":2306,"column":2}},"539":{"start":{"line":2303,"column":4},"end":{"line":2303,"column":25}},"540":{"start":{"line":2305,"column":4},"end":{"line":2305,"column":43}},"541":{"start":{"line":2335,"column":0},"end":{"line":2337,"column":2}},"542":{"start":{"line":2336,"column":4},"end":{"line":2336,"column":81}},"543":{"start":{"line":2343,"column":0},"end":{"line":2346,"column":45}},"544":{"start":{"line":2376,"column":0},"end":{"line":2398,"column":1}},"545":{"start":{"line":2377,"column":4},"end":{"line":2377,"column":20}},"546":{"start":{"line":2380,"column":4},"end":{"line":2380,"column":35}},"547":{"start":{"line":2382,"column":4},"end":{"line":2395,"column":5}},"548":{"start":{"line":2384,"column":8},"end":{"line":2394,"column":9}},"549":{"start":{"line":2385,"column":12},"end":{"line":2385,"column":56}},"550":{"start":{"line":2387,"column":12},"end":{"line":2387,"column":24}},"551":{"start":{"line":2389,"column":12},"end":{"line":2391,"column":13}},"552":{"start":{"line":2390,"column":16},"end":{"line":2390,"column":47}},"553":{"start":{"line":2393,"column":12},"end":{"line":2393,"column":26}},"554":{"start":{"line":2397,"column":4},"end":{"line":2397,"column":19}},"555":{"start":{"line":2400,"column":0},"end":{"line":2400,"column":17}},"556":{"start":{"line":2419,"column":0},"end":{"line":2449,"column":2}},"557":{"start":{"line":2420,"column":4},"end":{"line":2422,"column":21}},"558":{"start":{"line":2424,"column":4},"end":{"line":2431,"column":5}},"559":{"start":{"line":2425,"column":8},"end":{"line":2425,"column":24}},"560":{"start":{"line":2427,"column":8},"end":{"line":2430,"column":9}},"561":{"start":{"line":2428,"column":12},"end":{"line":2428,"column":27}},"562":{"start":{"line":2429,"column":12},"end":{"line":2429,"column":31}},"563":{"start":{"line":2433,"column":4},"end":{"line":2433,"column":19}},"564":{"start":{"line":2435,"column":4},"end":{"line":2437,"column":21}},"565":{"start":{"line":2439,"column":4},"end":{"line":2446,"column":5}},"566":{"start":{"line":2440,"column":8},"end":{"line":2440,"column":24}},"567":{"start":{"line":2442,"column":8},"end":{"line":2445,"column":9}},"568":{"start":{"line":2443,"column":12},"end":{"line":2443,"column":27}},"569":{"start":{"line":2444,"column":12},"end":{"line":2444,"column":31}},"570":{"start":{"line":2448,"column":4},"end":{"line":2448,"column":19}},"571":{"start":{"line":2466,"column":0},"end":{"line":2477,"column":2}},"572":{"start":{"line":2467,"column":4},"end":{"line":2467,"column":55}},"573":{"start":{"line":2468,"column":4},"end":{"line":2468,"column":13}},"574":{"start":{"line":2470,"column":4},"end":{"line":2474,"column":5}},"575":{"start":{"line":2471,"column":8},"end":{"line":2473,"column":9}},"576":{"start":{"line":2472,"column":12},"end":{"line":2472,"column":54}},"577":{"start":{"line":2476,"column":4},"end":{"line":2476,"column":13}},"578":{"start":{"line":2503,"column":0},"end":{"line":2515,"column":2}},"579":{"start":{"line":2504,"column":4},"end":{"line":2506,"column":15}},"580":{"start":{"line":2508,"column":4},"end":{"line":2512,"column":5}},"581":{"start":{"line":2509,"column":8},"end":{"line":2511,"column":9}},"582":{"start":{"line":2510,"column":12},"end":{"line":2510,"column":71}},"583":{"start":{"line":2514,"column":4},"end":{"line":2514,"column":16}},"584":{"start":{"line":2531,"column":0},"end":{"line":2555,"column":2}},"585":{"start":{"line":2532,"column":4},"end":{"line":2532,"column":51}},"586":{"start":{"line":2535,"column":4},"end":{"line":2535,"column":27}},"587":{"start":{"line":2537,"column":4},"end":{"line":2537,"column":22}},"588":{"start":{"line":2538,"column":4},"end":{"line":2538,"column":57}},"589":{"start":{"line":2540,"column":4},"end":{"line":2546,"column":5}},"590":{"start":{"line":2541,"column":8},"end":{"line":2541,"column":20}},"591":{"start":{"line":2543,"column":8},"end":{"line":2545,"column":9}},"592":{"start":{"line":2544,"column":12},"end":{"line":2544,"column":21}},"593":{"start":{"line":2548,"column":4},"end":{"line":2552,"column":5}},"594":{"start":{"line":2549,"column":8},"end":{"line":2551,"column":9}},"595":{"start":{"line":2550,"column":12},"end":{"line":2550,"column":24}},"596":{"start":{"line":2554,"column":4},"end":{"line":2554,"column":14}},"597":{"start":{"line":2576,"column":0},"end":{"line":2578,"column":2}},"598":{"start":{"line":2577,"column":4},"end":{"line":2577,"column":17}},"599":{"start":{"line":2596,"column":0},"end":{"line":2606,"column":2}},"600":{"start":{"line":2597,"column":4},"end":{"line":2597,"column":48}},"601":{"start":{"line":2599,"column":4},"end":{"line":2603,"column":5}},"602":{"start":{"line":2600,"column":8},"end":{"line":2602,"column":9}},"603":{"start":{"line":2601,"column":12},"end":{"line":2601,"column":24}},"604":{"start":{"line":2605,"column":4},"end":{"line":2605,"column":17}},"605":{"start":{"line":2626,"column":0},"end":{"line":2643,"column":2}},"606":{"start":{"line":2627,"column":4},"end":{"line":2627,"column":19}},"607":{"start":{"line":2629,"column":4},"end":{"line":2640,"column":5}},"608":{"start":{"line":2630,"column":8},"end":{"line":2630,"column":19}},"609":{"start":{"line":2631,"column":11},"end":{"line":2640,"column":5}},"610":{"start":{"line":2632,"column":8},"end":{"line":2639,"column":23}},"611":{"start":{"line":2636,"column":12},"end":{"line":2638,"column":13}},"612":{"start":{"line":2637,"column":16},"end":{"line":2637,"column":27}},"613":{"start":{"line":2642,"column":4},"end":{"line":2642,"column":18}},"614":{"start":{"line":2660,"column":0},"end":{"line":2663,"column":1}},"615":{"start":{"line":2661,"column":4},"end":{"line":2661,"column":17}},"616":{"start":{"line":2662,"column":4},"end":{"line":2662,"column":36}},"617":{"start":{"line":2665,"column":0},"end":{"line":2725,"column":2}},"618":{"start":{"line":2680,"column":8},"end":{"line":2680,"column":21}},"619":{"start":{"line":2690,"column":8},"end":{"line":2690,"column":31}},"620":{"start":{"line":2700,"column":8},"end":{"line":2700,"column":29}},"621":{"start":{"line":2711,"column":8},"end":{"line":2711,"column":47}},"622":{"start":{"line":2713,"column":8},"end":{"line":2713,"column":20}},"623":{"start":{"line":2723,"column":8},"end":{"line":2723,"column":30}},"624":{"start":{"line":2727,"column":0},"end":{"line":2727,"column":16}},"625":{"start":{"line":2729,"column":0},"end":{"line":2729,"column":59}},"626":{"start":{"line":2740,"column":0},"end":{"line":2743,"column":31}},"627":{"start":{"line":2769,"column":0},"end":{"line":2785,"column":2}},"628":{"start":{"line":2771,"column":4},"end":{"line":2771,"column":26}},"629":{"start":{"line":2773,"column":4},"end":{"line":2784,"column":6}},"630":{"start":{"line":2774,"column":8},"end":{"line":2776,"column":28}},"631":{"start":{"line":2779,"column":8},"end":{"line":2781,"column":9}},"632":{"start":{"line":2780,"column":12},"end":{"line":2780,"column":57}},"633":{"start":{"line":2783,"column":8},"end":{"line":2783,"column":26}},"634":{"start":{"line":2803,"column":0},"end":{"line":2814,"column":2}},"635":{"start":{"line":2807,"column":4},"end":{"line":2807,"column":27}},"636":{"start":{"line":2813,"column":4},"end":{"line":2813,"column":31}},"637":{"start":{"line":2828,"column":0},"end":{"line":2846,"column":2}},"638":{"start":{"line":2829,"column":4},"end":{"line":2833,"column":12}},"639":{"start":{"line":2835,"column":4},"end":{"line":2843,"column":5}},"640":{"start":{"line":2836,"column":8},"end":{"line":2836,"column":27}},"641":{"start":{"line":2838,"column":8},"end":{"line":2842,"column":9}},"642":{"start":{"line":2839,"column":12},"end":{"line":2841,"column":13}},"643":{"start":{"line":2840,"column":16},"end":{"line":2840,"column":39}},"644":{"start":{"line":2845,"column":4},"end":{"line":2845,"column":18}},"645":{"start":{"line":2882,"column":0},"end":{"line":2990,"column":2}},"646":{"start":{"line":2883,"column":4},"end":{"line":2883,"column":55}},"647":{"start":{"line":2888,"column":4},"end":{"line":2890,"column":5}},"648":{"start":{"line":2889,"column":8},"end":{"line":2889,"column":29}},"649":{"start":{"line":2892,"column":4},"end":{"line":2915,"column":5}},"650":{"start":{"line":2896,"column":8},"end":{"line":2899,"column":9}},"651":{"start":{"line":2897,"column":12},"end":{"line":2898,"column":41}},"652":{"start":{"line":2903,"column":8},"end":{"line":2903,"column":72}},"653":{"start":{"line":2904,"column":8},"end":{"line":2904,"column":72}},"654":{"start":{"line":2909,"column":8},"end":{"line":2911,"column":9}},"655":{"start":{"line":2910,"column":12},"end":{"line":2910,"column":28}},"656":{"start":{"line":2913,"column":8},"end":{"line":2913,"column":24}},"657":{"start":{"line":2914,"column":8},"end":{"line":2914,"column":24}},"658":{"start":{"line":2919,"column":4},"end":{"line":2919,"column":42}},"659":{"start":{"line":2921,"column":4},"end":{"line":2987,"column":5}},"660":{"start":{"line":2922,"column":8},"end":{"line":2956,"column":9}},"661":{"start":{"line":2923,"column":12},"end":{"line":2923,"column":31}},"662":{"start":{"line":2930,"column":12},"end":{"line":2932,"column":13}},"663":{"start":{"line":2931,"column":16},"end":{"line":2931,"column":25}},"664":{"start":{"line":2937,"column":12},"end":{"line":2937,"column":57}},"665":{"start":{"line":2939,"column":12},"end":{"line":2955,"column":13}},"666":{"start":{"line":2949,"column":16},"end":{"line":2949,"column":69}},"667":{"start":{"line":2950,"column":19},"end":{"line":2955,"column":13}},"668":{"start":{"line":2954,"column":16},"end":{"line":2954,"column":36}},"669":{"start":{"line":2958,"column":8},"end":{"line":2979,"column":9}},"670":{"start":{"line":2964,"column":12},"end":{"line":2966,"column":13}},"671":{"start":{"line":2965,"column":16},"end":{"line":2965,"column":25}},"672":{"start":{"line":2971,"column":12},"end":{"line":2971,"column":57}},"673":{"start":{"line":2973,"column":12},"end":{"line":2978,"column":13}},"674":{"start":{"line":2975,"column":16},"end":{"line":2975,"column":69}},"675":{"start":{"line":2976,"column":19},"end":{"line":2978,"column":13}},"676":{"start":{"line":2977,"column":16},"end":{"line":2977,"column":36}},"677":{"start":{"line":2984,"column":8},"end":{"line":2986,"column":9}},"678":{"start":{"line":2985,"column":12},"end":{"line":2985,"column":73}},"679":{"start":{"line":2989,"column":4},"end":{"line":2989,"column":20}},"680":{"start":{"line":3005,"column":0},"end":{"line":3098,"column":2}},"681":{"start":{"line":3027,"column":4},"end":{"line":3027,"column":30}},"682":{"start":{"line":3030,"column":4},"end":{"line":3030,"column":19}},"683":{"start":{"line":3033,"column":4},"end":{"line":3036,"column":6}},"684":{"start":{"line":3034,"column":8},"end":{"line":3034,"column":26}},"685":{"start":{"line":3035,"column":8},"end":{"line":3035,"column":23}},"686":{"start":{"line":3097,"column":4},"end":{"line":3097,"column":42}},"687":{"start":{"line":3109,"column":0},"end":{"line":3109,"column":16}},"688":{"start":{"line":3134,"column":0},"end":{"line":3167,"column":2}},"689":{"start":{"line":3135,"column":4},"end":{"line":3137,"column":5}},"690":{"start":{"line":3136,"column":8},"end":{"line":3136,"column":66}},"691":{"start":{"line":3139,"column":4},"end":{"line":3140,"column":20}},"692":{"start":{"line":3142,"column":4},"end":{"line":3154,"column":5}},"693":{"start":{"line":3143,"column":8},"end":{"line":3147,"column":9}},"694":{"start":{"line":3144,"column":12},"end":{"line":3146,"column":13}},"695":{"start":{"line":3145,"column":16},"end":{"line":3145,"column":31}},"696":{"start":{"line":3149,"column":8},"end":{"line":3153,"column":9}},"697":{"start":{"line":3150,"column":12},"end":{"line":3152,"column":13}},"698":{"start":{"line":3151,"column":16},"end":{"line":3151,"column":31}},"699":{"start":{"line":3156,"column":4},"end":{"line":3164,"column":5}},"700":{"start":{"line":3157,"column":8},"end":{"line":3163,"column":9}},"701":{"start":{"line":3158,"column":12},"end":{"line":3158,"column":31}},"702":{"start":{"line":3160,"column":12},"end":{"line":3162,"column":13}},"703":{"start":{"line":3161,"column":16},"end":{"line":3161,"column":31}},"704":{"start":{"line":3166,"column":4},"end":{"line":3166,"column":16}},"705":{"start":{"line":3186,"column":0},"end":{"line":3197,"column":2}},"706":{"start":{"line":3187,"column":4},"end":{"line":3190,"column":20}},"707":{"start":{"line":3192,"column":4},"end":{"line":3194,"column":5}},"708":{"start":{"line":3193,"column":8},"end":{"line":3193,"column":34}},"709":{"start":{"line":3196,"column":4},"end":{"line":3196,"column":18}},"710":{"start":{"line":3207,"column":0},"end":{"line":3213,"column":2}},"711":{"start":{"line":3208,"column":4},"end":{"line":3212,"column":5}},"712":{"start":{"line":3209,"column":8},"end":{"line":3209,"column":34}},"713":{"start":{"line":3211,"column":8},"end":{"line":3211,"column":17}},"714":{"start":{"line":3225,"column":0},"end":{"line":3227,"column":2}},"715":{"start":{"line":3226,"column":4},"end":{"line":3226,"column":54}},"716":{"start":{"line":3249,"column":0},"end":{"line":3259,"column":2}},"717":{"start":{"line":3250,"column":4},"end":{"line":3250,"column":12}},"718":{"start":{"line":3252,"column":4},"end":{"line":3256,"column":5}},"719":{"start":{"line":3253,"column":8},"end":{"line":3255,"column":9}},"720":{"start":{"line":3254,"column":12},"end":{"line":3254,"column":54}},"721":{"start":{"line":3258,"column":4},"end":{"line":3258,"column":13}},"722":{"start":{"line":3281,"column":0},"end":{"line":3293,"column":2}},"723":{"start":{"line":3282,"column":4},"end":{"line":3282,"column":12}},"724":{"start":{"line":3284,"column":4},"end":{"line":3290,"column":5}},"725":{"start":{"line":3285,"column":8},"end":{"line":3289,"column":9}},"726":{"start":{"line":3286,"column":12},"end":{"line":3288,"column":13}},"727":{"start":{"line":3287,"column":16},"end":{"line":3287,"column":28}},"728":{"start":{"line":3292,"column":4},"end":{"line":3292,"column":17}},"729":{"start":{"line":3308,"column":0},"end":{"line":3322,"column":2}},"730":{"start":{"line":3309,"column":4},"end":{"line":3311,"column":5}},"731":{"start":{"line":3310,"column":8},"end":{"line":3310,"column":25}},"732":{"start":{"line":3313,"column":4},"end":{"line":3315,"column":21}},"733":{"start":{"line":3317,"column":4},"end":{"line":3319,"column":5}},"734":{"start":{"line":3318,"column":8},"end":{"line":3318,"column":20}},"735":{"start":{"line":3321,"column":4},"end":{"line":3321,"column":13}},"736":{"start":{"line":3338,"column":0},"end":{"line":3357,"column":2}},"737":{"start":{"line":3339,"column":4},"end":{"line":3342,"column":16}},"738":{"start":{"line":3344,"column":4},"end":{"line":3354,"column":5}},"739":{"start":{"line":3345,"column":8},"end":{"line":3347,"column":9}},"740":{"start":{"line":3346,"column":12},"end":{"line":3346,"column":28}},"741":{"start":{"line":3349,"column":8},"end":{"line":3353,"column":9}},"742":{"start":{"line":3350,"column":12},"end":{"line":3350,"column":28}},"743":{"start":{"line":3352,"column":12},"end":{"line":3352,"column":29}},"744":{"start":{"line":3356,"column":4},"end":{"line":3356,"column":13}},"745":{"start":{"line":3368,"column":0},"end":{"line":3370,"column":2}},"746":{"start":{"line":3369,"column":4},"end":{"line":3369,"column":39}},"747":{"start":{"line":3404,"column":0},"end":{"line":3860,"column":2}},"748":{"start":{"line":3406,"column":4},"end":{"line":3642,"column":6}},"749":{"start":{"line":3407,"column":12},"end":{"line":3407,"column":22}},"750":{"start":{"line":3408,"column":12},"end":{"line":3410,"column":16}},"751":{"start":{"line":3409,"column":16},"end":{"line":3409,"column":46}},"752":{"start":{"line":3650,"column":4},"end":{"line":3650,"column":21}},"753":{"start":{"line":3653,"column":4},"end":{"line":3653,"column":67}},"754":{"start":{"line":3655,"column":4},"end":{"line":3835,"column":5}},"755":{"start":{"line":3657,"column":8},"end":{"line":3669,"column":9}},"756":{"start":{"line":3658,"column":12},"end":{"line":3658,"column":29}},"757":{"start":{"line":3659,"column":15},"end":{"line":3669,"column":9}},"758":{"start":{"line":3660,"column":12},"end":{"line":3660,"column":31}},"759":{"start":{"line":3661,"column":15},"end":{"line":3669,"column":9}},"760":{"start":{"line":3662,"column":12},"end":{"line":3662,"column":29}},"761":{"start":{"line":3663,"column":15},"end":{"line":3669,"column":9}},"762":{"start":{"line":3664,"column":12},"end":{"line":3664,"column":28}},"763":{"start":{"line":3665,"column":15},"end":{"line":3669,"column":9}},"764":{"start":{"line":3666,"column":12},"end":{"line":3666,"column":27}},"765":{"start":{"line":3667,"column":15},"end":{"line":3669,"column":9}},"766":{"start":{"line":3668,"column":12},"end":{"line":3668,"column":27}},"767":{"start":{"line":3672,"column":8},"end":{"line":3674,"column":9}},"768":{"start":{"line":3673,"column":12},"end":{"line":3673,"column":25}},"769":{"start":{"line":3675,"column":8},"end":{"line":3677,"column":9}},"770":{"start":{"line":3676,"column":12},"end":{"line":3676,"column":33}},"771":{"start":{"line":3678,"column":8},"end":{"line":3680,"column":9}},"772":{"start":{"line":3679,"column":12},"end":{"line":3679,"column":31}},"773":{"start":{"line":3682,"column":8},"end":{"line":3682,"column":46}},"774":{"start":{"line":3683,"column":8},"end":{"line":3769,"column":9}},"775":{"start":{"line":3684,"column":12},"end":{"line":3684,"column":39}},"776":{"start":{"line":3685,"column":12},"end":{"line":3685,"column":32}},"777":{"start":{"line":3687,"column":12},"end":{"line":3692,"column":13}},"778":{"start":{"line":3688,"column":16},"end":{"line":3688,"column":52}},"779":{"start":{"line":3689,"column":16},"end":{"line":3691,"column":17}},"780":{"start":{"line":3690,"column":20},"end":{"line":3690,"column":50}},"781":{"start":{"line":3695,"column":12},"end":{"line":3746,"column":13}},"782":{"start":{"line":3696,"column":16},"end":{"line":3696,"column":35}},"783":{"start":{"line":3698,"column":16},"end":{"line":3698,"column":44}},"784":{"start":{"line":3699,"column":16},"end":{"line":3701,"column":17}},"785":{"start":{"line":3700,"column":20},"end":{"line":3700,"column":58}},"786":{"start":{"line":3702,"column":16},"end":{"line":3702,"column":26}},"787":{"start":{"line":3703,"column":16},"end":{"line":3703,"column":29}},"788":{"start":{"line":3704,"column":16},"end":{"line":3704,"column":47}},"789":{"start":{"line":3706,"column":16},"end":{"line":3706,"column":49}},"790":{"start":{"line":3707,"column":16},"end":{"line":3709,"column":17}},"791":{"start":{"line":3708,"column":20},"end":{"line":3708,"column":50}},"792":{"start":{"line":3711,"column":16},"end":{"line":3711,"column":59}},"793":{"start":{"line":3712,"column":16},"end":{"line":3715,"column":17}},"794":{"start":{"line":3714,"column":20},"end":{"line":3714,"column":36}},"795":{"start":{"line":3716,"column":16},"end":{"line":3722,"column":17}},"796":{"start":{"line":3717,"column":20},"end":{"line":3717,"column":39}},"797":{"start":{"line":3718,"column":20},"end":{"line":3718,"column":53}},"798":{"start":{"line":3719,"column":20},"end":{"line":3721,"column":21}},"799":{"start":{"line":3720,"column":24},"end":{"line":3720,"column":50}},"800":{"start":{"line":3723,"column":16},"end":{"line":3732,"column":17}},"801":{"start":{"line":3724,"column":20},"end":{"line":3726,"column":21}},"802":{"start":{"line":3725,"column":24},"end":{"line":3725,"column":45}},"803":{"start":{"line":3727,"column":20},"end":{"line":3727,"column":54}},"804":{"start":{"line":3728,"column":20},"end":{"line":3730,"column":21}},"805":{"start":{"line":3729,"column":24},"end":{"line":3729,"column":52}},"806":{"start":{"line":3733,"column":16},"end":{"line":3745,"column":17}},"807":{"start":{"line":3734,"column":20},"end":{"line":3734,"column":51}},"808":{"start":{"line":3735,"column":20},"end":{"line":3737,"column":21}},"809":{"start":{"line":3736,"column":24},"end":{"line":3736,"column":49}},"810":{"start":{"line":3738,"column":20},"end":{"line":3741,"column":21}},"811":{"start":{"line":3739,"column":24},"end":{"line":3739,"column":41}},"812":{"start":{"line":3740,"column":24},"end":{"line":3740,"column":41}},"813":{"start":{"line":3742,"column":20},"end":{"line":3744,"column":21}},"814":{"start":{"line":3743,"column":24},"end":{"line":3743,"column":39}},"815":{"start":{"line":3748,"column":12},"end":{"line":3748,"column":44}},"816":{"start":{"line":3750,"column":12},"end":{"line":3768,"column":13}},"817":{"start":{"line":3752,"column":16},"end":{"line":3752,"column":42}},"818":{"start":{"line":3754,"column":16},"end":{"line":3754,"column":62}},"819":{"start":{"line":3756,"column":16},"end":{"line":3767,"column":17}},"820":{"start":{"line":3757,"column":20},"end":{"line":3757,"column":47}},"821":{"start":{"line":3758,"column":20},"end":{"line":3758,"column":33}},"822":{"start":{"line":3759,"column":20},"end":{"line":3761,"column":21}},"823":{"start":{"line":3760,"column":24},"end":{"line":3760,"column":44}},"824":{"start":{"line":3763,"column":20},"end":{"line":3763,"column":55}},"825":{"start":{"line":3764,"column":20},"end":{"line":3766,"column":21}},"826":{"start":{"line":3765,"column":24},"end":{"line":3765,"column":37}},"827":{"start":{"line":3771,"column":8},"end":{"line":3771,"column":43}},"828":{"start":{"line":3772,"column":8},"end":{"line":3788,"column":9}},"829":{"start":{"line":3774,"column":12},"end":{"line":3774,"column":27}},"830":{"start":{"line":3775,"column":12},"end":{"line":3775,"column":39}},"831":{"start":{"line":3777,"column":12},"end":{"line":3777,"column":47}},"832":{"start":{"line":3778,"column":12},"end":{"line":3780,"column":13}},"833":{"start":{"line":3779,"column":16},"end":{"line":3779,"column":43}},"834":{"start":{"line":3781,"column":12},"end":{"line":3781,"column":49}},"835":{"start":{"line":3782,"column":12},"end":{"line":3784,"column":13}},"836":{"start":{"line":3783,"column":16},"end":{"line":3783,"column":43}},"837":{"start":{"line":3785,"column":12},"end":{"line":3787,"column":13}},"838":{"start":{"line":3786,"column":16},"end":{"line":3786,"column":36}},"839":{"start":{"line":3790,"column":8},"end":{"line":3834,"column":9}},"840":{"start":{"line":3792,"column":12},"end":{"line":3833,"column":13}},"841":{"start":{"line":3793,"column":16},"end":{"line":3793,"column":52}},"842":{"start":{"line":3794,"column":16},"end":{"line":3796,"column":17}},"843":{"start":{"line":3795,"column":20},"end":{"line":3795,"column":46}},"844":{"start":{"line":3797,"column":16},"end":{"line":3797,"column":50}},"845":{"start":{"line":3798,"column":16},"end":{"line":3800,"column":17}},"846":{"start":{"line":3799,"column":20},"end":{"line":3799,"column":46}},"847":{"start":{"line":3802,"column":16},"end":{"line":3808,"column":17}},"848":{"start":{"line":3803,"column":20},"end":{"line":3803,"column":39}},"849":{"start":{"line":3804,"column":20},"end":{"line":3804,"column":77}},"850":{"start":{"line":3805,"column":20},"end":{"line":3807,"column":21}},"851":{"start":{"line":3806,"column":24},"end":{"line":3806,"column":50}},"852":{"start":{"line":3809,"column":16},"end":{"line":3809,"column":48}},"853":{"start":{"line":3811,"column":16},"end":{"line":3813,"column":17}},"854":{"start":{"line":3812,"column":20},"end":{"line":3812,"column":36}},"855":{"start":{"line":3815,"column":16},"end":{"line":3815,"column":69}},"856":{"start":{"line":3817,"column":16},"end":{"line":3832,"column":17}},"857":{"start":{"line":3818,"column":20},"end":{"line":3818,"column":51}},"858":{"start":{"line":3820,"column":20},"end":{"line":3820,"column":52}},"859":{"start":{"line":3822,"column":20},"end":{"line":3831,"column":21}},"860":{"start":{"line":3823,"column":24},"end":{"line":3823,"column":36}},"861":{"start":{"line":3824,"column":24},"end":{"line":3824,"column":54}},"862":{"start":{"line":3825,"column":24},"end":{"line":3830,"column":25}},"863":{"start":{"line":3826,"column":28},"end":{"line":3826,"column":54}},"864":{"start":{"line":3827,"column":28},"end":{"line":3829,"column":29}},"865":{"start":{"line":3828,"column":32},"end":{"line":3828,"column":50}},"866":{"start":{"line":3839,"column":4},"end":{"line":3841,"column":5}},"867":{"start":{"line":3840,"column":8},"end":{"line":3840,"column":114}},"868":{"start":{"line":3844,"column":4},"end":{"line":3857,"column":5}},"869":{"start":{"line":3846,"column":8},"end":{"line":3853,"column":9}},"870":{"start":{"line":3848,"column":12},"end":{"line":3852,"column":13}},"871":{"start":{"line":3850,"column":16},"end":{"line":3850,"column":40}},"872":{"start":{"line":3851,"column":16},"end":{"line":3851,"column":60}},"873":{"start":{"line":3855,"column":8},"end":{"line":3855,"column":23}},"874":{"start":{"line":3859,"column":4},"end":{"line":3859,"column":13}},"875":{"start":{"line":3863,"column":0},"end":{"line":3863,"column":39}},"876":{"start":{"line":3885,"column":0},"end":{"line":3913,"column":2}},"877":{"start":{"line":3886,"column":4},"end":{"line":3886,"column":45}},"878":{"start":{"line":3888,"column":4},"end":{"line":3890,"column":5}},"879":{"start":{"line":3889,"column":8},"end":{"line":3889,"column":17}},"880":{"start":{"line":3892,"column":4},"end":{"line":3892,"column":33}},"881":{"start":{"line":3893,"column":4},"end":{"line":3893,"column":33}},"882":{"start":{"line":3895,"column":4},"end":{"line":3910,"column":5}},"883":{"start":{"line":3896,"column":8},"end":{"line":3896,"column":40}},"884":{"start":{"line":3897,"column":8},"end":{"line":3897,"column":40}},"885":{"start":{"line":3900,"column":8},"end":{"line":3900,"column":36}},"886":{"start":{"line":3901,"column":8},"end":{"line":3901,"column":36}},"887":{"start":{"line":3903,"column":8},"end":{"line":3905,"column":9}},"888":{"start":{"line":3904,"column":12},"end":{"line":3904,"column":22}},"889":{"start":{"line":3907,"column":8},"end":{"line":3909,"column":9}},"890":{"start":{"line":3908,"column":12},"end":{"line":3908,"column":21}},"891":{"start":{"line":3912,"column":4},"end":{"line":3912,"column":13}},"892":{"start":{"line":3914,"column":0},"end":{"line":3957,"column":2}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":0},"end":{"line":12,"column":0}},{"start":{"line":12,"column":0},"end":{"line":12,"column":0}}]},"2":{"line":65,"type":"binary-expr","locations":[{"start":{"line":65,"column":24},"end":{"line":65,"column":25}},{"start":{"line":65,"column":29},"end":{"line":65,"column":45}},{"start":{"line":65,"column":50},"end":{"line":65,"column":67}}]},"3":{"line":67,"type":"binary-expr","locations":[{"start":{"line":67,"column":21},"end":{"line":67,"column":54}},{"start":{"line":67,"column":59},"end":{"line":67,"column":69}}]},"4":{"line":69,"type":"if","locations":[{"start":{"line":69,"column":8},"end":{"line":69,"column":8}},{"start":{"line":69,"column":8},"end":{"line":69,"column":8}}]},"5":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":12},"end":{"line":100,"column":12}},{"start":{"line":100,"column":12},"end":{"line":100,"column":12}}]},"6":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":12},"end":{"line":129,"column":12}},{"start":{"line":129,"column":12},"end":{"line":129,"column":12}}]},"7":{"line":134,"type":"if","locations":[{"start":{"line":134,"column":12},"end":{"line":134,"column":12}},{"start":{"line":134,"column":12},"end":{"line":134,"column":12}}]},"8":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":8},"end":{"line":139,"column":8}},{"start":{"line":139,"column":8},"end":{"line":139,"column":8}}]},"9":{"line":175,"type":"cond-expr","locations":[{"start":{"line":175,"column":25},"end":{"line":175,"column":31}},{"start":{"line":175,"column":34},"end":{"line":175,"column":38}}]},"10":{"line":176,"type":"cond-expr","locations":[{"start":{"line":176,"column":25},"end":{"line":176,"column":37}},{"start":{"line":176,"column":40},"end":{"line":176,"column":44}}]},"11":{"line":177,"type":"binary-expr","locations":[{"start":{"line":177,"column":16},"end":{"line":177,"column":19}},{"start":{"line":177,"column":23},"end":{"line":177,"column":42}}]},"12":{"line":178,"type":"binary-expr","locations":[{"start":{"line":178,"column":19},"end":{"line":178,"column":24}},{"start":{"line":178,"column":28},"end":{"line":178,"column":43}}]},"13":{"line":182,"type":"if","locations":[{"start":{"line":182,"column":12},"end":{"line":182,"column":12}},{"start":{"line":182,"column":12},"end":{"line":182,"column":12}}]},"14":{"line":182,"type":"binary-expr","locations":[{"start":{"line":182,"column":16},"end":{"line":182,"column":18}},{"start":{"line":182,"column":22},"end":{"line":182,"column":41}}]},"15":{"line":184,"type":"if","locations":[{"start":{"line":184,"column":19},"end":{"line":184,"column":19}},{"start":{"line":184,"column":19},"end":{"line":184,"column":19}}]},"16":{"line":184,"type":"binary-expr","locations":[{"start":{"line":184,"column":23},"end":{"line":184,"column":25}},{"start":{"line":184,"column":29},"end":{"line":184,"column":43}}]},"17":{"line":189,"type":"if","locations":[{"start":{"line":189,"column":12},"end":{"line":189,"column":12}},{"start":{"line":189,"column":12},"end":{"line":189,"column":12}}]},"18":{"line":189,"type":"binary-expr","locations":[{"start":{"line":189,"column":16},"end":{"line":189,"column":18}},{"start":{"line":189,"column":22},"end":{"line":189,"column":44}}]},"19":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":19},"end":{"line":194,"column":19}},{"start":{"line":194,"column":19},"end":{"line":194,"column":19}}]},"20":{"line":194,"type":"binary-expr","locations":[{"start":{"line":194,"column":23},"end":{"line":194,"column":25}},{"start":{"line":194,"column":29},"end":{"line":194,"column":43}}]},"21":{"line":200,"type":"if","locations":[{"start":{"line":200,"column":12},"end":{"line":200,"column":12}},{"start":{"line":200,"column":12},"end":{"line":200,"column":12}}]},"22":{"line":207,"type":"if","locations":[{"start":{"line":207,"column":12},"end":{"line":207,"column":12}},{"start":{"line":207,"column":12},"end":{"line":207,"column":12}}]},"23":{"line":217,"type":"if","locations":[{"start":{"line":217,"column":12},"end":{"line":217,"column":12}},{"start":{"line":217,"column":12},"end":{"line":217,"column":12}}]},"24":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":12},"end":{"line":228,"column":12}},{"start":{"line":228,"column":12},"end":{"line":228,"column":12}}]},"25":{"line":228,"type":"binary-expr","locations":[{"start":{"line":228,"column":16},"end":{"line":228,"column":20}},{"start":{"line":228,"column":24},"end":{"line":228,"column":35}}]},"26":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":16},"end":{"line":238,"column":16}},{"start":{"line":238,"column":16},"end":{"line":238,"column":16}}]},"27":{"line":248,"type":"if","locations":[{"start":{"line":248,"column":0},"end":{"line":248,"column":0}},{"start":{"line":248,"column":0},"end":{"line":248,"column":0}}]},"28":{"line":248,"type":"binary-expr","locations":[{"start":{"line":248,"column":4},"end":{"line":248,"column":9}},{"start":{"line":248,"column":13},"end":{"line":248,"column":46}}]},"29":{"line":249,"type":"if","locations":[{"start":{"line":249,"column":4},"end":{"line":249,"column":4}},{"start":{"line":249,"column":4},"end":{"line":249,"column":4}}]},"30":{"line":256,"type":"if","locations":[{"start":{"line":256,"column":0},"end":{"line":256,"column":0}},{"start":{"line":256,"column":0},"end":{"line":256,"column":0}}]},"31":{"line":272,"type":"binary-expr","locations":[{"start":{"line":272,"column":12},"end":{"line":272,"column":13}},{"start":{"line":272,"column":17},"end":{"line":272,"column":21}}]},"32":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":12},"end":{"line":284,"column":12}},{"start":{"line":284,"column":12},"end":{"line":284,"column":12}}]},"33":{"line":286,"type":"if","locations":[{"start":{"line":286,"column":16},"end":{"line":286,"column":16}},{"start":{"line":286,"column":16},"end":{"line":286,"column":16}}]},"34":{"line":286,"type":"binary-expr","locations":[{"start":{"line":286,"column":20},"end":{"line":286,"column":24}},{"start":{"line":286,"column":28},"end":{"line":286,"column":45}}]},"35":{"line":288,"type":"if","locations":[{"start":{"line":288,"column":23},"end":{"line":288,"column":23}},{"start":{"line":288,"column":23},"end":{"line":288,"column":23}}]},"36":{"line":288,"type":"binary-expr","locations":[{"start":{"line":288,"column":27},"end":{"line":288,"column":34}},{"start":{"line":288,"column":38},"end":{"line":288,"column":55}}]},"37":{"line":290,"type":"if","locations":[{"start":{"line":290,"column":23},"end":{"line":290,"column":23}},{"start":{"line":290,"column":23},"end":{"line":290,"column":23}}]},"38":{"line":290,"type":"binary-expr","locations":[{"start":{"line":290,"column":27},"end":{"line":290,"column":33}},{"start":{"line":290,"column":37},"end":{"line":290,"column":53}}]},"39":{"line":292,"type":"if","locations":[{"start":{"line":292,"column":23},"end":{"line":292,"column":23}},{"start":{"line":292,"column":23},"end":{"line":292,"column":23}}]},"40":{"line":293,"type":"binary-expr","locations":[{"start":{"line":293,"column":36},"end":{"line":293,"column":40}},{"start":{"line":293,"column":44},"end":{"line":293,"column":62}},{"start":{"line":293,"column":67},"end":{"line":293,"column":71}}]},"41":{"line":294,"type":"cond-expr","locations":[{"start":{"line":294,"column":48},"end":{"line":294,"column":69}},{"start":{"line":294,"column":72},"end":{"line":294,"column":76}}]},"42":{"line":295,"type":"if","locations":[{"start":{"line":295,"column":23},"end":{"line":295,"column":23}},{"start":{"line":295,"column":23},"end":{"line":295,"column":23}}]},"43":{"line":303,"type":"if","locations":[{"start":{"line":303,"column":8},"end":{"line":303,"column":8}},{"start":{"line":303,"column":8},"end":{"line":303,"column":8}}]},"44":{"line":345,"type":"if","locations":[{"start":{"line":345,"column":8},"end":{"line":345,"column":8}},{"start":{"line":345,"column":8},"end":{"line":345,"column":8}}]},"45":{"line":396,"type":"if","locations":[{"start":{"line":396,"column":20},"end":{"line":396,"column":20}},{"start":{"line":396,"column":20},"end":{"line":396,"column":20}}]},"46":{"line":397,"type":"binary-expr","locations":[{"start":{"line":397,"column":31},"end":{"line":397,"column":49}},{"start":{"line":397,"column":53},"end":{"line":397,"column":88}}]},"47":{"line":405,"type":"if","locations":[{"start":{"line":405,"column":24},"end":{"line":405,"column":24}},{"start":{"line":405,"column":24},"end":{"line":405,"column":24}}]},"48":{"line":415,"type":"binary-expr","locations":[{"start":{"line":415,"column":25},"end":{"line":415,"column":30}},{"start":{"line":415,"column":34},"end":{"line":415,"column":47}},{"start":{"line":416,"column":24},"end":{"line":435,"column":25}}]},"49":{"line":417,"type":"binary-expr","locations":[{"start":{"line":417,"column":41},"end":{"line":417,"column":44}},{"start":{"line":417,"column":48},"end":{"line":417,"column":82}},{"start":{"line":417,"column":87},"end":{"line":417,"column":89}}]},"50":{"line":423,"type":"if","locations":[{"start":{"line":423,"column":32},"end":{"line":423,"column":32}},{"start":{"line":423,"column":32},"end":{"line":423,"column":32}}]},"51":{"line":425,"type":"if","locations":[{"start":{"line":425,"column":36},"end":{"line":425,"column":36}},{"start":{"line":425,"column":36},"end":{"line":425,"column":36}}]},"52":{"line":443,"type":"if","locations":[{"start":{"line":443,"column":12},"end":{"line":443,"column":12}},{"start":{"line":443,"column":12},"end":{"line":443,"column":12}}]},"53":{"line":443,"type":"binary-expr","locations":[{"start":{"line":443,"column":16},"end":{"line":443,"column":21}},{"start":{"line":443,"column":25},"end":{"line":443,"column":34}}]},"54":{"line":447,"type":"if","locations":[{"start":{"line":447,"column":19},"end":{"line":447,"column":19}},{"start":{"line":447,"column":19},"end":{"line":447,"column":19}}]},"55":{"line":454,"type":"if","locations":[{"start":{"line":454,"column":20},"end":{"line":454,"column":20}},{"start":{"line":454,"column":20},"end":{"line":454,"column":20}}]},"56":{"line":470,"type":"binary-expr","locations":[{"start":{"line":470,"column":19},"end":{"line":470,"column":27}},{"start":{"line":470,"column":31},"end":{"line":481,"column":9}}]},"57":{"line":484,"type":"if","locations":[{"start":{"line":484,"column":8},"end":{"line":484,"column":8}},{"start":{"line":484,"column":8},"end":{"line":484,"column":8}}]},"58":{"line":484,"type":"binary-expr","locations":[{"start":{"line":484,"column":12},"end":{"line":484,"column":15}},{"start":{"line":484,"column":19},"end":{"line":484,"column":52}}]},"59":{"line":488,"type":"if","locations":[{"start":{"line":488,"column":12},"end":{"line":488,"column":12}},{"start":{"line":488,"column":12},"end":{"line":488,"column":12}}]},"60":{"line":493,"type":"if","locations":[{"start":{"line":493,"column":15},"end":{"line":493,"column":15}},{"start":{"line":493,"column":15},"end":{"line":493,"column":15}}]},"61":{"line":493,"type":"binary-expr","locations":[{"start":{"line":493,"column":19},"end":{"line":493,"column":22}},{"start":{"line":493,"column":26},"end":{"line":493,"column":58}},{"start":{"line":493,"column":62},"end":{"line":493,"column":81}}]},"62":{"line":497,"type":"binary-expr","locations":[{"start":{"line":497,"column":24},"end":{"line":497,"column":37}},{"start":{"line":497,"column":41},"end":{"line":497,"column":48}}]},"63":{"line":499,"type":"binary-expr","locations":[{"start":{"line":499,"column":24},"end":{"line":499,"column":39}},{"start":{"line":499,"column":43},"end":{"line":499,"column":72}}]},"64":{"line":501,"type":"if","locations":[{"start":{"line":501,"column":8},"end":{"line":501,"column":8}},{"start":{"line":501,"column":8},"end":{"line":501,"column":8}}]},"65":{"line":501,"type":"binary-expr","locations":[{"start":{"line":501,"column":12},"end":{"line":501,"column":19}},{"start":{"line":501,"column":24},"end":{"line":501,"column":53}}]},"66":{"line":504,"type":"cond-expr","locations":[{"start":{"line":504,"column":28},"end":{"line":504,"column":40}},{"start":{"line":504,"column":43},"end":{"line":504,"column":49}}]},"67":{"line":505,"type":"binary-expr","locations":[{"start":{"line":505,"column":30},"end":{"line":505,"column":51}},{"start":{"line":505,"column":55},"end":{"line":505,"column":87}}]},"68":{"line":520,"type":"binary-expr","locations":[{"start":{"line":520,"column":21},"end":{"line":520,"column":34}},{"start":{"line":520,"column":38},"end":{"line":520,"column":61}}]},"69":{"line":523,"type":"if","locations":[{"start":{"line":523,"column":12},"end":{"line":523,"column":12}},{"start":{"line":523,"column":12},"end":{"line":523,"column":12}}]},"70":{"line":531,"type":"if","locations":[{"start":{"line":531,"column":8},"end":{"line":531,"column":8}},{"start":{"line":531,"column":8},"end":{"line":531,"column":8}}]},"71":{"line":550,"type":"if","locations":[{"start":{"line":550,"column":8},"end":{"line":550,"column":8}},{"start":{"line":550,"column":8},"end":{"line":550,"column":8}}]},"72":{"line":556,"type":"if","locations":[{"start":{"line":556,"column":8},"end":{"line":556,"column":8}},{"start":{"line":556,"column":8},"end":{"line":556,"column":8}}]},"73":{"line":561,"type":"if","locations":[{"start":{"line":561,"column":16},"end":{"line":561,"column":16}},{"start":{"line":561,"column":16},"end":{"line":561,"column":16}}]},"74":{"line":565,"type":"binary-expr","locations":[{"start":{"line":565,"column":19},"end":{"line":565,"column":20}},{"start":{"line":565,"column":24},"end":{"line":565,"column":47}}]},"75":{"line":619,"type":"binary-expr","locations":[{"start":{"line":619,"column":18},"end":{"line":619,"column":25}},{"start":{"line":619,"column":29},"end":{"line":619,"column":31}}]},"76":{"line":633,"type":"binary-expr","locations":[{"start":{"line":633,"column":28},"end":{"line":633,"column":45}},{"start":{"line":633,"column":49},"end":{"line":633,"column":51}}]},"77":{"line":637,"type":"if","locations":[{"start":{"line":637,"column":12},"end":{"line":637,"column":12}},{"start":{"line":637,"column":12},"end":{"line":637,"column":12}}]},"78":{"line":639,"type":"if","locations":[{"start":{"line":639,"column":16},"end":{"line":639,"column":16}},{"start":{"line":639,"column":16},"end":{"line":639,"column":16}}]},"79":{"line":642,"type":"if","locations":[{"start":{"line":642,"column":20},"end":{"line":642,"column":20}},{"start":{"line":642,"column":20},"end":{"line":642,"column":20}}]},"80":{"line":644,"type":"if","locations":[{"start":{"line":644,"column":24},"end":{"line":644,"column":24}},{"start":{"line":644,"column":24},"end":{"line":644,"column":24}}]},"81":{"line":644,"type":"binary-expr","locations":[{"start":{"line":644,"column":28},"end":{"line":644,"column":36}},{"start":{"line":644,"column":40},"end":{"line":644,"column":52}}]},"82":{"line":686,"type":"if","locations":[{"start":{"line":686,"column":12},"end":{"line":686,"column":12}},{"start":{"line":686,"column":12},"end":{"line":686,"column":12}}]},"83":{"line":686,"type":"binary-expr","locations":[{"start":{"line":686,"column":16},"end":{"line":686,"column":22}},{"start":{"line":686,"column":26},"end":{"line":686,"column":49}}]},"84":{"line":688,"type":"if","locations":[{"start":{"line":688,"column":20},"end":{"line":688,"column":20}},{"start":{"line":688,"column":20},"end":{"line":688,"column":20}}]},"85":{"line":690,"type":"binary-expr","locations":[{"start":{"line":690,"column":29},"end":{"line":690,"column":32}},{"start":{"line":690,"column":38},"end":{"line":690,"column":44}},{"start":{"line":690,"column":48},"end":{"line":690,"column":60}},{"start":{"line":690,"column":66},"end":{"line":690,"column":74}},{"start":{"line":690,"column":78},"end":{"line":690,"column":89}}]},"86":{"line":691,"type":"if","locations":[{"start":{"line":691,"column":24},"end":{"line":691,"column":24}},{"start":{"line":691,"column":24},"end":{"line":691,"column":24}}]},"87":{"line":702,"type":"if","locations":[{"start":{"line":702,"column":12},"end":{"line":702,"column":12}},{"start":{"line":702,"column":12},"end":{"line":702,"column":12}}]},"88":{"line":706,"type":"if","locations":[{"start":{"line":706,"column":16},"end":{"line":706,"column":16}},{"start":{"line":706,"column":16},"end":{"line":706,"column":16}}]},"89":{"line":706,"type":"binary-expr","locations":[{"start":{"line":706,"column":20},"end":{"line":706,"column":27}},{"start":{"line":706,"column":31},"end":{"line":706,"column":44}},{"start":{"line":706,"column":48},"end":{"line":706,"column":52}}]},"90":{"line":710,"type":"if","locations":[{"start":{"line":710,"column":16},"end":{"line":710,"column":16}},{"start":{"line":710,"column":16},"end":{"line":710,"column":16}}]},"91":{"line":711,"type":"binary-expr","locations":[{"start":{"line":711,"column":30},"end":{"line":711,"column":36}},{"start":{"line":711,"column":40},"end":{"line":711,"column":66}}]},"92":{"line":712,"type":"if","locations":[{"start":{"line":712,"column":20},"end":{"line":712,"column":20}},{"start":{"line":712,"column":20},"end":{"line":712,"column":20}}]},"93":{"line":720,"type":"if","locations":[{"start":{"line":720,"column":20},"end":{"line":720,"column":20}},{"start":{"line":720,"column":20},"end":{"line":720,"column":20}}]},"94":{"line":720,"type":"binary-expr","locations":[{"start":{"line":720,"column":24},"end":{"line":720,"column":29}},{"start":{"line":720,"column":33},"end":{"line":720,"column":37}}]},"95":{"line":721,"type":"if","locations":[{"start":{"line":721,"column":24},"end":{"line":721,"column":24}},{"start":{"line":721,"column":24},"end":{"line":721,"column":24}}]},"96":{"line":721,"type":"binary-expr","locations":[{"start":{"line":721,"column":29},"end":{"line":721,"column":57}},{"start":{"line":721,"column":63},"end":{"line":721,"column":89}}]},"97":{"line":732,"type":"if","locations":[{"start":{"line":732,"column":24},"end":{"line":732,"column":24}},{"start":{"line":732,"column":24},"end":{"line":732,"column":24}}]},"98":{"line":744,"type":"if","locations":[{"start":{"line":744,"column":20},"end":{"line":744,"column":20}},{"start":{"line":744,"column":20},"end":{"line":744,"column":20}}]},"99":{"line":744,"type":"binary-expr","locations":[{"start":{"line":744,"column":24},"end":{"line":744,"column":30}},{"start":{"line":744,"column":34},"end":{"line":744,"column":62}}]},"100":{"line":753,"type":"if","locations":[{"start":{"line":753,"column":20},"end":{"line":753,"column":20}},{"start":{"line":753,"column":20},"end":{"line":753,"column":20}}]},"101":{"line":753,"type":"binary-expr","locations":[{"start":{"line":753,"column":24},"end":{"line":753,"column":30}},{"start":{"line":753,"column":34},"end":{"line":753,"column":39}},{"start":{"line":753,"column":43},"end":{"line":753,"column":54}},{"start":{"line":753,"column":58},"end":{"line":753,"column":74}}]},"102":{"line":758,"type":"if","locations":[{"start":{"line":758,"column":28},"end":{"line":758,"column":28}},{"start":{"line":758,"column":28},"end":{"line":758,"column":28}}]},"103":{"line":771,"type":"if","locations":[{"start":{"line":771,"column":20},"end":{"line":771,"column":20}},{"start":{"line":771,"column":20},"end":{"line":771,"column":20}}]},"104":{"line":772,"type":"binary-expr","locations":[{"start":{"line":772,"column":30},"end":{"line":772,"column":33}},{"start":{"line":772,"column":37},"end":{"line":772,"column":39}}]},"105":{"line":776,"type":"if","locations":[{"start":{"line":776,"column":20},"end":{"line":776,"column":20}},{"start":{"line":776,"column":20},"end":{"line":776,"column":20}}]},"106":{"line":779,"type":"if","locations":[{"start":{"line":779,"column":28},"end":{"line":779,"column":28}},{"start":{"line":779,"column":28},"end":{"line":779,"column":28}}]},"107":{"line":780,"type":"if","locations":[{"start":{"line":780,"column":32},"end":{"line":780,"column":32}},{"start":{"line":780,"column":32},"end":{"line":780,"column":32}}]},"108":{"line":788,"type":"if","locations":[{"start":{"line":788,"column":20},"end":{"line":788,"column":20}},{"start":{"line":788,"column":20},"end":{"line":788,"column":20}}]},"109":{"line":790,"type":"if","locations":[{"start":{"line":790,"column":28},"end":{"line":790,"column":28}},{"start":{"line":790,"column":28},"end":{"line":790,"column":28}}]},"110":{"line":791,"type":"if","locations":[{"start":{"line":791,"column":32},"end":{"line":791,"column":32}},{"start":{"line":791,"column":32},"end":{"line":791,"column":32}}]},"111":{"line":799,"type":"if","locations":[{"start":{"line":799,"column":20},"end":{"line":799,"column":20}},{"start":{"line":799,"column":20},"end":{"line":799,"column":20}}]},"112":{"line":801,"type":"if","locations":[{"start":{"line":801,"column":24},"end":{"line":801,"column":24}},{"start":{"line":801,"column":24},"end":{"line":801,"column":24}}]},"113":{"line":806,"type":"if","locations":[{"start":{"line":806,"column":28},"end":{"line":806,"column":28}},{"start":{"line":806,"column":28},"end":{"line":806,"column":28}}]},"114":{"line":809,"type":"cond-expr","locations":[{"start":{"line":809,"column":92},"end":{"line":809,"column":108}},{"start":{"line":809,"column":111},"end":{"line":809,"column":112}}]},"115":{"line":813,"type":"if","locations":[{"start":{"line":813,"column":24},"end":{"line":813,"column":24}},{"start":{"line":813,"column":24},"end":{"line":813,"column":24}}]},"116":{"line":814,"type":"cond-expr","locations":[{"start":{"line":814,"column":66},"end":{"line":814,"column":75}},{"start":{"line":814,"column":78},"end":{"line":814,"column":81}}]},"117":{"line":817,"type":"cond-expr","locations":[{"start":{"line":817,"column":70},"end":{"line":817,"column":79}},{"start":{"line":817,"column":82},"end":{"line":817,"column":85}}]},"118":{"line":823,"type":"if","locations":[{"start":{"line":823,"column":24},"end":{"line":823,"column":24}},{"start":{"line":823,"column":24},"end":{"line":823,"column":24}}]},"119":{"line":833,"type":"if","locations":[{"start":{"line":833,"column":28},"end":{"line":833,"column":28}},{"start":{"line":833,"column":28},"end":{"line":833,"column":28}}]},"120":{"line":833,"type":"binary-expr","locations":[{"start":{"line":833,"column":32},"end":{"line":833,"column":41}},{"start":{"line":833,"column":45},"end":{"line":833,"column":73}}]},"121":{"line":839,"type":"if","locations":[{"start":{"line":839,"column":20},"end":{"line":839,"column":20}},{"start":{"line":839,"column":20},"end":{"line":839,"column":20}}]},"122":{"line":841,"type":"if","locations":[{"start":{"line":841,"column":28},"end":{"line":841,"column":28}},{"start":{"line":841,"column":28},"end":{"line":841,"column":28}}]},"123":{"line":842,"type":"if","locations":[{"start":{"line":842,"column":32},"end":{"line":842,"column":32}},{"start":{"line":842,"column":32},"end":{"line":842,"column":32}}]},"124":{"line":875,"type":"cond-expr","locations":[{"start":{"line":875,"column":42},"end":{"line":875,"column":47}},{"start":{"line":875,"column":50},"end":{"line":875,"column":66}}]},"125":{"line":877,"type":"if","locations":[{"start":{"line":877,"column":8},"end":{"line":877,"column":8}},{"start":{"line":877,"column":8},"end":{"line":877,"column":8}}]},"126":{"line":965,"type":"if","locations":[{"start":{"line":965,"column":8},"end":{"line":965,"column":8}},{"start":{"line":965,"column":8},"end":{"line":965,"column":8}}]},"127":{"line":967,"type":"if","locations":[{"start":{"line":967,"column":12},"end":{"line":967,"column":12}},{"start":{"line":967,"column":12},"end":{"line":967,"column":12}}]},"128":{"line":973,"type":"if","locations":[{"start":{"line":973,"column":8},"end":{"line":973,"column":8}},{"start":{"line":973,"column":8},"end":{"line":973,"column":8}}]},"129":{"line":977,"type":"if","locations":[{"start":{"line":977,"column":8},"end":{"line":977,"column":8}},{"start":{"line":977,"column":8},"end":{"line":977,"column":8}}]},"130":{"line":979,"type":"if","locations":[{"start":{"line":979,"column":16},"end":{"line":979,"column":16}},{"start":{"line":979,"column":16},"end":{"line":979,"column":16}}]},"131":{"line":985,"type":"if","locations":[{"start":{"line":985,"column":12},"end":{"line":985,"column":12}},{"start":{"line":985,"column":12},"end":{"line":985,"column":12}}]},"132":{"line":986,"type":"if","locations":[{"start":{"line":986,"column":16},"end":{"line":986,"column":16}},{"start":{"line":986,"column":16},"end":{"line":986,"column":16}}]},"133":{"line":993,"type":"if","locations":[{"start":{"line":993,"column":8},"end":{"line":993,"column":8}},{"start":{"line":993,"column":8},"end":{"line":993,"column":8}}]},"134":{"line":994,"type":"binary-expr","locations":[{"start":{"line":994,"column":26},"end":{"line":994,"column":37}},{"start":{"line":994,"column":41},"end":{"line":994,"column":54}}]},"135":{"line":1027,"type":"if","locations":[{"start":{"line":1027,"column":8},"end":{"line":1027,"column":8}},{"start":{"line":1027,"column":8},"end":{"line":1027,"column":8}}]},"136":{"line":1039,"type":"if","locations":[{"start":{"line":1039,"column":20},"end":{"line":1039,"column":20}},{"start":{"line":1039,"column":20},"end":{"line":1039,"column":20}}]},"137":{"line":1074,"type":"if","locations":[{"start":{"line":1074,"column":8},"end":{"line":1074,"column":8}},{"start":{"line":1074,"column":8},"end":{"line":1074,"column":8}}]},"138":{"line":1074,"type":"binary-expr","locations":[{"start":{"line":1074,"column":12},"end":{"line":1074,"column":29}},{"start":{"line":1074,"column":33},"end":{"line":1074,"column":56}}]},"139":{"line":1076,"type":"if","locations":[{"start":{"line":1076,"column":15},"end":{"line":1076,"column":15}},{"start":{"line":1076,"column":15},"end":{"line":1076,"column":15}}]},"140":{"line":1077,"type":"if","locations":[{"start":{"line":1077,"column":12},"end":{"line":1077,"column":12}},{"start":{"line":1077,"column":12},"end":{"line":1077,"column":12}}]},"141":{"line":1077,"type":"binary-expr","locations":[{"start":{"line":1077,"column":16},"end":{"line":1077,"column":32}},{"start":{"line":1077,"column":36},"end":{"line":1077,"column":59}}]},"142":{"line":1081,"type":"if","locations":[{"start":{"line":1081,"column":12},"end":{"line":1081,"column":12}},{"start":{"line":1081,"column":12},"end":{"line":1081,"column":12}}]},"143":{"line":1105,"type":"if","locations":[{"start":{"line":1105,"column":8},"end":{"line":1105,"column":8}},{"start":{"line":1105,"column":8},"end":{"line":1105,"column":8}}]},"144":{"line":1130,"type":"if","locations":[{"start":{"line":1130,"column":16},"end":{"line":1130,"column":16}},{"start":{"line":1130,"column":16},"end":{"line":1130,"column":16}}]},"145":{"line":1134,"type":"if","locations":[{"start":{"line":1134,"column":16},"end":{"line":1134,"column":16}},{"start":{"line":1134,"column":16},"end":{"line":1134,"column":16}}]},"146":{"line":1137,"type":"if","locations":[{"start":{"line":1137,"column":24},"end":{"line":1137,"column":24}},{"start":{"line":1137,"column":24},"end":{"line":1137,"column":24}}]},"147":{"line":1137,"type":"binary-expr","locations":[{"start":{"line":1137,"column":28},"end":{"line":1137,"column":45}},{"start":{"line":1137,"column":49},"end":{"line":1137,"column":64}}]},"148":{"line":1150,"type":"if","locations":[{"start":{"line":1150,"column":20},"end":{"line":1150,"column":20}},{"start":{"line":1150,"column":20},"end":{"line":1150,"column":20}}]},"149":{"line":1155,"type":"if","locations":[{"start":{"line":1155,"column":20},"end":{"line":1155,"column":20}},{"start":{"line":1155,"column":20},"end":{"line":1155,"column":20}}]},"150":{"line":1163,"type":"if","locations":[{"start":{"line":1163,"column":20},"end":{"line":1163,"column":20}},{"start":{"line":1163,"column":20},"end":{"line":1163,"column":20}}]},"151":{"line":1170,"type":"if","locations":[{"start":{"line":1170,"column":24},"end":{"line":1170,"column":24}},{"start":{"line":1170,"column":24},"end":{"line":1170,"column":24}}]},"152":{"line":1178,"type":"if","locations":[{"start":{"line":1178,"column":20},"end":{"line":1178,"column":20}},{"start":{"line":1178,"column":20},"end":{"line":1178,"column":20}}]},"153":{"line":1178,"type":"binary-expr","locations":[{"start":{"line":1178,"column":24},"end":{"line":1178,"column":27}},{"start":{"line":1178,"column":31},"end":{"line":1178,"column":41}}]},"154":{"line":1183,"type":"if","locations":[{"start":{"line":1183,"column":20},"end":{"line":1183,"column":20}},{"start":{"line":1183,"column":20},"end":{"line":1183,"column":20}}]},"155":{"line":1183,"type":"binary-expr","locations":[{"start":{"line":1183,"column":24},"end":{"line":1183,"column":27}},{"start":{"line":1183,"column":31},"end":{"line":1183,"column":41}}]},"156":{"line":1191,"type":"binary-expr","locations":[{"start":{"line":1191,"column":31},"end":{"line":1191,"column":41}},{"start":{"line":1191,"column":45},"end":{"line":1194,"column":21}}]},"157":{"line":1201,"type":"if","locations":[{"start":{"line":1201,"column":16},"end":{"line":1201,"column":16}},{"start":{"line":1201,"column":16},"end":{"line":1201,"column":16}}]},"158":{"line":1207,"type":"if","locations":[{"start":{"line":1207,"column":20},"end":{"line":1207,"column":20}},{"start":{"line":1207,"column":20},"end":{"line":1207,"column":20}}]},"159":{"line":1208,"type":"if","locations":[{"start":{"line":1208,"column":24},"end":{"line":1208,"column":24}},{"start":{"line":1208,"column":24},"end":{"line":1208,"column":24}}]},"160":{"line":1215,"type":"if","locations":[{"start":{"line":1215,"column":16},"end":{"line":1215,"column":16}},{"start":{"line":1215,"column":16},"end":{"line":1215,"column":16}}]},"161":{"line":1215,"type":"binary-expr","locations":[{"start":{"line":1215,"column":20},"end":{"line":1215,"column":24}},{"start":{"line":1215,"column":28},"end":{"line":1215,"column":32}}]},"162":{"line":1218,"type":"if","locations":[{"start":{"line":1218,"column":24},"end":{"line":1218,"column":24}},{"start":{"line":1218,"column":24},"end":{"line":1218,"column":24}}]},"163":{"line":1223,"type":"if","locations":[{"start":{"line":1223,"column":20},"end":{"line":1223,"column":20}},{"start":{"line":1223,"column":20},"end":{"line":1223,"column":20}}]},"164":{"line":1226,"type":"if","locations":[{"start":{"line":1226,"column":20},"end":{"line":1226,"column":20}},{"start":{"line":1226,"column":20},"end":{"line":1226,"column":20}}]},"165":{"line":1231,"type":"if","locations":[{"start":{"line":1231,"column":16},"end":{"line":1231,"column":16}},{"start":{"line":1231,"column":16},"end":{"line":1231,"column":16}}]},"166":{"line":1231,"type":"binary-expr","locations":[{"start":{"line":1231,"column":20},"end":{"line":1231,"column":31}},{"start":{"line":1231,"column":35},"end":{"line":1231,"column":53}},{"start":{"line":1231,"column":57},"end":{"line":1231,"column":68}}]},"167":{"line":1239,"type":"if","locations":[{"start":{"line":1239,"column":8},"end":{"line":1239,"column":8}},{"start":{"line":1239,"column":8},"end":{"line":1239,"column":8}}]},"168":{"line":1242,"type":"if","locations":[{"start":{"line":1242,"column":16},"end":{"line":1242,"column":16}},{"start":{"line":1242,"column":16},"end":{"line":1242,"column":16}}]},"169":{"line":1247,"type":"if","locations":[{"start":{"line":1247,"column":12},"end":{"line":1247,"column":12}},{"start":{"line":1247,"column":12},"end":{"line":1247,"column":12}}]},"170":{"line":1253,"type":"if","locations":[{"start":{"line":1253,"column":8},"end":{"line":1253,"column":8}},{"start":{"line":1253,"column":8},"end":{"line":1253,"column":8}}]},"171":{"line":1253,"type":"binary-expr","locations":[{"start":{"line":1253,"column":13},"end":{"line":1253,"column":24}},{"start":{"line":1253,"column":28},"end":{"line":1253,"column":47}},{"start":{"line":1253,"column":52},"end":{"line":1253,"column":61}}]},"172":{"line":1254,"type":"cond-expr","locations":[{"start":{"line":1254,"column":52},"end":{"line":1254,"column":59}},{"start":{"line":1254,"column":62},"end":{"line":1254,"column":64}}]},"173":{"line":1260,"type":"if","locations":[{"start":{"line":1260,"column":8},"end":{"line":1260,"column":8}},{"start":{"line":1260,"column":8},"end":{"line":1260,"column":8}}]},"174":{"line":1260,"type":"binary-expr","locations":[{"start":{"line":1260,"column":12},"end":{"line":1260,"column":16}},{"start":{"line":1260,"column":20},"end":{"line":1260,"column":28}},{"start":{"line":1260,"column":32},"end":{"line":1260,"column":43}}]},"175":{"line":1265,"type":"cond-expr","locations":[{"start":{"line":1265,"column":48},"end":{"line":1265,"column":52}},{"start":{"line":1265,"column":55},"end":{"line":1265,"column":59}}]},"176":{"line":1275,"type":"if","locations":[{"start":{"line":1275,"column":8},"end":{"line":1275,"column":8}},{"start":{"line":1275,"column":8},"end":{"line":1275,"column":8}}]},"177":{"line":1282,"type":"if","locations":[{"start":{"line":1282,"column":8},"end":{"line":1282,"column":8}},{"start":{"line":1282,"column":8},"end":{"line":1282,"column":8}}]},"178":{"line":1282,"type":"binary-expr","locations":[{"start":{"line":1282,"column":12},"end":{"line":1282,"column":16}},{"start":{"line":1282,"column":20},"end":{"line":1282,"column":23}},{"start":{"line":1282,"column":27},"end":{"line":1282,"column":35}}]},"179":{"line":1290,"type":"cond-expr","locations":[{"start":{"line":1290,"column":45},"end":{"line":1290,"column":49}},{"start":{"line":1290,"column":52},"end":{"line":1290,"column":56}}]},"180":{"line":1292,"type":"if","locations":[{"start":{"line":1292,"column":15},"end":{"line":1292,"column":15}},{"start":{"line":1292,"column":15},"end":{"line":1292,"column":15}}]},"181":{"line":1292,"type":"binary-expr","locations":[{"start":{"line":1292,"column":19},"end":{"line":1292,"column":23}},{"start":{"line":1292,"column":27},"end":{"line":1292,"column":30}},{"start":{"line":1292,"column":34},"end":{"line":1292,"column":39}},{"start":{"line":1292,"column":43},"end":{"line":1292,"column":60}}]},"182":{"line":1301,"type":"if","locations":[{"start":{"line":1301,"column":16},"end":{"line":1301,"column":16}},{"start":{"line":1301,"column":16},"end":{"line":1301,"column":16}}]},"183":{"line":1306,"type":"if","locations":[{"start":{"line":1306,"column":12},"end":{"line":1306,"column":12}},{"start":{"line":1306,"column":12},"end":{"line":1306,"column":12}}]},"184":{"line":1317,"type":"if","locations":[{"start":{"line":1317,"column":12},"end":{"line":1317,"column":12}},{"start":{"line":1317,"column":12},"end":{"line":1317,"column":12}}]},"185":{"line":1371,"type":"if","locations":[{"start":{"line":1371,"column":12},"end":{"line":1371,"column":12}},{"start":{"line":1371,"column":12},"end":{"line":1371,"column":12}}]},"186":{"line":1374,"type":"binary-expr","locations":[{"start":{"line":1374,"column":30},"end":{"line":1374,"column":37}},{"start":{"line":1374,"column":41},"end":{"line":1374,"column":43}}]},"187":{"line":1378,"type":"binary-expr","locations":[{"start":{"line":1378,"column":25},"end":{"line":1378,"column":31}},{"start":{"line":1378,"column":35},"end":{"line":1378,"column":37}}]},"188":{"line":1413,"type":"if","locations":[{"start":{"line":1413,"column":8},"end":{"line":1413,"column":8}},{"start":{"line":1413,"column":8},"end":{"line":1413,"column":8}}]},"189":{"line":1417,"type":"if","locations":[{"start":{"line":1417,"column":8},"end":{"line":1417,"column":8}},{"start":{"line":1417,"column":8},"end":{"line":1417,"column":8}}]},"190":{"line":1418,"type":"binary-expr","locations":[{"start":{"line":1418,"column":19},"end":{"line":1418,"column":20}},{"start":{"line":1418,"column":24},"end":{"line":1418,"column":38}}]},"191":{"line":1436,"type":"cond-expr","locations":[{"start":{"line":1436,"column":24},"end":{"line":1436,"column":32}},{"start":{"line":1436,"column":36},"end":{"line":1436,"column":38}}]},"192":{"line":1458,"type":"if","locations":[{"start":{"line":1458,"column":8},"end":{"line":1458,"column":8}},{"start":{"line":1458,"column":8},"end":{"line":1458,"column":8}}]},"193":{"line":1464,"type":"if","locations":[{"start":{"line":1464,"column":8},"end":{"line":1464,"column":8}},{"start":{"line":1464,"column":8},"end":{"line":1464,"column":8}}]},"194":{"line":1464,"type":"binary-expr","locations":[{"start":{"line":1464,"column":12},"end":{"line":1464,"column":22}},{"start":{"line":1464,"column":26},"end":{"line":1464,"column":36}},{"start":{"line":1464,"column":40},"end":{"line":1464,"column":56}}]},"195":{"line":1467,"type":"cond-expr","locations":[{"start":{"line":1467,"column":44},"end":{"line":1467,"column":45}},{"start":{"line":1467,"column":48},"end":{"line":1467,"column":55}}]},"196":{"line":1470,"type":"if","locations":[{"start":{"line":1470,"column":8},"end":{"line":1470,"column":8}},{"start":{"line":1470,"column":8},"end":{"line":1470,"column":8}}]},"197":{"line":1472,"type":"if","locations":[{"start":{"line":1472,"column":12},"end":{"line":1472,"column":12}},{"start":{"line":1472,"column":12},"end":{"line":1472,"column":12}}]},"198":{"line":1491,"type":"if","locations":[{"start":{"line":1491,"column":8},"end":{"line":1491,"column":8}},{"start":{"line":1491,"column":8},"end":{"line":1491,"column":8}}]},"199":{"line":1517,"type":"if","locations":[{"start":{"line":1517,"column":8},"end":{"line":1517,"column":8}},{"start":{"line":1517,"column":8},"end":{"line":1517,"column":8}}]},"200":{"line":1558,"type":"if","locations":[{"start":{"line":1558,"column":8},"end":{"line":1558,"column":8}},{"start":{"line":1558,"column":8},"end":{"line":1558,"column":8}}]},"201":{"line":1562,"type":"if","locations":[{"start":{"line":1562,"column":8},"end":{"line":1562,"column":8}},{"start":{"line":1562,"column":8},"end":{"line":1562,"column":8}}]},"202":{"line":1574,"type":"if","locations":[{"start":{"line":1574,"column":4},"end":{"line":1574,"column":4}},{"start":{"line":1574,"column":4},"end":{"line":1574,"column":4}}]},"203":{"line":1591,"type":"if","locations":[{"start":{"line":1591,"column":4},"end":{"line":1591,"column":4}},{"start":{"line":1591,"column":4},"end":{"line":1591,"column":4}}]},"204":{"line":2006,"type":"binary-expr","locations":[{"start":{"line":2006,"column":8},"end":{"line":2006,"column":14}},{"start":{"line":2006,"column":19},"end":{"line":2006,"column":30}}]},"205":{"line":2061,"type":"binary-expr","locations":[{"start":{"line":2061,"column":14},"end":{"line":2061,"column":35}},{"start":{"line":2061,"column":39},"end":{"line":2061,"column":41}},{"start":{"line":2061,"column":45},"end":{"line":2061,"column":69}}]},"206":{"line":2078,"type":"cond-expr","locations":[{"start":{"line":2078,"column":41},"end":{"line":2078,"column":54}},{"start":{"line":2078,"column":57},"end":{"line":2080,"column":1}}]},"207":{"line":2101,"type":"binary-expr","locations":[{"start":{"line":2101,"column":11},"end":{"line":2101,"column":31}},{"start":{"line":2101,"column":35},"end":{"line":2101,"column":66}},{"start":{"line":2101,"column":70},"end":{"line":2101,"column":79}}]},"208":{"line":2151,"type":"binary-expr","locations":[{"start":{"line":2151,"column":11},"end":{"line":2151,"column":32}},{"start":{"line":2151,"column":36},"end":{"line":2151,"column":47}}]},"209":{"line":2167,"type":"binary-expr","locations":[{"start":{"line":2167,"column":12},"end":{"line":2167,"column":13}},{"start":{"line":2167,"column":18},"end":{"line":2167,"column":32}},{"start":{"line":2168,"column":9},"end":{"line":2168,"column":16}},{"start":{"line":2168,"column":21},"end":{"line":2168,"column":37}},{"start":{"line":2168,"column":41},"end":{"line":2168,"column":56}},{"start":{"line":2168,"column":64},"end":{"line":2168,"column":69}}]},"210":{"line":2216,"type":"switch","locations":[{"start":{"line":2217,"column":8},"end":{"line":2218,"column":31}},{"start":{"line":2220,"column":8},"end":{"line":2220,"column":20}},{"start":{"line":2221,"column":8},"end":{"line":2222,"column":25}},{"start":{"line":2224,"column":8},"end":{"line":2225,"column":23}}]},"211":{"line":2237,"type":"binary-expr","locations":[{"start":{"line":2237,"column":8},"end":{"line":2237,"column":16}},{"start":{"line":2237,"column":20},"end":{"line":2239,"column":1}}]},"212":{"line":2259,"type":"cond-expr","locations":[{"start":{"line":2259,"column":23},"end":{"line":2261,"column":6}},{"start":{"line":2261,"column":9},"end":{"line":2261,"column":10}}]},"213":{"line":2260,"type":"cond-expr","locations":[{"start":{"line":2260,"column":39},"end":{"line":2260,"column":44}},{"start":{"line":2260,"column":47},"end":{"line":2260,"column":53}}]},"214":{"line":2272,"type":"cond-expr","locations":[{"start":{"line":2272,"column":64},"end":{"line":2274,"column":1}},{"start":{"line":2274,"column":4},"end":{"line":2280,"column":1}}]},"215":{"line":2272,"type":"binary-expr","locations":[{"start":{"line":2272,"column":9},"end":{"line":2272,"column":39}},{"start":{"line":2272,"column":43},"end":{"line":2272,"column":61}}]},"216":{"line":2273,"type":"cond-expr","locations":[{"start":{"line":2273,"column":25},"end":{"line":2273,"column":33}},{"start":{"line":2273,"column":36},"end":{"line":2273,"column":37}}]},"217":{"line":2273,"type":"binary-expr","locations":[{"start":{"line":2273,"column":11},"end":{"line":2273,"column":12}},{"start":{"line":2273,"column":16},"end":{"line":2273,"column":22}}]},"218":{"line":2289,"type":"cond-expr","locations":[{"start":{"line":2289,"column":76},"end":{"line":2291,"column":1}},{"start":{"line":2291,"column":4},"end":{"line":2293,"column":1}}]},"219":{"line":2289,"type":"binary-expr","locations":[{"start":{"line":2289,"column":13},"end":{"line":2289,"column":47}},{"start":{"line":2289,"column":51},"end":{"line":2289,"column":73}}]},"220":{"line":2302,"type":"cond-expr","locations":[{"start":{"line":2302,"column":79},"end":{"line":2304,"column":1}},{"start":{"line":2304,"column":4},"end":{"line":2306,"column":1}}]},"221":{"line":2302,"type":"binary-expr","locations":[{"start":{"line":2302,"column":14},"end":{"line":2302,"column":49}},{"start":{"line":2302,"column":53},"end":{"line":2302,"column":76}}]},"222":{"line":2336,"type":"binary-expr","locations":[{"start":{"line":2336,"column":11},"end":{"line":2336,"column":26}},{"start":{"line":2336,"column":30},"end":{"line":2336,"column":53}},{"start":{"line":2336,"column":58},"end":{"line":2336,"column":79}}]},"223":{"line":2336,"type":"cond-expr","locations":[{"start":{"line":2336,"column":62},"end":{"line":2336,"column":70}},{"start":{"line":2336,"column":73},"end":{"line":2336,"column":79}}]},"224":{"line":2380,"type":"binary-expr","locations":[{"start":{"line":2380,"column":4},"end":{"line":2380,"column":14}},{"start":{"line":2380,"column":19},"end":{"line":2380,"column":33}}]},"225":{"line":2382,"type":"if","locations":[{"start":{"line":2382,"column":4},"end":{"line":2382,"column":4}},{"start":{"line":2382,"column":4},"end":{"line":2382,"column":4}}]},"226":{"line":2382,"type":"binary-expr","locations":[{"start":{"line":2382,"column":8},"end":{"line":2382,"column":13}},{"start":{"line":2382,"column":17},"end":{"line":2382,"column":35}}]},"227":{"line":2419,"type":"cond-expr","locations":[{"start":{"line":2419,"column":48},"end":{"line":2434,"column":1}},{"start":{"line":2434,"column":4},"end":{"line":2449,"column":1}}]},"228":{"line":2427,"type":"if","locations":[{"start":{"line":2427,"column":8},"end":{"line":2427,"column":8}},{"start":{"line":2427,"column":8},"end":{"line":2427,"column":8}}]},"229":{"line":2442,"type":"if","locations":[{"start":{"line":2442,"column":8},"end":{"line":2442,"column":8}},{"start":{"line":2442,"column":8},"end":{"line":2442,"column":8}}]},"230":{"line":2466,"type":"cond-expr","locations":[{"start":{"line":2466,"column":64},"end":{"line":2469,"column":1}},{"start":{"line":2469,"column":4},"end":{"line":2477,"column":1}}]},"231":{"line":2467,"type":"binary-expr","locations":[{"start":{"line":2467,"column":24},"end":{"line":2467,"column":29}},{"start":{"line":2467,"column":33},"end":{"line":2467,"column":35}}]},"232":{"line":2467,"type":"binary-expr","locations":[{"start":{"line":2467,"column":41},"end":{"line":2467,"column":48}},{"start":{"line":2467,"column":52},"end":{"line":2467,"column":53}}]},"233":{"line":2471,"type":"if","locations":[{"start":{"line":2471,"column":8},"end":{"line":2471,"column":8}},{"start":{"line":2471,"column":8},"end":{"line":2471,"column":8}}]},"234":{"line":2472,"type":"binary-expr","locations":[{"start":{"line":2472,"column":20},"end":{"line":2472,"column":27}},{"start":{"line":2472,"column":31},"end":{"line":2472,"column":32}}]},"235":{"line":2505,"type":"binary-expr","locations":[{"start":{"line":2505,"column":16},"end":{"line":2505,"column":22}},{"start":{"line":2505,"column":26},"end":{"line":2505,"column":39}},{"start":{"line":2505,"column":44},"end":{"line":2505,"column":45}}]},"236":{"line":2509,"type":"if","locations":[{"start":{"line":2509,"column":8},"end":{"line":2509,"column":8}},{"start":{"line":2509,"column":8},"end":{"line":2509,"column":8}}]},"237":{"line":2510,"type":"cond-expr","locations":[{"start":{"line":2510,"column":54},"end":{"line":2510,"column":63}},{"start":{"line":2510,"column":66},"end":{"line":2510,"column":70}}]},"238":{"line":2510,"type":"binary-expr","locations":[{"start":{"line":2510,"column":28},"end":{"line":2510,"column":36}},{"start":{"line":2510,"column":40},"end":{"line":2510,"column":51}}]},"239":{"line":2531,"type":"cond-expr","locations":[{"start":{"line":2531,"column":50},"end":{"line":2533,"column":1}},{"start":{"line":2533,"column":4},"end":{"line":2555,"column":1}}]},"240":{"line":2537,"type":"binary-expr","locations":[{"start":{"line":2537,"column":11},"end":{"line":2537,"column":16}},{"start":{"line":2537,"column":20},"end":{"line":2537,"column":21}}]},"241":{"line":2538,"type":"binary-expr","locations":[{"start":{"line":2538,"column":12},"end":{"line":2538,"column":20}},{"start":{"line":2538,"column":24},"end":{"line":2538,"column":26}}]},"242":{"line":2540,"type":"if","locations":[{"start":{"line":2540,"column":4},"end":{"line":2540,"column":4}},{"start":{"line":2540,"column":4},"end":{"line":2540,"column":4}}]},"243":{"line":2543,"type":"if","locations":[{"start":{"line":2543,"column":8},"end":{"line":2543,"column":8}},{"start":{"line":2543,"column":8},"end":{"line":2543,"column":8}}]},"244":{"line":2549,"type":"if","locations":[{"start":{"line":2549,"column":8},"end":{"line":2549,"column":8}},{"start":{"line":2549,"column":8},"end":{"line":2549,"column":8}}]},"245":{"line":2549,"type":"binary-expr","locations":[{"start":{"line":2549,"column":12},"end":{"line":2549,"column":25}},{"start":{"line":2549,"column":29},"end":{"line":2549,"column":50}}]},"246":{"line":2596,"type":"cond-expr","locations":[{"start":{"line":2596,"column":44},"end":{"line":2598,"column":1}},{"start":{"line":2598,"column":4},"end":{"line":2606,"column":1}}]},"247":{"line":2600,"type":"if","locations":[{"start":{"line":2600,"column":8},"end":{"line":2600,"column":8}},{"start":{"line":2600,"column":8},"end":{"line":2600,"column":8}}]},"248":{"line":2600,"type":"binary-expr","locations":[{"start":{"line":2600,"column":12},"end":{"line":2600,"column":22}},{"start":{"line":2600,"column":26},"end":{"line":2600,"column":62}}]},"249":{"line":2629,"type":"if","locations":[{"start":{"line":2629,"column":4},"end":{"line":2629,"column":4}},{"start":{"line":2629,"column":4},"end":{"line":2629,"column":4}}]},"250":{"line":2631,"type":"if","locations":[{"start":{"line":2631,"column":11},"end":{"line":2631,"column":11}},{"start":{"line":2631,"column":11},"end":{"line":2631,"column":11}}]},"251":{"line":2636,"type":"if","locations":[{"start":{"line":2636,"column":12},"end":{"line":2636,"column":12}},{"start":{"line":2636,"column":12},"end":{"line":2636,"column":12}}]},"252":{"line":2636,"type":"binary-expr","locations":[{"start":{"line":2636,"column":16},"end":{"line":2636,"column":31}},{"start":{"line":2636,"column":35},"end":{"line":2636,"column":47}},{"start":{"line":2636,"column":51},"end":{"line":2636,"column":82}},{"start":{"line":2636,"column":86},"end":{"line":2636,"column":96}}]},"253":{"line":2636,"type":"binary-expr","locations":[{"start":{"line":2636,"column":53},"end":{"line":2636,"column":65}},{"start":{"line":2636,"column":69},"end":{"line":2636,"column":81}}]},"254":{"line":2729,"type":"binary-expr","locations":[{"start":{"line":2729,"column":23},"end":{"line":2729,"column":43}},{"start":{"line":2729,"column":47},"end":{"line":2729,"column":58}}]},"255":{"line":2771,"type":"binary-expr","locations":[{"start":{"line":2771,"column":4},"end":{"line":2771,"column":9}},{"start":{"line":2771,"column":14},"end":{"line":2771,"column":24}}]},"256":{"line":2774,"type":"cond-expr","locations":[{"start":{"line":2775,"column":16},"end":{"line":2775,"column":70}},{"start":{"line":2776,"column":16},"end":{"line":2776,"column":27}}]},"257":{"line":2779,"type":"if","locations":[{"start":{"line":2779,"column":8},"end":{"line":2779,"column":8}},{"start":{"line":2779,"column":8},"end":{"line":2779,"column":8}}]},"258":{"line":2779,"type":"binary-expr","locations":[{"start":{"line":2779,"column":12},"end":{"line":2779,"column":27}},{"start":{"line":2779,"column":32},"end":{"line":2779,"column":39}},{"start":{"line":2779,"column":43},"end":{"line":2779,"column":64}}]},"259":{"line":2813,"type":"binary-expr","locations":[{"start":{"line":2813,"column":11},"end":{"line":2813,"column":14}},{"start":{"line":2813,"column":18},"end":{"line":2813,"column":30}}]},"260":{"line":2839,"type":"if","locations":[{"start":{"line":2839,"column":12},"end":{"line":2839,"column":12}},{"start":{"line":2839,"column":12},"end":{"line":2839,"column":12}}]},"261":{"line":2888,"type":"if","locations":[{"start":{"line":2888,"column":4},"end":{"line":2888,"column":4}},{"start":{"line":2888,"column":4},"end":{"line":2888,"column":4}}]},"262":{"line":2888,"type":"binary-expr","locations":[{"start":{"line":2888,"column":8},"end":{"line":2888,"column":17}},{"start":{"line":2888,"column":21},"end":{"line":2888,"column":30}}]},"263":{"line":2889,"type":"binary-expr","locations":[{"start":{"line":2889,"column":15},"end":{"line":2889,"column":23}},{"start":{"line":2889,"column":27},"end":{"line":2889,"column":28}}]},"264":{"line":2892,"type":"if","locations":[{"start":{"line":2892,"column":4},"end":{"line":2892,"column":4}},{"start":{"line":2892,"column":4},"end":{"line":2892,"column":4}}]},"265":{"line":2896,"type":"if","locations":[{"start":{"line":2896,"column":8},"end":{"line":2896,"column":8}},{"start":{"line":2896,"column":8},"end":{"line":2896,"column":8}}]},"266":{"line":2903,"type":"cond-expr","locations":[{"start":{"line":2903,"column":42},"end":{"line":2903,"column":60}},{"start":{"line":2903,"column":63},"end":{"line":2903,"column":71}}]},"267":{"line":2903,"type":"binary-expr","locations":[{"start":{"line":2903,"column":15},"end":{"line":2903,"column":25}},{"start":{"line":2903,"column":29},"end":{"line":2903,"column":39}}]},"268":{"line":2904,"type":"cond-expr","locations":[{"start":{"line":2904,"column":42},"end":{"line":2904,"column":60}},{"start":{"line":2904,"column":63},"end":{"line":2904,"column":71}}]},"269":{"line":2904,"type":"binary-expr","locations":[{"start":{"line":2904,"column":15},"end":{"line":2904,"column":25}},{"start":{"line":2904,"column":29},"end":{"line":2904,"column":39}}]},"270":{"line":2909,"type":"if","locations":[{"start":{"line":2909,"column":8},"end":{"line":2909,"column":8}},{"start":{"line":2909,"column":8},"end":{"line":2909,"column":8}}]},"271":{"line":2909,"type":"binary-expr","locations":[{"start":{"line":2909,"column":12},"end":{"line":2909,"column":17}},{"start":{"line":2909,"column":21},"end":{"line":2909,"column":24}}]},"272":{"line":2919,"type":"binary-expr","locations":[{"start":{"line":2919,"column":22},"end":{"line":2919,"column":31}},{"start":{"line":2919,"column":35},"end":{"line":2919,"column":41}}]},"273":{"line":2921,"type":"if","locations":[{"start":{"line":2921,"column":4},"end":{"line":2921,"column":4}},{"start":{"line":2921,"column":4},"end":{"line":2921,"column":4}}]},"274":{"line":2930,"type":"if","locations":[{"start":{"line":2930,"column":12},"end":{"line":2930,"column":12}},{"start":{"line":2930,"column":12},"end":{"line":2930,"column":12}}]},"275":{"line":2937,"type":"cond-expr","locations":[{"start":{"line":2937,"column":39},"end":{"line":2937,"column":44}},{"start":{"line":2937,"column":47},"end":{"line":2937,"column":56}}]},"276":{"line":2939,"type":"if","locations":[{"start":{"line":2939,"column":12},"end":{"line":2939,"column":12}},{"start":{"line":2939,"column":12},"end":{"line":2939,"column":12}}]},"277":{"line":2939,"type":"binary-expr","locations":[{"start":{"line":2939,"column":16},"end":{"line":2939,"column":21}},{"start":{"line":2939,"column":25},"end":{"line":2939,"column":31}},{"start":{"line":2939,"column":35},"end":{"line":2939,"column":58}},{"start":{"line":2940,"column":23},"end":{"line":2940,"column":48}}]},"278":{"line":2950,"type":"if","locations":[{"start":{"line":2950,"column":19},"end":{"line":2950,"column":19}},{"start":{"line":2950,"column":19},"end":{"line":2950,"column":19}}]},"279":{"line":2950,"type":"binary-expr","locations":[{"start":{"line":2950,"column":23},"end":{"line":2950,"column":32}},{"start":{"line":2950,"column":36},"end":{"line":2950,"column":43}}]},"280":{"line":2964,"type":"if","locations":[{"start":{"line":2964,"column":12},"end":{"line":2964,"column":12}},{"start":{"line":2964,"column":12},"end":{"line":2964,"column":12}}]},"281":{"line":2971,"type":"cond-expr","locations":[{"start":{"line":2971,"column":39},"end":{"line":2971,"column":44}},{"start":{"line":2971,"column":47},"end":{"line":2971,"column":56}}]},"282":{"line":2973,"type":"if","locations":[{"start":{"line":2973,"column":12},"end":{"line":2973,"column":12}},{"start":{"line":2973,"column":12},"end":{"line":2973,"column":12}}]},"283":{"line":2973,"type":"binary-expr","locations":[{"start":{"line":2973,"column":16},"end":{"line":2973,"column":21}},{"start":{"line":2973,"column":25},"end":{"line":2973,"column":31}},{"start":{"line":2973,"column":35},"end":{"line":2973,"column":58}},{"start":{"line":2974,"column":23},"end":{"line":2974,"column":48}}]},"284":{"line":2976,"type":"if","locations":[{"start":{"line":2976,"column":19},"end":{"line":2976,"column":19}},{"start":{"line":2976,"column":19},"end":{"line":2976,"column":19}}]},"285":{"line":2976,"type":"binary-expr","locations":[{"start":{"line":2976,"column":23},"end":{"line":2976,"column":32}},{"start":{"line":2976,"column":36},"end":{"line":2976,"column":43}}]},"286":{"line":2984,"type":"if","locations":[{"start":{"line":2984,"column":8},"end":{"line":2984,"column":8}},{"start":{"line":2984,"column":8},"end":{"line":2984,"column":8}}]},"287":{"line":3021,"type":"cond-expr","locations":[{"start":{"line":3021,"column":47},"end":{"line":3028,"column":1}},{"start":{"line":3028,"column":5},"end":{"line":3037,"column":3}}]},"288":{"line":3097,"type":"binary-expr","locations":[{"start":{"line":3097,"column":11},"end":{"line":3097,"column":16}},{"start":{"line":3097,"column":20},"end":{"line":3097,"column":41}}]},"289":{"line":3134,"type":"cond-expr","locations":[{"start":{"line":3134,"column":59},"end":{"line":3134,"column":70}},{"start":{"line":3134,"column":73},"end":{"line":3167,"column":1}}]},"290":{"line":3134,"type":"binary-expr","locations":[{"start":{"line":3134,"column":9},"end":{"line":3134,"column":36}},{"start":{"line":3134,"column":40},"end":{"line":3134,"column":56}}]},"291":{"line":3135,"type":"if","locations":[{"start":{"line":3135,"column":4},"end":{"line":3135,"column":4}},{"start":{"line":3135,"column":4},"end":{"line":3135,"column":4}}]},"292":{"line":3142,"type":"if","locations":[{"start":{"line":3142,"column":4},"end":{"line":3142,"column":4}},{"start":{"line":3142,"column":4},"end":{"line":3142,"column":4}}]},"293":{"line":3142,"type":"binary-expr","locations":[{"start":{"line":3142,"column":8},"end":{"line":3142,"column":23}},{"start":{"line":3142,"column":27},"end":{"line":3142,"column":52}}]},"294":{"line":3144,"type":"if","locations":[{"start":{"line":3144,"column":12},"end":{"line":3144,"column":12}},{"start":{"line":3144,"column":12},"end":{"line":3144,"column":12}}]},"295":{"line":3144,"type":"binary-expr","locations":[{"start":{"line":3144,"column":16},"end":{"line":3144,"column":30}},{"start":{"line":3144,"column":34},"end":{"line":3144,"column":53}}]},"296":{"line":3150,"type":"if","locations":[{"start":{"line":3150,"column":12},"end":{"line":3150,"column":12}},{"start":{"line":3150,"column":12},"end":{"line":3150,"column":12}}]},"297":{"line":3156,"type":"if","locations":[{"start":{"line":3156,"column":4},"end":{"line":3156,"column":4}},{"start":{"line":3156,"column":4},"end":{"line":3156,"column":4}}]},"298":{"line":3160,"type":"if","locations":[{"start":{"line":3160,"column":12},"end":{"line":3160,"column":12}},{"start":{"line":3160,"column":12},"end":{"line":3160,"column":12}}]},"299":{"line":3253,"type":"if","locations":[{"start":{"line":3253,"column":8},"end":{"line":3253,"column":8}},{"start":{"line":3253,"column":8},"end":{"line":3253,"column":8}}]},"300":{"line":3253,"type":"binary-expr","locations":[{"start":{"line":3253,"column":12},"end":{"line":3253,"column":17}},{"start":{"line":3253,"column":21},"end":{"line":3253,"column":35}}]},"301":{"line":3254,"type":"binary-expr","locations":[{"start":{"line":3254,"column":20},"end":{"line":3254,"column":27}},{"start":{"line":3254,"column":31},"end":{"line":3254,"column":32}}]},"302":{"line":3285,"type":"if","locations":[{"start":{"line":3285,"column":8},"end":{"line":3285,"column":8}},{"start":{"line":3285,"column":8},"end":{"line":3285,"column":8}}]},"303":{"line":3285,"type":"binary-expr","locations":[{"start":{"line":3285,"column":12},"end":{"line":3285,"column":17}},{"start":{"line":3285,"column":21},"end":{"line":3285,"column":35}}]},"304":{"line":3286,"type":"if","locations":[{"start":{"line":3286,"column":12},"end":{"line":3286,"column":12}},{"start":{"line":3286,"column":12},"end":{"line":3286,"column":12}}]},"305":{"line":3286,"type":"binary-expr","locations":[{"start":{"line":3286,"column":24},"end":{"line":3286,"column":31}},{"start":{"line":3286,"column":35},"end":{"line":3286,"column":36}}]},"306":{"line":3309,"type":"if","locations":[{"start":{"line":3309,"column":4},"end":{"line":3309,"column":4}},{"start":{"line":3309,"column":4},"end":{"line":3309,"column":4}}]},"307":{"line":3317,"type":"binary-expr","locations":[{"start":{"line":3317,"column":16},"end":{"line":3317,"column":31}},{"start":{"line":3317,"column":35},"end":{"line":3317,"column":40}}]},"308":{"line":3344,"type":"if","locations":[{"start":{"line":3344,"column":4},"end":{"line":3344,"column":4}},{"start":{"line":3344,"column":4},"end":{"line":3344,"column":4}}]},"309":{"line":3345,"type":"binary-expr","locations":[{"start":{"line":3345,"column":20},"end":{"line":3345,"column":37}},{"start":{"line":3345,"column":41},"end":{"line":3345,"column":52}}]},"310":{"line":3349,"type":"if","locations":[{"start":{"line":3349,"column":8},"end":{"line":3349,"column":8}},{"start":{"line":3349,"column":8},"end":{"line":3349,"column":8}}]},"311":{"line":3409,"type":"cond-expr","locations":[{"start":{"line":3409,"column":37},"end":{"line":3409,"column":39}},{"start":{"line":3409,"column":42},"end":{"line":3409,"column":45}}]},"312":{"line":3415,"type":"binary-expr","locations":[{"start":{"line":3415,"column":14},"end":{"line":3415,"column":17}},{"start":{"line":3415,"column":21},"end":{"line":3415,"column":34}}]},"313":{"line":3593,"type":"binary-expr","locations":[{"start":{"line":3593,"column":14},"end":{"line":3593,"column":17}},{"start":{"line":3593,"column":21},"end":{"line":3593,"column":36}}]},"314":{"line":3626,"type":"binary-expr","locations":[{"start":{"line":3626,"column":19},"end":{"line":3626,"column":49}},{"start":{"line":3626,"column":54},"end":{"line":3626,"column":68}}]},"315":{"line":3636,"type":"binary-expr","locations":[{"start":{"line":3636,"column":9},"end":{"line":3636,"column":14}},{"start":{"line":3636,"column":18},"end":{"line":3636,"column":21}},{"start":{"line":3636,"column":25},"end":{"line":3636,"column":38}}]},"316":{"line":3638,"type":"binary-expr","locations":[{"start":{"line":3638,"column":10},"end":{"line":3638,"column":13}},{"start":{"line":3638,"column":17},"end":{"line":3638,"column":29}}]},"317":{"line":3640,"type":"binary-expr","locations":[{"start":{"line":3640,"column":11},"end":{"line":3640,"column":14}},{"start":{"line":3640,"column":18},"end":{"line":3640,"column":26}}]},"318":{"line":3653,"type":"binary-expr","locations":[{"start":{"line":3653,"column":15},"end":{"line":3653,"column":19}},{"start":{"line":3653,"column":24},"end":{"line":3653,"column":65}}]},"319":{"line":3655,"type":"if","locations":[{"start":{"line":3655,"column":4},"end":{"line":3655,"column":4}},{"start":{"line":3655,"column":4},"end":{"line":3655,"column":4}}]},"320":{"line":3657,"type":"if","locations":[{"start":{"line":3657,"column":8},"end":{"line":3657,"column":8}},{"start":{"line":3657,"column":8},"end":{"line":3657,"column":8}}]},"321":{"line":3659,"type":"if","locations":[{"start":{"line":3659,"column":15},"end":{"line":3659,"column":15}},{"start":{"line":3659,"column":15},"end":{"line":3659,"column":15}}]},"322":{"line":3661,"type":"if","locations":[{"start":{"line":3661,"column":15},"end":{"line":3661,"column":15}},{"start":{"line":3661,"column":15},"end":{"line":3661,"column":15}}]},"323":{"line":3663,"type":"if","locations":[{"start":{"line":3663,"column":15},"end":{"line":3663,"column":15}},{"start":{"line":3663,"column":15},"end":{"line":3663,"column":15}}]},"324":{"line":3665,"type":"if","locations":[{"start":{"line":3665,"column":15},"end":{"line":3665,"column":15}},{"start":{"line":3665,"column":15},"end":{"line":3665,"column":15}}]},"325":{"line":3667,"type":"if","locations":[{"start":{"line":3667,"column":15},"end":{"line":3667,"column":15}},{"start":{"line":3667,"column":15},"end":{"line":3667,"column":15}}]},"326":{"line":3672,"type":"if","locations":[{"start":{"line":3672,"column":8},"end":{"line":3672,"column":8}},{"start":{"line":3672,"column":8},"end":{"line":3672,"column":8}}]},"327":{"line":3675,"type":"if","locations":[{"start":{"line":3675,"column":8},"end":{"line":3675,"column":8}},{"start":{"line":3675,"column":8},"end":{"line":3675,"column":8}}]},"328":{"line":3678,"type":"if","locations":[{"start":{"line":3678,"column":8},"end":{"line":3678,"column":8}},{"start":{"line":3678,"column":8},"end":{"line":3678,"column":8}}]},"329":{"line":3683,"type":"if","locations":[{"start":{"line":3683,"column":8},"end":{"line":3683,"column":8}},{"start":{"line":3683,"column":8},"end":{"line":3683,"column":8}}]},"330":{"line":3683,"type":"binary-expr","locations":[{"start":{"line":3683,"column":12},"end":{"line":3683,"column":13}},{"start":{"line":3683,"column":17},"end":{"line":3683,"column":21}}]},"331":{"line":3687,"type":"if","locations":[{"start":{"line":3687,"column":12},"end":{"line":3687,"column":12}},{"start":{"line":3687,"column":12},"end":{"line":3687,"column":12}}]},"332":{"line":3689,"type":"if","locations":[{"start":{"line":3689,"column":16},"end":{"line":3689,"column":16}},{"start":{"line":3689,"column":16},"end":{"line":3689,"column":16}}]},"333":{"line":3689,"type":"binary-expr","locations":[{"start":{"line":3689,"column":20},"end":{"line":3689,"column":21}},{"start":{"line":3689,"column":25},"end":{"line":3689,"column":29}}]},"334":{"line":3695,"type":"if","locations":[{"start":{"line":3695,"column":12},"end":{"line":3695,"column":12}},{"start":{"line":3695,"column":12},"end":{"line":3695,"column":12}}]},"335":{"line":3695,"type":"binary-expr","locations":[{"start":{"line":3695,"column":16},"end":{"line":3695,"column":36}},{"start":{"line":3695,"column":40},"end":{"line":3695,"column":69}}]},"336":{"line":3699,"type":"if","locations":[{"start":{"line":3699,"column":16},"end":{"line":3699,"column":16}},{"start":{"line":3699,"column":16},"end":{"line":3699,"column":16}}]},"337":{"line":3699,"type":"binary-expr","locations":[{"start":{"line":3699,"column":20},"end":{"line":3699,"column":21}},{"start":{"line":3699,"column":25},"end":{"line":3699,"column":29}}]},"338":{"line":3707,"type":"if","locations":[{"start":{"line":3707,"column":16},"end":{"line":3707,"column":16}},{"start":{"line":3707,"column":16},"end":{"line":3707,"column":16}}]},"339":{"line":3707,"type":"binary-expr","locations":[{"start":{"line":3707,"column":20},"end":{"line":3707,"column":21}},{"start":{"line":3707,"column":25},"end":{"line":3707,"column":29}}]},"340":{"line":3712,"type":"if","locations":[{"start":{"line":3712,"column":16},"end":{"line":3712,"column":16}},{"start":{"line":3712,"column":16},"end":{"line":3712,"column":16}}]},"341":{"line":3716,"type":"if","locations":[{"start":{"line":3716,"column":16},"end":{"line":3716,"column":16}},{"start":{"line":3716,"column":16},"end":{"line":3716,"column":16}}]},"342":{"line":3719,"type":"if","locations":[{"start":{"line":3719,"column":20},"end":{"line":3719,"column":20}},{"start":{"line":3719,"column":20},"end":{"line":3719,"column":20}}]},"343":{"line":3719,"type":"binary-expr","locations":[{"start":{"line":3719,"column":24},"end":{"line":3719,"column":25}},{"start":{"line":3719,"column":29},"end":{"line":3719,"column":33}}]},"344":{"line":3723,"type":"if","locations":[{"start":{"line":3723,"column":16},"end":{"line":3723,"column":16}},{"start":{"line":3723,"column":16},"end":{"line":3723,"column":16}}]},"345":{"line":3724,"type":"if","locations":[{"start":{"line":3724,"column":20},"end":{"line":3724,"column":20}},{"start":{"line":3724,"column":20},"end":{"line":3724,"column":20}}]},"346":{"line":3728,"type":"if","locations":[{"start":{"line":3728,"column":20},"end":{"line":3728,"column":20}},{"start":{"line":3728,"column":20},"end":{"line":3728,"column":20}}]},"347":{"line":3728,"type":"binary-expr","locations":[{"start":{"line":3728,"column":24},"end":{"line":3728,"column":25}},{"start":{"line":3728,"column":29},"end":{"line":3728,"column":33}}]},"348":{"line":3733,"type":"if","locations":[{"start":{"line":3733,"column":16},"end":{"line":3733,"column":16}},{"start":{"line":3733,"column":16},"end":{"line":3733,"column":16}}]},"349":{"line":3735,"type":"if","locations":[{"start":{"line":3735,"column":20},"end":{"line":3735,"column":20}},{"start":{"line":3735,"column":20},"end":{"line":3735,"column":20}}]},"350":{"line":3735,"type":"binary-expr","locations":[{"start":{"line":3735,"column":24},"end":{"line":3735,"column":25}},{"start":{"line":3735,"column":29},"end":{"line":3735,"column":33}}]},"351":{"line":3738,"type":"if","locations":[{"start":{"line":3738,"column":20},"end":{"line":3738,"column":20}},{"start":{"line":3738,"column":20},"end":{"line":3738,"column":20}}]},"352":{"line":3742,"type":"if","locations":[{"start":{"line":3742,"column":20},"end":{"line":3742,"column":20}},{"start":{"line":3742,"column":20},"end":{"line":3742,"column":20}}]},"353":{"line":3750,"type":"if","locations":[{"start":{"line":3750,"column":12},"end":{"line":3750,"column":12}},{"start":{"line":3750,"column":12},"end":{"line":3750,"column":12}}]},"354":{"line":3750,"type":"binary-expr","locations":[{"start":{"line":3750,"column":16},"end":{"line":3750,"column":17}},{"start":{"line":3750,"column":21},"end":{"line":3750,"column":25}}]},"355":{"line":3756,"type":"if","locations":[{"start":{"line":3756,"column":16},"end":{"line":3756,"column":16}},{"start":{"line":3756,"column":16},"end":{"line":3756,"column":16}}]},"356":{"line":3756,"type":"binary-expr","locations":[{"start":{"line":3756,"column":20},"end":{"line":3756,"column":21}},{"start":{"line":3756,"column":25},"end":{"line":3756,"column":29}},{"start":{"line":3756,"column":33},"end":{"line":3756,"column":37}}]},"357":{"line":3759,"type":"if","locations":[{"start":{"line":3759,"column":20},"end":{"line":3759,"column":20}},{"start":{"line":3759,"column":20},"end":{"line":3759,"column":20}}]},"358":{"line":3764,"type":"if","locations":[{"start":{"line":3764,"column":20},"end":{"line":3764,"column":20}},{"start":{"line":3764,"column":20},"end":{"line":3764,"column":20}}]},"359":{"line":3772,"type":"if","locations":[{"start":{"line":3772,"column":8},"end":{"line":3772,"column":8}},{"start":{"line":3772,"column":8},"end":{"line":3772,"column":8}}]},"360":{"line":3772,"type":"binary-expr","locations":[{"start":{"line":3772,"column":12},"end":{"line":3772,"column":13}},{"start":{"line":3772,"column":17},"end":{"line":3772,"column":21}}]},"361":{"line":3778,"type":"if","locations":[{"start":{"line":3778,"column":12},"end":{"line":3778,"column":12}},{"start":{"line":3778,"column":12},"end":{"line":3778,"column":12}}]},"362":{"line":3778,"type":"binary-expr","locations":[{"start":{"line":3778,"column":16},"end":{"line":3778,"column":17}},{"start":{"line":3778,"column":21},"end":{"line":3778,"column":25}}]},"363":{"line":3782,"type":"if","locations":[{"start":{"line":3782,"column":12},"end":{"line":3782,"column":12}},{"start":{"line":3782,"column":12},"end":{"line":3782,"column":12}}]},"364":{"line":3782,"type":"binary-expr","locations":[{"start":{"line":3782,"column":16},"end":{"line":3782,"column":17}},{"start":{"line":3782,"column":21},"end":{"line":3782,"column":25}}]},"365":{"line":3785,"type":"if","locations":[{"start":{"line":3785,"column":12},"end":{"line":3785,"column":12}},{"start":{"line":3785,"column":12},"end":{"line":3785,"column":12}}]},"366":{"line":3790,"type":"if","locations":[{"start":{"line":3790,"column":8},"end":{"line":3790,"column":8}},{"start":{"line":3790,"column":8},"end":{"line":3790,"column":8}}]},"367":{"line":3792,"type":"if","locations":[{"start":{"line":3792,"column":12},"end":{"line":3792,"column":12}},{"start":{"line":3792,"column":12},"end":{"line":3792,"column":12}}]},"368":{"line":3794,"type":"if","locations":[{"start":{"line":3794,"column":16},"end":{"line":3794,"column":16}},{"start":{"line":3794,"column":16},"end":{"line":3794,"column":16}}]},"369":{"line":3794,"type":"binary-expr","locations":[{"start":{"line":3794,"column":20},"end":{"line":3794,"column":21}},{"start":{"line":3794,"column":25},"end":{"line":3794,"column":29}}]},"370":{"line":3798,"type":"if","locations":[{"start":{"line":3798,"column":16},"end":{"line":3798,"column":16}},{"start":{"line":3798,"column":16},"end":{"line":3798,"column":16}}]},"371":{"line":3798,"type":"binary-expr","locations":[{"start":{"line":3798,"column":20},"end":{"line":3798,"column":21}},{"start":{"line":3798,"column":25},"end":{"line":3798,"column":29}}]},"372":{"line":3802,"type":"if","locations":[{"start":{"line":3802,"column":16},"end":{"line":3802,"column":16}},{"start":{"line":3802,"column":16},"end":{"line":3802,"column":16}}]},"373":{"line":3805,"type":"if","locations":[{"start":{"line":3805,"column":20},"end":{"line":3805,"column":20}},{"start":{"line":3805,"column":20},"end":{"line":3805,"column":20}}]},"374":{"line":3805,"type":"binary-expr","locations":[{"start":{"line":3805,"column":24},"end":{"line":3805,"column":25}},{"start":{"line":3805,"column":29},"end":{"line":3805,"column":33}}]},"375":{"line":3811,"type":"if","locations":[{"start":{"line":3811,"column":16},"end":{"line":3811,"column":16}},{"start":{"line":3811,"column":16},"end":{"line":3811,"column":16}}]},"376":{"line":3817,"type":"if","locations":[{"start":{"line":3817,"column":16},"end":{"line":3817,"column":16}},{"start":{"line":3817,"column":16},"end":{"line":3817,"column":16}}]},"377":{"line":3817,"type":"binary-expr","locations":[{"start":{"line":3817,"column":20},"end":{"line":3817,"column":21}},{"start":{"line":3817,"column":26},"end":{"line":3817,"column":30}},{"start":{"line":3817,"column":34},"end":{"line":3817,"column":38}}]},"378":{"line":3818,"type":"binary-expr","locations":[{"start":{"line":3818,"column":37},"end":{"line":3818,"column":41}},{"start":{"line":3818,"column":45},"end":{"line":3818,"column":49}}]},"379":{"line":3822,"type":"if","locations":[{"start":{"line":3822,"column":20},"end":{"line":3822,"column":20}},{"start":{"line":3822,"column":20},"end":{"line":3822,"column":20}}]},"380":{"line":3825,"type":"if","locations":[{"start":{"line":3825,"column":24},"end":{"line":3825,"column":24}},{"start":{"line":3825,"column":24},"end":{"line":3825,"column":24}}]},"381":{"line":3825,"type":"binary-expr","locations":[{"start":{"line":3825,"column":28},"end":{"line":3825,"column":29}},{"start":{"line":3825,"column":33},"end":{"line":3825,"column":37}}]},"382":{"line":3827,"type":"if","locations":[{"start":{"line":3827,"column":28},"end":{"line":3827,"column":28}},{"start":{"line":3827,"column":28},"end":{"line":3827,"column":28}}]},"383":{"line":3839,"type":"if","locations":[{"start":{"line":3839,"column":4},"end":{"line":3839,"column":4}},{"start":{"line":3839,"column":4},"end":{"line":3839,"column":4}}]},"384":{"line":3839,"type":"binary-expr","locations":[{"start":{"line":3839,"column":8},"end":{"line":3839,"column":11}},{"start":{"line":3839,"column":15},"end":{"line":3839,"column":18}},{"start":{"line":3839,"column":22},"end":{"line":3839,"column":49}}]},"385":{"line":3839,"type":"binary-expr","locations":[{"start":{"line":3839,"column":24},"end":{"line":3839,"column":32}},{"start":{"line":3839,"column":36},"end":{"line":3839,"column":48}}]},"386":{"line":3840,"type":"binary-expr","locations":[{"start":{"line":3840,"column":27},"end":{"line":3840,"column":48}},{"start":{"line":3840,"column":55},"end":{"line":3840,"column":80}},{"start":{"line":3840,"column":86},"end":{"line":3840,"column":110}}]},"387":{"line":3844,"type":"if","locations":[{"start":{"line":3844,"column":4},"end":{"line":3844,"column":4}},{"start":{"line":3844,"column":4},"end":{"line":3844,"column":4}}]},"388":{"line":3846,"type":"if","locations":[{"start":{"line":3846,"column":8},"end":{"line":3846,"column":8}},{"start":{"line":3846,"column":8},"end":{"line":3846,"column":8}}]},"389":{"line":3848,"type":"if","locations":[{"start":{"line":3848,"column":12},"end":{"line":3848,"column":12}},{"start":{"line":3848,"column":12},"end":{"line":3848,"column":12}}]},"390":{"line":3848,"type":"binary-expr","locations":[{"start":{"line":3848,"column":16},"end":{"line":3848,"column":32}},{"start":{"line":3848,"column":36},"end":{"line":3848,"column":57}}]},"391":{"line":3863,"type":"binary-expr","locations":[{"start":{"line":3863,"column":7},"end":{"line":3863,"column":17}},{"start":{"line":3863,"column":21},"end":{"line":3863,"column":38}}]},"392":{"line":3888,"type":"if","locations":[{"start":{"line":3888,"column":4},"end":{"line":3888,"column":4}},{"start":{"line":3888,"column":4},"end":{"line":3888,"column":4}}]},"393":{"line":3900,"type":"binary-expr","locations":[{"start":{"line":3900,"column":8},"end":{"line":3900,"column":20}},{"start":{"line":3900,"column":25},"end":{"line":3900,"column":34}}]},"394":{"line":3901,"type":"binary-expr","locations":[{"start":{"line":3901,"column":8},"end":{"line":3901,"column":20}},{"start":{"line":3901,"column":25},"end":{"line":3901,"column":34}}]},"395":{"line":3903,"type":"if","locations":[{"start":{"line":3903,"column":8},"end":{"line":3903,"column":8}},{"start":{"line":3903,"column":8},"end":{"line":3903,"column":8}}]},"396":{"line":3907,"type":"if","locations":[{"start":{"line":3907,"column":8},"end":{"line":3907,"column":8}},{"start":{"line":3907,"column":8},"end":{"line":3907,"column":8}}]}},"code":["(function () { /**","The YUI module contains the components required for building the YUI seed file.","This includes the script loading mechanism, a simple queue, and the core","utilities for the library.","","@module yui","@main yui","@submodule yui-base","**/","","/*jshint eqeqeq: false*/","if (typeof YUI != 'undefined') {"," YUI._YUI = YUI;","}","","/**","The YUI global namespace object. This is the constructor for all YUI instances.","","This is a self-instantiable factory function, meaning you don't need to precede","it with the `new` operator. You can invoke it directly like this:",""," YUI().use('*', function (Y) {"," // Y is a new YUI instance."," });","","But it also works like this:",""," var Y = YUI();","","The `YUI` constructor accepts an optional config object, like this:",""," YUI({"," debug: true,"," combine: false"," }).use('node', function (Y) {"," // Y.Node is ready to use."," });","","See the API docs for the Config class for the complete","list of supported configuration properties accepted by the YUI constuctor.","","If a global `YUI` object is already defined, the existing YUI object will not be","overwritten, to ensure that defined namespaces are preserved.","","Each YUI instance has full custom event support, but only if the event system is","available.","","@class YUI","@uses EventTarget","@constructor","@global","@param {Object} [config]* Zero or more optional configuration objects. Config"," values are stored in the `Y.config` property. See the"," Config docs for the list of supported properties.","**/",""," /*global YUI*/"," /*global YUI_config*/"," var YUI = function() {"," var i = 0,"," Y = this,"," args = arguments,"," l = args.length,"," instanceOf = function(o, type) {"," return (o && o.hasOwnProperty && (o instanceof type));"," },"," gconf = (typeof YUI_config !== 'undefined') && YUI_config;",""," if (!(instanceOf(Y, YUI))) {"," Y = new YUI();"," } else {"," // set up the core environment"," Y._init();",""," /**"," Master configuration that might span multiple contexts in a non-"," browser environment. It is applied first to all instances in all"," contexts.",""," @example",""," YUI.GlobalConfig = {"," filter: 'debug'"," };",""," YUI().use('node', function (Y) {"," // debug files used here"," });",""," YUI({"," filter: 'min'"," }).use('node', function (Y) {"," // min files used here"," });",""," @property {Object} GlobalConfig"," @global"," @static"," **/"," if (YUI.GlobalConfig) {"," Y.applyConfig(YUI.GlobalConfig);"," }",""," /**"," Page-level config applied to all YUI instances created on the"," current page. This is applied after `YUI.GlobalConfig` and before"," any instance-level configuration.",""," @example",""," // Single global var to include before YUI seed file"," YUI_config = {"," filter: 'debug'"," };",""," YUI().use('node', function (Y) {"," // debug files used here"," });",""," YUI({"," filter: 'min'"," }).use('node', function (Y) {"," // min files used here"," });",""," @property {Object} YUI_config"," @global"," **/"," if (gconf) {"," Y.applyConfig(gconf);"," }",""," // bind the specified additional modules for this instance"," if (!l) {"," Y._setup();"," }"," }",""," if (l) {"," // Each instance can accept one or more configuration objects."," // These are applied after YUI.GlobalConfig and YUI_Config,"," // overriding values set in those config files if there is a"," // matching property."," for (; i < l; i++) {"," Y.applyConfig(args[i]);"," }",""," Y._setup();"," }",""," Y.instanceOf = instanceOf;",""," return Y;"," };","","(function() {",""," var proto, prop,"," VERSION = '3.17.2',"," PERIOD = '.',"," BASE = 'http://yui.yahooapis.com/',"," /*"," These CSS class names can't be generated by"," getClassName since it is not available at the"," time they are being used."," */"," DOC_LABEL = 'yui3-js-enabled',"," CSS_STAMP_EL = 'yui3-css-stamp',"," NOOP = function() {},"," SLICE = Array.prototype.slice,"," APPLY_TO_AUTH = { 'io.xdrReady': 1, // the functions applyTo"," 'io.xdrResponse': 1, // can call. this should"," 'SWF.eventHandler': 1 }, // be done at build time"," hasWin = (typeof window != 'undefined'),"," win = (hasWin) ? window : null,"," doc = (hasWin) ? win.document : null,"," docEl = doc && doc.documentElement,"," docClass = docEl && docEl.className,"," instances = {},"," time = new Date().getTime(),"," add = function(el, type, fn, capture) {"," if (el && el.addEventListener) {"," el.addEventListener(type, fn, capture);"," } else if (el && el.attachEvent) {"," el.attachEvent('on' + type, fn);"," }"," },"," remove = function(el, type, fn, capture) {"," if (el && el.removeEventListener) {"," // this can throw an uncaught exception in FF"," try {"," el.removeEventListener(type, fn, capture);"," } catch (ex) {}"," } else if (el && el.detachEvent) {"," el.detachEvent('on' + type, fn);"," }"," },"," handleReady = function() {"," YUI.Env.DOMReady = true;"," if (hasWin) {"," remove(doc, 'DOMContentLoaded', handleReady);"," } "," },"," handleLoad = function() {"," YUI.Env.windowLoaded = true;"," YUI.Env.DOMReady = true;"," if (hasWin) {"," remove(window, 'load', handleLoad);"," }"," },"," getLoader = function(Y, o) {"," var loader = Y.Env._loader,"," lCore = [ 'loader-base' ],"," G_ENV = YUI.Env,"," mods = G_ENV.mods;",""," if (loader) {"," //loader._config(Y.config);"," loader.ignoreRegistered = false;"," loader.onEnd = null;"," loader.data = null;"," loader.required = [];"," loader.loadType = null;"," } else {"," loader = new Y.Loader(Y.config);"," Y.Env._loader = loader;"," }"," if (mods && mods.loader) {"," lCore = [].concat(lCore, YUI.Env.loaderExtras);"," }"," YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, lCore));",""," return loader;"," },",""," clobber = function(r, s) {"," for (var i in s) {"," if (s.hasOwnProperty(i)) {"," r[i] = s[i];"," }"," }"," },",""," ALREADY_DONE = { success: true };","","// Stamp the documentElement (HTML) with a class of \"yui-loaded\" to","// enable styles that need to key off of JS being enabled.","if (docEl && docClass.indexOf(DOC_LABEL) == -1) {"," if (docClass) {"," docClass += ' ';"," }"," docClass += DOC_LABEL;"," docEl.className = docClass;","}","","if (VERSION.indexOf('@') > -1) {"," VERSION = '3.5.0'; // dev time hack for cdn test","}","","proto = {"," /**"," Applies a new configuration object to the config of this YUI instance. This"," will merge new group/module definitions, and will also update the loader"," cache if necessary. Updating `Y.config` directly will not update the cache.",""," @method applyConfig"," @param {Object} o the configuration object."," @since 3.2.0"," **/"," applyConfig: function(o) {",""," o = o || NOOP;",""," var attr,"," name,"," // detail,"," config = this.config,"," mods = config.modules,"," groups = config.groups,"," aliases = config.aliases,"," loader = this.Env._loader;",""," for (name in o) {"," if (o.hasOwnProperty(name)) {"," attr = o[name];"," if (mods && name == 'modules') {"," clobber(mods, attr);"," } else if (aliases && name == 'aliases') {"," clobber(aliases, attr);"," } else if (groups && name == 'groups') {"," clobber(groups, attr);"," } else if (name == 'win') {"," config[name] = (attr && attr.contentWindow) || attr;"," config.doc = config[name] ? config[name].document : null;"," } else if (name == '_yuid') {"," // preserve the guid"," } else {"," config[name] = attr;"," }"," }"," }",""," if (loader) {"," loader._config(o);"," }",""," },",""," /**"," Old way to apply a config to this instance (calls `applyConfig` under the"," hood).",""," @private"," @method _config"," @param {Object} o The config to apply"," **/"," _config: function(o) {"," this.applyConfig(o);"," },",""," /**"," Initializes this YUI instance.",""," @private"," @method _init"," **/"," _init: function() {"," var filter, el,"," Y = this,"," G_ENV = YUI.Env,"," Env = Y.Env,"," prop;",""," /**"," The version number of this YUI instance.",""," This value is typically updated by a script when a YUI release is built,"," so it may not reflect the correct version number when YUI is run from"," the development source tree.",""," @property {String} version"," **/"," Y.version = VERSION;",""," if (!Env) {"," Y.Env = {"," core: ['get', 'features', 'intl-base', 'yui-log', 'yui-later'],"," loaderExtras: ['loader-rollup', 'loader-yui3'],"," mods: {}, // flat module map"," versions: {}, // version module map"," base: BASE,"," cdn: BASE + VERSION + '/build/',"," // bootstrapped: false,"," _idx: 0,"," _used: {},"," _attached: {},"," _exported: {},"," _missed: [],"," _yidx: 0,"," _uidx: 0,"," _guidp: 'y',"," _loaded: {},"," // serviced: {},"," // Regex in English:"," // I'll start at the \\b(yui)."," // 1. Look in the test string for \"yui\" or"," // \"yui-base\" or \"yui-davglass\" or \"yui-foobar\" that comes after a word break. That is, it"," // can't match \"foyui\" or \"i_heart_yui\". This can be anywhere in the string."," // 2. After #1 must come a forward slash followed by the string matched in #1, so"," // \"yui-base/yui-base\" or \"yui-pants/yui-pants\"."," // 3. The second occurence of the #1 token can optionally be followed by \"-debug\" or \"-min\","," // so \"yui/yui-min\", \"yui/yui-debug\", \"yui-base/yui-base-debug\". NOT \"yui/yui-tshirt\"."," // 4. This is followed by \".js\", so \"yui/yui.js\"."," // 0. Going back to the beginning, now. If all that stuff in 1-4 comes after a \"?\" in the string,"," // then capture the junk between the LAST \"&\" and the string in 1-4. So"," // \"blah?foo/yui/yui.js\" will capture \"foo/\" and \"blah?some/thing.js&3.3.0/build/yui-davglass/yui-davglass.js\""," // will capture \"3.3.0/build/\""," //"," // Regex Exploded:"," // (?:\\? Find a ?"," // (?:[^&]*&) followed by 0..n characters followed by an &"," // * in fact, find as many sets of characters followed by a & as you can"," // ([^&]*) capture the stuff after the last & in \\1"," // )? but it's ok if all this ?junk&more_junk stuff isn't even there"," // \\b( after a word break find either the string"," // yui(?:-\\w+)? \"yui\" optionally followed by a -, then more characters"," // ) and store the yui-* string in \\2"," // \\/\\2 then comes a / followed by the yui-* string in \\2"," // (?:-(min|debug))? optionally followed by \"-min\" or \"-debug\""," // .js and ending in \".js\""," _BASE_RE: /(?:\\?(?:[^&]*&)*([^&]*))?\\b(yui(?:-\\w+)?)\\/\\2(?:-(min|debug))?\\.js/,"," parseBasePath: function(src, pattern) {"," var match = src.match(pattern),"," path, filter;",""," if (match) {"," path = RegExp.leftContext || src.slice(0, src.indexOf(match[0]));",""," // this is to set up the path to the loader. The file"," // filter for loader should match the yui include."," filter = match[3];",""," // extract correct path for mixed combo urls"," // http://yuilibrary.com/projects/yui3/ticket/2528423"," if (match[1]) {"," path += '?' + match[1];"," }"," path = {"," filter: filter,"," path: path"," };"," }"," return path;"," },"," getBase: G_ENV && G_ENV.getBase ||"," function(pattern) {"," var nodes = (doc && doc.getElementsByTagName('script')) || [],"," path = Env.cdn, parsed,"," i, len, src;",""," for (i = 0, len = nodes.length; i < len; ++i) {"," src = nodes[i].src;"," if (src) {"," parsed = Y.Env.parseBasePath(src, pattern);"," if (parsed) {"," filter = parsed.filter;"," path = parsed.path;"," break;"," }"," }"," }",""," // use CDN default"," return path;"," }",""," };",""," Env = Y.Env;",""," Env._loaded[VERSION] = {};",""," if (G_ENV && Y !== YUI) {"," Env._yidx = ++G_ENV._yidx;"," Env._guidp = ('yui_' + VERSION + '_' +"," Env._yidx + '_' + time).replace(/[^a-z0-9_]+/g, '_');"," } else if (YUI._YUI) {",""," G_ENV = YUI._YUI.Env;"," Env._yidx += G_ENV._yidx;"," Env._uidx += G_ENV._uidx;",""," for (prop in G_ENV) {"," if (!(prop in Env)) {"," Env[prop] = G_ENV[prop];"," }"," }",""," delete YUI._YUI;"," }",""," Y.id = Y.stamp(Y);"," instances[Y.id] = Y;",""," }",""," Y.constructor = YUI;",""," // configuration defaults"," Y.config = Y.config || {"," bootstrap: true,"," cacheUse: true,"," debug: true,"," doc: doc,"," fetchCSS: true,"," throwFail: true,"," useBrowserConsole: true,"," useNativeES5: true,"," win: win,"," global: Function('return this')()"," };",""," //Register the CSS stamp element"," if (doc && !doc.getElementById(CSS_STAMP_EL)) {"," el = doc.createElement('div');"," el.innerHTML = '';"," YUI.Env.cssStampEl = el.firstChild;"," if (doc.body) {"," doc.body.appendChild(YUI.Env.cssStampEl);"," } else {"," docEl.insertBefore(YUI.Env.cssStampEl, docEl.firstChild);"," }"," } else if (doc && doc.getElementById(CSS_STAMP_EL) && !YUI.Env.cssStampEl) {"," YUI.Env.cssStampEl = doc.getElementById(CSS_STAMP_EL);"," }",""," Y.config.lang = Y.config.lang || 'en-US';",""," Y.config.base = YUI.config.base || Y.Env.getBase(Y.Env._BASE_RE);",""," if (!filter || (!('mindebug').indexOf(filter))) {"," filter = 'min';"," }"," filter = (filter) ? '-' + filter : filter;"," Y.config.loaderPath = YUI.config.loaderPath || 'loader/loader' + filter + '.js';",""," },",""," /**"," Finishes the instance setup. Attaches whatever YUI modules were defined"," at the time that this instance was created.",""," @method _setup"," @private"," **/"," _setup: function() {"," var i, Y = this,"," core = [],"," mods = YUI.Env.mods,"," extras = Y.config.core || [].concat(YUI.Env.core); //Clone it..",""," for (i = 0; i < extras.length; i++) {"," if (mods[extras[i]]) {"," core.push(extras[i]);"," }"," }",""," Y._attach(['yui-base']);"," Y._attach(core);",""," if (Y.Loader) {"," getLoader(Y);"," }",""," },",""," /**"," Executes the named method on the specified YUI instance if that method is"," whitelisted.",""," @method applyTo"," @param {String} id YUI instance id."," @param {String} method Name of the method to execute. For example:"," 'Object.keys'."," @param {Array} args Arguments to apply to the method."," @return {Mixed} Return value from the applied method, or `null` if the"," specified instance was not found or the method was not whitelisted."," **/"," applyTo: function(id, method, args) {"," if (!(method in APPLY_TO_AUTH)) {"," this.log(method + ': applyTo not allowed', 'warn', 'yui');"," return null;"," }",""," var instance = instances[id], nest, m, i;"," if (instance) {"," nest = method.split('.');"," m = instance;"," for (i = 0; i < nest.length; i = i + 1) {"," m = m[nest[i]];"," if (!m) {"," this.log('applyTo not found: ' + method, 'warn', 'yui');"," }"," }"," return m && m.apply(instance, args);"," }",""," return null;"," },","","/**","Registers a YUI module and makes it available for use in a `YUI().use()` call or","as a dependency for other modules.","","The easiest way to create a first-class YUI module is to use","Shifter, the YUI component build","tool.","","Shifter will automatically wrap your module code in a `YUI.add()` call along","with any configuration info required for the module.","","@example",""," YUI.add('davglass', function (Y) {"," Y.davglass = function () {"," };"," }, '3.4.0', {"," requires: ['harley-davidson', 'mt-dew']"," });","","@method add","@param {String} name Module name.","@param {Function} fn Function containing module code. This function will be"," executed whenever the module is attached to a specific YUI instance.",""," @param {YUI} fn.Y The YUI instance to which this module is attached."," @param {String} fn.name Name of the module","","@param {String} version Module version number. This is currently used only for"," informational purposes, and is not used internally by YUI.","","@param {Object} [details] Module config."," @param {Array} [details.requires] Array of other module names that must be"," attached before this module can be attached."," @param {Array} [details.optional] Array of optional module names that should"," be attached before this module is attached if they've already been"," loaded. If the `loadOptional` YUI option is `true`, optional modules"," that have not yet been loaded will be loaded just as if they were hard"," requirements."," @param {Array} [details.use] Array of module names that are included within"," or otherwise provided by this module, and which should be attached"," automatically when this module is attached. This makes it possible to"," create \"virtual rollup\" modules that simply attach a collection of other"," modules or submodules.","","@return {YUI} This YUI instance.","**/"," add: function(name, fn, version, details) {"," details = details || {};"," var env = YUI.Env,"," mod = {"," name: name,"," fn: fn,"," version: version,"," details: details"," },"," //Instance hash so we don't apply it to the same instance twice"," applied = {},"," loader, inst, modInfo,"," i, versions = env.versions;",""," env.mods[name] = mod;"," versions[version] = versions[version] || {};"," versions[version][name] = mod;",""," for (i in instances) {"," if (instances.hasOwnProperty(i)) {"," inst = instances[i];"," if (!applied[inst.id]) {"," applied[inst.id] = true;"," loader = inst.Env._loader;"," if (loader) {"," modInfo = loader.getModuleInfo(name);"," if (!modInfo || modInfo.temp) {"," loader.addModule(details, name);"," }"," }"," }"," }"," }",""," return this;"," },",""," /**"," Executes the callback function associated with each required module,"," attaching the module to this YUI instance.",""," @method _attach"," @param {Array} r The array of modules to attach"," @param {Boolean} [moot=false] If `true`, don't throw a warning if the module"," is not attached."," @private"," **/"," _attach: function(r, moot) {"," var i, name, mod, details, req, use, after,"," mods = YUI.Env.mods,"," aliases = YUI.Env.aliases,"," Y = this, j,"," cache = YUI.Env._renderedMods,"," loader = Y.Env._loader,"," done = Y.Env._attached,"," exported = Y.Env._exported,"," len = r.length, loader, def, go,"," c = [],"," modArgs, esCompat, reqlen, modInfo,"," condition,"," __exports__, __imports__;",""," //Check for conditional modules (in a second+ instance) and add their requirements"," //TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass"," for (i = 0; i < len; i++) {"," name = r[i];"," mod = mods[name];"," c.push(name);"," if (loader && loader.conditions[name]) {"," for (j in loader.conditions[name]) {"," if (loader.conditions[name].hasOwnProperty(j)) {"," def = loader.conditions[name][j];"," go = def && ((def.ua && Y.UA[def.ua]) || (def.test && def.test(Y)));"," if (go) {"," c.push(def.name);"," }"," }"," }"," }"," }"," r = c;"," len = r.length;",""," for (i = 0; i < len; i++) {"," if (!done[r[i]]) {"," name = r[i];"," mod = mods[name];",""," if (aliases && aliases[name] && !mod) {"," Y._attach(aliases[name]);"," continue;"," }"," if (!mod) {"," modInfo = loader && loader.getModuleInfo(name);"," if (modInfo) {"," mod = modInfo;"," moot = true;"," }","",""," //if (!loader || !loader.moduleInfo[name]) {"," //if ((!loader || !loader.moduleInfo[name]) && !moot) {"," if (!moot && name) {"," if ((name.indexOf('skin-') === -1) && (name.indexOf('css') === -1)) {"," Y.Env._missed.push(name);"," Y.Env._missed = Y.Array.dedupe(Y.Env._missed);"," Y.message('NOT loaded: ' + name, 'warn', 'yui');"," }"," }"," } else {"," done[name] = true;"," //Don't like this, but in case a mod was asked for once, then we fetch it"," //We need to remove it from the missed list ^davglass"," for (j = 0; j < Y.Env._missed.length; j++) {"," if (Y.Env._missed[j] === name) {"," Y.message('Found: ' + name + ' (was reported as missing earlier)', 'warn', 'yui');"," Y.Env._missed.splice(j, 1);"," }"," }",""," // Optional dependencies normally work by modifying the"," // dependency list of a module. If the dependency's test"," // passes it is added to the list. If not, it's not loaded."," // This following check ensures that optional dependencies"," // are not attached when they were already loaded into the"," // page (when bundling for example)"," if (loader && !loader._canBeAttached(name)) {"," return true;"," }",""," /*"," If it's a temp module, we need to redo it's requirements if it's already loaded"," since it may have been loaded by another instance and it's dependencies might"," have been redefined inside the fetched file."," */"," if (loader && cache && cache[name] && cache[name].temp) {"," loader.getRequires(cache[name]);"," req = [];"," modInfo = loader.getModuleInfo(name);"," for (j in modInfo.expanded_map) {"," if (modInfo.expanded_map.hasOwnProperty(j)) {"," req.push(j);"," }"," }"," Y._attach(req);"," }",""," details = mod.details;"," req = details.requires;"," esCompat = details.es;"," use = details.use;"," after = details.after;"," //Force Intl load if there is a language (Loader logic) @todo fix this shit"," if (details.lang) {"," req = req || [];"," req.unshift('intl');"," }",""," if (req) {"," reqlen = req.length;"," for (j = 0; j < reqlen; j++) {"," if (!done[req[j]]) {"," if (!Y._attach(req)) {"," return false;"," }"," break;"," }"," }"," }",""," if (after) {"," for (j = 0; j < after.length; j++) {"," if (!done[after[j]]) {"," if (!Y._attach(after, true)) {"," return false;"," }"," break;"," }"," }"," }",""," if (mod.fn) {"," modArgs = [Y, name];"," if (esCompat) {"," __imports__ = {};"," __exports__ = {};"," // passing `exports` and `imports` onto the module function"," modArgs.push(__imports__, __exports__);"," if (req) {"," reqlen = req.length;"," for (j = 0; j < reqlen; j++) {"," __imports__[req[j]] = exported.hasOwnProperty(req[j]) ? exported[req[j]] : Y;"," }"," }"," }"," if (Y.config.throwFail) {"," __exports__ = mod.fn.apply(esCompat ? undefined : mod, modArgs);"," } else {"," try {"," __exports__ = mod.fn.apply(esCompat ? undefined : mod, modArgs);"," } catch (e) {"," Y.error('Attach error: ' + name, e, name);"," return false;"," }"," }"," if (esCompat) {"," // store the `exports` in case others `es` modules requires it"," exported[name] = __exports__;",""," // If an ES module is conditionally loaded and set"," // to be used \"instead\" another module, replace the"," // trigger module's content with the conditionally"," // loaded one so the values returned by require()"," // still makes sense"," condition = mod.details.condition;"," if (condition && condition.when === 'instead') {"," exported[condition.trigger] = __exports__;"," }"," }"," }",""," if (use) {"," for (j = 0; j < use.length; j++) {"," if (!done[use[j]]) {"," if (!Y._attach(use)) {"," return false;"," }"," break;"," }"," }"," }","","",""," }"," }"," }",""," return true;"," },",""," /**"," Delays the `use` callback until another event has taken place such as"," `window.onload`, `domready`, `contentready`, or `available`.",""," @private"," @method _delayCallback"," @param {Function} cb The original `use` callback."," @param {String|Object} until Either an event name ('load', 'domready', etc.)"," or an object containing event/args keys for contentready/available."," @return {Function}"," **/"," _delayCallback: function(cb, until) {",""," var Y = this,"," mod = ['event-base'];",""," until = (Y.Lang.isObject(until) ? until : { event: until });",""," if (until.event === 'load') {"," mod.push('event-synthetic');"," }",""," return function() {"," var args = arguments;"," Y._use(mod, function() {"," Y.on(until.event, function() {"," args[1].delayUntil = until.event;"," cb.apply(Y, args);"," }, until.args);"," });"," };"," },",""," /**"," Attaches one or more modules to this YUI instance. When this is executed,"," the requirements of the desired modules are analyzed, and one of several"," things can happen:","",""," * All required modules have already been loaded, and just need to be"," attached to this YUI instance. In this case, the `use()` callback will"," be executed synchronously after the modules are attached.",""," * One or more modules have not yet been loaded, or the Get utility is not"," available, or the `bootstrap` config option is `false`. In this case,"," a warning is issued indicating that modules are missing, but all"," available modules will still be attached and the `use()` callback will"," be executed synchronously.",""," * One or more modules are missing and the Loader is not available but the"," Get utility is, and `bootstrap` is not `false`. In this case, the Get"," utility will be used to load the Loader, and we will then proceed to"," the following state:",""," * One or more modules are missing and the Loader is available. In this"," case, the Loader will be used to resolve the dependency tree for the"," missing modules and load them and their dependencies. When the Loader is"," finished loading modules, the `use()` callback will be executed"," asynchronously.",""," @example",""," // Loads and attaches dd and its dependencies."," YUI().use('dd', function (Y) {"," // ..."," });",""," // Loads and attaches dd and node as well as all of their dependencies."," YUI().use(['dd', 'node'], function (Y) {"," // ..."," });",""," // Attaches all modules that have already been loaded."," YUI().use('*', function (Y) {"," // ..."," });",""," // Attaches a gallery module."," YUI().use('gallery-yql', function (Y) {"," // ..."," });",""," // Attaches a YUI 2in3 module."," YUI().use('yui2-datatable', function (Y) {"," // ..."," });",""," @method use"," @param {String|Array} modules* One or more module names to attach."," @param {Function} [callback] Callback function to be executed once all"," specified modules and their dependencies have been attached."," @param {YUI} callback.Y The YUI instance created for this sandbox."," @param {Object} callback.status Object containing `success`, `msg` and"," `data` properties."," @chainable"," **/"," use: function() {"," var args = SLICE.call(arguments, 0),"," callback = args[args.length - 1],"," Y = this,"," i = 0,"," name,"," Env = Y.Env,"," provisioned = true;",""," // The last argument supplied to use can be a load complete callback"," if (Y.Lang.isFunction(callback)) {"," args.pop();"," if (Y.config.delayUntil) {"," callback = Y._delayCallback(callback, Y.config.delayUntil);"," }"," } else {"," callback = null;"," }"," if (Y.Lang.isArray(args[0])) {"," args = args[0];"," }",""," if (Y.config.cacheUse) {"," while ((name = args[i++])) {"," if (!Env._attached[name]) {"," provisioned = false;"," break;"," }"," }",""," if (provisioned) {"," if (args.length) {"," }"," Y._notify(callback, ALREADY_DONE, args);"," return Y;"," }"," }",""," if (Y._loading) {"," Y._useQueue = Y._useQueue || new Y.Queue();"," Y._useQueue.add([args, callback]);"," } else {"," Y._use(args, function(Y, response) {"," Y._notify(callback, response, args);"," });"," }",""," return Y;"," },",""," /**"," Sugar for loading both legacy and ES6-based YUI modules.",""," @method require"," @param {String} [modules*] List of module names to import or a single"," module name."," @param {Function} callback Callback that gets called once all the modules"," were loaded. Each parameter of the callback is the export value of the"," corresponding module in the list. If the module is a legacy YUI module,"," the YUI instance is used instead of the module exports."," @example"," ```"," YUI().require(['es6-set'], function (Y, imports) {"," var Set = imports.Set,"," set = new Set();"," });"," ```"," **/"," require: function () {"," var args = SLICE.call(arguments),"," callback;",""," if (typeof args[args.length - 1] === 'function') {"," callback = args.pop();",""," // only add the callback if one was provided"," // YUI().require('foo'); is valid"," args.push(function (Y) {"," var i, length = args.length,"," exported = Y.Env._exported,"," __imports__ = {};",""," // Get only the imports requested as arguments"," for (i = 0; i < length; i++) {"," if (exported.hasOwnProperty(args[i])) {"," __imports__[args[i]] = exported[args[i]];"," }"," }",""," // Using `undefined` because:"," // - Using `Y.config.global` would force the value of `this` to be"," // the global object even in strict mode"," // - Using `Y` goes against the goal of moving away from a shared"," // object and start thinking in terms of imported and exported"," // objects"," callback.call(undefined, Y, __imports__);"," });"," }"," // Do not return the Y object. This makes it hard to follow this"," // traditional pattern:"," // var Y = YUI().use(...);"," // This is a good idea in the light of ES6 modules, to avoid working"," // in the global scope."," // This also leaves the door open for returning a promise, once the"," // YUI loader is based on the ES6 loader which uses"," // loader.import(...).then(...)"," this.use.apply(this, args);"," },",""," /**"," Handles Loader notifications about attachment/load errors.",""," @method _notify"," @param {Function} callback Callback to pass to `Y.config.loadErrorFn`."," @param {Object} response Response returned from Loader."," @param {Array} args Arguments passed from Loader."," @private"," **/"," _notify: function(callback, response, args) {"," if (!response.success && this.config.loadErrorFn) {"," this.config.loadErrorFn.call(this, this, callback, response, args);"," } else if (callback) {"," if (this.Env._missed && this.Env._missed.length) {"," response.msg = 'Missing modules: ' + this.Env._missed.join();"," response.success = false;"," }"," if (this.config.throwFail) {"," callback(this, response);"," } else {"," try {"," callback(this, response);"," } catch (e) {"," this.error('use callback error', e, args);"," }"," }"," }"," },",""," /**"," Called from the `use` method queue to ensure that only one set of loading"," logic is performed at a time.",""," @method _use"," @param {String} args* One or more modules to attach."," @param {Function} [callback] Function to call once all required modules have"," been attached."," @private"," **/"," _use: function(args, callback) {",""," if (!this.Array) {"," this._attach(['yui-base']);"," }",""," var len, loader, handleBoot,"," Y = this,"," G_ENV = YUI.Env,"," mods = G_ENV.mods,"," Env = Y.Env,"," used = Env._used,"," aliases = G_ENV.aliases,"," queue = G_ENV._loaderQueue,"," firstArg = args[0],"," YArray = Y.Array,"," config = Y.config,"," boot = config.bootstrap,"," missing = [],"," i,"," r = [],"," ret = true,"," fetchCSS = config.fetchCSS,"," process = function(names, skip) {",""," var i = 0, a = [], name, len, m, req, use;",""," if (!names.length) {"," return;"," }",""," if (aliases) {"," len = names.length;"," for (i = 0; i < len; i++) {"," if (aliases[names[i]] && !mods[names[i]]) {"," a = [].concat(a, aliases[names[i]]);"," } else {"," a.push(names[i]);"," }"," }"," names = a;"," }",""," len = names.length;",""," for (i = 0; i < len; i++) {"," name = names[i];"," if (!skip) {"," r.push(name);"," }",""," // only attach a module once"," if (used[name]) {"," continue;"," }",""," m = mods[name];"," req = null;"," use = null;",""," if (m) {"," used[name] = true;"," req = m.details.requires;"," use = m.details.use;"," } else {"," // CSS files don't register themselves, see if it has"," // been loaded"," if (!G_ENV._loaded[VERSION][name]) {"," missing.push(name);"," } else {"," used[name] = true; // probably css"," }"," }",""," // make sure requirements are attached"," if (req && req.length) {"," process(req);"," }",""," // make sure we grab the submodule dependencies too"," if (use && use.length) {"," process(use, 1);"," }"," }",""," },",""," handleLoader = function(fromLoader) {"," var response = fromLoader || {"," success: true,"," msg: 'not dynamic'"," },"," redo, origMissing,"," ret = true,"," data = response.data;",""," Y._loading = false;",""," if (data) {"," origMissing = missing;"," missing = [];"," r = [];"," process(data);"," redo = missing.length;"," if (redo) {"," if ([].concat(missing).sort().join() =="," origMissing.sort().join()) {"," redo = false;"," }"," }"," }",""," if (redo && data) {"," Y._loading = true;"," Y._use(missing, function() {"," if (Y._attach(data)) {"," Y._notify(callback, response, data);"," }"," });"," } else {"," if (data) {"," ret = Y._attach(data);"," }"," if (ret) {"," Y._notify(callback, response, args);"," }"," }",""," if (Y._useQueue && Y._useQueue.size() && !Y._loading) {"," Y._use.apply(Y, Y._useQueue.next());"," }",""," };","",""," // YUI().use('*'); // bind everything available"," if (firstArg === '*') {"," args = [];"," for (i in mods) {"," if (mods.hasOwnProperty(i)) {"," args.push(i);"," }"," }"," ret = Y._attach(args);"," if (ret) {"," handleLoader();"," }"," return Y;"," }",""," if ((mods.loader || mods['loader-base']) && !Y.Loader) {"," Y._attach(['loader' + ((!mods.loader) ? '-base' : '')]);"," }","",""," // use loader to expand dependencies and sort the"," // requirements if it is available."," if (boot && Y.Loader && args.length) {"," loader = getLoader(Y);"," loader.require(args);"," loader.ignoreRegistered = true;"," loader._boot = true;"," loader.calculate(null, (fetchCSS) ? null : 'js');"," args = loader.sorted;"," loader._boot = false;"," }",""," process(args);",""," len = missing.length;","",""," if (len) {"," missing = YArray.dedupe(missing);"," len = missing.length;"," }","",""," // dynamic load"," if (boot && len && Y.Loader) {"," Y._loading = true;"," loader = getLoader(Y);"," loader.onEnd = handleLoader;"," loader.context = Y;"," loader.data = args;"," loader.ignoreRegistered = false;"," loader.require(missing);"," loader.insert(null, (fetchCSS) ? null : 'js');",""," } else if (boot && len && Y.Get && !Env.bootstrapped) {",""," Y._loading = true;",""," handleBoot = function() {"," Y._loading = false;"," queue.running = false;"," Env.bootstrapped = true;"," G_ENV._bootstrapping = false;"," if (Y._attach(['loader'])) {"," Y._use(args, callback);"," }"," };",""," if (G_ENV._bootstrapping) {"," queue.add(handleBoot);"," } else {"," G_ENV._bootstrapping = true;"," Y.Get.script(config.base + config.loaderPath, {"," onEnd: handleBoot"," });"," }",""," } else {"," ret = Y._attach(args);"," if (ret) {"," handleLoader();"," }"," }",""," return Y;"," },","",""," /**"," Utility method for safely creating namespaces if they don't already exist."," May be called statically on the YUI global object or as a method on a YUI"," instance.",""," When called statically, a namespace will be created on the YUI global"," object:",""," // Create `YUI.your.namespace.here` as nested objects, preserving any"," // objects that already exist instead of overwriting them."," YUI.namespace('your.namespace.here');",""," When called as a method on a YUI instance, a namespace will be created on"," that instance:",""," // Creates `Y.property.package`."," Y.namespace('property.package');",""," Dots in the input string cause `namespace` to create nested objects for each"," token. If any part of the requested namespace already exists, the current"," object will be left in place and will not be overwritten. This allows"," multiple calls to `namespace` to preserve existing namespaced properties.",""," If the first token in the namespace string is \"YAHOO\", that token is"," discarded. This is legacy behavior for backwards compatibility with YUI 2.",""," Be careful with namespace tokens. Reserved words may work in some browsers"," and not others. For instance, the following will fail in some browsers"," because the supported version of JavaScript reserves the word \"long\":",""," Y.namespace('really.long.nested.namespace');",""," Note: If you pass multiple arguments to create multiple namespaces, only the"," last one created is returned from this function.",""," @method namespace"," @param {String} namespace* One or more namespaces to create."," @return {Object} Reference to the last namespace object created."," **/"," namespace: function() {"," var a = arguments, o, i = 0, j, d, arg;",""," for (; i < a.length; i++) {"," o = this; //Reset base object per argument or it will get reused from the last"," arg = a[i];"," if (arg.indexOf(PERIOD) > -1) { //Skip this if no \".\" is present"," d = arg.split(PERIOD);"," for (j = (d[0] == 'YAHOO') ? 1 : 0; j < d.length; j++) {"," o[d[j]] = o[d[j]] || {};"," o = o[d[j]];"," }"," } else {"," o[arg] = o[arg] || {};"," o = o[arg]; //Reset base object to the new object so it's returned"," }"," }"," return o;"," },",""," // this is replaced if the log module is included"," log: NOOP,"," message: NOOP,"," // this is replaced if the dump module is included"," dump: function (o) { return ''+o; },",""," /**"," Reports an error.",""," The reporting mechanism is controlled by the `throwFail` configuration"," attribute. If `throwFail` is falsy, the message is logged. If `throwFail` is"," truthy, a JS exception is thrown.",""," If an `errorFn` is specified in the config it must return `true` to indicate"," that the exception was handled and keep it from being thrown.",""," @method error"," @param {String} msg Error message."," @param {Error|String} [e] JavaScript error object or an error string."," @param {String} [src] Source of the error (such as the name of the module in"," which the error occurred)."," @chainable"," **/"," error: function(msg, e, src) {"," //TODO Add check for window.onerror here",""," var Y = this, ret;",""," if (Y.config.errorFn) {"," ret = Y.config.errorFn.apply(Y, arguments);"," }",""," if (!ret) {"," throw (e || new Error(msg));"," } else {"," Y.message(msg, 'error', ''+src); // don't scrub this one"," }",""," return Y;"," },",""," /**"," Generates an id string that is unique among all YUI instances in this"," execution context.",""," @method guid"," @param {String} [pre] Prefix."," @return {String} Unique id."," **/"," guid: function(pre) {"," var id = this.Env._guidp + '_' + (++this.Env._uidx);"," return (pre) ? (pre + id) : id;"," },",""," /**"," Returns a unique id associated with the given object and (if *readOnly* is"," falsy) stamps the object with that id so it can be identified in the future.",""," Stamping an object involves adding a `_yuid` property to it that contains"," the object's id. One exception to this is that in Internet Explorer, DOM"," nodes have a `uniqueID` property that contains a browser-generated unique"," id, which will be used instead of a YUI-generated id when available.",""," @method stamp"," @param {Object} o Object to stamp."," @param {Boolean} readOnly If truthy and the given object has not already"," been stamped, the object will not be modified and `null` will be"," returned."," @return {String} Object's unique id, or `null` if *readOnly* was truthy and"," the given object was not already stamped."," **/"," stamp: function(o, readOnly) {"," var uid;"," if (!o) {"," return o;"," }",""," // IE generates its own unique ID for dom nodes"," // The uniqueID property of a document node returns a new ID"," if (o.uniqueID && o.nodeType && o.nodeType !== 9) {"," uid = o.uniqueID;"," } else {"," uid = (typeof o === 'string') ? o : o._yuid;"," }",""," if (!uid) {"," uid = this.guid();"," if (!readOnly) {"," try {"," o._yuid = uid;"," } catch (e) {"," uid = null;"," }"," }"," }"," return uid;"," },",""," /**"," Destroys this YUI instance.",""," @method destroy"," @since 3.3.0"," **/"," destroy: function() {"," var Y = this;"," if (Y.Event) {"," Y.Event._unload();"," }"," delete instances[Y.id];"," delete Y.Env;"," delete Y.config;"," }",""," /**"," Safe `instanceof` wrapper that works around a memory leak in IE when the"," object being tested is `window` or `document`.",""," Unless you are testing objects that may be `window` or `document`, you"," should use the native `instanceof` operator instead of this method.",""," @method instanceOf"," @param {Object} o Object to check."," @param {Object} type Class to check against."," @since 3.3.0"," **/","};",""," YUI.prototype = proto;",""," // inheritance utilities are not available yet"," for (prop in proto) {"," if (proto.hasOwnProperty(prop)) {"," YUI[prop] = proto[prop];"," }"," }",""," /**"," Applies a configuration to all YUI instances in this execution context.",""," The main use case for this method is in \"mashups\" where several third-party"," scripts need to write to a global YUI config, but cannot share a single"," centrally-managed config object. This way they can all call"," `YUI.applyConfig({})` instead of overwriting the single global config.",""," @example",""," YUI.applyConfig({"," modules: {"," davglass: {"," fullpath: './davglass.js'"," }"," }"," });",""," YUI.applyConfig({"," modules: {"," foo: {"," fullpath: './foo.js'"," }"," }"," });",""," YUI().use('davglass', function (Y) {"," // Module davglass will be available here."," });",""," @method applyConfig"," @param {Object} o Configuration object to apply."," @static"," @since 3.5.0"," **/"," YUI.applyConfig = function(o) {"," if (!o) {"," return;"," }"," //If there is a GlobalConfig, apply it first to set the defaults"," if (YUI.GlobalConfig) {"," this.prototype.applyConfig.call(this, YUI.GlobalConfig);"," }"," //Apply this config to it"," this.prototype.applyConfig.call(this, o);"," //Reset GlobalConfig to the combined config"," YUI.GlobalConfig = this.config;"," };",""," // set up the environment"," YUI._init();",""," if (hasWin) {"," add(doc, 'DOMContentLoaded', handleReady);",""," // add a window load event at load time so we can capture"," // the case where it fires before dynamic loading is"," // complete."," add(window, 'load', handleLoad);"," } else {"," handleReady();"," handleLoad();"," }",""," YUI.Env.add = add;"," YUI.Env.remove = remove;",""," /*global exports*/"," // Support the CommonJS method for exporting our single global"," if (typeof exports == 'object') {"," exports.YUI = YUI;"," /**"," * Set a method to be called when `Get.script` is called in Node.js"," * `Get` will open the file, then pass it's content and it's path"," * to this method before attaching it. Commonly used for code coverage"," * instrumentation. Calling this multiple times will only"," * attach the last hook method. This method is only"," * available in Node.js."," * @method setLoadHook"," * @static"," * @param {Function} fn The function to set"," * @param {String} fn.data The content of the file"," * @param {String} fn.path The file path of the file"," */"," YUI.setLoadHook = function(fn) {"," YUI._getLoadHook = fn;"," };"," /**"," * Load hook for `Y.Get.script` in Node.js, see `YUI.setLoadHook`"," * @method _getLoadHook"," * @private"," * @param {String} data The content of the file"," * @param {String} path The file path of the file"," */"," YUI._getLoadHook = null;"," }",""," YUI.Env[VERSION] = {};","}());","","","/**","Config object that contains all of the configuration options for","this `YUI` instance.","","This object is supplied by the implementer when instantiating YUI. Some","properties have default values if they are not supplied by the implementer.","","This object should not be updated directly because some values are cached. Use","`applyConfig()` to update the config object on a YUI instance that has already","been configured.","","@class config","@static","**/","","/**","If `true` (the default), YUI will \"bootstrap\" the YUI Loader and module metadata","if they're needed to load additional dependencies and aren't already available.","","Setting this to `false` will prevent YUI from automatically loading the Loader","and module metadata, so you will need to manually ensure that they're available","or handle dependency resolution yourself.","","@property {Boolean} bootstrap","@default true","**/","","/**","","@property {Object} filters","**/","","/**","If `true`, YUI will use a combo handler to load multiple modules in as few","requests as possible.","","The YUI CDN (which YUI uses by default) supports combo handling, but other","servers may not. If the server from which you're loading YUI does not support","combo handling, set this to `false`.","","Providing a value for the `base` config property will cause `combine` to default","to `false` instead of `true`.","","@property {Boolean} combine","@default true","*/","","/**","Array of module names that should never be dynamically loaded.","","@property {String[]} ignore","**/","","/**","Array of module names that should always be loaded when required, even if","already present on the page.","","@property {String[]} force","**/","","/**","DOM element or id that should be used as the insertion point for dynamically","added ` + + +jQuery (uses jQuery.post): +`````````````````````````` + +{ezscript_require(array( 'ezjsc::jquery', 'ezjsc::jqueryio') )} + + +Set a preference +---------------- + +YUI 3.x +``````` + +{ezscript_require(array( 'ezjsc::yui3', 'ezjsc::yui3io') )} + + +jQuery +`````` + +{ezscript_require(array( 'ezjsc::jquery', 'ezjsc::jqueryio') )} + diff --git a/extension.xml b/extension.xml new file mode 100644 index 0000000..715f347 --- /dev/null +++ b/extension.xml @@ -0,0 +1,46 @@ + + + + eZ JSCore LS + //autogentag// + Copyright (C) eZ Systems AS. All rights reserved. + This software is distributed under same license as eZ Publish + https://github.com/ezsystems/ezjscore + + + + YUI2 + Licensed under BSD License + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + http://yuilibrary.com/projects/yui2/ + 2.8.2 + + + YUI3 + Licensed under BSD License + Copyright (c) 2014, Yahoo! Inc. All rights reserved. + http://yuilibrary.com/ + 3.17.2 + + + jQuery + Licensed under MIT license + Copyright (c) 2013 John Resig + http://jquery.com/ + 1.10.2 + + + jQuery UI + Dual licensed under MIT and GPL licenses + Copyright (c) 2013 jQuery project / jQuery UI team + http://jqueryui.com/about + 1.10.3 + + + + + + + + + \ No newline at end of file diff --git a/modules/ezjscore/call.php b/modules/ezjscore/call.php new file mode 100644 index 0000000..9dd952b --- /dev/null +++ b/modules/ezjscore/call.php @@ -0,0 +1,191 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/* + * Brief: ezjsc rpc server call + * Lets you call custom php code(s) from javascript to return json / xhtml / xml / text + */ + +$http = eZHTTPTool::instance(); +$callType = isset($Params['type']) ? $Params['type'] : 'call'; +$callFnList = array(); +$debugOutput = isset($Params['debug']) ? (bool)$Params['debug'] : false; +$callSeparator = '@SEPARATOR$'; +$streamSeparator = '@END$'; + +// prefer post parameters, as they are more encoding safe +if ( $http->hasPostVariable( 'ezjscServer_function_arguments' ) ) + $callList = explode( $callSeparator, strip_tags( $http->postVariable( 'ezjscServer_function_arguments' ) ) ); +else if ( isset( $Params['function_arguments'] ) ) + $callList = explode( $callSeparator, strip_tags( $Params['function_arguments'] ) ); +else + $callList = array(); + +// Allow get parameter to be set to test in browser +if ( isset( $_GET['ContentType'] ) ) +{ + $contentType = $_GET['ContentType']; +} +else +{ + $contentType = ezjscAjaxContent::getHttpAccept(); + header('Vary: Accept'); +} + +// set http headers +if ( $contentType === 'xml' ) +{ + header('Content-Type: text/xml; charset=utf-8'); +} +else if ( $contentType === 'javascript' ) +{ + $contentType = 'json'; + header('Content-Type: text/javascript; charset=utf-8'); +} +else if ( $contentType === 'json' ) +{ + header('Content-Type: application/json; charset=utf-8'); +} +else if ( $contentType === 'html' ) +{ + header('Content-Type: text/html; charset=utf-8'); +} +else if ( $contentType === 'xhtml' ) +{ + header('Content-Type: application/xhtml+xml; charset=utf-8'); +} +else +{ + $contentType = 'text'; + header('Content-Type: text/plain; charset=utf-8'); +} + +// abort if no calls where found +if ( !$callList ) +{ + header( $_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error' ); + $response = array( 'error_text' => 'No server call defined', 'content' => '' ); + echo ezjscAjaxContent::autoEncode( $response, $contentType ); + eZExecution::cleanExit(); + return; +} + + +// prepare calls +foreach( $callList as $call ) +{ + $temp = ezjscServerRouter::getInstance( explode( '::', $call ), true, true ); + $callFnList[] = $temp === null ? $call : $temp; +} + +$callFnListCount = count( $callFnList ) -1; + +// do calls +if ( $callType === 'stream' ) +{ + if ( isset( $Params['interval'] ) + && is_numeric( $Params['interval'] ) + && $Params['interval'] > 49 ) + { + // intervall in milliseconds, minimum is 0.05 seconds + $callInterval = $Params['interval'] * 1000; + } + else + { + // default interval is every 0.5 seconds + $callInterval = 500 * 1000; + } + + $endTime = time() + 29; + while ( @ob_end_clean() ); + // flush 256 bytes first to force IE to not buffer the stream + if ( strpos( eZSys::serverVariable( 'HTTP_USER_AGENT' ), 'MSIE' ) !== false ) + { + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo " \n"; + } + // set_time_limit(65); + while( time() < $endTime ) + { + echo $streamSeparator . implode( $callSeparator, multipleezjscServerCalls( $callFnList, $contentType ) ); + flush(); + usleep( $callInterval ); + } +} +else +{ + echo implode( $callSeparator, multipleezjscServerCalls( $callFnList, $contentType ) ); +} + + +function multipleezjscServerCalls( $calls, $contentType = 'json' ) +{ + $r = array(); + foreach( $calls as $call ) + { + $response = array( 'error_text' => '', 'content' => '' ); + if( $call instanceOf ezjscServerRouter ) + { + try + { + $response['content'] = $call->call(); + } + catch ( Exception $e ) + { + $response['error_text'] = $e->getMessage(); + } + } + else + { + $response['error_text'] = 'Not a valid ezjscServerRouter argument: "' . htmlentities( $call, ENT_QUOTES ) . '"'; + } + $r[] = ezjscAjaxContent::autoEncode( $response, $contentType ); + } + return $r; +} + + + +if ( $debugOutput && ( $contentType === 'xml' || $contentType === 'xhtml' || $contentType === 'html' ) ) +{ + echo ""; +} +else if ( $debugOutput && $contentType === 'json' ) +{ + echo "/*\r\n"; + eZDebug::printReport( false, false ); + echo "\r\n*/"; +} + +eZDB::checkTransactionCounter(); +eZExecution::cleanExit(); diff --git a/modules/ezjscore/hello.php b/modules/ezjscore/hello.php new file mode 100644 index 0000000..dffdff8 --- /dev/null +++ b/modules/ezjscore/hello.php @@ -0,0 +1,46 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/* + * Brief: ezjsc module hello + * A hello world view for benchmarking + */ + + +$withPageLayout = $Params['with_pagelayout']; + +if ( $withPageLayout ) +{ + $Result = array(); + $Result['content'] = 'Hello World!'; +} +else +{ + echo 'Hello World!'; + eZExecution::cleanExit(); +} diff --git a/modules/ezjscore/module.php b/modules/ezjscore/module.php new file mode 100644 index 0000000..9b0e14e --- /dev/null +++ b/modules/ezjscore/module.php @@ -0,0 +1,72 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +$Module = array( 'name' => 'ezjsc Module and Views' ); + + +$ViewList = array(); + +$ViewList['hello'] = array( + 'script' => 'hello.php', + 'params' => array( 'with_pagelayout' ) + ); + +$ViewList['call'] = array( + 'functions' => array( 'call' ), + 'script' => 'call.php', + 'params' => array( 'function_arguments', 'type', 'interval', 'debug' ) + ); + +$ViewList['run'] = array( + 'functions' => array( 'run' ), + 'script' => 'run.php', + 'params' => array( ) + ); + + + +$ezjscServerFunctionList = array( + 'name'=> 'FunctionList', + 'values'=> array() + ); + +$iniFunctionList = eZINI::instance('ezjscore.ini')->variable( 'ezjscServer', 'FunctionList' ); +foreach ( $iniFunctionList as $iniFunction ) +{ + $ezjscServerFunctionList['values'][] = array( + 'Name' => $iniFunction, + 'value' => $iniFunction + ); +} + +$FunctionList = array(); +$FunctionList['run'] = array(); +$FunctionList['call'] = array( 'FunctionList' => $ezjscServerFunctionList ); + + +?> diff --git a/modules/ezjscore/run.php b/modules/ezjscore/run.php new file mode 100644 index 0000000..a07f422 --- /dev/null +++ b/modules/ezjscore/run.php @@ -0,0 +1,121 @@ + +// +// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// SOFTWARE NAME: eZ JSCore extension for eZ Publish +// SOFTWARE RELEASE: 1.x +// COPYRIGHT NOTICE: Copyright (C) 1999-2014 eZ Systems AS +// SOFTWARE LICENSE: GNU General Public License v2.0 +// NOTICE: > +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2.0 of the GNU General +// Public License as published by the Free Software Foundation. +// +// 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 version 2.0 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. +// +// +// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## +// + +/* + * Brief: ezjsc module run + * A light redirector to be able to run other modules indirectly w/o having to use empty layout/set/*. + */ + +$uriParams = $Params['Parameters']; +$userParams = $Params['UserParameters']; + +// Functions that earlier existed in index_ajax.php (now removed from ezjscore) +function exitWithInternalError( $errorText ) +{ + header( $_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error' ); + //include_once( 'extension/ezjscore/classes/ezjscajaxcontent.php' ); + $contentType = ezjscAjaxContent::getHttpAccept(); + + // set headers + if ( $contentType === 'xml' ) + header('Content-Type: text/xml; charset=utf-8'); + else if ( $contentType === 'json' ) + header('Content-Type: text/javascript; charset=utf-8'); + + echo ezjscAjaxContent::autoEncode( array( 'error_text' => $errorText, 'content' => '' ), $contentType ); + eZExecution::cleanExit(); +} + +function hasAccessToBySetting( $moduleName, $view = false, $policyAccessList = false ) +{ + if ( $policyAccessList !== false ) + { + if ( in_array( $moduleName, $policyAccessList) ) + return true; + if ( $view && in_array( $moduleName . '/' . $view, $policyAccessList) ) + return true; + } + return false; +} + + + +// look for module and view info in uri parameters +if ( !isset( $uriParams[1] ) ) +{ + exitWithInternalError( "Did not find module info in url." ); + return; +} + +// find module +$uri = eZURI::instance( eZSys::requestURI() ); +$moduleName = $uri->element(); +$module = eZModule::findModule( $moduleName ); +if ( !$module instanceof eZModule ) +{ + exitWithInternalError( "'$moduleName' module does not exist, or is not a valid module." ); + return; +} + +// check existance of view +$viewName = $uri->element( 1 ); +$moduleViews = $module->attribute('views'); +if ( !isset( $moduleViews[ $viewName ] ) ) +{ + exitWithInternalError( "'$viewName' view does not exist on the current module." ); + return; +} + +// Check if module / view is disabled +$moduleCheck = eZModule::accessAllowed( $uri ); +if ( !$moduleCheck['result'] ) +{ + exitWithInternalError( '$moduleName/$viewName is disabled.' ); +} + + +// check access to view +$ini = eZINI::instance(); +$currentUser = eZUser::currentUser(); +if ( !hasAccessToBySetting( $moduleName, $viewName, $ini->variable( 'RoleSettings', 'PolicyOmitList' ) ) + && !$currentUser->hasAccessToView( $module, $viewName, $params ) ) +{ + exitWithInternalError( "User does not have access to the $moduleName/$viewName policy." ); + return; +} + +// run module view +$uri->increase(); +$uri->increase(); +$GLOBALS['eZRequestedModule'] = $module; +$moduleResult = $module->run( $viewName, $uri->elements( false ), false, $uri->userParameters() ); + +// ouput result and end exit cleanly +eZDB::checkTransactionCounter(); +echo ezpEvent::getInstance()->filter( 'response/output', $moduleResult['content'] ); +eZExecution::cleanExit(); diff --git a/settings/design.ini.append.php b/settings/design.ini.append.php new file mode 100644 index 0000000..cf616d3 --- /dev/null +++ b/settings/design.ini.append.php @@ -0,0 +1,6 @@ + diff --git a/settings/ezjscore.ini b/settings/ezjscore.ini new file mode 100644 index 0000000..eab4410 --- /dev/null +++ b/settings/ezjscore.ini @@ -0,0 +1,142 @@ +#?ini charset="utf-8"? + +[eZJSCore] + +# Disables/enables js / css packer (for debugging Apache rewrite rules) +# Normally controlled by [TemplateSettings]DevelopmentMode for convenience, +# but can also be specifically controlled by this setting if set. +# Force packer level by setting integer from 0 to 3 instead of [dis|en]abled +#Packer=disabled + +JavaScriptOptimizer[] +JavaScriptOptimizer[]=ezjscJavascriptOptimizer + +CssOptimizer[] +CssOptimizer[]=ezjscCssOptimizer + +## CDN Script settings (jQuery/ Yui integration) +# The following settings in this block are specific to ezjscore's +# jQuert / yui integrations and used by the ezjsc::[jquery|yui[2|3]] calls. +# You only need to change them if you: +# - Need to load these scripts locally (intranet / not rely on internet connection) +# - Want to add support for another js library / framework +# - Want to update the library it self +# You don't have to set up your js scripts with this, it's enough to just refer +# to them directly using {ezscript[_require]('somescript.js')} or +# {ezscript_require(array('ezjsc::jquery', 'somescript_that_uses_jquery.js'))} + +# enable / disable loading the YUI / jQuery files from external servers +LoadFromCDN=disabled + +# Preferred Library (can be 'yui3' or 'jquery') +# This is a preference hint to extensions that use ezjscore +# so they can optionally select to support both and select by this setting +PreferredLibrary=yui3 +#PreferredLibrary=jquery + +# List of external JavaScript YUI / jQuery libraries with their CDN URL +# If it starts with :// http or https will be selected based on if page is served as https or not +ExternalScripts[yui3]=http://yui.yahooapis.com/3.17.2/build/yui/yui-min.js +ExternalScripts[yui2]=http://yui.yahooapis.com/2.8.2/build/yuiloader/yuiloader-min.js +ExternalScripts[jquery]=://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js +ExternalScripts[jqueryUI]=://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js + +# List of local JavaScript YUI / jQuery libraries, optionally start with "/" to signal that its in +# root of design folder and not in /javascript sub folder +LocalScripts[yui3]=/lib/yui/3.17.2/build/yui/yui-min.js +LocalScripts[yui2]=/lib/yui/2.8.2/build/yuiloader/yuiloader-min.js +LocalScripts[jquery]=jquery-1.10.2.min.js +LocalScripts[jqueryUI]=jquery-ui-1.10.3.custom.min.js + +# Local base script path, needed for yui scripts (YUILoader) +LocalScriptBasePath[yui3]=lib/yui/3.17.2/build/ +LocalScriptBasePath[yui2]=lib/yui/2.8.2/build/ + +[YUI3] +# List of options to put in the YUI3 config for dynamic loading +# see http://yuilibrary.com/yui/docs/api/classes/config.html +# Note: "base" option and "combine" (false) are automatically filled +# when loading the local version of YUI3 +LoaderOptions[] +# uncomment to load the raw version (not minimized) of YUI3 files +#LoaderOptions[filter]=raw + +[Packer] +# Appends the last modified time to the cached file name so Proxy/Browser cache +# is forced to re fetch file on change. Note: cronjob to cleanup expired +# files does not exist, but should be fairly trivial to create. +AppendLastModifiedTime=disabled + +# For spreading the load of static files to separate domains as recommended by +# YDN Performance Best Practices. Key should match file extension: .js | .css +CustomHosts[] +# Example: Serve javascript files from static sub domain (No end slash!) +#CustomHosts[.js]=http://static.example.com + + + +[ezjscServer] +# List of permission functions as used by the eZ Publish permission system +FunctionList[]=ezjsctemplate +#FunctionList[]=ezjsckeyword +#FunctionList[]=ezjscrating_rate + + +# Settings for setting up a server functions +# These are also supported by ezjscPacker, the class used in ezcss and ezscript +# Here is an example of setting up such a function: +# +#[ezjscServer_] +## Optional, uses as class name if not set +#Class=MyCustomJsGeneratorClass +## Optional, defines if a template is to be executed instead of a php class function +## In this case request will go to /templates//.tpl +#TemplateFunction=true +## Optional, uses autoload system if not defined +#File=extension/ezjscore/classes/mycustomjsgenerator.php +## Optional, List of [ezjscServer]FunctionList functions user needs to have access to, Default: none +#Functions[]=ezjsc +## Optional, If pr function, then function name will be appended to Function name like +## _, warning will be thrown if not set in FunctionList[]. +## Default: disabled +#PermissionPrFunction=enabled +# +# Definition of use in template: +# {ezscript('::[::arg1[::arg2]]')} + +[ezjscServer_ezjsc] +# Url to test this server function(return current time): +# /ezjscore/call/ezjsc::time +Class=ezjscServerFunctionsJs +#File=extension/ezjscore/classes/ezjscserverfunctionsjs.php + +[ezjscServer_ezjscnode] +# Url to test this server function(return node list): +# /ezjscore/call/ezjscnode::subtree::2 +Class=ezjscServerFunctionsNode +#File=extension/ezjscore/classes/ezjscserverfunctionsnode.php + +# Allows setting a Hard Limit to the subtree method to prevent the load of very large subtrees +# reducing server load and risk of DOS attacks. +# false disables the feature, any integer will set the hard limit. +# for example: a hard limit of 100 will allow limiting to 30 or 40, but will replace a +# limit of 150. +HardLimit=false + +[ezjscServer_ezjsctemplate] +# Url to test this server function(return alert message): +# /ezjscore/call/ezjsctemplate::alert +# will execute templates/ezjsctemplate/alert.tpl +TemplateFunction=true +Functions[]=ezjsctemplate + +[ezjscServer_ezpublishingqueue] +Class=ezjscServerFunctionsPublishingQueue + +[ezjscServer_ezajaxuploader] +Class=ezjscServerFunctionsAjaxUploader + +[AjaxUploader] +AjaxUploadHandler[] +AjaxUploadHandler[ezobjectrelationlist]=ezpRelationListAjaxUploader +AjaxUploadHandler[ezobjectrelation]=ezpRelationAjaxUploader diff --git a/settings/module.ini.append.php b/settings/module.ini.append.php new file mode 100644 index 0000000..361a5da --- /dev/null +++ b/settings/module.ini.append.php @@ -0,0 +1,7 @@ + diff --git a/settings/site.ini.append.php b/settings/site.ini.append.php new file mode 100644 index 0000000..984f601 --- /dev/null +++ b/settings/site.ini.append.php @@ -0,0 +1,37 @@ + diff --git a/translations/untranslated/translation.ts b/translations/untranslated/translation.ts new file mode 100644 index 0000000..54f2e87 --- /dev/null +++ b/translations/untranslated/translation.ts @@ -0,0 +1,78 @@ + + + + + design/standard/content/datatype + + + Yes + + + + + extension/ezjscore/ajaxuploader + + + Provided attribute id and version number are invalid. + + + + + Unable to retrieve the uploaded file: %message + + + + + Unable to load the class which identifier is "%class", this is probably a configuration issue in upload.ini. + + + + + The file cannot be processed because it would result in a '%class' object and this relation does not accept this type of object. + + + + + Location not found. + + + + + Unable to create the content object to add to the relation: %detail + + + + + Unable to find the identifier of ajax upload handler + + + + + Unable to load the ajax upload handler + + + + + + You are not allowed to upload a file. + + + + + Unable to store the uploaded file. + + + + + + + Arguments error. + + + + + Unable to retrieve the uploaded file. + + + +